@formatjs/intl-displaynames 6.6.9 → 6.6.10
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CanonicalCodeForDisplayNames =
|
|
3
|
+
exports.CanonicalCodeForDisplayNames = CanonicalCodeForDisplayNames;
|
|
4
4
|
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
|
|
5
5
|
var IsValidDateTimeFieldCode_1 = require("./IsValidDateTimeFieldCode");
|
|
6
6
|
var UNICODE_REGION_SUBTAG_REGEX = /^([a-z]{2}|[0-9]{3})$/i;
|
|
@@ -49,4 +49,3 @@ function CanonicalCodeForDisplayNames(type, code) {
|
|
|
49
49
|
}
|
|
50
50
|
return code.toUpperCase();
|
|
51
51
|
}
|
|
52
|
-
exports.CanonicalCodeForDisplayNames = CanonicalCodeForDisplayNames;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IsValidDateTimeFieldCode =
|
|
3
|
+
exports.IsValidDateTimeFieldCode = IsValidDateTimeFieldCode;
|
|
4
4
|
var CODES_FOR_DATE_TIME_FIELD = [
|
|
5
5
|
'era',
|
|
6
6
|
'year',
|
|
@@ -18,4 +18,3 @@ var CODES_FOR_DATE_TIME_FIELD = [
|
|
|
18
18
|
function IsValidDateTimeFieldCode(field) {
|
|
19
19
|
return CODES_FOR_DATE_TIME_FIELD.indexOf(field) >= 0;
|
|
20
20
|
}
|
|
21
|
-
exports.IsValidDateTimeFieldCode = IsValidDateTimeFieldCode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/intl-displaynames",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.10",
|
|
4
4
|
"description": "Polyfill for: https://tc39.es/proposal-intl-displaynames",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"i18n",
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
"url": "git+https://github.com/formatjs/formatjs.git"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"tslib": "^2.
|
|
25
|
-
"@formatjs/ecma402-abstract": "2.
|
|
26
|
-
"@formatjs/intl-localematcher": "0.5.
|
|
24
|
+
"tslib": "^2.7.0",
|
|
25
|
+
"@formatjs/ecma402-abstract": "2.2.0",
|
|
26
|
+
"@formatjs/intl-localematcher": "0.5.5"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@formatjs/intl-getcanonicallocales": "2.3.
|
|
30
|
-
"@formatjs/intl-locale": "4.0.
|
|
29
|
+
"@formatjs/intl-getcanonicallocales": "2.3.1",
|
|
30
|
+
"@formatjs/intl-locale": "4.0.2"
|
|
31
31
|
},
|
|
32
32
|
"bugs": {
|
|
33
33
|
"url": "https://github.com/formatjs/formatjs/issues"
|
package/polyfill.iife.js
CHANGED
|
@@ -1,54 +1,31 @@
|
|
|
1
1
|
(() => {
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
16
|
-
extendStatics(d, b);
|
|
17
|
-
function __() {
|
|
18
|
-
this.constructor = d;
|
|
19
|
-
}
|
|
20
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
21
|
-
}
|
|
22
|
-
var __assign = function() {
|
|
23
|
-
__assign = Object.assign || function __assign2(t) {
|
|
24
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
25
|
-
s = arguments[i];
|
|
26
|
-
for (var p in s)
|
|
27
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
28
|
-
t[p] = s[p];
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
6
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
|
+
var __spreadValues = (a, b) => {
|
|
8
|
+
for (var prop in b || (b = {}))
|
|
9
|
+
if (__hasOwnProp.call(b, prop))
|
|
10
|
+
__defNormalProp(a, prop, b[prop]);
|
|
11
|
+
if (__getOwnPropSymbols)
|
|
12
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
13
|
+
if (__propIsEnum.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
29
15
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
16
|
+
return a;
|
|
17
|
+
};
|
|
18
|
+
var __publicField = (obj, key, value) => {
|
|
19
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20
|
+
return value;
|
|
33
21
|
};
|
|
34
|
-
function __spreadArray(to, from, pack) {
|
|
35
|
-
if (pack || arguments.length === 2)
|
|
36
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
37
|
-
if (ar || !(i in from)) {
|
|
38
|
-
if (!ar)
|
|
39
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
40
|
-
ar[i] = from[i];
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
44
|
-
}
|
|
45
22
|
|
|
46
|
-
//
|
|
23
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/CanonicalizeLocaleList.js
|
|
47
24
|
function CanonicalizeLocaleList(locales) {
|
|
48
25
|
return Intl.getCanonicalLocales(locales);
|
|
49
26
|
}
|
|
50
27
|
|
|
51
|
-
//
|
|
28
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/262.js
|
|
52
29
|
function ToString(o) {
|
|
53
30
|
if (typeof o === "symbol") {
|
|
54
31
|
throw TypeError("Cannot convert a Symbol value to a string");
|
|
@@ -67,7 +44,7 @@
|
|
|
67
44
|
var MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE;
|
|
68
45
|
var MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR;
|
|
69
46
|
|
|
70
|
-
//
|
|
47
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/GetOption.js
|
|
71
48
|
function GetOption(opts, prop, type, values, fallback) {
|
|
72
49
|
if (typeof opts !== "object") {
|
|
73
50
|
throw new TypeError("Options must be an object");
|
|
@@ -93,7 +70,7 @@
|
|
|
93
70
|
return fallback;
|
|
94
71
|
}
|
|
95
72
|
|
|
96
|
-
//
|
|
73
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/GetOptionsObject.js
|
|
97
74
|
function GetOptionsObject(options) {
|
|
98
75
|
if (typeof options === "undefined") {
|
|
99
76
|
return /* @__PURE__ */ Object.create(null);
|
|
@@ -104,7 +81,7 @@
|
|
|
104
81
|
throw new TypeError("Options must be an object");
|
|
105
82
|
}
|
|
106
83
|
|
|
107
|
-
//
|
|
84
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/IsSanctionedSimpleUnitIdentifier.js
|
|
108
85
|
var SANCTIONED_UNITS = [
|
|
109
86
|
"angle-degree",
|
|
110
87
|
"area-acre",
|
|
@@ -155,7 +132,7 @@
|
|
|
155
132
|
}
|
|
156
133
|
var SIMPLE_UNITS = SANCTIONED_UNITS.map(removeUnitNamespace);
|
|
157
134
|
|
|
158
|
-
//
|
|
135
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/IsWellFormedCurrencyCode.js
|
|
159
136
|
function toUpperCase(str) {
|
|
160
137
|
return str.replace(/([a-z])/g, function(_, c) {
|
|
161
138
|
return c.toUpperCase();
|
|
@@ -173,7 +150,39 @@
|
|
|
173
150
|
return true;
|
|
174
151
|
}
|
|
175
152
|
|
|
176
|
-
//
|
|
153
|
+
// node_modules/.aspect_rules_js/tslib@2.7.0/node_modules/tslib/tslib.es6.mjs
|
|
154
|
+
var extendStatics = function(d, b) {
|
|
155
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
156
|
+
d2.__proto__ = b2;
|
|
157
|
+
} || function(d2, b2) {
|
|
158
|
+
for (var p in b2)
|
|
159
|
+
if (Object.prototype.hasOwnProperty.call(b2, p))
|
|
160
|
+
d2[p] = b2[p];
|
|
161
|
+
};
|
|
162
|
+
return extendStatics(d, b);
|
|
163
|
+
};
|
|
164
|
+
function __extends(d, b) {
|
|
165
|
+
if (typeof b !== "function" && b !== null)
|
|
166
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
167
|
+
extendStatics(d, b);
|
|
168
|
+
function __() {
|
|
169
|
+
this.constructor = d;
|
|
170
|
+
}
|
|
171
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
172
|
+
}
|
|
173
|
+
function __spreadArray(to, from, pack) {
|
|
174
|
+
if (pack || arguments.length === 2)
|
|
175
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
176
|
+
if (ar || !(i in from)) {
|
|
177
|
+
if (!ar)
|
|
178
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
179
|
+
ar[i] = from[i];
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// node_modules/.aspect_rules_js/@formatjs+fast-memoize@0.0.0/node_modules/@formatjs/fast-memoize/lib/index.js
|
|
177
186
|
function memoize(fn, options) {
|
|
178
187
|
var cache = options && options.cache ? options.cache : cacheDefault;
|
|
179
188
|
var serializer = options && options.serializer ? options.serializer : serializerDefault;
|
|
@@ -240,7 +249,7 @@
|
|
|
240
249
|
monadic: strategyMonadic
|
|
241
250
|
};
|
|
242
251
|
|
|
243
|
-
//
|
|
252
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/utils.js
|
|
244
253
|
function setInternalSlot(map, pl, field, value) {
|
|
245
254
|
if (!map.get(pl)) {
|
|
246
255
|
map.set(pl, /* @__PURE__ */ Object.create(null));
|
|
@@ -324,19 +333,19 @@
|
|
|
324
333
|
strategy: strategies.variadic
|
|
325
334
|
});
|
|
326
335
|
|
|
327
|
-
//
|
|
336
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/regex.generated.js
|
|
328
337
|
var S_UNICODE_REGEX = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEE0-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDD78\uDD7A-\uDDCB\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6\uDF00-\uDF92\uDF94-\uDFCA]/;
|
|
329
338
|
|
|
330
|
-
//
|
|
339
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/format_to_parts.js
|
|
331
340
|
var CARET_S_UNICODE_REGEX = new RegExp("^".concat(S_UNICODE_REGEX.source));
|
|
332
341
|
var S_DOLLAR_UNICODE_REGEX = new RegExp("".concat(S_UNICODE_REGEX.source, "$"));
|
|
333
342
|
|
|
334
|
-
//
|
|
343
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/CanonicalizeLocaleList.js
|
|
335
344
|
function CanonicalizeLocaleList2(locales) {
|
|
336
345
|
return Intl.getCanonicalLocales(locales);
|
|
337
346
|
}
|
|
338
347
|
|
|
339
|
-
//
|
|
348
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/languageMatching.js
|
|
340
349
|
var data = {
|
|
341
350
|
supplemental: {
|
|
342
351
|
languageMatching: {
|
|
@@ -2958,7 +2967,7 @@
|
|
|
2958
2967
|
}
|
|
2959
2968
|
};
|
|
2960
2969
|
|
|
2961
|
-
//
|
|
2970
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/regions.generated.js
|
|
2962
2971
|
var regions = {
|
|
2963
2972
|
"001": [
|
|
2964
2973
|
"001",
|
|
@@ -4293,7 +4302,7 @@
|
|
|
4293
4302
|
]
|
|
4294
4303
|
};
|
|
4295
4304
|
|
|
4296
|
-
//
|
|
4305
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/utils.js
|
|
4297
4306
|
var UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi;
|
|
4298
4307
|
function invariant2(condition, message, Err) {
|
|
4299
4308
|
if (Err === void 0) {
|
|
@@ -4447,7 +4456,7 @@
|
|
|
4447
4456
|
return result;
|
|
4448
4457
|
}
|
|
4449
4458
|
|
|
4450
|
-
//
|
|
4459
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/BestFitMatcher.js
|
|
4451
4460
|
function BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale) {
|
|
4452
4461
|
var foundLocale;
|
|
4453
4462
|
var extension;
|
|
@@ -4472,7 +4481,7 @@
|
|
|
4472
4481
|
};
|
|
4473
4482
|
}
|
|
4474
4483
|
|
|
4475
|
-
//
|
|
4484
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/BestAvailableLocale.js
|
|
4476
4485
|
function BestAvailableLocale(availableLocales, locale) {
|
|
4477
4486
|
var candidate = locale;
|
|
4478
4487
|
while (true) {
|
|
@@ -4490,7 +4499,7 @@
|
|
|
4490
4499
|
}
|
|
4491
4500
|
}
|
|
4492
4501
|
|
|
4493
|
-
//
|
|
4502
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/LookupMatcher.js
|
|
4494
4503
|
function LookupMatcher(availableLocales, requestedLocales, getDefaultLocale) {
|
|
4495
4504
|
var result = { locale: "" };
|
|
4496
4505
|
for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {
|
|
@@ -4509,7 +4518,7 @@
|
|
|
4509
4518
|
return result;
|
|
4510
4519
|
}
|
|
4511
4520
|
|
|
4512
|
-
//
|
|
4521
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/UnicodeExtensionValue.js
|
|
4513
4522
|
function UnicodeExtensionValue(extension, key) {
|
|
4514
4523
|
invariant2(key.length === 2, "key must have 2 elements");
|
|
4515
4524
|
var size = extension.length;
|
|
@@ -4548,7 +4557,7 @@
|
|
|
4548
4557
|
return void 0;
|
|
4549
4558
|
}
|
|
4550
4559
|
|
|
4551
|
-
//
|
|
4560
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/ResolveLocale.js
|
|
4552
4561
|
function ResolveLocale(availableLocales, requestedLocales, options, relevantExtensionKeys, localeData, getDefaultLocale) {
|
|
4553
4562
|
var matcher = options.localeMatcher;
|
|
4554
4563
|
var r;
|
|
@@ -4612,7 +4621,7 @@
|
|
|
4612
4621
|
return result;
|
|
4613
4622
|
}
|
|
4614
4623
|
|
|
4615
|
-
//
|
|
4624
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/LookupSupportedLocales.js
|
|
4616
4625
|
function LookupSupportedLocales(availableLocales, requestedLocales) {
|
|
4617
4626
|
var subset = [];
|
|
4618
4627
|
for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {
|
|
@@ -4626,7 +4635,7 @@
|
|
|
4626
4635
|
return subset;
|
|
4627
4636
|
}
|
|
4628
4637
|
|
|
4629
|
-
//
|
|
4638
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/index.js
|
|
4630
4639
|
function match(requestedLocales, availableLocales, defaultLocale, opts) {
|
|
4631
4640
|
return ResolveLocale(availableLocales, CanonicalizeLocaleList2(requestedLocales), {
|
|
4632
4641
|
localeMatcher: (opts === null || opts === void 0 ? void 0 : opts.algorithm) || "best fit"
|
|
@@ -4635,7 +4644,7 @@
|
|
|
4635
4644
|
}).locale;
|
|
4636
4645
|
}
|
|
4637
4646
|
|
|
4638
|
-
//
|
|
4647
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/SupportedLocales.js
|
|
4639
4648
|
function SupportedLocales(availableLocales, requestedLocales, options) {
|
|
4640
4649
|
var matcher = "best fit";
|
|
4641
4650
|
if (options !== void 0) {
|
|
@@ -4648,7 +4657,7 @@
|
|
|
4648
4657
|
return LookupSupportedLocales(Array.from(availableLocales), requestedLocales);
|
|
4649
4658
|
}
|
|
4650
4659
|
|
|
4651
|
-
//
|
|
4660
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/data.js
|
|
4652
4661
|
var MissingLocaleDataError = (
|
|
4653
4662
|
/** @class */
|
|
4654
4663
|
function(_super) {
|
|
@@ -4662,7 +4671,7 @@
|
|
|
4662
4671
|
}(Error)
|
|
4663
4672
|
);
|
|
4664
4673
|
|
|
4665
|
-
//
|
|
4674
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/types/date-time.js
|
|
4666
4675
|
var RangePatternType;
|
|
4667
4676
|
(function(RangePatternType2) {
|
|
4668
4677
|
RangePatternType2["startRange"] = "startRange";
|
|
@@ -4670,7 +4679,7 @@
|
|
|
4670
4679
|
RangePatternType2["endRange"] = "endRange";
|
|
4671
4680
|
})(RangePatternType || (RangePatternType = {}));
|
|
4672
4681
|
|
|
4673
|
-
//
|
|
4682
|
+
// packages/intl-displaynames/abstract/IsValidDateTimeFieldCode.ts
|
|
4674
4683
|
var CODES_FOR_DATE_TIME_FIELD = [
|
|
4675
4684
|
"era",
|
|
4676
4685
|
"year",
|
|
@@ -4689,7 +4698,7 @@
|
|
|
4689
4698
|
return CODES_FOR_DATE_TIME_FIELD.indexOf(field) >= 0;
|
|
4690
4699
|
}
|
|
4691
4700
|
|
|
4692
|
-
//
|
|
4701
|
+
// packages/intl-displaynames/abstract/CanonicalCodeForDisplayNames.ts
|
|
4693
4702
|
var UNICODE_REGION_SUBTAG_REGEX = /^([a-z]{2}|[0-9]{3})$/i;
|
|
4694
4703
|
var ALPHA_4 = /^[a-z]{4}$/i;
|
|
4695
4704
|
var UNICODE_TYPE_REGEX = /^[a-z0-9]{3,8}([-_][a-z0-9]{3,8})*$/i;
|
|
@@ -4716,7 +4725,7 @@
|
|
|
4716
4725
|
if (!isUnicodeScriptSubtag(code)) {
|
|
4717
4726
|
throw RangeError("invalid script");
|
|
4718
4727
|
}
|
|
4719
|
-
return
|
|
4728
|
+
return `${code[0].toUpperCase()}${code.slice(1).toLowerCase()}`;
|
|
4720
4729
|
}
|
|
4721
4730
|
if (type === "calendar") {
|
|
4722
4731
|
if (!isUnicodeLocaleIdentifierType(code)) {
|
|
@@ -4737,120 +4746,179 @@
|
|
|
4737
4746
|
return code.toUpperCase();
|
|
4738
4747
|
}
|
|
4739
4748
|
|
|
4740
|
-
//
|
|
4741
|
-
var
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4749
|
+
// packages/intl-displaynames/index.ts
|
|
4750
|
+
var _DisplayNames = class _DisplayNames {
|
|
4751
|
+
constructor(locales, options) {
|
|
4752
|
+
if (new.target === void 0) {
|
|
4753
|
+
throw TypeError(`Constructor Intl.DisplayNames requires 'new'`);
|
|
4754
|
+
}
|
|
4755
|
+
const requestedLocales = CanonicalizeLocaleList(locales);
|
|
4756
|
+
options = GetOptionsObject(options);
|
|
4757
|
+
const opt = /* @__PURE__ */ Object.create(null);
|
|
4758
|
+
const { localeData } = _DisplayNames;
|
|
4759
|
+
const matcher = GetOption(
|
|
4760
|
+
options,
|
|
4761
|
+
"localeMatcher",
|
|
4762
|
+
"string",
|
|
4763
|
+
["lookup", "best fit"],
|
|
4764
|
+
"best fit"
|
|
4765
|
+
);
|
|
4766
|
+
opt.localeMatcher = matcher;
|
|
4767
|
+
const r = ResolveLocale(
|
|
4768
|
+
Array.from(_DisplayNames.availableLocales),
|
|
4769
|
+
requestedLocales,
|
|
4770
|
+
opt,
|
|
4771
|
+
[],
|
|
4772
|
+
// there is no relevantExtensionKeys
|
|
4773
|
+
_DisplayNames.localeData,
|
|
4774
|
+
_DisplayNames.getDefaultLocale
|
|
4775
|
+
);
|
|
4776
|
+
const style = GetOption(
|
|
4777
|
+
options,
|
|
4778
|
+
"style",
|
|
4779
|
+
"string",
|
|
4780
|
+
["narrow", "short", "long"],
|
|
4781
|
+
"long"
|
|
4782
|
+
);
|
|
4783
|
+
setSlot(this, "style", style);
|
|
4784
|
+
const type = GetOption(
|
|
4785
|
+
options,
|
|
4786
|
+
"type",
|
|
4787
|
+
"string",
|
|
4788
|
+
["language", "region", "script", "currency", "calendar", "dateTimeField"],
|
|
4789
|
+
void 0
|
|
4790
|
+
);
|
|
4791
|
+
if (type === void 0) {
|
|
4792
|
+
throw TypeError(`Intl.DisplayNames constructor requires "type" option`);
|
|
4793
|
+
}
|
|
4794
|
+
setSlot(this, "type", type);
|
|
4795
|
+
const fallback = GetOption(
|
|
4796
|
+
options,
|
|
4797
|
+
"fallback",
|
|
4798
|
+
"string",
|
|
4799
|
+
["code", "none"],
|
|
4800
|
+
"code"
|
|
4801
|
+
);
|
|
4802
|
+
setSlot(this, "fallback", fallback);
|
|
4803
|
+
setSlot(this, "locale", r.locale);
|
|
4804
|
+
const { dataLocale } = r;
|
|
4805
|
+
const dataLocaleData = localeData[dataLocale];
|
|
4806
|
+
invariant(!!dataLocaleData, `Missing locale data for ${dataLocale}`);
|
|
4807
|
+
setSlot(this, "localeData", dataLocaleData);
|
|
4808
|
+
invariant(
|
|
4809
|
+
dataLocaleData !== void 0,
|
|
4810
|
+
`locale data for ${r.locale} does not exist.`
|
|
4811
|
+
);
|
|
4812
|
+
const { types } = dataLocaleData;
|
|
4813
|
+
invariant(typeof types === "object" && types != null, "invalid types data");
|
|
4814
|
+
const typeFields = types[type];
|
|
4815
|
+
invariant(
|
|
4816
|
+
typeof typeFields === "object" && typeFields != null,
|
|
4817
|
+
"invalid typeFields data"
|
|
4818
|
+
);
|
|
4819
|
+
const languageDisplay = GetOption(
|
|
4820
|
+
options,
|
|
4821
|
+
"languageDisplay",
|
|
4822
|
+
"string",
|
|
4823
|
+
["dialect", "standard"],
|
|
4824
|
+
"dialect"
|
|
4825
|
+
);
|
|
4826
|
+
if (type === "language") {
|
|
4827
|
+
setSlot(this, "languageDisplay", languageDisplay);
|
|
4828
|
+
const typeFields2 = types[type][languageDisplay];
|
|
4829
|
+
invariant(
|
|
4830
|
+
typeof typeFields2 === "object" && typeFields2 != null,
|
|
4831
|
+
"invalid language typeFields data"
|
|
4763
4832
|
);
|
|
4764
|
-
var style = GetOption(options, "style", "string", ["narrow", "short", "long"], "long");
|
|
4765
|
-
setSlot(this, "style", style);
|
|
4766
|
-
var type = GetOption(options, "type", "string", ["language", "region", "script", "currency", "calendar", "dateTimeField"], void 0);
|
|
4767
|
-
if (type === void 0) {
|
|
4768
|
-
throw TypeError('Intl.DisplayNames constructor requires "type" option');
|
|
4769
|
-
}
|
|
4770
|
-
setSlot(this, "type", type);
|
|
4771
|
-
var fallback = GetOption(options, "fallback", "string", ["code", "none"], "code");
|
|
4772
|
-
setSlot(this, "fallback", fallback);
|
|
4773
|
-
setSlot(this, "locale", r.locale);
|
|
4774
|
-
var dataLocale = r.dataLocale;
|
|
4775
|
-
var dataLocaleData = localeData[dataLocale];
|
|
4776
|
-
invariant(!!dataLocaleData, "Missing locale data for ".concat(dataLocale));
|
|
4777
|
-
setSlot(this, "localeData", dataLocaleData);
|
|
4778
|
-
invariant(dataLocaleData !== void 0, "locale data for ".concat(r.locale, " does not exist."));
|
|
4779
|
-
var types = dataLocaleData.types;
|
|
4780
|
-
invariant(typeof types === "object" && types != null, "invalid types data");
|
|
4781
|
-
var typeFields = types[type];
|
|
4782
|
-
invariant(typeof typeFields === "object" && typeFields != null, "invalid typeFields data");
|
|
4783
|
-
var languageDisplay = GetOption(options, "languageDisplay", "string", ["dialect", "standard"], "dialect");
|
|
4784
|
-
if (type === "language") {
|
|
4785
|
-
setSlot(this, "languageDisplay", languageDisplay);
|
|
4786
|
-
var typeFields_1 = types[type][languageDisplay];
|
|
4787
|
-
invariant(typeof typeFields_1 === "object" && typeFields_1 != null, "invalid language typeFields data");
|
|
4788
|
-
}
|
|
4789
|
-
var styleFields = type === "language" ? types[type][languageDisplay][style] : types[type][style];
|
|
4790
|
-
invariant(typeof styleFields === "object" && styleFields != null, "invalid styleFields data");
|
|
4791
|
-
setSlot(this, "fields", styleFields);
|
|
4792
4833
|
}
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
var codeAsString = ToString(code);
|
|
4816
|
-
if (!isValidCodeForDisplayNames(type, codeAsString)) {
|
|
4817
|
-
throw RangeError("invalid code for Intl.DisplayNames.prototype.of");
|
|
4818
|
-
}
|
|
4819
|
-
var _a = getMultiInternalSlots(__INTERNAL_SLOT_MAP__, this, "localeData", "style", "fallback"), localeData = _a.localeData, style = _a.style, fallback = _a.fallback;
|
|
4820
|
-
var canonicalCode = CanonicalCodeForDisplayNames(type, codeAsString);
|
|
4821
|
-
var name;
|
|
4822
|
-
if (type === "language") {
|
|
4823
|
-
var languageDisplay = getSlot(this, "languageDisplay");
|
|
4824
|
-
name = getNameForTypeLanguage(languageDisplay, localeData, style, canonicalCode, fallback);
|
|
4825
|
-
} else {
|
|
4826
|
-
var typesData = localeData.types[type];
|
|
4827
|
-
name = typesData[style][canonicalCode] || typesData.long[canonicalCode];
|
|
4828
|
-
}
|
|
4829
|
-
if (name !== void 0) {
|
|
4830
|
-
return name;
|
|
4831
|
-
}
|
|
4832
|
-
if (fallback === "code") {
|
|
4833
|
-
return codeAsString;
|
|
4834
|
+
const styleFields = type === "language" ? types[type][languageDisplay][style] : types[type][style];
|
|
4835
|
+
invariant(
|
|
4836
|
+
typeof styleFields === "object" && styleFields != null,
|
|
4837
|
+
"invalid styleFields data"
|
|
4838
|
+
);
|
|
4839
|
+
setSlot(this, "fields", styleFields);
|
|
4840
|
+
}
|
|
4841
|
+
static supportedLocalesOf(locales, options) {
|
|
4842
|
+
return SupportedLocales(
|
|
4843
|
+
_DisplayNames.availableLocales,
|
|
4844
|
+
CanonicalizeLocaleList(locales),
|
|
4845
|
+
options
|
|
4846
|
+
);
|
|
4847
|
+
}
|
|
4848
|
+
static __addLocaleData(...data2) {
|
|
4849
|
+
for (const { data: d, locale } of data2) {
|
|
4850
|
+
const minimizedLocale = new Intl.Locale(locale).minimize().toString();
|
|
4851
|
+
_DisplayNames.localeData[locale] = _DisplayNames.localeData[minimizedLocale] = d;
|
|
4852
|
+
_DisplayNames.availableLocales.add(minimizedLocale);
|
|
4853
|
+
_DisplayNames.availableLocales.add(locale);
|
|
4854
|
+
if (!_DisplayNames.__defaultLocale) {
|
|
4855
|
+
_DisplayNames.__defaultLocale = minimizedLocale;
|
|
4834
4856
|
}
|
|
4835
|
-
}
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4857
|
+
}
|
|
4858
|
+
}
|
|
4859
|
+
of(code) {
|
|
4860
|
+
checkReceiver(this, "of");
|
|
4861
|
+
const type = getSlot(this, "type");
|
|
4862
|
+
const codeAsString = ToString(code);
|
|
4863
|
+
if (!isValidCodeForDisplayNames(type, codeAsString)) {
|
|
4864
|
+
throw RangeError("invalid code for Intl.DisplayNames.prototype.of");
|
|
4865
|
+
}
|
|
4866
|
+
const { localeData, style, fallback } = getMultiInternalSlots(
|
|
4867
|
+
__INTERNAL_SLOT_MAP__,
|
|
4868
|
+
this,
|
|
4869
|
+
"localeData",
|
|
4870
|
+
"style",
|
|
4871
|
+
"fallback"
|
|
4872
|
+
);
|
|
4873
|
+
let canonicalCode = CanonicalCodeForDisplayNames(type, codeAsString);
|
|
4874
|
+
let name;
|
|
4875
|
+
if (type === "language") {
|
|
4876
|
+
const languageDisplay = getSlot(this, "languageDisplay");
|
|
4877
|
+
name = getNameForTypeLanguage(
|
|
4878
|
+
languageDisplay,
|
|
4879
|
+
localeData,
|
|
4880
|
+
style,
|
|
4881
|
+
canonicalCode,
|
|
4882
|
+
fallback
|
|
4883
|
+
);
|
|
4884
|
+
} else {
|
|
4885
|
+
const typesData = localeData.types[type];
|
|
4886
|
+
name = typesData[style][canonicalCode] || typesData.long[canonicalCode];
|
|
4887
|
+
}
|
|
4888
|
+
if (name !== void 0) {
|
|
4889
|
+
return name;
|
|
4890
|
+
}
|
|
4891
|
+
if (fallback === "code") {
|
|
4892
|
+
return codeAsString;
|
|
4893
|
+
}
|
|
4894
|
+
}
|
|
4895
|
+
resolvedOptions() {
|
|
4896
|
+
checkReceiver(this, "resolvedOptions");
|
|
4897
|
+
return __spreadValues({}, getMultiInternalSlots(
|
|
4898
|
+
__INTERNAL_SLOT_MAP__,
|
|
4899
|
+
this,
|
|
4900
|
+
"locale",
|
|
4901
|
+
"style",
|
|
4902
|
+
"type",
|
|
4903
|
+
"fallback",
|
|
4904
|
+
"languageDisplay"
|
|
4905
|
+
));
|
|
4906
|
+
}
|
|
4907
|
+
static getDefaultLocale() {
|
|
4908
|
+
return _DisplayNames.__defaultLocale;
|
|
4909
|
+
}
|
|
4910
|
+
};
|
|
4911
|
+
__publicField(_DisplayNames, "localeData", {});
|
|
4912
|
+
__publicField(_DisplayNames, "availableLocales", /* @__PURE__ */ new Set());
|
|
4913
|
+
__publicField(_DisplayNames, "__defaultLocale", "");
|
|
4914
|
+
__publicField(_DisplayNames, "polyfilled", true);
|
|
4915
|
+
var DisplayNames = _DisplayNames;
|
|
4850
4916
|
function isValidCodeForDisplayNames(type, code) {
|
|
4851
4917
|
switch (type) {
|
|
4852
4918
|
case "language":
|
|
4853
|
-
return /^[a-z]{2,3}(-[a-z]{4})?(-([a-z]{2}|\d{3}))?(-([a-z\d]{5,8}|\d[a-z\d]{3}))*$/i.test(
|
|
4919
|
+
return /^[a-z]{2,3}(-[a-z]{4})?(-([a-z]{2}|\d{3}))?(-([a-z\d]{5,8}|\d[a-z\d]{3}))*$/i.test(
|
|
4920
|
+
code
|
|
4921
|
+
);
|
|
4854
4922
|
case "region":
|
|
4855
4923
|
return /^([a-z]{2}|\d{3})$/i.test(code);
|
|
4856
4924
|
case "script":
|
|
@@ -4889,27 +4957,29 @@
|
|
|
4889
4957
|
}
|
|
4890
4958
|
function checkReceiver(receiver, methodName) {
|
|
4891
4959
|
if (!(receiver instanceof DisplayNames)) {
|
|
4892
|
-
throw TypeError(
|
|
4960
|
+
throw TypeError(
|
|
4961
|
+
`Method Intl.DisplayNames.prototype.${methodName} called on incompatible receiver`
|
|
4962
|
+
);
|
|
4893
4963
|
}
|
|
4894
4964
|
}
|
|
4895
4965
|
function getNameForTypeLanguage(languageDisplay, localeData, style, canonicalCode, fallback) {
|
|
4896
|
-
|
|
4897
|
-
|
|
4966
|
+
const typesData = localeData.types.language[languageDisplay];
|
|
4967
|
+
const name = typesData[style][canonicalCode] || typesData.long[canonicalCode];
|
|
4898
4968
|
if (name === void 0) {
|
|
4899
|
-
|
|
4969
|
+
const regionMatch = /-([a-z]{2}|\d{3})\b/i.exec(canonicalCode);
|
|
4900
4970
|
if (regionMatch) {
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
if (
|
|
4905
|
-
|
|
4906
|
-
|
|
4971
|
+
const languageSubTag = canonicalCode.substring(0, regionMatch.index) + canonicalCode.substring(regionMatch.index + regionMatch[0].length);
|
|
4972
|
+
const regionSubTag = regionMatch[1];
|
|
4973
|
+
const name2 = typesData[style][languageSubTag] || typesData.long[languageSubTag];
|
|
4974
|
+
if (name2 !== void 0 && regionSubTag) {
|
|
4975
|
+
const regionsData = localeData.types.region;
|
|
4976
|
+
const regionDisplayName = regionsData[style][regionSubTag] || regionsData.long[regionSubTag];
|
|
4907
4977
|
if (regionDisplayName || fallback === "code") {
|
|
4908
|
-
|
|
4909
|
-
return pattern.replace("{0}",
|
|
4978
|
+
const pattern = localeData.patterns.locale;
|
|
4979
|
+
return pattern.replace("{0}", name2).replace("{1}", regionDisplayName || regionSubTag);
|
|
4910
4980
|
}
|
|
4911
4981
|
} else {
|
|
4912
|
-
return
|
|
4982
|
+
return name2;
|
|
4913
4983
|
}
|
|
4914
4984
|
}
|
|
4915
4985
|
} else {
|
|
@@ -4917,12 +4987,12 @@
|
|
|
4917
4987
|
}
|
|
4918
4988
|
}
|
|
4919
4989
|
|
|
4920
|
-
//
|
|
4990
|
+
// packages/intl-displaynames/supported-locales.generated.ts
|
|
4921
4991
|
var supportedLocales = ["af", "af-NA", "agq", "ak", "am", "ar", "ar-AE", "ar-BH", "ar-DJ", "ar-DZ", "ar-EG", "ar-EH", "ar-ER", "ar-IL", "ar-IQ", "ar-JO", "ar-KM", "ar-KW", "ar-LB", "ar-LY", "ar-MA", "ar-MR", "ar-OM", "ar-PS", "ar-QA", "ar-SA", "ar-SD", "ar-SO", "ar-SS", "ar-SY", "ar-TD", "ar-TN", "ar-YE", "as", "asa", "ast", "az", "az-Cyrl", "az-Latn", "bas", "be", "be-tarask", "bem", "bez", "bg", "bm", "bn", "bn-IN", "bo", "bo-IN", "br", "brx", "bs", "bs-Cyrl", "bs-Latn", "ca", "ca-AD", "ca-ES-valencia", "ca-FR", "ca-IT", "ccp", "ccp-IN", "ce", "ceb", "cgg", "chr", "ckb", "ckb-IR", "cs", "cy", "da", "da-GL", "dav", "de", "de-AT", "de-BE", "de-CH", "de-IT", "de-LI", "de-LU", "dje", "doi", "dsb", "dua", "dyo", "dz", "ebu", "ee", "ee-TG", "el", "el-CY", "en", "en-001", "en-150", "en-AE", "en-AG", "en-AI", "en-AS", "en-AT", "en-AU", "en-BB", "en-BE", "en-BI", "en-BM", "en-BS", "en-BW", "en-BZ", "en-CA", "en-CC", "en-CH", "en-CK", "en-CM", "en-CX", "en-CY", "en-DE", "en-DG", "en-DK", "en-DM", "en-ER", "en-FI", "en-FJ", "en-FK", "en-FM", "en-GB", "en-GD", "en-GG", "en-GH", "en-GI", "en-GM", "en-GU", "en-GY", "en-HK", "en-IE", "en-IL", "en-IM", "en-IN", "en-IO", "en-JE", "en-JM", "en-KE", "en-KI", "en-KN", "en-KY", "en-LC", "en-LR", "en-LS", "en-MG", "en-MH", "en-MO", "en-MP", "en-MS", "en-MT", "en-MU", "en-MW", "en-MY", "en-NA", "en-NF", "en-NG", "en-NL", "en-NR", "en-NU", "en-NZ", "en-PG", "en-PH", "en-PK", "en-PN", "en-PR", "en-PW", "en-RW", "en-SB", "en-SC", "en-SD", "en-SE", "en-SG", "en-SH", "en-SI", "en-SL", "en-SS", "en-SX", "en-SZ", "en-TC", "en-TK", "en-TO", "en-TT", "en-TV", "en-TZ", "en-UG", "en-UM", "en-VC", "en-VG", "en-VI", "en-VU", "en-WS", "en-ZA", "en-ZM", "en-ZW", "eo", "es", "es-419", "es-AR", "es-BO", "es-BR", "es-BZ", "es-CL", "es-CO", "es-CR", "es-CU", "es-DO", "es-EA", "es-EC", "es-GQ", "es-GT", "es-HN", "es-IC", "es-MX", "es-NI", "es-PA", "es-PE", "es-PH", "es-PR", "es-PY", "es-SV", "es-US", "es-UY", "es-VE", "et", "eu", "ewo", "fa", "fa-AF", "ff", "ff-Adlm", "ff-Adlm-BF", "ff-Adlm-CM", "ff-Adlm-GH", "ff-Adlm-GM", "ff-Adlm-GW", "ff-Adlm-LR", "ff-Adlm-MR", "ff-Adlm-NE", "ff-Adlm-NG", "ff-Adlm-SL", "ff-Adlm-SN", "ff-Latn", "ff-Latn-BF", "ff-Latn-CM", "ff-Latn-GH", "ff-Latn-GM", "ff-Latn-GN", "ff-Latn-GW", "ff-Latn-LR", "ff-Latn-MR", "ff-Latn-NE", "ff-Latn-NG", "ff-Latn-SL", "fi", "fil", "fo", "fo-DK", "fr", "fr-BE", "fr-BF", "fr-BI", "fr-BJ", "fr-BL", "fr-CA", "fr-CD", "fr-CF", "fr-CG", "fr-CH", "fr-CI", "fr-CM", "fr-DJ", "fr-DZ", "fr-GA", "fr-GF", "fr-GN", "fr-GP", "fr-GQ", "fr-HT", "fr-KM", "fr-LU", "fr-MA", "fr-MC", "fr-MF", "fr-MG", "fr-ML", "fr-MQ", "fr-MR", "fr-MU", "fr-NC", "fr-NE", "fr-PF", "fr-PM", "fr-RE", "fr-RW", "fr-SC", "fr-SN", "fr-SY", "fr-TD", "fr-TG", "fr-TN", "fr-VU", "fr-WF", "fr-YT", "fur", "fy", "ga", "ga-GB", "gd", "gl", "gsw", "gsw-FR", "gsw-LI", "gu", "guz", "gv", "ha", "ha-GH", "ha-NE", "haw", "he", "hi", "hr", "hr-BA", "hsb", "hu", "hy", "ia", "id", "ig", "ii", "is", "it", "it-CH", "it-SM", "it-VA", "ja", "jgo", "jmc", "jv", "ka", "kab", "kam", "kde", "kea", "kgp", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko", "ko-KP", "kok", "ks", "ks-Arab", "ksb", "ksf", "ksh", "ku", "kw", "ky", "lag", "lb", "lg", "lkt", "ln", "ln-AO", "ln-CF", "ln-CG", "lo", "lrc", "lrc-IQ", "lt", "lu", "luo", "luy", "lv", "mai", "mas", "mas-TZ", "mer", "mfe", "mg", "mgh", "mgo", "mi", "mk", "ml", "mn", "mni", "mni-Beng", "mr", "ms", "ms-BN", "ms-ID", "ms-SG", "mt", "mua", "my", "mzn", "naq", "nb", "nb-SJ", "nd", "nds", "nds-NL", "ne", "ne-IN", "nl", "nl-AW", "nl-BE", "nl-BQ", "nl-CW", "nl-SR", "nl-SX", "nmg", "nn", "nnh", "no", "nus", "nyn", "om", "om-KE", "or", "os", "os-RU", "pa", "pa-Arab", "pa-Guru", "pcm", "pl", "ps", "ps-PK", "pt", "pt-AO", "pt-CH", "pt-CV", "pt-GQ", "pt-GW", "pt-LU", "pt-MO", "pt-MZ", "pt-PT", "pt-ST", "pt-TL", "qu", "qu-BO", "qu-EC", "rm", "rn", "ro", "ro-MD", "rof", "ru", "ru-BY", "ru-KG", "ru-KZ", "ru-MD", "ru-UA", "rw", "rwk", "sa", "sah", "saq", "sat", "sat-Olck", "sbp", "sc", "sd", "sd-Arab", "sd-Deva", "se", "se-FI", "se-SE", "seh", "ses", "sg", "shi", "shi-Latn", "shi-Tfng", "si", "sk", "sl", "smn", "sn", "so", "so-DJ", "so-ET", "so-KE", "sq", "sq-MK", "sq-XK", "sr", "sr-Cyrl", "sr-Cyrl-BA", "sr-Cyrl-ME", "sr-Cyrl-XK", "sr-Latn", "sr-Latn-BA", "sr-Latn-ME", "sr-Latn-XK", "su", "su-Latn", "sv", "sv-AX", "sv-FI", "sw", "sw-CD", "sw-KE", "sw-UG", "ta", "ta-LK", "ta-MY", "ta-SG", "te", "teo", "teo-KE", "tg", "th", "ti", "ti-ER", "tk", "to", "tr", "tr-CY", "tt", "twq", "tzm", "ug", "uk", "und", "ur", "ur-IN", "uz", "uz-Arab", "uz-Cyrl", "uz-Latn", "vai", "vai-Latn", "vai-Vaii", "vi", "vun", "wae", "wo", "xh", "xog", "yav", "yi", "yo", "yo-BJ", "yrl", "yrl-CO", "yrl-VE", "yue", "yue-Hans", "yue-Hant", "zgh", "zh", "zh-Hans", "zh-Hans-HK", "zh-Hans-MO", "zh-Hans-SG", "zh-Hant", "zh-Hant-HK", "zh-Hant-MO", "zu"];
|
|
4922
4992
|
|
|
4923
|
-
//
|
|
4993
|
+
// packages/intl-displaynames/should-polyfill.ts
|
|
4924
4994
|
function hasMissingICUBug() {
|
|
4925
|
-
|
|
4995
|
+
const DisplayNames2 = Intl.DisplayNames;
|
|
4926
4996
|
if (DisplayNames2 && !DisplayNames2.polyfilled) {
|
|
4927
4997
|
return new DisplayNames2(["en"], {
|
|
4928
4998
|
type: "region"
|
|
@@ -4931,7 +5001,7 @@
|
|
|
4931
5001
|
return false;
|
|
4932
5002
|
}
|
|
4933
5003
|
function hasScriptBug() {
|
|
4934
|
-
|
|
5004
|
+
const DisplayNames2 = Intl.DisplayNames;
|
|
4935
5005
|
if (DisplayNames2 && !DisplayNames2.polyfilled) {
|
|
4936
5006
|
return new DisplayNames2(["en"], {
|
|
4937
5007
|
type: "script"
|
|
@@ -4943,16 +5013,13 @@
|
|
|
4943
5013
|
if (!locale) {
|
|
4944
5014
|
return true;
|
|
4945
5015
|
}
|
|
4946
|
-
|
|
5016
|
+
const locales = Array.isArray(locale) ? locale : [locale];
|
|
4947
5017
|
return Intl.DisplayNames.supportedLocalesOf(locales).length === locales.length;
|
|
4948
5018
|
}
|
|
4949
5019
|
function _shouldPolyfillWithoutLocale() {
|
|
4950
5020
|
return !Intl.DisplayNames || hasMissingICUBug() || hasScriptBug();
|
|
4951
5021
|
}
|
|
4952
|
-
function shouldPolyfill(locale) {
|
|
4953
|
-
if (locale === void 0) {
|
|
4954
|
-
locale = "en";
|
|
4955
|
-
}
|
|
5022
|
+
function shouldPolyfill(locale = "en") {
|
|
4956
5023
|
try {
|
|
4957
5024
|
if (_shouldPolyfillWithoutLocale() || !supportedLocalesOf(locale)) {
|
|
4958
5025
|
return match([locale], supportedLocales, "en");
|
|
@@ -4962,7 +5029,7 @@
|
|
|
4962
5029
|
}
|
|
4963
5030
|
}
|
|
4964
5031
|
|
|
4965
|
-
//
|
|
5032
|
+
// packages/intl-displaynames/polyfill.ts
|
|
4966
5033
|
if (shouldPolyfill()) {
|
|
4967
5034
|
Object.defineProperty(Intl, "DisplayNames", {
|
|
4968
5035
|
value: DisplayNames,
|
package/should-polyfill.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports._shouldPolyfillWithoutLocale = _shouldPolyfillWithoutLocale;
|
|
4
|
+
exports.shouldPolyfill = shouldPolyfill;
|
|
4
5
|
var intl_localematcher_1 = require("@formatjs/intl-localematcher");
|
|
5
6
|
var supported_locales_generated_1 = require("./supported-locales.generated");
|
|
6
7
|
/**
|
|
@@ -38,7 +39,6 @@ function supportedLocalesOf(locale) {
|
|
|
38
39
|
function _shouldPolyfillWithoutLocale() {
|
|
39
40
|
return !Intl.DisplayNames || hasMissingICUBug() || hasScriptBug();
|
|
40
41
|
}
|
|
41
|
-
exports._shouldPolyfillWithoutLocale = _shouldPolyfillWithoutLocale;
|
|
42
42
|
function shouldPolyfill(locale) {
|
|
43
43
|
if (locale === void 0) { locale = 'en'; }
|
|
44
44
|
try {
|
|
@@ -50,4 +50,3 @@ function shouldPolyfill(locale) {
|
|
|
50
50
|
return true;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
exports.shouldPolyfill = shouldPolyfill;
|