@formatjs/intl-locale 4.2.4 → 4.2.6
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/README.md +1 -1
- package/calendars.generated.js +0 -1
- package/character-orders.generated.js +0 -1
- package/get_internal_slots.js +0 -1
- package/hour-cycles.generated.js +0 -1
- package/index.js +0 -1
- package/lib/calendars.generated.js +0 -1
- package/lib/character-orders.generated.js +0 -1
- package/lib/get_internal_slots.js +0 -1
- package/lib/hour-cycles.generated.js +0 -1
- package/lib/index.js +0 -1
- package/lib/numbering-systems.generated.js +0 -1
- package/lib/polyfill-force.js +0 -1
- package/lib/polyfill.js +0 -1
- package/lib/preference-data.js +0 -1
- package/lib/should-polyfill.js +0 -1
- package/lib/timezones.generated.js +0 -1
- package/lib/week-data.generated.js +0 -1
- package/numbering-systems.generated.js +0 -1
- package/package.json +4 -4
- package/polyfill-force.js +0 -1
- package/polyfill.iife.js +503 -397
- package/polyfill.js +0 -1
- package/preference-data.js +0 -1
- package/should-polyfill.js +0 -1
- package/timezones.generated.js +0 -1
- package/week-data.generated.js +0 -1
- package/calendars.generated.js.map +0 -1
- package/character-orders.generated.js.map +0 -1
- package/get_internal_slots.js.map +0 -1
- package/hour-cycles.generated.js.map +0 -1
- package/index.js.map +0 -1
- package/lib/calendars.generated.js.map +0 -1
- package/lib/character-orders.generated.js.map +0 -1
- package/lib/get_internal_slots.js.map +0 -1
- package/lib/hour-cycles.generated.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/numbering-systems.generated.js.map +0 -1
- package/lib/polyfill-force.js.map +0 -1
- package/lib/polyfill.js.map +0 -1
- package/lib/preference-data.js.map +0 -1
- package/lib/should-polyfill.js.map +0 -1
- package/lib/timezones.generated.js.map +0 -1
- package/lib/week-data.generated.js.map +0 -1
- package/numbering-systems.generated.js.map +0 -1
- package/polyfill-force.js.map +0 -1
- package/polyfill.js.map +0 -1
- package/preference-data.js.map +0 -1
- package/should-polyfill.js.map +0 -1
- package/timezones.generated.js.map +0 -1
- package/week-data.generated.js.map +0 -1
package/polyfill.iife.js
CHANGED
|
@@ -1416,15 +1416,21 @@
|
|
|
1416
1416
|
var serializerDefault2 = function() {
|
|
1417
1417
|
return JSON.stringify(arguments);
|
|
1418
1418
|
};
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1419
|
+
var ObjectWithoutPrototypeCache2 = (
|
|
1420
|
+
/** @class */
|
|
1421
|
+
function() {
|
|
1422
|
+
function ObjectWithoutPrototypeCache3() {
|
|
1423
|
+
this.cache = /* @__PURE__ */ Object.create(null);
|
|
1424
|
+
}
|
|
1425
|
+
ObjectWithoutPrototypeCache3.prototype.get = function(key) {
|
|
1426
|
+
return this.cache[key];
|
|
1427
|
+
};
|
|
1428
|
+
ObjectWithoutPrototypeCache3.prototype.set = function(key, value) {
|
|
1429
|
+
this.cache[key] = value;
|
|
1430
|
+
};
|
|
1431
|
+
return ObjectWithoutPrototypeCache3;
|
|
1432
|
+
}()
|
|
1433
|
+
);
|
|
1428
1434
|
var cacheDefault2 = {
|
|
1429
1435
|
create: function create2() {
|
|
1430
1436
|
return new ObjectWithoutPrototypeCache2();
|
|
@@ -7379,6 +7385,74 @@
|
|
|
7379
7385
|
}
|
|
7380
7386
|
});
|
|
7381
7387
|
|
|
7388
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/CanonicalizeUValue.js
|
|
7389
|
+
var require_CanonicalizeUValue = __commonJS({
|
|
7390
|
+
"node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/CanonicalizeUValue.js"(exports) {
|
|
7391
|
+
"use strict";
|
|
7392
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7393
|
+
exports.CanonicalizeUValue = CanonicalizeUValue2;
|
|
7394
|
+
var utils_1 = require_utils2();
|
|
7395
|
+
function CanonicalizeUValue2(ukey, uvalue) {
|
|
7396
|
+
var lowerValue = uvalue.toLowerCase();
|
|
7397
|
+
(0, utils_1.invariant)(ukey !== void 0, "ukey must be defined");
|
|
7398
|
+
var canonicalized = lowerValue;
|
|
7399
|
+
return canonicalized;
|
|
7400
|
+
}
|
|
7401
|
+
}
|
|
7402
|
+
});
|
|
7403
|
+
|
|
7404
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/CanonicalizeUnicodeLocaleId.js
|
|
7405
|
+
var require_CanonicalizeUnicodeLocaleId = __commonJS({
|
|
7406
|
+
"node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/CanonicalizeUnicodeLocaleId.js"(exports) {
|
|
7407
|
+
"use strict";
|
|
7408
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7409
|
+
exports.CanonicalizeUnicodeLocaleId = CanonicalizeUnicodeLocaleId2;
|
|
7410
|
+
function CanonicalizeUnicodeLocaleId2(locale) {
|
|
7411
|
+
return Intl.getCanonicalLocales(locale)[0];
|
|
7412
|
+
}
|
|
7413
|
+
}
|
|
7414
|
+
});
|
|
7415
|
+
|
|
7416
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/InsertUnicodeExtensionAndCanonicalize.js
|
|
7417
|
+
var require_InsertUnicodeExtensionAndCanonicalize = __commonJS({
|
|
7418
|
+
"node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/InsertUnicodeExtensionAndCanonicalize.js"(exports) {
|
|
7419
|
+
"use strict";
|
|
7420
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7421
|
+
exports.InsertUnicodeExtensionAndCanonicalize = InsertUnicodeExtensionAndCanonicalize2;
|
|
7422
|
+
var CanonicalizeUnicodeLocaleId_1 = require_CanonicalizeUnicodeLocaleId();
|
|
7423
|
+
var utils_1 = require_utils2();
|
|
7424
|
+
function InsertUnicodeExtensionAndCanonicalize2(locale, attributes, keywords) {
|
|
7425
|
+
(0, utils_1.invariant)(locale.indexOf("-u-") === -1, "Expected locale to not have a Unicode locale extension");
|
|
7426
|
+
var extension = "-u";
|
|
7427
|
+
for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) {
|
|
7428
|
+
var attr = attributes_1[_i];
|
|
7429
|
+
extension += "-".concat(attr);
|
|
7430
|
+
}
|
|
7431
|
+
for (var _a = 0, keywords_1 = keywords; _a < keywords_1.length; _a++) {
|
|
7432
|
+
var kw = keywords_1[_a];
|
|
7433
|
+
var key = kw.key, value = kw.value;
|
|
7434
|
+
extension += "-".concat(key);
|
|
7435
|
+
if (value !== "") {
|
|
7436
|
+
extension += "-".concat(value);
|
|
7437
|
+
}
|
|
7438
|
+
}
|
|
7439
|
+
if (extension === "-u") {
|
|
7440
|
+
return (0, CanonicalizeUnicodeLocaleId_1.CanonicalizeUnicodeLocaleId)(locale);
|
|
7441
|
+
}
|
|
7442
|
+
var privateIndex = locale.indexOf("-x-");
|
|
7443
|
+
var newLocale;
|
|
7444
|
+
if (privateIndex === -1) {
|
|
7445
|
+
newLocale = locale + extension;
|
|
7446
|
+
} else {
|
|
7447
|
+
var preExtension = locale.slice(0, privateIndex);
|
|
7448
|
+
var postExtension = locale.slice(privateIndex);
|
|
7449
|
+
newLocale = preExtension + extension + postExtension;
|
|
7450
|
+
}
|
|
7451
|
+
return (0, CanonicalizeUnicodeLocaleId_1.CanonicalizeUnicodeLocaleId)(newLocale);
|
|
7452
|
+
}
|
|
7453
|
+
}
|
|
7454
|
+
});
|
|
7455
|
+
|
|
7382
7456
|
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/BestAvailableLocale.js
|
|
7383
7457
|
var require_BestAvailableLocale = __commonJS({
|
|
7384
7458
|
"node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/BestAvailableLocale.js"(exports) {
|
|
@@ -7432,49 +7506,51 @@
|
|
|
7432
7506
|
}
|
|
7433
7507
|
});
|
|
7434
7508
|
|
|
7435
|
-
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/
|
|
7436
|
-
var
|
|
7437
|
-
"node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/
|
|
7509
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/UnicodeExtensionComponents.js
|
|
7510
|
+
var require_UnicodeExtensionComponents = __commonJS({
|
|
7511
|
+
"node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/UnicodeExtensionComponents.js"(exports) {
|
|
7438
7512
|
"use strict";
|
|
7439
7513
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7440
|
-
exports.
|
|
7514
|
+
exports.UnicodeExtensionComponents = UnicodeExtensionComponents2;
|
|
7441
7515
|
var utils_1 = require_utils2();
|
|
7442
|
-
function
|
|
7443
|
-
(0, utils_1.invariant)(
|
|
7516
|
+
function UnicodeExtensionComponents2(extension) {
|
|
7517
|
+
(0, utils_1.invariant)(extension === extension.toLowerCase(), "Expected extension to be lowercase");
|
|
7518
|
+
(0, utils_1.invariant)(extension.slice(0, 3) === "-u-", "Expected extension to be a Unicode locale extension");
|
|
7519
|
+
var attributes = [];
|
|
7520
|
+
var keywords = [];
|
|
7521
|
+
var keyword;
|
|
7444
7522
|
var size = extension.length;
|
|
7445
|
-
var
|
|
7446
|
-
|
|
7447
|
-
|
|
7448
|
-
var
|
|
7449
|
-
|
|
7450
|
-
|
|
7451
|
-
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7523
|
+
var k = 3;
|
|
7524
|
+
while (k < size) {
|
|
7525
|
+
var e = extension.indexOf("-", k);
|
|
7526
|
+
var len = void 0;
|
|
7527
|
+
if (e === -1) {
|
|
7528
|
+
len = size - k;
|
|
7529
|
+
} else {
|
|
7530
|
+
len = e - k;
|
|
7531
|
+
}
|
|
7532
|
+
var subtag = extension.slice(k, k + len);
|
|
7533
|
+
(0, utils_1.invariant)(len >= 2, "Expected a subtag to have at least 2 characters");
|
|
7534
|
+
if (keyword === void 0 && len != 2) {
|
|
7535
|
+
if (attributes.indexOf(subtag) === -1) {
|
|
7536
|
+
attributes.push(subtag);
|
|
7459
7537
|
}
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7465
|
-
|
|
7466
|
-
end = e;
|
|
7467
|
-
k = e + 1;
|
|
7538
|
+
} else if (len === 2) {
|
|
7539
|
+
keyword = { key: subtag, value: "" };
|
|
7540
|
+
if (keywords.find(function(k2) {
|
|
7541
|
+
return k2.key === (keyword === null || keyword === void 0 ? void 0 : keyword.key);
|
|
7542
|
+
}) === void 0) {
|
|
7543
|
+
keywords.push(keyword);
|
|
7468
7544
|
}
|
|
7545
|
+
} else if ((keyword === null || keyword === void 0 ? void 0 : keyword.value) === "") {
|
|
7546
|
+
keyword.value = subtag;
|
|
7547
|
+
} else {
|
|
7548
|
+
(0, utils_1.invariant)(keyword !== void 0, "Expected keyword to be defined");
|
|
7549
|
+
keyword.value += "-" + subtag;
|
|
7469
7550
|
}
|
|
7470
|
-
|
|
7551
|
+
k += len + 1;
|
|
7471
7552
|
}
|
|
7472
|
-
|
|
7473
|
-
pos = extension.indexOf(searchValue);
|
|
7474
|
-
if (pos !== -1 && pos + 3 === size) {
|
|
7475
|
-
return "";
|
|
7476
|
-
}
|
|
7477
|
-
return void 0;
|
|
7553
|
+
return { attributes, keywords };
|
|
7478
7554
|
}
|
|
7479
7555
|
}
|
|
7480
7556
|
});
|
|
@@ -7486,10 +7562,13 @@
|
|
|
7486
7562
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7487
7563
|
exports.ResolveLocale = ResolveLocale2;
|
|
7488
7564
|
var BestFitMatcher_1 = require_BestFitMatcher();
|
|
7565
|
+
var CanonicalizeUValue_1 = require_CanonicalizeUValue();
|
|
7566
|
+
var InsertUnicodeExtensionAndCanonicalize_1 = require_InsertUnicodeExtensionAndCanonicalize();
|
|
7489
7567
|
var LookupMatcher_1 = require_LookupMatcher();
|
|
7490
|
-
var
|
|
7568
|
+
var UnicodeExtensionComponents_1 = require_UnicodeExtensionComponents();
|
|
7491
7569
|
var utils_1 = require_utils2();
|
|
7492
7570
|
function ResolveLocale2(availableLocales, requestedLocales, options, relevantExtensionKeys, localeData, getDefaultLocale) {
|
|
7571
|
+
var _a;
|
|
7493
7572
|
var matcher = options.localeMatcher;
|
|
7494
7573
|
var r;
|
|
7495
7574
|
if (matcher === "lookup") {
|
|
@@ -7497,56 +7576,77 @@
|
|
|
7497
7576
|
} else {
|
|
7498
7577
|
r = (0, BestFitMatcher_1.BestFitMatcher)(Array.from(availableLocales), requestedLocales, getDefaultLocale);
|
|
7499
7578
|
}
|
|
7579
|
+
if (r == null) {
|
|
7580
|
+
r = {
|
|
7581
|
+
locale: getDefaultLocale(),
|
|
7582
|
+
extension: ""
|
|
7583
|
+
};
|
|
7584
|
+
}
|
|
7500
7585
|
var foundLocale = r.locale;
|
|
7501
|
-
var
|
|
7502
|
-
var
|
|
7503
|
-
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
|
|
7586
|
+
var foundLocaleData = localeData[foundLocale];
|
|
7587
|
+
var result = { locale: "en", dataLocale: foundLocale };
|
|
7588
|
+
var components;
|
|
7589
|
+
var keywords;
|
|
7590
|
+
if (r.extension) {
|
|
7591
|
+
components = (0, UnicodeExtensionComponents_1.UnicodeExtensionComponents)(r.extension);
|
|
7592
|
+
keywords = components.keywords;
|
|
7593
|
+
} else {
|
|
7594
|
+
keywords = [];
|
|
7595
|
+
}
|
|
7596
|
+
var supportedKeywords = [];
|
|
7597
|
+
var _loop_1 = function(key2) {
|
|
7598
|
+
var keyLocaleData = (_a = foundLocaleData === null || foundLocaleData === void 0 ? void 0 : foundLocaleData[key2]) !== null && _a !== void 0 ? _a : [];
|
|
7599
|
+
(0, utils_1.invariant)(Array.isArray(keyLocaleData), "keyLocaleData for ".concat(key2, " must be an array"));
|
|
7510
7600
|
var value = keyLocaleData[0];
|
|
7511
|
-
(0, utils_1.invariant)(
|
|
7512
|
-
var
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
-
|
|
7520
|
-
|
|
7521
|
-
|
|
7522
|
-
|
|
7523
|
-
|
|
7601
|
+
(0, utils_1.invariant)(value === void 0 || typeof value === "string", "value must be a string or undefined");
|
|
7602
|
+
var supportedKeyword = void 0;
|
|
7603
|
+
var entry = keywords.find(function(k) {
|
|
7604
|
+
return k.key === key2;
|
|
7605
|
+
});
|
|
7606
|
+
if (entry) {
|
|
7607
|
+
var requestedValue = entry.value;
|
|
7608
|
+
if (requestedValue !== "") {
|
|
7609
|
+
if (keyLocaleData.indexOf(requestedValue) > -1) {
|
|
7610
|
+
value = requestedValue;
|
|
7611
|
+
supportedKeyword = {
|
|
7612
|
+
key: key2,
|
|
7613
|
+
value
|
|
7614
|
+
};
|
|
7524
7615
|
}
|
|
7616
|
+
} else if (keyLocaleData.indexOf("true") > -1) {
|
|
7617
|
+
value = "true";
|
|
7618
|
+
supportedKeyword = {
|
|
7619
|
+
key: key2,
|
|
7620
|
+
value
|
|
7621
|
+
};
|
|
7525
7622
|
}
|
|
7526
7623
|
}
|
|
7527
|
-
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
|
|
7531
|
-
|
|
7532
|
-
|
|
7533
|
-
|
|
7534
|
-
}
|
|
7624
|
+
var optionsValue = options[key2];
|
|
7625
|
+
(0, utils_1.invariant)(optionsValue == null || typeof optionsValue === "string", "optionsValue must be a string or undefined");
|
|
7626
|
+
if (typeof optionsValue === "string") {
|
|
7627
|
+
var ukey = key2.toLowerCase();
|
|
7628
|
+
optionsValue = (0, CanonicalizeUValue_1.CanonicalizeUValue)(ukey, optionsValue);
|
|
7629
|
+
if (optionsValue === "") {
|
|
7630
|
+
optionsValue = "true";
|
|
7535
7631
|
}
|
|
7536
7632
|
}
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
if (supportedExtension.length > 2) {
|
|
7541
|
-
var privateIndex = foundLocale.indexOf("-x-");
|
|
7542
|
-
if (privateIndex === -1) {
|
|
7543
|
-
foundLocale = foundLocale + supportedExtension;
|
|
7544
|
-
} else {
|
|
7545
|
-
var preExtension = foundLocale.slice(0, privateIndex);
|
|
7546
|
-
var postExtension = foundLocale.slice(privateIndex, foundLocale.length);
|
|
7547
|
-
foundLocale = preExtension + supportedExtension + postExtension;
|
|
7633
|
+
if (optionsValue !== value && keyLocaleData.indexOf(optionsValue) > -1) {
|
|
7634
|
+
value = optionsValue;
|
|
7635
|
+
supportedKeyword = void 0;
|
|
7548
7636
|
}
|
|
7549
|
-
|
|
7637
|
+
if (supportedKeyword) {
|
|
7638
|
+
supportedKeywords.push(supportedKeyword);
|
|
7639
|
+
}
|
|
7640
|
+
result[key2] = value;
|
|
7641
|
+
};
|
|
7642
|
+
for (var _i = 0, relevantExtensionKeys_1 = relevantExtensionKeys; _i < relevantExtensionKeys_1.length; _i++) {
|
|
7643
|
+
var key = relevantExtensionKeys_1[_i];
|
|
7644
|
+
_loop_1(key);
|
|
7645
|
+
}
|
|
7646
|
+
var supportedAttributes = [];
|
|
7647
|
+
if (supportedKeywords.length > 0) {
|
|
7648
|
+
supportedAttributes = [];
|
|
7649
|
+
foundLocale = (0, InsertUnicodeExtensionAndCanonicalize_1.InsertUnicodeExtensionAndCanonicalize)(foundLocale, supportedAttributes, supportedKeywords);
|
|
7550
7650
|
}
|
|
7551
7651
|
result.locale = foundLocale;
|
|
7552
7652
|
return result;
|
|
@@ -8382,290 +8482,9 @@
|
|
|
8382
8482
|
}
|
|
8383
8483
|
});
|
|
8384
8484
|
|
|
8385
|
-
// node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/
|
|
8386
|
-
var
|
|
8387
|
-
"node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/
|
|
8388
|
-
"use strict";
|
|
8389
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8390
|
-
exports.SEPARATOR = void 0;
|
|
8391
|
-
exports.isUnicodeLanguageSubtag = isUnicodeLanguageSubtag2;
|
|
8392
|
-
exports.isStructurallyValidLanguageTag = isStructurallyValidLanguageTag2;
|
|
8393
|
-
exports.isUnicodeRegionSubtag = isUnicodeRegionSubtag2;
|
|
8394
|
-
exports.isUnicodeScriptSubtag = isUnicodeScriptSubtag2;
|
|
8395
|
-
exports.isUnicodeVariantSubtag = isUnicodeVariantSubtag;
|
|
8396
|
-
exports.parseUnicodeLanguageId = parseUnicodeLanguageId2;
|
|
8397
|
-
exports.parseUnicodeLocaleId = parseUnicodeLocaleId2;
|
|
8398
|
-
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
8399
|
-
var ALPHANUM_1_8 = /^[a-z0-9]{1,8}$/i;
|
|
8400
|
-
var ALPHANUM_2_8 = /^[a-z0-9]{2,8}$/i;
|
|
8401
|
-
var ALPHANUM_3_82 = /^[a-z0-9]{3,8}$/i;
|
|
8402
|
-
var KEY_REGEX = /^[a-z0-9][a-z]$/i;
|
|
8403
|
-
var TYPE_REGEX = /^[a-z0-9]{3,8}$/i;
|
|
8404
|
-
var ALPHA_4 = /^[a-z]{4}$/i;
|
|
8405
|
-
var OTHER_EXTENSION_TYPE = /^[0-9a-svwyz]$/i;
|
|
8406
|
-
var UNICODE_REGION_SUBTAG_REGEX = /^([a-z]{2}|[0-9]{3})$/i;
|
|
8407
|
-
var UNICODE_VARIANT_SUBTAG_REGEX = /^([a-z0-9]{5,8}|[0-9][a-z0-9]{3})$/i;
|
|
8408
|
-
var UNICODE_LANGUAGE_SUBTAG_REGEX = /^([a-z]{2,3}|[a-z]{5,8})$/i;
|
|
8409
|
-
var TKEY_REGEX = /^[a-z][0-9]$/i;
|
|
8410
|
-
exports.SEPARATOR = "-";
|
|
8411
|
-
function isUnicodeLanguageSubtag2(lang) {
|
|
8412
|
-
return UNICODE_LANGUAGE_SUBTAG_REGEX.test(lang);
|
|
8413
|
-
}
|
|
8414
|
-
function isStructurallyValidLanguageTag2(tag) {
|
|
8415
|
-
try {
|
|
8416
|
-
parseUnicodeLanguageId2(tag.split(exports.SEPARATOR));
|
|
8417
|
-
} catch (e) {
|
|
8418
|
-
return false;
|
|
8419
|
-
}
|
|
8420
|
-
return true;
|
|
8421
|
-
}
|
|
8422
|
-
function isUnicodeRegionSubtag2(region) {
|
|
8423
|
-
return UNICODE_REGION_SUBTAG_REGEX.test(region);
|
|
8424
|
-
}
|
|
8425
|
-
function isUnicodeScriptSubtag2(script) {
|
|
8426
|
-
return ALPHA_4.test(script);
|
|
8427
|
-
}
|
|
8428
|
-
function isUnicodeVariantSubtag(variant) {
|
|
8429
|
-
return UNICODE_VARIANT_SUBTAG_REGEX.test(variant);
|
|
8430
|
-
}
|
|
8431
|
-
function parseUnicodeLanguageId2(chunks) {
|
|
8432
|
-
if (typeof chunks === "string") {
|
|
8433
|
-
chunks = chunks.split(exports.SEPARATOR);
|
|
8434
|
-
}
|
|
8435
|
-
var lang = chunks.shift();
|
|
8436
|
-
if (!lang) {
|
|
8437
|
-
throw new RangeError("Missing unicode_language_subtag");
|
|
8438
|
-
}
|
|
8439
|
-
if (lang === "root") {
|
|
8440
|
-
return { lang: "root", variants: [] };
|
|
8441
|
-
}
|
|
8442
|
-
if (!isUnicodeLanguageSubtag2(lang)) {
|
|
8443
|
-
throw new RangeError("Malformed unicode_language_subtag");
|
|
8444
|
-
}
|
|
8445
|
-
var script;
|
|
8446
|
-
if (chunks.length && isUnicodeScriptSubtag2(chunks[0])) {
|
|
8447
|
-
script = chunks.shift();
|
|
8448
|
-
}
|
|
8449
|
-
var region;
|
|
8450
|
-
if (chunks.length && isUnicodeRegionSubtag2(chunks[0])) {
|
|
8451
|
-
region = chunks.shift();
|
|
8452
|
-
}
|
|
8453
|
-
var variants = {};
|
|
8454
|
-
while (chunks.length && isUnicodeVariantSubtag(chunks[0])) {
|
|
8455
|
-
var variant = chunks.shift();
|
|
8456
|
-
if (variant in variants) {
|
|
8457
|
-
throw new RangeError('Duplicate variant "'.concat(variant, '"'));
|
|
8458
|
-
}
|
|
8459
|
-
variants[variant] = 1;
|
|
8460
|
-
}
|
|
8461
|
-
return {
|
|
8462
|
-
lang,
|
|
8463
|
-
script,
|
|
8464
|
-
region,
|
|
8465
|
-
variants: Object.keys(variants)
|
|
8466
|
-
};
|
|
8467
|
-
}
|
|
8468
|
-
function parseUnicodeExtension(chunks) {
|
|
8469
|
-
var keywords = [];
|
|
8470
|
-
var keyword;
|
|
8471
|
-
while (chunks.length && (keyword = parseKeyword(chunks))) {
|
|
8472
|
-
keywords.push(keyword);
|
|
8473
|
-
}
|
|
8474
|
-
if (keywords.length) {
|
|
8475
|
-
return {
|
|
8476
|
-
type: "u",
|
|
8477
|
-
keywords,
|
|
8478
|
-
attributes: []
|
|
8479
|
-
};
|
|
8480
|
-
}
|
|
8481
|
-
var attributes = [];
|
|
8482
|
-
while (chunks.length && ALPHANUM_3_82.test(chunks[0])) {
|
|
8483
|
-
attributes.push(chunks.shift());
|
|
8484
|
-
}
|
|
8485
|
-
while (chunks.length && (keyword = parseKeyword(chunks))) {
|
|
8486
|
-
keywords.push(keyword);
|
|
8487
|
-
}
|
|
8488
|
-
if (keywords.length || attributes.length) {
|
|
8489
|
-
return {
|
|
8490
|
-
type: "u",
|
|
8491
|
-
attributes,
|
|
8492
|
-
keywords
|
|
8493
|
-
};
|
|
8494
|
-
}
|
|
8495
|
-
throw new RangeError("Malformed unicode_extension");
|
|
8496
|
-
}
|
|
8497
|
-
function parseKeyword(chunks) {
|
|
8498
|
-
var key;
|
|
8499
|
-
if (!KEY_REGEX.test(chunks[0])) {
|
|
8500
|
-
return;
|
|
8501
|
-
}
|
|
8502
|
-
key = chunks.shift();
|
|
8503
|
-
var type = [];
|
|
8504
|
-
while (chunks.length && TYPE_REGEX.test(chunks[0])) {
|
|
8505
|
-
type.push(chunks.shift());
|
|
8506
|
-
}
|
|
8507
|
-
var value = "";
|
|
8508
|
-
if (type.length) {
|
|
8509
|
-
value = type.join(exports.SEPARATOR);
|
|
8510
|
-
}
|
|
8511
|
-
return [key, value];
|
|
8512
|
-
}
|
|
8513
|
-
function parseTransformedExtension(chunks) {
|
|
8514
|
-
var lang;
|
|
8515
|
-
try {
|
|
8516
|
-
lang = parseUnicodeLanguageId2(chunks);
|
|
8517
|
-
} catch (e) {
|
|
8518
|
-
}
|
|
8519
|
-
var fields = [];
|
|
8520
|
-
while (chunks.length && TKEY_REGEX.test(chunks[0])) {
|
|
8521
|
-
var key = chunks.shift();
|
|
8522
|
-
var value = [];
|
|
8523
|
-
while (chunks.length && ALPHANUM_3_82.test(chunks[0])) {
|
|
8524
|
-
value.push(chunks.shift());
|
|
8525
|
-
}
|
|
8526
|
-
if (!value.length) {
|
|
8527
|
-
throw new RangeError('Missing tvalue for tkey "'.concat(key, '"'));
|
|
8528
|
-
}
|
|
8529
|
-
fields.push([key, value.join(exports.SEPARATOR)]);
|
|
8530
|
-
}
|
|
8531
|
-
if (fields.length) {
|
|
8532
|
-
return {
|
|
8533
|
-
type: "t",
|
|
8534
|
-
fields,
|
|
8535
|
-
lang
|
|
8536
|
-
};
|
|
8537
|
-
}
|
|
8538
|
-
throw new RangeError("Malformed transformed_extension");
|
|
8539
|
-
}
|
|
8540
|
-
function parsePuExtension(chunks) {
|
|
8541
|
-
var exts = [];
|
|
8542
|
-
while (chunks.length && ALPHANUM_1_8.test(chunks[0])) {
|
|
8543
|
-
exts.push(chunks.shift());
|
|
8544
|
-
}
|
|
8545
|
-
if (exts.length) {
|
|
8546
|
-
return {
|
|
8547
|
-
type: "x",
|
|
8548
|
-
value: exts.join(exports.SEPARATOR)
|
|
8549
|
-
};
|
|
8550
|
-
}
|
|
8551
|
-
throw new RangeError("Malformed private_use_extension");
|
|
8552
|
-
}
|
|
8553
|
-
function parseOtherExtensionValue(chunks) {
|
|
8554
|
-
var exts = [];
|
|
8555
|
-
while (chunks.length && ALPHANUM_2_8.test(chunks[0])) {
|
|
8556
|
-
exts.push(chunks.shift());
|
|
8557
|
-
}
|
|
8558
|
-
if (exts.length) {
|
|
8559
|
-
return exts.join(exports.SEPARATOR);
|
|
8560
|
-
}
|
|
8561
|
-
return "";
|
|
8562
|
-
}
|
|
8563
|
-
function parseExtensions(chunks) {
|
|
8564
|
-
if (!chunks.length) {
|
|
8565
|
-
return { extensions: [] };
|
|
8566
|
-
}
|
|
8567
|
-
var extensions = [];
|
|
8568
|
-
var unicodeExtension;
|
|
8569
|
-
var transformedExtension;
|
|
8570
|
-
var puExtension;
|
|
8571
|
-
var otherExtensionMap = {};
|
|
8572
|
-
do {
|
|
8573
|
-
var type = chunks.shift();
|
|
8574
|
-
switch (type) {
|
|
8575
|
-
case "u":
|
|
8576
|
-
case "U":
|
|
8577
|
-
if (unicodeExtension) {
|
|
8578
|
-
throw new RangeError("There can only be 1 -u- extension");
|
|
8579
|
-
}
|
|
8580
|
-
unicodeExtension = parseUnicodeExtension(chunks);
|
|
8581
|
-
extensions.push(unicodeExtension);
|
|
8582
|
-
break;
|
|
8583
|
-
case "t":
|
|
8584
|
-
case "T":
|
|
8585
|
-
if (transformedExtension) {
|
|
8586
|
-
throw new RangeError("There can only be 1 -t- extension");
|
|
8587
|
-
}
|
|
8588
|
-
transformedExtension = parseTransformedExtension(chunks);
|
|
8589
|
-
extensions.push(transformedExtension);
|
|
8590
|
-
break;
|
|
8591
|
-
case "x":
|
|
8592
|
-
case "X":
|
|
8593
|
-
if (puExtension) {
|
|
8594
|
-
throw new RangeError("There can only be 1 -x- extension");
|
|
8595
|
-
}
|
|
8596
|
-
puExtension = parsePuExtension(chunks);
|
|
8597
|
-
extensions.push(puExtension);
|
|
8598
|
-
break;
|
|
8599
|
-
default:
|
|
8600
|
-
if (!OTHER_EXTENSION_TYPE.test(type)) {
|
|
8601
|
-
throw new RangeError("Malformed extension type");
|
|
8602
|
-
}
|
|
8603
|
-
if (type in otherExtensionMap) {
|
|
8604
|
-
throw new RangeError("There can only be 1 -".concat(type, "- extension"));
|
|
8605
|
-
}
|
|
8606
|
-
var extension = {
|
|
8607
|
-
type,
|
|
8608
|
-
value: parseOtherExtensionValue(chunks)
|
|
8609
|
-
};
|
|
8610
|
-
otherExtensionMap[extension.type] = extension;
|
|
8611
|
-
extensions.push(extension);
|
|
8612
|
-
break;
|
|
8613
|
-
}
|
|
8614
|
-
} while (chunks.length);
|
|
8615
|
-
return { extensions };
|
|
8616
|
-
}
|
|
8617
|
-
function parseUnicodeLocaleId2(locale) {
|
|
8618
|
-
var chunks = locale.split(exports.SEPARATOR);
|
|
8619
|
-
var lang = parseUnicodeLanguageId2(chunks);
|
|
8620
|
-
return tslib_1.__assign({ lang }, parseExtensions(chunks));
|
|
8621
|
-
}
|
|
8622
|
-
}
|
|
8623
|
-
});
|
|
8624
|
-
|
|
8625
|
-
// node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/emitter.js
|
|
8626
|
-
var require_emitter = __commonJS({
|
|
8627
|
-
"node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/emitter.js"(exports) {
|
|
8628
|
-
"use strict";
|
|
8629
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8630
|
-
exports.emitUnicodeLanguageId = emitUnicodeLanguageId2;
|
|
8631
|
-
exports.emitUnicodeLocaleId = emitUnicodeLocaleId2;
|
|
8632
|
-
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
8633
|
-
function emitUnicodeLanguageId2(lang) {
|
|
8634
|
-
if (!lang) {
|
|
8635
|
-
return "";
|
|
8636
|
-
}
|
|
8637
|
-
return tslib_1.__spreadArray([lang.lang, lang.script, lang.region], lang.variants || [], true).filter(Boolean).join("-");
|
|
8638
|
-
}
|
|
8639
|
-
function emitUnicodeLocaleId2(_a) {
|
|
8640
|
-
var lang = _a.lang, extensions = _a.extensions;
|
|
8641
|
-
var chunks = [emitUnicodeLanguageId2(lang)];
|
|
8642
|
-
for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) {
|
|
8643
|
-
var ext = extensions_1[_i];
|
|
8644
|
-
chunks.push(ext.type);
|
|
8645
|
-
switch (ext.type) {
|
|
8646
|
-
case "u":
|
|
8647
|
-
chunks.push.apply(chunks, tslib_1.__spreadArray(tslib_1.__spreadArray([], ext.attributes, false), ext.keywords.reduce(function(all, kv) {
|
|
8648
|
-
return all.concat(kv);
|
|
8649
|
-
}, []), false));
|
|
8650
|
-
break;
|
|
8651
|
-
case "t":
|
|
8652
|
-
chunks.push.apply(chunks, tslib_1.__spreadArray([emitUnicodeLanguageId2(ext.lang)], ext.fields.reduce(function(all, kv) {
|
|
8653
|
-
return all.concat(kv);
|
|
8654
|
-
}, []), false));
|
|
8655
|
-
break;
|
|
8656
|
-
default:
|
|
8657
|
-
chunks.push(ext.value);
|
|
8658
|
-
break;
|
|
8659
|
-
}
|
|
8660
|
-
}
|
|
8661
|
-
return chunks.filter(Boolean).join("-");
|
|
8662
|
-
}
|
|
8663
|
-
}
|
|
8664
|
-
});
|
|
8665
|
-
|
|
8666
|
-
// node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/aliases.generated.js
|
|
8667
|
-
var require_aliases_generated = __commonJS({
|
|
8668
|
-
"node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/aliases.generated.js"(exports) {
|
|
8485
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/aliases.generated.js
|
|
8486
|
+
var require_aliases_generated = __commonJS({
|
|
8487
|
+
"node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/aliases.generated.js"(exports) {
|
|
8669
8488
|
"use strict";
|
|
8670
8489
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8671
8490
|
exports.variantAlias = exports.scriptAlias = exports.territoryAlias = exports.languageAlias = void 0;
|
|
@@ -9821,6 +9640,47 @@
|
|
|
9821
9640
|
}
|
|
9822
9641
|
});
|
|
9823
9642
|
|
|
9643
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/emitter.js
|
|
9644
|
+
var require_emitter = __commonJS({
|
|
9645
|
+
"node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/emitter.js"(exports) {
|
|
9646
|
+
"use strict";
|
|
9647
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9648
|
+
exports.emitUnicodeLanguageId = emitUnicodeLanguageId2;
|
|
9649
|
+
exports.emitUnicodeLocaleId = emitUnicodeLocaleId2;
|
|
9650
|
+
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
9651
|
+
function emitUnicodeLanguageId2(lang) {
|
|
9652
|
+
if (!lang) {
|
|
9653
|
+
return "";
|
|
9654
|
+
}
|
|
9655
|
+
return tslib_1.__spreadArray([lang.lang, lang.script, lang.region], lang.variants || [], true).filter(Boolean).join("-");
|
|
9656
|
+
}
|
|
9657
|
+
function emitUnicodeLocaleId2(_a) {
|
|
9658
|
+
var lang = _a.lang, extensions = _a.extensions;
|
|
9659
|
+
var chunks = [emitUnicodeLanguageId2(lang)];
|
|
9660
|
+
for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) {
|
|
9661
|
+
var ext = extensions_1[_i];
|
|
9662
|
+
chunks.push(ext.type);
|
|
9663
|
+
switch (ext.type) {
|
|
9664
|
+
case "u":
|
|
9665
|
+
chunks.push.apply(chunks, tslib_1.__spreadArray(tslib_1.__spreadArray([], ext.attributes, false), ext.keywords.reduce(function(all, kv) {
|
|
9666
|
+
return all.concat(kv);
|
|
9667
|
+
}, []), false));
|
|
9668
|
+
break;
|
|
9669
|
+
case "t":
|
|
9670
|
+
chunks.push.apply(chunks, tslib_1.__spreadArray([emitUnicodeLanguageId2(ext.lang)], ext.fields.reduce(function(all, kv) {
|
|
9671
|
+
return all.concat(kv);
|
|
9672
|
+
}, []), false));
|
|
9673
|
+
break;
|
|
9674
|
+
default:
|
|
9675
|
+
chunks.push(ext.value);
|
|
9676
|
+
break;
|
|
9677
|
+
}
|
|
9678
|
+
}
|
|
9679
|
+
return chunks.filter(Boolean).join("-");
|
|
9680
|
+
}
|
|
9681
|
+
}
|
|
9682
|
+
});
|
|
9683
|
+
|
|
9824
9684
|
// node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/likelySubtags.generated.js
|
|
9825
9685
|
var require_likelySubtags_generated = __commonJS({
|
|
9826
9686
|
"node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/likelySubtags.generated.js"(exports) {
|
|
@@ -17570,18 +17430,258 @@
|
|
|
17570
17430
|
}
|
|
17571
17431
|
});
|
|
17572
17432
|
|
|
17433
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/parser.js
|
|
17434
|
+
var require_parser = __commonJS({
|
|
17435
|
+
"node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/parser.js"(exports) {
|
|
17436
|
+
"use strict";
|
|
17437
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17438
|
+
exports.SEPARATOR = void 0;
|
|
17439
|
+
exports.isUnicodeLanguageSubtag = isUnicodeLanguageSubtag2;
|
|
17440
|
+
exports.isStructurallyValidLanguageTag = isStructurallyValidLanguageTag2;
|
|
17441
|
+
exports.isUnicodeRegionSubtag = isUnicodeRegionSubtag2;
|
|
17442
|
+
exports.isUnicodeScriptSubtag = isUnicodeScriptSubtag2;
|
|
17443
|
+
exports.isUnicodeVariantSubtag = isUnicodeVariantSubtag;
|
|
17444
|
+
exports.parseUnicodeLanguageId = parseUnicodeLanguageId2;
|
|
17445
|
+
exports.parseUnicodeLocaleId = parseUnicodeLocaleId2;
|
|
17446
|
+
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
17447
|
+
var ALPHANUM_1_8 = /^[a-z0-9]{1,8}$/i;
|
|
17448
|
+
var ALPHANUM_2_8 = /^[a-z0-9]{2,8}$/i;
|
|
17449
|
+
var ALPHANUM_3_82 = /^[a-z0-9]{3,8}$/i;
|
|
17450
|
+
var KEY_REGEX = /^[a-z0-9][a-z]$/i;
|
|
17451
|
+
var TYPE_REGEX = /^[a-z0-9]{3,8}$/i;
|
|
17452
|
+
var ALPHA_4 = /^[a-z]{4}$/i;
|
|
17453
|
+
var OTHER_EXTENSION_TYPE = /^[0-9a-svwyz]$/i;
|
|
17454
|
+
var UNICODE_REGION_SUBTAG_REGEX = /^([a-z]{2}|[0-9]{3})$/i;
|
|
17455
|
+
var UNICODE_VARIANT_SUBTAG_REGEX = /^([a-z0-9]{5,8}|[0-9][a-z0-9]{3})$/i;
|
|
17456
|
+
var UNICODE_LANGUAGE_SUBTAG_REGEX = /^([a-z]{2,3}|[a-z]{5,8})$/i;
|
|
17457
|
+
var TKEY_REGEX = /^[a-z][0-9]$/i;
|
|
17458
|
+
exports.SEPARATOR = "-";
|
|
17459
|
+
function isUnicodeLanguageSubtag2(lang) {
|
|
17460
|
+
return UNICODE_LANGUAGE_SUBTAG_REGEX.test(lang);
|
|
17461
|
+
}
|
|
17462
|
+
function isStructurallyValidLanguageTag2(tag) {
|
|
17463
|
+
try {
|
|
17464
|
+
parseUnicodeLanguageId2(tag.split(exports.SEPARATOR));
|
|
17465
|
+
} catch (e) {
|
|
17466
|
+
return false;
|
|
17467
|
+
}
|
|
17468
|
+
return true;
|
|
17469
|
+
}
|
|
17470
|
+
function isUnicodeRegionSubtag2(region) {
|
|
17471
|
+
return UNICODE_REGION_SUBTAG_REGEX.test(region);
|
|
17472
|
+
}
|
|
17473
|
+
function isUnicodeScriptSubtag2(script) {
|
|
17474
|
+
return ALPHA_4.test(script);
|
|
17475
|
+
}
|
|
17476
|
+
function isUnicodeVariantSubtag(variant) {
|
|
17477
|
+
return UNICODE_VARIANT_SUBTAG_REGEX.test(variant);
|
|
17478
|
+
}
|
|
17479
|
+
function parseUnicodeLanguageId2(chunks) {
|
|
17480
|
+
if (typeof chunks === "string") {
|
|
17481
|
+
chunks = chunks.split(exports.SEPARATOR);
|
|
17482
|
+
}
|
|
17483
|
+
var lang = chunks.shift();
|
|
17484
|
+
if (!lang) {
|
|
17485
|
+
throw new RangeError("Missing unicode_language_subtag");
|
|
17486
|
+
}
|
|
17487
|
+
if (lang === "root") {
|
|
17488
|
+
return { lang: "root", variants: [] };
|
|
17489
|
+
}
|
|
17490
|
+
if (!isUnicodeLanguageSubtag2(lang)) {
|
|
17491
|
+
throw new RangeError("Malformed unicode_language_subtag");
|
|
17492
|
+
}
|
|
17493
|
+
var script;
|
|
17494
|
+
if (chunks.length && isUnicodeScriptSubtag2(chunks[0])) {
|
|
17495
|
+
script = chunks.shift();
|
|
17496
|
+
}
|
|
17497
|
+
var region;
|
|
17498
|
+
if (chunks.length && isUnicodeRegionSubtag2(chunks[0])) {
|
|
17499
|
+
region = chunks.shift();
|
|
17500
|
+
}
|
|
17501
|
+
var variants = {};
|
|
17502
|
+
while (chunks.length && isUnicodeVariantSubtag(chunks[0])) {
|
|
17503
|
+
var variant = chunks.shift();
|
|
17504
|
+
if (variant in variants) {
|
|
17505
|
+
throw new RangeError('Duplicate variant "'.concat(variant, '"'));
|
|
17506
|
+
}
|
|
17507
|
+
variants[variant] = 1;
|
|
17508
|
+
}
|
|
17509
|
+
return {
|
|
17510
|
+
lang,
|
|
17511
|
+
script,
|
|
17512
|
+
region,
|
|
17513
|
+
variants: Object.keys(variants)
|
|
17514
|
+
};
|
|
17515
|
+
}
|
|
17516
|
+
function parseUnicodeExtension(chunks) {
|
|
17517
|
+
var keywords = [];
|
|
17518
|
+
var keyword;
|
|
17519
|
+
while (chunks.length && (keyword = parseKeyword(chunks))) {
|
|
17520
|
+
keywords.push(keyword);
|
|
17521
|
+
}
|
|
17522
|
+
if (keywords.length) {
|
|
17523
|
+
return {
|
|
17524
|
+
type: "u",
|
|
17525
|
+
keywords,
|
|
17526
|
+
attributes: []
|
|
17527
|
+
};
|
|
17528
|
+
}
|
|
17529
|
+
var attributes = [];
|
|
17530
|
+
while (chunks.length && ALPHANUM_3_82.test(chunks[0])) {
|
|
17531
|
+
attributes.push(chunks.shift());
|
|
17532
|
+
}
|
|
17533
|
+
while (chunks.length && (keyword = parseKeyword(chunks))) {
|
|
17534
|
+
keywords.push(keyword);
|
|
17535
|
+
}
|
|
17536
|
+
if (keywords.length || attributes.length) {
|
|
17537
|
+
return {
|
|
17538
|
+
type: "u",
|
|
17539
|
+
attributes,
|
|
17540
|
+
keywords
|
|
17541
|
+
};
|
|
17542
|
+
}
|
|
17543
|
+
throw new RangeError("Malformed unicode_extension");
|
|
17544
|
+
}
|
|
17545
|
+
function parseKeyword(chunks) {
|
|
17546
|
+
var key;
|
|
17547
|
+
if (!KEY_REGEX.test(chunks[0])) {
|
|
17548
|
+
return;
|
|
17549
|
+
}
|
|
17550
|
+
key = chunks.shift();
|
|
17551
|
+
var type = [];
|
|
17552
|
+
while (chunks.length && TYPE_REGEX.test(chunks[0])) {
|
|
17553
|
+
type.push(chunks.shift());
|
|
17554
|
+
}
|
|
17555
|
+
var value = "";
|
|
17556
|
+
if (type.length) {
|
|
17557
|
+
value = type.join(exports.SEPARATOR);
|
|
17558
|
+
}
|
|
17559
|
+
return [key, value];
|
|
17560
|
+
}
|
|
17561
|
+
function parseTransformedExtension(chunks) {
|
|
17562
|
+
var lang;
|
|
17563
|
+
try {
|
|
17564
|
+
lang = parseUnicodeLanguageId2(chunks);
|
|
17565
|
+
} catch (e) {
|
|
17566
|
+
}
|
|
17567
|
+
var fields = [];
|
|
17568
|
+
while (chunks.length && TKEY_REGEX.test(chunks[0])) {
|
|
17569
|
+
var key = chunks.shift();
|
|
17570
|
+
var value = [];
|
|
17571
|
+
while (chunks.length && ALPHANUM_3_82.test(chunks[0])) {
|
|
17572
|
+
value.push(chunks.shift());
|
|
17573
|
+
}
|
|
17574
|
+
if (!value.length) {
|
|
17575
|
+
throw new RangeError('Missing tvalue for tkey "'.concat(key, '"'));
|
|
17576
|
+
}
|
|
17577
|
+
fields.push([key, value.join(exports.SEPARATOR)]);
|
|
17578
|
+
}
|
|
17579
|
+
if (fields.length) {
|
|
17580
|
+
return {
|
|
17581
|
+
type: "t",
|
|
17582
|
+
fields,
|
|
17583
|
+
lang
|
|
17584
|
+
};
|
|
17585
|
+
}
|
|
17586
|
+
throw new RangeError("Malformed transformed_extension");
|
|
17587
|
+
}
|
|
17588
|
+
function parsePuExtension(chunks) {
|
|
17589
|
+
var exts = [];
|
|
17590
|
+
while (chunks.length && ALPHANUM_1_8.test(chunks[0])) {
|
|
17591
|
+
exts.push(chunks.shift());
|
|
17592
|
+
}
|
|
17593
|
+
if (exts.length) {
|
|
17594
|
+
return {
|
|
17595
|
+
type: "x",
|
|
17596
|
+
value: exts.join(exports.SEPARATOR)
|
|
17597
|
+
};
|
|
17598
|
+
}
|
|
17599
|
+
throw new RangeError("Malformed private_use_extension");
|
|
17600
|
+
}
|
|
17601
|
+
function parseOtherExtensionValue(chunks) {
|
|
17602
|
+
var exts = [];
|
|
17603
|
+
while (chunks.length && ALPHANUM_2_8.test(chunks[0])) {
|
|
17604
|
+
exts.push(chunks.shift());
|
|
17605
|
+
}
|
|
17606
|
+
if (exts.length) {
|
|
17607
|
+
return exts.join(exports.SEPARATOR);
|
|
17608
|
+
}
|
|
17609
|
+
return "";
|
|
17610
|
+
}
|
|
17611
|
+
function parseExtensions(chunks) {
|
|
17612
|
+
if (!chunks.length) {
|
|
17613
|
+
return { extensions: [] };
|
|
17614
|
+
}
|
|
17615
|
+
var extensions = [];
|
|
17616
|
+
var unicodeExtension;
|
|
17617
|
+
var transformedExtension;
|
|
17618
|
+
var puExtension;
|
|
17619
|
+
var otherExtensionMap = {};
|
|
17620
|
+
do {
|
|
17621
|
+
var type = chunks.shift();
|
|
17622
|
+
switch (type) {
|
|
17623
|
+
case "u":
|
|
17624
|
+
case "U":
|
|
17625
|
+
if (unicodeExtension) {
|
|
17626
|
+
throw new RangeError("There can only be 1 -u- extension");
|
|
17627
|
+
}
|
|
17628
|
+
unicodeExtension = parseUnicodeExtension(chunks);
|
|
17629
|
+
extensions.push(unicodeExtension);
|
|
17630
|
+
break;
|
|
17631
|
+
case "t":
|
|
17632
|
+
case "T":
|
|
17633
|
+
if (transformedExtension) {
|
|
17634
|
+
throw new RangeError("There can only be 1 -t- extension");
|
|
17635
|
+
}
|
|
17636
|
+
transformedExtension = parseTransformedExtension(chunks);
|
|
17637
|
+
extensions.push(transformedExtension);
|
|
17638
|
+
break;
|
|
17639
|
+
case "x":
|
|
17640
|
+
case "X":
|
|
17641
|
+
if (puExtension) {
|
|
17642
|
+
throw new RangeError("There can only be 1 -x- extension");
|
|
17643
|
+
}
|
|
17644
|
+
puExtension = parsePuExtension(chunks);
|
|
17645
|
+
extensions.push(puExtension);
|
|
17646
|
+
break;
|
|
17647
|
+
default:
|
|
17648
|
+
if (!OTHER_EXTENSION_TYPE.test(type)) {
|
|
17649
|
+
throw new RangeError("Malformed extension type");
|
|
17650
|
+
}
|
|
17651
|
+
if (type in otherExtensionMap) {
|
|
17652
|
+
throw new RangeError("There can only be 1 -".concat(type, "- extension"));
|
|
17653
|
+
}
|
|
17654
|
+
var extension = {
|
|
17655
|
+
type,
|
|
17656
|
+
value: parseOtherExtensionValue(chunks)
|
|
17657
|
+
};
|
|
17658
|
+
otherExtensionMap[extension.type] = extension;
|
|
17659
|
+
extensions.push(extension);
|
|
17660
|
+
break;
|
|
17661
|
+
}
|
|
17662
|
+
} while (chunks.length);
|
|
17663
|
+
return { extensions };
|
|
17664
|
+
}
|
|
17665
|
+
function parseUnicodeLocaleId2(locale) {
|
|
17666
|
+
var chunks = locale.split(exports.SEPARATOR);
|
|
17667
|
+
var lang = parseUnicodeLanguageId2(chunks);
|
|
17668
|
+
return tslib_1.__assign({ lang }, parseExtensions(chunks));
|
|
17669
|
+
}
|
|
17670
|
+
}
|
|
17671
|
+
});
|
|
17672
|
+
|
|
17573
17673
|
// node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/canonicalizer.js
|
|
17574
17674
|
var require_canonicalizer = __commonJS({
|
|
17575
17675
|
"node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/canonicalizer.js"(exports) {
|
|
17576
17676
|
"use strict";
|
|
17577
17677
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17578
17678
|
exports.canonicalizeUnicodeLanguageId = canonicalizeUnicodeLanguageId;
|
|
17579
|
-
exports.
|
|
17679
|
+
exports.CanonicalizeUnicodeLocaleId = CanonicalizeUnicodeLocaleId2;
|
|
17580
17680
|
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
17581
17681
|
var aliases_generated_1 = require_aliases_generated();
|
|
17582
|
-
var parser_1 = require_parser();
|
|
17583
|
-
var likelySubtags_generated_1 = require_likelySubtags_generated();
|
|
17584
17682
|
var emitter_1 = require_emitter();
|
|
17683
|
+
var likelySubtags_generated_1 = require_likelySubtags_generated();
|
|
17684
|
+
var parser_1 = require_parser();
|
|
17585
17685
|
function canonicalizeAttrs(strs) {
|
|
17586
17686
|
return Object.keys(strs.reduce(function(all, str) {
|
|
17587
17687
|
all[str.toLowerCase()] = 1;
|
|
@@ -17734,7 +17834,7 @@
|
|
|
17734
17834
|
}
|
|
17735
17835
|
return finalLangAst;
|
|
17736
17836
|
}
|
|
17737
|
-
function
|
|
17837
|
+
function CanonicalizeUnicodeLocaleId2(locale) {
|
|
17738
17838
|
locale.lang = canonicalizeUnicodeLanguageId(locale.lang);
|
|
17739
17839
|
if (locale.extensions) {
|
|
17740
17840
|
for (var _i = 0, _a = locale.extensions; _i < _a.length; _i++) {
|
|
@@ -17777,12 +17877,12 @@
|
|
|
17777
17877
|
"node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/index.js"(exports) {
|
|
17778
17878
|
"use strict";
|
|
17779
17879
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17780
|
-
exports.
|
|
17880
|
+
exports.parseUnicodeLocaleId = exports.parseUnicodeLanguageId = exports.isUnicodeScriptSubtag = exports.isUnicodeRegionSubtag = exports.isUnicodeLanguageSubtag = exports.isStructurallyValidLanguageTag = void 0;
|
|
17781
17881
|
exports.getCanonicalLocales = getCanonicalLocales2;
|
|
17782
17882
|
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
17783
|
-
var parser_1 = require_parser();
|
|
17784
|
-
var emitter_1 = require_emitter();
|
|
17785
17883
|
var canonicalizer_1 = require_canonicalizer();
|
|
17884
|
+
var emitter_1 = require_emitter();
|
|
17885
|
+
var parser_1 = require_parser();
|
|
17786
17886
|
function CanonicalizeLocaleList3(locales) {
|
|
17787
17887
|
if (locales === void 0) {
|
|
17788
17888
|
return [];
|
|
@@ -17793,7 +17893,7 @@
|
|
|
17793
17893
|
}
|
|
17794
17894
|
for (var _i = 0, locales_1 = locales; _i < locales_1.length; _i++) {
|
|
17795
17895
|
var locale = locales_1[_i];
|
|
17796
|
-
var canonicalizedTag = (0, emitter_1.emitUnicodeLocaleId)((0, canonicalizer_1.
|
|
17896
|
+
var canonicalizedTag = (0, emitter_1.emitUnicodeLocaleId)((0, canonicalizer_1.CanonicalizeUnicodeLocaleId)((0, parser_1.parseUnicodeLocaleId)(locale)));
|
|
17797
17897
|
if (seen.indexOf(canonicalizedTag) < 0) {
|
|
17798
17898
|
seen.push(canonicalizedTag);
|
|
17799
17899
|
}
|
|
@@ -17803,27 +17903,27 @@
|
|
|
17803
17903
|
function getCanonicalLocales2(locales) {
|
|
17804
17904
|
return CanonicalizeLocaleList3(locales);
|
|
17805
17905
|
}
|
|
17906
|
+
tslib_1.__exportStar(require_emitter(), exports);
|
|
17806
17907
|
var parser_2 = require_parser();
|
|
17807
|
-
Object.defineProperty(exports, "parseUnicodeLocaleId", { enumerable: true, get: function() {
|
|
17808
|
-
return parser_2.parseUnicodeLocaleId;
|
|
17809
|
-
} });
|
|
17810
|
-
Object.defineProperty(exports, "parseUnicodeLanguageId", { enumerable: true, get: function() {
|
|
17811
|
-
return parser_2.parseUnicodeLanguageId;
|
|
17812
|
-
} });
|
|
17813
17908
|
Object.defineProperty(exports, "isStructurallyValidLanguageTag", { enumerable: true, get: function() {
|
|
17814
17909
|
return parser_2.isStructurallyValidLanguageTag;
|
|
17815
17910
|
} });
|
|
17911
|
+
Object.defineProperty(exports, "isUnicodeLanguageSubtag", { enumerable: true, get: function() {
|
|
17912
|
+
return parser_2.isUnicodeLanguageSubtag;
|
|
17913
|
+
} });
|
|
17816
17914
|
Object.defineProperty(exports, "isUnicodeRegionSubtag", { enumerable: true, get: function() {
|
|
17817
17915
|
return parser_2.isUnicodeRegionSubtag;
|
|
17818
17916
|
} });
|
|
17819
17917
|
Object.defineProperty(exports, "isUnicodeScriptSubtag", { enumerable: true, get: function() {
|
|
17820
17918
|
return parser_2.isUnicodeScriptSubtag;
|
|
17821
17919
|
} });
|
|
17822
|
-
Object.defineProperty(exports, "
|
|
17823
|
-
return parser_2.
|
|
17920
|
+
Object.defineProperty(exports, "parseUnicodeLanguageId", { enumerable: true, get: function() {
|
|
17921
|
+
return parser_2.parseUnicodeLanguageId;
|
|
17922
|
+
} });
|
|
17923
|
+
Object.defineProperty(exports, "parseUnicodeLocaleId", { enumerable: true, get: function() {
|
|
17924
|
+
return parser_2.parseUnicodeLocaleId;
|
|
17824
17925
|
} });
|
|
17825
17926
|
tslib_1.__exportStar(require_types(), exports);
|
|
17826
|
-
tslib_1.__exportStar(require_emitter(), exports);
|
|
17827
17927
|
tslib_1.__exportStar(require_likelySubtags_generated(), exports);
|
|
17828
17928
|
}
|
|
17829
17929
|
});
|
|
@@ -17995,15 +18095,21 @@
|
|
|
17995
18095
|
var serializerDefault = function() {
|
|
17996
18096
|
return JSON.stringify(arguments);
|
|
17997
18097
|
};
|
|
17998
|
-
|
|
17999
|
-
|
|
18000
|
-
|
|
18001
|
-
|
|
18002
|
-
|
|
18003
|
-
|
|
18004
|
-
|
|
18005
|
-
|
|
18006
|
-
|
|
18098
|
+
var ObjectWithoutPrototypeCache = (
|
|
18099
|
+
/** @class */
|
|
18100
|
+
function() {
|
|
18101
|
+
function ObjectWithoutPrototypeCache2() {
|
|
18102
|
+
this.cache = /* @__PURE__ */ Object.create(null);
|
|
18103
|
+
}
|
|
18104
|
+
ObjectWithoutPrototypeCache2.prototype.get = function(key) {
|
|
18105
|
+
return this.cache[key];
|
|
18106
|
+
};
|
|
18107
|
+
ObjectWithoutPrototypeCache2.prototype.set = function(key, value) {
|
|
18108
|
+
this.cache[key] = value;
|
|
18109
|
+
};
|
|
18110
|
+
return ObjectWithoutPrototypeCache2;
|
|
18111
|
+
}()
|
|
18112
|
+
);
|
|
18007
18113
|
var cacheDefault = {
|
|
18008
18114
|
create: function create() {
|
|
18009
18115
|
return new ObjectWithoutPrototypeCache();
|