@formatjs/intl-relativetimeformat 11.4.7 → 11.4.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.
Files changed (2) hide show
  1. package/package.json +6 -6
  2. package/polyfill.iife.js +139 -144
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formatjs/intl-relativetimeformat",
3
- "version": "11.4.7",
3
+ "version": "11.4.9",
4
4
  "description": "Formats JavaScript dates to relative time strings.",
5
5
  "keywords": [
6
6
  "intl",
@@ -21,13 +21,13 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "tslib": "2",
24
- "@formatjs/ecma402-abstract": "2.3.0",
25
- "@formatjs/intl-localematcher": "0.5.9"
24
+ "@formatjs/ecma402-abstract": "2.3.2",
25
+ "@formatjs/intl-localematcher": "0.5.10"
26
26
  },
27
27
  "devDependencies": {
28
- "@formatjs/intl-getcanonicallocales": "2.5.4",
29
- "@formatjs/intl-locale": "4.2.7",
30
- "@formatjs/intl-pluralrules": "5.4.0"
28
+ "@formatjs/intl-pluralrules": "5.4.2",
29
+ "@formatjs/intl-locale": "4.2.9",
30
+ "@formatjs/intl-getcanonicallocales": "2.5.4"
31
31
  },
32
32
  "main": "index.js",
33
33
  "types": "index.d.ts",
package/polyfill.iife.js CHANGED
@@ -2366,145 +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 ToObject(arg) {
2377
- if (arg == null) {
2378
- throw new TypeError("undefined/null cannot be converted to object");
2379
- }
2380
- return Object(arg);
2381
- }
2382
- function SameValue(x, y) {
2383
- if (Object.is) {
2384
- return Object.is(x, y);
2385
- }
2386
- if (x === y) {
2387
- return x !== 0 || 1 / x === 1 / y;
2388
- }
2389
- return x !== x && y !== y;
2390
- }
2391
- function Type(x) {
2392
- if (x === null) {
2393
- return "Null";
2394
- }
2395
- if (typeof x === "undefined") {
2396
- return "Undefined";
2397
- }
2398
- if (typeof x === "function" || typeof x === "object") {
2399
- return "Object";
2400
- }
2401
- if (typeof x === "number") {
2402
- return "Number";
2403
- }
2404
- if (typeof x === "boolean") {
2405
- return "Boolean";
2406
- }
2407
- if (typeof x === "string") {
2408
- return "String";
2409
- }
2410
- if (typeof x === "symbol") {
2411
- return "Symbol";
2412
- }
2413
- if (typeof x === "bigint") {
2414
- return "BigInt";
2415
- }
2416
- }
2417
- var MINUTES_PER_HOUR = 60;
2418
- var SECONDS_PER_MINUTE = 60;
2419
- var MS_PER_SECOND = 1e3;
2420
- var MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE;
2421
- var MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR;
2422
-
2423
- // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/CoerceOptionsToObject.js
2424
- function CoerceOptionsToObject(options) {
2425
- if (typeof options === "undefined") {
2426
- return /* @__PURE__ */ Object.create(null);
2427
- }
2428
- return ToObject(options);
2429
- }
2430
-
2431
- // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/GetOption.js
2432
- function GetOption(opts, prop, type, values, fallback) {
2433
- if (typeof opts !== "object") {
2434
- throw new TypeError("Options must be an object");
2435
- }
2436
- var value = opts[prop];
2437
- if (value !== void 0) {
2438
- if (type !== "boolean" && type !== "string") {
2439
- throw new TypeError("invalid type");
2440
- }
2441
- if (type === "boolean") {
2442
- value = Boolean(value);
2443
- }
2444
- if (type === "string") {
2445
- value = ToString(value);
2446
- }
2447
- if (values !== void 0 && !values.filter(function(val) {
2448
- return val == value;
2449
- }).length) {
2450
- throw new RangeError("".concat(value, " is not within ").concat(values.join(", ")));
2451
- }
2452
- return value;
2453
- }
2454
- return fallback;
2455
- }
2456
-
2457
- // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/IsSanctionedSimpleUnitIdentifier.js
2458
- var SANCTIONED_UNITS = [
2459
- "angle-degree",
2460
- "area-acre",
2461
- "area-hectare",
2462
- "concentr-percent",
2463
- "digital-bit",
2464
- "digital-byte",
2465
- "digital-gigabit",
2466
- "digital-gigabyte",
2467
- "digital-kilobit",
2468
- "digital-kilobyte",
2469
- "digital-megabit",
2470
- "digital-megabyte",
2471
- "digital-petabyte",
2472
- "digital-terabit",
2473
- "digital-terabyte",
2474
- "duration-day",
2475
- "duration-hour",
2476
- "duration-millisecond",
2477
- "duration-minute",
2478
- "duration-month",
2479
- "duration-second",
2480
- "duration-week",
2481
- "duration-year",
2482
- "length-centimeter",
2483
- "length-foot",
2484
- "length-inch",
2485
- "length-kilometer",
2486
- "length-meter",
2487
- "length-mile-scandinavian",
2488
- "length-mile",
2489
- "length-millimeter",
2490
- "length-yard",
2491
- "mass-gram",
2492
- "mass-kilogram",
2493
- "mass-ounce",
2494
- "mass-pound",
2495
- "mass-stone",
2496
- "temperature-celsius",
2497
- "temperature-fahrenheit",
2498
- "volume-fluid-ounce",
2499
- "volume-gallon",
2500
- "volume-liter",
2501
- "volume-milliliter"
2502
- ];
2503
- function removeUnitNamespace(unit) {
2504
- return unit.slice(unit.indexOf("-") + 1);
2505
- }
2506
- var SIMPLE_UNITS = SANCTIONED_UNITS.map(removeUnitNamespace);
2507
-
2508
2369
  // node_modules/.aspect_rules_js/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
