@bigbinary/neeto-commons-frontend 2.0.39 → 2.0.40

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.
@@ -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 require$$0$2 = require('util');
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 require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0$2);
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;
@@ -3374,2871 +3325,396 @@ var mousetrap = {exports: {}};
3374
3325
  * resets the library back to its initial state. this is useful
3375
3326
  * if you want to clear out the current keyboard shortcuts and bind
3376
3327
  * new ones - for example if you switch to another page
3377
- *
3378
- * @returns void
3379
- */
3380
- Mousetrap.prototype.reset = function() {
3381
- var self = this;
3382
- self._callbacks = {};
3383
- self._directMap = {};
3384
- return self;
3385
- };
3386
-
3387
- /**
3388
- * should we stop this event before firing off callbacks
3389
- *
3390
- * @param {Event} e
3391
- * @param {Element} element
3392
- * @return {boolean}
3393
- */
3394
- Mousetrap.prototype.stopCallback = function(e, element) {
3395
- var self = this;
3396
-
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, '&quot;');
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];
3328
+ *
3329
+ * @returns void
3330
+ */
3331
+ Mousetrap.prototype.reset = function() {
3332
+ var self = this;
3333
+ self._callbacks = {};
3334
+ self._directMap = {};
3335
+ return self;
3336
+ };
5786
3337
 
