intl-messageformat 9.11.4 → 10.0.1
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/intl-messageformat.esm.js +3255 -1266
- package/intl-messageformat.iife.js +3304 -1355
- package/lib/src/core.d.ts +2 -0
- package/lib/src/core.d.ts.map +1 -1
- package/lib/src/core.js +21 -5
- package/lib/src/formatters.js +1 -1
- package/package.json +5 -5
- package/src/core.d.ts +2 -0
- package/src/core.d.ts.map +1 -1
- package/src/core.js +21 -5
- package/src/formatters.js +1 -1
|
@@ -1,1433 +1,3383 @@
|
|
|
1
1
|
var IntlMessageFormat = (function() {
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var
|
|
7
|
-
return
|
|
8
|
+
var __commonJS = function(cb, mod) {
|
|
9
|
+
return function __require() {
|
|
10
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
|
+
};
|
|
8
12
|
};
|
|
9
13
|
var __export = function(target, all) {
|
|
10
14
|
for (var name in all)
|
|
11
15
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
16
|
};
|
|
13
|
-
var
|
|
14
|
-
if (
|
|
15
|
-
for (var keys = __getOwnPropNames(
|
|
17
|
+
var __copyProps = function(to, from, except, desc) {
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function")
|
|
19
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
16
20
|
key = keys[i];
|
|
17
|
-
if (!__hasOwnProp.call(
|
|
18
|
-
__defProp(
|
|
19
|
-
return
|
|
20
|
-
}.bind(null, key), enumerable: !(desc = __getOwnPropDesc(
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: function(k) {
|
|
23
|
+
return from[k];
|
|
24
|
+
}.bind(null, key), enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
21
25
|
}
|
|
22
|
-
return
|
|
26
|
+
return to;
|
|
23
27
|
};
|
|
24
|
-
var
|
|
25
|
-
return
|
|
26
|
-
return cache && cache.get(module) || (temp = __reExport(__markAsModule({}), module, 1), cache && cache.set(module, temp), temp);
|
|
27
|
-
};
|
|
28
|
-
}(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
29
|
-
|
|
30
|
-
// bazel-out/darwin-fastbuild/bin/packages/intl-messageformat/lib/index.js
|
|
31
|
-
var lib_exports = {};
|
|
32
|
-
__export(lib_exports, {
|
|
33
|
-
ErrorCode: function() {
|
|
34
|
-
return ErrorCode;
|
|
35
|
-
},
|
|
36
|
-
FormatError: function() {
|
|
37
|
-
return FormatError;
|
|
38
|
-
},
|
|
39
|
-
IntlMessageFormat: function() {
|
|
40
|
-
return IntlMessageFormat;
|
|
41
|
-
},
|
|
42
|
-
InvalidValueError: function() {
|
|
43
|
-
return InvalidValueError;
|
|
44
|
-
},
|
|
45
|
-
InvalidValueTypeError: function() {
|
|
46
|
-
return InvalidValueTypeError;
|
|
47
|
-
},
|
|
48
|
-
MissingValueError: function() {
|
|
49
|
-
return MissingValueError;
|
|
50
|
-
},
|
|
51
|
-
PART_TYPE: function() {
|
|
52
|
-
return PART_TYPE;
|
|
53
|
-
},
|
|
54
|
-
default: function() {
|
|
55
|
-
return lib_default;
|
|
56
|
-
},
|
|
57
|
-
formatToParts: function() {
|
|
58
|
-
return formatToParts;
|
|
59
|
-
},
|
|
60
|
-
isFormatXMLElementFn: function() {
|
|
61
|
-
return isFormatXMLElementFn;
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
// node_modules/tslib/tslib.es6.js
|
|
66
|
-
var extendStatics = function(d, b) {
|
|
67
|
-
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
68
|
-
d2.__proto__ = b2;
|
|
69
|
-
} || function(d2, b2) {
|
|
70
|
-
for (var p in b2)
|
|
71
|
-
if (Object.prototype.hasOwnProperty.call(b2, p))
|
|
72
|
-
d2[p] = b2[p];
|
|
73
|
-
};
|
|
74
|
-
return extendStatics(d, b);
|
|
28
|
+
var __toESM = function(mod, isNodeMode, target) {
|
|
29
|
+
return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod);
|
|
75
30
|
};
|
|
76
|
-
function
|
|
77
|
-
|
|
78
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
79
|
-
extendStatics(d, b);
|
|
80
|
-
function __() {
|
|
81
|
-
this.constructor = d;
|
|
82
|
-
}
|
|
83
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
84
|
-
}
|
|
85
|
-
var __assign = function() {
|
|
86
|
-
__assign = Object.assign || function __assign2(t) {
|
|
87
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
88
|
-
s = arguments[i];
|
|
89
|
-
for (var p in s)
|
|
90
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
91
|
-
t[p] = s[p];
|
|
92
|
-
}
|
|
93
|
-
return t;
|
|
94
|
-
};
|
|
95
|
-
return __assign.apply(this, arguments);
|
|
31
|
+
var __toCommonJS = function(mod) {
|
|
32
|
+
return __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
96
33
|
};
|
|
97
|
-
function __spreadArray(to, from, pack) {
|
|
98
|
-
if (pack || arguments.length === 2)
|
|
99
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
100
|
-
if (ar || !(i in from)) {
|
|
101
|
-
if (!ar)
|
|
102
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
103
|
-
ar[i] = from[i];
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// bazel-out/darwin-fastbuild/bin/packages/icu-messageformat-parser/lib/error.js
|
|
110
|
-
var ErrorKind;
|
|
111
|
-
(function(ErrorKind2) {
|
|
112
|
-
ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_CLOSING_BRACE"] = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE";
|
|
113
|
-
ErrorKind2[ErrorKind2["EMPTY_ARGUMENT"] = 2] = "EMPTY_ARGUMENT";
|
|
114
|
-
ErrorKind2[ErrorKind2["MALFORMED_ARGUMENT"] = 3] = "MALFORMED_ARGUMENT";
|
|
115
|
-
ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_TYPE"] = 4] = "EXPECT_ARGUMENT_TYPE";
|
|
116
|
-
ErrorKind2[ErrorKind2["INVALID_ARGUMENT_TYPE"] = 5] = "INVALID_ARGUMENT_TYPE";
|
|
117
|
-
ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_STYLE"] = 6] = "EXPECT_ARGUMENT_STYLE";
|
|
118
|
-
ErrorKind2[ErrorKind2["INVALID_NUMBER_SKELETON"] = 7] = "INVALID_NUMBER_SKELETON";
|
|
119
|
-
ErrorKind2[ErrorKind2["INVALID_DATE_TIME_SKELETON"] = 8] = "INVALID_DATE_TIME_SKELETON";
|
|
120
|
-
ErrorKind2[ErrorKind2["EXPECT_NUMBER_SKELETON"] = 9] = "EXPECT_NUMBER_SKELETON";
|
|
121
|
-
ErrorKind2[ErrorKind2["EXPECT_DATE_TIME_SKELETON"] = 10] = "EXPECT_DATE_TIME_SKELETON";
|
|
122
|
-
ErrorKind2[ErrorKind2["UNCLOSED_QUOTE_IN_ARGUMENT_STYLE"] = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE";
|
|
123
|
-
ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_OPTIONS"] = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS";
|
|
124
|
-
ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE"] = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE";
|
|
125
|
-
ErrorKind2[ErrorKind2["INVALID_PLURAL_ARGUMENT_OFFSET_VALUE"] = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE";
|
|
126
|
-
ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_SELECTOR"] = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR";
|
|
127
|
-
ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_SELECTOR"] = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR";
|
|
128
|
-
ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT"] = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT";
|
|
129
|
-
ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT"] = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT";
|
|
130
|
-
ErrorKind2[ErrorKind2["INVALID_PLURAL_ARGUMENT_SELECTOR"] = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR";
|
|
131
|
-
ErrorKind2[ErrorKind2["DUPLICATE_PLURAL_ARGUMENT_SELECTOR"] = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR";
|
|
132
|
-
ErrorKind2[ErrorKind2["DUPLICATE_SELECT_ARGUMENT_SELECTOR"] = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR";
|
|
133
|
-
ErrorKind2[ErrorKind2["MISSING_OTHER_CLAUSE"] = 22] = "MISSING_OTHER_CLAUSE";
|
|
134
|
-
ErrorKind2[ErrorKind2["INVALID_TAG"] = 23] = "INVALID_TAG";
|
|
135
|
-
ErrorKind2[ErrorKind2["INVALID_TAG_NAME"] = 25] = "INVALID_TAG_NAME";
|
|
136
|
-
ErrorKind2[ErrorKind2["UNMATCHED_CLOSING_TAG"] = 26] = "UNMATCHED_CLOSING_TAG";
|
|
137
|
-
ErrorKind2[ErrorKind2["UNCLOSED_TAG"] = 27] = "UNCLOSED_TAG";
|
|
138
|
-
})(ErrorKind || (ErrorKind = {}));
|
|
139
|
-
|
|
140
|
-
// bazel-out/darwin-fastbuild/bin/packages/icu-messageformat-parser/lib/types.js
|
|
141
|
-
var TYPE;
|
|
142
|
-
(function(TYPE2) {
|
|
143
|
-
TYPE2[TYPE2["literal"] = 0] = "literal";
|
|
144
|
-
TYPE2[TYPE2["argument"] = 1] = "argument";
|
|
145
|
-
TYPE2[TYPE2["number"] = 2] = "number";
|
|
146
|
-
TYPE2[TYPE2["date"] = 3] = "date";
|
|
147
|
-
TYPE2[TYPE2["time"] = 4] = "time";
|
|
148
|
-
TYPE2[TYPE2["select"] = 5] = "select";
|
|
149
|
-
TYPE2[TYPE2["plural"] = 6] = "plural";
|
|
150
|
-
TYPE2[TYPE2["pound"] = 7] = "pound";
|
|
151
|
-
TYPE2[TYPE2["tag"] = 8] = "tag";
|
|
152
|
-
})(TYPE || (TYPE = {}));
|
|
153
|
-
var SKELETON_TYPE;
|
|
154
|
-
(function(SKELETON_TYPE2) {
|
|
155
|
-
SKELETON_TYPE2[SKELETON_TYPE2["number"] = 0] = "number";
|
|
156
|
-
SKELETON_TYPE2[SKELETON_TYPE2["dateTime"] = 1] = "dateTime";
|
|
157
|
-
})(SKELETON_TYPE || (SKELETON_TYPE = {}));
|
|
158
|
-
function isLiteralElement(el) {
|
|
159
|
-
return el.type === TYPE.literal;
|
|
160
|
-
}
|
|
161
|
-
function isArgumentElement(el) {
|
|
162
|
-
return el.type === TYPE.argument;
|
|
163
|
-
}
|
|
164
|
-
function isNumberElement(el) {
|
|
165
|
-
return el.type === TYPE.number;
|
|
166
|
-
}
|
|
167
|
-
function isDateElement(el) {
|
|
168
|
-
return el.type === TYPE.date;
|
|
169
|
-
}
|
|
170
|
-
function isTimeElement(el) {
|
|
171
|
-
return el.type === TYPE.time;
|
|
172
|
-
}
|
|
173
|
-
function isSelectElement(el) {
|
|
174
|
-
return el.type === TYPE.select;
|
|
175
|
-
}
|
|
176
|
-
function isPluralElement(el) {
|
|
177
|
-
return el.type === TYPE.plural;
|
|
178
|
-
}
|
|
179
|
-
function isPoundElement(el) {
|
|
180
|
-
return el.type === TYPE.pound;
|
|
181
|
-
}
|
|
182
|
-
function isTagElement(el) {
|
|
183
|
-
return el.type === TYPE.tag;
|
|
184
|
-
}
|
|
185
|
-
function isNumberSkeleton(el) {
|
|
186
|
-
return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.number);
|
|
187
|
-
}
|
|
188
|
-
function isDateTimeSkeleton(el) {
|
|
189
|
-
return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.dateTime);
|
|
190
|
-
}
|
|
191
34
|
|
|
192
|
-
// bazel-out/darwin-fastbuild/bin/
|
|
193
|
-
var
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
var
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
case "E":
|
|
231
|
-
result.weekday = len === 4 ? "short" : len === 5 ? "narrow" : "short";
|
|
232
|
-
break;
|
|
233
|
-
case "e":
|
|
234
|
-
if (len < 4) {
|
|
235
|
-
throw new RangeError("`e..eee` (weekday) patterns are not supported");
|
|
236
|
-
}
|
|
237
|
-
result.weekday = ["short", "long", "narrow", "short"][len - 4];
|
|
238
|
-
break;
|
|
239
|
-
case "c":
|
|
240
|
-
if (len < 4) {
|
|
241
|
-
throw new RangeError("`c..ccc` (weekday) patterns are not supported");
|
|
242
|
-
}
|
|
243
|
-
result.weekday = ["short", "long", "narrow", "short"][len - 4];
|
|
244
|
-
break;
|
|
245
|
-
case "a":
|
|
246
|
-
result.hour12 = true;
|
|
247
|
-
break;
|
|
248
|
-
case "b":
|
|
249
|
-
case "B":
|
|
250
|
-
throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
|
|
251
|
-
case "h":
|
|
252
|
-
result.hourCycle = "h12";
|
|
253
|
-
result.hour = ["numeric", "2-digit"][len - 1];
|
|
254
|
-
break;
|
|
255
|
-
case "H":
|
|
256
|
-
result.hourCycle = "h23";
|
|
257
|
-
result.hour = ["numeric", "2-digit"][len - 1];
|
|
258
|
-
break;
|
|
259
|
-
case "K":
|
|
260
|
-
result.hourCycle = "h11";
|
|
261
|
-
result.hour = ["numeric", "2-digit"][len - 1];
|
|
262
|
-
break;
|
|
263
|
-
case "k":
|
|
264
|
-
result.hourCycle = "h24";
|
|
265
|
-
result.hour = ["numeric", "2-digit"][len - 1];
|
|
266
|
-
break;
|
|
267
|
-
case "j":
|
|
268
|
-
case "J":
|
|
269
|
-
case "C":
|
|
270
|
-
throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
|
|
271
|
-
case "m":
|
|
272
|
-
result.minute = ["numeric", "2-digit"][len - 1];
|
|
273
|
-
break;
|
|
274
|
-
case "s":
|
|
275
|
-
result.second = ["numeric", "2-digit"][len - 1];
|
|
276
|
-
break;
|
|
277
|
-
case "S":
|
|
278
|
-
case "A":
|
|
279
|
-
throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
|
|
280
|
-
case "z":
|
|
281
|
-
result.timeZoneName = len < 4 ? "short" : "long";
|
|
282
|
-
break;
|
|
283
|
-
case "Z":
|
|
284
|
-
case "O":
|
|
285
|
-
case "v":
|
|
286
|
-
case "V":
|
|
287
|
-
case "X":
|
|
288
|
-
case "x":
|
|
289
|
-
throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead");
|
|
290
|
-
}
|
|
291
|
-
return "";
|
|
292
|
-
});
|
|
293
|
-
return result;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
// bazel-out/darwin-fastbuild/bin/packages/icu-skeleton-parser/lib/regex.generated.js
|
|
297
|
-
var WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
298
|
-
|
|
299
|
-
// bazel-out/darwin-fastbuild/bin/packages/icu-skeleton-parser/lib/number.js
|
|
300
|
-
function parseNumberSkeletonFromString(skeleton) {
|
|
301
|
-
if (skeleton.length === 0) {
|
|
302
|
-
throw new Error("Number skeleton cannot be empty");
|
|
303
|
-
}
|
|
304
|
-
var stringTokens = skeleton.split(WHITE_SPACE_REGEX).filter(function(x) {
|
|
305
|
-
return x.length > 0;
|
|
306
|
-
});
|
|
307
|
-
var tokens = [];
|
|
308
|
-
for (var _i = 0, stringTokens_1 = stringTokens; _i < stringTokens_1.length; _i++) {
|
|
309
|
-
var stringToken = stringTokens_1[_i];
|
|
310
|
-
var stemAndOptions = stringToken.split("/");
|
|
311
|
-
if (stemAndOptions.length === 0) {
|
|
312
|
-
throw new Error("Invalid number skeleton");
|
|
313
|
-
}
|
|
314
|
-
var stem = stemAndOptions[0], options = stemAndOptions.slice(1);
|
|
315
|
-
for (var _a2 = 0, options_1 = options; _a2 < options_1.length; _a2++) {
|
|
316
|
-
var option = options_1[_a2];
|
|
317
|
-
if (option.length === 0) {
|
|
318
|
-
throw new Error("Invalid number skeleton");
|
|
35
|
+
// bazel-out/darwin-fastbuild/bin/external/npm/node_modules/tslib/tslib.js
|
|
36
|
+
var require_tslib = __commonJS({
|
|
37
|
+
"bazel-out/darwin-fastbuild/bin/external/npm/node_modules/tslib/tslib.js": function(exports, module) {
|
|
38
|
+
var __extends2;
|
|
39
|
+
var __assign2;
|
|
40
|
+
var __rest;
|
|
41
|
+
var __decorate;
|
|
42
|
+
var __param;
|
|
43
|
+
var __metadata;
|
|
44
|
+
var __awaiter;
|
|
45
|
+
var __generator;
|
|
46
|
+
var __exportStar;
|
|
47
|
+
var __values;
|
|
48
|
+
var __read;
|
|
49
|
+
var __spread;
|
|
50
|
+
var __spreadArrays;
|
|
51
|
+
var __spreadArray2;
|
|
52
|
+
var __await;
|
|
53
|
+
var __asyncGenerator;
|
|
54
|
+
var __asyncDelegator;
|
|
55
|
+
var __asyncValues;
|
|
56
|
+
var __makeTemplateObject;
|
|
57
|
+
var __importStar;
|
|
58
|
+
var __importDefault;
|
|
59
|
+
var __classPrivateFieldGet;
|
|
60
|
+
var __classPrivateFieldSet;
|
|
61
|
+
var __classPrivateFieldIn;
|
|
62
|
+
var __createBinding;
|
|
63
|
+
(function(factory) {
|
|
64
|
+
var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
|
|
65
|
+
if (typeof define === "function" && define.amd) {
|
|
66
|
+
define("tslib", ["exports"], function(exports2) {
|
|
67
|
+
factory(createExporter(root, createExporter(exports2)));
|
|
68
|
+
});
|
|
69
|
+
} else if (typeof module === "object" && typeof module.exports === "object") {
|
|
70
|
+
factory(createExporter(root, createExporter(module.exports)));
|
|
71
|
+
} else {
|
|
72
|
+
factory(createExporter(root));
|
|
319
73
|
}
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
str.replace(SIGNIFICANT_PRECISION_REGEX, function(_, g1, g2) {
|
|
340
|
-
if (typeof g2 !== "string") {
|
|
341
|
-
result.minimumSignificantDigits = g1.length;
|
|
342
|
-
result.maximumSignificantDigits = g1.length;
|
|
343
|
-
} else if (g2 === "+") {
|
|
344
|
-
result.minimumSignificantDigits = g1.length;
|
|
345
|
-
} else if (g1[0] === "#") {
|
|
346
|
-
result.maximumSignificantDigits = g1.length;
|
|
347
|
-
} else {
|
|
348
|
-
result.minimumSignificantDigits = g1.length;
|
|
349
|
-
result.maximumSignificantDigits = g1.length + (typeof g2 === "string" ? g2.length : 0);
|
|
350
|
-
}
|
|
351
|
-
return "";
|
|
352
|
-
});
|
|
353
|
-
return result;
|
|
354
|
-
}
|
|
355
|
-
function parseSign(str) {
|
|
356
|
-
switch (str) {
|
|
357
|
-
case "sign-auto":
|
|
358
|
-
return {
|
|
359
|
-
signDisplay: "auto"
|
|
74
|
+
function createExporter(exports2, previous) {
|
|
75
|
+
if (exports2 !== root) {
|
|
76
|
+
if (typeof Object.create === "function") {
|
|
77
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
78
|
+
} else {
|
|
79
|
+
exports2.__esModule = true;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return function(id, v) {
|
|
83
|
+
return exports2[id] = previous ? previous(id, v) : v;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
})(function(exporter) {
|
|
87
|
+
var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
|
|
88
|
+
d.__proto__ = b;
|
|
89
|
+
} || function(d, b) {
|
|
90
|
+
for (var p in b)
|
|
91
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
92
|
+
d[p] = b[p];
|
|
360
93
|
};
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
94
|
+
__extends2 = function(d, b) {
|
|
95
|
+
if (typeof b !== "function" && b !== null)
|
|
96
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
97
|
+
extendStatics(d, b);
|
|
98
|
+
function __() {
|
|
99
|
+
this.constructor = d;
|
|
100
|
+
}
|
|
101
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
365
102
|
};
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
103
|
+
__assign2 = Object.assign || function(t) {
|
|
104
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
105
|
+
s = arguments[i];
|
|
106
|
+
for (var p in s)
|
|
107
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
108
|
+
t[p] = s[p];
|
|
109
|
+
}
|
|
110
|
+
return t;
|
|
370
111
|
};
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
112
|
+
__rest = function(s, e) {
|
|
113
|
+
var t = {};
|
|
114
|
+
for (var p in s)
|
|
115
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
116
|
+
t[p] = s[p];
|
|
117
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
118
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
119
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
120
|
+
t[p[i]] = s[p[i]];
|
|
121
|
+
}
|
|
122
|
+
return t;
|
|
376
123
|
};
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
124
|
+
__decorate = function(decorators, target, key, desc) {
|
|
125
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
126
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
127
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
128
|
+
else
|
|
129
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
130
|
+
if (d = decorators[i])
|
|
131
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
132
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
133
|
+
};
|
|
134
|
+
__param = function(paramIndex, decorator) {
|
|
135
|
+
return function(target, key) {
|
|
136
|
+
decorator(target, key, paramIndex);
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
__metadata = function(metadataKey, metadataValue) {
|
|
140
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
141
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
142
|
+
};
|
|
143
|
+
__awaiter = function(thisArg, _arguments, P, generator) {
|
|
144
|
+
function adopt(value) {
|
|
145
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
146
|
+
resolve(value);
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
150
|
+
function fulfilled(value) {
|
|
151
|
+
try {
|
|
152
|
+
step(generator.next(value));
|
|
153
|
+
} catch (e) {
|
|
154
|
+
reject(e);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
function rejected(value) {
|
|
158
|
+
try {
|
|
159
|
+
step(generator["throw"](value));
|
|
160
|
+
} catch (e) {
|
|
161
|
+
reject(e);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
function step(result) {
|
|
165
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
166
|
+
}
|
|
167
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
168
|
+
});
|
|
169
|
+
};
|
|
170
|
+
__generator = function(thisArg, body) {
|
|
171
|
+
var _ = { label: 0, sent: function() {
|
|
172
|
+
if (t[0] & 1)
|
|
173
|
+
throw t[1];
|
|
174
|
+
return t[1];
|
|
175
|
+
}, trys: [], ops: [] }, f, y, t, g;
|
|
176
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
177
|
+
return this;
|
|
178
|
+
}), g;
|
|
179
|
+
function verb(n) {
|
|
180
|
+
return function(v) {
|
|
181
|
+
return step([n, v]);
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
function step(op) {
|
|
185
|
+
if (f)
|
|
186
|
+
throw new TypeError("Generator is already executing.");
|
|
187
|
+
while (_)
|
|
188
|
+
try {
|
|
189
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
190
|
+
return t;
|
|
191
|
+
if (y = 0, t)
|
|
192
|
+
op = [op[0] & 2, t.value];
|
|
193
|
+
switch (op[0]) {
|
|
194
|
+
case 0:
|
|
195
|
+
case 1:
|
|
196
|
+
t = op;
|
|
197
|
+
break;
|
|
198
|
+
case 4:
|
|
199
|
+
_.label++;
|
|
200
|
+
return { value: op[1], done: false };
|
|
201
|
+
case 5:
|
|
202
|
+
_.label++;
|
|
203
|
+
y = op[1];
|
|
204
|
+
op = [0];
|
|
205
|
+
continue;
|
|
206
|
+
case 7:
|
|
207
|
+
op = _.ops.pop();
|
|
208
|
+
_.trys.pop();
|
|
209
|
+
continue;
|
|
210
|
+
default:
|
|
211
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
212
|
+
_ = 0;
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
216
|
+
_.label = op[1];
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
220
|
+
_.label = t[1];
|
|
221
|
+
t = op;
|
|
222
|
+
break;
|
|
223
|
+
}
|
|
224
|
+
if (t && _.label < t[2]) {
|
|
225
|
+
_.label = t[2];
|
|
226
|
+
_.ops.push(op);
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
if (t[2])
|
|
230
|
+
_.ops.pop();
|
|
231
|
+
_.trys.pop();
|
|
232
|
+
continue;
|
|
233
|
+
}
|
|
234
|
+
op = body.call(thisArg, _);
|
|
235
|
+
} catch (e) {
|
|
236
|
+
op = [6, e];
|
|
237
|
+
y = 0;
|
|
238
|
+
} finally {
|
|
239
|
+
f = t = 0;
|
|
240
|
+
}
|
|
241
|
+
if (op[0] & 5)
|
|
242
|
+
throw op[1];
|
|
243
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
__exportStar = function(m, o) {
|
|
247
|
+
for (var p in m)
|
|
248
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
249
|
+
__createBinding(o, m, p);
|
|
250
|
+
};
|
|
251
|
+
__createBinding = Object.create ? function(o, m, k, k2) {
|
|
252
|
+
if (k2 === void 0)
|
|
253
|
+
k2 = k;
|
|
254
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
255
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
256
|
+
desc = { enumerable: true, get: function() {
|
|
257
|
+
return m[k];
|
|
258
|
+
} };
|
|
259
|
+
}
|
|
260
|
+
Object.defineProperty(o, k2, desc);
|
|
261
|
+
} : function(o, m, k, k2) {
|
|
262
|
+
if (k2 === void 0)
|
|
263
|
+
k2 = k;
|
|
264
|
+
o[k2] = m[k];
|
|
265
|
+
};
|
|
266
|
+
__values = function(o) {
|
|
267
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
268
|
+
if (m)
|
|
269
|
+
return m.call(o);
|
|
270
|
+
if (o && typeof o.length === "number")
|
|
271
|
+
return {
|
|
272
|
+
next: function() {
|
|
273
|
+
if (o && i >= o.length)
|
|
274
|
+
o = void 0;
|
|
275
|
+
return { value: o && o[i++], done: !o };
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
279
|
+
};
|
|
280
|
+
__read = function(o, n) {
|
|
281
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
282
|
+
if (!m)
|
|
283
|
+
return o;
|
|
284
|
+
var i = m.call(o), r, ar = [], e;
|
|
285
|
+
try {
|
|
286
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
287
|
+
ar.push(r.value);
|
|
288
|
+
} catch (error) {
|
|
289
|
+
e = { error: error };
|
|
290
|
+
} finally {
|
|
291
|
+
try {
|
|
292
|
+
if (r && !r.done && (m = i["return"]))
|
|
293
|
+
m.call(i);
|
|
294
|
+
} finally {
|
|
295
|
+
if (e)
|
|
296
|
+
throw e.error;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
return ar;
|
|
300
|
+
};
|
|
301
|
+
__spread = function() {
|
|
302
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
303
|
+
ar = ar.concat(__read(arguments[i]));
|
|
304
|
+
return ar;
|
|
305
|
+
};
|
|
306
|
+
__spreadArrays = function() {
|
|
307
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
308
|
+
s += arguments[i].length;
|
|
309
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
310
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
311
|
+
r[k] = a[j];
|
|
312
|
+
return r;
|
|
313
|
+
};
|
|
314
|
+
__spreadArray2 = function(to, from, pack) {
|
|
315
|
+
if (pack || arguments.length === 2)
|
|
316
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
317
|
+
if (ar || !(i in from)) {
|
|
318
|
+
if (!ar)
|
|
319
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
320
|
+
ar[i] = from[i];
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
324
|
+
};
|
|
325
|
+
__await = function(v) {
|
|
326
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
327
|
+
};
|
|
328
|
+
__asyncGenerator = function(thisArg, _arguments, generator) {
|
|
329
|
+
if (!Symbol.asyncIterator)
|
|
330
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
331
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
332
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
|
|
333
|
+
return this;
|
|
334
|
+
}, i;
|
|
335
|
+
function verb(n) {
|
|
336
|
+
if (g[n])
|
|
337
|
+
i[n] = function(v) {
|
|
338
|
+
return new Promise(function(a, b) {
|
|
339
|
+
q.push([n, v, a, b]) > 1 || resume(n, v);
|
|
340
|
+
});
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
function resume(n, v) {
|
|
344
|
+
try {
|
|
345
|
+
step(g[n](v));
|
|
346
|
+
} catch (e) {
|
|
347
|
+
settle(q[0][3], e);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
function step(r) {
|
|
351
|
+
r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
|
|
352
|
+
}
|
|
353
|
+
function fulfill(value) {
|
|
354
|
+
resume("next", value);
|
|
355
|
+
}
|
|
356
|
+
function reject(value) {
|
|
357
|
+
resume("throw", value);
|
|
358
|
+
}
|
|
359
|
+
function settle(f, v) {
|
|
360
|
+
if (f(v), q.shift(), q.length)
|
|
361
|
+
resume(q[0][0], q[0][1]);
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
__asyncDelegator = function(o) {
|
|
365
|
+
var i, p;
|
|
366
|
+
return i = {}, verb("next"), verb("throw", function(e) {
|
|
367
|
+
throw e;
|
|
368
|
+
}), verb("return"), i[Symbol.iterator] = function() {
|
|
369
|
+
return this;
|
|
370
|
+
}, i;
|
|
371
|
+
function verb(n, f) {
|
|
372
|
+
i[n] = o[n] ? function(v) {
|
|
373
|
+
return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v;
|
|
374
|
+
} : f;
|
|
375
|
+
}
|
|
376
|
+
};
|
|
377
|
+
__asyncValues = function(o) {
|
|
378
|
+
if (!Symbol.asyncIterator)
|
|
379
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
380
|
+
var m = o[Symbol.asyncIterator], i;
|
|
381
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
|
|
382
|
+
return this;
|
|
383
|
+
}, i);
|
|
384
|
+
function verb(n) {
|
|
385
|
+
i[n] = o[n] && function(v) {
|
|
386
|
+
return new Promise(function(resolve, reject) {
|
|
387
|
+
v = o[n](v), settle(resolve, reject, v.done, v.value);
|
|
388
|
+
});
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
function settle(resolve, reject, d, v) {
|
|
392
|
+
Promise.resolve(v).then(function(v2) {
|
|
393
|
+
resolve({ value: v2, done: d });
|
|
394
|
+
}, reject);
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
__makeTemplateObject = function(cooked, raw) {
|
|
398
|
+
if (Object.defineProperty) {
|
|
399
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
400
|
+
} else {
|
|
401
|
+
cooked.raw = raw;
|
|
402
|
+
}
|
|
403
|
+
return cooked;
|
|
404
|
+
};
|
|
405
|
+
var __setModuleDefault = Object.create ? function(o, v) {
|
|
406
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
407
|
+
} : function(o, v) {
|
|
408
|
+
o["default"] = v;
|
|
409
|
+
};
|
|
410
|
+
__importStar = function(mod) {
|
|
411
|
+
if (mod && mod.__esModule)
|
|
412
|
+
return mod;
|
|
413
|
+
var result = {};
|
|
414
|
+
if (mod != null) {
|
|
415
|
+
for (var k in mod)
|
|
416
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
417
|
+
__createBinding(result, mod, k);
|
|
418
|
+
}
|
|
419
|
+
__setModuleDefault(result, mod);
|
|
420
|
+
return result;
|
|
421
|
+
};
|
|
422
|
+
__importDefault = function(mod) {
|
|
423
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
424
|
+
};
|
|
425
|
+
__classPrivateFieldGet = function(receiver, state, kind, f) {
|
|
426
|
+
if (kind === "a" && !f)
|
|
427
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
428
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
429
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
430
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
381
431
|
};
|
|
382
|
-
|
|
383
|
-
|
|
432
|
+
__classPrivateFieldSet = function(receiver, state, value, kind, f) {
|
|
433
|
+
if (kind === "m")
|
|
434
|
+
throw new TypeError("Private method is not writable");
|
|
435
|
+
if (kind === "a" && !f)
|
|
436
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
437
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
438
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
439
|
+
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
440
|
+
};
|
|
441
|
+
__classPrivateFieldIn = function(state, receiver) {
|
|
442
|
+
if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function")
|
|
443
|
+
throw new TypeError("Cannot use 'in' operator on non-object");
|
|
444
|
+
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
445
|
+
};
|
|
446
|
+
exporter("__extends", __extends2);
|
|
447
|
+
exporter("__assign", __assign2);
|
|
448
|
+
exporter("__rest", __rest);
|
|
449
|
+
exporter("__decorate", __decorate);
|
|
450
|
+
exporter("__param", __param);
|
|
451
|
+
exporter("__metadata", __metadata);
|
|
452
|
+
exporter("__awaiter", __awaiter);
|
|
453
|
+
exporter("__generator", __generator);
|
|
454
|
+
exporter("__exportStar", __exportStar);
|
|
455
|
+
exporter("__createBinding", __createBinding);
|
|
456
|
+
exporter("__values", __values);
|
|
457
|
+
exporter("__read", __read);
|
|
458
|
+
exporter("__spread", __spread);
|
|
459
|
+
exporter("__spreadArrays", __spreadArrays);
|
|
460
|
+
exporter("__spreadArray", __spreadArray2);
|
|
461
|
+
exporter("__await", __await);
|
|
462
|
+
exporter("__asyncGenerator", __asyncGenerator);
|
|
463
|
+
exporter("__asyncDelegator", __asyncDelegator);
|
|
464
|
+
exporter("__asyncValues", __asyncValues);
|
|
465
|
+
exporter("__makeTemplateObject", __makeTemplateObject);
|
|
466
|
+
exporter("__importStar", __importStar);
|
|
467
|
+
exporter("__importDefault", __importDefault);
|
|
468
|
+
exporter("__classPrivateFieldGet", __classPrivateFieldGet);
|
|
469
|
+
exporter("__classPrivateFieldSet", __classPrivateFieldSet);
|
|
470
|
+
exporter("__classPrivateFieldIn", __classPrivateFieldIn);
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
});
|
|
474
|
+
|
|
475
|
+
// bazel-out/darwin-fastbuild/bin/packages/icu-messageformat-parser/error.js
|
|
476
|
+
var require_error = __commonJS({
|
|
477
|
+
"bazel-out/darwin-fastbuild/bin/packages/icu-messageformat-parser/error.js": function(exports) {
|
|
478
|
+
"use strict";
|
|
479
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
480
|
+
exports.ErrorKind = void 0;
|
|
481
|
+
var ErrorKind;
|
|
482
|
+
(function(ErrorKind2) {
|
|
483
|
+
ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_CLOSING_BRACE"] = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE";
|
|
484
|
+
ErrorKind2[ErrorKind2["EMPTY_ARGUMENT"] = 2] = "EMPTY_ARGUMENT";
|
|
485
|
+
ErrorKind2[ErrorKind2["MALFORMED_ARGUMENT"] = 3] = "MALFORMED_ARGUMENT";
|
|
486
|
+
ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_TYPE"] = 4] = "EXPECT_ARGUMENT_TYPE";
|
|
487
|
+
ErrorKind2[ErrorKind2["INVALID_ARGUMENT_TYPE"] = 5] = "INVALID_ARGUMENT_TYPE";
|
|
488
|
+
ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_STYLE"] = 6] = "EXPECT_ARGUMENT_STYLE";
|
|
489
|
+
ErrorKind2[ErrorKind2["INVALID_NUMBER_SKELETON"] = 7] = "INVALID_NUMBER_SKELETON";
|
|
490
|
+
ErrorKind2[ErrorKind2["INVALID_DATE_TIME_SKELETON"] = 8] = "INVALID_DATE_TIME_SKELETON";
|
|
491
|
+
ErrorKind2[ErrorKind2["EXPECT_NUMBER_SKELETON"] = 9] = "EXPECT_NUMBER_SKELETON";
|
|
492
|
+
ErrorKind2[ErrorKind2["EXPECT_DATE_TIME_SKELETON"] = 10] = "EXPECT_DATE_TIME_SKELETON";
|
|
493
|
+
ErrorKind2[ErrorKind2["UNCLOSED_QUOTE_IN_ARGUMENT_STYLE"] = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE";
|
|
494
|
+
ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_OPTIONS"] = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS";
|
|
495
|
+
ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE"] = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE";
|
|
496
|
+
ErrorKind2[ErrorKind2["INVALID_PLURAL_ARGUMENT_OFFSET_VALUE"] = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE";
|
|
497
|
+
ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_SELECTOR"] = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR";
|
|
498
|
+
ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_SELECTOR"] = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR";
|
|
499
|
+
ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT"] = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT";
|
|
500
|
+
ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT"] = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT";
|
|
501
|
+
ErrorKind2[ErrorKind2["INVALID_PLURAL_ARGUMENT_SELECTOR"] = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR";
|
|
502
|
+
ErrorKind2[ErrorKind2["DUPLICATE_PLURAL_ARGUMENT_SELECTOR"] = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR";
|
|
503
|
+
ErrorKind2[ErrorKind2["DUPLICATE_SELECT_ARGUMENT_SELECTOR"] = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR";
|
|
504
|
+
ErrorKind2[ErrorKind2["MISSING_OTHER_CLAUSE"] = 22] = "MISSING_OTHER_CLAUSE";
|
|
505
|
+
ErrorKind2[ErrorKind2["INVALID_TAG"] = 23] = "INVALID_TAG";
|
|
506
|
+
ErrorKind2[ErrorKind2["INVALID_TAG_NAME"] = 25] = "INVALID_TAG_NAME";
|
|
507
|
+
ErrorKind2[ErrorKind2["UNMATCHED_CLOSING_TAG"] = 26] = "UNMATCHED_CLOSING_TAG";
|
|
508
|
+
ErrorKind2[ErrorKind2["UNCLOSED_TAG"] = 27] = "UNCLOSED_TAG";
|
|
509
|
+
})(ErrorKind = exports.ErrorKind || (exports.ErrorKind = {}));
|
|
510
|
+
}
|
|
511
|
+
});
|
|
512
|
+
|
|
513
|
+
// bazel-out/darwin-fastbuild/bin/packages/icu-messageformat-parser/types.js
|
|
514
|
+
var require_types = __commonJS({
|
|
515
|
+
"bazel-out/darwin-fastbuild/bin/packages/icu-messageformat-parser/types.js": function(exports) {
|
|
516
|
+
"use strict";
|
|
517
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
518
|
+
exports.createNumberElement = exports.createLiteralElement = exports.isDateTimeSkeleton = exports.isNumberSkeleton = exports.isTagElement = exports.isPoundElement = exports.isPluralElement = exports.isSelectElement = exports.isTimeElement = exports.isDateElement = exports.isNumberElement = exports.isArgumentElement = exports.isLiteralElement = exports.SKELETON_TYPE = exports.TYPE = void 0;
|
|
519
|
+
var TYPE;
|
|
520
|
+
(function(TYPE2) {
|
|
521
|
+
TYPE2[TYPE2["literal"] = 0] = "literal";
|
|
522
|
+
TYPE2[TYPE2["argument"] = 1] = "argument";
|
|
523
|
+
TYPE2[TYPE2["number"] = 2] = "number";
|
|
524
|
+
TYPE2[TYPE2["date"] = 3] = "date";
|
|
525
|
+
TYPE2[TYPE2["time"] = 4] = "time";
|
|
526
|
+
TYPE2[TYPE2["select"] = 5] = "select";
|
|
527
|
+
TYPE2[TYPE2["plural"] = 6] = "plural";
|
|
528
|
+
TYPE2[TYPE2["pound"] = 7] = "pound";
|
|
529
|
+
TYPE2[TYPE2["tag"] = 8] = "tag";
|
|
530
|
+
})(TYPE = exports.TYPE || (exports.TYPE = {}));
|
|
531
|
+
var SKELETON_TYPE;
|
|
532
|
+
(function(SKELETON_TYPE2) {
|
|
533
|
+
SKELETON_TYPE2[SKELETON_TYPE2["number"] = 0] = "number";
|
|
534
|
+
SKELETON_TYPE2[SKELETON_TYPE2["dateTime"] = 1] = "dateTime";
|
|
535
|
+
})(SKELETON_TYPE = exports.SKELETON_TYPE || (exports.SKELETON_TYPE = {}));
|
|
536
|
+
function isLiteralElement2(el) {
|
|
537
|
+
return el.type === TYPE.literal;
|
|
538
|
+
}
|
|
539
|
+
exports.isLiteralElement = isLiteralElement2;
|
|
540
|
+
function isArgumentElement2(el) {
|
|
541
|
+
return el.type === TYPE.argument;
|
|
542
|
+
}
|
|
543
|
+
exports.isArgumentElement = isArgumentElement2;
|
|
544
|
+
function isNumberElement2(el) {
|
|
545
|
+
return el.type === TYPE.number;
|
|
546
|
+
}
|
|
547
|
+
exports.isNumberElement = isNumberElement2;
|
|
548
|
+
function isDateElement2(el) {
|
|
549
|
+
return el.type === TYPE.date;
|
|
550
|
+
}
|
|
551
|
+
exports.isDateElement = isDateElement2;
|
|
552
|
+
function isTimeElement2(el) {
|
|
553
|
+
return el.type === TYPE.time;
|
|
554
|
+
}
|
|
555
|
+
exports.isTimeElement = isTimeElement2;
|
|
556
|
+
function isSelectElement2(el) {
|
|
557
|
+
return el.type === TYPE.select;
|
|
558
|
+
}
|
|
559
|
+
exports.isSelectElement = isSelectElement2;
|
|
560
|
+
function isPluralElement2(el) {
|
|
561
|
+
return el.type === TYPE.plural;
|
|
562
|
+
}
|
|
563
|
+
exports.isPluralElement = isPluralElement2;
|
|
564
|
+
function isPoundElement2(el) {
|
|
565
|
+
return el.type === TYPE.pound;
|
|
566
|
+
}
|
|
567
|
+
exports.isPoundElement = isPoundElement2;
|
|
568
|
+
function isTagElement2(el) {
|
|
569
|
+
return el.type === TYPE.tag;
|
|
570
|
+
}
|
|
571
|
+
exports.isTagElement = isTagElement2;
|
|
572
|
+
function isNumberSkeleton2(el) {
|
|
573
|
+
return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.number);
|
|
574
|
+
}
|
|
575
|
+
exports.isNumberSkeleton = isNumberSkeleton2;
|
|
576
|
+
function isDateTimeSkeleton2(el) {
|
|
577
|
+
return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.dateTime);
|
|
578
|
+
}
|
|
579
|
+
exports.isDateTimeSkeleton = isDateTimeSkeleton2;
|
|
580
|
+
function createLiteralElement(value) {
|
|
384
581
|
return {
|
|
385
|
-
|
|
386
|
-
|
|
582
|
+
type: TYPE.literal,
|
|
583
|
+
value: value
|
|
387
584
|
};
|
|
388
|
-
|
|
389
|
-
|
|
585
|
+
}
|
|
586
|
+
exports.createLiteralElement = createLiteralElement;
|
|
587
|
+
function createNumberElement(value, style) {
|
|
390
588
|
return {
|
|
391
|
-
|
|
589
|
+
type: TYPE.number,
|
|
590
|
+
value: value,
|
|
591
|
+
style: style
|
|
392
592
|
};
|
|
593
|
+
}
|
|
594
|
+
exports.createNumberElement = createNumberElement;
|
|
393
595
|
}
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
};
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
notation: "scientific"
|
|
405
|
-
};
|
|
406
|
-
stem = stem.slice(1);
|
|
596
|
+
});
|
|
597
|
+
|
|
598
|
+
// bazel-out/darwin-fastbuild/bin/packages/icu-messageformat-parser/regex.generated.js
|
|
599
|
+
var require_regex_generated = __commonJS({
|
|
600
|
+
"bazel-out/darwin-fastbuild/bin/packages/icu-messageformat-parser/regex.generated.js": function(exports) {
|
|
601
|
+
"use strict";
|
|
602
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
603
|
+
exports.WHITE_SPACE_REGEX = exports.SPACE_SEPARATOR_REGEX = void 0;
|
|
604
|
+
exports.SPACE_SEPARATOR_REGEX = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
605
|
+
exports.WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/;
|
|
407
606
|
}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
|
|
607
|
+
});
|
|
608
|
+
|
|
609
|
+
// bazel-out/darwin-fastbuild/bin/packages/icu-skeleton-parser/date-time.js
|
|
610
|
+
var require_date_time = __commonJS({
|
|
611
|
+
"bazel-out/darwin-fastbuild/bin/packages/icu-skeleton-parser/date-time.js": function(exports) {
|
|
612
|
+
"use strict";
|
|
613
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
614
|
+
exports.parseDateTimeSkeleton = void 0;
|
|
615
|
+
var DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
|
|
616
|
+
function parseDateTimeSkeleton(skeleton) {
|
|
617
|
+
var result = {};
|
|
618
|
+
skeleton.replace(DATE_TIME_REGEX, function(match) {
|
|
619
|
+
var len = match.length;
|
|
620
|
+
switch (match[0]) {
|
|
621
|
+
case "G":
|
|
622
|
+
result.era = len === 4 ? "long" : len === 5 ? "narrow" : "short";
|
|
623
|
+
break;
|
|
624
|
+
case "y":
|
|
625
|
+
result.year = len === 2 ? "2-digit" : "numeric";
|
|
626
|
+
break;
|
|
627
|
+
case "Y":
|
|
628
|
+
case "u":
|
|
629
|
+
case "U":
|
|
630
|
+
case "r":
|
|
631
|
+
throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
|
|
632
|
+
case "q":
|
|
633
|
+
case "Q":
|
|
634
|
+
throw new RangeError("`q/Q` (quarter) patterns are not supported");
|
|
635
|
+
case "M":
|
|
636
|
+
case "L":
|
|
637
|
+
result.month = ["numeric", "2-digit", "short", "long", "narrow"][len - 1];
|
|
638
|
+
break;
|
|
639
|
+
case "w":
|
|
640
|
+
case "W":
|
|
641
|
+
throw new RangeError("`w/W` (week) patterns are not supported");
|
|
642
|
+
case "d":
|
|
643
|
+
result.day = ["numeric", "2-digit"][len - 1];
|
|
644
|
+
break;
|
|
645
|
+
case "D":
|
|
646
|
+
case "F":
|
|
647
|
+
case "g":
|
|
648
|
+
throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
|
|
649
|
+
case "E":
|
|
650
|
+
result.weekday = len === 4 ? "short" : len === 5 ? "narrow" : "short";
|
|
651
|
+
break;
|
|
652
|
+
case "e":
|
|
653
|
+
if (len < 4) {
|
|
654
|
+
throw new RangeError("`e..eee` (weekday) patterns are not supported");
|
|
655
|
+
}
|
|
656
|
+
result.weekday = ["short", "long", "narrow", "short"][len - 4];
|
|
657
|
+
break;
|
|
658
|
+
case "c":
|
|
659
|
+
if (len < 4) {
|
|
660
|
+
throw new RangeError("`c..ccc` (weekday) patterns are not supported");
|
|
661
|
+
}
|
|
662
|
+
result.weekday = ["short", "long", "narrow", "short"][len - 4];
|
|
663
|
+
break;
|
|
664
|
+
case "a":
|
|
665
|
+
result.hour12 = true;
|
|
666
|
+
break;
|
|
667
|
+
case "b":
|
|
668
|
+
case "B":
|
|
669
|
+
throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
|
|
670
|
+
case "h":
|
|
671
|
+
result.hourCycle = "h12";
|
|
672
|
+
result.hour = ["numeric", "2-digit"][len - 1];
|
|
673
|
+
break;
|
|
674
|
+
case "H":
|
|
675
|
+
result.hourCycle = "h23";
|
|
676
|
+
result.hour = ["numeric", "2-digit"][len - 1];
|
|
677
|
+
break;
|
|
678
|
+
case "K":
|
|
679
|
+
result.hourCycle = "h11";
|
|
680
|
+
result.hour = ["numeric", "2-digit"][len - 1];
|
|
681
|
+
break;
|
|
682
|
+
case "k":
|
|
683
|
+
result.hourCycle = "h24";
|
|
684
|
+
result.hour = ["numeric", "2-digit"][len - 1];
|
|
685
|
+
break;
|
|
686
|
+
case "j":
|
|
687
|
+
case "J":
|
|
688
|
+
case "C":
|
|
689
|
+
throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
|
|
690
|
+
case "m":
|
|
691
|
+
result.minute = ["numeric", "2-digit"][len - 1];
|
|
692
|
+
break;
|
|
693
|
+
case "s":
|
|
694
|
+
result.second = ["numeric", "2-digit"][len - 1];
|
|
695
|
+
break;
|
|
696
|
+
case "S":
|
|
697
|
+
case "A":
|
|
698
|
+
throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
|
|
699
|
+
case "z":
|
|
700
|
+
result.timeZoneName = len < 4 ? "short" : "long";
|
|
701
|
+
break;
|
|
702
|
+
case "Z":
|
|
703
|
+
case "O":
|
|
704
|
+
case "v":
|
|
705
|
+
case "V":
|
|
706
|
+
case "X":
|
|
707
|
+
case "x":
|
|
708
|
+
throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead");
|
|
709
|
+
}
|
|
710
|
+
return "";
|
|
711
|
+
});
|
|
712
|
+
return result;
|
|
419
713
|
}
|
|
420
|
-
|
|
714
|
+
exports.parseDateTimeSkeleton = parseDateTimeSkeleton;
|
|
421
715
|
}
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
716
|
+
});
|
|
717
|
+
|
|
718
|
+
// bazel-out/darwin-fastbuild/bin/packages/icu-skeleton-parser/regex.generated.js
|
|
719
|
+
var require_regex_generated2 = __commonJS({
|
|
720
|
+
"bazel-out/darwin-fastbuild/bin/packages/icu-skeleton-parser/regex.generated.js": function(exports) {
|
|
721
|
+
"use strict";
|
|
722
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
723
|
+
exports.WHITE_SPACE_REGEX = void 0;
|
|
724
|
+
exports.WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
429
725
|
}
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
result.style = "unit";
|
|
460
|
-
result.unit = icuUnitToEcma(token.options[0]);
|
|
461
|
-
continue;
|
|
462
|
-
case "compact-short":
|
|
463
|
-
case "K":
|
|
464
|
-
result.notation = "compact";
|
|
465
|
-
result.compactDisplay = "short";
|
|
466
|
-
continue;
|
|
467
|
-
case "compact-long":
|
|
468
|
-
case "KK":
|
|
469
|
-
result.notation = "compact";
|
|
470
|
-
result.compactDisplay = "long";
|
|
471
|
-
continue;
|
|
472
|
-
case "scientific":
|
|
473
|
-
result = __assign(__assign(__assign({}, result), { notation: "scientific" }), token.options.reduce(function(all, opt2) {
|
|
474
|
-
return __assign(__assign({}, all), parseNotationOptions(opt2));
|
|
475
|
-
}, {}));
|
|
476
|
-
continue;
|
|
477
|
-
case "engineering":
|
|
478
|
-
result = __assign(__assign(__assign({}, result), { notation: "engineering" }), token.options.reduce(function(all, opt2) {
|
|
479
|
-
return __assign(__assign({}, all), parseNotationOptions(opt2));
|
|
480
|
-
}, {}));
|
|
481
|
-
continue;
|
|
482
|
-
case "notation-simple":
|
|
483
|
-
result.notation = "standard";
|
|
484
|
-
continue;
|
|
485
|
-
case "unit-width-narrow":
|
|
486
|
-
result.currencyDisplay = "narrowSymbol";
|
|
487
|
-
result.unitDisplay = "narrow";
|
|
488
|
-
continue;
|
|
489
|
-
case "unit-width-short":
|
|
490
|
-
result.currencyDisplay = "code";
|
|
491
|
-
result.unitDisplay = "short";
|
|
492
|
-
continue;
|
|
493
|
-
case "unit-width-full-name":
|
|
494
|
-
result.currencyDisplay = "name";
|
|
495
|
-
result.unitDisplay = "long";
|
|
496
|
-
continue;
|
|
497
|
-
case "unit-width-iso-code":
|
|
498
|
-
result.currencyDisplay = "symbol";
|
|
499
|
-
continue;
|
|
500
|
-
case "scale":
|
|
501
|
-
result.scale = parseFloat(token.options[0]);
|
|
502
|
-
continue;
|
|
503
|
-
case "integer-width":
|
|
504
|
-
if (token.options.length > 1) {
|
|
505
|
-
throw new RangeError("integer-width stems only accept a single optional option");
|
|
506
|
-
}
|
|
507
|
-
token.options[0].replace(INTEGER_WIDTH_REGEX, function(_, g1, g2, g3, g4, g5) {
|
|
508
|
-
if (g1) {
|
|
509
|
-
result.minimumIntegerDigits = g2.length;
|
|
510
|
-
} else if (g3 && g4) {
|
|
511
|
-
throw new Error("We currently do not support maximum integer digits");
|
|
512
|
-
} else if (g5) {
|
|
513
|
-
throw new Error("We currently do not support exact integer digits");
|
|
726
|
+
});
|
|
727
|
+
|
|
728
|
+
// bazel-out/darwin-fastbuild/bin/packages/icu-skeleton-parser/number.js
|
|
729
|
+
var require_number = __commonJS({
|
|
730
|
+
"bazel-out/darwin-fastbuild/bin/packages/icu-skeleton-parser/number.js": function(exports) {
|
|
731
|
+
"use strict";
|
|
732
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
733
|
+
exports.parseNumberSkeleton = exports.parseNumberSkeletonFromString = void 0;
|
|
734
|
+
var tslib_1 = require_tslib();
|
|
735
|
+
var regex_generated_1 = require_regex_generated2();
|
|
736
|
+
function parseNumberSkeletonFromString(skeleton) {
|
|
737
|
+
if (skeleton.length === 0) {
|
|
738
|
+
throw new Error("Number skeleton cannot be empty");
|
|
739
|
+
}
|
|
740
|
+
var stringTokens = skeleton.split(regex_generated_1.WHITE_SPACE_REGEX).filter(function(x) {
|
|
741
|
+
return x.length > 0;
|
|
742
|
+
});
|
|
743
|
+
var tokens = [];
|
|
744
|
+
for (var _i = 0, stringTokens_1 = stringTokens; _i < stringTokens_1.length; _i++) {
|
|
745
|
+
var stringToken = stringTokens_1[_i];
|
|
746
|
+
var stemAndOptions = stringToken.split("/");
|
|
747
|
+
if (stemAndOptions.length === 0) {
|
|
748
|
+
throw new Error("Invalid number skeleton");
|
|
749
|
+
}
|
|
750
|
+
var stem = stemAndOptions[0], options = stemAndOptions.slice(1);
|
|
751
|
+
for (var _a = 0, options_1 = options; _a < options_1.length; _a++) {
|
|
752
|
+
var option = options_1[_a];
|
|
753
|
+
if (option.length === 0) {
|
|
754
|
+
throw new Error("Invalid number skeleton");
|
|
514
755
|
}
|
|
515
|
-
|
|
516
|
-
});
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
756
|
+
}
|
|
757
|
+
tokens.push({ stem: stem, options: options });
|
|
758
|
+
}
|
|
759
|
+
return tokens;
|
|
760
|
+
}
|
|
761
|
+
exports.parseNumberSkeletonFromString = parseNumberSkeletonFromString;
|
|
762
|
+
function icuUnitToEcma(unit) {
|
|
763
|
+
return unit.replace(/^(.*?)-/, "");
|
|
764
|
+
}
|
|
765
|
+
var FRACTION_PRECISION_REGEX = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
|
|
766
|
+
var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?[rs]?$/g;
|
|
767
|
+
var INTEGER_WIDTH_REGEX = /(\*)(0+)|(#+)(0+)|(0+)/g;
|
|
768
|
+
var CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;
|
|
769
|
+
function parseSignificantPrecision(str) {
|
|
770
|
+
var result = {};
|
|
771
|
+
if (str[str.length - 1] === "r") {
|
|
772
|
+
result.roundingPriority = "morePrecision";
|
|
773
|
+
} else if (str[str.length - 1] === "s") {
|
|
774
|
+
result.roundingPriority = "lessPrecision";
|
|
526
775
|
}
|
|
527
|
-
|
|
528
|
-
if (g2
|
|
529
|
-
result.
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
result.
|
|
776
|
+
str.replace(SIGNIFICANT_PRECISION_REGEX, function(_, g1, g2) {
|
|
777
|
+
if (typeof g2 !== "string") {
|
|
778
|
+
result.minimumSignificantDigits = g1.length;
|
|
779
|
+
result.maximumSignificantDigits = g1.length;
|
|
780
|
+
} else if (g2 === "+") {
|
|
781
|
+
result.minimumSignificantDigits = g1.length;
|
|
782
|
+
} else if (g1[0] === "#") {
|
|
783
|
+
result.maximumSignificantDigits = g1.length;
|
|
535
784
|
} else {
|
|
536
|
-
result.
|
|
537
|
-
result.
|
|
785
|
+
result.minimumSignificantDigits = g1.length;
|
|
786
|
+
result.maximumSignificantDigits = g1.length + (typeof g2 === "string" ? g2.length : 0);
|
|
538
787
|
}
|
|
539
788
|
return "";
|
|
540
789
|
});
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
790
|
+
return result;
|
|
791
|
+
}
|
|
792
|
+
function parseSign(str) {
|
|
793
|
+
switch (str) {
|
|
794
|
+
case "sign-auto":
|
|
795
|
+
return {
|
|
796
|
+
signDisplay: "auto"
|
|
797
|
+
};
|
|
798
|
+
case "sign-accounting":
|
|
799
|
+
case "()":
|
|
800
|
+
return {
|
|
801
|
+
currencySign: "accounting"
|
|
802
|
+
};
|
|
803
|
+
case "sign-always":
|
|
804
|
+
case "+!":
|
|
805
|
+
return {
|
|
806
|
+
signDisplay: "always"
|
|
807
|
+
};
|
|
808
|
+
case "sign-accounting-always":
|
|
809
|
+
case "()!":
|
|
810
|
+
return {
|
|
811
|
+
signDisplay: "always",
|
|
812
|
+
currencySign: "accounting"
|
|
813
|
+
};
|
|
814
|
+
case "sign-except-zero":
|
|
815
|
+
case "+?":
|
|
816
|
+
return {
|
|
817
|
+
signDisplay: "exceptZero"
|
|
818
|
+
};
|
|
819
|
+
case "sign-accounting-except-zero":
|
|
820
|
+
case "()?":
|
|
821
|
+
return {
|
|
822
|
+
signDisplay: "exceptZero",
|
|
823
|
+
currencySign: "accounting"
|
|
824
|
+
};
|
|
825
|
+
case "sign-never":
|
|
826
|
+
case "+_":
|
|
827
|
+
return {
|
|
828
|
+
signDisplay: "never"
|
|
829
|
+
};
|
|
546
830
|
}
|
|
547
|
-
continue;
|
|
548
831
|
}
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
832
|
+
function parseConciseScientificAndEngineeringStem(stem) {
|
|
833
|
+
var result;
|
|
834
|
+
if (stem[0] === "E" && stem[1] === "E") {
|
|
835
|
+
result = {
|
|
836
|
+
notation: "engineering"
|
|
837
|
+
};
|
|
838
|
+
stem = stem.slice(2);
|
|
839
|
+
} else if (stem[0] === "E") {
|
|
840
|
+
result = {
|
|
841
|
+
notation: "scientific"
|
|
842
|
+
};
|
|
843
|
+
stem = stem.slice(1);
|
|
844
|
+
}
|
|
845
|
+
if (result) {
|
|
846
|
+
var signDisplay = stem.slice(0, 2);
|
|
847
|
+
if (signDisplay === "+!") {
|
|
848
|
+
result.signDisplay = "always";
|
|
849
|
+
stem = stem.slice(2);
|
|
850
|
+
} else if (signDisplay === "+?") {
|
|
851
|
+
result.signDisplay = "exceptZero";
|
|
852
|
+
stem = stem.slice(2);
|
|
853
|
+
}
|
|
854
|
+
if (!CONCISE_INTEGER_WIDTH_REGEX.test(stem)) {
|
|
855
|
+
throw new Error("Malformed concise eng/scientific notation");
|
|
856
|
+
}
|
|
857
|
+
result.minimumIntegerDigits = stem.length;
|
|
858
|
+
}
|
|
859
|
+
return result;
|
|
552
860
|
}
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
861
|
+
function parseNotationOptions(opt) {
|
|
862
|
+
var result = {};
|
|
863
|
+
var signOpts = parseSign(opt);
|
|
864
|
+
if (signOpts) {
|
|
865
|
+
return signOpts;
|
|
866
|
+
}
|
|
867
|
+
return result;
|
|
556
868
|
}
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
869
|
+
function parseNumberSkeleton(tokens) {
|
|
870
|
+
var result = {};
|
|
871
|
+
for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {
|
|
872
|
+
var token = tokens_1[_i];
|
|
873
|
+
switch (token.stem) {
|
|
874
|
+
case "percent":
|
|
875
|
+
case "%":
|
|
876
|
+
result.style = "percent";
|
|
877
|
+
continue;
|
|
878
|
+
case "%x100":
|
|
879
|
+
result.style = "percent";
|
|
880
|
+
result.scale = 100;
|
|
881
|
+
continue;
|
|
882
|
+
case "currency":
|
|
883
|
+
result.style = "currency";
|
|
884
|
+
result.currency = token.options[0];
|
|
885
|
+
continue;
|
|
886
|
+
case "group-off":
|
|
887
|
+
case ",_":
|
|
888
|
+
result.useGrouping = false;
|
|
889
|
+
continue;
|
|
890
|
+
case "precision-integer":
|
|
891
|
+
case ".":
|
|
892
|
+
result.maximumFractionDigits = 0;
|
|
893
|
+
continue;
|
|
894
|
+
case "measure-unit":
|
|
895
|
+
case "unit":
|
|
896
|
+
result.style = "unit";
|
|
897
|
+
result.unit = icuUnitToEcma(token.options[0]);
|
|
898
|
+
continue;
|
|
899
|
+
case "compact-short":
|
|
900
|
+
case "K":
|
|
901
|
+
result.notation = "compact";
|
|
902
|
+
result.compactDisplay = "short";
|
|
903
|
+
continue;
|
|
904
|
+
case "compact-long":
|
|
905
|
+
case "KK":
|
|
906
|
+
result.notation = "compact";
|
|
907
|
+
result.compactDisplay = "long";
|
|
908
|
+
continue;
|
|
909
|
+
case "scientific":
|
|
910
|
+
result = (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, result), { notation: "scientific" }), token.options.reduce(function(all, opt2) {
|
|
911
|
+
return (0, tslib_1.__assign)((0, tslib_1.__assign)({}, all), parseNotationOptions(opt2));
|
|
912
|
+
}, {}));
|
|
913
|
+
continue;
|
|
914
|
+
case "engineering":
|
|
915
|
+
result = (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, result), { notation: "engineering" }), token.options.reduce(function(all, opt2) {
|
|
916
|
+
return (0, tslib_1.__assign)((0, tslib_1.__assign)({}, all), parseNotationOptions(opt2));
|
|
917
|
+
}, {}));
|
|
918
|
+
continue;
|
|
919
|
+
case "notation-simple":
|
|
920
|
+
result.notation = "standard";
|
|
921
|
+
continue;
|
|
922
|
+
case "unit-width-narrow":
|
|
923
|
+
result.currencyDisplay = "narrowSymbol";
|
|
924
|
+
result.unitDisplay = "narrow";
|
|
925
|
+
continue;
|
|
926
|
+
case "unit-width-short":
|
|
927
|
+
result.currencyDisplay = "code";
|
|
928
|
+
result.unitDisplay = "short";
|
|
929
|
+
continue;
|
|
930
|
+
case "unit-width-full-name":
|
|
931
|
+
result.currencyDisplay = "name";
|
|
932
|
+
result.unitDisplay = "long";
|
|
933
|
+
continue;
|
|
934
|
+
case "unit-width-iso-code":
|
|
935
|
+
result.currencyDisplay = "symbol";
|
|
936
|
+
continue;
|
|
937
|
+
case "scale":
|
|
938
|
+
result.scale = parseFloat(token.options[0]);
|
|
939
|
+
continue;
|
|
940
|
+
case "integer-width":
|
|
941
|
+
if (token.options.length > 1) {
|
|
942
|
+
throw new RangeError("integer-width stems only accept a single optional option");
|
|
943
|
+
}
|
|
944
|
+
token.options[0].replace(INTEGER_WIDTH_REGEX, function(_, g1, g2, g3, g4, g5) {
|
|
945
|
+
if (g1) {
|
|
946
|
+
result.minimumIntegerDigits = g2.length;
|
|
947
|
+
} else if (g3 && g4) {
|
|
948
|
+
throw new Error("We currently do not support maximum integer digits");
|
|
949
|
+
} else if (g5) {
|
|
950
|
+
throw new Error("We currently do not support exact integer digits");
|
|
951
|
+
}
|
|
952
|
+
return "";
|
|
953
|
+
});
|
|
954
|
+
continue;
|
|
955
|
+
}
|
|
956
|
+
if (CONCISE_INTEGER_WIDTH_REGEX.test(token.stem)) {
|
|
957
|
+
result.minimumIntegerDigits = token.stem.length;
|
|
958
|
+
continue;
|
|
959
|
+
}
|
|
960
|
+
if (FRACTION_PRECISION_REGEX.test(token.stem)) {
|
|
961
|
+
if (token.options.length > 1) {
|
|
962
|
+
throw new RangeError("Fraction-precision stems only accept a single optional option");
|
|
963
|
+
}
|
|
964
|
+
token.stem.replace(FRACTION_PRECISION_REGEX, function(_, g1, g2, g3, g4, g5) {
|
|
965
|
+
if (g2 === "*") {
|
|
966
|
+
result.minimumFractionDigits = g1.length;
|
|
967
|
+
} else if (g3 && g3[0] === "#") {
|
|
968
|
+
result.maximumFractionDigits = g3.length;
|
|
969
|
+
} else if (g4 && g5) {
|
|
970
|
+
result.minimumFractionDigits = g4.length;
|
|
971
|
+
result.maximumFractionDigits = g4.length + g5.length;
|
|
972
|
+
} else {
|
|
973
|
+
result.minimumFractionDigits = g1.length;
|
|
974
|
+
result.maximumFractionDigits = g1.length;
|
|
975
|
+
}
|
|
976
|
+
return "";
|
|
977
|
+
});
|
|
978
|
+
var opt = token.options[0];
|
|
979
|
+
if (opt === "w") {
|
|
980
|
+
result = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, result), { trailingZeroDisplay: "stripIfInteger" });
|
|
981
|
+
} else if (opt) {
|
|
982
|
+
result = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, result), parseSignificantPrecision(opt));
|
|
983
|
+
}
|
|
984
|
+
continue;
|
|
985
|
+
}
|
|
986
|
+
if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {
|
|
987
|
+
result = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, result), parseSignificantPrecision(token.stem));
|
|
988
|
+
continue;
|
|
989
|
+
}
|
|
990
|
+
var signOpts = parseSign(token.stem);
|
|
991
|
+
if (signOpts) {
|
|
992
|
+
result = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, result), signOpts);
|
|
993
|
+
}
|
|
994
|
+
var conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token.stem);
|
|
995
|
+
if (conciseScientificAndEngineeringOpts) {
|
|
996
|
+
result = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, result), conciseScientificAndEngineeringOpts);
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
return result;
|
|
560
1000
|
}
|
|
1001
|
+
exports.parseNumberSkeleton = parseNumberSkeleton;
|
|
561
1002
|
}
|
|
562
|
-
|
|
563
|
-
}
|
|
1003
|
+
});
|
|
564
1004
|
|
|
565
|
-
// bazel-out/darwin-fastbuild/bin/packages/icu-
|
|
566
|
-
var
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
var hasNativeFromCodePoint = !!String.fromCodePoint;
|
|
574
|
-
var hasNativeFromEntries = !!Object.fromEntries;
|
|
575
|
-
var hasNativeCodePointAt = !!String.prototype.codePointAt;
|
|
576
|
-
var hasTrimStart = !!String.prototype.trimStart;
|
|
577
|
-
var hasTrimEnd = !!String.prototype.trimEnd;
|
|
578
|
-
var hasNativeIsSafeInteger = !!Number.isSafeInteger;
|
|
579
|
-
var isSafeInteger = hasNativeIsSafeInteger ? Number.isSafeInteger : function(n) {
|
|
580
|
-
return typeof n === "number" && isFinite(n) && Math.floor(n) === n && Math.abs(n) <= 9007199254740991;
|
|
581
|
-
};
|
|
582
|
-
var REGEX_SUPPORTS_U_AND_Y = true;
|
|
583
|
-
try {
|
|
584
|
-
re = RE("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
585
|
-
REGEX_SUPPORTS_U_AND_Y = ((_a = re.exec("a")) === null || _a === void 0 ? void 0 : _a[0]) === "a";
|
|
586
|
-
} catch (_) {
|
|
587
|
-
REGEX_SUPPORTS_U_AND_Y = false;
|
|
588
|
-
}
|
|
589
|
-
var re;
|
|
590
|
-
var startsWith = hasNativeStartsWith ? function startsWith2(s, search, position) {
|
|
591
|
-
return s.startsWith(search, position);
|
|
592
|
-
} : function startsWith3(s, search, position) {
|
|
593
|
-
return s.slice(position, position + search.length) === search;
|
|
594
|
-
};
|
|
595
|
-
var fromCodePoint = hasNativeFromCodePoint ? String.fromCodePoint : function fromCodePoint2() {
|
|
596
|
-
var codePoints = [];
|
|
597
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
598
|
-
codePoints[_i] = arguments[_i];
|
|
599
|
-
}
|
|
600
|
-
var elements = "";
|
|
601
|
-
var length = codePoints.length;
|
|
602
|
-
var i = 0;
|
|
603
|
-
var code;
|
|
604
|
-
while (length > i) {
|
|
605
|
-
code = codePoints[i++];
|
|
606
|
-
if (code > 1114111)
|
|
607
|
-
throw RangeError(code + " is not a valid code point");
|
|
608
|
-
elements += code < 65536 ? String.fromCharCode(code) : String.fromCharCode(((code -= 65536) >> 10) + 55296, code % 1024 + 56320);
|
|
1005
|
+
// bazel-out/darwin-fastbuild/bin/packages/icu-skeleton-parser/index.js
|
|
1006
|
+
var require_icu_skeleton_parser = __commonJS({
|
|
1007
|
+
"bazel-out/darwin-fastbuild/bin/packages/icu-skeleton-parser/index.js": function(exports) {
|
|
1008
|
+
"use strict";
|
|
1009
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1010
|
+
var tslib_1 = require_tslib();
|
|
1011
|
+
(0, tslib_1.__exportStar)(require_date_time(), exports);
|
|
1012
|
+
(0, tslib_1.__exportStar)(require_number(), exports);
|
|
609
1013
|
}
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
1014
|
+
});
|
|
1015
|
+
|
|
1016
|
+
// bazel-out/darwin-fastbuild/bin/packages/icu-messageformat-parser/time-data.generated.js
|
|
1017
|
+
var require_time_data_generated = __commonJS({
|
|
1018
|
+
"bazel-out/darwin-fastbuild/bin/packages/icu-messageformat-parser/time-data.generated.js": function(exports) {
|
|
1019
|
+
"use strict";
|
|
1020
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1021
|
+
exports.timeData = void 0;
|
|
1022
|
+
exports.timeData = {
|
|
1023
|
+
"AX": [
|
|
1024
|
+
"H"
|
|
1025
|
+
],
|
|
1026
|
+
"BQ": [
|
|
1027
|
+
"H"
|
|
1028
|
+
],
|
|
1029
|
+
"CP": [
|
|
1030
|
+
"H"
|
|
1031
|
+
],
|
|
1032
|
+
"CZ": [
|
|
1033
|
+
"H"
|
|
1034
|
+
],
|
|
1035
|
+
"DK": [
|
|
1036
|
+
"H"
|
|
1037
|
+
],
|
|
1038
|
+
"FI": [
|
|
1039
|
+
"H"
|
|
1040
|
+
],
|
|
1041
|
+
"ID": [
|
|
1042
|
+
"H"
|
|
1043
|
+
],
|
|
1044
|
+
"IS": [
|
|
1045
|
+
"H"
|
|
1046
|
+
],
|
|
1047
|
+
"ML": [
|
|
1048
|
+
"H"
|
|
1049
|
+
],
|
|
1050
|
+
"NE": [
|
|
1051
|
+
"H"
|
|
1052
|
+
],
|
|
1053
|
+
"RU": [
|
|
1054
|
+
"H"
|
|
1055
|
+
],
|
|
1056
|
+
"SE": [
|
|
1057
|
+
"H"
|
|
1058
|
+
],
|
|
1059
|
+
"SJ": [
|
|
1060
|
+
"H"
|
|
1061
|
+
],
|
|
1062
|
+
"SK": [
|
|
1063
|
+
"H"
|
|
1064
|
+
],
|
|
1065
|
+
"AS": [
|
|
1066
|
+
"h",
|
|
1067
|
+
"H"
|
|
1068
|
+
],
|
|
1069
|
+
"BT": [
|
|
1070
|
+
"h",
|
|
1071
|
+
"H"
|
|
1072
|
+
],
|
|
1073
|
+
"DJ": [
|
|
1074
|
+
"h",
|
|
1075
|
+
"H"
|
|
1076
|
+
],
|
|
1077
|
+
"ER": [
|
|
1078
|
+
"h",
|
|
1079
|
+
"H"
|
|
1080
|
+
],
|
|
1081
|
+
"GH": [
|
|
1082
|
+
"h",
|
|
1083
|
+
"H"
|
|
1084
|
+
],
|
|
1085
|
+
"IN": [
|
|
1086
|
+
"h",
|
|
1087
|
+
"H"
|
|
1088
|
+
],
|
|
1089
|
+
"LS": [
|
|
1090
|
+
"h",
|
|
1091
|
+
"H"
|
|
1092
|
+
],
|
|
1093
|
+
"PG": [
|
|
1094
|
+
"h",
|
|
1095
|
+
"H"
|
|
1096
|
+
],
|
|
1097
|
+
"PW": [
|
|
1098
|
+
"h",
|
|
1099
|
+
"H"
|
|
1100
|
+
],
|
|
1101
|
+
"SO": [
|
|
1102
|
+
"h",
|
|
1103
|
+
"H"
|
|
1104
|
+
],
|
|
1105
|
+
"TO": [
|
|
1106
|
+
"h",
|
|
1107
|
+
"H"
|
|
1108
|
+
],
|
|
1109
|
+
"VU": [
|
|
1110
|
+
"h",
|
|
1111
|
+
"H"
|
|
1112
|
+
],
|
|
1113
|
+
"WS": [
|
|
1114
|
+
"h",
|
|
1115
|
+
"H"
|
|
1116
|
+
],
|
|
1117
|
+
"001": [
|
|
1118
|
+
"H",
|
|
1119
|
+
"h"
|
|
1120
|
+
],
|
|
1121
|
+
"AL": [
|
|
1122
|
+
"h",
|
|
1123
|
+
"H",
|
|
1124
|
+
"hB"
|
|
1125
|
+
],
|
|
1126
|
+
"TD": [
|
|
1127
|
+
"h",
|
|
1128
|
+
"H",
|
|
1129
|
+
"hB"
|
|
1130
|
+
],
|
|
1131
|
+
"ca-ES": [
|
|
1132
|
+
"H",
|
|
1133
|
+
"h",
|
|
1134
|
+
"hB"
|
|
1135
|
+
],
|
|
1136
|
+
"CF": [
|
|
1137
|
+
"H",
|
|
1138
|
+
"h",
|
|
1139
|
+
"hB"
|
|
1140
|
+
],
|
|
1141
|
+
"CM": [
|
|
1142
|
+
"H",
|
|
1143
|
+
"h",
|
|
1144
|
+
"hB"
|
|
1145
|
+
],
|
|
1146
|
+
"fr-CA": [
|
|
1147
|
+
"H",
|
|
1148
|
+
"h",
|
|
1149
|
+
"hB"
|
|
1150
|
+
],
|
|
1151
|
+
"gl-ES": [
|
|
1152
|
+
"H",
|
|
1153
|
+
"h",
|
|
1154
|
+
"hB"
|
|
1155
|
+
],
|
|
1156
|
+
"it-CH": [
|
|
1157
|
+
"H",
|
|
1158
|
+
"h",
|
|
1159
|
+
"hB"
|
|
1160
|
+
],
|
|
1161
|
+
"it-IT": [
|
|
1162
|
+
"H",
|
|
1163
|
+
"h",
|
|
1164
|
+
"hB"
|
|
1165
|
+
],
|
|
1166
|
+
"LU": [
|
|
1167
|
+
"H",
|
|
1168
|
+
"h",
|
|
1169
|
+
"hB"
|
|
1170
|
+
],
|
|
1171
|
+
"NP": [
|
|
1172
|
+
"H",
|
|
1173
|
+
"h",
|
|
1174
|
+
"hB"
|
|
1175
|
+
],
|
|
1176
|
+
"PF": [
|
|
1177
|
+
"H",
|
|
1178
|
+
"h",
|
|
1179
|
+
"hB"
|
|
1180
|
+
],
|
|
1181
|
+
"SC": [
|
|
1182
|
+
"H",
|
|
1183
|
+
"h",
|
|
1184
|
+
"hB"
|
|
1185
|
+
],
|
|
1186
|
+
"SM": [
|
|
1187
|
+
"H",
|
|
1188
|
+
"h",
|
|
1189
|
+
"hB"
|
|
1190
|
+
],
|
|
1191
|
+
"SN": [
|
|
1192
|
+
"H",
|
|
1193
|
+
"h",
|
|
1194
|
+
"hB"
|
|
1195
|
+
],
|
|
1196
|
+
"TF": [
|
|
1197
|
+
"H",
|
|
1198
|
+
"h",
|
|
1199
|
+
"hB"
|
|
1200
|
+
],
|
|
1201
|
+
"VA": [
|
|
1202
|
+
"H",
|
|
1203
|
+
"h",
|
|
1204
|
+
"hB"
|
|
1205
|
+
],
|
|
1206
|
+
"CY": [
|
|
1207
|
+
"h",
|
|
1208
|
+
"H",
|
|
1209
|
+
"hb",
|
|
1210
|
+
"hB"
|
|
1211
|
+
],
|
|
1212
|
+
"GR": [
|
|
1213
|
+
"h",
|
|
1214
|
+
"H",
|
|
1215
|
+
"hb",
|
|
1216
|
+
"hB"
|
|
1217
|
+
],
|
|
1218
|
+
"CO": [
|
|
1219
|
+
"h",
|
|
1220
|
+
"H",
|
|
1221
|
+
"hB",
|
|
1222
|
+
"hb"
|
|
1223
|
+
],
|
|
1224
|
+
"DO": [
|
|
1225
|
+
"h",
|
|
1226
|
+
"H",
|
|
1227
|
+
"hB",
|
|
1228
|
+
"hb"
|
|
1229
|
+
],
|
|
1230
|
+
"KP": [
|
|
1231
|
+
"h",
|
|
1232
|
+
"H",
|
|
1233
|
+
"hB",
|
|
1234
|
+
"hb"
|
|
1235
|
+
],
|
|
1236
|
+
"KR": [
|
|
1237
|
+
"h",
|
|
1238
|
+
"H",
|
|
1239
|
+
"hB",
|
|
1240
|
+
"hb"
|
|
1241
|
+
],
|
|
1242
|
+
"NA": [
|
|
1243
|
+
"h",
|
|
1244
|
+
"H",
|
|
1245
|
+
"hB",
|
|
1246
|
+
"hb"
|
|
1247
|
+
],
|
|
1248
|
+
"PA": [
|
|
1249
|
+
"h",
|
|
1250
|
+
"H",
|
|
1251
|
+
"hB",
|
|
1252
|
+
"hb"
|
|
1253
|
+
],
|
|
1254
|
+
"PR": [
|
|
1255
|
+
"h",
|
|
1256
|
+
"H",
|
|
1257
|
+
"hB",
|
|
1258
|
+
"hb"
|
|
1259
|
+
],
|
|
1260
|
+
"VE": [
|
|
1261
|
+
"h",
|
|
1262
|
+
"H",
|
|
1263
|
+
"hB",
|
|
1264
|
+
"hb"
|
|
1265
|
+
],
|
|
1266
|
+
"AC": [
|
|
1267
|
+
"H",
|
|
1268
|
+
"h",
|
|
1269
|
+
"hb",
|
|
1270
|
+
"hB"
|
|
1271
|
+
],
|
|
1272
|
+
"AI": [
|
|
1273
|
+
"H",
|
|
1274
|
+
"h",
|
|
1275
|
+
"hb",
|
|
1276
|
+
"hB"
|
|
1277
|
+
],
|
|
1278
|
+
"BW": [
|
|
1279
|
+
"H",
|
|
1280
|
+
"h",
|
|
1281
|
+
"hb",
|
|
1282
|
+
"hB"
|
|
1283
|
+
],
|
|
1284
|
+
"BZ": [
|
|
1285
|
+
"H",
|
|
1286
|
+
"h",
|
|
1287
|
+
"hb",
|
|
1288
|
+
"hB"
|
|
1289
|
+
],
|
|
1290
|
+
"CC": [
|
|
1291
|
+
"H",
|
|
1292
|
+
"h",
|
|
1293
|
+
"hb",
|
|
1294
|
+
"hB"
|
|
1295
|
+
],
|
|
1296
|
+
"CK": [
|
|
1297
|
+
"H",
|
|
1298
|
+
"h",
|
|
1299
|
+
"hb",
|
|
1300
|
+
"hB"
|
|
1301
|
+
],
|
|
1302
|
+
"CX": [
|
|
1303
|
+
"H",
|
|
1304
|
+
"h",
|
|
1305
|
+
"hb",
|
|
1306
|
+
"hB"
|
|
1307
|
+
],
|
|
1308
|
+
"DG": [
|
|
1309
|
+
"H",
|
|
1310
|
+
"h",
|
|
1311
|
+
"hb",
|
|
1312
|
+
"hB"
|
|
1313
|
+
],
|
|
1314
|
+
"FK": [
|
|
1315
|
+
"H",
|
|
1316
|
+
"h",
|
|
1317
|
+
"hb",
|
|
1318
|
+
"hB"
|
|
1319
|
+
],
|
|
1320
|
+
"GB": [
|
|
1321
|
+
"H",
|
|
1322
|
+
"h",
|
|
1323
|
+
"hb",
|
|
1324
|
+
"hB"
|
|
1325
|
+
],
|
|
1326
|
+
"GG": [
|
|
1327
|
+
"H",
|
|
1328
|
+
"h",
|
|
1329
|
+
"hb",
|
|
1330
|
+
"hB"
|
|
1331
|
+
],
|
|
1332
|
+
"GI": [
|
|
1333
|
+
"H",
|
|
1334
|
+
"h",
|
|
1335
|
+
"hb",
|
|
1336
|
+
"hB"
|
|
1337
|
+
],
|
|
1338
|
+
"IE": [
|
|
1339
|
+
"H",
|
|
1340
|
+
"h",
|
|
1341
|
+
"hb",
|
|
1342
|
+
"hB"
|
|
1343
|
+
],
|
|
1344
|
+
"IM": [
|
|
1345
|
+
"H",
|
|
1346
|
+
"h",
|
|
1347
|
+
"hb",
|
|
1348
|
+
"hB"
|
|
1349
|
+
],
|
|
1350
|
+
"IO": [
|
|
1351
|
+
"H",
|
|
1352
|
+
"h",
|
|
1353
|
+
"hb",
|
|
1354
|
+
"hB"
|
|
1355
|
+
],
|
|
1356
|
+
"JE": [
|
|
1357
|
+
"H",
|
|
1358
|
+
"h",
|
|
1359
|
+
"hb",
|
|
1360
|
+
"hB"
|
|
1361
|
+
],
|
|
1362
|
+
"LT": [
|
|
1363
|
+
"H",
|
|
1364
|
+
"h",
|
|
1365
|
+
"hb",
|
|
1366
|
+
"hB"
|
|
1367
|
+
],
|
|
1368
|
+
"MK": [
|
|
1369
|
+
"H",
|
|
1370
|
+
"h",
|
|
1371
|
+
"hb",
|
|
1372
|
+
"hB"
|
|
1373
|
+
],
|
|
1374
|
+
"MN": [
|
|
1375
|
+
"H",
|
|
1376
|
+
"h",
|
|
1377
|
+
"hb",
|
|
1378
|
+
"hB"
|
|
1379
|
+
],
|
|
1380
|
+
"MS": [
|
|
1381
|
+
"H",
|
|
1382
|
+
"h",
|
|
1383
|
+
"hb",
|
|
1384
|
+
"hB"
|
|
1385
|
+
],
|
|
1386
|
+
"NF": [
|
|
1387
|
+
"H",
|
|
1388
|
+
"h",
|
|
1389
|
+
"hb",
|
|
1390
|
+
"hB"
|
|
1391
|
+
],
|
|
1392
|
+
"NG": [
|
|
1393
|
+
"H",
|
|
1394
|
+
"h",
|
|
1395
|
+
"hb",
|
|
1396
|
+
"hB"
|
|
1397
|
+
],
|
|
1398
|
+
"NR": [
|
|
1399
|
+
"H",
|
|
1400
|
+
"h",
|
|
1401
|
+
"hb",
|
|
1402
|
+
"hB"
|
|
1403
|
+
],
|
|
1404
|
+
"NU": [
|
|
1405
|
+
"H",
|
|
1406
|
+
"h",
|
|
1407
|
+
"hb",
|
|
1408
|
+
"hB"
|
|
1409
|
+
],
|
|
1410
|
+
"PN": [
|
|
1411
|
+
"H",
|
|
1412
|
+
"h",
|
|
1413
|
+
"hb",
|
|
1414
|
+
"hB"
|
|
1415
|
+
],
|
|
1416
|
+
"SH": [
|
|
1417
|
+
"H",
|
|
1418
|
+
"h",
|
|
1419
|
+
"hb",
|
|
1420
|
+
"hB"
|
|
1421
|
+
],
|
|
1422
|
+
"SX": [
|
|
1423
|
+
"H",
|
|
1424
|
+
"h",
|
|
1425
|
+
"hb",
|
|
1426
|
+
"hB"
|
|
1427
|
+
],
|
|
1428
|
+
"TA": [
|
|
1429
|
+
"H",
|
|
1430
|
+
"h",
|
|
1431
|
+
"hb",
|
|
1432
|
+
"hB"
|
|
1433
|
+
],
|
|
1434
|
+
"ZA": [
|
|
1435
|
+
"H",
|
|
1436
|
+
"h",
|
|
1437
|
+
"hb",
|
|
1438
|
+
"hB"
|
|
1439
|
+
],
|
|
1440
|
+
"af-ZA": [
|
|
1441
|
+
"H",
|
|
1442
|
+
"h",
|
|
1443
|
+
"hB",
|
|
1444
|
+
"hb"
|
|
1445
|
+
],
|
|
1446
|
+
"AR": [
|
|
1447
|
+
"H",
|
|
1448
|
+
"h",
|
|
1449
|
+
"hB",
|
|
1450
|
+
"hb"
|
|
1451
|
+
],
|
|
1452
|
+
"CL": [
|
|
1453
|
+
"H",
|
|
1454
|
+
"h",
|
|
1455
|
+
"hB",
|
|
1456
|
+
"hb"
|
|
1457
|
+
],
|
|
1458
|
+
"CR": [
|
|
1459
|
+
"H",
|
|
1460
|
+
"h",
|
|
1461
|
+
"hB",
|
|
1462
|
+
"hb"
|
|
1463
|
+
],
|
|
1464
|
+
"CU": [
|
|
1465
|
+
"H",
|
|
1466
|
+
"h",
|
|
1467
|
+
"hB",
|
|
1468
|
+
"hb"
|
|
1469
|
+
],
|
|
1470
|
+
"EA": [
|
|
1471
|
+
"H",
|
|
1472
|
+
"h",
|
|
1473
|
+
"hB",
|
|
1474
|
+
"hb"
|
|
1475
|
+
],
|
|
1476
|
+
"es-BO": [
|
|
1477
|
+
"H",
|
|
1478
|
+
"h",
|
|
1479
|
+
"hB",
|
|
1480
|
+
"hb"
|
|
1481
|
+
],
|
|
1482
|
+
"es-BR": [
|
|
1483
|
+
"H",
|
|
1484
|
+
"h",
|
|
1485
|
+
"hB",
|
|
1486
|
+
"hb"
|
|
1487
|
+
],
|
|
1488
|
+
"es-EC": [
|
|
1489
|
+
"H",
|
|
1490
|
+
"h",
|
|
1491
|
+
"hB",
|
|
1492
|
+
"hb"
|
|
1493
|
+
],
|
|
1494
|
+
"es-ES": [
|
|
1495
|
+
"H",
|
|
1496
|
+
"h",
|
|
1497
|
+
"hB",
|
|
1498
|
+
"hb"
|
|
1499
|
+
],
|
|
1500
|
+
"es-GQ": [
|
|
1501
|
+
"H",
|
|
1502
|
+
"h",
|
|
1503
|
+
"hB",
|
|
1504
|
+
"hb"
|
|
1505
|
+
],
|
|
1506
|
+
"es-PE": [
|
|
1507
|
+
"H",
|
|
1508
|
+
"h",
|
|
1509
|
+
"hB",
|
|
1510
|
+
"hb"
|
|
1511
|
+
],
|
|
1512
|
+
"GT": [
|
|
1513
|
+
"H",
|
|
1514
|
+
"h",
|
|
1515
|
+
"hB",
|
|
1516
|
+
"hb"
|
|
1517
|
+
],
|
|
1518
|
+
"HN": [
|
|
1519
|
+
"H",
|
|
1520
|
+
"h",
|
|
1521
|
+
"hB",
|
|
1522
|
+
"hb"
|
|
1523
|
+
],
|
|
1524
|
+
"IC": [
|
|
1525
|
+
"H",
|
|
1526
|
+
"h",
|
|
1527
|
+
"hB",
|
|
1528
|
+
"hb"
|
|
1529
|
+
],
|
|
1530
|
+
"KG": [
|
|
1531
|
+
"H",
|
|
1532
|
+
"h",
|
|
1533
|
+
"hB",
|
|
1534
|
+
"hb"
|
|
1535
|
+
],
|
|
1536
|
+
"KM": [
|
|
1537
|
+
"H",
|
|
1538
|
+
"h",
|
|
1539
|
+
"hB",
|
|
1540
|
+
"hb"
|
|
1541
|
+
],
|
|
1542
|
+
"LK": [
|
|
1543
|
+
"H",
|
|
1544
|
+
"h",
|
|
1545
|
+
"hB",
|
|
1546
|
+
"hb"
|
|
1547
|
+
],
|
|
1548
|
+
"MA": [
|
|
1549
|
+
"H",
|
|
1550
|
+
"h",
|
|
1551
|
+
"hB",
|
|
1552
|
+
"hb"
|
|
1553
|
+
],
|
|
1554
|
+
"MX": [
|
|
1555
|
+
"H",
|
|
1556
|
+
"h",
|
|
1557
|
+
"hB",
|
|
1558
|
+
"hb"
|
|
1559
|
+
],
|
|
1560
|
+
"NI": [
|
|
1561
|
+
"H",
|
|
1562
|
+
"h",
|
|
1563
|
+
"hB",
|
|
1564
|
+
"hb"
|
|
1565
|
+
],
|
|
1566
|
+
"PY": [
|
|
1567
|
+
"H",
|
|
1568
|
+
"h",
|
|
1569
|
+
"hB",
|
|
1570
|
+
"hb"
|
|
1571
|
+
],
|
|
1572
|
+
"SV": [
|
|
1573
|
+
"H",
|
|
1574
|
+
"h",
|
|
1575
|
+
"hB",
|
|
1576
|
+
"hb"
|
|
1577
|
+
],
|
|
1578
|
+
"UY": [
|
|
1579
|
+
"H",
|
|
1580
|
+
"h",
|
|
1581
|
+
"hB",
|
|
1582
|
+
"hb"
|
|
1583
|
+
],
|
|
1584
|
+
"JP": [
|
|
1585
|
+
"H",
|
|
1586
|
+
"h",
|
|
1587
|
+
"K"
|
|
1588
|
+
],
|
|
1589
|
+
"AD": [
|
|
1590
|
+
"H",
|
|
1591
|
+
"hB"
|
|
1592
|
+
],
|
|
1593
|
+
"AM": [
|
|
1594
|
+
"H",
|
|
1595
|
+
"hB"
|
|
1596
|
+
],
|
|
1597
|
+
"AO": [
|
|
1598
|
+
"H",
|
|
1599
|
+
"hB"
|
|
1600
|
+
],
|
|
1601
|
+
"AT": [
|
|
1602
|
+
"H",
|
|
1603
|
+
"hB"
|
|
1604
|
+
],
|
|
1605
|
+
"AW": [
|
|
1606
|
+
"H",
|
|
1607
|
+
"hB"
|
|
1608
|
+
],
|
|
1609
|
+
"BE": [
|
|
1610
|
+
"H",
|
|
1611
|
+
"hB"
|
|
1612
|
+
],
|
|
1613
|
+
"BF": [
|
|
1614
|
+
"H",
|
|
1615
|
+
"hB"
|
|
1616
|
+
],
|
|
1617
|
+
"BJ": [
|
|
1618
|
+
"H",
|
|
1619
|
+
"hB"
|
|
1620
|
+
],
|
|
1621
|
+
"BL": [
|
|
1622
|
+
"H",
|
|
1623
|
+
"hB"
|
|
1624
|
+
],
|
|
1625
|
+
"BR": [
|
|
1626
|
+
"H",
|
|
1627
|
+
"hB"
|
|
1628
|
+
],
|
|
1629
|
+
"CG": [
|
|
1630
|
+
"H",
|
|
1631
|
+
"hB"
|
|
1632
|
+
],
|
|
1633
|
+
"CI": [
|
|
1634
|
+
"H",
|
|
1635
|
+
"hB"
|
|
1636
|
+
],
|
|
1637
|
+
"CV": [
|
|
1638
|
+
"H",
|
|
1639
|
+
"hB"
|
|
1640
|
+
],
|
|
1641
|
+
"DE": [
|
|
1642
|
+
"H",
|
|
1643
|
+
"hB"
|
|
1644
|
+
],
|
|
1645
|
+
"EE": [
|
|
1646
|
+
"H",
|
|
1647
|
+
"hB"
|
|
1648
|
+
],
|
|
1649
|
+
"FR": [
|
|
1650
|
+
"H",
|
|
1651
|
+
"hB"
|
|
1652
|
+
],
|
|
1653
|
+
"GA": [
|
|
1654
|
+
"H",
|
|
1655
|
+
"hB"
|
|
1656
|
+
],
|
|
1657
|
+
"GF": [
|
|
1658
|
+
"H",
|
|
1659
|
+
"hB"
|
|
1660
|
+
],
|
|
1661
|
+
"GN": [
|
|
1662
|
+
"H",
|
|
1663
|
+
"hB"
|
|
1664
|
+
],
|
|
1665
|
+
"GP": [
|
|
1666
|
+
"H",
|
|
1667
|
+
"hB"
|
|
1668
|
+
],
|
|
1669
|
+
"GW": [
|
|
1670
|
+
"H",
|
|
1671
|
+
"hB"
|
|
1672
|
+
],
|
|
1673
|
+
"HR": [
|
|
1674
|
+
"H",
|
|
1675
|
+
"hB"
|
|
1676
|
+
],
|
|
1677
|
+
"IL": [
|
|
1678
|
+
"H",
|
|
1679
|
+
"hB"
|
|
1680
|
+
],
|
|
1681
|
+
"IT": [
|
|
1682
|
+
"H",
|
|
1683
|
+
"hB"
|
|
1684
|
+
],
|
|
1685
|
+
"KZ": [
|
|
1686
|
+
"H",
|
|
1687
|
+
"hB"
|
|
1688
|
+
],
|
|
1689
|
+
"MC": [
|
|
1690
|
+
"H",
|
|
1691
|
+
"hB"
|
|
1692
|
+
],
|
|
1693
|
+
"MD": [
|
|
1694
|
+
"H",
|
|
1695
|
+
"hB"
|
|
1696
|
+
],
|
|
1697
|
+
"MF": [
|
|
1698
|
+
"H",
|
|
1699
|
+
"hB"
|
|
1700
|
+
],
|
|
1701
|
+
"MQ": [
|
|
1702
|
+
"H",
|
|
1703
|
+
"hB"
|
|
1704
|
+
],
|
|
1705
|
+
"MZ": [
|
|
1706
|
+
"H",
|
|
1707
|
+
"hB"
|
|
1708
|
+
],
|
|
1709
|
+
"NC": [
|
|
1710
|
+
"H",
|
|
1711
|
+
"hB"
|
|
1712
|
+
],
|
|
1713
|
+
"NL": [
|
|
1714
|
+
"H",
|
|
1715
|
+
"hB"
|
|
1716
|
+
],
|
|
1717
|
+
"PM": [
|
|
1718
|
+
"H",
|
|
1719
|
+
"hB"
|
|
1720
|
+
],
|
|
1721
|
+
"PT": [
|
|
1722
|
+
"H",
|
|
1723
|
+
"hB"
|
|
1724
|
+
],
|
|
1725
|
+
"RE": [
|
|
1726
|
+
"H",
|
|
1727
|
+
"hB"
|
|
1728
|
+
],
|
|
1729
|
+
"RO": [
|
|
1730
|
+
"H",
|
|
1731
|
+
"hB"
|
|
1732
|
+
],
|
|
1733
|
+
"SI": [
|
|
1734
|
+
"H",
|
|
1735
|
+
"hB"
|
|
1736
|
+
],
|
|
1737
|
+
"SR": [
|
|
1738
|
+
"H",
|
|
1739
|
+
"hB"
|
|
1740
|
+
],
|
|
1741
|
+
"ST": [
|
|
1742
|
+
"H",
|
|
1743
|
+
"hB"
|
|
1744
|
+
],
|
|
1745
|
+
"TG": [
|
|
1746
|
+
"H",
|
|
1747
|
+
"hB"
|
|
1748
|
+
],
|
|
1749
|
+
"TR": [
|
|
1750
|
+
"H",
|
|
1751
|
+
"hB"
|
|
1752
|
+
],
|
|
1753
|
+
"WF": [
|
|
1754
|
+
"H",
|
|
1755
|
+
"hB"
|
|
1756
|
+
],
|
|
1757
|
+
"YT": [
|
|
1758
|
+
"H",
|
|
1759
|
+
"hB"
|
|
1760
|
+
],
|
|
1761
|
+
"BD": [
|
|
1762
|
+
"h",
|
|
1763
|
+
"hB",
|
|
1764
|
+
"H"
|
|
1765
|
+
],
|
|
1766
|
+
"PK": [
|
|
1767
|
+
"h",
|
|
1768
|
+
"hB",
|
|
1769
|
+
"H"
|
|
1770
|
+
],
|
|
1771
|
+
"AZ": [
|
|
1772
|
+
"H",
|
|
1773
|
+
"hB",
|
|
1774
|
+
"h"
|
|
1775
|
+
],
|
|
1776
|
+
"BA": [
|
|
1777
|
+
"H",
|
|
1778
|
+
"hB",
|
|
1779
|
+
"h"
|
|
1780
|
+
],
|
|
1781
|
+
"BG": [
|
|
1782
|
+
"H",
|
|
1783
|
+
"hB",
|
|
1784
|
+
"h"
|
|
1785
|
+
],
|
|
1786
|
+
"CH": [
|
|
1787
|
+
"H",
|
|
1788
|
+
"hB",
|
|
1789
|
+
"h"
|
|
1790
|
+
],
|
|
1791
|
+
"GE": [
|
|
1792
|
+
"H",
|
|
1793
|
+
"hB",
|
|
1794
|
+
"h"
|
|
1795
|
+
],
|
|
1796
|
+
"LI": [
|
|
1797
|
+
"H",
|
|
1798
|
+
"hB",
|
|
1799
|
+
"h"
|
|
1800
|
+
],
|
|
1801
|
+
"ME": [
|
|
1802
|
+
"H",
|
|
1803
|
+
"hB",
|
|
1804
|
+
"h"
|
|
1805
|
+
],
|
|
1806
|
+
"RS": [
|
|
1807
|
+
"H",
|
|
1808
|
+
"hB",
|
|
1809
|
+
"h"
|
|
1810
|
+
],
|
|
1811
|
+
"UA": [
|
|
1812
|
+
"H",
|
|
1813
|
+
"hB",
|
|
1814
|
+
"h"
|
|
1815
|
+
],
|
|
1816
|
+
"UZ": [
|
|
1817
|
+
"H",
|
|
1818
|
+
"hB",
|
|
1819
|
+
"h"
|
|
1820
|
+
],
|
|
1821
|
+
"XK": [
|
|
1822
|
+
"H",
|
|
1823
|
+
"hB",
|
|
1824
|
+
"h"
|
|
1825
|
+
],
|
|
1826
|
+
"AG": [
|
|
1827
|
+
"h",
|
|
1828
|
+
"hb",
|
|
1829
|
+
"H",
|
|
1830
|
+
"hB"
|
|
1831
|
+
],
|
|
1832
|
+
"AU": [
|
|
1833
|
+
"h",
|
|
1834
|
+
"hb",
|
|
1835
|
+
"H",
|
|
1836
|
+
"hB"
|
|
1837
|
+
],
|
|
1838
|
+
"BB": [
|
|
1839
|
+
"h",
|
|
1840
|
+
"hb",
|
|
1841
|
+
"H",
|
|
1842
|
+
"hB"
|
|
1843
|
+
],
|
|
1844
|
+
"BM": [
|
|
1845
|
+
"h",
|
|
1846
|
+
"hb",
|
|
1847
|
+
"H",
|
|
1848
|
+
"hB"
|
|
1849
|
+
],
|
|
1850
|
+
"BS": [
|
|
1851
|
+
"h",
|
|
1852
|
+
"hb",
|
|
1853
|
+
"H",
|
|
1854
|
+
"hB"
|
|
1855
|
+
],
|
|
1856
|
+
"CA": [
|
|
1857
|
+
"h",
|
|
1858
|
+
"hb",
|
|
1859
|
+
"H",
|
|
1860
|
+
"hB"
|
|
1861
|
+
],
|
|
1862
|
+
"DM": [
|
|
1863
|
+
"h",
|
|
1864
|
+
"hb",
|
|
1865
|
+
"H",
|
|
1866
|
+
"hB"
|
|
1867
|
+
],
|
|
1868
|
+
"en-001": [
|
|
1869
|
+
"h",
|
|
1870
|
+
"hb",
|
|
1871
|
+
"H",
|
|
1872
|
+
"hB"
|
|
1873
|
+
],
|
|
1874
|
+
"FJ": [
|
|
1875
|
+
"h",
|
|
1876
|
+
"hb",
|
|
1877
|
+
"H",
|
|
1878
|
+
"hB"
|
|
1879
|
+
],
|
|
1880
|
+
"FM": [
|
|
1881
|
+
"h",
|
|
1882
|
+
"hb",
|
|
1883
|
+
"H",
|
|
1884
|
+
"hB"
|
|
1885
|
+
],
|
|
1886
|
+
"GD": [
|
|
1887
|
+
"h",
|
|
1888
|
+
"hb",
|
|
1889
|
+
"H",
|
|
1890
|
+
"hB"
|
|
1891
|
+
],
|
|
1892
|
+
"GM": [
|
|
1893
|
+
"h",
|
|
1894
|
+
"hb",
|
|
1895
|
+
"H",
|
|
1896
|
+
"hB"
|
|
1897
|
+
],
|
|
1898
|
+
"GU": [
|
|
1899
|
+
"h",
|
|
1900
|
+
"hb",
|
|
1901
|
+
"H",
|
|
1902
|
+
"hB"
|
|
1903
|
+
],
|
|
1904
|
+
"GY": [
|
|
1905
|
+
"h",
|
|
1906
|
+
"hb",
|
|
1907
|
+
"H",
|
|
1908
|
+
"hB"
|
|
1909
|
+
],
|
|
1910
|
+
"JM": [
|
|
1911
|
+
"h",
|
|
1912
|
+
"hb",
|
|
1913
|
+
"H",
|
|
1914
|
+
"hB"
|
|
1915
|
+
],
|
|
1916
|
+
"KI": [
|
|
1917
|
+
"h",
|
|
1918
|
+
"hb",
|
|
1919
|
+
"H",
|
|
1920
|
+
"hB"
|
|
1921
|
+
],
|
|
1922
|
+
"KN": [
|
|
1923
|
+
"h",
|
|
1924
|
+
"hb",
|
|
1925
|
+
"H",
|
|
1926
|
+
"hB"
|
|
1927
|
+
],
|
|
1928
|
+
"KY": [
|
|
1929
|
+
"h",
|
|
1930
|
+
"hb",
|
|
1931
|
+
"H",
|
|
1932
|
+
"hB"
|
|
1933
|
+
],
|
|
1934
|
+
"LC": [
|
|
1935
|
+
"h",
|
|
1936
|
+
"hb",
|
|
1937
|
+
"H",
|
|
1938
|
+
"hB"
|
|
1939
|
+
],
|
|
1940
|
+
"LR": [
|
|
1941
|
+
"h",
|
|
1942
|
+
"hb",
|
|
1943
|
+
"H",
|
|
1944
|
+
"hB"
|
|
1945
|
+
],
|
|
1946
|
+
"MH": [
|
|
1947
|
+
"h",
|
|
1948
|
+
"hb",
|
|
1949
|
+
"H",
|
|
1950
|
+
"hB"
|
|
1951
|
+
],
|
|
1952
|
+
"MP": [
|
|
1953
|
+
"h",
|
|
1954
|
+
"hb",
|
|
1955
|
+
"H",
|
|
1956
|
+
"hB"
|
|
1957
|
+
],
|
|
1958
|
+
"MW": [
|
|
1959
|
+
"h",
|
|
1960
|
+
"hb",
|
|
1961
|
+
"H",
|
|
1962
|
+
"hB"
|
|
1963
|
+
],
|
|
1964
|
+
"NZ": [
|
|
1965
|
+
"h",
|
|
1966
|
+
"hb",
|
|
1967
|
+
"H",
|
|
1968
|
+
"hB"
|
|
1969
|
+
],
|
|
1970
|
+
"SB": [
|
|
1971
|
+
"h",
|
|
1972
|
+
"hb",
|
|
1973
|
+
"H",
|
|
1974
|
+
"hB"
|
|
1975
|
+
],
|
|
1976
|
+
"SG": [
|
|
1977
|
+
"h",
|
|
1978
|
+
"hb",
|
|
1979
|
+
"H",
|
|
1980
|
+
"hB"
|
|
1981
|
+
],
|
|
1982
|
+
"SL": [
|
|
1983
|
+
"h",
|
|
1984
|
+
"hb",
|
|
1985
|
+
"H",
|
|
1986
|
+
"hB"
|
|
1987
|
+
],
|
|
1988
|
+
"SS": [
|
|
1989
|
+
"h",
|
|
1990
|
+
"hb",
|
|
1991
|
+
"H",
|
|
1992
|
+
"hB"
|
|
1993
|
+
],
|
|
1994
|
+
"SZ": [
|
|
1995
|
+
"h",
|
|
1996
|
+
"hb",
|
|
1997
|
+
"H",
|
|
1998
|
+
"hB"
|
|
1999
|
+
],
|
|
2000
|
+
"TC": [
|
|
2001
|
+
"h",
|
|
2002
|
+
"hb",
|
|
2003
|
+
"H",
|
|
2004
|
+
"hB"
|
|
2005
|
+
],
|
|
2006
|
+
"TT": [
|
|
2007
|
+
"h",
|
|
2008
|
+
"hb",
|
|
2009
|
+
"H",
|
|
2010
|
+
"hB"
|
|
2011
|
+
],
|
|
2012
|
+
"UM": [
|
|
2013
|
+
"h",
|
|
2014
|
+
"hb",
|
|
2015
|
+
"H",
|
|
2016
|
+
"hB"
|
|
2017
|
+
],
|
|
2018
|
+
"US": [
|
|
2019
|
+
"h",
|
|
2020
|
+
"hb",
|
|
2021
|
+
"H",
|
|
2022
|
+
"hB"
|
|
2023
|
+
],
|
|
2024
|
+
"VC": [
|
|
2025
|
+
"h",
|
|
2026
|
+
"hb",
|
|
2027
|
+
"H",
|
|
2028
|
+
"hB"
|
|
2029
|
+
],
|
|
2030
|
+
"VG": [
|
|
2031
|
+
"h",
|
|
2032
|
+
"hb",
|
|
2033
|
+
"H",
|
|
2034
|
+
"hB"
|
|
2035
|
+
],
|
|
2036
|
+
"VI": [
|
|
2037
|
+
"h",
|
|
2038
|
+
"hb",
|
|
2039
|
+
"H",
|
|
2040
|
+
"hB"
|
|
2041
|
+
],
|
|
2042
|
+
"ZM": [
|
|
2043
|
+
"h",
|
|
2044
|
+
"hb",
|
|
2045
|
+
"H",
|
|
2046
|
+
"hB"
|
|
2047
|
+
],
|
|
2048
|
+
"BO": [
|
|
2049
|
+
"H",
|
|
2050
|
+
"hB",
|
|
2051
|
+
"h",
|
|
2052
|
+
"hb"
|
|
2053
|
+
],
|
|
2054
|
+
"EC": [
|
|
2055
|
+
"H",
|
|
2056
|
+
"hB",
|
|
2057
|
+
"h",
|
|
2058
|
+
"hb"
|
|
2059
|
+
],
|
|
2060
|
+
"ES": [
|
|
2061
|
+
"H",
|
|
2062
|
+
"hB",
|
|
2063
|
+
"h",
|
|
2064
|
+
"hb"
|
|
2065
|
+
],
|
|
2066
|
+
"GQ": [
|
|
2067
|
+
"H",
|
|
2068
|
+
"hB",
|
|
2069
|
+
"h",
|
|
2070
|
+
"hb"
|
|
2071
|
+
],
|
|
2072
|
+
"PE": [
|
|
2073
|
+
"H",
|
|
2074
|
+
"hB",
|
|
2075
|
+
"h",
|
|
2076
|
+
"hb"
|
|
2077
|
+
],
|
|
2078
|
+
"AE": [
|
|
2079
|
+
"h",
|
|
2080
|
+
"hB",
|
|
2081
|
+
"hb",
|
|
2082
|
+
"H"
|
|
2083
|
+
],
|
|
2084
|
+
"ar-001": [
|
|
2085
|
+
"h",
|
|
2086
|
+
"hB",
|
|
2087
|
+
"hb",
|
|
2088
|
+
"H"
|
|
2089
|
+
],
|
|
2090
|
+
"BH": [
|
|
2091
|
+
"h",
|
|
2092
|
+
"hB",
|
|
2093
|
+
"hb",
|
|
2094
|
+
"H"
|
|
2095
|
+
],
|
|
2096
|
+
"DZ": [
|
|
2097
|
+
"h",
|
|
2098
|
+
"hB",
|
|
2099
|
+
"hb",
|
|
2100
|
+
"H"
|
|
2101
|
+
],
|
|
2102
|
+
"EG": [
|
|
2103
|
+
"h",
|
|
2104
|
+
"hB",
|
|
2105
|
+
"hb",
|
|
2106
|
+
"H"
|
|
2107
|
+
],
|
|
2108
|
+
"EH": [
|
|
2109
|
+
"h",
|
|
2110
|
+
"hB",
|
|
2111
|
+
"hb",
|
|
2112
|
+
"H"
|
|
2113
|
+
],
|
|
2114
|
+
"HK": [
|
|
2115
|
+
"h",
|
|
2116
|
+
"hB",
|
|
2117
|
+
"hb",
|
|
2118
|
+
"H"
|
|
2119
|
+
],
|
|
2120
|
+
"IQ": [
|
|
2121
|
+
"h",
|
|
2122
|
+
"hB",
|
|
2123
|
+
"hb",
|
|
2124
|
+
"H"
|
|
2125
|
+
],
|
|
2126
|
+
"JO": [
|
|
2127
|
+
"h",
|
|
2128
|
+
"hB",
|
|
2129
|
+
"hb",
|
|
2130
|
+
"H"
|
|
2131
|
+
],
|
|
2132
|
+
"KW": [
|
|
2133
|
+
"h",
|
|
2134
|
+
"hB",
|
|
2135
|
+
"hb",
|
|
2136
|
+
"H"
|
|
2137
|
+
],
|
|
2138
|
+
"LB": [
|
|
2139
|
+
"h",
|
|
2140
|
+
"hB",
|
|
2141
|
+
"hb",
|
|
2142
|
+
"H"
|
|
2143
|
+
],
|
|
2144
|
+
"LY": [
|
|
2145
|
+
"h",
|
|
2146
|
+
"hB",
|
|
2147
|
+
"hb",
|
|
2148
|
+
"H"
|
|
2149
|
+
],
|
|
2150
|
+
"MO": [
|
|
2151
|
+
"h",
|
|
2152
|
+
"hB",
|
|
2153
|
+
"hb",
|
|
2154
|
+
"H"
|
|
2155
|
+
],
|
|
2156
|
+
"MR": [
|
|
2157
|
+
"h",
|
|
2158
|
+
"hB",
|
|
2159
|
+
"hb",
|
|
2160
|
+
"H"
|
|
2161
|
+
],
|
|
2162
|
+
"OM": [
|
|
2163
|
+
"h",
|
|
2164
|
+
"hB",
|
|
2165
|
+
"hb",
|
|
2166
|
+
"H"
|
|
2167
|
+
],
|
|
2168
|
+
"PH": [
|
|
2169
|
+
"h",
|
|
2170
|
+
"hB",
|
|
2171
|
+
"hb",
|
|
2172
|
+
"H"
|
|
2173
|
+
],
|
|
2174
|
+
"PS": [
|
|
2175
|
+
"h",
|
|
2176
|
+
"hB",
|
|
2177
|
+
"hb",
|
|
2178
|
+
"H"
|
|
2179
|
+
],
|
|
2180
|
+
"QA": [
|
|
2181
|
+
"h",
|
|
2182
|
+
"hB",
|
|
2183
|
+
"hb",
|
|
2184
|
+
"H"
|
|
2185
|
+
],
|
|
2186
|
+
"SA": [
|
|
2187
|
+
"h",
|
|
2188
|
+
"hB",
|
|
2189
|
+
"hb",
|
|
2190
|
+
"H"
|
|
2191
|
+
],
|
|
2192
|
+
"SD": [
|
|
2193
|
+
"h",
|
|
2194
|
+
"hB",
|
|
2195
|
+
"hb",
|
|
2196
|
+
"H"
|
|
2197
|
+
],
|
|
2198
|
+
"SY": [
|
|
2199
|
+
"h",
|
|
2200
|
+
"hB",
|
|
2201
|
+
"hb",
|
|
2202
|
+
"H"
|
|
2203
|
+
],
|
|
2204
|
+
"TN": [
|
|
2205
|
+
"h",
|
|
2206
|
+
"hB",
|
|
2207
|
+
"hb",
|
|
2208
|
+
"H"
|
|
2209
|
+
],
|
|
2210
|
+
"YE": [
|
|
2211
|
+
"h",
|
|
2212
|
+
"hB",
|
|
2213
|
+
"hb",
|
|
2214
|
+
"H"
|
|
2215
|
+
],
|
|
2216
|
+
"AF": [
|
|
2217
|
+
"H",
|
|
2218
|
+
"hb",
|
|
2219
|
+
"hB",
|
|
2220
|
+
"h"
|
|
2221
|
+
],
|
|
2222
|
+
"LA": [
|
|
2223
|
+
"H",
|
|
2224
|
+
"hb",
|
|
2225
|
+
"hB",
|
|
2226
|
+
"h"
|
|
2227
|
+
],
|
|
2228
|
+
"CN": [
|
|
2229
|
+
"H",
|
|
2230
|
+
"hB",
|
|
2231
|
+
"hb",
|
|
2232
|
+
"h"
|
|
2233
|
+
],
|
|
2234
|
+
"LV": [
|
|
2235
|
+
"H",
|
|
2236
|
+
"hB",
|
|
2237
|
+
"hb",
|
|
2238
|
+
"h"
|
|
2239
|
+
],
|
|
2240
|
+
"TL": [
|
|
2241
|
+
"H",
|
|
2242
|
+
"hB",
|
|
2243
|
+
"hb",
|
|
2244
|
+
"h"
|
|
2245
|
+
],
|
|
2246
|
+
"zu-ZA": [
|
|
2247
|
+
"H",
|
|
2248
|
+
"hB",
|
|
2249
|
+
"hb",
|
|
2250
|
+
"h"
|
|
2251
|
+
],
|
|
2252
|
+
"CD": [
|
|
2253
|
+
"hB",
|
|
2254
|
+
"H"
|
|
2255
|
+
],
|
|
2256
|
+
"IR": [
|
|
2257
|
+
"hB",
|
|
2258
|
+
"H"
|
|
2259
|
+
],
|
|
2260
|
+
"hi-IN": [
|
|
2261
|
+
"hB",
|
|
2262
|
+
"h",
|
|
2263
|
+
"H"
|
|
2264
|
+
],
|
|
2265
|
+
"kn-IN": [
|
|
2266
|
+
"hB",
|
|
2267
|
+
"h",
|
|
2268
|
+
"H"
|
|
2269
|
+
],
|
|
2270
|
+
"ml-IN": [
|
|
2271
|
+
"hB",
|
|
2272
|
+
"h",
|
|
2273
|
+
"H"
|
|
2274
|
+
],
|
|
2275
|
+
"te-IN": [
|
|
2276
|
+
"hB",
|
|
2277
|
+
"h",
|
|
2278
|
+
"H"
|
|
2279
|
+
],
|
|
2280
|
+
"KH": [
|
|
2281
|
+
"hB",
|
|
2282
|
+
"h",
|
|
2283
|
+
"H",
|
|
2284
|
+
"hb"
|
|
2285
|
+
],
|
|
2286
|
+
"ta-IN": [
|
|
2287
|
+
"hB",
|
|
2288
|
+
"h",
|
|
2289
|
+
"hb",
|
|
2290
|
+
"H"
|
|
2291
|
+
],
|
|
2292
|
+
"BN": [
|
|
2293
|
+
"hb",
|
|
2294
|
+
"hB",
|
|
2295
|
+
"h",
|
|
2296
|
+
"H"
|
|
2297
|
+
],
|
|
2298
|
+
"MY": [
|
|
2299
|
+
"hb",
|
|
2300
|
+
"hB",
|
|
2301
|
+
"h",
|
|
2302
|
+
"H"
|
|
2303
|
+
],
|
|
2304
|
+
"ET": [
|
|
2305
|
+
"hB",
|
|
2306
|
+
"hb",
|
|
2307
|
+
"h",
|
|
2308
|
+
"H"
|
|
2309
|
+
],
|
|
2310
|
+
"gu-IN": [
|
|
2311
|
+
"hB",
|
|
2312
|
+
"hb",
|
|
2313
|
+
"h",
|
|
2314
|
+
"H"
|
|
2315
|
+
],
|
|
2316
|
+
"mr-IN": [
|
|
2317
|
+
"hB",
|
|
2318
|
+
"hb",
|
|
2319
|
+
"h",
|
|
2320
|
+
"H"
|
|
2321
|
+
],
|
|
2322
|
+
"pa-IN": [
|
|
2323
|
+
"hB",
|
|
2324
|
+
"hb",
|
|
2325
|
+
"h",
|
|
2326
|
+
"H"
|
|
2327
|
+
],
|
|
2328
|
+
"TW": [
|
|
2329
|
+
"hB",
|
|
2330
|
+
"hb",
|
|
2331
|
+
"h",
|
|
2332
|
+
"H"
|
|
2333
|
+
],
|
|
2334
|
+
"KE": [
|
|
2335
|
+
"hB",
|
|
2336
|
+
"hb",
|
|
2337
|
+
"H",
|
|
2338
|
+
"h"
|
|
2339
|
+
],
|
|
2340
|
+
"MM": [
|
|
2341
|
+
"hB",
|
|
2342
|
+
"hb",
|
|
2343
|
+
"H",
|
|
2344
|
+
"h"
|
|
2345
|
+
],
|
|
2346
|
+
"TZ": [
|
|
2347
|
+
"hB",
|
|
2348
|
+
"hb",
|
|
2349
|
+
"H",
|
|
2350
|
+
"h"
|
|
2351
|
+
],
|
|
2352
|
+
"UG": [
|
|
2353
|
+
"hB",
|
|
2354
|
+
"hb",
|
|
2355
|
+
"H",
|
|
2356
|
+
"h"
|
|
2357
|
+
]
|
|
2358
|
+
};
|
|
678
2359
|
}
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
2360
|
+
});
|
|
2361
|
+
|
|
2362
|
+
// bazel-out/darwin-fastbuild/bin/packages/icu-messageformat-parser/date-time-pattern-generator.js
|
|
2363
|
+
var require_date_time_pattern_generator = __commonJS({
|
|
2364
|
+
"bazel-out/darwin-fastbuild/bin/packages/icu-messageformat-parser/date-time-pattern-generator.js": function(exports) {
|
|
2365
|
+
"use strict";
|
|
2366
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2367
|
+
exports.getBestPattern = void 0;
|
|
2368
|
+
var time_data_generated_1 = require_time_data_generated();
|
|
2369
|
+
function getBestPattern(skeleton, locale) {
|
|
2370
|
+
var skeletonCopy = "";
|
|
2371
|
+
for (var patternPos = 0; patternPos < skeleton.length; patternPos++) {
|
|
2372
|
+
var patternChar = skeleton.charAt(patternPos);
|
|
2373
|
+
if (patternChar === "j") {
|
|
2374
|
+
var extraLength = 0;
|
|
2375
|
+
while (patternPos + 1 < skeleton.length && skeleton.charAt(patternPos + 1) === patternChar) {
|
|
2376
|
+
extraLength++;
|
|
2377
|
+
patternPos++;
|
|
2378
|
+
}
|
|
2379
|
+
var hourLen = 1 + (extraLength & 1);
|
|
2380
|
+
var dayPeriodLen = extraLength < 2 ? 1 : 3 + (extraLength >> 1);
|
|
2381
|
+
var dayPeriodChar = "a";
|
|
2382
|
+
var hourChar = getDefaultHourSymbolFromLocale(locale);
|
|
2383
|
+
if (hourChar == "H" || hourChar == "k") {
|
|
2384
|
+
dayPeriodLen = 0;
|
|
2385
|
+
}
|
|
2386
|
+
while (dayPeriodLen-- > 0) {
|
|
2387
|
+
skeletonCopy += dayPeriodChar;
|
|
2388
|
+
}
|
|
2389
|
+
while (hourLen-- > 0) {
|
|
2390
|
+
skeletonCopy = hourChar + skeletonCopy;
|
|
2391
|
+
}
|
|
2392
|
+
} else if (patternChar === "J") {
|
|
2393
|
+
skeletonCopy += "H";
|
|
707
2394
|
} else {
|
|
708
|
-
|
|
709
|
-
}
|
|
710
|
-
} else if (char === 60 && !this.ignoreTag && _isAlpha(this.peek() || 0)) {
|
|
711
|
-
var result = this.parseTag(nestingLevel, parentArgType);
|
|
712
|
-
if (result.err) {
|
|
713
|
-
return result;
|
|
714
|
-
}
|
|
715
|
-
elements.push(result.val);
|
|
716
|
-
} else {
|
|
717
|
-
var result = this.parseLiteral(nestingLevel, parentArgType);
|
|
718
|
-
if (result.err) {
|
|
719
|
-
return result;
|
|
2395
|
+
skeletonCopy += patternChar;
|
|
720
2396
|
}
|
|
721
|
-
elements.push(result.val);
|
|
722
2397
|
}
|
|
2398
|
+
return skeletonCopy;
|
|
723
2399
|
}
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
var tagName = this.parseTagName();
|
|
730
|
-
this.bumpSpace();
|
|
731
|
-
if (this.bumpIf("/>")) {
|
|
732
|
-
return {
|
|
733
|
-
val: {
|
|
734
|
-
type: TYPE.literal,
|
|
735
|
-
value: "<".concat(tagName, "/>"),
|
|
736
|
-
location: createLocation(startPosition, this.clonePosition())
|
|
737
|
-
},
|
|
738
|
-
err: null
|
|
739
|
-
};
|
|
740
|
-
} else if (this.bumpIf(">")) {
|
|
741
|
-
var childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);
|
|
742
|
-
if (childrenResult.err) {
|
|
743
|
-
return childrenResult;
|
|
2400
|
+
exports.getBestPattern = getBestPattern;
|
|
2401
|
+
function getDefaultHourSymbolFromLocale(locale) {
|
|
2402
|
+
var hourCycle = locale.hourCycle;
|
|
2403
|
+
if (hourCycle === void 0 && locale.hourCycles && locale.hourCycles.length) {
|
|
2404
|
+
hourCycle = locale.hourCycles[0];
|
|
744
2405
|
}
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
2406
|
+
if (hourCycle) {
|
|
2407
|
+
switch (hourCycle) {
|
|
2408
|
+
case "h24":
|
|
2409
|
+
return "k";
|
|
2410
|
+
case "h23":
|
|
2411
|
+
return "H";
|
|
2412
|
+
case "h12":
|
|
2413
|
+
return "h";
|
|
2414
|
+
case "h11":
|
|
2415
|
+
return "K";
|
|
2416
|
+
default:
|
|
2417
|
+
throw new Error("Invalid hourCycle");
|
|
755
2418
|
}
|
|
756
|
-
this.bumpSpace();
|
|
757
|
-
if (!this.bumpIf(">")) {
|
|
758
|
-
return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));
|
|
759
|
-
}
|
|
760
|
-
return {
|
|
761
|
-
val: {
|
|
762
|
-
type: TYPE.tag,
|
|
763
|
-
value: tagName,
|
|
764
|
-
children: children,
|
|
765
|
-
location: createLocation(startPosition, this.clonePosition())
|
|
766
|
-
},
|
|
767
|
-
err: null
|
|
768
|
-
};
|
|
769
|
-
} else {
|
|
770
|
-
return this.error(ErrorKind.UNCLOSED_TAG, createLocation(startPosition, this.clonePosition()));
|
|
771
2419
|
}
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
while (!this.isEOF() && _isPotentialElementNameChar(this.char())) {
|
|
780
|
-
this.bump();
|
|
2420
|
+
var languageTag = locale.language;
|
|
2421
|
+
var regionTag;
|
|
2422
|
+
if (languageTag !== "root") {
|
|
2423
|
+
regionTag = locale.maximize().region;
|
|
2424
|
+
}
|
|
2425
|
+
var hourCycles = time_data_generated_1.timeData[regionTag || ""] || time_data_generated_1.timeData[languageTag || ""] || time_data_generated_1.timeData["".concat(languageTag, "-001")] || time_data_generated_1.timeData["001"];
|
|
2426
|
+
return hourCycles[0];
|
|
781
2427
|
}
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
2428
|
+
}
|
|
2429
|
+
});
|
|
2430
|
+
|
|
2431
|
+
// bazel-out/darwin-fastbuild/bin/packages/icu-messageformat-parser/parser.js
|
|
2432
|
+
var require_parser = __commonJS({
|
|
2433
|
+
"bazel-out/darwin-fastbuild/bin/packages/icu-messageformat-parser/parser.js": function(exports) {
|
|
2434
|
+
"use strict";
|
|
2435
|
+
var _a;
|
|
2436
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2437
|
+
exports.Parser = void 0;
|
|
2438
|
+
var tslib_1 = require_tslib();
|
|
2439
|
+
var error_1 = require_error();
|
|
2440
|
+
var types_1 = require_types();
|
|
2441
|
+
var regex_generated_1 = require_regex_generated();
|
|
2442
|
+
var icu_skeleton_parser_1 = require_icu_skeleton_parser();
|
|
2443
|
+
var date_time_pattern_generator_1 = require_date_time_pattern_generator();
|
|
2444
|
+
var SPACE_SEPARATOR_START_REGEX = new RegExp("^".concat(regex_generated_1.SPACE_SEPARATOR_REGEX.source, "*"));
|
|
2445
|
+
var SPACE_SEPARATOR_END_REGEX = new RegExp("".concat(regex_generated_1.SPACE_SEPARATOR_REGEX.source, "*$"));
|
|
2446
|
+
function createLocation(start, end) {
|
|
2447
|
+
return { start: start, end: end };
|
|
2448
|
+
}
|
|
2449
|
+
var hasNativeStartsWith = !!String.prototype.startsWith;
|
|
2450
|
+
var hasNativeFromCodePoint = !!String.fromCodePoint;
|
|
2451
|
+
var hasNativeFromEntries = !!Object.fromEntries;
|
|
2452
|
+
var hasNativeCodePointAt = !!String.prototype.codePointAt;
|
|
2453
|
+
var hasTrimStart = !!String.prototype.trimStart;
|
|
2454
|
+
var hasTrimEnd = !!String.prototype.trimEnd;
|
|
2455
|
+
var hasNativeIsSafeInteger = !!Number.isSafeInteger;
|
|
2456
|
+
var isSafeInteger = hasNativeIsSafeInteger ? Number.isSafeInteger : function(n) {
|
|
2457
|
+
return typeof n === "number" && isFinite(n) && Math.floor(n) === n && Math.abs(n) <= 9007199254740991;
|
|
2458
|
+
};
|
|
2459
|
+
var REGEX_SUPPORTS_U_AND_Y = true;
|
|
2460
|
+
try {
|
|
2461
|
+
re = RE("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
2462
|
+
REGEX_SUPPORTS_U_AND_Y = ((_a = re.exec("a")) === null || _a === void 0 ? void 0 : _a[0]) === "a";
|
|
2463
|
+
} catch (_) {
|
|
2464
|
+
REGEX_SUPPORTS_U_AND_Y = false;
|
|
2465
|
+
}
|
|
2466
|
+
var re;
|
|
2467
|
+
var startsWith = hasNativeStartsWith ? function startsWith2(s, search, position) {
|
|
2468
|
+
return s.startsWith(search, position);
|
|
2469
|
+
} : function startsWith2(s, search, position) {
|
|
2470
|
+
return s.slice(position, position + search.length) === search;
|
|
2471
|
+
};
|
|
2472
|
+
var fromCodePoint = hasNativeFromCodePoint ? String.fromCodePoint : function fromCodePoint2() {
|
|
2473
|
+
var codePoints = [];
|
|
2474
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2475
|
+
codePoints[_i] = arguments[_i];
|
|
792
2476
|
}
|
|
793
|
-
var
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
2477
|
+
var elements = "";
|
|
2478
|
+
var length = codePoints.length;
|
|
2479
|
+
var i = 0;
|
|
2480
|
+
var code;
|
|
2481
|
+
while (length > i) {
|
|
2482
|
+
code = codePoints[i++];
|
|
2483
|
+
if (code > 1114111)
|
|
2484
|
+
throw RangeError(code + " is not a valid code point");
|
|
2485
|
+
elements += code < 65536 ? String.fromCharCode(code) : String.fromCharCode(((code -= 65536) >> 10) + 55296, code % 1024 + 56320);
|
|
797
2486
|
}
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
2487
|
+
return elements;
|
|
2488
|
+
};
|
|
2489
|
+
var fromEntries = hasNativeFromEntries ? Object.fromEntries : function fromEntries2(entries) {
|
|
2490
|
+
var obj = {};
|
|
2491
|
+
for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
|
|
2492
|
+
var _a2 = entries_1[_i], k = _a2[0], v = _a2[1];
|
|
2493
|
+
obj[k] = v;
|
|
802
2494
|
}
|
|
803
|
-
|
|
804
|
-
}
|
|
805
|
-
var location = createLocation(start, this.clonePosition());
|
|
806
|
-
return {
|
|
807
|
-
val: { type: TYPE.literal, value: value, location: location },
|
|
808
|
-
err: null
|
|
2495
|
+
return obj;
|
|
809
2496
|
};
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
2497
|
+
var codePointAt = hasNativeCodePointAt ? function codePointAt2(s, index) {
|
|
2498
|
+
return s.codePointAt(index);
|
|
2499
|
+
} : function codePointAt2(s, index) {
|
|
2500
|
+
var size = s.length;
|
|
2501
|
+
if (index < 0 || index >= size) {
|
|
2502
|
+
return void 0;
|
|
2503
|
+
}
|
|
2504
|
+
var first = s.charCodeAt(index);
|
|
2505
|
+
var second;
|
|
2506
|
+
return first < 55296 || first > 56319 || index + 1 === size || (second = s.charCodeAt(index + 1)) < 56320 || second > 57343 ? first : (first - 55296 << 10) + (second - 56320) + 65536;
|
|
2507
|
+
};
|
|
2508
|
+
var trimStart = hasTrimStart ? function trimStart2(s) {
|
|
2509
|
+
return s.trimStart();
|
|
2510
|
+
} : function trimStart2(s) {
|
|
2511
|
+
return s.replace(SPACE_SEPARATOR_START_REGEX, "");
|
|
2512
|
+
};
|
|
2513
|
+
var trimEnd = hasTrimEnd ? function trimEnd2(s) {
|
|
2514
|
+
return s.trimEnd();
|
|
2515
|
+
} : function trimEnd2(s) {
|
|
2516
|
+
return s.replace(SPACE_SEPARATOR_END_REGEX, "");
|
|
2517
|
+
};
|
|
2518
|
+
function RE(s, flag) {
|
|
2519
|
+
return new RegExp(s, flag);
|
|
2520
|
+
}
|
|
2521
|
+
var matchIdentifierAtIndex;
|
|
2522
|
+
if (REGEX_SUPPORTS_U_AND_Y) {
|
|
2523
|
+
IDENTIFIER_PREFIX_RE_1 = RE("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
2524
|
+
matchIdentifierAtIndex = function matchIdentifierAtIndex2(s, index) {
|
|
2525
|
+
var _a2;
|
|
2526
|
+
IDENTIFIER_PREFIX_RE_1.lastIndex = index;
|
|
2527
|
+
var match = IDENTIFIER_PREFIX_RE_1.exec(s);
|
|
2528
|
+
return (_a2 = match[1]) !== null && _a2 !== void 0 ? _a2 : "";
|
|
2529
|
+
};
|
|
2530
|
+
} else {
|
|
2531
|
+
matchIdentifierAtIndex = function matchIdentifierAtIndex2(s, index) {
|
|
2532
|
+
var match = [];
|
|
2533
|
+
while (true) {
|
|
2534
|
+
var c = codePointAt(s, index);
|
|
2535
|
+
if (c === void 0 || _isWhiteSpace(c) || _isPatternSyntax(c)) {
|
|
2536
|
+
break;
|
|
2537
|
+
}
|
|
2538
|
+
match.push(c);
|
|
2539
|
+
index += c >= 65536 ? 2 : 1;
|
|
2540
|
+
}
|
|
2541
|
+
return fromCodePoint.apply(void 0, match);
|
|
2542
|
+
};
|
|
821
2543
|
}
|
|
822
|
-
|
|
823
|
-
|
|
2544
|
+
var IDENTIFIER_PREFIX_RE_1;
|
|
2545
|
+
var Parser = function() {
|
|
2546
|
+
function Parser2(message, options) {
|
|
2547
|
+
if (options === void 0) {
|
|
2548
|
+
options = {};
|
|
2549
|
+
}
|
|
2550
|
+
this.message = message;
|
|
2551
|
+
this.position = { offset: 0, line: 1, column: 1 };
|
|
2552
|
+
this.ignoreTag = !!options.ignoreTag;
|
|
2553
|
+
this.locale = options.locale;
|
|
2554
|
+
this.requiresOtherClause = !!options.requiresOtherClause;
|
|
2555
|
+
this.shouldParseSkeletons = !!options.shouldParseSkeletons;
|
|
2556
|
+
}
|
|
2557
|
+
Parser2.prototype.parse = function() {
|
|
2558
|
+
if (this.offset() !== 0) {
|
|
2559
|
+
throw Error("parser can only be used once");
|
|
2560
|
+
}
|
|
2561
|
+
return this.parseMessage(0, "", false);
|
|
2562
|
+
};
|
|
2563
|
+
Parser2.prototype.parseMessage = function(nestingLevel, parentArgType, expectingCloseTag) {
|
|
2564
|
+
var elements = [];
|
|
2565
|
+
while (!this.isEOF()) {
|
|
2566
|
+
var char = this.char();
|
|
2567
|
+
if (char === 123) {
|
|
2568
|
+
var result = this.parseArgument(nestingLevel, expectingCloseTag);
|
|
2569
|
+
if (result.err) {
|
|
2570
|
+
return result;
|
|
2571
|
+
}
|
|
2572
|
+
elements.push(result.val);
|
|
2573
|
+
} else if (char === 125 && nestingLevel > 0) {
|
|
2574
|
+
break;
|
|
2575
|
+
} else if (char === 35 && (parentArgType === "plural" || parentArgType === "selectordinal")) {
|
|
2576
|
+
var position = this.clonePosition();
|
|
2577
|
+
this.bump();
|
|
2578
|
+
elements.push({
|
|
2579
|
+
type: types_1.TYPE.pound,
|
|
2580
|
+
location: createLocation(position, this.clonePosition())
|
|
2581
|
+
});
|
|
2582
|
+
} else if (char === 60 && !this.ignoreTag && this.peek() === 47) {
|
|
2583
|
+
if (expectingCloseTag) {
|
|
2584
|
+
break;
|
|
2585
|
+
} else {
|
|
2586
|
+
return this.error(error_1.ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(this.clonePosition(), this.clonePosition()));
|
|
2587
|
+
}
|
|
2588
|
+
} else if (char === 60 && !this.ignoreTag && _isAlpha(this.peek() || 0)) {
|
|
2589
|
+
var result = this.parseTag(nestingLevel, parentArgType);
|
|
2590
|
+
if (result.err) {
|
|
2591
|
+
return result;
|
|
2592
|
+
}
|
|
2593
|
+
elements.push(result.val);
|
|
2594
|
+
} else {
|
|
2595
|
+
var result = this.parseLiteral(nestingLevel, parentArgType);
|
|
2596
|
+
if (result.err) {
|
|
2597
|
+
return result;
|
|
2598
|
+
}
|
|
2599
|
+
elements.push(result.val);
|
|
2600
|
+
}
|
|
2601
|
+
}
|
|
2602
|
+
return { val: elements, err: null };
|
|
2603
|
+
};
|
|
2604
|
+
Parser2.prototype.parseTag = function(nestingLevel, parentArgType) {
|
|
2605
|
+
var startPosition = this.clonePosition();
|
|
824
2606
|
this.bump();
|
|
2607
|
+
var tagName = this.parseTagName();
|
|
2608
|
+
this.bumpSpace();
|
|
2609
|
+
if (this.bumpIf("/>")) {
|
|
2610
|
+
return {
|
|
2611
|
+
val: {
|
|
2612
|
+
type: types_1.TYPE.literal,
|
|
2613
|
+
value: "<".concat(tagName, "/>"),
|
|
2614
|
+
location: createLocation(startPosition, this.clonePosition())
|
|
2615
|
+
},
|
|
2616
|
+
err: null
|
|
2617
|
+
};
|
|
2618
|
+
} else if (this.bumpIf(">")) {
|
|
2619
|
+
var childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);
|
|
2620
|
+
if (childrenResult.err) {
|
|
2621
|
+
return childrenResult;
|
|
2622
|
+
}
|
|
2623
|
+
var children = childrenResult.val;
|
|
2624
|
+
var endTagStartPosition = this.clonePosition();
|
|
2625
|
+
if (this.bumpIf("</")) {
|
|
2626
|
+
if (this.isEOF() || !_isAlpha(this.char())) {
|
|
2627
|
+
return this.error(error_1.ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));
|
|
2628
|
+
}
|
|
2629
|
+
var closingTagNameStartPosition = this.clonePosition();
|
|
2630
|
+
var closingTagName = this.parseTagName();
|
|
2631
|
+
if (tagName !== closingTagName) {
|
|
2632
|
+
return this.error(error_1.ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(closingTagNameStartPosition, this.clonePosition()));
|
|
2633
|
+
}
|
|
2634
|
+
this.bumpSpace();
|
|
2635
|
+
if (!this.bumpIf(">")) {
|
|
2636
|
+
return this.error(error_1.ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));
|
|
2637
|
+
}
|
|
2638
|
+
return {
|
|
2639
|
+
val: {
|
|
2640
|
+
type: types_1.TYPE.tag,
|
|
2641
|
+
value: tagName,
|
|
2642
|
+
children: children,
|
|
2643
|
+
location: createLocation(startPosition, this.clonePosition())
|
|
2644
|
+
},
|
|
2645
|
+
err: null
|
|
2646
|
+
};
|
|
2647
|
+
} else {
|
|
2648
|
+
return this.error(error_1.ErrorKind.UNCLOSED_TAG, createLocation(startPosition, this.clonePosition()));
|
|
2649
|
+
}
|
|
2650
|
+
} else {
|
|
2651
|
+
return this.error(error_1.ErrorKind.INVALID_TAG, createLocation(startPosition, this.clonePosition()));
|
|
2652
|
+
}
|
|
2653
|
+
};
|
|
2654
|
+
Parser2.prototype.parseTagName = function() {
|
|
2655
|
+
var startOffset = this.offset();
|
|
825
2656
|
this.bump();
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
2657
|
+
while (!this.isEOF() && _isPotentialElementNameChar(this.char())) {
|
|
2658
|
+
this.bump();
|
|
2659
|
+
}
|
|
2660
|
+
return this.message.slice(startOffset, this.offset());
|
|
2661
|
+
};
|
|
2662
|
+
Parser2.prototype.parseLiteral = function(nestingLevel, parentArgType) {
|
|
2663
|
+
var start = this.clonePosition();
|
|
2664
|
+
var value = "";
|
|
2665
|
+
while (true) {
|
|
2666
|
+
var parseQuoteResult = this.tryParseQuote(parentArgType);
|
|
2667
|
+
if (parseQuoteResult) {
|
|
2668
|
+
value += parseQuoteResult;
|
|
2669
|
+
continue;
|
|
2670
|
+
}
|
|
2671
|
+
var parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);
|
|
2672
|
+
if (parseUnquotedResult) {
|
|
2673
|
+
value += parseUnquotedResult;
|
|
2674
|
+
continue;
|
|
2675
|
+
}
|
|
2676
|
+
var parseLeftAngleResult = this.tryParseLeftAngleBracket();
|
|
2677
|
+
if (parseLeftAngleResult) {
|
|
2678
|
+
value += parseLeftAngleResult;
|
|
2679
|
+
continue;
|
|
2680
|
+
}
|
|
834
2681
|
break;
|
|
835
2682
|
}
|
|
2683
|
+
var location = createLocation(start, this.clonePosition());
|
|
2684
|
+
return {
|
|
2685
|
+
val: { type: types_1.TYPE.literal, value: value, location: location },
|
|
2686
|
+
err: null
|
|
2687
|
+
};
|
|
2688
|
+
};
|
|
2689
|
+
Parser2.prototype.tryParseLeftAngleBracket = function() {
|
|
2690
|
+
if (!this.isEOF() && this.char() === 60 && (this.ignoreTag || !_isAlphaOrSlash(this.peek() || 0))) {
|
|
2691
|
+
this.bump();
|
|
2692
|
+
return "<";
|
|
2693
|
+
}
|
|
836
2694
|
return null;
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
2695
|
+
};
|
|
2696
|
+
Parser2.prototype.tryParseQuote = function(parentArgType) {
|
|
2697
|
+
if (this.isEOF() || this.char() !== 39) {
|
|
2698
|
+
return null;
|
|
2699
|
+
}
|
|
2700
|
+
switch (this.peek()) {
|
|
2701
|
+
case 39:
|
|
2702
|
+
this.bump();
|
|
2703
|
+
this.bump();
|
|
2704
|
+
return "'";
|
|
2705
|
+
case 123:
|
|
2706
|
+
case 60:
|
|
2707
|
+
case 62:
|
|
2708
|
+
case 125:
|
|
2709
|
+
break;
|
|
2710
|
+
case 35:
|
|
2711
|
+
if (parentArgType === "plural" || parentArgType === "selectordinal") {
|
|
2712
|
+
break;
|
|
2713
|
+
}
|
|
2714
|
+
return null;
|
|
2715
|
+
default:
|
|
2716
|
+
return null;
|
|
2717
|
+
}
|
|
2718
|
+
this.bump();
|
|
2719
|
+
var codePoints = [this.char()];
|
|
2720
|
+
this.bump();
|
|
2721
|
+
while (!this.isEOF()) {
|
|
2722
|
+
var ch = this.char();
|
|
2723
|
+
if (ch === 39) {
|
|
2724
|
+
if (this.peek() === 39) {
|
|
2725
|
+
codePoints.push(39);
|
|
2726
|
+
this.bump();
|
|
2727
|
+
} else {
|
|
2728
|
+
this.bump();
|
|
2729
|
+
break;
|
|
2730
|
+
}
|
|
2731
|
+
} else {
|
|
2732
|
+
codePoints.push(ch);
|
|
2733
|
+
}
|
|
848
2734
|
this.bump();
|
|
2735
|
+
}
|
|
2736
|
+
return fromCodePoint.apply(void 0, codePoints);
|
|
2737
|
+
};
|
|
2738
|
+
Parser2.prototype.tryParseUnquoted = function(nestingLevel, parentArgType) {
|
|
2739
|
+
if (this.isEOF()) {
|
|
2740
|
+
return null;
|
|
2741
|
+
}
|
|
2742
|
+
var ch = this.char();
|
|
2743
|
+
if (ch === 60 || ch === 123 || ch === 35 && (parentArgType === "plural" || parentArgType === "selectordinal") || ch === 125 && nestingLevel > 0) {
|
|
2744
|
+
return null;
|
|
849
2745
|
} else {
|
|
850
2746
|
this.bump();
|
|
851
|
-
|
|
2747
|
+
return fromCodePoint(ch);
|
|
852
2748
|
}
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
this.bump();
|
|
857
|
-
}
|
|
858
|
-
return fromCodePoint.apply(void 0, codePoints);
|
|
859
|
-
};
|
|
860
|
-
Parser2.prototype.tryParseUnquoted = function(nestingLevel, parentArgType) {
|
|
861
|
-
if (this.isEOF()) {
|
|
862
|
-
return null;
|
|
863
|
-
}
|
|
864
|
-
var ch = this.char();
|
|
865
|
-
if (ch === 60 || ch === 123 || ch === 35 && (parentArgType === "plural" || parentArgType === "selectordinal") || ch === 125 && nestingLevel > 0) {
|
|
866
|
-
return null;
|
|
867
|
-
} else {
|
|
868
|
-
this.bump();
|
|
869
|
-
return fromCodePoint(ch);
|
|
870
|
-
}
|
|
871
|
-
};
|
|
872
|
-
Parser2.prototype.parseArgument = function(nestingLevel, expectingCloseTag) {
|
|
873
|
-
var openingBracePosition = this.clonePosition();
|
|
874
|
-
this.bump();
|
|
875
|
-
this.bumpSpace();
|
|
876
|
-
if (this.isEOF()) {
|
|
877
|
-
return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
|
|
878
|
-
}
|
|
879
|
-
if (this.char() === 125) {
|
|
880
|
-
this.bump();
|
|
881
|
-
return this.error(ErrorKind.EMPTY_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
|
|
882
|
-
}
|
|
883
|
-
var value = this.parseIdentifierIfPossible().value;
|
|
884
|
-
if (!value) {
|
|
885
|
-
return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
|
|
886
|
-
}
|
|
887
|
-
this.bumpSpace();
|
|
888
|
-
if (this.isEOF()) {
|
|
889
|
-
return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
|
|
890
|
-
}
|
|
891
|
-
switch (this.char()) {
|
|
892
|
-
case 125: {
|
|
893
|
-
this.bump();
|
|
894
|
-
return {
|
|
895
|
-
val: {
|
|
896
|
-
type: TYPE.argument,
|
|
897
|
-
value: value,
|
|
898
|
-
location: createLocation(openingBracePosition, this.clonePosition())
|
|
899
|
-
},
|
|
900
|
-
err: null
|
|
901
|
-
};
|
|
902
|
-
}
|
|
903
|
-
case 44: {
|
|
2749
|
+
};
|
|
2750
|
+
Parser2.prototype.parseArgument = function(nestingLevel, expectingCloseTag) {
|
|
2751
|
+
var openingBracePosition = this.clonePosition();
|
|
904
2752
|
this.bump();
|
|
905
2753
|
this.bumpSpace();
|
|
906
2754
|
if (this.isEOF()) {
|
|
907
|
-
return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
|
|
2755
|
+
return this.error(error_1.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
|
|
2756
|
+
}
|
|
2757
|
+
if (this.char() === 125) {
|
|
2758
|
+
this.bump();
|
|
2759
|
+
return this.error(error_1.ErrorKind.EMPTY_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
|
|
2760
|
+
}
|
|
2761
|
+
var value = this.parseIdentifierIfPossible().value;
|
|
2762
|
+
if (!value) {
|
|
2763
|
+
return this.error(error_1.ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
|
|
2764
|
+
}
|
|
2765
|
+
this.bumpSpace();
|
|
2766
|
+
if (this.isEOF()) {
|
|
2767
|
+
return this.error(error_1.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
|
|
908
2768
|
}
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
|
|
913
|
-
}
|
|
914
|
-
};
|
|
915
|
-
Parser2.prototype.parseIdentifierIfPossible = function() {
|
|
916
|
-
var startingPosition = this.clonePosition();
|
|
917
|
-
var startOffset = this.offset();
|
|
918
|
-
var value = matchIdentifierAtIndex(this.message, startOffset);
|
|
919
|
-
var endOffset = startOffset + value.length;
|
|
920
|
-
this.bumpTo(endOffset);
|
|
921
|
-
var endPosition = this.clonePosition();
|
|
922
|
-
var location = createLocation(startingPosition, endPosition);
|
|
923
|
-
return { value: value, location: location };
|
|
924
|
-
};
|
|
925
|
-
Parser2.prototype.parseArgumentOptions = function(nestingLevel, expectingCloseTag, value, openingBracePosition) {
|
|
926
|
-
var _a2;
|
|
927
|
-
var typeStartPosition = this.clonePosition();
|
|
928
|
-
var argType = this.parseIdentifierIfPossible().value;
|
|
929
|
-
var typeEndPosition = this.clonePosition();
|
|
930
|
-
switch (argType) {
|
|
931
|
-
case "":
|
|
932
|
-
return this.error(ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
|
|
933
|
-
case "number":
|
|
934
|
-
case "date":
|
|
935
|
-
case "time": {
|
|
936
|
-
this.bumpSpace();
|
|
937
|
-
var styleAndLocation = null;
|
|
938
|
-
if (this.bumpIf(",")) {
|
|
939
|
-
this.bumpSpace();
|
|
940
|
-
var styleStartPosition = this.clonePosition();
|
|
941
|
-
var result = this.parseSimpleArgStyleIfPossible();
|
|
942
|
-
if (result.err) {
|
|
943
|
-
return result;
|
|
944
|
-
}
|
|
945
|
-
var style = trimEnd(result.val);
|
|
946
|
-
if (style.length === 0) {
|
|
947
|
-
return this.error(ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition()));
|
|
948
|
-
}
|
|
949
|
-
var styleLocation = createLocation(styleStartPosition, this.clonePosition());
|
|
950
|
-
styleAndLocation = { style: style, styleLocation: styleLocation };
|
|
951
|
-
}
|
|
952
|
-
var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
|
|
953
|
-
if (argCloseResult.err) {
|
|
954
|
-
return argCloseResult;
|
|
955
|
-
}
|
|
956
|
-
var location_1 = createLocation(openingBracePosition, this.clonePosition());
|
|
957
|
-
if (styleAndLocation && startsWith(styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style, "::", 0)) {
|
|
958
|
-
var skeleton = trimStart(styleAndLocation.style.slice(2));
|
|
959
|
-
if (argType === "number") {
|
|
960
|
-
var result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);
|
|
961
|
-
if (result.err) {
|
|
962
|
-
return result;
|
|
963
|
-
}
|
|
2769
|
+
switch (this.char()) {
|
|
2770
|
+
case 125: {
|
|
2771
|
+
this.bump();
|
|
964
2772
|
return {
|
|
965
|
-
val: {
|
|
2773
|
+
val: {
|
|
2774
|
+
type: types_1.TYPE.argument,
|
|
2775
|
+
value: value,
|
|
2776
|
+
location: createLocation(openingBracePosition, this.clonePosition())
|
|
2777
|
+
},
|
|
966
2778
|
err: null
|
|
967
2779
|
};
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
|
|
2780
|
+
}
|
|
2781
|
+
case 44: {
|
|
2782
|
+
this.bump();
|
|
2783
|
+
this.bumpSpace();
|
|
2784
|
+
if (this.isEOF()) {
|
|
2785
|
+
return this.error(error_1.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
|
|
2786
|
+
}
|
|
2787
|
+
return this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition);
|
|
2788
|
+
}
|
|
2789
|
+
default:
|
|
2790
|
+
return this.error(error_1.ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
|
|
2791
|
+
}
|
|
2792
|
+
};
|
|
2793
|
+
Parser2.prototype.parseIdentifierIfPossible = function() {
|
|
2794
|
+
var startingPosition = this.clonePosition();
|
|
2795
|
+
var startOffset = this.offset();
|
|
2796
|
+
var value = matchIdentifierAtIndex(this.message, startOffset);
|
|
2797
|
+
var endOffset = startOffset + value.length;
|
|
2798
|
+
this.bumpTo(endOffset);
|
|
2799
|
+
var endPosition = this.clonePosition();
|
|
2800
|
+
var location = createLocation(startingPosition, endPosition);
|
|
2801
|
+
return { value: value, location: location };
|
|
2802
|
+
};
|
|
2803
|
+
Parser2.prototype.parseArgumentOptions = function(nestingLevel, expectingCloseTag, value, openingBracePosition) {
|
|
2804
|
+
var _a2;
|
|
2805
|
+
var typeStartPosition = this.clonePosition();
|
|
2806
|
+
var argType = this.parseIdentifierIfPossible().value;
|
|
2807
|
+
var typeEndPosition = this.clonePosition();
|
|
2808
|
+
switch (argType) {
|
|
2809
|
+
case "":
|
|
2810
|
+
return this.error(error_1.ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
|
|
2811
|
+
case "number":
|
|
2812
|
+
case "date":
|
|
2813
|
+
case "time": {
|
|
2814
|
+
this.bumpSpace();
|
|
2815
|
+
var styleAndLocation = null;
|
|
2816
|
+
if (this.bumpIf(",")) {
|
|
2817
|
+
this.bumpSpace();
|
|
2818
|
+
var styleStartPosition = this.clonePosition();
|
|
2819
|
+
var result = this.parseSimpleArgStyleIfPossible();
|
|
2820
|
+
if (result.err) {
|
|
2821
|
+
return result;
|
|
2822
|
+
}
|
|
2823
|
+
var style = trimEnd(result.val);
|
|
2824
|
+
if (style.length === 0) {
|
|
2825
|
+
return this.error(error_1.ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition()));
|
|
2826
|
+
}
|
|
2827
|
+
var styleLocation = createLocation(styleStartPosition, this.clonePosition());
|
|
2828
|
+
styleAndLocation = { style: style, styleLocation: styleLocation };
|
|
2829
|
+
}
|
|
2830
|
+
var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
|
|
2831
|
+
if (argCloseResult.err) {
|
|
2832
|
+
return argCloseResult;
|
|
2833
|
+
}
|
|
2834
|
+
var location_1 = createLocation(openingBracePosition, this.clonePosition());
|
|
2835
|
+
if (styleAndLocation && startsWith(styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style, "::", 0)) {
|
|
2836
|
+
var skeleton = trimStart(styleAndLocation.style.slice(2));
|
|
2837
|
+
if (argType === "number") {
|
|
2838
|
+
var result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);
|
|
2839
|
+
if (result.err) {
|
|
2840
|
+
return result;
|
|
2841
|
+
}
|
|
2842
|
+
return {
|
|
2843
|
+
val: { type: types_1.TYPE.number, value: value, location: location_1, style: result.val },
|
|
2844
|
+
err: null
|
|
2845
|
+
};
|
|
2846
|
+
} else {
|
|
2847
|
+
if (skeleton.length === 0) {
|
|
2848
|
+
return this.error(error_1.ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1);
|
|
2849
|
+
}
|
|
2850
|
+
var dateTimePattern = skeleton;
|
|
2851
|
+
if (this.locale) {
|
|
2852
|
+
dateTimePattern = (0, date_time_pattern_generator_1.getBestPattern)(skeleton, this.locale);
|
|
2853
|
+
}
|
|
2854
|
+
var style = {
|
|
2855
|
+
type: types_1.SKELETON_TYPE.dateTime,
|
|
2856
|
+
pattern: dateTimePattern,
|
|
2857
|
+
location: styleAndLocation.styleLocation,
|
|
2858
|
+
parsedOptions: this.shouldParseSkeletons ? (0, icu_skeleton_parser_1.parseDateTimeSkeleton)(dateTimePattern) : {}
|
|
2859
|
+
};
|
|
2860
|
+
var type = argType === "date" ? types_1.TYPE.date : types_1.TYPE.time;
|
|
2861
|
+
return {
|
|
2862
|
+
val: { type: type, value: value, location: location_1, style: style },
|
|
2863
|
+
err: null
|
|
2864
|
+
};
|
|
2865
|
+
}
|
|
971
2866
|
}
|
|
972
|
-
var style = {
|
|
973
|
-
type: SKELETON_TYPE.dateTime,
|
|
974
|
-
pattern: skeleton,
|
|
975
|
-
location: styleAndLocation.styleLocation,
|
|
976
|
-
parsedOptions: this.shouldParseSkeletons ? parseDateTimeSkeleton(skeleton) : {}
|
|
977
|
-
};
|
|
978
|
-
var type = argType === "date" ? TYPE.date : TYPE.time;
|
|
979
2867
|
return {
|
|
980
|
-
val: {
|
|
2868
|
+
val: {
|
|
2869
|
+
type: argType === "number" ? types_1.TYPE.number : argType === "date" ? types_1.TYPE.date : types_1.TYPE.time,
|
|
2870
|
+
value: value,
|
|
2871
|
+
location: location_1,
|
|
2872
|
+
style: (_a2 = styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style) !== null && _a2 !== void 0 ? _a2 : null
|
|
2873
|
+
},
|
|
981
2874
|
err: null
|
|
982
2875
|
};
|
|
983
2876
|
}
|
|
2877
|
+
case "plural":
|
|
2878
|
+
case "selectordinal":
|
|
2879
|
+
case "select": {
|
|
2880
|
+
var typeEndPosition_1 = this.clonePosition();
|
|
2881
|
+
this.bumpSpace();
|
|
2882
|
+
if (!this.bumpIf(",")) {
|
|
2883
|
+
return this.error(error_1.ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(typeEndPosition_1, (0, tslib_1.__assign)({}, typeEndPosition_1)));
|
|
2884
|
+
}
|
|
2885
|
+
this.bumpSpace();
|
|
2886
|
+
var identifierAndLocation = this.parseIdentifierIfPossible();
|
|
2887
|
+
var pluralOffset = 0;
|
|
2888
|
+
if (argType !== "select" && identifierAndLocation.value === "offset") {
|
|
2889
|
+
if (!this.bumpIf(":")) {
|
|
2890
|
+
return this.error(error_1.ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation(this.clonePosition(), this.clonePosition()));
|
|
2891
|
+
}
|
|
2892
|
+
this.bumpSpace();
|
|
2893
|
+
var result = this.tryParseDecimalInteger(error_1.ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, error_1.ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
|
|
2894
|
+
if (result.err) {
|
|
2895
|
+
return result;
|
|
2896
|
+
}
|
|
2897
|
+
this.bumpSpace();
|
|
2898
|
+
identifierAndLocation = this.parseIdentifierIfPossible();
|
|
2899
|
+
pluralOffset = result.val;
|
|
2900
|
+
}
|
|
2901
|
+
var optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);
|
|
2902
|
+
if (optionsResult.err) {
|
|
2903
|
+
return optionsResult;
|
|
2904
|
+
}
|
|
2905
|
+
var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
|
|
2906
|
+
if (argCloseResult.err) {
|
|
2907
|
+
return argCloseResult;
|
|
2908
|
+
}
|
|
2909
|
+
var location_2 = createLocation(openingBracePosition, this.clonePosition());
|
|
2910
|
+
if (argType === "select") {
|
|
2911
|
+
return {
|
|
2912
|
+
val: {
|
|
2913
|
+
type: types_1.TYPE.select,
|
|
2914
|
+
value: value,
|
|
2915
|
+
options: fromEntries(optionsResult.val),
|
|
2916
|
+
location: location_2
|
|
2917
|
+
},
|
|
2918
|
+
err: null
|
|
2919
|
+
};
|
|
2920
|
+
} else {
|
|
2921
|
+
return {
|
|
2922
|
+
val: {
|
|
2923
|
+
type: types_1.TYPE.plural,
|
|
2924
|
+
value: value,
|
|
2925
|
+
options: fromEntries(optionsResult.val),
|
|
2926
|
+
offset: pluralOffset,
|
|
2927
|
+
pluralType: argType === "plural" ? "cardinal" : "ordinal",
|
|
2928
|
+
location: location_2
|
|
2929
|
+
},
|
|
2930
|
+
err: null
|
|
2931
|
+
};
|
|
2932
|
+
}
|
|
2933
|
+
}
|
|
2934
|
+
default:
|
|
2935
|
+
return this.error(error_1.ErrorKind.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
|
|
2936
|
+
}
|
|
2937
|
+
};
|
|
2938
|
+
Parser2.prototype.tryParseArgumentClose = function(openingBracePosition) {
|
|
2939
|
+
if (this.isEOF() || this.char() !== 125) {
|
|
2940
|
+
return this.error(error_1.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
|
|
2941
|
+
}
|
|
2942
|
+
this.bump();
|
|
2943
|
+
return { val: true, err: null };
|
|
2944
|
+
};
|
|
2945
|
+
Parser2.prototype.parseSimpleArgStyleIfPossible = function() {
|
|
2946
|
+
var nestedBraces = 0;
|
|
2947
|
+
var startPosition = this.clonePosition();
|
|
2948
|
+
while (!this.isEOF()) {
|
|
2949
|
+
var ch = this.char();
|
|
2950
|
+
switch (ch) {
|
|
2951
|
+
case 39: {
|
|
2952
|
+
this.bump();
|
|
2953
|
+
var apostrophePosition = this.clonePosition();
|
|
2954
|
+
if (!this.bumpUntil("'")) {
|
|
2955
|
+
return this.error(error_1.ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation(apostrophePosition, this.clonePosition()));
|
|
2956
|
+
}
|
|
2957
|
+
this.bump();
|
|
2958
|
+
break;
|
|
2959
|
+
}
|
|
2960
|
+
case 123: {
|
|
2961
|
+
nestedBraces += 1;
|
|
2962
|
+
this.bump();
|
|
2963
|
+
break;
|
|
2964
|
+
}
|
|
2965
|
+
case 125: {
|
|
2966
|
+
if (nestedBraces > 0) {
|
|
2967
|
+
nestedBraces -= 1;
|
|
2968
|
+
} else {
|
|
2969
|
+
return {
|
|
2970
|
+
val: this.message.slice(startPosition.offset, this.offset()),
|
|
2971
|
+
err: null
|
|
2972
|
+
};
|
|
2973
|
+
}
|
|
2974
|
+
break;
|
|
2975
|
+
}
|
|
2976
|
+
default:
|
|
2977
|
+
this.bump();
|
|
2978
|
+
break;
|
|
2979
|
+
}
|
|
2980
|
+
}
|
|
2981
|
+
return {
|
|
2982
|
+
val: this.message.slice(startPosition.offset, this.offset()),
|
|
2983
|
+
err: null
|
|
2984
|
+
};
|
|
2985
|
+
};
|
|
2986
|
+
Parser2.prototype.parseNumberSkeletonFromString = function(skeleton, location) {
|
|
2987
|
+
var tokens = [];
|
|
2988
|
+
try {
|
|
2989
|
+
tokens = (0, icu_skeleton_parser_1.parseNumberSkeletonFromString)(skeleton);
|
|
2990
|
+
} catch (e) {
|
|
2991
|
+
return this.error(error_1.ErrorKind.INVALID_NUMBER_SKELETON, location);
|
|
984
2992
|
}
|
|
985
2993
|
return {
|
|
986
2994
|
val: {
|
|
987
|
-
type:
|
|
988
|
-
|
|
989
|
-
location:
|
|
990
|
-
|
|
2995
|
+
type: types_1.SKELETON_TYPE.number,
|
|
2996
|
+
tokens: tokens,
|
|
2997
|
+
location: location,
|
|
2998
|
+
parsedOptions: this.shouldParseSkeletons ? (0, icu_skeleton_parser_1.parseNumberSkeleton)(tokens) : {}
|
|
991
2999
|
},
|
|
992
3000
|
err: null
|
|
993
3001
|
};
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
var
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
3002
|
+
};
|
|
3003
|
+
Parser2.prototype.tryParsePluralOrSelectOptions = function(nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {
|
|
3004
|
+
var _a2;
|
|
3005
|
+
var hasOtherClause = false;
|
|
3006
|
+
var options = [];
|
|
3007
|
+
var parsedSelectors = /* @__PURE__ */ new Set();
|
|
3008
|
+
var selector = parsedFirstIdentifier.value, selectorLocation = parsedFirstIdentifier.location;
|
|
3009
|
+
while (true) {
|
|
3010
|
+
if (selector.length === 0) {
|
|
3011
|
+
var startPosition = this.clonePosition();
|
|
3012
|
+
if (parentArgType !== "select" && this.bumpIf("=")) {
|
|
3013
|
+
var result = this.tryParseDecimalInteger(error_1.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, error_1.ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);
|
|
3014
|
+
if (result.err) {
|
|
3015
|
+
return result;
|
|
3016
|
+
}
|
|
3017
|
+
selectorLocation = createLocation(startPosition, this.clonePosition());
|
|
3018
|
+
selector = this.message.slice(startPosition.offset, this.offset());
|
|
3019
|
+
} else {
|
|
3020
|
+
break;
|
|
3021
|
+
}
|
|
3022
|
+
}
|
|
3023
|
+
if (parsedSelectors.has(selector)) {
|
|
3024
|
+
return this.error(parentArgType === "select" ? error_1.ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR : error_1.ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, selectorLocation);
|
|
3025
|
+
}
|
|
3026
|
+
if (selector === "other") {
|
|
3027
|
+
hasOtherClause = true;
|
|
1009
3028
|
}
|
|
1010
3029
|
this.bumpSpace();
|
|
1011
|
-
var
|
|
1012
|
-
if (
|
|
1013
|
-
return
|
|
3030
|
+
var openingBracePosition = this.clonePosition();
|
|
3031
|
+
if (!this.bumpIf("{")) {
|
|
3032
|
+
return this.error(parentArgType === "select" ? error_1.ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : error_1.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation(this.clonePosition(), this.clonePosition()));
|
|
1014
3033
|
}
|
|
3034
|
+
var fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);
|
|
3035
|
+
if (fragmentResult.err) {
|
|
3036
|
+
return fragmentResult;
|
|
3037
|
+
}
|
|
3038
|
+
var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
|
|
3039
|
+
if (argCloseResult.err) {
|
|
3040
|
+
return argCloseResult;
|
|
3041
|
+
}
|
|
3042
|
+
options.push([
|
|
3043
|
+
selector,
|
|
3044
|
+
{
|
|
3045
|
+
value: fragmentResult.val,
|
|
3046
|
+
location: createLocation(openingBracePosition, this.clonePosition())
|
|
3047
|
+
}
|
|
3048
|
+
]);
|
|
3049
|
+
parsedSelectors.add(selector);
|
|
1015
3050
|
this.bumpSpace();
|
|
1016
|
-
|
|
1017
|
-
pluralOffset = result.val;
|
|
3051
|
+
_a2 = this.parseIdentifierIfPossible(), selector = _a2.value, selectorLocation = _a2.location;
|
|
1018
3052
|
}
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
return optionsResult;
|
|
3053
|
+
if (options.length === 0) {
|
|
3054
|
+
return this.error(parentArgType === "select" ? error_1.ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR : error_1.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition()));
|
|
1022
3055
|
}
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
return argCloseResult;
|
|
3056
|
+
if (this.requiresOtherClause && !hasOtherClause) {
|
|
3057
|
+
return this.error(error_1.ErrorKind.MISSING_OTHER_CLAUSE, createLocation(this.clonePosition(), this.clonePosition()));
|
|
1026
3058
|
}
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
},
|
|
1036
|
-
err: null
|
|
1037
|
-
};
|
|
1038
|
-
} else {
|
|
1039
|
-
return {
|
|
1040
|
-
val: {
|
|
1041
|
-
type: TYPE.plural,
|
|
1042
|
-
value: value,
|
|
1043
|
-
options: fromEntries(optionsResult.val),
|
|
1044
|
-
offset: pluralOffset,
|
|
1045
|
-
pluralType: argType === "plural" ? "cardinal" : "ordinal",
|
|
1046
|
-
location: location_2
|
|
1047
|
-
},
|
|
1048
|
-
err: null
|
|
1049
|
-
};
|
|
3059
|
+
return { val: options, err: null };
|
|
3060
|
+
};
|
|
3061
|
+
Parser2.prototype.tryParseDecimalInteger = function(expectNumberError, invalidNumberError) {
|
|
3062
|
+
var sign = 1;
|
|
3063
|
+
var startingPosition = this.clonePosition();
|
|
3064
|
+
if (this.bumpIf("+")) {
|
|
3065
|
+
} else if (this.bumpIf("-")) {
|
|
3066
|
+
sign = -1;
|
|
1050
3067
|
}
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
return { val: true, err: null };
|
|
1062
|
-
};
|
|
1063
|
-
Parser2.prototype.parseSimpleArgStyleIfPossible = function() {
|
|
1064
|
-
var nestedBraces = 0;
|
|
1065
|
-
var startPosition = this.clonePosition();
|
|
1066
|
-
while (!this.isEOF()) {
|
|
1067
|
-
var ch = this.char();
|
|
1068
|
-
switch (ch) {
|
|
1069
|
-
case 39: {
|
|
1070
|
-
this.bump();
|
|
1071
|
-
var apostrophePosition = this.clonePosition();
|
|
1072
|
-
if (!this.bumpUntil("'")) {
|
|
1073
|
-
return this.error(ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation(apostrophePosition, this.clonePosition()));
|
|
3068
|
+
var hasDigits = false;
|
|
3069
|
+
var decimal = 0;
|
|
3070
|
+
while (!this.isEOF()) {
|
|
3071
|
+
var ch = this.char();
|
|
3072
|
+
if (ch >= 48 && ch <= 57) {
|
|
3073
|
+
hasDigits = true;
|
|
3074
|
+
decimal = decimal * 10 + (ch - 48);
|
|
3075
|
+
this.bump();
|
|
3076
|
+
} else {
|
|
3077
|
+
break;
|
|
1074
3078
|
}
|
|
1075
|
-
this.bump();
|
|
1076
|
-
break;
|
|
1077
3079
|
}
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
this.
|
|
1081
|
-
break;
|
|
3080
|
+
var location = createLocation(startingPosition, this.clonePosition());
|
|
3081
|
+
if (!hasDigits) {
|
|
3082
|
+
return this.error(expectNumberError, location);
|
|
1082
3083
|
}
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
3084
|
+
decimal *= sign;
|
|
3085
|
+
if (!isSafeInteger(decimal)) {
|
|
3086
|
+
return this.error(invalidNumberError, location);
|
|
3087
|
+
}
|
|
3088
|
+
return { val: decimal, err: null };
|
|
3089
|
+
};
|
|
3090
|
+
Parser2.prototype.offset = function() {
|
|
3091
|
+
return this.position.offset;
|
|
3092
|
+
};
|
|
3093
|
+
Parser2.prototype.isEOF = function() {
|
|
3094
|
+
return this.offset() === this.message.length;
|
|
3095
|
+
};
|
|
3096
|
+
Parser2.prototype.clonePosition = function() {
|
|
3097
|
+
return {
|
|
3098
|
+
offset: this.position.offset,
|
|
3099
|
+
line: this.position.line,
|
|
3100
|
+
column: this.position.column
|
|
3101
|
+
};
|
|
3102
|
+
};
|
|
3103
|
+
Parser2.prototype.char = function() {
|
|
3104
|
+
var offset = this.position.offset;
|
|
3105
|
+
if (offset >= this.message.length) {
|
|
3106
|
+
throw Error("out of bound");
|
|
3107
|
+
}
|
|
3108
|
+
var code = codePointAt(this.message, offset);
|
|
3109
|
+
if (code === void 0) {
|
|
3110
|
+
throw Error("Offset ".concat(offset, " is at invalid UTF-16 code unit boundary"));
|
|
3111
|
+
}
|
|
3112
|
+
return code;
|
|
3113
|
+
};
|
|
3114
|
+
Parser2.prototype.error = function(kind, location) {
|
|
3115
|
+
return {
|
|
3116
|
+
val: null,
|
|
3117
|
+
err: {
|
|
3118
|
+
kind: kind,
|
|
3119
|
+
message: this.message,
|
|
3120
|
+
location: location
|
|
1091
3121
|
}
|
|
1092
|
-
|
|
3122
|
+
};
|
|
3123
|
+
};
|
|
3124
|
+
Parser2.prototype.bump = function() {
|
|
3125
|
+
if (this.isEOF()) {
|
|
3126
|
+
return;
|
|
1093
3127
|
}
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
} catch (e) {
|
|
1109
|
-
return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location);
|
|
1110
|
-
}
|
|
1111
|
-
return {
|
|
1112
|
-
val: {
|
|
1113
|
-
type: SKELETON_TYPE.number,
|
|
1114
|
-
tokens: tokens,
|
|
1115
|
-
location: location,
|
|
1116
|
-
parsedOptions: this.shouldParseSkeletons ? parseNumberSkeleton(tokens) : {}
|
|
1117
|
-
},
|
|
1118
|
-
err: null
|
|
1119
|
-
};
|
|
1120
|
-
};
|
|
1121
|
-
Parser2.prototype.tryParsePluralOrSelectOptions = function(nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {
|
|
1122
|
-
var _a2;
|
|
1123
|
-
var hasOtherClause = false;
|
|
1124
|
-
var options = [];
|
|
1125
|
-
var parsedSelectors = /* @__PURE__ */ new Set();
|
|
1126
|
-
var selector = parsedFirstIdentifier.value, selectorLocation = parsedFirstIdentifier.location;
|
|
1127
|
-
while (true) {
|
|
1128
|
-
if (selector.length === 0) {
|
|
1129
|
-
var startPosition = this.clonePosition();
|
|
1130
|
-
if (parentArgType !== "select" && this.bumpIf("=")) {
|
|
1131
|
-
var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);
|
|
1132
|
-
if (result.err) {
|
|
1133
|
-
return result;
|
|
3128
|
+
var code = this.char();
|
|
3129
|
+
if (code === 10) {
|
|
3130
|
+
this.position.line += 1;
|
|
3131
|
+
this.position.column = 1;
|
|
3132
|
+
this.position.offset += 1;
|
|
3133
|
+
} else {
|
|
3134
|
+
this.position.column += 1;
|
|
3135
|
+
this.position.offset += code < 65536 ? 1 : 2;
|
|
3136
|
+
}
|
|
3137
|
+
};
|
|
3138
|
+
Parser2.prototype.bumpIf = function(prefix) {
|
|
3139
|
+
if (startsWith(this.message, prefix, this.offset())) {
|
|
3140
|
+
for (var i = 0; i < prefix.length; i++) {
|
|
3141
|
+
this.bump();
|
|
1134
3142
|
}
|
|
1135
|
-
|
|
1136
|
-
|
|
3143
|
+
return true;
|
|
3144
|
+
}
|
|
3145
|
+
return false;
|
|
3146
|
+
};
|
|
3147
|
+
Parser2.prototype.bumpUntil = function(pattern) {
|
|
3148
|
+
var currentOffset = this.offset();
|
|
3149
|
+
var index = this.message.indexOf(pattern, currentOffset);
|
|
3150
|
+
if (index >= 0) {
|
|
3151
|
+
this.bumpTo(index);
|
|
3152
|
+
return true;
|
|
1137
3153
|
} else {
|
|
1138
|
-
|
|
3154
|
+
this.bumpTo(this.message.length);
|
|
3155
|
+
return false;
|
|
1139
3156
|
}
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
3157
|
+
};
|
|
3158
|
+
Parser2.prototype.bumpTo = function(targetOffset) {
|
|
3159
|
+
if (this.offset() > targetOffset) {
|
|
3160
|
+
throw Error("targetOffset ".concat(targetOffset, " must be greater than or equal to the current offset ").concat(this.offset()));
|
|
3161
|
+
}
|
|
3162
|
+
targetOffset = Math.min(targetOffset, this.message.length);
|
|
3163
|
+
while (true) {
|
|
3164
|
+
var offset = this.offset();
|
|
3165
|
+
if (offset === targetOffset) {
|
|
3166
|
+
break;
|
|
3167
|
+
}
|
|
3168
|
+
if (offset > targetOffset) {
|
|
3169
|
+
throw Error("targetOffset ".concat(targetOffset, " is at invalid UTF-16 code unit boundary"));
|
|
3170
|
+
}
|
|
3171
|
+
this.bump();
|
|
3172
|
+
if (this.isEOF()) {
|
|
3173
|
+
break;
|
|
3174
|
+
}
|
|
3175
|
+
}
|
|
3176
|
+
};
|
|
3177
|
+
Parser2.prototype.bumpSpace = function() {
|
|
3178
|
+
while (!this.isEOF() && _isWhiteSpace(this.char())) {
|
|
3179
|
+
this.bump();
|
|
3180
|
+
}
|
|
3181
|
+
};
|
|
3182
|
+
Parser2.prototype.peek = function() {
|
|
3183
|
+
if (this.isEOF()) {
|
|
3184
|
+
return null;
|
|
3185
|
+
}
|
|
3186
|
+
var code = this.char();
|
|
3187
|
+
var offset = this.offset();
|
|
3188
|
+
var nextCode = this.message.charCodeAt(offset + (code >= 65536 ? 2 : 1));
|
|
3189
|
+
return nextCode !== null && nextCode !== void 0 ? nextCode : null;
|
|
3190
|
+
};
|
|
3191
|
+
return Parser2;
|
|
3192
|
+
}();
|
|
3193
|
+
exports.Parser = Parser;
|
|
3194
|
+
function _isAlpha(codepoint) {
|
|
3195
|
+
return codepoint >= 97 && codepoint <= 122 || codepoint >= 65 && codepoint <= 90;
|
|
1170
3196
|
}
|
|
1171
|
-
|
|
1172
|
-
return
|
|
3197
|
+
function _isAlphaOrSlash(codepoint) {
|
|
3198
|
+
return _isAlpha(codepoint) || codepoint === 47;
|
|
1173
3199
|
}
|
|
1174
|
-
|
|
1175
|
-
return
|
|
3200
|
+
function _isPotentialElementNameChar(c) {
|
|
3201
|
+
return c === 45 || c === 46 || c >= 48 && c <= 57 || c === 95 || c >= 97 && c <= 122 || c >= 65 && c <= 90 || c == 183 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 893 || c >= 895 && c <= 8191 || c >= 8204 && c <= 8205 || c >= 8255 && c <= 8256 || c >= 8304 && c <= 8591 || c >= 11264 && c <= 12271 || c >= 12289 && c <= 55295 || c >= 63744 && c <= 64975 || c >= 65008 && c <= 65533 || c >= 65536 && c <= 983039;
|
|
1176
3202
|
}
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
Parser2.prototype.tryParseDecimalInteger = function(expectNumberError, invalidNumberError) {
|
|
1180
|
-
var sign = 1;
|
|
1181
|
-
var startingPosition = this.clonePosition();
|
|
1182
|
-
if (this.bumpIf("+")) {
|
|
1183
|
-
} else if (this.bumpIf("-")) {
|
|
1184
|
-
sign = -1;
|
|
3203
|
+
function _isWhiteSpace(c) {
|
|
3204
|
+
return c >= 9 && c <= 13 || c === 32 || c === 133 || c >= 8206 && c <= 8207 || c === 8232 || c === 8233;
|
|
1185
3205
|
}
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
while (!this.isEOF()) {
|
|
1189
|
-
var ch = this.char();
|
|
1190
|
-
if (ch >= 48 && ch <= 57) {
|
|
1191
|
-
hasDigits = true;
|
|
1192
|
-
decimal = decimal * 10 + (ch - 48);
|
|
1193
|
-
this.bump();
|
|
1194
|
-
} else {
|
|
1195
|
-
break;
|
|
1196
|
-
}
|
|
3206
|
+
function _isPatternSyntax(c) {
|
|
3207
|
+
return c >= 33 && c <= 35 || c === 36 || c >= 37 && c <= 39 || c === 40 || c === 41 || c === 42 || c === 43 || c === 44 || c === 45 || c >= 46 && c <= 47 || c >= 58 && c <= 59 || c >= 60 && c <= 62 || c >= 63 && c <= 64 || c === 91 || c === 92 || c === 93 || c === 94 || c === 96 || c === 123 || c === 124 || c === 125 || c === 126 || c === 161 || c >= 162 && c <= 165 || c === 166 || c === 167 || c === 169 || c === 171 || c === 172 || c === 174 || c === 176 || c === 177 || c === 182 || c === 187 || c === 191 || c === 215 || c === 247 || c >= 8208 && c <= 8213 || c >= 8214 && c <= 8215 || c === 8216 || c === 8217 || c === 8218 || c >= 8219 && c <= 8220 || c === 8221 || c === 8222 || c === 8223 || c >= 8224 && c <= 8231 || c >= 8240 && c <= 8248 || c === 8249 || c === 8250 || c >= 8251 && c <= 8254 || c >= 8257 && c <= 8259 || c === 8260 || c === 8261 || c === 8262 || c >= 8263 && c <= 8273 || c === 8274 || c === 8275 || c >= 8277 && c <= 8286 || c >= 8592 && c <= 8596 || c >= 8597 && c <= 8601 || c >= 8602 && c <= 8603 || c >= 8604 && c <= 8607 || c === 8608 || c >= 8609 && c <= 8610 || c === 8611 || c >= 8612 && c <= 8613 || c === 8614 || c >= 8615 && c <= 8621 || c === 8622 || c >= 8623 && c <= 8653 || c >= 8654 && c <= 8655 || c >= 8656 && c <= 8657 || c === 8658 || c === 8659 || c === 8660 || c >= 8661 && c <= 8691 || c >= 8692 && c <= 8959 || c >= 8960 && c <= 8967 || c === 8968 || c === 8969 || c === 8970 || c === 8971 || c >= 8972 && c <= 8991 || c >= 8992 && c <= 8993 || c >= 8994 && c <= 9e3 || c === 9001 || c === 9002 || c >= 9003 && c <= 9083 || c === 9084 || c >= 9085 && c <= 9114 || c >= 9115 && c <= 9139 || c >= 9140 && c <= 9179 || c >= 9180 && c <= 9185 || c >= 9186 && c <= 9254 || c >= 9255 && c <= 9279 || c >= 9280 && c <= 9290 || c >= 9291 && c <= 9311 || c >= 9472 && c <= 9654 || c === 9655 || c >= 9656 && c <= 9664 || c === 9665 || c >= 9666 && c <= 9719 || c >= 9720 && c <= 9727 || c >= 9728 && c <= 9838 || c === 9839 || c >= 9840 && c <= 10087 || c === 10088 || c === 10089 || c === 10090 || c === 10091 || c === 10092 || c === 10093 || c === 10094 || c === 10095 || c === 10096 || c === 10097 || c === 10098 || c === 10099 || c === 10100 || c === 10101 || c >= 10132 && c <= 10175 || c >= 10176 && c <= 10180 || c === 10181 || c === 10182 || c >= 10183 && c <= 10213 || c === 10214 || c === 10215 || c === 10216 || c === 10217 || c === 10218 || c === 10219 || c === 10220 || c === 10221 || c === 10222 || c === 10223 || c >= 10224 && c <= 10239 || c >= 10240 && c <= 10495 || c >= 10496 && c <= 10626 || c === 10627 || c === 10628 || c === 10629 || c === 10630 || c === 10631 || c === 10632 || c === 10633 || c === 10634 || c === 10635 || c === 10636 || c === 10637 || c === 10638 || c === 10639 || c === 10640 || c === 10641 || c === 10642 || c === 10643 || c === 10644 || c === 10645 || c === 10646 || c === 10647 || c === 10648 || c >= 10649 && c <= 10711 || c === 10712 || c === 10713 || c === 10714 || c === 10715 || c >= 10716 && c <= 10747 || c === 10748 || c === 10749 || c >= 10750 && c <= 11007 || c >= 11008 && c <= 11055 || c >= 11056 && c <= 11076 || c >= 11077 && c <= 11078 || c >= 11079 && c <= 11084 || c >= 11085 && c <= 11123 || c >= 11124 && c <= 11125 || c >= 11126 && c <= 11157 || c === 11158 || c >= 11159 && c <= 11263 || c >= 11776 && c <= 11777 || c === 11778 || c === 11779 || c === 11780 || c === 11781 || c >= 11782 && c <= 11784 || c === 11785 || c === 11786 || c === 11787 || c === 11788 || c === 11789 || c >= 11790 && c <= 11798 || c === 11799 || c >= 11800 && c <= 11801 || c === 11802 || c === 11803 || c === 11804 || c === 11805 || c >= 11806 && c <= 11807 || c === 11808 || c === 11809 || c === 11810 || c === 11811 || c === 11812 || c === 11813 || c === 11814 || c === 11815 || c === 11816 || c === 11817 || c >= 11818 && c <= 11822 || c === 11823 || c >= 11824 && c <= 11833 || c >= 11834 && c <= 11835 || c >= 11836 && c <= 11839 || c === 11840 || c === 11841 || c === 11842 || c >= 11843 && c <= 11855 || c >= 11856 && c <= 11857 || c === 11858 || c >= 11859 && c <= 11903 || c >= 12289 && c <= 12291 || c === 12296 || c === 12297 || c === 12298 || c === 12299 || c === 12300 || c === 12301 || c === 12302 || c === 12303 || c === 12304 || c === 12305 || c >= 12306 && c <= 12307 || c === 12308 || c === 12309 || c === 12310 || c === 12311 || c === 12312 || c === 12313 || c === 12314 || c === 12315 || c === 12316 || c === 12317 || c >= 12318 && c <= 12319 || c === 12320 || c === 12336 || c === 64830 || c === 64831 || c >= 65093 && c <= 65094;
|
|
1197
3208
|
}
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
3209
|
+
}
|
|
3210
|
+
});
|
|
3211
|
+
|
|
3212
|
+
// bazel-out/darwin-fastbuild/bin/packages/icu-messageformat-parser/index.js
|
|
3213
|
+
var require_icu_messageformat_parser = __commonJS({
|
|
3214
|
+
"bazel-out/darwin-fastbuild/bin/packages/icu-messageformat-parser/index.js": function(exports) {
|
|
3215
|
+
"use strict";
|
|
3216
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3217
|
+
exports.parse = void 0;
|
|
3218
|
+
var tslib_1 = require_tslib();
|
|
3219
|
+
var error_1 = require_error();
|
|
3220
|
+
var parser_1 = require_parser();
|
|
3221
|
+
var types_1 = require_types();
|
|
3222
|
+
function pruneLocation(els) {
|
|
3223
|
+
els.forEach(function(el) {
|
|
3224
|
+
delete el.location;
|
|
3225
|
+
if ((0, types_1.isSelectElement)(el) || (0, types_1.isPluralElement)(el)) {
|
|
3226
|
+
for (var k in el.options) {
|
|
3227
|
+
delete el.options[k].location;
|
|
3228
|
+
pruneLocation(el.options[k].value);
|
|
3229
|
+
}
|
|
3230
|
+
} else if ((0, types_1.isNumberElement)(el) && (0, types_1.isNumberSkeleton)(el.style)) {
|
|
3231
|
+
delete el.style.location;
|
|
3232
|
+
} else if (((0, types_1.isDateElement)(el) || (0, types_1.isTimeElement)(el)) && (0, types_1.isDateTimeSkeleton)(el.style)) {
|
|
3233
|
+
delete el.style.location;
|
|
3234
|
+
} else if ((0, types_1.isTagElement)(el)) {
|
|
3235
|
+
pruneLocation(el.children);
|
|
3236
|
+
}
|
|
3237
|
+
});
|
|
1201
3238
|
}
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
3239
|
+
function parse2(message, opts) {
|
|
3240
|
+
if (opts === void 0) {
|
|
3241
|
+
opts = {};
|
|
3242
|
+
}
|
|
3243
|
+
opts = (0, tslib_1.__assign)({ shouldParseSkeletons: true, requiresOtherClause: true }, opts);
|
|
3244
|
+
var result = new parser_1.Parser(message, opts).parse();
|
|
3245
|
+
if (result.err) {
|
|
3246
|
+
var error = SyntaxError(error_1.ErrorKind[result.err.kind]);
|
|
3247
|
+
error.location = result.err.location;
|
|
3248
|
+
error.originalMessage = result.err.message;
|
|
3249
|
+
throw error;
|
|
3250
|
+
}
|
|
3251
|
+
if (!(opts === null || opts === void 0 ? void 0 : opts.captureLocation)) {
|
|
3252
|
+
pruneLocation(result.val);
|
|
3253
|
+
}
|
|
3254
|
+
return result.val;
|
|
1205
3255
|
}
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
3256
|
+
exports.parse = parse2;
|
|
3257
|
+
(0, tslib_1.__exportStar)(require_types(), exports);
|
|
3258
|
+
}
|
|
3259
|
+
});
|
|
3260
|
+
|
|
3261
|
+
// bazel-out/darwin-fastbuild/bin/packages/fast-memoize/index.js
|
|
3262
|
+
var require_fast_memoize = __commonJS({
|
|
3263
|
+
"bazel-out/darwin-fastbuild/bin/packages/fast-memoize/index.js": function(exports) {
|
|
3264
|
+
"use strict";
|
|
3265
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3266
|
+
exports.strategies = void 0;
|
|
3267
|
+
function memoize2(fn, options) {
|
|
3268
|
+
var cache = options && options.cache ? options.cache : cacheDefault;
|
|
3269
|
+
var serializer = options && options.serializer ? options.serializer : serializerDefault;
|
|
3270
|
+
var strategy = options && options.strategy ? options.strategy : strategyDefault;
|
|
3271
|
+
return strategy(fn, {
|
|
3272
|
+
cache: cache,
|
|
3273
|
+
serializer: serializer
|
|
3274
|
+
});
|
|
1225
3275
|
}
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
3276
|
+
exports.default = memoize2;
|
|
3277
|
+
function isPrimitive(value) {
|
|
3278
|
+
return value == null || typeof value === "number" || typeof value === "boolean";
|
|
1229
3279
|
}
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
kind: kind,
|
|
1237
|
-
message: this.message,
|
|
1238
|
-
location: location
|
|
3280
|
+
function monadic(fn, cache, serializer, arg) {
|
|
3281
|
+
var cacheKey = isPrimitive(arg) ? arg : serializer(arg);
|
|
3282
|
+
var computedValue = cache.get(cacheKey);
|
|
3283
|
+
if (typeof computedValue === "undefined") {
|
|
3284
|
+
computedValue = fn.call(this, arg);
|
|
3285
|
+
cache.set(cacheKey, computedValue);
|
|
1239
3286
|
}
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
this.position.column = 1;
|
|
1250
|
-
this.position.offset += 1;
|
|
1251
|
-
} else {
|
|
1252
|
-
this.position.column += 1;
|
|
1253
|
-
this.position.offset += code < 65536 ? 1 : 2;
|
|
1254
|
-
}
|
|
1255
|
-
};
|
|
1256
|
-
Parser2.prototype.bumpIf = function(prefix) {
|
|
1257
|
-
if (startsWith(this.message, prefix, this.offset())) {
|
|
1258
|
-
for (var i = 0; i < prefix.length; i++) {
|
|
1259
|
-
this.bump();
|
|
3287
|
+
return computedValue;
|
|
3288
|
+
}
|
|
3289
|
+
function variadic(fn, cache, serializer) {
|
|
3290
|
+
var args = Array.prototype.slice.call(arguments, 3);
|
|
3291
|
+
var cacheKey = serializer(args);
|
|
3292
|
+
var computedValue = cache.get(cacheKey);
|
|
3293
|
+
if (typeof computedValue === "undefined") {
|
|
3294
|
+
computedValue = fn.apply(this, args);
|
|
3295
|
+
cache.set(cacheKey, computedValue);
|
|
1260
3296
|
}
|
|
1261
|
-
return
|
|
3297
|
+
return computedValue;
|
|
1262
3298
|
}
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
Parser2.prototype.bumpUntil = function(pattern) {
|
|
1266
|
-
var currentOffset = this.offset();
|
|
1267
|
-
var index = this.message.indexOf(pattern, currentOffset);
|
|
1268
|
-
if (index >= 0) {
|
|
1269
|
-
this.bumpTo(index);
|
|
1270
|
-
return true;
|
|
1271
|
-
} else {
|
|
1272
|
-
this.bumpTo(this.message.length);
|
|
1273
|
-
return false;
|
|
3299
|
+
function assemble(fn, context, strategy, cache, serialize) {
|
|
3300
|
+
return strategy.bind(context, fn, cache, serialize);
|
|
1274
3301
|
}
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
throw Error("targetOffset ".concat(targetOffset, " must be greater than or equal to the current offset ").concat(this.offset()));
|
|
3302
|
+
function strategyDefault(fn, options) {
|
|
3303
|
+
var strategy = fn.length === 1 ? monadic : variadic;
|
|
3304
|
+
return assemble(fn, this, strategy, options.cache.create(), options.serializer);
|
|
1279
3305
|
}
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
var offset = this.offset();
|
|
1283
|
-
if (offset === targetOffset) {
|
|
1284
|
-
break;
|
|
1285
|
-
}
|
|
1286
|
-
if (offset > targetOffset) {
|
|
1287
|
-
throw Error("targetOffset ".concat(targetOffset, " is at invalid UTF-16 code unit boundary"));
|
|
1288
|
-
}
|
|
1289
|
-
this.bump();
|
|
1290
|
-
if (this.isEOF()) {
|
|
1291
|
-
break;
|
|
1292
|
-
}
|
|
3306
|
+
function strategyVariadic(fn, options) {
|
|
3307
|
+
return assemble(fn, this, variadic, options.cache.create(), options.serializer);
|
|
1293
3308
|
}
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
while (!this.isEOF() && _isWhiteSpace(this.char())) {
|
|
1297
|
-
this.bump();
|
|
3309
|
+
function strategyMonadic(fn, options) {
|
|
3310
|
+
return assemble(fn, this, monadic, options.cache.create(), options.serializer);
|
|
1298
3311
|
}
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
3312
|
+
var serializerDefault = function() {
|
|
3313
|
+
return JSON.stringify(arguments);
|
|
3314
|
+
};
|
|
3315
|
+
function ObjectWithoutPrototypeCache() {
|
|
3316
|
+
this.cache = /* @__PURE__ */ Object.create(null);
|
|
1303
3317
|
}
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
}
|
|
1314
|
-
function _isAlphaOrSlash(codepoint) {
|
|
1315
|
-
return _isAlpha(codepoint) || codepoint === 47;
|
|
1316
|
-
}
|
|
1317
|
-
function _isPotentialElementNameChar(c) {
|
|
1318
|
-
return c === 45 || c === 46 || c >= 48 && c <= 57 || c === 95 || c >= 97 && c <= 122 || c >= 65 && c <= 90 || c == 183 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 893 || c >= 895 && c <= 8191 || c >= 8204 && c <= 8205 || c >= 8255 && c <= 8256 || c >= 8304 && c <= 8591 || c >= 11264 && c <= 12271 || c >= 12289 && c <= 55295 || c >= 63744 && c <= 64975 || c >= 65008 && c <= 65533 || c >= 65536 && c <= 983039;
|
|
1319
|
-
}
|
|
1320
|
-
function _isWhiteSpace(c) {
|
|
1321
|
-
return c >= 9 && c <= 13 || c === 32 || c === 133 || c >= 8206 && c <= 8207 || c === 8232 || c === 8233;
|
|
1322
|
-
}
|
|
1323
|
-
function _isPatternSyntax(c) {
|
|
1324
|
-
return c >= 33 && c <= 35 || c === 36 || c >= 37 && c <= 39 || c === 40 || c === 41 || c === 42 || c === 43 || c === 44 || c === 45 || c >= 46 && c <= 47 || c >= 58 && c <= 59 || c >= 60 && c <= 62 || c >= 63 && c <= 64 || c === 91 || c === 92 || c === 93 || c === 94 || c === 96 || c === 123 || c === 124 || c === 125 || c === 126 || c === 161 || c >= 162 && c <= 165 || c === 166 || c === 167 || c === 169 || c === 171 || c === 172 || c === 174 || c === 176 || c === 177 || c === 182 || c === 187 || c === 191 || c === 215 || c === 247 || c >= 8208 && c <= 8213 || c >= 8214 && c <= 8215 || c === 8216 || c === 8217 || c === 8218 || c >= 8219 && c <= 8220 || c === 8221 || c === 8222 || c === 8223 || c >= 8224 && c <= 8231 || c >= 8240 && c <= 8248 || c === 8249 || c === 8250 || c >= 8251 && c <= 8254 || c >= 8257 && c <= 8259 || c === 8260 || c === 8261 || c === 8262 || c >= 8263 && c <= 8273 || c === 8274 || c === 8275 || c >= 8277 && c <= 8286 || c >= 8592 && c <= 8596 || c >= 8597 && c <= 8601 || c >= 8602 && c <= 8603 || c >= 8604 && c <= 8607 || c === 8608 || c >= 8609 && c <= 8610 || c === 8611 || c >= 8612 && c <= 8613 || c === 8614 || c >= 8615 && c <= 8621 || c === 8622 || c >= 8623 && c <= 8653 || c >= 8654 && c <= 8655 || c >= 8656 && c <= 8657 || c === 8658 || c === 8659 || c === 8660 || c >= 8661 && c <= 8691 || c >= 8692 && c <= 8959 || c >= 8960 && c <= 8967 || c === 8968 || c === 8969 || c === 8970 || c === 8971 || c >= 8972 && c <= 8991 || c >= 8992 && c <= 8993 || c >= 8994 && c <= 9e3 || c === 9001 || c === 9002 || c >= 9003 && c <= 9083 || c === 9084 || c >= 9085 && c <= 9114 || c >= 9115 && c <= 9139 || c >= 9140 && c <= 9179 || c >= 9180 && c <= 9185 || c >= 9186 && c <= 9254 || c >= 9255 && c <= 9279 || c >= 9280 && c <= 9290 || c >= 9291 && c <= 9311 || c >= 9472 && c <= 9654 || c === 9655 || c >= 9656 && c <= 9664 || c === 9665 || c >= 9666 && c <= 9719 || c >= 9720 && c <= 9727 || c >= 9728 && c <= 9838 || c === 9839 || c >= 9840 && c <= 10087 || c === 10088 || c === 10089 || c === 10090 || c === 10091 || c === 10092 || c === 10093 || c === 10094 || c === 10095 || c === 10096 || c === 10097 || c === 10098 || c === 10099 || c === 10100 || c === 10101 || c >= 10132 && c <= 10175 || c >= 10176 && c <= 10180 || c === 10181 || c === 10182 || c >= 10183 && c <= 10213 || c === 10214 || c === 10215 || c === 10216 || c === 10217 || c === 10218 || c === 10219 || c === 10220 || c === 10221 || c === 10222 || c === 10223 || c >= 10224 && c <= 10239 || c >= 10240 && c <= 10495 || c >= 10496 && c <= 10626 || c === 10627 || c === 10628 || c === 10629 || c === 10630 || c === 10631 || c === 10632 || c === 10633 || c === 10634 || c === 10635 || c === 10636 || c === 10637 || c === 10638 || c === 10639 || c === 10640 || c === 10641 || c === 10642 || c === 10643 || c === 10644 || c === 10645 || c === 10646 || c === 10647 || c === 10648 || c >= 10649 && c <= 10711 || c === 10712 || c === 10713 || c === 10714 || c === 10715 || c >= 10716 && c <= 10747 || c === 10748 || c === 10749 || c >= 10750 && c <= 11007 || c >= 11008 && c <= 11055 || c >= 11056 && c <= 11076 || c >= 11077 && c <= 11078 || c >= 11079 && c <= 11084 || c >= 11085 && c <= 11123 || c >= 11124 && c <= 11125 || c >= 11126 && c <= 11157 || c === 11158 || c >= 11159 && c <= 11263 || c >= 11776 && c <= 11777 || c === 11778 || c === 11779 || c === 11780 || c === 11781 || c >= 11782 && c <= 11784 || c === 11785 || c === 11786 || c === 11787 || c === 11788 || c === 11789 || c >= 11790 && c <= 11798 || c === 11799 || c >= 11800 && c <= 11801 || c === 11802 || c === 11803 || c === 11804 || c === 11805 || c >= 11806 && c <= 11807 || c === 11808 || c === 11809 || c === 11810 || c === 11811 || c === 11812 || c === 11813 || c === 11814 || c === 11815 || c === 11816 || c === 11817 || c >= 11818 && c <= 11822 || c === 11823 || c >= 11824 && c <= 11833 || c >= 11834 && c <= 11835 || c >= 11836 && c <= 11839 || c === 11840 || c === 11841 || c === 11842 || c >= 11843 && c <= 11855 || c >= 11856 && c <= 11857 || c === 11858 || c >= 11859 && c <= 11903 || c >= 12289 && c <= 12291 || c === 12296 || c === 12297 || c === 12298 || c === 12299 || c === 12300 || c === 12301 || c === 12302 || c === 12303 || c === 12304 || c === 12305 || c >= 12306 && c <= 12307 || c === 12308 || c === 12309 || c === 12310 || c === 12311 || c === 12312 || c === 12313 || c === 12314 || c === 12315 || c === 12316 || c === 12317 || c >= 12318 && c <= 12319 || c === 12320 || c === 12336 || c === 64830 || c === 64831 || c >= 65093 && c <= 65094;
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
// bazel-out/darwin-fastbuild/bin/packages/icu-messageformat-parser/lib/index.js
|
|
1328
|
-
function pruneLocation(els) {
|
|
1329
|
-
els.forEach(function(el) {
|
|
1330
|
-
delete el.location;
|
|
1331
|
-
if (isSelectElement(el) || isPluralElement(el)) {
|
|
1332
|
-
for (var k in el.options) {
|
|
1333
|
-
delete el.options[k].location;
|
|
1334
|
-
pruneLocation(el.options[k].value);
|
|
3318
|
+
ObjectWithoutPrototypeCache.prototype.get = function(key) {
|
|
3319
|
+
return this.cache[key];
|
|
3320
|
+
};
|
|
3321
|
+
ObjectWithoutPrototypeCache.prototype.set = function(key, value) {
|
|
3322
|
+
this.cache[key] = value;
|
|
3323
|
+
};
|
|
3324
|
+
var cacheDefault = {
|
|
3325
|
+
create: function create() {
|
|
3326
|
+
return new ObjectWithoutPrototypeCache();
|
|
1335
3327
|
}
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
}
|
|
1341
|
-
pruneLocation(el.children);
|
|
1342
|
-
}
|
|
1343
|
-
});
|
|
1344
|
-
}
|
|
1345
|
-
function parse(message, opts) {
|
|
1346
|
-
if (opts === void 0) {
|
|
1347
|
-
opts = {};
|
|
1348
|
-
}
|
|
1349
|
-
opts = __assign({ shouldParseSkeletons: true, requiresOtherClause: true }, opts);
|
|
1350
|
-
var result = new Parser(message, opts).parse();
|
|
1351
|
-
if (result.err) {
|
|
1352
|
-
var error = SyntaxError(ErrorKind[result.err.kind]);
|
|
1353
|
-
error.location = result.err.location;
|
|
1354
|
-
error.originalMessage = result.err.message;
|
|
1355
|
-
throw error;
|
|
1356
|
-
}
|
|
1357
|
-
if (!(opts === null || opts === void 0 ? void 0 : opts.captureLocation)) {
|
|
1358
|
-
pruneLocation(result.val);
|
|
3328
|
+
};
|
|
3329
|
+
exports.strategies = {
|
|
3330
|
+
variadic: strategyVariadic,
|
|
3331
|
+
monadic: strategyMonadic
|
|
3332
|
+
};
|
|
1359
3333
|
}
|
|
1360
|
-
|
|
1361
|
-
}
|
|
3334
|
+
});
|
|
1362
3335
|
|
|
1363
|
-
// bazel-out/darwin-fastbuild/bin/packages/
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
}
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
function assemble(fn, context, strategy, cache, serialize) {
|
|
1396
|
-
return strategy.bind(context, fn, cache, serialize);
|
|
1397
|
-
}
|
|
1398
|
-
function strategyDefault(fn, options) {
|
|
1399
|
-
var strategy = fn.length === 1 ? monadic : variadic;
|
|
1400
|
-
return assemble(fn, this, strategy, options.cache.create(), options.serializer);
|
|
1401
|
-
}
|
|
1402
|
-
function strategyVariadic(fn, options) {
|
|
1403
|
-
return assemble(fn, this, variadic, options.cache.create(), options.serializer);
|
|
1404
|
-
}
|
|
1405
|
-
function strategyMonadic(fn, options) {
|
|
1406
|
-
return assemble(fn, this, monadic, options.cache.create(), options.serializer);
|
|
1407
|
-
}
|
|
1408
|
-
var serializerDefault = function() {
|
|
1409
|
-
return JSON.stringify(arguments);
|
|
1410
|
-
};
|
|
1411
|
-
function ObjectWithoutPrototypeCache() {
|
|
1412
|
-
this.cache = /* @__PURE__ */ Object.create(null);
|
|
1413
|
-
}
|
|
1414
|
-
ObjectWithoutPrototypeCache.prototype.get = function(key) {
|
|
1415
|
-
return this.cache[key];
|
|
1416
|
-
};
|
|
1417
|
-
ObjectWithoutPrototypeCache.prototype.set = function(key, value) {
|
|
1418
|
-
this.cache[key] = value;
|
|
1419
|
-
};
|
|
1420
|
-
var cacheDefault = {
|
|
1421
|
-
create: function create() {
|
|
1422
|
-
return new ObjectWithoutPrototypeCache();
|
|
3336
|
+
// bazel-out/darwin-fastbuild/bin/packages/intl-messageformat/lib/index.js
|
|
3337
|
+
var lib_exports = {};
|
|
3338
|
+
__export(lib_exports, {
|
|
3339
|
+
ErrorCode: function() {
|
|
3340
|
+
return ErrorCode;
|
|
3341
|
+
},
|
|
3342
|
+
FormatError: function() {
|
|
3343
|
+
return FormatError;
|
|
3344
|
+
},
|
|
3345
|
+
IntlMessageFormat: function() {
|
|
3346
|
+
return IntlMessageFormat;
|
|
3347
|
+
},
|
|
3348
|
+
InvalidValueError: function() {
|
|
3349
|
+
return InvalidValueError;
|
|
3350
|
+
},
|
|
3351
|
+
InvalidValueTypeError: function() {
|
|
3352
|
+
return InvalidValueTypeError;
|
|
3353
|
+
},
|
|
3354
|
+
MissingValueError: function() {
|
|
3355
|
+
return MissingValueError;
|
|
3356
|
+
},
|
|
3357
|
+
PART_TYPE: function() {
|
|
3358
|
+
return PART_TYPE;
|
|
3359
|
+
},
|
|
3360
|
+
default: function() {
|
|
3361
|
+
return lib_default;
|
|
3362
|
+
},
|
|
3363
|
+
formatToParts: function() {
|
|
3364
|
+
return formatToParts;
|
|
3365
|
+
},
|
|
3366
|
+
isFormatXMLElementFn: function() {
|
|
3367
|
+
return isFormatXMLElementFn;
|
|
1423
3368
|
}
|
|
1424
|
-
};
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
3369
|
+
});
|
|
3370
|
+
|
|
3371
|
+
// bazel-out/darwin-fastbuild/bin/packages/intl-messageformat/lib/src/core.js
|
|
3372
|
+
var import_tslib2 = __toESM(require_tslib());
|
|
3373
|
+
var import_icu_messageformat_parser2 = __toESM(require_icu_messageformat_parser());
|
|
3374
|
+
var import_fast_memoize = __toESM(require_fast_memoize());
|
|
3375
|
+
|
|
3376
|
+
// bazel-out/darwin-fastbuild/bin/packages/intl-messageformat/lib/src/formatters.js
|
|
3377
|
+
var import_icu_messageformat_parser = __toESM(require_icu_messageformat_parser());
|
|
1429
3378
|
|
|
1430
3379
|
// bazel-out/darwin-fastbuild/bin/packages/intl-messageformat/lib/src/error.js
|
|
3380
|
+
var import_tslib = __toESM(require_tslib());
|
|
1431
3381
|
var ErrorCode;
|
|
1432
3382
|
(function(ErrorCode2) {
|
|
1433
3383
|
ErrorCode2["MISSING_VALUE"] = "MISSING_VALUE";
|
|
@@ -1435,7 +3385,7 @@ var IntlMessageFormat = (function() {
|
|
|
1435
3385
|
ErrorCode2["MISSING_INTL_API"] = "MISSING_INTL_API";
|
|
1436
3386
|
})(ErrorCode || (ErrorCode = {}));
|
|
1437
3387
|
var FormatError = function(_super) {
|
|
1438
|
-
__extends(FormatError2, _super);
|
|
3388
|
+
(0, import_tslib.__extends)(FormatError2, _super);
|
|
1439
3389
|
function FormatError2(msg, code, originalMessage) {
|
|
1440
3390
|
var _this = _super.call(this, msg) || this;
|
|
1441
3391
|
_this.code = code;
|
|
@@ -1448,21 +3398,21 @@ var IntlMessageFormat = (function() {
|
|
|
1448
3398
|
return FormatError2;
|
|
1449
3399
|
}(Error);
|
|
1450
3400
|
var InvalidValueError = function(_super) {
|
|
1451
|
-
__extends(InvalidValueError2, _super);
|
|
3401
|
+
(0, import_tslib.__extends)(InvalidValueError2, _super);
|
|
1452
3402
|
function InvalidValueError2(variableId, value, options, originalMessage) {
|
|
1453
3403
|
return _super.call(this, 'Invalid values for "'.concat(variableId, '": "').concat(value, '". Options are "').concat(Object.keys(options).join('", "'), '"'), ErrorCode.INVALID_VALUE, originalMessage) || this;
|
|
1454
3404
|
}
|
|
1455
3405
|
return InvalidValueError2;
|
|
1456
3406
|
}(FormatError);
|
|
1457
3407
|
var InvalidValueTypeError = function(_super) {
|
|
1458
|
-
__extends(InvalidValueTypeError2, _super);
|
|
3408
|
+
(0, import_tslib.__extends)(InvalidValueTypeError2, _super);
|
|
1459
3409
|
function InvalidValueTypeError2(value, type, originalMessage) {
|
|
1460
3410
|
return _super.call(this, 'Value for "'.concat(value, '" must be of type ').concat(type), ErrorCode.INVALID_VALUE, originalMessage) || this;
|
|
1461
3411
|
}
|
|
1462
3412
|
return InvalidValueTypeError2;
|
|
1463
3413
|
}(FormatError);
|
|
1464
3414
|
var MissingValueError = function(_super) {
|
|
1465
|
-
__extends(MissingValueError2, _super);
|
|
3415
|
+
(0, import_tslib.__extends)(MissingValueError2, _super);
|
|
1466
3416
|
function MissingValueError2(variableId, originalMessage) {
|
|
1467
3417
|
return _super.call(this, 'The intl string context variable "'.concat(variableId, '" was not provided to the string "').concat(originalMessage, '"'), ErrorCode.MISSING_VALUE, originalMessage) || this;
|
|
1468
3418
|
}
|
|
@@ -1493,7 +3443,7 @@ var IntlMessageFormat = (function() {
|
|
|
1493
3443
|
return typeof el === "function";
|
|
1494
3444
|
}
|
|
1495
3445
|
function formatToParts(els, locales, formatters, formats, values, currentPluralValue, originalMessage) {
|
|
1496
|
-
if (els.length === 1 && isLiteralElement(els[0])) {
|
|
3446
|
+
if (els.length === 1 && (0, import_icu_messageformat_parser.isLiteralElement)(els[0])) {
|
|
1497
3447
|
return [
|
|
1498
3448
|
{
|
|
1499
3449
|
type: PART_TYPE.literal,
|
|
@@ -1504,14 +3454,14 @@ var IntlMessageFormat = (function() {
|
|
|
1504
3454
|
var result = [];
|
|
1505
3455
|
for (var _i = 0, els_1 = els; _i < els_1.length; _i++) {
|
|
1506
3456
|
var el = els_1[_i];
|
|
1507
|
-
if (isLiteralElement(el)) {
|
|
3457
|
+
if ((0, import_icu_messageformat_parser.isLiteralElement)(el)) {
|
|
1508
3458
|
result.push({
|
|
1509
3459
|
type: PART_TYPE.literal,
|
|
1510
3460
|
value: el.value
|
|
1511
3461
|
});
|
|
1512
3462
|
continue;
|
|
1513
3463
|
}
|
|
1514
|
-
if (isPoundElement(el)) {
|
|
3464
|
+
if ((0, import_icu_messageformat_parser.isPoundElement)(el)) {
|
|
1515
3465
|
if (typeof currentPluralValue === "number") {
|
|
1516
3466
|
result.push({
|
|
1517
3467
|
type: PART_TYPE.literal,
|
|
@@ -1525,7 +3475,7 @@ var IntlMessageFormat = (function() {
|
|
|
1525
3475
|
throw new MissingValueError(varName, originalMessage);
|
|
1526
3476
|
}
|
|
1527
3477
|
var value = values[varName];
|
|
1528
|
-
if (isArgumentElement(el)) {
|
|
3478
|
+
if ((0, import_icu_messageformat_parser.isArgumentElement)(el)) {
|
|
1529
3479
|
if (!value || typeof value === "string" || typeof value === "number") {
|
|
1530
3480
|
value = typeof value === "string" || typeof value === "number" ? String(value) : "";
|
|
1531
3481
|
}
|
|
@@ -1535,24 +3485,24 @@ var IntlMessageFormat = (function() {
|
|
|
1535
3485
|
});
|
|
1536
3486
|
continue;
|
|
1537
3487
|
}
|
|
1538
|
-
if (isDateElement(el)) {
|
|
1539
|
-
var style = typeof el.style === "string" ? formats.date[el.style] : isDateTimeSkeleton(el.style) ? el.style.parsedOptions : void 0;
|
|
3488
|
+
if ((0, import_icu_messageformat_parser.isDateElement)(el)) {
|
|
3489
|
+
var style = typeof el.style === "string" ? formats.date[el.style] : (0, import_icu_messageformat_parser.isDateTimeSkeleton)(el.style) ? el.style.parsedOptions : void 0;
|
|
1540
3490
|
result.push({
|
|
1541
3491
|
type: PART_TYPE.literal,
|
|
1542
3492
|
value: formatters.getDateTimeFormat(locales, style).format(value)
|
|
1543
3493
|
});
|
|
1544
3494
|
continue;
|
|
1545
3495
|
}
|
|
1546
|
-
if (isTimeElement(el)) {
|
|
1547
|
-
var style = typeof el.style === "string" ? formats.time[el.style] : isDateTimeSkeleton(el.style) ? el.style.parsedOptions :
|
|
3496
|
+
if ((0, import_icu_messageformat_parser.isTimeElement)(el)) {
|
|
3497
|
+
var style = typeof el.style === "string" ? formats.time[el.style] : (0, import_icu_messageformat_parser.isDateTimeSkeleton)(el.style) ? el.style.parsedOptions : formats.time.medium;
|
|
1548
3498
|
result.push({
|
|
1549
3499
|
type: PART_TYPE.literal,
|
|
1550
3500
|
value: formatters.getDateTimeFormat(locales, style).format(value)
|
|
1551
3501
|
});
|
|
1552
3502
|
continue;
|
|
1553
3503
|
}
|
|
1554
|
-
if (isNumberElement(el)) {
|
|
1555
|
-
var style = typeof el.style === "string" ? formats.number[el.style] : isNumberSkeleton(el.style) ? el.style.parsedOptions : void 0;
|
|
3504
|
+
if ((0, import_icu_messageformat_parser.isNumberElement)(el)) {
|
|
3505
|
+
var style = typeof el.style === "string" ? formats.number[el.style] : (0, import_icu_messageformat_parser.isNumberSkeleton)(el.style) ? el.style.parsedOptions : void 0;
|
|
1556
3506
|
if (style && style.scale) {
|
|
1557
3507
|
value = value * (style.scale || 1);
|
|
1558
3508
|
}
|
|
@@ -1562,7 +3512,7 @@ var IntlMessageFormat = (function() {
|
|
|
1562
3512
|
});
|
|
1563
3513
|
continue;
|
|
1564
3514
|
}
|
|
1565
|
-
if (isTagElement(el)) {
|
|
3515
|
+
if ((0, import_icu_messageformat_parser.isTagElement)(el)) {
|
|
1566
3516
|
var children = el.children, value_1 = el.value;
|
|
1567
3517
|
var formatFn = values[value_1];
|
|
1568
3518
|
if (!isFormatXMLElementFn(formatFn)) {
|
|
@@ -1582,7 +3532,7 @@ var IntlMessageFormat = (function() {
|
|
|
1582
3532
|
};
|
|
1583
3533
|
}));
|
|
1584
3534
|
}
|
|
1585
|
-
if (isSelectElement(el)) {
|
|
3535
|
+
if ((0, import_icu_messageformat_parser.isSelectElement)(el)) {
|
|
1586
3536
|
var opt = el.options[value] || el.options.other;
|
|
1587
3537
|
if (!opt) {
|
|
1588
3538
|
throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);
|
|
@@ -1590,7 +3540,7 @@ var IntlMessageFormat = (function() {
|
|
|
1590
3540
|
result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values));
|
|
1591
3541
|
continue;
|
|
1592
3542
|
}
|
|
1593
|
-
if (isPluralElement(el)) {
|
|
3543
|
+
if ((0, import_icu_messageformat_parser.isPluralElement)(el)) {
|
|
1594
3544
|
var opt = el.options["=".concat(value)];
|
|
1595
3545
|
if (!opt) {
|
|
1596
3546
|
if (!Intl.PluralRules) {
|
|
@@ -1614,8 +3564,8 @@ var IntlMessageFormat = (function() {
|
|
|
1614
3564
|
if (!c2) {
|
|
1615
3565
|
return c1;
|
|
1616
3566
|
}
|
|
1617
|
-
return __assign(__assign(__assign({}, c1 || {}), c2 || {}), Object.keys(c1).reduce(function(all, k) {
|
|
1618
|
-
all[k] = __assign(__assign({}, c1[k]), c2[k] || {});
|
|
3567
|
+
return (0, import_tslib2.__assign)((0, import_tslib2.__assign)((0, import_tslib2.__assign)({}, c1 || {}), c2 || {}), Object.keys(c1).reduce(function(all, k) {
|
|
3568
|
+
all[k] = (0, import_tslib2.__assign)((0, import_tslib2.__assign)({}, c1[k]), c2[k] || {});
|
|
1619
3569
|
return all;
|
|
1620
3570
|
}, {}));
|
|
1621
3571
|
}
|
|
@@ -1626,7 +3576,7 @@ var IntlMessageFormat = (function() {
|
|
|
1626
3576
|
return Object.keys(defaultConfig).reduce(function(all, k) {
|
|
1627
3577
|
all[k] = mergeConfig(defaultConfig[k], configs[k]);
|
|
1628
3578
|
return all;
|
|
1629
|
-
}, __assign({}, defaultConfig));
|
|
3579
|
+
}, (0, import_tslib2.__assign)({}, defaultConfig));
|
|
1630
3580
|
}
|
|
1631
3581
|
function createFastMemoizeCache(store) {
|
|
1632
3582
|
return {
|
|
@@ -1651,38 +3601,38 @@ var IntlMessageFormat = (function() {
|
|
|
1651
3601
|
};
|
|
1652
3602
|
}
|
|
1653
3603
|
return {
|
|
1654
|
-
getNumberFormat:
|
|
1655
|
-
var
|
|
3604
|
+
getNumberFormat: (0, import_fast_memoize.default)(function() {
|
|
3605
|
+
var _a;
|
|
1656
3606
|
var args = [];
|
|
1657
3607
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1658
3608
|
args[_i] = arguments[_i];
|
|
1659
3609
|
}
|
|
1660
|
-
return new ((
|
|
3610
|
+
return new ((_a = Intl.NumberFormat).bind.apply(_a, (0, import_tslib2.__spreadArray)([void 0], args, false)))();
|
|
1661
3611
|
}, {
|
|
1662
3612
|
cache: createFastMemoizeCache(cache.number),
|
|
1663
|
-
strategy: strategies.variadic
|
|
3613
|
+
strategy: import_fast_memoize.strategies.variadic
|
|
1664
3614
|
}),
|
|
1665
|
-
getDateTimeFormat:
|
|
1666
|
-
var
|
|
3615
|
+
getDateTimeFormat: (0, import_fast_memoize.default)(function() {
|
|
3616
|
+
var _a;
|
|
1667
3617
|
var args = [];
|
|
1668
3618
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1669
3619
|
args[_i] = arguments[_i];
|
|
1670
3620
|
}
|
|
1671
|
-
return new ((
|
|
3621
|
+
return new ((_a = Intl.DateTimeFormat).bind.apply(_a, (0, import_tslib2.__spreadArray)([void 0], args, false)))();
|
|
1672
3622
|
}, {
|
|
1673
3623
|
cache: createFastMemoizeCache(cache.dateTime),
|
|
1674
|
-
strategy: strategies.variadic
|
|
3624
|
+
strategy: import_fast_memoize.strategies.variadic
|
|
1675
3625
|
}),
|
|
1676
|
-
getPluralRules:
|
|
1677
|
-
var
|
|
3626
|
+
getPluralRules: (0, import_fast_memoize.default)(function() {
|
|
3627
|
+
var _a;
|
|
1678
3628
|
var args = [];
|
|
1679
3629
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1680
3630
|
args[_i] = arguments[_i];
|
|
1681
3631
|
}
|
|
1682
|
-
return new ((
|
|
3632
|
+
return new ((_a = Intl.PluralRules).bind.apply(_a, (0, import_tslib2.__spreadArray)([void 0], args, false)))();
|
|
1683
3633
|
}, {
|
|
1684
3634
|
cache: createFastMemoizeCache(cache.pluralRules),
|
|
1685
|
-
strategy: strategies.variadic
|
|
3635
|
+
strategy: import_fast_memoize.strategies.variadic
|
|
1686
3636
|
})
|
|
1687
3637
|
};
|
|
1688
3638
|
}
|
|
@@ -1719,20 +3669,24 @@ var IntlMessageFormat = (function() {
|
|
|
1719
3669
|
return formatToParts(_this.ast, _this.locales, _this.formatters, _this.formats, values, void 0, _this.message);
|
|
1720
3670
|
};
|
|
1721
3671
|
this.resolvedOptions = function() {
|
|
3672
|
+
var _a;
|
|
1722
3673
|
return {
|
|
1723
|
-
locale: Intl.NumberFormat.supportedLocalesOf(_this.locales)[0]
|
|
3674
|
+
locale: ((_a = _this.resolvedLocale) === null || _a === void 0 ? void 0 : _a.toString()) || Intl.NumberFormat.supportedLocalesOf(_this.locales)[0]
|
|
1724
3675
|
};
|
|
1725
3676
|
};
|
|
1726
3677
|
this.getAst = function() {
|
|
1727
3678
|
return _this.ast;
|
|
1728
3679
|
};
|
|
3680
|
+
this.locales = locales;
|
|
3681
|
+
this.resolvedLocale = IntlMessageFormat2.resolveLocale(locales);
|
|
1729
3682
|
if (typeof message === "string") {
|
|
1730
3683
|
this.message = message;
|
|
1731
3684
|
if (!IntlMessageFormat2.__parse) {
|
|
1732
3685
|
throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
1733
3686
|
}
|
|
1734
3687
|
this.ast = IntlMessageFormat2.__parse(message, {
|
|
1735
|
-
ignoreTag: opts === null || opts === void 0 ? void 0 : opts.ignoreTag
|
|
3688
|
+
ignoreTag: opts === null || opts === void 0 ? void 0 : opts.ignoreTag,
|
|
3689
|
+
locale: this.resolvedLocale
|
|
1736
3690
|
});
|
|
1737
3691
|
} else {
|
|
1738
3692
|
this.ast = message;
|
|
@@ -1741,7 +3695,6 @@ var IntlMessageFormat = (function() {
|
|
|
1741
3695
|
throw new TypeError("A message must be provided as a String or AST.");
|
|
1742
3696
|
}
|
|
1743
3697
|
this.formats = mergeConfigs(IntlMessageFormat2.formats, overrideFormats);
|
|
1744
|
-
this.locales = locales;
|
|
1745
3698
|
this.formatters = opts && opts.formatters || createDefaultFormatters(this.formatterCache);
|
|
1746
3699
|
}
|
|
1747
3700
|
Object.defineProperty(IntlMessageFormat2, "defaultLocale", {
|
|
@@ -1755,7 +3708,17 @@ var IntlMessageFormat = (function() {
|
|
|
1755
3708
|
configurable: true
|
|
1756
3709
|
});
|
|
1757
3710
|
IntlMessageFormat2.memoizedDefaultLocale = null;
|
|
1758
|
-
IntlMessageFormat2.
|
|
3711
|
+
IntlMessageFormat2.resolveLocale = function(locales) {
|
|
3712
|
+
if (typeof Intl.Locale === "undefined") {
|
|
3713
|
+
return;
|
|
3714
|
+
}
|
|
3715
|
+
var supportedLocales = Intl.NumberFormat.supportedLocalesOf(locales);
|
|
3716
|
+
if (supportedLocales.length > 0) {
|
|
3717
|
+
return new Intl.Locale(supportedLocales[0]);
|
|
3718
|
+
}
|
|
3719
|
+
return new Intl.Locale(typeof locales === "string" ? locales : locales[0]);
|
|
3720
|
+
};
|
|
3721
|
+
IntlMessageFormat2.__parse = import_icu_messageformat_parser2.parse;
|
|
1759
3722
|
IntlMessageFormat2.formats = {
|
|
1760
3723
|
number: {
|
|
1761
3724
|
integer: {
|
|
@@ -1822,18 +3785,4 @@ var IntlMessageFormat = (function() {
|
|
|
1822
3785
|
var lib_default = IntlMessageFormat;
|
|
1823
3786
|
return __toCommonJS(lib_exports);
|
|
1824
3787
|
})();
|
|
1825
|
-
/*! *****************************************************************************
|
|
1826
|
-
Copyright (c) Microsoft Corporation.
|
|
1827
|
-
|
|
1828
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
1829
|
-
purpose with or without fee is hereby granted.
|
|
1830
|
-
|
|
1831
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1832
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1833
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1834
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1835
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1836
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1837
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
1838
|
-
***************************************************************************** */
|
|
1839
3788
|
//# sourceMappingURL=intl-messageformat.iife.js.map
|