@bigbinary/neeto-commons-frontend 2.0.39 → 2.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/configs/babel.js +14 -9
- package/cypress-commands.d.ts +2 -0
- package/cypress-utils.cjs.js +46 -5
- package/cypress-utils.d.ts +2 -0
- package/cypress-utils.js +46 -5
- package/initializers.cjs.js +18 -166
- package/initializers.js +11 -159
- package/package.json +15 -2
- package/react-utils.cjs.js +841 -2993
- package/react-utils.d.ts +3 -2
- package/react-utils.js +805 -2956
- package/utils.cjs.js +3 -84
- package/utils.d.ts +2 -0
- package/utils.js +3 -83
package/react-utils.cjs.js
CHANGED
|
@@ -7,20 +7,21 @@ var neetoui = require('@bigbinary/neetoui');
|
|
|
7
7
|
var i18next = require('i18next');
|
|
8
8
|
var ramda = require('ramda');
|
|
9
9
|
var reactI18next = require('react-i18next');
|
|
10
|
+
var pure$1 = require('@bigbinary/neeto-commons-frontend/pure');
|
|
10
11
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
11
12
|
var layouts = require('@bigbinary/neetoui/layouts');
|
|
12
13
|
var formik$1 = require('@bigbinary/neetoui/formik');
|
|
13
14
|
var formik = require('formik');
|
|
14
15
|
var yup = require('yup');
|
|
15
|
-
var
|
|
16
|
-
var dayjs = require('dayjs');
|
|
17
|
-
var relativeTime = require('dayjs/plugin/relativeTime');
|
|
18
|
-
var updateLocale = require('dayjs/plugin/updateLocale');
|
|
16
|
+
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
19
17
|
var reactQuery = require('react-query');
|
|
20
18
|
var axios$1 = require('axios');
|
|
21
19
|
var react = require('@honeybadger-io/react');
|
|
22
20
|
var managers = require('@bigbinary/neetoui/managers');
|
|
23
21
|
var reactRouterDom = require('react-router-dom');
|
|
22
|
+
var dayjs = require('dayjs');
|
|
23
|
+
var relativeTime = require('dayjs/plugin/relativeTime');
|
|
24
|
+
var updateLocale = require('dayjs/plugin/updateLocale');
|
|
24
25
|
var customParseFormat = require('dayjs/plugin/customParseFormat');
|
|
25
26
|
var timezone = require('dayjs/plugin/timezone');
|
|
26
27
|
var utc = require('dayjs/plugin/utc');
|
|
@@ -68,11 +69,10 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
68
69
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
69
70
|
var i18next__default = /*#__PURE__*/_interopDefaultLegacy(i18next);
|
|
70
71
|
var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
|
|
71
|
-
var
|
|
72
|
+
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios$1);
|
|
72
73
|
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
73
74
|
var relativeTime__default = /*#__PURE__*/_interopDefaultLegacy(relativeTime);
|
|
74
75
|
var updateLocale__default = /*#__PURE__*/_interopDefaultLegacy(updateLocale);
|
|
75
|
-
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios$1);
|
|
76
76
|
var customParseFormat__default = /*#__PURE__*/_interopDefaultLegacy(customParseFormat);
|
|
77
77
|
var timezone__default = /*#__PURE__*/_interopDefaultLegacy(timezone);
|
|
78
78
|
var utc__default = /*#__PURE__*/_interopDefaultLegacy(utc);
|
|
@@ -1553,6 +1553,28 @@ function _extends$4() {
|
|
|
1553
1553
|
return _extends$4.apply(this, arguments);
|
|
1554
1554
|
}
|
|
1555
1555
|
|
|
1556
|
+
var getStorageValue = function getStorageValue(key, defaultValue) {
|
|
1557
|
+
if (key in localStorage) return JSON.parse(localStorage.getItem(key));
|
|
1558
|
+
return defaultValue;
|
|
1559
|
+
};
|
|
1560
|
+
var useLocalStorage = function useLocalStorage(key, defaultValue) {
|
|
1561
|
+
var _useState = React.useState(function () {
|
|
1562
|
+
return getStorageValue(key, defaultValue);
|
|
1563
|
+
}),
|
|
1564
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1565
|
+
storedValue = _useState2[0],
|
|
1566
|
+
setStoredValue = _useState2[1];
|
|
1567
|
+
var setValue = function setValue(value) {
|
|
1568
|
+
if (ramda.isNil(value)) {
|
|
1569
|
+
localStorage.removeItem(key);
|
|
1570
|
+
} else {
|
|
1571
|
+
localStorage.setItem(key, JSON.stringify(value));
|
|
1572
|
+
}
|
|
1573
|
+
setStoredValue(value);
|
|
1574
|
+
};
|
|
1575
|
+
return [storedValue, setValue];
|
|
1576
|
+
};
|
|
1577
|
+
|
|
1556
1578
|
function _typeof$1(obj) {
|
|
1557
1579
|
"@babel/helpers - typeof";
|
|
1558
1580
|
|
|
@@ -1578,33 +1600,13 @@ var nullSafe = function nullSafe(func) {
|
|
|
1578
1600
|
})
|
|
1579
1601
|
);
|
|
1580
1602
|
};
|
|
1581
|
-
var noop$2 = function noop() {};
|
|
1582
1603
|
var toLabelAndValue = function toLabelAndValue(string) {
|
|
1583
1604
|
return {
|
|
1584
1605
|
label: string,
|
|
1585
1606
|
value: string
|
|
1586
1607
|
};
|
|
1587
1608
|
};
|
|
1588
|
-
var isNotEmpty = /*#__PURE__*/ramda.complement(ramda.isEmpty);
|
|
1589
1609
|
var isNotPresent = /*#__PURE__*/ramda.either(ramda.isNil, ramda.isEmpty);
|
|
1590
|
-
var isPresent = /*#__PURE__*/ramda.complement(isNotPresent);
|
|
1591
|
-
|
|
1592
|
-
var slugify = function slugify(string) {
|
|
1593
|
-
return string.toString().toLowerCase().replace(/\s+/g, "-") // Replace spaces with -
|
|
1594
|
-
.replace(/&/g, "-and-") // Replace & with 'and'
|
|
1595
|
-
.replace(/[^\w-]+/g, "") // Remove all non-word characters
|
|
1596
|
-
.replace(/--+/g, "-") // Replace multiple - with single -
|
|
1597
|
-
.replace(/^-+/, "") // Trim - from start of text
|
|
1598
|
-
.replace(/-+$/, "");
|
|
1599
|
-
}; // Trim - from end of text
|
|
1600
|
-
var snakeToCamelCase = function snakeToCamelCase(string) {
|
|
1601
|
-
return string.replace(/(_\w)/g, function (letter) {
|
|
1602
|
-
return letter[1].toUpperCase();
|
|
1603
|
-
});
|
|
1604
|
-
};
|
|
1605
|
-
var capitalize = function capitalize(string) {
|
|
1606
|
-
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
1607
|
-
};
|
|
1608
1610
|
|
|
1609
1611
|
var matchesImpl = function matchesImpl(pattern, object) {
|
|
1610
1612
|
var __parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : object;
|
|
@@ -1619,32 +1621,6 @@ var matchesImpl = function matchesImpl(pattern, object) {
|
|
|
1619
1621
|
return matchesImpl(value, object[key], __parent);
|
|
1620
1622
|
});
|
|
1621
1623
|
};
|
|
1622
|
-
var transformObjectDeep = function transformObjectDeep(object, keyValueTransformer) {
|
|
1623
|
-
var objectPreProcessor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
1624
|
-
if (objectPreProcessor && typeof objectPreProcessor === "function") {
|
|
1625
|
-
object = objectPreProcessor(object);
|
|
1626
|
-
}
|
|
1627
|
-
if (Array.isArray(object)) {
|
|
1628
|
-
return object.map(function (obj) {
|
|
1629
|
-
return transformObjectDeep(obj, keyValueTransformer, objectPreProcessor);
|
|
1630
|
-
});
|
|
1631
|
-
} else if (object === null || _typeof$1(object) !== "object") {
|
|
1632
|
-
return object;
|
|
1633
|
-
}
|
|
1634
|
-
return Object.fromEntries(Object.entries(object).map(function (_ref3) {
|
|
1635
|
-
var _ref4 = _slicedToArray(_ref3, 2),
|
|
1636
|
-
key = _ref4[0],
|
|
1637
|
-
value = _ref4[1];
|
|
1638
|
-
return keyValueTransformer(key, transformObjectDeep(value, keyValueTransformer, objectPreProcessor));
|
|
1639
|
-
}));
|
|
1640
|
-
};
|
|
1641
|
-
var preprocessForSerialization = function preprocessForSerialization(object) {
|
|
1642
|
-
return transformObjectDeep(object, function (key, value) {
|
|
1643
|
-
return [key, value];
|
|
1644
|
-
}, function (object) {
|
|
1645
|
-
return typeof (object === null || object === void 0 ? void 0 : object.toJSON) === "function" ? object.toJSON() : object;
|
|
1646
|
-
});
|
|
1647
|
-
};
|
|
1648
1624
|
var matches = /*#__PURE__*/ramda.curry(function (pattern, object) {
|
|
1649
1625
|
return matchesImpl(pattern, object);
|
|
1650
1626
|
});
|
|
@@ -1696,31 +1672,6 @@ function _defineProperty(obj, key, value) {
|
|
|
1696
1672
|
var removeBy = /*#__PURE__*/ramda.curry(function (pattern, array) {
|
|
1697
1673
|
return array.filter(ramda.complement(matches(pattern)));
|
|
1698
1674
|
});
|
|
1699
|
-
var findIndexBy = /*#__PURE__*/ramda.curry(function (pattern, array) {
|
|
1700
|
-
return array.findIndex(matches(pattern));
|
|
1701
|
-
});
|
|
1702
|
-
|
|
1703
|
-
var getStorageValue = function getStorageValue(key, defaultValue) {
|
|
1704
|
-
if (key in localStorage) return JSON.parse(localStorage.getItem(key));
|
|
1705
|
-
return defaultValue;
|
|
1706
|
-
};
|
|
1707
|
-
var useLocalStorage = function useLocalStorage(key, defaultValue) {
|
|
1708
|
-
var _useState = React.useState(function () {
|
|
1709
|
-
return getStorageValue(key, defaultValue);
|
|
1710
|
-
}),
|
|
1711
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
1712
|
-
storedValue = _useState2[0],
|
|
1713
|
-
setStoredValue = _useState2[1];
|
|
1714
|
-
var setValue = function setValue(value) {
|
|
1715
|
-
if (ramda.isNil(value)) {
|
|
1716
|
-
localStorage.removeItem(key);
|
|
1717
|
-
} else {
|
|
1718
|
-
localStorage.setItem(key, JSON.stringify(value));
|
|
1719
|
-
}
|
|
1720
|
-
setStoredValue(value);
|
|
1721
|
-
};
|
|
1722
|
-
return [storedValue, setValue];
|
|
1723
|
-
};
|
|
1724
1675
|
|
|
1725
1676
|
var removeFixedColumns = function removeFixedColumns(fixedColumns, columnData) {
|
|
1726
1677
|
return removeBy({
|
|
@@ -1778,7 +1729,7 @@ var Columns = function Columns(_ref) {
|
|
|
1778
1729
|
return setSearchTerm(value);
|
|
1779
1730
|
};
|
|
1780
1731
|
React.useEffect(function () {
|
|
1781
|
-
onChange(removeBy({
|
|
1732
|
+
onChange(pure$1.removeBy({
|
|
1782
1733
|
dataIndex: ramda.includes(ramda.__, hiddenColumns)
|
|
1783
1734
|
}, columnData));
|
|
1784
1735
|
}, [columnData, hiddenColumns]);
|
|
@@ -1799,7 +1750,7 @@ var Columns = function Columns(_ref) {
|
|
|
1799
1750
|
type: "search",
|
|
1800
1751
|
value: searchTerm,
|
|
1801
1752
|
onChange: handleSearch
|
|
1802
|
-
}, searchProps)), isNotEmpty(filteredColumns) ? filteredColumns.map(function (_ref4) {
|
|
1753
|
+
}, searchProps)), pure$1.isNotEmpty(filteredColumns) ? filteredColumns.map(function (_ref4) {
|
|
1803
1754
|
var dataIndex = _ref4.dataIndex,
|
|
1804
1755
|
key = _ref4.key,
|
|
1805
1756
|
title = _ref4.title;
|
|
@@ -3394,2851 +3345,385 @@ var mousetrap = {exports: {}};
|
|
|
3394
3345
|
Mousetrap.prototype.stopCallback = function(e, element) {
|
|
3395
3346
|
var self = this;
|
|
3396
3347
|
|
|
3397
|
-
// if the element has the class "mousetrap" then no need to stop
|
|
3398
|
-
if ((' ' + element.className + ' ').indexOf(' mousetrap ') > -1) {
|
|
3399
|
-
return false;
|
|
3400
|
-
}
|
|
3401
|
-
|
|
3402
|
-
if (_belongsTo(element, self.target)) {
|
|
3403
|
-
return false;
|
|
3404
|
-
}
|
|
3405
|
-
|
|
3406
|
-
// Events originating from a shadow DOM are re-targetted and `e.target` is the shadow host,
|
|
3407
|
-
// not the initial event target in the shadow tree. Note that not all events cross the
|
|
3408
|
-
// shadow boundary.
|
|
3409
|
-
// For shadow trees with `mode: 'open'`, the initial event target is the first element in
|
|
3410
|
-
// the event’s composed path. For shadow trees with `mode: 'closed'`, the initial event
|
|
3411
|
-
// target cannot be obtained.
|
|
3412
|
-
if ('composedPath' in e && typeof e.composedPath === 'function') {
|
|
3413
|
-
// For open shadow trees, update `element` so that the following check works.
|
|
3414
|
-
var initialEventTarget = e.composedPath()[0];
|
|
3415
|
-
if (initialEventTarget !== e.target) {
|
|
3416
|
-
element = initialEventTarget;
|
|
3417
|
-
}
|
|
3418
|
-
}
|
|
3419
|
-
|
|
3420
|
-
// stop for input, select, and textarea
|
|
3421
|
-
return element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || element.isContentEditable;
|
|
3422
|
-
};
|
|
3423
|
-
|
|
3424
|
-
/**
|
|
3425
|
-
* exposes _handleKey publicly so it can be overwritten by extensions
|
|
3426
|
-
*/
|
|
3427
|
-
Mousetrap.prototype.handleKey = function() {
|
|
3428
|
-
var self = this;
|
|
3429
|
-
return self._handleKey.apply(self, arguments);
|
|
3430
|
-
};
|
|
3431
|
-
|
|
3432
|
-
/**
|
|
3433
|
-
* allow custom key mappings
|
|
3434
|
-
*/
|
|
3435
|
-
Mousetrap.addKeycodes = function(object) {
|
|
3436
|
-
for (var key in object) {
|
|
3437
|
-
if (object.hasOwnProperty(key)) {
|
|
3438
|
-
_MAP[key] = object[key];
|
|
3439
|
-
}
|
|
3440
|
-
}
|
|
3441
|
-
_REVERSE_MAP = null;
|
|
3442
|
-
};
|
|
3443
|
-
|
|
3444
|
-
/**
|
|
3445
|
-
* Init the global mousetrap functions
|
|
3446
|
-
*
|
|
3447
|
-
* This method is needed to allow the global mousetrap functions to work
|
|
3448
|
-
* now that mousetrap is a constructor function.
|
|
3449
|
-
*/
|
|
3450
|
-
Mousetrap.init = function() {
|
|
3451
|
-
var documentMousetrap = Mousetrap(document);
|
|
3452
|
-
for (var method in documentMousetrap) {
|
|
3453
|
-
if (method.charAt(0) !== '_') {
|
|
3454
|
-
Mousetrap[method] = (function(method) {
|
|
3455
|
-
return function() {
|
|
3456
|
-
return documentMousetrap[method].apply(documentMousetrap, arguments);
|
|
3457
|
-
};
|
|
3458
|
-
} (method));
|
|
3459
|
-
}
|
|
3460
|
-
}
|
|
3461
|
-
};
|
|
3462
|
-
|
|
3463
|
-
Mousetrap.init();
|
|
3464
|
-
|
|
3465
|
-
// expose mousetrap to the global object
|
|
3466
|
-
window.Mousetrap = Mousetrap;
|
|
3467
|
-
|
|
3468
|
-
// expose as a common js module
|
|
3469
|
-
if (module.exports) {
|
|
3470
|
-
module.exports = Mousetrap;
|
|
3471
|
-
}
|
|
3472
|
-
|
|
3473
|
-
// expose mousetrap as an AMD module
|
|
3474
|
-
if (typeof undefined$1 === 'function' && undefined$1.amd) {
|
|
3475
|
-
undefined$1(function() {
|
|
3476
|
-
return Mousetrap;
|
|
3477
|
-
});
|
|
3478
|
-
}
|
|
3479
|
-
}) (typeof window !== 'undefined' ? window : null, typeof window !== 'undefined' ? document : null);
|
|
3480
|
-
} (mousetrap));
|
|
3481
|
-
|
|
3482
|
-
var Mousetrap$1 = mousetrap.exports;
|
|
3483
|
-
|
|
3484
|
-
/**
|
|
3485
|
-
* adds a bindGlobal method to Mousetrap that allows you to
|
|
3486
|
-
* bind specific keyboard shortcuts that will still work
|
|
3487
|
-
* inside a text input field
|
|
3488
|
-
*
|
|
3489
|
-
* usage:
|
|
3490
|
-
* Mousetrap.bindGlobal('ctrl+s', _saveChanges);
|
|
3491
|
-
*/
|
|
3492
|
-
/* global Mousetrap:true */
|
|
3493
|
-
(function(Mousetrap) {
|
|
3494
|
-
var _globalCallbacks = {};
|
|
3495
|
-
var _originalStopCallback = Mousetrap.prototype.stopCallback;
|
|
3496
|
-
|
|
3497
|
-
Mousetrap.prototype.stopCallback = function(e, element, combo, sequence) {
|
|
3498
|
-
var self = this;
|
|
3499
|
-
|
|
3500
|
-
if (self.paused) {
|
|
3501
|
-
return true;
|
|
3502
|
-
}
|
|
3503
|
-
|
|
3504
|
-
if (_globalCallbacks[combo] || _globalCallbacks[sequence]) {
|
|
3505
|
-
return false;
|
|
3506
|
-
}
|
|
3507
|
-
|
|
3508
|
-
return _originalStopCallback.call(self, e, element, combo);
|
|
3509
|
-
};
|
|
3510
|
-
|
|
3511
|
-
Mousetrap.prototype.bindGlobal = function(keys, callback, action) {
|
|
3512
|
-
var self = this;
|
|
3513
|
-
self.bind(keys, callback, action);
|
|
3514
|
-
|
|
3515
|
-
if (keys instanceof Array) {
|
|
3516
|
-
for (var i = 0; i < keys.length; i++) {
|
|
3517
|
-
_globalCallbacks[keys[i]] = true;
|
|
3518
|
-
}
|
|
3519
|
-
return;
|
|
3520
|
-
}
|
|
3521
|
-
|
|
3522
|
-
_globalCallbacks[keys] = true;
|
|
3523
|
-
};
|
|
3524
|
-
|
|
3525
|
-
Mousetrap.prototype.unbindGlobal = function(keys, action) {
|
|
3526
|
-
var self = this;
|
|
3527
|
-
self.unbind(keys, action);
|
|
3528
|
-
|
|
3529
|
-
if (keys instanceof Array) {
|
|
3530
|
-
for (var i = 0; i < keys.length; i++) {
|
|
3531
|
-
_globalCallbacks[keys[i]] = false;
|
|
3532
|
-
}
|
|
3533
|
-
return;
|
|
3534
|
-
}
|
|
3535
|
-
|
|
3536
|
-
_globalCallbacks[keys] = false;
|
|
3537
|
-
};
|
|
3538
|
-
|
|
3539
|
-
Mousetrap.init();
|
|
3540
|
-
}) (Mousetrap);
|
|
3541
|
-
|
|
3542
|
-
var MAC_TO_WINDOWS_KEYS_MAP = {
|
|
3543
|
-
option: "alt",
|
|
3544
|
-
command: "ctrl",
|
|
3545
|
-
"return": "enter",
|
|
3546
|
-
"delete": "backspace"
|
|
3547
|
-
};
|
|
3548
|
-
var OS = {
|
|
3549
|
-
mac: "OS X",
|
|
3550
|
-
windows: "Windows"
|
|
3551
|
-
};
|
|
3552
|
-
|
|
3553
|
-
var convertHotkeyToUsersPlatform = function convertHotkeyToUsersPlatform(hotkey) {
|
|
3554
|
-
var _platformInfo$os, _platformInfo$os$fami;
|
|
3555
|
-
var platformInfo = platform.parse(navigator.userAgent);
|
|
3556
|
-
var isOSX = (_platformInfo$os = platformInfo.os) === null || _platformInfo$os === void 0 ? void 0 : (_platformInfo$os$fami = _platformInfo$os.family) === null || _platformInfo$os$fami === void 0 ? void 0 : _platformInfo$os$fami.includes(OS.mac);
|
|
3557
|
-
if (isOSX) return hotkey;
|
|
3558
|
-
var hotkeyForWindows = hotkey;
|
|
3559
|
-
ramda.toPairs(MAC_TO_WINDOWS_KEYS_MAP).forEach(function (_ref) {
|
|
3560
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
3561
|
-
macKey = _ref2[0],
|
|
3562
|
-
windowsKey = _ref2[1];
|
|
3563
|
-
hotkeyForWindows = hotkeyForWindows.replaceAll(macKey, windowsKey);
|
|
3564
|
-
});
|
|
3565
|
-
return hotkeyForWindows;
|
|
3566
|
-
};
|
|
3567
|
-
|
|
3568
|
-
var MODES$1 = {
|
|
3569
|
-
"default": "default",
|
|
3570
|
-
global: "global",
|
|
3571
|
-
scoped: "scoped"
|
|
3572
|
-
};
|
|
3573
|
-
var DEFAULT_CONFIG = {
|
|
3574
|
-
mode: MODES$1["default"],
|
|
3575
|
-
unbindOnUnmount: true,
|
|
3576
|
-
enabled: true
|
|
3577
|
-
};
|
|
3578
|
-
|
|
3579
|
-
var useHotKeys = function useHotKeys(hotkey, handler, userConfig) {
|
|
3580
|
-
var ref = React.useRef(null);
|
|
3581
|
-
var convertedHotkey = convertHotkeyToUsersPlatform(hotkey);
|
|
3582
|
-
var config = ramda.mergeLeft(userConfig, DEFAULT_CONFIG);
|
|
3583
|
-
React.useEffect(function () {
|
|
3584
|
-
config.enabled && bindHotKey({
|
|
3585
|
-
mode: config.mode,
|
|
3586
|
-
hotkey: convertedHotkey,
|
|
3587
|
-
handler: handler,
|
|
3588
|
-
ref: ref
|
|
3589
|
-
});
|
|
3590
|
-
return function () {
|
|
3591
|
-
config.unbindOnUnmount && unBindHotKey(config.mode, convertedHotkey);
|
|
3592
|
-
};
|
|
3593
|
-
}, [handler, config.mode, convertedHotkey, config]);
|
|
3594
|
-
return config.mode === MODES$1.scoped ? ref : null;
|
|
3595
|
-
};
|
|
3596
|
-
var bindHotKey = function bindHotKey(_ref) {
|
|
3597
|
-
var mode = _ref.mode,
|
|
3598
|
-
hotkey = _ref.hotkey,
|
|
3599
|
-
handler = _ref.handler,
|
|
3600
|
-
ref = _ref.ref;
|
|
3601
|
-
switch (mode) {
|
|
3602
|
-
case MODES$1.global:
|
|
3603
|
-
Mousetrap$1.bindGlobal(hotkey, handler);
|
|
3604
|
-
break;
|
|
3605
|
-
case MODES$1.scoped:
|
|
3606
|
-
Mousetrap$1(ref.current).bind(hotkey, handler);
|
|
3607
|
-
break;
|
|
3608
|
-
default:
|
|
3609
|
-
Mousetrap$1.bind(hotkey, handler);
|
|
3610
|
-
}
|
|
3611
|
-
};
|
|
3612
|
-
var unBindHotKey = function unBindHotKey(mode, hotkey) {
|
|
3613
|
-
return mode === MODES$1.global ? Mousetrap$1.unbindGlobal(hotkey) : Mousetrap$1.unbind(hotkey);
|
|
3614
|
-
};
|
|
3615
|
-
|
|
3616
|
-
var useForceUpdate = function useForceUpdate() {
|
|
3617
|
-
// eslint-disable-next-line react/hook-use-state
|
|
3618
|
-
var _useState = React.useState(0),
|
|
3619
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
3620
|
-
setValue = _useState2[1];
|
|
3621
|
-
return function () {
|
|
3622
|
-
return setValue(function (value) {
|
|
3623
|
-
return value + 1;
|
|
3624
|
-
});
|
|
3625
|
-
};
|
|
3626
|
-
};
|
|
3627
|
-
|
|
3628
|
-
var useIsElementVisibleInDom = function useIsElementVisibleInDom(target) {
|
|
3629
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
3630
|
-
var _useState = React.useState(false),
|
|
3631
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
3632
|
-
isIntersecting = _useState2[0],
|
|
3633
|
-
setIsIntersecting = _useState2[1];
|
|
3634
|
-
var forceUpdate = useForceUpdate();
|
|
3635
|
-
React.useEffect(function () {
|
|
3636
|
-
if (!target) return forceUpdate();
|
|
3637
|
-
var observer = new IntersectionObserver(function (_ref) {
|
|
3638
|
-
var _ref2 = _slicedToArray(_ref, 1),
|
|
3639
|
-
entry = _ref2[0];
|
|
3640
|
-
return setIsIntersecting(entry.isIntersecting);
|
|
3641
|
-
}, options);
|
|
3642
|
-
observer.observe(target);
|
|
3643
|
-
return function () {
|
|
3644
|
-
return observer.unobserve(target);
|
|
3645
|
-
};
|
|
3646
|
-
}, [target, options]);
|
|
3647
|
-
return isIntersecting;
|
|
3648
|
-
};
|
|
3649
|
-
|
|
3650
|
-
function shallow(objA, objB) {
|
|
3651
|
-
if (Object.is(objA, objB)) {
|
|
3652
|
-
return true;
|
|
3653
|
-
}
|
|
3654
|
-
if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) {
|
|
3655
|
-
return false;
|
|
3656
|
-
}
|
|
3657
|
-
if (objA instanceof Map && objB instanceof Map) {
|
|
3658
|
-
if (objA.size !== objB.size)
|
|
3659
|
-
return false;
|
|
3660
|
-
for (const [key, value] of objA) {
|
|
3661
|
-
if (!Object.is(value, objB.get(key))) {
|
|
3662
|
-
return false;
|
|
3663
|
-
}
|
|
3664
|
-
}
|
|
3665
|
-
return true;
|
|
3666
|
-
}
|
|
3667
|
-
if (objA instanceof Set && objB instanceof Set) {
|
|
3668
|
-
if (objA.size !== objB.size)
|
|
3669
|
-
return false;
|
|
3670
|
-
for (const value of objA) {
|
|
3671
|
-
if (!objB.has(value)) {
|
|
3672
|
-
return false;
|
|
3673
|
-
}
|
|
3674
|
-
}
|
|
3675
|
-
return true;
|
|
3676
|
-
}
|
|
3677
|
-
const keysA = Object.keys(objA);
|
|
3678
|
-
if (keysA.length !== Object.keys(objB).length) {
|
|
3679
|
-
return false;
|
|
3680
|
-
}
|
|
3681
|
-
for (let i = 0; i < keysA.length; i++) {
|
|
3682
|
-
if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !Object.is(objA[keysA[i]], objB[keysA[i]])) {
|
|
3683
|
-
return false;
|
|
3684
|
-
}
|
|
3685
|
-
}
|
|
3686
|
-
return true;
|
|
3687
|
-
}
|
|
3688
|
-
|
|
3689
|
-
var useKeyboardShortcutsStore = create$9(function (set) {
|
|
3690
|
-
return {
|
|
3691
|
-
isOpen: false,
|
|
3692
|
-
setIsOpen: function setIsOpen(arg) {
|
|
3693
|
-
if (typeof arg === "function") {
|
|
3694
|
-
set(function (state) {
|
|
3695
|
-
return {
|
|
3696
|
-
isOpen: arg(state.isOpen)
|
|
3697
|
-
};
|
|
3698
|
-
});
|
|
3699
|
-
} else {
|
|
3700
|
-
set({
|
|
3701
|
-
isOpen: arg
|
|
3702
|
-
});
|
|
3703
|
-
}
|
|
3704
|
-
}
|
|
3705
|
-
};
|
|
3706
|
-
});
|
|
3707
|
-
var useKeyboardShortcutsPaneState = function useKeyboardShortcutsPaneState() {
|
|
3708
|
-
return useKeyboardShortcutsStore(function (_ref) {
|
|
3709
|
-
var isOpen = _ref.isOpen,
|
|
3710
|
-
setIsOpen = _ref.setIsOpen;
|
|
3711
|
-
return [isOpen, setIsOpen];
|
|
3712
|
-
}, shallow);
|
|
3713
|
-
};
|
|
3714
|
-
|
|
3715
|
-
var useOnClickOutside = function useOnClickOutside(ref, handler) {
|
|
3716
|
-
React.useEffect(function () {
|
|
3717
|
-
var listener = function listener(event) {
|
|
3718
|
-
// Do nothing if clicking ref's element or descendent elements
|
|
3719
|
-
if (!ref.current || ref.current.contains(event.target)) {
|
|
3720
|
-
return;
|
|
3721
|
-
}
|
|
3722
|
-
handler(event);
|
|
3723
|
-
};
|
|
3724
|
-
document.addEventListener("mousedown", listener);
|
|
3725
|
-
document.addEventListener("touchstart", listener);
|
|
3726
|
-
return function () {
|
|
3727
|
-
document.removeEventListener("mousedown", listener);
|
|
3728
|
-
document.removeEventListener("touchstart", listener);
|
|
3729
|
-
};
|
|
3730
|
-
}, [handler]);
|
|
3731
|
-
};
|
|
3732
|
-
|
|
3733
|
-
var usePrevious = function usePrevious(value) {
|
|
3734
|
-
var ref = React.useRef(value);
|
|
3735
|
-
React.useEffect(function () {
|
|
3736
|
-
ref.current = value;
|
|
3737
|
-
}, [value]);
|
|
3738
|
-
return ref.current;
|
|
3739
|
-
};
|
|
3740
|
-
|
|
3741
|
-
var useUpdateEffect = function useUpdateEffect(callback) {
|
|
3742
|
-
var dependencies = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
3743
|
-
var isInitialMount = React.useRef(true);
|
|
3744
|
-
React.useEffect(function () {
|
|
3745
|
-
if (isInitialMount.current) {
|
|
3746
|
-
isInitialMount.current = false;
|
|
3747
|
-
return;
|
|
3748
|
-
}
|
|
3749
|
-
callback();
|
|
3750
|
-
}, dependencies);
|
|
3751
|
-
};
|
|
3752
|
-
|
|
3753
|
-
var DEFAULT_STALE_TIME = 60 * 60 * 1000;
|
|
3754
|
-
var DOMAIN_QUERY_KEY = "custom-domain";
|
|
3755
|
-
var ENTITY_COUNT = {
|
|
3756
|
-
singular: 1,
|
|
3757
|
-
plural: 2
|
|
3758
|
-
};
|
|
3759
|
-
|
|
3760
|
-
var HOSTNAME_REGEX = /^(?!-)[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](?:\.[a-zA-Z]{2,})+/;
|
|
3761
|
-
var INITIAL_VALUES$1 = {
|
|
3762
|
-
hostname: ""
|
|
3763
|
-
};
|
|
3764
|
-
var CUSTOM_DOMAIN_VALIDATION_SCHEMA = yup__namespace.object().shape({
|
|
3765
|
-
hostname: yup__namespace.string().required(i18next.t("neetoCommons.customDomain.formikValidation.required")).matches(HOSTNAME_REGEX, i18next.t("neetoCommons.customDomain.formikValidation.valid"))
|
|
3766
|
-
});
|
|
3767
|
-
|
|
3768
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
3769
|
-
try {
|
|
3770
|
-
var info = gen[key](arg);
|
|
3771
|
-
var value = info.value;
|
|
3772
|
-
} catch (error) {
|
|
3773
|
-
reject(error);
|
|
3774
|
-
return;
|
|
3775
|
-
}
|
|
3776
|
-
if (info.done) {
|
|
3777
|
-
resolve(value);
|
|
3778
|
-
} else {
|
|
3779
|
-
Promise.resolve(value).then(_next, _throw);
|
|
3780
|
-
}
|
|
3781
|
-
}
|
|
3782
|
-
function _asyncToGenerator(fn) {
|
|
3783
|
-
return function () {
|
|
3784
|
-
var self = this,
|
|
3785
|
-
args = arguments;
|
|
3786
|
-
return new Promise(function (resolve, reject) {
|
|
3787
|
-
var gen = fn.apply(self, args);
|
|
3788
|
-
function _next(value) {
|
|
3789
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
3790
|
-
}
|
|
3791
|
-
function _throw(err) {
|
|
3792
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
3793
|
-
}
|
|
3794
|
-
_next(undefined);
|
|
3795
|
-
});
|
|
3796
|
-
};
|
|
3797
|
-
}
|
|
3798
|
-
|
|
3799
|
-
var regeneratorRuntime$1 = {exports: {}};
|
|
3800
|
-
|
|
3801
|
-
var _typeof = {exports: {}};
|
|
3802
|
-
|
|
3803
|
-
(function (module) {
|
|
3804
|
-
function _typeof(obj) {
|
|
3805
|
-
"@babel/helpers - typeof";
|
|
3806
|
-
|
|
3807
|
-
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
3808
|
-
return typeof obj;
|
|
3809
|
-
} : function (obj) {
|
|
3810
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
3811
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
3812
|
-
}
|
|
3813
|
-
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3814
|
-
} (_typeof));
|
|
3815
|
-
|
|
3816
|
-
(function (module) {
|
|
3817
|
-
var _typeof$1 = _typeof.exports["default"];
|
|
3818
|
-
function _regeneratorRuntime() {
|
|
3819
|
-
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
3820
|
-
return exports;
|
|
3821
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3822
|
-
var exports = {},
|
|
3823
|
-
Op = Object.prototype,
|
|
3824
|
-
hasOwn = Op.hasOwnProperty,
|
|
3825
|
-
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
3826
|
-
obj[key] = desc.value;
|
|
3827
|
-
},
|
|
3828
|
-
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
3829
|
-
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
3830
|
-
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
3831
|
-
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
3832
|
-
function define(obj, key, value) {
|
|
3833
|
-
return Object.defineProperty(obj, key, {
|
|
3834
|
-
value: value,
|
|
3835
|
-
enumerable: !0,
|
|
3836
|
-
configurable: !0,
|
|
3837
|
-
writable: !0
|
|
3838
|
-
}), obj[key];
|
|
3839
|
-
}
|
|
3840
|
-
try {
|
|
3841
|
-
define({}, "");
|
|
3842
|
-
} catch (err) {
|
|
3843
|
-
define = function define(obj, key, value) {
|
|
3844
|
-
return obj[key] = value;
|
|
3845
|
-
};
|
|
3846
|
-
}
|
|
3847
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
3848
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
3849
|
-
generator = Object.create(protoGenerator.prototype),
|
|
3850
|
-
context = new Context(tryLocsList || []);
|
|
3851
|
-
return defineProperty(generator, "_invoke", {
|
|
3852
|
-
value: makeInvokeMethod(innerFn, self, context)
|
|
3853
|
-
}), generator;
|
|
3854
|
-
}
|
|
3855
|
-
function tryCatch(fn, obj, arg) {
|
|
3856
|
-
try {
|
|
3857
|
-
return {
|
|
3858
|
-
type: "normal",
|
|
3859
|
-
arg: fn.call(obj, arg)
|
|
3860
|
-
};
|
|
3861
|
-
} catch (err) {
|
|
3862
|
-
return {
|
|
3863
|
-
type: "throw",
|
|
3864
|
-
arg: err
|
|
3865
|
-
};
|
|
3866
|
-
}
|
|
3867
|
-
}
|
|
3868
|
-
exports.wrap = wrap;
|
|
3869
|
-
var ContinueSentinel = {};
|
|
3870
|
-
function Generator() {}
|
|
3871
|
-
function GeneratorFunction() {}
|
|
3872
|
-
function GeneratorFunctionPrototype() {}
|
|
3873
|
-
var IteratorPrototype = {};
|
|
3874
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
3875
|
-
return this;
|
|
3876
|
-
});
|
|
3877
|
-
var getProto = Object.getPrototypeOf,
|
|
3878
|
-
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
3879
|
-
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
3880
|
-
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
3881
|
-
function defineIteratorMethods(prototype) {
|
|
3882
|
-
["next", "throw", "return"].forEach(function (method) {
|
|
3883
|
-
define(prototype, method, function (arg) {
|
|
3884
|
-
return this._invoke(method, arg);
|
|
3885
|
-
});
|
|
3886
|
-
});
|
|
3887
|
-
}
|
|
3888
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
3889
|
-
function invoke(method, arg, resolve, reject) {
|
|
3890
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
3891
|
-
if ("throw" !== record.type) {
|
|
3892
|
-
var result = record.arg,
|
|
3893
|
-
value = result.value;
|
|
3894
|
-
return value && "object" == _typeof$1(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
3895
|
-
invoke("next", value, resolve, reject);
|
|
3896
|
-
}, function (err) {
|
|
3897
|
-
invoke("throw", err, resolve, reject);
|
|
3898
|
-
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
3899
|
-
result.value = unwrapped, resolve(result);
|
|
3900
|
-
}, function (error) {
|
|
3901
|
-
return invoke("throw", error, resolve, reject);
|
|
3902
|
-
});
|
|
3903
|
-
}
|
|
3904
|
-
reject(record.arg);
|
|
3905
|
-
}
|
|
3906
|
-
var previousPromise;
|
|
3907
|
-
defineProperty(this, "_invoke", {
|
|
3908
|
-
value: function value(method, arg) {
|
|
3909
|
-
function callInvokeWithMethodAndArg() {
|
|
3910
|
-
return new PromiseImpl(function (resolve, reject) {
|
|
3911
|
-
invoke(method, arg, resolve, reject);
|
|
3912
|
-
});
|
|
3913
|
-
}
|
|
3914
|
-
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
3915
|
-
}
|
|
3916
|
-
});
|
|
3917
|
-
}
|
|
3918
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
3919
|
-
var state = "suspendedStart";
|
|
3920
|
-
return function (method, arg) {
|
|
3921
|
-
if ("executing" === state) throw new Error("Generator is already running");
|
|
3922
|
-
if ("completed" === state) {
|
|
3923
|
-
if ("throw" === method) throw arg;
|
|
3924
|
-
return doneResult();
|
|
3925
|
-
}
|
|
3926
|
-
for (context.method = method, context.arg = arg;;) {
|
|
3927
|
-
var delegate = context.delegate;
|
|
3928
|
-
if (delegate) {
|
|
3929
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
3930
|
-
if (delegateResult) {
|
|
3931
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
3932
|
-
return delegateResult;
|
|
3933
|
-
}
|
|
3934
|
-
}
|
|
3935
|
-
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
3936
|
-
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
3937
|
-
context.dispatchException(context.arg);
|
|
3938
|
-
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
3939
|
-
state = "executing";
|
|
3940
|
-
var record = tryCatch(innerFn, self, context);
|
|
3941
|
-
if ("normal" === record.type) {
|
|
3942
|
-
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
3943
|
-
return {
|
|
3944
|
-
value: record.arg,
|
|
3945
|
-
done: context.done
|
|
3946
|
-
};
|
|
3947
|
-
}
|
|
3948
|
-
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
3949
|
-
}
|
|
3950
|
-
};
|
|
3951
|
-
}
|
|
3952
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
3953
|
-
var methodName = context.method,
|
|
3954
|
-
method = delegate.iterator[methodName];
|
|
3955
|
-
if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
|
|
3956
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
3957
|
-
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
3958
|
-
var info = record.arg;
|
|
3959
|
-
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
|
3960
|
-
}
|
|
3961
|
-
function pushTryEntry(locs) {
|
|
3962
|
-
var entry = {
|
|
3963
|
-
tryLoc: locs[0]
|
|
3964
|
-
};
|
|
3965
|
-
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
3966
|
-
}
|
|
3967
|
-
function resetTryEntry(entry) {
|
|
3968
|
-
var record = entry.completion || {};
|
|
3969
|
-
record.type = "normal", delete record.arg, entry.completion = record;
|
|
3970
|
-
}
|
|
3971
|
-
function Context(tryLocsList) {
|
|
3972
|
-
this.tryEntries = [{
|
|
3973
|
-
tryLoc: "root"
|
|
3974
|
-
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
3975
|
-
}
|
|
3976
|
-
function values(iterable) {
|
|
3977
|
-
if (iterable) {
|
|
3978
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
3979
|
-
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
3980
|
-
if ("function" == typeof iterable.next) return iterable;
|
|
3981
|
-
if (!isNaN(iterable.length)) {
|
|
3982
|
-
var i = -1,
|
|
3983
|
-
next = function next() {
|
|
3984
|
-
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
3985
|
-
return next.value = undefined, next.done = !0, next;
|
|
3986
|
-
};
|
|
3987
|
-
return next.next = next;
|
|
3988
|
-
}
|
|
3989
|
-
}
|
|
3990
|
-
return {
|
|
3991
|
-
next: doneResult
|
|
3992
|
-
};
|
|
3993
|
-
}
|
|
3994
|
-
function doneResult() {
|
|
3995
|
-
return {
|
|
3996
|
-
value: undefined,
|
|
3997
|
-
done: !0
|
|
3998
|
-
};
|
|
3999
|
-
}
|
|
4000
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
4001
|
-
value: GeneratorFunctionPrototype,
|
|
4002
|
-
configurable: !0
|
|
4003
|
-
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
4004
|
-
value: GeneratorFunction,
|
|
4005
|
-
configurable: !0
|
|
4006
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
4007
|
-
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
4008
|
-
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
4009
|
-
}, exports.mark = function (genFun) {
|
|
4010
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
4011
|
-
}, exports.awrap = function (arg) {
|
|
4012
|
-
return {
|
|
4013
|
-
__await: arg
|
|
4014
|
-
};
|
|
4015
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
4016
|
-
return this;
|
|
4017
|
-
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
4018
|
-
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
4019
|
-
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
4020
|
-
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
4021
|
-
return result.done ? result.value : iter.next();
|
|
4022
|
-
});
|
|
4023
|
-
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
4024
|
-
return this;
|
|
4025
|
-
}), define(Gp, "toString", function () {
|
|
4026
|
-
return "[object Generator]";
|
|
4027
|
-
}), exports.keys = function (val) {
|
|
4028
|
-
var object = Object(val),
|
|
4029
|
-
keys = [];
|
|
4030
|
-
for (var key in object) keys.push(key);
|
|
4031
|
-
return keys.reverse(), function next() {
|
|
4032
|
-
for (; keys.length;) {
|
|
4033
|
-
var key = keys.pop();
|
|
4034
|
-
if (key in object) return next.value = key, next.done = !1, next;
|
|
4035
|
-
}
|
|
4036
|
-
return next.done = !0, next;
|
|
4037
|
-
};
|
|
4038
|
-
}, exports.values = values, Context.prototype = {
|
|
4039
|
-
constructor: Context,
|
|
4040
|
-
reset: function reset(skipTempReset) {
|
|
4041
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
|
4042
|
-
},
|
|
4043
|
-
stop: function stop() {
|
|
4044
|
-
this.done = !0;
|
|
4045
|
-
var rootRecord = this.tryEntries[0].completion;
|
|
4046
|
-
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
4047
|
-
return this.rval;
|
|
4048
|
-
},
|
|
4049
|
-
dispatchException: function dispatchException(exception) {
|
|
4050
|
-
if (this.done) throw exception;
|
|
4051
|
-
var context = this;
|
|
4052
|
-
function handle(loc, caught) {
|
|
4053
|
-
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
4054
|
-
}
|
|
4055
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
4056
|
-
var entry = this.tryEntries[i],
|
|
4057
|
-
record = entry.completion;
|
|
4058
|
-
if ("root" === entry.tryLoc) return handle("end");
|
|
4059
|
-
if (entry.tryLoc <= this.prev) {
|
|
4060
|
-
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
4061
|
-
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
4062
|
-
if (hasCatch && hasFinally) {
|
|
4063
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
4064
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
4065
|
-
} else if (hasCatch) {
|
|
4066
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
4067
|
-
} else {
|
|
4068
|
-
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
4069
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
4070
|
-
}
|
|
4071
|
-
}
|
|
4072
|
-
}
|
|
4073
|
-
},
|
|
4074
|
-
abrupt: function abrupt(type, arg) {
|
|
4075
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
4076
|
-
var entry = this.tryEntries[i];
|
|
4077
|
-
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
4078
|
-
var finallyEntry = entry;
|
|
4079
|
-
break;
|
|
4080
|
-
}
|
|
4081
|
-
}
|
|
4082
|
-
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
4083
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
4084
|
-
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
4085
|
-
},
|
|
4086
|
-
complete: function complete(record, afterLoc) {
|
|
4087
|
-
if ("throw" === record.type) throw record.arg;
|
|
4088
|
-
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
|
4089
|
-
},
|
|
4090
|
-
finish: function finish(finallyLoc) {
|
|
4091
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
4092
|
-
var entry = this.tryEntries[i];
|
|
4093
|
-
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
4094
|
-
}
|
|
4095
|
-
},
|
|
4096
|
-
"catch": function _catch(tryLoc) {
|
|
4097
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
4098
|
-
var entry = this.tryEntries[i];
|
|
4099
|
-
if (entry.tryLoc === tryLoc) {
|
|
4100
|
-
var record = entry.completion;
|
|
4101
|
-
if ("throw" === record.type) {
|
|
4102
|
-
var thrown = record.arg;
|
|
4103
|
-
resetTryEntry(entry);
|
|
4104
|
-
}
|
|
4105
|
-
return thrown;
|
|
4106
|
-
}
|
|
4107
|
-
}
|
|
4108
|
-
throw new Error("illegal catch attempt");
|
|
4109
|
-
},
|
|
4110
|
-
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
|
|
4111
|
-
return this.delegate = {
|
|
4112
|
-
iterator: values(iterable),
|
|
4113
|
-
resultName: resultName,
|
|
4114
|
-
nextLoc: nextLoc
|
|
4115
|
-
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
4116
|
-
}
|
|
4117
|
-
}, exports;
|
|
4118
|
-
}
|
|
4119
|
-
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4120
|
-
} (regeneratorRuntime$1));
|
|
4121
|
-
|
|
4122
|
-
// TODO(Babel 8): Remove this file.
|
|
4123
|
-
|
|
4124
|
-
var runtime = regeneratorRuntime$1.exports();
|
|
4125
|
-
var regenerator = runtime;
|
|
4126
|
-
|
|
4127
|
-
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
|
|
4128
|
-
try {
|
|
4129
|
-
regeneratorRuntime = runtime;
|
|
4130
|
-
} catch (accidentalStrictMode) {
|
|
4131
|
-
if (typeof globalThis === "object") {
|
|
4132
|
-
globalThis.regeneratorRuntime = runtime;
|
|
4133
|
-
} else {
|
|
4134
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
4135
|
-
}
|
|
4136
|
-
}
|
|
4137
|
-
|
|
4138
|
-
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
4139
|
-
var shams = function hasSymbols() {
|
|
4140
|
-
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
4141
|
-
if (typeof Symbol.iterator === 'symbol') { return true; }
|
|
4142
|
-
|
|
4143
|
-
var obj = {};
|
|
4144
|
-
var sym = Symbol('test');
|
|
4145
|
-
var symObj = Object(sym);
|
|
4146
|
-
if (typeof sym === 'string') { return false; }
|
|
4147
|
-
|
|
4148
|
-
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
|
4149
|
-
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
|
4150
|
-
|
|
4151
|
-
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
|
4152
|
-
// if (sym instanceof Symbol) { return false; }
|
|
4153
|
-
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
|
4154
|
-
// if (!(symObj instanceof Symbol)) { return false; }
|
|
4155
|
-
|
|
4156
|
-
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
|
4157
|
-
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
|
4158
|
-
|
|
4159
|
-
var symVal = 42;
|
|
4160
|
-
obj[sym] = symVal;
|
|
4161
|
-
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
4162
|
-
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
|
4163
|
-
|
|
4164
|
-
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
|
4165
|
-
|
|
4166
|
-
var syms = Object.getOwnPropertySymbols(obj);
|
|
4167
|
-
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
|
4168
|
-
|
|
4169
|
-
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
|
4170
|
-
|
|
4171
|
-
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
|
4172
|
-
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
|
4173
|
-
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
|
4174
|
-
}
|
|
4175
|
-
|
|
4176
|
-
return true;
|
|
4177
|
-
};
|
|
4178
|
-
|
|
4179
|
-
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
4180
|
-
var hasSymbolSham = shams;
|
|
4181
|
-
|
|
4182
|
-
var hasSymbols$1 = function hasNativeSymbols() {
|
|
4183
|
-
if (typeof origSymbol !== 'function') { return false; }
|
|
4184
|
-
if (typeof Symbol !== 'function') { return false; }
|
|
4185
|
-
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
4186
|
-
if (typeof Symbol('bar') !== 'symbol') { return false; }
|
|
4187
|
-
|
|
4188
|
-
return hasSymbolSham();
|
|
4189
|
-
};
|
|
4190
|
-
|
|
4191
|
-
/* eslint no-invalid-this: 1 */
|
|
4192
|
-
|
|
4193
|
-
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
|
4194
|
-
var slice = Array.prototype.slice;
|
|
4195
|
-
var toStr$1 = Object.prototype.toString;
|
|
4196
|
-
var funcType = '[object Function]';
|
|
4197
|
-
|
|
4198
|
-
var implementation$1 = function bind(that) {
|
|
4199
|
-
var target = this;
|
|
4200
|
-
if (typeof target !== 'function' || toStr$1.call(target) !== funcType) {
|
|
4201
|
-
throw new TypeError(ERROR_MESSAGE + target);
|
|
4202
|
-
}
|
|
4203
|
-
var args = slice.call(arguments, 1);
|
|
4204
|
-
|
|
4205
|
-
var bound;
|
|
4206
|
-
var binder = function () {
|
|
4207
|
-
if (this instanceof bound) {
|
|
4208
|
-
var result = target.apply(
|
|
4209
|
-
this,
|
|
4210
|
-
args.concat(slice.call(arguments))
|
|
4211
|
-
);
|
|
4212
|
-
if (Object(result) === result) {
|
|
4213
|
-
return result;
|
|
4214
|
-
}
|
|
4215
|
-
return this;
|
|
4216
|
-
} else {
|
|
4217
|
-
return target.apply(
|
|
4218
|
-
that,
|
|
4219
|
-
args.concat(slice.call(arguments))
|
|
4220
|
-
);
|
|
4221
|
-
}
|
|
4222
|
-
};
|
|
4223
|
-
|
|
4224
|
-
var boundLength = Math.max(0, target.length - args.length);
|
|
4225
|
-
var boundArgs = [];
|
|
4226
|
-
for (var i = 0; i < boundLength; i++) {
|
|
4227
|
-
boundArgs.push('$' + i);
|
|
4228
|
-
}
|
|
4229
|
-
|
|
4230
|
-
bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
|
|
4231
|
-
|
|
4232
|
-
if (target.prototype) {
|
|
4233
|
-
var Empty = function Empty() {};
|
|
4234
|
-
Empty.prototype = target.prototype;
|
|
4235
|
-
bound.prototype = new Empty();
|
|
4236
|
-
Empty.prototype = null;
|
|
4237
|
-
}
|
|
4238
|
-
|
|
4239
|
-
return bound;
|
|
4240
|
-
};
|
|
4241
|
-
|
|
4242
|
-
var implementation = implementation$1;
|
|
4243
|
-
|
|
4244
|
-
var functionBind = Function.prototype.bind || implementation;
|
|
4245
|
-
|
|
4246
|
-
var bind$1 = functionBind;
|
|
4247
|
-
|
|
4248
|
-
var src = bind$1.call(Function.call, Object.prototype.hasOwnProperty);
|
|
4249
|
-
|
|
4250
|
-
var undefined$1;
|
|
4251
|
-
|
|
4252
|
-
var $SyntaxError = SyntaxError;
|
|
4253
|
-
var $Function = Function;
|
|
4254
|
-
var $TypeError$1 = TypeError;
|
|
4255
|
-
|
|
4256
|
-
// eslint-disable-next-line consistent-return
|
|
4257
|
-
var getEvalledConstructor = function (expressionSyntax) {
|
|
4258
|
-
try {
|
|
4259
|
-
return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
|
|
4260
|
-
} catch (e) {}
|
|
4261
|
-
};
|
|
4262
|
-
|
|
4263
|
-
var $gOPD = Object.getOwnPropertyDescriptor;
|
|
4264
|
-
if ($gOPD) {
|
|
4265
|
-
try {
|
|
4266
|
-
$gOPD({}, '');
|
|
4267
|
-
} catch (e) {
|
|
4268
|
-
$gOPD = null; // this is IE 8, which has a broken gOPD
|
|
4269
|
-
}
|
|
4270
|
-
}
|
|
4271
|
-
|
|
4272
|
-
var throwTypeError = function () {
|
|
4273
|
-
throw new $TypeError$1();
|
|
4274
|
-
};
|
|
4275
|
-
var ThrowTypeError = $gOPD
|
|
4276
|
-
? (function () {
|
|
4277
|
-
try {
|
|
4278
|
-
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
|
|
4279
|
-
arguments.callee; // IE 8 does not throw here
|
|
4280
|
-
return throwTypeError;
|
|
4281
|
-
} catch (calleeThrows) {
|
|
4282
|
-
try {
|
|
4283
|
-
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
|
|
4284
|
-
return $gOPD(arguments, 'callee').get;
|
|
4285
|
-
} catch (gOPDthrows) {
|
|
4286
|
-
return throwTypeError;
|
|
4287
|
-
}
|
|
4288
|
-
}
|
|
4289
|
-
}())
|
|
4290
|
-
: throwTypeError;
|
|
4291
|
-
|
|
4292
|
-
var hasSymbols = hasSymbols$1();
|
|
4293
|
-
|
|
4294
|
-
var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
|
|
4295
|
-
|
|
4296
|
-
var needsEval = {};
|
|
4297
|
-
|
|
4298
|
-
var TypedArray = typeof Uint8Array === 'undefined' ? undefined$1 : getProto(Uint8Array);
|
|
4299
|
-
|
|
4300
|
-
var INTRINSICS = {
|
|
4301
|
-
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
|
|
4302
|
-
'%Array%': Array,
|
|
4303
|
-
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
|
|
4304
|
-
'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined$1,
|
|
4305
|
-
'%AsyncFromSyncIteratorPrototype%': undefined$1,
|
|
4306
|
-
'%AsyncFunction%': needsEval,
|
|
4307
|
-
'%AsyncGenerator%': needsEval,
|
|
4308
|
-
'%AsyncGeneratorFunction%': needsEval,
|
|
4309
|
-
'%AsyncIteratorPrototype%': needsEval,
|
|
4310
|
-
'%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
|
|
4311
|
-
'%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
|
|
4312
|
-
'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
|
|
4313
|
-
'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
|
|
4314
|
-
'%Boolean%': Boolean,
|
|
4315
|
-
'%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
|
|
4316
|
-
'%Date%': Date,
|
|
4317
|
-
'%decodeURI%': decodeURI,
|
|
4318
|
-
'%decodeURIComponent%': decodeURIComponent,
|
|
4319
|
-
'%encodeURI%': encodeURI,
|
|
4320
|
-
'%encodeURIComponent%': encodeURIComponent,
|
|
4321
|
-
'%Error%': Error,
|
|
4322
|
-
'%eval%': eval, // eslint-disable-line no-eval
|
|
4323
|
-
'%EvalError%': EvalError,
|
|
4324
|
-
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
|
|
4325
|
-
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
|
|
4326
|
-
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
|
|
4327
|
-
'%Function%': $Function,
|
|
4328
|
-
'%GeneratorFunction%': needsEval,
|
|
4329
|
-
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
|
|
4330
|
-
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
|
|
4331
|
-
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
|
|
4332
|
-
'%isFinite%': isFinite,
|
|
4333
|
-
'%isNaN%': isNaN,
|
|
4334
|
-
'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
|
|
4335
|
-
'%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
|
|
4336
|
-
'%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
|
|
4337
|
-
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
|
|
4338
|
-
'%Math%': Math,
|
|
4339
|
-
'%Number%': Number,
|
|
4340
|
-
'%Object%': Object,
|
|
4341
|
-
'%parseFloat%': parseFloat,
|
|
4342
|
-
'%parseInt%': parseInt,
|
|
4343
|
-
'%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
|
|
4344
|
-
'%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
|
|
4345
|
-
'%RangeError%': RangeError,
|
|
4346
|
-
'%ReferenceError%': ReferenceError,
|
|
4347
|
-
'%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
|
|
4348
|
-
'%RegExp%': RegExp,
|
|
4349
|
-
'%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
|
|
4350
|
-
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
|
|
4351
|
-
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
|
|
4352
|
-
'%String%': String,
|
|
4353
|
-
'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined$1,
|
|
4354
|
-
'%Symbol%': hasSymbols ? Symbol : undefined$1,
|
|
4355
|
-
'%SyntaxError%': $SyntaxError,
|
|
4356
|
-
'%ThrowTypeError%': ThrowTypeError,
|
|
4357
|
-
'%TypedArray%': TypedArray,
|
|
4358
|
-
'%TypeError%': $TypeError$1,
|
|
4359
|
-
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
|
|
4360
|
-
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
|
|
4361
|
-
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
|
|
4362
|
-
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
|
|
4363
|
-
'%URIError%': URIError,
|
|
4364
|
-
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
|
|
4365
|
-
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
|
|
4366
|
-
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
|
|
4367
|
-
};
|
|
4368
|
-
|
|
4369
|
-
try {
|
|
4370
|
-
null.error; // eslint-disable-line no-unused-expressions
|
|
4371
|
-
} catch (e) {
|
|
4372
|
-
// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
|
|
4373
|
-
var errorProto = getProto(getProto(e));
|
|
4374
|
-
INTRINSICS['%Error.prototype%'] = errorProto;
|
|
4375
|
-
}
|
|
4376
|
-
|
|
4377
|
-
var doEval = function doEval(name) {
|
|
4378
|
-
var value;
|
|
4379
|
-
if (name === '%AsyncFunction%') {
|
|
4380
|
-
value = getEvalledConstructor('async function () {}');
|
|
4381
|
-
} else if (name === '%GeneratorFunction%') {
|
|
4382
|
-
value = getEvalledConstructor('function* () {}');
|
|
4383
|
-
} else if (name === '%AsyncGeneratorFunction%') {
|
|
4384
|
-
value = getEvalledConstructor('async function* () {}');
|
|
4385
|
-
} else if (name === '%AsyncGenerator%') {
|
|
4386
|
-
var fn = doEval('%AsyncGeneratorFunction%');
|
|
4387
|
-
if (fn) {
|
|
4388
|
-
value = fn.prototype;
|
|
4389
|
-
}
|
|
4390
|
-
} else if (name === '%AsyncIteratorPrototype%') {
|
|
4391
|
-
var gen = doEval('%AsyncGenerator%');
|
|
4392
|
-
if (gen) {
|
|
4393
|
-
value = getProto(gen.prototype);
|
|
4394
|
-
}
|
|
4395
|
-
}
|
|
4396
|
-
|
|
4397
|
-
INTRINSICS[name] = value;
|
|
4398
|
-
|
|
4399
|
-
return value;
|
|
4400
|
-
};
|
|
4401
|
-
|
|
4402
|
-
var LEGACY_ALIASES = {
|
|
4403
|
-
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
|
4404
|
-
'%ArrayPrototype%': ['Array', 'prototype'],
|
|
4405
|
-
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
|
4406
|
-
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
|
|
4407
|
-
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
|
|
4408
|
-
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
|
|
4409
|
-
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
|
|
4410
|
-
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
|
4411
|
-
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
|
4412
|
-
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
|
4413
|
-
'%DataViewPrototype%': ['DataView', 'prototype'],
|
|
4414
|
-
'%DatePrototype%': ['Date', 'prototype'],
|
|
4415
|
-
'%ErrorPrototype%': ['Error', 'prototype'],
|
|
4416
|
-
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
|
4417
|
-
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
|
4418
|
-
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
|
4419
|
-
'%FunctionPrototype%': ['Function', 'prototype'],
|
|
4420
|
-
'%Generator%': ['GeneratorFunction', 'prototype'],
|
|
4421
|
-
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
|
4422
|
-
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
|
4423
|
-
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
|
4424
|
-
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
|
4425
|
-
'%JSONParse%': ['JSON', 'parse'],
|
|
4426
|
-
'%JSONStringify%': ['JSON', 'stringify'],
|
|
4427
|
-
'%MapPrototype%': ['Map', 'prototype'],
|
|
4428
|
-
'%NumberPrototype%': ['Number', 'prototype'],
|
|
4429
|
-
'%ObjectPrototype%': ['Object', 'prototype'],
|
|
4430
|
-
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
|
4431
|
-
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
|
4432
|
-
'%PromisePrototype%': ['Promise', 'prototype'],
|
|
4433
|
-
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
|
4434
|
-
'%Promise_all%': ['Promise', 'all'],
|
|
4435
|
-
'%Promise_reject%': ['Promise', 'reject'],
|
|
4436
|
-
'%Promise_resolve%': ['Promise', 'resolve'],
|
|
4437
|
-
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
|
4438
|
-
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
|
4439
|
-
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
|
4440
|
-
'%SetPrototype%': ['Set', 'prototype'],
|
|
4441
|
-
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
|
4442
|
-
'%StringPrototype%': ['String', 'prototype'],
|
|
4443
|
-
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
|
4444
|
-
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
|
4445
|
-
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
|
4446
|
-
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
|
4447
|
-
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
|
4448
|
-
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
|
4449
|
-
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
|
4450
|
-
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
|
4451
|
-
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
|
4452
|
-
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
|
4453
|
-
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
4454
|
-
};
|
|
4455
|
-
|
|
4456
|
-
var bind = functionBind;
|
|
4457
|
-
var hasOwn$1 = src;
|
|
4458
|
-
var $concat$1 = bind.call(Function.call, Array.prototype.concat);
|
|
4459
|
-
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
|
|
4460
|
-
var $replace$1 = bind.call(Function.call, String.prototype.replace);
|
|
4461
|
-
var $strSlice = bind.call(Function.call, String.prototype.slice);
|
|
4462
|
-
var $exec = bind.call(Function.call, RegExp.prototype.exec);
|
|
4463
|
-
|
|
4464
|
-
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
4465
|
-
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
4466
|
-
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
|
4467
|
-
var stringToPath = function stringToPath(string) {
|
|
4468
|
-
var first = $strSlice(string, 0, 1);
|
|
4469
|
-
var last = $strSlice(string, -1);
|
|
4470
|
-
if (first === '%' && last !== '%') {
|
|
4471
|
-
throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
|
|
4472
|
-
} else if (last === '%' && first !== '%') {
|
|
4473
|
-
throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
|
|
4474
|
-
}
|
|
4475
|
-
var result = [];
|
|
4476
|
-
$replace$1(string, rePropName, function (match, number, quote, subString) {
|
|
4477
|
-
result[result.length] = quote ? $replace$1(subString, reEscapeChar, '$1') : number || match;
|
|
4478
|
-
});
|
|
4479
|
-
return result;
|
|
4480
|
-
};
|
|
4481
|
-
/* end adaptation */
|
|
4482
|
-
|
|
4483
|
-
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
|
4484
|
-
var intrinsicName = name;
|
|
4485
|
-
var alias;
|
|
4486
|
-
if (hasOwn$1(LEGACY_ALIASES, intrinsicName)) {
|
|
4487
|
-
alias = LEGACY_ALIASES[intrinsicName];
|
|
4488
|
-
intrinsicName = '%' + alias[0] + '%';
|
|
4489
|
-
}
|
|
4490
|
-
|
|
4491
|
-
if (hasOwn$1(INTRINSICS, intrinsicName)) {
|
|
4492
|
-
var value = INTRINSICS[intrinsicName];
|
|
4493
|
-
if (value === needsEval) {
|
|
4494
|
-
value = doEval(intrinsicName);
|
|
4495
|
-
}
|
|
4496
|
-
if (typeof value === 'undefined' && !allowMissing) {
|
|
4497
|
-
throw new $TypeError$1('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
4498
|
-
}
|
|
4499
|
-
|
|
4500
|
-
return {
|
|
4501
|
-
alias: alias,
|
|
4502
|
-
name: intrinsicName,
|
|
4503
|
-
value: value
|
|
4504
|
-
};
|
|
4505
|
-
}
|
|
4506
|
-
|
|
4507
|
-
throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
|
|
4508
|
-
};
|
|
4509
|
-
|
|
4510
|
-
var getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
4511
|
-
if (typeof name !== 'string' || name.length === 0) {
|
|
4512
|
-
throw new $TypeError$1('intrinsic name must be a non-empty string');
|
|
4513
|
-
}
|
|
4514
|
-
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
4515
|
-
throw new $TypeError$1('"allowMissing" argument must be a boolean');
|
|
4516
|
-
}
|
|
4517
|
-
|
|
4518
|
-
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
4519
|
-
throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
|
4520
|
-
}
|
|
4521
|
-
var parts = stringToPath(name);
|
|
4522
|
-
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
4523
|
-
|
|
4524
|
-
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
|
|
4525
|
-
var intrinsicRealName = intrinsic.name;
|
|
4526
|
-
var value = intrinsic.value;
|
|
4527
|
-
var skipFurtherCaching = false;
|
|
4528
|
-
|
|
4529
|
-
var alias = intrinsic.alias;
|
|
4530
|
-
if (alias) {
|
|
4531
|
-
intrinsicBaseName = alias[0];
|
|
4532
|
-
$spliceApply(parts, $concat$1([0, 1], alias));
|
|
4533
|
-
}
|
|
4534
|
-
|
|
4535
|
-
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
4536
|
-
var part = parts[i];
|
|
4537
|
-
var first = $strSlice(part, 0, 1);
|
|
4538
|
-
var last = $strSlice(part, -1);
|
|
4539
|
-
if (
|
|
4540
|
-
(
|
|
4541
|
-
(first === '"' || first === "'" || first === '`')
|
|
4542
|
-
|| (last === '"' || last === "'" || last === '`')
|
|
4543
|
-
)
|
|
4544
|
-
&& first !== last
|
|
4545
|
-
) {
|
|
4546
|
-
throw new $SyntaxError('property names with quotes must have matching quotes');
|
|
4547
|
-
}
|
|
4548
|
-
if (part === 'constructor' || !isOwn) {
|
|
4549
|
-
skipFurtherCaching = true;
|
|
4550
|
-
}
|
|
4551
|
-
|
|
4552
|
-
intrinsicBaseName += '.' + part;
|
|
4553
|
-
intrinsicRealName = '%' + intrinsicBaseName + '%';
|
|
4554
|
-
|
|
4555
|
-
if (hasOwn$1(INTRINSICS, intrinsicRealName)) {
|
|
4556
|
-
value = INTRINSICS[intrinsicRealName];
|
|
4557
|
-
} else if (value != null) {
|
|
4558
|
-
if (!(part in value)) {
|
|
4559
|
-
if (!allowMissing) {
|
|
4560
|
-
throw new $TypeError$1('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
4561
|
-
}
|
|
4562
|
-
return void undefined$1;
|
|
4563
|
-
}
|
|
4564
|
-
if ($gOPD && (i + 1) >= parts.length) {
|
|
4565
|
-
var desc = $gOPD(value, part);
|
|
4566
|
-
isOwn = !!desc;
|
|
4567
|
-
|
|
4568
|
-
// By convention, when a data property is converted to an accessor
|
|
4569
|
-
// property to emulate a data property that does not suffer from
|
|
4570
|
-
// the override mistake, that accessor's getter is marked with
|
|
4571
|
-
// an `originalValue` property. Here, when we detect this, we
|
|
4572
|
-
// uphold the illusion by pretending to see that original data
|
|
4573
|
-
// property, i.e., returning the value rather than the getter
|
|
4574
|
-
// itself.
|
|
4575
|
-
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
|
4576
|
-
value = desc.get;
|
|
4577
|
-
} else {
|
|
4578
|
-
value = value[part];
|
|
4579
|
-
}
|
|
4580
|
-
} else {
|
|
4581
|
-
isOwn = hasOwn$1(value, part);
|
|
4582
|
-
value = value[part];
|
|
4583
|
-
}
|
|
4584
|
-
|
|
4585
|
-
if (isOwn && !skipFurtherCaching) {
|
|
4586
|
-
INTRINSICS[intrinsicRealName] = value;
|
|
4587
|
-
}
|
|
4588
|
-
}
|
|
4589
|
-
}
|
|
4590
|
-
return value;
|
|
4591
|
-
};
|
|
4592
|
-
|
|
4593
|
-
var callBind$1 = {exports: {}};
|
|
4594
|
-
|
|
4595
|
-
(function (module) {
|
|
4596
|
-
|
|
4597
|
-
var bind = functionBind;
|
|
4598
|
-
var GetIntrinsic = getIntrinsic;
|
|
4599
|
-
|
|
4600
|
-
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
|
4601
|
-
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
4602
|
-
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
|
4603
|
-
|
|
4604
|
-
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
|
4605
|
-
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
4606
|
-
var $max = GetIntrinsic('%Math.max%');
|
|
4607
|
-
|
|
4608
|
-
if ($defineProperty) {
|
|
4609
|
-
try {
|
|
4610
|
-
$defineProperty({}, 'a', { value: 1 });
|
|
4611
|
-
} catch (e) {
|
|
4612
|
-
// IE 8 has a broken defineProperty
|
|
4613
|
-
$defineProperty = null;
|
|
4614
|
-
}
|
|
4615
|
-
}
|
|
4616
|
-
|
|
4617
|
-
module.exports = function callBind(originalFunction) {
|
|
4618
|
-
var func = $reflectApply(bind, $call, arguments);
|
|
4619
|
-
if ($gOPD && $defineProperty) {
|
|
4620
|
-
var desc = $gOPD(func, 'length');
|
|
4621
|
-
if (desc.configurable) {
|
|
4622
|
-
// original length, plus the receiver, minus any additional arguments (after the receiver)
|
|
4623
|
-
$defineProperty(
|
|
4624
|
-
func,
|
|
4625
|
-
'length',
|
|
4626
|
-
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
|
|
4627
|
-
);
|
|
4628
|
-
}
|
|
4629
|
-
}
|
|
4630
|
-
return func;
|
|
4631
|
-
};
|
|
4632
|
-
|
|
4633
|
-
var applyBind = function applyBind() {
|
|
4634
|
-
return $reflectApply(bind, $apply, arguments);
|
|
4635
|
-
};
|
|
4636
|
-
|
|
4637
|
-
if ($defineProperty) {
|
|
4638
|
-
$defineProperty(module.exports, 'apply', { value: applyBind });
|
|
4639
|
-
} else {
|
|
4640
|
-
module.exports.apply = applyBind;
|
|
4641
|
-
}
|
|
4642
|
-
} (callBind$1));
|
|
4643
|
-
|
|
4644
|
-
var GetIntrinsic$1 = getIntrinsic;
|
|
4645
|
-
|
|
4646
|
-
var callBind = callBind$1.exports;
|
|
4647
|
-
|
|
4648
|
-
var $indexOf = callBind(GetIntrinsic$1('String.prototype.indexOf'));
|
|
4649
|
-
|
|
4650
|
-
var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
|
|
4651
|
-
var intrinsic = GetIntrinsic$1(name, !!allowMissing);
|
|
4652
|
-
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
|
4653
|
-
return callBind(intrinsic);
|
|
4654
|
-
}
|
|
4655
|
-
return intrinsic;
|
|
4656
|
-
};
|
|
4657
|
-
|
|
4658
|
-
var util_inspect = require$$0__default["default"].inspect;
|
|
4659
|
-
|
|
4660
|
-
var hasMap = typeof Map === 'function' && Map.prototype;
|
|
4661
|
-
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
|
|
4662
|
-
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
|
|
4663
|
-
var mapForEach = hasMap && Map.prototype.forEach;
|
|
4664
|
-
var hasSet = typeof Set === 'function' && Set.prototype;
|
|
4665
|
-
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
|
|
4666
|
-
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
|
|
4667
|
-
var setForEach = hasSet && Set.prototype.forEach;
|
|
4668
|
-
var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
|
|
4669
|
-
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
|
|
4670
|
-
var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
|
|
4671
|
-
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
|
|
4672
|
-
var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
|
|
4673
|
-
var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
|
|
4674
|
-
var booleanValueOf = Boolean.prototype.valueOf;
|
|
4675
|
-
var objectToString = Object.prototype.toString;
|
|
4676
|
-
var functionToString = Function.prototype.toString;
|
|
4677
|
-
var $match = String.prototype.match;
|
|
4678
|
-
var $slice = String.prototype.slice;
|
|
4679
|
-
var $replace = String.prototype.replace;
|
|
4680
|
-
var $toUpperCase = String.prototype.toUpperCase;
|
|
4681
|
-
var $toLowerCase = String.prototype.toLowerCase;
|
|
4682
|
-
var $test = RegExp.prototype.test;
|
|
4683
|
-
var $concat = Array.prototype.concat;
|
|
4684
|
-
var $join = Array.prototype.join;
|
|
4685
|
-
var $arrSlice = Array.prototype.slice;
|
|
4686
|
-
var $floor = Math.floor;
|
|
4687
|
-
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
|
|
4688
|
-
var gOPS = Object.getOwnPropertySymbols;
|
|
4689
|
-
var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
|
|
4690
|
-
var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
|
|
4691
|
-
// ie, `has-tostringtag/shams
|
|
4692
|
-
var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
|
|
4693
|
-
? Symbol.toStringTag
|
|
4694
|
-
: null;
|
|
4695
|
-
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
4696
|
-
|
|
4697
|
-
var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
|
|
4698
|
-
[].__proto__ === Array.prototype // eslint-disable-line no-proto
|
|
4699
|
-
? function (O) {
|
|
4700
|
-
return O.__proto__; // eslint-disable-line no-proto
|
|
4701
|
-
}
|
|
4702
|
-
: null
|
|
4703
|
-
);
|
|
4704
|
-
|
|
4705
|
-
function addNumericSeparator(num, str) {
|
|
4706
|
-
if (
|
|
4707
|
-
num === Infinity
|
|
4708
|
-
|| num === -Infinity
|
|
4709
|
-
|| num !== num
|
|
4710
|
-
|| (num && num > -1000 && num < 1000)
|
|
4711
|
-
|| $test.call(/e/, str)
|
|
4712
|
-
) {
|
|
4713
|
-
return str;
|
|
4714
|
-
}
|
|
4715
|
-
var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
4716
|
-
if (typeof num === 'number') {
|
|
4717
|
-
var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
|
|
4718
|
-
if (int !== num) {
|
|
4719
|
-
var intStr = String(int);
|
|
4720
|
-
var dec = $slice.call(str, intStr.length + 1);
|
|
4721
|
-
return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
|
|
4722
|
-
}
|
|
4723
|
-
}
|
|
4724
|
-
return $replace.call(str, sepRegex, '$&_');
|
|
4725
|
-
}
|
|
4726
|
-
|
|
4727
|
-
var utilInspect = util_inspect;
|
|
4728
|
-
var inspectCustom = utilInspect.custom;
|
|
4729
|
-
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
|
4730
|
-
|
|
4731
|
-
var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
4732
|
-
var opts = options || {};
|
|
4733
|
-
|
|
4734
|
-
if (has$3(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
|
|
4735
|
-
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
4736
|
-
}
|
|
4737
|
-
if (
|
|
4738
|
-
has$3(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
|
|
4739
|
-
? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
|
|
4740
|
-
: opts.maxStringLength !== null
|
|
4741
|
-
)
|
|
4742
|
-
) {
|
|
4743
|
-
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
4744
|
-
}
|
|
4745
|
-
var customInspect = has$3(opts, 'customInspect') ? opts.customInspect : true;
|
|
4746
|
-
if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
|
|
4747
|
-
throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
|
|
4748
|
-
}
|
|
4749
|
-
|
|
4750
|
-
if (
|
|
4751
|
-
has$3(opts, 'indent')
|
|
4752
|
-
&& opts.indent !== null
|
|
4753
|
-
&& opts.indent !== '\t'
|
|
4754
|
-
&& !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
|
|
4755
|
-
) {
|
|
4756
|
-
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
4757
|
-
}
|
|
4758
|
-
if (has$3(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
|
|
4759
|
-
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
4760
|
-
}
|
|
4761
|
-
var numericSeparator = opts.numericSeparator;
|
|
4762
|
-
|
|
4763
|
-
if (typeof obj === 'undefined') {
|
|
4764
|
-
return 'undefined';
|
|
4765
|
-
}
|
|
4766
|
-
if (obj === null) {
|
|
4767
|
-
return 'null';
|
|
4768
|
-
}
|
|
4769
|
-
if (typeof obj === 'boolean') {
|
|
4770
|
-
return obj ? 'true' : 'false';
|
|
4771
|
-
}
|
|
4772
|
-
|
|
4773
|
-
if (typeof obj === 'string') {
|
|
4774
|
-
return inspectString(obj, opts);
|
|
4775
|
-
}
|
|
4776
|
-
if (typeof obj === 'number') {
|
|
4777
|
-
if (obj === 0) {
|
|
4778
|
-
return Infinity / obj > 0 ? '0' : '-0';
|
|
4779
|
-
}
|
|
4780
|
-
var str = String(obj);
|
|
4781
|
-
return numericSeparator ? addNumericSeparator(obj, str) : str;
|
|
4782
|
-
}
|
|
4783
|
-
if (typeof obj === 'bigint') {
|
|
4784
|
-
var bigIntStr = String(obj) + 'n';
|
|
4785
|
-
return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
|
|
4786
|
-
}
|
|
4787
|
-
|
|
4788
|
-
var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
|
|
4789
|
-
if (typeof depth === 'undefined') { depth = 0; }
|
|
4790
|
-
if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
|
|
4791
|
-
return isArray$3(obj) ? '[Array]' : '[Object]';
|
|
4792
|
-
}
|
|
4793
|
-
|
|
4794
|
-
var indent = getIndent(opts, depth);
|
|
4795
|
-
|
|
4796
|
-
if (typeof seen === 'undefined') {
|
|
4797
|
-
seen = [];
|
|
4798
|
-
} else if (indexOf(seen, obj) >= 0) {
|
|
4799
|
-
return '[Circular]';
|
|
4800
|
-
}
|
|
4801
|
-
|
|
4802
|
-
function inspect(value, from, noIndent) {
|
|
4803
|
-
if (from) {
|
|
4804
|
-
seen = $arrSlice.call(seen);
|
|
4805
|
-
seen.push(from);
|
|
4806
|
-
}
|
|
4807
|
-
if (noIndent) {
|
|
4808
|
-
var newOpts = {
|
|
4809
|
-
depth: opts.depth
|
|
4810
|
-
};
|
|
4811
|
-
if (has$3(opts, 'quoteStyle')) {
|
|
4812
|
-
newOpts.quoteStyle = opts.quoteStyle;
|
|
4813
|
-
}
|
|
4814
|
-
return inspect_(value, newOpts, depth + 1, seen);
|
|
4815
|
-
}
|
|
4816
|
-
return inspect_(value, opts, depth + 1, seen);
|
|
4817
|
-
}
|
|
4818
|
-
|
|
4819
|
-
if (typeof obj === 'function' && !isRegExp$1(obj)) { // in older engines, regexes are callable
|
|
4820
|
-
var name = nameOf(obj);
|
|
4821
|
-
var keys = arrObjKeys(obj, inspect);
|
|
4822
|
-
return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
|
|
4823
|
-
}
|
|
4824
|
-
if (isSymbol(obj)) {
|
|
4825
|
-
var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
|
|
4826
|
-
return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
|
|
4827
|
-
}
|
|
4828
|
-
if (isElement(obj)) {
|
|
4829
|
-
var s = '<' + $toLowerCase.call(String(obj.nodeName));
|
|
4830
|
-
var attrs = obj.attributes || [];
|
|
4831
|
-
for (var i = 0; i < attrs.length; i++) {
|
|
4832
|
-
s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
|
|
4833
|
-
}
|
|
4834
|
-
s += '>';
|
|
4835
|
-
if (obj.childNodes && obj.childNodes.length) { s += '...'; }
|
|
4836
|
-
s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
|
|
4837
|
-
return s;
|
|
4838
|
-
}
|
|
4839
|
-
if (isArray$3(obj)) {
|
|
4840
|
-
if (obj.length === 0) { return '[]'; }
|
|
4841
|
-
var xs = arrObjKeys(obj, inspect);
|
|
4842
|
-
if (indent && !singleLineValues(xs)) {
|
|
4843
|
-
return '[' + indentedJoin(xs, indent) + ']';
|
|
4844
|
-
}
|
|
4845
|
-
return '[ ' + $join.call(xs, ', ') + ' ]';
|
|
4846
|
-
}
|
|
4847
|
-
if (isError(obj)) {
|
|
4848
|
-
var parts = arrObjKeys(obj, inspect);
|
|
4849
|
-
if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
|
|
4850
|
-
return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
|
|
4851
|
-
}
|
|
4852
|
-
if (parts.length === 0) { return '[' + String(obj) + ']'; }
|
|
4853
|
-
return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
|
|
4854
|
-
}
|
|
4855
|
-
if (typeof obj === 'object' && customInspect) {
|
|
4856
|
-
if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
|
|
4857
|
-
return utilInspect(obj, { depth: maxDepth - depth });
|
|
4858
|
-
} else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
|
|
4859
|
-
return obj.inspect();
|
|
4860
|
-
}
|
|
4861
|
-
}
|
|
4862
|
-
if (isMap(obj)) {
|
|
4863
|
-
var mapParts = [];
|
|
4864
|
-
if (mapForEach) {
|
|
4865
|
-
mapForEach.call(obj, function (value, key) {
|
|
4866
|
-
mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
|
|
4867
|
-
});
|
|
4868
|
-
}
|
|
4869
|
-
return collectionOf('Map', mapSize.call(obj), mapParts, indent);
|
|
4870
|
-
}
|
|
4871
|
-
if (isSet(obj)) {
|
|
4872
|
-
var setParts = [];
|
|
4873
|
-
if (setForEach) {
|
|
4874
|
-
setForEach.call(obj, function (value) {
|
|
4875
|
-
setParts.push(inspect(value, obj));
|
|
4876
|
-
});
|
|
4877
|
-
}
|
|
4878
|
-
return collectionOf('Set', setSize.call(obj), setParts, indent);
|
|
4879
|
-
}
|
|
4880
|
-
if (isWeakMap(obj)) {
|
|
4881
|
-
return weakCollectionOf('WeakMap');
|
|
4882
|
-
}
|
|
4883
|
-
if (isWeakSet(obj)) {
|
|
4884
|
-
return weakCollectionOf('WeakSet');
|
|
4885
|
-
}
|
|
4886
|
-
if (isWeakRef(obj)) {
|
|
4887
|
-
return weakCollectionOf('WeakRef');
|
|
4888
|
-
}
|
|
4889
|
-
if (isNumber(obj)) {
|
|
4890
|
-
return markBoxed(inspect(Number(obj)));
|
|
4891
|
-
}
|
|
4892
|
-
if (isBigInt(obj)) {
|
|
4893
|
-
return markBoxed(inspect(bigIntValueOf.call(obj)));
|
|
4894
|
-
}
|
|
4895
|
-
if (isBoolean(obj)) {
|
|
4896
|
-
return markBoxed(booleanValueOf.call(obj));
|
|
4897
|
-
}
|
|
4898
|
-
if (isString(obj)) {
|
|
4899
|
-
return markBoxed(inspect(String(obj)));
|
|
4900
|
-
}
|
|
4901
|
-
if (!isDate(obj) && !isRegExp$1(obj)) {
|
|
4902
|
-
var ys = arrObjKeys(obj, inspect);
|
|
4903
|
-
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
4904
|
-
var protoTag = obj instanceof Object ? '' : 'null prototype';
|
|
4905
|
-
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
|
|
4906
|
-
var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
|
|
4907
|
-
var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
|
|
4908
|
-
if (ys.length === 0) { return tag + '{}'; }
|
|
4909
|
-
if (indent) {
|
|
4910
|
-
return tag + '{' + indentedJoin(ys, indent) + '}';
|
|
4911
|
-
}
|
|
4912
|
-
return tag + '{ ' + $join.call(ys, ', ') + ' }';
|
|
4913
|
-
}
|
|
4914
|
-
return String(obj);
|
|
4915
|
-
};
|
|
4916
|
-
|
|
4917
|
-
function wrapQuotes(s, defaultStyle, opts) {
|
|
4918
|
-
var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
|
|
4919
|
-
return quoteChar + s + quoteChar;
|
|
4920
|
-
}
|
|
4921
|
-
|
|
4922
|
-
function quote(s) {
|
|
4923
|
-
return $replace.call(String(s), /"/g, '"');
|
|
4924
|
-
}
|
|
4925
|
-
|
|
4926
|
-
function isArray$3(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
4927
|
-
function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
4928
|
-
function isRegExp$1(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
4929
|
-
function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
4930
|
-
function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
4931
|
-
function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
4932
|
-
function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
4933
|
-
|
|
4934
|
-
// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
|
|
4935
|
-
function isSymbol(obj) {
|
|
4936
|
-
if (hasShammedSymbols) {
|
|
4937
|
-
return obj && typeof obj === 'object' && obj instanceof Symbol;
|
|
4938
|
-
}
|
|
4939
|
-
if (typeof obj === 'symbol') {
|
|
4940
|
-
return true;
|
|
4941
|
-
}
|
|
4942
|
-
if (!obj || typeof obj !== 'object' || !symToString) {
|
|
4943
|
-
return false;
|
|
4944
|
-
}
|
|
4945
|
-
try {
|
|
4946
|
-
symToString.call(obj);
|
|
4947
|
-
return true;
|
|
4948
|
-
} catch (e) {}
|
|
4949
|
-
return false;
|
|
4950
|
-
}
|
|
4951
|
-
|
|
4952
|
-
function isBigInt(obj) {
|
|
4953
|
-
if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
|
|
4954
|
-
return false;
|
|
4955
|
-
}
|
|
4956
|
-
try {
|
|
4957
|
-
bigIntValueOf.call(obj);
|
|
4958
|
-
return true;
|
|
4959
|
-
} catch (e) {}
|
|
4960
|
-
return false;
|
|
4961
|
-
}
|
|
4962
|
-
|
|
4963
|
-
var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
|
|
4964
|
-
function has$3(obj, key) {
|
|
4965
|
-
return hasOwn.call(obj, key);
|
|
4966
|
-
}
|
|
4967
|
-
|
|
4968
|
-
function toStr(obj) {
|
|
4969
|
-
return objectToString.call(obj);
|
|
4970
|
-
}
|
|
4971
|
-
|
|
4972
|
-
function nameOf(f) {
|
|
4973
|
-
if (f.name) { return f.name; }
|
|
4974
|
-
var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
|
|
4975
|
-
if (m) { return m[1]; }
|
|
4976
|
-
return null;
|
|
4977
|
-
}
|
|
4978
|
-
|
|
4979
|
-
function indexOf(xs, x) {
|
|
4980
|
-
if (xs.indexOf) { return xs.indexOf(x); }
|
|
4981
|
-
for (var i = 0, l = xs.length; i < l; i++) {
|
|
4982
|
-
if (xs[i] === x) { return i; }
|
|
4983
|
-
}
|
|
4984
|
-
return -1;
|
|
4985
|
-
}
|
|
4986
|
-
|
|
4987
|
-
function isMap(x) {
|
|
4988
|
-
if (!mapSize || !x || typeof x !== 'object') {
|
|
4989
|
-
return false;
|
|
4990
|
-
}
|
|
4991
|
-
try {
|
|
4992
|
-
mapSize.call(x);
|
|
4993
|
-
try {
|
|
4994
|
-
setSize.call(x);
|
|
4995
|
-
} catch (s) {
|
|
4996
|
-
return true;
|
|
4997
|
-
}
|
|
4998
|
-
return x instanceof Map; // core-js workaround, pre-v2.5.0
|
|
4999
|
-
} catch (e) {}
|
|
5000
|
-
return false;
|
|
5001
|
-
}
|
|
5002
|
-
|
|
5003
|
-
function isWeakMap(x) {
|
|
5004
|
-
if (!weakMapHas || !x || typeof x !== 'object') {
|
|
5005
|
-
return false;
|
|
5006
|
-
}
|
|
5007
|
-
try {
|
|
5008
|
-
weakMapHas.call(x, weakMapHas);
|
|
5009
|
-
try {
|
|
5010
|
-
weakSetHas.call(x, weakSetHas);
|
|
5011
|
-
} catch (s) {
|
|
5012
|
-
return true;
|
|
5013
|
-
}
|
|
5014
|
-
return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
|
|
5015
|
-
} catch (e) {}
|
|
5016
|
-
return false;
|
|
5017
|
-
}
|
|
5018
|
-
|
|
5019
|
-
function isWeakRef(x) {
|
|
5020
|
-
if (!weakRefDeref || !x || typeof x !== 'object') {
|
|
5021
|
-
return false;
|
|
5022
|
-
}
|
|
5023
|
-
try {
|
|
5024
|
-
weakRefDeref.call(x);
|
|
5025
|
-
return true;
|
|
5026
|
-
} catch (e) {}
|
|
5027
|
-
return false;
|
|
5028
|
-
}
|
|
5029
|
-
|
|
5030
|
-
function isSet(x) {
|
|
5031
|
-
if (!setSize || !x || typeof x !== 'object') {
|
|
5032
|
-
return false;
|
|
5033
|
-
}
|
|
5034
|
-
try {
|
|
5035
|
-
setSize.call(x);
|
|
5036
|
-
try {
|
|
5037
|
-
mapSize.call(x);
|
|
5038
|
-
} catch (m) {
|
|
5039
|
-
return true;
|
|
5040
|
-
}
|
|
5041
|
-
return x instanceof Set; // core-js workaround, pre-v2.5.0
|
|
5042
|
-
} catch (e) {}
|
|
5043
|
-
return false;
|
|
5044
|
-
}
|
|
5045
|
-
|
|
5046
|
-
function isWeakSet(x) {
|
|
5047
|
-
if (!weakSetHas || !x || typeof x !== 'object') {
|
|
5048
|
-
return false;
|
|
5049
|
-
}
|
|
5050
|
-
try {
|
|
5051
|
-
weakSetHas.call(x, weakSetHas);
|
|
5052
|
-
try {
|
|
5053
|
-
weakMapHas.call(x, weakMapHas);
|
|
5054
|
-
} catch (s) {
|
|
5055
|
-
return true;
|
|
5056
|
-
}
|
|
5057
|
-
return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
|
|
5058
|
-
} catch (e) {}
|
|
5059
|
-
return false;
|
|
5060
|
-
}
|
|
5061
|
-
|
|
5062
|
-
function isElement(x) {
|
|
5063
|
-
if (!x || typeof x !== 'object') { return false; }
|
|
5064
|
-
if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
|
|
5065
|
-
return true;
|
|
5066
|
-
}
|
|
5067
|
-
return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
|
|
5068
|
-
}
|
|
5069
|
-
|
|
5070
|
-
function inspectString(str, opts) {
|
|
5071
|
-
if (str.length > opts.maxStringLength) {
|
|
5072
|
-
var remaining = str.length - opts.maxStringLength;
|
|
5073
|
-
var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
|
|
5074
|
-
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
|
|
5075
|
-
}
|
|
5076
|
-
// eslint-disable-next-line no-control-regex
|
|
5077
|
-
var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
|
|
5078
|
-
return wrapQuotes(s, 'single', opts);
|
|
5079
|
-
}
|
|
5080
|
-
|
|
5081
|
-
function lowbyte(c) {
|
|
5082
|
-
var n = c.charCodeAt(0);
|
|
5083
|
-
var x = {
|
|
5084
|
-
8: 'b',
|
|
5085
|
-
9: 't',
|
|
5086
|
-
10: 'n',
|
|
5087
|
-
12: 'f',
|
|
5088
|
-
13: 'r'
|
|
5089
|
-
}[n];
|
|
5090
|
-
if (x) { return '\\' + x; }
|
|
5091
|
-
return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
|
|
5092
|
-
}
|
|
5093
|
-
|
|
5094
|
-
function markBoxed(str) {
|
|
5095
|
-
return 'Object(' + str + ')';
|
|
5096
|
-
}
|
|
5097
|
-
|
|
5098
|
-
function weakCollectionOf(type) {
|
|
5099
|
-
return type + ' { ? }';
|
|
5100
|
-
}
|
|
5101
|
-
|
|
5102
|
-
function collectionOf(type, size, entries, indent) {
|
|
5103
|
-
var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
|
|
5104
|
-
return type + ' (' + size + ') {' + joinedEntries + '}';
|
|
5105
|
-
}
|
|
5106
|
-
|
|
5107
|
-
function singleLineValues(xs) {
|
|
5108
|
-
for (var i = 0; i < xs.length; i++) {
|
|
5109
|
-
if (indexOf(xs[i], '\n') >= 0) {
|
|
5110
|
-
return false;
|
|
5111
|
-
}
|
|
5112
|
-
}
|
|
5113
|
-
return true;
|
|
5114
|
-
}
|
|
5115
|
-
|
|
5116
|
-
function getIndent(opts, depth) {
|
|
5117
|
-
var baseIndent;
|
|
5118
|
-
if (opts.indent === '\t') {
|
|
5119
|
-
baseIndent = '\t';
|
|
5120
|
-
} else if (typeof opts.indent === 'number' && opts.indent > 0) {
|
|
5121
|
-
baseIndent = $join.call(Array(opts.indent + 1), ' ');
|
|
5122
|
-
} else {
|
|
5123
|
-
return null;
|
|
5124
|
-
}
|
|
5125
|
-
return {
|
|
5126
|
-
base: baseIndent,
|
|
5127
|
-
prev: $join.call(Array(depth + 1), baseIndent)
|
|
5128
|
-
};
|
|
5129
|
-
}
|
|
5130
|
-
|
|
5131
|
-
function indentedJoin(xs, indent) {
|
|
5132
|
-
if (xs.length === 0) { return ''; }
|
|
5133
|
-
var lineJoiner = '\n' + indent.prev + indent.base;
|
|
5134
|
-
return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
|
|
5135
|
-
}
|
|
5136
|
-
|
|
5137
|
-
function arrObjKeys(obj, inspect) {
|
|
5138
|
-
var isArr = isArray$3(obj);
|
|
5139
|
-
var xs = [];
|
|
5140
|
-
if (isArr) {
|
|
5141
|
-
xs.length = obj.length;
|
|
5142
|
-
for (var i = 0; i < obj.length; i++) {
|
|
5143
|
-
xs[i] = has$3(obj, i) ? inspect(obj[i], obj) : '';
|
|
5144
|
-
}
|
|
5145
|
-
}
|
|
5146
|
-
var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
|
|
5147
|
-
var symMap;
|
|
5148
|
-
if (hasShammedSymbols) {
|
|
5149
|
-
symMap = {};
|
|
5150
|
-
for (var k = 0; k < syms.length; k++) {
|
|
5151
|
-
symMap['$' + syms[k]] = syms[k];
|
|
5152
|
-
}
|
|
5153
|
-
}
|
|
5154
|
-
|
|
5155
|
-
for (var key in obj) { // eslint-disable-line no-restricted-syntax
|
|
5156
|
-
if (!has$3(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
|
5157
|
-
if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
|
5158
|
-
if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
|
|
5159
|
-
// this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
|
|
5160
|
-
continue; // eslint-disable-line no-restricted-syntax, no-continue
|
|
5161
|
-
} else if ($test.call(/[^\w$]/, key)) {
|
|
5162
|
-
xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
|
|
5163
|
-
} else {
|
|
5164
|
-
xs.push(key + ': ' + inspect(obj[key], obj));
|
|
5165
|
-
}
|
|
5166
|
-
}
|
|
5167
|
-
if (typeof gOPS === 'function') {
|
|
5168
|
-
for (var j = 0; j < syms.length; j++) {
|
|
5169
|
-
if (isEnumerable.call(obj, syms[j])) {
|
|
5170
|
-
xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
|
|
5171
|
-
}
|
|
5172
|
-
}
|
|
5173
|
-
}
|
|
5174
|
-
return xs;
|
|
5175
|
-
}
|
|
5176
|
-
|
|
5177
|
-
var GetIntrinsic = getIntrinsic;
|
|
5178
|
-
var callBound = callBound$1;
|
|
5179
|
-
var inspect = objectInspect;
|
|
5180
|
-
|
|
5181
|
-
var $TypeError = GetIntrinsic('%TypeError%');
|
|
5182
|
-
var $WeakMap = GetIntrinsic('%WeakMap%', true);
|
|
5183
|
-
var $Map = GetIntrinsic('%Map%', true);
|
|
5184
|
-
|
|
5185
|
-
var $weakMapGet = callBound('WeakMap.prototype.get', true);
|
|
5186
|
-
var $weakMapSet = callBound('WeakMap.prototype.set', true);
|
|
5187
|
-
var $weakMapHas = callBound('WeakMap.prototype.has', true);
|
|
5188
|
-
var $mapGet = callBound('Map.prototype.get', true);
|
|
5189
|
-
var $mapSet = callBound('Map.prototype.set', true);
|
|
5190
|
-
var $mapHas = callBound('Map.prototype.has', true);
|
|
5191
|
-
|
|
5192
|
-
/*
|
|
5193
|
-
* This function traverses the list returning the node corresponding to the
|
|
5194
|
-
* given key.
|
|
5195
|
-
*
|
|
5196
|
-
* That node is also moved to the head of the list, so that if it's accessed
|
|
5197
|
-
* again we don't need to traverse the whole list. By doing so, all the recently
|
|
5198
|
-
* used nodes can be accessed relatively quickly.
|
|
5199
|
-
*/
|
|
5200
|
-
var listGetNode = function (list, key) { // eslint-disable-line consistent-return
|
|
5201
|
-
for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
|
|
5202
|
-
if (curr.key === key) {
|
|
5203
|
-
prev.next = curr.next;
|
|
5204
|
-
curr.next = list.next;
|
|
5205
|
-
list.next = curr; // eslint-disable-line no-param-reassign
|
|
5206
|
-
return curr;
|
|
5207
|
-
}
|
|
5208
|
-
}
|
|
5209
|
-
};
|
|
5210
|
-
|
|
5211
|
-
var listGet = function (objects, key) {
|
|
5212
|
-
var node = listGetNode(objects, key);
|
|
5213
|
-
return node && node.value;
|
|
5214
|
-
};
|
|
5215
|
-
var listSet = function (objects, key, value) {
|
|
5216
|
-
var node = listGetNode(objects, key);
|
|
5217
|
-
if (node) {
|
|
5218
|
-
node.value = value;
|
|
5219
|
-
} else {
|
|
5220
|
-
// Prepend the new node to the beginning of the list
|
|
5221
|
-
objects.next = { // eslint-disable-line no-param-reassign
|
|
5222
|
-
key: key,
|
|
5223
|
-
next: objects.next,
|
|
5224
|
-
value: value
|
|
5225
|
-
};
|
|
5226
|
-
}
|
|
5227
|
-
};
|
|
5228
|
-
var listHas = function (objects, key) {
|
|
5229
|
-
return !!listGetNode(objects, key);
|
|
5230
|
-
};
|
|
5231
|
-
|
|
5232
|
-
var sideChannel = function getSideChannel() {
|
|
5233
|
-
var $wm;
|
|
5234
|
-
var $m;
|
|
5235
|
-
var $o;
|
|
5236
|
-
var channel = {
|
|
5237
|
-
assert: function (key) {
|
|
5238
|
-
if (!channel.has(key)) {
|
|
5239
|
-
throw new $TypeError('Side channel does not contain ' + inspect(key));
|
|
5240
|
-
}
|
|
5241
|
-
},
|
|
5242
|
-
get: function (key) { // eslint-disable-line consistent-return
|
|
5243
|
-
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
5244
|
-
if ($wm) {
|
|
5245
|
-
return $weakMapGet($wm, key);
|
|
5246
|
-
}
|
|
5247
|
-
} else if ($Map) {
|
|
5248
|
-
if ($m) {
|
|
5249
|
-
return $mapGet($m, key);
|
|
5250
|
-
}
|
|
5251
|
-
} else {
|
|
5252
|
-
if ($o) { // eslint-disable-line no-lonely-if
|
|
5253
|
-
return listGet($o, key);
|
|
5254
|
-
}
|
|
5255
|
-
}
|
|
5256
|
-
},
|
|
5257
|
-
has: function (key) {
|
|
5258
|
-
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
5259
|
-
if ($wm) {
|
|
5260
|
-
return $weakMapHas($wm, key);
|
|
5261
|
-
}
|
|
5262
|
-
} else if ($Map) {
|
|
5263
|
-
if ($m) {
|
|
5264
|
-
return $mapHas($m, key);
|
|
5265
|
-
}
|
|
5266
|
-
} else {
|
|
5267
|
-
if ($o) { // eslint-disable-line no-lonely-if
|
|
5268
|
-
return listHas($o, key);
|
|
5269
|
-
}
|
|
5270
|
-
}
|
|
5271
|
-
return false;
|
|
5272
|
-
},
|
|
5273
|
-
set: function (key, value) {
|
|
5274
|
-
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
5275
|
-
if (!$wm) {
|
|
5276
|
-
$wm = new $WeakMap();
|
|
5277
|
-
}
|
|
5278
|
-
$weakMapSet($wm, key, value);
|
|
5279
|
-
} else if ($Map) {
|
|
5280
|
-
if (!$m) {
|
|
5281
|
-
$m = new $Map();
|
|
5282
|
-
}
|
|
5283
|
-
$mapSet($m, key, value);
|
|
5284
|
-
} else {
|
|
5285
|
-
if (!$o) {
|
|
5286
|
-
/*
|
|
5287
|
-
* Initialize the linked list as an empty node, so that we don't have
|
|
5288
|
-
* to special-case handling of the first node: we can always refer to
|
|
5289
|
-
* it as (previous node).next, instead of something like (list).head
|
|
5290
|
-
*/
|
|
5291
|
-
$o = { key: {}, next: null };
|
|
5292
|
-
}
|
|
5293
|
-
listSet($o, key, value);
|
|
5294
|
-
}
|
|
5295
|
-
}
|
|
5296
|
-
};
|
|
5297
|
-
return channel;
|
|
5298
|
-
};
|
|
5299
|
-
|
|
5300
|
-
var replace = String.prototype.replace;
|
|
5301
|
-
var percentTwenties = /%20/g;
|
|
5302
|
-
|
|
5303
|
-
var Format = {
|
|
5304
|
-
RFC1738: 'RFC1738',
|
|
5305
|
-
RFC3986: 'RFC3986'
|
|
5306
|
-
};
|
|
5307
|
-
|
|
5308
|
-
var formats$3 = {
|
|
5309
|
-
'default': Format.RFC3986,
|
|
5310
|
-
formatters: {
|
|
5311
|
-
RFC1738: function (value) {
|
|
5312
|
-
return replace.call(value, percentTwenties, '+');
|
|
5313
|
-
},
|
|
5314
|
-
RFC3986: function (value) {
|
|
5315
|
-
return String(value);
|
|
5316
|
-
}
|
|
5317
|
-
},
|
|
5318
|
-
RFC1738: Format.RFC1738,
|
|
5319
|
-
RFC3986: Format.RFC3986
|
|
5320
|
-
};
|
|
5321
|
-
|
|
5322
|
-
var formats$2 = formats$3;
|
|
5323
|
-
|
|
5324
|
-
var has$2 = Object.prototype.hasOwnProperty;
|
|
5325
|
-
var isArray$2 = Array.isArray;
|
|
5326
|
-
|
|
5327
|
-
var hexTable = (function () {
|
|
5328
|
-
var array = [];
|
|
5329
|
-
for (var i = 0; i < 256; ++i) {
|
|
5330
|
-
array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
|
|
5331
|
-
}
|
|
5332
|
-
|
|
5333
|
-
return array;
|
|
5334
|
-
}());
|
|
5335
|
-
|
|
5336
|
-
var compactQueue = function compactQueue(queue) {
|
|
5337
|
-
while (queue.length > 1) {
|
|
5338
|
-
var item = queue.pop();
|
|
5339
|
-
var obj = item.obj[item.prop];
|
|
5340
|
-
|
|
5341
|
-
if (isArray$2(obj)) {
|
|
5342
|
-
var compacted = [];
|
|
5343
|
-
|
|
5344
|
-
for (var j = 0; j < obj.length; ++j) {
|
|
5345
|
-
if (typeof obj[j] !== 'undefined') {
|
|
5346
|
-
compacted.push(obj[j]);
|
|
5347
|
-
}
|
|
5348
|
-
}
|
|
5349
|
-
|
|
5350
|
-
item.obj[item.prop] = compacted;
|
|
5351
|
-
}
|
|
5352
|
-
}
|
|
5353
|
-
};
|
|
5354
|
-
|
|
5355
|
-
var arrayToObject = function arrayToObject(source, options) {
|
|
5356
|
-
var obj = options && options.plainObjects ? Object.create(null) : {};
|
|
5357
|
-
for (var i = 0; i < source.length; ++i) {
|
|
5358
|
-
if (typeof source[i] !== 'undefined') {
|
|
5359
|
-
obj[i] = source[i];
|
|
5360
|
-
}
|
|
5361
|
-
}
|
|
5362
|
-
|
|
5363
|
-
return obj;
|
|
5364
|
-
};
|
|
5365
|
-
|
|
5366
|
-
var merge$2 = function merge(target, source, options) {
|
|
5367
|
-
/* eslint no-param-reassign: 0 */
|
|
5368
|
-
if (!source) {
|
|
5369
|
-
return target;
|
|
5370
|
-
}
|
|
5371
|
-
|
|
5372
|
-
if (typeof source !== 'object') {
|
|
5373
|
-
if (isArray$2(target)) {
|
|
5374
|
-
target.push(source);
|
|
5375
|
-
} else if (target && typeof target === 'object') {
|
|
5376
|
-
if ((options && (options.plainObjects || options.allowPrototypes)) || !has$2.call(Object.prototype, source)) {
|
|
5377
|
-
target[source] = true;
|
|
5378
|
-
}
|
|
5379
|
-
} else {
|
|
5380
|
-
return [target, source];
|
|
5381
|
-
}
|
|
5382
|
-
|
|
5383
|
-
return target;
|
|
5384
|
-
}
|
|
5385
|
-
|
|
5386
|
-
if (!target || typeof target !== 'object') {
|
|
5387
|
-
return [target].concat(source);
|
|
5388
|
-
}
|
|
5389
|
-
|
|
5390
|
-
var mergeTarget = target;
|
|
5391
|
-
if (isArray$2(target) && !isArray$2(source)) {
|
|
5392
|
-
mergeTarget = arrayToObject(target, options);
|
|
5393
|
-
}
|
|
5394
|
-
|
|
5395
|
-
if (isArray$2(target) && isArray$2(source)) {
|
|
5396
|
-
source.forEach(function (item, i) {
|
|
5397
|
-
if (has$2.call(target, i)) {
|
|
5398
|
-
var targetItem = target[i];
|
|
5399
|
-
if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
|
|
5400
|
-
target[i] = merge(targetItem, item, options);
|
|
5401
|
-
} else {
|
|
5402
|
-
target.push(item);
|
|
5403
|
-
}
|
|
5404
|
-
} else {
|
|
5405
|
-
target[i] = item;
|
|
5406
|
-
}
|
|
5407
|
-
});
|
|
5408
|
-
return target;
|
|
5409
|
-
}
|
|
5410
|
-
|
|
5411
|
-
return Object.keys(source).reduce(function (acc, key) {
|
|
5412
|
-
var value = source[key];
|
|
5413
|
-
|
|
5414
|
-
if (has$2.call(acc, key)) {
|
|
5415
|
-
acc[key] = merge(acc[key], value, options);
|
|
5416
|
-
} else {
|
|
5417
|
-
acc[key] = value;
|
|
5418
|
-
}
|
|
5419
|
-
return acc;
|
|
5420
|
-
}, mergeTarget);
|
|
5421
|
-
};
|
|
5422
|
-
|
|
5423
|
-
var assign = function assignSingleSource(target, source) {
|
|
5424
|
-
return Object.keys(source).reduce(function (acc, key) {
|
|
5425
|
-
acc[key] = source[key];
|
|
5426
|
-
return acc;
|
|
5427
|
-
}, target);
|
|
5428
|
-
};
|
|
5429
|
-
|
|
5430
|
-
var decode$1 = function (str, decoder, charset) {
|
|
5431
|
-
var strWithoutPlus = str.replace(/\+/g, ' ');
|
|
5432
|
-
if (charset === 'iso-8859-1') {
|
|
5433
|
-
// unescape never throws, no try...catch needed:
|
|
5434
|
-
return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
5435
|
-
}
|
|
5436
|
-
// utf-8
|
|
5437
|
-
try {
|
|
5438
|
-
return decodeURIComponent(strWithoutPlus);
|
|
5439
|
-
} catch (e) {
|
|
5440
|
-
return strWithoutPlus;
|
|
5441
|
-
}
|
|
5442
|
-
};
|
|
5443
|
-
|
|
5444
|
-
var encode$1 = function encode(str, defaultEncoder, charset, kind, format) {
|
|
5445
|
-
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
|
|
5446
|
-
// It has been adapted here for stricter adherence to RFC 3986
|
|
5447
|
-
if (str.length === 0) {
|
|
5448
|
-
return str;
|
|
5449
|
-
}
|
|
5450
|
-
|
|
5451
|
-
var string = str;
|
|
5452
|
-
if (typeof str === 'symbol') {
|
|
5453
|
-
string = Symbol.prototype.toString.call(str);
|
|
5454
|
-
} else if (typeof str !== 'string') {
|
|
5455
|
-
string = String(str);
|
|
5456
|
-
}
|
|
5457
|
-
|
|
5458
|
-
if (charset === 'iso-8859-1') {
|
|
5459
|
-
return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
|
|
5460
|
-
return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
|
|
5461
|
-
});
|
|
5462
|
-
}
|
|
5463
|
-
|
|
5464
|
-
var out = '';
|
|
5465
|
-
for (var i = 0; i < string.length; ++i) {
|
|
5466
|
-
var c = string.charCodeAt(i);
|
|
5467
|
-
|
|
5468
|
-
if (
|
|
5469
|
-
c === 0x2D // -
|
|
5470
|
-
|| c === 0x2E // .
|
|
5471
|
-
|| c === 0x5F // _
|
|
5472
|
-
|| c === 0x7E // ~
|
|
5473
|
-
|| (c >= 0x30 && c <= 0x39) // 0-9
|
|
5474
|
-
|| (c >= 0x41 && c <= 0x5A) // a-z
|
|
5475
|
-
|| (c >= 0x61 && c <= 0x7A) // A-Z
|
|
5476
|
-
|| (format === formats$2.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
|
|
5477
|
-
) {
|
|
5478
|
-
out += string.charAt(i);
|
|
5479
|
-
continue;
|
|
5480
|
-
}
|
|
5481
|
-
|
|
5482
|
-
if (c < 0x80) {
|
|
5483
|
-
out = out + hexTable[c];
|
|
5484
|
-
continue;
|
|
5485
|
-
}
|
|
5486
|
-
|
|
5487
|
-
if (c < 0x800) {
|
|
5488
|
-
out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
|
|
5489
|
-
continue;
|
|
5490
|
-
}
|
|
5491
|
-
|
|
5492
|
-
if (c < 0xD800 || c >= 0xE000) {
|
|
5493
|
-
out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
|
|
5494
|
-
continue;
|
|
5495
|
-
}
|
|
5496
|
-
|
|
5497
|
-
i += 1;
|
|
5498
|
-
c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
|
|
5499
|
-
/* eslint operator-linebreak: [2, "before"] */
|
|
5500
|
-
out += hexTable[0xF0 | (c >> 18)]
|
|
5501
|
-
+ hexTable[0x80 | ((c >> 12) & 0x3F)]
|
|
5502
|
-
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
|
5503
|
-
+ hexTable[0x80 | (c & 0x3F)];
|
|
5504
|
-
}
|
|
5505
|
-
|
|
5506
|
-
return out;
|
|
5507
|
-
};
|
|
5508
|
-
|
|
5509
|
-
var compact = function compact(value) {
|
|
5510
|
-
var queue = [{ obj: { o: value }, prop: 'o' }];
|
|
5511
|
-
var refs = [];
|
|
5512
|
-
|
|
5513
|
-
for (var i = 0; i < queue.length; ++i) {
|
|
5514
|
-
var item = queue[i];
|
|
5515
|
-
var obj = item.obj[item.prop];
|
|
5516
|
-
|
|
5517
|
-
var keys = Object.keys(obj);
|
|
5518
|
-
for (var j = 0; j < keys.length; ++j) {
|
|
5519
|
-
var key = keys[j];
|
|
5520
|
-
var val = obj[key];
|
|
5521
|
-
if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
|
|
5522
|
-
queue.push({ obj: obj, prop: key });
|
|
5523
|
-
refs.push(val);
|
|
5524
|
-
}
|
|
5525
|
-
}
|
|
5526
|
-
}
|
|
5527
|
-
|
|
5528
|
-
compactQueue(queue);
|
|
5529
|
-
|
|
5530
|
-
return value;
|
|
5531
|
-
};
|
|
5532
|
-
|
|
5533
|
-
var isRegExp = function isRegExp(obj) {
|
|
5534
|
-
return Object.prototype.toString.call(obj) === '[object RegExp]';
|
|
5535
|
-
};
|
|
5536
|
-
|
|
5537
|
-
var isBuffer = function isBuffer(obj) {
|
|
5538
|
-
if (!obj || typeof obj !== 'object') {
|
|
5539
|
-
return false;
|
|
5540
|
-
}
|
|
5541
|
-
|
|
5542
|
-
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
|
|
5543
|
-
};
|
|
5544
|
-
|
|
5545
|
-
var combine = function combine(a, b) {
|
|
5546
|
-
return [].concat(a, b);
|
|
5547
|
-
};
|
|
5548
|
-
|
|
5549
|
-
var maybeMap = function maybeMap(val, fn) {
|
|
5550
|
-
if (isArray$2(val)) {
|
|
5551
|
-
var mapped = [];
|
|
5552
|
-
for (var i = 0; i < val.length; i += 1) {
|
|
5553
|
-
mapped.push(fn(val[i]));
|
|
5554
|
-
}
|
|
5555
|
-
return mapped;
|
|
5556
|
-
}
|
|
5557
|
-
return fn(val);
|
|
5558
|
-
};
|
|
5559
|
-
|
|
5560
|
-
var utils$2 = {
|
|
5561
|
-
arrayToObject: arrayToObject,
|
|
5562
|
-
assign: assign,
|
|
5563
|
-
combine: combine,
|
|
5564
|
-
compact: compact,
|
|
5565
|
-
decode: decode$1,
|
|
5566
|
-
encode: encode$1,
|
|
5567
|
-
isBuffer: isBuffer,
|
|
5568
|
-
isRegExp: isRegExp,
|
|
5569
|
-
maybeMap: maybeMap,
|
|
5570
|
-
merge: merge$2
|
|
5571
|
-
};
|
|
5572
|
-
|
|
5573
|
-
var getSideChannel = sideChannel;
|
|
5574
|
-
var utils$1 = utils$2;
|
|
5575
|
-
var formats$1 = formats$3;
|
|
5576
|
-
var has$1 = Object.prototype.hasOwnProperty;
|
|
5577
|
-
|
|
5578
|
-
var arrayPrefixGenerators = {
|
|
5579
|
-
brackets: function brackets(prefix) {
|
|
5580
|
-
return prefix + '[]';
|
|
5581
|
-
},
|
|
5582
|
-
comma: 'comma',
|
|
5583
|
-
indices: function indices(prefix, key) {
|
|
5584
|
-
return prefix + '[' + key + ']';
|
|
5585
|
-
},
|
|
5586
|
-
repeat: function repeat(prefix) {
|
|
5587
|
-
return prefix;
|
|
5588
|
-
}
|
|
5589
|
-
};
|
|
5590
|
-
|
|
5591
|
-
var isArray$1 = Array.isArray;
|
|
5592
|
-
var split = String.prototype.split;
|
|
5593
|
-
var push = Array.prototype.push;
|
|
5594
|
-
var pushToArray = function (arr, valueOrArray) {
|
|
5595
|
-
push.apply(arr, isArray$1(valueOrArray) ? valueOrArray : [valueOrArray]);
|
|
5596
|
-
};
|
|
5597
|
-
|
|
5598
|
-
var toISO = Date.prototype.toISOString;
|
|
5599
|
-
|
|
5600
|
-
var defaultFormat = formats$1['default'];
|
|
5601
|
-
var defaults$2 = {
|
|
5602
|
-
addQueryPrefix: false,
|
|
5603
|
-
allowDots: false,
|
|
5604
|
-
charset: 'utf-8',
|
|
5605
|
-
charsetSentinel: false,
|
|
5606
|
-
delimiter: '&',
|
|
5607
|
-
encode: true,
|
|
5608
|
-
encoder: utils$1.encode,
|
|
5609
|
-
encodeValuesOnly: false,
|
|
5610
|
-
format: defaultFormat,
|
|
5611
|
-
formatter: formats$1.formatters[defaultFormat],
|
|
5612
|
-
// deprecated
|
|
5613
|
-
indices: false,
|
|
5614
|
-
serializeDate: function serializeDate(date) {
|
|
5615
|
-
return toISO.call(date);
|
|
5616
|
-
},
|
|
5617
|
-
skipNulls: false,
|
|
5618
|
-
strictNullHandling: false
|
|
5619
|
-
};
|
|
5620
|
-
|
|
5621
|
-
var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
|
|
5622
|
-
return typeof v === 'string'
|
|
5623
|
-
|| typeof v === 'number'
|
|
5624
|
-
|| typeof v === 'boolean'
|
|
5625
|
-
|| typeof v === 'symbol'
|
|
5626
|
-
|| typeof v === 'bigint';
|
|
5627
|
-
};
|
|
5628
|
-
|
|
5629
|
-
var sentinel = {};
|
|
5630
|
-
|
|
5631
|
-
var stringify$4 = function stringify(
|
|
5632
|
-
object,
|
|
5633
|
-
prefix,
|
|
5634
|
-
generateArrayPrefix,
|
|
5635
|
-
commaRoundTrip,
|
|
5636
|
-
strictNullHandling,
|
|
5637
|
-
skipNulls,
|
|
5638
|
-
encoder,
|
|
5639
|
-
filter,
|
|
5640
|
-
sort,
|
|
5641
|
-
allowDots,
|
|
5642
|
-
serializeDate,
|
|
5643
|
-
format,
|
|
5644
|
-
formatter,
|
|
5645
|
-
encodeValuesOnly,
|
|
5646
|
-
charset,
|
|
5647
|
-
sideChannel
|
|
5648
|
-
) {
|
|
5649
|
-
var obj = object;
|
|
5650
|
-
|
|
5651
|
-
var tmpSc = sideChannel;
|
|
5652
|
-
var step = 0;
|
|
5653
|
-
var findFlag = false;
|
|
5654
|
-
while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
|
|
5655
|
-
// Where object last appeared in the ref tree
|
|
5656
|
-
var pos = tmpSc.get(object);
|
|
5657
|
-
step += 1;
|
|
5658
|
-
if (typeof pos !== 'undefined') {
|
|
5659
|
-
if (pos === step) {
|
|
5660
|
-
throw new RangeError('Cyclic object value');
|
|
5661
|
-
} else {
|
|
5662
|
-
findFlag = true; // Break while
|
|
5663
|
-
}
|
|
5664
|
-
}
|
|
5665
|
-
if (typeof tmpSc.get(sentinel) === 'undefined') {
|
|
5666
|
-
step = 0;
|
|
5667
|
-
}
|
|
5668
|
-
}
|
|
5669
|
-
|
|
5670
|
-
if (typeof filter === 'function') {
|
|
5671
|
-
obj = filter(prefix, obj);
|
|
5672
|
-
} else if (obj instanceof Date) {
|
|
5673
|
-
obj = serializeDate(obj);
|
|
5674
|
-
} else if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
|
|
5675
|
-
obj = utils$1.maybeMap(obj, function (value) {
|
|
5676
|
-
if (value instanceof Date) {
|
|
5677
|
-
return serializeDate(value);
|
|
5678
|
-
}
|
|
5679
|
-
return value;
|
|
5680
|
-
});
|
|
5681
|
-
}
|
|
5682
|
-
|
|
5683
|
-
if (obj === null) {
|
|
5684
|
-
if (strictNullHandling) {
|
|
5685
|
-
return encoder && !encodeValuesOnly ? encoder(prefix, defaults$2.encoder, charset, 'key', format) : prefix;
|
|
5686
|
-
}
|
|
5687
|
-
|
|
5688
|
-
obj = '';
|
|
5689
|
-
}
|
|
5690
|
-
|
|
5691
|
-
if (isNonNullishPrimitive(obj) || utils$1.isBuffer(obj)) {
|
|
5692
|
-
if (encoder) {
|
|
5693
|
-
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults$2.encoder, charset, 'key', format);
|
|
5694
|
-
if (generateArrayPrefix === 'comma' && encodeValuesOnly) {
|
|
5695
|
-
var valuesArray = split.call(String(obj), ',');
|
|
5696
|
-
var valuesJoined = '';
|
|
5697
|
-
for (var i = 0; i < valuesArray.length; ++i) {
|
|
5698
|
-
valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults$2.encoder, charset, 'value', format));
|
|
5699
|
-
}
|
|
5700
|
-
return [formatter(keyValue) + (commaRoundTrip && isArray$1(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined];
|
|
5701
|
-
}
|
|
5702
|
-
return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults$2.encoder, charset, 'value', format))];
|
|
5703
|
-
}
|
|
5704
|
-
return [formatter(prefix) + '=' + formatter(String(obj))];
|
|
5705
|
-
}
|
|
5706
|
-
|
|
5707
|
-
var values = [];
|
|
5708
|
-
|
|
5709
|
-
if (typeof obj === 'undefined') {
|
|
5710
|
-
return values;
|
|
5711
|
-
}
|
|
5712
|
-
|
|
5713
|
-
var objKeys;
|
|
5714
|
-
if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
|
|
5715
|
-
// we need to join elements in
|
|
5716
|
-
objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
|
|
5717
|
-
} else if (isArray$1(filter)) {
|
|
5718
|
-
objKeys = filter;
|
|
5719
|
-
} else {
|
|
5720
|
-
var keys = Object.keys(obj);
|
|
5721
|
-
objKeys = sort ? keys.sort(sort) : keys;
|
|
5722
|
-
}
|
|
5723
|
-
|
|
5724
|
-
var adjustedPrefix = commaRoundTrip && isArray$1(obj) && obj.length === 1 ? prefix + '[]' : prefix;
|
|
5725
|
-
|
|
5726
|
-
for (var j = 0; j < objKeys.length; ++j) {
|
|
5727
|
-
var key = objKeys[j];
|
|
5728
|
-
var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
|
|
5729
|
-
|
|
5730
|
-
if (skipNulls && value === null) {
|
|
5731
|
-
continue;
|
|
5732
|
-
}
|
|
5733
|
-
|
|
5734
|
-
var keyPrefix = isArray$1(obj)
|
|
5735
|
-
? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix
|
|
5736
|
-
: adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
|
|
5737
|
-
|
|
5738
|
-
sideChannel.set(object, step);
|
|
5739
|
-
var valueSideChannel = getSideChannel();
|
|
5740
|
-
valueSideChannel.set(sentinel, sideChannel);
|
|
5741
|
-
pushToArray(values, stringify(
|
|
5742
|
-
value,
|
|
5743
|
-
keyPrefix,
|
|
5744
|
-
generateArrayPrefix,
|
|
5745
|
-
commaRoundTrip,
|
|
5746
|
-
strictNullHandling,
|
|
5747
|
-
skipNulls,
|
|
5748
|
-
encoder,
|
|
5749
|
-
filter,
|
|
5750
|
-
sort,
|
|
5751
|
-
allowDots,
|
|
5752
|
-
serializeDate,
|
|
5753
|
-
format,
|
|
5754
|
-
formatter,
|
|
5755
|
-
encodeValuesOnly,
|
|
5756
|
-
charset,
|
|
5757
|
-
valueSideChannel
|
|
5758
|
-
));
|
|
5759
|
-
}
|
|
5760
|
-
|
|
5761
|
-
return values;
|
|
5762
|
-
};
|
|
5763
|
-
|
|
5764
|
-
var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
|
|
5765
|
-
if (!opts) {
|
|
5766
|
-
return defaults$2;
|
|
5767
|
-
}
|
|
5768
|
-
|
|
5769
|
-
if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
|
|
5770
|
-
throw new TypeError('Encoder has to be a function.');
|
|
5771
|
-
}
|
|
5772
|
-
|
|
5773
|
-
var charset = opts.charset || defaults$2.charset;
|
|
5774
|
-
if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
|
|
5775
|
-
throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
|
|
5776
|
-
}
|
|
5777
|
-
|
|
5778
|
-
var format = formats$1['default'];
|
|
5779
|
-
if (typeof opts.format !== 'undefined') {
|
|
5780
|
-
if (!has$1.call(formats$1.formatters, opts.format)) {
|
|
5781
|
-
throw new TypeError('Unknown format option provided.');
|
|
5782
|
-
}
|
|
5783
|
-
format = opts.format;
|
|
5784
|
-
}
|
|
5785
|
-
var formatter = formats$1.formatters[format];
|
|
5786
|
-
|
|
5787
|
-
var filter = defaults$2.filter;
|
|
5788
|
-
if (typeof opts.filter === 'function' || isArray$1(opts.filter)) {
|
|
5789
|
-
filter = opts.filter;
|
|
5790
|
-
}
|
|
5791
|
-
|
|
5792
|
-
return {
|
|
5793
|
-
addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults$2.addQueryPrefix,
|
|
5794
|
-
allowDots: typeof opts.allowDots === 'undefined' ? defaults$2.allowDots : !!opts.allowDots,
|
|
5795
|
-
charset: charset,
|
|
5796
|
-
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$2.charsetSentinel,
|
|
5797
|
-
delimiter: typeof opts.delimiter === 'undefined' ? defaults$2.delimiter : opts.delimiter,
|
|
5798
|
-
encode: typeof opts.encode === 'boolean' ? opts.encode : defaults$2.encode,
|
|
5799
|
-
encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults$2.encoder,
|
|
5800
|
-
encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults$2.encodeValuesOnly,
|
|
5801
|
-
filter: filter,
|
|
5802
|
-
format: format,
|
|
5803
|
-
formatter: formatter,
|
|
5804
|
-
serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults$2.serializeDate,
|
|
5805
|
-
skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults$2.skipNulls,
|
|
5806
|
-
sort: typeof opts.sort === 'function' ? opts.sort : null,
|
|
5807
|
-
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults$2.strictNullHandling
|
|
5808
|
-
};
|
|
5809
|
-
};
|
|
3348
|
+
// if the element has the class "mousetrap" then no need to stop
|
|
3349
|
+
if ((' ' + element.className + ' ').indexOf(' mousetrap ') > -1) {
|
|
3350
|
+
return false;
|
|
3351
|
+
}
|
|
5810
3352
|
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
3353
|
+
if (_belongsTo(element, self.target)) {
|
|
3354
|
+
return false;
|
|
3355
|
+
}
|
|
5814
3356
|
|
|
5815
|
-
|
|
5816
|
-
|
|
3357
|
+
// Events originating from a shadow DOM are re-targetted and `e.target` is the shadow host,
|
|
3358
|
+
// not the initial event target in the shadow tree. Note that not all events cross the
|
|
3359
|
+
// shadow boundary.
|
|
3360
|
+
// For shadow trees with `mode: 'open'`, the initial event target is the first element in
|
|
3361
|
+
// the event’s composed path. For shadow trees with `mode: 'closed'`, the initial event
|
|
3362
|
+
// target cannot be obtained.
|
|
3363
|
+
if ('composedPath' in e && typeof e.composedPath === 'function') {
|
|
3364
|
+
// For open shadow trees, update `element` so that the following check works.
|
|
3365
|
+
var initialEventTarget = e.composedPath()[0];
|
|
3366
|
+
if (initialEventTarget !== e.target) {
|
|
3367
|
+
element = initialEventTarget;
|
|
3368
|
+
}
|
|
3369
|
+
}
|
|
5817
3370
|
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
} else if (isArray$1(options.filter)) {
|
|
5822
|
-
filter = options.filter;
|
|
5823
|
-
objKeys = filter;
|
|
5824
|
-
}
|
|
3371
|
+
// stop for input, select, and textarea
|
|
3372
|
+
return element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || element.isContentEditable;
|
|
3373
|
+
};
|
|
5825
3374
|
|
|
5826
|
-
|
|
3375
|
+
/**
|
|
3376
|
+
* exposes _handleKey publicly so it can be overwritten by extensions
|
|
3377
|
+
*/
|
|
3378
|
+
Mousetrap.prototype.handleKey = function() {
|
|
3379
|
+
var self = this;
|
|
3380
|
+
return self._handleKey.apply(self, arguments);
|
|
3381
|
+
};
|
|
5827
3382
|
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
3383
|
+
/**
|
|
3384
|
+
* allow custom key mappings
|
|
3385
|
+
*/
|
|
3386
|
+
Mousetrap.addKeycodes = function(object) {
|
|
3387
|
+
for (var key in object) {
|
|
3388
|
+
if (object.hasOwnProperty(key)) {
|
|
3389
|
+
_MAP[key] = object[key];
|
|
3390
|
+
}
|
|
3391
|
+
}
|
|
3392
|
+
_REVERSE_MAP = null;
|
|
3393
|
+
};
|
|
5831
3394
|
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
3395
|
+
/**
|
|
3396
|
+
* Init the global mousetrap functions
|
|
3397
|
+
*
|
|
3398
|
+
* This method is needed to allow the global mousetrap functions to work
|
|
3399
|
+
* now that mousetrap is a constructor function.
|
|
3400
|
+
*/
|
|
3401
|
+
Mousetrap.init = function() {
|
|
3402
|
+
var documentMousetrap = Mousetrap(document);
|
|
3403
|
+
for (var method in documentMousetrap) {
|
|
3404
|
+
if (method.charAt(0) !== '_') {
|
|
3405
|
+
Mousetrap[method] = (function(method) {
|
|
3406
|
+
return function() {
|
|
3407
|
+
return documentMousetrap[method].apply(documentMousetrap, arguments);
|
|
3408
|
+
};
|
|
3409
|
+
} (method));
|
|
3410
|
+
}
|
|
3411
|
+
}
|
|
3412
|
+
};
|
|
5840
3413
|
|
|
5841
|
-
|
|
5842
|
-
if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
|
|
5843
|
-
throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
|
|
5844
|
-
}
|
|
5845
|
-
var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
|
|
3414
|
+
Mousetrap.init();
|
|
5846
3415
|
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
}
|
|
3416
|
+
// expose mousetrap to the global object
|
|
3417
|
+
window.Mousetrap = Mousetrap;
|
|
5850
3418
|
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
3419
|
+
// expose as a common js module
|
|
3420
|
+
if (module.exports) {
|
|
3421
|
+
module.exports = Mousetrap;
|
|
3422
|
+
}
|
|
5854
3423
|
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
3424
|
+
// expose mousetrap as an AMD module
|
|
3425
|
+
if (typeof undefined$1 === 'function' && undefined$1.amd) {
|
|
3426
|
+
undefined$1(function() {
|
|
3427
|
+
return Mousetrap;
|
|
3428
|
+
});
|
|
3429
|
+
}
|
|
3430
|
+
}) (typeof window !== 'undefined' ? window : null, typeof window !== 'undefined' ? document : null);
|
|
3431
|
+
} (mousetrap));
|
|
5858
3432
|
|
|
5859
|
-
|
|
5860
|
-
continue;
|
|
5861
|
-
}
|
|
5862
|
-
pushToArray(keys, stringify$4(
|
|
5863
|
-
obj[key],
|
|
5864
|
-
key,
|
|
5865
|
-
generateArrayPrefix,
|
|
5866
|
-
commaRoundTrip,
|
|
5867
|
-
options.strictNullHandling,
|
|
5868
|
-
options.skipNulls,
|
|
5869
|
-
options.encode ? options.encoder : null,
|
|
5870
|
-
options.filter,
|
|
5871
|
-
options.sort,
|
|
5872
|
-
options.allowDots,
|
|
5873
|
-
options.serializeDate,
|
|
5874
|
-
options.format,
|
|
5875
|
-
options.formatter,
|
|
5876
|
-
options.encodeValuesOnly,
|
|
5877
|
-
options.charset,
|
|
5878
|
-
sideChannel
|
|
5879
|
-
));
|
|
5880
|
-
}
|
|
3433
|
+
var Mousetrap$1 = mousetrap.exports;
|
|
5881
3434
|
|
|
5882
|
-
|
|
5883
|
-
|
|
3435
|
+
/**
|
|
3436
|
+
* adds a bindGlobal method to Mousetrap that allows you to
|
|
3437
|
+
* bind specific keyboard shortcuts that will still work
|
|
3438
|
+
* inside a text input field
|
|
3439
|
+
*
|
|
3440
|
+
* usage:
|
|
3441
|
+
* Mousetrap.bindGlobal('ctrl+s', _saveChanges);
|
|
3442
|
+
*/
|
|
3443
|
+
/* global Mousetrap:true */
|
|
3444
|
+
(function(Mousetrap) {
|
|
3445
|
+
var _globalCallbacks = {};
|
|
3446
|
+
var _originalStopCallback = Mousetrap.prototype.stopCallback;
|
|
3447
|
+
|
|
3448
|
+
Mousetrap.prototype.stopCallback = function(e, element, combo, sequence) {
|
|
3449
|
+
var self = this;
|
|
3450
|
+
|
|
3451
|
+
if (self.paused) {
|
|
3452
|
+
return true;
|
|
3453
|
+
}
|
|
3454
|
+
|
|
3455
|
+
if (_globalCallbacks[combo] || _globalCallbacks[sequence]) {
|
|
3456
|
+
return false;
|
|
3457
|
+
}
|
|
3458
|
+
|
|
3459
|
+
return _originalStopCallback.call(self, e, element, combo);
|
|
3460
|
+
};
|
|
3461
|
+
|
|
3462
|
+
Mousetrap.prototype.bindGlobal = function(keys, callback, action) {
|
|
3463
|
+
var self = this;
|
|
3464
|
+
self.bind(keys, callback, action);
|
|
3465
|
+
|
|
3466
|
+
if (keys instanceof Array) {
|
|
3467
|
+
for (var i = 0; i < keys.length; i++) {
|
|
3468
|
+
_globalCallbacks[keys[i]] = true;
|
|
3469
|
+
}
|
|
3470
|
+
return;
|
|
3471
|
+
}
|
|
3472
|
+
|
|
3473
|
+
_globalCallbacks[keys] = true;
|
|
3474
|
+
};
|
|
3475
|
+
|
|
3476
|
+
Mousetrap.prototype.unbindGlobal = function(keys, action) {
|
|
3477
|
+
var self = this;
|
|
3478
|
+
self.unbind(keys, action);
|
|
3479
|
+
|
|
3480
|
+
if (keys instanceof Array) {
|
|
3481
|
+
for (var i = 0; i < keys.length; i++) {
|
|
3482
|
+
_globalCallbacks[keys[i]] = false;
|
|
3483
|
+
}
|
|
3484
|
+
return;
|
|
3485
|
+
}
|
|
3486
|
+
|
|
3487
|
+
_globalCallbacks[keys] = false;
|
|
3488
|
+
};
|
|
3489
|
+
|
|
3490
|
+
Mousetrap.init();
|
|
3491
|
+
}) (Mousetrap);
|
|
5884
3492
|
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
3493
|
+
var MAC_TO_WINDOWS_KEYS_MAP = {
|
|
3494
|
+
option: "alt",
|
|
3495
|
+
command: "ctrl",
|
|
3496
|
+
"return": "enter",
|
|
3497
|
+
"delete": "backspace"
|
|
3498
|
+
};
|
|
3499
|
+
var OS = {
|
|
3500
|
+
mac: "OS X",
|
|
3501
|
+
windows: "Windows"
|
|
3502
|
+
};
|
|
5894
3503
|
|
|
5895
|
-
|
|
3504
|
+
var convertHotkeyToUsersPlatform = function convertHotkeyToUsersPlatform(hotkey) {
|
|
3505
|
+
var _platformInfo$os, _platformInfo$os$fami;
|
|
3506
|
+
var platformInfo = platform.parse(navigator.userAgent);
|
|
3507
|
+
var isOSX = (_platformInfo$os = platformInfo.os) === null || _platformInfo$os === void 0 ? void 0 : (_platformInfo$os$fami = _platformInfo$os.family) === null || _platformInfo$os$fami === void 0 ? void 0 : _platformInfo$os$fami.includes(OS.mac);
|
|
3508
|
+
if (isOSX) return hotkey;
|
|
3509
|
+
var hotkeyForWindows = hotkey;
|
|
3510
|
+
ramda.toPairs(MAC_TO_WINDOWS_KEYS_MAP).forEach(function (_ref) {
|
|
3511
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
3512
|
+
macKey = _ref2[0],
|
|
3513
|
+
windowsKey = _ref2[1];
|
|
3514
|
+
hotkeyForWindows = hotkeyForWindows.replaceAll(macKey, windowsKey);
|
|
3515
|
+
});
|
|
3516
|
+
return hotkeyForWindows;
|
|
5896
3517
|
};
|
|
5897
3518
|
|
|
5898
|
-
var
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
var
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
arrayLimit: 20,
|
|
5908
|
-
charset: 'utf-8',
|
|
5909
|
-
charsetSentinel: false,
|
|
5910
|
-
comma: false,
|
|
5911
|
-
decoder: utils.decode,
|
|
5912
|
-
delimiter: '&',
|
|
5913
|
-
depth: 5,
|
|
5914
|
-
ignoreQueryPrefix: false,
|
|
5915
|
-
interpretNumericEntities: false,
|
|
5916
|
-
parameterLimit: 1000,
|
|
5917
|
-
parseArrays: true,
|
|
5918
|
-
plainObjects: false,
|
|
5919
|
-
strictNullHandling: false
|
|
3519
|
+
var MODES$1 = {
|
|
3520
|
+
"default": "default",
|
|
3521
|
+
global: "global",
|
|
3522
|
+
scoped: "scoped"
|
|
3523
|
+
};
|
|
3524
|
+
var DEFAULT_CONFIG = {
|
|
3525
|
+
mode: MODES$1["default"],
|
|
3526
|
+
unbindOnUnmount: true,
|
|
3527
|
+
enabled: true
|
|
5920
3528
|
};
|
|
5921
3529
|
|
|
5922
|
-
var
|
|
5923
|
-
|
|
5924
|
-
|
|
3530
|
+
var useHotKeys = function useHotKeys(hotkey, handler, userConfig) {
|
|
3531
|
+
var ref = React.useRef(null);
|
|
3532
|
+
var convertedHotkey = convertHotkeyToUsersPlatform(hotkey);
|
|
3533
|
+
var config = ramda.mergeLeft(userConfig, DEFAULT_CONFIG);
|
|
3534
|
+
React.useEffect(function () {
|
|
3535
|
+
var mousetrapInstance = config.enabled && bindHotKey({
|
|
3536
|
+
mode: config.mode,
|
|
3537
|
+
hotkey: convertedHotkey,
|
|
3538
|
+
handler: handler,
|
|
3539
|
+
ref: ref
|
|
5925
3540
|
});
|
|
3541
|
+
return function () {
|
|
3542
|
+
config.unbindOnUnmount && unBindHotKey({
|
|
3543
|
+
mousetrapInstance: mousetrapInstance,
|
|
3544
|
+
mode: config.mode,
|
|
3545
|
+
hotkey: convertedHotkey
|
|
3546
|
+
});
|
|
3547
|
+
};
|
|
3548
|
+
}, [handler, config.mode, convertedHotkey, config]);
|
|
3549
|
+
return config.mode === MODES$1.scoped ? ref : null;
|
|
5926
3550
|
};
|
|
5927
|
-
|
|
5928
|
-
var
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
3551
|
+
var bindHotKey = function bindHotKey(_ref) {
|
|
3552
|
+
var mode = _ref.mode,
|
|
3553
|
+
hotkey = _ref.hotkey,
|
|
3554
|
+
handler = _ref.handler,
|
|
3555
|
+
ref = _ref.ref;
|
|
3556
|
+
var mousetrapInstance;
|
|
3557
|
+
switch (mode) {
|
|
3558
|
+
case MODES$1.global:
|
|
3559
|
+
Mousetrap$1.bindGlobal(hotkey, handler);
|
|
3560
|
+
break;
|
|
3561
|
+
case MODES$1.scoped:
|
|
3562
|
+
mousetrapInstance = Mousetrap$1(ref.current).bind(hotkey, handler);
|
|
3563
|
+
break;
|
|
3564
|
+
default:
|
|
3565
|
+
mousetrapInstance = Mousetrap$1.bind(hotkey, handler);
|
|
3566
|
+
}
|
|
3567
|
+
return mousetrapInstance;
|
|
5934
3568
|
};
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
// the ✓ character, such as us-ascii.
|
|
5941
|
-
var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')
|
|
5942
|
-
|
|
5943
|
-
// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
|
|
5944
|
-
var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
|
|
5945
|
-
|
|
5946
|
-
var parseValues = function parseQueryStringValues(str, options) {
|
|
5947
|
-
var obj = {};
|
|
5948
|
-
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
|
|
5949
|
-
var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
|
|
5950
|
-
var parts = cleanStr.split(options.delimiter, limit);
|
|
5951
|
-
var skipIndex = -1; // Keep track of where the utf8 sentinel was found
|
|
5952
|
-
var i;
|
|
5953
|
-
|
|
5954
|
-
var charset = options.charset;
|
|
5955
|
-
if (options.charsetSentinel) {
|
|
5956
|
-
for (i = 0; i < parts.length; ++i) {
|
|
5957
|
-
if (parts[i].indexOf('utf8=') === 0) {
|
|
5958
|
-
if (parts[i] === charsetSentinel) {
|
|
5959
|
-
charset = 'utf-8';
|
|
5960
|
-
} else if (parts[i] === isoSentinel) {
|
|
5961
|
-
charset = 'iso-8859-1';
|
|
5962
|
-
}
|
|
5963
|
-
skipIndex = i;
|
|
5964
|
-
i = parts.length; // The eslint settings do not allow break;
|
|
5965
|
-
}
|
|
5966
|
-
}
|
|
5967
|
-
}
|
|
5968
|
-
|
|
5969
|
-
for (i = 0; i < parts.length; ++i) {
|
|
5970
|
-
if (i === skipIndex) {
|
|
5971
|
-
continue;
|
|
5972
|
-
}
|
|
5973
|
-
var part = parts[i];
|
|
5974
|
-
|
|
5975
|
-
var bracketEqualsPos = part.indexOf(']=');
|
|
5976
|
-
var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
|
|
5977
|
-
|
|
5978
|
-
var key, val;
|
|
5979
|
-
if (pos === -1) {
|
|
5980
|
-
key = options.decoder(part, defaults$1.decoder, charset, 'key');
|
|
5981
|
-
val = options.strictNullHandling ? null : '';
|
|
5982
|
-
} else {
|
|
5983
|
-
key = options.decoder(part.slice(0, pos), defaults$1.decoder, charset, 'key');
|
|
5984
|
-
val = utils.maybeMap(
|
|
5985
|
-
parseArrayValue(part.slice(pos + 1), options),
|
|
5986
|
-
function (encodedVal) {
|
|
5987
|
-
return options.decoder(encodedVal, defaults$1.decoder, charset, 'value');
|
|
5988
|
-
}
|
|
5989
|
-
);
|
|
5990
|
-
}
|
|
5991
|
-
|
|
5992
|
-
if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
|
|
5993
|
-
val = interpretNumericEntities(val);
|
|
5994
|
-
}
|
|
5995
|
-
|
|
5996
|
-
if (part.indexOf('[]=') > -1) {
|
|
5997
|
-
val = isArray(val) ? [val] : val;
|
|
5998
|
-
}
|
|
5999
|
-
|
|
6000
|
-
if (has.call(obj, key)) {
|
|
6001
|
-
obj[key] = utils.combine(obj[key], val);
|
|
6002
|
-
} else {
|
|
6003
|
-
obj[key] = val;
|
|
6004
|
-
}
|
|
6005
|
-
}
|
|
6006
|
-
|
|
6007
|
-
return obj;
|
|
3569
|
+
var unBindHotKey = function unBindHotKey(_ref2) {
|
|
3570
|
+
var mousetrapInstance = _ref2.mousetrapInstance,
|
|
3571
|
+
mode = _ref2.mode,
|
|
3572
|
+
hotkey = _ref2.hotkey;
|
|
3573
|
+
return mode === MODES$1.global ? Mousetrap$1.unbindGlobal(hotkey) : mousetrapInstance === null || mousetrapInstance === void 0 ? void 0 : mousetrapInstance.unbind(hotkey);
|
|
6008
3574
|
};
|
|
6009
3575
|
|
|
6010
|
-
var
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
|
|
6022
|
-
var index = parseInt(cleanRoot, 10);
|
|
6023
|
-
if (!options.parseArrays && cleanRoot === '') {
|
|
6024
|
-
obj = { 0: leaf };
|
|
6025
|
-
} else if (
|
|
6026
|
-
!isNaN(index)
|
|
6027
|
-
&& root !== cleanRoot
|
|
6028
|
-
&& String(index) === cleanRoot
|
|
6029
|
-
&& index >= 0
|
|
6030
|
-
&& (options.parseArrays && index <= options.arrayLimit)
|
|
6031
|
-
) {
|
|
6032
|
-
obj = [];
|
|
6033
|
-
obj[index] = leaf;
|
|
6034
|
-
} else if (cleanRoot !== '__proto__') {
|
|
6035
|
-
obj[cleanRoot] = leaf;
|
|
6036
|
-
}
|
|
6037
|
-
}
|
|
6038
|
-
|
|
6039
|
-
leaf = obj;
|
|
6040
|
-
}
|
|
3576
|
+
var useForceUpdate = function useForceUpdate() {
|
|
3577
|
+
// eslint-disable-next-line react/hook-use-state
|
|
3578
|
+
var _useState = React.useState(0),
|
|
3579
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
3580
|
+
setValue = _useState2[1];
|
|
3581
|
+
return function () {
|
|
3582
|
+
return setValue(function (value) {
|
|
3583
|
+
return value + 1;
|
|
3584
|
+
});
|
|
3585
|
+
};
|
|
3586
|
+
};
|
|
6041
3587
|
|
|
6042
|
-
|
|
3588
|
+
var useIsElementVisibleInDom = function useIsElementVisibleInDom(target) {
|
|
3589
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
3590
|
+
var _useState = React.useState(false),
|
|
3591
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
3592
|
+
isIntersecting = _useState2[0],
|
|
3593
|
+
setIsIntersecting = _useState2[1];
|
|
3594
|
+
var forceUpdate = useForceUpdate();
|
|
3595
|
+
React.useEffect(function () {
|
|
3596
|
+
if (!target) return forceUpdate();
|
|
3597
|
+
var observer = new IntersectionObserver(function (_ref) {
|
|
3598
|
+
var _ref2 = _slicedToArray(_ref, 1),
|
|
3599
|
+
entry = _ref2[0];
|
|
3600
|
+
return setIsIntersecting(entry.isIntersecting);
|
|
3601
|
+
}, options);
|
|
3602
|
+
observer.observe(target);
|
|
3603
|
+
return function () {
|
|
3604
|
+
return observer.unobserve(target);
|
|
3605
|
+
};
|
|
3606
|
+
}, [target, options]);
|
|
3607
|
+
return isIntersecting;
|
|
6043
3608
|
};
|
|
6044
3609
|
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
3610
|
+
function shallow(objA, objB) {
|
|
3611
|
+
if (Object.is(objA, objB)) {
|
|
3612
|
+
return true;
|
|
3613
|
+
}
|
|
3614
|
+
if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) {
|
|
3615
|
+
return false;
|
|
3616
|
+
}
|
|
3617
|
+
if (objA instanceof Map && objB instanceof Map) {
|
|
3618
|
+
if (objA.size !== objB.size)
|
|
3619
|
+
return false;
|
|
3620
|
+
for (const [key, value] of objA) {
|
|
3621
|
+
if (!Object.is(value, objB.get(key))) {
|
|
3622
|
+
return false;
|
|
3623
|
+
}
|
|
6048
3624
|
}
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
// Get the parent
|
|
6059
|
-
|
|
6060
|
-
var segment = options.depth > 0 && brackets.exec(key);
|
|
6061
|
-
var parent = segment ? key.slice(0, segment.index) : key;
|
|
6062
|
-
|
|
6063
|
-
// Stash the parent if it exists
|
|
6064
|
-
|
|
6065
|
-
var keys = [];
|
|
6066
|
-
if (parent) {
|
|
6067
|
-
// If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
|
|
6068
|
-
if (!options.plainObjects && has.call(Object.prototype, parent)) {
|
|
6069
|
-
if (!options.allowPrototypes) {
|
|
6070
|
-
return;
|
|
6071
|
-
}
|
|
6072
|
-
}
|
|
6073
|
-
|
|
6074
|
-
keys.push(parent);
|
|
3625
|
+
return true;
|
|
3626
|
+
}
|
|
3627
|
+
if (objA instanceof Set && objB instanceof Set) {
|
|
3628
|
+
if (objA.size !== objB.size)
|
|
3629
|
+
return false;
|
|
3630
|
+
for (const value of objA) {
|
|
3631
|
+
if (!objB.has(value)) {
|
|
3632
|
+
return false;
|
|
3633
|
+
}
|
|
6075
3634
|
}
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
}
|
|
6086
|
-
}
|
|
6087
|
-
keys.push(segment[1]);
|
|
3635
|
+
return true;
|
|
3636
|
+
}
|
|
3637
|
+
const keysA = Object.keys(objA);
|
|
3638
|
+
if (keysA.length !== Object.keys(objB).length) {
|
|
3639
|
+
return false;
|
|
3640
|
+
}
|
|
3641
|
+
for (let i = 0; i < keysA.length; i++) {
|
|
3642
|
+
if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !Object.is(objA[keysA[i]], objB[keysA[i]])) {
|
|
3643
|
+
return false;
|
|
6088
3644
|
}
|
|
3645
|
+
}
|
|
3646
|
+
return true;
|
|
3647
|
+
}
|
|
6089
3648
|
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
3649
|
+
var useKeyboardShortcutsStore = create$9(function (set) {
|
|
3650
|
+
return {
|
|
3651
|
+
isOpen: false,
|
|
3652
|
+
setIsOpen: function setIsOpen(arg) {
|
|
3653
|
+
if (typeof arg === "function") {
|
|
3654
|
+
set(function (state) {
|
|
3655
|
+
return {
|
|
3656
|
+
isOpen: arg(state.isOpen)
|
|
3657
|
+
};
|
|
3658
|
+
});
|
|
3659
|
+
} else {
|
|
3660
|
+
set({
|
|
3661
|
+
isOpen: arg
|
|
3662
|
+
});
|
|
3663
|
+
}
|
|
6094
3664
|
}
|
|
6095
|
-
|
|
6096
|
-
|
|
3665
|
+
};
|
|
3666
|
+
});
|
|
3667
|
+
var useKeyboardShortcutsPaneState = function useKeyboardShortcutsPaneState() {
|
|
3668
|
+
return useKeyboardShortcutsStore(function (_ref) {
|
|
3669
|
+
var isOpen = _ref.isOpen,
|
|
3670
|
+
setIsOpen = _ref.setIsOpen;
|
|
3671
|
+
return [isOpen, setIsOpen];
|
|
3672
|
+
}, shallow);
|
|
6097
3673
|
};
|
|
6098
3674
|
|
|
6099
|
-
var
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
return {
|
|
6114
|
-
allowDots: typeof opts.allowDots === 'undefined' ? defaults$1.allowDots : !!opts.allowDots,
|
|
6115
|
-
allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults$1.allowPrototypes,
|
|
6116
|
-
allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults$1.allowSparse,
|
|
6117
|
-
arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults$1.arrayLimit,
|
|
6118
|
-
charset: charset,
|
|
6119
|
-
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$1.charsetSentinel,
|
|
6120
|
-
comma: typeof opts.comma === 'boolean' ? opts.comma : defaults$1.comma,
|
|
6121
|
-
decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults$1.decoder,
|
|
6122
|
-
delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults$1.delimiter,
|
|
6123
|
-
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
6124
|
-
depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults$1.depth,
|
|
6125
|
-
ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
|
|
6126
|
-
interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults$1.interpretNumericEntities,
|
|
6127
|
-
parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults$1.parameterLimit,
|
|
6128
|
-
parseArrays: opts.parseArrays !== false,
|
|
6129
|
-
plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults$1.plainObjects,
|
|
6130
|
-
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults$1.strictNullHandling
|
|
3675
|
+
var useOnClickOutside = function useOnClickOutside(ref, handler) {
|
|
3676
|
+
React.useEffect(function () {
|
|
3677
|
+
var listener = function listener(event) {
|
|
3678
|
+
// Do nothing if clicking ref's element or descendent elements
|
|
3679
|
+
if (!ref.current || ref.current.contains(event.target)) {
|
|
3680
|
+
return;
|
|
3681
|
+
}
|
|
3682
|
+
handler(event);
|
|
3683
|
+
};
|
|
3684
|
+
document.addEventListener("mousedown", listener);
|
|
3685
|
+
document.addEventListener("touchstart", listener);
|
|
3686
|
+
return function () {
|
|
3687
|
+
document.removeEventListener("mousedown", listener);
|
|
3688
|
+
document.removeEventListener("touchstart", listener);
|
|
6131
3689
|
};
|
|
3690
|
+
}, [handler]);
|
|
6132
3691
|
};
|
|
6133
3692
|
|
|
6134
|
-
var
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
|
|
6142
|
-
var obj = options.plainObjects ? Object.create(null) : {};
|
|
6143
|
-
|
|
6144
|
-
// Iterate over the keys and setup the new object
|
|
6145
|
-
|
|
6146
|
-
var keys = Object.keys(tempObj);
|
|
6147
|
-
for (var i = 0; i < keys.length; ++i) {
|
|
6148
|
-
var key = keys[i];
|
|
6149
|
-
var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
|
|
6150
|
-
obj = utils.merge(obj, newObj, options);
|
|
6151
|
-
}
|
|
3693
|
+
var usePrevious = function usePrevious(value) {
|
|
3694
|
+
var ref = React.useRef(value);
|
|
3695
|
+
React.useEffect(function () {
|
|
3696
|
+
ref.current = value;
|
|
3697
|
+
}, [value]);
|
|
3698
|
+
return ref.current;
|
|
3699
|
+
};
|
|
6152
3700
|
|
|
6153
|
-
|
|
6154
|
-
|
|
3701
|
+
var useUpdateEffect = function useUpdateEffect(callback) {
|
|
3702
|
+
var dependencies = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
3703
|
+
var isInitialMount = React.useRef(true);
|
|
3704
|
+
React.useEffect(function () {
|
|
3705
|
+
if (isInitialMount.current) {
|
|
3706
|
+
isInitialMount.current = false;
|
|
3707
|
+
return;
|
|
6155
3708
|
}
|
|
6156
|
-
|
|
6157
|
-
|
|
3709
|
+
callback();
|
|
3710
|
+
}, dependencies);
|
|
6158
3711
|
};
|
|
6159
3712
|
|
|
6160
|
-
var
|
|
6161
|
-
var
|
|
6162
|
-
var
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
formats: formats,
|
|
6166
|
-
parse: parse$4,
|
|
6167
|
-
stringify: stringify$3
|
|
3713
|
+
var DEFAULT_STALE_TIME = 60 * 60 * 1000;
|
|
3714
|
+
var DOMAIN_QUERY_KEY = "custom-domain";
|
|
3715
|
+
var ENTITY_COUNT = {
|
|
3716
|
+
singular: 1,
|
|
3717
|
+
plural: 2
|
|
6168
3718
|
};
|
|
6169
3719
|
|
|
6170
|
-
var
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
_ref2$showToastr,
|
|
6174
|
-
showToastr,
|
|
6175
|
-
_ref2$message,
|
|
6176
|
-
message,
|
|
6177
|
-
textArea,
|
|
6178
|
-
_args = arguments;
|
|
6179
|
-
return regenerator.wrap(function _callee$(_context) {
|
|
6180
|
-
while (1) switch (_context.prev = _context.next) {
|
|
6181
|
-
case 0:
|
|
6182
|
-
_ref2 = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}, _ref2$showToastr = _ref2.showToastr, showToastr = _ref2$showToastr === void 0 ? true : _ref2$showToastr, _ref2$message = _ref2.message, message = _ref2$message === void 0 ? i18next__default["default"].t("neetoCommons.toastr.success.copiedToClipboard") : _ref2$message;
|
|
6183
|
-
_context.prev = 1;
|
|
6184
|
-
if (!(navigator.clipboard && window.isSecureContext)) {
|
|
6185
|
-
_context.next = 7;
|
|
6186
|
-
break;
|
|
6187
|
-
}
|
|
6188
|
-
_context.next = 5;
|
|
6189
|
-
return navigator.clipboard.writeText(text);
|
|
6190
|
-
case 5:
|
|
6191
|
-
_context.next = 17;
|
|
6192
|
-
break;
|
|
6193
|
-
case 7:
|
|
6194
|
-
textArea = document.createElement("textarea");
|
|
6195
|
-
textArea.value = text;
|
|
6196
|
-
textArea.style.top = "0";
|
|
6197
|
-
textArea.style.left = "0";
|
|
6198
|
-
textArea.style.position = "fixed";
|
|
6199
|
-
document.body.appendChild(textArea);
|
|
6200
|
-
textArea.focus();
|
|
6201
|
-
textArea.select();
|
|
6202
|
-
document.execCommand("copy");
|
|
6203
|
-
document.body.removeChild(textArea);
|
|
6204
|
-
case 17:
|
|
6205
|
-
showToastr && neetoui.Toastr.success(message);
|
|
6206
|
-
_context.next = 23;
|
|
6207
|
-
break;
|
|
6208
|
-
case 20:
|
|
6209
|
-
_context.prev = 20;
|
|
6210
|
-
_context.t0 = _context["catch"](1);
|
|
6211
|
-
neetoui.Toastr.error(_context.t0);
|
|
6212
|
-
case 23:
|
|
6213
|
-
case "end":
|
|
6214
|
-
return _context.stop();
|
|
6215
|
-
}
|
|
6216
|
-
}, _callee, null, [[1, 20]]);
|
|
6217
|
-
}));
|
|
6218
|
-
return function copyToClipboard(_x) {
|
|
6219
|
-
return _ref.apply(this, arguments);
|
|
6220
|
-
};
|
|
6221
|
-
}();
|
|
6222
|
-
var buildUrl = function buildUrl(route, params) {
|
|
6223
|
-
var placeHolders = [];
|
|
6224
|
-
ramda.toPairs(params).forEach(function (_ref3) {
|
|
6225
|
-
var _ref4 = _slicedToArray(_ref3, 2),
|
|
6226
|
-
key = _ref4[0],
|
|
6227
|
-
value = _ref4[1];
|
|
6228
|
-
if (route.includes(":".concat(key))) {
|
|
6229
|
-
placeHolders.push(key);
|
|
6230
|
-
route = route.replace(":".concat(key), encodeURIComponent(value));
|
|
6231
|
-
}
|
|
6232
|
-
});
|
|
6233
|
-
var queryParams = ramda.pipe(ramda.omit(placeHolders), preprocessForSerialization, lib.stringify)(params);
|
|
6234
|
-
return ramda.isEmpty(queryParams) ? route : "".concat(route, "?").concat(queryParams);
|
|
6235
|
-
};
|
|
6236
|
-
var joinHyphenCase = function joinHyphenCase() {
|
|
6237
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
6238
|
-
args[_key] = arguments[_key];
|
|
6239
|
-
}
|
|
6240
|
-
return args.join(" ").replace(/\s+/g, "-").toLowerCase();
|
|
3720
|
+
var HOSTNAME_REGEX = /^(?!-)[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](?:\.[a-zA-Z]{2,})+/;
|
|
3721
|
+
var INITIAL_VALUES$1 = {
|
|
3722
|
+
hostname: ""
|
|
6241
3723
|
};
|
|
3724
|
+
var CUSTOM_DOMAIN_VALIDATION_SCHEMA = yup__namespace.object().shape({
|
|
3725
|
+
hostname: yup__namespace.string().required(i18next.t("neetoCommons.customDomain.formikValidation.required")).matches(HOSTNAME_REGEX, i18next.t("neetoCommons.customDomain.formikValidation.valid"))
|
|
3726
|
+
});
|
|
6242
3727
|
|
|
6243
3728
|
var classnames$1 = {exports: {}};
|
|
6244
3729
|
|
|
@@ -6310,7 +3795,7 @@ var TagBlock = function TagBlock(_ref) {
|
|
|
6310
3795
|
var _useTranslation = reactI18next.useTranslation(),
|
|
6311
3796
|
t = _useTranslation.t;
|
|
6312
3797
|
var isTxtValidated = status === "active" || status === "pending_cname_validation";
|
|
6313
|
-
var camelCasedStatus = snakeToCamelCase(status || "");
|
|
3798
|
+
var camelCasedStatus = pure$1.snakeToCamelCase(status || "");
|
|
6314
3799
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6315
3800
|
className: classnames("flex gap-2", {
|
|
6316
3801
|
"flex-col items-start": stacked
|
|
@@ -6430,62 +3915,31 @@ var Record = function Record(_ref) {
|
|
|
6430
3915
|
style: "info"
|
|
6431
3916
|
}, recordDescription), /*#__PURE__*/React__default["default"].createElement(neetoui.Input, {
|
|
6432
3917
|
disabled: true,
|
|
6433
|
-
"data-cy": joinHyphenCase(recordNameLabel),
|
|
3918
|
+
"data-cy": utils.joinHyphenCase(recordNameLabel),
|
|
6434
3919
|
label: recordNameLabel,
|
|
6435
3920
|
value: recordName,
|
|
6436
3921
|
suffix: /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
6437
3922
|
icon: neetoIcons.Copy,
|
|
6438
3923
|
style: "text",
|
|
6439
3924
|
onClick: function onClick() {
|
|
6440
|
-
return copyToClipboard(recordName);
|
|
3925
|
+
return utils.copyToClipboard(recordName);
|
|
6441
3926
|
}
|
|
6442
3927
|
})
|
|
6443
3928
|
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Input, {
|
|
6444
3929
|
disabled: true,
|
|
6445
|
-
"data-cy": joinHyphenCase(recordValueLabel),
|
|
3930
|
+
"data-cy": utils.joinHyphenCase(recordValueLabel),
|
|
6446
3931
|
label: recordValueLabel,
|
|
6447
3932
|
value: recordValue,
|
|
6448
3933
|
suffix: /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
6449
3934
|
icon: neetoIcons.Copy,
|
|
6450
3935
|
style: "text",
|
|
6451
3936
|
onClick: function onClick() {
|
|
6452
|
-
return copyToClipboard(recordValue);
|
|
3937
|
+
return utils.copyToClipboard(recordValue);
|
|
6453
3938
|
}
|
|
6454
3939
|
})
|
|
6455
3940
|
}));
|
|
6456
3941
|
};
|
|
6457
3942
|
|
|
6458
|
-
dayjs__default["default"].extend(relativeTime__default["default"]);
|
|
6459
|
-
dayjs__default["default"].extend(updateLocale__default["default"]);
|
|
6460
|
-
var timeFormat = {
|
|
6461
|
-
fromNow: function fromNow(time) {
|
|
6462
|
-
return dayjs__default["default"](time).fromNow();
|
|
6463
|
-
},
|
|
6464
|
-
time: function time(_time) {
|
|
6465
|
-
return dayjs__default["default"](_time).format("h:mm A");
|
|
6466
|
-
},
|
|
6467
|
-
date: function date(time) {
|
|
6468
|
-
return dayjs__default["default"](time).format("MMM D, YYYY");
|
|
6469
|
-
},
|
|
6470
|
-
dateWeek: function dateWeek(time) {
|
|
6471
|
-
return dayjs__default["default"](time).format("MMM D, YYYY ddd");
|
|
6472
|
-
},
|
|
6473
|
-
dateWeekWithoutYear: function dateWeekWithoutYear(time) {
|
|
6474
|
-
return dayjs__default["default"](time).format("MMM D, ddd");
|
|
6475
|
-
},
|
|
6476
|
-
dateTime: function dateTime(time) {
|
|
6477
|
-
return dayjs__default["default"](time).format("MMM D, YYYY h:mm A");
|
|
6478
|
-
},
|
|
6479
|
-
dateWeekTime: function dateWeekTime(time) {
|
|
6480
|
-
return dayjs__default["default"](time).format("MMM D, YYYY ddd h:mm A");
|
|
6481
|
-
},
|
|
6482
|
-
extended: function extended(time) {
|
|
6483
|
-
var dateTime = dayjs__default["default"](time).format("dddd MMMM D, YYYY h:mm A");
|
|
6484
|
-
var fromNow = dayjs__default["default"](time).fromNow();
|
|
6485
|
-
return "".concat(dateTime, " (").concat(fromNow, ")");
|
|
6486
|
-
}
|
|
6487
|
-
};
|
|
6488
|
-
|
|
6489
3943
|
var CustomDomainInfo = function CustomDomainInfo(_ref) {
|
|
6490
3944
|
var time = _ref.time;
|
|
6491
3945
|
var _useTranslation = reactI18next.useTranslation(),
|
|
@@ -6504,7 +3958,7 @@ var CustomDomainInfo = function CustomDomainInfo(_ref) {
|
|
|
6504
3958
|
icon: neetoIcons.Info,
|
|
6505
3959
|
style: "info"
|
|
6506
3960
|
}, t("neetoCommons.customDomain.messageBlock.cnameAddedTime", {
|
|
6507
|
-
time: timeFormat.fromNow(time)
|
|
3961
|
+
time: utils.timeFormat.fromNow(time)
|
|
6508
3962
|
})));
|
|
6509
3963
|
};
|
|
6510
3964
|
|
|
@@ -6794,7 +4248,7 @@ var CustomDomain = function CustomDomain(_ref) {
|
|
|
6794
4248
|
})
|
|
6795
4249
|
}, headerProps)), isLoading && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6796
4250
|
className: "w-full h-screen"
|
|
6797
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.PageLoader, null)), !isLoading && (isNotEmpty(data === null || data === void 0 ? void 0 : data.customDomains) ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4251
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.PageLoader, null)), !isLoading && (pure$1.isNotEmpty(data === null || data === void 0 ? void 0 : data.customDomains) ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6798
4252
|
className: "w-full flex-grow"
|
|
6799
4253
|
}, /*#__PURE__*/React__default["default"].createElement(layouts.SubHeader, {
|
|
6800
4254
|
leftActionBlock: /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
@@ -6858,8 +4312,8 @@ var CustomDomain = function CustomDomain(_ref) {
|
|
|
6858
4312
|
}));
|
|
6859
4313
|
};
|
|
6860
4314
|
|
|
6861
|
-
var DateFormat = ramda.fromPairs(ramda.keys(timeFormat).map(function (key) {
|
|
6862
|
-
return [capitalize(key), function (_ref) {
|
|
4315
|
+
var DateFormat = ramda.fromPairs(ramda.keys(utils.timeFormat).map(function (key) {
|
|
4316
|
+
return [pure$1.capitalize(key), function (_ref) {
|
|
6863
4317
|
var date = _ref.date,
|
|
6864
4318
|
_ref$tooltipProps = _ref.tooltipProps,
|
|
6865
4319
|
tooltipProps = _ref$tooltipProps === void 0 ? {} : _ref$tooltipProps,
|
|
@@ -6868,9 +4322,9 @@ var DateFormat = ramda.fromPairs(ramda.keys(timeFormat).map(function (key) {
|
|
|
6868
4322
|
var dateDisplay = /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, _extends$4({
|
|
6869
4323
|
component: "span",
|
|
6870
4324
|
style: "body2"
|
|
6871
|
-
}, typographyProps), timeFormat[key](date));
|
|
4325
|
+
}, typographyProps), utils.timeFormat[key](date));
|
|
6872
4326
|
return key === "extended" ? dateDisplay : /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, _extends$4({
|
|
6873
|
-
content: timeFormat.extended(date),
|
|
4327
|
+
content: utils.timeFormat.extended(date),
|
|
6874
4328
|
position: "top"
|
|
6875
4329
|
}, tooltipProps), dateDisplay);
|
|
6876
4330
|
}];
|
|
@@ -10470,19 +7924,6 @@ var IpRestriction = function IpRestriction() {
|
|
|
10470
7924
|
}, /*#__PURE__*/React__default["default"].createElement(CurrentIp, null), /*#__PURE__*/React__default["default"].createElement(AllowedIpRanges, null)));
|
|
10471
7925
|
};
|
|
10472
7926
|
|
|
10473
|
-
var getGlobalShortcuts = function getGlobalShortcuts() {
|
|
10474
|
-
return _defineProperty({}, i18next__default["default"].t("neetoCommons.keyboardShortcuts.global.categoryName"), {
|
|
10475
|
-
openKeyboardShortcutsPane: {
|
|
10476
|
-
sequence: "shift+/",
|
|
10477
|
-
description: i18next__default["default"].t("neetoCommons.keyboardShortcuts.global.openKeyboardShortcutsPane")
|
|
10478
|
-
},
|
|
10479
|
-
close: {
|
|
10480
|
-
sequence: "esc",
|
|
10481
|
-
description: i18next__default["default"].t("neetoCommons.keyboardShortcuts.global.close")
|
|
10482
|
-
}
|
|
10483
|
-
});
|
|
10484
|
-
};
|
|
10485
|
-
|
|
10486
7927
|
var DisplayHotKey = function DisplayHotKey(_ref) {
|
|
10487
7928
|
var hotkey = _ref.hotkey;
|
|
10488
7929
|
var isSequentialHotkey = hotkey.includes(" ");
|
|
@@ -10525,6 +7966,18 @@ var shortenHotKey = function shortenHotKey(hotkey) {
|
|
|
10525
7966
|
});
|
|
10526
7967
|
return result;
|
|
10527
7968
|
};
|
|
7969
|
+
var getGlobalShortcuts = function getGlobalShortcuts() {
|
|
7970
|
+
return _defineProperty({}, i18next__default["default"].t("neetoCommons.keyboardShortcuts.global.categoryName"), {
|
|
7971
|
+
openKeyboardShortcutsPane: {
|
|
7972
|
+
sequence: "shift+/",
|
|
7973
|
+
description: i18next__default["default"].t("neetoCommons.keyboardShortcuts.global.openKeyboardShortcutsPane")
|
|
7974
|
+
},
|
|
7975
|
+
close: {
|
|
7976
|
+
sequence: "esc",
|
|
7977
|
+
description: i18next__default["default"].t("neetoCommons.keyboardShortcuts.global.close")
|
|
7978
|
+
}
|
|
7979
|
+
});
|
|
7980
|
+
};
|
|
10528
7981
|
|
|
10529
7982
|
var HotKeyList = function HotKeyList(_ref) {
|
|
10530
7983
|
var hotkeys = _ref.hotkeys;
|
|
@@ -10568,7 +8021,9 @@ var KeyboardShortcutsPane = function KeyboardShortcutsPane(_ref) {
|
|
|
10568
8021
|
setIsOpen = _useKeyboardShortcuts2[1];
|
|
10569
8022
|
var hasOverlays = managers.manager.hasOverlays();
|
|
10570
8023
|
var GLOBAL_SHORTCUTS = getGlobalShortcuts();
|
|
10571
|
-
var
|
|
8024
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
8025
|
+
t = _useTranslation.t;
|
|
8026
|
+
var shortcuts = GLOBAL_SHORTCUTS[t("neetoCommons.keyboardShortcuts.global.categoryName")];
|
|
10572
8027
|
useHotKeys(shortcuts.openKeyboardShortcutsPane.sequence, function () {
|
|
10573
8028
|
return setIsOpen(function (prevIsOpen) {
|
|
10574
8029
|
return !prevIsOpen;
|
|
@@ -10583,7 +8038,7 @@ var KeyboardShortcutsPane = function KeyboardShortcutsPane(_ref) {
|
|
|
10583
8038
|
});
|
|
10584
8039
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
10585
8040
|
className: classnames("neeto-commons-keyboard-shortcuts-pane neeto-ui-border-gray-300 transition-width ml-auto min-h-screen border-l bg-white duration-300 ease-in-out overflow-y-scroll", {
|
|
10586
|
-
"w-
|
|
8041
|
+
"w-80": isOpen,
|
|
10587
8042
|
"w-0": !isOpen,
|
|
10588
8043
|
absolute: hasOverlays,
|
|
10589
8044
|
"right-0": hasOverlays
|
|
@@ -10594,7 +8049,7 @@ var KeyboardShortcutsPane = function KeyboardShortcutsPane(_ref) {
|
|
|
10594
8049
|
className: "neeto-ui-border-gray-300 my-2 flex items-center justify-between border-b px-4 pb-2"
|
|
10595
8050
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
10596
8051
|
style: "h4"
|
|
10597
|
-
},
|
|
8052
|
+
}, t("neetoCommons.keyboardShortcuts.title")), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
10598
8053
|
icon: neetoIcons.Close,
|
|
10599
8054
|
style: "text",
|
|
10600
8055
|
onClick: function onClick() {
|
|
@@ -11696,7 +9151,7 @@ class TokenTreeEmitter extends TokenTree {
|
|
|
11696
9151
|
* @param {string} value
|
|
11697
9152
|
* @returns {RegExp}
|
|
11698
9153
|
* */
|
|
11699
|
-
function escape
|
|
9154
|
+
function escape(value) {
|
|
11700
9155
|
return new RegExp(value.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&'), 'm');
|
|
11701
9156
|
}
|
|
11702
9157
|
|
|
@@ -12857,7 +10312,7 @@ Syntax highlighting with language autodetection.
|
|
|
12857
10312
|
https://highlightjs.org/
|
|
12858
10313
|
*/
|
|
12859
10314
|
|
|
12860
|
-
const escape$1
|
|
10315
|
+
const escape$1 = escapeHTML;
|
|
12861
10316
|
const inherit$1 = inherit;
|
|
12862
10317
|
const NO_MATCH = Symbol("nomatch");
|
|
12863
10318
|
|
|
@@ -13167,7 +10622,7 @@ const HLJS = function(hljs) {
|
|
|
13167
10622
|
}
|
|
13168
10623
|
|
|
13169
10624
|
if (newMode && newMode.endSameAsBegin) {
|
|
13170
|
-
newMode.endRe = escape
|
|
10625
|
+
newMode.endRe = escape(lexeme);
|
|
13171
10626
|
}
|
|
13172
10627
|
|
|
13173
10628
|
if (newMode.skip) {
|
|
@@ -13396,14 +10851,14 @@ const HLJS = function(hljs) {
|
|
|
13396
10851
|
},
|
|
13397
10852
|
sofar: result,
|
|
13398
10853
|
relevance: 0,
|
|
13399
|
-
value: escape$1
|
|
10854
|
+
value: escape$1(codeToHighlight),
|
|
13400
10855
|
emitter: emitter
|
|
13401
10856
|
};
|
|
13402
10857
|
} else if (SAFE_MODE) {
|
|
13403
10858
|
return {
|
|
13404
10859
|
illegal: false,
|
|
13405
10860
|
relevance: 0,
|
|
13406
|
-
value: escape$1
|
|
10861
|
+
value: escape$1(codeToHighlight),
|
|
13407
10862
|
emitter: emitter,
|
|
13408
10863
|
language: languageName,
|
|
13409
10864
|
top: top,
|
|
@@ -13426,7 +10881,7 @@ const HLJS = function(hljs) {
|
|
|
13426
10881
|
const result = {
|
|
13427
10882
|
relevance: 0,
|
|
13428
10883
|
emitter: new options.__emitter(options),
|
|
13429
|
-
value: escape$1
|
|
10884
|
+
value: escape$1(code),
|
|
13430
10885
|
illegal: false,
|
|
13431
10886
|
top: PLAINTEXT_LANGUAGE
|
|
13432
10887
|
};
|
|
@@ -59126,6 +56581,37 @@ var supportedLanguages$1 = ['1c', 'abnf', 'accesslog', 'actionscript', 'ada', 'a
|
|
|
59126
56581
|
var highlighter$1 = highlight$3(lowlight, defaultStyle$1);
|
|
59127
56582
|
highlighter$1.supportedLanguages = supportedLanguages$1;
|
|
59128
56583
|
|
|
56584
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
56585
|
+
try {
|
|
56586
|
+
var info = gen[key](arg);
|
|
56587
|
+
var value = info.value;
|
|
56588
|
+
} catch (error) {
|
|
56589
|
+
reject(error);
|
|
56590
|
+
return;
|
|
56591
|
+
}
|
|
56592
|
+
if (info.done) {
|
|
56593
|
+
resolve(value);
|
|
56594
|
+
} else {
|
|
56595
|
+
Promise.resolve(value).then(_next, _throw);
|
|
56596
|
+
}
|
|
56597
|
+
}
|
|
56598
|
+
function _asyncToGenerator(fn) {
|
|
56599
|
+
return function () {
|
|
56600
|
+
var self = this,
|
|
56601
|
+
args = arguments;
|
|
56602
|
+
return new Promise(function (resolve, reject) {
|
|
56603
|
+
var gen = fn.apply(self, args);
|
|
56604
|
+
function _next(value) {
|
|
56605
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
56606
|
+
}
|
|
56607
|
+
function _throw(err) {
|
|
56608
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
56609
|
+
}
|
|
56610
|
+
_next(undefined);
|
|
56611
|
+
});
|
|
56612
|
+
};
|
|
56613
|
+
}
|
|
56614
|
+
|
|
59129
56615
|
function _classCallCheck(instance, Constructor) {
|
|
59130
56616
|
if (!(instance instanceof Constructor)) {
|
|
59131
56617
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -59198,6 +56684,345 @@ function _getPrototypeOf(o) {
|
|
|
59198
56684
|
return _getPrototypeOf(o);
|
|
59199
56685
|
}
|
|
59200
56686
|
|
|
56687
|
+
var regeneratorRuntime$1 = {exports: {}};
|
|
56688
|
+
|
|
56689
|
+
var _typeof = {exports: {}};
|
|
56690
|
+
|
|
56691
|
+
(function (module) {
|
|
56692
|
+
function _typeof(obj) {
|
|
56693
|
+
"@babel/helpers - typeof";
|
|
56694
|
+
|
|
56695
|
+
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
56696
|
+
return typeof obj;
|
|
56697
|
+
} : function (obj) {
|
|
56698
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
56699
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
56700
|
+
}
|
|
56701
|
+
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
56702
|
+
} (_typeof));
|
|
56703
|
+
|
|
56704
|
+
(function (module) {
|
|
56705
|
+
var _typeof$1 = _typeof.exports["default"];
|
|
56706
|
+
function _regeneratorRuntime() {
|
|
56707
|
+
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
56708
|
+
return exports;
|
|
56709
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
56710
|
+
var exports = {},
|
|
56711
|
+
Op = Object.prototype,
|
|
56712
|
+
hasOwn = Op.hasOwnProperty,
|
|
56713
|
+
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
56714
|
+
obj[key] = desc.value;
|
|
56715
|
+
},
|
|
56716
|
+
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
56717
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
56718
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
56719
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
56720
|
+
function define(obj, key, value) {
|
|
56721
|
+
return Object.defineProperty(obj, key, {
|
|
56722
|
+
value: value,
|
|
56723
|
+
enumerable: !0,
|
|
56724
|
+
configurable: !0,
|
|
56725
|
+
writable: !0
|
|
56726
|
+
}), obj[key];
|
|
56727
|
+
}
|
|
56728
|
+
try {
|
|
56729
|
+
define({}, "");
|
|
56730
|
+
} catch (err) {
|
|
56731
|
+
define = function define(obj, key, value) {
|
|
56732
|
+
return obj[key] = value;
|
|
56733
|
+
};
|
|
56734
|
+
}
|
|
56735
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
56736
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
56737
|
+
generator = Object.create(protoGenerator.prototype),
|
|
56738
|
+
context = new Context(tryLocsList || []);
|
|
56739
|
+
return defineProperty(generator, "_invoke", {
|
|
56740
|
+
value: makeInvokeMethod(innerFn, self, context)
|
|
56741
|
+
}), generator;
|
|
56742
|
+
}
|
|
56743
|
+
function tryCatch(fn, obj, arg) {
|
|
56744
|
+
try {
|
|
56745
|
+
return {
|
|
56746
|
+
type: "normal",
|
|
56747
|
+
arg: fn.call(obj, arg)
|
|
56748
|
+
};
|
|
56749
|
+
} catch (err) {
|
|
56750
|
+
return {
|
|
56751
|
+
type: "throw",
|
|
56752
|
+
arg: err
|
|
56753
|
+
};
|
|
56754
|
+
}
|
|
56755
|
+
}
|
|
56756
|
+
exports.wrap = wrap;
|
|
56757
|
+
var ContinueSentinel = {};
|
|
56758
|
+
function Generator() {}
|
|
56759
|
+
function GeneratorFunction() {}
|
|
56760
|
+
function GeneratorFunctionPrototype() {}
|
|
56761
|
+
var IteratorPrototype = {};
|
|
56762
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
56763
|
+
return this;
|
|
56764
|
+
});
|
|
56765
|
+
var getProto = Object.getPrototypeOf,
|
|
56766
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
56767
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
56768
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
56769
|
+
function defineIteratorMethods(prototype) {
|
|
56770
|
+
["next", "throw", "return"].forEach(function (method) {
|
|
56771
|
+
define(prototype, method, function (arg) {
|
|
56772
|
+
return this._invoke(method, arg);
|
|
56773
|
+
});
|
|
56774
|
+
});
|
|
56775
|
+
}
|
|
56776
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
56777
|
+
function invoke(method, arg, resolve, reject) {
|
|
56778
|
+
var record = tryCatch(generator[method], generator, arg);
|
|
56779
|
+
if ("throw" !== record.type) {
|
|
56780
|
+
var result = record.arg,
|
|
56781
|
+
value = result.value;
|
|
56782
|
+
return value && "object" == _typeof$1(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
56783
|
+
invoke("next", value, resolve, reject);
|
|
56784
|
+
}, function (err) {
|
|
56785
|
+
invoke("throw", err, resolve, reject);
|
|
56786
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
56787
|
+
result.value = unwrapped, resolve(result);
|
|
56788
|
+
}, function (error) {
|
|
56789
|
+
return invoke("throw", error, resolve, reject);
|
|
56790
|
+
});
|
|
56791
|
+
}
|
|
56792
|
+
reject(record.arg);
|
|
56793
|
+
}
|
|
56794
|
+
var previousPromise;
|
|
56795
|
+
defineProperty(this, "_invoke", {
|
|
56796
|
+
value: function value(method, arg) {
|
|
56797
|
+
function callInvokeWithMethodAndArg() {
|
|
56798
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
56799
|
+
invoke(method, arg, resolve, reject);
|
|
56800
|
+
});
|
|
56801
|
+
}
|
|
56802
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
56803
|
+
}
|
|
56804
|
+
});
|
|
56805
|
+
}
|
|
56806
|
+
function makeInvokeMethod(innerFn, self, context) {
|
|
56807
|
+
var state = "suspendedStart";
|
|
56808
|
+
return function (method, arg) {
|
|
56809
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
|
56810
|
+
if ("completed" === state) {
|
|
56811
|
+
if ("throw" === method) throw arg;
|
|
56812
|
+
return doneResult();
|
|
56813
|
+
}
|
|
56814
|
+
for (context.method = method, context.arg = arg;;) {
|
|
56815
|
+
var delegate = context.delegate;
|
|
56816
|
+
if (delegate) {
|
|
56817
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
56818
|
+
if (delegateResult) {
|
|
56819
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
56820
|
+
return delegateResult;
|
|
56821
|
+
}
|
|
56822
|
+
}
|
|
56823
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
56824
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
56825
|
+
context.dispatchException(context.arg);
|
|
56826
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
56827
|
+
state = "executing";
|
|
56828
|
+
var record = tryCatch(innerFn, self, context);
|
|
56829
|
+
if ("normal" === record.type) {
|
|
56830
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
56831
|
+
return {
|
|
56832
|
+
value: record.arg,
|
|
56833
|
+
done: context.done
|
|
56834
|
+
};
|
|
56835
|
+
}
|
|
56836
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
56837
|
+
}
|
|
56838
|
+
};
|
|
56839
|
+
}
|
|
56840
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
56841
|
+
var methodName = context.method,
|
|
56842
|
+
method = delegate.iterator[methodName];
|
|
56843
|
+
if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
|
|
56844
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
56845
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
56846
|
+
var info = record.arg;
|
|
56847
|
+
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
|
56848
|
+
}
|
|
56849
|
+
function pushTryEntry(locs) {
|
|
56850
|
+
var entry = {
|
|
56851
|
+
tryLoc: locs[0]
|
|
56852
|
+
};
|
|
56853
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
56854
|
+
}
|
|
56855
|
+
function resetTryEntry(entry) {
|
|
56856
|
+
var record = entry.completion || {};
|
|
56857
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
|
56858
|
+
}
|
|
56859
|
+
function Context(tryLocsList) {
|
|
56860
|
+
this.tryEntries = [{
|
|
56861
|
+
tryLoc: "root"
|
|
56862
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
56863
|
+
}
|
|
56864
|
+
function values(iterable) {
|
|
56865
|
+
if (iterable) {
|
|
56866
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
56867
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
56868
|
+
if ("function" == typeof iterable.next) return iterable;
|
|
56869
|
+
if (!isNaN(iterable.length)) {
|
|
56870
|
+
var i = -1,
|
|
56871
|
+
next = function next() {
|
|
56872
|
+
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
56873
|
+
return next.value = undefined, next.done = !0, next;
|
|
56874
|
+
};
|
|
56875
|
+
return next.next = next;
|
|
56876
|
+
}
|
|
56877
|
+
}
|
|
56878
|
+
return {
|
|
56879
|
+
next: doneResult
|
|
56880
|
+
};
|
|
56881
|
+
}
|
|
56882
|
+
function doneResult() {
|
|
56883
|
+
return {
|
|
56884
|
+
value: undefined,
|
|
56885
|
+
done: !0
|
|
56886
|
+
};
|
|
56887
|
+
}
|
|
56888
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
56889
|
+
value: GeneratorFunctionPrototype,
|
|
56890
|
+
configurable: !0
|
|
56891
|
+
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
56892
|
+
value: GeneratorFunction,
|
|
56893
|
+
configurable: !0
|
|
56894
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
56895
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
56896
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
56897
|
+
}, exports.mark = function (genFun) {
|
|
56898
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
56899
|
+
}, exports.awrap = function (arg) {
|
|
56900
|
+
return {
|
|
56901
|
+
__await: arg
|
|
56902
|
+
};
|
|
56903
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
56904
|
+
return this;
|
|
56905
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
56906
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
56907
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
56908
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
56909
|
+
return result.done ? result.value : iter.next();
|
|
56910
|
+
});
|
|
56911
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
56912
|
+
return this;
|
|
56913
|
+
}), define(Gp, "toString", function () {
|
|
56914
|
+
return "[object Generator]";
|
|
56915
|
+
}), exports.keys = function (val) {
|
|
56916
|
+
var object = Object(val),
|
|
56917
|
+
keys = [];
|
|
56918
|
+
for (var key in object) keys.push(key);
|
|
56919
|
+
return keys.reverse(), function next() {
|
|
56920
|
+
for (; keys.length;) {
|
|
56921
|
+
var key = keys.pop();
|
|
56922
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
|
56923
|
+
}
|
|
56924
|
+
return next.done = !0, next;
|
|
56925
|
+
};
|
|
56926
|
+
}, exports.values = values, Context.prototype = {
|
|
56927
|
+
constructor: Context,
|
|
56928
|
+
reset: function reset(skipTempReset) {
|
|
56929
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
|
56930
|
+
},
|
|
56931
|
+
stop: function stop() {
|
|
56932
|
+
this.done = !0;
|
|
56933
|
+
var rootRecord = this.tryEntries[0].completion;
|
|
56934
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
56935
|
+
return this.rval;
|
|
56936
|
+
},
|
|
56937
|
+
dispatchException: function dispatchException(exception) {
|
|
56938
|
+
if (this.done) throw exception;
|
|
56939
|
+
var context = this;
|
|
56940
|
+
function handle(loc, caught) {
|
|
56941
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
56942
|
+
}
|
|
56943
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
56944
|
+
var entry = this.tryEntries[i],
|
|
56945
|
+
record = entry.completion;
|
|
56946
|
+
if ("root" === entry.tryLoc) return handle("end");
|
|
56947
|
+
if (entry.tryLoc <= this.prev) {
|
|
56948
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
56949
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
56950
|
+
if (hasCatch && hasFinally) {
|
|
56951
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
56952
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
56953
|
+
} else if (hasCatch) {
|
|
56954
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
56955
|
+
} else {
|
|
56956
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
56957
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
56958
|
+
}
|
|
56959
|
+
}
|
|
56960
|
+
}
|
|
56961
|
+
},
|
|
56962
|
+
abrupt: function abrupt(type, arg) {
|
|
56963
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
56964
|
+
var entry = this.tryEntries[i];
|
|
56965
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
56966
|
+
var finallyEntry = entry;
|
|
56967
|
+
break;
|
|
56968
|
+
}
|
|
56969
|
+
}
|
|
56970
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
56971
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
56972
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
56973
|
+
},
|
|
56974
|
+
complete: function complete(record, afterLoc) {
|
|
56975
|
+
if ("throw" === record.type) throw record.arg;
|
|
56976
|
+
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
|
56977
|
+
},
|
|
56978
|
+
finish: function finish(finallyLoc) {
|
|
56979
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
56980
|
+
var entry = this.tryEntries[i];
|
|
56981
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
56982
|
+
}
|
|
56983
|
+
},
|
|
56984
|
+
"catch": function _catch(tryLoc) {
|
|
56985
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
56986
|
+
var entry = this.tryEntries[i];
|
|
56987
|
+
if (entry.tryLoc === tryLoc) {
|
|
56988
|
+
var record = entry.completion;
|
|
56989
|
+
if ("throw" === record.type) {
|
|
56990
|
+
var thrown = record.arg;
|
|
56991
|
+
resetTryEntry(entry);
|
|
56992
|
+
}
|
|
56993
|
+
return thrown;
|
|
56994
|
+
}
|
|
56995
|
+
}
|
|
56996
|
+
throw new Error("illegal catch attempt");
|
|
56997
|
+
},
|
|
56998
|
+
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
|
|
56999
|
+
return this.delegate = {
|
|
57000
|
+
iterator: values(iterable),
|
|
57001
|
+
resultName: resultName,
|
|
57002
|
+
nextLoc: nextLoc
|
|
57003
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
57004
|
+
}
|
|
57005
|
+
}, exports;
|
|
57006
|
+
}
|
|
57007
|
+
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
57008
|
+
} (regeneratorRuntime$1));
|
|
57009
|
+
|
|
57010
|
+
// TODO(Babel 8): Remove this file.
|
|
57011
|
+
|
|
57012
|
+
var runtime = regeneratorRuntime$1.exports();
|
|
57013
|
+
var regenerator = runtime;
|
|
57014
|
+
|
|
57015
|
+
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
|
|
57016
|
+
try {
|
|
57017
|
+
regeneratorRuntime = runtime;
|
|
57018
|
+
} catch (accidentalStrictMode) {
|
|
57019
|
+
if (typeof globalThis === "object") {
|
|
57020
|
+
globalThis.regeneratorRuntime = runtime;
|
|
57021
|
+
} else {
|
|
57022
|
+
Function("r", "regeneratorRuntime = r")(runtime);
|
|
57023
|
+
}
|
|
57024
|
+
}
|
|
57025
|
+
|
|
59201
57026
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
59202
57027
|
|
|
59203
57028
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -93183,7 +91008,7 @@ var CodeBlock = function CodeBlock(_ref) {
|
|
|
93183
91008
|
style: "primary",
|
|
93184
91009
|
label: isCopied ? t("neetoCommons.widget.installation.snippet.copied") : t("neetoCommons.widget.installation.snippet.copy"),
|
|
93185
91010
|
onClick: function onClick() {
|
|
93186
|
-
return copyToClipboard(codeString);
|
|
91011
|
+
return utils.copyToClipboard(codeString);
|
|
93187
91012
|
}
|
|
93188
91013
|
}))), /*#__PURE__*/React__default["default"].createElement(SyntaxHighlighter, {
|
|
93189
91014
|
className: "neeto-ui-bg-gray-800 m-0",
|
|
@@ -93291,7 +91116,7 @@ var getEmailWidgetSnippetFormInitialValues = function getEmailWidgetSnippetFormI
|
|
|
93291
91116
|
var getSelectedWidgetsCombinedText = function getSelectedWidgetsCombinedText(widgets) {
|
|
93292
91117
|
var withHtml = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
93293
91118
|
var prefixedWidgets = widgets.map(function (widget) {
|
|
93294
|
-
return "neeto".concat(capitalize(widget));
|
|
91119
|
+
return "neeto".concat(pure$1.capitalize(widget));
|
|
93295
91120
|
});
|
|
93296
91121
|
if (prefixedWidgets.length === 1) {
|
|
93297
91122
|
return prefixedWidgets[0];
|
|
@@ -93307,7 +91132,7 @@ var CodeSnippet = function CodeSnippet(_ref) {
|
|
|
93307
91132
|
var isPaneOpen = _ref.isPaneOpen,
|
|
93308
91133
|
onClose = _ref.onClose,
|
|
93309
91134
|
_ref$onSent = _ref.onSent,
|
|
93310
|
-
onSent = _ref$onSent === void 0 ? noop
|
|
91135
|
+
onSent = _ref$onSent === void 0 ? pure$1.noop : _ref$onSent,
|
|
93311
91136
|
codeString = _ref.codeString,
|
|
93312
91137
|
_ref$subject = _ref.subject,
|
|
93313
91138
|
subject = _ref$subject === void 0 ? "" : _ref$subject,
|
|
@@ -93422,7 +91247,7 @@ var SelectionTabs = function SelectionTabs(_ref) {
|
|
|
93422
91247
|
var selectedWidgets = _ref.selectedWidgets,
|
|
93423
91248
|
updateSelectedWidgets = _ref.updateSelectedWidgets,
|
|
93424
91249
|
primarySelectedWidget = _ref.primarySelectedWidget;
|
|
93425
|
-
var formattedPrimaryWidget = capitalize(WIDGET_TYPES_VALUES.includes(primarySelectedWidget) ? primarySelectedWidget : "");
|
|
91250
|
+
var formattedPrimaryWidget = pure$1.capitalize(WIDGET_TYPES_VALUES.includes(primarySelectedWidget) ? primarySelectedWidget : "");
|
|
93426
91251
|
var renderSelectedTab = function renderSelectedTab() {
|
|
93427
91252
|
return WIDGET_TYPES_VALUES.map(function (widget) {
|
|
93428
91253
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -93430,7 +91255,7 @@ var SelectionTabs = function SelectionTabs(_ref) {
|
|
|
93430
91255
|
key: widget
|
|
93431
91256
|
}, primarySelectedWidget !== widget ? /*#__PURE__*/React__default["default"].createElement(neetoui.Switch, {
|
|
93432
91257
|
checked: selectedWidgets.includes(widget),
|
|
93433
|
-
label: "neeto".concat(capitalize(widget)),
|
|
91258
|
+
label: "neeto".concat(pure$1.capitalize(widget)),
|
|
93434
91259
|
onChange: function onChange() {
|
|
93435
91260
|
return updateSelectedWidgets(widget);
|
|
93436
91261
|
}
|
|
@@ -93634,7 +91459,7 @@ var EmbedCode = function EmbedCode(_ref) {
|
|
|
93634
91459
|
})
|
|
93635
91460
|
},
|
|
93636
91461
|
values: {
|
|
93637
|
-
selectedWidgets: isNotEmpty(selectedWidgets) ? getSelectedWidgetsCombinedText(selectedWidgets, true) : "none of the widgets"
|
|
91462
|
+
selectedWidgets: pure$1.isNotEmpty(selectedWidgets) ? getSelectedWidgetsCombinedText(selectedWidgets, true) : "none of the widgets"
|
|
93638
91463
|
}
|
|
93639
91464
|
}, "Place the embed code in your HTML file. This will embed the selected widgets in your website."))), enabledWidgets.chat || enabledWidgets.replay ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
93640
91465
|
className: "mx-auto w-full max-w-2xl flex-grow flex-col items-center justify-start mb-6"
|
|
@@ -93685,7 +91510,7 @@ var EmbedCode = function EmbedCode(_ref) {
|
|
|
93685
91510
|
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
93686
91511
|
className: "w-full"
|
|
93687
91512
|
}, t("neetoCommons.widget.installation.instructions.sessionContext"))) : null, /*#__PURE__*/React__default["default"].createElement(CodeSnippet, _extends$4({
|
|
93688
|
-
isPaneOpen: !!emailType && isNotEmpty(selectedWidgets),
|
|
91513
|
+
isPaneOpen: !!emailType && pure$1.isNotEmpty(selectedWidgets),
|
|
93689
91514
|
onClose: function onClose() {
|
|
93690
91515
|
return setEmailType(EMAIL_TYPES["null"]);
|
|
93691
91516
|
}
|
|
@@ -93815,6 +91640,37 @@ var PublishBlock = function PublishBlock(_ref) {
|
|
|
93815
91640
|
};
|
|
93816
91641
|
PublishBlock.Alert = AlertBlock;
|
|
93817
91642
|
|
|
91643
|
+
dayjs__default["default"].extend(relativeTime__default["default"]);
|
|
91644
|
+
dayjs__default["default"].extend(updateLocale__default["default"]);
|
|
91645
|
+
var timeFormat = {
|
|
91646
|
+
fromNow: function fromNow(time) {
|
|
91647
|
+
return dayjs__default["default"](time).fromNow();
|
|
91648
|
+
},
|
|
91649
|
+
time: function time(_time) {
|
|
91650
|
+
return dayjs__default["default"](_time).format("h:mm A");
|
|
91651
|
+
},
|
|
91652
|
+
date: function date(time) {
|
|
91653
|
+
return dayjs__default["default"](time).format("MMM D, YYYY");
|
|
91654
|
+
},
|
|
91655
|
+
dateWeek: function dateWeek(time) {
|
|
91656
|
+
return dayjs__default["default"](time).format("MMM D, YYYY ddd");
|
|
91657
|
+
},
|
|
91658
|
+
dateWeekWithoutYear: function dateWeekWithoutYear(time) {
|
|
91659
|
+
return dayjs__default["default"](time).format("MMM D, ddd");
|
|
91660
|
+
},
|
|
91661
|
+
dateTime: function dateTime(time) {
|
|
91662
|
+
return dayjs__default["default"](time).format("MMM D, YYYY h:mm A");
|
|
91663
|
+
},
|
|
91664
|
+
dateWeekTime: function dateWeekTime(time) {
|
|
91665
|
+
return dayjs__default["default"](time).format("MMM D, YYYY ddd h:mm A");
|
|
91666
|
+
},
|
|
91667
|
+
extended: function extended(time) {
|
|
91668
|
+
var dateTime = dayjs__default["default"](time).format("dddd MMMM D, YYYY h:mm A");
|
|
91669
|
+
var fromNow = dayjs__default["default"](time).fromNow();
|
|
91670
|
+
return "".concat(dateTime, " (").concat(fromNow, ")");
|
|
91671
|
+
}
|
|
91672
|
+
};
|
|
91673
|
+
|
|
93818
91674
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
93819
91675
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
93820
91676
|
var REMOVE_SELECT_DOWN_ARROW = {
|
|
@@ -93833,6 +91689,7 @@ var BLUR_TEXT_WHEN_SELECT_MENU_IS_OPEN = {
|
|
|
93833
91689
|
}
|
|
93834
91690
|
};
|
|
93835
91691
|
var SLOT_TIME_FORMAT = "hh:mm A";
|
|
91692
|
+
var END_OF_DAY = "11:59 PM";
|
|
93836
91693
|
|
|
93837
91694
|
var INTERVALS = ["year", "quarter", "month", "week", "day", "hour", "minute", "second"];
|
|
93838
91695
|
|
|
@@ -93987,7 +91844,7 @@ var findIndicesOfOverlappingRangesInPeriods = function findIndicesOfOverlappingR
|
|
|
93987
91844
|
var range1 = _ref2.range1,
|
|
93988
91845
|
range2 = _ref2.range2,
|
|
93989
91846
|
periods = _ref2.periods;
|
|
93990
|
-
var firstIndex = findIndexBy({
|
|
91847
|
+
var firstIndex = pure$1.findIndexBy({
|
|
93991
91848
|
startTime: range1.startDate.format(SLOT_TIME_FORMAT)
|
|
93992
91849
|
}, periods);
|
|
93993
91850
|
var secondIndex = periods.findIndex(function (slot, index) {
|
|
@@ -94067,12 +91924,12 @@ var DisplayAvailability = function DisplayAvailability(_ref) {
|
|
|
94067
91924
|
key: day
|
|
94068
91925
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
94069
91926
|
className: "mt-0.5 w-16 text-gray-700",
|
|
94070
|
-
"data-cy": joinHyphenCase(day, "day-text"),
|
|
91927
|
+
"data-cy": utils.joinHyphenCase(day, "day-text"),
|
|
94071
91928
|
style: "h5",
|
|
94072
91929
|
weight: "semibold"
|
|
94073
91930
|
}, t("neetoCommons.schedule.days.".concat(day))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
94074
91931
|
className: "flex w-9/12 flex-col items-center space-y-4"
|
|
94075
|
-
}, isPresent(periods[day]) ? (_sortPeriodsByKey = sortPeriodsByKey({
|
|
91932
|
+
}, pure$1.isPresent(periods[day]) ? (_sortPeriodsByKey = sortPeriodsByKey({
|
|
94076
91933
|
periods: periods[day],
|
|
94077
91934
|
key: "startTime",
|
|
94078
91935
|
order: "asc"
|
|
@@ -94085,7 +91942,7 @@ var DisplayAvailability = function DisplayAvailability(_ref) {
|
|
|
94085
91942
|
lineHeight: "relaxed",
|
|
94086
91943
|
style: "h5",
|
|
94087
91944
|
weight: "semibold",
|
|
94088
|
-
"data-cy": joinHyphenCase(day, period.startTime, "start-time-text")
|
|
91945
|
+
"data-cy": utils.joinHyphenCase(day, period.startTime, "start-time-text")
|
|
94089
91946
|
}, period.startTime), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
94090
91947
|
className: "text-gray-600",
|
|
94091
91948
|
component: "span"
|
|
@@ -94094,11 +91951,11 @@ var DisplayAvailability = function DisplayAvailability(_ref) {
|
|
|
94094
91951
|
lineHeight: "relaxed",
|
|
94095
91952
|
style: "h5",
|
|
94096
91953
|
weight: "semibold",
|
|
94097
|
-
"data-cy": joinHyphenCase(day, period.endTime, "start-time-text")
|
|
91954
|
+
"data-cy": utils.joinHyphenCase(day, period.endTime, "start-time-text")
|
|
94098
91955
|
}, period.endTime));
|
|
94099
91956
|
}) : /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
94100
91957
|
className: "mx-8 mt-0.5 text-gray-700",
|
|
94101
|
-
"data-cy": joinHyphenCase(day, "unavailable-time-text"),
|
|
91958
|
+
"data-cy": utils.joinHyphenCase(day, "unavailable-time-text"),
|
|
94102
91959
|
lineHeight: "relaxed",
|
|
94103
91960
|
style: "h5"
|
|
94104
91961
|
}, t("neetoCommons.schedule.unavailable"))));
|
|
@@ -94116,6 +91973,7 @@ var buildSlotIntervals = function buildSlotIntervals(_ref) {
|
|
|
94116
91973
|
value: selectedValue
|
|
94117
91974
|
};
|
|
94118
91975
|
var allIntervalsForADay = dayjsExtended.timeIntervalsForDay(interval);
|
|
91976
|
+
allIntervalsForADay.push(END_OF_DAY);
|
|
94119
91977
|
var uniqBookedSlots = ramda.uniq(ramda.pluck(slotType, bookedSlots));
|
|
94120
91978
|
var slotsAvailableForBooking = ramda.difference(allIntervalsForADay, uniqBookedSlots);
|
|
94121
91979
|
var slots = slotsAvailableForBooking.map(toLabelAndValue);
|
|
@@ -94299,7 +92157,7 @@ var Form = function Form(_ref) {
|
|
|
94299
92157
|
setFieldValue("wdays[".concat(index, "].available"), true);
|
|
94300
92158
|
if ((_deletedPeriods$ = deletedPeriods[0]) !== null && _deletedPeriods$ !== void 0 && _deletedPeriods$.startTime) {
|
|
94301
92159
|
restoreDeletedPeriods(setFieldValue);
|
|
94302
|
-
} else if (isNotPresent(values.wdays[index].periods)) {
|
|
92160
|
+
} else if (pure$1.isNotPresent(values.wdays[index].periods)) {
|
|
94303
92161
|
setFieldValue("wdays[".concat(index, "].periods"), [addDefaultPeriod(day)]);
|
|
94304
92162
|
} else {
|
|
94305
92163
|
setFieldValue("wdays[".concat(index, "].periods"), [""]);
|
|
@@ -94324,7 +92182,7 @@ var Form = function Form(_ref) {
|
|
|
94324
92182
|
}, /*#__PURE__*/React__default["default"].createElement(formik$1.Checkbox, {
|
|
94325
92183
|
"aria-label": "wdays[".concat(index, "].available"),
|
|
94326
92184
|
checked: values.wdays[index].available,
|
|
94327
|
-
"data-cy": joinHyphenCase(day, "weekly-hours-checkbox"),
|
|
92185
|
+
"data-cy": utils.joinHyphenCase(day, "weekly-hours-checkbox"),
|
|
94328
92186
|
id: "day",
|
|
94329
92187
|
name: "wdays[".concat(index, "].available"),
|
|
94330
92188
|
onChange: function onChange() {
|
|
@@ -94333,7 +92191,7 @@ var Form = function Form(_ref) {
|
|
|
94333
92191
|
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
94334
92192
|
className: "ml-2 capitalize",
|
|
94335
92193
|
component: "span",
|
|
94336
|
-
"data-cy": joinHyphenCase(day, "day-text"),
|
|
92194
|
+
"data-cy": utils.joinHyphenCase(day, "day-text"),
|
|
94337
92195
|
style: "body2",
|
|
94338
92196
|
weight: "semibold"
|
|
94339
92197
|
}, t("neetoCommons.schedule.days.".concat(day)))), /*#__PURE__*/React__default["default"].createElement(ScheduleRow, {
|
|
@@ -94353,7 +92211,7 @@ var Form = function Form(_ref) {
|
|
|
94353
92211
|
hideAfter: 5000
|
|
94354
92212
|
},
|
|
94355
92213
|
className: "flex-shrink-0",
|
|
94356
|
-
"data-testid": joinHyphenCase(day, "copy-schedule-icon")
|
|
92214
|
+
"data-testid": utils.joinHyphenCase(day, "copy-schedule-icon")
|
|
94357
92215
|
},
|
|
94358
92216
|
onClose: function onClose() {
|
|
94359
92217
|
return setWdaysToCopy([]);
|
|
@@ -94379,7 +92237,7 @@ var Form = function Form(_ref) {
|
|
|
94379
92237
|
}
|
|
94380
92238
|
})));
|
|
94381
92239
|
}), /*#__PURE__*/React__default["default"].createElement("li", null, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
94382
|
-
disabled: isNotPresent(wdaysToCopy),
|
|
92240
|
+
disabled: pure$1.isNotPresent(wdaysToCopy),
|
|
94383
92241
|
label: "Submit",
|
|
94384
92242
|
size: "small",
|
|
94385
92243
|
onClick: function onClick() {
|
|
@@ -94514,14 +92372,14 @@ var Header = function Header(_ref) {
|
|
|
94514
92372
|
var Schedule = /*#__PURE__*/React.forwardRef(function (_ref, scheduleRef) {
|
|
94515
92373
|
var periods = _ref.periods,
|
|
94516
92374
|
_ref$handleSubmit = _ref.handleSubmit,
|
|
94517
|
-
handleSubmit = _ref$handleSubmit === void 0 ? noop
|
|
92375
|
+
handleSubmit = _ref$handleSubmit === void 0 ? pure$1.noop : _ref$handleSubmit,
|
|
94518
92376
|
_ref$isEditing = _ref.isEditing,
|
|
94519
92377
|
isEditing = _ref$isEditing === void 0 ? false : _ref$isEditing,
|
|
94520
92378
|
setIsEditing = _ref.setIsEditing,
|
|
94521
92379
|
_ref$showHeader = _ref.showHeader,
|
|
94522
92380
|
showHeader = _ref$showHeader === void 0 ? true : _ref$showHeader,
|
|
94523
92381
|
_ref$handleValuesChan = _ref.handleValuesChanged,
|
|
94524
|
-
handleValuesChanged = _ref$handleValuesChan === void 0 ? noop
|
|
92382
|
+
handleValuesChanged = _ref$handleValuesChan === void 0 ? pure$1.noop : _ref$handleValuesChan;
|
|
94525
92383
|
var handleCopy = function handleCopy(_ref2) {
|
|
94526
92384
|
var _values$wdays$index$p;
|
|
94527
92385
|
var values = _ref2.values,
|
|
@@ -94531,7 +92389,7 @@ var Schedule = /*#__PURE__*/React.forwardRef(function (_ref, scheduleRef) {
|
|
|
94531
92389
|
var newPeriods = (_values$wdays$index$p = values.wdays[index].periods) === null || _values$wdays$index$p === void 0 ? void 0 : _values$wdays$index$p.map(ramda.pick(["startTime", "endTime"]));
|
|
94532
92390
|
wdaysToCopy.forEach(function (wday) {
|
|
94533
92391
|
var dayIndex = DAYS.indexOf(wday);
|
|
94534
|
-
setFieldValue("wdays[".concat(dayIndex, "].available"), isPresent(values.wdays[index].periods));
|
|
92392
|
+
setFieldValue("wdays[".concat(dayIndex, "].available"), pure$1.isPresent(values.wdays[index].periods));
|
|
94535
92393
|
setFieldValue("wdays[".concat(dayIndex, "].periods"), newPeriods.map(function (period) {
|
|
94536
92394
|
return ramda.assoc("wday", wday, period);
|
|
94537
92395
|
}));
|
|
@@ -94630,6 +92488,7 @@ var Link = function Link(_ref) {
|
|
|
94630
92488
|
entityName = _ref.entityName,
|
|
94631
92489
|
handleRegenerate = _ref.handleRegenerate,
|
|
94632
92490
|
isRegenerating = _ref.isRegenerating,
|
|
92491
|
+
previewUrl = _ref.previewUrl,
|
|
94633
92492
|
url = _ref.url;
|
|
94634
92493
|
var _useState = React.useState(false),
|
|
94635
92494
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -94664,11 +92523,11 @@ var Link = function Link(_ref) {
|
|
|
94664
92523
|
icon: neetoIcons.Copy,
|
|
94665
92524
|
label: t("neetoCommons.shareViaLink.copyLink"),
|
|
94666
92525
|
onClick: function onClick() {
|
|
94667
|
-
return copyToClipboard(url);
|
|
92526
|
+
return utils.copyToClipboard(url);
|
|
94668
92527
|
}
|
|
94669
92528
|
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
94670
92529
|
"data-testid": "preview-button",
|
|
94671
|
-
href: url,
|
|
92530
|
+
href: previewUrl || url,
|
|
94672
92531
|
icon: neetoIcons.ExternalLink,
|
|
94673
92532
|
style: "secondary",
|
|
94674
92533
|
target: "_blank",
|
|
@@ -94697,30 +92556,16 @@ var Link = function Link(_ref) {
|
|
|
94697
92556
|
}))));
|
|
94698
92557
|
};
|
|
94699
92558
|
|
|
94700
|
-
var HEADERS_KEYS = {
|
|
94701
|
-
xAuthEmail: "X-Auth-Email",
|
|
94702
|
-
xAuthToken: "X-Auth-Token",
|
|
94703
|
-
xCsrfToken: "X-CSRF-TOKEN",
|
|
94704
|
-
contentType: "Content-Type",
|
|
94705
|
-
accept: "Accept"
|
|
94706
|
-
};
|
|
94707
|
-
|
|
94708
|
-
var resetAuthTokens = function resetAuthTokens() {
|
|
94709
|
-
ramda.values(HEADERS_KEYS).forEach(function (header) {
|
|
94710
|
-
delete axios__default["default"].defaults.headers[header];
|
|
94711
|
-
});
|
|
94712
|
-
};
|
|
94713
|
-
|
|
94714
92559
|
var facebookShareLink = function facebookShareLink(_ref) {
|
|
94715
92560
|
var id = _ref.id;
|
|
94716
|
-
return buildUrl("https://www.facebook.com/sharer/sharer.php", {
|
|
92561
|
+
return utils.buildUrl("https://www.facebook.com/sharer/sharer.php", {
|
|
94717
92562
|
u: "https://".concat(window.location.host, "/").concat(id)
|
|
94718
92563
|
});
|
|
94719
92564
|
};
|
|
94720
92565
|
var linkedInShareLink = function linkedInShareLink(_ref2) {
|
|
94721
92566
|
var id = _ref2.id,
|
|
94722
92567
|
title = _ref2.title;
|
|
94723
|
-
return buildUrl("https://www.linkedin.com/shareArticle", {
|
|
92568
|
+
return utils.buildUrl("https://www.linkedin.com/shareArticle", {
|
|
94724
92569
|
mini: true,
|
|
94725
92570
|
url: "https://".concat(window.location.host, "/").concat(id),
|
|
94726
92571
|
title: title
|
|
@@ -94729,7 +92574,7 @@ var linkedInShareLink = function linkedInShareLink(_ref2) {
|
|
|
94729
92574
|
var twitterShareLink = function twitterShareLink(_ref3) {
|
|
94730
92575
|
var id = _ref3.id,
|
|
94731
92576
|
title = _ref3.title;
|
|
94732
|
-
return buildUrl("http://twitter.com/share", {
|
|
92577
|
+
return utils.buildUrl("http://twitter.com/share", {
|
|
94733
92578
|
text: title,
|
|
94734
92579
|
url: "https://".concat(window.location.host, "/").concat(id)
|
|
94735
92580
|
});
|
|
@@ -95640,7 +93485,7 @@ var QRCodeModal = function QRCodeModal(_ref) {
|
|
|
95640
93485
|
var handleDownload = function handleDownload() {
|
|
95641
93486
|
var canvas = document.getElementById(canvasId);
|
|
95642
93487
|
if (canvas) downloadCanvas(canvas, {
|
|
95643
|
-
name: slugify(name)
|
|
93488
|
+
name: pure$1.slugify(name)
|
|
95644
93489
|
});
|
|
95645
93490
|
};
|
|
95646
93491
|
return /*#__PURE__*/React__default["default"].createElement(neetoui.Modal, {
|
|
@@ -95743,7 +93588,9 @@ var ShareViaLink = function ShareViaLink(_ref) {
|
|
|
95743
93588
|
entity = _ref.entity,
|
|
95744
93589
|
entityName = _ref.entityName,
|
|
95745
93590
|
_ref$handleRegenerate = _ref.handleRegenerate,
|
|
95746
|
-
handleRegenerate = _ref$handleRegenerate === void 0 ? noop
|
|
93591
|
+
handleRegenerate = _ref$handleRegenerate === void 0 ? pure$1.noop : _ref$handleRegenerate,
|
|
93592
|
+
_ref$previewUrl = _ref.previewUrl,
|
|
93593
|
+
previewUrl = _ref$previewUrl === void 0 ? "" : _ref$previewUrl,
|
|
95747
93594
|
socialMediaPostTitle = _ref.socialMediaPostTitle,
|
|
95748
93595
|
url = _ref.url;
|
|
95749
93596
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -95754,6 +93601,7 @@ var ShareViaLink = function ShareViaLink(_ref) {
|
|
|
95754
93601
|
entityName: entityName,
|
|
95755
93602
|
handleRegenerate: handleRegenerate,
|
|
95756
93603
|
isRegenerating: isRegenerating,
|
|
93604
|
+
previewUrl: previewUrl,
|
|
95757
93605
|
url: url
|
|
95758
93606
|
}), /*#__PURE__*/React__default["default"].createElement(SocialMedia, {
|
|
95759
93607
|
entity: entity,
|
|
@@ -95788,7 +93636,7 @@ var getTopLinks = function getTopLinks() {
|
|
|
95788
93636
|
}) : topLinks;
|
|
95789
93637
|
};
|
|
95790
93638
|
var convertAppNameToLogoName = function convertAppNameToLogoName(appName) {
|
|
95791
|
-
return "Neeto".concat(capitalize(appName.substr(5).toLowerCase()));
|
|
93639
|
+
return "Neeto".concat(pure$1.capitalize(appName.substr(5).toLowerCase()));
|
|
95792
93640
|
};
|
|
95793
93641
|
var buildProductLogo = function buildProductLogo() {
|
|
95794
93642
|
var logoName = convertAppNameToLogoName(globalProps.appName);
|
|
@@ -95827,7 +93675,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
95827
93675
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
95828
93676
|
}, [location]);
|
|
95829
93677
|
var handleLogout = function handleLogout() {
|
|
95830
|
-
resetAuthTokens();
|
|
93678
|
+
utils.resetAuthTokens();
|
|
95831
93679
|
window.location.href = "/logout";
|
|
95832
93680
|
};
|
|
95833
93681
|
var openChatWidget = function openChatWidget() {
|
|
@@ -95862,7 +93710,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
95862
93710
|
icon: neetoIcons.Help,
|
|
95863
93711
|
label: i18next__default["default"].t("neetoCommons.sidebar.help"),
|
|
95864
93712
|
onClick: function onClick() {
|
|
95865
|
-
return window.open("https://neeto".concat(ramda.toLower(appName), "
|
|
93713
|
+
return window.open("https://help.neeto".concat(ramda.toLower(appName), ".com/"), "_blank");
|
|
95866
93714
|
}
|
|
95867
93715
|
},
|
|
95868
93716
|
changelogProps: {
|
|
@@ -95872,7 +93720,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
95872
93720
|
var organizationInfo = ramda.mergeLeft(organizationInfoOverrides, ramda.mergeLeft(globalProps.organization, buildProductLogo()));
|
|
95873
93721
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(layouts.Sidebar, {
|
|
95874
93722
|
isCollapsed: true,
|
|
95875
|
-
appName: "neeto".concat(capitalize(appName)),
|
|
93723
|
+
appName: "neeto".concat(pure$1.capitalize(appName)),
|
|
95876
93724
|
navLinks: navLinks,
|
|
95877
93725
|
organizationInfo: organizationInfo,
|
|
95878
93726
|
profileInfo: profileInfo,
|
|
@@ -95881,7 +93729,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
95881
93729
|
return setIsAppSwitcherOpen(ramda.not);
|
|
95882
93730
|
}
|
|
95883
93731
|
}), showAppSwitcher && /*#__PURE__*/React__default["default"].createElement(layouts.AppSwitcher, {
|
|
95884
|
-
activeApp: capitalize(appName),
|
|
93732
|
+
activeApp: pure$1.capitalize(appName),
|
|
95885
93733
|
environment: process.env.RAILS_ENV,
|
|
95886
93734
|
isOpen: isAppSwitcherOpen,
|
|
95887
93735
|
neetoApps: globalProps.neetoApps,
|
|
@@ -95893,7 +93741,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
95893
93741
|
|
|
95894
93742
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
95895
93743
|
|
|
95896
|
-
var css$1 = ".neeto-commons-publish-block{align-items:center;display:flex;gap:12px;justify-content:flex-end}.neeto-commons-publish-block__action-btn{align-items:center;display:inline-flex;flex-direction:row;gap:1px;justify-content:center}.neeto-commons-publish-block__action-btn>.neeto-ui-btn:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.neeto-commons-publish-block__action-btn>.neeto-ui-btn:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.neeto-commons-keyboard-shortcuts-pane{z-index:calc(var(--neeto-ui-modal-z-index) + 1)}";
|
|
93744
|
+
var css$1 = ".neeto-commons-publish-block{align-items:center;display:flex;gap:12px;justify-content:flex-end}.neeto-commons-publish-block__action-btn{align-items:center;display:inline-flex;flex-direction:row;gap:1px;justify-content:center}.neeto-commons-publish-block__action-btn>.neeto-ui-btn:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.neeto-commons-publish-block__action-btn>.neeto-ui-btn:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.neeto-commons-keyboard-shortcuts-pane{flex-grow:0;flex-shrink:0;z-index:calc(var(--neeto-ui-modal-z-index) + 1)}";
|
|
95897
93745
|
n(css$1,{});
|
|
95898
93746
|
|
|
95899
93747
|
var NeetoWidget = {
|