@formatjs/intl-listformat 7.5.7 → 7.5.9
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/package.json +6 -6
- package/polyfill.iife.js +366 -190
- package/should-polyfill.js +1 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/intl-listformat",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.9",
|
|
4
4
|
"description": "Formats JS list in a i18n-safe way",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"intl",
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"url": "git@github.com:formatjs/formatjs.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"tslib": "^2.
|
|
23
|
-
"@formatjs/
|
|
24
|
-
"@formatjs/
|
|
22
|
+
"tslib": "^2.7.0",
|
|
23
|
+
"@formatjs/intl-localematcher": "0.5.5",
|
|
24
|
+
"@formatjs/ecma402-abstract": "2.2.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@formatjs/intl-
|
|
28
|
-
"@formatjs/intl-
|
|
27
|
+
"@formatjs/intl-locale": "4.0.2",
|
|
28
|
+
"@formatjs/intl-getcanonicallocales": "2.3.1"
|
|
29
29
|
},
|
|
30
30
|
"main": "index.js",
|
|
31
31
|
"types": "index.d.ts",
|
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,106 @@
|
|
|
155
132
|
}
|
|
156
133
|
var SIMPLE_UNITS = SANCTIONED_UNITS.map(removeUnitNamespace);
|
|
157
134
|
|
|
158
|
-
//
|
|
135
|
+
// node_modules/.aspect_rules_js/tslib@2.7.0/node_modules/tslib/tslib.es6.mjs
|
|
136
|
+
var extendStatics = function(d, b) {
|
|
137
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
138
|
+
d2.__proto__ = b2;
|
|
139
|
+
} || function(d2, b2) {
|
|
140
|
+
for (var p in b2)
|
|
141
|
+
if (Object.prototype.hasOwnProperty.call(b2, p))
|
|
142
|
+
d2[p] = b2[p];
|
|
143
|
+
};
|
|
144
|
+
return extendStatics(d, b);
|
|
145
|
+
};
|
|
146
|
+
function __extends(d, b) {
|
|
147
|
+
if (typeof b !== "function" && b !== null)
|
|
148
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
149
|
+
extendStatics(d, b);
|
|
150
|
+
function __() {
|
|
151
|
+
this.constructor = d;
|
|
152
|
+
}
|
|
153
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
154
|
+
}
|
|
155
|
+
function __spreadArray(to, from, pack) {
|
|
156
|
+
if (pack || arguments.length === 2)
|
|
157
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
158
|
+
if (ar || !(i in from)) {
|
|
159
|
+
if (!ar)
|
|
160
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
161
|
+
ar[i] = from[i];
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// node_modules/.aspect_rules_js/@formatjs+fast-memoize@0.0.0/node_modules/@formatjs/fast-memoize/lib/index.js
|
|
168
|
+
function memoize(fn, options) {
|
|
169
|
+
var cache = options && options.cache ? options.cache : cacheDefault;
|
|
170
|
+
var serializer = options && options.serializer ? options.serializer : serializerDefault;
|
|
171
|
+
var strategy = options && options.strategy ? options.strategy : strategyDefault;
|
|
172
|
+
return strategy(fn, {
|
|
173
|
+
cache,
|
|
174
|
+
serializer
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
function isPrimitive(value) {
|
|
178
|
+
return value == null || typeof value === "number" || typeof value === "boolean";
|
|
179
|
+
}
|
|
180
|
+
function monadic(fn, cache, serializer, arg) {
|
|
181
|
+
var cacheKey = isPrimitive(arg) ? arg : serializer(arg);
|
|
182
|
+
var computedValue = cache.get(cacheKey);
|
|
183
|
+
if (typeof computedValue === "undefined") {
|
|
184
|
+
computedValue = fn.call(this, arg);
|
|
185
|
+
cache.set(cacheKey, computedValue);
|
|
186
|
+
}
|
|
187
|
+
return computedValue;
|
|
188
|
+
}
|
|
189
|
+
function variadic(fn, cache, serializer) {
|
|
190
|
+
var args = Array.prototype.slice.call(arguments, 3);
|
|
191
|
+
var cacheKey = serializer(args);
|
|
192
|
+
var computedValue = cache.get(cacheKey);
|
|
193
|
+
if (typeof computedValue === "undefined") {
|
|
194
|
+
computedValue = fn.apply(this, args);
|
|
195
|
+
cache.set(cacheKey, computedValue);
|
|
196
|
+
}
|
|
197
|
+
return computedValue;
|
|
198
|
+
}
|
|
199
|
+
function assemble(fn, context, strategy, cache, serialize) {
|
|
200
|
+
return strategy.bind(context, fn, cache, serialize);
|
|
201
|
+
}
|
|
202
|
+
function strategyDefault(fn, options) {
|
|
203
|
+
var strategy = fn.length === 1 ? monadic : variadic;
|
|
204
|
+
return assemble(fn, this, strategy, options.cache.create(), options.serializer);
|
|
205
|
+
}
|
|
206
|
+
function strategyVariadic(fn, options) {
|
|
207
|
+
return assemble(fn, this, variadic, options.cache.create(), options.serializer);
|
|
208
|
+
}
|
|
209
|
+
function strategyMonadic(fn, options) {
|
|
210
|
+
return assemble(fn, this, monadic, options.cache.create(), options.serializer);
|
|
211
|
+
}
|
|
212
|
+
var serializerDefault = function() {
|
|
213
|
+
return JSON.stringify(arguments);
|
|
214
|
+
};
|
|
215
|
+
function ObjectWithoutPrototypeCache() {
|
|
216
|
+
this.cache = /* @__PURE__ */ Object.create(null);
|
|
217
|
+
}
|
|
218
|
+
ObjectWithoutPrototypeCache.prototype.get = function(key) {
|
|
219
|
+
return this.cache[key];
|
|
220
|
+
};
|
|
221
|
+
ObjectWithoutPrototypeCache.prototype.set = function(key, value) {
|
|
222
|
+
this.cache[key] = value;
|
|
223
|
+
};
|
|
224
|
+
var cacheDefault = {
|
|
225
|
+
create: function create() {
|
|
226
|
+
return new ObjectWithoutPrototypeCache();
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
var strategies = {
|
|
230
|
+
variadic: strategyVariadic,
|
|
231
|
+
monadic: strategyMonadic
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/utils.js
|
|
159
235
|
function setInternalSlot(map, pl, field, value) {
|
|
160
236
|
if (!map.get(pl)) {
|
|
161
237
|
map.set(pl, /* @__PURE__ */ Object.create(null));
|
|
@@ -191,20 +267,70 @@
|
|
|
191
267
|
throw new Err(message);
|
|
192
268
|
}
|
|
193
269
|
}
|
|
270
|
+
var createMemoizedNumberFormat = memoize(function() {
|
|
271
|
+
var _a;
|
|
272
|
+
var args = [];
|
|
273
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
274
|
+
args[_i] = arguments[_i];
|
|
275
|
+
}
|
|
276
|
+
return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
|
|
277
|
+
}, {
|
|
278
|
+
strategy: strategies.variadic
|
|
279
|
+
});
|
|
280
|
+
var createMemoizedDateTimeFormat = memoize(function() {
|
|
281
|
+
var _a;
|
|
282
|
+
var args = [];
|
|
283
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
284
|
+
args[_i] = arguments[_i];
|
|
285
|
+
}
|
|
286
|
+
return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
|
|
287
|
+
}, {
|
|
288
|
+
strategy: strategies.variadic
|
|
289
|
+
});
|
|
290
|
+
var createMemoizedPluralRules = memoize(function() {
|
|
291
|
+
var _a;
|
|
292
|
+
var args = [];
|
|
293
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
294
|
+
args[_i] = arguments[_i];
|
|
295
|
+
}
|
|
296
|
+
return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();
|
|
297
|
+
}, {
|
|
298
|
+
strategy: strategies.variadic
|
|
299
|
+
});
|
|
300
|
+
var createMemoizedLocale = memoize(function() {
|
|
301
|
+
var _a;
|
|
302
|
+
var args = [];
|
|
303
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
304
|
+
args[_i] = arguments[_i];
|
|
305
|
+
}
|
|
306
|
+
return new ((_a = Intl.Locale).bind.apply(_a, __spreadArray([void 0], args, false)))();
|
|
307
|
+
}, {
|
|
308
|
+
strategy: strategies.variadic
|
|
309
|
+
});
|
|
310
|
+
var createMemoizedListFormat = memoize(function() {
|
|
311
|
+
var _a;
|
|
312
|
+
var args = [];
|
|
313
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
314
|
+
args[_i] = arguments[_i];
|
|
315
|
+
}
|
|
316
|
+
return new ((_a = Intl.ListFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
|
|
317
|
+
}, {
|
|
318
|
+
strategy: strategies.variadic
|
|
319
|
+
});
|
|
194
320
|
|
|
195
|
-
//
|
|
321
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/regex.generated.js
|
|
196
322
|
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]/;
|
|
197
323
|
|
|
198
|
-
//
|
|
324
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/format_to_parts.js
|
|
199
325
|
var CARET_S_UNICODE_REGEX = new RegExp("^".concat(S_UNICODE_REGEX.source));
|
|
200
326
|
var S_DOLLAR_UNICODE_REGEX = new RegExp("".concat(S_UNICODE_REGEX.source, "$"));
|
|
201
327
|
|
|
202
|
-
//
|
|
328
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/CanonicalizeLocaleList.js
|
|
203
329
|
function CanonicalizeLocaleList2(locales) {
|
|
204
330
|
return Intl.getCanonicalLocales(locales);
|
|
205
331
|
}
|
|
206
332
|
|
|
207
|
-
//
|
|
333
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/languageMatching.js
|
|
208
334
|
var data = {
|
|
209
335
|
supplemental: {
|
|
210
336
|
languageMatching: {
|
|
@@ -2826,7 +2952,7 @@
|
|
|
2826
2952
|
}
|
|
2827
2953
|
};
|
|
2828
2954
|
|
|
2829
|
-
//
|
|
2955
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/regions.generated.js
|
|
2830
2956
|
var regions = {
|
|
2831
2957
|
"001": [
|
|
2832
2958
|
"001",
|
|
@@ -4161,7 +4287,7 @@
|
|
|
4161
4287
|
]
|
|
4162
4288
|
};
|
|
4163
4289
|
|
|
4164
|
-
//
|
|
4290
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/utils.js
|
|
4165
4291
|
var UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi;
|
|
4166
4292
|
function invariant2(condition, message, Err) {
|
|
4167
4293
|
if (Err === void 0) {
|
|
@@ -4315,7 +4441,7 @@
|
|
|
4315
4441
|
return result;
|
|
4316
4442
|
}
|
|
4317
4443
|
|
|
4318
|
-
//
|
|
4444
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/BestFitMatcher.js
|
|
4319
4445
|
function BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale) {
|
|
4320
4446
|
var foundLocale;
|
|
4321
4447
|
var extension;
|
|
@@ -4340,7 +4466,7 @@
|
|
|
4340
4466
|
};
|
|
4341
4467
|
}
|
|
4342
4468
|
|
|
4343
|
-
//
|
|
4469
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/BestAvailableLocale.js
|
|
4344
4470
|
function BestAvailableLocale(availableLocales, locale) {
|
|
4345
4471
|
var candidate = locale;
|
|
4346
4472
|
while (true) {
|
|
@@ -4358,7 +4484,7 @@
|
|
|
4358
4484
|
}
|
|
4359
4485
|
}
|
|
4360
4486
|
|
|
4361
|
-
//
|
|
4487
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/LookupMatcher.js
|
|
4362
4488
|
function LookupMatcher(availableLocales, requestedLocales, getDefaultLocale) {
|
|
4363
4489
|
var result = { locale: "" };
|
|
4364
4490
|
for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {
|
|
@@ -4377,7 +4503,7 @@
|
|
|
4377
4503
|
return result;
|
|
4378
4504
|
}
|
|
4379
4505
|
|
|
4380
|
-
//
|
|
4506
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/UnicodeExtensionValue.js
|
|
4381
4507
|
function UnicodeExtensionValue(extension, key) {
|
|
4382
4508
|
invariant2(key.length === 2, "key must have 2 elements");
|
|
4383
4509
|
var size = extension.length;
|
|
@@ -4416,7 +4542,7 @@
|
|
|
4416
4542
|
return void 0;
|
|
4417
4543
|
}
|
|
4418
4544
|
|
|
4419
|
-
//
|
|
4545
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/ResolveLocale.js
|
|
4420
4546
|
function ResolveLocale(availableLocales, requestedLocales, options, relevantExtensionKeys, localeData, getDefaultLocale) {
|
|
4421
4547
|
var matcher = options.localeMatcher;
|
|
4422
4548
|
var r;
|
|
@@ -4480,7 +4606,7 @@
|
|
|
4480
4606
|
return result;
|
|
4481
4607
|
}
|
|
4482
4608
|
|
|
4483
|
-
//
|
|
4609
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/LookupSupportedLocales.js
|
|
4484
4610
|
function LookupSupportedLocales(availableLocales, requestedLocales) {
|
|
4485
4611
|
var subset = [];
|
|
4486
4612
|
for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {
|
|
@@ -4494,7 +4620,7 @@
|
|
|
4494
4620
|
return subset;
|
|
4495
4621
|
}
|
|
4496
4622
|
|
|
4497
|
-
//
|
|
4623
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/index.js
|
|
4498
4624
|
function match(requestedLocales, availableLocales, defaultLocale, opts) {
|
|
4499
4625
|
return ResolveLocale(availableLocales, CanonicalizeLocaleList2(requestedLocales), {
|
|
4500
4626
|
localeMatcher: (opts === null || opts === void 0 ? void 0 : opts.algorithm) || "best fit"
|
|
@@ -4503,7 +4629,7 @@
|
|
|
4503
4629
|
}).locale;
|
|
4504
4630
|
}
|
|
4505
4631
|
|
|
4506
|
-
//
|
|
4632
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/PartitionPattern.js
|
|
4507
4633
|
function PartitionPattern(pattern) {
|
|
4508
4634
|
var result = [];
|
|
4509
4635
|
var beginIndex = pattern.indexOf("{");
|
|
@@ -4535,7 +4661,7 @@
|
|
|
4535
4661
|
return result;
|
|
4536
4662
|
}
|
|
4537
4663
|
|
|
4538
|
-
//
|
|
4664
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/SupportedLocales.js
|
|
4539
4665
|
function SupportedLocales(availableLocales, requestedLocales, options) {
|
|
4540
4666
|
var matcher = "best fit";
|
|
4541
4667
|
if (options !== void 0) {
|
|
@@ -4548,7 +4674,7 @@
|
|
|
4548
4674
|
return LookupSupportedLocales(Array.from(availableLocales), requestedLocales);
|
|
4549
4675
|
}
|
|
4550
4676
|
|
|
4551
|
-
//
|
|
4677
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/data.js
|
|
4552
4678
|
var MissingLocaleDataError = (
|
|
4553
4679
|
/** @class */
|
|
4554
4680
|
function(_super) {
|
|
@@ -4562,7 +4688,7 @@
|
|
|
4562
4688
|
}(Error)
|
|
4563
4689
|
);
|
|
4564
4690
|
|
|
4565
|
-
//
|
|
4691
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/types/date-time.js
|
|
4566
4692
|
var RangePatternType;
|
|
4567
4693
|
(function(RangePatternType2) {
|
|
4568
4694
|
RangePatternType2["startRange"] = "startRange";
|
|
@@ -4570,45 +4696,48 @@
|
|
|
4570
4696
|
RangePatternType2["endRange"] = "endRange";
|
|
4571
4697
|
})(RangePatternType || (RangePatternType = {}));
|
|
4572
4698
|
|
|
4573
|
-
//
|
|
4699
|
+
// packages/intl-listformat/index.ts
|
|
4574
4700
|
function validateInstance(instance, method) {
|
|
4575
4701
|
if (!(instance instanceof ListFormat)) {
|
|
4576
|
-
throw new TypeError(
|
|
4702
|
+
throw new TypeError(
|
|
4703
|
+
`Method Intl.ListFormat.prototype.${method} called on incompatible receiver ${String(
|
|
4704
|
+
instance
|
|
4705
|
+
)}`
|
|
4706
|
+
);
|
|
4577
4707
|
}
|
|
4578
4708
|
}
|
|
4579
4709
|
function stringListFromIterable(list) {
|
|
4580
4710
|
if (list === void 0) {
|
|
4581
4711
|
return [];
|
|
4582
4712
|
}
|
|
4583
|
-
|
|
4584
|
-
for (
|
|
4585
|
-
var el = list_1[_i];
|
|
4713
|
+
const result = [];
|
|
4714
|
+
for (const el of list) {
|
|
4586
4715
|
if (typeof el !== "string") {
|
|
4587
|
-
throw new TypeError(
|
|
4716
|
+
throw new TypeError(`array list[${list.indexOf(el)}] is not type String`);
|
|
4588
4717
|
}
|
|
4589
4718
|
result.push(el);
|
|
4590
4719
|
}
|
|
4591
4720
|
return result;
|
|
4592
4721
|
}
|
|
4593
4722
|
function createPartsFromList(internalSlotMap, lf, list) {
|
|
4594
|
-
|
|
4723
|
+
const size = list.length;
|
|
4595
4724
|
if (size === 0) {
|
|
4596
4725
|
return [];
|
|
4597
4726
|
}
|
|
4598
4727
|
if (size === 2) {
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4728
|
+
const pattern = getInternalSlot(internalSlotMap, lf, "templatePair");
|
|
4729
|
+
const first = { type: "element", value: list[0] };
|
|
4730
|
+
const second = { type: "element", value: list[1] };
|
|
4602
4731
|
return deconstructPattern(pattern, { "0": first, "1": second });
|
|
4603
4732
|
}
|
|
4604
|
-
|
|
4733
|
+
const last = {
|
|
4605
4734
|
type: "element",
|
|
4606
4735
|
value: list[size - 1]
|
|
4607
4736
|
};
|
|
4608
|
-
|
|
4609
|
-
|
|
4737
|
+
let parts = last;
|
|
4738
|
+
let i = size - 2;
|
|
4610
4739
|
while (i >= 0) {
|
|
4611
|
-
|
|
4740
|
+
let pattern;
|
|
4612
4741
|
if (i === 0) {
|
|
4613
4742
|
pattern = getInternalSlot(internalSlotMap, lf, "templateStart");
|
|
4614
4743
|
} else if (i < size - 2) {
|
|
@@ -4616,28 +4745,27 @@
|
|
|
4616
4745
|
} else {
|
|
4617
4746
|
pattern = getInternalSlot(internalSlotMap, lf, "templateEnd");
|
|
4618
4747
|
}
|
|
4619
|
-
|
|
4748
|
+
const head = { type: "element", value: list[i] };
|
|
4620
4749
|
parts = deconstructPattern(pattern, { "0": head, "1": parts });
|
|
4621
4750
|
i--;
|
|
4622
4751
|
}
|
|
4623
4752
|
return parts;
|
|
4624
4753
|
}
|
|
4625
4754
|
function deconstructPattern(pattern, placeables) {
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
for (
|
|
4629
|
-
|
|
4630
|
-
var part = patternPart.type;
|
|
4755
|
+
const patternParts = PartitionPattern(pattern);
|
|
4756
|
+
const result = [];
|
|
4757
|
+
for (const patternPart of patternParts) {
|
|
4758
|
+
const { type: part } = patternPart;
|
|
4631
4759
|
if (isLiteralPart(patternPart)) {
|
|
4632
4760
|
result.push({
|
|
4633
4761
|
type: "literal",
|
|
4634
4762
|
value: patternPart.value
|
|
4635
4763
|
});
|
|
4636
4764
|
} else {
|
|
4637
|
-
invariant(part in placeables,
|
|
4638
|
-
|
|
4765
|
+
invariant(part in placeables, `${part} is missing from placables`);
|
|
4766
|
+
const subst = placeables[part];
|
|
4639
4767
|
if (Array.isArray(subst)) {
|
|
4640
|
-
result.push
|
|
4768
|
+
result.push(...subst);
|
|
4641
4769
|
} else {
|
|
4642
4770
|
result.push(subst);
|
|
4643
4771
|
}
|
|
@@ -4645,103 +4773,154 @@
|
|
|
4645
4773
|
}
|
|
4646
4774
|
return result;
|
|
4647
4775
|
}
|
|
4648
|
-
var
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
if (!newTarget) {
|
|
4654
|
-
throw new TypeError("Intl.ListFormat must be called with 'new'");
|
|
4655
|
-
}
|
|
4656
|
-
setInternalSlot(ListFormat2.__INTERNAL_SLOT_MAP__, this, "initializedListFormat", true);
|
|
4657
|
-
var requestedLocales = CanonicalizeLocaleList(locales);
|
|
4658
|
-
var opt = /* @__PURE__ */ Object.create(null);
|
|
4659
|
-
var opts = GetOptionsObject(options);
|
|
4660
|
-
var matcher = GetOption(opts, "localeMatcher", "string", ["best fit", "lookup"], "best fit");
|
|
4661
|
-
opt.localeMatcher = matcher;
|
|
4662
|
-
var localeData = ListFormat2.localeData;
|
|
4663
|
-
var r = ResolveLocale(ListFormat2.availableLocales, requestedLocales, opt, ListFormat2.relevantExtensionKeys, localeData, ListFormat2.getDefaultLocale);
|
|
4664
|
-
setInternalSlot(ListFormat2.__INTERNAL_SLOT_MAP__, this, "locale", r.locale);
|
|
4665
|
-
var type = GetOption(opts, "type", "string", ["conjunction", "disjunction", "unit"], "conjunction");
|
|
4666
|
-
setInternalSlot(ListFormat2.__INTERNAL_SLOT_MAP__, this, "type", type);
|
|
4667
|
-
var style = GetOption(opts, "style", "string", ["long", "short", "narrow"], "long");
|
|
4668
|
-
setInternalSlot(ListFormat2.__INTERNAL_SLOT_MAP__, this, "style", style);
|
|
4669
|
-
var dataLocale = r.dataLocale;
|
|
4670
|
-
var dataLocaleData = localeData[dataLocale];
|
|
4671
|
-
invariant(!!dataLocaleData, "Missing locale data for ".concat(dataLocale));
|
|
4672
|
-
var dataLocaleTypes = dataLocaleData[type];
|
|
4673
|
-
var templates = dataLocaleTypes[style];
|
|
4674
|
-
setInternalSlot(ListFormat2.__INTERNAL_SLOT_MAP__, this, "templatePair", templates.pair);
|
|
4675
|
-
setInternalSlot(ListFormat2.__INTERNAL_SLOT_MAP__, this, "templateStart", templates.start);
|
|
4676
|
-
setInternalSlot(ListFormat2.__INTERNAL_SLOT_MAP__, this, "templateMiddle", templates.middle);
|
|
4677
|
-
setInternalSlot(ListFormat2.__INTERNAL_SLOT_MAP__, this, "templateEnd", templates.end);
|
|
4776
|
+
var _ListFormat = class _ListFormat {
|
|
4777
|
+
constructor(locales, options) {
|
|
4778
|
+
const newTarget = this && this instanceof _ListFormat ? this.constructor : void 0;
|
|
4779
|
+
if (!newTarget) {
|
|
4780
|
+
throw new TypeError("Intl.ListFormat must be called with 'new'");
|
|
4678
4781
|
}
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4782
|
+
setInternalSlot(
|
|
4783
|
+
_ListFormat.__INTERNAL_SLOT_MAP__,
|
|
4784
|
+
this,
|
|
4785
|
+
"initializedListFormat",
|
|
4786
|
+
true
|
|
4787
|
+
);
|
|
4788
|
+
const requestedLocales = CanonicalizeLocaleList(locales);
|
|
4789
|
+
const opt = /* @__PURE__ */ Object.create(null);
|
|
4790
|
+
const opts = GetOptionsObject(options);
|
|
4791
|
+
const matcher = GetOption(
|
|
4792
|
+
opts,
|
|
4793
|
+
"localeMatcher",
|
|
4794
|
+
"string",
|
|
4795
|
+
["best fit", "lookup"],
|
|
4796
|
+
"best fit"
|
|
4797
|
+
);
|
|
4798
|
+
opt.localeMatcher = matcher;
|
|
4799
|
+
const { localeData } = _ListFormat;
|
|
4800
|
+
const r = ResolveLocale(
|
|
4801
|
+
_ListFormat.availableLocales,
|
|
4802
|
+
requestedLocales,
|
|
4803
|
+
opt,
|
|
4804
|
+
_ListFormat.relevantExtensionKeys,
|
|
4805
|
+
localeData,
|
|
4806
|
+
_ListFormat.getDefaultLocale
|
|
4807
|
+
);
|
|
4808
|
+
setInternalSlot(_ListFormat.__INTERNAL_SLOT_MAP__, this, "locale", r.locale);
|
|
4809
|
+
const type = GetOption(
|
|
4810
|
+
opts,
|
|
4811
|
+
"type",
|
|
4812
|
+
"string",
|
|
4813
|
+
["conjunction", "disjunction", "unit"],
|
|
4814
|
+
"conjunction"
|
|
4815
|
+
);
|
|
4816
|
+
setInternalSlot(_ListFormat.__INTERNAL_SLOT_MAP__, this, "type", type);
|
|
4817
|
+
const style = GetOption(
|
|
4818
|
+
opts,
|
|
4819
|
+
"style",
|
|
4820
|
+
"string",
|
|
4821
|
+
["long", "short", "narrow"],
|
|
4822
|
+
"long"
|
|
4823
|
+
);
|
|
4824
|
+
setInternalSlot(_ListFormat.__INTERNAL_SLOT_MAP__, this, "style", style);
|
|
4825
|
+
const { dataLocale } = r;
|
|
4826
|
+
const dataLocaleData = localeData[dataLocale];
|
|
4827
|
+
invariant(!!dataLocaleData, `Missing locale data for ${dataLocale}`);
|
|
4828
|
+
const dataLocaleTypes = dataLocaleData[type];
|
|
4829
|
+
const templates = dataLocaleTypes[style];
|
|
4830
|
+
setInternalSlot(
|
|
4831
|
+
_ListFormat.__INTERNAL_SLOT_MAP__,
|
|
4832
|
+
this,
|
|
4833
|
+
"templatePair",
|
|
4834
|
+
templates.pair
|
|
4835
|
+
);
|
|
4836
|
+
setInternalSlot(
|
|
4837
|
+
_ListFormat.__INTERNAL_SLOT_MAP__,
|
|
4838
|
+
this,
|
|
4839
|
+
"templateStart",
|
|
4840
|
+
templates.start
|
|
4841
|
+
);
|
|
4842
|
+
setInternalSlot(
|
|
4843
|
+
_ListFormat.__INTERNAL_SLOT_MAP__,
|
|
4844
|
+
this,
|
|
4845
|
+
"templateMiddle",
|
|
4846
|
+
templates.middle
|
|
4847
|
+
);
|
|
4848
|
+
setInternalSlot(
|
|
4849
|
+
_ListFormat.__INTERNAL_SLOT_MAP__,
|
|
4850
|
+
this,
|
|
4851
|
+
"templateEnd",
|
|
4852
|
+
templates.end
|
|
4853
|
+
);
|
|
4854
|
+
}
|
|
4855
|
+
format(elements) {
|
|
4856
|
+
validateInstance(this, "format");
|
|
4857
|
+
let result = "";
|
|
4858
|
+
const parts = createPartsFromList(
|
|
4859
|
+
_ListFormat.__INTERNAL_SLOT_MAP__,
|
|
4860
|
+
this,
|
|
4861
|
+
stringListFromIterable(elements)
|
|
4862
|
+
);
|
|
4863
|
+
if (!Array.isArray(parts)) {
|
|
4864
|
+
return parts.value;
|
|
4865
|
+
}
|
|
4866
|
+
for (const p of parts) {
|
|
4867
|
+
result += p.value;
|
|
4868
|
+
}
|
|
4869
|
+
return result;
|
|
4870
|
+
}
|
|
4871
|
+
formatToParts(elements) {
|
|
4872
|
+
validateInstance(this, "format");
|
|
4873
|
+
const parts = createPartsFromList(
|
|
4874
|
+
_ListFormat.__INTERNAL_SLOT_MAP__,
|
|
4875
|
+
this,
|
|
4876
|
+
stringListFromIterable(elements)
|
|
4877
|
+
);
|
|
4878
|
+
if (!Array.isArray(parts)) {
|
|
4879
|
+
return [parts];
|
|
4880
|
+
}
|
|
4881
|
+
const result = [];
|
|
4882
|
+
for (const part of parts) {
|
|
4883
|
+
result.push(__spreadValues({}, part));
|
|
4884
|
+
}
|
|
4885
|
+
return result;
|
|
4886
|
+
}
|
|
4887
|
+
resolvedOptions() {
|
|
4888
|
+
validateInstance(this, "resolvedOptions");
|
|
4889
|
+
return {
|
|
4890
|
+
locale: getInternalSlot(_ListFormat.__INTERNAL_SLOT_MAP__, this, "locale"),
|
|
4891
|
+
type: getInternalSlot(_ListFormat.__INTERNAL_SLOT_MAP__, this, "type"),
|
|
4892
|
+
style: getInternalSlot(_ListFormat.__INTERNAL_SLOT_MAP__, this, "style")
|
|
4715
4893
|
};
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4894
|
+
}
|
|
4895
|
+
static supportedLocalesOf(locales, options) {
|
|
4896
|
+
return SupportedLocales(
|
|
4897
|
+
_ListFormat.availableLocales,
|
|
4898
|
+
CanonicalizeLocaleList(locales),
|
|
4899
|
+
options
|
|
4900
|
+
);
|
|
4901
|
+
}
|
|
4902
|
+
static __addLocaleData(...data2) {
|
|
4903
|
+
for (const { data: d, locale } of data2) {
|
|
4904
|
+
const minimizedLocale = new Intl.Locale(locale).minimize().toString();
|
|
4905
|
+
_ListFormat.localeData[locale] = _ListFormat.localeData[minimizedLocale] = d;
|
|
4906
|
+
_ListFormat.availableLocales.add(minimizedLocale);
|
|
4907
|
+
_ListFormat.availableLocales.add(locale);
|
|
4908
|
+
if (!_ListFormat.__defaultLocale) {
|
|
4909
|
+
_ListFormat.__defaultLocale = minimizedLocale;
|
|
4730
4910
|
}
|
|
4731
|
-
}
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
var lib_default = ListFormat;
|
|
4911
|
+
}
|
|
4912
|
+
}
|
|
4913
|
+
static getDefaultLocale() {
|
|
4914
|
+
return _ListFormat.__defaultLocale;
|
|
4915
|
+
}
|
|
4916
|
+
};
|
|
4917
|
+
__publicField(_ListFormat, "localeData", {});
|
|
4918
|
+
__publicField(_ListFormat, "availableLocales", /* @__PURE__ */ new Set());
|
|
4919
|
+
__publicField(_ListFormat, "__defaultLocale", "");
|
|
4920
|
+
__publicField(_ListFormat, "relevantExtensionKeys", []);
|
|
4921
|
+
__publicField(_ListFormat, "polyfilled", true);
|
|
4922
|
+
__publicField(_ListFormat, "__INTERNAL_SLOT_MAP__", /* @__PURE__ */ new WeakMap());
|
|
4923
|
+
var ListFormat = _ListFormat;
|
|
4745
4924
|
try {
|
|
4746
4925
|
if (typeof Symbol !== "undefined") {
|
|
4747
4926
|
Object.defineProperty(ListFormat.prototype, Symbol.toStringTag, {
|
|
@@ -4766,30 +4945,27 @@
|
|
|
4766
4945
|
} catch (e) {
|
|
4767
4946
|
}
|
|
4768
4947
|
|
|
4769
|
-
//
|
|
4948
|
+
// packages/intl-listformat/supported-locales.generated.ts
|
|
4770
4949
|
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"];
|
|
4771
4950
|
|
|
4772
|
-
//
|
|
4951
|
+
// packages/intl-listformat/should-polyfill.ts
|
|
4773
4952
|
function supportedLocalesOf(locale) {
|
|
4774
4953
|
if (!locale) {
|
|
4775
4954
|
return true;
|
|
4776
4955
|
}
|
|
4777
|
-
|
|
4956
|
+
const locales = Array.isArray(locale) ? locale : [locale];
|
|
4778
4957
|
return Intl.ListFormat.supportedLocalesOf(locales).length === locales.length;
|
|
4779
4958
|
}
|
|
4780
|
-
function shouldPolyfill(locale) {
|
|
4781
|
-
if (locale === void 0) {
|
|
4782
|
-
locale = "en";
|
|
4783
|
-
}
|
|
4959
|
+
function shouldPolyfill(locale = "en") {
|
|
4784
4960
|
if (!("ListFormat" in Intl) || !supportedLocalesOf(locale)) {
|
|
4785
4961
|
return locale ? match([locale], supportedLocales, "en") : void 0;
|
|
4786
4962
|
}
|
|
4787
4963
|
}
|
|
4788
4964
|
|
|
4789
|
-
//
|
|
4965
|
+
// packages/intl-listformat/polyfill.ts
|
|
4790
4966
|
if (shouldPolyfill()) {
|
|
4791
4967
|
Object.defineProperty(Intl, "ListFormat", {
|
|
4792
|
-
value:
|
|
4968
|
+
value: ListFormat,
|
|
4793
4969
|
writable: true,
|
|
4794
4970
|
enumerable: false,
|
|
4795
4971
|
configurable: true
|
package/should-polyfill.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.shouldPolyfill =
|
|
3
|
+
exports.shouldPolyfill = shouldPolyfill;
|
|
4
4
|
var intl_localematcher_1 = require("@formatjs/intl-localematcher");
|
|
5
5
|
var supported_locales_generated_1 = require("./supported-locales.generated");
|
|
6
6
|
function supportedLocalesOf(locale) {
|
|
@@ -17,4 +17,3 @@ function shouldPolyfill(locale) {
|
|
|
17
17
|
return locale ? (0, intl_localematcher_1.match)([locale], supported_locales_generated_1.supportedLocales, 'en') : undefined;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
exports.shouldPolyfill = shouldPolyfill;
|