@angular/core 17.1.0-next.1 → 17.1.0-next.2
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/src/application_init.mjs +2 -2
- package/esm2022/src/render3/features/host_directives_feature.mjs +20 -13
- package/esm2022/src/render3/instructions/change_detection.mjs +3 -4
- package/esm2022/src/render3/util/view_utils.mjs +11 -12
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/esm2022/testing/src/test_bed.mjs +3 -3
- package/esm2022/testing/src/test_bed_compiler.mjs +19 -10
- package/fesm2022/core.mjs +32 -27
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +21 -12
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +3 -3
- 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 +360 -353
- package/schematics/migrations/block-template-entities/bundle.js.map +4 -4
- package/schematics/migrations/compiler-options/bundle.js +13 -13
- package/schematics/migrations/transfer-state/bundle.js +13 -13
- package/schematics/ng-generate/control-flow-migration/bundle.js +563 -433
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +4 -4
- package/schematics/ng-generate/standalone-migration/bundle.js +735 -628
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +1 -1
|
@@ -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
|
};
|
|
@@ -2518,7 +2518,7 @@ var Identifiers = _Identifiers;
|
|
|
2518
2518
|
_Identifiers.validateIframeAttribute = { name: "\u0275\u0275validateIframeAttribute", moduleName: CORE };
|
|
2519
2519
|
})();
|
|
2520
2520
|
|
|
2521
|
-
// bazel-out/
|
|
2521
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/util.mjs
|
|
2522
2522
|
var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
|
|
2523
2523
|
function dashCaseToCamelCase(input) {
|
|
2524
2524
|
return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());
|
|
@@ -2606,7 +2606,7 @@ function partitionArray(arr, conditionFn) {
|
|
|
2606
2606
|
return [truthy, falsy];
|
|
2607
2607
|
}
|
|
2608
2608
|
|
|
2609
|
-
// bazel-out/
|
|
2609
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/source_map.mjs
|
|
2610
2610
|
var VERSION = 3;
|
|
2611
2611
|
var JS_B64_PREFIX = "# sourceMappingURL=data:application/json;base64,";
|
|
2612
2612
|
var SourceMapGenerator = class {
|
|
@@ -2735,7 +2735,7 @@ function toBase64Digit(value) {
|
|
|
2735
2735
|
return B64_DIGITS[value];
|
|
2736
2736
|
}
|
|
2737
2737
|
|
|
2738
|
-
// bazel-out/
|
|
2738
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_emitter.mjs
|
|
2739
2739
|
var _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g;
|
|
2740
2740
|
var _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;
|
|
2741
2741
|
var _INDENT_WITH = " ";
|
|
@@ -3220,7 +3220,7 @@ function _createIndent(count) {
|
|
|
3220
3220
|
return res;
|
|
3221
3221
|
}
|
|
3222
3222
|
|
|
3223
|
-
// bazel-out/
|
|
3223
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/util.mjs
|
|
3224
3224
|
function typeWithParameters(type, numParams) {
|
|
3225
3225
|
if (numParams === 0) {
|
|
3226
3226
|
return expressionType(type);
|
|
@@ -3285,7 +3285,7 @@ function generateForwardRef(expr) {
|
|
|
3285
3285
|
return importExpr(Identifiers.forwardRef).callFn([arrowFn([], expr)]);
|
|
3286
3286
|
}
|
|
3287
3287
|
|
|
3288
|
-
// bazel-out/
|
|
3288
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_factory.mjs
|
|
3289
3289
|
var R3FactoryDelegateType;
|
|
3290
3290
|
(function(R3FactoryDelegateType2) {
|
|
3291
3291
|
R3FactoryDelegateType2[R3FactoryDelegateType2["Class"] = 0] = "Class";
|
|
@@ -3430,7 +3430,40 @@ function getInjectFn(target) {
|
|
|
3430
3430
|
}
|
|
3431
3431
|
}
|
|
3432
3432
|
|
|
3433
|
-
// bazel-out/
|
|
3433
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/tags.mjs
|
|
3434
|
+
var TagContentType;
|
|
3435
|
+
(function(TagContentType2) {
|
|
3436
|
+
TagContentType2[TagContentType2["RAW_TEXT"] = 0] = "RAW_TEXT";
|
|
3437
|
+
TagContentType2[TagContentType2["ESCAPABLE_RAW_TEXT"] = 1] = "ESCAPABLE_RAW_TEXT";
|
|
3438
|
+
TagContentType2[TagContentType2["PARSABLE_DATA"] = 2] = "PARSABLE_DATA";
|
|
3439
|
+
})(TagContentType || (TagContentType = {}));
|
|
3440
|
+
function splitNsName(elementName) {
|
|
3441
|
+
if (elementName[0] != ":") {
|
|
3442
|
+
return [null, elementName];
|
|
3443
|
+
}
|
|
3444
|
+
const colonIndex = elementName.indexOf(":", 1);
|
|
3445
|
+
if (colonIndex === -1) {
|
|
3446
|
+
throw new Error(`Unsupported format "${elementName}" expecting ":namespace:name"`);
|
|
3447
|
+
}
|
|
3448
|
+
return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)];
|
|
3449
|
+
}
|
|
3450
|
+
function isNgContainer(tagName) {
|
|
3451
|
+
return splitNsName(tagName)[1] === "ng-container";
|
|
3452
|
+
}
|
|
3453
|
+
function isNgContent(tagName) {
|
|
3454
|
+
return splitNsName(tagName)[1] === "ng-content";
|
|
3455
|
+
}
|
|
3456
|
+
function isNgTemplate(tagName) {
|
|
3457
|
+
return splitNsName(tagName)[1] === "ng-template";
|
|
3458
|
+
}
|
|
3459
|
+
function getNsPrefix(fullName) {
|
|
3460
|
+
return fullName === null ? null : splitNsName(fullName)[0];
|
|
3461
|
+
}
|
|
3462
|
+
function mergeNsAndName(prefix, localName) {
|
|
3463
|
+
return prefix ? `:${prefix}:${localName}` : localName;
|
|
3464
|
+
}
|
|
3465
|
+
|
|
3466
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_ast.mjs
|
|
3434
3467
|
var Comment = class {
|
|
3435
3468
|
constructor(value, sourceSpan) {
|
|
3436
3469
|
this.value = value;
|
|
@@ -3811,7 +3844,7 @@ function visitAll(visitor, nodes) {
|
|
|
3811
3844
|
return result;
|
|
3812
3845
|
}
|
|
3813
3846
|
|
|
3814
|
-
// bazel-out/
|
|
3847
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_ast.mjs
|
|
3815
3848
|
var Message = class {
|
|
3816
3849
|
constructor(nodes, placeholders, placeholderToMessage, meaning, description, customId) {
|
|
3817
3850
|
this.nodes = nodes;
|
|
@@ -3971,7 +4004,7 @@ var LocalizeMessageStringVisitor = class {
|
|
|
3971
4004
|
}
|
|
3972
4005
|
};
|
|
3973
4006
|
|
|
3974
|
-
// bazel-out/
|
|
4007
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xml_helper.mjs
|
|
3975
4008
|
var _Visitor = class {
|
|
3976
4009
|
visitTag(tag) {
|
|
3977
4010
|
const strAttrs = this._serializeAttributes(tag.attrs);
|
|
@@ -3999,12 +4032,12 @@ ${doctype.dtd}
|
|
|
3999
4032
|
};
|
|
4000
4033
|
var _visitor = new _Visitor();
|
|
4001
4034
|
|
|
4002
|
-
// bazel-out/
|
|
4035
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xmb.mjs
|
|
4003
4036
|
function toPublicName(internalName) {
|
|
4004
4037
|
return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, "_");
|
|
4005
4038
|
}
|
|
4006
4039
|
|
|
4007
|
-
// bazel-out/
|
|
4040
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/util.mjs
|
|
4008
4041
|
var CLOSURE_TRANSLATION_VAR_PREFIX = "MSG_";
|
|
4009
4042
|
var TRANSLATION_VAR_PREFIX = "i18n_";
|
|
4010
4043
|
var I18N_ATTR = "i18n";
|
|
@@ -4106,7 +4139,7 @@ function declareI18nVariable(variable2) {
|
|
|
4106
4139
|
return new DeclareVarStmt(variable2.name, void 0, INFERRED_TYPE, void 0, variable2.sourceSpan);
|
|
4107
4140
|
}
|
|
4108
4141
|
|
|
4109
|
-
// bazel-out/
|
|
4142
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/util.mjs
|
|
4110
4143
|
var UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;
|
|
4111
4144
|
var TEMPORARY_NAME = "_t";
|
|
4112
4145
|
var CONTEXT_NAME = "ctx";
|
|
@@ -4273,6 +4306,23 @@ var DefinitionMap = class {
|
|
|
4273
4306
|
return literalMap(this.values);
|
|
4274
4307
|
}
|
|
4275
4308
|
};
|
|
4309
|
+
function createCssSelectorFromNode(node) {
|
|
4310
|
+
const elementName = node instanceof Element ? node.name : "ng-template";
|
|
4311
|
+
const attributes = getAttrsForDirectiveMatching(node);
|
|
4312
|
+
const cssSelector = new CssSelector();
|
|
4313
|
+
const elementNameNoNs = splitNsName(elementName)[1];
|
|
4314
|
+
cssSelector.setElement(elementNameNoNs);
|
|
4315
|
+
Object.getOwnPropertyNames(attributes).forEach((name) => {
|
|
4316
|
+
const nameNoNs = splitNsName(name)[1];
|
|
4317
|
+
const value = attributes[name];
|
|
4318
|
+
cssSelector.addAttribute(nameNoNs, value);
|
|
4319
|
+
if (name.toLowerCase() === "class") {
|
|
4320
|
+
const classes = value.trim().split(/\s+/);
|
|
4321
|
+
classes.forEach((className) => cssSelector.addClassName(className));
|
|
4322
|
+
}
|
|
4323
|
+
});
|
|
4324
|
+
return cssSelector;
|
|
4325
|
+
}
|
|
4276
4326
|
function getAttrsForDirectiveMatching(elOrTpl) {
|
|
4277
4327
|
const attributesMap = {};
|
|
4278
4328
|
if (elOrTpl instanceof Template && elOrTpl.tagName !== "ng-template") {
|
|
@@ -4329,7 +4379,7 @@ function getInstructionStatements(instructions) {
|
|
|
4329
4379
|
return statements;
|
|
4330
4380
|
}
|
|
4331
4381
|
|
|
4332
|
-
// bazel-out/
|
|
4382
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/injectable_compiler_2.mjs
|
|
4333
4383
|
function compileInjectable(meta, resolveForwardRefs) {
|
|
4334
4384
|
let result = null;
|
|
4335
4385
|
const factoryMeta = {
|
|
@@ -4414,7 +4464,7 @@ function createFactoryFunction(type) {
|
|
|
4414
4464
|
return arrowFn([new FnParam("t", DYNAMIC_TYPE)], type.prop("\u0275fac").callFn([variable("t")]));
|
|
4415
4465
|
}
|
|
4416
4466
|
|
|
4417
|
-
// bazel-out/
|
|
4467
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/assertions.mjs
|
|
4418
4468
|
var UNUSABLE_INTERPOLATION_REGEXPS = [
|
|
4419
4469
|
/^\s*$/,
|
|
4420
4470
|
/[<>]/,
|
|
@@ -4436,7 +4486,7 @@ function assertInterpolationSymbols(identifier, value) {
|
|
|
4436
4486
|
}
|
|
4437
4487
|
}
|
|
4438
4488
|
|
|
4439
|
-
// bazel-out/
|
|
4489
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/defaults.mjs
|
|
4440
4490
|
var InterpolationConfig = class {
|
|
4441
4491
|
static fromArray(markers) {
|
|
4442
4492
|
if (!markers) {
|
|
@@ -4453,7 +4503,7 @@ var InterpolationConfig = class {
|
|
|
4453
4503
|
var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig("{{", "}}");
|
|
4454
4504
|
var DEFAULT_CONTAINER_BLOCKS = /* @__PURE__ */ new Set(["switch"]);
|
|
4455
4505
|
|
|
4456
|
-
// bazel-out/
|
|
4506
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/chars.mjs
|
|
4457
4507
|
var $EOF = 0;
|
|
4458
4508
|
var $BSPACE = 8;
|
|
4459
4509
|
var $TAB = 9;
|
|
@@ -4535,7 +4585,7 @@ function isQuote(code) {
|
|
|
4535
4585
|
return code === $SQ || code === $DQ || code === $BT;
|
|
4536
4586
|
}
|
|
4537
4587
|
|
|
4538
|
-
// bazel-out/
|
|
4588
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/parse_util.mjs
|
|
4539
4589
|
var ParseLocation = class {
|
|
4540
4590
|
constructor(file, offset, line, col) {
|
|
4541
4591
|
this.file = file;
|
|
@@ -4682,7 +4732,7 @@ function sanitizeIdentifier(name) {
|
|
|
4682
4732
|
return name.replace(/\W/g, "_");
|
|
4683
4733
|
}
|
|
4684
4734
|
|
|
4685
|
-
// bazel-out/
|
|
4735
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_js_emitter.mjs
|
|
4686
4736
|
var makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})';
|
|
4687
4737
|
var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
4688
4738
|
constructor() {
|
|
@@ -4775,7 +4825,7 @@ var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
|
4775
4825
|
}
|
|
4776
4826
|
};
|
|
4777
4827
|
|
|
4778
|
-
// bazel-out/
|
|
4828
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit_trusted_types.mjs
|
|
4779
4829
|
var policy;
|
|
4780
4830
|
function getPolicy() {
|
|
4781
4831
|
if (policy === void 0) {
|
|
@@ -4813,7 +4863,7 @@ function newTrustedFunctionForJIT(...args) {
|
|
|
4813
4863
|
return fn2.bind(_global);
|
|
4814
4864
|
}
|
|
4815
4865
|
|
|
4816
|
-
// bazel-out/
|
|
4866
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit.mjs
|
|
4817
4867
|
var JitEvaluator = class {
|
|
4818
4868
|
evaluateStatements(sourceUrl, statements, refResolver, createSourceMaps) {
|
|
4819
4869
|
const converter = new JitEmitterVisitor(refResolver);
|
|
@@ -4904,7 +4954,7 @@ function isUseStrictStatement(statement) {
|
|
|
4904
4954
|
return statement.isEquivalent(literal("use strict").toStmt());
|
|
4905
4955
|
}
|
|
4906
4956
|
|
|
4907
|
-
// bazel-out/
|
|
4957
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_injector_compiler.mjs
|
|
4908
4958
|
function compileInjector(meta) {
|
|
4909
4959
|
const definitionMap = new DefinitionMap();
|
|
4910
4960
|
if (meta.providers !== null) {
|
|
@@ -4921,7 +4971,7 @@ function createInjectorType(meta) {
|
|
|
4921
4971
|
return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));
|
|
4922
4972
|
}
|
|
4923
4973
|
|
|
4924
|
-
// bazel-out/
|
|
4974
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_jit.mjs
|
|
4925
4975
|
var R3JitReflector = class {
|
|
4926
4976
|
constructor(context) {
|
|
4927
4977
|
this.context = context;
|
|
@@ -4937,7 +4987,7 @@ var R3JitReflector = class {
|
|
|
4937
4987
|
}
|
|
4938
4988
|
};
|
|
4939
4989
|
|
|
4940
|
-
// bazel-out/
|
|
4990
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_module_compiler.mjs
|
|
4941
4991
|
var R3SelectorScopeMode;
|
|
4942
4992
|
(function(R3SelectorScopeMode2) {
|
|
4943
4993
|
R3SelectorScopeMode2[R3SelectorScopeMode2["Inline"] = 0] = "Inline";
|
|
@@ -5078,7 +5128,7 @@ function tupleOfTypes(types) {
|
|
|
5078
5128
|
return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;
|
|
5079
5129
|
}
|
|
5080
5130
|
|
|
5081
|
-
// bazel-out/
|
|
5131
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_pipe_compiler.mjs
|
|
5082
5132
|
function compilePipeFromMetadata(metadata) {
|
|
5083
5133
|
const definitionMapValues = [];
|
|
5084
5134
|
definitionMapValues.push({ key: "name", value: literal(metadata.pipeName), quoted: false });
|
|
@@ -5099,7 +5149,7 @@ function createPipeType(metadata) {
|
|
|
5099
5149
|
]));
|
|
5100
5150
|
}
|
|
5101
5151
|
|
|
5102
|
-
// bazel-out/
|
|
5152
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/api.mjs
|
|
5103
5153
|
var R3TemplateDependencyKind;
|
|
5104
5154
|
(function(R3TemplateDependencyKind2) {
|
|
5105
5155
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["Directive"] = 0] = "Directive";
|
|
@@ -5107,7 +5157,7 @@ var R3TemplateDependencyKind;
|
|
|
5107
5157
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["NgModule"] = 2] = "NgModule";
|
|
5108
5158
|
})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
|
|
5109
5159
|
|
|
5110
|
-
// bazel-out/
|
|
5160
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/ast.mjs
|
|
5111
5161
|
var ParserError = class {
|
|
5112
5162
|
constructor(message, input, errLocation, ctxLocation) {
|
|
5113
5163
|
this.input = input;
|
|
@@ -5773,7 +5823,7 @@ var BoundElementProperty = class {
|
|
|
5773
5823
|
}
|
|
5774
5824
|
};
|
|
5775
5825
|
|
|
5776
|
-
// bazel-out/
|
|
5826
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler_util/expression_converter.mjs
|
|
5777
5827
|
var _EventHandlerVars = class {
|
|
5778
5828
|
};
|
|
5779
5829
|
var EventHandlerVars = _EventHandlerVars;
|
|
@@ -6414,7 +6464,7 @@ var BuiltinFunctionCall = class extends Call {
|
|
|
6414
6464
|
}
|
|
6415
6465
|
};
|
|
6416
6466
|
|
|
6417
|
-
// bazel-out/
|
|
6467
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_security_schema.mjs
|
|
6418
6468
|
var _SECURITY_SCHEMA;
|
|
6419
6469
|
function SECURITY_SCHEMA() {
|
|
6420
6470
|
if (!_SECURITY_SCHEMA) {
|
|
@@ -6472,7 +6522,7 @@ function isIframeSecuritySensitiveAttr(attrName) {
|
|
|
6472
6522
|
return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());
|
|
6473
6523
|
}
|
|
6474
6524
|
|
|
6475
|
-
// bazel-out/
|
|
6525
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/shadow_css.mjs
|
|
6476
6526
|
var animationKeywords = /* @__PURE__ */ new Set([
|
|
6477
6527
|
"inherit",
|
|
6478
6528
|
"initial",
|
|
@@ -6943,7 +6993,7 @@ function repeatGroups(groups, multiples) {
|
|
|
6943
6993
|
}
|
|
6944
6994
|
}
|
|
6945
6995
|
|
|
6946
|
-
// bazel-out/
|
|
6996
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/enums.mjs
|
|
6947
6997
|
var OpKind;
|
|
6948
6998
|
(function(OpKind2) {
|
|
6949
6999
|
OpKind2[OpKind2["ListEnd"] = 0] = "ListEnd";
|
|
@@ -7097,8 +7147,13 @@ var DerivedRepeaterVarIdentity;
|
|
|
7097
7147
|
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Even"] = 2] = "Even";
|
|
7098
7148
|
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Odd"] = 3] = "Odd";
|
|
7099
7149
|
})(DerivedRepeaterVarIdentity || (DerivedRepeaterVarIdentity = {}));
|
|
7150
|
+
var I18nContextKind;
|
|
7151
|
+
(function(I18nContextKind2) {
|
|
7152
|
+
I18nContextKind2[I18nContextKind2["RootI18n"] = 0] = "RootI18n";
|
|
7153
|
+
I18nContextKind2[I18nContextKind2["Icu"] = 1] = "Icu";
|
|
7154
|
+
})(I18nContextKind || (I18nContextKind = {}));
|
|
7100
7155
|
|
|
7101
|
-
// bazel-out/
|
|
7156
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/traits.mjs
|
|
7102
7157
|
var ConsumesSlot = Symbol("ConsumesSlot");
|
|
7103
7158
|
var DependsOnSlotContext = Symbol("DependsOnSlotContext");
|
|
7104
7159
|
var ConsumesVarsTrait = Symbol("ConsumesVars");
|
|
@@ -7130,7 +7185,7 @@ function hasUsesVarOffsetTrait(expr) {
|
|
|
7130
7185
|
return expr[UsesVarOffset] === true;
|
|
7131
7186
|
}
|
|
7132
7187
|
|
|
7133
|
-
// bazel-out/
|
|
7188
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/shared.mjs
|
|
7134
7189
|
function createStatementOp(statement) {
|
|
7135
7190
|
return __spreadValues({
|
|
7136
7191
|
kind: OpKind.Statement,
|
|
@@ -7152,7 +7207,7 @@ var NEW_OP = {
|
|
|
7152
7207
|
next: null
|
|
7153
7208
|
};
|
|
7154
7209
|
|
|
7155
|
-
// bazel-out/
|
|
7210
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/update.mjs
|
|
7156
7211
|
function createInterpolateTextOp(xref, interpolation, i18nPlaceholders, sourceSpan) {
|
|
7157
7212
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7158
7213
|
kind: OpKind.InterpolateText,
|
|
@@ -7301,7 +7356,7 @@ function createI18nApplyOp(target, handle, sourceSpan) {
|
|
|
7301
7356
|
}, NEW_OP);
|
|
7302
7357
|
}
|
|
7303
7358
|
|
|
7304
|
-
// bazel-out/
|
|
7359
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/expression.mjs
|
|
7305
7360
|
var _a;
|
|
7306
7361
|
var _b;
|
|
7307
7362
|
var _c;
|
|
@@ -8152,7 +8207,7 @@ function isStringLiteral(expr) {
|
|
|
8152
8207
|
return expr instanceof LiteralExpr && typeof expr.value === "string";
|
|
8153
8208
|
}
|
|
8154
8209
|
|
|
8155
|
-
// bazel-out/
|
|
8210
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/operations.mjs
|
|
8156
8211
|
var _OpList = class {
|
|
8157
8212
|
constructor() {
|
|
8158
8213
|
this.debugListId = _OpList.nextListId++;
|
|
@@ -8343,14 +8398,14 @@ var OpList = _OpList;
|
|
|
8343
8398
|
_OpList.nextListId = 0;
|
|
8344
8399
|
})();
|
|
8345
8400
|
|
|
8346
|
-
// bazel-out/
|
|
8401
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/handle.mjs
|
|
8347
8402
|
var SlotHandle = class {
|
|
8348
8403
|
constructor() {
|
|
8349
8404
|
this.slot = null;
|
|
8350
8405
|
}
|
|
8351
8406
|
};
|
|
8352
8407
|
|
|
8353
|
-
// bazel-out/
|
|
8408
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/create.mjs
|
|
8354
8409
|
var elementContainerOpKinds = /* @__PURE__ */ new Set([
|
|
8355
8410
|
OpKind.Element,
|
|
8356
8411
|
OpKind.ElementStart,
|
|
@@ -8582,9 +8637,10 @@ function createIcuEndOp(xref) {
|
|
|
8582
8637
|
xref
|
|
8583
8638
|
}, NEW_OP);
|
|
8584
8639
|
}
|
|
8585
|
-
function createI18nContextOp(xref, i18nBlock, message, sourceSpan) {
|
|
8640
|
+
function createI18nContextOp(contextKind, xref, i18nBlock, message, sourceSpan) {
|
|
8586
8641
|
return __spreadValues({
|
|
8587
8642
|
kind: OpKind.I18nContext,
|
|
8643
|
+
contextKind,
|
|
8588
8644
|
xref,
|
|
8589
8645
|
i18nBlock,
|
|
8590
8646
|
message,
|
|
@@ -8594,7 +8650,7 @@ function createI18nContextOp(xref, i18nBlock, message, sourceSpan) {
|
|
|
8594
8650
|
}, NEW_OP);
|
|
8595
8651
|
}
|
|
8596
8652
|
|
|
8597
|
-
// bazel-out/
|
|
8653
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/host.mjs
|
|
8598
8654
|
function createHostPropertyOp(name, expression, isAnimationTrigger, sourceSpan) {
|
|
8599
8655
|
return __spreadValues(__spreadValues({
|
|
8600
8656
|
kind: OpKind.HostProperty,
|
|
@@ -8605,10 +8661,10 @@ function createHostPropertyOp(name, expression, isAnimationTrigger, sourceSpan)
|
|
|
8605
8661
|
}, TRAIT_CONSUMES_VARS), NEW_OP);
|
|
8606
8662
|
}
|
|
8607
8663
|
|
|
8608
|
-
// bazel-out/
|
|
8664
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/variable.mjs
|
|
8609
8665
|
var CTX_REF = "CTX_REF_MARKER";
|
|
8610
8666
|
|
|
8611
|
-
// bazel-out/
|
|
8667
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/compilation.mjs
|
|
8612
8668
|
var CompilationJobKind;
|
|
8613
8669
|
(function(CompilationJobKind2) {
|
|
8614
8670
|
CompilationJobKind2[CompilationJobKind2["Tmpl"] = 0] = "Tmpl";
|
|
@@ -8715,7 +8771,7 @@ var HostBindingCompilationUnit = class extends CompilationUnit {
|
|
|
8715
8771
|
}
|
|
8716
8772
|
};
|
|
8717
8773
|
|
|
8718
|
-
// bazel-out/
|
|
8774
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/any_cast.mjs
|
|
8719
8775
|
function deleteAnyCasts(job) {
|
|
8720
8776
|
for (const unit of job.units) {
|
|
8721
8777
|
for (const op of unit.ops()) {
|
|
@@ -8733,7 +8789,7 @@ function removeAnys(e) {
|
|
|
8733
8789
|
return e;
|
|
8734
8790
|
}
|
|
8735
8791
|
|
|
8736
|
-
// bazel-out/
|
|
8792
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/apply_i18n_expressions.mjs
|
|
8737
8793
|
function applyI18nExpressions(job) {
|
|
8738
8794
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
8739
8795
|
for (const unit of job.units) {
|
|
@@ -8764,10 +8820,9 @@ function needsApplication(i18nContexts, op) {
|
|
|
8764
8820
|
return false;
|
|
8765
8821
|
}
|
|
8766
8822
|
|
|
8767
|
-
// bazel-out/
|
|
8823
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/assign_i18n_slot_dependencies.mjs
|
|
8768
8824
|
function assignI18nSlotDependencies(job) {
|
|
8769
8825
|
const i18nLastSlotConsumers = /* @__PURE__ */ new Map();
|
|
8770
|
-
const i18nContexts = /* @__PURE__ */ new Map();
|
|
8771
8826
|
let lastSlotConsumer = null;
|
|
8772
8827
|
let currentI18nOp = null;
|
|
8773
8828
|
for (const unit of job.units) {
|
|
@@ -8783,21 +8838,17 @@ function assignI18nSlotDependencies(job) {
|
|
|
8783
8838
|
i18nLastSlotConsumers.set(currentI18nOp.xref, lastSlotConsumer);
|
|
8784
8839
|
currentI18nOp = null;
|
|
8785
8840
|
break;
|
|
8786
|
-
case OpKind.I18nContext:
|
|
8787
|
-
i18nContexts.set(op.xref, op);
|
|
8788
|
-
break;
|
|
8789
8841
|
}
|
|
8790
8842
|
}
|
|
8791
8843
|
for (const op of unit.update) {
|
|
8792
8844
|
if (op.kind === OpKind.I18nExpression) {
|
|
8793
|
-
|
|
8794
|
-
op.target = i18nLastSlotConsumers.get(i18nContext.i18nBlock);
|
|
8845
|
+
op.target = i18nLastSlotConsumers.get(op.target);
|
|
8795
8846
|
}
|
|
8796
8847
|
}
|
|
8797
8848
|
}
|
|
8798
8849
|
}
|
|
8799
8850
|
|
|
8800
|
-
// bazel-out/
|
|
8851
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/util/elements.mjs
|
|
8801
8852
|
function createOpXrefMap(unit) {
|
|
8802
8853
|
const map = /* @__PURE__ */ new Map();
|
|
8803
8854
|
for (const op of unit.create) {
|
|
@@ -8809,7 +8860,7 @@ function createOpXrefMap(unit) {
|
|
|
8809
8860
|
return map;
|
|
8810
8861
|
}
|
|
8811
8862
|
|
|
8812
|
-
// bazel-out/
|
|
8863
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/attribute_extraction.mjs
|
|
8813
8864
|
function extractAttributes(job) {
|
|
8814
8865
|
for (const unit of job.units) {
|
|
8815
8866
|
const elements = createOpXrefMap(unit);
|
|
@@ -8876,7 +8927,7 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
8876
8927
|
}
|
|
8877
8928
|
}
|
|
8878
8929
|
|
|
8879
|
-
// bazel-out/
|
|
8930
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/binding_specialization.mjs
|
|
8880
8931
|
function lookupElement2(elements, xref) {
|
|
8881
8932
|
const el = elements.get(xref);
|
|
8882
8933
|
if (el === void 0) {
|
|
@@ -8926,7 +8977,7 @@ function specializeBindings(job) {
|
|
|
8926
8977
|
}
|
|
8927
8978
|
}
|
|
8928
8979
|
|
|
8929
|
-
// bazel-out/
|
|
8980
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/chaining.mjs
|
|
8930
8981
|
var CHAINABLE = /* @__PURE__ */ new Set([
|
|
8931
8982
|
Identifiers.attribute,
|
|
8932
8983
|
Identifiers.classProp,
|
|
@@ -8992,7 +9043,7 @@ function chainOperationsInList(opList) {
|
|
|
8992
9043
|
}
|
|
8993
9044
|
}
|
|
8994
9045
|
|
|
8995
|
-
// bazel-out/
|
|
9046
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/collapse_singleton_interpolations.mjs
|
|
8996
9047
|
function collapseSingletonInterpolations(job) {
|
|
8997
9048
|
for (const unit of job.units) {
|
|
8998
9049
|
for (const op of unit.update) {
|
|
@@ -9004,7 +9055,7 @@ function collapseSingletonInterpolations(job) {
|
|
|
9004
9055
|
}
|
|
9005
9056
|
}
|
|
9006
9057
|
|
|
9007
|
-
// bazel-out/
|
|
9058
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/conditionals.mjs
|
|
9008
9059
|
function generateConditionalExpressions(job) {
|
|
9009
9060
|
for (const unit of job.units) {
|
|
9010
9061
|
for (const op of unit.ops()) {
|
|
@@ -9041,40 +9092,7 @@ function generateConditionalExpressions(job) {
|
|
|
9041
9092
|
}
|
|
9042
9093
|
}
|
|
9043
9094
|
|
|
9044
|
-
// bazel-out/
|
|
9045
|
-
var TagContentType;
|
|
9046
|
-
(function(TagContentType2) {
|
|
9047
|
-
TagContentType2[TagContentType2["RAW_TEXT"] = 0] = "RAW_TEXT";
|
|
9048
|
-
TagContentType2[TagContentType2["ESCAPABLE_RAW_TEXT"] = 1] = "ESCAPABLE_RAW_TEXT";
|
|
9049
|
-
TagContentType2[TagContentType2["PARSABLE_DATA"] = 2] = "PARSABLE_DATA";
|
|
9050
|
-
})(TagContentType || (TagContentType = {}));
|
|
9051
|
-
function splitNsName(elementName) {
|
|
9052
|
-
if (elementName[0] != ":") {
|
|
9053
|
-
return [null, elementName];
|
|
9054
|
-
}
|
|
9055
|
-
const colonIndex = elementName.indexOf(":", 1);
|
|
9056
|
-
if (colonIndex === -1) {
|
|
9057
|
-
throw new Error(`Unsupported format "${elementName}" expecting ":namespace:name"`);
|
|
9058
|
-
}
|
|
9059
|
-
return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)];
|
|
9060
|
-
}
|
|
9061
|
-
function isNgContainer(tagName) {
|
|
9062
|
-
return splitNsName(tagName)[1] === "ng-container";
|
|
9063
|
-
}
|
|
9064
|
-
function isNgContent(tagName) {
|
|
9065
|
-
return splitNsName(tagName)[1] === "ng-content";
|
|
9066
|
-
}
|
|
9067
|
-
function isNgTemplate(tagName) {
|
|
9068
|
-
return splitNsName(tagName)[1] === "ng-template";
|
|
9069
|
-
}
|
|
9070
|
-
function getNsPrefix(fullName) {
|
|
9071
|
-
return fullName === null ? null : splitNsName(fullName)[0];
|
|
9072
|
-
}
|
|
9073
|
-
function mergeNsAndName(prefix, localName) {
|
|
9074
|
-
return prefix ? `:${prefix}:${localName}` : localName;
|
|
9075
|
-
}
|
|
9076
|
-
|
|
9077
|
-
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
|
|
9095
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
|
|
9078
9096
|
var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
9079
9097
|
["&&", BinaryOperator.And],
|
|
9080
9098
|
[">", BinaryOperator.Bigger],
|
|
@@ -9124,7 +9142,7 @@ function literalOrArrayLiteral(value) {
|
|
|
9124
9142
|
return literal(value);
|
|
9125
9143
|
}
|
|
9126
9144
|
|
|
9127
|
-
// bazel-out/
|
|
9145
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/const_collection.mjs
|
|
9128
9146
|
function collectElementConsts(job) {
|
|
9129
9147
|
const allElementAttributes = /* @__PURE__ */ new Map();
|
|
9130
9148
|
for (const unit of job.units) {
|
|
@@ -9258,7 +9276,7 @@ function serializeAttributes({ attributes, bindings, classes, i18n: i18n2, proje
|
|
|
9258
9276
|
return literalArr(attrArray);
|
|
9259
9277
|
}
|
|
9260
9278
|
|
|
9261
|
-
// bazel-out/
|
|
9279
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_defer_deps_fns.mjs
|
|
9262
9280
|
function createDeferDepsFns(job) {
|
|
9263
9281
|
for (const unit of job.units) {
|
|
9264
9282
|
for (const op of unit.create) {
|
|
@@ -9286,18 +9304,22 @@ function createDeferDepsFns(job) {
|
|
|
9286
9304
|
}
|
|
9287
9305
|
}
|
|
9288
9306
|
|
|
9289
|
-
// bazel-out/
|
|
9307
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_i18n_contexts.mjs
|
|
9290
9308
|
function createI18nContexts(job) {
|
|
9309
|
+
const rootContexts = /* @__PURE__ */ new Map();
|
|
9291
9310
|
let currentI18nOp = null;
|
|
9292
9311
|
let xref;
|
|
9293
9312
|
for (const unit of job.units) {
|
|
9294
9313
|
for (const op of unit.create) {
|
|
9295
9314
|
switch (op.kind) {
|
|
9296
9315
|
case OpKind.I18nStart:
|
|
9297
|
-
xref = job.allocateXrefId();
|
|
9298
|
-
unit.create.push(createI18nContextOp(xref, op.xref, op.message, null));
|
|
9299
|
-
op.context = xref;
|
|
9300
9316
|
currentI18nOp = op;
|
|
9317
|
+
if (op.xref === op.root) {
|
|
9318
|
+
xref = job.allocateXrefId();
|
|
9319
|
+
unit.create.push(createI18nContextOp(I18nContextKind.RootI18n, xref, op.xref, op.message, null));
|
|
9320
|
+
op.context = xref;
|
|
9321
|
+
rootContexts.set(op.xref, xref);
|
|
9322
|
+
}
|
|
9301
9323
|
break;
|
|
9302
9324
|
case OpKind.I18nEnd:
|
|
9303
9325
|
currentI18nOp = null;
|
|
@@ -9308,7 +9330,7 @@ function createI18nContexts(job) {
|
|
|
9308
9330
|
}
|
|
9309
9331
|
if (op.message.id !== currentI18nOp.message.id) {
|
|
9310
9332
|
xref = job.allocateXrefId();
|
|
9311
|
-
unit.create.push(createI18nContextOp(xref, currentI18nOp.xref, op.message, null));
|
|
9333
|
+
unit.create.push(createI18nContextOp(I18nContextKind.Icu, xref, currentI18nOp.xref, op.message, null));
|
|
9312
9334
|
op.context = xref;
|
|
9313
9335
|
} else {
|
|
9314
9336
|
op.context = currentI18nOp.context;
|
|
@@ -9317,9 +9339,16 @@ function createI18nContexts(job) {
|
|
|
9317
9339
|
}
|
|
9318
9340
|
}
|
|
9319
9341
|
}
|
|
9342
|
+
for (const unit of job.units) {
|
|
9343
|
+
for (const op of unit.create) {
|
|
9344
|
+
if (op.kind === OpKind.I18nStart && op.xref !== op.root) {
|
|
9345
|
+
op.context = rootContexts.get(op.root);
|
|
9346
|
+
}
|
|
9347
|
+
}
|
|
9348
|
+
}
|
|
9320
9349
|
}
|
|
9321
9350
|
|
|
9322
|
-
// bazel-out/
|
|
9351
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_configs.mjs
|
|
9323
9352
|
function configureDeferInstructions(job) {
|
|
9324
9353
|
for (const unit of job.units) {
|
|
9325
9354
|
for (const op of unit.create) {
|
|
@@ -9336,7 +9365,7 @@ function configureDeferInstructions(job) {
|
|
|
9336
9365
|
}
|
|
9337
9366
|
}
|
|
9338
9367
|
|
|
9339
|
-
// bazel-out/
|
|
9368
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_resolve_targets.mjs
|
|
9340
9369
|
function resolveDeferTargetNames(job) {
|
|
9341
9370
|
const scopes = /* @__PURE__ */ new Map();
|
|
9342
9371
|
function getScopeForView2(view) {
|
|
@@ -9430,7 +9459,7 @@ var Scope = class {
|
|
|
9430
9459
|
}
|
|
9431
9460
|
};
|
|
9432
9461
|
|
|
9433
|
-
// bazel-out/
|
|
9462
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/empty_elements.mjs
|
|
9434
9463
|
var REPLACEMENTS = /* @__PURE__ */ new Map([
|
|
9435
9464
|
[OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]],
|
|
9436
9465
|
[OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]],
|
|
@@ -9457,7 +9486,7 @@ function collapseEmptyInstructions(job) {
|
|
|
9457
9486
|
}
|
|
9458
9487
|
}
|
|
9459
9488
|
|
|
9460
|
-
// bazel-out/
|
|
9489
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/expand_safe_reads.mjs
|
|
9461
9490
|
function expandSafeReads(job) {
|
|
9462
9491
|
for (const unit of job.units) {
|
|
9463
9492
|
for (const op of unit.ops()) {
|
|
@@ -9593,7 +9622,7 @@ function ternaryTransform(e) {
|
|
|
9593
9622
|
return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr);
|
|
9594
9623
|
}
|
|
9595
9624
|
|
|
9596
|
-
// bazel-out/
|
|
9625
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/extract_i18n_messages.mjs
|
|
9597
9626
|
var ESCAPE = "\uFFFD";
|
|
9598
9627
|
var ELEMENT_MARKER = "#";
|
|
9599
9628
|
var TEMPLATE_MARKER = "*";
|
|
@@ -9604,7 +9633,7 @@ var LIST_END_MARKER = "]";
|
|
|
9604
9633
|
var LIST_DELIMITER = "|";
|
|
9605
9634
|
function extractI18nMessages(job) {
|
|
9606
9635
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
9607
|
-
const
|
|
9636
|
+
const i18nBlocks = /* @__PURE__ */ new Map();
|
|
9608
9637
|
for (const unit of job.units) {
|
|
9609
9638
|
for (const op of unit.create) {
|
|
9610
9639
|
switch (op.kind) {
|
|
@@ -9612,7 +9641,7 @@ function extractI18nMessages(job) {
|
|
|
9612
9641
|
i18nContexts.set(op.xref, op);
|
|
9613
9642
|
break;
|
|
9614
9643
|
case OpKind.I18nStart:
|
|
9615
|
-
|
|
9644
|
+
i18nBlocks.set(op.xref, op);
|
|
9616
9645
|
break;
|
|
9617
9646
|
}
|
|
9618
9647
|
}
|
|
@@ -9637,11 +9666,12 @@ function extractI18nMessages(job) {
|
|
|
9637
9666
|
if (!op.context) {
|
|
9638
9667
|
throw Error("ICU op should have its context set.");
|
|
9639
9668
|
}
|
|
9640
|
-
|
|
9641
|
-
|
|
9669
|
+
const i18nContext = i18nContexts.get(op.context);
|
|
9670
|
+
if (i18nContext.contextKind === I18nContextKind.Icu) {
|
|
9642
9671
|
const subMessage = createI18nMessage(job, i18nContext, op.messagePlaceholder);
|
|
9643
9672
|
unit.create.push(subMessage);
|
|
9644
|
-
const
|
|
9673
|
+
const rootI18nId = i18nBlocks.get(i18nContext.i18nBlock).root;
|
|
9674
|
+
const parentMessage = i18nBlockMessages.get(rootI18nId);
|
|
9645
9675
|
parentMessage == null ? void 0 : parentMessage.subMessages.push(subMessage.xref);
|
|
9646
9676
|
}
|
|
9647
9677
|
OpList.remove(op);
|
|
@@ -9654,30 +9684,67 @@ function extractI18nMessages(job) {
|
|
|
9654
9684
|
}
|
|
9655
9685
|
}
|
|
9656
9686
|
function createI18nMessage(job, context, messagePlaceholder) {
|
|
9657
|
-
let needsPostprocessing = context.
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
|
|
9661
|
-
}
|
|
9662
|
-
}
|
|
9663
|
-
return createI18nMessageOp(job.allocateXrefId(), context.i18nBlock, context.message, messagePlaceholder != null ? messagePlaceholder : null, formatParams(context.params), formatParams(context.postprocessingParams), needsPostprocessing);
|
|
9687
|
+
let [formattedParams, needsPostprocessing] = formatParams(context.params);
|
|
9688
|
+
const [formattedPostprocessingParams] = formatParams(context.postprocessingParams);
|
|
9689
|
+
needsPostprocessing || (needsPostprocessing = formattedPostprocessingParams.size > 0);
|
|
9690
|
+
return createI18nMessageOp(job.allocateXrefId(), context.i18nBlock, context.message, messagePlaceholder != null ? messagePlaceholder : null, formattedParams, formattedPostprocessingParams, needsPostprocessing);
|
|
9664
9691
|
}
|
|
9665
9692
|
function formatParams(params) {
|
|
9666
|
-
const
|
|
9693
|
+
const formattedParams = /* @__PURE__ */ new Map();
|
|
9694
|
+
let needsPostprocessing = false;
|
|
9667
9695
|
for (const [placeholder, placeholderValues] of params) {
|
|
9668
|
-
const serializedValues = formatParamValues(placeholderValues);
|
|
9696
|
+
const [serializedValues, paramNeedsPostprocessing] = formatParamValues(placeholderValues);
|
|
9697
|
+
needsPostprocessing || (needsPostprocessing = paramNeedsPostprocessing);
|
|
9669
9698
|
if (serializedValues !== null) {
|
|
9670
|
-
|
|
9699
|
+
formattedParams.set(placeholder, literal(serializedValues));
|
|
9671
9700
|
}
|
|
9672
9701
|
}
|
|
9673
|
-
return
|
|
9702
|
+
return [formattedParams, needsPostprocessing];
|
|
9674
9703
|
}
|
|
9675
9704
|
function formatParamValues(values) {
|
|
9676
9705
|
if (values.length === 0) {
|
|
9677
|
-
return null;
|
|
9706
|
+
return [null, false];
|
|
9678
9707
|
}
|
|
9708
|
+
collapseElementTemplatePairs(values);
|
|
9679
9709
|
const serializedValues = values.map((value) => formatValue(value));
|
|
9680
|
-
return serializedValues.length === 1 ? serializedValues[0] : `${LIST_START_MARKER}${serializedValues.join(LIST_DELIMITER)}${LIST_END_MARKER}
|
|
9710
|
+
return serializedValues.length === 1 ? [serializedValues[0], false] : [`${LIST_START_MARKER}${serializedValues.join(LIST_DELIMITER)}${LIST_END_MARKER}`, true];
|
|
9711
|
+
}
|
|
9712
|
+
function collapseElementTemplatePairs(values) {
|
|
9713
|
+
var _a2;
|
|
9714
|
+
const valueIndiciesBySubTemplateIndex = /* @__PURE__ */ new Map();
|
|
9715
|
+
for (let i = 0; i < values.length; i++) {
|
|
9716
|
+
const value = values[i];
|
|
9717
|
+
if (value.subTemplateIndex !== null && value.flags & (I18nParamValueFlags.ElementTag | I18nParamValueFlags.TemplateTag)) {
|
|
9718
|
+
const valueIndicies = (_a2 = valueIndiciesBySubTemplateIndex.get(value.subTemplateIndex)) != null ? _a2 : [];
|
|
9719
|
+
valueIndicies.push(i);
|
|
9720
|
+
valueIndiciesBySubTemplateIndex.set(value.subTemplateIndex, valueIndicies);
|
|
9721
|
+
}
|
|
9722
|
+
}
|
|
9723
|
+
for (const [subTemplateIndex, valueIndicies] of valueIndiciesBySubTemplateIndex) {
|
|
9724
|
+
if (valueIndicies.length > 1) {
|
|
9725
|
+
const elementIndex = valueIndicies.find((index) => values[index].flags & I18nParamValueFlags.ElementTag);
|
|
9726
|
+
const templateIndex = valueIndicies.find((index) => values[index].flags & I18nParamValueFlags.TemplateTag);
|
|
9727
|
+
if (elementIndex !== void 0 && templateIndex !== void 0) {
|
|
9728
|
+
const elementValue = values[elementIndex];
|
|
9729
|
+
const templateValue = values[templateIndex];
|
|
9730
|
+
let compundValue;
|
|
9731
|
+
if (elementValue.flags & I18nParamValueFlags.OpenTag && elementValue.flags & I18nParamValueFlags.CloseTag) {
|
|
9732
|
+
compundValue = `${formatValue(templateValue)}${formatValue(elementValue)}${formatValue(templateValue)}`;
|
|
9733
|
+
} else if (elementValue.flags & I18nParamValueFlags.OpenTag) {
|
|
9734
|
+
compundValue = `${formatValue(templateValue)}${formatValue(elementValue)}`;
|
|
9735
|
+
} else {
|
|
9736
|
+
compundValue = `${formatValue(elementValue)}${formatValue(templateValue)}`;
|
|
9737
|
+
}
|
|
9738
|
+
values.splice(elementIndex, 1, { value: compundValue, subTemplateIndex, flags: I18nParamValueFlags.None });
|
|
9739
|
+
values.splice(templateIndex, 1, null);
|
|
9740
|
+
}
|
|
9741
|
+
}
|
|
9742
|
+
}
|
|
9743
|
+
for (let i = values.length - 1; i >= 0; i--) {
|
|
9744
|
+
if (values[i] === null) {
|
|
9745
|
+
values.splice(i, 1);
|
|
9746
|
+
}
|
|
9747
|
+
}
|
|
9681
9748
|
}
|
|
9682
9749
|
function formatValue(value) {
|
|
9683
9750
|
if (value.flags === I18nParamValueFlags.None) {
|
|
@@ -9700,7 +9767,7 @@ function formatValue(value) {
|
|
|
9700
9767
|
return `${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
|
|
9701
9768
|
}
|
|
9702
9769
|
|
|
9703
|
-
// bazel-out/
|
|
9770
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_advance.mjs
|
|
9704
9771
|
function generateAdvance(job) {
|
|
9705
9772
|
for (const unit of job.units) {
|
|
9706
9773
|
const slotMap = /* @__PURE__ */ new Map();
|
|
@@ -9732,7 +9799,7 @@ function generateAdvance(job) {
|
|
|
9732
9799
|
}
|
|
9733
9800
|
}
|
|
9734
9801
|
|
|
9735
|
-
// bazel-out/
|
|
9802
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_projection_def.mjs
|
|
9736
9803
|
function generateProjectionDefs(job) {
|
|
9737
9804
|
const share = job.compatibility === CompatibilityMode.TemplateDefinitionBuilder;
|
|
9738
9805
|
const selectors = [];
|
|
@@ -9756,7 +9823,7 @@ function generateProjectionDefs(job) {
|
|
|
9756
9823
|
}
|
|
9757
9824
|
}
|
|
9758
9825
|
|
|
9759
|
-
// bazel-out/
|
|
9826
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_variables.mjs
|
|
9760
9827
|
function generateVariables(job) {
|
|
9761
9828
|
recursivelyProcessView(job.root, null);
|
|
9762
9829
|
}
|
|
@@ -9844,7 +9911,7 @@ function generateVariablesInScopeForView(view, scope) {
|
|
|
9844
9911
|
return newOps;
|
|
9845
9912
|
}
|
|
9846
9913
|
|
|
9847
|
-
// bazel-out/
|
|
9914
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/has_const_expression_collection.mjs
|
|
9848
9915
|
function collectConstExpressions(job) {
|
|
9849
9916
|
for (const unit of job.units) {
|
|
9850
9917
|
for (const op of unit.ops()) {
|
|
@@ -9858,7 +9925,7 @@ function collectConstExpressions(job) {
|
|
|
9858
9925
|
}
|
|
9859
9926
|
}
|
|
9860
9927
|
|
|
9861
|
-
// bazel-out/
|
|
9928
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/host_style_property_parsing.mjs
|
|
9862
9929
|
var STYLE_DOT = "style.";
|
|
9863
9930
|
var CLASS_DOT = "class.";
|
|
9864
9931
|
var STYLE_BANG = "style!";
|
|
@@ -9916,7 +9983,7 @@ function parseProperty(name) {
|
|
|
9916
9983
|
return { property: property2, suffix };
|
|
9917
9984
|
}
|
|
9918
9985
|
|
|
9919
|
-
// bazel-out/
|
|
9986
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/map_util.mjs
|
|
9920
9987
|
function mapLiteral(obj, quoted = false) {
|
|
9921
9988
|
return literalMap(Object.keys(obj).map((key) => ({
|
|
9922
9989
|
key,
|
|
@@ -9925,7 +9992,7 @@ function mapLiteral(obj, quoted = false) {
|
|
|
9925
9992
|
})));
|
|
9926
9993
|
}
|
|
9927
9994
|
|
|
9928
|
-
// bazel-out/
|
|
9995
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/icu_serializer.mjs
|
|
9929
9996
|
var IcuSerializerVisitor = class {
|
|
9930
9997
|
visitText(text2) {
|
|
9931
9998
|
return text2.value;
|
|
@@ -9959,7 +10026,7 @@ function serializeIcuNode(icu) {
|
|
|
9959
10026
|
return icu.visit(serializer);
|
|
9960
10027
|
}
|
|
9961
10028
|
|
|
9962
|
-
// bazel-out/
|
|
10029
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/lexer.mjs
|
|
9963
10030
|
var TokenType;
|
|
9964
10031
|
(function(TokenType2) {
|
|
9965
10032
|
TokenType2[TokenType2["Character"] = 0] = "Character";
|
|
@@ -10320,7 +10387,7 @@ function parseIntAutoRadix(text2) {
|
|
|
10320
10387
|
return result;
|
|
10321
10388
|
}
|
|
10322
10389
|
|
|
10323
|
-
// bazel-out/
|
|
10390
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/parser.mjs
|
|
10324
10391
|
var SplitInterpolation = class {
|
|
10325
10392
|
constructor(strings, expressions, offsets) {
|
|
10326
10393
|
this.strings = strings;
|
|
@@ -11214,7 +11281,7 @@ function getIndexMapForOriginalTemplate(interpolatedTokens) {
|
|
|
11214
11281
|
return offsetMap;
|
|
11215
11282
|
}
|
|
11216
11283
|
|
|
11217
|
-
// bazel-out/
|
|
11284
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/ast.mjs
|
|
11218
11285
|
var NodeWithI18n = class {
|
|
11219
11286
|
constructor(sourceSpan, i18n2) {
|
|
11220
11287
|
this.sourceSpan = sourceSpan;
|
|
@@ -11366,11 +11433,11 @@ var RecursiveVisitor = class {
|
|
|
11366
11433
|
}
|
|
11367
11434
|
};
|
|
11368
11435
|
|
|
11369
|
-
// bazel-out/
|
|
11436
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/element_schema_registry.mjs
|
|
11370
11437
|
var ElementSchemaRegistry = class {
|
|
11371
11438
|
};
|
|
11372
11439
|
|
|
11373
|
-
// bazel-out/
|
|
11440
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_element_schema_registry.mjs
|
|
11374
11441
|
var BOOLEAN = "boolean";
|
|
11375
11442
|
var NUMBER = "number";
|
|
11376
11443
|
var STRING = "string";
|
|
@@ -11723,7 +11790,7 @@ function _isPixelDimensionStyle(prop) {
|
|
|
11723
11790
|
}
|
|
11724
11791
|
}
|
|
11725
11792
|
|
|
11726
|
-
// bazel-out/
|
|
11793
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_tags.mjs
|
|
11727
11794
|
var HtmlTagDefinition = class {
|
|
11728
11795
|
constructor({ closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA, closedByParent = false, isVoid = false, ignoreFirstLf = false, preventNamespaceInheritance = false, canSelfClose = false } = {}) {
|
|
11729
11796
|
this.closedByChildren = {};
|
|
@@ -11841,7 +11908,7 @@ function getHtmlTagDefinition(tagName) {
|
|
|
11841
11908
|
return (_b2 = (_a2 = TAG_DEFINITIONS[tagName]) != null ? _a2 : TAG_DEFINITIONS[tagName.toLowerCase()]) != null ? _b2 : DEFAULT_TAG_DEFINITION;
|
|
11842
11909
|
}
|
|
11843
11910
|
|
|
11844
|
-
// bazel-out/
|
|
11911
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/placeholder.mjs
|
|
11845
11912
|
var TAG_TO_PLACEHOLDER_NAMES = {
|
|
11846
11913
|
"A": "LINK",
|
|
11847
11914
|
"B": "BOLD_TEXT",
|
|
@@ -11963,7 +12030,7 @@ var PlaceholderRegistry = class {
|
|
|
11963
12030
|
}
|
|
11964
12031
|
};
|
|
11965
12032
|
|
|
11966
|
-
// bazel-out/
|
|
12033
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_parser.mjs
|
|
11967
12034
|
var _expParser = new Parser(new Lexer());
|
|
11968
12035
|
function createI18nMessageFactory(interpolationConfig, containerBlocks) {
|
|
11969
12036
|
const visitor = new _I18nVisitor(_expParser, interpolationConfig, containerBlocks);
|
|
@@ -12142,14 +12209,14 @@ function extractPlaceholderName(input) {
|
|
|
12142
12209
|
return input.split(_CUSTOM_PH_EXP)[2];
|
|
12143
12210
|
}
|
|
12144
12211
|
|
|
12145
|
-
// bazel-out/
|
|
12212
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/parse_util.mjs
|
|
12146
12213
|
var I18nError = class extends ParseError {
|
|
12147
12214
|
constructor(span, msg) {
|
|
12148
12215
|
super(span, msg);
|
|
12149
12216
|
}
|
|
12150
12217
|
};
|
|
12151
12218
|
|
|
12152
|
-
// bazel-out/
|
|
12219
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/entities.mjs
|
|
12153
12220
|
var NAMED_ENTITIES = {
|
|
12154
12221
|
"AElig": "\xC6",
|
|
12155
12222
|
"AMP": "&",
|
|
@@ -14280,7 +14347,7 @@ var NAMED_ENTITIES = {
|
|
|
14280
14347
|
var NGSP_UNICODE = "\uE500";
|
|
14281
14348
|
NAMED_ENTITIES["ngsp"] = NGSP_UNICODE;
|
|
14282
14349
|
|
|
14283
|
-
// bazel-out/
|
|
14350
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/lexer.mjs
|
|
14284
14351
|
var TokenError = class extends ParseError {
|
|
14285
14352
|
constructor(errorMsg, tokenType, span) {
|
|
14286
14353
|
super(span, errorMsg);
|
|
@@ -15201,7 +15268,7 @@ var CursorError = class {
|
|
|
15201
15268
|
}
|
|
15202
15269
|
};
|
|
15203
15270
|
|
|
15204
|
-
// bazel-out/
|
|
15271
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/parser.mjs
|
|
15205
15272
|
var TreeError = class extends ParseError {
|
|
15206
15273
|
static create(elementName, span, msg) {
|
|
15207
15274
|
return new TreeError(elementName, span, msg);
|
|
@@ -15585,7 +15652,7 @@ function decodeEntity(match, entity) {
|
|
|
15585
15652
|
return match;
|
|
15586
15653
|
}
|
|
15587
15654
|
|
|
15588
|
-
// bazel-out/
|
|
15655
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/trusted_types_sinks.mjs
|
|
15589
15656
|
var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set([
|
|
15590
15657
|
"iframe|srcdoc",
|
|
15591
15658
|
"*|innerhtml",
|
|
@@ -15600,7 +15667,7 @@ function isTrustedTypesSink(tagName, propName) {
|
|
|
15600
15667
|
return TRUSTED_TYPES_SINKS.has(tagName + "|" + propName) || TRUSTED_TYPES_SINKS.has("*|" + propName);
|
|
15601
15668
|
}
|
|
15602
15669
|
|
|
15603
|
-
// bazel-out/
|
|
15670
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/meta.mjs
|
|
15604
15671
|
var setI18nRefs = (htmlNode, i18nNode) => {
|
|
15605
15672
|
if (htmlNode instanceof NodeWithI18n) {
|
|
15606
15673
|
if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {
|
|
@@ -15757,7 +15824,7 @@ function i18nMetaToJSDoc(meta) {
|
|
|
15757
15824
|
return jsDocComment(tags);
|
|
15758
15825
|
}
|
|
15759
15826
|
|
|
15760
|
-
// bazel-out/
|
|
15827
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/get_msg_utils.mjs
|
|
15761
15828
|
var GOOG_GET_MSG = "goog.getMsg";
|
|
15762
15829
|
function createGoogleGetMsgStatements(variable2, message, closureVar, placeholderValues) {
|
|
15763
15830
|
const messageString = serializeI18nMessageForGetMsg(message);
|
|
@@ -15808,7 +15875,7 @@ function serializeI18nMessageForGetMsg(message) {
|
|
|
15808
15875
|
return message.nodes.map((node) => node.visit(serializerVisitor2, null)).join("");
|
|
15809
15876
|
}
|
|
15810
15877
|
|
|
15811
|
-
// bazel-out/
|
|
15878
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/localize_utils.mjs
|
|
15812
15879
|
function createLocalizeStatements(variable2, message, params) {
|
|
15813
15880
|
const { messageParts, placeHolders } = serializeI18nMessageForLocalize(message);
|
|
15814
15881
|
const sourceSpan = getSourceSpan(message);
|
|
@@ -15897,7 +15964,7 @@ function createEmptyMessagePart(location) {
|
|
|
15897
15964
|
return new LiteralPiece("", new ParseSourceSpan(location, location));
|
|
15898
15965
|
}
|
|
15899
15966
|
|
|
15900
|
-
// bazel-out/
|
|
15967
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_const_collection.mjs
|
|
15901
15968
|
var NG_I18N_CLOSURE_MODE = "ngI18nClosureMode";
|
|
15902
15969
|
var TRANSLATION_VAR_PREFIX2 = "i18n_";
|
|
15903
15970
|
function collectI18nConsts(job) {
|
|
@@ -15992,7 +16059,7 @@ function assertAllParamsResolved(op) {
|
|
|
15992
16059
|
}
|
|
15993
16060
|
}
|
|
15994
16061
|
|
|
15995
|
-
// bazel-out/
|
|
16062
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_text_extraction.mjs
|
|
15996
16063
|
function extractI18nText(job) {
|
|
15997
16064
|
var _a2;
|
|
15998
16065
|
for (const unit of job.units) {
|
|
@@ -16051,7 +16118,7 @@ function extractI18nText(job) {
|
|
|
16051
16118
|
}
|
|
16052
16119
|
}
|
|
16053
16120
|
|
|
16054
|
-
// bazel-out/
|
|
16121
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/local_refs.mjs
|
|
16055
16122
|
function liftLocalRefs(job) {
|
|
16056
16123
|
for (const unit of job.units) {
|
|
16057
16124
|
for (const op of unit.create) {
|
|
@@ -16081,48 +16148,7 @@ function serializeLocalRefs(refs) {
|
|
|
16081
16148
|
return literalArr(constRefs);
|
|
16082
16149
|
}
|
|
16083
16150
|
|
|
16084
|
-
// bazel-out/
|
|
16085
|
-
function mergeI18nContexts(job) {
|
|
16086
|
-
const i18nOps = /* @__PURE__ */ new Map();
|
|
16087
|
-
const i18nContexts = /* @__PURE__ */ new Map();
|
|
16088
|
-
for (const unit of job.units) {
|
|
16089
|
-
for (const op of unit.create) {
|
|
16090
|
-
switch (op.kind) {
|
|
16091
|
-
case OpKind.I18nStart:
|
|
16092
|
-
if (!op.context) {
|
|
16093
|
-
throw Error("I18n op should have its context set.");
|
|
16094
|
-
}
|
|
16095
|
-
i18nOps.set(op.xref, op);
|
|
16096
|
-
break;
|
|
16097
|
-
case OpKind.I18nContext:
|
|
16098
|
-
i18nContexts.set(op.xref, op);
|
|
16099
|
-
break;
|
|
16100
|
-
}
|
|
16101
|
-
}
|
|
16102
|
-
}
|
|
16103
|
-
for (const childI18nOp of i18nOps.values()) {
|
|
16104
|
-
if (childI18nOp.xref !== childI18nOp.root) {
|
|
16105
|
-
const childContext = i18nContexts.get(childI18nOp.context);
|
|
16106
|
-
const rootI18nOp = i18nOps.get(childI18nOp.root);
|
|
16107
|
-
const rootContext = i18nContexts.get(rootI18nOp.context);
|
|
16108
|
-
mergeParams(rootContext.params, childContext.params);
|
|
16109
|
-
mergeParams(rootContext.postprocessingParams, childContext.postprocessingParams);
|
|
16110
|
-
}
|
|
16111
|
-
}
|
|
16112
|
-
}
|
|
16113
|
-
function mergeParams(to, from) {
|
|
16114
|
-
for (const [placeholder, fromValues] of from) {
|
|
16115
|
-
const toValues = to.get(placeholder) || [];
|
|
16116
|
-
const flags = fromValues[0].flags;
|
|
16117
|
-
if (flags & I18nParamValueFlags.CloseTag && !(flags & I18nParamValueFlags.OpenTag)) {
|
|
16118
|
-
to.set(placeholder, [...fromValues, ...toValues]);
|
|
16119
|
-
} else {
|
|
16120
|
-
to.set(placeholder, [...toValues, ...fromValues]);
|
|
16121
|
-
}
|
|
16122
|
-
}
|
|
16123
|
-
}
|
|
16124
|
-
|
|
16125
|
-
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
|
|
16151
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
|
|
16126
16152
|
function emitNamespaceChanges(job) {
|
|
16127
16153
|
for (const unit of job.units) {
|
|
16128
16154
|
let activeNamespace = Namespace.HTML;
|
|
@@ -16138,7 +16164,7 @@ function emitNamespaceChanges(job) {
|
|
|
16138
16164
|
}
|
|
16139
16165
|
}
|
|
16140
16166
|
|
|
16141
|
-
// bazel-out/
|
|
16167
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/style_parser.mjs
|
|
16142
16168
|
function parse(value) {
|
|
16143
16169
|
const styles = [];
|
|
16144
16170
|
let i = 0;
|
|
@@ -16199,7 +16225,7 @@ function hyphenate2(value) {
|
|
|
16199
16225
|
}).toLowerCase();
|
|
16200
16226
|
}
|
|
16201
16227
|
|
|
16202
|
-
// bazel-out/
|
|
16228
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/naming.mjs
|
|
16203
16229
|
function nameFunctionsAndVariables(job) {
|
|
16204
16230
|
addNamesToView(job.root, job.componentName, { index: 0 }, job.compatibility === CompatibilityMode.TemplateDefinitionBuilder);
|
|
16205
16231
|
}
|
|
@@ -16314,7 +16340,7 @@ function stripImportant(name) {
|
|
|
16314
16340
|
return name;
|
|
16315
16341
|
}
|
|
16316
16342
|
|
|
16317
|
-
// bazel-out/
|
|
16343
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/next_context_merging.mjs
|
|
16318
16344
|
function mergeNextContextExpressions(job) {
|
|
16319
16345
|
for (const unit of job.units) {
|
|
16320
16346
|
for (const op of unit.create) {
|
|
@@ -16360,7 +16386,7 @@ function mergeNextContextsInOps(ops) {
|
|
|
16360
16386
|
}
|
|
16361
16387
|
}
|
|
16362
16388
|
|
|
16363
|
-
// bazel-out/
|
|
16389
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ng_container.mjs
|
|
16364
16390
|
var CONTAINER_TAG = "ng-container";
|
|
16365
16391
|
function generateNgContainerOps(job) {
|
|
16366
16392
|
for (const unit of job.units) {
|
|
@@ -16377,7 +16403,7 @@ function generateNgContainerOps(job) {
|
|
|
16377
16403
|
}
|
|
16378
16404
|
}
|
|
16379
16405
|
|
|
16380
|
-
// bazel-out/
|
|
16406
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nonbindable.mjs
|
|
16381
16407
|
function lookupElement3(elements, xref) {
|
|
16382
16408
|
const el = elements.get(xref);
|
|
16383
16409
|
if (el === void 0) {
|
|
@@ -16407,7 +16433,7 @@ function disableBindings(job) {
|
|
|
16407
16433
|
}
|
|
16408
16434
|
}
|
|
16409
16435
|
|
|
16410
|
-
// bazel-out/
|
|
16436
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nullish_coalescing.mjs
|
|
16411
16437
|
function generateNullishCoalesceExpressions(job) {
|
|
16412
16438
|
for (const unit of job.units) {
|
|
16413
16439
|
for (const op of unit.ops()) {
|
|
@@ -16423,7 +16449,7 @@ function generateNullishCoalesceExpressions(job) {
|
|
|
16423
16449
|
}
|
|
16424
16450
|
}
|
|
16425
16451
|
|
|
16426
|
-
// bazel-out/
|
|
16452
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ordering.mjs
|
|
16427
16453
|
function kindTest(kind) {
|
|
16428
16454
|
return (op) => op.kind === kind;
|
|
16429
16455
|
}
|
|
@@ -16497,7 +16523,7 @@ function keepLast(ops) {
|
|
|
16497
16523
|
return ops.slice(ops.length - 1);
|
|
16498
16524
|
}
|
|
16499
16525
|
|
|
16500
|
-
// bazel-out/
|
|
16526
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/parse_extracted_styles.mjs
|
|
16501
16527
|
function parseExtractedStyles(job) {
|
|
16502
16528
|
for (const unit of job.units) {
|
|
16503
16529
|
for (const op of unit.create) {
|
|
@@ -16520,7 +16546,7 @@ function parseExtractedStyles(job) {
|
|
|
16520
16546
|
}
|
|
16521
16547
|
}
|
|
16522
16548
|
|
|
16523
|
-
// bazel-out/
|
|
16549
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/phase_remove_content_selectors.mjs
|
|
16524
16550
|
function removeContentSelectors(job) {
|
|
16525
16551
|
for (const unit of job.units) {
|
|
16526
16552
|
const elements = createOpXrefMap(unit);
|
|
@@ -16544,7 +16570,7 @@ function lookupInXrefMap(map, xref) {
|
|
|
16544
16570
|
return el;
|
|
16545
16571
|
}
|
|
16546
16572
|
|
|
16547
|
-
// bazel-out/
|
|
16573
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_creation.mjs
|
|
16548
16574
|
function createPipes(job) {
|
|
16549
16575
|
for (const unit of job.units) {
|
|
16550
16576
|
processPipeBindingsInView(unit);
|
|
@@ -16592,7 +16618,7 @@ function addPipeToCreationBlock(unit, afterTargetXref, binding) {
|
|
|
16592
16618
|
throw new Error(`AssertionError: unable to find insertion point for pipe ${binding.name}`);
|
|
16593
16619
|
}
|
|
16594
16620
|
|
|
16595
|
-
// bazel-out/
|
|
16621
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_variadic.mjs
|
|
16596
16622
|
function createVariadicPipes(job) {
|
|
16597
16623
|
for (const unit of job.units) {
|
|
16598
16624
|
for (const op of unit.update) {
|
|
@@ -16609,7 +16635,7 @@ function createVariadicPipes(job) {
|
|
|
16609
16635
|
}
|
|
16610
16636
|
}
|
|
16611
16637
|
|
|
16612
|
-
// bazel-out/
|
|
16638
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/propagate_i18n_blocks.mjs
|
|
16613
16639
|
function propagateI18nBlocks(job) {
|
|
16614
16640
|
propagateI18nBlocksToTemplates(job.root, 0);
|
|
16615
16641
|
}
|
|
@@ -16633,9 +16659,10 @@ function propagateI18nBlocksToTemplates(unit, subTemplateIndex) {
|
|
|
16633
16659
|
subTemplateIndex++;
|
|
16634
16660
|
wrapTemplateWithI18n(templateView, i18nBlock);
|
|
16635
16661
|
}
|
|
16636
|
-
propagateI18nBlocksToTemplates(templateView, subTemplateIndex);
|
|
16662
|
+
subTemplateIndex = propagateI18nBlocksToTemplates(templateView, subTemplateIndex);
|
|
16637
16663
|
}
|
|
16638
16664
|
}
|
|
16665
|
+
return subTemplateIndex;
|
|
16639
16666
|
}
|
|
16640
16667
|
function wrapTemplateWithI18n(unit, parentI18n) {
|
|
16641
16668
|
var _a2;
|
|
@@ -16646,7 +16673,7 @@ function wrapTemplateWithI18n(unit, parentI18n) {
|
|
|
16646
16673
|
}
|
|
16647
16674
|
}
|
|
16648
16675
|
|
|
16649
|
-
// bazel-out/
|
|
16676
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
|
|
16650
16677
|
function extractPureFunctions(job) {
|
|
16651
16678
|
for (const view of job.units) {
|
|
16652
16679
|
for (const op of view.ops()) {
|
|
@@ -16688,7 +16715,7 @@ var PureFunctionConstant = class extends GenericKeyFn {
|
|
|
16688
16715
|
}
|
|
16689
16716
|
};
|
|
16690
16717
|
|
|
16691
|
-
// bazel-out/
|
|
16718
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_literal_structures.mjs
|
|
16692
16719
|
function generatePureLiteralStructures(job) {
|
|
16693
16720
|
for (const unit of job.units) {
|
|
16694
16721
|
for (const op of unit.update) {
|
|
@@ -16735,7 +16762,7 @@ function transformLiteralMap(expr) {
|
|
|
16735
16762
|
return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);
|
|
16736
16763
|
}
|
|
16737
16764
|
|
|
16738
|
-
// bazel-out/
|
|
16765
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/instruction.mjs
|
|
16739
16766
|
function element(slot, tag, constIndex, localRefIndex, sourceSpan) {
|
|
16740
16767
|
return elementOrContainerBase(Identifiers.element, slot, tag, constIndex, localRefIndex, sourceSpan);
|
|
16741
16768
|
}
|
|
@@ -17246,7 +17273,7 @@ function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs,
|
|
|
17246
17273
|
return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
|
|
17247
17274
|
}
|
|
17248
17275
|
|
|
17249
|
-
// bazel-out/
|
|
17276
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/reify.mjs
|
|
17250
17277
|
var sanitizerIdentifierMap = /* @__PURE__ */ new Map([
|
|
17251
17278
|
[SanitizerFn.Html, Identifiers.sanitizeHtml],
|
|
17252
17279
|
[SanitizerFn.IframeAttribute, Identifiers.validateIframeAttribute],
|
|
@@ -17575,7 +17602,7 @@ function reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {
|
|
|
17575
17602
|
return fn(params, handlerStmts, void 0, void 0, name);
|
|
17576
17603
|
}
|
|
17577
17604
|
|
|
17578
|
-
// bazel-out/
|
|
17605
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_empty_bindings.mjs
|
|
17579
17606
|
function removeEmptyBindings(job) {
|
|
17580
17607
|
for (const unit of job.units) {
|
|
17581
17608
|
for (const op of unit.update) {
|
|
@@ -17596,7 +17623,7 @@ function removeEmptyBindings(job) {
|
|
|
17596
17623
|
}
|
|
17597
17624
|
}
|
|
17598
17625
|
|
|
17599
|
-
// bazel-out/
|
|
17626
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_i18n_contexts.mjs
|
|
17600
17627
|
function removeI18nContexts(job) {
|
|
17601
17628
|
for (const unit of job.units) {
|
|
17602
17629
|
for (const op of unit.create) {
|
|
@@ -17612,7 +17639,7 @@ function removeI18nContexts(job) {
|
|
|
17612
17639
|
}
|
|
17613
17640
|
}
|
|
17614
17641
|
|
|
17615
|
-
// bazel-out/
|
|
17642
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/repeater_derived_vars.mjs
|
|
17616
17643
|
function generateRepeaterDerivedVars(job) {
|
|
17617
17644
|
const repeaters = /* @__PURE__ */ new Map();
|
|
17618
17645
|
for (const unit of job.units) {
|
|
@@ -17644,7 +17671,7 @@ function generateRepeaterDerivedVars(job) {
|
|
|
17644
17671
|
}
|
|
17645
17672
|
}
|
|
17646
17673
|
|
|
17647
|
-
// bazel-out/
|
|
17674
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
|
|
17648
17675
|
function resolveContexts(job) {
|
|
17649
17676
|
for (const unit of job.units) {
|
|
17650
17677
|
processLexicalScope(unit, unit.create);
|
|
@@ -17685,7 +17712,7 @@ function processLexicalScope(view, ops) {
|
|
|
17685
17712
|
}
|
|
17686
17713
|
}
|
|
17687
17714
|
|
|
17688
|
-
// bazel-out/
|
|
17715
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
|
|
17689
17716
|
function resolveDollarEvent(job) {
|
|
17690
17717
|
for (const unit of job.units) {
|
|
17691
17718
|
transformDollarEvent(unit, unit.create);
|
|
@@ -17706,7 +17733,7 @@ function transformDollarEvent(unit, ops) {
|
|
|
17706
17733
|
}
|
|
17707
17734
|
}
|
|
17708
17735
|
|
|
17709
|
-
// bazel-out/
|
|
17736
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_element_placeholders.mjs
|
|
17710
17737
|
function resolveI18nElementPlaceholders(job) {
|
|
17711
17738
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
17712
17739
|
const elements = /* @__PURE__ */ new Map();
|
|
@@ -17722,55 +17749,67 @@ function resolveI18nElementPlaceholders(job) {
|
|
|
17722
17749
|
}
|
|
17723
17750
|
}
|
|
17724
17751
|
}
|
|
17725
|
-
|
|
17726
|
-
|
|
17727
|
-
|
|
17728
|
-
|
|
17729
|
-
|
|
17730
|
-
|
|
17731
|
-
|
|
17752
|
+
resolvePlaceholdersForView(job, job.root, i18nContexts, elements);
|
|
17753
|
+
}
|
|
17754
|
+
function resolvePlaceholdersForView(job, unit, i18nContexts, elements) {
|
|
17755
|
+
let currentOps = null;
|
|
17756
|
+
for (const op of unit.create) {
|
|
17757
|
+
switch (op.kind) {
|
|
17758
|
+
case OpKind.I18nStart:
|
|
17759
|
+
if (!op.context) {
|
|
17760
|
+
throw Error("Could not find i18n context for i18n op");
|
|
17761
|
+
}
|
|
17762
|
+
currentOps = { i18nBlock: op, i18nContext: i18nContexts.get(op.context) };
|
|
17763
|
+
break;
|
|
17764
|
+
case OpKind.I18nEnd:
|
|
17765
|
+
currentOps = null;
|
|
17766
|
+
break;
|
|
17767
|
+
case OpKind.ElementStart:
|
|
17768
|
+
if (op.i18nPlaceholder !== void 0) {
|
|
17769
|
+
if (currentOps === null) {
|
|
17770
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17732
17771
|
}
|
|
17733
|
-
|
|
17734
|
-
|
|
17735
|
-
|
|
17736
|
-
|
|
17737
|
-
break;
|
|
17738
|
-
case OpKind.ElementStart:
|
|
17739
|
-
if (op.i18nPlaceholder !== void 0) {
|
|
17740
|
-
if (currentOps === null) {
|
|
17741
|
-
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17742
|
-
}
|
|
17743
|
-
const { startName, closeName } = op.i18nPlaceholder;
|
|
17744
|
-
let flags = I18nParamValueFlags.ElementTag | I18nParamValueFlags.OpenTag;
|
|
17745
|
-
if (closeName === "") {
|
|
17746
|
-
flags |= I18nParamValueFlags.CloseTag;
|
|
17747
|
-
}
|
|
17748
|
-
addParam(currentOps.i18nContext.params, startName, op.handle.slot, currentOps.i18nBlock.subTemplateIndex, flags);
|
|
17772
|
+
const { startName, closeName } = op.i18nPlaceholder;
|
|
17773
|
+
let flags = I18nParamValueFlags.ElementTag | I18nParamValueFlags.OpenTag;
|
|
17774
|
+
if (closeName === "") {
|
|
17775
|
+
flags |= I18nParamValueFlags.CloseTag;
|
|
17749
17776
|
}
|
|
17750
|
-
|
|
17751
|
-
|
|
17752
|
-
|
|
17753
|
-
|
|
17754
|
-
|
|
17755
|
-
|
|
17756
|
-
|
|
17757
|
-
|
|
17758
|
-
if (closeName !== "") {
|
|
17759
|
-
addParam(currentOps.i18nContext.params, closeName, startOp.handle.slot, currentOps.i18nBlock.subTemplateIndex, I18nParamValueFlags.ElementTag | I18nParamValueFlags.CloseTag);
|
|
17760
|
-
}
|
|
17777
|
+
addParam(currentOps.i18nContext.params, startName, op.handle.slot, currentOps.i18nBlock.subTemplateIndex, flags);
|
|
17778
|
+
}
|
|
17779
|
+
break;
|
|
17780
|
+
case OpKind.ElementEnd:
|
|
17781
|
+
const startOp = elements.get(op.xref);
|
|
17782
|
+
if (startOp && startOp.i18nPlaceholder !== void 0) {
|
|
17783
|
+
if (currentOps === null) {
|
|
17784
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17761
17785
|
}
|
|
17762
|
-
|
|
17763
|
-
|
|
17764
|
-
|
|
17765
|
-
if (currentOps === null) {
|
|
17766
|
-
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17767
|
-
}
|
|
17768
|
-
const subTemplateIndex = getSubTemplateIndexForTemplateTag(job, currentOps.i18nBlock, op);
|
|
17769
|
-
addParam(currentOps.i18nContext.params, op.i18nPlaceholder.startName, op.handle.slot, subTemplateIndex, I18nParamValueFlags.TemplateTag);
|
|
17770
|
-
addParam(currentOps.i18nContext.params, op.i18nPlaceholder.closeName, op.handle.slot, subTemplateIndex, I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag);
|
|
17786
|
+
const { closeName } = startOp.i18nPlaceholder;
|
|
17787
|
+
if (closeName !== "") {
|
|
17788
|
+
addParam(currentOps.i18nContext.params, closeName, startOp.handle.slot, currentOps.i18nBlock.subTemplateIndex, I18nParamValueFlags.ElementTag | I18nParamValueFlags.CloseTag);
|
|
17771
17789
|
}
|
|
17772
|
-
|
|
17773
|
-
|
|
17790
|
+
}
|
|
17791
|
+
break;
|
|
17792
|
+
case OpKind.Template:
|
|
17793
|
+
if (op.i18nPlaceholder !== void 0) {
|
|
17794
|
+
if (currentOps === null) {
|
|
17795
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17796
|
+
}
|
|
17797
|
+
let startFlags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.OpenTag;
|
|
17798
|
+
const subTemplateIndex = getSubTemplateIndexForTemplateTag(job, currentOps.i18nBlock, op);
|
|
17799
|
+
const { startName, closeName } = op.i18nPlaceholder;
|
|
17800
|
+
const isSelfClosing = closeName === "";
|
|
17801
|
+
if (isSelfClosing) {
|
|
17802
|
+
startFlags |= I18nParamValueFlags.CloseTag;
|
|
17803
|
+
}
|
|
17804
|
+
addParam(currentOps.i18nContext.params, startName, op.handle.slot, subTemplateIndex, startFlags);
|
|
17805
|
+
resolvePlaceholdersForView(job, job.views.get(op.xref), i18nContexts, elements);
|
|
17806
|
+
if (!isSelfClosing) {
|
|
17807
|
+
addParam(currentOps.i18nContext.params, closeName, op.handle.slot, subTemplateIndex, I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag);
|
|
17808
|
+
}
|
|
17809
|
+
} else {
|
|
17810
|
+
resolvePlaceholdersForView(job, job.views.get(op.xref), i18nContexts, elements);
|
|
17811
|
+
}
|
|
17812
|
+
break;
|
|
17774
17813
|
}
|
|
17775
17814
|
}
|
|
17776
17815
|
}
|
|
@@ -17789,7 +17828,7 @@ function addParam(params, placeholder, value, subTemplateIndex, flags) {
|
|
|
17789
17828
|
params.set(placeholder, values);
|
|
17790
17829
|
}
|
|
17791
17830
|
|
|
17792
|
-
// bazel-out/
|
|
17831
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_expression_placeholders.mjs
|
|
17793
17832
|
function resolveI18nExpressionPlaceholders(job) {
|
|
17794
17833
|
const subTemplateIndicies = /* @__PURE__ */ new Map();
|
|
17795
17834
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
@@ -17810,8 +17849,8 @@ function resolveI18nExpressionPlaceholders(job) {
|
|
|
17810
17849
|
for (const op of unit.update) {
|
|
17811
17850
|
if (op.kind === OpKind.I18nExpression) {
|
|
17812
17851
|
const i18nContext = i18nContexts.get(op.context);
|
|
17813
|
-
const index = expressionIndices.get(
|
|
17814
|
-
const subTemplateIndex = subTemplateIndicies.get(
|
|
17852
|
+
const index = expressionIndices.get(op.target) || 0;
|
|
17853
|
+
const subTemplateIndex = subTemplateIndicies.get(op.target);
|
|
17815
17854
|
const params = op.resolutionTime === I18nParamResolutionTime.Creation ? i18nContext.params : i18nContext.postprocessingParams;
|
|
17816
17855
|
const values = params.get(op.i18nPlaceholder) || [];
|
|
17817
17856
|
values.push({
|
|
@@ -17820,36 +17859,20 @@ function resolveI18nExpressionPlaceholders(job) {
|
|
|
17820
17859
|
flags: I18nParamValueFlags.ExpressionIndex
|
|
17821
17860
|
});
|
|
17822
17861
|
params.set(op.i18nPlaceholder, values);
|
|
17823
|
-
expressionIndices.set(
|
|
17862
|
+
expressionIndices.set(op.target, index + 1);
|
|
17824
17863
|
}
|
|
17825
17864
|
}
|
|
17826
17865
|
}
|
|
17827
17866
|
}
|
|
17828
17867
|
|
|
17829
|
-
// bazel-out/
|
|
17868
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_icu_placeholders.mjs
|
|
17830
17869
|
function resolveI18nIcuPlaceholders(job) {
|
|
17831
|
-
const contextOps = /* @__PURE__ */ new Map();
|
|
17832
17870
|
for (const unit of job.units) {
|
|
17833
17871
|
for (const op of unit.create) {
|
|
17834
|
-
|
|
17835
|
-
|
|
17836
|
-
|
|
17837
|
-
|
|
17838
|
-
}
|
|
17839
|
-
}
|
|
17840
|
-
}
|
|
17841
|
-
for (const unit of job.units) {
|
|
17842
|
-
for (const op of unit.create) {
|
|
17843
|
-
switch (op.kind) {
|
|
17844
|
-
case OpKind.IcuStart:
|
|
17845
|
-
if (op.context === null) {
|
|
17846
|
-
throw Error("Icu should have its i18n context set.");
|
|
17847
|
-
}
|
|
17848
|
-
const i18nContext = contextOps.get(op.context);
|
|
17849
|
-
for (const node of op.message.nodes) {
|
|
17850
|
-
node.visit(new ResolveIcuPlaceholdersVisitor(i18nContext.postprocessingParams));
|
|
17851
|
-
}
|
|
17852
|
-
break;
|
|
17872
|
+
if (op.kind === OpKind.I18nContext && op.contextKind === I18nContextKind.Icu) {
|
|
17873
|
+
for (const node of op.message.nodes) {
|
|
17874
|
+
node.visit(new ResolveIcuPlaceholdersVisitor(op.postprocessingParams));
|
|
17875
|
+
}
|
|
17853
17876
|
}
|
|
17854
17877
|
}
|
|
17855
17878
|
}
|
|
@@ -17886,7 +17909,7 @@ var ResolveIcuPlaceholdersVisitor = class extends RecurseVisitor {
|
|
|
17886
17909
|
}
|
|
17887
17910
|
};
|
|
17888
17911
|
|
|
17889
|
-
// bazel-out/
|
|
17912
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_names.mjs
|
|
17890
17913
|
function resolveNames(job) {
|
|
17891
17914
|
for (const unit of job.units) {
|
|
17892
17915
|
processLexicalScope2(unit, unit.create, null);
|
|
@@ -17950,7 +17973,7 @@ function processLexicalScope2(unit, ops, savedView) {
|
|
|
17950
17973
|
}
|
|
17951
17974
|
}
|
|
17952
17975
|
|
|
17953
|
-
// bazel-out/
|
|
17976
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_sanitizers.mjs
|
|
17954
17977
|
var sanitizers = /* @__PURE__ */ new Map([
|
|
17955
17978
|
[SecurityContext.HTML, SanitizerFn.Html],
|
|
17956
17979
|
[SecurityContext.SCRIPT, SanitizerFn.Script],
|
|
@@ -17987,7 +18010,7 @@ function isIframeElement(op) {
|
|
|
17987
18010
|
return op.kind === OpKind.ElementStart && ((_a2 = op.tag) == null ? void 0 : _a2.toLowerCase()) === "iframe";
|
|
17988
18011
|
}
|
|
17989
18012
|
|
|
17990
|
-
// bazel-out/
|
|
18013
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/save_restore_view.mjs
|
|
17991
18014
|
function saveAndRestoreView(job) {
|
|
17992
18015
|
for (const unit of job.units) {
|
|
17993
18016
|
unit.create.prepend([
|
|
@@ -18032,7 +18055,7 @@ function addSaveRestoreViewOperationToListener(unit, op) {
|
|
|
18032
18055
|
}
|
|
18033
18056
|
}
|
|
18034
18057
|
|
|
18035
|
-
// bazel-out/
|
|
18058
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/slot_allocation.mjs
|
|
18036
18059
|
function allocateSlots(job) {
|
|
18037
18060
|
const slotMap = /* @__PURE__ */ new Map();
|
|
18038
18061
|
for (const unit of job.units) {
|
|
@@ -18057,7 +18080,7 @@ function allocateSlots(job) {
|
|
|
18057
18080
|
}
|
|
18058
18081
|
}
|
|
18059
18082
|
|
|
18060
|
-
// bazel-out/
|
|
18083
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/style_binding_specialization.mjs
|
|
18061
18084
|
function specializeStyleBindings(job) {
|
|
18062
18085
|
for (const unit of job.units) {
|
|
18063
18086
|
for (const op of unit.update) {
|
|
@@ -18087,7 +18110,7 @@ function specializeStyleBindings(job) {
|
|
|
18087
18110
|
}
|
|
18088
18111
|
}
|
|
18089
18112
|
|
|
18090
|
-
// bazel-out/
|
|
18113
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/temporary_variables.mjs
|
|
18091
18114
|
function generateTemporaryVariables(job) {
|
|
18092
18115
|
for (const unit of job.units) {
|
|
18093
18116
|
unit.create.prepend(generateTemporaries(unit.create));
|
|
@@ -18145,7 +18168,7 @@ function assignName(names, expr) {
|
|
|
18145
18168
|
expr.name = name;
|
|
18146
18169
|
}
|
|
18147
18170
|
|
|
18148
|
-
// bazel-out/
|
|
18171
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_generation.mjs
|
|
18149
18172
|
function generateTrackFns(job) {
|
|
18150
18173
|
for (const unit of job.units) {
|
|
18151
18174
|
for (const op of unit.create) {
|
|
@@ -18175,7 +18198,7 @@ function generateTrackFns(job) {
|
|
|
18175
18198
|
}
|
|
18176
18199
|
}
|
|
18177
18200
|
|
|
18178
|
-
// bazel-out/
|
|
18201
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_optimization.mjs
|
|
18179
18202
|
function optimizeTrackFns(job) {
|
|
18180
18203
|
for (const unit of job.units) {
|
|
18181
18204
|
for (const op of unit.create) {
|
|
@@ -18222,7 +18245,7 @@ function isTrackByFunctionCall(rootView, expr) {
|
|
|
18222
18245
|
return true;
|
|
18223
18246
|
}
|
|
18224
18247
|
|
|
18225
|
-
// bazel-out/
|
|
18248
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_variables.mjs
|
|
18226
18249
|
function generateTrackVariables(job) {
|
|
18227
18250
|
for (const unit of job.units) {
|
|
18228
18251
|
for (const op of unit.create) {
|
|
@@ -18243,7 +18266,7 @@ function generateTrackVariables(job) {
|
|
|
18243
18266
|
}
|
|
18244
18267
|
}
|
|
18245
18268
|
|
|
18246
|
-
// bazel-out/
|
|
18269
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/var_counting.mjs
|
|
18247
18270
|
function countVariables(job) {
|
|
18248
18271
|
for (const unit of job.units) {
|
|
18249
18272
|
let varCount = 0;
|
|
@@ -18348,7 +18371,7 @@ function isSingletonInterpolation(expr) {
|
|
|
18348
18371
|
return true;
|
|
18349
18372
|
}
|
|
18350
18373
|
|
|
18351
|
-
// bazel-out/
|
|
18374
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/variable_optimization.mjs
|
|
18352
18375
|
function optimizeVariables(job) {
|
|
18353
18376
|
for (const unit of job.units) {
|
|
18354
18377
|
inlineAlwaysInlineVariables(unit.create);
|
|
@@ -18598,7 +18621,7 @@ function allowConservativeInlining(decl, target) {
|
|
|
18598
18621
|
}
|
|
18599
18622
|
}
|
|
18600
18623
|
|
|
18601
|
-
// bazel-out/
|
|
18624
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/wrap_icus.mjs
|
|
18602
18625
|
function wrapI18nIcus(job) {
|
|
18603
18626
|
for (const unit of job.units) {
|
|
18604
18627
|
let currentI18nOp = null;
|
|
@@ -18628,7 +18651,7 @@ function wrapI18nIcus(job) {
|
|
|
18628
18651
|
}
|
|
18629
18652
|
}
|
|
18630
18653
|
|
|
18631
|
-
// bazel-out/
|
|
18654
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
|
|
18632
18655
|
var phases = [
|
|
18633
18656
|
{ kind: CompilationJobKind.Tmpl, fn: removeContentSelectors },
|
|
18634
18657
|
{ kind: CompilationJobKind.Host, fn: parseHostStyleProperties },
|
|
@@ -18671,7 +18694,6 @@ var phases = [
|
|
|
18671
18694
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nElementPlaceholders },
|
|
18672
18695
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nExpressionPlaceholders },
|
|
18673
18696
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nIcuPlaceholders },
|
|
18674
|
-
{ kind: CompilationJobKind.Tmpl, fn: mergeI18nContexts },
|
|
18675
18697
|
{ kind: CompilationJobKind.Tmpl, fn: extractI18nMessages },
|
|
18676
18698
|
{ kind: CompilationJobKind.Tmpl, fn: generateTrackFns },
|
|
18677
18699
|
{ kind: CompilationJobKind.Tmpl, fn: collectI18nConsts },
|
|
@@ -18793,7 +18815,7 @@ function emitHostBindingFunction(job) {
|
|
|
18793
18815
|
);
|
|
18794
18816
|
}
|
|
18795
18817
|
|
|
18796
|
-
// bazel-out/
|
|
18818
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/ingest.mjs
|
|
18797
18819
|
var compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;
|
|
18798
18820
|
function ingestComponent(componentName, template2, constantPool, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta) {
|
|
18799
18821
|
const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta);
|
|
@@ -19374,10 +19396,10 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
19374
19396
|
return null;
|
|
19375
19397
|
}
|
|
19376
19398
|
|
|
19377
|
-
// bazel-out/
|
|
19399
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/switch/index.mjs
|
|
19378
19400
|
var USE_TEMPLATE_PIPELINE = false;
|
|
19379
19401
|
|
|
19380
|
-
// bazel-out/
|
|
19402
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/styling_builder.mjs
|
|
19381
19403
|
var IMPORTANT_FLAG = "!important";
|
|
19382
19404
|
var MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;
|
|
19383
19405
|
var StylingBuilder = class {
|
|
@@ -19710,7 +19732,7 @@ function isEmptyExpression(ast) {
|
|
|
19710
19732
|
return ast instanceof EmptyExpr;
|
|
19711
19733
|
}
|
|
19712
19734
|
|
|
19713
|
-
// bazel-out/
|
|
19735
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
|
|
19714
19736
|
var HtmlParser = class extends Parser2 {
|
|
19715
19737
|
constructor() {
|
|
19716
19738
|
super(getHtmlTagDefinition);
|
|
@@ -19720,7 +19742,7 @@ var HtmlParser = class extends Parser2 {
|
|
|
19720
19742
|
}
|
|
19721
19743
|
};
|
|
19722
19744
|
|
|
19723
|
-
// bazel-out/
|
|
19745
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
|
|
19724
19746
|
var PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
|
|
19725
19747
|
var SKIP_WS_TRIM_TAGS = /* @__PURE__ */ new Set(["pre", "template", "textarea", "script", "style"]);
|
|
19726
19748
|
var WS_CHARS = " \f\n\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
|
|
@@ -19786,7 +19808,7 @@ function visitAllWithSiblings(visitor, nodes) {
|
|
|
19786
19808
|
return result;
|
|
19787
19809
|
}
|
|
19788
19810
|
|
|
19789
|
-
// bazel-out/
|
|
19811
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
|
|
19790
19812
|
var PROPERTY_PARTS_SEPARATOR = ".";
|
|
19791
19813
|
var ATTRIBUTE_PREFIX = "attr";
|
|
19792
19814
|
var CLASS_PREFIX = "class";
|
|
@@ -20106,7 +20128,7 @@ function moveParseSourceSpan(sourceSpan, absoluteSpan) {
|
|
|
20106
20128
|
return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);
|
|
20107
20129
|
}
|
|
20108
20130
|
|
|
20109
|
-
// bazel-out/
|
|
20131
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/style_url_resolver.mjs
|
|
20110
20132
|
function isStyleUrlResolvable(url) {
|
|
20111
20133
|
if (url == null || url.length === 0 || url[0] == "/")
|
|
20112
20134
|
return false;
|
|
@@ -20115,7 +20137,7 @@ function isStyleUrlResolvable(url) {
|
|
|
20115
20137
|
}
|
|
20116
20138
|
var URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;
|
|
20117
20139
|
|
|
20118
|
-
// bazel-out/
|
|
20140
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/template_preparser.mjs
|
|
20119
20141
|
var NG_CONTENT_SELECT_ATTR = "select";
|
|
20120
20142
|
var LINK_ELEMENT = "link";
|
|
20121
20143
|
var LINK_STYLE_REL_ATTR = "rel";
|
|
@@ -20185,7 +20207,7 @@ function normalizeNgContentSelect(selectAttr) {
|
|
|
20185
20207
|
return selectAttr;
|
|
20186
20208
|
}
|
|
20187
20209
|
|
|
20188
|
-
// bazel-out/
|
|
20210
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_control_flow.mjs
|
|
20189
20211
|
var FOR_LOOP_EXPRESSION_PATTERN = /^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/;
|
|
20190
20212
|
var FOR_LOOP_TRACK_PATTERN = /^track\s+([\S\s]*)/;
|
|
20191
20213
|
var CONDITIONAL_ALIAS_PATTERN = /^as\s+(.*)/;
|
|
@@ -20476,7 +20498,7 @@ function stripOptionalParentheses(param, errors) {
|
|
|
20476
20498
|
return expression.slice(start, end);
|
|
20477
20499
|
}
|
|
20478
20500
|
|
|
20479
|
-
// bazel-out/
|
|
20501
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_triggers.mjs
|
|
20480
20502
|
var TIME_PATTERN = /^\d+\.?\d*(ms|s)?$/;
|
|
20481
20503
|
var SEPARATOR_PATTERN = /^\s$/;
|
|
20482
20504
|
var COMMA_DELIMITED_SYNTAX = /* @__PURE__ */ new Map([
|
|
@@ -20740,7 +20762,7 @@ function parseDeferredTime(value) {
|
|
|
20740
20762
|
return parseFloat(time) * (units === "s" ? 1e3 : 1);
|
|
20741
20763
|
}
|
|
20742
20764
|
|
|
20743
|
-
// bazel-out/
|
|
20765
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_blocks.mjs
|
|
20744
20766
|
var PREFETCH_WHEN_PATTERN = /^prefetch\s+when\s/;
|
|
20745
20767
|
var PREFETCH_ON_PATTERN = /^prefetch\s+on\s/;
|
|
20746
20768
|
var MINIMUM_PARAMETER_PATTERN = /^minimum\s/;
|
|
@@ -20875,7 +20897,7 @@ function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
|
|
|
20875
20897
|
return { triggers, prefetchTriggers };
|
|
20876
20898
|
}
|
|
20877
20899
|
|
|
20878
|
-
// bazel-out/
|
|
20900
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_template_transform.mjs
|
|
20879
20901
|
var BIND_NAME_REGEXP = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/;
|
|
20880
20902
|
var KW_BIND_IDX = 1;
|
|
20881
20903
|
var KW_LET_IDX = 2;
|
|
@@ -21306,7 +21328,7 @@ function textContents(node) {
|
|
|
21306
21328
|
}
|
|
21307
21329
|
}
|
|
21308
21330
|
|
|
21309
|
-
// bazel-out/
|
|
21331
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/context.mjs
|
|
21310
21332
|
var TagType;
|
|
21311
21333
|
(function(TagType2) {
|
|
21312
21334
|
TagType2[TagType2["ELEMENT"] = 0] = "ELEMENT";
|
|
@@ -21451,7 +21473,7 @@ function serializePlaceholderValue(value) {
|
|
|
21451
21473
|
}
|
|
21452
21474
|
}
|
|
21453
21475
|
|
|
21454
|
-
// bazel-out/
|
|
21476
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
|
|
21455
21477
|
var NG_CONTENT_SELECT_ATTR2 = "select";
|
|
21456
21478
|
var NG_PROJECT_AS_ATTR_NAME = "ngProjectAs";
|
|
21457
21479
|
var EVENT_BINDING_SCOPE_GLOBALS = /* @__PURE__ */ new Set(["$event"]);
|
|
@@ -22911,21 +22933,6 @@ var TrackByBindingScope = class extends BindingScope {
|
|
|
22911
22933
|
return this.componentAccessCount;
|
|
22912
22934
|
}
|
|
22913
22935
|
};
|
|
22914
|
-
function createCssSelector(elementName, attributes) {
|
|
22915
|
-
const cssSelector = new CssSelector();
|
|
22916
|
-
const elementNameNoNs = splitNsName(elementName)[1];
|
|
22917
|
-
cssSelector.setElement(elementNameNoNs);
|
|
22918
|
-
Object.getOwnPropertyNames(attributes).forEach((name) => {
|
|
22919
|
-
const nameNoNs = splitNsName(name)[1];
|
|
22920
|
-
const value = attributes[name];
|
|
22921
|
-
cssSelector.addAttribute(nameNoNs, value);
|
|
22922
|
-
if (name.toLowerCase() === "class") {
|
|
22923
|
-
const classes = value.trim().split(/\s+/);
|
|
22924
|
-
classes.forEach((className) => cssSelector.addClassName(className));
|
|
22925
|
-
}
|
|
22926
|
-
});
|
|
22927
|
-
return cssSelector;
|
|
22928
|
-
}
|
|
22929
22936
|
function getNgProjectAsLiteral(attribute2) {
|
|
22930
22937
|
const parsedR3Selector = parseSelectorToR3Selector(attribute2.value)[0];
|
|
22931
22938
|
return [literal(5), asLiteral(parsedR3Selector)];
|
|
@@ -23143,7 +23150,7 @@ function createClosureModeGuard2() {
|
|
|
23143
23150
|
return typeofExpr(variable(NG_I18N_CLOSURE_MODE2)).notIdentical(literal("undefined", STRING_TYPE)).and(variable(NG_I18N_CLOSURE_MODE2));
|
|
23144
23151
|
}
|
|
23145
23152
|
|
|
23146
|
-
// bazel-out/
|
|
23153
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/compiler.mjs
|
|
23147
23154
|
var ATTR_REGEX = /attr\.([^\]]+)/;
|
|
23148
23155
|
var COMPONENT_VARIABLE = "%COMP%";
|
|
23149
23156
|
var HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
|
|
@@ -23194,6 +23201,9 @@ function addFeatures(definitionMap, meta) {
|
|
|
23194
23201
|
break;
|
|
23195
23202
|
}
|
|
23196
23203
|
}
|
|
23204
|
+
if ((_a2 = meta.hostDirectives) == null ? void 0 : _a2.length) {
|
|
23205
|
+
features.push(importExpr(Identifiers.HostDirectivesFeature).callFn([createHostDirectivesFeatureArg(meta.hostDirectives)]));
|
|
23206
|
+
}
|
|
23197
23207
|
if (meta.usesInheritance) {
|
|
23198
23208
|
features.push(importExpr(Identifiers.InheritDefinitionFeature));
|
|
23199
23209
|
}
|
|
@@ -23206,9 +23216,6 @@ function addFeatures(definitionMap, meta) {
|
|
|
23206
23216
|
if (meta.hasOwnProperty("template") && meta.isStandalone) {
|
|
23207
23217
|
features.push(importExpr(Identifiers.StandaloneFeature));
|
|
23208
23218
|
}
|
|
23209
|
-
if ((_a2 = meta.hostDirectives) == null ? void 0 : _a2.length) {
|
|
23210
|
-
features.push(importExpr(Identifiers.HostDirectivesFeature).callFn([createHostDirectivesFeatureArg(meta.hostDirectives)]));
|
|
23211
|
-
}
|
|
23212
23219
|
if (features.length) {
|
|
23213
23220
|
definitionMap.set("features", literalArr(features));
|
|
23214
23221
|
}
|
|
@@ -23745,7 +23752,7 @@ function createHostDirectivesMappingArray(mapping) {
|
|
|
23745
23752
|
return elements.length > 0 ? literalArr(elements) : null;
|
|
23746
23753
|
}
|
|
23747
23754
|
|
|
23748
|
-
// bazel-out/
|
|
23755
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/t2_binder.mjs
|
|
23749
23756
|
var R3TargetBinder = class {
|
|
23750
23757
|
constructor(directiveMatcher) {
|
|
23751
23758
|
this.directiveMatcher = directiveMatcher;
|
|
@@ -23913,13 +23920,13 @@ var DirectiveBinder = class {
|
|
|
23913
23920
|
template2.forEach((node) => node.visit(this));
|
|
23914
23921
|
}
|
|
23915
23922
|
visitElement(element2) {
|
|
23916
|
-
this.visitElementOrTemplate(element2
|
|
23923
|
+
this.visitElementOrTemplate(element2);
|
|
23917
23924
|
}
|
|
23918
23925
|
visitTemplate(template2) {
|
|
23919
|
-
this.visitElementOrTemplate(
|
|
23926
|
+
this.visitElementOrTemplate(template2);
|
|
23920
23927
|
}
|
|
23921
|
-
visitElementOrTemplate(
|
|
23922
|
-
const cssSelector =
|
|
23928
|
+
visitElementOrTemplate(node) {
|
|
23929
|
+
const cssSelector = createCssSelectorFromNode(node);
|
|
23923
23930
|
const directives = [];
|
|
23924
23931
|
this.matcher.match(cssSelector, (_selector, results) => directives.push(...results));
|
|
23925
23932
|
if (directives.length > 0) {
|
|
@@ -24350,11 +24357,11 @@ function extractScopedNodeEntities(rootScope) {
|
|
|
24350
24357
|
return templateEntities;
|
|
24351
24358
|
}
|
|
24352
24359
|
|
|
24353
|
-
// bazel-out/
|
|
24360
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/resource_loader.mjs
|
|
24354
24361
|
var ResourceLoader = class {
|
|
24355
24362
|
};
|
|
24356
24363
|
|
|
24357
|
-
// bazel-out/
|
|
24364
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/jit_compiler_facade.mjs
|
|
24358
24365
|
var CompilerFacadeImpl = class {
|
|
24359
24366
|
constructor(jitEvaluator = new JitEvaluator()) {
|
|
24360
24367
|
this.jitEvaluator = jitEvaluator;
|
|
@@ -24906,17 +24913,17 @@ function publishFacade(global) {
|
|
|
24906
24913
|
ng.\u0275compilerFacade = new CompilerFacadeImpl();
|
|
24907
24914
|
}
|
|
24908
24915
|
|
|
24909
|
-
// bazel-out/
|
|
24910
|
-
var VERSION2 = new Version("17.1.0-next.
|
|
24916
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
|
|
24917
|
+
var VERSION2 = new Version("17.1.0-next.2");
|
|
24911
24918
|
|
|
24912
|
-
// bazel-out/
|
|
24919
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
24913
24920
|
var _VisitorMode;
|
|
24914
24921
|
(function(_VisitorMode2) {
|
|
24915
24922
|
_VisitorMode2[_VisitorMode2["Extract"] = 0] = "Extract";
|
|
24916
24923
|
_VisitorMode2[_VisitorMode2["Merge"] = 1] = "Merge";
|
|
24917
24924
|
})(_VisitorMode || (_VisitorMode = {}));
|
|
24918
24925
|
|
|
24919
|
-
// bazel-out/
|
|
24926
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/xml_tags.mjs
|
|
24920
24927
|
var XmlTagDefinition = class {
|
|
24921
24928
|
constructor() {
|
|
24922
24929
|
this.closedByParent = false;
|
|
@@ -24938,7 +24945,7 @@ var XmlTagDefinition = class {
|
|
|
24938
24945
|
};
|
|
24939
24946
|
var _TAG_DEFINITION = new XmlTagDefinition();
|
|
24940
24947
|
|
|
24941
|
-
// bazel-out/
|
|
24948
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/partial/api.mjs
|
|
24942
24949
|
var FactoryTarget2;
|
|
24943
24950
|
(function(FactoryTarget3) {
|
|
24944
24951
|
FactoryTarget3[FactoryTarget3["Directive"] = 0] = "Directive";
|
|
@@ -24948,13 +24955,14 @@ var FactoryTarget2;
|
|
|
24948
24955
|
FactoryTarget3[FactoryTarget3["NgModule"] = 4] = "NgModule";
|
|
24949
24956
|
})(FactoryTarget2 || (FactoryTarget2 = {}));
|
|
24950
24957
|
|
|
24951
|
-
// bazel-out/
|
|
24958
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler.mjs
|
|
24952
24959
|
publishFacade(_global);
|
|
24953
24960
|
|
|
24954
|
-
// bazel-out/
|
|
24961
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/types.mjs
|
|
24955
24962
|
var ngtemplate = "ng-template";
|
|
24956
24963
|
var boundngifelse = "[ngIfElse]";
|
|
24957
24964
|
var boundngifthenelse = "[ngIfThenElse]";
|
|
24965
|
+
var boundngifthen = "[ngIfThen]";
|
|
24958
24966
|
var nakedngfor = "ngFor";
|
|
24959
24967
|
function allFormsOf(selector) {
|
|
24960
24968
|
return [
|
|
@@ -25011,17 +25019,44 @@ var ElementToMigrate = class {
|
|
|
25011
25019
|
this.thenAttr = thenAttr;
|
|
25012
25020
|
this.forAttrs = forAttrs;
|
|
25013
25021
|
}
|
|
25014
|
-
getCondition(
|
|
25015
|
-
const
|
|
25016
|
-
|
|
25022
|
+
getCondition() {
|
|
25023
|
+
const chunks = this.attr.value.split(";");
|
|
25024
|
+
let condition = chunks[0];
|
|
25025
|
+
const elseIx = condition.indexOf(" else ");
|
|
25026
|
+
const thenIx = condition.indexOf(" then ");
|
|
25027
|
+
if (thenIx > -1) {
|
|
25028
|
+
condition = condition.slice(0, thenIx);
|
|
25029
|
+
} else if (elseIx > -1) {
|
|
25030
|
+
condition = condition.slice(0, elseIx);
|
|
25031
|
+
}
|
|
25032
|
+
let letVar = chunks.find((c) => c.search(/\s*let\s/) > -1);
|
|
25033
|
+
return condition + (letVar ? ";" + letVar : "");
|
|
25017
25034
|
}
|
|
25018
25035
|
getTemplateName(targetStr, secondStr) {
|
|
25019
25036
|
const targetLocation = this.attr.value.indexOf(targetStr);
|
|
25020
|
-
|
|
25021
|
-
|
|
25022
|
-
|
|
25037
|
+
const secondTargetLocation = secondStr ? this.attr.value.indexOf(secondStr) : void 0;
|
|
25038
|
+
return this.attr.value.slice(targetLocation + targetStr.length, secondTargetLocation).replace(":", "").trim().split(";")[0].trim();
|
|
25039
|
+
}
|
|
25040
|
+
getValueEnd(offset) {
|
|
25041
|
+
return (this.attr.valueSpan ? this.attr.valueSpan.end.offset + 1 : this.attr.keySpan.end.offset) - offset;
|
|
25042
|
+
}
|
|
25043
|
+
hasChildren() {
|
|
25044
|
+
return this.el.children.length > 0;
|
|
25045
|
+
}
|
|
25046
|
+
getChildSpan(offset) {
|
|
25047
|
+
const childStart = this.el.children[0].sourceSpan.start.offset - offset;
|
|
25048
|
+
const childEnd = this.el.children[this.el.children.length - 1].sourceSpan.end.offset - offset;
|
|
25049
|
+
return { childStart, childEnd };
|
|
25050
|
+
}
|
|
25051
|
+
shouldRemoveElseAttr() {
|
|
25052
|
+
return (this.el.name === "ng-template" || this.el.name === "ng-container") && this.elseAttr !== void 0;
|
|
25053
|
+
}
|
|
25054
|
+
getElseAttrStr() {
|
|
25055
|
+
if (this.elseAttr !== void 0) {
|
|
25056
|
+
const elseValStr = this.elseAttr.value !== "" ? `="${this.elseAttr.value}"` : "";
|
|
25057
|
+
return `${this.elseAttr.name}${elseValStr}`;
|
|
25023
25058
|
}
|
|
25024
|
-
return
|
|
25059
|
+
return "";
|
|
25025
25060
|
}
|
|
25026
25061
|
start(offset) {
|
|
25027
25062
|
var _a2;
|
|
@@ -25037,17 +25072,34 @@ var ElementToMigrate = class {
|
|
|
25037
25072
|
}
|
|
25038
25073
|
};
|
|
25039
25074
|
var Template2 = class {
|
|
25040
|
-
constructor(el, i18n2) {
|
|
25075
|
+
constructor(el, name, i18n2) {
|
|
25041
25076
|
__publicField(this, "el");
|
|
25077
|
+
__publicField(this, "name");
|
|
25042
25078
|
__publicField(this, "count", 0);
|
|
25043
25079
|
__publicField(this, "contents", "");
|
|
25044
25080
|
__publicField(this, "children", "");
|
|
25045
25081
|
__publicField(this, "i18n", null);
|
|
25082
|
+
__publicField(this, "attributes");
|
|
25046
25083
|
this.el = el;
|
|
25084
|
+
this.name = name;
|
|
25085
|
+
this.attributes = el.attrs;
|
|
25047
25086
|
this.i18n = i18n2;
|
|
25048
25087
|
}
|
|
25088
|
+
get isNgTemplateOutlet() {
|
|
25089
|
+
return this.attributes.find((attr) => attr.name === "*ngTemplateOutlet") !== void 0;
|
|
25090
|
+
}
|
|
25091
|
+
get outletContext() {
|
|
25092
|
+
const letVar = this.attributes.find((attr) => attr.name.startsWith("let-"));
|
|
25093
|
+
return letVar ? `; context: {$implicit: ${letVar.name.split("-")[1]}}` : "";
|
|
25094
|
+
}
|
|
25095
|
+
generateTemplateOutlet() {
|
|
25096
|
+
var _a2;
|
|
25097
|
+
const attr = this.attributes.find((attr2) => attr2.name === "*ngTemplateOutlet");
|
|
25098
|
+
const outletValue = (_a2 = attr == null ? void 0 : attr.value) != null ? _a2 : this.name.slice(1);
|
|
25099
|
+
return `<ng-container *ngTemplateOutlet="${outletValue}${this.outletContext}"></ng-container>`;
|
|
25100
|
+
}
|
|
25049
25101
|
generateContents(tmpl) {
|
|
25050
|
-
this.contents = tmpl.slice(this.el.sourceSpan.start.offset, this.el.sourceSpan.end.offset
|
|
25102
|
+
this.contents = tmpl.slice(this.el.sourceSpan.start.offset, this.el.sourceSpan.end.offset);
|
|
25051
25103
|
this.children = "";
|
|
25052
25104
|
if (this.el.children.length > 0) {
|
|
25053
25105
|
this.children = tmpl.slice(this.el.children[0].sourceSpan.start.offset, this.el.children[this.el.children.length - 1].sourceSpan.end.offset);
|
|
@@ -25058,16 +25110,18 @@ var AnalyzedFile = class {
|
|
|
25058
25110
|
constructor() {
|
|
25059
25111
|
__publicField(this, "ranges", []);
|
|
25060
25112
|
__publicField(this, "removeCommonModule", false);
|
|
25113
|
+
__publicField(this, "sourceFilePath", "");
|
|
25061
25114
|
}
|
|
25062
25115
|
getSortedRanges() {
|
|
25063
|
-
const templateRanges = this.ranges.slice().filter((x) => x.type
|
|
25116
|
+
const templateRanges = this.ranges.slice().filter((x) => x.type !== "import").sort((aStart, bStart) => bStart.start - aStart.start);
|
|
25064
25117
|
const importRanges = this.ranges.slice().filter((x) => x.type === "import").sort((aStart, bStart) => bStart.start - aStart.start);
|
|
25065
25118
|
return [...templateRanges, ...importRanges];
|
|
25066
25119
|
}
|
|
25067
|
-
static addRange(path2, analyzedFiles, range) {
|
|
25120
|
+
static addRange(path2, sourceFilePath, analyzedFiles, range) {
|
|
25068
25121
|
let analysis = analyzedFiles.get(path2);
|
|
25069
25122
|
if (!analysis) {
|
|
25070
25123
|
analysis = new AnalyzedFile();
|
|
25124
|
+
analysis.sourceFilePath = sourceFilePath;
|
|
25071
25125
|
analyzedFiles.set(path2, analysis);
|
|
25072
25126
|
}
|
|
25073
25127
|
const duplicate = analysis.ranges.find((current) => current.start === range.start && current.end === range.end);
|
|
@@ -25115,7 +25169,7 @@ var ElementCollector = class extends RecursiveVisitor {
|
|
|
25115
25169
|
for (const attr of el.attrs) {
|
|
25116
25170
|
if (this._attributes.includes(attr.name)) {
|
|
25117
25171
|
const elseAttr = el.attrs.find((x) => x.name === boundngifelse);
|
|
25118
|
-
const thenAttr = el.attrs.find((x) => x.name === boundngifthenelse);
|
|
25172
|
+
const thenAttr = el.attrs.find((x) => x.name === boundngifthenelse || x.name === boundngifthen);
|
|
25119
25173
|
const forAttrs = attr.name === nakedngfor ? this.getForAttrs(el) : void 0;
|
|
25120
25174
|
this.elements.push(new ElementToMigrate(el, attr, elseAttr, thenAttr, forAttrs));
|
|
25121
25175
|
}
|
|
@@ -25164,16 +25218,18 @@ var TemplateCollector = class extends RecursiveVisitor {
|
|
|
25164
25218
|
templateAttr = attr;
|
|
25165
25219
|
}
|
|
25166
25220
|
}
|
|
25167
|
-
if (templateAttr !== null) {
|
|
25221
|
+
if (templateAttr !== null && !this.templates.has(templateAttr.name)) {
|
|
25222
|
+
this.templates.set(templateAttr.name, new Template2(el, templateAttr.name, i18n2));
|
|
25168
25223
|
this.elements.push(new ElementToMigrate(el, templateAttr));
|
|
25169
|
-
|
|
25224
|
+
} else if (templateAttr !== null) {
|
|
25225
|
+
throw new Error(`A duplicate ng-template name "${templateAttr.name}" was found. The control flow migration requires unique ng-template names within a component.`);
|
|
25170
25226
|
}
|
|
25171
25227
|
}
|
|
25172
25228
|
super.visitElement(el, null);
|
|
25173
25229
|
}
|
|
25174
25230
|
};
|
|
25175
25231
|
|
|
25176
|
-
// bazel-out/
|
|
25232
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/util.mjs
|
|
25177
25233
|
var import_path2 = require("path");
|
|
25178
25234
|
var import_typescript5 = __toESM(require("typescript"), 1);
|
|
25179
25235
|
var importRemovals = [
|
|
@@ -25225,10 +25281,15 @@ function updateImportClause(clause, removeCommonModule) {
|
|
|
25225
25281
|
return clause;
|
|
25226
25282
|
}
|
|
25227
25283
|
function updateClassImports(propAssignment, removeCommonModule) {
|
|
25228
|
-
const printer = import_typescript5.default.createPrinter(
|
|
25284
|
+
const printer = import_typescript5.default.createPrinter({
|
|
25285
|
+
removeComments: true
|
|
25286
|
+
});
|
|
25229
25287
|
const importList = propAssignment.initializer;
|
|
25230
25288
|
const removals = removeCommonModule ? importWithCommonRemovals : importRemovals;
|
|
25231
25289
|
const elements = importList.elements.filter((el) => !removals.includes(el.getText()));
|
|
25290
|
+
if (elements.length === importList.elements.length) {
|
|
25291
|
+
return null;
|
|
25292
|
+
}
|
|
25232
25293
|
const updatedElements = import_typescript5.default.factory.updateArrayLiteralExpression(importList, elements);
|
|
25233
25294
|
const updatedAssignment = import_typescript5.default.factory.updatePropertyAssignment(propAssignment, propAssignment.name, updatedElements);
|
|
25234
25295
|
return printer.printNode(import_typescript5.default.EmitHint.Unspecified, updatedAssignment, updatedAssignment.getSourceFile());
|
|
@@ -25241,7 +25302,7 @@ function analyzeImportDeclarations(node, sourceFile, analyzedFiles) {
|
|
|
25241
25302
|
if (clause.namedBindings && import_typescript5.default.isNamedImports(clause.namedBindings)) {
|
|
25242
25303
|
const elements = clause.namedBindings.elements.filter((el) => importWithCommonRemovals.includes(el.getText()));
|
|
25243
25304
|
if (elements.length > 0) {
|
|
25244
|
-
AnalyzedFile.addRange(sourceFile.fileName, analyzedFiles, { start: node.getStart(), end: node.getEnd(), node, type: "import" });
|
|
25305
|
+
AnalyzedFile.addRange(sourceFile.fileName, sourceFile.fileName, analyzedFiles, { start: node.getStart(), end: node.getEnd(), node, type: "import" });
|
|
25245
25306
|
}
|
|
25246
25307
|
}
|
|
25247
25308
|
}
|
|
@@ -25260,7 +25321,7 @@ function analyzeDecorators(node, sourceFile, analyzedFiles) {
|
|
|
25260
25321
|
}
|
|
25261
25322
|
switch (prop.name.text) {
|
|
25262
25323
|
case "template":
|
|
25263
|
-
AnalyzedFile.addRange(sourceFile.fileName, analyzedFiles, {
|
|
25324
|
+
AnalyzedFile.addRange(sourceFile.fileName, sourceFile.fileName, analyzedFiles, {
|
|
25264
25325
|
start: prop.initializer.getStart() + 1,
|
|
25265
25326
|
end: prop.initializer.getEnd() - 1,
|
|
25266
25327
|
node: prop,
|
|
@@ -25268,7 +25329,7 @@ function analyzeDecorators(node, sourceFile, analyzedFiles) {
|
|
|
25268
25329
|
});
|
|
25269
25330
|
break;
|
|
25270
25331
|
case "imports":
|
|
25271
|
-
AnalyzedFile.addRange(sourceFile.fileName, analyzedFiles, {
|
|
25332
|
+
AnalyzedFile.addRange(sourceFile.fileName, sourceFile.fileName, analyzedFiles, {
|
|
25272
25333
|
start: prop.name.getStart(),
|
|
25273
25334
|
end: prop.initializer.getEnd(),
|
|
25274
25335
|
node: prop,
|
|
@@ -25278,7 +25339,7 @@ function analyzeDecorators(node, sourceFile, analyzedFiles) {
|
|
|
25278
25339
|
case "templateUrl":
|
|
25279
25340
|
if (import_typescript5.default.isStringLiteralLike(prop.initializer)) {
|
|
25280
25341
|
const path2 = (0, import_path2.join)((0, import_path2.dirname)(sourceFile.fileName), prop.initializer.text);
|
|
25281
|
-
AnalyzedFile.addRange(path2, analyzedFiles, { start: 0, node: prop, type: "
|
|
25342
|
+
AnalyzedFile.addRange(path2, sourceFile.fileName, analyzedFiles, { start: 0, node: prop, type: "templateUrl" });
|
|
25282
25343
|
}
|
|
25283
25344
|
break;
|
|
25284
25345
|
}
|
|
@@ -25344,7 +25405,7 @@ function reduceNestingOffset(el, nestLevel, offset, postOffsets) {
|
|
|
25344
25405
|
}
|
|
25345
25406
|
return offset;
|
|
25346
25407
|
}
|
|
25347
|
-
function
|
|
25408
|
+
function getTemplates(template2) {
|
|
25348
25409
|
var _a2;
|
|
25349
25410
|
const parsed = parseTemplate2(template2);
|
|
25350
25411
|
if (parsed !== null) {
|
|
@@ -25352,7 +25413,7 @@ function countTemplateUsage(template2) {
|
|
|
25352
25413
|
visitAll2(visitor, parsed.rootNodes);
|
|
25353
25414
|
for (let [key, tmpl] of visitor.templates) {
|
|
25354
25415
|
const escapeKey = escapeRegExp(key.slice(1));
|
|
25355
|
-
const regex = new RegExp(`[^a-zA-Z0-9-<]${escapeKey}\\W`, "gm");
|
|
25416
|
+
const regex = new RegExp(`[^a-zA-Z0-9-<']${escapeKey}\\W`, "gm");
|
|
25356
25417
|
const matches = template2.match(regex);
|
|
25357
25418
|
tmpl.count = (_a2 = matches == null ? void 0 : matches.length) != null ? _a2 : 0;
|
|
25358
25419
|
tmpl.generateContents(template2);
|
|
@@ -25362,27 +25423,47 @@ function countTemplateUsage(template2) {
|
|
|
25362
25423
|
return /* @__PURE__ */ new Map();
|
|
25363
25424
|
}
|
|
25364
25425
|
function wrapIntoI18nContainer(i18nAttr, content) {
|
|
25426
|
+
const { start, middle, end } = generatei18nContainer(i18nAttr, content);
|
|
25427
|
+
return `${start}${middle}${end}`;
|
|
25428
|
+
}
|
|
25429
|
+
function generatei18nContainer(i18nAttr, middle) {
|
|
25365
25430
|
const i18n2 = i18nAttr.value === "" ? "i18n" : `i18n="${i18nAttr.value}"`;
|
|
25366
|
-
return `<ng-container ${i18n2}
|
|
25431
|
+
return { start: `<ng-container ${i18n2}>`, middle, end: `</ng-container>` };
|
|
25367
25432
|
}
|
|
25368
25433
|
function processNgTemplates(template2) {
|
|
25369
|
-
|
|
25370
|
-
|
|
25371
|
-
const
|
|
25372
|
-
|
|
25373
|
-
|
|
25374
|
-
|
|
25375
|
-
|
|
25376
|
-
|
|
25377
|
-
|
|
25378
|
-
|
|
25379
|
-
|
|
25380
|
-
|
|
25381
|
-
|
|
25434
|
+
try {
|
|
25435
|
+
const templates = getTemplates(template2);
|
|
25436
|
+
for (const [name, t] of templates) {
|
|
25437
|
+
const replaceRegex = new RegExp(`${name}\\|`, "g");
|
|
25438
|
+
const forRegex = new RegExp(`${name}\\#`, "g");
|
|
25439
|
+
const forMatches = [...template2.matchAll(forRegex)];
|
|
25440
|
+
const matches = [...forMatches, ...template2.matchAll(replaceRegex)];
|
|
25441
|
+
let safeToRemove = true;
|
|
25442
|
+
if (matches.length > 0) {
|
|
25443
|
+
if (t.i18n !== null) {
|
|
25444
|
+
const container = wrapIntoI18nContainer(t.i18n, t.children);
|
|
25445
|
+
template2 = template2.replace(replaceRegex, container);
|
|
25446
|
+
} else if (t.children.trim() === "" && t.isNgTemplateOutlet) {
|
|
25447
|
+
template2 = template2.replace(replaceRegex, t.generateTemplateOutlet());
|
|
25448
|
+
} else if (forMatches.length > 0) {
|
|
25449
|
+
if (t.count === 2) {
|
|
25450
|
+
template2 = template2.replace(forRegex, t.children);
|
|
25451
|
+
} else {
|
|
25452
|
+
template2 = template2.replace(forRegex, t.generateTemplateOutlet());
|
|
25453
|
+
safeToRemove = false;
|
|
25454
|
+
}
|
|
25455
|
+
} else {
|
|
25456
|
+
template2 = template2.replace(replaceRegex, t.children);
|
|
25457
|
+
}
|
|
25458
|
+
if (t.count === matches.length + 1 && safeToRemove) {
|
|
25459
|
+
template2 = template2.replace(t.contents, "");
|
|
25460
|
+
}
|
|
25382
25461
|
}
|
|
25383
25462
|
}
|
|
25463
|
+
return { migrated: template2, err: void 0 };
|
|
25464
|
+
} catch (err) {
|
|
25465
|
+
return { migrated: template2, err };
|
|
25384
25466
|
}
|
|
25385
|
-
return template2;
|
|
25386
25467
|
}
|
|
25387
25468
|
function canRemoveCommonModule(template2) {
|
|
25388
25469
|
const parsed = parseTemplate2(template2);
|
|
@@ -25396,7 +25477,8 @@ function canRemoveCommonModule(template2) {
|
|
|
25396
25477
|
}
|
|
25397
25478
|
function removeImports(template2, node, removeCommonModule) {
|
|
25398
25479
|
if (template2.startsWith("imports") && import_typescript5.default.isPropertyAssignment(node)) {
|
|
25399
|
-
|
|
25480
|
+
const updatedImport = updateClassImports(node, removeCommonModule);
|
|
25481
|
+
return updatedImport != null ? updatedImport : template2;
|
|
25400
25482
|
} else if (import_typescript5.default.isImportDeclaration(node) && checkIfShouldChange(node, removeCommonModule)) {
|
|
25401
25483
|
return updateImportDeclaration(node, removeCommonModule);
|
|
25402
25484
|
}
|
|
@@ -25423,53 +25505,71 @@ function isRemovableContainer(etm) {
|
|
|
25423
25505
|
function getMainBlock(etm, tmpl, offset) {
|
|
25424
25506
|
const i18nAttr = etm.el.attrs.find((x) => x.name === "i18n");
|
|
25425
25507
|
if (isRemovableContainer(etm)) {
|
|
25426
|
-
|
|
25427
|
-
|
|
25428
|
-
|
|
25508
|
+
let middle2 = "";
|
|
25509
|
+
if (etm.hasChildren()) {
|
|
25510
|
+
const { childStart: childStart2, childEnd: childEnd2 } = etm.getChildSpan(offset);
|
|
25511
|
+
middle2 = tmpl.slice(childStart2, childEnd2);
|
|
25512
|
+
}
|
|
25429
25513
|
return { start: "", middle: middle2, end: "" };
|
|
25430
25514
|
} else if (isI18nTemplate(etm, i18nAttr)) {
|
|
25431
|
-
const childStart2 = etm.
|
|
25432
|
-
|
|
25433
|
-
const middle2 = wrapIntoI18nContainer(i18nAttr, tmpl.slice(childStart2, childEnd2));
|
|
25434
|
-
return { start: "", middle: middle2, end: "" };
|
|
25515
|
+
const { childStart: childStart2, childEnd: childEnd2 } = etm.getChildSpan(offset);
|
|
25516
|
+
return generatei18nContainer(i18nAttr, tmpl.slice(childStart2, childEnd2));
|
|
25435
25517
|
}
|
|
25436
25518
|
const attrStart = etm.attr.keySpan.start.offset - 1 - offset;
|
|
25437
|
-
const valEnd =
|
|
25438
|
-
|
|
25439
|
-
let
|
|
25440
|
-
if (etm.
|
|
25441
|
-
|
|
25442
|
-
childEnd = etm.el.children[etm.el.children.length - 1].sourceSpan.end.offset - offset;
|
|
25519
|
+
const valEnd = etm.getValueEnd(offset);
|
|
25520
|
+
const { childStart, childEnd } = etm.hasChildren() ? etm.getChildSpan(offset) : { childStart: valEnd, childEnd: valEnd };
|
|
25521
|
+
let start = tmpl.slice(etm.start(offset), attrStart) + tmpl.slice(valEnd, childStart);
|
|
25522
|
+
if (etm.shouldRemoveElseAttr()) {
|
|
25523
|
+
start = start.replace(etm.getElseAttrStr(), "");
|
|
25443
25524
|
}
|
|
25444
|
-
let start = tmpl.slice(etm.start(offset), attrStart);
|
|
25445
|
-
start += tmpl.slice(valEnd, childStart);
|
|
25446
25525
|
const middle = tmpl.slice(childStart, childEnd);
|
|
25447
25526
|
const end = tmpl.slice(childEnd, etm.end(offset));
|
|
25448
25527
|
return { start, middle, end };
|
|
25449
25528
|
}
|
|
25450
|
-
|
|
25529
|
+
var selfClosingList = "input|br|img|base|wbr|area|col|embed|hr|link|meta|param|source|track";
|
|
25530
|
+
function formatTemplate(tmpl, templateType) {
|
|
25451
25531
|
if (tmpl.indexOf("\n") > -1) {
|
|
25532
|
+
let openSelfClosingEl = false;
|
|
25452
25533
|
const openBlockRegex = /^\s*\@(if|switch|case|default|for)|^\s*\}\s\@else/;
|
|
25453
25534
|
const openElRegex = /^\s*<([a-z0-9]+)(?![^>]*\/>)[^>]*>?/;
|
|
25535
|
+
const selfClosingRegex = new RegExp(`^\\s*<(${selfClosingList}).+\\/?>`);
|
|
25536
|
+
const openSelfClosingRegex = new RegExp(`^\\s*<(${selfClosingList})(?![^>]*\\/>)[^>]*$`);
|
|
25454
25537
|
const closeBlockRegex = /^\s*\}\s*$|^\s*\}\s\@else/;
|
|
25455
|
-
const closeElRegex = /\s*<\/([a-
|
|
25456
|
-
const closeMultiLineElRegex = /^\s*([a-
|
|
25457
|
-
const
|
|
25538
|
+
const closeElRegex = /\s*<\/([a-zA-Z0-9\-]+)*>/;
|
|
25539
|
+
const closeMultiLineElRegex = /^\s*([a-zA-Z0-9\-\[\]]+)?=?"?([^”<]+)?"?\s?\/>$/;
|
|
25540
|
+
const closeSelfClosingMultiLineRegex = /^\s*([a-zA-Z0-9\-\[\]]+)?=?"?([^”\/<]+)?"?\s?>$/;
|
|
25541
|
+
const singleLineElRegex = /\s*<([a-zA-Z0-9]+)(?![^>]*\/>)[^>]*>.*<\/([a-zA-Z0-9\-]+)*>/;
|
|
25458
25542
|
const lines = tmpl.split("\n");
|
|
25459
25543
|
const formatted = [];
|
|
25460
25544
|
let indent = "";
|
|
25545
|
+
let mindent = "";
|
|
25461
25546
|
for (let [index, line] of lines.entries()) {
|
|
25462
25547
|
if (line.trim() === "" && index !== 0 && index !== lines.length - 1) {
|
|
25463
25548
|
continue;
|
|
25464
25549
|
}
|
|
25550
|
+
if (templateType === "template" && index <= 1) {
|
|
25551
|
+
const ind = line.search(/\S/);
|
|
25552
|
+
mindent = ind > -1 ? line.slice(0, ind) : "";
|
|
25553
|
+
}
|
|
25465
25554
|
if ((closeBlockRegex.test(line) || closeElRegex.test(line) && (!singleLineElRegex.test(line) && !closeMultiLineElRegex.test(line))) && indent !== "") {
|
|
25466
25555
|
indent = indent.slice(2);
|
|
25467
25556
|
}
|
|
25468
|
-
formatted.push(indent + line.trim());
|
|
25557
|
+
formatted.push(mindent + indent + line.trim());
|
|
25469
25558
|
if (closeMultiLineElRegex.test(line)) {
|
|
25470
25559
|
indent = indent.slice(2);
|
|
25560
|
+
if (openSelfClosingEl) {
|
|
25561
|
+
openSelfClosingEl = false;
|
|
25562
|
+
}
|
|
25563
|
+
}
|
|
25564
|
+
if (closeSelfClosingMultiLineRegex.test(line) && openSelfClosingEl) {
|
|
25565
|
+
openSelfClosingEl = false;
|
|
25566
|
+
indent = indent.slice(2);
|
|
25567
|
+
}
|
|
25568
|
+
if ((openBlockRegex.test(line) || openElRegex.test(line)) && !singleLineElRegex.test(line) && !selfClosingRegex.test(line) && !openSelfClosingRegex.test(line)) {
|
|
25569
|
+
indent += " ";
|
|
25471
25570
|
}
|
|
25472
|
-
if (
|
|
25571
|
+
if (openSelfClosingRegex.test(line)) {
|
|
25572
|
+
openSelfClosingEl = true;
|
|
25473
25573
|
indent += " ";
|
|
25474
25574
|
}
|
|
25475
25575
|
}
|
|
@@ -25486,7 +25586,7 @@ function forEachClass(sourceFile, callback) {
|
|
|
25486
25586
|
});
|
|
25487
25587
|
}
|
|
25488
25588
|
|
|
25489
|
-
// bazel-out/
|
|
25589
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/cases.mjs
|
|
25490
25590
|
var boundcase = "[ngSwitchCase]";
|
|
25491
25591
|
var switchcase = "*ngSwitchCase";
|
|
25492
25592
|
var nakedcase = "ngSwitchCase";
|
|
@@ -25564,7 +25664,7 @@ function migrateNgSwitchDefault(etm, tmpl, offset) {
|
|
|
25564
25664
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
25565
25665
|
}
|
|
25566
25666
|
|
|
25567
|
-
// bazel-out/
|
|
25667
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/fors.mjs
|
|
25568
25668
|
var ngfor = "*ngFor";
|
|
25569
25669
|
var nakedngfor2 = "ngFor";
|
|
25570
25670
|
var fors = [
|
|
@@ -25623,15 +25723,23 @@ function migrateStandardNgFor(etm, tmpl, offset) {
|
|
|
25623
25723
|
const parts = getNgForParts(etm.attr.value);
|
|
25624
25724
|
const originals = getOriginals(etm, tmpl, offset);
|
|
25625
25725
|
const condition = parts[0].replace("let ", "");
|
|
25726
|
+
if (condition.indexOf(" as ") > -1) {
|
|
25727
|
+
let errorMessage = `Found an aliased collection on an ngFor: "${condition}". Collection aliasing is not supported with @for. Refactor the code to remove the \`as\` alias and re-run the migration.`;
|
|
25728
|
+
throw new Error(errorMessage);
|
|
25729
|
+
}
|
|
25626
25730
|
const loopVar = condition.split(" of ")[0];
|
|
25627
25731
|
let trackBy = loopVar;
|
|
25628
25732
|
let aliasedIndex = null;
|
|
25733
|
+
let tmplPlaceholder = "";
|
|
25629
25734
|
for (let i = 1; i < parts.length; i++) {
|
|
25630
25735
|
const part = parts[i].trim();
|
|
25631
25736
|
if (part.startsWith("trackBy:")) {
|
|
25632
25737
|
const trackByFn = part.replace("trackBy:", "").trim();
|
|
25633
25738
|
trackBy = `${trackByFn}($index, ${loopVar})`;
|
|
25634
25739
|
}
|
|
25740
|
+
if (part.startsWith("template:")) {
|
|
25741
|
+
tmplPlaceholder = `#${part.split(":")[1].trim()}#`;
|
|
25742
|
+
}
|
|
25635
25743
|
if (part.match(aliasWithEqualRegexp)) {
|
|
25636
25744
|
const aliasParts = part.split("=");
|
|
25637
25745
|
aliases.push(` ${aliasParts[0].trim()} = $${aliasParts[1].trim()}`);
|
|
@@ -25651,10 +25759,18 @@ function migrateStandardNgFor(etm, tmpl, offset) {
|
|
|
25651
25759
|
trackBy = trackBy.replace("$index", aliasedIndex);
|
|
25652
25760
|
}
|
|
25653
25761
|
const aliasStr = aliases.length > 0 ? `;${aliases.join(";")}` : "";
|
|
25654
|
-
|
|
25655
|
-
|
|
25656
|
-
|
|
25657
|
-
|
|
25762
|
+
let startBlock = `@for (${condition}; track ${trackBy}${aliasStr}) {${lbString}`;
|
|
25763
|
+
let endBlock = `${lbString}}`;
|
|
25764
|
+
let forBlock = "";
|
|
25765
|
+
if (tmplPlaceholder !== "") {
|
|
25766
|
+
startBlock = startBlock + tmplPlaceholder;
|
|
25767
|
+
forBlock = startBlock + endBlock;
|
|
25768
|
+
} else {
|
|
25769
|
+
const { start, middle, end } = getMainBlock(etm, tmpl, offset);
|
|
25770
|
+
startBlock += start;
|
|
25771
|
+
endBlock = end + endBlock;
|
|
25772
|
+
forBlock = startBlock + middle + endBlock;
|
|
25773
|
+
}
|
|
25658
25774
|
const updatedTmpl = tmpl.slice(0, etm.start(offset)) + forBlock + tmpl.slice(etm.end(offset));
|
|
25659
25775
|
const pre = originals.start.length - startBlock.length;
|
|
25660
25776
|
const post = originals.end.length - endBlock.length;
|
|
@@ -25721,7 +25837,7 @@ function getNgForParts(expression) {
|
|
|
25721
25837
|
return parts;
|
|
25722
25838
|
}
|
|
25723
25839
|
|
|
25724
|
-
// bazel-out/
|
|
25840
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/ifs.mjs
|
|
25725
25841
|
var ngif = "*ngIf";
|
|
25726
25842
|
var boundngif = "[ngIf]";
|
|
25727
25843
|
var nakedngif = "ngIf";
|
|
@@ -25760,8 +25876,8 @@ function migrateIf(template2) {
|
|
|
25760
25876
|
return { migrated: result, errors, changed };
|
|
25761
25877
|
}
|
|
25762
25878
|
function migrateNgIf(etm, tmpl, offset) {
|
|
25763
|
-
const matchThen = etm.attr.value.match(
|
|
25764
|
-
const matchElse = etm.attr.value.match(
|
|
25879
|
+
const matchThen = etm.attr.value.match(/;?\s*then/gm);
|
|
25880
|
+
const matchElse = etm.attr.value.match(/;?\s*else/gm);
|
|
25765
25881
|
if (etm.thenAttr !== void 0 || etm.elseAttr !== void 0) {
|
|
25766
25882
|
return buildBoundIfElseBlock(etm, tmpl, offset);
|
|
25767
25883
|
} else if (matchThen && matchThen.length > 0) {
|
|
@@ -25785,7 +25901,7 @@ function buildIfBlock(etm, tmpl, offset) {
|
|
|
25785
25901
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
25786
25902
|
}
|
|
25787
25903
|
function buildStandardIfElseBlock(etm, tmpl, elseString, offset) {
|
|
25788
|
-
const condition = etm.getCondition(
|
|
25904
|
+
const condition = etm.getCondition().replace(" as ", "; as ").replace(/;\s*let/g, "; as");
|
|
25789
25905
|
const elsePlaceholder = `#${etm.getTemplateName(elseString)}|`;
|
|
25790
25906
|
return buildIfElseBlock(etm, tmpl, condition, elsePlaceholder, offset);
|
|
25791
25907
|
}
|
|
@@ -25814,7 +25930,7 @@ function buildIfElseBlock(etm, tmpl, condition, elsePlaceholder, offset) {
|
|
|
25814
25930
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
25815
25931
|
}
|
|
25816
25932
|
function buildStandardIfThenElseBlock(etm, tmpl, thenString, elseString, offset) {
|
|
25817
|
-
const condition = etm.getCondition(
|
|
25933
|
+
const condition = etm.getCondition().replace(" as ", "; as ").replace(/;\s*let/g, "; as");
|
|
25818
25934
|
const thenPlaceholder = `#${etm.getTemplateName(thenString, elseString)}|`;
|
|
25819
25935
|
const elsePlaceholder = `#${etm.getTemplateName(elseString)}|`;
|
|
25820
25936
|
return buildIfThenElseBlock(etm, tmpl, condition, thenPlaceholder, elsePlaceholder, offset);
|
|
@@ -25834,7 +25950,7 @@ function buildIfThenElseBlock(etm, tmpl, condition, thenPlaceholder, elsePlaceho
|
|
|
25834
25950
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
25835
25951
|
}
|
|
25836
25952
|
|
|
25837
|
-
// bazel-out/
|
|
25953
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/switches.mjs
|
|
25838
25954
|
var ngswitch = "[ngSwitch]";
|
|
25839
25955
|
var switches = [
|
|
25840
25956
|
ngswitch
|
|
@@ -25884,21 +26000,29 @@ function migrateNgSwitch(etm, tmpl, offset) {
|
|
|
25884
26000
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
25885
26001
|
}
|
|
25886
26002
|
|
|
25887
|
-
// bazel-out/
|
|
25888
|
-
function migrateTemplate(template2, templateType, node, file, format = true) {
|
|
26003
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/migration.mjs
|
|
26004
|
+
function migrateTemplate(template2, templateType, node, file, format = true, analyzedFiles) {
|
|
25889
26005
|
let errors = [];
|
|
25890
26006
|
let migrated = template2;
|
|
25891
|
-
if (templateType === "template") {
|
|
26007
|
+
if (templateType === "template" || templateType === "templateUrl") {
|
|
25892
26008
|
const ifResult = migrateIf(template2);
|
|
25893
26009
|
const forResult = migrateFor(ifResult.migrated);
|
|
25894
26010
|
const switchResult = migrateSwitch(forResult.migrated);
|
|
25895
26011
|
const caseResult = migrateCase(switchResult.migrated);
|
|
25896
|
-
|
|
26012
|
+
const templateResult = processNgTemplates(caseResult.migrated);
|
|
26013
|
+
if (templateResult.err !== void 0) {
|
|
26014
|
+
return { migrated: template2, errors: [{ type: "template", error: templateResult.err }] };
|
|
26015
|
+
}
|
|
26016
|
+
migrated = templateResult.migrated;
|
|
25897
26017
|
const changed = ifResult.changed || forResult.changed || switchResult.changed || caseResult.changed;
|
|
25898
26018
|
if (format && changed) {
|
|
25899
|
-
migrated = formatTemplate(migrated);
|
|
26019
|
+
migrated = formatTemplate(migrated, templateType);
|
|
25900
26020
|
}
|
|
25901
26021
|
file.removeCommonModule = canRemoveCommonModule(template2);
|
|
26022
|
+
if (templateType === "templateUrl" && analyzedFiles !== null && analyzedFiles.has(file.sourceFilePath)) {
|
|
26023
|
+
const componentFile = analyzedFiles.get(file.sourceFilePath);
|
|
26024
|
+
componentFile.removeCommonModule = file.removeCommonModule;
|
|
26025
|
+
}
|
|
25902
26026
|
errors = [
|
|
25903
26027
|
...ifResult.errors,
|
|
25904
26028
|
...forResult.errors,
|
|
@@ -25911,7 +26035,7 @@ function migrateTemplate(template2, templateType, node, file, format = true) {
|
|
|
25911
26035
|
return { migrated, errors };
|
|
25912
26036
|
}
|
|
25913
26037
|
|
|
25914
|
-
// bazel-out/
|
|
26038
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/index.mjs
|
|
25915
26039
|
function control_flow_migration_default(options) {
|
|
25916
26040
|
return (tree, context) => __async(this, null, function* () {
|
|
25917
26041
|
const basePath = process.cwd();
|
|
@@ -25952,7 +26076,9 @@ function runControlFlowMigration(tree, tsconfigPath, basePath, pathToMigrate, sc
|
|
|
25952
26076
|
for (const sourceFile of sourceFiles) {
|
|
25953
26077
|
analyze(sourceFile, analysis);
|
|
25954
26078
|
}
|
|
25955
|
-
|
|
26079
|
+
const paths = sortFilePaths([...analysis.keys()]);
|
|
26080
|
+
for (const path2 of paths) {
|
|
26081
|
+
const file = analysis.get(path2);
|
|
25956
26082
|
const ranges = file.getSortedRanges();
|
|
25957
26083
|
const relativePath = (0, import_path3.relative)(basePath, path2);
|
|
25958
26084
|
const content = tree.readText(relativePath);
|
|
@@ -25960,7 +26086,7 @@ function runControlFlowMigration(tree, tsconfigPath, basePath, pathToMigrate, sc
|
|
|
25960
26086
|
for (const { start, end, node, type } of ranges) {
|
|
25961
26087
|
const template2 = content.slice(start, end);
|
|
25962
26088
|
const length = (end != null ? end : content.length) - start;
|
|
25963
|
-
const { migrated, errors } = migrateTemplate(template2, type, node, file, schematicOptions.format);
|
|
26089
|
+
const { migrated, errors } = migrateTemplate(template2, type, node, file, schematicOptions.format, analysis);
|
|
25964
26090
|
if (migrated !== null) {
|
|
25965
26091
|
update.remove(start, length);
|
|
25966
26092
|
update.insertLeft(start, migrated);
|
|
@@ -25977,6 +26103,10 @@ function runControlFlowMigration(tree, tsconfigPath, basePath, pathToMigrate, sc
|
|
|
25977
26103
|
}
|
|
25978
26104
|
return errorList;
|
|
25979
26105
|
}
|
|
26106
|
+
function sortFilePaths(names) {
|
|
26107
|
+
names.sort((a, _) => a.endsWith(".html") ? -1 : 0);
|
|
26108
|
+
return names;
|
|
26109
|
+
}
|
|
25980
26110
|
function generateErrorMessage(path2, errors) {
|
|
25981
26111
|
let errorMessage = `Template "${path2}" encountered ${errors.length} errors during migration:
|
|
25982
26112
|
`;
|