@formatjs/intl-pluralrules 5.4.1 → 5.4.3
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 +4 -4
- package/polyfill.iife.js +247 -189
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/intl-pluralrules",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.3",
|
|
4
4
|
"description": "Polyfill for Intl.PluralRules",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"polyfill",
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"decimal.js": "10",
|
|
24
24
|
"tslib": "2",
|
|
25
|
-
"@formatjs/
|
|
26
|
-
"@formatjs/
|
|
25
|
+
"@formatjs/ecma402-abstract": "2.3.3",
|
|
26
|
+
"@formatjs/intl-localematcher": "0.6.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@formatjs/intl-getcanonicallocales": "2.5.4",
|
|
30
|
-
"@formatjs/intl-locale": "4.2.
|
|
30
|
+
"@formatjs/intl-locale": "4.2.10"
|
|
31
31
|
},
|
|
32
32
|
"bugs": {
|
|
33
33
|
"url": "https://github.com/formatjs/formatjs/issues"
|
package/polyfill.iife.js
CHANGED
|
@@ -2366,169 +2366,6 @@
|
|
|
2366
2366
|
var ZERO = new decimal_default(0);
|
|
2367
2367
|
var NEGATIVE_ZERO = new decimal_default(-0);
|
|
2368
2368
|
|
|
2369
|
-
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/262.js
|
|
2370
|
-
function ToString(o) {
|
|
2371
|
-
if (typeof o === "symbol") {
|
|
2372
|
-
throw TypeError("Cannot convert a Symbol value to a string");
|
|
2373
|
-
}
|
|
2374
|
-
return String(o);
|
|
2375
|
-
}
|
|
2376
|
-
function ToNumber(val) {
|
|
2377
|
-
if (val === void 0) {
|
|
2378
|
-
return new Decimal(NaN);
|
|
2379
|
-
}
|
|
2380
|
-
if (val === null) {
|
|
2381
|
-
return ZERO;
|
|
2382
|
-
}
|
|
2383
|
-
if (typeof val === "boolean") {
|
|
2384
|
-
return new Decimal(val ? 1 : 0);
|
|
2385
|
-
}
|
|
2386
|
-
if (typeof val === "symbol" || typeof val === "bigint") {
|
|
2387
|
-
throw new TypeError("Cannot convert symbol/bigint to number");
|
|
2388
|
-
}
|
|
2389
|
-
return new Decimal(Number(val));
|
|
2390
|
-
}
|
|
2391
|
-
function ToObject(arg) {
|
|
2392
|
-
if (arg == null) {
|
|
2393
|
-
throw new TypeError("undefined/null cannot be converted to object");
|
|
2394
|
-
}
|
|
2395
|
-
return Object(arg);
|
|
2396
|
-
}
|
|
2397
|
-
function Type(x) {
|
|
2398
|
-
if (x === null) {
|
|
2399
|
-
return "Null";
|
|
2400
|
-
}
|
|
2401
|
-
if (typeof x === "undefined") {
|
|
2402
|
-
return "Undefined";
|
|
2403
|
-
}
|
|
2404
|
-
if (typeof x === "function" || typeof x === "object") {
|
|
2405
|
-
return "Object";
|
|
2406
|
-
}
|
|
2407
|
-
if (typeof x === "number") {
|
|
2408
|
-
return "Number";
|
|
2409
|
-
}
|
|
2410
|
-
if (typeof x === "boolean") {
|
|
2411
|
-
return "Boolean";
|
|
2412
|
-
}
|
|
2413
|
-
if (typeof x === "string") {
|
|
2414
|
-
return "String";
|
|
2415
|
-
}
|
|
2416
|
-
if (typeof x === "symbol") {
|
|
2417
|
-
return "Symbol";
|
|
2418
|
-
}
|
|
2419
|
-
if (typeof x === "bigint") {
|
|
2420
|
-
return "BigInt";
|
|
2421
|
-
}
|
|
2422
|
-
}
|
|
2423
|
-
var MINUTES_PER_HOUR = 60;
|
|
2424
|
-
var SECONDS_PER_MINUTE = 60;
|
|
2425
|
-
var MS_PER_SECOND = 1e3;
|
|
2426
|
-
var MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE;
|
|
2427
|
-
var MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR;
|
|
2428
|
-
|
|
2429
|
-
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/CoerceOptionsToObject.js
|
|
2430
|
-
function CoerceOptionsToObject(options) {
|
|
2431
|
-
if (typeof options === "undefined") {
|
|
2432
|
-
return /* @__PURE__ */ Object.create(null);
|
|
2433
|
-
}
|
|
2434
|
-
return ToObject(options);
|
|
2435
|
-
}
|
|
2436
|
-
|
|
2437
|
-
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/DefaultNumberOption.js
|
|
2438
|
-
function DefaultNumberOption(inputVal, min2, max2, fallback) {
|
|
2439
|
-
if (inputVal === void 0) {
|
|
2440
|
-
return fallback;
|
|
2441
|
-
}
|
|
2442
|
-
var val = Number(inputVal);
|
|
2443
|
-
if (isNaN(val) || val < min2 || val > max2) {
|
|
2444
|
-
throw new RangeError("".concat(val, " is outside of range [").concat(min2, ", ").concat(max2, "]"));
|
|
2445
|
-
}
|
|
2446
|
-
return Math.floor(val);
|
|
2447
|
-
}
|
|
2448
|
-
|
|
2449
|
-
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/GetNumberOption.js
|
|
2450
|
-
function GetNumberOption(options, property, minimum, maximum, fallback) {
|
|
2451
|
-
var val = options[property];
|
|
2452
|
-
return DefaultNumberOption(val, minimum, maximum, fallback);
|
|
2453
|
-
}
|
|
2454
|
-
|
|
2455
|
-
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/GetOption.js
|
|
2456
|
-
function GetOption(opts, prop, type, values, fallback) {
|
|
2457
|
-
if (typeof opts !== "object") {
|
|
2458
|
-
throw new TypeError("Options must be an object");
|
|
2459
|
-
}
|
|
2460
|
-
var value = opts[prop];
|
|
2461
|
-
if (value !== void 0) {
|
|
2462
|
-
if (type !== "boolean" && type !== "string") {
|
|
2463
|
-
throw new TypeError("invalid type");
|
|
2464
|
-
}
|
|
2465
|
-
if (type === "boolean") {
|
|
2466
|
-
value = Boolean(value);
|
|
2467
|
-
}
|
|
2468
|
-
if (type === "string") {
|
|
2469
|
-
value = ToString(value);
|
|
2470
|
-
}
|
|
2471
|
-
if (values !== void 0 && !values.filter(function(val) {
|
|
2472
|
-
return val == value;
|
|
2473
|
-
}).length) {
|
|
2474
|
-
throw new RangeError("".concat(value, " is not within ").concat(values.join(", ")));
|
|
2475
|
-
}
|
|
2476
|
-
return value;
|
|
2477
|
-
}
|
|
2478
|
-
return fallback;
|
|
2479
|
-
}
|
|
2480
|
-
|
|
2481
|
-
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/IsSanctionedSimpleUnitIdentifier.js
|
|
2482
|
-
var SANCTIONED_UNITS = [
|
|
2483
|
-
"angle-degree",
|
|
2484
|
-
"area-acre",
|
|
2485
|
-
"area-hectare",
|
|
2486
|
-
"concentr-percent",
|
|
2487
|
-
"digital-bit",
|
|
2488
|
-
"digital-byte",
|
|
2489
|
-
"digital-gigabit",
|
|
2490
|
-
"digital-gigabyte",
|
|
2491
|
-
"digital-kilobit",
|
|
2492
|
-
"digital-kilobyte",
|
|
2493
|
-
"digital-megabit",
|
|
2494
|
-
"digital-megabyte",
|
|
2495
|
-
"digital-petabyte",
|
|
2496
|
-
"digital-terabit",
|
|
2497
|
-
"digital-terabyte",
|
|
2498
|
-
"duration-day",
|
|
2499
|
-
"duration-hour",
|
|
2500
|
-
"duration-millisecond",
|
|
2501
|
-
"duration-minute",
|
|
2502
|
-
"duration-month",
|
|
2503
|
-
"duration-second",
|
|
2504
|
-
"duration-week",
|
|
2505
|
-
"duration-year",
|
|
2506
|
-
"length-centimeter",
|
|
2507
|
-
"length-foot",
|
|
2508
|
-
"length-inch",
|
|
2509
|
-
"length-kilometer",
|
|
2510
|
-
"length-meter",
|
|
2511
|
-
"length-mile-scandinavian",
|
|
2512
|
-
"length-mile",
|
|
2513
|
-
"length-millimeter",
|
|
2514
|
-
"length-yard",
|
|
2515
|
-
"mass-gram",
|
|
2516
|
-
"mass-kilogram",
|
|
2517
|
-
"mass-ounce",
|
|
2518
|
-
"mass-pound",
|
|
2519
|
-
"mass-stone",
|
|
2520
|
-
"temperature-celsius",
|
|
2521
|
-
"temperature-fahrenheit",
|
|
2522
|
-
"volume-fluid-ounce",
|
|
2523
|
-
"volume-gallon",
|
|
2524
|
-
"volume-liter",
|
|
2525
|
-
"volume-milliliter"
|
|
2526
|
-
];
|
|
2527
|
-
function removeUnitNamespace(unit) {
|
|
2528
|
-
return unit.slice(unit.indexOf("-") + 1);
|
|
2529
|
-
}
|
|
2530
|
-
var SIMPLE_UNITS = SANCTIONED_UNITS.map(removeUnitNamespace);
|
|
2531
|
-
|
|
2532
2369
|
// node_modules/.aspect_rules_js/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
|
|
2533
2370
|
var extendStatics = function(d, b) {
|
|
2534
2371
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
@@ -2704,6 +2541,228 @@
|
|
|
2704
2541
|
strategy: strategies.variadic
|
|
2705
2542
|
});
|
|
2706
2543
|
|
|
2544
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/262.js
|
|
2545
|
+
function ToString(o) {
|
|
2546
|
+
if (typeof o === "symbol") {
|
|
2547
|
+
throw TypeError("Cannot convert a Symbol value to a string");
|
|
2548
|
+
}
|
|
2549
|
+
return String(o);
|
|
2550
|
+
}
|
|
2551
|
+
function ToNumber(arg) {
|
|
2552
|
+
if (typeof arg === "number") {
|
|
2553
|
+
return new Decimal(arg);
|
|
2554
|
+
}
|
|
2555
|
+
invariant(typeof arg !== "bigint" && typeof arg !== "symbol", "BigInt and Symbol are not supported", TypeError);
|
|
2556
|
+
if (arg === void 0) {
|
|
2557
|
+
return new Decimal(NaN);
|
|
2558
|
+
}
|
|
2559
|
+
if (arg === null || arg === 0) {
|
|
2560
|
+
return ZERO;
|
|
2561
|
+
}
|
|
2562
|
+
if (arg === true) {
|
|
2563
|
+
return new Decimal(1);
|
|
2564
|
+
}
|
|
2565
|
+
if (typeof arg === "string") {
|
|
2566
|
+
try {
|
|
2567
|
+
return new Decimal(arg);
|
|
2568
|
+
} catch (e) {
|
|
2569
|
+
return new Decimal(NaN);
|
|
2570
|
+
}
|
|
2571
|
+
}
|
|
2572
|
+
invariant(typeof arg === "object", "object expected", TypeError);
|
|
2573
|
+
var primValue = ToPrimitive(arg, "number");
|
|
2574
|
+
invariant(typeof primValue !== "object", "object expected", TypeError);
|
|
2575
|
+
return ToNumber(primValue);
|
|
2576
|
+
}
|
|
2577
|
+
function ToObject(arg) {
|
|
2578
|
+
if (arg == null) {
|
|
2579
|
+
throw new TypeError("undefined/null cannot be converted to object");
|
|
2580
|
+
}
|
|
2581
|
+
return Object(arg);
|
|
2582
|
+
}
|
|
2583
|
+
function Type(x) {
|
|
2584
|
+
if (x === null) {
|
|
2585
|
+
return "Null";
|
|
2586
|
+
}
|
|
2587
|
+
if (typeof x === "undefined") {
|
|
2588
|
+
return "Undefined";
|
|
2589
|
+
}
|
|
2590
|
+
if (typeof x === "function" || typeof x === "object") {
|
|
2591
|
+
return "Object";
|
|
2592
|
+
}
|
|
2593
|
+
if (typeof x === "number") {
|
|
2594
|
+
return "Number";
|
|
2595
|
+
}
|
|
2596
|
+
if (typeof x === "boolean") {
|
|
2597
|
+
return "Boolean";
|
|
2598
|
+
}
|
|
2599
|
+
if (typeof x === "string") {
|
|
2600
|
+
return "String";
|
|
2601
|
+
}
|
|
2602
|
+
if (typeof x === "symbol") {
|
|
2603
|
+
return "Symbol";
|
|
2604
|
+
}
|
|
2605
|
+
if (typeof x === "bigint") {
|
|
2606
|
+
return "BigInt";
|
|
2607
|
+
}
|
|
2608
|
+
}
|
|
2609
|
+
var MINUTES_PER_HOUR = 60;
|
|
2610
|
+
var SECONDS_PER_MINUTE = 60;
|
|
2611
|
+
var MS_PER_SECOND = 1e3;
|
|
2612
|
+
var MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE;
|
|
2613
|
+
var MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR;
|
|
2614
|
+
function IsCallable(fn) {
|
|
2615
|
+
return typeof fn === "function";
|
|
2616
|
+
}
|
|
2617
|
+
function OrdinaryToPrimitive(O, hint) {
|
|
2618
|
+
var methodNames;
|
|
2619
|
+
if (hint === "string") {
|
|
2620
|
+
methodNames = ["toString", "valueOf"];
|
|
2621
|
+
} else {
|
|
2622
|
+
methodNames = ["valueOf", "toString"];
|
|
2623
|
+
}
|
|
2624
|
+
for (var _i = 0, methodNames_1 = methodNames; _i < methodNames_1.length; _i++) {
|
|
2625
|
+
var name_1 = methodNames_1[_i];
|
|
2626
|
+
var method = O[name_1];
|
|
2627
|
+
if (IsCallable(method)) {
|
|
2628
|
+
var result = method.call(O);
|
|
2629
|
+
if (typeof result !== "object") {
|
|
2630
|
+
return result;
|
|
2631
|
+
}
|
|
2632
|
+
}
|
|
2633
|
+
}
|
|
2634
|
+
throw new TypeError("Cannot convert object to primitive value");
|
|
2635
|
+
}
|
|
2636
|
+
function ToPrimitive(input, preferredType) {
|
|
2637
|
+
if (typeof input === "object" && input != null) {
|
|
2638
|
+
var exoticToPrim = Symbol.toPrimitive in input ? input[Symbol.toPrimitive] : void 0;
|
|
2639
|
+
var hint = void 0;
|
|
2640
|
+
if (exoticToPrim !== void 0) {
|
|
2641
|
+
if (preferredType === void 0) {
|
|
2642
|
+
hint = "default";
|
|
2643
|
+
} else if (preferredType === "string") {
|
|
2644
|
+
hint = "string";
|
|
2645
|
+
} else {
|
|
2646
|
+
invariant(preferredType === "number", 'preferredType must be "string" or "number"');
|
|
2647
|
+
hint = "number";
|
|
2648
|
+
}
|
|
2649
|
+
var result = exoticToPrim.call(input, hint);
|
|
2650
|
+
if (typeof result !== "object") {
|
|
2651
|
+
return result;
|
|
2652
|
+
}
|
|
2653
|
+
throw new TypeError("Cannot convert exotic object to primitive.");
|
|
2654
|
+
}
|
|
2655
|
+
if (preferredType === void 0) {
|
|
2656
|
+
preferredType = "number";
|
|
2657
|
+
}
|
|
2658
|
+
return OrdinaryToPrimitive(input, preferredType);
|
|
2659
|
+
}
|
|
2660
|
+
return input;
|
|
2661
|
+
}
|
|
2662
|
+
|
|
2663
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/CoerceOptionsToObject.js
|
|
2664
|
+
function CoerceOptionsToObject(options) {
|
|
2665
|
+
if (typeof options === "undefined") {
|
|
2666
|
+
return /* @__PURE__ */ Object.create(null);
|
|
2667
|
+
}
|
|
2668
|
+
return ToObject(options);
|
|
2669
|
+
}
|
|
2670
|
+
|
|
2671
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/DefaultNumberOption.js
|
|
2672
|
+
function DefaultNumberOption(inputVal, min2, max2, fallback) {
|
|
2673
|
+
if (inputVal === void 0) {
|
|
2674
|
+
return fallback;
|
|
2675
|
+
}
|
|
2676
|
+
var val = Number(inputVal);
|
|
2677
|
+
if (isNaN(val) || val < min2 || val > max2) {
|
|
2678
|
+
throw new RangeError("".concat(val, " is outside of range [").concat(min2, ", ").concat(max2, "]"));
|
|
2679
|
+
}
|
|
2680
|
+
return Math.floor(val);
|
|
2681
|
+
}
|
|
2682
|
+
|
|
2683
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/GetNumberOption.js
|
|
2684
|
+
function GetNumberOption(options, property, minimum, maximum, fallback) {
|
|
2685
|
+
var val = options[property];
|
|
2686
|
+
return DefaultNumberOption(val, minimum, maximum, fallback);
|
|
2687
|
+
}
|
|
2688
|
+
|
|
2689
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/GetOption.js
|
|
2690
|
+
function GetOption(opts, prop, type, values, fallback) {
|
|
2691
|
+
if (typeof opts !== "object") {
|
|
2692
|
+
throw new TypeError("Options must be an object");
|
|
2693
|
+
}
|
|
2694
|
+
var value = opts[prop];
|
|
2695
|
+
if (value !== void 0) {
|
|
2696
|
+
if (type !== "boolean" && type !== "string") {
|
|
2697
|
+
throw new TypeError("invalid type");
|
|
2698
|
+
}
|
|
2699
|
+
if (type === "boolean") {
|
|
2700
|
+
value = Boolean(value);
|
|
2701
|
+
}
|
|
2702
|
+
if (type === "string") {
|
|
2703
|
+
value = ToString(value);
|
|
2704
|
+
}
|
|
2705
|
+
if (values !== void 0 && !values.filter(function(val) {
|
|
2706
|
+
return val == value;
|
|
2707
|
+
}).length) {
|
|
2708
|
+
throw new RangeError("".concat(value, " is not within ").concat(values.join(", ")));
|
|
2709
|
+
}
|
|
2710
|
+
return value;
|
|
2711
|
+
}
|
|
2712
|
+
return fallback;
|
|
2713
|
+
}
|
|
2714
|
+
|
|
2715
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/IsSanctionedSimpleUnitIdentifier.js
|
|
2716
|
+
var SANCTIONED_UNITS = [
|
|
2717
|
+
"angle-degree",
|
|
2718
|
+
"area-acre",
|
|
2719
|
+
"area-hectare",
|
|
2720
|
+
"concentr-percent",
|
|
2721
|
+
"digital-bit",
|
|
2722
|
+
"digital-byte",
|
|
2723
|
+
"digital-gigabit",
|
|
2724
|
+
"digital-gigabyte",
|
|
2725
|
+
"digital-kilobit",
|
|
2726
|
+
"digital-kilobyte",
|
|
2727
|
+
"digital-megabit",
|
|
2728
|
+
"digital-megabyte",
|
|
2729
|
+
"digital-petabyte",
|
|
2730
|
+
"digital-terabit",
|
|
2731
|
+
"digital-terabyte",
|
|
2732
|
+
"duration-day",
|
|
2733
|
+
"duration-hour",
|
|
2734
|
+
"duration-millisecond",
|
|
2735
|
+
"duration-minute",
|
|
2736
|
+
"duration-month",
|
|
2737
|
+
"duration-second",
|
|
2738
|
+
"duration-week",
|
|
2739
|
+
"duration-year",
|
|
2740
|
+
"length-centimeter",
|
|
2741
|
+
"length-foot",
|
|
2742
|
+
"length-inch",
|
|
2743
|
+
"length-kilometer",
|
|
2744
|
+
"length-meter",
|
|
2745
|
+
"length-mile-scandinavian",
|
|
2746
|
+
"length-mile",
|
|
2747
|
+
"length-millimeter",
|
|
2748
|
+
"length-yard",
|
|
2749
|
+
"mass-gram",
|
|
2750
|
+
"mass-kilogram",
|
|
2751
|
+
"mass-ounce",
|
|
2752
|
+
"mass-pound",
|
|
2753
|
+
"mass-stone",
|
|
2754
|
+
"temperature-celsius",
|
|
2755
|
+
"temperature-fahrenheit",
|
|
2756
|
+
"volume-fluid-ounce",
|
|
2757
|
+
"volume-gallon",
|
|
2758
|
+
"volume-liter",
|
|
2759
|
+
"volume-milliliter"
|
|
2760
|
+
];
|
|
2761
|
+
function removeUnitNamespace(unit) {
|
|
2762
|
+
return unit.slice(unit.indexOf("-") + 1);
|
|
2763
|
+
}
|
|
2764
|
+
var SIMPLE_UNITS = SANCTIONED_UNITS.map(removeUnitNamespace);
|
|
2765
|
+
|
|
2707
2766
|
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ApplyUnsignedRoundingMode.js
|
|
2708
2767
|
function ApplyUnsignedRoundingMode(x, r1, r2, unsignedRoundingMode) {
|
|
2709
2768
|
if (x.eq(r1))
|
|
@@ -2778,10 +2837,10 @@
|
|
|
2778
2837
|
toExpPos: 100
|
|
2779
2838
|
});
|
|
2780
2839
|
function ToRawFixedFn(n, f) {
|
|
2781
|
-
return n.times(
|
|
2840
|
+
return n.times(decimal_default.pow(10, -f));
|
|
2782
2841
|
}
|
|
2783
2842
|
function findN1R1(x, f, roundingIncrement) {
|
|
2784
|
-
var nx = x.times(
|
|
2843
|
+
var nx = x.times(decimal_default.pow(10, f)).floor();
|
|
2785
2844
|
var n1 = nx.div(roundingIncrement).floor().times(roundingIncrement);
|
|
2786
2845
|
var r1 = ToRawFixedFn(n1, f);
|
|
2787
2846
|
return {
|
|
@@ -2790,7 +2849,7 @@
|
|
|
2790
2849
|
};
|
|
2791
2850
|
}
|
|
2792
2851
|
function findN2R2(x, f, roundingIncrement) {
|
|
2793
|
-
var nx = x.times(
|
|
2852
|
+
var nx = x.times(decimal_default.pow(10, f)).ceil();
|
|
2794
2853
|
var n2 = nx.div(roundingIncrement).ceil().times(roundingIncrement);
|
|
2795
2854
|
var r2 = ToRawFixedFn(n2, f);
|
|
2796
2855
|
return {
|
|
@@ -2849,21 +2908,15 @@
|
|
|
2849
2908
|
}
|
|
2850
2909
|
|
|
2851
2910
|
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ToRawPrecision.js
|
|
2852
|
-
decimal_default.set({
|
|
2853
|
-
toExpPos: 100
|
|
2854
|
-
});
|
|
2855
|
-
function ToRawPrecisionFn(n, e, p) {
|
|
2856
|
-
invariant(TEN.pow(p - 1).lessThanOrEqualTo(n) && n.lessThan(TEN.pow(p)), "n should be in the range ".concat(TEN.pow(p - 1), " <= n < ").concat(TEN.pow(p), " but got ").concat(n));
|
|
2857
|
-
return n.times(TEN.pow(e.minus(p).plus(1)));
|
|
2858
|
-
}
|
|
2859
2911
|
function findN1E1R1(x, p) {
|
|
2860
|
-
var maxN1 =
|
|
2861
|
-
var minN1 =
|
|
2912
|
+
var maxN1 = decimal_default.pow(10, p);
|
|
2913
|
+
var minN1 = decimal_default.pow(10, p - 1);
|
|
2862
2914
|
var maxE1 = x.div(minN1).log(10).plus(p).minus(1).ceil();
|
|
2863
|
-
|
|
2864
|
-
|
|
2915
|
+
var currentE1 = maxE1;
|
|
2916
|
+
while (true) {
|
|
2917
|
+
var currentN1 = x.div(decimal_default.pow(10, currentE1.minus(p).plus(1))).floor();
|
|
2865
2918
|
if (currentN1.lessThan(maxN1) && currentN1.greaterThanOrEqualTo(minN1)) {
|
|
2866
|
-
var currentR1 =
|
|
2919
|
+
var currentR1 = currentN1.times(decimal_default.pow(10, currentE1.minus(p).plus(1)));
|
|
2867
2920
|
if (currentR1.lessThanOrEqualTo(x)) {
|
|
2868
2921
|
return {
|
|
2869
2922
|
n1: currentN1,
|
|
@@ -2872,16 +2925,18 @@
|
|
|
2872
2925
|
};
|
|
2873
2926
|
}
|
|
2874
2927
|
}
|
|
2928
|
+
currentE1 = currentE1.minus(1);
|
|
2875
2929
|
}
|
|
2876
2930
|
}
|
|
2877
2931
|
function findN2E2R2(x, p) {
|
|
2878
|
-
var maxN2 =
|
|
2879
|
-
var minN2 =
|
|
2932
|
+
var maxN2 = decimal_default.pow(10, p);
|
|
2933
|
+
var minN2 = decimal_default.pow(10, p - 1);
|
|
2880
2934
|
var minE2 = x.div(maxN2).log(10).plus(p).minus(1).floor();
|
|
2881
|
-
|
|
2882
|
-
|
|
2935
|
+
var currentE2 = minE2;
|
|
2936
|
+
while (true) {
|
|
2937
|
+
var currentN2 = x.div(decimal_default.pow(10, currentE2.minus(p).plus(1))).ceil();
|
|
2883
2938
|
if (currentN2.lessThan(maxN2) && currentN2.greaterThanOrEqualTo(minN2)) {
|
|
2884
|
-
var currentR2 =
|
|
2939
|
+
var currentR2 = currentN2.times(decimal_default.pow(10, currentE2.minus(p).plus(1)));
|
|
2885
2940
|
if (currentR2.greaterThanOrEqualTo(x)) {
|
|
2886
2941
|
return {
|
|
2887
2942
|
n2: currentN2,
|
|
@@ -2890,6 +2945,7 @@
|
|
|
2890
2945
|
};
|
|
2891
2946
|
}
|
|
2892
2947
|
}
|
|
2948
|
+
currentE2 = currentE2.plus(1);
|
|
2893
2949
|
}
|
|
2894
2950
|
}
|
|
2895
2951
|
function ToRawPrecision(x, minPrecision, maxPrecision, unsignedRoundingMode) {
|
|
@@ -2948,7 +3004,8 @@
|
|
|
2948
3004
|
}
|
|
2949
3005
|
|
|
2950
3006
|
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/FormatNumericToString.js
|
|
2951
|
-
function FormatNumericToString(intlObject,
|
|
3007
|
+
function FormatNumericToString(intlObject, _x) {
|
|
3008
|
+
var x = _x;
|
|
2952
3009
|
var sign2;
|
|
2953
3010
|
if (x.isZero() && x.isNegative()) {
|
|
2954
3011
|
sign2 = "negative";
|
|
@@ -7040,7 +7097,7 @@
|
|
|
7040
7097
|
}).reduce(function(all, list) {
|
|
7041
7098
|
return __spreadArray(__spreadArray([], all, true), list, true);
|
|
7042
7099
|
}, []);
|
|
7043
|
-
matches && (matches = !(expandedMatchedRegions.indexOf(locale.region || "") > 1 != shouldInclude));
|
|
7100
|
+
matches && (matches = !(expandedMatchedRegions.indexOf(locale.region || "") > -1 != shouldInclude));
|
|
7044
7101
|
} else {
|
|
7045
7102
|
matches && (matches = locale.region ? region === "*" || region === locale.region : true);
|
|
7046
7103
|
}
|
|
@@ -7101,7 +7158,7 @@
|
|
|
7101
7158
|
region: ""
|
|
7102
7159
|
}, {
|
|
7103
7160
|
language: supportedLocale.language,
|
|
7104
|
-
script:
|
|
7161
|
+
script: supportedLSR.script,
|
|
7105
7162
|
region: ""
|
|
7106
7163
|
}, data2);
|
|
7107
7164
|
}
|
|
@@ -7466,7 +7523,8 @@
|
|
|
7466
7523
|
mnfd = DefaultNumberOption(mnfd, 0, 100, void 0);
|
|
7467
7524
|
mxfd = DefaultNumberOption(mxfd, 0, 100, void 0);
|
|
7468
7525
|
if (mnfd === void 0) {
|
|
7469
|
-
|
|
7526
|
+
invariant(mxfd !== void 0, "maximumFractionDigits must be defined");
|
|
7527
|
+
mnfd = Math.min(mnfdDefault, mxfd);
|
|
7470
7528
|
} else if (mxfd === void 0) {
|
|
7471
7529
|
mxfd = Math.max(mxfdDefault, mnfd);
|
|
7472
7530
|
} else if (mnfd > mxfd) {
|
|
@@ -7500,8 +7558,8 @@
|
|
|
7500
7558
|
internalSlots.roundingPriority = "auto";
|
|
7501
7559
|
}
|
|
7502
7560
|
if (roundingIncrement !== 1) {
|
|
7503
|
-
invariant(internalSlots.roundingType === "fractionDigits", "Invalid roundingType");
|
|
7504
|
-
invariant(internalSlots.maximumFractionDigits === internalSlots.minimumFractionDigits, "With roundingIncrement > 1, maximumFractionDigits and minimumFractionDigits must be equal.");
|
|
7561
|
+
invariant(internalSlots.roundingType === "fractionDigits", "Invalid roundingType", TypeError);
|
|
7562
|
+
invariant(internalSlots.maximumFractionDigits === internalSlots.minimumFractionDigits, "With roundingIncrement > 1, maximumFractionDigits and minimumFractionDigits must be equal.", RangeError);
|
|
7505
7563
|
}
|
|
7506
7564
|
}
|
|
7507
7565
|
|