5787
- var filter = defaults$2.filter;
5788
- if (typeof opts.filter === 'function' || isArray$1(opts.filter)) {
5789
- filter = opts.filter;
5790
- }
3338
+ /**
3339
+ * should we stop this event before firing off callbacks
3340
+ *
3341
+ * @param {Event} e
3342
+ * @param {Element} element
3343
+ * @return {boolean}
3344
+ */
3345
+ Mousetrap.prototype.stopCallback = function(e, element) {
3346
+ var self = this;
5791
3347
 
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
- var stringify_1 = function (object, opts) {
5812
- var obj = object;
5813
- var options = normalizeStringifyOptions(opts);
3353
+ if (_belongsTo(element, self.target)) {
3354
+ return false;
3355
+ }
5814
3356
 
5815
- var objKeys;
5816
- var filter;
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
- if (typeof options.filter === 'function') {
5819
- filter = options.filter;
5820
- obj = filter('', obj);
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
- var keys = [];
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
- if (typeof obj !== 'object' || obj === null) {
5829
- return '';
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
- var arrayFormat;
5833
- if (opts && opts.arrayFormat in arrayPrefixGenerators) {
5834
- arrayFormat = opts.arrayFormat;
5835
- } else if (opts && 'indices' in opts) {
5836
- arrayFormat = opts.indices ? 'indices' : 'repeat';
5837
- } else {
5838
- arrayFormat = 'indices';
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
- var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
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
- if (!objKeys) {
5848
- objKeys = Object.keys(obj);
5849
- }
3416
+ // expose mousetrap to the global object
3417
+ window.Mousetrap = Mousetrap;
5850
3418
 
5851
- if (options.sort) {
5852
- objKeys.sort(options.sort);
5853
- }
3419
+ // expose as a common js module
3420
+ if (module.exports) {
3421
+ module.exports = Mousetrap;
3422
+ }
5854
3423
 
5855
- var sideChannel = getSideChannel();
5856
- for (var i = 0; i < objKeys.length; ++i) {
5857
- var key = objKeys[i];
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
- if (options.skipNulls && obj[key] === null) {
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
- var joined = keys.join(options.delimiter);
5883
- var prefix = options.addQueryPrefix === true ? '?' : '';
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
- if (options.charsetSentinel) {
5886
- if (options.charset === 'iso-8859-1') {
5887
- // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
5888
- prefix += 'utf8=%26%2310003%3B&';
5889
- } else {
5890
- // encodeURIComponent('✓')
5891
- prefix += 'utf8=%E2%9C%93&';
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
- return joined.length > 0 ? prefix + joined : '';
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 utils = utils$2;
5899
-
5900
- var has = Object.prototype.hasOwnProperty;
5901
- var isArray = Array.isArray;
5902
-
5903
- var defaults$1 = {
5904
- allowDots: false,
5905
- allowPrototypes: false,
5906
- allowSparse: false,
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 interpretNumericEntities = function (str) {
5923
- return str.replace(/&#(\d+);/g, function ($0, numberStr) {
5924
- return String.fromCharCode(parseInt(numberStr, 10));
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
+ 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(config.mode, convertedHotkey);
3543
+ };
3544
+ }, [handler, config.mode, convertedHotkey, config]);
3545
+ return config.mode === MODES$1.scoped ? ref : null;
5926
3546
  };
5927
-
5928
- var parseArrayValue = function (val, options) {
5929
- if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
5930
- return val.split(',');
5931
- }
5932
-
5933
- return val;
3547
+ var bindHotKey = function bindHotKey(_ref) {
3548
+ var mode = _ref.mode,
3549
+ hotkey = _ref.hotkey,
3550
+ handler = _ref.handler,
3551
+ ref = _ref.ref;
3552
+ switch (mode) {
3553
+ case MODES$1.global:
3554
+ Mousetrap$1.bindGlobal(hotkey, handler);
3555
+ break;
3556
+ case MODES$1.scoped:
3557
+ Mousetrap$1(ref.current).bind(hotkey, handler);
3558
+ break;
3559
+ default:
3560
+ Mousetrap$1.bind(hotkey, handler);
3561
+ }
5934
3562
  };
5935
-
5936
- // This is what browsers will submit when the ✓ character occurs in an
5937
- // application/x-www-form-urlencoded body and the encoding of the page containing
5938
- // the form is iso-8859-1, or when the submitted form has an accept-charset
5939
- // attribute of iso-8859-1. Presumably also with other charsets that do not contain
5940
- // the ✓ character, such as us-ascii.
5941
- var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
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;
3563
+ var unBindHotKey = function unBindHotKey(mode, hotkey) {
3564
+ return mode === MODES$1.global ? Mousetrap$1.unbindGlobal(hotkey) : Mousetrap$1.unbind(hotkey);
6008
3565
  };
6009
3566
 
6010
- var parseObject = function (chain, val, options, valuesParsed) {
6011
- var leaf = valuesParsed ? val : parseArrayValue(val, options);
6012
-
6013
- for (var i = chain.length - 1; i >= 0; --i) {
6014
- var obj;
6015
- var root = chain[i];
6016
-
6017
- if (root === '[]' && options.parseArrays) {
6018
- obj = [].concat(leaf);
6019
- } else {
6020
- obj = options.plainObjects ? Object.create(null) : {};
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
- }
3567
+ var useForceUpdate = function useForceUpdate() {
3568
+ // eslint-disable-next-line react/hook-use-state
3569
+ var _useState = React.useState(0),
3570
+ _useState2 = _slicedToArray(_useState, 2),
3571
+ setValue = _useState2[1];
3572
+ return function () {
3573
+ return setValue(function (value) {
3574
+ return value + 1;
3575
+ });
3576
+ };
3577
+ };
6041
3578
 
6042
- return leaf;
3579
+ var useIsElementVisibleInDom = function useIsElementVisibleInDom(target) {
3580
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
3581
+ var _useState = React.useState(false),
3582
+ _useState2 = _slicedToArray(_useState, 2),
3583
+ isIntersecting = _useState2[0],
3584
+ setIsIntersecting = _useState2[1];
3585
+ var forceUpdate = useForceUpdate();
3586
+ React.useEffect(function () {
3587
+ if (!target) return forceUpdate();
3588
+ var observer = new IntersectionObserver(function (_ref) {
3589
+ var _ref2 = _slicedToArray(_ref, 1),
3590
+ entry = _ref2[0];
3591
+ return setIsIntersecting(entry.isIntersecting);
3592
+ }, options);
3593
+ observer.observe(target);
3594
+ return function () {
3595
+ return observer.unobserve(target);
3596
+ };
3597
+ }, [target, options]);
3598
+ return isIntersecting;
6043
3599
  };
6044
3600
 
6045
- var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
6046
- if (!givenKey) {
6047
- return;
3601
+ function shallow(objA, objB) {
3602
+ if (Object.is(objA, objB)) {
3603
+ return true;
3604
+ }
3605
+ if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) {
3606
+ return false;
3607
+ }
3608
+ if (objA instanceof Map && objB instanceof Map) {
3609
+ if (objA.size !== objB.size)
3610
+ return false;
3611
+ for (const [key, value] of objA) {
3612
+ if (!Object.is(value, objB.get(key))) {
3613
+ return false;
3614
+ }
6048
3615
  }
6049
-
6050
- // Transform dot notation to bracket notation
6051
- var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
6052
-
6053
- // The regex chunks
6054
-
6055
- var brackets = /(\[[^[\]]*])/;
6056
- var child = /(\[[^[\]]*])/g;
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);
3616
+ return true;
3617
+ }
3618
+ if (objA instanceof Set && objB instanceof Set) {
3619
+ if (objA.size !== objB.size)
3620
+ return false;
3621
+ for (const value of objA) {
3622
+ if (!objB.has(value)) {
3623
+ return false;
3624
+ }
6075
3625
  }
6076
-
6077
- // Loop through children appending to the array until we hit depth
6078
-
6079
- var i = 0;
6080
- while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
6081
- i += 1;
6082
- if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
6083
- if (!options.allowPrototypes) {
6084
- return;
6085
- }
6086
- }
6087
- keys.push(segment[1]);
3626
+ return true;
3627
+ }
3628
+ const keysA = Object.keys(objA);
3629
+ if (keysA.length !== Object.keys(objB).length) {
3630
+ return false;
3631
+ }
3632
+ for (let i = 0; i < keysA.length; i++) {
3633
+ if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !Object.is(objA[keysA[i]], objB[keysA[i]])) {
3634
+ return false;
6088
3635
  }
3636
+ }
3637
+ return true;
3638
+ }
6089
3639
 
6090
- // If there's a remainder, just add whatever is left
6091
-
6092
- if (segment) {
6093
- keys.push('[' + key.slice(segment.index) + ']');
3640
+ var useKeyboardShortcutsStore = create$9(function (set) {
3641
+ return {
3642
+ isOpen: false,
3643
+ setIsOpen: function setIsOpen(arg) {
3644
+ if (typeof arg === "function") {
3645
+ set(function (state) {
3646
+ return {
3647
+ isOpen: arg(state.isOpen)
3648
+ };
3649
+ });
3650
+ } else {
3651
+ set({
3652
+ isOpen: arg
3653
+ });
3654
+ }
6094
3655
  }
6095
-
6096
- return parseObject(keys, val, options, valuesParsed);
3656
+ };
3657
+ });
3658
+ var useKeyboardShortcutsPaneState = function useKeyboardShortcutsPaneState() {
3659
+ return useKeyboardShortcutsStore(function (_ref) {
3660
+ var isOpen = _ref.isOpen,
3661
+ setIsOpen = _ref.setIsOpen;
3662
+ return [isOpen, setIsOpen];
3663
+ }, shallow);
6097
3664
  };
6098
3665
 
6099
- var normalizeParseOptions = function normalizeParseOptions(opts) {
6100
- if (!opts) {
6101
- return defaults$1;
6102
- }
6103
-
6104
- if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
6105
- throw new TypeError('Decoder has to be a function.');
6106
- }
6107
-
6108
- if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
6109
- throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
6110
- }
6111
- var charset = typeof opts.charset === 'undefined' ? defaults$1.charset : opts.charset;
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
3666
+ var useOnClickOutside = function useOnClickOutside(ref, handler) {
3667
+ React.useEffect(function () {
3668
+ var listener = function listener(event) {
3669
+ // Do nothing if clicking ref's element or descendent elements
3670
+ if (!ref.current || ref.current.contains(event.target)) {
3671
+ return;
3672
+ }
3673
+ handler(event);
6131
3674
  };
3675
+ document.addEventListener("mousedown", listener);
3676
+ document.addEventListener("touchstart", listener);
3677
+ return function () {
3678
+ document.removeEventListener("mousedown", listener);
3679
+ document.removeEventListener("touchstart", listener);
3680
+ };
3681
+ }, [handler]);
6132
3682
  };
6133
3683
 
6134
- var parse$5 = function (str, opts) {
6135
- var options = normalizeParseOptions(opts);
6136
-
6137
- if (str === '' || str === null || typeof str === 'undefined') {
6138
- return options.plainObjects ? Object.create(null) : {};
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
- }
3684
+ var usePrevious = function usePrevious(value) {
3685
+ var ref = React.useRef(value);
3686
+ React.useEffect(function () {
3687
+ ref.current = value;
3688
+ }, [value]);
3689
+ return ref.current;
3690
+ };
6152
3691
 
6153
- if (options.allowSparse === true) {
6154
- return obj;
3692
+ var useUpdateEffect = function useUpdateEffect(callback) {
3693
+ var dependencies = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
3694
+ var isInitialMount = React.useRef(true);
3695
+ React.useEffect(function () {
3696
+ if (isInitialMount.current) {
3697
+ isInitialMount.current = false;
3698
+ return;
6155
3699
  }
6156
-
6157
- return utils.compact(obj);
3700
+ callback();
3701
+ }, dependencies);
6158
3702
  };
6159
3703
 
6160
- var stringify$3 = stringify_1;
6161
- var parse$4 = parse$5;
6162
- var formats = formats$3;
6163
-
6164
- var lib = {
6165
- formats: formats,
6166
- parse: parse$4,
6167
- stringify: stringify$3
3704
+ var DEFAULT_STALE_TIME = 60 * 60 * 1000;
3705
+ var DOMAIN_QUERY_KEY = "custom-domain";
3706
+ var ENTITY_COUNT = {
3707
+ singular: 1,
3708
+ plural: 2
6168
3709
  };
6169
3710
 
6170
- var copyToClipboard = /*#__PURE__*/function () {
6171
- var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(text) {
6172
- var _ref2,
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();
3711
+ var HOSTNAME_REGEX = /^(?!-)[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](?:\.[a-zA-Z]{2,})+/;
3712
+ var INITIAL_VALUES$1 = {
3713
+ hostname: ""
6241
3714
  };
3715
+ var CUSTOM_DOMAIN_VALIDATION_SCHEMA = yup__namespace.object().shape({
3716
+ hostname: yup__namespace.string().required(i18next.t("neetoCommons.customDomain.formikValidation.required")).matches(HOSTNAME_REGEX, i18next.t("neetoCommons.customDomain.formikValidation.valid"))
3717
+ });
6242
3718
 
6243
3719
  var classnames$1 = {exports: {}};
6244
3720
 
@@ -6310,7 +3786,7 @@ var TagBlock = function TagBlock(_ref) {
6310
3786
  var _useTranslation = reactI18next.useTranslation(),
6311
3787
  t = _useTranslation.t;
6312
3788
  var isTxtValidated = status === "active" || status === "pending_cname_validation";
6313
- var camelCasedStatus = snakeToCamelCase(status || "");
3789
+ var camelCasedStatus = pure$1.snakeToCamelCase(status || "");
6314
3790
  return /*#__PURE__*/React__default["default"].createElement("div", {
6315
3791
  className: classnames("flex gap-2", {
6316
3792
  "flex-col items-start": stacked
@@ -6430,62 +3906,31 @@ var Record = function Record(_ref) {
6430
3906
  style: "info"
6431
3907
  }, recordDescription), /*#__PURE__*/React__default["default"].createElement(neetoui.Input, {
6432
3908
  disabled: true,
6433
- "data-cy": joinHyphenCase(recordNameLabel),
3909
+ "data-cy": utils.joinHyphenCase(recordNameLabel),
6434
3910
  label: recordNameLabel,
6435
3911
  value: recordName,
6436
3912
  suffix: /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
6437
3913
  icon: neetoIcons.Copy,
6438
3914
  style: "text",
6439
3915
  onClick: function onClick() {
6440
- return copyToClipboard(recordName);
3916
+ return utils.copyToClipboard(recordName);
6441
3917
  }
6442
3918
  })
6443
3919
  }), /*#__PURE__*/React__default["default"].createElement(neetoui.Input, {
6444
3920
  disabled: true,
6445
- "data-cy": joinHyphenCase(recordValueLabel),
3921
+ "data-cy": utils.joinHyphenCase(recordValueLabel),
6446
3922
  label: recordValueLabel,
6447
3923
  value: recordValue,
6448
3924
  suffix: /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
6449
3925
  icon: neetoIcons.Copy,
6450
3926
  style: "text",
6451
3927
  onClick: function onClick() {
6452
- return copyToClipboard(recordValue);
3928
+ return utils.copyToClipboard(recordValue);
6453
3929
  }
6454
3930
  })
6455
3931
  }));
6456
3932
  };
6457
3933
 
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
3934
  var CustomDomainInfo = function CustomDomainInfo(_ref) {
6490
3935
  var time = _ref.time;
6491
3936
  var _useTranslation = reactI18next.useTranslation(),
@@ -6504,7 +3949,7 @@ var CustomDomainInfo = function CustomDomainInfo(_ref) {
6504
3949
  icon: neetoIcons.Info,
6505
3950
  style: "info"
6506
3951
  }, t("neetoCommons.customDomain.messageBlock.cnameAddedTime", {
6507
- time: timeFormat.fromNow(time)
3952
+ time: utils.timeFormat.fromNow(time)
6508
3953
  })));
6509
3954
  };
6510
3955
 
@@ -6794,7 +4239,7 @@ var CustomDomain = function CustomDomain(_ref) {
6794
4239
  })
6795
4240
  }, headerProps)), isLoading && /*#__PURE__*/React__default["default"].createElement("div", {
6796
4241
  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", {
4242
+ }, /*#__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
4243
  className: "w-full flex-grow"
6799
4244
  }, /*#__PURE__*/React__default["default"].createElement(layouts.SubHeader, {
6800
4245
  leftActionBlock: /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
@@ -6858,8 +4303,8 @@ var CustomDomain = function CustomDomain(_ref) {
6858
4303
  }));
6859
4304
  };
6860
4305
 
6861
- var DateFormat = ramda.fromPairs(ramda.keys(timeFormat).map(function (key) {
6862
- return [capitalize(key), function (_ref) {
4306
+ var DateFormat = ramda.fromPairs(ramda.keys(utils.timeFormat).map(function (key) {
4307
+ return [pure$1.capitalize(key), function (_ref) {
6863
4308
  var date = _ref.date,
6864
4309
  _ref$tooltipProps = _ref.tooltipProps,
6865
4310
  tooltipProps = _ref$tooltipProps === void 0 ? {} : _ref$tooltipProps,
@@ -6868,9 +4313,9 @@ var DateFormat = ramda.fromPairs(ramda.keys(timeFormat).map(function (key) {
6868
4313
  var dateDisplay = /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, _extends$4({
6869
4314
  component: "span",
6870
4315
  style: "body2"
6871
- }, typographyProps), timeFormat[key](date));
4316
+ }, typographyProps), utils.timeFormat[key](date));
6872
4317
  return key === "extended" ? dateDisplay : /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, _extends$4({
6873
- content: timeFormat.extended(date),
4318
+ content: utils.timeFormat.extended(date),
6874
4319
  position: "top"
6875
4320
  }, tooltipProps), dateDisplay);
6876
4321
  }];
@@ -10583,7 +8028,7 @@ var KeyboardShortcutsPane = function KeyboardShortcutsPane(_ref) {
10583
8028
  });
10584
8029
  return /*#__PURE__*/React__default["default"].createElement("div", {
10585
8030
  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-96": isOpen,
8031
+ "w-80": isOpen,
10587
8032
  "w-0": !isOpen,
10588
8033
  absolute: hasOverlays,
10589
8034
  "right-0": hasOverlays
@@ -11696,7 +9141,7 @@ class TokenTreeEmitter extends TokenTree {
11696
9141
  * @param {string} value
11697
9142
  * @returns {RegExp}
11698
9143
  * */
11699
- function escape$1(value) {
9144
+ function escape(value) {
11700
9145
  return new RegExp(value.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&'), 'm');
11701
9146
  }
11702
9147
 
@@ -12857,7 +10302,7 @@ Syntax highlighting with language autodetection.
12857
10302
  https://highlightjs.org/
12858
10303
  */
12859
10304
 
12860
- const escape$1$1 = escapeHTML;
10305
+ const escape$1 = escapeHTML;
12861
10306
  const inherit$1 = inherit;
12862
10307
  const NO_MATCH = Symbol("nomatch");
12863
10308
 
@@ -13167,7 +10612,7 @@ const HLJS = function(hljs) {
13167
10612
  }
13168
10613
 
13169
10614
  if (newMode && newMode.endSameAsBegin) {
13170
- newMode.endRe = escape$1(lexeme);
10615
+ newMode.endRe = escape(lexeme);
13171
10616
  }
13172
10617
 
13173
10618
  if (newMode.skip) {
@@ -13396,14 +10841,14 @@ const HLJS = function(hljs) {
13396
10841
  },
13397
10842
  sofar: result,
13398
10843
  relevance: 0,
13399
- value: escape$1$1(codeToHighlight),
10844
+ value: escape$1(codeToHighlight),
13400
10845
  emitter: emitter
13401
10846
  };
13402
10847
  } else if (SAFE_MODE) {
13403
10848
  return {
13404
10849
  illegal: false,
13405
10850
  relevance: 0,
13406
- value: escape$1$1(codeToHighlight),
10851
+ value: escape$1(codeToHighlight),
13407
10852
  emitter: emitter,
13408
10853
  language: languageName,
13409
10854
  top: top,
@@ -13426,7 +10871,7 @@ const HLJS = function(hljs) {
13426
10871
  const result = {
13427
10872
  relevance: 0,
13428
10873
  emitter: new options.__emitter(options),
13429
- value: escape$1$1(code),
10874
+ value: escape$1(code),
13430
10875
  illegal: false,
13431
10876
  top: PLAINTEXT_LANGUAGE
13432
10877
  };
@@ -59126,6 +56571,37 @@ var supportedLanguages$1 = ['1c', 'abnf', 'accesslog', 'actionscript', 'ada', 'a
59126
56571
  var highlighter$1 = highlight$3(lowlight, defaultStyle$1);
59127
56572
  highlighter$1.supportedLanguages = supportedLanguages$1;
59128
56573
 
56574
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
56575
+ try {
56576
+ var info = gen[key](arg);
56577
+ var value = info.value;
56578
+ } catch (error) {
56579
+ reject(error);
56580
+ return;
56581
+ }
56582
+ if (info.done) {
56583
+ resolve(value);
56584
+ } else {
56585
+ Promise.resolve(value).then(_next, _throw);
56586
+ }
56587
+ }
56588
+ function _asyncToGenerator(fn) {
56589
+ return function () {
56590
+ var self = this,
56591
+ args = arguments;
56592
+ return new Promise(function (resolve, reject) {
56593
+ var gen = fn.apply(self, args);
56594
+ function _next(value) {
56595
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
56596
+ }
56597
+ function _throw(err) {
56598
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
56599
+ }
56600
+ _next(undefined);
56601
+ });
56602
+ };
56603
+ }
56604
+
59129
56605
  function _classCallCheck(instance, Constructor) {
59130
56606
  if (!(instance instanceof Constructor)) {
59131
56607
  throw new TypeError("Cannot call a class as a function");
@@ -59198,6 +56674,345 @@ function _getPrototypeOf(o) {
59198
56674
  return _getPrototypeOf(o);
59199
56675
  }
59200
56676
 
56677
+ var regeneratorRuntime$1 = {exports: {}};
56678
+
56679
+ var _typeof = {exports: {}};
56680
+
56681
+ (function (module) {
56682
+ function _typeof(obj) {
56683
+ "@babel/helpers - typeof";
56684
+
56685
+ return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
56686
+ return typeof obj;
56687
+ } : function (obj) {
56688
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
56689
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
56690
+ }
56691
+ module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
56692
+ } (_typeof));
56693
+
56694
+ (function (module) {
56695
+ var _typeof$1 = _typeof.exports["default"];
56696
+ function _regeneratorRuntime() {
56697
+ module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
56698
+ return exports;
56699
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports;
56700
+ var exports = {},
56701
+ Op = Object.prototype,
56702
+ hasOwn = Op.hasOwnProperty,
56703
+ defineProperty = Object.defineProperty || function (obj, key, desc) {
56704
+ obj[key] = desc.value;
56705
+ },
56706
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
56707
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
56708
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
56709
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
56710
+ function define(obj, key, value) {
56711
+ return Object.defineProperty(obj, key, {
56712
+ value: value,
56713
+ enumerable: !0,
56714
+ configurable: !0,
56715
+ writable: !0
56716
+ }), obj[key];
56717
+ }
56718
+ try {
56719
+ define({}, "");
56720
+ } catch (err) {
56721
+ define = function define(obj, key, value) {
56722
+ return obj[key] = value;
56723
+ };
56724
+ }
56725
+ function wrap(innerFn, outerFn, self, tryLocsList) {
56726
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
56727
+ generator = Object.create(protoGenerator.prototype),
56728
+ context = new Context(tryLocsList || []);
56729
+ return defineProperty(generator, "_invoke", {
56730
+ value: makeInvokeMethod(innerFn, self, context)
56731
+ }), generator;
56732
+ }
56733
+ function tryCatch(fn, obj, arg) {
56734
+ try {
56735
+ return {
56736
+ type: "normal",
56737
+ arg: fn.call(obj, arg)
56738
+ };
56739
+ } catch (err) {
56740
+ return {
56741
+ type: "throw",
56742
+ arg: err
56743
+ };
56744
+ }
56745
+ }
56746
+ exports.wrap = wrap;
56747
+ var ContinueSentinel = {};
56748
+ function Generator() {}
56749
+ function GeneratorFunction() {}
56750
+ function GeneratorFunctionPrototype() {}
56751
+ var IteratorPrototype = {};
56752
+ define(IteratorPrototype, iteratorSymbol, function () {
56753
+ return this;
56754
+ });
56755
+ var getProto = Object.getPrototypeOf,
56756
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
56757
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
56758
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
56759
+ function defineIteratorMethods(prototype) {
56760
+ ["next", "throw", "return"].forEach(function (method) {
56761
+ define(prototype, method, function (arg) {
56762
+ return this._invoke(method, arg);
56763
+ });
56764
+ });
56765
+ }
56766
+ function AsyncIterator(generator, PromiseImpl) {
56767
+ function invoke(method, arg, resolve, reject) {
56768
+ var record = tryCatch(generator[method], generator, arg);
56769
+ if ("throw" !== record.type) {
56770
+ var result = record.arg,
56771
+ value = result.value;
56772
+ return value && "object" == _typeof$1(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
56773
+ invoke("next", value, resolve, reject);
56774
+ }, function (err) {
56775
+ invoke("throw", err, resolve, reject);
56776
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
56777
+ result.value = unwrapped, resolve(result);
56778
+ }, function (error) {
56779
+ return invoke("throw", error, resolve, reject);
56780
+ });
56781
+ }
56782
+ reject(record.arg);
56783
+ }
56784
+ var previousPromise;
56785
+ defineProperty(this, "_invoke", {
56786
+ value: function value(method, arg) {
56787
+ function callInvokeWithMethodAndArg() {
56788
+ return new PromiseImpl(function (resolve, reject) {
56789
+ invoke(method, arg, resolve, reject);
56790
+ });
56791
+ }
56792
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
56793
+ }
56794
+ });
56795
+ }
56796
+ function makeInvokeMethod(innerFn, self, context) {
56797
+ var state = "suspendedStart";
56798
+ return function (method, arg) {
56799
+ if ("executing" === state) throw new Error("Generator is already running");
56800
+ if ("completed" === state) {
56801
+ if ("throw" === method) throw arg;
56802
+ return doneResult();
56803
+ }
56804
+ for (context.method = method, context.arg = arg;;) {
56805
+ var delegate = context.delegate;
56806
+ if (delegate) {
56807
+ var delegateResult = maybeInvokeDelegate(delegate, context);
56808
+ if (delegateResult) {
56809
+ if (delegateResult === ContinueSentinel) continue;
56810
+ return delegateResult;
56811
+ }
56812
+ }
56813
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
56814
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
56815
+ context.dispatchException(context.arg);
56816
+ } else "return" === context.method && context.abrupt("return", context.arg);
56817
+ state = "executing";
56818
+ var record = tryCatch(innerFn, self, context);
56819
+ if ("normal" === record.type) {
56820
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
56821
+ return {
56822
+ value: record.arg,
56823
+ done: context.done
56824
+ };
56825
+ }
56826
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
56827
+ }
56828
+ };
56829
+ }
56830
+ function maybeInvokeDelegate(delegate, context) {
56831
+ var methodName = context.method,
56832
+ method = delegate.iterator[methodName];
56833
+ 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;
56834
+ var record = tryCatch(method, delegate.iterator, context.arg);
56835
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
56836
+ var info = record.arg;
56837
+ 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);
56838
+ }
56839
+ function pushTryEntry(locs) {
56840
+ var entry = {
56841
+ tryLoc: locs[0]
56842
+ };
56843
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
56844
+ }
56845
+ function resetTryEntry(entry) {
56846
+ var record = entry.completion || {};
56847
+ record.type = "normal", delete record.arg, entry.completion = record;
56848
+ }
56849
+ function Context(tryLocsList) {
56850
+ this.tryEntries = [{
56851
+ tryLoc: "root"
56852
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
56853
+ }
56854
+ function values(iterable) {
56855
+ if (iterable) {
56856
+ var iteratorMethod = iterable[iteratorSymbol];
56857
+ if (iteratorMethod) return iteratorMethod.call(iterable);
56858
+ if ("function" == typeof iterable.next) return iterable;
56859
+ if (!isNaN(iterable.length)) {
56860
+ var i = -1,
56861
+ next = function next() {
56862
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
56863
+ return next.value = undefined, next.done = !0, next;
56864
+ };
56865
+ return next.next = next;
56866
+ }
56867
+ }
56868
+ return {
56869
+ next: doneResult
56870
+ };
56871
+ }
56872
+ function doneResult() {
56873
+ return {
56874
+ value: undefined,
56875
+ done: !0
56876
+ };
56877
+ }
56878
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
56879
+ value: GeneratorFunctionPrototype,
56880
+ configurable: !0
56881
+ }), defineProperty(GeneratorFunctionPrototype, "constructor", {
56882
+ value: GeneratorFunction,
56883
+ configurable: !0
56884
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
56885
+ var ctor = "function" == typeof genFun && genFun.constructor;
56886
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
56887
+ }, exports.mark = function (genFun) {
56888
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
56889
+ }, exports.awrap = function (arg) {
56890
+ return {
56891
+ __await: arg
56892
+ };
56893
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
56894
+ return this;
56895
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
56896
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
56897
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
56898
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
56899
+ return result.done ? result.value : iter.next();
56900
+ });
56901
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
56902
+ return this;
56903
+ }), define(Gp, "toString", function () {
56904
+ return "[object Generator]";
56905
+ }), exports.keys = function (val) {
56906
+ var object = Object(val),
56907
+ keys = [];
56908
+ for (var key in object) keys.push(key);
56909
+ return keys.reverse(), function next() {
56910
+ for (; keys.length;) {
56911
+ var key = keys.pop();
56912
+ if (key in object) return next.value = key, next.done = !1, next;
56913
+ }
56914
+ return next.done = !0, next;
56915
+ };
56916
+ }, exports.values = values, Context.prototype = {
56917
+ constructor: Context,
56918
+ reset: function reset(skipTempReset) {
56919
+ 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);
56920
+ },
56921
+ stop: function stop() {
56922
+ this.done = !0;
56923
+ var rootRecord = this.tryEntries[0].completion;
56924
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
56925
+ return this.rval;
56926
+ },
56927
+ dispatchException: function dispatchException(exception) {
56928
+ if (this.done) throw exception;
56929
+ var context = this;
56930
+ function handle(loc, caught) {
56931
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
56932
+ }
56933
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
56934
+ var entry = this.tryEntries[i],
56935
+ record = entry.completion;
56936
+ if ("root" === entry.tryLoc) return handle("end");
56937
+ if (entry.tryLoc <= this.prev) {
56938
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
56939
+ hasFinally = hasOwn.call(entry, "finallyLoc");
56940
+ if (hasCatch && hasFinally) {
56941
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
56942
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
56943
+ } else if (hasCatch) {
56944
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
56945
+ } else {
56946
+ if (!hasFinally) throw new Error("try statement without catch or finally");
56947
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
56948
+ }
56949
+ }
56950
+ }
56951
+ },
56952
+ abrupt: function abrupt(type, arg) {
56953
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
56954
+ var entry = this.tryEntries[i];
56955
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
56956
+ var finallyEntry = entry;
56957
+ break;
56958
+ }
56959
+ }
56960
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
56961
+ var record = finallyEntry ? finallyEntry.completion : {};
56962
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
56963
+ },
56964
+ complete: function complete(record, afterLoc) {
56965
+ if ("throw" === record.type) throw record.arg;
56966
+ 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;
56967
+ },
56968
+ finish: function finish(finallyLoc) {
56969
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
56970
+ var entry = this.tryEntries[i];
56971
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
56972
+ }
56973
+ },
56974
+ "catch": function _catch(tryLoc) {
56975
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
56976
+ var entry = this.tryEntries[i];
56977
+ if (entry.tryLoc === tryLoc) {
56978
+ var record = entry.completion;
56979
+ if ("throw" === record.type) {
56980
+ var thrown = record.arg;
56981
+ resetTryEntry(entry);
56982
+ }
56983
+ return thrown;
56984
+ }
56985
+ }
56986
+ throw new Error("illegal catch attempt");
56987
+ },
56988
+ delegateYield: function delegateYield(iterable, resultName, nextLoc) {
56989
+ return this.delegate = {
56990
+ iterator: values(iterable),
56991
+ resultName: resultName,
56992
+ nextLoc: nextLoc
56993
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
56994
+ }
56995
+ }, exports;
56996
+ }
56997
+ module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
56998
+ } (regeneratorRuntime$1));
56999
+
57000
+ // TODO(Babel 8): Remove this file.
57001
+
57002
+ var runtime = regeneratorRuntime$1.exports();
57003
+ var regenerator = runtime;
57004
+
57005
+ // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
57006
+ try {
57007
+ regeneratorRuntime = runtime;
57008
+ } catch (accidentalStrictMode) {
57009
+ if (typeof globalThis === "object") {
57010
+ globalThis.regeneratorRuntime = runtime;
57011
+ } else {
57012
+ Function("r", "regeneratorRuntime = r")(runtime);
57013
+ }
57014
+ }
57015
+
59201
57016
  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
57017
 
59203
57018
  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 +90998,7 @@ var CodeBlock = function CodeBlock(_ref) {
93183
90998
  style: "primary",
93184
90999
  label: isCopied ? t("neetoCommons.widget.installation.snippet.copied") : t("neetoCommons.widget.installation.snippet.copy"),
93185
91000
  onClick: function onClick() {
93186
- return copyToClipboard(codeString);
91001
+ return utils.copyToClipboard(codeString);
93187
91002
  }
93188
91003
  }))), /*#__PURE__*/React__default["default"].createElement(SyntaxHighlighter, {
93189
91004
  className: "neeto-ui-bg-gray-800 m-0",
@@ -93291,7 +91106,7 @@ var getEmailWidgetSnippetFormInitialValues = function getEmailWidgetSnippetFormI
93291
91106
  var getSelectedWidgetsCombinedText = function getSelectedWidgetsCombinedText(widgets) {
93292
91107
  var withHtml = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
93293
91108
  var prefixedWidgets = widgets.map(function (widget) {
93294
- return "neeto".concat(capitalize(widget));
91109
+ return "neeto".concat(pure$1.capitalize(widget));
93295
91110
  });
93296
91111
  if (prefixedWidgets.length === 1) {
93297
91112
  return prefixedWidgets[0];
@@ -93307,7 +91122,7 @@ var CodeSnippet = function CodeSnippet(_ref) {
93307
91122
  var isPaneOpen = _ref.isPaneOpen,
93308
91123
  onClose = _ref.onClose,
93309
91124
  _ref$onSent = _ref.onSent,
93310
- onSent = _ref$onSent === void 0 ? noop$2 : _ref$onSent,
91125
+ onSent = _ref$onSent === void 0 ? pure$1.noop : _ref$onSent,
93311
91126
  codeString = _ref.codeString,
93312
91127
  _ref$subject = _ref.subject,
93313
91128
  subject = _ref$subject === void 0 ? "" : _ref$subject,
@@ -93422,7 +91237,7 @@ var SelectionTabs = function SelectionTabs(_ref) {
93422
91237
  var selectedWidgets = _ref.selectedWidgets,
93423
91238
  updateSelectedWidgets = _ref.updateSelectedWidgets,
93424
91239
  primarySelectedWidget = _ref.primarySelectedWidget;
93425
- var formattedPrimaryWidget = capitalize(WIDGET_TYPES_VALUES.includes(primarySelectedWidget) ? primarySelectedWidget : "");
91240
+ var formattedPrimaryWidget = pure$1.capitalize(WIDGET_TYPES_VALUES.includes(primarySelectedWidget) ? primarySelectedWidget : "");
93426
91241
  var renderSelectedTab = function renderSelectedTab() {
93427
91242
  return WIDGET_TYPES_VALUES.map(function (widget) {
93428
91243
  return /*#__PURE__*/React__default["default"].createElement("div", {
@@ -93430,7 +91245,7 @@ var SelectionTabs = function SelectionTabs(_ref) {
93430
91245
  key: widget
93431
91246
  }, primarySelectedWidget !== widget ? /*#__PURE__*/React__default["default"].createElement(neetoui.Switch, {
93432
91247
  checked: selectedWidgets.includes(widget),
93433
- label: "neeto".concat(capitalize(widget)),
91248
+ label: "neeto".concat(pure$1.capitalize(widget)),
93434
91249
  onChange: function onChange() {
93435
91250
  return updateSelectedWidgets(widget);
93436
91251
  }
@@ -93634,7 +91449,7 @@ var EmbedCode = function EmbedCode(_ref) {
93634
91449
  })
93635
91450
  },
93636
91451
  values: {
93637
- selectedWidgets: isNotEmpty(selectedWidgets) ? getSelectedWidgetsCombinedText(selectedWidgets, true) : "none of the widgets"
91452
+ selectedWidgets: pure$1.isNotEmpty(selectedWidgets) ? getSelectedWidgetsCombinedText(selectedWidgets, true) : "none of the widgets"
93638
91453
  }
93639
91454
  }, "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
91455
  className: "mx-auto w-full max-w-2xl flex-grow flex-col items-center justify-start mb-6"
@@ -93685,7 +91500,7 @@ var EmbedCode = function EmbedCode(_ref) {
93685
91500
  })), /*#__PURE__*/React__default["default"].createElement("div", {
93686
91501
  className: "w-full"
93687
91502
  }, t("neetoCommons.widget.installation.instructions.sessionContext"))) : null, /*#__PURE__*/React__default["default"].createElement(CodeSnippet, _extends$4({
93688
- isPaneOpen: !!emailType && isNotEmpty(selectedWidgets),
91503
+ isPaneOpen: !!emailType && pure$1.isNotEmpty(selectedWidgets),
93689
91504
  onClose: function onClose() {
93690
91505
  return setEmailType(EMAIL_TYPES["null"]);
93691
91506
  }
@@ -93815,6 +91630,37 @@ var PublishBlock = function PublishBlock(_ref) {
93815
91630
  };
93816
91631
  PublishBlock.Alert = AlertBlock;
93817
91632
 
91633
+ dayjs__default["default"].extend(relativeTime__default["default"]);
91634
+ dayjs__default["default"].extend(updateLocale__default["default"]);
91635
+ var timeFormat = {
91636
+ fromNow: function fromNow(time) {
91637
+ return dayjs__default["default"](time).fromNow();
91638
+ },
91639
+ time: function time(_time) {
91640
+ return dayjs__default["default"](_time).format("h:mm A");
91641
+ },
91642
+ date: function date(time) {
91643
+ return dayjs__default["default"](time).format("MMM D, YYYY");
91644
+ },
91645
+ dateWeek: function dateWeek(time) {
91646
+ return dayjs__default["default"](time).format("MMM D, YYYY ddd");
91647
+ },
91648
+ dateWeekWithoutYear: function dateWeekWithoutYear(time) {
91649
+ return dayjs__default["default"](time).format("MMM D, ddd");
91650
+ },
91651
+ dateTime: function dateTime(time) {
91652
+ return dayjs__default["default"](time).format("MMM D, YYYY h:mm A");
91653
+ },
91654
+ dateWeekTime: function dateWeekTime(time) {
91655
+ return dayjs__default["default"](time).format("MMM D, YYYY ddd h:mm A");
91656
+ },
91657
+ extended: function extended(time) {
91658
+ var dateTime = dayjs__default["default"](time).format("dddd MMMM D, YYYY h:mm A");
91659
+ var fromNow = dayjs__default["default"](time).fromNow();
91660
+ return "".concat(dateTime, " (").concat(fromNow, ")");
91661
+ }
91662
+ };
91663
+
93818
91664
  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
91665
  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
91666
  var REMOVE_SELECT_DOWN_ARROW = {
@@ -93833,6 +91679,7 @@ var BLUR_TEXT_WHEN_SELECT_MENU_IS_OPEN = {
93833
91679
  }
93834
91680
  };
93835
91681
  var SLOT_TIME_FORMAT = "hh:mm A";
91682
+ var END_OF_DAY = "11:59 PM";
93836
91683
 
93837
91684
  var INTERVALS = ["year", "quarter", "month", "week", "day", "hour", "minute", "second"];
93838
91685
 
@@ -93987,7 +91834,7 @@ var findIndicesOfOverlappingRangesInPeriods = function findIndicesOfOverlappingR
93987
91834
  var range1 = _ref2.range1,
93988
91835
  range2 = _ref2.range2,
93989
91836
  periods = _ref2.periods;
93990
- var firstIndex = findIndexBy({
91837
+ var firstIndex = pure$1.findIndexBy({
93991
91838
  startTime: range1.startDate.format(SLOT_TIME_FORMAT)
93992
91839
  }, periods);
93993
91840
  var secondIndex = periods.findIndex(function (slot, index) {
@@ -94067,12 +91914,12 @@ var DisplayAvailability = function DisplayAvailability(_ref) {
94067
91914
  key: day
94068
91915
  }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
94069
91916
  className: "mt-0.5 w-16 text-gray-700",
94070
- "data-cy": joinHyphenCase(day, "day-text"),
91917
+ "data-cy": utils.joinHyphenCase(day, "day-text"),
94071
91918
  style: "h5",
94072
91919
  weight: "semibold"
94073
91920
  }, t("neetoCommons.schedule.days.".concat(day))), /*#__PURE__*/React__default["default"].createElement("div", {
94074
91921
  className: "flex w-9/12 flex-col items-center space-y-4"
94075
- }, isPresent(periods[day]) ? (_sortPeriodsByKey = sortPeriodsByKey({
91922
+ }, pure$1.isPresent(periods[day]) ? (_sortPeriodsByKey = sortPeriodsByKey({
94076
91923
  periods: periods[day],
94077
91924
  key: "startTime",
94078
91925
  order: "asc"
@@ -94085,7 +91932,7 @@ var DisplayAvailability = function DisplayAvailability(_ref) {
94085
91932
  lineHeight: "relaxed",
94086
91933
  style: "h5",
94087
91934
  weight: "semibold",
94088
- "data-cy": joinHyphenCase(day, period.startTime, "start-time-text")
91935
+ "data-cy": utils.joinHyphenCase(day, period.startTime, "start-time-text")
94089
91936
  }, period.startTime), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
94090
91937
  className: "text-gray-600",
94091
91938
  component: "span"
@@ -94094,11 +91941,11 @@ var DisplayAvailability = function DisplayAvailability(_ref) {
94094
91941
  lineHeight: "relaxed",
94095
91942
  style: "h5",
94096
91943
  weight: "semibold",
94097
- "data-cy": joinHyphenCase(day, period.endTime, "start-time-text")
91944
+ "data-cy": utils.joinHyphenCase(day, period.endTime, "start-time-text")
94098
91945
  }, period.endTime));
94099
91946
  }) : /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
94100
91947
  className: "mx-8 mt-0.5 text-gray-700",
94101
- "data-cy": joinHyphenCase(day, "unavailable-time-text"),
91948
+ "data-cy": utils.joinHyphenCase(day, "unavailable-time-text"),
94102
91949
  lineHeight: "relaxed",
94103
91950
  style: "h5"
94104
91951
  }, t("neetoCommons.schedule.unavailable"))));
@@ -94116,6 +91963,7 @@ var buildSlotIntervals = function buildSlotIntervals(_ref) {
94116
91963
  value: selectedValue
94117
91964
  };
94118
91965
  var allIntervalsForADay = dayjsExtended.timeIntervalsForDay(interval);
91966
+ allIntervalsForADay.push(END_OF_DAY);
94119
91967
  var uniqBookedSlots = ramda.uniq(ramda.pluck(slotType, bookedSlots));
94120
91968
  var slotsAvailableForBooking = ramda.difference(allIntervalsForADay, uniqBookedSlots);
94121
91969
  var slots = slotsAvailableForBooking.map(toLabelAndValue);
@@ -94299,7 +92147,7 @@ var Form = function Form(_ref) {
94299
92147
  setFieldValue("wdays[".concat(index, "].available"), true);
94300
92148
  if ((_deletedPeriods$ = deletedPeriods[0]) !== null && _deletedPeriods$ !== void 0 && _deletedPeriods$.startTime) {
94301
92149
  restoreDeletedPeriods(setFieldValue);
94302
- } else if (isNotPresent(values.wdays[index].periods)) {
92150
+ } else if (pure$1.isNotPresent(values.wdays[index].periods)) {
94303
92151
  setFieldValue("wdays[".concat(index, "].periods"), [addDefaultPeriod(day)]);
94304
92152
  } else {
94305
92153
  setFieldValue("wdays[".concat(index, "].periods"), [""]);
@@ -94324,7 +92172,7 @@ var Form = function Form(_ref) {
94324
92172
  }, /*#__PURE__*/React__default["default"].createElement(formik$1.Checkbox, {
94325
92173
  "aria-label": "wdays[".concat(index, "].available"),
94326
92174
  checked: values.wdays[index].available,
94327
- "data-cy": joinHyphenCase(day, "weekly-hours-checkbox"),
92175
+ "data-cy": utils.joinHyphenCase(day, "weekly-hours-checkbox"),
94328
92176
  id: "day",
94329
92177
  name: "wdays[".concat(index, "].available"),
94330
92178
  onChange: function onChange() {
@@ -94333,7 +92181,7 @@ var Form = function Form(_ref) {
94333
92181
  }), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
94334
92182
  className: "ml-2 capitalize",
94335
92183
  component: "span",
94336
- "data-cy": joinHyphenCase(day, "day-text"),
92184
+ "data-cy": utils.joinHyphenCase(day, "day-text"),
94337
92185
  style: "body2",
94338
92186
  weight: "semibold"
94339
92187
  }, t("neetoCommons.schedule.days.".concat(day)))), /*#__PURE__*/React__default["default"].createElement(ScheduleRow, {
@@ -94353,7 +92201,7 @@ var Form = function Form(_ref) {
94353
92201
  hideAfter: 5000
94354
92202
  },
94355
92203
  className: "flex-shrink-0",
94356
- "data-testid": joinHyphenCase(day, "copy-schedule-icon")
92204
+ "data-testid": utils.joinHyphenCase(day, "copy-schedule-icon")
94357
92205
  },
94358
92206
  onClose: function onClose() {
94359
92207
  return setWdaysToCopy([]);
@@ -94379,7 +92227,7 @@ var Form = function Form(_ref) {
94379
92227
  }
94380
92228
  })));
94381
92229
  }), /*#__PURE__*/React__default["default"].createElement("li", null, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
94382
- disabled: isNotPresent(wdaysToCopy),
92230
+ disabled: pure$1.isNotPresent(wdaysToCopy),
94383
92231
  label: "Submit",
94384
92232
  size: "small",
94385
92233
  onClick: function onClick() {
@@ -94514,14 +92362,14 @@ var Header = function Header(_ref) {
94514
92362
  var Schedule = /*#__PURE__*/React.forwardRef(function (_ref, scheduleRef) {
94515
92363
  var periods = _ref.periods,
94516
92364
  _ref$handleSubmit = _ref.handleSubmit,
94517
- handleSubmit = _ref$handleSubmit === void 0 ? noop$2 : _ref$handleSubmit,
92365
+ handleSubmit = _ref$handleSubmit === void 0 ? pure$1.noop : _ref$handleSubmit,
94518
92366
  _ref$isEditing = _ref.isEditing,
94519
92367
  isEditing = _ref$isEditing === void 0 ? false : _ref$isEditing,
94520
92368
  setIsEditing = _ref.setIsEditing,
94521
92369
  _ref$showHeader = _ref.showHeader,
94522
92370
  showHeader = _ref$showHeader === void 0 ? true : _ref$showHeader,
94523
92371
  _ref$handleValuesChan = _ref.handleValuesChanged,
94524
- handleValuesChanged = _ref$handleValuesChan === void 0 ? noop$2 : _ref$handleValuesChan;
92372
+ handleValuesChanged = _ref$handleValuesChan === void 0 ? pure$1.noop : _ref$handleValuesChan;
94525
92373
  var handleCopy = function handleCopy(_ref2) {
94526
92374
  var _values$wdays$index$p;
94527
92375
  var values = _ref2.values,
@@ -94531,7 +92379,7 @@ var Schedule = /*#__PURE__*/React.forwardRef(function (_ref, scheduleRef) {
94531
92379
  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
92380
  wdaysToCopy.forEach(function (wday) {
94533
92381
  var dayIndex = DAYS.indexOf(wday);
94534
- setFieldValue("wdays[".concat(dayIndex, "].available"), isPresent(values.wdays[index].periods));
92382
+ setFieldValue("wdays[".concat(dayIndex, "].available"), pure$1.isPresent(values.wdays[index].periods));
94535
92383
  setFieldValue("wdays[".concat(dayIndex, "].periods"), newPeriods.map(function (period) {
94536
92384
  return ramda.assoc("wday", wday, period);
94537
92385
  }));
@@ -94630,6 +92478,7 @@ var Link = function Link(_ref) {
94630
92478
  entityName = _ref.entityName,
94631
92479
  handleRegenerate = _ref.handleRegenerate,
94632
92480
  isRegenerating = _ref.isRegenerating,
92481
+ previewUrl = _ref.previewUrl,
94633
92482
  url = _ref.url;
94634
92483
  var _useState = React.useState(false),
94635
92484
  _useState2 = _slicedToArray(_useState, 2),
@@ -94664,11 +92513,11 @@ var Link = function Link(_ref) {
94664
92513
  icon: neetoIcons.Copy,
94665
92514
  label: t("neetoCommons.shareViaLink.copyLink"),
94666
92515
  onClick: function onClick() {
94667
- return copyToClipboard(url);
92516
+ return utils.copyToClipboard(url);
94668
92517
  }
94669
92518
  }), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
94670
92519
  "data-testid": "preview-button",
94671
- href: url,
92520
+ href: previewUrl || url,
94672
92521
  icon: neetoIcons.ExternalLink,
94673
92522
  style: "secondary",
94674
92523
  target: "_blank",
@@ -94697,30 +92546,16 @@ var Link = function Link(_ref) {
94697
92546
  }))));
94698
92547
  };
94699
92548
 
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
92549
  var facebookShareLink = function facebookShareLink(_ref) {
94715
92550
  var id = _ref.id;
94716
- return buildUrl("https://www.facebook.com/sharer/sharer.php", {
92551
+ return utils.buildUrl("https://www.facebook.com/sharer/sharer.php", {
94717
92552
  u: "https://".concat(window.location.host, "/").concat(id)
94718
92553
  });
94719
92554
  };
94720
92555
  var linkedInShareLink = function linkedInShareLink(_ref2) {
94721
92556
  var id = _ref2.id,
94722
92557
  title = _ref2.title;
94723
- return buildUrl("https://www.linkedin.com/shareArticle", {
92558
+ return utils.buildUrl("https://www.linkedin.com/shareArticle", {
94724
92559
  mini: true,
94725
92560
  url: "https://".concat(window.location.host, "/").concat(id),
94726
92561
  title: title
@@ -94729,7 +92564,7 @@ var linkedInShareLink = function linkedInShareLink(_ref2) {
94729
92564
  var twitterShareLink = function twitterShareLink(_ref3) {
94730
92565
  var id = _ref3.id,
94731
92566
  title = _ref3.title;
94732
- return buildUrl("http://twitter.com/share", {
92567
+ return utils.buildUrl("http://twitter.com/share", {
94733
92568
  text: title,
94734
92569
  url: "https://".concat(window.location.host, "/").concat(id)
94735
92570
  });
@@ -95640,7 +93475,7 @@ var QRCodeModal = function QRCodeModal(_ref) {
95640
93475
  var handleDownload = function handleDownload() {
95641
93476
  var canvas = document.getElementById(canvasId);
95642
93477
  if (canvas) downloadCanvas(canvas, {
95643
- name: slugify(name)
93478
+ name: pure$1.slugify(name)
95644
93479
  });
95645
93480
  };
95646
93481
  return /*#__PURE__*/React__default["default"].createElement(neetoui.Modal, {
@@ -95743,7 +93578,9 @@ var ShareViaLink = function ShareViaLink(_ref) {
95743
93578
  entity = _ref.entity,
95744
93579
  entityName = _ref.entityName,
95745
93580
  _ref$handleRegenerate = _ref.handleRegenerate,
95746
- handleRegenerate = _ref$handleRegenerate === void 0 ? noop$2 : _ref$handleRegenerate,
93581
+ handleRegenerate = _ref$handleRegenerate === void 0 ? pure$1.noop : _ref$handleRegenerate,
93582
+ _ref$previewUrl = _ref.previewUrl,
93583
+ previewUrl = _ref$previewUrl === void 0 ? "" : _ref$previewUrl,
95747
93584
  socialMediaPostTitle = _ref.socialMediaPostTitle,
95748
93585
  url = _ref.url;
95749
93586
  return /*#__PURE__*/React__default["default"].createElement("div", {
@@ -95754,6 +93591,7 @@ var ShareViaLink = function ShareViaLink(_ref) {
95754
93591
  entityName: entityName,
95755
93592
  handleRegenerate: handleRegenerate,
95756
93593
  isRegenerating: isRegenerating,
93594
+ previewUrl: previewUrl,
95757
93595
  url: url
95758
93596
  }), /*#__PURE__*/React__default["default"].createElement(SocialMedia, {
95759
93597
  entity: entity,
@@ -95788,7 +93626,7 @@ var getTopLinks = function getTopLinks() {
95788
93626
  }) : topLinks;
95789
93627
  };
95790
93628
  var convertAppNameToLogoName = function convertAppNameToLogoName(appName) {
95791
- return "Neeto".concat(capitalize(appName.substr(5).toLowerCase()));
93629
+ return "Neeto".concat(pure$1.capitalize(appName.substr(5).toLowerCase()));
95792
93630
  };
95793
93631
  var buildProductLogo = function buildProductLogo() {
95794
93632
  var logoName = convertAppNameToLogoName(globalProps.appName);
@@ -95827,7 +93665,7 @@ var Sidebar = function Sidebar(_ref) {
95827
93665
  // eslint-disable-next-line react-hooks/exhaustive-deps
95828
93666
  }, [location]);
95829
93667
  var handleLogout = function handleLogout() {
95830
- resetAuthTokens();
93668
+ utils.resetAuthTokens();
95831
93669
  window.location.href = "/logout";
95832
93670
  };
95833
93671
  var openChatWidget = function openChatWidget() {
@@ -95862,7 +93700,7 @@ var Sidebar = function Sidebar(_ref) {
95862
93700
  icon: neetoIcons.Help,
95863
93701
  label: i18next__default["default"].t("neetoCommons.sidebar.help"),
95864
93702
  onClick: function onClick() {
95865
- return window.open("https://neeto".concat(ramda.toLower(appName), "help.neetokb.com/"), "_blank");
93703
+ return window.open("https://help.neeto".concat(ramda.toLower(appName), ".com/"), "_blank");
95866
93704
  }
95867
93705
  },
95868
93706
  changelogProps: {
@@ -95872,7 +93710,7 @@ var Sidebar = function Sidebar(_ref) {
95872
93710
  var organizationInfo = ramda.mergeLeft(organizationInfoOverrides, ramda.mergeLeft(globalProps.organization, buildProductLogo()));
95873
93711
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(layouts.Sidebar, {
95874
93712
  isCollapsed: true,
95875
- appName: "neeto".concat(capitalize(appName)),
93713
+ appName: "neeto".concat(pure$1.capitalize(appName)),
95876
93714
  navLinks: navLinks,
95877
93715
  organizationInfo: organizationInfo,
95878
93716
  profileInfo: profileInfo,
@@ -95881,7 +93719,7 @@ var Sidebar = function Sidebar(_ref) {
95881
93719
  return setIsAppSwitcherOpen(ramda.not);
95882
93720
  }
95883
93721
  }), showAppSwitcher && /*#__PURE__*/React__default["default"].createElement(layouts.AppSwitcher, {
95884
- activeApp: capitalize(appName),
93722
+ activeApp: pure$1.capitalize(appName),
95885
93723
  environment: process.env.RAILS_ENV,
95886
93724
  isOpen: isAppSwitcherOpen,
95887
93725
  neetoApps: globalProps.neetoApps,
@@ -95893,7 +93731,7 @@ var Sidebar = function Sidebar(_ref) {
95893
93731
 
95894
93732
  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
93733
 
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)}";
93734
+ 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
93735
  n(css$1,{});
95898
93736
 
95899
93737
  var NeetoWidget = {