2509
2370
  var extendStatics = function(d, b) {
2510
2371
  extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
@@ -2670,6 +2531,145 @@
2670
2531
  strategy: strategies.variadic
2671
2532
  });
2672
2533
 
2534
+ // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/262.js
2535
+ function ToString(o) {
2536
+ if (typeof o === "symbol") {
2537
+ throw TypeError("Cannot convert a Symbol value to a string");
2538
+ }
2539
+ return String(o);
2540
+ }
2541
+ function ToObject(arg) {
2542
+ if (arg == null) {
2543
+ throw new TypeError("undefined/null cannot be converted to object");
2544
+ }
2545
+ return Object(arg);
2546
+ }
2547
+ function SameValue(x, y) {
2548
+ if (Object.is) {
2549
+ return Object.is(x, y);
2550
+ }
2551
+ if (x === y) {
2552
+ return x !== 0 || 1 / x === 1 / y;
2553
+ }
2554
+ return x !== x && y !== y;
2555
+ }
2556
+ function Type(x) {
2557
+ if (x === null) {
2558
+ return "Null";
2559
+ }
2560
+ if (typeof x === "undefined") {
2561
+ return "Undefined";
2562
+ }
2563
+ if (typeof x === "function" || typeof x === "object") {
2564
+ return "Object";
2565
+ }
2566
+ if (typeof x === "number") {
2567
+ return "Number";
2568
+ }
2569
+ if (typeof x === "boolean") {
2570
+ return "Boolean";
2571
+ }
2572
+ if (typeof x === "string") {
2573
+ return "String";
2574
+ }
2575
+ if (typeof x === "symbol") {
2576
+ return "Symbol";
2577
+ }
2578
+ if (typeof x === "bigint") {
2579
+ return "BigInt";
2580
+ }
2581
+ }
2582
+ var MINUTES_PER_HOUR = 60;
2583
+ var SECONDS_PER_MINUTE = 60;
2584
+ var MS_PER_SECOND = 1e3;
2585
+ var MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE;
2586
+ var MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR;
2587
+
2588
+ // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/CoerceOptionsToObject.js
2589
+ function CoerceOptionsToObject(options) {
2590
+ if (typeof options === "undefined") {
2591
+ return /* @__PURE__ */ Object.create(null);
2592
+ }
2593
+ return ToObject(options);
2594
+ }
2595
+
2596
+ // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/GetOption.js
2597
+ function GetOption(opts, prop, type, values, fallback) {
2598
+ if (typeof opts !== "object") {
2599
+ throw new TypeError("Options must be an object");
2600
+ }
2601
+ var value = opts[prop];
2602
+ if (value !== void 0) {
2603
+ if (type !== "boolean" && type !== "string") {
2604
+ throw new TypeError("invalid type");
2605
+ }
2606
+ if (type === "boolean") {
2607
+ value = Boolean(value);
2608
+ }
2609
+ if (type === "string") {
2610
+ value = ToString(value);
2611
+ }
2612
+ if (values !== void 0 && !values.filter(function(val) {
2613
+ return val == value;
2614
+ }).length) {
2615
+ throw new RangeError("".concat(value, " is not within ").concat(values.join(", ")));
2616
+ }
2617
+ return value;
2618
+ }
2619
+ return fallback;
2620
+ }
2621
+
2622
+ // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/IsSanctionedSimpleUnitIdentifier.js
2623
+ var SANCTIONED_UNITS = [
2624
+ "angle-degree",
2625
+ "area-acre",
2626
+ "area-hectare",
2627
+ "concentr-percent",
2628
+ "digital-bit",
2629
+ "digital-byte",
2630
+ "digital-gigabit",
2631
+ "digital-gigabyte",
2632
+ "digital-kilobit",
2633
+ "digital-kilobyte",
2634
+ "digital-megabit",
2635
+ "digital-megabyte",
2636
+ "digital-petabyte",
2637
+ "digital-terabit",
2638
+ "digital-terabyte",
2639
+ "duration-day",
2640
+ "duration-hour",
2641
+ "duration-millisecond",
2642
+ "duration-minute",
2643
+ "duration-month",
2644
+ "duration-second",
2645
+ "duration-week",
2646
+ "duration-year",
2647
+ "length-centimeter",
2648
+ "length-foot",
2649
+ "length-inch",
2650
+ "length-kilometer",
2651
+ "length-meter",
2652
+ "length-mile-scandinavian",
2653
+ "length-mile",
2654
+ "length-millimeter",
2655
+ "length-yard",
2656
+ "mass-gram",
2657
+ "mass-kilogram",
2658
+ "mass-ounce",
2659
+ "mass-pound",
2660
+ "mass-stone",
2661
+ "temperature-celsius",
2662
+ "temperature-fahrenheit",
2663
+ "volume-fluid-ounce",
2664
+ "volume-gallon",
2665
+ "volume-liter",
2666
+ "volume-milliliter"
2667
+ ];
2668
+ function removeUnitNamespace(unit) {
2669
+ return unit.slice(unit.indexOf("-") + 1);
2670
+ }
2671
+ var SIMPLE_UNITS = SANCTIONED_UNITS.map(removeUnitNamespace);
2672
+
2673
2673
  // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ComputeExponentForMagnitude.js
2674
2674
  decimal_default.set({
2675
2675
  toExpPos: 100
@@ -2680,11 +2680,6 @@
2680
2680
  toExpPos: 100
2681
2681
  });
2682
2682
 
2683
- // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ToRawPrecision.js
2684
- decimal_default.set({
2685
- toExpPos: 100
2686
- });
2687
-
2688
2683
  // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/regex.generated.js
2689
2684
  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]/;
2690
2685