@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/ng-generate/control-flow-migration/index.mjs
|
|
67
67
|
var control_flow_migration_exports = {};
|
|
68
68
|
__export(control_flow_migration_exports, {
|
|
69
69
|
default: () => control_flow_migration_default
|
|
@@ -72,22 +72,22 @@ module.exports = __toCommonJS(control_flow_migration_exports);
|
|
|
72
72
|
var import_schematics = require("@angular-devkit/schematics");
|
|
73
73
|
var import_path3 = require("path");
|
|
74
74
|
|
|
75
|
-
// bazel-out/
|
|
75
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/change_tracker.mjs
|
|
76
76
|
var import_typescript2 = __toESM(require("typescript"), 1);
|
|
77
77
|
|
|
78
|
-
// bazel-out/
|
|
78
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/import_manager.mjs
|
|
79
79
|
var import_typescript = __toESM(require("typescript"), 1);
|
|
80
80
|
|
|
81
|
-
// bazel-out/
|
|
81
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/change_tracker.mjs
|
|
82
82
|
function normalizePath(path2) {
|
|
83
83
|
return path2.replace(/\\/g, "/");
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
// bazel-out/
|
|
86
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
87
87
|
var import_path = require("path");
|
|
88
88
|
var import_typescript4 = __toESM(require("typescript"), 1);
|
|
89
89
|
|
|
90
|
-
// bazel-out/
|
|
90
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
|
|
91
91
|
var path = __toESM(require("path"), 1);
|
|
92
92
|
var import_typescript3 = __toESM(require("typescript"), 1);
|
|
93
93
|
function parseTsconfigFile(tsconfigPath, basePath) {
|
|
@@ -104,7 +104,7 @@ function parseTsconfigFile(tsconfigPath, basePath) {
|
|
|
104
104
|
return import_typescript3.default.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
// bazel-out/
|
|
107
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
108
108
|
function createMigrationProgram(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles) {
|
|
109
109
|
const { rootNames, options, host } = createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles);
|
|
110
110
|
return import_typescript4.default.createProgram(rootNames, options, host);
|
|
@@ -137,7 +137,7 @@ function canMigrateFile(basePath, sourceFile, program) {
|
|
|
137
137
|
return !(0, import_path.relative)(basePath, sourceFile.fileName).startsWith("..");
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
// bazel-out/
|
|
140
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/selector.mjs
|
|
141
141
|
var _SELECTOR_REGEXP = new RegExp(
|
|
142
142
|
`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,
|
|
143
143
|
"g"
|
|
@@ -445,7 +445,7 @@ var SelectorContext = class {
|
|
|
445
445
|
}
|
|
446
446
|
};
|
|
447
447
|
|
|
448
|
-
// bazel-out/
|
|
448
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/core.mjs
|
|
449
449
|
var ViewEncapsulation;
|
|
450
450
|
(function(ViewEncapsulation2) {
|
|
451
451
|
ViewEncapsulation2[ViewEncapsulation2["Emulated"] = 0] = "Emulated";
|
|
@@ -507,7 +507,7 @@ function parseSelectorToR3Selector(selector) {
|
|
|
507
507
|
return selector ? CssSelector.parse(selector).map(parserSelectorToR3Selector) : [];
|
|
508
508
|
}
|
|
509
509
|
|
|
510
|
-
// bazel-out/
|
|
510
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/digest.mjs
|
|
511
511
|
var textEncoder;
|
|
512
512
|
function computeDigest(message) {
|
|
513
513
|
return sha1(serializeNodes(message.nodes).join("") + `[${message.meaning}]`);
|
|
@@ -747,7 +747,7 @@ function wordAt(bytes, index, endian) {
|
|
|
747
747
|
return word;
|
|
748
748
|
}
|
|
749
749
|
|
|
750
|
-
// bazel-out/
|
|
750
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_ast.mjs
|
|
751
751
|
var TypeModifier;
|
|
752
752
|
(function(TypeModifier2) {
|
|
753
753
|
TypeModifier2[TypeModifier2["None"] = 0] = "None";
|
|
@@ -1702,7 +1702,7 @@ function serializeTags(tags) {
|
|
|
1702
1702
|
return out;
|
|
1703
1703
|
}
|
|
1704
1704
|
|
|
1705
|
-
// bazel-out/
|
|
1705
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/constant_pool.mjs
|
|
1706
1706
|
var CONSTANT_PREFIX = "_c";
|
|
1707
1707
|
var UNKNOWN_VALUE_KEY = variable("<unknown>");
|
|
1708
1708
|
var KEY_CONTEXT = {};
|
|
@@ -1885,7 +1885,7 @@ function isLongStringLiteral(expr) {
|
|
|
1885
1885
|
return expr instanceof LiteralExpr && typeof expr.value === "string" && expr.value.length >= POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS;
|
|
1886
1886
|
}
|
|
1887
1887
|
|
|
1888
|
-
// bazel-out/
|
|
1888
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_identifiers.mjs
|
|
1889
1889
|
var CORE = "@angular/core";
|
|
1890
1890
|
var _Identifiers = class {
|
|
1891
1891
|
};
|
|
@@ -2517,8 +2517,14 @@ var Identifiers = _Identifiers;
|
|
|
2517
2517
|
(() => {
|
|
2518
2518
|
_Identifiers.validateIframeAttribute = { name: "\u0275\u0275validateIframeAttribute", moduleName: CORE };
|
|
2519
2519
|
})();
|
|
2520
|
+
(() => {
|
|
2521
|
+
_Identifiers.InputSignalBrandWriteType = { name: "\u0275INPUT_SIGNAL_BRAND_WRITE_TYPE", moduleName: CORE };
|
|
2522
|
+
})();
|
|
2523
|
+
(() => {
|
|
2524
|
+
_Identifiers.UnwrapDirectiveSignalInputs = { name: "\u0275UnwrapDirectiveSignalInputs", moduleName: CORE };
|
|
2525
|
+
})();
|
|
2520
2526
|
|
|
2521
|
-
// bazel-out/
|
|
2527
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/util.mjs
|
|
2522
2528
|
var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
|
|
2523
2529
|
function dashCaseToCamelCase(input) {
|
|
2524
2530
|
return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());
|
|
@@ -2606,7 +2612,7 @@ function partitionArray(arr, conditionFn) {
|
|
|
2606
2612
|
return [truthy, falsy];
|
|
2607
2613
|
}
|
|
2608
2614
|
|
|
2609
|
-
// bazel-out/
|
|
2615
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/source_map.mjs
|
|
2610
2616
|
var VERSION = 3;
|
|
2611
2617
|
var JS_B64_PREFIX = "# sourceMappingURL=data:application/json;base64,";
|
|
2612
2618
|
var SourceMapGenerator = class {
|
|
@@ -2735,7 +2741,7 @@ function toBase64Digit(value) {
|
|
|
2735
2741
|
return B64_DIGITS[value];
|
|
2736
2742
|
}
|
|
2737
2743
|
|
|
2738
|
-
// bazel-out/
|
|
2744
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_emitter.mjs
|
|
2739
2745
|
var _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g;
|
|
2740
2746
|
var _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;
|
|
2741
2747
|
var _INDENT_WITH = " ";
|
|
@@ -3220,7 +3226,7 @@ function _createIndent(count) {
|
|
|
3220
3226
|
return res;
|
|
3221
3227
|
}
|
|
3222
3228
|
|
|
3223
|
-
// bazel-out/
|
|
3229
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/util.mjs
|
|
3224
3230
|
function typeWithParameters(type, numParams) {
|
|
3225
3231
|
if (numParams === 0) {
|
|
3226
3232
|
return expressionType(type);
|
|
@@ -3285,7 +3291,7 @@ function generateForwardRef(expr) {
|
|
|
3285
3291
|
return importExpr(Identifiers.forwardRef).callFn([arrowFn([], expr)]);
|
|
3286
3292
|
}
|
|
3287
3293
|
|
|
3288
|
-
// bazel-out/
|
|
3294
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_factory.mjs
|
|
3289
3295
|
var R3FactoryDelegateType;
|
|
3290
3296
|
(function(R3FactoryDelegateType2) {
|
|
3291
3297
|
R3FactoryDelegateType2[R3FactoryDelegateType2["Class"] = 0] = "Class";
|
|
@@ -3430,7 +3436,7 @@ function getInjectFn(target) {
|
|
|
3430
3436
|
}
|
|
3431
3437
|
}
|
|
3432
3438
|
|
|
3433
|
-
// bazel-out/
|
|
3439
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/tags.mjs
|
|
3434
3440
|
var TagContentType;
|
|
3435
3441
|
(function(TagContentType2) {
|
|
3436
3442
|
TagContentType2[TagContentType2["RAW_TEXT"] = 0] = "RAW_TEXT";
|
|
@@ -3463,7 +3469,7 @@ function mergeNsAndName(prefix, localName) {
|
|
|
3463
3469
|
return prefix ? `:${prefix}:${localName}` : localName;
|
|
3464
3470
|
}
|
|
3465
3471
|
|
|
3466
|
-
// bazel-out/
|
|
3472
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_ast.mjs
|
|
3467
3473
|
var Comment = class {
|
|
3468
3474
|
constructor(value, sourceSpan) {
|
|
3469
3475
|
this.value = value;
|
|
@@ -3844,7 +3850,7 @@ function visitAll(visitor, nodes) {
|
|
|
3844
3850
|
return result;
|
|
3845
3851
|
}
|
|
3846
3852
|
|
|
3847
|
-
// bazel-out/
|
|
3853
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_ast.mjs
|
|
3848
3854
|
var Message = class {
|
|
3849
3855
|
constructor(nodes, placeholders, placeholderToMessage, meaning, description, customId) {
|
|
3850
3856
|
this.nodes = nodes;
|
|
@@ -4004,7 +4010,7 @@ var LocalizeMessageStringVisitor = class {
|
|
|
4004
4010
|
}
|
|
4005
4011
|
};
|
|
4006
4012
|
|
|
4007
|
-
// bazel-out/
|
|
4013
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xml_helper.mjs
|
|
4008
4014
|
var _Visitor = class {
|
|
4009
4015
|
visitTag(tag) {
|
|
4010
4016
|
const strAttrs = this._serializeAttributes(tag.attrs);
|
|
@@ -4032,12 +4038,12 @@ ${doctype.dtd}
|
|
|
4032
4038
|
};
|
|
4033
4039
|
var _visitor = new _Visitor();
|
|
4034
4040
|
|
|
4035
|
-
// bazel-out/
|
|
4041
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xmb.mjs
|
|
4036
4042
|
function toPublicName(internalName) {
|
|
4037
4043
|
return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, "_");
|
|
4038
4044
|
}
|
|
4039
4045
|
|
|
4040
|
-
// bazel-out/
|
|
4046
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/util.mjs
|
|
4041
4047
|
var CLOSURE_TRANSLATION_VAR_PREFIX = "MSG_";
|
|
4042
4048
|
var TRANSLATION_VAR_PREFIX = "i18n_";
|
|
4043
4049
|
var I18N_ATTR = "i18n";
|
|
@@ -4139,7 +4145,7 @@ function declareI18nVariable(variable2) {
|
|
|
4139
4145
|
return new DeclareVarStmt(variable2.name, void 0, INFERRED_TYPE, void 0, variable2.sourceSpan);
|
|
4140
4146
|
}
|
|
4141
4147
|
|
|
4142
|
-
// bazel-out/
|
|
4148
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/util.mjs
|
|
4143
4149
|
var UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;
|
|
4144
4150
|
var TEMPORARY_NAME = "_t";
|
|
4145
4151
|
var CONTEXT_NAME = "ctx";
|
|
@@ -4379,7 +4385,7 @@ function getInstructionStatements(instructions) {
|
|
|
4379
4385
|
return statements;
|
|
4380
4386
|
}
|
|
4381
4387
|
|
|
4382
|
-
// bazel-out/
|
|
4388
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/injectable_compiler_2.mjs
|
|
4383
4389
|
function compileInjectable(meta, resolveForwardRefs) {
|
|
4384
4390
|
let result = null;
|
|
4385
4391
|
const factoryMeta = {
|
|
@@ -4464,7 +4470,7 @@ function createFactoryFunction(type) {
|
|
|
4464
4470
|
return arrowFn([new FnParam("t", DYNAMIC_TYPE)], type.prop("\u0275fac").callFn([variable("t")]));
|
|
4465
4471
|
}
|
|
4466
4472
|
|
|
4467
|
-
// bazel-out/
|
|
4473
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/assertions.mjs
|
|
4468
4474
|
var UNUSABLE_INTERPOLATION_REGEXPS = [
|
|
4469
4475
|
/^\s*$/,
|
|
4470
4476
|
/[<>]/,
|
|
@@ -4486,7 +4492,7 @@ function assertInterpolationSymbols(identifier, value) {
|
|
|
4486
4492
|
}
|
|
4487
4493
|
}
|
|
4488
4494
|
|
|
4489
|
-
// bazel-out/
|
|
4495
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/defaults.mjs
|
|
4490
4496
|
var InterpolationConfig = class {
|
|
4491
4497
|
static fromArray(markers) {
|
|
4492
4498
|
if (!markers) {
|
|
@@ -4503,7 +4509,7 @@ var InterpolationConfig = class {
|
|
|
4503
4509
|
var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig("{{", "}}");
|
|
4504
4510
|
var DEFAULT_CONTAINER_BLOCKS = /* @__PURE__ */ new Set(["switch"]);
|
|
4505
4511
|
|
|
4506
|
-
// bazel-out/
|
|
4512
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/chars.mjs
|
|
4507
4513
|
var $EOF = 0;
|
|
4508
4514
|
var $BSPACE = 8;
|
|
4509
4515
|
var $TAB = 9;
|
|
@@ -4585,7 +4591,7 @@ function isQuote(code) {
|
|
|
4585
4591
|
return code === $SQ || code === $DQ || code === $BT;
|
|
4586
4592
|
}
|
|
4587
4593
|
|
|
4588
|
-
// bazel-out/
|
|
4594
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/parse_util.mjs
|
|
4589
4595
|
var ParseLocation = class {
|
|
4590
4596
|
constructor(file, offset, line, col) {
|
|
4591
4597
|
this.file = file;
|
|
@@ -4732,7 +4738,7 @@ function sanitizeIdentifier(name) {
|
|
|
4732
4738
|
return name.replace(/\W/g, "_");
|
|
4733
4739
|
}
|
|
4734
4740
|
|
|
4735
|
-
// bazel-out/
|
|
4741
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_js_emitter.mjs
|
|
4736
4742
|
var makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})';
|
|
4737
4743
|
var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
4738
4744
|
constructor() {
|
|
@@ -4825,7 +4831,7 @@ var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
|
4825
4831
|
}
|
|
4826
4832
|
};
|
|
4827
4833
|
|
|
4828
|
-
// bazel-out/
|
|
4834
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit_trusted_types.mjs
|
|
4829
4835
|
var policy;
|
|
4830
4836
|
function getPolicy() {
|
|
4831
4837
|
if (policy === void 0) {
|
|
@@ -4863,7 +4869,7 @@ function newTrustedFunctionForJIT(...args) {
|
|
|
4863
4869
|
return fn2.bind(_global);
|
|
4864
4870
|
}
|
|
4865
4871
|
|
|
4866
|
-
// bazel-out/
|
|
4872
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit.mjs
|
|
4867
4873
|
var JitEvaluator = class {
|
|
4868
4874
|
evaluateStatements(sourceUrl, statements, refResolver, createSourceMaps) {
|
|
4869
4875
|
const converter = new JitEmitterVisitor(refResolver);
|
|
@@ -4954,7 +4960,7 @@ function isUseStrictStatement(statement) {
|
|
|
4954
4960
|
return statement.isEquivalent(literal("use strict").toStmt());
|
|
4955
4961
|
}
|
|
4956
4962
|
|
|
4957
|
-
// bazel-out/
|
|
4963
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_injector_compiler.mjs
|
|
4958
4964
|
function compileInjector(meta) {
|
|
4959
4965
|
const definitionMap = new DefinitionMap();
|
|
4960
4966
|
if (meta.providers !== null) {
|
|
@@ -4971,7 +4977,7 @@ function createInjectorType(meta) {
|
|
|
4971
4977
|
return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));
|
|
4972
4978
|
}
|
|
4973
4979
|
|
|
4974
|
-
// bazel-out/
|
|
4980
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_jit.mjs
|
|
4975
4981
|
var R3JitReflector = class {
|
|
4976
4982
|
constructor(context) {
|
|
4977
4983
|
this.context = context;
|
|
@@ -4987,7 +4993,7 @@ var R3JitReflector = class {
|
|
|
4987
4993
|
}
|
|
4988
4994
|
};
|
|
4989
4995
|
|
|
4990
|
-
// bazel-out/
|
|
4996
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_module_compiler.mjs
|
|
4991
4997
|
var R3SelectorScopeMode;
|
|
4992
4998
|
(function(R3SelectorScopeMode2) {
|
|
4993
4999
|
R3SelectorScopeMode2[R3SelectorScopeMode2["Inline"] = 0] = "Inline";
|
|
@@ -5128,7 +5134,7 @@ function tupleOfTypes(types) {
|
|
|
5128
5134
|
return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;
|
|
5129
5135
|
}
|
|
5130
5136
|
|
|
5131
|
-
// bazel-out/
|
|
5137
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_pipe_compiler.mjs
|
|
5132
5138
|
function compilePipeFromMetadata(metadata) {
|
|
5133
5139
|
const definitionMapValues = [];
|
|
5134
5140
|
definitionMapValues.push({ key: "name", value: literal(metadata.pipeName), quoted: false });
|
|
@@ -5149,7 +5155,7 @@ function createPipeType(metadata) {
|
|
|
5149
5155
|
]));
|
|
5150
5156
|
}
|
|
5151
5157
|
|
|
5152
|
-
// bazel-out/
|
|
5158
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/api.mjs
|
|
5153
5159
|
var R3TemplateDependencyKind;
|
|
5154
5160
|
(function(R3TemplateDependencyKind2) {
|
|
5155
5161
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["Directive"] = 0] = "Directive";
|
|
@@ -5157,7 +5163,7 @@ var R3TemplateDependencyKind;
|
|
|
5157
5163
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["NgModule"] = 2] = "NgModule";
|
|
5158
5164
|
})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
|
|
5159
5165
|
|
|
5160
|
-
// bazel-out/
|
|
5166
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/ast.mjs
|
|
5161
5167
|
var ParserError = class {
|
|
5162
5168
|
constructor(message, input, errLocation, ctxLocation) {
|
|
5163
5169
|
this.input = input;
|
|
@@ -5823,7 +5829,7 @@ var BoundElementProperty = class {
|
|
|
5823
5829
|
}
|
|
5824
5830
|
};
|
|
5825
5831
|
|
|
5826
|
-
// bazel-out/
|
|
5832
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler_util/expression_converter.mjs
|
|
5827
5833
|
var _EventHandlerVars = class {
|
|
5828
5834
|
};
|
|
5829
5835
|
var EventHandlerVars = _EventHandlerVars;
|
|
@@ -6464,7 +6470,7 @@ var BuiltinFunctionCall = class extends Call {
|
|
|
6464
6470
|
}
|
|
6465
6471
|
};
|
|
6466
6472
|
|
|
6467
|
-
// bazel-out/
|
|
6473
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_security_schema.mjs
|
|
6468
6474
|
var _SECURITY_SCHEMA;
|
|
6469
6475
|
function SECURITY_SCHEMA() {
|
|
6470
6476
|
if (!_SECURITY_SCHEMA) {
|
|
@@ -6522,7 +6528,7 @@ function isIframeSecuritySensitiveAttr(attrName) {
|
|
|
6522
6528
|
return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());
|
|
6523
6529
|
}
|
|
6524
6530
|
|
|
6525
|
-
// bazel-out/
|
|
6531
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/shadow_css.mjs
|
|
6526
6532
|
var animationKeywords = /* @__PURE__ */ new Set([
|
|
6527
6533
|
"inherit",
|
|
6528
6534
|
"initial",
|
|
@@ -6993,7 +6999,7 @@ function repeatGroups(groups, multiples) {
|
|
|
6993
6999
|
}
|
|
6994
7000
|
}
|
|
6995
7001
|
|
|
6996
|
-
// bazel-out/
|
|
7002
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/enums.mjs
|
|
6997
7003
|
var OpKind;
|
|
6998
7004
|
(function(OpKind2) {
|
|
6999
7005
|
OpKind2[OpKind2["ListEnd"] = 0] = "ListEnd";
|
|
@@ -7065,10 +7071,11 @@ var ExpressionKind;
|
|
|
7065
7071
|
ExpressionKind2[ExpressionKind2["AssignTemporaryExpr"] = 18] = "AssignTemporaryExpr";
|
|
7066
7072
|
ExpressionKind2[ExpressionKind2["ReadTemporaryExpr"] = 19] = "ReadTemporaryExpr";
|
|
7067
7073
|
ExpressionKind2[ExpressionKind2["SanitizerExpr"] = 20] = "SanitizerExpr";
|
|
7068
|
-
ExpressionKind2[ExpressionKind2["
|
|
7069
|
-
ExpressionKind2[ExpressionKind2["
|
|
7070
|
-
ExpressionKind2[ExpressionKind2["
|
|
7071
|
-
ExpressionKind2[ExpressionKind2["
|
|
7074
|
+
ExpressionKind2[ExpressionKind2["TrustedValueFnExpr"] = 21] = "TrustedValueFnExpr";
|
|
7075
|
+
ExpressionKind2[ExpressionKind2["SlotLiteralExpr"] = 22] = "SlotLiteralExpr";
|
|
7076
|
+
ExpressionKind2[ExpressionKind2["ConditionalCase"] = 23] = "ConditionalCase";
|
|
7077
|
+
ExpressionKind2[ExpressionKind2["DerivedRepeaterVar"] = 24] = "DerivedRepeaterVar";
|
|
7078
|
+
ExpressionKind2[ExpressionKind2["ConstCollected"] = 25] = "ConstCollected";
|
|
7072
7079
|
})(ExpressionKind || (ExpressionKind = {}));
|
|
7073
7080
|
var VariableFlags;
|
|
7074
7081
|
(function(VariableFlags2) {
|
|
@@ -7087,15 +7094,6 @@ var CompatibilityMode;
|
|
|
7087
7094
|
CompatibilityMode2[CompatibilityMode2["Normal"] = 0] = "Normal";
|
|
7088
7095
|
CompatibilityMode2[CompatibilityMode2["TemplateDefinitionBuilder"] = 1] = "TemplateDefinitionBuilder";
|
|
7089
7096
|
})(CompatibilityMode || (CompatibilityMode = {}));
|
|
7090
|
-
var SanitizerFn;
|
|
7091
|
-
(function(SanitizerFn2) {
|
|
7092
|
-
SanitizerFn2[SanitizerFn2["Html"] = 0] = "Html";
|
|
7093
|
-
SanitizerFn2[SanitizerFn2["Script"] = 1] = "Script";
|
|
7094
|
-
SanitizerFn2[SanitizerFn2["Style"] = 2] = "Style";
|
|
7095
|
-
SanitizerFn2[SanitizerFn2["Url"] = 3] = "Url";
|
|
7096
|
-
SanitizerFn2[SanitizerFn2["ResourceUrl"] = 4] = "ResourceUrl";
|
|
7097
|
-
SanitizerFn2[SanitizerFn2["IframeAttribute"] = 5] = "IframeAttribute";
|
|
7098
|
-
})(SanitizerFn || (SanitizerFn = {}));
|
|
7099
7097
|
var DeferSecondaryKind;
|
|
7100
7098
|
(function(DeferSecondaryKind2) {
|
|
7101
7099
|
DeferSecondaryKind2[DeferSecondaryKind2["Loading"] = 0] = "Loading";
|
|
@@ -7166,7 +7164,7 @@ var TemplateKind;
|
|
|
7166
7164
|
TemplateKind2[TemplateKind2["Block"] = 2] = "Block";
|
|
7167
7165
|
})(TemplateKind || (TemplateKind = {}));
|
|
7168
7166
|
|
|
7169
|
-
// bazel-out/
|
|
7167
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/traits.mjs
|
|
7170
7168
|
var ConsumesSlot = Symbol("ConsumesSlot");
|
|
7171
7169
|
var DependsOnSlotContext = Symbol("DependsOnSlotContext");
|
|
7172
7170
|
var ConsumesVarsTrait = Symbol("ConsumesVars");
|
|
@@ -7198,7 +7196,7 @@ function hasUsesVarOffsetTrait(expr) {
|
|
|
7198
7196
|
return expr[UsesVarOffset] === true;
|
|
7199
7197
|
}
|
|
7200
7198
|
|
|
7201
|
-
// bazel-out/
|
|
7199
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/shared.mjs
|
|
7202
7200
|
function createStatementOp(statement) {
|
|
7203
7201
|
return __spreadValues({
|
|
7204
7202
|
kind: OpKind.Statement,
|
|
@@ -7220,7 +7218,7 @@ var NEW_OP = {
|
|
|
7220
7218
|
next: null
|
|
7221
7219
|
};
|
|
7222
7220
|
|
|
7223
|
-
// bazel-out/
|
|
7221
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/update.mjs
|
|
7224
7222
|
function createInterpolateTextOp(xref, interpolation, sourceSpan) {
|
|
7225
7223
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7226
7224
|
kind: OpKind.InterpolateText,
|
|
@@ -7239,7 +7237,7 @@ var Interpolation2 = class {
|
|
|
7239
7237
|
}
|
|
7240
7238
|
}
|
|
7241
7239
|
};
|
|
7242
|
-
function createBindingOp(target, kind, name, expression, unit, securityContext, isTextAttribute,
|
|
7240
|
+
function createBindingOp(target, kind, name, expression, unit, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
|
|
7243
7241
|
return __spreadValues({
|
|
7244
7242
|
kind: OpKind.Binding,
|
|
7245
7243
|
bindingKind: kind,
|
|
@@ -7249,12 +7247,14 @@ function createBindingOp(target, kind, name, expression, unit, securityContext,
|
|
|
7249
7247
|
unit,
|
|
7250
7248
|
securityContext,
|
|
7251
7249
|
isTextAttribute,
|
|
7252
|
-
|
|
7253
|
-
|
|
7250
|
+
isStructuralTemplateAttribute,
|
|
7251
|
+
templateKind,
|
|
7252
|
+
i18nContext: null,
|
|
7253
|
+
i18nMessage,
|
|
7254
7254
|
sourceSpan
|
|
7255
7255
|
}, NEW_OP);
|
|
7256
7256
|
}
|
|
7257
|
-
function createPropertyOp(target, name, expression, isAnimationTrigger, securityContext,
|
|
7257
|
+
function createPropertyOp(target, name, expression, isAnimationTrigger, securityContext, isStructuralTemplateAttribute, templateKind, i18nContext, i18nMessage, sourceSpan) {
|
|
7258
7258
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7259
7259
|
kind: OpKind.Property,
|
|
7260
7260
|
target,
|
|
@@ -7263,8 +7263,10 @@ function createPropertyOp(target, name, expression, isAnimationTrigger, security
|
|
|
7263
7263
|
isAnimationTrigger,
|
|
7264
7264
|
securityContext,
|
|
7265
7265
|
sanitizer: null,
|
|
7266
|
-
|
|
7266
|
+
isStructuralTemplateAttribute,
|
|
7267
|
+
templateKind,
|
|
7267
7268
|
i18nContext,
|
|
7269
|
+
i18nMessage,
|
|
7268
7270
|
sourceSpan
|
|
7269
7271
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7270
7272
|
}
|
|
@@ -7303,7 +7305,7 @@ function createClassMapOp(xref, expression, sourceSpan) {
|
|
|
7303
7305
|
sourceSpan
|
|
7304
7306
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7305
7307
|
}
|
|
7306
|
-
function createAttributeOp(target, name, expression, securityContext, isTextAttribute,
|
|
7308
|
+
function createAttributeOp(target, name, expression, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
|
|
7307
7309
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7308
7310
|
kind: OpKind.Attribute,
|
|
7309
7311
|
target,
|
|
@@ -7312,8 +7314,10 @@ function createAttributeOp(target, name, expression, securityContext, isTextAttr
|
|
|
7312
7314
|
securityContext,
|
|
7313
7315
|
sanitizer: null,
|
|
7314
7316
|
isTextAttribute,
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
+
isStructuralTemplateAttribute,
|
|
7318
|
+
templateKind,
|
|
7319
|
+
i18nContext: null,
|
|
7320
|
+
i18nMessage,
|
|
7317
7321
|
sourceSpan
|
|
7318
7322
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7319
7323
|
}
|
|
@@ -7378,7 +7382,7 @@ function createI18nApplyOp(owner, handle, sourceSpan) {
|
|
|
7378
7382
|
}, NEW_OP);
|
|
7379
7383
|
}
|
|
7380
7384
|
|
|
7381
|
-
// bazel-out/
|
|
7385
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/expression.mjs
|
|
7382
7386
|
var _a;
|
|
7383
7387
|
var _b;
|
|
7384
7388
|
var _c;
|
|
@@ -7909,26 +7913,6 @@ var ReadTemporaryExpr = class extends ExpressionBase {
|
|
|
7909
7913
|
return r;
|
|
7910
7914
|
}
|
|
7911
7915
|
};
|
|
7912
|
-
var SanitizerExpr = class extends ExpressionBase {
|
|
7913
|
-
constructor(fn2) {
|
|
7914
|
-
super();
|
|
7915
|
-
this.fn = fn2;
|
|
7916
|
-
this.kind = ExpressionKind.SanitizerExpr;
|
|
7917
|
-
}
|
|
7918
|
-
visitExpression(visitor, context) {
|
|
7919
|
-
}
|
|
7920
|
-
isEquivalent(e) {
|
|
7921
|
-
return e instanceof SanitizerExpr && e.fn === this.fn;
|
|
7922
|
-
}
|
|
7923
|
-
isConstant() {
|
|
7924
|
-
return true;
|
|
7925
|
-
}
|
|
7926
|
-
clone() {
|
|
7927
|
-
return new SanitizerExpr(this.fn);
|
|
7928
|
-
}
|
|
7929
|
-
transformInternalExpressions() {
|
|
7930
|
-
}
|
|
7931
|
-
};
|
|
7932
7916
|
var SlotLiteralExpr = class extends ExpressionBase {
|
|
7933
7917
|
constructor(slot) {
|
|
7934
7918
|
super();
|
|
@@ -8047,7 +8031,6 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
8047
8031
|
case OpKind.ClassProp:
|
|
8048
8032
|
case OpKind.ClassMap:
|
|
8049
8033
|
case OpKind.Binding:
|
|
8050
|
-
case OpKind.HostProperty:
|
|
8051
8034
|
if (op.expression instanceof Interpolation2) {
|
|
8052
8035
|
transformExpressionsInInterpolation(op.expression, transform2, flags);
|
|
8053
8036
|
} else {
|
|
@@ -8055,6 +8038,7 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
8055
8038
|
}
|
|
8056
8039
|
break;
|
|
8057
8040
|
case OpKind.Property:
|
|
8041
|
+
case OpKind.HostProperty:
|
|
8058
8042
|
case OpKind.Attribute:
|
|
8059
8043
|
if (op.expression instanceof Interpolation2) {
|
|
8060
8044
|
transformExpressionsInInterpolation(op.expression, transform2, flags);
|
|
@@ -8096,6 +8080,7 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
8096
8080
|
break;
|
|
8097
8081
|
case OpKind.ExtractedAttribute:
|
|
8098
8082
|
op.expression = op.expression && transformExpressionsInExpression(op.expression, transform2, flags);
|
|
8083
|
+
op.trustedValueFn = op.trustedValueFn && transformExpressionsInExpression(op.trustedValueFn, transform2, flags);
|
|
8099
8084
|
break;
|
|
8100
8085
|
case OpKind.RepeaterCreate:
|
|
8101
8086
|
op.track = transformExpressionsInExpression(op.track, transform2, flags);
|
|
@@ -8203,6 +8188,10 @@ function transformExpressionsInExpression(expr, transform2, flags) {
|
|
|
8203
8188
|
}
|
|
8204
8189
|
} else if (expr instanceof NotExpr) {
|
|
8205
8190
|
expr.condition = transformExpressionsInExpression(expr.condition, transform2, flags);
|
|
8191
|
+
} else if (expr instanceof TaggedTemplateExpr) {
|
|
8192
|
+
expr.tag = transformExpressionsInExpression(expr.tag, transform2, flags);
|
|
8193
|
+
expr.template.expressions = expr.template.expressions.map((e) => transformExpressionsInExpression(e, transform2, flags));
|
|
8194
|
+
} else if (expr instanceof WrappedNodeExpr) {
|
|
8206
8195
|
} else if (expr instanceof ReadVarExpr || expr instanceof ExternalExpr || expr instanceof LiteralExpr) {
|
|
8207
8196
|
} else {
|
|
8208
8197
|
throw new Error(`Unhandled expression kind: ${expr.constructor.name}`);
|
|
@@ -8234,7 +8223,7 @@ function isStringLiteral(expr) {
|
|
|
8234
8223
|
return expr instanceof LiteralExpr && typeof expr.value === "string";
|
|
8235
8224
|
}
|
|
8236
8225
|
|
|
8237
|
-
// bazel-out/
|
|
8226
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/operations.mjs
|
|
8238
8227
|
var _OpList = class {
|
|
8239
8228
|
constructor() {
|
|
8240
8229
|
this.debugListId = _OpList.nextListId++;
|
|
@@ -8425,14 +8414,14 @@ var OpList = _OpList;
|
|
|
8425
8414
|
_OpList.nextListId = 0;
|
|
8426
8415
|
})();
|
|
8427
8416
|
|
|
8428
|
-
// bazel-out/
|
|
8417
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/handle.mjs
|
|
8429
8418
|
var SlotHandle = class {
|
|
8430
8419
|
constructor() {
|
|
8431
8420
|
this.slot = null;
|
|
8432
8421
|
}
|
|
8433
8422
|
};
|
|
8434
8423
|
|
|
8435
|
-
// bazel-out/
|
|
8424
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/create.mjs
|
|
8436
8425
|
var elementContainerOpKinds = /* @__PURE__ */ new Set([
|
|
8437
8426
|
OpKind.Element,
|
|
8438
8427
|
OpKind.ElementStart,
|
|
@@ -8476,7 +8465,7 @@ function createTemplateOp(xref, templateKind, tag, functionNameSuffix, namespace
|
|
|
8476
8465
|
sourceSpan
|
|
8477
8466
|
}, TRAIT_CONSUMES_SLOT), NEW_OP);
|
|
8478
8467
|
}
|
|
8479
|
-
function createRepeaterCreateOp(primaryView, emptyView, tag, track, varNames, sourceSpan) {
|
|
8468
|
+
function createRepeaterCreateOp(primaryView, emptyView, tag, track, varNames, i18nPlaceholder, emptyI18nPlaceholder, sourceSpan) {
|
|
8480
8469
|
return __spreadProps(__spreadValues(__spreadValues({
|
|
8481
8470
|
kind: OpKind.RepeaterCreate,
|
|
8482
8471
|
attributes: null,
|
|
@@ -8494,6 +8483,8 @@ function createRepeaterCreateOp(primaryView, emptyView, tag, track, varNames, so
|
|
|
8494
8483
|
vars: null,
|
|
8495
8484
|
varNames,
|
|
8496
8485
|
usesComponentInstance: false,
|
|
8486
|
+
i18nPlaceholder,
|
|
8487
|
+
emptyI18nPlaceholder,
|
|
8497
8488
|
sourceSpan
|
|
8498
8489
|
}, TRAIT_CONSUMES_SLOT), NEW_OP), {
|
|
8499
8490
|
numSlotsUsed: emptyView === null ? 2 : 3
|
|
@@ -8527,7 +8518,9 @@ function createTextOp(xref, initialValue, sourceSpan) {
|
|
|
8527
8518
|
sourceSpan
|
|
8528
8519
|
}, TRAIT_CONSUMES_SLOT), NEW_OP);
|
|
8529
8520
|
}
|
|
8530
|
-
function createListenerOp(target, targetSlot, name, tag, animationPhase, hostListener, sourceSpan) {
|
|
8521
|
+
function createListenerOp(target, targetSlot, name, tag, handlerOps, animationPhase, eventTarget, hostListener, sourceSpan) {
|
|
8522
|
+
const handlerList = new OpList();
|
|
8523
|
+
handlerList.push(handlerOps);
|
|
8531
8524
|
return __spreadValues({
|
|
8532
8525
|
kind: OpKind.Listener,
|
|
8533
8526
|
target,
|
|
@@ -8535,11 +8528,12 @@ function createListenerOp(target, targetSlot, name, tag, animationPhase, hostLis
|
|
|
8535
8528
|
tag,
|
|
8536
8529
|
hostListener,
|
|
8537
8530
|
name,
|
|
8538
|
-
handlerOps:
|
|
8531
|
+
handlerOps: handlerList,
|
|
8539
8532
|
handlerFnName: null,
|
|
8540
8533
|
consumesDollarEvent: false,
|
|
8541
8534
|
isAnimationListener: animationPhase !== null,
|
|
8542
8535
|
animationPhase,
|
|
8536
|
+
eventTarget,
|
|
8543
8537
|
sourceSpan
|
|
8544
8538
|
}, NEW_OP);
|
|
8545
8539
|
}
|
|
@@ -8576,14 +8570,17 @@ function createProjectionOp(xref, selector, i18nPlaceholder, attributes, sourceS
|
|
|
8576
8570
|
sourceSpan
|
|
8577
8571
|
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
8578
8572
|
}
|
|
8579
|
-
function createExtractedAttributeOp(target, bindingKind, name, expression, i18nContext) {
|
|
8573
|
+
function createExtractedAttributeOp(target, bindingKind, name, expression, i18nContext, i18nMessage, securityContext) {
|
|
8580
8574
|
return __spreadValues({
|
|
8581
8575
|
kind: OpKind.ExtractedAttribute,
|
|
8582
8576
|
target,
|
|
8583
8577
|
bindingKind,
|
|
8584
8578
|
name,
|
|
8585
8579
|
expression,
|
|
8586
|
-
i18nContext
|
|
8580
|
+
i18nContext,
|
|
8581
|
+
i18nMessage,
|
|
8582
|
+
securityContext,
|
|
8583
|
+
trustedValueFn: null
|
|
8587
8584
|
}, NEW_OP);
|
|
8588
8585
|
}
|
|
8589
8586
|
function createDeferOp(xref, main, mainSlot, metadata, sourceSpan) {
|
|
@@ -8693,22 +8690,24 @@ function createI18nAttributesOp(xref, handle, target) {
|
|
|
8693
8690
|
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
8694
8691
|
}
|
|
8695
8692
|
|
|
8696
|
-
// bazel-out/
|
|
8697
|
-
function createHostPropertyOp(name, expression, isAnimationTrigger, i18nContext, sourceSpan) {
|
|
8693
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/host.mjs
|
|
8694
|
+
function createHostPropertyOp(name, expression, isAnimationTrigger, i18nContext, securityContext, sourceSpan) {
|
|
8698
8695
|
return __spreadValues(__spreadValues({
|
|
8699
8696
|
kind: OpKind.HostProperty,
|
|
8700
8697
|
name,
|
|
8701
8698
|
expression,
|
|
8702
8699
|
isAnimationTrigger,
|
|
8703
8700
|
i18nContext,
|
|
8701
|
+
securityContext,
|
|
8702
|
+
sanitizer: null,
|
|
8704
8703
|
sourceSpan
|
|
8705
8704
|
}, TRAIT_CONSUMES_VARS), NEW_OP);
|
|
8706
8705
|
}
|
|
8707
8706
|
|
|
8708
|
-
// bazel-out/
|
|
8707
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/variable.mjs
|
|
8709
8708
|
var CTX_REF = "CTX_REF_MARKER";
|
|
8710
8709
|
|
|
8711
|
-
// bazel-out/
|
|
8710
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/compilation.mjs
|
|
8712
8711
|
var CompilationJobKind;
|
|
8713
8712
|
(function(CompilationJobKind2) {
|
|
8714
8713
|
CompilationJobKind2[CompilationJobKind2["Tmpl"] = 0] = "Tmpl";
|
|
@@ -8815,7 +8814,7 @@ var HostBindingCompilationUnit = class extends CompilationUnit {
|
|
|
8815
8814
|
}
|
|
8816
8815
|
};
|
|
8817
8816
|
|
|
8818
|
-
// bazel-out/
|
|
8817
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/any_cast.mjs
|
|
8819
8818
|
function deleteAnyCasts(job) {
|
|
8820
8819
|
for (const unit of job.units) {
|
|
8821
8820
|
for (const op of unit.ops()) {
|
|
@@ -8833,7 +8832,7 @@ function removeAnys(e) {
|
|
|
8833
8832
|
return e;
|
|
8834
8833
|
}
|
|
8835
8834
|
|
|
8836
|
-
// bazel-out/
|
|
8835
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/apply_i18n_expressions.mjs
|
|
8837
8836
|
function applyI18nExpressions(job) {
|
|
8838
8837
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
8839
8838
|
for (const unit of job.units) {
|
|
@@ -8876,62 +8875,52 @@ function needsApplication(i18nContexts, op) {
|
|
|
8876
8875
|
return false;
|
|
8877
8876
|
}
|
|
8878
8877
|
|
|
8879
|
-
// bazel-out/
|
|
8878
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/assign_i18n_slot_dependencies.mjs
|
|
8880
8879
|
function assignI18nSlotDependencies(job) {
|
|
8881
|
-
const i18nLastSlotConsumers = /* @__PURE__ */ new Map();
|
|
8882
|
-
let lastSlotConsumer = null;
|
|
8883
|
-
let currentI18nOp = null;
|
|
8884
8880
|
for (const unit of job.units) {
|
|
8885
|
-
|
|
8886
|
-
|
|
8887
|
-
|
|
8881
|
+
let updateOp = unit.update.head;
|
|
8882
|
+
let i18nExpressionsInProgress = [];
|
|
8883
|
+
let state = null;
|
|
8884
|
+
for (const createOp of unit.create) {
|
|
8885
|
+
if (createOp.kind === OpKind.I18nStart) {
|
|
8886
|
+
state = {
|
|
8887
|
+
blockXref: createOp.xref,
|
|
8888
|
+
lastSlotConsumer: createOp.xref
|
|
8889
|
+
};
|
|
8890
|
+
} else if (createOp.kind === OpKind.I18nEnd) {
|
|
8891
|
+
for (const op of i18nExpressionsInProgress) {
|
|
8892
|
+
op.target = state.lastSlotConsumer;
|
|
8893
|
+
OpList.insertBefore(op, updateOp);
|
|
8894
|
+
}
|
|
8895
|
+
i18nExpressionsInProgress.length = 0;
|
|
8896
|
+
state = null;
|
|
8888
8897
|
}
|
|
8889
|
-
|
|
8890
|
-
|
|
8891
|
-
|
|
8892
|
-
|
|
8893
|
-
|
|
8894
|
-
if (
|
|
8895
|
-
|
|
8898
|
+
if (hasConsumesSlotTrait(createOp)) {
|
|
8899
|
+
if (state !== null) {
|
|
8900
|
+
state.lastSlotConsumer = createOp.xref;
|
|
8901
|
+
}
|
|
8902
|
+
while (true) {
|
|
8903
|
+
if (updateOp.next === null) {
|
|
8904
|
+
break;
|
|
8896
8905
|
}
|
|
8897
|
-
if (
|
|
8898
|
-
|
|
8906
|
+
if (state !== null && updateOp.kind === OpKind.I18nExpression && updateOp.usage === I18nExpressionFor.I18nText && updateOp.i18nOwner === state.blockXref) {
|
|
8907
|
+
const opToRemove = updateOp;
|
|
8908
|
+
updateOp = updateOp.next;
|
|
8909
|
+
OpList.remove(opToRemove);
|
|
8910
|
+
i18nExpressionsInProgress.push(opToRemove);
|
|
8911
|
+
continue;
|
|
8899
8912
|
}
|
|
8900
|
-
|
|
8901
|
-
|
|
8902
|
-
|
|
8903
|
-
|
|
8904
|
-
}
|
|
8905
|
-
let opsToMove = [];
|
|
8906
|
-
let moveAfterTarget = null;
|
|
8907
|
-
let previousTarget = null;
|
|
8908
|
-
for (const op of unit.update) {
|
|
8909
|
-
if (hasDependsOnSlotContextTrait(op)) {
|
|
8910
|
-
if (moveAfterTarget !== null && previousTarget === moveAfterTarget && op.target !== previousTarget) {
|
|
8911
|
-
OpList.insertBefore(opsToMove, op);
|
|
8912
|
-
moveAfterTarget = null;
|
|
8913
|
-
opsToMove = [];
|
|
8914
|
-
}
|
|
8915
|
-
previousTarget = op.target;
|
|
8916
|
-
}
|
|
8917
|
-
if (op.kind === OpKind.I18nExpression && op.usage === I18nExpressionFor.I18nText) {
|
|
8918
|
-
OpList.remove(op);
|
|
8919
|
-
opsToMove.push(op);
|
|
8920
|
-
const target = i18nLastSlotConsumers.get(op.i18nOwner);
|
|
8921
|
-
if (target === void 0) {
|
|
8922
|
-
throw new Error("AssertionError: Expected to find a last slot consumer for an I18nExpressionOp");
|
|
8913
|
+
if (hasDependsOnSlotContextTrait(updateOp) && updateOp.target !== createOp.xref) {
|
|
8914
|
+
break;
|
|
8915
|
+
}
|
|
8916
|
+
updateOp = updateOp.next;
|
|
8923
8917
|
}
|
|
8924
|
-
op.target = target;
|
|
8925
|
-
moveAfterTarget = op.target;
|
|
8926
8918
|
}
|
|
8927
8919
|
}
|
|
8928
|
-
if (moveAfterTarget !== null) {
|
|
8929
|
-
unit.update.push(opsToMove);
|
|
8930
|
-
}
|
|
8931
8920
|
}
|
|
8932
8921
|
}
|
|
8933
8922
|
|
|
8934
|
-
// bazel-out/
|
|
8923
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/util/elements.mjs
|
|
8935
8924
|
function createOpXrefMap(unit) {
|
|
8936
8925
|
const map = /* @__PURE__ */ new Map();
|
|
8937
8926
|
for (const op of unit.create) {
|
|
@@ -8943,7 +8932,7 @@ function createOpXrefMap(unit) {
|
|
|
8943
8932
|
return map;
|
|
8944
8933
|
}
|
|
8945
8934
|
|
|
8946
|
-
// bazel-out/
|
|
8935
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/attribute_extraction.mjs
|
|
8947
8936
|
function extractAttributes(job) {
|
|
8948
8937
|
for (const unit of job.units) {
|
|
8949
8938
|
const elements = createOpXrefMap(unit);
|
|
@@ -8955,25 +8944,52 @@ function extractAttributes(job) {
|
|
|
8955
8944
|
case OpKind.Property:
|
|
8956
8945
|
if (!op.isAnimationTrigger) {
|
|
8957
8946
|
let bindingKind;
|
|
8958
|
-
if (op.
|
|
8947
|
+
if (op.i18nMessage !== null && op.templateKind === null) {
|
|
8959
8948
|
bindingKind = BindingKind.I18n;
|
|
8960
|
-
} else if (op.
|
|
8949
|
+
} else if (op.isStructuralTemplateAttribute) {
|
|
8961
8950
|
bindingKind = BindingKind.Template;
|
|
8962
8951
|
} else {
|
|
8963
8952
|
bindingKind = BindingKind.Property;
|
|
8964
8953
|
}
|
|
8965
|
-
OpList.insertBefore(
|
|
8954
|
+
OpList.insertBefore(
|
|
8955
|
+
createExtractedAttributeOp(
|
|
8956
|
+
op.target,
|
|
8957
|
+
bindingKind,
|
|
8958
|
+
op.name,
|
|
8959
|
+
null,
|
|
8960
|
+
null,
|
|
8961
|
+
null,
|
|
8962
|
+
op.securityContext
|
|
8963
|
+
),
|
|
8964
|
+
lookupElement(elements, op.target)
|
|
8965
|
+
);
|
|
8966
8966
|
}
|
|
8967
8967
|
break;
|
|
8968
8968
|
case OpKind.StyleProp:
|
|
8969
8969
|
case OpKind.ClassProp:
|
|
8970
8970
|
if (unit.job.compatibility === CompatibilityMode.TemplateDefinitionBuilder && op.expression instanceof EmptyExpr2) {
|
|
8971
|
-
OpList.insertBefore(createExtractedAttributeOp(
|
|
8971
|
+
OpList.insertBefore(createExtractedAttributeOp(
|
|
8972
|
+
op.target,
|
|
8973
|
+
BindingKind.Property,
|
|
8974
|
+
op.name,
|
|
8975
|
+
null,
|
|
8976
|
+
null,
|
|
8977
|
+
null,
|
|
8978
|
+
SecurityContext.STYLE
|
|
8979
|
+
), lookupElement(elements, op.target));
|
|
8972
8980
|
}
|
|
8973
8981
|
break;
|
|
8974
8982
|
case OpKind.Listener:
|
|
8975
8983
|
if (!op.isAnimationListener) {
|
|
8976
|
-
const extractedAttributeOp = createExtractedAttributeOp(
|
|
8984
|
+
const extractedAttributeOp = createExtractedAttributeOp(
|
|
8985
|
+
op.target,
|
|
8986
|
+
BindingKind.Property,
|
|
8987
|
+
op.name,
|
|
8988
|
+
null,
|
|
8989
|
+
null,
|
|
8990
|
+
null,
|
|
8991
|
+
SecurityContext.NONE
|
|
8992
|
+
);
|
|
8977
8993
|
if (job.kind === CompilationJobKind.Host) {
|
|
8978
8994
|
unit.create.push(extractedAttributeOp);
|
|
8979
8995
|
} else {
|
|
@@ -9007,7 +9023,7 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
9007
9023
|
}
|
|
9008
9024
|
}
|
|
9009
9025
|
if (extractable) {
|
|
9010
|
-
const extractedAttributeOp = createExtractedAttributeOp(op.target, op.
|
|
9026
|
+
const extractedAttributeOp = createExtractedAttributeOp(op.target, op.isStructuralTemplateAttribute ? BindingKind.Template : BindingKind.Attribute, op.name, op.expression, op.i18nContext, op.i18nMessage, op.securityContext);
|
|
9011
9027
|
if (unit.job.kind === CompilationJobKind.Host) {
|
|
9012
9028
|
unit.create.push(extractedAttributeOp);
|
|
9013
9029
|
} else {
|
|
@@ -9018,7 +9034,7 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
9018
9034
|
}
|
|
9019
9035
|
}
|
|
9020
9036
|
|
|
9021
|
-
// bazel-out/
|
|
9037
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/binding_specialization.mjs
|
|
9022
9038
|
function lookupElement2(elements, xref) {
|
|
9023
9039
|
const el = elements.get(xref);
|
|
9024
9040
|
if (el === void 0) {
|
|
@@ -9048,15 +9064,15 @@ function specializeBindings(job) {
|
|
|
9048
9064
|
const target = lookupElement2(elements, op.target);
|
|
9049
9065
|
target.nonBindable = true;
|
|
9050
9066
|
} else {
|
|
9051
|
-
OpList.replace(op, createAttributeOp(op.target, op.name, op.expression, op.securityContext, op.isTextAttribute, op.
|
|
9067
|
+
OpList.replace(op, createAttributeOp(op.target, op.name, op.expression, op.securityContext, op.isTextAttribute, op.isStructuralTemplateAttribute, op.templateKind, op.i18nMessage, op.sourceSpan));
|
|
9052
9068
|
}
|
|
9053
9069
|
break;
|
|
9054
9070
|
case BindingKind.Property:
|
|
9055
9071
|
case BindingKind.Animation:
|
|
9056
9072
|
if (job.kind === CompilationJobKind.Host) {
|
|
9057
|
-
OpList.replace(op, createHostPropertyOp(op.name, op.expression, op.bindingKind === BindingKind.Animation, op.i18nContext, op.sourceSpan));
|
|
9073
|
+
OpList.replace(op, createHostPropertyOp(op.name, op.expression, op.bindingKind === BindingKind.Animation, op.i18nContext, op.securityContext, op.sourceSpan));
|
|
9058
9074
|
} else {
|
|
9059
|
-
OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind === BindingKind.Animation, op.securityContext, op.
|
|
9075
|
+
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));
|
|
9060
9076
|
}
|
|
9061
9077
|
break;
|
|
9062
9078
|
case BindingKind.I18n:
|
|
@@ -9068,7 +9084,7 @@ function specializeBindings(job) {
|
|
|
9068
9084
|
}
|
|
9069
9085
|
}
|
|
9070
9086
|
|
|
9071
|
-
// bazel-out/
|
|
9087
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/chaining.mjs
|
|
9072
9088
|
var CHAINABLE = /* @__PURE__ */ new Set([
|
|
9073
9089
|
Identifiers.attribute,
|
|
9074
9090
|
Identifiers.classProp,
|
|
@@ -9134,7 +9150,7 @@ function chainOperationsInList(opList) {
|
|
|
9134
9150
|
}
|
|
9135
9151
|
}
|
|
9136
9152
|
|
|
9137
|
-
// bazel-out/
|
|
9153
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/collapse_singleton_interpolations.mjs
|
|
9138
9154
|
function collapseSingletonInterpolations(job) {
|
|
9139
9155
|
for (const unit of job.units) {
|
|
9140
9156
|
for (const op of unit.update) {
|
|
@@ -9146,7 +9162,7 @@ function collapseSingletonInterpolations(job) {
|
|
|
9146
9162
|
}
|
|
9147
9163
|
}
|
|
9148
9164
|
|
|
9149
|
-
// bazel-out/
|
|
9165
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/conditionals.mjs
|
|
9150
9166
|
function generateConditionalExpressions(job) {
|
|
9151
9167
|
for (const unit of job.units) {
|
|
9152
9168
|
for (const op of unit.ops()) {
|
|
@@ -9183,7 +9199,7 @@ function generateConditionalExpressions(job) {
|
|
|
9183
9199
|
}
|
|
9184
9200
|
}
|
|
9185
9201
|
|
|
9186
|
-
// bazel-out/
|
|
9202
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
|
|
9187
9203
|
var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
9188
9204
|
["&&", BinaryOperator.And],
|
|
9189
9205
|
[">", BinaryOperator.Bigger],
|
|
@@ -9233,7 +9249,7 @@ function literalOrArrayLiteral(value) {
|
|
|
9233
9249
|
return literal(value);
|
|
9234
9250
|
}
|
|
9235
9251
|
|
|
9236
|
-
// bazel-out/
|
|
9252
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/const_collection.mjs
|
|
9237
9253
|
function collectElementConsts(job) {
|
|
9238
9254
|
const allElementAttributes = /* @__PURE__ */ new Map();
|
|
9239
9255
|
for (const unit of job.units) {
|
|
@@ -9241,7 +9257,7 @@ function collectElementConsts(job) {
|
|
|
9241
9257
|
if (op.kind === OpKind.ExtractedAttribute) {
|
|
9242
9258
|
const attributes = allElementAttributes.get(op.target) || new ElementAttributes();
|
|
9243
9259
|
allElementAttributes.set(op.target, attributes);
|
|
9244
|
-
attributes.add(op.bindingKind, op.name, op.expression);
|
|
9260
|
+
attributes.add(op.bindingKind, op.name, op.expression, op.trustedValueFn);
|
|
9245
9261
|
OpList.remove(op);
|
|
9246
9262
|
}
|
|
9247
9263
|
}
|
|
@@ -9303,7 +9319,7 @@ var ElementAttributes = class {
|
|
|
9303
9319
|
var _a2;
|
|
9304
9320
|
return (_a2 = this.byKind.get(BindingKind.I18n)) != null ? _a2 : FLYWEIGHT_ARRAY;
|
|
9305
9321
|
}
|
|
9306
|
-
add(kind, name, value) {
|
|
9322
|
+
add(kind, name, value, trustedValueFn) {
|
|
9307
9323
|
var _a2;
|
|
9308
9324
|
if (this.known.has(name)) {
|
|
9309
9325
|
return;
|
|
@@ -9321,7 +9337,14 @@ var ElementAttributes = class {
|
|
|
9321
9337
|
if (value === null) {
|
|
9322
9338
|
throw Error("Attribute, i18n attribute, & style element attributes must have a value");
|
|
9323
9339
|
}
|
|
9324
|
-
|
|
9340
|
+
if (trustedValueFn !== null) {
|
|
9341
|
+
if (!isStringLiteral(value)) {
|
|
9342
|
+
throw Error("AssertionError: extracted attribute value should be string literal");
|
|
9343
|
+
}
|
|
9344
|
+
array.push(taggedTemplate(trustedValueFn, new TemplateLiteral([new TemplateLiteralElement(value.value)], []), void 0, value.sourceSpan));
|
|
9345
|
+
} else {
|
|
9346
|
+
array.push(value);
|
|
9347
|
+
}
|
|
9325
9348
|
}
|
|
9326
9349
|
}
|
|
9327
9350
|
arrayFor(kind) {
|
|
@@ -9367,7 +9390,7 @@ function serializeAttributes({ attributes, bindings, classes, i18n: i18n2, proje
|
|
|
9367
9390
|
return literalArr(attrArray);
|
|
9368
9391
|
}
|
|
9369
9392
|
|
|
9370
|
-
// bazel-out/
|
|
9393
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/convert_i18n_bindings.mjs
|
|
9371
9394
|
function convertI18nBindings(job) {
|
|
9372
9395
|
const i18nAttributesByElem = /* @__PURE__ */ new Map();
|
|
9373
9396
|
for (const unit of job.units) {
|
|
@@ -9408,7 +9431,7 @@ function convertI18nBindings(job) {
|
|
|
9408
9431
|
}
|
|
9409
9432
|
}
|
|
9410
9433
|
|
|
9411
|
-
// bazel-out/
|
|
9434
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_defer_deps_fns.mjs
|
|
9412
9435
|
function createDeferDepsFns(job) {
|
|
9413
9436
|
for (const unit of job.units) {
|
|
9414
9437
|
for (const op of unit.create) {
|
|
@@ -9436,11 +9459,12 @@ function createDeferDepsFns(job) {
|
|
|
9436
9459
|
}
|
|
9437
9460
|
}
|
|
9438
9461
|
|
|
9439
|
-
// bazel-out/
|
|
9462
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_i18n_contexts.mjs
|
|
9440
9463
|
function createI18nContexts(job) {
|
|
9441
9464
|
const rootContexts = /* @__PURE__ */ new Map();
|
|
9442
9465
|
let currentI18nOp = null;
|
|
9443
9466
|
let xref;
|
|
9467
|
+
const messageToContext = /* @__PURE__ */ new Map();
|
|
9444
9468
|
for (const unit of job.units) {
|
|
9445
9469
|
for (const op of unit.create) {
|
|
9446
9470
|
switch (op.kind) {
|
|
@@ -9470,6 +9494,24 @@ function createI18nContexts(job) {
|
|
|
9470
9494
|
break;
|
|
9471
9495
|
}
|
|
9472
9496
|
}
|
|
9497
|
+
for (const op of unit.ops()) {
|
|
9498
|
+
switch (op.kind) {
|
|
9499
|
+
case OpKind.Binding:
|
|
9500
|
+
case OpKind.Property:
|
|
9501
|
+
case OpKind.Attribute:
|
|
9502
|
+
case OpKind.ExtractedAttribute:
|
|
9503
|
+
if (!op.i18nMessage) {
|
|
9504
|
+
continue;
|
|
9505
|
+
}
|
|
9506
|
+
if (!messageToContext.has(op.i18nMessage)) {
|
|
9507
|
+
const i18nContext = job.allocateXrefId();
|
|
9508
|
+
unit.create.push(createI18nContextOp(I18nContextKind.Attr, i18nContext, null, op.i18nMessage, null));
|
|
9509
|
+
messageToContext.set(op.i18nMessage, i18nContext);
|
|
9510
|
+
}
|
|
9511
|
+
op.i18nContext = messageToContext.get(op.i18nMessage);
|
|
9512
|
+
break;
|
|
9513
|
+
}
|
|
9514
|
+
}
|
|
9473
9515
|
}
|
|
9474
9516
|
for (const unit of job.units) {
|
|
9475
9517
|
for (const op of unit.create) {
|
|
@@ -9480,7 +9522,7 @@ function createI18nContexts(job) {
|
|
|
9480
9522
|
}
|
|
9481
9523
|
}
|
|
9482
9524
|
|
|
9483
|
-
// bazel-out/
|
|
9525
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_configs.mjs
|
|
9484
9526
|
function configureDeferInstructions(job) {
|
|
9485
9527
|
for (const unit of job.units) {
|
|
9486
9528
|
for (const op of unit.create) {
|
|
@@ -9497,7 +9539,7 @@ function configureDeferInstructions(job) {
|
|
|
9497
9539
|
}
|
|
9498
9540
|
}
|
|
9499
9541
|
|
|
9500
|
-
// bazel-out/
|
|
9542
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_resolve_targets.mjs
|
|
9501
9543
|
function resolveDeferTargetNames(job) {
|
|
9502
9544
|
const scopes = /* @__PURE__ */ new Map();
|
|
9503
9545
|
function getScopeForView2(view) {
|
|
@@ -9591,7 +9633,7 @@ var Scope = class {
|
|
|
9591
9633
|
}
|
|
9592
9634
|
};
|
|
9593
9635
|
|
|
9594
|
-
// bazel-out/
|
|
9636
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/empty_elements.mjs
|
|
9595
9637
|
var REPLACEMENTS = /* @__PURE__ */ new Map([
|
|
9596
9638
|
[OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]],
|
|
9597
9639
|
[OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]],
|
|
@@ -9618,7 +9660,7 @@ function collapseEmptyInstructions(job) {
|
|
|
9618
9660
|
}
|
|
9619
9661
|
}
|
|
9620
9662
|
|
|
9621
|
-
// bazel-out/
|
|
9663
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/expand_safe_reads.mjs
|
|
9622
9664
|
function expandSafeReads(job) {
|
|
9623
9665
|
for (const unit of job.units) {
|
|
9624
9666
|
for (const op of unit.ops()) {
|
|
@@ -9754,7 +9796,7 @@ function ternaryTransform(e) {
|
|
|
9754
9796
|
return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr);
|
|
9755
9797
|
}
|
|
9756
9798
|
|
|
9757
|
-
// bazel-out/
|
|
9799
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/extract_i18n_messages.mjs
|
|
9758
9800
|
var ESCAPE = "\uFFFD";
|
|
9759
9801
|
var ELEMENT_MARKER = "#";
|
|
9760
9802
|
var TEMPLATE_MARKER = "*";
|
|
@@ -9893,7 +9935,7 @@ function formatValue(value) {
|
|
|
9893
9935
|
return `${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
|
|
9894
9936
|
}
|
|
9895
9937
|
|
|
9896
|
-
// bazel-out/
|
|
9938
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_advance.mjs
|
|
9897
9939
|
function generateAdvance(job) {
|
|
9898
9940
|
for (const unit of job.units) {
|
|
9899
9941
|
const slotMap = /* @__PURE__ */ new Map();
|
|
@@ -9925,7 +9967,7 @@ function generateAdvance(job) {
|
|
|
9925
9967
|
}
|
|
9926
9968
|
}
|
|
9927
9969
|
|
|
9928
|
-
// bazel-out/
|
|
9970
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_projection_def.mjs
|
|
9929
9971
|
function generateProjectionDefs(job) {
|
|
9930
9972
|
const share = job.compatibility === CompatibilityMode.TemplateDefinitionBuilder;
|
|
9931
9973
|
const selectors = [];
|
|
@@ -9949,7 +9991,7 @@ function generateProjectionDefs(job) {
|
|
|
9949
9991
|
}
|
|
9950
9992
|
}
|
|
9951
9993
|
|
|
9952
|
-
// bazel-out/
|
|
9994
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_variables.mjs
|
|
9953
9995
|
function generateVariables(job) {
|
|
9954
9996
|
recursivelyProcessView(job.root, null);
|
|
9955
9997
|
}
|
|
@@ -9958,8 +10000,13 @@ function recursivelyProcessView(view, parentScope) {
|
|
|
9958
10000
|
for (const op of view.create) {
|
|
9959
10001
|
switch (op.kind) {
|
|
9960
10002
|
case OpKind.Template:
|
|
10003
|
+
recursivelyProcessView(view.job.views.get(op.xref), scope);
|
|
10004
|
+
break;
|
|
9961
10005
|
case OpKind.RepeaterCreate:
|
|
9962
10006
|
recursivelyProcessView(view.job.views.get(op.xref), scope);
|
|
10007
|
+
if (op.emptyView) {
|
|
10008
|
+
recursivelyProcessView(view.job.views.get(op.emptyView), scope);
|
|
10009
|
+
}
|
|
9963
10010
|
break;
|
|
9964
10011
|
case OpKind.Listener:
|
|
9965
10012
|
op.handlerOps.prepend(generateVariablesInScopeForView(view, scope));
|
|
@@ -10037,7 +10084,7 @@ function generateVariablesInScopeForView(view, scope) {
|
|
|
10037
10084
|
return newOps;
|
|
10038
10085
|
}
|
|
10039
10086
|
|
|
10040
|
-
// bazel-out/
|
|
10087
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/has_const_expression_collection.mjs
|
|
10041
10088
|
function collectConstExpressions(job) {
|
|
10042
10089
|
for (const unit of job.units) {
|
|
10043
10090
|
for (const op of unit.ops()) {
|
|
@@ -10051,7 +10098,7 @@ function collectConstExpressions(job) {
|
|
|
10051
10098
|
}
|
|
10052
10099
|
}
|
|
10053
10100
|
|
|
10054
|
-
// bazel-out/
|
|
10101
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/host_style_property_parsing.mjs
|
|
10055
10102
|
var STYLE_DOT = "style.";
|
|
10056
10103
|
var CLASS_DOT = "class.";
|
|
10057
10104
|
var STYLE_BANG = "style!";
|
|
@@ -10109,7 +10156,7 @@ function parseProperty(name) {
|
|
|
10109
10156
|
return { property: property2, suffix };
|
|
10110
10157
|
}
|
|
10111
10158
|
|
|
10112
|
-
// bazel-out/
|
|
10159
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/map_util.mjs
|
|
10113
10160
|
function mapLiteral(obj, quoted = false) {
|
|
10114
10161
|
return literalMap(Object.keys(obj).map((key) => ({
|
|
10115
10162
|
key,
|
|
@@ -10118,7 +10165,7 @@ function mapLiteral(obj, quoted = false) {
|
|
|
10118
10165
|
})));
|
|
10119
10166
|
}
|
|
10120
10167
|
|
|
10121
|
-
// bazel-out/
|
|
10168
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/icu_serializer.mjs
|
|
10122
10169
|
var IcuSerializerVisitor = class {
|
|
10123
10170
|
visitText(text2) {
|
|
10124
10171
|
return text2.value;
|
|
@@ -10152,7 +10199,7 @@ function serializeIcuNode(icu) {
|
|
|
10152
10199
|
return icu.visit(serializer);
|
|
10153
10200
|
}
|
|
10154
10201
|
|
|
10155
|
-
// bazel-out/
|
|
10202
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/lexer.mjs
|
|
10156
10203
|
var TokenType;
|
|
10157
10204
|
(function(TokenType2) {
|
|
10158
10205
|
TokenType2[TokenType2["Character"] = 0] = "Character";
|
|
@@ -10513,7 +10560,7 @@ function parseIntAutoRadix(text2) {
|
|
|
10513
10560
|
return result;
|
|
10514
10561
|
}
|
|
10515
10562
|
|
|
10516
|
-
// bazel-out/
|
|
10563
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/parser.mjs
|
|
10517
10564
|
var SplitInterpolation = class {
|
|
10518
10565
|
constructor(strings, expressions, offsets) {
|
|
10519
10566
|
this.strings = strings;
|
|
@@ -11407,7 +11454,7 @@ function getIndexMapForOriginalTemplate(interpolatedTokens) {
|
|
|
11407
11454
|
return offsetMap;
|
|
11408
11455
|
}
|
|
11409
11456
|
|
|
11410
|
-
// bazel-out/
|
|
11457
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/ast.mjs
|
|
11411
11458
|
var NodeWithI18n = class {
|
|
11412
11459
|
constructor(sourceSpan, i18n2) {
|
|
11413
11460
|
this.sourceSpan = sourceSpan;
|
|
@@ -11559,11 +11606,11 @@ var RecursiveVisitor = class {
|
|
|
11559
11606
|
}
|
|
11560
11607
|
};
|
|
11561
11608
|
|
|
11562
|
-
// bazel-out/
|
|
11609
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/element_schema_registry.mjs
|
|
11563
11610
|
var ElementSchemaRegistry = class {
|
|
11564
11611
|
};
|
|
11565
11612
|
|
|
11566
|
-
// bazel-out/
|
|
11613
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_element_schema_registry.mjs
|
|
11567
11614
|
var BOOLEAN = "boolean";
|
|
11568
11615
|
var NUMBER = "number";
|
|
11569
11616
|
var STRING = "string";
|
|
@@ -11916,7 +11963,7 @@ function _isPixelDimensionStyle(prop) {
|
|
|
11916
11963
|
}
|
|
11917
11964
|
}
|
|
11918
11965
|
|
|
11919
|
-
// bazel-out/
|
|
11966
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_tags.mjs
|
|
11920
11967
|
var HtmlTagDefinition = class {
|
|
11921
11968
|
constructor({ closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA, closedByParent = false, isVoid = false, ignoreFirstLf = false, preventNamespaceInheritance = false, canSelfClose = false } = {}) {
|
|
11922
11969
|
this.closedByChildren = {};
|
|
@@ -12034,7 +12081,7 @@ function getHtmlTagDefinition(tagName) {
|
|
|
12034
12081
|
return (_b2 = (_a2 = TAG_DEFINITIONS[tagName]) != null ? _a2 : TAG_DEFINITIONS[tagName.toLowerCase()]) != null ? _b2 : DEFAULT_TAG_DEFINITION;
|
|
12035
12082
|
}
|
|
12036
12083
|
|
|
12037
|
-
// bazel-out/
|
|
12084
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/placeholder.mjs
|
|
12038
12085
|
var TAG_TO_PLACEHOLDER_NAMES = {
|
|
12039
12086
|
"A": "LINK",
|
|
12040
12087
|
"B": "BOLD_TEXT",
|
|
@@ -12156,7 +12203,7 @@ var PlaceholderRegistry = class {
|
|
|
12156
12203
|
}
|
|
12157
12204
|
};
|
|
12158
12205
|
|
|
12159
|
-
// bazel-out/
|
|
12206
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_parser.mjs
|
|
12160
12207
|
var _expParser = new Parser(new Lexer());
|
|
12161
12208
|
function createI18nMessageFactory(interpolationConfig, containerBlocks) {
|
|
12162
12209
|
const visitor = new _I18nVisitor(_expParser, interpolationConfig, containerBlocks);
|
|
@@ -12335,14 +12382,14 @@ function extractPlaceholderName(input) {
|
|
|
12335
12382
|
return input.split(_CUSTOM_PH_EXP)[2];
|
|
12336
12383
|
}
|
|
12337
12384
|
|
|
12338
|
-
// bazel-out/
|
|
12385
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/parse_util.mjs
|
|
12339
12386
|
var I18nError = class extends ParseError {
|
|
12340
12387
|
constructor(span, msg) {
|
|
12341
12388
|
super(span, msg);
|
|
12342
12389
|
}
|
|
12343
12390
|
};
|
|
12344
12391
|
|
|
12345
|
-
// bazel-out/
|
|
12392
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/entities.mjs
|
|
12346
12393
|
var NAMED_ENTITIES = {
|
|
12347
12394
|
"AElig": "\xC6",
|
|
12348
12395
|
"AMP": "&",
|
|
@@ -14473,7 +14520,7 @@ var NAMED_ENTITIES = {
|
|
|
14473
14520
|
var NGSP_UNICODE = "\uE500";
|
|
14474
14521
|
NAMED_ENTITIES["ngsp"] = NGSP_UNICODE;
|
|
14475
14522
|
|
|
14476
|
-
// bazel-out/
|
|
14523
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/lexer.mjs
|
|
14477
14524
|
var TokenError = class extends ParseError {
|
|
14478
14525
|
constructor(errorMsg, tokenType, span) {
|
|
14479
14526
|
super(span, errorMsg);
|
|
@@ -15394,7 +15441,7 @@ var CursorError = class {
|
|
|
15394
15441
|
}
|
|
15395
15442
|
};
|
|
15396
15443
|
|
|
15397
|
-
// bazel-out/
|
|
15444
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/parser.mjs
|
|
15398
15445
|
var TreeError = class extends ParseError {
|
|
15399
15446
|
static create(elementName, span, msg) {
|
|
15400
15447
|
return new TreeError(elementName, span, msg);
|
|
@@ -15778,7 +15825,7 @@ function decodeEntity(match, entity) {
|
|
|
15778
15825
|
return match;
|
|
15779
15826
|
}
|
|
15780
15827
|
|
|
15781
|
-
// bazel-out/
|
|
15828
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/trusted_types_sinks.mjs
|
|
15782
15829
|
var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set([
|
|
15783
15830
|
"iframe|srcdoc",
|
|
15784
15831
|
"*|innerhtml",
|
|
@@ -15793,7 +15840,7 @@ function isTrustedTypesSink(tagName, propName) {
|
|
|
15793
15840
|
return TRUSTED_TYPES_SINKS.has(tagName + "|" + propName) || TRUSTED_TYPES_SINKS.has("*|" + propName);
|
|
15794
15841
|
}
|
|
15795
15842
|
|
|
15796
|
-
// bazel-out/
|
|
15843
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/meta.mjs
|
|
15797
15844
|
var setI18nRefs = (htmlNode, i18nNode) => {
|
|
15798
15845
|
if (htmlNode instanceof NodeWithI18n) {
|
|
15799
15846
|
if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {
|
|
@@ -15950,7 +15997,7 @@ function i18nMetaToJSDoc(meta) {
|
|
|
15950
15997
|
return jsDocComment(tags);
|
|
15951
15998
|
}
|
|
15952
15999
|
|
|
15953
|
-
// bazel-out/
|
|
16000
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/get_msg_utils.mjs
|
|
15954
16001
|
var GOOG_GET_MSG = "goog.getMsg";
|
|
15955
16002
|
function createGoogleGetMsgStatements(variable2, message, closureVar, placeholderValues) {
|
|
15956
16003
|
const messageString = serializeI18nMessageForGetMsg(message);
|
|
@@ -16001,7 +16048,7 @@ function serializeI18nMessageForGetMsg(message) {
|
|
|
16001
16048
|
return message.nodes.map((node) => node.visit(serializerVisitor2, null)).join("");
|
|
16002
16049
|
}
|
|
16003
16050
|
|
|
16004
|
-
// bazel-out/
|
|
16051
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/localize_utils.mjs
|
|
16005
16052
|
function createLocalizeStatements(variable2, message, params) {
|
|
16006
16053
|
const { messageParts, placeHolders } = serializeI18nMessageForLocalize(message);
|
|
16007
16054
|
const sourceSpan = getSourceSpan(message);
|
|
@@ -16090,13 +16137,13 @@ function createEmptyMessagePart(location) {
|
|
|
16090
16137
|
return new LiteralPiece("", new ParseSourceSpan(location, location));
|
|
16091
16138
|
}
|
|
16092
16139
|
|
|
16093
|
-
// bazel-out/
|
|
16140
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_const_collection.mjs
|
|
16094
16141
|
var NG_I18N_CLOSURE_MODE = "ngI18nClosureMode";
|
|
16095
16142
|
var TRANSLATION_VAR_PREFIX2 = "i18n_";
|
|
16096
16143
|
var I18N_ICU_MAPPING_PREFIX2 = "I18N_EXP_";
|
|
16097
16144
|
var ESCAPE2 = "\uFFFD";
|
|
16098
16145
|
function collectI18nConsts(job) {
|
|
16099
|
-
var _a2;
|
|
16146
|
+
var _a2, _b2;
|
|
16100
16147
|
const fileBasedI18nSuffix = job.relativeContextFilePath.replace(/[^A-Za-z0-9]/g, "_").toUpperCase() + "_";
|
|
16101
16148
|
const extractedAttributesByI18nContext = /* @__PURE__ */ new Map();
|
|
16102
16149
|
const i18nAttributesByElement = /* @__PURE__ */ new Map();
|
|
@@ -16105,11 +16152,13 @@ function collectI18nConsts(job) {
|
|
|
16105
16152
|
for (const unit of job.units) {
|
|
16106
16153
|
for (const op of unit.ops()) {
|
|
16107
16154
|
if (op.kind === OpKind.ExtractedAttribute && op.i18nContext !== null) {
|
|
16108
|
-
extractedAttributesByI18nContext.
|
|
16155
|
+
const attributes = (_a2 = extractedAttributesByI18nContext.get(op.i18nContext)) != null ? _a2 : [];
|
|
16156
|
+
attributes.push(op);
|
|
16157
|
+
extractedAttributesByI18nContext.set(op.i18nContext, attributes);
|
|
16109
16158
|
} else if (op.kind === OpKind.I18nAttributes) {
|
|
16110
16159
|
i18nAttributesByElement.set(op.target, op);
|
|
16111
16160
|
} else if (op.kind === OpKind.I18nExpression && op.usage === I18nExpressionFor.I18nAttribute) {
|
|
16112
|
-
const expressions = (
|
|
16161
|
+
const expressions = (_b2 = i18nExpressionsByElement.get(op.target)) != null ? _b2 : [];
|
|
16113
16162
|
expressions.push(op);
|
|
16114
16163
|
i18nExpressionsByElement.set(op.target, expressions);
|
|
16115
16164
|
} else if (op.kind === OpKind.I18nMessage) {
|
|
@@ -16130,9 +16179,11 @@ function collectI18nConsts(job) {
|
|
|
16130
16179
|
} else {
|
|
16131
16180
|
job.constsInitializers.push(...statements);
|
|
16132
16181
|
i18nValuesByContext.set(op.i18nContext, mainVar);
|
|
16133
|
-
const
|
|
16134
|
-
if (
|
|
16135
|
-
|
|
16182
|
+
const attributesForMessage = extractedAttributesByI18nContext.get(op.i18nContext);
|
|
16183
|
+
if (attributesForMessage !== void 0) {
|
|
16184
|
+
for (const attr of attributesForMessage) {
|
|
16185
|
+
attr.expression = mainVar.clone();
|
|
16186
|
+
}
|
|
16136
16187
|
}
|
|
16137
16188
|
}
|
|
16138
16189
|
}
|
|
@@ -16248,7 +16299,7 @@ function i18nGenerateClosureVar(pool, messageId, fileBasedI18nSuffix, useExterna
|
|
|
16248
16299
|
return variable(name);
|
|
16249
16300
|
}
|
|
16250
16301
|
|
|
16251
|
-
// bazel-out/
|
|
16302
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_text_extraction.mjs
|
|
16252
16303
|
function convertI18nText(job) {
|
|
16253
16304
|
var _a2;
|
|
16254
16305
|
for (const unit of job.units) {
|
|
@@ -16307,7 +16358,7 @@ function convertI18nText(job) {
|
|
|
16307
16358
|
}
|
|
16308
16359
|
}
|
|
16309
16360
|
|
|
16310
|
-
// bazel-out/
|
|
16361
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/local_refs.mjs
|
|
16311
16362
|
function liftLocalRefs(job) {
|
|
16312
16363
|
for (const unit of job.units) {
|
|
16313
16364
|
for (const op of unit.create) {
|
|
@@ -16337,7 +16388,7 @@ function serializeLocalRefs(refs) {
|
|
|
16337
16388
|
return literalArr(constRefs);
|
|
16338
16389
|
}
|
|
16339
16390
|
|
|
16340
|
-
// bazel-out/
|
|
16391
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
|
|
16341
16392
|
function emitNamespaceChanges(job) {
|
|
16342
16393
|
for (const unit of job.units) {
|
|
16343
16394
|
let activeNamespace = Namespace.HTML;
|
|
@@ -16353,7 +16404,7 @@ function emitNamespaceChanges(job) {
|
|
|
16353
16404
|
}
|
|
16354
16405
|
}
|
|
16355
16406
|
|
|
16356
|
-
// bazel-out/
|
|
16407
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/style_parser.mjs
|
|
16357
16408
|
function parse(value) {
|
|
16358
16409
|
const styles = [];
|
|
16359
16410
|
let i = 0;
|
|
@@ -16414,7 +16465,7 @@ function hyphenate2(value) {
|
|
|
16414
16465
|
}).toLowerCase();
|
|
16415
16466
|
}
|
|
16416
16467
|
|
|
16417
|
-
// bazel-out/
|
|
16468
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/naming.mjs
|
|
16418
16469
|
function nameFunctionsAndVariables(job) {
|
|
16419
16470
|
addNamesToView(job.root, job.componentName, { index: 0 }, job.compatibility === CompatibilityMode.TemplateDefinitionBuilder);
|
|
16420
16471
|
}
|
|
@@ -16529,7 +16580,7 @@ function stripImportant(name) {
|
|
|
16529
16580
|
return name;
|
|
16530
16581
|
}
|
|
16531
16582
|
|
|
16532
|
-
// bazel-out/
|
|
16583
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/next_context_merging.mjs
|
|
16533
16584
|
function mergeNextContextExpressions(job) {
|
|
16534
16585
|
for (const unit of job.units) {
|
|
16535
16586
|
for (const op of unit.create) {
|
|
@@ -16575,7 +16626,7 @@ function mergeNextContextsInOps(ops) {
|
|
|
16575
16626
|
}
|
|
16576
16627
|
}
|
|
16577
16628
|
|
|
16578
|
-
// bazel-out/
|
|
16629
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ng_container.mjs
|
|
16579
16630
|
var CONTAINER_TAG = "ng-container";
|
|
16580
16631
|
function generateNgContainerOps(job) {
|
|
16581
16632
|
for (const unit of job.units) {
|
|
@@ -16592,7 +16643,7 @@ function generateNgContainerOps(job) {
|
|
|
16592
16643
|
}
|
|
16593
16644
|
}
|
|
16594
16645
|
|
|
16595
|
-
// bazel-out/
|
|
16646
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nonbindable.mjs
|
|
16596
16647
|
function lookupElement3(elements, xref) {
|
|
16597
16648
|
const el = elements.get(xref);
|
|
16598
16649
|
if (el === void 0) {
|
|
@@ -16622,7 +16673,7 @@ function disableBindings(job) {
|
|
|
16622
16673
|
}
|
|
16623
16674
|
}
|
|
16624
16675
|
|
|
16625
|
-
// bazel-out/
|
|
16676
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nullish_coalescing.mjs
|
|
16626
16677
|
function generateNullishCoalesceExpressions(job) {
|
|
16627
16678
|
for (const unit of job.units) {
|
|
16628
16679
|
for (const op of unit.ops()) {
|
|
@@ -16638,7 +16689,7 @@ function generateNullishCoalesceExpressions(job) {
|
|
|
16638
16689
|
}
|
|
16639
16690
|
}
|
|
16640
16691
|
|
|
16641
|
-
// bazel-out/
|
|
16692
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ordering.mjs
|
|
16642
16693
|
function kindTest(kind) {
|
|
16643
16694
|
return (op) => op.kind === kind;
|
|
16644
16695
|
}
|
|
@@ -16712,7 +16763,7 @@ function keepLast(ops) {
|
|
|
16712
16763
|
return ops.slice(ops.length - 1);
|
|
16713
16764
|
}
|
|
16714
16765
|
|
|
16715
|
-
// bazel-out/
|
|
16766
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/parse_extracted_styles.mjs
|
|
16716
16767
|
function parseExtractedStyles(job) {
|
|
16717
16768
|
for (const unit of job.units) {
|
|
16718
16769
|
for (const op of unit.create) {
|
|
@@ -16720,13 +16771,13 @@ function parseExtractedStyles(job) {
|
|
|
16720
16771
|
if (op.name === "style") {
|
|
16721
16772
|
const parsedStyles = parse(op.expression.value);
|
|
16722
16773
|
for (let i = 0; i < parsedStyles.length - 1; i += 2) {
|
|
16723
|
-
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, parsedStyles[i], literal(parsedStyles[i + 1]), null), op);
|
|
16774
|
+
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, parsedStyles[i], literal(parsedStyles[i + 1]), null, null, SecurityContext.STYLE), op);
|
|
16724
16775
|
}
|
|
16725
16776
|
OpList.remove(op);
|
|
16726
16777
|
} else if (op.name === "class") {
|
|
16727
16778
|
const parsedClasses = op.expression.value.trim().split(/\s+/g);
|
|
16728
16779
|
for (const parsedClass of parsedClasses) {
|
|
16729
|
-
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, parsedClass, null, null), op);
|
|
16780
|
+
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, parsedClass, null, null, null, SecurityContext.NONE), op);
|
|
16730
16781
|
}
|
|
16731
16782
|
OpList.remove(op);
|
|
16732
16783
|
}
|
|
@@ -16735,7 +16786,7 @@ function parseExtractedStyles(job) {
|
|
|
16735
16786
|
}
|
|
16736
16787
|
}
|
|
16737
16788
|
|
|
16738
|
-
// bazel-out/
|
|
16789
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/phase_remove_content_selectors.mjs
|
|
16739
16790
|
function removeContentSelectors(job) {
|
|
16740
16791
|
for (const unit of job.units) {
|
|
16741
16792
|
const elements = createOpXrefMap(unit);
|
|
@@ -16769,7 +16820,7 @@ function lookupInXrefMap(map, xref) {
|
|
|
16769
16820
|
return el;
|
|
16770
16821
|
}
|
|
16771
16822
|
|
|
16772
|
-
// bazel-out/
|
|
16823
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_creation.mjs
|
|
16773
16824
|
function createPipes(job) {
|
|
16774
16825
|
for (const unit of job.units) {
|
|
16775
16826
|
processPipeBindingsInView(unit);
|
|
@@ -16817,7 +16868,7 @@ function addPipeToCreationBlock(unit, afterTargetXref, binding) {
|
|
|
16817
16868
|
throw new Error(`AssertionError: unable to find insertion point for pipe ${binding.name}`);
|
|
16818
16869
|
}
|
|
16819
16870
|
|
|
16820
|
-
// bazel-out/
|
|
16871
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_variadic.mjs
|
|
16821
16872
|
function createVariadicPipes(job) {
|
|
16822
16873
|
for (const unit of job.units) {
|
|
16823
16874
|
for (const op of unit.update) {
|
|
@@ -16834,7 +16885,7 @@ function createVariadicPipes(job) {
|
|
|
16834
16885
|
}
|
|
16835
16886
|
}
|
|
16836
16887
|
|
|
16837
|
-
// bazel-out/
|
|
16888
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/propagate_i18n_blocks.mjs
|
|
16838
16889
|
function propagateI18nBlocks(job) {
|
|
16839
16890
|
propagateI18nBlocksToTemplates(job.root, 0);
|
|
16840
16891
|
}
|
|
@@ -16853,19 +16904,29 @@ function propagateI18nBlocksToTemplates(unit, subTemplateIndex) {
|
|
|
16853
16904
|
i18nBlock = null;
|
|
16854
16905
|
break;
|
|
16855
16906
|
case OpKind.Template:
|
|
16856
|
-
|
|
16857
|
-
|
|
16858
|
-
|
|
16859
|
-
|
|
16860
|
-
|
|
16861
|
-
|
|
16862
|
-
|
|
16907
|
+
subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.xref), i18nBlock, op.i18nPlaceholder, subTemplateIndex);
|
|
16908
|
+
break;
|
|
16909
|
+
case OpKind.RepeaterCreate:
|
|
16910
|
+
const forView = unit.job.views.get(op.xref);
|
|
16911
|
+
subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.xref), i18nBlock, op.i18nPlaceholder, subTemplateIndex);
|
|
16912
|
+
if (op.emptyView !== null) {
|
|
16913
|
+
subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.emptyView), i18nBlock, op.emptyI18nPlaceholder, subTemplateIndex);
|
|
16863
16914
|
}
|
|
16864
|
-
|
|
16915
|
+
break;
|
|
16865
16916
|
}
|
|
16866
16917
|
}
|
|
16867
16918
|
return subTemplateIndex;
|
|
16868
16919
|
}
|
|
16920
|
+
function propagateI18nBlocksForView(view, i18nBlock, i18nPlaceholder, subTemplateIndex) {
|
|
16921
|
+
if (i18nPlaceholder !== void 0) {
|
|
16922
|
+
if (i18nBlock === null) {
|
|
16923
|
+
throw Error("Expected template with i18n placeholder to be in an i18n block.");
|
|
16924
|
+
}
|
|
16925
|
+
subTemplateIndex++;
|
|
16926
|
+
wrapTemplateWithI18n(view, i18nBlock);
|
|
16927
|
+
}
|
|
16928
|
+
return propagateI18nBlocksToTemplates(view, subTemplateIndex);
|
|
16929
|
+
}
|
|
16869
16930
|
function wrapTemplateWithI18n(unit, parentI18n) {
|
|
16870
16931
|
var _a2;
|
|
16871
16932
|
if (((_a2 = unit.create.head.next) == null ? void 0 : _a2.kind) !== OpKind.I18nStart) {
|
|
@@ -16875,7 +16936,7 @@ function wrapTemplateWithI18n(unit, parentI18n) {
|
|
|
16875
16936
|
}
|
|
16876
16937
|
}
|
|
16877
16938
|
|
|
16878
|
-
// bazel-out/
|
|
16939
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
|
|
16879
16940
|
function extractPureFunctions(job) {
|
|
16880
16941
|
for (const view of job.units) {
|
|
16881
16942
|
for (const op of view.ops()) {
|
|
@@ -16917,7 +16978,7 @@ var PureFunctionConstant = class extends GenericKeyFn {
|
|
|
16917
16978
|
}
|
|
16918
16979
|
};
|
|
16919
16980
|
|
|
16920
|
-
// bazel-out/
|
|
16981
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_literal_structures.mjs
|
|
16921
16982
|
function generatePureLiteralStructures(job) {
|
|
16922
16983
|
for (const unit of job.units) {
|
|
16923
16984
|
for (const op of unit.update) {
|
|
@@ -16964,7 +17025,7 @@ function transformLiteralMap(expr) {
|
|
|
16964
17025
|
return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);
|
|
16965
17026
|
}
|
|
16966
17027
|
|
|
16967
|
-
// bazel-out/
|
|
17028
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/instruction.mjs
|
|
16968
17029
|
function element(slot, tag, constIndex, localRefIndex, sourceSpan) {
|
|
16969
17030
|
return elementOrContainerBase(Identifiers.element, slot, tag, constIndex, localRefIndex, sourceSpan);
|
|
16970
17031
|
}
|
|
@@ -17022,17 +17083,13 @@ function disableBindings2() {
|
|
|
17022
17083
|
function enableBindings() {
|
|
17023
17084
|
return call(Identifiers.enableBindings, [], null);
|
|
17024
17085
|
}
|
|
17025
|
-
function listener(name, handlerFn, sourceSpan) {
|
|
17026
|
-
|
|
17027
|
-
|
|
17028
|
-
|
|
17029
|
-
|
|
17030
|
-
}
|
|
17031
|
-
|
|
17032
|
-
return call(Identifiers.syntheticHostListener, [
|
|
17033
|
-
literal(name),
|
|
17034
|
-
handlerFn
|
|
17035
|
-
], sourceSpan);
|
|
17086
|
+
function listener(name, handlerFn, eventTargetResolver, syntheticHost, sourceSpan) {
|
|
17087
|
+
const args = [literal(name), handlerFn];
|
|
17088
|
+
if (eventTargetResolver !== null) {
|
|
17089
|
+
args.push(literal(false));
|
|
17090
|
+
args.push(importExpr(eventTargetResolver));
|
|
17091
|
+
}
|
|
17092
|
+
return call(syntheticHost ? Identifiers.syntheticHostListener : Identifiers.listener, args, sourceSpan);
|
|
17036
17093
|
}
|
|
17037
17094
|
function pipe(slot, name) {
|
|
17038
17095
|
return call(Identifiers.pipe, [
|
|
@@ -17291,8 +17348,12 @@ function classMapInterpolate(strings, expressions, sourceSpan) {
|
|
|
17291
17348
|
const interpolationArgs = collateInterpolationArgs(strings, expressions);
|
|
17292
17349
|
return callVariadicInstruction(CLASS_MAP_INTERPOLATE_CONFIG, [], interpolationArgs, [], sourceSpan);
|
|
17293
17350
|
}
|
|
17294
|
-
function hostProperty(name, expression, sourceSpan) {
|
|
17295
|
-
|
|
17351
|
+
function hostProperty(name, expression, sanitizer, sourceSpan) {
|
|
17352
|
+
const args = [literal(name), expression];
|
|
17353
|
+
if (sanitizer !== null) {
|
|
17354
|
+
args.push(sanitizer);
|
|
17355
|
+
}
|
|
17356
|
+
return call(Identifiers.hostProperty, args, sourceSpan);
|
|
17296
17357
|
}
|
|
17297
17358
|
function syntheticHostProperty(name, expression, sourceSpan) {
|
|
17298
17359
|
return call(Identifiers.syntheticHostProperty, [literal(name), expression], sourceSpan);
|
|
@@ -17479,14 +17540,11 @@ function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs,
|
|
|
17479
17540
|
return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
|
|
17480
17541
|
}
|
|
17481
17542
|
|
|
17482
|
-
// bazel-out/
|
|
17483
|
-
var
|
|
17484
|
-
[
|
|
17485
|
-
[
|
|
17486
|
-
[
|
|
17487
|
-
[SanitizerFn.Script, Identifiers.sanitizeScript],
|
|
17488
|
-
[SanitizerFn.Style, Identifiers.sanitizeStyle],
|
|
17489
|
-
[SanitizerFn.Url, Identifiers.sanitizeUrl]
|
|
17543
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/reify.mjs
|
|
17544
|
+
var GLOBAL_TARGET_RESOLVERS = /* @__PURE__ */ new Map([
|
|
17545
|
+
["window", Identifiers.resolveWindow],
|
|
17546
|
+
["document", Identifiers.resolveDocument],
|
|
17547
|
+
["body", Identifiers.resolveBody]
|
|
17490
17548
|
]);
|
|
17491
17549
|
function reify(job) {
|
|
17492
17550
|
for (const unit of job.units) {
|
|
@@ -17556,8 +17614,11 @@ function reifyCreateOperations(unit, ops) {
|
|
|
17556
17614
|
break;
|
|
17557
17615
|
case OpKind.Listener:
|
|
17558
17616
|
const listenerFn = reifyListenerHandler(unit, op.handlerFnName, op.handlerOps, op.consumesDollarEvent);
|
|
17559
|
-
const
|
|
17560
|
-
|
|
17617
|
+
const eventTargetResolver = op.eventTarget ? GLOBAL_TARGET_RESOLVERS.get(op.eventTarget) : null;
|
|
17618
|
+
if (eventTargetResolver === void 0) {
|
|
17619
|
+
throw new Error(`AssertionError: unknown event target ${op.eventTarget}`);
|
|
17620
|
+
}
|
|
17621
|
+
OpList.replace(op, listener(op.name, listenerFn, eventTargetResolver, op.hostListener && op.isAnimationListener, op.sourceSpan));
|
|
17561
17622
|
break;
|
|
17562
17623
|
case OpKind.Variable:
|
|
17563
17624
|
if (op.variable.name === null) {
|
|
@@ -17712,7 +17773,7 @@ function reifyUpdateOperations(_unit, ops) {
|
|
|
17712
17773
|
if (op.isAnimationTrigger) {
|
|
17713
17774
|
OpList.replace(op, syntheticHostProperty(op.name, op.expression, op.sourceSpan));
|
|
17714
17775
|
} else {
|
|
17715
|
-
OpList.replace(op, hostProperty(op.name, op.expression, op.sourceSpan));
|
|
17776
|
+
OpList.replace(op, hostProperty(op.name, op.expression, op.sanitizer, op.sourceSpan));
|
|
17716
17777
|
}
|
|
17717
17778
|
}
|
|
17718
17779
|
break;
|
|
@@ -17790,8 +17851,6 @@ function reifyIrExpression(expr) {
|
|
|
17790
17851
|
return pipeBind(expr.targetSlot.slot, expr.varOffset, expr.args);
|
|
17791
17852
|
case ExpressionKind.PipeBindingVariadic:
|
|
17792
17853
|
return pipeBindV(expr.targetSlot.slot, expr.varOffset, expr.args);
|
|
17793
|
-
case ExpressionKind.SanitizerExpr:
|
|
17794
|
-
return importExpr(sanitizerIdentifierMap.get(expr.fn));
|
|
17795
17854
|
case ExpressionKind.SlotLiteralExpr:
|
|
17796
17855
|
return literal(expr.slot.slot);
|
|
17797
17856
|
default:
|
|
@@ -17814,7 +17873,7 @@ function reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {
|
|
|
17814
17873
|
return fn(params, handlerStmts, void 0, void 0, name);
|
|
17815
17874
|
}
|
|
17816
17875
|
|
|
17817
|
-
// bazel-out/
|
|
17876
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_empty_bindings.mjs
|
|
17818
17877
|
function removeEmptyBindings(job) {
|
|
17819
17878
|
for (const unit of job.units) {
|
|
17820
17879
|
for (const op of unit.update) {
|
|
@@ -17835,7 +17894,7 @@ function removeEmptyBindings(job) {
|
|
|
17835
17894
|
}
|
|
17836
17895
|
}
|
|
17837
17896
|
|
|
17838
|
-
// bazel-out/
|
|
17897
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_i18n_contexts.mjs
|
|
17839
17898
|
function removeI18nContexts(job) {
|
|
17840
17899
|
for (const unit of job.units) {
|
|
17841
17900
|
for (const op of unit.create) {
|
|
@@ -17851,7 +17910,7 @@ function removeI18nContexts(job) {
|
|
|
17851
17910
|
}
|
|
17852
17911
|
}
|
|
17853
17912
|
|
|
17854
|
-
// bazel-out/
|
|
17913
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_unused_i18n_attrs.mjs
|
|
17855
17914
|
function removeUnusedI18nAttributesOps(job) {
|
|
17856
17915
|
for (const unit of job.units) {
|
|
17857
17916
|
const ownersWithI18nExpressions = /* @__PURE__ */ new Set();
|
|
@@ -17873,7 +17932,7 @@ function removeUnusedI18nAttributesOps(job) {
|
|
|
17873
17932
|
}
|
|
17874
17933
|
}
|
|
17875
17934
|
|
|
17876
|
-
// bazel-out/
|
|
17935
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/repeater_derived_vars.mjs
|
|
17877
17936
|
function generateRepeaterDerivedVars(job) {
|
|
17878
17937
|
const repeaters = /* @__PURE__ */ new Map();
|
|
17879
17938
|
for (const unit of job.units) {
|
|
@@ -17905,7 +17964,7 @@ function generateRepeaterDerivedVars(job) {
|
|
|
17905
17964
|
}
|
|
17906
17965
|
}
|
|
17907
17966
|
|
|
17908
|
-
// bazel-out/
|
|
17967
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
|
|
17909
17968
|
function resolveContexts(job) {
|
|
17910
17969
|
for (const unit of job.units) {
|
|
17911
17970
|
processLexicalScope(unit, unit.create);
|
|
@@ -17946,7 +18005,7 @@ function processLexicalScope(view, ops) {
|
|
|
17946
18005
|
}
|
|
17947
18006
|
}
|
|
17948
18007
|
|
|
17949
|
-
// bazel-out/
|
|
18008
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
|
|
17950
18009
|
function resolveDollarEvent(job) {
|
|
17951
18010
|
for (const unit of job.units) {
|
|
17952
18011
|
transformDollarEvent(unit, unit.create);
|
|
@@ -17967,7 +18026,7 @@ function transformDollarEvent(unit, ops) {
|
|
|
17967
18026
|
}
|
|
17968
18027
|
}
|
|
17969
18028
|
|
|
17970
|
-
// bazel-out/
|
|
18029
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_element_placeholders.mjs
|
|
17971
18030
|
function resolveI18nElementPlaceholders(job) {
|
|
17972
18031
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
17973
18032
|
const elements = /* @__PURE__ */ new Map();
|
|
@@ -18032,18 +18091,52 @@ function resolvePlaceholdersForView(job, unit, i18nContexts, elements, pendingSt
|
|
|
18032
18091
|
}
|
|
18033
18092
|
break;
|
|
18034
18093
|
case OpKind.Template:
|
|
18094
|
+
const view = job.views.get(op.xref);
|
|
18035
18095
|
if (op.i18nPlaceholder === void 0) {
|
|
18036
|
-
resolvePlaceholdersForView(job,
|
|
18096
|
+
resolvePlaceholdersForView(job, view, i18nContexts, elements);
|
|
18037
18097
|
} else {
|
|
18038
18098
|
if (currentOps === null) {
|
|
18039
18099
|
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
18040
18100
|
}
|
|
18041
18101
|
if (op.templateKind === TemplateKind.Structural) {
|
|
18042
|
-
resolvePlaceholdersForView(job,
|
|
18102
|
+
resolvePlaceholdersForView(job, view, i18nContexts, elements, op);
|
|
18103
|
+
} else {
|
|
18104
|
+
recordTemplateStart(job, view, op.handle.slot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18105
|
+
resolvePlaceholdersForView(job, view, i18nContexts, elements);
|
|
18106
|
+
recordTemplateClose(job, view, op.handle.slot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18107
|
+
pendingStructuralDirective = void 0;
|
|
18108
|
+
}
|
|
18109
|
+
}
|
|
18110
|
+
break;
|
|
18111
|
+
case OpKind.RepeaterCreate:
|
|
18112
|
+
if (pendingStructuralDirective !== void 0) {
|
|
18113
|
+
throw Error("AssertionError: Unexpected structural directive associated with @for block");
|
|
18114
|
+
}
|
|
18115
|
+
const forSlot = op.handle.slot + 1;
|
|
18116
|
+
const forView = job.views.get(op.xref);
|
|
18117
|
+
if (op.i18nPlaceholder === void 0) {
|
|
18118
|
+
resolvePlaceholdersForView(job, forView, i18nContexts, elements);
|
|
18119
|
+
} else {
|
|
18120
|
+
if (currentOps === null) {
|
|
18121
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
18122
|
+
}
|
|
18123
|
+
recordTemplateStart(job, forView, forSlot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18124
|
+
resolvePlaceholdersForView(job, forView, i18nContexts, elements);
|
|
18125
|
+
recordTemplateClose(job, forView, forSlot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18126
|
+
pendingStructuralDirective = void 0;
|
|
18127
|
+
}
|
|
18128
|
+
if (op.emptyView !== null) {
|
|
18129
|
+
const emptySlot = op.handle.slot + 2;
|
|
18130
|
+
const emptyView = job.views.get(op.emptyView);
|
|
18131
|
+
if (op.emptyI18nPlaceholder === void 0) {
|
|
18132
|
+
resolvePlaceholdersForView(job, emptyView, i18nContexts, elements);
|
|
18043
18133
|
} else {
|
|
18044
|
-
|
|
18045
|
-
|
|
18046
|
-
|
|
18134
|
+
if (currentOps === null) {
|
|
18135
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
18136
|
+
}
|
|
18137
|
+
recordTemplateStart(job, emptyView, emptySlot, op.emptyI18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18138
|
+
resolvePlaceholdersForView(job, emptyView, i18nContexts, elements);
|
|
18139
|
+
recordTemplateClose(job, emptyView, emptySlot, op.emptyI18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18047
18140
|
pendingStructuralDirective = void 0;
|
|
18048
18141
|
}
|
|
18049
18142
|
}
|
|
@@ -18076,8 +18169,8 @@ function recordElementClose(op, i18nContext, i18nBlock, structuralDirective) {
|
|
|
18076
18169
|
addParam(i18nContext.params, closeName, value, i18nBlock.subTemplateIndex, flags);
|
|
18077
18170
|
}
|
|
18078
18171
|
}
|
|
18079
|
-
function recordTemplateStart(job,
|
|
18080
|
-
let { startName, closeName } =
|
|
18172
|
+
function recordTemplateStart(job, view, slot, i18nPlaceholder, i18nContext, i18nBlock, structuralDirective) {
|
|
18173
|
+
let { startName, closeName } = i18nPlaceholder;
|
|
18081
18174
|
let flags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.OpenTag;
|
|
18082
18175
|
if (!closeName) {
|
|
18083
18176
|
flags |= I18nParamValueFlags.CloseTag;
|
|
@@ -18085,20 +18178,20 @@ function recordTemplateStart(job, op, i18nContext, i18nBlock, structuralDirectiv
|
|
|
18085
18178
|
if (structuralDirective !== void 0) {
|
|
18086
18179
|
addParam(i18nContext.params, startName, structuralDirective.handle.slot, i18nBlock.subTemplateIndex, flags);
|
|
18087
18180
|
}
|
|
18088
|
-
addParam(i18nContext.params, startName,
|
|
18181
|
+
addParam(i18nContext.params, startName, slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, view), flags);
|
|
18089
18182
|
}
|
|
18090
|
-
function recordTemplateClose(job,
|
|
18091
|
-
const { startName, closeName } =
|
|
18183
|
+
function recordTemplateClose(job, view, slot, i18nPlaceholder, i18nContext, i18nBlock, structuralDirective) {
|
|
18184
|
+
const { startName, closeName } = i18nPlaceholder;
|
|
18092
18185
|
const flags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag;
|
|
18093
18186
|
if (closeName) {
|
|
18094
|
-
addParam(i18nContext.params, closeName,
|
|
18187
|
+
addParam(i18nContext.params, closeName, slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, view), flags);
|
|
18095
18188
|
if (structuralDirective !== void 0) {
|
|
18096
18189
|
addParam(i18nContext.params, closeName, structuralDirective.handle.slot, i18nBlock.subTemplateIndex, flags);
|
|
18097
18190
|
}
|
|
18098
18191
|
}
|
|
18099
18192
|
}
|
|
18100
|
-
function getSubTemplateIndexForTemplateTag(job, i18nOp,
|
|
18101
|
-
for (const childOp of
|
|
18193
|
+
function getSubTemplateIndexForTemplateTag(job, i18nOp, view) {
|
|
18194
|
+
for (const childOp of view.create) {
|
|
18102
18195
|
if (childOp.kind === OpKind.I18nStart) {
|
|
18103
18196
|
return childOp.subTemplateIndex;
|
|
18104
18197
|
}
|
|
@@ -18112,7 +18205,7 @@ function addParam(params, placeholder, value, subTemplateIndex, flags) {
|
|
|
18112
18205
|
params.set(placeholder, values);
|
|
18113
18206
|
}
|
|
18114
18207
|
|
|
18115
|
-
// bazel-out/
|
|
18208
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_expression_placeholders.mjs
|
|
18116
18209
|
function resolveI18nExpressionPlaceholders(job) {
|
|
18117
18210
|
var _a2;
|
|
18118
18211
|
const subTemplateIndicies = /* @__PURE__ */ new Map();
|
|
@@ -18151,7 +18244,7 @@ function resolveI18nExpressionPlaceholders(job) {
|
|
|
18151
18244
|
}
|
|
18152
18245
|
}
|
|
18153
18246
|
|
|
18154
|
-
// bazel-out/
|
|
18247
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_icu_placeholders.mjs
|
|
18155
18248
|
function resolveI18nIcuPlaceholders(job) {
|
|
18156
18249
|
for (const unit of job.units) {
|
|
18157
18250
|
for (const op of unit.create) {
|
|
@@ -18195,7 +18288,7 @@ var ResolveIcuPlaceholdersVisitor = class extends RecurseVisitor {
|
|
|
18195
18288
|
}
|
|
18196
18289
|
};
|
|
18197
18290
|
|
|
18198
|
-
// bazel-out/
|
|
18291
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_names.mjs
|
|
18199
18292
|
function resolveNames(job) {
|
|
18200
18293
|
for (const unit of job.units) {
|
|
18201
18294
|
processLexicalScope2(unit, unit.create, null);
|
|
@@ -18259,31 +18352,55 @@ function processLexicalScope2(unit, ops, savedView) {
|
|
|
18259
18352
|
}
|
|
18260
18353
|
}
|
|
18261
18354
|
|
|
18262
|
-
// bazel-out/
|
|
18263
|
-
var
|
|
18264
|
-
[SecurityContext.HTML,
|
|
18265
|
-
[SecurityContext.
|
|
18266
|
-
[SecurityContext.
|
|
18267
|
-
[SecurityContext.
|
|
18268
|
-
[SecurityContext.
|
|
18355
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_sanitizers.mjs
|
|
18356
|
+
var sanitizerFns = /* @__PURE__ */ new Map([
|
|
18357
|
+
[SecurityContext.HTML, Identifiers.sanitizeHtml],
|
|
18358
|
+
[SecurityContext.RESOURCE_URL, Identifiers.sanitizeResourceUrl],
|
|
18359
|
+
[SecurityContext.SCRIPT, Identifiers.sanitizeScript],
|
|
18360
|
+
[SecurityContext.STYLE, Identifiers.sanitizeStyle],
|
|
18361
|
+
[SecurityContext.URL, Identifiers.sanitizeUrl]
|
|
18362
|
+
]);
|
|
18363
|
+
var trustedValueFns = /* @__PURE__ */ new Map([
|
|
18364
|
+
[SecurityContext.HTML, Identifiers.trustConstantHtml],
|
|
18365
|
+
[SecurityContext.RESOURCE_URL, Identifiers.trustConstantResourceUrl]
|
|
18269
18366
|
]);
|
|
18270
18367
|
function resolveSanitizers(job) {
|
|
18368
|
+
var _a2, _b2;
|
|
18271
18369
|
for (const unit of job.units) {
|
|
18272
18370
|
const elements = createOpXrefMap(unit);
|
|
18273
|
-
|
|
18371
|
+
if (job.kind !== CompilationJobKind.Host) {
|
|
18372
|
+
for (const op of unit.create) {
|
|
18373
|
+
if (op.kind === OpKind.ExtractedAttribute) {
|
|
18374
|
+
const trustedValueFn = (_a2 = trustedValueFns.get(getOnlySecurityContext(op.securityContext))) != null ? _a2 : null;
|
|
18375
|
+
op.trustedValueFn = trustedValueFn !== null ? importExpr(trustedValueFn) : null;
|
|
18376
|
+
}
|
|
18377
|
+
}
|
|
18378
|
+
}
|
|
18274
18379
|
for (const op of unit.update) {
|
|
18275
18380
|
switch (op.kind) {
|
|
18276
18381
|
case OpKind.Property:
|
|
18277
18382
|
case OpKind.Attribute:
|
|
18278
|
-
|
|
18279
|
-
|
|
18383
|
+
case OpKind.HostProperty:
|
|
18384
|
+
let sanitizerFn = null;
|
|
18385
|
+
if (Array.isArray(op.securityContext) && op.securityContext.length === 2 && op.securityContext.indexOf(SecurityContext.URL) > -1 && op.securityContext.indexOf(SecurityContext.RESOURCE_URL) > -1) {
|
|
18386
|
+
sanitizerFn = Identifiers.sanitizeUrlOrResourceUrl;
|
|
18387
|
+
} else {
|
|
18388
|
+
sanitizerFn = (_b2 = sanitizerFns.get(getOnlySecurityContext(op.securityContext))) != null ? _b2 : null;
|
|
18389
|
+
}
|
|
18390
|
+
op.sanitizer = sanitizerFn !== null ? importExpr(sanitizerFn) : null;
|
|
18280
18391
|
if (op.sanitizer === null) {
|
|
18281
|
-
|
|
18282
|
-
if (
|
|
18283
|
-
|
|
18392
|
+
let isIframe = false;
|
|
18393
|
+
if (job.kind === CompilationJobKind.Host || op.kind === OpKind.HostProperty) {
|
|
18394
|
+
isIframe = true;
|
|
18395
|
+
} else {
|
|
18396
|
+
const ownerOp = elements.get(op.target);
|
|
18397
|
+
if (ownerOp === void 0 || !isElementOrContainerOp(ownerOp)) {
|
|
18398
|
+
throw Error("Property should have an element-like owner");
|
|
18399
|
+
}
|
|
18400
|
+
isIframe = isIframeElement(ownerOp);
|
|
18284
18401
|
}
|
|
18285
|
-
if (
|
|
18286
|
-
op.sanitizer =
|
|
18402
|
+
if (isIframe && isIframeSecuritySensitiveAttr(op.name)) {
|
|
18403
|
+
op.sanitizer = importExpr(Identifiers.validateIframeAttribute);
|
|
18287
18404
|
}
|
|
18288
18405
|
}
|
|
18289
18406
|
break;
|
|
@@ -18295,8 +18412,17 @@ function isIframeElement(op) {
|
|
|
18295
18412
|
var _a2;
|
|
18296
18413
|
return op.kind === OpKind.ElementStart && ((_a2 = op.tag) == null ? void 0 : _a2.toLowerCase()) === "iframe";
|
|
18297
18414
|
}
|
|
18415
|
+
function getOnlySecurityContext(securityContext) {
|
|
18416
|
+
if (Array.isArray(securityContext)) {
|
|
18417
|
+
if (securityContext.length > 1) {
|
|
18418
|
+
throw Error(`AssertionError: Ambiguous security context`);
|
|
18419
|
+
}
|
|
18420
|
+
return securityContext[0] || SecurityContext.NONE;
|
|
18421
|
+
}
|
|
18422
|
+
return securityContext;
|
|
18423
|
+
}
|
|
18298
18424
|
|
|
18299
|
-
// bazel-out/
|
|
18425
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/save_restore_view.mjs
|
|
18300
18426
|
function saveAndRestoreView(job) {
|
|
18301
18427
|
for (const unit of job.units) {
|
|
18302
18428
|
unit.create.prepend([
|
|
@@ -18341,7 +18467,7 @@ function addSaveRestoreViewOperationToListener(unit, op) {
|
|
|
18341
18467
|
}
|
|
18342
18468
|
}
|
|
18343
18469
|
|
|
18344
|
-
// bazel-out/
|
|
18470
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/slot_allocation.mjs
|
|
18345
18471
|
function allocateSlots(job) {
|
|
18346
18472
|
const slotMap = /* @__PURE__ */ new Map();
|
|
18347
18473
|
for (const unit of job.units) {
|
|
@@ -18366,7 +18492,7 @@ function allocateSlots(job) {
|
|
|
18366
18492
|
}
|
|
18367
18493
|
}
|
|
18368
18494
|
|
|
18369
|
-
// bazel-out/
|
|
18495
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/style_binding_specialization.mjs
|
|
18370
18496
|
function specializeStyleBindings(job) {
|
|
18371
18497
|
for (const unit of job.units) {
|
|
18372
18498
|
for (const op of unit.update) {
|
|
@@ -18396,7 +18522,7 @@ function specializeStyleBindings(job) {
|
|
|
18396
18522
|
}
|
|
18397
18523
|
}
|
|
18398
18524
|
|
|
18399
|
-
// bazel-out/
|
|
18525
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/temporary_variables.mjs
|
|
18400
18526
|
function generateTemporaryVariables(job) {
|
|
18401
18527
|
for (const unit of job.units) {
|
|
18402
18528
|
unit.create.prepend(generateTemporaries(unit.create));
|
|
@@ -18454,7 +18580,7 @@ function assignName(names, expr) {
|
|
|
18454
18580
|
expr.name = name;
|
|
18455
18581
|
}
|
|
18456
18582
|
|
|
18457
|
-
// bazel-out/
|
|
18583
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_generation.mjs
|
|
18458
18584
|
function generateTrackFns(job) {
|
|
18459
18585
|
for (const unit of job.units) {
|
|
18460
18586
|
for (const op of unit.create) {
|
|
@@ -18484,7 +18610,7 @@ function generateTrackFns(job) {
|
|
|
18484
18610
|
}
|
|
18485
18611
|
}
|
|
18486
18612
|
|
|
18487
|
-
// bazel-out/
|
|
18613
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_optimization.mjs
|
|
18488
18614
|
function optimizeTrackFns(job) {
|
|
18489
18615
|
for (const unit of job.units) {
|
|
18490
18616
|
for (const op of unit.create) {
|
|
@@ -18531,7 +18657,7 @@ function isTrackByFunctionCall(rootView, expr) {
|
|
|
18531
18657
|
return true;
|
|
18532
18658
|
}
|
|
18533
18659
|
|
|
18534
|
-
// bazel-out/
|
|
18660
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_variables.mjs
|
|
18535
18661
|
function generateTrackVariables(job) {
|
|
18536
18662
|
for (const unit of job.units) {
|
|
18537
18663
|
for (const op of unit.create) {
|
|
@@ -18552,7 +18678,7 @@ function generateTrackVariables(job) {
|
|
|
18552
18678
|
}
|
|
18553
18679
|
}
|
|
18554
18680
|
|
|
18555
|
-
// bazel-out/
|
|
18681
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/var_counting.mjs
|
|
18556
18682
|
function countVariables(job) {
|
|
18557
18683
|
for (const unit of job.units) {
|
|
18558
18684
|
let varCount = 0;
|
|
@@ -18657,7 +18783,7 @@ function isSingletonInterpolation(expr) {
|
|
|
18657
18783
|
return true;
|
|
18658
18784
|
}
|
|
18659
18785
|
|
|
18660
|
-
// bazel-out/
|
|
18786
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/variable_optimization.mjs
|
|
18661
18787
|
function optimizeVariables(job) {
|
|
18662
18788
|
for (const unit of job.units) {
|
|
18663
18789
|
inlineAlwaysInlineVariables(unit.create);
|
|
@@ -18907,7 +19033,7 @@ function allowConservativeInlining(decl, target) {
|
|
|
18907
19033
|
}
|
|
18908
19034
|
}
|
|
18909
19035
|
|
|
18910
|
-
// bazel-out/
|
|
19036
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/wrap_icus.mjs
|
|
18911
19037
|
function wrapI18nIcus(job) {
|
|
18912
19038
|
for (const unit of job.units) {
|
|
18913
19039
|
let currentI18nOp = null;
|
|
@@ -18937,17 +19063,17 @@ function wrapI18nIcus(job) {
|
|
|
18937
19063
|
}
|
|
18938
19064
|
}
|
|
18939
19065
|
|
|
18940
|
-
// bazel-out/
|
|
19066
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
|
|
18941
19067
|
var phases = [
|
|
18942
19068
|
{ kind: CompilationJobKind.Tmpl, fn: removeContentSelectors },
|
|
18943
19069
|
{ kind: CompilationJobKind.Host, fn: parseHostStyleProperties },
|
|
18944
19070
|
{ kind: CompilationJobKind.Tmpl, fn: emitNamespaceChanges },
|
|
18945
19071
|
{ kind: CompilationJobKind.Tmpl, fn: propagateI18nBlocks },
|
|
18946
19072
|
{ kind: CompilationJobKind.Tmpl, fn: wrapI18nIcus },
|
|
18947
|
-
{ kind: CompilationJobKind.Tmpl, fn: createI18nContexts },
|
|
18948
19073
|
{ kind: CompilationJobKind.Both, fn: specializeStyleBindings },
|
|
18949
19074
|
{ kind: CompilationJobKind.Both, fn: specializeBindings },
|
|
18950
19075
|
{ kind: CompilationJobKind.Both, fn: extractAttributes },
|
|
19076
|
+
{ kind: CompilationJobKind.Tmpl, fn: createI18nContexts },
|
|
18951
19077
|
{ kind: CompilationJobKind.Both, fn: parseExtractedStyles },
|
|
18952
19078
|
{ kind: CompilationJobKind.Tmpl, fn: removeEmptyBindings },
|
|
18953
19079
|
{ kind: CompilationJobKind.Both, fn: collapseSingletonInterpolations },
|
|
@@ -18965,7 +19091,7 @@ var phases = [
|
|
|
18965
19091
|
{ kind: CompilationJobKind.Tmpl, fn: generateProjectionDefs },
|
|
18966
19092
|
{ kind: CompilationJobKind.Tmpl, fn: generateVariables },
|
|
18967
19093
|
{ kind: CompilationJobKind.Tmpl, fn: saveAndRestoreView },
|
|
18968
|
-
{ kind: CompilationJobKind.
|
|
19094
|
+
{ kind: CompilationJobKind.Both, fn: deleteAnyCasts },
|
|
18969
19095
|
{ kind: CompilationJobKind.Both, fn: resolveDollarEvent },
|
|
18970
19096
|
{ kind: CompilationJobKind.Tmpl, fn: generateRepeaterDerivedVars },
|
|
18971
19097
|
{ kind: CompilationJobKind.Tmpl, fn: generateTrackVariables },
|
|
@@ -18973,7 +19099,7 @@ var phases = [
|
|
|
18973
19099
|
{ kind: CompilationJobKind.Tmpl, fn: resolveDeferTargetNames },
|
|
18974
19100
|
{ kind: CompilationJobKind.Tmpl, fn: optimizeTrackFns },
|
|
18975
19101
|
{ kind: CompilationJobKind.Both, fn: resolveContexts },
|
|
18976
|
-
{ kind: CompilationJobKind.
|
|
19102
|
+
{ kind: CompilationJobKind.Both, fn: resolveSanitizers },
|
|
18977
19103
|
{ kind: CompilationJobKind.Tmpl, fn: liftLocalRefs },
|
|
18978
19104
|
{ kind: CompilationJobKind.Both, fn: generateNullishCoalesceExpressions },
|
|
18979
19105
|
{ kind: CompilationJobKind.Both, fn: expandSafeReads },
|
|
@@ -19103,8 +19229,10 @@ function emitHostBindingFunction(job) {
|
|
|
19103
19229
|
);
|
|
19104
19230
|
}
|
|
19105
19231
|
|
|
19106
|
-
// bazel-out/
|
|
19232
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/ingest.mjs
|
|
19107
19233
|
var compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;
|
|
19234
|
+
var domSchema = new DomElementSchemaRegistry();
|
|
19235
|
+
var NG_TEMPLATE_TAG_NAME = "ng-template";
|
|
19108
19236
|
function ingestComponent(componentName, template2, constantPool, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta) {
|
|
19109
19237
|
const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta);
|
|
19110
19238
|
ingestNodes(job.root, template2);
|
|
@@ -19114,17 +19242,27 @@ function ingestHostBinding(input, bindingParser, constantPool) {
|
|
|
19114
19242
|
var _a2, _b2, _c2;
|
|
19115
19243
|
const job = new HostBindingCompilationJob(input.componentName, constantPool, compatibilityMode);
|
|
19116
19244
|
for (const property2 of (_a2 = input.properties) != null ? _a2 : []) {
|
|
19117
|
-
|
|
19245
|
+
let bindingKind = BindingKind.Property;
|
|
19246
|
+
if (property2.name.startsWith("attr.")) {
|
|
19247
|
+
property2.name = property2.name.substring("attr.".length);
|
|
19248
|
+
bindingKind = BindingKind.Attribute;
|
|
19249
|
+
}
|
|
19250
|
+
if (property2.isAnimation) {
|
|
19251
|
+
bindingKind = BindingKind.Animation;
|
|
19252
|
+
}
|
|
19253
|
+
const securityContexts = bindingParser.calcPossibleSecurityContexts(input.componentSelector, property2.name, bindingKind === BindingKind.Attribute).filter((context) => context !== SecurityContext.NONE);
|
|
19254
|
+
ingestHostProperty(job, property2, bindingKind, false, securityContexts);
|
|
19118
19255
|
}
|
|
19119
19256
|
for (const [name, expr] of (_b2 = Object.entries(input.attributes)) != null ? _b2 : []) {
|
|
19120
|
-
|
|
19257
|
+
const securityContexts = bindingParser.calcPossibleSecurityContexts(input.componentSelector, name, true).filter((context) => context !== SecurityContext.NONE);
|
|
19258
|
+
ingestHostAttribute(job, name, expr, securityContexts);
|
|
19121
19259
|
}
|
|
19122
19260
|
for (const event of (_c2 = input.events) != null ? _c2 : []) {
|
|
19123
19261
|
ingestHostEvent(job, event);
|
|
19124
19262
|
}
|
|
19125
19263
|
return job;
|
|
19126
19264
|
}
|
|
19127
|
-
function ingestHostProperty(job, property2, isTextAttribute) {
|
|
19265
|
+
function ingestHostProperty(job, property2, bindingKind, isTextAttribute, securityContexts) {
|
|
19128
19266
|
let expression;
|
|
19129
19267
|
const ast = property2.expression.ast;
|
|
19130
19268
|
if (ast instanceof Interpolation) {
|
|
@@ -19132,33 +19270,27 @@ function ingestHostProperty(job, property2, isTextAttribute) {
|
|
|
19132
19270
|
} else {
|
|
19133
19271
|
expression = convertAst(ast, job, property2.sourceSpan);
|
|
19134
19272
|
}
|
|
19135
|
-
|
|
19136
|
-
if (property2.name.startsWith("attr.")) {
|
|
19137
|
-
property2.name = property2.name.substring("attr.".length);
|
|
19138
|
-
bindingKind = BindingKind.Attribute;
|
|
19139
|
-
}
|
|
19140
|
-
if (property2.isAnimation) {
|
|
19141
|
-
bindingKind = BindingKind.Animation;
|
|
19142
|
-
}
|
|
19143
|
-
job.root.update.push(createBindingOp(job.root.xref, bindingKind, property2.name, expression, null, SecurityContext.NONE, isTextAttribute, false, null, property2.sourceSpan));
|
|
19273
|
+
job.root.update.push(createBindingOp(job.root.xref, bindingKind, property2.name, expression, null, securityContexts, isTextAttribute, false, null, null, property2.sourceSpan));
|
|
19144
19274
|
}
|
|
19145
|
-
function ingestHostAttribute(job, name, value) {
|
|
19275
|
+
function ingestHostAttribute(job, name, value, securityContexts) {
|
|
19146
19276
|
const attrBinding = createBindingOp(
|
|
19147
19277
|
job.root.xref,
|
|
19148
19278
|
BindingKind.Attribute,
|
|
19149
19279
|
name,
|
|
19150
19280
|
value,
|
|
19151
19281
|
null,
|
|
19152
|
-
|
|
19282
|
+
securityContexts,
|
|
19153
19283
|
true,
|
|
19154
19284
|
false,
|
|
19155
19285
|
null,
|
|
19286
|
+
null,
|
|
19156
19287
|
null
|
|
19157
19288
|
);
|
|
19158
19289
|
job.root.update.push(attrBinding);
|
|
19159
19290
|
}
|
|
19160
19291
|
function ingestHostEvent(job, event) {
|
|
19161
|
-
const
|
|
19292
|
+
const [phase, target] = event.type === 0 ? [null, event.targetOrPhase] : [event.targetOrPhase, null];
|
|
19293
|
+
const eventBinding = createListenerOp(job.root.xref, new SlotHandle(), event.name, null, [], phase, target, true, event.sourceSpan);
|
|
19162
19294
|
eventBinding.handlerOps.push(createStatementOp(new ReturnStatement(convertAst(event.handler.ast, job, event.sourceSpan), event.handlerSpan)));
|
|
19163
19295
|
job.root.create.push(eventBinding);
|
|
19164
19296
|
}
|
|
@@ -19198,14 +19330,17 @@ function ingestElement(unit, element2) {
|
|
|
19198
19330
|
const [namespaceKey, elementName] = splitNsName(element2.name);
|
|
19199
19331
|
const startOp = createElementStartOp(elementName, id, namespaceForKey(namespaceKey), element2.i18n instanceof TagPlaceholder ? element2.i18n : void 0, element2.startSourceSpan);
|
|
19200
19332
|
unit.create.push(startOp);
|
|
19201
|
-
|
|
19333
|
+
ingestElementBindings(unit, startOp, element2);
|
|
19202
19334
|
ingestReferences(startOp, element2);
|
|
19335
|
+
let i18nBlockId = null;
|
|
19336
|
+
if (element2.i18n instanceof Message) {
|
|
19337
|
+
i18nBlockId = unit.job.allocateXrefId();
|
|
19338
|
+
unit.create.push(createI18nStartOp(i18nBlockId, element2.i18n));
|
|
19339
|
+
}
|
|
19203
19340
|
ingestNodes(unit, element2.children);
|
|
19204
19341
|
const endOp = createElementEndOp(id, (_a2 = element2.endSourceSpan) != null ? _a2 : element2.startSourceSpan);
|
|
19205
19342
|
unit.create.push(endOp);
|
|
19206
|
-
if (
|
|
19207
|
-
const i18nBlockId = unit.job.allocateXrefId();
|
|
19208
|
-
OpList.insertAfter(createI18nStartOp(i18nBlockId, element2.i18n), startOp);
|
|
19343
|
+
if (i18nBlockId !== null) {
|
|
19209
19344
|
OpList.insertBefore(createI18nEndOp(i18nBlockId), endOp);
|
|
19210
19345
|
}
|
|
19211
19346
|
}
|
|
@@ -19225,7 +19360,7 @@ function ingestTemplate(unit, tmpl) {
|
|
|
19225
19360
|
const templateKind = isPlainTemplate(tmpl) ? TemplateKind.NgTemplate : TemplateKind.Structural;
|
|
19226
19361
|
const templateOp = createTemplateOp(childView.xref, templateKind, tagNameWithoutNamespace, functionNameSuffix, namespace, i18nPlaceholder, tmpl.startSourceSpan);
|
|
19227
19362
|
unit.create.push(templateOp);
|
|
19228
|
-
|
|
19363
|
+
ingestTemplateBindings(unit, templateOp, tmpl, templateKind);
|
|
19229
19364
|
ingestReferences(templateOp, tmpl);
|
|
19230
19365
|
ingestNodes(childView, tmpl.children);
|
|
19231
19366
|
for (const { name, value } of tmpl.variables) {
|
|
@@ -19244,7 +19379,8 @@ function ingestContent(unit, content) {
|
|
|
19244
19379
|
const attrs = content.attributes.flatMap((a) => [a.name, a.value]);
|
|
19245
19380
|
const op = createProjectionOp(unit.job.allocateXrefId(), content.selector, content.i18n, attrs, content.sourceSpan);
|
|
19246
19381
|
for (const attr of content.attributes) {
|
|
19247
|
-
|
|
19382
|
+
const securityContext = domSchema.securityContext(content.name, attr.name, true);
|
|
19383
|
+
unit.update.push(createBindingOp(op.xref, BindingKind.Attribute, attr.name, literal(attr.value), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
|
|
19248
19384
|
}
|
|
19249
19385
|
unit.create.push(op);
|
|
19250
19386
|
}
|
|
@@ -19338,35 +19474,38 @@ function ingestSwitchBlock(unit, switchBlock) {
|
|
|
19338
19474
|
const conditional2 = createConditionalOp(firstXref, firstSlotHandle, convertAst(switchBlock.expression, unit.job, null), conditions, switchBlock.sourceSpan);
|
|
19339
19475
|
unit.update.push(conditional2);
|
|
19340
19476
|
}
|
|
19341
|
-
function ingestDeferView(unit, suffix, children, sourceSpan) {
|
|
19477
|
+
function ingestDeferView(unit, suffix, i18nMeta, children, sourceSpan) {
|
|
19478
|
+
if (i18nMeta !== void 0 && !(i18nMeta instanceof BlockPlaceholder)) {
|
|
19479
|
+
throw Error("Unhandled i18n metadata type for defer block");
|
|
19480
|
+
}
|
|
19342
19481
|
if (children === void 0) {
|
|
19343
19482
|
return null;
|
|
19344
19483
|
}
|
|
19345
19484
|
const secondaryView = unit.job.allocateView(unit.xref);
|
|
19346
19485
|
ingestNodes(secondaryView, children);
|
|
19347
|
-
const templateOp = createTemplateOp(secondaryView.xref, TemplateKind.Block, null, `Defer${suffix}`, Namespace.HTML,
|
|
19486
|
+
const templateOp = createTemplateOp(secondaryView.xref, TemplateKind.Block, null, `Defer${suffix}`, Namespace.HTML, i18nMeta, sourceSpan);
|
|
19348
19487
|
unit.create.push(templateOp);
|
|
19349
19488
|
return templateOp;
|
|
19350
19489
|
}
|
|
19351
19490
|
function ingestDeferBlock(unit, deferBlock) {
|
|
19352
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
19491
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
19353
19492
|
const blockMeta = unit.job.deferBlocksMeta.get(deferBlock);
|
|
19354
19493
|
if (blockMeta === void 0) {
|
|
19355
19494
|
throw new Error(`AssertionError: unable to find metadata for deferred block`);
|
|
19356
19495
|
}
|
|
19357
|
-
const main = ingestDeferView(unit, "", deferBlock.children, deferBlock.sourceSpan);
|
|
19358
|
-
const loading = ingestDeferView(unit, "Loading", (_a2 = deferBlock.loading) == null ? void 0 : _a2.
|
|
19359
|
-
const placeholder = ingestDeferView(unit, "Placeholder", (
|
|
19360
|
-
const error2 = ingestDeferView(unit, "Error", (
|
|
19496
|
+
const main = ingestDeferView(unit, "", deferBlock.i18n, deferBlock.children, deferBlock.sourceSpan);
|
|
19497
|
+
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);
|
|
19498
|
+
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);
|
|
19499
|
+
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);
|
|
19361
19500
|
const deferXref = unit.job.allocateXrefId();
|
|
19362
19501
|
const deferOp = createDeferOp(deferXref, main.xref, main.handle, blockMeta, deferBlock.sourceSpan);
|
|
19363
|
-
deferOp.placeholderView = (
|
|
19364
|
-
deferOp.placeholderSlot = (
|
|
19365
|
-
deferOp.loadingSlot = (
|
|
19366
|
-
deferOp.errorSlot = (
|
|
19367
|
-
deferOp.placeholderMinimumTime = (
|
|
19368
|
-
deferOp.loadingMinimumTime = (
|
|
19369
|
-
deferOp.loadingAfterTime = (
|
|
19502
|
+
deferOp.placeholderView = (_j = placeholder == null ? void 0 : placeholder.xref) != null ? _j : null;
|
|
19503
|
+
deferOp.placeholderSlot = (_k = placeholder == null ? void 0 : placeholder.handle) != null ? _k : null;
|
|
19504
|
+
deferOp.loadingSlot = (_l = loading == null ? void 0 : loading.handle) != null ? _l : null;
|
|
19505
|
+
deferOp.errorSlot = (_m = error2 == null ? void 0 : error2.handle) != null ? _m : null;
|
|
19506
|
+
deferOp.placeholderMinimumTime = (_o = (_n = deferBlock.placeholder) == null ? void 0 : _n.minimumTime) != null ? _o : null;
|
|
19507
|
+
deferOp.loadingMinimumTime = (_q = (_p = deferBlock.loading) == null ? void 0 : _p.minimumTime) != null ? _q : null;
|
|
19508
|
+
deferOp.loadingAfterTime = (_s = (_r = deferBlock.loading) == null ? void 0 : _r.afterTime) != null ? _s : null;
|
|
19370
19509
|
unit.create.push(deferOp);
|
|
19371
19510
|
let prefetch = false;
|
|
19372
19511
|
let deferOnOps = [];
|
|
@@ -19448,7 +19587,7 @@ function ingestIcu(unit, icu) {
|
|
|
19448
19587
|
}
|
|
19449
19588
|
}
|
|
19450
19589
|
function ingestForBlock(unit, forBlock) {
|
|
19451
|
-
var _a2;
|
|
19590
|
+
var _a2, _b2, _c2;
|
|
19452
19591
|
const repeaterView = unit.job.allocateView(unit.xref);
|
|
19453
19592
|
const createRepeaterAlias = (ident, repeaterVar) => {
|
|
19454
19593
|
repeaterView.aliases.add({
|
|
@@ -19482,8 +19621,16 @@ function ingestForBlock(unit, forBlock) {
|
|
|
19482
19621
|
$odd: forBlock.contextVariables.$odd.name,
|
|
19483
19622
|
$implicit: forBlock.item.name
|
|
19484
19623
|
};
|
|
19624
|
+
if (forBlock.i18n !== void 0 && !(forBlock.i18n instanceof BlockPlaceholder)) {
|
|
19625
|
+
throw Error("AssertionError: Unhandled i18n metadata type or @for");
|
|
19626
|
+
}
|
|
19627
|
+
if (((_a2 = forBlock.empty) == null ? void 0 : _a2.i18n) !== void 0 && !(forBlock.empty.i18n instanceof BlockPlaceholder)) {
|
|
19628
|
+
throw Error("AssertionError: Unhandled i18n metadata type or @empty");
|
|
19629
|
+
}
|
|
19630
|
+
const i18nPlaceholder = forBlock.i18n;
|
|
19631
|
+
const emptyI18nPlaceholder = (_b2 = forBlock.empty) == null ? void 0 : _b2.i18n;
|
|
19485
19632
|
const tagName = ingestControlFlowInsertionPoint(unit, repeaterView.xref, forBlock);
|
|
19486
|
-
const repeaterCreate2 = createRepeaterCreateOp(repeaterView.xref, (
|
|
19633
|
+
const repeaterCreate2 = createRepeaterCreateOp(repeaterView.xref, (_c2 = emptyView == null ? void 0 : emptyView.xref) != null ? _c2 : null, tagName, track, varNames, i18nPlaceholder, emptyI18nPlaceholder, forBlock.sourceSpan);
|
|
19487
19634
|
unit.create.push(repeaterCreate2);
|
|
19488
19635
|
const expression = convertAst(forBlock.expression, unit.job, convertSourceSpan(forBlock.expression.span, forBlock.sourceSpan));
|
|
19489
19636
|
const repeater2 = createRepeaterOp(repeaterCreate2.xref, repeaterCreate2.handle, expression, forBlock.sourceSpan);
|
|
@@ -19571,120 +19718,128 @@ function convertAst(ast, job, baseSourceSpan) {
|
|
|
19571
19718
|
throw new Error(`Unhandled expression type "${ast.constructor.name}" in file "${baseSourceSpan == null ? void 0 : baseSourceSpan.start.file.url}"`);
|
|
19572
19719
|
}
|
|
19573
19720
|
}
|
|
19721
|
+
function convertAstWithInterpolation(job, value, i18nMeta) {
|
|
19722
|
+
var _a2, _b2;
|
|
19723
|
+
let expression;
|
|
19724
|
+
if (value instanceof Interpolation) {
|
|
19725
|
+
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 : {}));
|
|
19726
|
+
} else if (value instanceof AST) {
|
|
19727
|
+
expression = convertAst(value, job, null);
|
|
19728
|
+
} else {
|
|
19729
|
+
expression = literal(value);
|
|
19730
|
+
}
|
|
19731
|
+
return expression;
|
|
19732
|
+
}
|
|
19733
|
+
var BINDING_KINDS = /* @__PURE__ */ new Map([
|
|
19734
|
+
[0, BindingKind.Property],
|
|
19735
|
+
[1, BindingKind.Attribute],
|
|
19736
|
+
[2, BindingKind.ClassName],
|
|
19737
|
+
[3, BindingKind.StyleProperty],
|
|
19738
|
+
[4, BindingKind.Animation]
|
|
19739
|
+
]);
|
|
19574
19740
|
function isPlainTemplate(tmpl) {
|
|
19575
19741
|
var _a2;
|
|
19576
|
-
return splitNsName((_a2 = tmpl.tagName) != null ? _a2 : "")[1] ===
|
|
19577
|
-
}
|
|
19578
|
-
function
|
|
19579
|
-
|
|
19580
|
-
|
|
19581
|
-
if (element2 instanceof Template) {
|
|
19582
|
-
flags |= BindingFlags.OnNgTemplateElement;
|
|
19583
|
-
if (element2 instanceof Template && isPlainTemplate(element2)) {
|
|
19584
|
-
flags |= BindingFlags.BindingTargetsTemplate;
|
|
19585
|
-
}
|
|
19586
|
-
const templateAttrFlags = flags | BindingFlags.BindingTargetsTemplate | BindingFlags.IsStructuralTemplateAttribute;
|
|
19587
|
-
for (const attr of element2.templateAttrs) {
|
|
19588
|
-
if (attr instanceof TextAttribute) {
|
|
19589
|
-
ingestBinding(unit, op.xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, templateAttrFlags | BindingFlags.TextValue, attr.i18n);
|
|
19590
|
-
hasI18nAttributes || (hasI18nAttributes = attr.i18n !== void 0);
|
|
19591
|
-
} else {
|
|
19592
|
-
ingestBinding(unit, op.xref, attr.name, attr.value, attr.type, attr.unit, attr.securityContext, attr.sourceSpan, templateAttrFlags, attr.i18n);
|
|
19593
|
-
hasI18nAttributes || (hasI18nAttributes = attr.i18n !== void 0);
|
|
19594
|
-
}
|
|
19595
|
-
}
|
|
19742
|
+
return splitNsName((_a2 = tmpl.tagName) != null ? _a2 : "")[1] === NG_TEMPLATE_TAG_NAME;
|
|
19743
|
+
}
|
|
19744
|
+
function asMessage(i18nMeta) {
|
|
19745
|
+
if (i18nMeta == null) {
|
|
19746
|
+
return null;
|
|
19596
19747
|
}
|
|
19748
|
+
if (!(i18nMeta instanceof Message)) {
|
|
19749
|
+
throw Error(`Expected i18n meta to be a Message, but got: ${i18nMeta.constructor.name}`);
|
|
19750
|
+
}
|
|
19751
|
+
return i18nMeta;
|
|
19752
|
+
}
|
|
19753
|
+
function ingestElementBindings(unit, op, element2) {
|
|
19754
|
+
var _a2;
|
|
19755
|
+
let bindings = new Array();
|
|
19597
19756
|
for (const attr of element2.attributes) {
|
|
19598
|
-
|
|
19599
|
-
|
|
19757
|
+
const securityContext = domSchema.securityContext(element2.name, attr.name, true);
|
|
19758
|
+
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));
|
|
19600
19759
|
}
|
|
19601
19760
|
for (const input of element2.inputs) {
|
|
19602
|
-
|
|
19603
|
-
hasI18nAttributes || (hasI18nAttributes = input.i18n !== void 0);
|
|
19761
|
+
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));
|
|
19604
19762
|
}
|
|
19763
|
+
unit.create.push(bindings.filter((b) => (b == null ? void 0 : b.kind) === OpKind.ExtractedAttribute));
|
|
19764
|
+
unit.update.push(bindings.filter((b) => (b == null ? void 0 : b.kind) === OpKind.Binding));
|
|
19605
19765
|
for (const output of element2.outputs) {
|
|
19606
|
-
|
|
19607
|
-
|
|
19608
|
-
if (output.phase === null) {
|
|
19609
|
-
throw Error("Animation listener should have a phase");
|
|
19610
|
-
}
|
|
19766
|
+
if (output.type === 1 && output.phase === null) {
|
|
19767
|
+
throw Error("Animation listener should have a phase");
|
|
19611
19768
|
}
|
|
19612
|
-
|
|
19613
|
-
|
|
19614
|
-
|
|
19615
|
-
|
|
19616
|
-
|
|
19617
|
-
|
|
19618
|
-
|
|
19619
|
-
|
|
19620
|
-
|
|
19621
|
-
|
|
19622
|
-
|
|
19623
|
-
|
|
19769
|
+
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));
|
|
19770
|
+
}
|
|
19771
|
+
if (bindings.some((b) => b == null ? void 0 : b.i18nMessage) !== null) {
|
|
19772
|
+
unit.create.push(createI18nAttributesOp(unit.job.allocateXrefId(), new SlotHandle(), op.xref));
|
|
19773
|
+
}
|
|
19774
|
+
}
|
|
19775
|
+
function ingestTemplateBindings(unit, op, template2, templateKind) {
|
|
19776
|
+
let bindings = new Array();
|
|
19777
|
+
for (const attr of template2.templateAttrs) {
|
|
19778
|
+
if (attr instanceof TextAttribute) {
|
|
19779
|
+
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);
|
|
19780
|
+
bindings.push(createTemplateBinding(unit, op.xref, 1, attr.name, attr.value, null, securityContext, true, templateKind, asMessage(attr.i18n), attr.sourceSpan));
|
|
19624
19781
|
} else {
|
|
19625
|
-
|
|
19782
|
+
bindings.push(createTemplateBinding(unit, op.xref, attr.type, attr.name, astOf(attr.value), attr.unit, attr.securityContext, true, templateKind, asMessage(attr.i18n), attr.sourceSpan));
|
|
19626
19783
|
}
|
|
19627
|
-
|
|
19628
|
-
|
|
19784
|
+
}
|
|
19785
|
+
for (const attr of template2.attributes) {
|
|
19786
|
+
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);
|
|
19787
|
+
bindings.push(createTemplateBinding(unit, op.xref, 1, attr.name, attr.value, null, securityContext, false, templateKind, asMessage(attr.i18n), attr.sourceSpan));
|
|
19788
|
+
}
|
|
19789
|
+
for (const input of template2.inputs) {
|
|
19790
|
+
bindings.push(createTemplateBinding(unit, op.xref, input.type, input.name, astOf(input.value), input.unit, input.securityContext, false, templateKind, asMessage(input.i18n), input.sourceSpan));
|
|
19791
|
+
}
|
|
19792
|
+
unit.create.push(bindings.filter((b) => (b == null ? void 0 : b.kind) === OpKind.ExtractedAttribute));
|
|
19793
|
+
unit.update.push(bindings.filter((b) => (b == null ? void 0 : b.kind) === OpKind.Binding));
|
|
19794
|
+
for (const output of template2.outputs) {
|
|
19795
|
+
if (output.type === 1 && output.phase === null) {
|
|
19796
|
+
throw Error("Animation listener should have a phase");
|
|
19797
|
+
}
|
|
19798
|
+
if (templateKind === TemplateKind.NgTemplate) {
|
|
19799
|
+
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));
|
|
19629
19800
|
}
|
|
19630
|
-
|
|
19631
|
-
|
|
19632
|
-
|
|
19633
|
-
const stmtOp = createStatementOp(new ExpressionStatement(expr, expr.sourceSpan));
|
|
19634
|
-
listenerOp.handlerOps.push(stmtOp);
|
|
19801
|
+
if (templateKind === TemplateKind.Structural && output.type !== 1) {
|
|
19802
|
+
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, output.name, false);
|
|
19803
|
+
unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, output.name, null, null, null, securityContext));
|
|
19635
19804
|
}
|
|
19636
|
-
listenerOp.handlerOps.push(createStatementOp(new ReturnStatement(returnExpr, returnExpr.sourceSpan)));
|
|
19637
|
-
unit.create.push(listenerOp);
|
|
19638
19805
|
}
|
|
19639
|
-
if (
|
|
19806
|
+
if (bindings.some((b) => b == null ? void 0 : b.i18nMessage) !== null) {
|
|
19640
19807
|
unit.create.push(createI18nAttributesOp(unit.job.allocateXrefId(), new SlotHandle(), op.xref));
|
|
19641
19808
|
}
|
|
19642
19809
|
}
|
|
19643
|
-
|
|
19644
|
-
|
|
19645
|
-
|
|
19646
|
-
|
|
19647
|
-
|
|
19648
|
-
|
|
19649
|
-
|
|
19650
|
-
|
|
19651
|
-
(function(BindingFlags2) {
|
|
19652
|
-
BindingFlags2[BindingFlags2["None"] = 0] = "None";
|
|
19653
|
-
BindingFlags2[BindingFlags2["TextValue"] = 1] = "TextValue";
|
|
19654
|
-
BindingFlags2[BindingFlags2["BindingTargetsTemplate"] = 2] = "BindingTargetsTemplate";
|
|
19655
|
-
BindingFlags2[BindingFlags2["IsStructuralTemplateAttribute"] = 4] = "IsStructuralTemplateAttribute";
|
|
19656
|
-
BindingFlags2[BindingFlags2["OnNgTemplateElement"] = 8] = "OnNgTemplateElement";
|
|
19657
|
-
})(BindingFlags || (BindingFlags = {}));
|
|
19658
|
-
function ingestBinding(view, xref, name, value, type, unit, securityContext, sourceSpan, flags, i18nMeta) {
|
|
19659
|
-
if (value instanceof ASTWithSource) {
|
|
19660
|
-
value = value.ast;
|
|
19661
|
-
}
|
|
19662
|
-
let i18nContext = null;
|
|
19663
|
-
if (i18nMeta !== void 0) {
|
|
19664
|
-
if (!(i18nMeta instanceof Message)) {
|
|
19665
|
-
throw Error(`Unhandled i18n metadata type for binding: ${i18nMeta.constructor.name}`);
|
|
19810
|
+
function createTemplateBinding(view, xref, type, name, value, unit, securityContext, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
|
|
19811
|
+
const isTextBinding = typeof value === "string";
|
|
19812
|
+
if (templateKind === TemplateKind.Structural) {
|
|
19813
|
+
if (!isStructuralTemplateAttribute && (type === 0 || type === 2 || type === 3)) {
|
|
19814
|
+
return createExtractedAttributeOp(xref, BindingKind.Property, name, null, null, i18nMessage, securityContext);
|
|
19815
|
+
}
|
|
19816
|
+
if (!isTextBinding && (type === 1 || type === 4)) {
|
|
19817
|
+
return null;
|
|
19666
19818
|
}
|
|
19667
|
-
i18nContext = view.job.allocateXrefId();
|
|
19668
|
-
view.create.push(createI18nContextOp(I18nContextKind.Attr, i18nContext, null, i18nMeta, null));
|
|
19669
|
-
}
|
|
19670
|
-
if (flags & BindingFlags.OnNgTemplateElement && !(flags & BindingFlags.BindingTargetsTemplate) && type === 0) {
|
|
19671
|
-
view.create.push(createExtractedAttributeOp(xref, BindingKind.Property, name, null, i18nContext));
|
|
19672
|
-
return;
|
|
19673
19819
|
}
|
|
19674
|
-
let
|
|
19675
|
-
if (
|
|
19676
|
-
|
|
19677
|
-
|
|
19678
|
-
i18nPlaceholders = Object.keys(i18nMeta.placeholders);
|
|
19820
|
+
let bindingType = BINDING_KINDS.get(type);
|
|
19821
|
+
if (templateKind === TemplateKind.NgTemplate) {
|
|
19822
|
+
if (type === 2 || type === 3 || type === 1 && !isTextBinding) {
|
|
19823
|
+
bindingType = BindingKind.Property;
|
|
19679
19824
|
}
|
|
19680
|
-
expression = new Interpolation2(value.strings, value.expressions.map((expr) => convertAst(expr, view.job, null)), i18nPlaceholders);
|
|
19681
|
-
} else if (value instanceof AST) {
|
|
19682
|
-
expression = convertAst(value, view.job, null);
|
|
19683
|
-
} else {
|
|
19684
|
-
expression = value;
|
|
19685
19825
|
}
|
|
19686
|
-
|
|
19687
|
-
|
|
19826
|
+
return createBindingOp(xref, bindingType, name, convertAstWithInterpolation(view.job, value, i18nMessage), unit, securityContext, isTextBinding, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan);
|
|
19827
|
+
}
|
|
19828
|
+
function makeListenerHandlerOps(unit, handler, handlerSpan) {
|
|
19829
|
+
handler = astOf(handler);
|
|
19830
|
+
const handlerOps = new Array();
|
|
19831
|
+
let handlerExprs = handler instanceof Chain ? handler.expressions : [handler];
|
|
19832
|
+
if (handlerExprs.length === 0) {
|
|
19833
|
+
throw new Error("Expected listener to have non-empty expression list.");
|
|
19834
|
+
}
|
|
19835
|
+
const expressions = handlerExprs.map((expr) => convertAst(expr, unit.job, handlerSpan));
|
|
19836
|
+
const returnExpr = expressions.pop();
|
|
19837
|
+
handlerOps.push(...expressions.map((e) => createStatementOp(new ExpressionStatement(e, e.sourceSpan))));
|
|
19838
|
+
handlerOps.push(createStatementOp(new ReturnStatement(returnExpr, returnExpr.sourceSpan)));
|
|
19839
|
+
return handlerOps;
|
|
19840
|
+
}
|
|
19841
|
+
function astOf(ast) {
|
|
19842
|
+
return ast instanceof ASTWithSource ? ast.ast : ast;
|
|
19688
19843
|
}
|
|
19689
19844
|
function ingestReferences(op, element2) {
|
|
19690
19845
|
assertIsArray(op.localRefs);
|
|
@@ -19724,18 +19879,19 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
19724
19879
|
}
|
|
19725
19880
|
if (root !== null) {
|
|
19726
19881
|
for (const attr of root.attributes) {
|
|
19727
|
-
|
|
19882
|
+
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);
|
|
19883
|
+
unit.update.push(createBindingOp(xref, BindingKind.Attribute, attr.name, literal(attr.value), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
|
|
19728
19884
|
}
|
|
19729
19885
|
const tagName = root instanceof Element ? root.name : root.tagName;
|
|
19730
|
-
return tagName ===
|
|
19886
|
+
return tagName === NG_TEMPLATE_TAG_NAME ? null : tagName;
|
|
19731
19887
|
}
|
|
19732
19888
|
return null;
|
|
19733
19889
|
}
|
|
19734
19890
|
|
|
19735
|
-
// bazel-out/
|
|
19891
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/switch/index.mjs
|
|
19736
19892
|
var USE_TEMPLATE_PIPELINE = false;
|
|
19737
19893
|
|
|
19738
|
-
// bazel-out/
|
|
19894
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/styling_builder.mjs
|
|
19739
19895
|
var IMPORTANT_FLAG = "!important";
|
|
19740
19896
|
var MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;
|
|
19741
19897
|
var StylingBuilder = class {
|
|
@@ -20068,7 +20224,7 @@ function isEmptyExpression(ast) {
|
|
|
20068
20224
|
return ast instanceof EmptyExpr;
|
|
20069
20225
|
}
|
|
20070
20226
|
|
|
20071
|
-
// bazel-out/
|
|
20227
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
|
|
20072
20228
|
var HtmlParser = class extends Parser2 {
|
|
20073
20229
|
constructor() {
|
|
20074
20230
|
super(getHtmlTagDefinition);
|
|
@@ -20078,7 +20234,7 @@ var HtmlParser = class extends Parser2 {
|
|
|
20078
20234
|
}
|
|
20079
20235
|
};
|
|
20080
20236
|
|
|
20081
|
-
// bazel-out/
|
|
20237
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
|
|
20082
20238
|
var PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
|
|
20083
20239
|
var SKIP_WS_TRIM_TAGS = /* @__PURE__ */ new Set(["pre", "template", "textarea", "script", "style"]);
|
|
20084
20240
|
var WS_CHARS = " \f\n\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
|
|
@@ -20144,7 +20300,7 @@ function visitAllWithSiblings(visitor, nodes) {
|
|
|
20144
20300
|
return result;
|
|
20145
20301
|
}
|
|
20146
20302
|
|
|
20147
|
-
// bazel-out/
|
|
20303
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
|
|
20148
20304
|
var PROPERTY_PARTS_SEPARATOR = ".";
|
|
20149
20305
|
var ATTRIBUTE_PREFIX = "attr";
|
|
20150
20306
|
var CLASS_PREFIX = "class";
|
|
@@ -20464,7 +20620,7 @@ function moveParseSourceSpan(sourceSpan, absoluteSpan) {
|
|
|
20464
20620
|
return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);
|
|
20465
20621
|
}
|
|
20466
20622
|
|
|
20467
|
-
// bazel-out/
|
|
20623
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/style_url_resolver.mjs
|
|
20468
20624
|
function isStyleUrlResolvable(url) {
|
|
20469
20625
|
if (url == null || url.length === 0 || url[0] == "/")
|
|
20470
20626
|
return false;
|
|
@@ -20473,7 +20629,7 @@ function isStyleUrlResolvable(url) {
|
|
|
20473
20629
|
}
|
|
20474
20630
|
var URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;
|
|
20475
20631
|
|
|
20476
|
-
// bazel-out/
|
|
20632
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/template_preparser.mjs
|
|
20477
20633
|
var NG_CONTENT_SELECT_ATTR = "select";
|
|
20478
20634
|
var LINK_ELEMENT = "link";
|
|
20479
20635
|
var LINK_STYLE_REL_ATTR = "rel";
|
|
@@ -20543,7 +20699,7 @@ function normalizeNgContentSelect(selectAttr) {
|
|
|
20543
20699
|
return selectAttr;
|
|
20544
20700
|
}
|
|
20545
20701
|
|
|
20546
|
-
// bazel-out/
|
|
20702
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_control_flow.mjs
|
|
20547
20703
|
var FOR_LOOP_EXPRESSION_PATTERN = /^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/;
|
|
20548
20704
|
var FOR_LOOP_TRACK_PATTERN = /^track\s+([\S\s]*)/;
|
|
20549
20705
|
var CONDITIONAL_ALIAS_PATTERN = /^as\s+(.*)/;
|
|
@@ -20834,7 +20990,7 @@ function stripOptionalParentheses(param, errors) {
|
|
|
20834
20990
|
return expression.slice(start, end);
|
|
20835
20991
|
}
|
|
20836
20992
|
|
|
20837
|
-
// bazel-out/
|
|
20993
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_triggers.mjs
|
|
20838
20994
|
var TIME_PATTERN = /^\d+\.?\d*(ms|s)?$/;
|
|
20839
20995
|
var SEPARATOR_PATTERN = /^\s$/;
|
|
20840
20996
|
var COMMA_DELIMITED_SYNTAX = /* @__PURE__ */ new Map([
|
|
@@ -21098,7 +21254,7 @@ function parseDeferredTime(value) {
|
|
|
21098
21254
|
return parseFloat(time) * (units === "s" ? 1e3 : 1);
|
|
21099
21255
|
}
|
|
21100
21256
|
|
|
21101
|
-
// bazel-out/
|
|
21257
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_blocks.mjs
|
|
21102
21258
|
var PREFETCH_WHEN_PATTERN = /^prefetch\s+when\s/;
|
|
21103
21259
|
var PREFETCH_ON_PATTERN = /^prefetch\s+on\s/;
|
|
21104
21260
|
var MINIMUM_PARAMETER_PATTERN = /^minimum\s/;
|
|
@@ -21233,7 +21389,7 @@ function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
|
|
|
21233
21389
|
return { triggers, prefetchTriggers };
|
|
21234
21390
|
}
|
|
21235
21391
|
|
|
21236
|
-
// bazel-out/
|
|
21392
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_template_transform.mjs
|
|
21237
21393
|
var BIND_NAME_REGEXP = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/;
|
|
21238
21394
|
var KW_BIND_IDX = 1;
|
|
21239
21395
|
var KW_LET_IDX = 2;
|
|
@@ -21664,7 +21820,7 @@ function textContents(node) {
|
|
|
21664
21820
|
}
|
|
21665
21821
|
}
|
|
21666
21822
|
|
|
21667
|
-
// bazel-out/
|
|
21823
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/context.mjs
|
|
21668
21824
|
var TagType;
|
|
21669
21825
|
(function(TagType2) {
|
|
21670
21826
|
TagType2[TagType2["ELEMENT"] = 0] = "ELEMENT";
|
|
@@ -21809,21 +21965,21 @@ function serializePlaceholderValue(value) {
|
|
|
21809
21965
|
}
|
|
21810
21966
|
}
|
|
21811
21967
|
|
|
21812
|
-
// bazel-out/
|
|
21968
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
|
|
21813
21969
|
var NG_CONTENT_SELECT_ATTR2 = "select";
|
|
21814
21970
|
var NG_PROJECT_AS_ATTR_NAME = "ngProjectAs";
|
|
21815
21971
|
var EVENT_BINDING_SCOPE_GLOBALS = /* @__PURE__ */ new Set(["$event"]);
|
|
21816
|
-
var
|
|
21817
|
-
var
|
|
21972
|
+
var NG_TEMPLATE_TAG_NAME2 = "ng-template";
|
|
21973
|
+
var GLOBAL_TARGET_RESOLVERS2 = /* @__PURE__ */ new Map([["window", Identifiers.resolveWindow], ["document", Identifiers.resolveDocument], ["body", Identifiers.resolveBody]]);
|
|
21818
21974
|
var LEADING_TRIVIA_CHARS = [" ", "\n", "\r", " "];
|
|
21819
21975
|
function renderFlagCheckIfStmt(flags, statements) {
|
|
21820
21976
|
return ifStmt(variable(RENDER_FLAGS).bitwiseAnd(literal(flags), null, false), statements);
|
|
21821
21977
|
}
|
|
21822
21978
|
function prepareEventListenerParameters(eventAst, handlerName = null, scope = null) {
|
|
21823
21979
|
const { type, name, target, phase, handler } = eventAst;
|
|
21824
|
-
if (target && !
|
|
21980
|
+
if (target && !GLOBAL_TARGET_RESOLVERS2.has(target)) {
|
|
21825
21981
|
throw new Error(`Unexpected global target '${target}' defined for '${name}' event.
|
|
21826
|
-
Supported list of global targets: ${Array.from(
|
|
21982
|
+
Supported list of global targets: ${Array.from(GLOBAL_TARGET_RESOLVERS2.keys())}.`);
|
|
21827
21983
|
}
|
|
21828
21984
|
const eventArgumentName = "$event";
|
|
21829
21985
|
const implicitReceiverAccesses = /* @__PURE__ */ new Set();
|
|
@@ -21856,7 +22012,7 @@ function prepareEventListenerParameters(eventAst, handlerName = null, scope = nu
|
|
|
21856
22012
|
if (target) {
|
|
21857
22013
|
params.push(
|
|
21858
22014
|
literal(false),
|
|
21859
|
-
importExpr(
|
|
22015
|
+
importExpr(GLOBAL_TARGET_RESOLVERS2.get(target))
|
|
21860
22016
|
);
|
|
21861
22017
|
}
|
|
21862
22018
|
return params;
|
|
@@ -22402,10 +22558,10 @@ var TemplateDefinitionBuilder = class {
|
|
|
22402
22558
|
var _a2;
|
|
22403
22559
|
const tagNameWithoutNamespace = template2.tagName ? splitNsName(template2.tagName)[1] : template2.tagName;
|
|
22404
22560
|
const contextNameSuffix = template2.tagName ? "_" + sanitizeIdentifier(template2.tagName) : "";
|
|
22405
|
-
const attrsExprs = this.getAttributeExpressions(
|
|
22561
|
+
const attrsExprs = this.getAttributeExpressions(NG_TEMPLATE_TAG_NAME2, template2.attributes, template2.inputs, template2.outputs, void 0, template2.templateAttrs);
|
|
22406
22562
|
const templateIndex = this.createEmbeddedTemplateFn(tagNameWithoutNamespace, template2.children, contextNameSuffix, template2.sourceSpan, template2.variables, attrsExprs, template2.references, template2.i18n);
|
|
22407
22563
|
this.templatePropertyBindings(templateIndex, template2.templateAttrs);
|
|
22408
|
-
if (tagNameWithoutNamespace ===
|
|
22564
|
+
if (tagNameWithoutNamespace === NG_TEMPLATE_TAG_NAME2) {
|
|
22409
22565
|
const [i18nInputs, inputs] = partitionArray(template2.inputs, hasI18nMeta);
|
|
22410
22566
|
if (i18nInputs.length > 0) {
|
|
22411
22567
|
this.i18nAttributesInstruction(templateIndex, i18nInputs, (_a2 = template2.startSourceSpan) != null ? _a2 : template2.sourceSpan);
|
|
@@ -22646,8 +22802,8 @@ var TemplateDefinitionBuilder = class {
|
|
|
22646
22802
|
}
|
|
22647
22803
|
if (root !== null) {
|
|
22648
22804
|
const name = root instanceof Element ? root.name : root.tagName;
|
|
22649
|
-
tagName = name ===
|
|
22650
|
-
attrsExprs = this.getAttributeExpressions(
|
|
22805
|
+
tagName = name === NG_TEMPLATE_TAG_NAME2 ? null : name;
|
|
22806
|
+
attrsExprs = this.getAttributeExpressions(NG_TEMPLATE_TAG_NAME2, root.attributes, root.inputs, []);
|
|
22651
22807
|
}
|
|
22652
22808
|
return { tagName, attrsExprs };
|
|
22653
22809
|
}
|
|
@@ -23486,7 +23642,7 @@ function createClosureModeGuard2() {
|
|
|
23486
23642
|
return typeofExpr(variable(NG_I18N_CLOSURE_MODE2)).notIdentical(literal("undefined", STRING_TYPE)).and(variable(NG_I18N_CLOSURE_MODE2));
|
|
23487
23643
|
}
|
|
23488
23644
|
|
|
23489
|
-
// bazel-out/
|
|
23645
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/compiler.mjs
|
|
23490
23646
|
var ATTR_REGEX = /attr\.([^\]]+)/;
|
|
23491
23647
|
var COMPONENT_VARIABLE = "%COMP%";
|
|
23492
23648
|
var HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
|
|
@@ -23756,14 +23912,14 @@ function createBaseDirectiveTypeParams(meta) {
|
|
|
23756
23912
|
function getInputsTypeExpression(meta) {
|
|
23757
23913
|
return literalMap(Object.keys(meta.inputs).map((key) => {
|
|
23758
23914
|
const value = meta.inputs[key];
|
|
23759
|
-
|
|
23760
|
-
key,
|
|
23761
|
-
value:
|
|
23762
|
-
|
|
23763
|
-
|
|
23764
|
-
|
|
23765
|
-
|
|
23766
|
-
};
|
|
23915
|
+
const values = [
|
|
23916
|
+
{ key: "alias", value: literal(value.bindingPropertyName), quoted: true },
|
|
23917
|
+
{ key: "required", value: literal(value.required), quoted: true }
|
|
23918
|
+
];
|
|
23919
|
+
if (value.isSignal) {
|
|
23920
|
+
values.push({ key: "isSignal", value: literal(value.isSignal), quoted: true });
|
|
23921
|
+
}
|
|
23922
|
+
return { key, value: literalMap(values), quoted: true };
|
|
23767
23923
|
}));
|
|
23768
23924
|
}
|
|
23769
23925
|
function createDirectiveType(meta) {
|
|
@@ -23807,6 +23963,7 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
23807
23963
|
}
|
|
23808
23964
|
const hostJob = ingestHostBinding({
|
|
23809
23965
|
componentName: name,
|
|
23966
|
+
componentSelector: selector,
|
|
23810
23967
|
properties: bindings,
|
|
23811
23968
|
events: eventBindings,
|
|
23812
23969
|
attributes: hostBindingsMetadata.attributes
|
|
@@ -24100,7 +24257,7 @@ function createHostDirectivesMappingArray(mapping) {
|
|
|
24100
24257
|
return elements.length > 0 ? literalArr(elements) : null;
|
|
24101
24258
|
}
|
|
24102
24259
|
|
|
24103
|
-
// bazel-out/
|
|
24260
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/t2_binder.mjs
|
|
24104
24261
|
var R3TargetBinder = class {
|
|
24105
24262
|
constructor(directiveMatcher) {
|
|
24106
24263
|
this.directiveMatcher = directiveMatcher;
|
|
@@ -24705,11 +24862,11 @@ function extractScopedNodeEntities(rootScope) {
|
|
|
24705
24862
|
return templateEntities;
|
|
24706
24863
|
}
|
|
24707
24864
|
|
|
24708
|
-
// bazel-out/
|
|
24865
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/resource_loader.mjs
|
|
24709
24866
|
var ResourceLoader = class {
|
|
24710
24867
|
};
|
|
24711
24868
|
|
|
24712
|
-
// bazel-out/
|
|
24869
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/jit_compiler_facade.mjs
|
|
24713
24870
|
var CompilerFacadeImpl = class {
|
|
24714
24871
|
constructor(jitEvaluator = new JitEvaluator()) {
|
|
24715
24872
|
this.jitEvaluator = jitEvaluator;
|
|
@@ -24925,6 +25082,7 @@ function convertDirectiveFacadeToMetadata(facade) {
|
|
|
24925
25082
|
bindingPropertyName: ann.alias || field,
|
|
24926
25083
|
classPropertyName: field,
|
|
24927
25084
|
required: ann.required || false,
|
|
25085
|
+
isSignal: false,
|
|
24928
25086
|
transformFunction: ann.transform != null ? new WrappedNodeExpr(ann.transform) : null
|
|
24929
25087
|
};
|
|
24930
25088
|
} else if (isOutput(ann)) {
|
|
@@ -24955,7 +25113,7 @@ function convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {
|
|
|
24955
25113
|
type: wrapReference(declaration.type),
|
|
24956
25114
|
typeSourceSpan,
|
|
24957
25115
|
selector: (_a2 = declaration.selector) != null ? _a2 : null,
|
|
24958
|
-
inputs: declaration.inputs ?
|
|
25116
|
+
inputs: declaration.inputs ? inputsPartialMetadataToInputMetadata(declaration.inputs) : {},
|
|
24959
25117
|
outputs: (_b2 = declaration.outputs) != null ? _b2 : {},
|
|
24960
25118
|
host: convertHostDeclarationToMetadata(declaration.host),
|
|
24961
25119
|
queries: ((_c2 = declaration.queries) != null ? _c2 : []).map(convertQueryDeclarationToMetadata),
|
|
@@ -25183,27 +25341,41 @@ function isInput(value) {
|
|
|
25183
25341
|
function isOutput(value) {
|
|
25184
25342
|
return value.ngMetadataName === "Output";
|
|
25185
25343
|
}
|
|
25186
|
-
function
|
|
25187
|
-
return Object.keys(inputs).reduce((result,
|
|
25188
|
-
const value = inputs[
|
|
25189
|
-
if (typeof value === "string") {
|
|
25190
|
-
result[
|
|
25191
|
-
bindingPropertyName: value,
|
|
25192
|
-
classPropertyName: value,
|
|
25193
|
-
transformFunction: null,
|
|
25194
|
-
required: false
|
|
25195
|
-
};
|
|
25344
|
+
function inputsPartialMetadataToInputMetadata(inputs) {
|
|
25345
|
+
return Object.keys(inputs).reduce((result, minifiedClassName) => {
|
|
25346
|
+
const value = inputs[minifiedClassName];
|
|
25347
|
+
if (typeof value === "string" || Array.isArray(value)) {
|
|
25348
|
+
result[minifiedClassName] = parseLegacyInputPartialOutput(value);
|
|
25196
25349
|
} else {
|
|
25197
|
-
result[
|
|
25198
|
-
bindingPropertyName: value
|
|
25199
|
-
classPropertyName:
|
|
25200
|
-
transformFunction: value
|
|
25201
|
-
required:
|
|
25350
|
+
result[minifiedClassName] = {
|
|
25351
|
+
bindingPropertyName: value.publicName,
|
|
25352
|
+
classPropertyName: minifiedClassName,
|
|
25353
|
+
transformFunction: value.transformFunction !== null ? new WrappedNodeExpr(value.transformFunction) : null,
|
|
25354
|
+
required: value.isRequired,
|
|
25355
|
+
isSignal: value.isSignal
|
|
25202
25356
|
};
|
|
25203
25357
|
}
|
|
25204
25358
|
return result;
|
|
25205
25359
|
}, {});
|
|
25206
25360
|
}
|
|
25361
|
+
function parseLegacyInputPartialOutput(value) {
|
|
25362
|
+
if (typeof value === "string") {
|
|
25363
|
+
return {
|
|
25364
|
+
bindingPropertyName: value,
|
|
25365
|
+
classPropertyName: value,
|
|
25366
|
+
transformFunction: null,
|
|
25367
|
+
required: false,
|
|
25368
|
+
isSignal: false
|
|
25369
|
+
};
|
|
25370
|
+
}
|
|
25371
|
+
return {
|
|
25372
|
+
bindingPropertyName: value[0],
|
|
25373
|
+
classPropertyName: value[1],
|
|
25374
|
+
transformFunction: value[2] ? new WrappedNodeExpr(value[2]) : null,
|
|
25375
|
+
required: false,
|
|
25376
|
+
isSignal: false
|
|
25377
|
+
};
|
|
25378
|
+
}
|
|
25207
25379
|
function parseInputsArray(values) {
|
|
25208
25380
|
return values.reduce((results, value) => {
|
|
25209
25381
|
if (typeof value === "string") {
|
|
@@ -25212,6 +25384,7 @@ function parseInputsArray(values) {
|
|
|
25212
25384
|
bindingPropertyName,
|
|
25213
25385
|
classPropertyName,
|
|
25214
25386
|
required: false,
|
|
25387
|
+
isSignal: false,
|
|
25215
25388
|
transformFunction: null
|
|
25216
25389
|
};
|
|
25217
25390
|
} else {
|
|
@@ -25219,6 +25392,7 @@ function parseInputsArray(values) {
|
|
|
25219
25392
|
bindingPropertyName: value.alias || value.name,
|
|
25220
25393
|
classPropertyName: value.name,
|
|
25221
25394
|
required: value.required || false,
|
|
25395
|
+
isSignal: false,
|
|
25222
25396
|
transformFunction: value.transform != null ? new WrappedNodeExpr(value.transform) : null
|
|
25223
25397
|
};
|
|
25224
25398
|
}
|
|
@@ -25261,17 +25435,17 @@ function publishFacade(global) {
|
|
|
25261
25435
|
ng.\u0275compilerFacade = new CompilerFacadeImpl();
|
|
25262
25436
|
}
|
|
25263
25437
|
|
|
25264
|
-
// bazel-out/
|
|
25265
|
-
var VERSION2 = new Version("17.1.0-next.
|
|
25438
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
|
|
25439
|
+
var VERSION2 = new Version("17.1.0-next.4");
|
|
25266
25440
|
|
|
25267
|
-
// bazel-out/
|
|
25441
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
25268
25442
|
var _VisitorMode;
|
|
25269
25443
|
(function(_VisitorMode2) {
|
|
25270
25444
|
_VisitorMode2[_VisitorMode2["Extract"] = 0] = "Extract";
|
|
25271
25445
|
_VisitorMode2[_VisitorMode2["Merge"] = 1] = "Merge";
|
|
25272
25446
|
})(_VisitorMode || (_VisitorMode = {}));
|
|
25273
25447
|
|
|
25274
|
-
// bazel-out/
|
|
25448
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/xml_tags.mjs
|
|
25275
25449
|
var XmlTagDefinition = class {
|
|
25276
25450
|
constructor() {
|
|
25277
25451
|
this.closedByParent = false;
|
|
@@ -25293,7 +25467,7 @@ var XmlTagDefinition = class {
|
|
|
25293
25467
|
};
|
|
25294
25468
|
var _TAG_DEFINITION = new XmlTagDefinition();
|
|
25295
25469
|
|
|
25296
|
-
// bazel-out/
|
|
25470
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/partial/api.mjs
|
|
25297
25471
|
var FactoryTarget2;
|
|
25298
25472
|
(function(FactoryTarget3) {
|
|
25299
25473
|
FactoryTarget3[FactoryTarget3["Directive"] = 0] = "Directive";
|
|
@@ -25303,15 +25477,19 @@ var FactoryTarget2;
|
|
|
25303
25477
|
FactoryTarget3[FactoryTarget3["NgModule"] = 4] = "NgModule";
|
|
25304
25478
|
})(FactoryTarget2 || (FactoryTarget2 = {}));
|
|
25305
25479
|
|
|
25306
|
-
// bazel-out/
|
|
25480
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler.mjs
|
|
25307
25481
|
publishFacade(_global);
|
|
25308
25482
|
|
|
25309
|
-
// bazel-out/
|
|
25483
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/types.mjs
|
|
25310
25484
|
var ngtemplate = "ng-template";
|
|
25311
25485
|
var boundngifelse = "[ngIfElse]";
|
|
25312
25486
|
var boundngifthenelse = "[ngIfThenElse]";
|
|
25313
25487
|
var boundngifthen = "[ngIfThen]";
|
|
25314
25488
|
var nakedngfor = "ngFor";
|
|
25489
|
+
var startMarker = "\u25EC";
|
|
25490
|
+
var endMarker = "\u2722";
|
|
25491
|
+
var startI18nMarker = "\u2688";
|
|
25492
|
+
var endI18nMarker = "\u2689";
|
|
25315
25493
|
function allFormsOf(selector) {
|
|
25316
25494
|
return [
|
|
25317
25495
|
selector,
|
|
@@ -25464,6 +25642,7 @@ var AnalyzedFile = class {
|
|
|
25464
25642
|
constructor() {
|
|
25465
25643
|
__publicField(this, "ranges", []);
|
|
25466
25644
|
__publicField(this, "removeCommonModule", false);
|
|
25645
|
+
__publicField(this, "canRemoveImports", false);
|
|
25467
25646
|
__publicField(this, "sourceFilePath", "");
|
|
25468
25647
|
}
|
|
25469
25648
|
getSortedRanges() {
|
|
@@ -25511,6 +25690,18 @@ var CommonCollector = class extends RecursiveVisitor {
|
|
|
25511
25690
|
return commonModulePipes.some((regexp) => regexp.test(input));
|
|
25512
25691
|
}
|
|
25513
25692
|
};
|
|
25693
|
+
var i18nCollector = class extends RecursiveVisitor {
|
|
25694
|
+
constructor() {
|
|
25695
|
+
super(...arguments);
|
|
25696
|
+
__publicField(this, "elements", []);
|
|
25697
|
+
}
|
|
25698
|
+
visitElement(el) {
|
|
25699
|
+
if (el.attrs.find((a) => a.name === "i18n") !== void 0) {
|
|
25700
|
+
this.elements.push(el);
|
|
25701
|
+
}
|
|
25702
|
+
super.visitElement(el, null);
|
|
25703
|
+
}
|
|
25704
|
+
};
|
|
25514
25705
|
var ElementCollector = class extends RecursiveVisitor {
|
|
25515
25706
|
constructor(_attributes = []) {
|
|
25516
25707
|
super();
|
|
@@ -25589,7 +25780,7 @@ var TemplateCollector = class extends RecursiveVisitor {
|
|
|
25589
25780
|
}
|
|
25590
25781
|
};
|
|
25591
25782
|
|
|
25592
|
-
// bazel-out/
|
|
25783
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/util.mjs
|
|
25593
25784
|
var import_path2 = require("path");
|
|
25594
25785
|
var import_typescript5 = __toESM(require("typescript"), 1);
|
|
25595
25786
|
var importRemovals = [
|
|
@@ -25604,6 +25795,11 @@ var importRemovals = [
|
|
|
25604
25795
|
"NgSwitchDefault"
|
|
25605
25796
|
];
|
|
25606
25797
|
var importWithCommonRemovals = [...importRemovals, "CommonModule"];
|
|
25798
|
+
var startMarkerRegex = new RegExp(startMarker, "gm");
|
|
25799
|
+
var endMarkerRegex = new RegExp(endMarker, "gm");
|
|
25800
|
+
var startI18nMarkerRegex = new RegExp(startI18nMarker, "gm");
|
|
25801
|
+
var endI18nMarkerRegex = new RegExp(endI18nMarker, "gm");
|
|
25802
|
+
var replaceMarkerRegex = new RegExp(`${startMarker}|${endMarker}`, "gm");
|
|
25607
25803
|
function analyze(sourceFile, analyzedFiles) {
|
|
25608
25804
|
forEachClass(sourceFile, (node) => {
|
|
25609
25805
|
if (import_typescript5.default.isClassDeclaration(node)) {
|
|
@@ -25724,12 +25920,13 @@ function parseTemplate2(template2) {
|
|
|
25724
25920
|
preserveLineEndings: true
|
|
25725
25921
|
});
|
|
25726
25922
|
if (parsed.errors && parsed.errors.length > 0) {
|
|
25727
|
-
|
|
25923
|
+
const errors = parsed.errors.map((e) => ({ type: "parse", error: e }));
|
|
25924
|
+
return { tree: void 0, errors };
|
|
25728
25925
|
}
|
|
25729
25926
|
} catch (e) {
|
|
25730
|
-
return
|
|
25927
|
+
return { tree: void 0, errors: [{ type: "parse", error: e }] };
|
|
25731
25928
|
}
|
|
25732
|
-
return parsed;
|
|
25929
|
+
return { tree: parsed, errors: [] };
|
|
25733
25930
|
}
|
|
25734
25931
|
function calculateNesting(visitor, hasLineBreaks2) {
|
|
25735
25932
|
let nestedQueue = [];
|
|
@@ -25766,9 +25963,9 @@ function reduceNestingOffset(el, nestLevel, offset, postOffsets) {
|
|
|
25766
25963
|
function getTemplates(template2) {
|
|
25767
25964
|
var _a2;
|
|
25768
25965
|
const parsed = parseTemplate2(template2);
|
|
25769
|
-
if (parsed !==
|
|
25966
|
+
if (parsed.tree !== void 0) {
|
|
25770
25967
|
const visitor = new TemplateCollector();
|
|
25771
|
-
visitAll2(visitor, parsed.rootNodes);
|
|
25968
|
+
visitAll2(visitor, parsed.tree.rootNodes);
|
|
25772
25969
|
for (let [key, tmpl] of visitor.templates) {
|
|
25773
25970
|
const escapeKey = escapeRegExp(key.slice(1));
|
|
25774
25971
|
const regex = new RegExp(`[^a-zA-Z0-9-<(']${escapeKey}\\W`, "gm");
|
|
@@ -25821,7 +26018,7 @@ function processNgTemplates(template2) {
|
|
|
25821
26018
|
template2 = template2.replace(replaceRegex, t.children);
|
|
25822
26019
|
}
|
|
25823
26020
|
if (t.count === matches.length + 1 && safeToRemove) {
|
|
25824
|
-
template2 = template2.replace(t.contents,
|
|
26021
|
+
template2 = template2.replace(t.contents, `${startMarker}${endMarker}`);
|
|
25825
26022
|
}
|
|
25826
26023
|
updateTemplates(template2, templates);
|
|
25827
26024
|
}
|
|
@@ -25835,20 +26032,19 @@ function processNgTemplates(template2) {
|
|
|
25835
26032
|
function replaceRemainingPlaceholders(template2) {
|
|
25836
26033
|
const replaceRegex = new RegExp(`\u03B8.*\u03B4`, "g");
|
|
25837
26034
|
const placeholders = [...template2.matchAll(replaceRegex)];
|
|
25838
|
-
let migrated = template2;
|
|
25839
26035
|
for (let ph of placeholders) {
|
|
25840
26036
|
const placeholder = ph[0];
|
|
25841
26037
|
const name = placeholder.slice(1, placeholder.length - 1);
|
|
25842
|
-
|
|
26038
|
+
template2 = template2.replace(placeholder, `<ng-template [ngTemplateOutlet]="${name}"></ng-template>`);
|
|
25843
26039
|
}
|
|
25844
|
-
return
|
|
26040
|
+
return template2;
|
|
25845
26041
|
}
|
|
25846
26042
|
function canRemoveCommonModule(template2) {
|
|
25847
26043
|
const parsed = parseTemplate2(template2);
|
|
25848
26044
|
let removeCommonModule = false;
|
|
25849
|
-
if (parsed !==
|
|
26045
|
+
if (parsed.tree !== void 0) {
|
|
25850
26046
|
const visitor = new CommonCollector();
|
|
25851
|
-
visitAll2(visitor, parsed.rootNodes);
|
|
26047
|
+
visitAll2(visitor, parsed.tree.rootNodes);
|
|
25852
26048
|
removeCommonModule = visitor.count === 0;
|
|
25853
26049
|
}
|
|
25854
26050
|
return removeCommonModule;
|
|
@@ -25869,10 +26065,21 @@ function getOriginals(etm, tmpl, offset) {
|
|
|
25869
26065
|
const start2 = tmpl.slice(etm.el.sourceSpan.start.offset - offset, etm.el.children[0].sourceSpan.start.offset - offset);
|
|
25870
26066
|
const end = tmpl.slice(etm.el.children[etm.el.children.length - 1].sourceSpan.end.offset - offset, etm.el.sourceSpan.end.offset - offset);
|
|
25871
26067
|
const childLength = childEnd - childStart;
|
|
25872
|
-
return {
|
|
26068
|
+
return {
|
|
26069
|
+
start: start2,
|
|
26070
|
+
end,
|
|
26071
|
+
childLength,
|
|
26072
|
+
children: getOriginalChildren(etm.el.children, tmpl, offset),
|
|
26073
|
+
childNodes: etm.el.children
|
|
26074
|
+
};
|
|
25873
26075
|
}
|
|
25874
26076
|
const start = tmpl.slice(etm.el.sourceSpan.start.offset - offset, etm.el.sourceSpan.end.offset - offset);
|
|
25875
|
-
return { start, end: "", childLength: 0 };
|
|
26077
|
+
return { start, end: "", childLength: 0, children: [], childNodes: [] };
|
|
26078
|
+
}
|
|
26079
|
+
function getOriginalChildren(children, tmpl, offset) {
|
|
26080
|
+
return children.map((child) => {
|
|
26081
|
+
return tmpl.slice(child.sourceSpan.start.offset - offset, child.sourceSpan.end.offset - offset);
|
|
26082
|
+
});
|
|
25876
26083
|
}
|
|
25877
26084
|
function isI18nTemplate(etm, i18nAttr) {
|
|
25878
26085
|
let attrCount = countAttributes(etm);
|
|
@@ -25906,6 +26113,8 @@ function getMainBlock(etm, tmpl, offset) {
|
|
|
25906
26113
|
if (etm.hasChildren()) {
|
|
25907
26114
|
const { childStart: childStart2, childEnd: childEnd2 } = etm.getChildSpan(offset);
|
|
25908
26115
|
middle2 = tmpl.slice(childStart2, childEnd2);
|
|
26116
|
+
} else {
|
|
26117
|
+
middle2 = startMarker + endMarker;
|
|
25909
26118
|
}
|
|
25910
26119
|
return { start: "", middle: middle2, end: "" };
|
|
25911
26120
|
} else if (isI18nTemplate(etm, i18nAttr)) {
|
|
@@ -25924,9 +26133,29 @@ function getMainBlock(etm, tmpl, offset) {
|
|
|
25924
26133
|
}
|
|
25925
26134
|
return { start, middle, end };
|
|
25926
26135
|
}
|
|
26136
|
+
function generateI18nMarkers(tmpl) {
|
|
26137
|
+
let parsed = parseTemplate2(tmpl);
|
|
26138
|
+
if (parsed.tree !== void 0) {
|
|
26139
|
+
const visitor = new i18nCollector();
|
|
26140
|
+
visitAll2(visitor, parsed.tree.rootNodes);
|
|
26141
|
+
for (const [ix, el] of visitor.elements.entries()) {
|
|
26142
|
+
const offset = ix * 2;
|
|
26143
|
+
if (el.children.length > 0) {
|
|
26144
|
+
tmpl = addI18nMarkers(tmpl, el, offset);
|
|
26145
|
+
}
|
|
26146
|
+
}
|
|
26147
|
+
}
|
|
26148
|
+
return tmpl;
|
|
26149
|
+
}
|
|
26150
|
+
function addI18nMarkers(tmpl, el, offset) {
|
|
26151
|
+
const startPos = el.children[0].sourceSpan.start.offset + offset;
|
|
26152
|
+
const endPos = el.children[el.children.length - 1].sourceSpan.end.offset + offset;
|
|
26153
|
+
return tmpl.slice(0, startPos) + startI18nMarker + tmpl.slice(startPos, endPos) + endI18nMarker + tmpl.slice(endPos);
|
|
26154
|
+
}
|
|
25927
26155
|
var selfClosingList = "input|br|img|base|wbr|area|col|embed|hr|link|meta|param|source|track";
|
|
25928
26156
|
function formatTemplate(tmpl, templateType) {
|
|
25929
26157
|
if (tmpl.indexOf("\n") > -1) {
|
|
26158
|
+
tmpl = generateI18nMarkers(tmpl);
|
|
25930
26159
|
let openSelfClosingEl = false;
|
|
25931
26160
|
const openBlockRegex = /^\s*\@(if|switch|case|default|for)|^\s*\}\s\@else/;
|
|
25932
26161
|
const openElRegex = /^\s*<([a-z0-9]+)(?![^>]*\/>)[^>]*>?/;
|
|
@@ -25941,8 +26170,20 @@ function formatTemplate(tmpl, templateType) {
|
|
|
25941
26170
|
const formatted = [];
|
|
25942
26171
|
let indent = "";
|
|
25943
26172
|
let mindent = "";
|
|
26173
|
+
let depth = 0;
|
|
26174
|
+
let i18nDepth = 0;
|
|
26175
|
+
let inMigratedBlock = false;
|
|
26176
|
+
let inI18nBlock = false;
|
|
25944
26177
|
for (let [index, line] of lines.entries()) {
|
|
25945
|
-
|
|
26178
|
+
depth += [...line.matchAll(startMarkerRegex)].length - [...line.matchAll(endMarkerRegex)].length;
|
|
26179
|
+
inMigratedBlock = depth > 0;
|
|
26180
|
+
i18nDepth += [...line.matchAll(startI18nMarkerRegex)].length - [...line.matchAll(endI18nMarkerRegex)].length;
|
|
26181
|
+
let lineWasMigrated = false;
|
|
26182
|
+
if (line.match(replaceMarkerRegex)) {
|
|
26183
|
+
line = line.replace(replaceMarkerRegex, "");
|
|
26184
|
+
lineWasMigrated = true;
|
|
26185
|
+
}
|
|
26186
|
+
if (line.trim() === "" && index !== 0 && index !== lines.length - 1 && (inMigratedBlock || lineWasMigrated)) {
|
|
25946
26187
|
continue;
|
|
25947
26188
|
}
|
|
25948
26189
|
if (templateType === "template" && index <= 1) {
|
|
@@ -25952,7 +26193,8 @@ function formatTemplate(tmpl, templateType) {
|
|
|
25952
26193
|
if ((closeBlockRegex.test(line) || closeElRegex.test(line) && (!singleLineElRegex.test(line) && !closeMultiLineElRegex.test(line))) && indent !== "") {
|
|
25953
26194
|
indent = indent.slice(2);
|
|
25954
26195
|
}
|
|
25955
|
-
|
|
26196
|
+
const newLine = inI18nBlock ? line : mindent + (line.trim() !== "" ? indent : "") + line.trim();
|
|
26197
|
+
formatted.push(newLine);
|
|
25956
26198
|
if (closeMultiLineElRegex.test(line)) {
|
|
25957
26199
|
indent = indent.slice(2);
|
|
25958
26200
|
if (openSelfClosingEl) {
|
|
@@ -25970,6 +26212,7 @@ function formatTemplate(tmpl, templateType) {
|
|
|
25970
26212
|
openSelfClosingEl = true;
|
|
25971
26213
|
indent += " ";
|
|
25972
26214
|
}
|
|
26215
|
+
inI18nBlock = i18nDepth > 0;
|
|
25973
26216
|
}
|
|
25974
26217
|
tmpl = formatted.join("\n");
|
|
25975
26218
|
}
|
|
@@ -25984,7 +26227,7 @@ function forEachClass(sourceFile, callback) {
|
|
|
25984
26227
|
});
|
|
25985
26228
|
}
|
|
25986
26229
|
|
|
25987
|
-
// bazel-out/
|
|
26230
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/cases.mjs
|
|
25988
26231
|
var boundcase = "[ngSwitchCase]";
|
|
25989
26232
|
var switchcase = "*ngSwitchCase";
|
|
25990
26233
|
var nakedcase = "ngSwitchCase";
|
|
@@ -26000,12 +26243,12 @@ var cases = [
|
|
|
26000
26243
|
function migrateCase(template2) {
|
|
26001
26244
|
let errors = [];
|
|
26002
26245
|
let parsed = parseTemplate2(template2);
|
|
26003
|
-
if (parsed ===
|
|
26246
|
+
if (parsed.tree === void 0) {
|
|
26004
26247
|
return { migrated: template2, errors, changed: false };
|
|
26005
26248
|
}
|
|
26006
26249
|
let result = template2;
|
|
26007
26250
|
const visitor = new ElementCollector(cases);
|
|
26008
|
-
visitAll2(visitor, parsed.rootNodes);
|
|
26251
|
+
visitAll2(visitor, parsed.tree.rootNodes);
|
|
26009
26252
|
calculateNesting(visitor, hasLineBreaks(template2));
|
|
26010
26253
|
let offset = 0;
|
|
26011
26254
|
let nestLevel = -1;
|
|
@@ -26040,8 +26283,8 @@ function migrateNgSwitchCase(etm, tmpl, offset) {
|
|
|
26040
26283
|
const condition = etm.attr.value;
|
|
26041
26284
|
const originals = getOriginals(etm, tmpl, offset);
|
|
26042
26285
|
const { start, middle, end } = getMainBlock(etm, tmpl, offset);
|
|
26043
|
-
const startBlock = `${leadingSpace}@case (${condition}) {${leadingSpace}${lbString}${start}`;
|
|
26044
|
-
const endBlock = `${end}${lbString}${leadingSpace}}`;
|
|
26286
|
+
const startBlock = `${startMarker}${leadingSpace}@case (${condition}) {${leadingSpace}${lbString}${start}`;
|
|
26287
|
+
const endBlock = `${end}${lbString}${leadingSpace}}${endMarker}`;
|
|
26045
26288
|
const defaultBlock = startBlock + middle + endBlock;
|
|
26046
26289
|
const updatedTmpl = tmpl.slice(0, etm.start(offset)) + defaultBlock + tmpl.slice(etm.end(offset));
|
|
26047
26290
|
const pre = originals.start.length - startBlock.length;
|
|
@@ -26053,8 +26296,8 @@ function migrateNgSwitchDefault(etm, tmpl, offset) {
|
|
|
26053
26296
|
const leadingSpace = etm.hasLineBreaks ? "" : " ";
|
|
26054
26297
|
const originals = getOriginals(etm, tmpl, offset);
|
|
26055
26298
|
const { start, middle, end } = getMainBlock(etm, tmpl, offset);
|
|
26056
|
-
const startBlock = `${leadingSpace}@default {${leadingSpace}${lbString}${start}`;
|
|
26057
|
-
const endBlock = `${end}${lbString}${leadingSpace}}`;
|
|
26299
|
+
const startBlock = `${startMarker}${leadingSpace}@default {${leadingSpace}${lbString}${start}`;
|
|
26300
|
+
const endBlock = `${end}${lbString}${leadingSpace}}${endMarker}`;
|
|
26058
26301
|
const defaultBlock = startBlock + middle + endBlock;
|
|
26059
26302
|
const updatedTmpl = tmpl.slice(0, etm.start(offset)) + defaultBlock + tmpl.slice(etm.end(offset));
|
|
26060
26303
|
const pre = originals.start.length - startBlock.length;
|
|
@@ -26062,7 +26305,7 @@ function migrateNgSwitchDefault(etm, tmpl, offset) {
|
|
|
26062
26305
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
26063
26306
|
}
|
|
26064
26307
|
|
|
26065
|
-
// bazel-out/
|
|
26308
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/fors.mjs
|
|
26066
26309
|
var ngfor = "*ngFor";
|
|
26067
26310
|
var nakedngfor2 = "ngFor";
|
|
26068
26311
|
var fors = [
|
|
@@ -26081,12 +26324,12 @@ var stringPairs = /* @__PURE__ */ new Map([
|
|
|
26081
26324
|
function migrateFor(template2) {
|
|
26082
26325
|
let errors = [];
|
|
26083
26326
|
let parsed = parseTemplate2(template2);
|
|
26084
|
-
if (parsed ===
|
|
26327
|
+
if (parsed.tree === void 0) {
|
|
26085
26328
|
return { migrated: template2, errors, changed: false };
|
|
26086
26329
|
}
|
|
26087
26330
|
let result = template2;
|
|
26088
26331
|
const visitor = new ElementCollector(fors);
|
|
26089
|
-
visitAll2(visitor, parsed.rootNodes);
|
|
26332
|
+
visitAll2(visitor, parsed.tree.rootNodes);
|
|
26090
26333
|
calculateNesting(visitor, hasLineBreaks(template2));
|
|
26091
26334
|
let offset = 0;
|
|
26092
26335
|
let nestLevel = -1;
|
|
@@ -26157,8 +26400,8 @@ function migrateStandardNgFor(etm, tmpl, offset) {
|
|
|
26157
26400
|
trackBy = trackBy.replace("$index", aliasedIndex);
|
|
26158
26401
|
}
|
|
26159
26402
|
const aliasStr = aliases.length > 0 ? `;${aliases.join(";")}` : "";
|
|
26160
|
-
let startBlock =
|
|
26161
|
-
let endBlock = `${lbString}}`;
|
|
26403
|
+
let startBlock = `${startMarker}@for (${condition}; track ${trackBy}${aliasStr}) {${lbString}`;
|
|
26404
|
+
let endBlock = `${lbString}}${endMarker}`;
|
|
26162
26405
|
let forBlock = "";
|
|
26163
26406
|
if (tmplPlaceholder !== "") {
|
|
26164
26407
|
startBlock = startBlock + tmplPlaceholder;
|
|
@@ -26194,10 +26437,10 @@ function migrateBoundNgFor(etm, tmpl, offset) {
|
|
|
26194
26437
|
trackBy = `${forAttrs.trackBy.trim()}(${aliasedIndex}, ${aliasAttrs.item})`;
|
|
26195
26438
|
}
|
|
26196
26439
|
const { start, middle, end } = getMainBlock(etm, tmpl, offset);
|
|
26197
|
-
const startBlock =
|
|
26440
|
+
const startBlock = `${startMarker}@for (${condition}; track ${trackBy}${aliasStr}) {
|
|
26198
26441
|
${start}`;
|
|
26199
26442
|
const endBlock = `${end}
|
|
26200
|
-
}`;
|
|
26443
|
+
}${endMarker}`;
|
|
26201
26444
|
const forBlock = startBlock + middle + endBlock;
|
|
26202
26445
|
const updatedTmpl = tmpl.slice(0, etm.start(offset)) + forBlock + tmpl.slice(etm.end(offset));
|
|
26203
26446
|
const pre = originals.start.length - startBlock.length;
|
|
@@ -26236,7 +26479,7 @@ function getNgForParts(expression) {
|
|
|
26236
26479
|
return parts;
|
|
26237
26480
|
}
|
|
26238
26481
|
|
|
26239
|
-
// bazel-out/
|
|
26482
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/ifs.mjs
|
|
26240
26483
|
var ngif = "*ngIf";
|
|
26241
26484
|
var boundngif = "[ngIf]";
|
|
26242
26485
|
var nakedngif = "ngIf";
|
|
@@ -26248,12 +26491,12 @@ var ifs = [
|
|
|
26248
26491
|
function migrateIf(template2) {
|
|
26249
26492
|
let errors = [];
|
|
26250
26493
|
let parsed = parseTemplate2(template2);
|
|
26251
|
-
if (parsed ===
|
|
26494
|
+
if (parsed.tree === void 0) {
|
|
26252
26495
|
return { migrated: template2, errors, changed: false };
|
|
26253
26496
|
}
|
|
26254
26497
|
let result = template2;
|
|
26255
26498
|
const visitor = new ElementCollector(ifs);
|
|
26256
|
-
visitAll2(visitor, parsed.rootNodes);
|
|
26499
|
+
visitAll2(visitor, parsed.tree.rootNodes);
|
|
26257
26500
|
calculateNesting(visitor, hasLineBreaks(template2));
|
|
26258
26501
|
let offset = 0;
|
|
26259
26502
|
let nestLevel = -1;
|
|
@@ -26303,8 +26546,8 @@ function buildIfBlock(etm, tmpl, offset) {
|
|
|
26303
26546
|
}
|
|
26304
26547
|
const originals = getOriginals(etm, tmpl, offset);
|
|
26305
26548
|
const { start, middle, end } = getMainBlock(etm, tmpl, offset);
|
|
26306
|
-
const startBlock =
|
|
26307
|
-
const endBlock = `${end}${lbString}}`;
|
|
26549
|
+
const startBlock = `${startMarker}@if (${condition}) {${lbString}${start}`;
|
|
26550
|
+
const endBlock = `${end}${lbString}}${endMarker}`;
|
|
26308
26551
|
const ifBlock = startBlock + middle + endBlock;
|
|
26309
26552
|
const updatedTmpl = tmpl.slice(0, etm.start(offset)) + ifBlock + tmpl.slice(etm.end(offset));
|
|
26310
26553
|
const pre = originals.start.length - startBlock.length;
|
|
@@ -26328,9 +26571,9 @@ function buildBoundIfElseBlock(etm, tmpl, offset) {
|
|
|
26328
26571
|
} else if (aliases.length === 1) {
|
|
26329
26572
|
condition += `; as ${aliases[0]}`;
|
|
26330
26573
|
}
|
|
26331
|
-
const elsePlaceholder = `\u03B8${etm.elseAttr.value}\u03B4`;
|
|
26574
|
+
const elsePlaceholder = `\u03B8${etm.elseAttr.value.trim()}\u03B4`;
|
|
26332
26575
|
if (etm.thenAttr !== void 0) {
|
|
26333
|
-
const thenPlaceholder = `\u03B8${etm.thenAttr.value}\u03B4`;
|
|
26576
|
+
const thenPlaceholder = `\u03B8${etm.thenAttr.value.trim()}\u03B4`;
|
|
26334
26577
|
return buildIfThenElseBlock(etm, tmpl, condition, thenPlaceholder, elsePlaceholder, offset);
|
|
26335
26578
|
}
|
|
26336
26579
|
return buildIfElseBlock(etm, tmpl, condition, elsePlaceholder, offset);
|
|
@@ -26339,9 +26582,9 @@ function buildIfElseBlock(etm, tmpl, condition, elsePlaceholder, offset) {
|
|
|
26339
26582
|
const lbString = etm.hasLineBreaks ? "\n" : "";
|
|
26340
26583
|
const originals = getOriginals(etm, tmpl, offset);
|
|
26341
26584
|
const { start, middle, end } = getMainBlock(etm, tmpl, offset);
|
|
26342
|
-
const startBlock =
|
|
26585
|
+
const startBlock = `${startMarker}@if (${condition}) {${lbString}${start}`;
|
|
26343
26586
|
const elseBlock = `${end}${lbString}} @else {${lbString}`;
|
|
26344
|
-
const postBlock = elseBlock + elsePlaceholder + `${lbString}}`;
|
|
26587
|
+
const postBlock = elseBlock + elsePlaceholder + `${lbString}}${endMarker}`;
|
|
26345
26588
|
const ifElseBlock = startBlock + middle + postBlock;
|
|
26346
26589
|
const tmplStart = tmpl.slice(0, etm.start(offset));
|
|
26347
26590
|
const tmplEnd = tmpl.slice(etm.end(offset));
|
|
@@ -26364,9 +26607,9 @@ function buildStandardIfThenBlock(etm, tmpl, thenString, offset) {
|
|
|
26364
26607
|
function buildIfThenElseBlock(etm, tmpl, condition, thenPlaceholder, elsePlaceholder, offset) {
|
|
26365
26608
|
const lbString = etm.hasLineBreaks ? "\n" : "";
|
|
26366
26609
|
const originals = getOriginals(etm, tmpl, offset);
|
|
26367
|
-
const startBlock =
|
|
26610
|
+
const startBlock = `${startMarker}@if (${condition}) {${lbString}`;
|
|
26368
26611
|
const elseBlock = `${lbString}} @else {${lbString}`;
|
|
26369
|
-
const postBlock = thenPlaceholder + elseBlock + elsePlaceholder + `${lbString}}`;
|
|
26612
|
+
const postBlock = thenPlaceholder + elseBlock + elsePlaceholder + `${lbString}}${endMarker}`;
|
|
26370
26613
|
const ifThenElseBlock = startBlock + postBlock;
|
|
26371
26614
|
const tmplStart = tmpl.slice(0, etm.start(offset));
|
|
26372
26615
|
const tmplEnd = tmpl.slice(etm.end(offset));
|
|
@@ -26378,8 +26621,8 @@ function buildIfThenElseBlock(etm, tmpl, condition, thenPlaceholder, elsePlaceho
|
|
|
26378
26621
|
function buildIfThenBlock(etm, tmpl, condition, thenPlaceholder, offset) {
|
|
26379
26622
|
const lbString = etm.hasLineBreaks ? "\n" : "";
|
|
26380
26623
|
const originals = getOriginals(etm, tmpl, offset);
|
|
26381
|
-
const startBlock =
|
|
26382
|
-
const postBlock = thenPlaceholder + `${lbString}}`;
|
|
26624
|
+
const startBlock = `${startMarker}@if (${condition}) {${lbString}`;
|
|
26625
|
+
const postBlock = thenPlaceholder + `${lbString}}${endMarker}`;
|
|
26383
26626
|
const ifThenBlock = startBlock + postBlock;
|
|
26384
26627
|
const tmplStart = tmpl.slice(0, etm.start(offset));
|
|
26385
26628
|
const tmplEnd = tmpl.slice(etm.end(offset));
|
|
@@ -26389,7 +26632,7 @@ function buildIfThenBlock(etm, tmpl, condition, thenPlaceholder, offset) {
|
|
|
26389
26632
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
26390
26633
|
}
|
|
26391
26634
|
|
|
26392
|
-
// bazel-out/
|
|
26635
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/switches.mjs
|
|
26393
26636
|
var ngswitch = "[ngSwitch]";
|
|
26394
26637
|
var switches = [
|
|
26395
26638
|
ngswitch
|
|
@@ -26397,12 +26640,12 @@ var switches = [
|
|
|
26397
26640
|
function migrateSwitch(template2) {
|
|
26398
26641
|
let errors = [];
|
|
26399
26642
|
let parsed = parseTemplate2(template2);
|
|
26400
|
-
if (parsed ===
|
|
26643
|
+
if (parsed.tree === void 0) {
|
|
26401
26644
|
return { migrated: template2, errors, changed: false };
|
|
26402
26645
|
}
|
|
26403
26646
|
let result = template2;
|
|
26404
26647
|
const visitor = new ElementCollector(switches);
|
|
26405
|
-
visitAll2(visitor, parsed.rootNodes);
|
|
26648
|
+
visitAll2(visitor, parsed.tree.rootNodes);
|
|
26406
26649
|
calculateNesting(visitor, hasLineBreaks(template2));
|
|
26407
26650
|
let offset = 0;
|
|
26408
26651
|
let nestLevel = -1;
|
|
@@ -26425,13 +26668,31 @@ function migrateSwitch(template2) {
|
|
|
26425
26668
|
const changed = visitor.elements.length > 0;
|
|
26426
26669
|
return { migrated: result, errors, changed };
|
|
26427
26670
|
}
|
|
26671
|
+
function assertValidSwitchStructure(children) {
|
|
26672
|
+
for (const child of children) {
|
|
26673
|
+
if (child instanceof Text4 && child.value.trim() !== "") {
|
|
26674
|
+
throw new Error(`Text node: "${child.value}" would result in invalid migrated @switch block structure. @switch can only have @case or @default as children.`);
|
|
26675
|
+
} else if (child instanceof Element2) {
|
|
26676
|
+
let hasCase = false;
|
|
26677
|
+
for (const attr of child.attrs) {
|
|
26678
|
+
if (cases.includes(attr.name)) {
|
|
26679
|
+
hasCase = true;
|
|
26680
|
+
}
|
|
26681
|
+
}
|
|
26682
|
+
if (!hasCase) {
|
|
26683
|
+
throw new Error(`Element node: "${child.name}" would result in invalid migrated @switch block structure. @switch can only have @case or @default as children.`);
|
|
26684
|
+
}
|
|
26685
|
+
}
|
|
26686
|
+
}
|
|
26687
|
+
}
|
|
26428
26688
|
function migrateNgSwitch(etm, tmpl, offset) {
|
|
26429
26689
|
const lbString = etm.hasLineBreaks ? "\n" : "";
|
|
26430
26690
|
const condition = etm.attr.value;
|
|
26431
26691
|
const originals = getOriginals(etm, tmpl, offset);
|
|
26692
|
+
assertValidSwitchStructure(originals.childNodes);
|
|
26432
26693
|
const { start, middle, end } = getMainBlock(etm, tmpl, offset);
|
|
26433
|
-
const startBlock = `${start}${lbString}@switch (${condition}) {`;
|
|
26434
|
-
const endBlock = `}${lbString}${end}`;
|
|
26694
|
+
const startBlock = `${startMarker}${start}${lbString}@switch (${condition}) {`;
|
|
26695
|
+
const endBlock = `}${lbString}${end}${endMarker}`;
|
|
26435
26696
|
const switchBlock = startBlock + middle + endBlock;
|
|
26436
26697
|
const updatedTmpl = tmpl.slice(0, etm.start(offset)) + switchBlock + tmpl.slice(etm.end(offset));
|
|
26437
26698
|
const pre = originals.start.length - startBlock.length;
|
|
@@ -26439,7 +26700,7 @@ function migrateNgSwitch(etm, tmpl, offset) {
|
|
|
26439
26700
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
26440
26701
|
}
|
|
26441
26702
|
|
|
26442
|
-
// bazel-out/
|
|
26703
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/migration.mjs
|
|
26443
26704
|
function migrateTemplate(template2, templateType, node, file, format = true, analyzedFiles) {
|
|
26444
26705
|
let errors = [];
|
|
26445
26706
|
let migrated = template2;
|
|
@@ -26447,6 +26708,9 @@ function migrateTemplate(template2, templateType, node, file, format = true, ana
|
|
|
26447
26708
|
const ifResult = migrateIf(template2);
|
|
26448
26709
|
const forResult = migrateFor(ifResult.migrated);
|
|
26449
26710
|
const switchResult = migrateSwitch(forResult.migrated);
|
|
26711
|
+
if (switchResult.errors.length > 0) {
|
|
26712
|
+
return { migrated: template2, errors: switchResult.errors };
|
|
26713
|
+
}
|
|
26450
26714
|
const caseResult = migrateCase(switchResult.migrated);
|
|
26451
26715
|
const templateResult = processNgTemplates(caseResult.migrated);
|
|
26452
26716
|
if (templateResult.err !== void 0) {
|
|
@@ -26454,13 +26718,27 @@ function migrateTemplate(template2, templateType, node, file, format = true, ana
|
|
|
26454
26718
|
}
|
|
26455
26719
|
migrated = templateResult.migrated;
|
|
26456
26720
|
const changed = ifResult.changed || forResult.changed || switchResult.changed || caseResult.changed;
|
|
26721
|
+
if (changed) {
|
|
26722
|
+
const parsed = parseTemplate2(migrated);
|
|
26723
|
+
if (parsed.errors.length > 0) {
|
|
26724
|
+
const parsingError = {
|
|
26725
|
+
type: "parse",
|
|
26726
|
+
error: new Error(`The migration resulted in invalid HTML for ${file.sourceFilePath}. Please check the template for valid HTML structures and run the migration again.`)
|
|
26727
|
+
};
|
|
26728
|
+
return { migrated: template2, errors: [parsingError] };
|
|
26729
|
+
}
|
|
26730
|
+
}
|
|
26457
26731
|
if (format && changed) {
|
|
26458
26732
|
migrated = formatTemplate(migrated, templateType);
|
|
26459
26733
|
}
|
|
26734
|
+
const markerRegex = new RegExp(`${startMarker}|${endMarker}|${startI18nMarker}|${endI18nMarker}`, "gm");
|
|
26735
|
+
migrated = migrated.replace(markerRegex, "");
|
|
26460
26736
|
file.removeCommonModule = canRemoveCommonModule(template2);
|
|
26737
|
+
file.canRemoveImports = true;
|
|
26461
26738
|
if (templateType === "templateUrl" && analyzedFiles !== null && analyzedFiles.has(file.sourceFilePath)) {
|
|
26462
26739
|
const componentFile = analyzedFiles.get(file.sourceFilePath);
|
|
26463
26740
|
componentFile.removeCommonModule = file.removeCommonModule;
|
|
26741
|
+
componentFile.canRemoveImports = file.canRemoveImports;
|
|
26464
26742
|
}
|
|
26465
26743
|
errors = [
|
|
26466
26744
|
...ifResult.errors,
|
|
@@ -26468,13 +26746,13 @@ function migrateTemplate(template2, templateType, node, file, format = true, ana
|
|
|
26468
26746
|
...switchResult.errors,
|
|
26469
26747
|
...caseResult.errors
|
|
26470
26748
|
];
|
|
26471
|
-
} else {
|
|
26749
|
+
} else if (file.canRemoveImports) {
|
|
26472
26750
|
migrated = removeImports(template2, node, file.removeCommonModule);
|
|
26473
26751
|
}
|
|
26474
26752
|
return { migrated, errors };
|
|
26475
26753
|
}
|
|
26476
26754
|
|
|
26477
|
-
// bazel-out/
|
|
26755
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/index.mjs
|
|
26478
26756
|
function control_flow_migration_default(options) {
|
|
26479
26757
|
return (tree, context) => __async(this, null, function* () {
|
|
26480
26758
|
const basePath = process.cwd();
|