@equinor/roma-framework 5.0.0 → 5.0.1
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/cypress.mjs +1 -1
- package/dev-portal/lib/dev-portal/PortalStyles.d.ts +30 -1357
- package/dev-portal/roma-framework.umd.js +25777 -23913
- package/lib/dev-portal/PortalStyles.d.ts +30 -1357
- package/package.json +1 -1
- package/roma-framework.mjs +326 -92
- package/{router-lZjM0_Ti.mjs → router-BRrTrnno.mjs} +880 -611
|
@@ -1318,360 +1318,68 @@ function firstValueFrom(source, config2) {
|
|
|
1318
1318
|
source.subscribe(subscriber);
|
|
1319
1319
|
});
|
|
1320
1320
|
}
|
|
1321
|
-
function
|
|
1322
|
-
|
|
1321
|
+
function memoize$1(fn, options) {
|
|
1322
|
+
var cache = options && options.cache ? options.cache : cacheDefault$1;
|
|
1323
|
+
var serializer = options && options.serializer ? options.serializer : serializerDefault$1;
|
|
1324
|
+
var strategy = options && options.strategy ? options.strategy : strategyDefault$1;
|
|
1325
|
+
return strategy(fn, {
|
|
1326
|
+
cache,
|
|
1327
|
+
serializer
|
|
1328
|
+
});
|
|
1323
1329
|
}
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
var hasRequiredReactIs_production_min;
|
|
1327
|
-
function requireReactIs_production_min() {
|
|
1328
|
-
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
1329
|
-
hasRequiredReactIs_production_min = 1;
|
|
1330
|
-
var b = "function" === typeof Symbol && Symbol.for, c = b ? /* @__PURE__ */ Symbol.for("react.element") : 60103, d = b ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, e = b ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, f = b ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, g = b ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, h = b ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, k = b ? /* @__PURE__ */ Symbol.for("react.context") : 60110, l = b ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, m = b ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, n = b ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, p = b ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, q = b ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, r = b ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, t = b ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, v = b ? /* @__PURE__ */ Symbol.for("react.block") : 60121, w = b ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, x = b ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, y = b ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
1331
|
-
function z(a) {
|
|
1332
|
-
if ("object" === typeof a && null !== a) {
|
|
1333
|
-
var u = a.$$typeof;
|
|
1334
|
-
switch (u) {
|
|
1335
|
-
case c:
|
|
1336
|
-
switch (a = a.type, a) {
|
|
1337
|
-
case l:
|
|
1338
|
-
case m:
|
|
1339
|
-
case e:
|
|
1340
|
-
case g:
|
|
1341
|
-
case f:
|
|
1342
|
-
case p:
|
|
1343
|
-
return a;
|
|
1344
|
-
default:
|
|
1345
|
-
switch (a = a && a.$$typeof, a) {
|
|
1346
|
-
case k:
|
|
1347
|
-
case n:
|
|
1348
|
-
case t:
|
|
1349
|
-
case r:
|
|
1350
|
-
case h:
|
|
1351
|
-
return a;
|
|
1352
|
-
default:
|
|
1353
|
-
return u;
|
|
1354
|
-
}
|
|
1355
|
-
}
|
|
1356
|
-
case d:
|
|
1357
|
-
return u;
|
|
1358
|
-
}
|
|
1359
|
-
}
|
|
1360
|
-
}
|
|
1361
|
-
function A(a) {
|
|
1362
|
-
return z(a) === m;
|
|
1363
|
-
}
|
|
1364
|
-
reactIs_production_min.AsyncMode = l;
|
|
1365
|
-
reactIs_production_min.ConcurrentMode = m;
|
|
1366
|
-
reactIs_production_min.ContextConsumer = k;
|
|
1367
|
-
reactIs_production_min.ContextProvider = h;
|
|
1368
|
-
reactIs_production_min.Element = c;
|
|
1369
|
-
reactIs_production_min.ForwardRef = n;
|
|
1370
|
-
reactIs_production_min.Fragment = e;
|
|
1371
|
-
reactIs_production_min.Lazy = t;
|
|
1372
|
-
reactIs_production_min.Memo = r;
|
|
1373
|
-
reactIs_production_min.Portal = d;
|
|
1374
|
-
reactIs_production_min.Profiler = g;
|
|
1375
|
-
reactIs_production_min.StrictMode = f;
|
|
1376
|
-
reactIs_production_min.Suspense = p;
|
|
1377
|
-
reactIs_production_min.isAsyncMode = function(a) {
|
|
1378
|
-
return A(a) || z(a) === l;
|
|
1379
|
-
};
|
|
1380
|
-
reactIs_production_min.isConcurrentMode = A;
|
|
1381
|
-
reactIs_production_min.isContextConsumer = function(a) {
|
|
1382
|
-
return z(a) === k;
|
|
1383
|
-
};
|
|
1384
|
-
reactIs_production_min.isContextProvider = function(a) {
|
|
1385
|
-
return z(a) === h;
|
|
1386
|
-
};
|
|
1387
|
-
reactIs_production_min.isElement = function(a) {
|
|
1388
|
-
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
1389
|
-
};
|
|
1390
|
-
reactIs_production_min.isForwardRef = function(a) {
|
|
1391
|
-
return z(a) === n;
|
|
1392
|
-
};
|
|
1393
|
-
reactIs_production_min.isFragment = function(a) {
|
|
1394
|
-
return z(a) === e;
|
|
1395
|
-
};
|
|
1396
|
-
reactIs_production_min.isLazy = function(a) {
|
|
1397
|
-
return z(a) === t;
|
|
1398
|
-
};
|
|
1399
|
-
reactIs_production_min.isMemo = function(a) {
|
|
1400
|
-
return z(a) === r;
|
|
1401
|
-
};
|
|
1402
|
-
reactIs_production_min.isPortal = function(a) {
|
|
1403
|
-
return z(a) === d;
|
|
1404
|
-
};
|
|
1405
|
-
reactIs_production_min.isProfiler = function(a) {
|
|
1406
|
-
return z(a) === g;
|
|
1407
|
-
};
|
|
1408
|
-
reactIs_production_min.isStrictMode = function(a) {
|
|
1409
|
-
return z(a) === f;
|
|
1410
|
-
};
|
|
1411
|
-
reactIs_production_min.isSuspense = function(a) {
|
|
1412
|
-
return z(a) === p;
|
|
1413
|
-
};
|
|
1414
|
-
reactIs_production_min.isValidElementType = function(a) {
|
|
1415
|
-
return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
|
|
1416
|
-
};
|
|
1417
|
-
reactIs_production_min.typeOf = z;
|
|
1418
|
-
return reactIs_production_min;
|
|
1330
|
+
function isPrimitive$1(value) {
|
|
1331
|
+
return value == null || typeof value === "number" || typeof value === "boolean";
|
|
1419
1332
|
}
|
|
1420
|
-
|
|
1421
|
-
var
|
|
1422
|
-
|
|
1423
|
-
if (
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
(function() {
|
|
1427
|
-
var hasSymbol = typeof Symbol === "function" && Symbol.for;
|
|
1428
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
|
|
1429
|
-
var REACT_PORTAL_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.portal") : 60106;
|
|
1430
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107;
|
|
1431
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108;
|
|
1432
|
-
var REACT_PROFILER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114;
|
|
1433
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.provider") : 60109;
|
|
1434
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.context") : 60110;
|
|
1435
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111;
|
|
1436
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111;
|
|
1437
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112;
|
|
1438
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113;
|
|
1439
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120;
|
|
1440
|
-
var REACT_MEMO_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.memo") : 60115;
|
|
1441
|
-
var REACT_LAZY_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116;
|
|
1442
|
-
var REACT_BLOCK_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.block") : 60121;
|
|
1443
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117;
|
|
1444
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.responder") : 60118;
|
|
1445
|
-
var REACT_SCOPE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
1446
|
-
function isValidElementType(type) {
|
|
1447
|
-
return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1448
|
-
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
1449
|
-
}
|
|
1450
|
-
function typeOf(object) {
|
|
1451
|
-
if (typeof object === "object" && object !== null) {
|
|
1452
|
-
var $$typeof = object.$$typeof;
|
|
1453
|
-
switch ($$typeof) {
|
|
1454
|
-
case REACT_ELEMENT_TYPE:
|
|
1455
|
-
var type = object.type;
|
|
1456
|
-
switch (type) {
|
|
1457
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
1458
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
1459
|
-
case REACT_FRAGMENT_TYPE:
|
|
1460
|
-
case REACT_PROFILER_TYPE:
|
|
1461
|
-
case REACT_STRICT_MODE_TYPE:
|
|
1462
|
-
case REACT_SUSPENSE_TYPE:
|
|
1463
|
-
return type;
|
|
1464
|
-
default:
|
|
1465
|
-
var $$typeofType = type && type.$$typeof;
|
|
1466
|
-
switch ($$typeofType) {
|
|
1467
|
-
case REACT_CONTEXT_TYPE:
|
|
1468
|
-
case REACT_FORWARD_REF_TYPE:
|
|
1469
|
-
case REACT_LAZY_TYPE:
|
|
1470
|
-
case REACT_MEMO_TYPE:
|
|
1471
|
-
case REACT_PROVIDER_TYPE:
|
|
1472
|
-
return $$typeofType;
|
|
1473
|
-
default:
|
|
1474
|
-
return $$typeof;
|
|
1475
|
-
}
|
|
1476
|
-
}
|
|
1477
|
-
case REACT_PORTAL_TYPE:
|
|
1478
|
-
return $$typeof;
|
|
1479
|
-
}
|
|
1480
|
-
}
|
|
1481
|
-
return void 0;
|
|
1482
|
-
}
|
|
1483
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
1484
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
1485
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
1486
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
1487
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
1488
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
1489
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
1490
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
1491
|
-
var Memo = REACT_MEMO_TYPE;
|
|
1492
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
1493
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
1494
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
1495
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
1496
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
1497
|
-
function isAsyncMode(object) {
|
|
1498
|
-
{
|
|
1499
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
1500
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
|
1501
|
-
console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
|
|
1502
|
-
}
|
|
1503
|
-
}
|
|
1504
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
1505
|
-
}
|
|
1506
|
-
function isConcurrentMode(object) {
|
|
1507
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
1508
|
-
}
|
|
1509
|
-
function isContextConsumer(object) {
|
|
1510
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
1511
|
-
}
|
|
1512
|
-
function isContextProvider(object) {
|
|
1513
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
1514
|
-
}
|
|
1515
|
-
function isElement(object) {
|
|
1516
|
-
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1517
|
-
}
|
|
1518
|
-
function isForwardRef(object) {
|
|
1519
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
1520
|
-
}
|
|
1521
|
-
function isFragment(object) {
|
|
1522
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
1523
|
-
}
|
|
1524
|
-
function isLazy(object) {
|
|
1525
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
1526
|
-
}
|
|
1527
|
-
function isMemo(object) {
|
|
1528
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
1529
|
-
}
|
|
1530
|
-
function isPortal(object) {
|
|
1531
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
1532
|
-
}
|
|
1533
|
-
function isProfiler(object) {
|
|
1534
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
1535
|
-
}
|
|
1536
|
-
function isStrictMode(object) {
|
|
1537
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
1538
|
-
}
|
|
1539
|
-
function isSuspense(object) {
|
|
1540
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
1541
|
-
}
|
|
1542
|
-
reactIs_development.AsyncMode = AsyncMode;
|
|
1543
|
-
reactIs_development.ConcurrentMode = ConcurrentMode;
|
|
1544
|
-
reactIs_development.ContextConsumer = ContextConsumer;
|
|
1545
|
-
reactIs_development.ContextProvider = ContextProvider;
|
|
1546
|
-
reactIs_development.Element = Element;
|
|
1547
|
-
reactIs_development.ForwardRef = ForwardRef;
|
|
1548
|
-
reactIs_development.Fragment = Fragment;
|
|
1549
|
-
reactIs_development.Lazy = Lazy;
|
|
1550
|
-
reactIs_development.Memo = Memo;
|
|
1551
|
-
reactIs_development.Portal = Portal;
|
|
1552
|
-
reactIs_development.Profiler = Profiler;
|
|
1553
|
-
reactIs_development.StrictMode = StrictMode;
|
|
1554
|
-
reactIs_development.Suspense = Suspense;
|
|
1555
|
-
reactIs_development.isAsyncMode = isAsyncMode;
|
|
1556
|
-
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
1557
|
-
reactIs_development.isContextConsumer = isContextConsumer;
|
|
1558
|
-
reactIs_development.isContextProvider = isContextProvider;
|
|
1559
|
-
reactIs_development.isElement = isElement;
|
|
1560
|
-
reactIs_development.isForwardRef = isForwardRef;
|
|
1561
|
-
reactIs_development.isFragment = isFragment;
|
|
1562
|
-
reactIs_development.isLazy = isLazy;
|
|
1563
|
-
reactIs_development.isMemo = isMemo;
|
|
1564
|
-
reactIs_development.isPortal = isPortal;
|
|
1565
|
-
reactIs_development.isProfiler = isProfiler;
|
|
1566
|
-
reactIs_development.isStrictMode = isStrictMode;
|
|
1567
|
-
reactIs_development.isSuspense = isSuspense;
|
|
1568
|
-
reactIs_development.isValidElementType = isValidElementType;
|
|
1569
|
-
reactIs_development.typeOf = typeOf;
|
|
1570
|
-
})();
|
|
1333
|
+
function monadic$1(fn, cache, serializer, arg) {
|
|
1334
|
+
var cacheKey = isPrimitive$1(arg) ? arg : serializer(arg);
|
|
1335
|
+
var computedValue = cache.get(cacheKey);
|
|
1336
|
+
if (typeof computedValue === "undefined") {
|
|
1337
|
+
computedValue = fn.call(this, arg);
|
|
1338
|
+
cache.set(cacheKey, computedValue);
|
|
1571
1339
|
}
|
|
1572
|
-
return
|
|
1340
|
+
return computedValue;
|
|
1573
1341
|
}
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
if (
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
reactIs.exports = requireReactIs_development();
|
|
1342
|
+
function variadic$1(fn, cache, serializer) {
|
|
1343
|
+
var args = Array.prototype.slice.call(arguments, 3);
|
|
1344
|
+
var cacheKey = serializer(args);
|
|
1345
|
+
var computedValue = cache.get(cacheKey);
|
|
1346
|
+
if (typeof computedValue === "undefined") {
|
|
1347
|
+
computedValue = fn.apply(this, args);
|
|
1348
|
+
cache.set(cacheKey, computedValue);
|
|
1582
1349
|
}
|
|
1583
|
-
return
|
|
1350
|
+
return computedValue;
|
|
1584
1351
|
}
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
function requireHoistNonReactStatics_cjs() {
|
|
1588
|
-
if (hasRequiredHoistNonReactStatics_cjs) return hoistNonReactStatics_cjs;
|
|
1589
|
-
hasRequiredHoistNonReactStatics_cjs = 1;
|
|
1590
|
-
var reactIs2 = requireReactIs();
|
|
1591
|
-
var REACT_STATICS = {
|
|
1592
|
-
childContextTypes: true,
|
|
1593
|
-
contextType: true,
|
|
1594
|
-
contextTypes: true,
|
|
1595
|
-
defaultProps: true,
|
|
1596
|
-
displayName: true,
|
|
1597
|
-
getDefaultProps: true,
|
|
1598
|
-
getDerivedStateFromError: true,
|
|
1599
|
-
getDerivedStateFromProps: true,
|
|
1600
|
-
mixins: true,
|
|
1601
|
-
propTypes: true,
|
|
1602
|
-
type: true
|
|
1603
|
-
};
|
|
1604
|
-
var KNOWN_STATICS = {
|
|
1605
|
-
name: true,
|
|
1606
|
-
length: true,
|
|
1607
|
-
prototype: true,
|
|
1608
|
-
caller: true,
|
|
1609
|
-
callee: true,
|
|
1610
|
-
arguments: true,
|
|
1611
|
-
arity: true
|
|
1612
|
-
};
|
|
1613
|
-
var FORWARD_REF_STATICS = {
|
|
1614
|
-
"$$typeof": true,
|
|
1615
|
-
render: true,
|
|
1616
|
-
defaultProps: true,
|
|
1617
|
-
displayName: true,
|
|
1618
|
-
propTypes: true
|
|
1619
|
-
};
|
|
1620
|
-
var MEMO_STATICS = {
|
|
1621
|
-
"$$typeof": true,
|
|
1622
|
-
compare: true,
|
|
1623
|
-
defaultProps: true,
|
|
1624
|
-
displayName: true,
|
|
1625
|
-
propTypes: true,
|
|
1626
|
-
type: true
|
|
1627
|
-
};
|
|
1628
|
-
var TYPE_STATICS = {};
|
|
1629
|
-
TYPE_STATICS[reactIs2.ForwardRef] = FORWARD_REF_STATICS;
|
|
1630
|
-
TYPE_STATICS[reactIs2.Memo] = MEMO_STATICS;
|
|
1631
|
-
function getStatics(component) {
|
|
1632
|
-
if (reactIs2.isMemo(component)) {
|
|
1633
|
-
return MEMO_STATICS;
|
|
1634
|
-
}
|
|
1635
|
-
return TYPE_STATICS[component["$$typeof"]] || REACT_STATICS;
|
|
1636
|
-
}
|
|
1637
|
-
var defineProperty = Object.defineProperty;
|
|
1638
|
-
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
|
1639
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
1640
|
-
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
1641
|
-
var getPrototypeOf = Object.getPrototypeOf;
|
|
1642
|
-
var objectPrototype = Object.prototype;
|
|
1643
|
-
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
|
1644
|
-
if (typeof sourceComponent !== "string") {
|
|
1645
|
-
if (objectPrototype) {
|
|
1646
|
-
var inheritedComponent = getPrototypeOf(sourceComponent);
|
|
1647
|
-
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
|
1648
|
-
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
|
1649
|
-
}
|
|
1650
|
-
}
|
|
1651
|
-
var keys = getOwnPropertyNames(sourceComponent);
|
|
1652
|
-
if (getOwnPropertySymbols) {
|
|
1653
|
-
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
|
1654
|
-
}
|
|
1655
|
-
var targetStatics = getStatics(targetComponent);
|
|
1656
|
-
var sourceStatics = getStatics(sourceComponent);
|
|
1657
|
-
for (var i = 0; i < keys.length; ++i) {
|
|
1658
|
-
var key = keys[i];
|
|
1659
|
-
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
|
|
1660
|
-
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
|
1661
|
-
try {
|
|
1662
|
-
defineProperty(targetComponent, key, descriptor);
|
|
1663
|
-
} catch (e) {
|
|
1664
|
-
}
|
|
1665
|
-
}
|
|
1666
|
-
}
|
|
1667
|
-
}
|
|
1668
|
-
return targetComponent;
|
|
1669
|
-
}
|
|
1670
|
-
hoistNonReactStatics_cjs = hoistNonReactStatics;
|
|
1671
|
-
return hoistNonReactStatics_cjs;
|
|
1352
|
+
function assemble$1(fn, context, strategy, cache, serialize) {
|
|
1353
|
+
return strategy.bind(context, fn, cache, serialize);
|
|
1672
1354
|
}
|
|
1673
|
-
|
|
1674
|
-
|
|
1355
|
+
function strategyDefault$1(fn, options) {
|
|
1356
|
+
var strategy = fn.length === 1 ? monadic$1 : variadic$1;
|
|
1357
|
+
return assemble$1(fn, this, strategy, options.cache.create(), options.serializer);
|
|
1358
|
+
}
|
|
1359
|
+
function strategyVariadic$1(fn, options) {
|
|
1360
|
+
return assemble$1(fn, this, variadic$1, options.cache.create(), options.serializer);
|
|
1361
|
+
}
|
|
1362
|
+
var serializerDefault$1 = function() {
|
|
1363
|
+
return JSON.stringify(arguments);
|
|
1364
|
+
};
|
|
1365
|
+
function ObjectWithoutPrototypeCache$1() {
|
|
1366
|
+
this.cache = /* @__PURE__ */ Object.create(null);
|
|
1367
|
+
}
|
|
1368
|
+
ObjectWithoutPrototypeCache$1.prototype.get = function(key) {
|
|
1369
|
+
return this.cache[key];
|
|
1370
|
+
};
|
|
1371
|
+
ObjectWithoutPrototypeCache$1.prototype.set = function(key, value) {
|
|
1372
|
+
this.cache[key] = value;
|
|
1373
|
+
};
|
|
1374
|
+
var cacheDefault$1 = {
|
|
1375
|
+
create: function create() {
|
|
1376
|
+
return new ObjectWithoutPrototypeCache$1();
|
|
1377
|
+
}
|
|
1378
|
+
};
|
|
1379
|
+
var strategies$1 = {
|
|
1380
|
+
variadic: strategyVariadic$1
|
|
1381
|
+
};
|
|
1382
|
+
function invariant$2(condition, message, Err) {
|
|
1675
1383
|
if (Err === void 0) {
|
|
1676
1384
|
Err = Error;
|
|
1677
1385
|
}
|
|
@@ -1679,7 +1387,118 @@ function invariant$1(condition, message, Err) {
|
|
|
1679
1387
|
throw new Err(message);
|
|
1680
1388
|
}
|
|
1681
1389
|
}
|
|
1682
|
-
|
|
1390
|
+
memoize$1(function() {
|
|
1391
|
+
var _a2;
|
|
1392
|
+
var args = [];
|
|
1393
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1394
|
+
args[_i] = arguments[_i];
|
|
1395
|
+
}
|
|
1396
|
+
return new ((_a2 = Intl.NumberFormat).bind.apply(_a2, __spreadArray([void 0], args, false)))();
|
|
1397
|
+
}, {
|
|
1398
|
+
strategy: strategies$1.variadic
|
|
1399
|
+
});
|
|
1400
|
+
memoize$1(function() {
|
|
1401
|
+
var _a2;
|
|
1402
|
+
var args = [];
|
|
1403
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1404
|
+
args[_i] = arguments[_i];
|
|
1405
|
+
}
|
|
1406
|
+
return new ((_a2 = Intl.DateTimeFormat).bind.apply(_a2, __spreadArray([void 0], args, false)))();
|
|
1407
|
+
}, {
|
|
1408
|
+
strategy: strategies$1.variadic
|
|
1409
|
+
});
|
|
1410
|
+
memoize$1(function() {
|
|
1411
|
+
var _a2;
|
|
1412
|
+
var args = [];
|
|
1413
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1414
|
+
args[_i] = arguments[_i];
|
|
1415
|
+
}
|
|
1416
|
+
return new ((_a2 = Intl.PluralRules).bind.apply(_a2, __spreadArray([void 0], args, false)))();
|
|
1417
|
+
}, {
|
|
1418
|
+
strategy: strategies$1.variadic
|
|
1419
|
+
});
|
|
1420
|
+
memoize$1(function() {
|
|
1421
|
+
var _a2;
|
|
1422
|
+
var args = [];
|
|
1423
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1424
|
+
args[_i] = arguments[_i];
|
|
1425
|
+
}
|
|
1426
|
+
return new ((_a2 = Intl.Locale).bind.apply(_a2, __spreadArray([void 0], args, false)))();
|
|
1427
|
+
}, {
|
|
1428
|
+
strategy: strategies$1.variadic
|
|
1429
|
+
});
|
|
1430
|
+
memoize$1(function() {
|
|
1431
|
+
var _a2;
|
|
1432
|
+
var args = [];
|
|
1433
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1434
|
+
args[_i] = arguments[_i];
|
|
1435
|
+
}
|
|
1436
|
+
return new ((_a2 = Intl.ListFormat).bind.apply(_a2, __spreadArray([void 0], args, false)))();
|
|
1437
|
+
}, {
|
|
1438
|
+
strategy: strategies$1.variadic
|
|
1439
|
+
});
|
|
1440
|
+
function memoize(fn, options) {
|
|
1441
|
+
var cache = options && options.cache ? options.cache : cacheDefault;
|
|
1442
|
+
var serializer = options && options.serializer ? options.serializer : serializerDefault;
|
|
1443
|
+
var strategy = options && options.strategy ? options.strategy : strategyDefault;
|
|
1444
|
+
return strategy(fn, {
|
|
1445
|
+
cache,
|
|
1446
|
+
serializer
|
|
1447
|
+
});
|
|
1448
|
+
}
|
|
1449
|
+
function isPrimitive(value) {
|
|
1450
|
+
return value == null || typeof value === "number" || typeof value === "boolean";
|
|
1451
|
+
}
|
|
1452
|
+
function monadic(fn, cache, serializer, arg) {
|
|
1453
|
+
var cacheKey = isPrimitive(arg) ? arg : serializer(arg);
|
|
1454
|
+
var computedValue = cache.get(cacheKey);
|
|
1455
|
+
if (typeof computedValue === "undefined") {
|
|
1456
|
+
computedValue = fn.call(this, arg);
|
|
1457
|
+
cache.set(cacheKey, computedValue);
|
|
1458
|
+
}
|
|
1459
|
+
return computedValue;
|
|
1460
|
+
}
|
|
1461
|
+
function variadic(fn, cache, serializer) {
|
|
1462
|
+
var args = Array.prototype.slice.call(arguments, 3);
|
|
1463
|
+
var cacheKey = serializer(args);
|
|
1464
|
+
var computedValue = cache.get(cacheKey);
|
|
1465
|
+
if (typeof computedValue === "undefined") {
|
|
1466
|
+
computedValue = fn.apply(this, args);
|
|
1467
|
+
cache.set(cacheKey, computedValue);
|
|
1468
|
+
}
|
|
1469
|
+
return computedValue;
|
|
1470
|
+
}
|
|
1471
|
+
function assemble(fn, context, strategy, cache, serialize) {
|
|
1472
|
+
return strategy.bind(context, fn, cache, serialize);
|
|
1473
|
+
}
|
|
1474
|
+
function strategyDefault(fn, options) {
|
|
1475
|
+
var strategy = fn.length === 1 ? monadic : variadic;
|
|
1476
|
+
return assemble(fn, this, strategy, options.cache.create(), options.serializer);
|
|
1477
|
+
}
|
|
1478
|
+
function strategyVariadic(fn, options) {
|
|
1479
|
+
return assemble(fn, this, variadic, options.cache.create(), options.serializer);
|
|
1480
|
+
}
|
|
1481
|
+
var serializerDefault = function() {
|
|
1482
|
+
return JSON.stringify(arguments);
|
|
1483
|
+
};
|
|
1484
|
+
function ObjectWithoutPrototypeCache() {
|
|
1485
|
+
this.cache = /* @__PURE__ */ Object.create(null);
|
|
1486
|
+
}
|
|
1487
|
+
ObjectWithoutPrototypeCache.prototype.get = function(key) {
|
|
1488
|
+
return this.cache[key];
|
|
1489
|
+
};
|
|
1490
|
+
ObjectWithoutPrototypeCache.prototype.set = function(key, value) {
|
|
1491
|
+
this.cache[key] = value;
|
|
1492
|
+
};
|
|
1493
|
+
var cacheDefault = {
|
|
1494
|
+
create: function create2() {
|
|
1495
|
+
return new ObjectWithoutPrototypeCache();
|
|
1496
|
+
}
|
|
1497
|
+
};
|
|
1498
|
+
var strategies = {
|
|
1499
|
+
variadic: strategyVariadic
|
|
1500
|
+
};
|
|
1501
|
+
var ErrorKind$1;
|
|
1683
1502
|
(function(ErrorKind2) {
|
|
1684
1503
|
ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_CLOSING_BRACE"] = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE";
|
|
1685
1504
|
ErrorKind2[ErrorKind2["EMPTY_ARGUMENT"] = 2] = "EMPTY_ARGUMENT";
|
|
@@ -1707,8 +1526,8 @@ var ErrorKind;
|
|
|
1707
1526
|
ErrorKind2[ErrorKind2["INVALID_TAG_NAME"] = 25] = "INVALID_TAG_NAME";
|
|
1708
1527
|
ErrorKind2[ErrorKind2["UNMATCHED_CLOSING_TAG"] = 26] = "UNMATCHED_CLOSING_TAG";
|
|
1709
1528
|
ErrorKind2[ErrorKind2["UNCLOSED_TAG"] = 27] = "UNCLOSED_TAG";
|
|
1710
|
-
})(ErrorKind || (ErrorKind = {}));
|
|
1711
|
-
var TYPE;
|
|
1529
|
+
})(ErrorKind$1 || (ErrorKind$1 = {}));
|
|
1530
|
+
var TYPE$1;
|
|
1712
1531
|
(function(TYPE2) {
|
|
1713
1532
|
TYPE2[TYPE2["literal"] = 0] = "literal";
|
|
1714
1533
|
TYPE2[TYPE2["argument"] = 1] = "argument";
|
|
@@ -1719,44 +1538,44 @@ var TYPE;
|
|
|
1719
1538
|
TYPE2[TYPE2["plural"] = 6] = "plural";
|
|
1720
1539
|
TYPE2[TYPE2["pound"] = 7] = "pound";
|
|
1721
1540
|
TYPE2[TYPE2["tag"] = 8] = "tag";
|
|
1722
|
-
})(TYPE || (TYPE = {}));
|
|
1723
|
-
var SKELETON_TYPE;
|
|
1541
|
+
})(TYPE$1 || (TYPE$1 = {}));
|
|
1542
|
+
var SKELETON_TYPE$1;
|
|
1724
1543
|
(function(SKELETON_TYPE2) {
|
|
1725
1544
|
SKELETON_TYPE2[SKELETON_TYPE2["number"] = 0] = "number";
|
|
1726
1545
|
SKELETON_TYPE2[SKELETON_TYPE2["dateTime"] = 1] = "dateTime";
|
|
1727
|
-
})(SKELETON_TYPE || (SKELETON_TYPE = {}));
|
|
1546
|
+
})(SKELETON_TYPE$1 || (SKELETON_TYPE$1 = {}));
|
|
1728
1547
|
function isLiteralElement(el) {
|
|
1729
|
-
return el.type === TYPE.literal;
|
|
1548
|
+
return el.type === TYPE$1.literal;
|
|
1730
1549
|
}
|
|
1731
1550
|
function isArgumentElement(el) {
|
|
1732
|
-
return el.type === TYPE.argument;
|
|
1551
|
+
return el.type === TYPE$1.argument;
|
|
1733
1552
|
}
|
|
1734
1553
|
function isNumberElement(el) {
|
|
1735
|
-
return el.type === TYPE.number;
|
|
1554
|
+
return el.type === TYPE$1.number;
|
|
1736
1555
|
}
|
|
1737
1556
|
function isDateElement(el) {
|
|
1738
|
-
return el.type === TYPE.date;
|
|
1557
|
+
return el.type === TYPE$1.date;
|
|
1739
1558
|
}
|
|
1740
1559
|
function isTimeElement(el) {
|
|
1741
|
-
return el.type === TYPE.time;
|
|
1560
|
+
return el.type === TYPE$1.time;
|
|
1742
1561
|
}
|
|
1743
1562
|
function isSelectElement(el) {
|
|
1744
|
-
return el.type === TYPE.select;
|
|
1563
|
+
return el.type === TYPE$1.select;
|
|
1745
1564
|
}
|
|
1746
1565
|
function isPluralElement(el) {
|
|
1747
|
-
return el.type === TYPE.plural;
|
|
1566
|
+
return el.type === TYPE$1.plural;
|
|
1748
1567
|
}
|
|
1749
1568
|
function isPoundElement(el) {
|
|
1750
|
-
return el.type === TYPE.pound;
|
|
1569
|
+
return el.type === TYPE$1.pound;
|
|
1751
1570
|
}
|
|
1752
1571
|
function isTagElement(el) {
|
|
1753
|
-
return el.type === TYPE.tag;
|
|
1572
|
+
return el.type === TYPE$1.tag;
|
|
1754
1573
|
}
|
|
1755
1574
|
function isNumberSkeleton(el) {
|
|
1756
|
-
return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.number);
|
|
1575
|
+
return !!(el && typeof el === "object" && el.type === SKELETON_TYPE$1.number);
|
|
1757
1576
|
}
|
|
1758
1577
|
function isDateTimeSkeleton(el) {
|
|
1759
|
-
return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.dateTime);
|
|
1578
|
+
return !!(el && typeof el === "object" && el.type === SKELETON_TYPE$1.dateTime);
|
|
1760
1579
|
}
|
|
1761
1580
|
var SPACE_SEPARATOR_REGEX = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
1762
1581
|
var DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
|
|
@@ -1800,7 +1619,7 @@ function parseDateTimeSkeleton(skeleton) {
|
|
|
1800
1619
|
throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
|
|
1801
1620
|
// Weekday
|
|
1802
1621
|
case "E":
|
|
1803
|
-
result.weekday = len === 4 ? "
|
|
1622
|
+
result.weekday = len === 4 ? "long" : len === 5 ? "narrow" : "short";
|
|
1804
1623
|
break;
|
|
1805
1624
|
case "e":
|
|
1806
1625
|
if (len < 4) {
|
|
@@ -1861,7 +1680,7 @@ function parseDateTimeSkeleton(skeleton) {
|
|
|
1861
1680
|
case "Z":
|
|
1862
1681
|
// 1..3, 4, 5: The ISO8601 varios formats
|
|
1863
1682
|
case "O":
|
|
1864
|
-
// 1, 4:
|
|
1683
|
+
// 1, 4: milliseconds in day short, long
|
|
1865
1684
|
case "v":
|
|
1866
1685
|
// 1, 4: generic non-location format
|
|
1867
1686
|
case "V":
|
|
@@ -2080,6 +1899,27 @@ function parseNumberSkeleton(tokens) {
|
|
|
2080
1899
|
case "scale":
|
|
2081
1900
|
result.scale = parseFloat(token.options[0]);
|
|
2082
1901
|
continue;
|
|
1902
|
+
case "rounding-mode-floor":
|
|
1903
|
+
result.roundingMode = "floor";
|
|
1904
|
+
continue;
|
|
1905
|
+
case "rounding-mode-ceiling":
|
|
1906
|
+
result.roundingMode = "ceil";
|
|
1907
|
+
continue;
|
|
1908
|
+
case "rounding-mode-down":
|
|
1909
|
+
result.roundingMode = "trunc";
|
|
1910
|
+
continue;
|
|
1911
|
+
case "rounding-mode-up":
|
|
1912
|
+
result.roundingMode = "expand";
|
|
1913
|
+
continue;
|
|
1914
|
+
case "rounding-mode-half-even":
|
|
1915
|
+
result.roundingMode = "halfEven";
|
|
1916
|
+
continue;
|
|
1917
|
+
case "rounding-mode-half-down":
|
|
1918
|
+
result.roundingMode = "halfTrunc";
|
|
1919
|
+
continue;
|
|
1920
|
+
case "rounding-mode-half-up":
|
|
1921
|
+
result.roundingMode = "halfExpand";
|
|
1922
|
+
continue;
|
|
2083
1923
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
|
2084
1924
|
case "integer-width":
|
|
2085
1925
|
if (token.options.length > 1) {
|
|
@@ -2147,6 +1987,12 @@ var timeData = {
|
|
|
2147
1987
|
"H",
|
|
2148
1988
|
"h"
|
|
2149
1989
|
],
|
|
1990
|
+
"419": [
|
|
1991
|
+
"h",
|
|
1992
|
+
"H",
|
|
1993
|
+
"hB",
|
|
1994
|
+
"hb"
|
|
1995
|
+
],
|
|
2150
1996
|
"AC": [
|
|
2151
1997
|
"H",
|
|
2152
1998
|
"h",
|
|
@@ -2195,8 +2041,8 @@ var timeData = {
|
|
|
2195
2041
|
"hB"
|
|
2196
2042
|
],
|
|
2197
2043
|
"AR": [
|
|
2198
|
-
"H",
|
|
2199
2044
|
"h",
|
|
2045
|
+
"H",
|
|
2200
2046
|
"hB",
|
|
2201
2047
|
"hb"
|
|
2202
2048
|
],
|
|
@@ -2286,9 +2132,9 @@ var timeData = {
|
|
|
2286
2132
|
"H"
|
|
2287
2133
|
],
|
|
2288
2134
|
"BO": [
|
|
2135
|
+
"h",
|
|
2289
2136
|
"H",
|
|
2290
2137
|
"hB",
|
|
2291
|
-
"h",
|
|
2292
2138
|
"hb"
|
|
2293
2139
|
],
|
|
2294
2140
|
"BQ": [
|
|
@@ -2365,8 +2211,8 @@ var timeData = {
|
|
|
2365
2211
|
"hB"
|
|
2366
2212
|
],
|
|
2367
2213
|
"CL": [
|
|
2368
|
-
"H",
|
|
2369
2214
|
"h",
|
|
2215
|
+
"H",
|
|
2370
2216
|
"hB",
|
|
2371
2217
|
"hb"
|
|
2372
2218
|
],
|
|
@@ -2391,14 +2237,14 @@ var timeData = {
|
|
|
2391
2237
|
"H"
|
|
2392
2238
|
],
|
|
2393
2239
|
"CR": [
|
|
2394
|
-
"H",
|
|
2395
2240
|
"h",
|
|
2241
|
+
"H",
|
|
2396
2242
|
"hB",
|
|
2397
2243
|
"hb"
|
|
2398
2244
|
],
|
|
2399
2245
|
"CU": [
|
|
2400
|
-
"H",
|
|
2401
2246
|
"h",
|
|
2247
|
+
"H",
|
|
2402
2248
|
"hB",
|
|
2403
2249
|
"hb"
|
|
2404
2250
|
],
|
|
@@ -2467,9 +2313,9 @@ var timeData = {
|
|
|
2467
2313
|
"hb"
|
|
2468
2314
|
],
|
|
2469
2315
|
"EC": [
|
|
2316
|
+
"h",
|
|
2470
2317
|
"H",
|
|
2471
2318
|
"hB",
|
|
2472
|
-
"h",
|
|
2473
2319
|
"hb"
|
|
2474
2320
|
],
|
|
2475
2321
|
"EE": [
|
|
@@ -2605,8 +2451,8 @@ var timeData = {
|
|
|
2605
2451
|
"hB"
|
|
2606
2452
|
],
|
|
2607
2453
|
"GT": [
|
|
2608
|
-
"H",
|
|
2609
2454
|
"h",
|
|
2455
|
+
"H",
|
|
2610
2456
|
"hB",
|
|
2611
2457
|
"hb"
|
|
2612
2458
|
],
|
|
@@ -2633,8 +2479,8 @@ var timeData = {
|
|
|
2633
2479
|
"H"
|
|
2634
2480
|
],
|
|
2635
2481
|
"HN": [
|
|
2636
|
-
"H",
|
|
2637
2482
|
"h",
|
|
2483
|
+
"H",
|
|
2638
2484
|
"hB",
|
|
2639
2485
|
"hb"
|
|
2640
2486
|
],
|
|
@@ -2948,8 +2794,8 @@ var timeData = {
|
|
|
2948
2794
|
"hB"
|
|
2949
2795
|
],
|
|
2950
2796
|
"MX": [
|
|
2951
|
-
"H",
|
|
2952
2797
|
"h",
|
|
2798
|
+
"H",
|
|
2953
2799
|
"hB",
|
|
2954
2800
|
"hb"
|
|
2955
2801
|
],
|
|
@@ -2989,8 +2835,8 @@ var timeData = {
|
|
|
2989
2835
|
"hB"
|
|
2990
2836
|
],
|
|
2991
2837
|
"NI": [
|
|
2992
|
-
"H",
|
|
2993
2838
|
"h",
|
|
2839
|
+
"H",
|
|
2994
2840
|
"hB",
|
|
2995
2841
|
"hb"
|
|
2996
2842
|
],
|
|
@@ -3038,9 +2884,9 @@ var timeData = {
|
|
|
3038
2884
|
"hb"
|
|
3039
2885
|
],
|
|
3040
2886
|
"PE": [
|
|
2887
|
+
"h",
|
|
3041
2888
|
"H",
|
|
3042
2889
|
"hB",
|
|
3043
|
-
"h",
|
|
3044
2890
|
"hb"
|
|
3045
2891
|
],
|
|
3046
2892
|
"PF": [
|
|
@@ -3098,8 +2944,8 @@ var timeData = {
|
|
|
3098
2944
|
"H"
|
|
3099
2945
|
],
|
|
3100
2946
|
"PY": [
|
|
3101
|
-
"H",
|
|
3102
2947
|
"h",
|
|
2948
|
+
"H",
|
|
3103
2949
|
"hB",
|
|
3104
2950
|
"hb"
|
|
3105
2951
|
],
|
|
@@ -3212,8 +3058,8 @@ var timeData = {
|
|
|
3212
3058
|
"hB"
|
|
3213
3059
|
],
|
|
3214
3060
|
"SV": [
|
|
3215
|
-
"H",
|
|
3216
3061
|
"h",
|
|
3062
|
+
"H",
|
|
3217
3063
|
"hB",
|
|
3218
3064
|
"hb"
|
|
3219
3065
|
],
|
|
@@ -3335,8 +3181,8 @@ var timeData = {
|
|
|
3335
3181
|
"hB"
|
|
3336
3182
|
],
|
|
3337
3183
|
"UY": [
|
|
3338
|
-
"H",
|
|
3339
3184
|
"h",
|
|
3185
|
+
"H",
|
|
3340
3186
|
"hB",
|
|
3341
3187
|
"hb"
|
|
3342
3188
|
],
|
|
@@ -3444,37 +3290,37 @@ var timeData = {
|
|
|
3444
3290
|
"H",
|
|
3445
3291
|
"hB"
|
|
3446
3292
|
],
|
|
3447
|
-
"
|
|
3448
|
-
"H",
|
|
3293
|
+
"en-HK": [
|
|
3449
3294
|
"h",
|
|
3450
|
-
"
|
|
3451
|
-
"
|
|
3295
|
+
"hb",
|
|
3296
|
+
"H",
|
|
3297
|
+
"hB"
|
|
3452
3298
|
],
|
|
3453
|
-
"
|
|
3299
|
+
"en-IL": [
|
|
3454
3300
|
"H",
|
|
3455
3301
|
"h",
|
|
3456
|
-
"
|
|
3457
|
-
"
|
|
3302
|
+
"hb",
|
|
3303
|
+
"hB"
|
|
3458
3304
|
],
|
|
3459
|
-
"
|
|
3460
|
-
"H",
|
|
3305
|
+
"en-MY": [
|
|
3461
3306
|
"h",
|
|
3462
|
-
"
|
|
3463
|
-
"
|
|
3307
|
+
"hb",
|
|
3308
|
+
"H",
|
|
3309
|
+
"hB"
|
|
3464
3310
|
],
|
|
3465
|
-
"es-
|
|
3311
|
+
"es-BR": [
|
|
3466
3312
|
"H",
|
|
3467
3313
|
"h",
|
|
3468
3314
|
"hB",
|
|
3469
3315
|
"hb"
|
|
3470
3316
|
],
|
|
3471
|
-
"es-
|
|
3317
|
+
"es-ES": [
|
|
3472
3318
|
"H",
|
|
3473
3319
|
"h",
|
|
3474
3320
|
"hB",
|
|
3475
3321
|
"hb"
|
|
3476
3322
|
],
|
|
3477
|
-
"es-
|
|
3323
|
+
"es-GQ": [
|
|
3478
3324
|
"H",
|
|
3479
3325
|
"h",
|
|
3480
3326
|
"hB",
|
|
@@ -3611,7 +3457,7 @@ function getDefaultHourSymbolFromLocale(locale) {
|
|
|
3611
3457
|
var hourCycles = timeData[regionTag || ""] || timeData[languageTag || ""] || timeData["".concat(languageTag, "-001")] || timeData["001"];
|
|
3612
3458
|
return hourCycles[0];
|
|
3613
3459
|
}
|
|
3614
|
-
var _a;
|
|
3460
|
+
var _a$1;
|
|
3615
3461
|
var SPACE_SEPARATOR_START_REGEX = new RegExp("^".concat(SPACE_SEPARATOR_REGEX.source, "*"));
|
|
3616
3462
|
var SPACE_SEPARATOR_END_REGEX = new RegExp("".concat(SPACE_SEPARATOR_REGEX.source, "*$"));
|
|
3617
3463
|
function createLocation(start, end) {
|
|
@@ -3627,12 +3473,12 @@ var hasNativeIsSafeInteger = !!Number.isSafeInteger;
|
|
|
3627
3473
|
var isSafeInteger = hasNativeIsSafeInteger ? Number.isSafeInteger : function(n) {
|
|
3628
3474
|
return typeof n === "number" && isFinite(n) && Math.floor(n) === n && Math.abs(n) <= 9007199254740991;
|
|
3629
3475
|
};
|
|
3630
|
-
var REGEX_SUPPORTS_U_AND_Y = true;
|
|
3476
|
+
var REGEX_SUPPORTS_U_AND_Y$1 = true;
|
|
3631
3477
|
try {
|
|
3632
|
-
var re = RE("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
3633
|
-
REGEX_SUPPORTS_U_AND_Y = ((_a = re.exec("a")) === null || _a === void 0 ? void 0 : _a[0]) === "a";
|
|
3478
|
+
var re$1 = RE$1("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
3479
|
+
REGEX_SUPPORTS_U_AND_Y$1 = ((_a$1 = re$1.exec("a")) === null || _a$1 === void 0 ? void 0 : _a$1[0]) === "a";
|
|
3634
3480
|
} catch (_) {
|
|
3635
|
-
REGEX_SUPPORTS_U_AND_Y = false;
|
|
3481
|
+
REGEX_SUPPORTS_U_AND_Y$1 = false;
|
|
3636
3482
|
}
|
|
3637
3483
|
var startsWith = hasNativeStartsWith ? (
|
|
3638
3484
|
// Native
|
|
@@ -3718,12 +3564,12 @@ var trimEnd = hasTrimEnd ? (
|
|
|
3718
3564
|
return s.replace(SPACE_SEPARATOR_END_REGEX, "");
|
|
3719
3565
|
}
|
|
3720
3566
|
);
|
|
3721
|
-
function RE(s, flag) {
|
|
3567
|
+
function RE$1(s, flag) {
|
|
3722
3568
|
return new RegExp(s, flag);
|
|
3723
3569
|
}
|
|
3724
3570
|
var matchIdentifierAtIndex;
|
|
3725
|
-
if (REGEX_SUPPORTS_U_AND_Y) {
|
|
3726
|
-
var IDENTIFIER_PREFIX_RE_1 = RE("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
3571
|
+
if (REGEX_SUPPORTS_U_AND_Y$1) {
|
|
3572
|
+
var IDENTIFIER_PREFIX_RE_1 = RE$1("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
3727
3573
|
matchIdentifierAtIndex = function matchIdentifierAtIndex2(s, index) {
|
|
3728
3574
|
var _a2;
|
|
3729
3575
|
IDENTIFIER_PREFIX_RE_1.lastIndex = index;
|
|
@@ -3780,14 +3626,14 @@ var Parser = (
|
|
|
3780
3626
|
var position = this.clonePosition();
|
|
3781
3627
|
this.bump();
|
|
3782
3628
|
elements.push({
|
|
3783
|
-
type: TYPE.pound,
|
|
3629
|
+
type: TYPE$1.pound,
|
|
3784
3630
|
location: createLocation(position, this.clonePosition())
|
|
3785
3631
|
});
|
|
3786
3632
|
} else if (char === 60 && !this.ignoreTag && this.peek() === 47) {
|
|
3787
3633
|
if (expectingCloseTag) {
|
|
3788
3634
|
break;
|
|
3789
3635
|
} else {
|
|
3790
|
-
return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(this.clonePosition(), this.clonePosition()));
|
|
3636
|
+
return this.error(ErrorKind$1.UNMATCHED_CLOSING_TAG, createLocation(this.clonePosition(), this.clonePosition()));
|
|
3791
3637
|
}
|
|
3792
3638
|
} else if (char === 60 && !this.ignoreTag && _isAlpha(this.peek() || 0)) {
|
|
3793
3639
|
var result = this.parseTag(nestingLevel, parentArgType);
|
|
@@ -3813,7 +3659,7 @@ var Parser = (
|
|
|
3813
3659
|
if (this.bumpIf("/>")) {
|
|
3814
3660
|
return {
|
|
3815
3661
|
val: {
|
|
3816
|
-
type: TYPE.literal,
|
|
3662
|
+
type: TYPE$1.literal,
|
|
3817
3663
|
value: "<".concat(tagName, "/>"),
|
|
3818
3664
|
location: createLocation(startPosition, this.clonePosition())
|
|
3819
3665
|
},
|
|
@@ -3828,20 +3674,20 @@ var Parser = (
|
|
|
3828
3674
|
var endTagStartPosition = this.clonePosition();
|
|
3829
3675
|
if (this.bumpIf("</")) {
|
|
3830
3676
|
if (this.isEOF() || !_isAlpha(this.char())) {
|
|
3831
|
-
return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));
|
|
3677
|
+
return this.error(ErrorKind$1.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));
|
|
3832
3678
|
}
|
|
3833
3679
|
var closingTagNameStartPosition = this.clonePosition();
|
|
3834
3680
|
var closingTagName = this.parseTagName();
|
|
3835
3681
|
if (tagName !== closingTagName) {
|
|
3836
|
-
return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(closingTagNameStartPosition, this.clonePosition()));
|
|
3682
|
+
return this.error(ErrorKind$1.UNMATCHED_CLOSING_TAG, createLocation(closingTagNameStartPosition, this.clonePosition()));
|
|
3837
3683
|
}
|
|
3838
3684
|
this.bumpSpace();
|
|
3839
3685
|
if (!this.bumpIf(">")) {
|
|
3840
|
-
return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));
|
|
3686
|
+
return this.error(ErrorKind$1.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));
|
|
3841
3687
|
}
|
|
3842
3688
|
return {
|
|
3843
3689
|
val: {
|
|
3844
|
-
type: TYPE.tag,
|
|
3690
|
+
type: TYPE$1.tag,
|
|
3845
3691
|
value: tagName,
|
|
3846
3692
|
children,
|
|
3847
3693
|
location: createLocation(startPosition, this.clonePosition())
|
|
@@ -3849,10 +3695,10 @@ var Parser = (
|
|
|
3849
3695
|
err: null
|
|
3850
3696
|
};
|
|
3851
3697
|
} else {
|
|
3852
|
-
return this.error(ErrorKind.UNCLOSED_TAG, createLocation(startPosition, this.clonePosition()));
|
|
3698
|
+
return this.error(ErrorKind$1.UNCLOSED_TAG, createLocation(startPosition, this.clonePosition()));
|
|
3853
3699
|
}
|
|
3854
3700
|
} else {
|
|
3855
|
-
return this.error(ErrorKind.INVALID_TAG, createLocation(startPosition, this.clonePosition()));
|
|
3701
|
+
return this.error(ErrorKind$1.INVALID_TAG, createLocation(startPosition, this.clonePosition()));
|
|
3856
3702
|
}
|
|
3857
3703
|
};
|
|
3858
3704
|
Parser2.prototype.parseTagName = function() {
|
|
@@ -3886,7 +3732,7 @@ var Parser = (
|
|
|
3886
3732
|
}
|
|
3887
3733
|
var location = createLocation(start, this.clonePosition());
|
|
3888
3734
|
return {
|
|
3889
|
-
val: { type: TYPE.literal, value, location },
|
|
3735
|
+
val: { type: TYPE$1.literal, value, location },
|
|
3890
3736
|
err: null
|
|
3891
3737
|
};
|
|
3892
3738
|
};
|
|
@@ -3958,19 +3804,19 @@ var Parser = (
|
|
|
3958
3804
|
this.bump();
|
|
3959
3805
|
this.bumpSpace();
|
|
3960
3806
|
if (this.isEOF()) {
|
|
3961
|
-
return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
|
|
3807
|
+
return this.error(ErrorKind$1.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
|
|
3962
3808
|
}
|
|
3963
3809
|
if (this.char() === 125) {
|
|
3964
3810
|
this.bump();
|
|
3965
|
-
return this.error(ErrorKind.EMPTY_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
|
|
3811
|
+
return this.error(ErrorKind$1.EMPTY_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
|
|
3966
3812
|
}
|
|
3967
3813
|
var value = this.parseIdentifierIfPossible().value;
|
|
3968
3814
|
if (!value) {
|
|
3969
|
-
return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
|
|
3815
|
+
return this.error(ErrorKind$1.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
|
|
3970
3816
|
}
|
|
3971
3817
|
this.bumpSpace();
|
|
3972
3818
|
if (this.isEOF()) {
|
|
3973
|
-
return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
|
|
3819
|
+
return this.error(ErrorKind$1.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
|
|
3974
3820
|
}
|
|
3975
3821
|
switch (this.char()) {
|
|
3976
3822
|
// Simple argument: `{name}`
|
|
@@ -3978,7 +3824,7 @@ var Parser = (
|
|
|
3978
3824
|
this.bump();
|
|
3979
3825
|
return {
|
|
3980
3826
|
val: {
|
|
3981
|
-
type: TYPE.argument,
|
|
3827
|
+
type: TYPE$1.argument,
|
|
3982
3828
|
// value does not include the opening and closing braces.
|
|
3983
3829
|
value,
|
|
3984
3830
|
location: createLocation(openingBracePosition, this.clonePosition())
|
|
@@ -3991,12 +3837,12 @@ var Parser = (
|
|
|
3991
3837
|
this.bump();
|
|
3992
3838
|
this.bumpSpace();
|
|
3993
3839
|
if (this.isEOF()) {
|
|
3994
|
-
return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
|
|
3840
|
+
return this.error(ErrorKind$1.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
|
|
3995
3841
|
}
|
|
3996
3842
|
return this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition);
|
|
3997
3843
|
}
|
|
3998
3844
|
default:
|
|
3999
|
-
return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
|
|
3845
|
+
return this.error(ErrorKind$1.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
|
|
4000
3846
|
}
|
|
4001
3847
|
};
|
|
4002
3848
|
Parser2.prototype.parseIdentifierIfPossible = function() {
|
|
@@ -4016,7 +3862,7 @@ var Parser = (
|
|
|
4016
3862
|
var typeEndPosition = this.clonePosition();
|
|
4017
3863
|
switch (argType) {
|
|
4018
3864
|
case "":
|
|
4019
|
-
return this.error(ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
|
|
3865
|
+
return this.error(ErrorKind$1.EXPECT_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
|
|
4020
3866
|
case "number":
|
|
4021
3867
|
case "date":
|
|
4022
3868
|
case "time": {
|
|
@@ -4031,7 +3877,7 @@ var Parser = (
|
|
|
4031
3877
|
}
|
|
4032
3878
|
var style = trimEnd(result.val);
|
|
4033
3879
|
if (style.length === 0) {
|
|
4034
|
-
return this.error(ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition()));
|
|
3880
|
+
return this.error(ErrorKind$1.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition()));
|
|
4035
3881
|
}
|
|
4036
3882
|
var styleLocation = createLocation(styleStartPosition, this.clonePosition());
|
|
4037
3883
|
styleAndLocation = { style, styleLocation };
|
|
@@ -4049,24 +3895,24 @@ var Parser = (
|
|
|
4049
3895
|
return result;
|
|
4050
3896
|
}
|
|
4051
3897
|
return {
|
|
4052
|
-
val: { type: TYPE.number, value, location: location_1, style: result.val },
|
|
3898
|
+
val: { type: TYPE$1.number, value, location: location_1, style: result.val },
|
|
4053
3899
|
err: null
|
|
4054
3900
|
};
|
|
4055
3901
|
} else {
|
|
4056
3902
|
if (skeleton.length === 0) {
|
|
4057
|
-
return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1);
|
|
3903
|
+
return this.error(ErrorKind$1.EXPECT_DATE_TIME_SKELETON, location_1);
|
|
4058
3904
|
}
|
|
4059
3905
|
var dateTimePattern = skeleton;
|
|
4060
3906
|
if (this.locale) {
|
|
4061
3907
|
dateTimePattern = getBestPattern(skeleton, this.locale);
|
|
4062
3908
|
}
|
|
4063
3909
|
var style = {
|
|
4064
|
-
type: SKELETON_TYPE.dateTime,
|
|
3910
|
+
type: SKELETON_TYPE$1.dateTime,
|
|
4065
3911
|
pattern: dateTimePattern,
|
|
4066
3912
|
location: styleAndLocation.styleLocation,
|
|
4067
3913
|
parsedOptions: this.shouldParseSkeletons ? parseDateTimeSkeleton(dateTimePattern) : {}
|
|
4068
3914
|
};
|
|
4069
|
-
var type = argType === "date" ? TYPE.date : TYPE.time;
|
|
3915
|
+
var type = argType === "date" ? TYPE$1.date : TYPE$1.time;
|
|
4070
3916
|
return {
|
|
4071
3917
|
val: { type, value, location: location_1, style },
|
|
4072
3918
|
err: null
|
|
@@ -4075,7 +3921,7 @@ var Parser = (
|
|
|
4075
3921
|
}
|
|
4076
3922
|
return {
|
|
4077
3923
|
val: {
|
|
4078
|
-
type: argType === "number" ? TYPE.number : argType === "date" ? TYPE.date : TYPE.time,
|
|
3924
|
+
type: argType === "number" ? TYPE$1.number : argType === "date" ? TYPE$1.date : TYPE$1.time,
|
|
4079
3925
|
value,
|
|
4080
3926
|
location: location_1,
|
|
4081
3927
|
style: (_a2 = styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style) !== null && _a2 !== void 0 ? _a2 : null
|
|
@@ -4089,17 +3935,17 @@ var Parser = (
|
|
|
4089
3935
|
var typeEndPosition_1 = this.clonePosition();
|
|
4090
3936
|
this.bumpSpace();
|
|
4091
3937
|
if (!this.bumpIf(",")) {
|
|
4092
|
-
return this.error(ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(typeEndPosition_1, __assign({}, typeEndPosition_1)));
|
|
3938
|
+
return this.error(ErrorKind$1.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(typeEndPosition_1, __assign({}, typeEndPosition_1)));
|
|
4093
3939
|
}
|
|
4094
3940
|
this.bumpSpace();
|
|
4095
3941
|
var identifierAndLocation = this.parseIdentifierIfPossible();
|
|
4096
3942
|
var pluralOffset = 0;
|
|
4097
3943
|
if (argType !== "select" && identifierAndLocation.value === "offset") {
|
|
4098
3944
|
if (!this.bumpIf(":")) {
|
|
4099
|
-
return this.error(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation(this.clonePosition(), this.clonePosition()));
|
|
3945
|
+
return this.error(ErrorKind$1.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation(this.clonePosition(), this.clonePosition()));
|
|
4100
3946
|
}
|
|
4101
3947
|
this.bumpSpace();
|
|
4102
|
-
var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
|
|
3948
|
+
var result = this.tryParseDecimalInteger(ErrorKind$1.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind$1.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
|
|
4103
3949
|
if (result.err) {
|
|
4104
3950
|
return result;
|
|
4105
3951
|
}
|
|
@@ -4119,7 +3965,7 @@ var Parser = (
|
|
|
4119
3965
|
if (argType === "select") {
|
|
4120
3966
|
return {
|
|
4121
3967
|
val: {
|
|
4122
|
-
type: TYPE.select,
|
|
3968
|
+
type: TYPE$1.select,
|
|
4123
3969
|
value,
|
|
4124
3970
|
options: fromEntries(optionsResult.val),
|
|
4125
3971
|
location: location_2
|
|
@@ -4129,7 +3975,7 @@ var Parser = (
|
|
|
4129
3975
|
} else {
|
|
4130
3976
|
return {
|
|
4131
3977
|
val: {
|
|
4132
|
-
type: TYPE.plural,
|
|
3978
|
+
type: TYPE$1.plural,
|
|
4133
3979
|
value,
|
|
4134
3980
|
options: fromEntries(optionsResult.val),
|
|
4135
3981
|
offset: pluralOffset,
|
|
@@ -4141,12 +3987,12 @@ var Parser = (
|
|
|
4141
3987
|
}
|
|
4142
3988
|
}
|
|
4143
3989
|
default:
|
|
4144
|
-
return this.error(ErrorKind.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
|
|
3990
|
+
return this.error(ErrorKind$1.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
|
|
4145
3991
|
}
|
|
4146
3992
|
};
|
|
4147
3993
|
Parser2.prototype.tryParseArgumentClose = function(openingBracePosition) {
|
|
4148
3994
|
if (this.isEOF() || this.char() !== 125) {
|
|
4149
|
-
return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
|
|
3995
|
+
return this.error(ErrorKind$1.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
|
|
4150
3996
|
}
|
|
4151
3997
|
this.bump();
|
|
4152
3998
|
return { val: true, err: null };
|
|
@@ -4161,7 +4007,7 @@ var Parser = (
|
|
|
4161
4007
|
this.bump();
|
|
4162
4008
|
var apostrophePosition = this.clonePosition();
|
|
4163
4009
|
if (!this.bumpUntil("'")) {
|
|
4164
|
-
return this.error(ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation(apostrophePosition, this.clonePosition()));
|
|
4010
|
+
return this.error(ErrorKind$1.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation(apostrophePosition, this.clonePosition()));
|
|
4165
4011
|
}
|
|
4166
4012
|
this.bump();
|
|
4167
4013
|
break;
|
|
@@ -4197,11 +4043,11 @@ var Parser = (
|
|
|
4197
4043
|
try {
|
|
4198
4044
|
tokens = parseNumberSkeletonFromString(skeleton);
|
|
4199
4045
|
} catch (e) {
|
|
4200
|
-
return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location);
|
|
4046
|
+
return this.error(ErrorKind$1.INVALID_NUMBER_SKELETON, location);
|
|
4201
4047
|
}
|
|
4202
4048
|
return {
|
|
4203
4049
|
val: {
|
|
4204
|
-
type: SKELETON_TYPE.number,
|
|
4050
|
+
type: SKELETON_TYPE$1.number,
|
|
4205
4051
|
tokens,
|
|
4206
4052
|
location,
|
|
4207
4053
|
parsedOptions: this.shouldParseSkeletons ? parseNumberSkeleton(tokens) : {}
|
|
@@ -4219,7 +4065,7 @@ var Parser = (
|
|
|
4219
4065
|
if (selector.length === 0) {
|
|
4220
4066
|
var startPosition = this.clonePosition();
|
|
4221
4067
|
if (parentArgType !== "select" && this.bumpIf("=")) {
|
|
4222
|
-
var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);
|
|
4068
|
+
var result = this.tryParseDecimalInteger(ErrorKind$1.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind$1.INVALID_PLURAL_ARGUMENT_SELECTOR);
|
|
4223
4069
|
if (result.err) {
|
|
4224
4070
|
return result;
|
|
4225
4071
|
}
|
|
@@ -4230,7 +4076,7 @@ var Parser = (
|
|
|
4230
4076
|
}
|
|
4231
4077
|
}
|
|
4232
4078
|
if (parsedSelectors.has(selector)) {
|
|
4233
|
-
return this.error(parentArgType === "select" ? ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR : ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, selectorLocation);
|
|
4079
|
+
return this.error(parentArgType === "select" ? ErrorKind$1.DUPLICATE_SELECT_ARGUMENT_SELECTOR : ErrorKind$1.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, selectorLocation);
|
|
4234
4080
|
}
|
|
4235
4081
|
if (selector === "other") {
|
|
4236
4082
|
hasOtherClause = true;
|
|
@@ -4238,7 +4084,7 @@ var Parser = (
|
|
|
4238
4084
|
this.bumpSpace();
|
|
4239
4085
|
var openingBracePosition = this.clonePosition();
|
|
4240
4086
|
if (!this.bumpIf("{")) {
|
|
4241
|
-
return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation(this.clonePosition(), this.clonePosition()));
|
|
4087
|
+
return this.error(parentArgType === "select" ? ErrorKind$1.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : ErrorKind$1.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation(this.clonePosition(), this.clonePosition()));
|
|
4242
4088
|
}
|
|
4243
4089
|
var fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);
|
|
4244
4090
|
if (fragmentResult.err) {
|
|
@@ -4260,10 +4106,10 @@ var Parser = (
|
|
|
4260
4106
|
_a2 = this.parseIdentifierIfPossible(), selector = _a2.value, selectorLocation = _a2.location;
|
|
4261
4107
|
}
|
|
4262
4108
|
if (options.length === 0) {
|
|
4263
|
-
return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition()));
|
|
4109
|
+
return this.error(parentArgType === "select" ? ErrorKind$1.EXPECT_SELECT_ARGUMENT_SELECTOR : ErrorKind$1.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition()));
|
|
4264
4110
|
}
|
|
4265
4111
|
if (this.requiresOtherClause && !hasOtherClause) {
|
|
4266
|
-
return this.error(ErrorKind.MISSING_OTHER_CLAUSE, createLocation(this.clonePosition(), this.clonePosition()));
|
|
4112
|
+
return this.error(ErrorKind$1.MISSING_OTHER_CLAUSE, createLocation(this.clonePosition(), this.clonePosition()));
|
|
4267
4113
|
}
|
|
4268
4114
|
return { val: options, err: null };
|
|
4269
4115
|
};
|
|
@@ -4439,7 +4285,7 @@ function parse(message, opts) {
|
|
|
4439
4285
|
opts = __assign({ shouldParseSkeletons: true, requiresOtherClause: true }, opts);
|
|
4440
4286
|
var result = new Parser(message, opts).parse();
|
|
4441
4287
|
if (result.err) {
|
|
4442
|
-
var error = SyntaxError(ErrorKind[result.err.kind]);
|
|
4288
|
+
var error = SyntaxError(ErrorKind$1[result.err.kind]);
|
|
4443
4289
|
error.location = result.err.location;
|
|
4444
4290
|
error.originalMessage = result.err.message;
|
|
4445
4291
|
throw error;
|
|
@@ -4449,67 +4295,6 @@ function parse(message, opts) {
|
|
|
4449
4295
|
}
|
|
4450
4296
|
return result.val;
|
|
4451
4297
|
}
|
|
4452
|
-
function memoize(fn, options) {
|
|
4453
|
-
var cache = options && options.cache ? options.cache : cacheDefault;
|
|
4454
|
-
var serializer = options && options.serializer ? options.serializer : serializerDefault;
|
|
4455
|
-
var strategy = options && options.strategy ? options.strategy : strategyDefault;
|
|
4456
|
-
return strategy(fn, {
|
|
4457
|
-
cache,
|
|
4458
|
-
serializer
|
|
4459
|
-
});
|
|
4460
|
-
}
|
|
4461
|
-
function isPrimitive(value) {
|
|
4462
|
-
return value == null || typeof value === "number" || typeof value === "boolean";
|
|
4463
|
-
}
|
|
4464
|
-
function monadic(fn, cache, serializer, arg) {
|
|
4465
|
-
var cacheKey = isPrimitive(arg) ? arg : serializer(arg);
|
|
4466
|
-
var computedValue = cache.get(cacheKey);
|
|
4467
|
-
if (typeof computedValue === "undefined") {
|
|
4468
|
-
computedValue = fn.call(this, arg);
|
|
4469
|
-
cache.set(cacheKey, computedValue);
|
|
4470
|
-
}
|
|
4471
|
-
return computedValue;
|
|
4472
|
-
}
|
|
4473
|
-
function variadic(fn, cache, serializer) {
|
|
4474
|
-
var args = Array.prototype.slice.call(arguments, 3);
|
|
4475
|
-
var cacheKey = serializer(args);
|
|
4476
|
-
var computedValue = cache.get(cacheKey);
|
|
4477
|
-
if (typeof computedValue === "undefined") {
|
|
4478
|
-
computedValue = fn.apply(this, args);
|
|
4479
|
-
cache.set(cacheKey, computedValue);
|
|
4480
|
-
}
|
|
4481
|
-
return computedValue;
|
|
4482
|
-
}
|
|
4483
|
-
function assemble(fn, context, strategy, cache, serialize) {
|
|
4484
|
-
return strategy.bind(context, fn, cache, serialize);
|
|
4485
|
-
}
|
|
4486
|
-
function strategyDefault(fn, options) {
|
|
4487
|
-
var strategy = fn.length === 1 ? monadic : variadic;
|
|
4488
|
-
return assemble(fn, this, strategy, options.cache.create(), options.serializer);
|
|
4489
|
-
}
|
|
4490
|
-
function strategyVariadic(fn, options) {
|
|
4491
|
-
return assemble(fn, this, variadic, options.cache.create(), options.serializer);
|
|
4492
|
-
}
|
|
4493
|
-
var serializerDefault = function() {
|
|
4494
|
-
return JSON.stringify(arguments);
|
|
4495
|
-
};
|
|
4496
|
-
function ObjectWithoutPrototypeCache() {
|
|
4497
|
-
this.cache = /* @__PURE__ */ Object.create(null);
|
|
4498
|
-
}
|
|
4499
|
-
ObjectWithoutPrototypeCache.prototype.get = function(key) {
|
|
4500
|
-
return this.cache[key];
|
|
4501
|
-
};
|
|
4502
|
-
ObjectWithoutPrototypeCache.prototype.set = function(key, value) {
|
|
4503
|
-
this.cache[key] = value;
|
|
4504
|
-
};
|
|
4505
|
-
var cacheDefault = {
|
|
4506
|
-
create: function create() {
|
|
4507
|
-
return new ObjectWithoutPrototypeCache();
|
|
4508
|
-
}
|
|
4509
|
-
};
|
|
4510
|
-
var strategies = {
|
|
4511
|
-
variadic: strategyVariadic
|
|
4512
|
-
};
|
|
4513
4298
|
var ErrorCode;
|
|
4514
4299
|
(function(ErrorCode2) {
|
|
4515
4300
|
ErrorCode2["MISSING_VALUE"] = "MISSING_VALUE";
|
|
@@ -4562,18 +4347,18 @@ var MissingValueError = (
|
|
|
4562
4347
|
return MissingValueError2;
|
|
4563
4348
|
})(FormatError)
|
|
4564
4349
|
);
|
|
4565
|
-
var PART_TYPE;
|
|
4350
|
+
var PART_TYPE$1;
|
|
4566
4351
|
(function(PART_TYPE2) {
|
|
4567
4352
|
PART_TYPE2[PART_TYPE2["literal"] = 0] = "literal";
|
|
4568
4353
|
PART_TYPE2[PART_TYPE2["object"] = 1] = "object";
|
|
4569
|
-
})(PART_TYPE || (PART_TYPE = {}));
|
|
4354
|
+
})(PART_TYPE$1 || (PART_TYPE$1 = {}));
|
|
4570
4355
|
function mergeLiteral(parts) {
|
|
4571
4356
|
if (parts.length < 2) {
|
|
4572
4357
|
return parts;
|
|
4573
4358
|
}
|
|
4574
4359
|
return parts.reduce(function(all, part) {
|
|
4575
4360
|
var lastPart = all[all.length - 1];
|
|
4576
|
-
if (!lastPart || lastPart.type !== PART_TYPE.literal || part.type !== PART_TYPE.literal) {
|
|
4361
|
+
if (!lastPart || lastPart.type !== PART_TYPE$1.literal || part.type !== PART_TYPE$1.literal) {
|
|
4577
4362
|
all.push(part);
|
|
4578
4363
|
} else {
|
|
4579
4364
|
lastPart.value += part.value;
|
|
@@ -4581,14 +4366,14 @@ function mergeLiteral(parts) {
|
|
|
4581
4366
|
return all;
|
|
4582
4367
|
}, []);
|
|
4583
4368
|
}
|
|
4584
|
-
function isFormatXMLElementFn(el) {
|
|
4369
|
+
function isFormatXMLElementFn$1(el) {
|
|
4585
4370
|
return typeof el === "function";
|
|
4586
4371
|
}
|
|
4587
4372
|
function formatToParts(els, locales, formatters, formats, values, currentPluralValue, originalMessage) {
|
|
4588
4373
|
if (els.length === 1 && isLiteralElement(els[0])) {
|
|
4589
4374
|
return [
|
|
4590
4375
|
{
|
|
4591
|
-
type: PART_TYPE.literal,
|
|
4376
|
+
type: PART_TYPE$1.literal,
|
|
4592
4377
|
value: els[0].value
|
|
4593
4378
|
}
|
|
4594
4379
|
];
|
|
@@ -4598,7 +4383,7 @@ function formatToParts(els, locales, formatters, formats, values, currentPluralV
|
|
|
4598
4383
|
var el = els_1[_i];
|
|
4599
4384
|
if (isLiteralElement(el)) {
|
|
4600
4385
|
result.push({
|
|
4601
|
-
type: PART_TYPE.literal,
|
|
4386
|
+
type: PART_TYPE$1.literal,
|
|
4602
4387
|
value: el.value
|
|
4603
4388
|
});
|
|
4604
4389
|
continue;
|
|
@@ -4606,7 +4391,7 @@ function formatToParts(els, locales, formatters, formats, values, currentPluralV
|
|
|
4606
4391
|
if (isPoundElement(el)) {
|
|
4607
4392
|
if (typeof currentPluralValue === "number") {
|
|
4608
4393
|
result.push({
|
|
4609
|
-
type: PART_TYPE.literal,
|
|
4394
|
+
type: PART_TYPE$1.literal,
|
|
4610
4395
|
value: formatters.getNumberFormat(locales).format(currentPluralValue)
|
|
4611
4396
|
});
|
|
4612
4397
|
}
|
|
@@ -4622,7 +4407,7 @@ function formatToParts(els, locales, formatters, formats, values, currentPluralV
|
|
|
4622
4407
|
value = typeof value === "string" || typeof value === "number" ? String(value) : "";
|
|
4623
4408
|
}
|
|
4624
4409
|
result.push({
|
|
4625
|
-
type: typeof value === "string" ? PART_TYPE.literal : PART_TYPE.object,
|
|
4410
|
+
type: typeof value === "string" ? PART_TYPE$1.literal : PART_TYPE$1.object,
|
|
4626
4411
|
value
|
|
4627
4412
|
});
|
|
4628
4413
|
continue;
|
|
@@ -4630,7 +4415,7 @@ function formatToParts(els, locales, formatters, formats, values, currentPluralV
|
|
|
4630
4415
|
if (isDateElement(el)) {
|
|
4631
4416
|
var style = typeof el.style === "string" ? formats.date[el.style] : isDateTimeSkeleton(el.style) ? el.style.parsedOptions : void 0;
|
|
4632
4417
|
result.push({
|
|
4633
|
-
type: PART_TYPE.literal,
|
|
4418
|
+
type: PART_TYPE$1.literal,
|
|
4634
4419
|
value: formatters.getDateTimeFormat(locales, style).format(value)
|
|
4635
4420
|
});
|
|
4636
4421
|
continue;
|
|
@@ -4638,7 +4423,7 @@ function formatToParts(els, locales, formatters, formats, values, currentPluralV
|
|
|
4638
4423
|
if (isTimeElement(el)) {
|
|
4639
4424
|
var style = typeof el.style === "string" ? formats.time[el.style] : isDateTimeSkeleton(el.style) ? el.style.parsedOptions : formats.time.medium;
|
|
4640
4425
|
result.push({
|
|
4641
|
-
type: PART_TYPE.literal,
|
|
4426
|
+
type: PART_TYPE$1.literal,
|
|
4642
4427
|
value: formatters.getDateTimeFormat(locales, style).format(value)
|
|
4643
4428
|
});
|
|
4644
4429
|
continue;
|
|
@@ -4649,7 +4434,7 @@ function formatToParts(els, locales, formatters, formats, values, currentPluralV
|
|
|
4649
4434
|
value = value * (style.scale || 1);
|
|
4650
4435
|
}
|
|
4651
4436
|
result.push({
|
|
4652
|
-
type: PART_TYPE.literal,
|
|
4437
|
+
type: PART_TYPE$1.literal,
|
|
4653
4438
|
value: formatters.getNumberFormat(locales, style).format(value)
|
|
4654
4439
|
});
|
|
4655
4440
|
continue;
|
|
@@ -4657,7 +4442,7 @@ function formatToParts(els, locales, formatters, formats, values, currentPluralV
|
|
|
4657
4442
|
if (isTagElement(el)) {
|
|
4658
4443
|
var children = el.children, value_1 = el.value;
|
|
4659
4444
|
var formatFn = values[value_1];
|
|
4660
|
-
if (!isFormatXMLElementFn(formatFn)) {
|
|
4445
|
+
if (!isFormatXMLElementFn$1(formatFn)) {
|
|
4661
4446
|
throw new InvalidValueTypeError(value_1, "function", originalMessage);
|
|
4662
4447
|
}
|
|
4663
4448
|
var parts = formatToParts(children, locales, formatters, formats, values, currentPluralValue);
|
|
@@ -4669,7 +4454,7 @@ function formatToParts(els, locales, formatters, formats, values, currentPluralV
|
|
|
4669
4454
|
}
|
|
4670
4455
|
result.push.apply(result, chunks.map(function(c) {
|
|
4671
4456
|
return {
|
|
4672
|
-
type: typeof c === "string" ? PART_TYPE.literal : PART_TYPE.object,
|
|
4457
|
+
type: typeof c === "string" ? PART_TYPE$1.literal : PART_TYPE$1.object,
|
|
4673
4458
|
value: c
|
|
4674
4459
|
};
|
|
4675
4460
|
}));
|
|
@@ -4795,7 +4580,7 @@ var IntlMessageFormat = (
|
|
|
4795
4580
|
return parts[0].value;
|
|
4796
4581
|
}
|
|
4797
4582
|
var result = parts.reduce(function(all, part) {
|
|
4798
|
-
if (!all.length || part.type !== PART_TYPE.literal || typeof all[all.length - 1] !== "string") {
|
|
4583
|
+
if (!all.length || part.type !== PART_TYPE$1.literal || typeof all[all.length - 1] !== "string") {
|
|
4799
4584
|
all.push(part.value);
|
|
4800
4585
|
} else {
|
|
4801
4586
|
all[all.length - 1] += part.value;
|
|
@@ -5173,6 +4958,64 @@ function getNamedFormat(formats, type, name, onError) {
|
|
|
5173
4958
|
}
|
|
5174
4959
|
onError(new UnsupportedFormatterError("No ".concat(type, " format named: ").concat(name)));
|
|
5175
4960
|
}
|
|
4961
|
+
function invariant$1(condition, message, Err) {
|
|
4962
|
+
if (Err === void 0) {
|
|
4963
|
+
Err = Error;
|
|
4964
|
+
}
|
|
4965
|
+
if (!condition) {
|
|
4966
|
+
throw new Err(message);
|
|
4967
|
+
}
|
|
4968
|
+
}
|
|
4969
|
+
memoize(function() {
|
|
4970
|
+
var _a2;
|
|
4971
|
+
var args = [];
|
|
4972
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
4973
|
+
args[_i] = arguments[_i];
|
|
4974
|
+
}
|
|
4975
|
+
return new ((_a2 = Intl.NumberFormat).bind.apply(_a2, __spreadArray([void 0], args, false)))();
|
|
4976
|
+
}, {
|
|
4977
|
+
strategy: strategies.variadic
|
|
4978
|
+
});
|
|
4979
|
+
memoize(function() {
|
|
4980
|
+
var _a2;
|
|
4981
|
+
var args = [];
|
|
4982
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
4983
|
+
args[_i] = arguments[_i];
|
|
4984
|
+
}
|
|
4985
|
+
return new ((_a2 = Intl.DateTimeFormat).bind.apply(_a2, __spreadArray([void 0], args, false)))();
|
|
4986
|
+
}, {
|
|
4987
|
+
strategy: strategies.variadic
|
|
4988
|
+
});
|
|
4989
|
+
memoize(function() {
|
|
4990
|
+
var _a2;
|
|
4991
|
+
var args = [];
|
|
4992
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
4993
|
+
args[_i] = arguments[_i];
|
|
4994
|
+
}
|
|
4995
|
+
return new ((_a2 = Intl.PluralRules).bind.apply(_a2, __spreadArray([void 0], args, false)))();
|
|
4996
|
+
}, {
|
|
4997
|
+
strategy: strategies.variadic
|
|
4998
|
+
});
|
|
4999
|
+
memoize(function() {
|
|
5000
|
+
var _a2;
|
|
5001
|
+
var args = [];
|
|
5002
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
5003
|
+
args[_i] = arguments[_i];
|
|
5004
|
+
}
|
|
5005
|
+
return new ((_a2 = Intl.Locale).bind.apply(_a2, __spreadArray([void 0], args, false)))();
|
|
5006
|
+
}, {
|
|
5007
|
+
strategy: strategies.variadic
|
|
5008
|
+
});
|
|
5009
|
+
memoize(function() {
|
|
5010
|
+
var _a2;
|
|
5011
|
+
var args = [];
|
|
5012
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
5013
|
+
args[_i] = arguments[_i];
|
|
5014
|
+
}
|
|
5015
|
+
return new ((_a2 = Intl.ListFormat).bind.apply(_a2, __spreadArray([void 0], args, false)))();
|
|
5016
|
+
}, {
|
|
5017
|
+
strategy: strategies.variadic
|
|
5018
|
+
});
|
|
5176
5019
|
function setTimeZoneInOptions(opts, timeZone) {
|
|
5177
5020
|
return Object.keys(opts).reduce(function(all, k) {
|
|
5178
5021
|
all[k] = __assign({ timeZone }, opts[k]);
|
|
@@ -5207,7 +5050,7 @@ var formatMessage$1 = function(_a2, state, messageDescriptor, values, opts) {
|
|
|
5207
5050
|
// See https://github.com/formatjs/formatjs/issues/1914
|
|
5208
5051
|
messages && Object.prototype.hasOwnProperty.call(messages, id) && messages[id]
|
|
5209
5052
|
);
|
|
5210
|
-
if (Array.isArray(message) && message.length === 1 && message[0].type === TYPE.literal) {
|
|
5053
|
+
if (Array.isArray(message) && message.length === 1 && message[0].type === TYPE$1.literal) {
|
|
5211
5054
|
return message[0].value;
|
|
5212
5055
|
}
|
|
5213
5056
|
if (!values && message && typeof message === "string" && !defaultRichTextElements) {
|
|
@@ -5482,7 +5325,6 @@ function formatRelativeTime(config2, getRelativeTimeFormat, value, unit, options
|
|
|
5482
5325
|
var NUMBER_FORMAT_OPTIONS = [
|
|
5483
5326
|
"style",
|
|
5484
5327
|
"currency",
|
|
5485
|
-
"currencyDisplay",
|
|
5486
5328
|
"unit",
|
|
5487
5329
|
"unitDisplay",
|
|
5488
5330
|
"useGrouping",
|
|
@@ -5499,7 +5341,12 @@ var NUMBER_FORMAT_OPTIONS = [
|
|
|
5499
5341
|
"signDisplay",
|
|
5500
5342
|
"unit",
|
|
5501
5343
|
"unitDisplay",
|
|
5502
|
-
"numberingSystem"
|
|
5344
|
+
"numberingSystem",
|
|
5345
|
+
// ES2023 NumberFormat
|
|
5346
|
+
"trailingZeroDisplay",
|
|
5347
|
+
"roundingPriority",
|
|
5348
|
+
"roundingIncrement",
|
|
5349
|
+
"roundingMode"
|
|
5503
5350
|
];
|
|
5504
5351
|
function getFormatter(_a2, getNumberFormat, options) {
|
|
5505
5352
|
var locale = _a2.locale, formats = _a2.formats, onError = _a2.onError;
|
|
@@ -5520,93 +5367,446 @@ function formatNumber(config2, getNumberFormat, value, options) {
|
|
|
5520
5367
|
} catch (e) {
|
|
5521
5368
|
config2.onError(new IntlFormatError("Error formatting number.", config2.locale, e));
|
|
5522
5369
|
}
|
|
5523
|
-
return String(value);
|
|
5370
|
+
return String(value);
|
|
5371
|
+
}
|
|
5372
|
+
function formatNumberToParts(config2, getNumberFormat, value, options) {
|
|
5373
|
+
if (options === void 0) {
|
|
5374
|
+
options = {};
|
|
5375
|
+
}
|
|
5376
|
+
try {
|
|
5377
|
+
return getFormatter(config2, getNumberFormat, options).formatToParts(value);
|
|
5378
|
+
} catch (e) {
|
|
5379
|
+
config2.onError(new IntlFormatError("Error formatting number.", config2.locale, e));
|
|
5380
|
+
}
|
|
5381
|
+
return [];
|
|
5382
|
+
}
|
|
5383
|
+
function messagesContainString(messages) {
|
|
5384
|
+
var firstMessage = messages ? messages[Object.keys(messages)[0]] : void 0;
|
|
5385
|
+
return typeof firstMessage === "string";
|
|
5386
|
+
}
|
|
5387
|
+
function verifyConfigMessages(config2) {
|
|
5388
|
+
if (config2.onWarn && config2.defaultRichTextElements && messagesContainString(config2.messages || {})) {
|
|
5389
|
+
config2.onWarn('[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled. \nPlease consider using "@formatjs/cli" to pre-compile your messages for performance.\nFor more details see https://formatjs.io/docs/getting-started/message-distribution');
|
|
5390
|
+
}
|
|
5391
|
+
}
|
|
5392
|
+
function createIntl$1(config2, cache) {
|
|
5393
|
+
var formatters = createFormatters(cache);
|
|
5394
|
+
var resolvedConfig = __assign(__assign({}, DEFAULT_INTL_CONFIG$1), config2);
|
|
5395
|
+
var locale = resolvedConfig.locale, defaultLocale = resolvedConfig.defaultLocale, onError = resolvedConfig.onError;
|
|
5396
|
+
if (!locale) {
|
|
5397
|
+
if (onError) {
|
|
5398
|
+
onError(new InvalidConfigError('"locale" was not configured, using "'.concat(defaultLocale, '" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details')));
|
|
5399
|
+
}
|
|
5400
|
+
resolvedConfig.locale = resolvedConfig.defaultLocale || "en";
|
|
5401
|
+
} else if (!Intl.NumberFormat.supportedLocalesOf(locale).length && onError) {
|
|
5402
|
+
onError(new MissingDataError('Missing locale data for locale: "'.concat(locale, '" in Intl.NumberFormat. Using default locale: "').concat(defaultLocale, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details')));
|
|
5403
|
+
} else if (!Intl.DateTimeFormat.supportedLocalesOf(locale).length && onError) {
|
|
5404
|
+
onError(new MissingDataError('Missing locale data for locale: "'.concat(locale, '" in Intl.DateTimeFormat. Using default locale: "').concat(defaultLocale, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details')));
|
|
5405
|
+
}
|
|
5406
|
+
verifyConfigMessages(resolvedConfig);
|
|
5407
|
+
return __assign(__assign({}, resolvedConfig), {
|
|
5408
|
+
formatters,
|
|
5409
|
+
formatNumber: formatNumber.bind(null, resolvedConfig, formatters.getNumberFormat),
|
|
5410
|
+
formatNumberToParts: formatNumberToParts.bind(null, resolvedConfig, formatters.getNumberFormat),
|
|
5411
|
+
formatRelativeTime: formatRelativeTime.bind(null, resolvedConfig, formatters.getRelativeTimeFormat),
|
|
5412
|
+
formatDate: formatDate.bind(null, resolvedConfig, formatters.getDateTimeFormat),
|
|
5413
|
+
formatDateToParts: formatDateToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat),
|
|
5414
|
+
formatTime: formatTime.bind(null, resolvedConfig, formatters.getDateTimeFormat),
|
|
5415
|
+
formatDateTimeRange: formatDateTimeRange.bind(null, resolvedConfig, formatters.getDateTimeFormat),
|
|
5416
|
+
formatTimeToParts: formatTimeToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat),
|
|
5417
|
+
formatPlural: formatPlural.bind(null, resolvedConfig, formatters.getPluralRules),
|
|
5418
|
+
// @ts-expect-error TODO: will get to this later
|
|
5419
|
+
formatMessage: formatMessage$1.bind(null, resolvedConfig, formatters),
|
|
5420
|
+
// @ts-expect-error TODO: will get to this later
|
|
5421
|
+
$t: formatMessage$1.bind(null, resolvedConfig, formatters),
|
|
5422
|
+
formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat),
|
|
5423
|
+
formatListToParts: formatListToParts.bind(null, resolvedConfig, formatters.getListFormat),
|
|
5424
|
+
formatDisplayName: formatDisplayName.bind(null, resolvedConfig, formatters.getDisplayNames)
|
|
5425
|
+
});
|
|
5426
|
+
}
|
|
5427
|
+
function invariantIntlContext(intl) {
|
|
5428
|
+
invariant$2(intl, "[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.");
|
|
5429
|
+
}
|
|
5430
|
+
var DEFAULT_INTL_CONFIG = __assign(__assign({}, DEFAULT_INTL_CONFIG$1), { textComponent: React.Fragment });
|
|
5431
|
+
function assignUniqueKeysToParts(formatXMLElementFn) {
|
|
5432
|
+
return function(parts) {
|
|
5433
|
+
return formatXMLElementFn(React.Children.toArray(parts));
|
|
5434
|
+
};
|
|
5435
|
+
}
|
|
5436
|
+
function shallowEqual(objA, objB) {
|
|
5437
|
+
if (objA === objB) {
|
|
5438
|
+
return true;
|
|
5439
|
+
}
|
|
5440
|
+
if (!objA || !objB) {
|
|
5441
|
+
return false;
|
|
5442
|
+
}
|
|
5443
|
+
var aKeys = Object.keys(objA);
|
|
5444
|
+
var bKeys = Object.keys(objB);
|
|
5445
|
+
var len = aKeys.length;
|
|
5446
|
+
if (bKeys.length !== len) {
|
|
5447
|
+
return false;
|
|
5448
|
+
}
|
|
5449
|
+
for (var i = 0; i < len; i++) {
|
|
5450
|
+
var key = aKeys[i];
|
|
5451
|
+
if (objA[key] !== objB[key] || !Object.prototype.hasOwnProperty.call(objB, key)) {
|
|
5452
|
+
return false;
|
|
5453
|
+
}
|
|
5454
|
+
}
|
|
5455
|
+
return true;
|
|
5524
5456
|
}
|
|
5525
|
-
function
|
|
5526
|
-
|
|
5527
|
-
|
|
5457
|
+
function getDefaultExportFromCjs(x) {
|
|
5458
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
5459
|
+
}
|
|
5460
|
+
var reactIs = { exports: {} };
|
|
5461
|
+
var reactIs_production_min = {};
|
|
5462
|
+
var hasRequiredReactIs_production_min;
|
|
5463
|
+
function requireReactIs_production_min() {
|
|
5464
|
+
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
5465
|
+
hasRequiredReactIs_production_min = 1;
|
|
5466
|
+
var b = "function" === typeof Symbol && Symbol.for, c = b ? /* @__PURE__ */ Symbol.for("react.element") : 60103, d = b ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, e = b ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, f = b ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, g = b ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, h = b ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, k = b ? /* @__PURE__ */ Symbol.for("react.context") : 60110, l = b ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, m = b ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, n = b ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, p = b ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, q = b ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, r = b ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, t = b ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, v = b ? /* @__PURE__ */ Symbol.for("react.block") : 60121, w = b ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, x = b ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, y = b ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
5467
|
+
function z(a) {
|
|
5468
|
+
if ("object" === typeof a && null !== a) {
|
|
5469
|
+
var u = a.$$typeof;
|
|
5470
|
+
switch (u) {
|
|
5471
|
+
case c:
|
|
5472
|
+
switch (a = a.type, a) {
|
|
5473
|
+
case l:
|
|
5474
|
+
case m:
|
|
5475
|
+
case e:
|
|
5476
|
+
case g:
|
|
5477
|
+
case f:
|
|
5478
|
+
case p:
|
|
5479
|
+
return a;
|
|
5480
|
+
default:
|
|
5481
|
+
switch (a = a && a.$$typeof, a) {
|
|
5482
|
+
case k:
|
|
5483
|
+
case n:
|
|
5484
|
+
case t:
|
|
5485
|
+
case r:
|
|
5486
|
+
case h:
|
|
5487
|
+
return a;
|
|
5488
|
+
default:
|
|
5489
|
+
return u;
|
|
5490
|
+
}
|
|
5491
|
+
}
|
|
5492
|
+
case d:
|
|
5493
|
+
return u;
|
|
5494
|
+
}
|
|
5495
|
+
}
|
|
5528
5496
|
}
|
|
5529
|
-
|
|
5530
|
-
return
|
|
5531
|
-
} catch (e) {
|
|
5532
|
-
config2.onError(new IntlFormatError("Error formatting number.", config2.locale, e));
|
|
5497
|
+
function A(a) {
|
|
5498
|
+
return z(a) === m;
|
|
5533
5499
|
}
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5500
|
+
reactIs_production_min.AsyncMode = l;
|
|
5501
|
+
reactIs_production_min.ConcurrentMode = m;
|
|
5502
|
+
reactIs_production_min.ContextConsumer = k;
|
|
5503
|
+
reactIs_production_min.ContextProvider = h;
|
|
5504
|
+
reactIs_production_min.Element = c;
|
|
5505
|
+
reactIs_production_min.ForwardRef = n;
|
|
5506
|
+
reactIs_production_min.Fragment = e;
|
|
5507
|
+
reactIs_production_min.Lazy = t;
|
|
5508
|
+
reactIs_production_min.Memo = r;
|
|
5509
|
+
reactIs_production_min.Portal = d;
|
|
5510
|
+
reactIs_production_min.Profiler = g;
|
|
5511
|
+
reactIs_production_min.StrictMode = f;
|
|
5512
|
+
reactIs_production_min.Suspense = p;
|
|
5513
|
+
reactIs_production_min.isAsyncMode = function(a) {
|
|
5514
|
+
return A(a) || z(a) === l;
|
|
5515
|
+
};
|
|
5516
|
+
reactIs_production_min.isConcurrentMode = A;
|
|
5517
|
+
reactIs_production_min.isContextConsumer = function(a) {
|
|
5518
|
+
return z(a) === k;
|
|
5519
|
+
};
|
|
5520
|
+
reactIs_production_min.isContextProvider = function(a) {
|
|
5521
|
+
return z(a) === h;
|
|
5522
|
+
};
|
|
5523
|
+
reactIs_production_min.isElement = function(a) {
|
|
5524
|
+
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
5525
|
+
};
|
|
5526
|
+
reactIs_production_min.isForwardRef = function(a) {
|
|
5527
|
+
return z(a) === n;
|
|
5528
|
+
};
|
|
5529
|
+
reactIs_production_min.isFragment = function(a) {
|
|
5530
|
+
return z(a) === e;
|
|
5531
|
+
};
|
|
5532
|
+
reactIs_production_min.isLazy = function(a) {
|
|
5533
|
+
return z(a) === t;
|
|
5534
|
+
};
|
|
5535
|
+
reactIs_production_min.isMemo = function(a) {
|
|
5536
|
+
return z(a) === r;
|
|
5537
|
+
};
|
|
5538
|
+
reactIs_production_min.isPortal = function(a) {
|
|
5539
|
+
return z(a) === d;
|
|
5540
|
+
};
|
|
5541
|
+
reactIs_production_min.isProfiler = function(a) {
|
|
5542
|
+
return z(a) === g;
|
|
5543
|
+
};
|
|
5544
|
+
reactIs_production_min.isStrictMode = function(a) {
|
|
5545
|
+
return z(a) === f;
|
|
5546
|
+
};
|
|
5547
|
+
reactIs_production_min.isSuspense = function(a) {
|
|
5548
|
+
return z(a) === p;
|
|
5549
|
+
};
|
|
5550
|
+
reactIs_production_min.isValidElementType = function(a) {
|
|
5551
|
+
return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
|
|
5552
|
+
};
|
|
5553
|
+
reactIs_production_min.typeOf = z;
|
|
5554
|
+
return reactIs_production_min;
|
|
5539
5555
|
}
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5556
|
+
var reactIs_development = {};
|
|
5557
|
+
var hasRequiredReactIs_development;
|
|
5558
|
+
function requireReactIs_development() {
|
|
5559
|
+
if (hasRequiredReactIs_development) return reactIs_development;
|
|
5560
|
+
hasRequiredReactIs_development = 1;
|
|
5561
|
+
if (process.env.NODE_ENV !== "production") {
|
|
5562
|
+
(function() {
|
|
5563
|
+
var hasSymbol = typeof Symbol === "function" && Symbol.for;
|
|
5564
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
|
|
5565
|
+
var REACT_PORTAL_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.portal") : 60106;
|
|
5566
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107;
|
|
5567
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108;
|
|
5568
|
+
var REACT_PROFILER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114;
|
|
5569
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.provider") : 60109;
|
|
5570
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.context") : 60110;
|
|
5571
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111;
|
|
5572
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111;
|
|
5573
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112;
|
|
5574
|
+
var REACT_SUSPENSE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113;
|
|
5575
|
+
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120;
|
|
5576
|
+
var REACT_MEMO_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.memo") : 60115;
|
|
5577
|
+
var REACT_LAZY_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116;
|
|
5578
|
+
var REACT_BLOCK_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.block") : 60121;
|
|
5579
|
+
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117;
|
|
5580
|
+
var REACT_RESPONDER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.responder") : 60118;
|
|
5581
|
+
var REACT_SCOPE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
5582
|
+
function isValidElementType(type) {
|
|
5583
|
+
return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
5584
|
+
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
5585
|
+
}
|
|
5586
|
+
function typeOf(object) {
|
|
5587
|
+
if (typeof object === "object" && object !== null) {
|
|
5588
|
+
var $$typeof = object.$$typeof;
|
|
5589
|
+
switch ($$typeof) {
|
|
5590
|
+
case REACT_ELEMENT_TYPE:
|
|
5591
|
+
var type = object.type;
|
|
5592
|
+
switch (type) {
|
|
5593
|
+
case REACT_ASYNC_MODE_TYPE:
|
|
5594
|
+
case REACT_CONCURRENT_MODE_TYPE:
|
|
5595
|
+
case REACT_FRAGMENT_TYPE:
|
|
5596
|
+
case REACT_PROFILER_TYPE:
|
|
5597
|
+
case REACT_STRICT_MODE_TYPE:
|
|
5598
|
+
case REACT_SUSPENSE_TYPE:
|
|
5599
|
+
return type;
|
|
5600
|
+
default:
|
|
5601
|
+
var $$typeofType = type && type.$$typeof;
|
|
5602
|
+
switch ($$typeofType) {
|
|
5603
|
+
case REACT_CONTEXT_TYPE:
|
|
5604
|
+
case REACT_FORWARD_REF_TYPE:
|
|
5605
|
+
case REACT_LAZY_TYPE:
|
|
5606
|
+
case REACT_MEMO_TYPE:
|
|
5607
|
+
case REACT_PROVIDER_TYPE:
|
|
5608
|
+
return $$typeofType;
|
|
5609
|
+
default:
|
|
5610
|
+
return $$typeof;
|
|
5611
|
+
}
|
|
5612
|
+
}
|
|
5613
|
+
case REACT_PORTAL_TYPE:
|
|
5614
|
+
return $$typeof;
|
|
5615
|
+
}
|
|
5616
|
+
}
|
|
5617
|
+
return void 0;
|
|
5618
|
+
}
|
|
5619
|
+
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
5620
|
+
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
5621
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
5622
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
5623
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
5624
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
5625
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
|
5626
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
5627
|
+
var Memo = REACT_MEMO_TYPE;
|
|
5628
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
5629
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
5630
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
5631
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
|
5632
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
5633
|
+
function isAsyncMode(object) {
|
|
5634
|
+
{
|
|
5635
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
5636
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
|
5637
|
+
console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
|
|
5638
|
+
}
|
|
5639
|
+
}
|
|
5640
|
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
5641
|
+
}
|
|
5642
|
+
function isConcurrentMode(object) {
|
|
5643
|
+
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
5644
|
+
}
|
|
5645
|
+
function isContextConsumer(object) {
|
|
5646
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
5647
|
+
}
|
|
5648
|
+
function isContextProvider(object) {
|
|
5649
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
5650
|
+
}
|
|
5651
|
+
function isElement(object) {
|
|
5652
|
+
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
5653
|
+
}
|
|
5654
|
+
function isForwardRef(object) {
|
|
5655
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
5656
|
+
}
|
|
5657
|
+
function isFragment(object) {
|
|
5658
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
5659
|
+
}
|
|
5660
|
+
function isLazy(object) {
|
|
5661
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
5662
|
+
}
|
|
5663
|
+
function isMemo(object) {
|
|
5664
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
5665
|
+
}
|
|
5666
|
+
function isPortal(object) {
|
|
5667
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
5668
|
+
}
|
|
5669
|
+
function isProfiler(object) {
|
|
5670
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
5671
|
+
}
|
|
5672
|
+
function isStrictMode(object) {
|
|
5673
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
5674
|
+
}
|
|
5675
|
+
function isSuspense(object) {
|
|
5676
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
5677
|
+
}
|
|
5678
|
+
reactIs_development.AsyncMode = AsyncMode;
|
|
5679
|
+
reactIs_development.ConcurrentMode = ConcurrentMode;
|
|
5680
|
+
reactIs_development.ContextConsumer = ContextConsumer;
|
|
5681
|
+
reactIs_development.ContextProvider = ContextProvider;
|
|
5682
|
+
reactIs_development.Element = Element;
|
|
5683
|
+
reactIs_development.ForwardRef = ForwardRef;
|
|
5684
|
+
reactIs_development.Fragment = Fragment;
|
|
5685
|
+
reactIs_development.Lazy = Lazy;
|
|
5686
|
+
reactIs_development.Memo = Memo;
|
|
5687
|
+
reactIs_development.Portal = Portal;
|
|
5688
|
+
reactIs_development.Profiler = Profiler;
|
|
5689
|
+
reactIs_development.StrictMode = StrictMode;
|
|
5690
|
+
reactIs_development.Suspense = Suspense;
|
|
5691
|
+
reactIs_development.isAsyncMode = isAsyncMode;
|
|
5692
|
+
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
5693
|
+
reactIs_development.isContextConsumer = isContextConsumer;
|
|
5694
|
+
reactIs_development.isContextProvider = isContextProvider;
|
|
5695
|
+
reactIs_development.isElement = isElement;
|
|
5696
|
+
reactIs_development.isForwardRef = isForwardRef;
|
|
5697
|
+
reactIs_development.isFragment = isFragment;
|
|
5698
|
+
reactIs_development.isLazy = isLazy;
|
|
5699
|
+
reactIs_development.isMemo = isMemo;
|
|
5700
|
+
reactIs_development.isPortal = isPortal;
|
|
5701
|
+
reactIs_development.isProfiler = isProfiler;
|
|
5702
|
+
reactIs_development.isStrictMode = isStrictMode;
|
|
5703
|
+
reactIs_development.isSuspense = isSuspense;
|
|
5704
|
+
reactIs_development.isValidElementType = isValidElementType;
|
|
5705
|
+
reactIs_development.typeOf = typeOf;
|
|
5706
|
+
})();
|
|
5543
5707
|
}
|
|
5708
|
+
return reactIs_development;
|
|
5544
5709
|
}
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
if (
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
resolvedConfig.locale = resolvedConfig.defaultLocale || "en";
|
|
5554
|
-
} else if (!Intl.NumberFormat.supportedLocalesOf(locale).length && onError) {
|
|
5555
|
-
onError(new MissingDataError('Missing locale data for locale: "'.concat(locale, '" in Intl.NumberFormat. Using default locale: "').concat(defaultLocale, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details')));
|
|
5556
|
-
} else if (!Intl.DateTimeFormat.supportedLocalesOf(locale).length && onError) {
|
|
5557
|
-
onError(new MissingDataError('Missing locale data for locale: "'.concat(locale, '" in Intl.DateTimeFormat. Using default locale: "').concat(defaultLocale, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details')));
|
|
5710
|
+
var hasRequiredReactIs;
|
|
5711
|
+
function requireReactIs() {
|
|
5712
|
+
if (hasRequiredReactIs) return reactIs.exports;
|
|
5713
|
+
hasRequiredReactIs = 1;
|
|
5714
|
+
if (process.env.NODE_ENV === "production") {
|
|
5715
|
+
reactIs.exports = requireReactIs_production_min();
|
|
5716
|
+
} else {
|
|
5717
|
+
reactIs.exports = requireReactIs_development();
|
|
5558
5718
|
}
|
|
5559
|
-
|
|
5560
|
-
return __assign(__assign({}, resolvedConfig), {
|
|
5561
|
-
formatters,
|
|
5562
|
-
formatNumber: formatNumber.bind(null, resolvedConfig, formatters.getNumberFormat),
|
|
5563
|
-
formatNumberToParts: formatNumberToParts.bind(null, resolvedConfig, formatters.getNumberFormat),
|
|
5564
|
-
formatRelativeTime: formatRelativeTime.bind(null, resolvedConfig, formatters.getRelativeTimeFormat),
|
|
5565
|
-
formatDate: formatDate.bind(null, resolvedConfig, formatters.getDateTimeFormat),
|
|
5566
|
-
formatDateToParts: formatDateToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat),
|
|
5567
|
-
formatTime: formatTime.bind(null, resolvedConfig, formatters.getDateTimeFormat),
|
|
5568
|
-
formatDateTimeRange: formatDateTimeRange.bind(null, resolvedConfig, formatters.getDateTimeFormat),
|
|
5569
|
-
formatTimeToParts: formatTimeToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat),
|
|
5570
|
-
formatPlural: formatPlural.bind(null, resolvedConfig, formatters.getPluralRules),
|
|
5571
|
-
// @ts-expect-error TODO: will get to this later
|
|
5572
|
-
formatMessage: formatMessage$1.bind(null, resolvedConfig, formatters),
|
|
5573
|
-
// @ts-expect-error TODO: will get to this later
|
|
5574
|
-
$t: formatMessage$1.bind(null, resolvedConfig, formatters),
|
|
5575
|
-
formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat),
|
|
5576
|
-
formatListToParts: formatListToParts.bind(null, resolvedConfig, formatters.getListFormat),
|
|
5577
|
-
formatDisplayName: formatDisplayName.bind(null, resolvedConfig, formatters.getDisplayNames)
|
|
5578
|
-
});
|
|
5579
|
-
}
|
|
5580
|
-
function invariantIntlContext(intl) {
|
|
5581
|
-
invariant$1(intl, "[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.");
|
|
5719
|
+
return reactIs.exports;
|
|
5582
5720
|
}
|
|
5583
|
-
var
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5721
|
+
var hoistNonReactStatics_cjs;
|
|
5722
|
+
var hasRequiredHoistNonReactStatics_cjs;
|
|
5723
|
+
function requireHoistNonReactStatics_cjs() {
|
|
5724
|
+
if (hasRequiredHoistNonReactStatics_cjs) return hoistNonReactStatics_cjs;
|
|
5725
|
+
hasRequiredHoistNonReactStatics_cjs = 1;
|
|
5726
|
+
var reactIs2 = requireReactIs();
|
|
5727
|
+
var REACT_STATICS = {
|
|
5728
|
+
childContextTypes: true,
|
|
5729
|
+
contextType: true,
|
|
5730
|
+
contextTypes: true,
|
|
5731
|
+
defaultProps: true,
|
|
5732
|
+
displayName: true,
|
|
5733
|
+
getDefaultProps: true,
|
|
5734
|
+
getDerivedStateFromError: true,
|
|
5735
|
+
getDerivedStateFromProps: true,
|
|
5736
|
+
mixins: true,
|
|
5737
|
+
propTypes: true,
|
|
5738
|
+
type: true
|
|
5587
5739
|
};
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
var
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5740
|
+
var KNOWN_STATICS = {
|
|
5741
|
+
name: true,
|
|
5742
|
+
length: true,
|
|
5743
|
+
prototype: true,
|
|
5744
|
+
caller: true,
|
|
5745
|
+
callee: true,
|
|
5746
|
+
arguments: true,
|
|
5747
|
+
arity: true
|
|
5748
|
+
};
|
|
5749
|
+
var FORWARD_REF_STATICS = {
|
|
5750
|
+
"$$typeof": true,
|
|
5751
|
+
render: true,
|
|
5752
|
+
defaultProps: true,
|
|
5753
|
+
displayName: true,
|
|
5754
|
+
propTypes: true
|
|
5755
|
+
};
|
|
5756
|
+
var MEMO_STATICS = {
|
|
5757
|
+
"$$typeof": true,
|
|
5758
|
+
compare: true,
|
|
5759
|
+
defaultProps: true,
|
|
5760
|
+
displayName: true,
|
|
5761
|
+
propTypes: true,
|
|
5762
|
+
type: true
|
|
5763
|
+
};
|
|
5764
|
+
var TYPE_STATICS = {};
|
|
5765
|
+
TYPE_STATICS[reactIs2.ForwardRef] = FORWARD_REF_STATICS;
|
|
5766
|
+
TYPE_STATICS[reactIs2.Memo] = MEMO_STATICS;
|
|
5767
|
+
function getStatics(component) {
|
|
5768
|
+
if (reactIs2.isMemo(component)) {
|
|
5769
|
+
return MEMO_STATICS;
|
|
5770
|
+
}
|
|
5771
|
+
return TYPE_STATICS[component["$$typeof"]] || REACT_STATICS;
|
|
5601
5772
|
}
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5773
|
+
var defineProperty = Object.defineProperty;
|
|
5774
|
+
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
|
5775
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
5776
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
5777
|
+
var getPrototypeOf = Object.getPrototypeOf;
|
|
5778
|
+
var objectPrototype = Object.prototype;
|
|
5779
|
+
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
|
5780
|
+
if (typeof sourceComponent !== "string") {
|
|
5781
|
+
if (objectPrototype) {
|
|
5782
|
+
var inheritedComponent = getPrototypeOf(sourceComponent);
|
|
5783
|
+
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
|
5784
|
+
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
|
5785
|
+
}
|
|
5786
|
+
}
|
|
5787
|
+
var keys = getOwnPropertyNames(sourceComponent);
|
|
5788
|
+
if (getOwnPropertySymbols) {
|
|
5789
|
+
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
|
5790
|
+
}
|
|
5791
|
+
var targetStatics = getStatics(targetComponent);
|
|
5792
|
+
var sourceStatics = getStatics(sourceComponent);
|
|
5793
|
+
for (var i = 0; i < keys.length; ++i) {
|
|
5794
|
+
var key = keys[i];
|
|
5795
|
+
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
|
|
5796
|
+
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
|
5797
|
+
try {
|
|
5798
|
+
defineProperty(targetComponent, key, descriptor);
|
|
5799
|
+
} catch (e) {
|
|
5800
|
+
}
|
|
5801
|
+
}
|
|
5802
|
+
}
|
|
5606
5803
|
}
|
|
5804
|
+
return targetComponent;
|
|
5607
5805
|
}
|
|
5608
|
-
|
|
5806
|
+
hoistNonReactStatics_cjs = hoistNonReactStatics;
|
|
5807
|
+
return hoistNonReactStatics_cjs;
|
|
5609
5808
|
}
|
|
5809
|
+
requireHoistNonReactStatics_cjs();
|
|
5610
5810
|
var IntlContext = typeof window !== "undefined" && !window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__ ? window.__REACT_INTL_CONTEXT__ || (window.__REACT_INTL_CONTEXT__ = React.createContext(null)) : React.createContext(null);
|
|
5611
5811
|
IntlContext.Consumer;
|
|
5612
5812
|
var IntlProvider$1 = IntlContext.Provider;
|
|
@@ -5660,21 +5860,70 @@ function createFormattedComponent(name) {
|
|
|
5660
5860
|
Component.displayName = DisplayName[name];
|
|
5661
5861
|
return Component;
|
|
5662
5862
|
}
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5863
|
+
var ErrorKind;
|
|
5864
|
+
(function(ErrorKind2) {
|
|
5865
|
+
ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_CLOSING_BRACE"] = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE";
|
|
5866
|
+
ErrorKind2[ErrorKind2["EMPTY_ARGUMENT"] = 2] = "EMPTY_ARGUMENT";
|
|
5867
|
+
ErrorKind2[ErrorKind2["MALFORMED_ARGUMENT"] = 3] = "MALFORMED_ARGUMENT";
|
|
5868
|
+
ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_TYPE"] = 4] = "EXPECT_ARGUMENT_TYPE";
|
|
5869
|
+
ErrorKind2[ErrorKind2["INVALID_ARGUMENT_TYPE"] = 5] = "INVALID_ARGUMENT_TYPE";
|
|
5870
|
+
ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_STYLE"] = 6] = "EXPECT_ARGUMENT_STYLE";
|
|
5871
|
+
ErrorKind2[ErrorKind2["INVALID_NUMBER_SKELETON"] = 7] = "INVALID_NUMBER_SKELETON";
|
|
5872
|
+
ErrorKind2[ErrorKind2["INVALID_DATE_TIME_SKELETON"] = 8] = "INVALID_DATE_TIME_SKELETON";
|
|
5873
|
+
ErrorKind2[ErrorKind2["EXPECT_NUMBER_SKELETON"] = 9] = "EXPECT_NUMBER_SKELETON";
|
|
5874
|
+
ErrorKind2[ErrorKind2["EXPECT_DATE_TIME_SKELETON"] = 10] = "EXPECT_DATE_TIME_SKELETON";
|
|
5875
|
+
ErrorKind2[ErrorKind2["UNCLOSED_QUOTE_IN_ARGUMENT_STYLE"] = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE";
|
|
5876
|
+
ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_OPTIONS"] = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS";
|
|
5877
|
+
ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE"] = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE";
|
|
5878
|
+
ErrorKind2[ErrorKind2["INVALID_PLURAL_ARGUMENT_OFFSET_VALUE"] = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE";
|
|
5879
|
+
ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_SELECTOR"] = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR";
|
|
5880
|
+
ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_SELECTOR"] = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR";
|
|
5881
|
+
ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT"] = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT";
|
|
5882
|
+
ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT"] = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT";
|
|
5883
|
+
ErrorKind2[ErrorKind2["INVALID_PLURAL_ARGUMENT_SELECTOR"] = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR";
|
|
5884
|
+
ErrorKind2[ErrorKind2["DUPLICATE_PLURAL_ARGUMENT_SELECTOR"] = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR";
|
|
5885
|
+
ErrorKind2[ErrorKind2["DUPLICATE_SELECT_ARGUMENT_SELECTOR"] = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR";
|
|
5886
|
+
ErrorKind2[ErrorKind2["MISSING_OTHER_CLAUSE"] = 22] = "MISSING_OTHER_CLAUSE";
|
|
5887
|
+
ErrorKind2[ErrorKind2["INVALID_TAG"] = 23] = "INVALID_TAG";
|
|
5888
|
+
ErrorKind2[ErrorKind2["INVALID_TAG_NAME"] = 25] = "INVALID_TAG_NAME";
|
|
5889
|
+
ErrorKind2[ErrorKind2["UNMATCHED_CLOSING_TAG"] = 26] = "UNMATCHED_CLOSING_TAG";
|
|
5890
|
+
ErrorKind2[ErrorKind2["UNCLOSED_TAG"] = 27] = "UNCLOSED_TAG";
|
|
5891
|
+
})(ErrorKind || (ErrorKind = {}));
|
|
5892
|
+
var TYPE;
|
|
5893
|
+
(function(TYPE2) {
|
|
5894
|
+
TYPE2[TYPE2["literal"] = 0] = "literal";
|
|
5895
|
+
TYPE2[TYPE2["argument"] = 1] = "argument";
|
|
5896
|
+
TYPE2[TYPE2["number"] = 2] = "number";
|
|
5897
|
+
TYPE2[TYPE2["date"] = 3] = "date";
|
|
5898
|
+
TYPE2[TYPE2["time"] = 4] = "time";
|
|
5899
|
+
TYPE2[TYPE2["select"] = 5] = "select";
|
|
5900
|
+
TYPE2[TYPE2["plural"] = 6] = "plural";
|
|
5901
|
+
TYPE2[TYPE2["pound"] = 7] = "pound";
|
|
5902
|
+
TYPE2[TYPE2["tag"] = 8] = "tag";
|
|
5903
|
+
})(TYPE || (TYPE = {}));
|
|
5904
|
+
var SKELETON_TYPE;
|
|
5905
|
+
(function(SKELETON_TYPE2) {
|
|
5906
|
+
SKELETON_TYPE2[SKELETON_TYPE2["number"] = 0] = "number";
|
|
5907
|
+
SKELETON_TYPE2[SKELETON_TYPE2["dateTime"] = 1] = "dateTime";
|
|
5908
|
+
})(SKELETON_TYPE || (SKELETON_TYPE = {}));
|
|
5909
|
+
var _a;
|
|
5910
|
+
var REGEX_SUPPORTS_U_AND_Y = true;
|
|
5911
|
+
try {
|
|
5912
|
+
var re = RE("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
5913
|
+
REGEX_SUPPORTS_U_AND_Y = ((_a = re.exec("a")) === null || _a === void 0 ? void 0 : _a[0]) === "a";
|
|
5914
|
+
} catch (_) {
|
|
5915
|
+
REGEX_SUPPORTS_U_AND_Y = false;
|
|
5916
|
+
}
|
|
5917
|
+
function RE(s, flag) {
|
|
5918
|
+
return new RegExp(s, flag);
|
|
5919
|
+
}
|
|
5920
|
+
var PART_TYPE;
|
|
5921
|
+
(function(PART_TYPE2) {
|
|
5922
|
+
PART_TYPE2[PART_TYPE2["literal"] = 0] = "literal";
|
|
5923
|
+
PART_TYPE2[PART_TYPE2["object"] = 1] = "object";
|
|
5924
|
+
})(PART_TYPE || (PART_TYPE = {}));
|
|
5925
|
+
function isFormatXMLElementFn(el) {
|
|
5926
|
+
return typeof el === "function";
|
|
5678
5927
|
}
|
|
5679
5928
|
function assignUniqueKeysToFormatXMLElementFnArgument(values) {
|
|
5680
5929
|
if (!values) {
|
|
@@ -5719,12 +5968,32 @@ var createIntl = function(_a2, cache) {
|
|
|
5719
5968
|
defaultRichTextElements
|
|
5720
5969
|
};
|
|
5721
5970
|
return __assign(__assign({}, coreIntl), {
|
|
5722
|
-
|
|
5723
|
-
|
|
5971
|
+
formatMessage: formatMessage.bind(
|
|
5972
|
+
null,
|
|
5973
|
+
resolvedConfig,
|
|
5974
|
+
// @ts-expect-error fix this
|
|
5975
|
+
coreIntl.formatters
|
|
5976
|
+
),
|
|
5724
5977
|
// @ts-expect-error fix this
|
|
5725
5978
|
$t: formatMessage.bind(null, resolvedConfig, coreIntl.formatters)
|
|
5726
5979
|
});
|
|
5727
5980
|
};
|
|
5981
|
+
function processIntlConfig(config2) {
|
|
5982
|
+
return {
|
|
5983
|
+
locale: config2.locale,
|
|
5984
|
+
timeZone: config2.timeZone,
|
|
5985
|
+
fallbackOnEmptyString: config2.fallbackOnEmptyString,
|
|
5986
|
+
formats: config2.formats,
|
|
5987
|
+
textComponent: config2.textComponent,
|
|
5988
|
+
messages: config2.messages,
|
|
5989
|
+
defaultLocale: config2.defaultLocale,
|
|
5990
|
+
defaultFormats: config2.defaultFormats,
|
|
5991
|
+
onError: config2.onError,
|
|
5992
|
+
onWarn: config2.onWarn,
|
|
5993
|
+
wrapRichTextChunksInFragment: config2.wrapRichTextChunksInFragment,
|
|
5994
|
+
defaultRichTextElements: config2.defaultRichTextElements
|
|
5995
|
+
};
|
|
5996
|
+
}
|
|
5728
5997
|
var IntlProvider = (
|
|
5729
5998
|
/** @class */
|
|
5730
5999
|
(function(_super) {
|