swell-js 3.22.3 → 3.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/{index-512fc30d.js → _baseClone.c22e5907.mjs} +94 -791
  2. package/dist/account.mjs +1 -0
  3. package/dist/{api-1f6e43a9.js → api.e0581a2a.mjs} +22 -20
  4. package/dist/api.mjs +21 -0
  5. package/dist/{attributes-7a214d6b.js → attributes.b332bfad.mjs} +2 -2
  6. package/dist/attributes.mjs +8 -0
  7. package/dist/{cache-751d89b1.js → cache.70033487.mjs} +2 -1
  8. package/dist/cache.mjs +7 -0
  9. package/dist/{card-4257bc68.js → card.982ad378.mjs} +1 -1
  10. package/dist/card.mjs +7 -0
  11. package/dist/{cart-cec81203.js → cart.dd00d6d6.mjs} +3 -2
  12. package/dist/cart.mjs +10 -0
  13. package/dist/{categories-8f6a4584.js → categories.f6027058.mjs} +2 -2
  14. package/dist/categories.mjs +8 -0
  15. package/dist/{content-0afdcb05.js → content.5b4bea62.mjs} +1 -1
  16. package/dist/content.mjs +8 -0
  17. package/dist/{cookie-4cde18fb.js → cookie.40ff798c.mjs} +1 -1
  18. package/dist/cookie.mjs +7 -0
  19. package/dist/{currency-42145ec0.js → currency.e2cd8985.mjs} +4 -4
  20. package/dist/currency.mjs +6 -0
  21. package/dist/{index-ffb531dc.js → index.33151a3b.mjs} +4 -3
  22. package/dist/index.b29eadc6.mjs +682 -0
  23. package/dist/index.mjs +21 -0
  24. package/dist/{locale-4391bcf3.js → locale.9d7241ac.mjs} +3 -4
  25. package/dist/locale.mjs +5 -0
  26. package/dist/payment.mjs +12 -0
  27. package/dist/{products-7f2fbc3e.js → products.c20a4350.mjs} +4 -3
  28. package/dist/products.mjs +9 -0
  29. package/dist/round.10a34c5f.mjs +26 -0
  30. package/dist/{settings-34395c72.js → settings.6c0d2563.mjs} +2 -1
  31. package/dist/settings.mjs +7 -0
  32. package/dist/{subscriptions-f077cac6.js → subscriptions.fd44cccc.mjs} +3 -3
  33. package/dist/subscriptions.mjs +10 -0
  34. package/dist/{swell.cjs.js → swell.cjs} +12 -10
  35. package/dist/swell.cjs.map +1 -0
  36. package/dist/swell.umd.min.js +152 -12
  37. package/dist/swell.umd.min.js.map +1 -1
  38. package/dist/utils/index.mjs +6 -0
  39. package/package.json +15 -4
  40. package/types/index.d.ts +2 -0
  41. package/types/product/snake.d.ts +2 -2
  42. package/dist/account.js +0 -1
  43. package/dist/api-0360d6a8.js +0 -207
  44. package/dist/api-1b8787c3.js +0 -207
  45. package/dist/api-35708af6.js +0 -207
  46. package/dist/api-6ad3ed1e.js +0 -207
  47. package/dist/api-73c0aac4.js +0 -207
  48. package/dist/api-8fbb5805.js +0 -207
  49. package/dist/api-d8277535.js +0 -207
  50. package/dist/api-ee592898.js +0 -207
  51. package/dist/api-ee8d921e.js +0 -207
  52. package/dist/api-f01bef36.js +0 -207
  53. package/dist/api.js +0 -19
  54. package/dist/attributes-bfef7db7.js +0 -16
  55. package/dist/attributes.js +0 -6
  56. package/dist/cache-b92f4460.js +0 -165
  57. package/dist/cache.js +0 -5
  58. package/dist/card-91071403.js +0 -141
  59. package/dist/card.js +0 -5
  60. package/dist/cart-35e7bdb4.js +0 -175
  61. package/dist/cart-ff3e3ef6.js +0 -175
  62. package/dist/cart.js +0 -8
  63. package/dist/categories-b1d04223.js +0 -16
  64. package/dist/categories.js +0 -6
  65. package/dist/content-c366a9f8.js +0 -18
  66. package/dist/content.js +0 -6
  67. package/dist/cookie-b78058af.js +0 -50
  68. package/dist/cookie.js +0 -5
  69. package/dist/currency-004374be.js +0 -197
  70. package/dist/currency-842f76f2.js +0 -197
  71. package/dist/currency.js +0 -6
  72. package/dist/index-50ed5ebf.js +0 -3003
  73. package/dist/index-760c7caf.js +0 -3003
  74. package/dist/index-abe4ebcd.js +0 -2946
  75. package/dist/index-ae8e1259.js +0 -3205
  76. package/dist/index-ca9cb73c.js +0 -4756
  77. package/dist/index-d4d59397.js +0 -3444
  78. package/dist/index.js +0 -19
  79. package/dist/locale-62622809.js +0 -51
  80. package/dist/locale.js +0 -6
  81. package/dist/payment.js +0 -10
  82. package/dist/products-d194c3c6.js +0 -418
  83. package/dist/products.js +0 -7
  84. package/dist/settings-937b96f1.js +0 -294
  85. package/dist/settings-c5569614.js +0 -294
  86. package/dist/settings.js +0 -5
  87. package/dist/subscriptions-8044a530.js +0 -69
  88. package/dist/subscriptions.js +0 -8
  89. package/dist/swell.cjs.js.map +0 -1
  90. package/dist/utils/index.js +0 -4
  91. /package/dist/{account-328cc590.js → account.d991b136.mjs} +0 -0
@@ -1,7 +1,3 @@
1
- import { stringify } from 'qs';
2
- import deepmerge from 'deepmerge';
3
- import { camelize, decamelize, camelizeKeys, decamelizeKeys } from 'fast-case';
4
-
5
1
  var global$1 = (typeof global !== "undefined" ? global :
6
2
  typeof self !== "undefined" ? self :
7
3
  typeof window !== "undefined" ? window : {});
@@ -19,17 +15,17 @@ var root = freeGlobal || freeSelf || Function('return this')();
19
15
  var Symbol = root.Symbol;
20
16
 
21
17
  /** Used for built-in method references. */
22
- var objectProto$f = Object.prototype;
18
+ var objectProto$e = Object.prototype;
23
19
 
24
20
  /** Used to check objects for own properties. */
25
- var hasOwnProperty$c = objectProto$f.hasOwnProperty;
21
+ var hasOwnProperty$b = objectProto$e.hasOwnProperty;
26
22
 
27
23
  /**
28
24
  * Used to resolve the
29
25
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
30
26
  * of values.
31
27
  */
32
- var nativeObjectToString$1 = objectProto$f.toString;
28
+ var nativeObjectToString$1 = objectProto$e.toString;
33
29
 
34
30
  /** Built-in value references. */
35
31
  var symToStringTag$1 = Symbol ? Symbol.toStringTag : undefined;
@@ -42,7 +38,7 @@ var symToStringTag$1 = Symbol ? Symbol.toStringTag : undefined;
42
38
  * @returns {string} Returns the raw `toStringTag`.
43
39
  */
44
40
  function getRawTag(value) {
45
- var isOwn = hasOwnProperty$c.call(value, symToStringTag$1),
41
+ var isOwn = hasOwnProperty$b.call(value, symToStringTag$1),
46
42
  tag = value[symToStringTag$1];
47
43
 
48
44
  try {
@@ -62,14 +58,14 @@ function getRawTag(value) {
62
58
  }
63
59
 
64
60
  /** Used for built-in method references. */
65
- var objectProto$e = Object.prototype;
61
+ var objectProto$d = Object.prototype;
66
62
 
67
63
  /**
68
64
  * Used to resolve the
69
65
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
70
66
  * of values.
71
67
  */
72
- var nativeObjectToString = objectProto$e.toString;
68
+ var nativeObjectToString = objectProto$d.toString;
73
69
 
74
70
  /**
75
71
  * Converts `value` to a string using `Object.prototype.toString`.
@@ -130,7 +126,7 @@ function baseGetTag(value) {
130
126
  * _.isObject(null);
131
127
  * // => false
132
128
  */
133
- function isObject$1(value) {
129
+ function isObject(value) {
134
130
  var type = typeof value;
135
131
  return value != null && (type == 'object' || type == 'function');
136
132
  }
@@ -158,8 +154,8 @@ var asyncTag = '[object AsyncFunction]',
158
154
  * _.isFunction(/abc/);
159
155
  * // => false
160
156
  */
161
- function isFunction$1(value) {
162
- if (!isObject$1(value)) {
157
+ function isFunction(value) {
158
+ if (!isObject(value)) {
163
159
  return false;
164
160
  }
165
161
  // The use of `Object#toString` avoids issues with the `typeof` operator
@@ -224,17 +220,17 @@ var reIsHostCtor = /^\[object .+?Constructor\]$/;
224
220
 
225
221
  /** Used for built-in method references. */
226
222
  var funcProto = Function.prototype,
227
- objectProto$d = Object.prototype;
223
+ objectProto$c = Object.prototype;
228
224
 
229
225
  /** Used to resolve the decompiled source of functions. */
230
226
  var funcToString = funcProto.toString;
231
227
 
232
228
  /** Used to check objects for own properties. */
233
- var hasOwnProperty$b = objectProto$d.hasOwnProperty;
229
+ var hasOwnProperty$a = objectProto$c.hasOwnProperty;
234
230
 
235
231
  /** Used to detect if a method is native. */
236
232
  var reIsNative = RegExp('^' +
237
- funcToString.call(hasOwnProperty$b).replace(reRegExpChar, '\\$&')
233
+ funcToString.call(hasOwnProperty$a).replace(reRegExpChar, '\\$&')
238
234
  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
239
235
  );
240
236
 
@@ -247,10 +243,10 @@ var reIsNative = RegExp('^' +
247
243
  * else `false`.
248
244
  */
249
245
  function baseIsNative(value) {
250
- if (!isObject$1(value) || isMasked(value)) {
246
+ if (!isObject(value) || isMasked(value)) {
251
247
  return false;
252
248
  }
253
- var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
249
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
254
250
  return pattern.test(toSource(value));
255
251
  }
256
252
 
@@ -346,10 +342,10 @@ function eq(value, other) {
346
342
  }
347
343
 
348
344
  /** Used for built-in method references. */
349
- var objectProto$c = Object.prototype;
345
+ var objectProto$b = Object.prototype;
350
346
 
351
347
  /** Used to check objects for own properties. */
352
- var hasOwnProperty$a = objectProto$c.hasOwnProperty;
348
+ var hasOwnProperty$9 = objectProto$b.hasOwnProperty;
353
349
 
354
350
  /**
355
351
  * Assigns `value` to `key` of `object` if the existing value is not equivalent
@@ -363,7 +359,7 @@ var hasOwnProperty$a = objectProto$c.hasOwnProperty;
363
359
  */
364
360
  function assignValue(object, key, value) {
365
361
  var objValue = object[key];
366
- if (!(hasOwnProperty$a.call(object, key) && eq(objValue, value)) ||
362
+ if (!(hasOwnProperty$9.call(object, key) && eq(objValue, value)) ||
367
363
  (value === undefined && !(key in object))) {
368
364
  baseAssignValue(object, key, value);
369
365
  }
@@ -507,10 +503,10 @@ function hashDelete(key) {
507
503
  var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
508
504
 
509
505
  /** Used for built-in method references. */
510
- var objectProto$b = Object.prototype;
506
+ var objectProto$a = Object.prototype;
511
507
 
512
508
  /** Used to check objects for own properties. */
513
- var hasOwnProperty$9 = objectProto$b.hasOwnProperty;
509
+ var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
514
510
 
515
511
  /**
516
512
  * Gets the hash value for `key`.
@@ -527,14 +523,14 @@ function hashGet(key) {
527
523
  var result = data[key];
528
524
  return result === HASH_UNDEFINED$2 ? undefined : result;
529
525
  }
530
- return hasOwnProperty$9.call(data, key) ? data[key] : undefined;
526
+ return hasOwnProperty$8.call(data, key) ? data[key] : undefined;
531
527
  }
532
528
 
533
529
  /** Used for built-in method references. */
534
- var objectProto$a = Object.prototype;
530
+ var objectProto$9 = Object.prototype;
535
531
 
536
532
  /** Used to check objects for own properties. */
537
- var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
533
+ var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
538
534
 
539
535
  /**
540
536
  * Checks if a hash value for `key` exists.
@@ -547,7 +543,7 @@ var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
547
543
  */
548
544
  function hashHas(key) {
549
545
  var data = this.__data__;
550
- return nativeCreate ? (data[key] !== undefined) : hasOwnProperty$8.call(data, key);
546
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty$7.call(data, key);
551
547
  }
552
548
 
553
549
  /** Used to stand-in for `undefined` hash values. */
@@ -1128,7 +1124,7 @@ function toKey(value) {
1128
1124
  * @returns {Object} Returns `object`.
1129
1125
  */
1130
1126
  function baseSet(object, path, value, customizer) {
1131
- if (!isObject$1(object)) {
1127
+ if (!isObject(object)) {
1132
1128
  return object;
1133
1129
  }
1134
1130
  path = castPath(path, object);
@@ -1150,7 +1146,7 @@ function baseSet(object, path, value, customizer) {
1150
1146
  var objValue = nested[key];
1151
1147
  newValue = customizer ? customizer(objValue, key, nested) : undefined;
1152
1148
  if (newValue === undefined) {
1153
- newValue = isObject$1(objValue)
1149
+ newValue = isObject(objValue)
1154
1150
  ? objValue
1155
1151
  : (isIndex(path[index + 1]) ? [] : {});
1156
1152
  }
@@ -1161,38 +1157,6 @@ function baseSet(object, path, value, customizer) {
1161
1157
  return object;
1162
1158
  }
1163
1159
 
1164
- /**
1165
- * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
1166
- * it's created. Arrays are created for missing index properties while objects
1167
- * are created for all other missing properties. Use `_.setWith` to customize
1168
- * `path` creation.
1169
- *
1170
- * **Note:** This method mutates `object`.
1171
- *
1172
- * @static
1173
- * @memberOf _
1174
- * @since 3.7.0
1175
- * @category Object
1176
- * @param {Object} object The object to modify.
1177
- * @param {Array|string} path The path of the property to set.
1178
- * @param {*} value The value to set.
1179
- * @returns {Object} Returns `object`.
1180
- * @example
1181
- *
1182
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
1183
- *
1184
- * _.set(object, 'a[0].b.c', 4);
1185
- * console.log(object.a[0].b.c);
1186
- * // => 4
1187
- *
1188
- * _.set(object, ['x', '0', 'y', 'z'], 5);
1189
- * console.log(object.x[0].y.z);
1190
- * // => 5
1191
- */
1192
- function set(object, path, value) {
1193
- return object == null ? object : baseSet(object, path, value);
1194
- }
1195
-
1196
1160
  /**
1197
1161
  * The base implementation of `_.get` without support for default values.
1198
1162
  *
@@ -1319,89 +1283,6 @@ function baseFindIndex(array, predicate, fromIndex, fromRight) {
1319
1283
  return -1;
1320
1284
  }
1321
1285
 
1322
- /**
1323
- * The base implementation of `_.isNaN` without support for number objects.
1324
- *
1325
- * @private
1326
- * @param {*} value The value to check.
1327
- * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
1328
- */
1329
- function baseIsNaN(value) {
1330
- return value !== value;
1331
- }
1332
-
1333
- /**
1334
- * A specialized version of `_.indexOf` which performs strict equality
1335
- * comparisons of values, i.e. `===`.
1336
- *
1337
- * @private
1338
- * @param {Array} array The array to inspect.
1339
- * @param {*} value The value to search for.
1340
- * @param {number} fromIndex The index to search from.
1341
- * @returns {number} Returns the index of the matched value, else `-1`.
1342
- */
1343
- function strictIndexOf(array, value, fromIndex) {
1344
- var index = fromIndex - 1,
1345
- length = array.length;
1346
-
1347
- while (++index < length) {
1348
- if (array[index] === value) {
1349
- return index;
1350
- }
1351
- }
1352
- return -1;
1353
- }
1354
-
1355
- /**
1356
- * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
1357
- *
1358
- * @private
1359
- * @param {Array} array The array to inspect.
1360
- * @param {*} value The value to search for.
1361
- * @param {number} fromIndex The index to search from.
1362
- * @returns {number} Returns the index of the matched value, else `-1`.
1363
- */
1364
- function baseIndexOf(array, value, fromIndex) {
1365
- return value === value
1366
- ? strictIndexOf(array, value, fromIndex)
1367
- : baseFindIndex(array, baseIsNaN, fromIndex);
1368
- }
1369
-
1370
- /**
1371
- * A specialized version of `_.includes` for arrays without support for
1372
- * specifying an index to search from.
1373
- *
1374
- * @private
1375
- * @param {Array} [array] The array to inspect.
1376
- * @param {*} target The value to search for.
1377
- * @returns {boolean} Returns `true` if `target` is found, else `false`.
1378
- */
1379
- function arrayIncludes(array, value) {
1380
- var length = array == null ? 0 : array.length;
1381
- return !!length && baseIndexOf(array, value, 0) > -1;
1382
- }
1383
-
1384
- /**
1385
- * This function is like `arrayIncludes` except that it accepts a comparator.
1386
- *
1387
- * @private
1388
- * @param {Array} [array] The array to inspect.
1389
- * @param {*} target The value to search for.
1390
- * @param {Function} comparator The comparator invoked per element.
1391
- * @returns {boolean} Returns `true` if `target` is found, else `false`.
1392
- */
1393
- function arrayIncludesWith(array, value, comparator) {
1394
- var index = -1,
1395
- length = array == null ? 0 : array.length;
1396
-
1397
- while (++index < length) {
1398
- if (comparator(value, array[index])) {
1399
- return true;
1400
- }
1401
- }
1402
- return false;
1403
- }
1404
-
1405
1286
  /**
1406
1287
  * Checks if a `cache` value for `key` exists.
1407
1288
  *
@@ -1464,92 +1345,6 @@ var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY$1) ? no
1464
1345
  return new Set(values);
1465
1346
  };
1466
1347
 
1467
- /** Used as the size to enable large array optimizations. */
1468
- var LARGE_ARRAY_SIZE$1 = 200;
1469
-
1470
- /**
1471
- * The base implementation of `_.uniqBy` without support for iteratee shorthands.
1472
- *
1473
- * @private
1474
- * @param {Array} array The array to inspect.
1475
- * @param {Function} [iteratee] The iteratee invoked per element.
1476
- * @param {Function} [comparator] The comparator invoked per element.
1477
- * @returns {Array} Returns the new duplicate free array.
1478
- */
1479
- function baseUniq(array, iteratee, comparator) {
1480
- var index = -1,
1481
- includes = arrayIncludes,
1482
- length = array.length,
1483
- isCommon = true,
1484
- result = [],
1485
- seen = result;
1486
-
1487
- if (comparator) {
1488
- isCommon = false;
1489
- includes = arrayIncludesWith;
1490
- }
1491
- else if (length >= LARGE_ARRAY_SIZE$1) {
1492
- var set = iteratee ? null : createSet(array);
1493
- if (set) {
1494
- return setToArray(set);
1495
- }
1496
- isCommon = false;
1497
- includes = cacheHas;
1498
- seen = new SetCache;
1499
- }
1500
- else {
1501
- seen = iteratee ? [] : result;
1502
- }
1503
- outer:
1504
- while (++index < length) {
1505
- var value = array[index],
1506
- computed = iteratee ? iteratee(value) : value;
1507
-
1508
- value = (comparator || value !== 0) ? value : 0;
1509
- if (isCommon && computed === computed) {
1510
- var seenIndex = seen.length;
1511
- while (seenIndex--) {
1512
- if (seen[seenIndex] === computed) {
1513
- continue outer;
1514
- }
1515
- }
1516
- if (iteratee) {
1517
- seen.push(computed);
1518
- }
1519
- result.push(value);
1520
- }
1521
- else if (!includes(seen, computed, comparator)) {
1522
- if (seen !== result) {
1523
- seen.push(computed);
1524
- }
1525
- result.push(value);
1526
- }
1527
- }
1528
- return result;
1529
- }
1530
-
1531
- /**
1532
- * Creates a duplicate-free version of an array, using
1533
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1534
- * for equality comparisons, in which only the first occurrence of each element
1535
- * is kept. The order of result values is determined by the order they occur
1536
- * in the array.
1537
- *
1538
- * @static
1539
- * @memberOf _
1540
- * @since 0.1.0
1541
- * @category Array
1542
- * @param {Array} array The array to inspect.
1543
- * @returns {Array} Returns the new duplicate free array.
1544
- * @example
1545
- *
1546
- * _.uniq([2, 1, 2]);
1547
- * // => [2, 1]
1548
- */
1549
- function uniq(array) {
1550
- return (array && array.length) ? baseUniq(array) : [];
1551
- }
1552
-
1553
1348
  /**
1554
1349
  * Removes all key-value entries from the stack.
1555
1350
  *
@@ -1782,10 +1577,10 @@ var COMPARE_PARTIAL_FLAG$4 = 1,
1782
1577
  var boolTag$3 = '[object Boolean]',
1783
1578
  dateTag$3 = '[object Date]',
1784
1579
  errorTag$2 = '[object Error]',
1785
- mapTag$6 = '[object Map]',
1580
+ mapTag$5 = '[object Map]',
1786
1581
  numberTag$3 = '[object Number]',
1787
1582
  regexpTag$3 = '[object RegExp]',
1788
- setTag$6 = '[object Set]',
1583
+ setTag$5 = '[object Set]',
1789
1584
  stringTag$3 = '[object String]',
1790
1585
  symbolTag$2 = '[object Symbol]';
1791
1586
 
@@ -1847,10 +1642,10 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
1847
1642
  // for more details.
1848
1643
  return object == (other + '');
1849
1644
 
1850
- case mapTag$6:
1645
+ case mapTag$5:
1851
1646
  var convert = mapToArray;
1852
1647
 
1853
- case setTag$6:
1648
+ case setTag$5:
1854
1649
  var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4;
1855
1650
  convert || (convert = setToArray);
1856
1651
 
@@ -1960,10 +1755,10 @@ function stubArray() {
1960
1755
  }
1961
1756
 
1962
1757
  /** Used for built-in method references. */
1963
- var objectProto$9 = Object.prototype;
1758
+ var objectProto$8 = Object.prototype;
1964
1759
 
1965
1760
  /** Built-in value references. */
1966
- var propertyIsEnumerable$1 = objectProto$9.propertyIsEnumerable;
1761
+ var propertyIsEnumerable$1 = objectProto$8.propertyIsEnumerable;
1967
1762
 
1968
1763
  /* Built-in method references for those with the same name as other `lodash` methods. */
1969
1764
  var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
@@ -2019,13 +1814,13 @@ function baseIsArguments(value) {
2019
1814
  }
2020
1815
 
2021
1816
  /** Used for built-in method references. */
2022
- var objectProto$8 = Object.prototype;
1817
+ var objectProto$7 = Object.prototype;
2023
1818
 
2024
1819
  /** Used to check objects for own properties. */
2025
- var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
1820
+ var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
2026
1821
 
2027
1822
  /** Built-in value references. */
2028
- var propertyIsEnumerable = objectProto$8.propertyIsEnumerable;
1823
+ var propertyIsEnumerable = objectProto$7.propertyIsEnumerable;
2029
1824
 
2030
1825
  /**
2031
1826
  * Checks if `value` is likely an `arguments` object.
@@ -2046,7 +1841,7 @@ var propertyIsEnumerable = objectProto$8.propertyIsEnumerable;
2046
1841
  * // => false
2047
1842
  */
2048
1843
  var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
2049
- return isObjectLike(value) && hasOwnProperty$7.call(value, 'callee') &&
1844
+ return isObjectLike(value) && hasOwnProperty$6.call(value, 'callee') &&
2050
1845
  !propertyIsEnumerable.call(value, 'callee');
2051
1846
  };
2052
1847
 
@@ -2077,10 +1872,10 @@ var freeModule$2 = freeExports$2 && typeof module == 'object' && module && !modu
2077
1872
  var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
2078
1873
 
2079
1874
  /** Built-in value references. */
2080
- var Buffer$2 = moduleExports$2 ? root.Buffer : undefined;
1875
+ var Buffer$1 = moduleExports$2 ? root.Buffer : undefined;
2081
1876
 
2082
1877
  /* Built-in method references for those with the same name as other `lodash` methods. */
2083
- var nativeIsBuffer = Buffer$2 ? Buffer$2.isBuffer : undefined;
1878
+ var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : undefined;
2084
1879
 
2085
1880
  /**
2086
1881
  * Checks if `value` is a buffer.
@@ -2142,11 +1937,11 @@ var argsTag$2 = '[object Arguments]',
2142
1937
  dateTag$2 = '[object Date]',
2143
1938
  errorTag$1 = '[object Error]',
2144
1939
  funcTag$1 = '[object Function]',
2145
- mapTag$5 = '[object Map]',
1940
+ mapTag$4 = '[object Map]',
2146
1941
  numberTag$2 = '[object Number]',
2147
1942
  objectTag$3 = '[object Object]',
2148
1943
  regexpTag$2 = '[object RegExp]',
2149
- setTag$5 = '[object Set]',
1944
+ setTag$4 = '[object Set]',
2150
1945
  stringTag$2 = '[object String]',
2151
1946
  weakMapTag$2 = '[object WeakMap]';
2152
1947
 
@@ -2173,9 +1968,9 @@ typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$2] =
2173
1968
  typedArrayTags[arrayBufferTag$2] = typedArrayTags[boolTag$2] =
2174
1969
  typedArrayTags[dataViewTag$3] = typedArrayTags[dateTag$2] =
2175
1970
  typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] =
2176
- typedArrayTags[mapTag$5] = typedArrayTags[numberTag$2] =
1971
+ typedArrayTags[mapTag$4] = typedArrayTags[numberTag$2] =
2177
1972
  typedArrayTags[objectTag$3] = typedArrayTags[regexpTag$2] =
2178
- typedArrayTags[setTag$5] = typedArrayTags[stringTag$2] =
1973
+ typedArrayTags[setTag$4] = typedArrayTags[stringTag$2] =
2179
1974
  typedArrayTags[weakMapTag$2] = false;
2180
1975
 
2181
1976
  /**
@@ -2253,10 +2048,10 @@ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
2253
2048
  var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
2254
2049
 
2255
2050
  /** Used for built-in method references. */
2256
- var objectProto$7 = Object.prototype;
2051
+ var objectProto$6 = Object.prototype;
2257
2052
 
2258
2053
  /** Used to check objects for own properties. */
2259
- var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
2054
+ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
2260
2055
 
2261
2056
  /**
2262
2057
  * Creates an array of the enumerable property names of the array-like `value`.
@@ -2276,7 +2071,7 @@ function arrayLikeKeys(value, inherited) {
2276
2071
  length = result.length;
2277
2072
 
2278
2073
  for (var key in value) {
2279
- if ((inherited || hasOwnProperty$6.call(value, key)) &&
2074
+ if ((inherited || hasOwnProperty$5.call(value, key)) &&
2280
2075
  !(skipIndexes && (
2281
2076
  // Safari 9 has enumerable `arguments.length` in strict mode.
2282
2077
  key == 'length' ||
@@ -2294,7 +2089,7 @@ function arrayLikeKeys(value, inherited) {
2294
2089
  }
2295
2090
 
2296
2091
  /** Used for built-in method references. */
2297
- var objectProto$6 = Object.prototype;
2092
+ var objectProto$5 = Object.prototype;
2298
2093
 
2299
2094
  /**
2300
2095
  * Checks if `value` is likely a prototype object.
@@ -2305,7 +2100,7 @@ var objectProto$6 = Object.prototype;
2305
2100
  */
2306
2101
  function isPrototype(value) {
2307
2102
  var Ctor = value && value.constructor,
2308
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$6;
2103
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$5;
2309
2104
 
2310
2105
  return value === proto;
2311
2106
  }
@@ -2328,10 +2123,10 @@ function overArg(func, transform) {
2328
2123
  var nativeKeys = overArg(Object.keys, Object);
2329
2124
 
2330
2125
  /** Used for built-in method references. */
2331
- var objectProto$5 = Object.prototype;
2126
+ var objectProto$4 = Object.prototype;
2332
2127
 
2333
2128
  /** Used to check objects for own properties. */
2334
- var hasOwnProperty$5 = objectProto$5.hasOwnProperty;
2129
+ var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
2335
2130
 
2336
2131
  /**
2337
2132
  * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
@@ -2346,7 +2141,7 @@ function baseKeys(object) {
2346
2141
  }
2347
2142
  var result = [];
2348
2143
  for (var key in Object(object)) {
2349
- if (hasOwnProperty$5.call(object, key) && key != 'constructor') {
2144
+ if (hasOwnProperty$4.call(object, key) && key != 'constructor') {
2350
2145
  result.push(key);
2351
2146
  }
2352
2147
  }
@@ -2379,7 +2174,7 @@ function baseKeys(object) {
2379
2174
  * // => false
2380
2175
  */
2381
2176
  function isArrayLike(value) {
2382
- return value != null && isLength(value.length) && !isFunction$1(value);
2177
+ return value != null && isLength(value.length) && !isFunction(value);
2383
2178
  }
2384
2179
 
2385
2180
  /**
@@ -2429,10 +2224,10 @@ function getAllKeys(object) {
2429
2224
  var COMPARE_PARTIAL_FLAG$3 = 1;
2430
2225
 
2431
2226
  /** Used for built-in method references. */
2432
- var objectProto$4 = Object.prototype;
2227
+ var objectProto$3 = Object.prototype;
2433
2228
 
2434
2229
  /** Used to check objects for own properties. */
2435
- var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
2230
+ var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
2436
2231
 
2437
2232
  /**
2438
2233
  * A specialized version of `baseIsEqualDeep` for objects with support for
@@ -2460,7 +2255,7 @@ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
2460
2255
  var index = objLength;
2461
2256
  while (index--) {
2462
2257
  var key = objProps[index];
2463
- if (!(isPartial ? key in other : hasOwnProperty$4.call(other, key))) {
2258
+ if (!(isPartial ? key in other : hasOwnProperty$3.call(other, key))) {
2464
2259
  return false;
2465
2260
  }
2466
2261
  }
@@ -2522,10 +2317,10 @@ var Promise$1 = getNative(root, 'Promise');
2522
2317
  var WeakMap = getNative(root, 'WeakMap');
2523
2318
 
2524
2319
  /** `Object#toString` result references. */
2525
- var mapTag$4 = '[object Map]',
2320
+ var mapTag$3 = '[object Map]',
2526
2321
  objectTag$2 = '[object Object]',
2527
2322
  promiseTag = '[object Promise]',
2528
- setTag$4 = '[object Set]',
2323
+ setTag$3 = '[object Set]',
2529
2324
  weakMapTag$1 = '[object WeakMap]';
2530
2325
 
2531
2326
  var dataViewTag$2 = '[object DataView]';
@@ -2548,9 +2343,9 @@ var getTag = baseGetTag;
2548
2343
 
2549
2344
  // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
2550
2345
  if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$2) ||
2551
- (Map && getTag(new Map) != mapTag$4) ||
2346
+ (Map && getTag(new Map) != mapTag$3) ||
2552
2347
  (Promise$1 && getTag(Promise$1.resolve()) != promiseTag) ||
2553
- (Set && getTag(new Set) != setTag$4) ||
2348
+ (Set && getTag(new Set) != setTag$3) ||
2554
2349
  (WeakMap && getTag(new WeakMap) != weakMapTag$1)) {
2555
2350
  getTag = function(value) {
2556
2351
  var result = baseGetTag(value),
@@ -2560,9 +2355,9 @@ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$2) ||
2560
2355
  if (ctorString) {
2561
2356
  switch (ctorString) {
2562
2357
  case dataViewCtorString: return dataViewTag$2;
2563
- case mapCtorString: return mapTag$4;
2358
+ case mapCtorString: return mapTag$3;
2564
2359
  case promiseCtorString: return promiseTag;
2565
- case setCtorString: return setTag$4;
2360
+ case setCtorString: return setTag$3;
2566
2361
  case weakMapCtorString: return weakMapTag$1;
2567
2362
  }
2568
2363
  }
@@ -2581,10 +2376,10 @@ var argsTag$1 = '[object Arguments]',
2581
2376
  objectTag$1 = '[object Object]';
2582
2377
 
2583
2378
  /** Used for built-in method references. */
2584
- var objectProto$3 = Object.prototype;
2379
+ var objectProto$2 = Object.prototype;
2585
2380
 
2586
2381
  /** Used to check objects for own properties. */
2587
- var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
2382
+ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
2588
2383
 
2589
2384
  /**
2590
2385
  * A specialized version of `baseIsEqual` for arrays and objects which performs
@@ -2627,8 +2422,8 @@ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
2627
2422
  : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
2628
2423
  }
2629
2424
  if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
2630
- var objIsWrapped = objIsObj && hasOwnProperty$3.call(object, '__wrapped__'),
2631
- othIsWrapped = othIsObj && hasOwnProperty$3.call(other, '__wrapped__');
2425
+ var objIsWrapped = objIsObj && hasOwnProperty$2.call(object, '__wrapped__'),
2426
+ othIsWrapped = othIsObj && hasOwnProperty$2.call(other, '__wrapped__');
2632
2427
 
2633
2428
  if (objIsWrapped || othIsWrapped) {
2634
2429
  var objUnwrapped = objIsWrapped ? object.value() : object,
@@ -2736,7 +2531,7 @@ function baseIsMatch(object, source, matchData, customizer) {
2736
2531
  * equality comparisons, else `false`.
2737
2532
  */
2738
2533
  function isStrictComparable(value) {
2739
- return value === value && !isObject$1(value);
2534
+ return value === value && !isObject(value);
2740
2535
  }
2741
2536
 
2742
2537
  /**
@@ -3087,9 +2882,9 @@ function toNumber(value) {
3087
2882
  if (isSymbol(value)) {
3088
2883
  return NAN;
3089
2884
  }
3090
- if (isObject$1(value)) {
2885
+ if (isObject(value)) {
3091
2886
  var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
3092
- value = isObject$1(other) ? (other + '') : other;
2887
+ value = isObject(other) ? (other + '') : other;
3093
2888
  }
3094
2889
  if (typeof value != 'string') {
3095
2890
  return value === 0 ? value : +value;
@@ -3290,29 +3085,6 @@ function createRound(methodName) {
3290
3085
  };
3291
3086
  }
3292
3087
 
3293
- /**
3294
- * Computes `number` rounded to `precision`.
3295
- *
3296
- * @static
3297
- * @memberOf _
3298
- * @since 3.10.0
3299
- * @category Math
3300
- * @param {number} number The number to round.
3301
- * @param {number} [precision=0] The precision to round to.
3302
- * @returns {number} Returns the rounded number.
3303
- * @example
3304
- *
3305
- * _.round(4.006);
3306
- * // => 4
3307
- *
3308
- * _.round(4.006, 2);
3309
- * // => 4.01
3310
- *
3311
- * _.round(4060, -2);
3312
- * // => 4100
3313
- */
3314
- var round = createRound('round');
3315
-
3316
3088
  /**
3317
3089
  * The base implementation of `_.pickBy` without support for iteratee shorthands.
3318
3090
  *
@@ -3684,10 +3456,10 @@ function nativeKeysIn(object) {
3684
3456
  }
3685
3457
 
3686
3458
  /** Used for built-in method references. */
3687
- var objectProto$2 = Object.prototype;
3459
+ var objectProto$1 = Object.prototype;
3688
3460
 
3689
3461
  /** Used to check objects for own properties. */
3690
- var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
3462
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
3691
3463
 
3692
3464
  /**
3693
3465
  * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
@@ -3697,14 +3469,14 @@ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
3697
3469
  * @returns {Array} Returns the array of property names.
3698
3470
  */
3699
3471
  function baseKeysIn(object) {
3700
- if (!isObject$1(object)) {
3472
+ if (!isObject(object)) {
3701
3473
  return nativeKeysIn(object);
3702
3474
  }
3703
3475
  var isProto = isPrototype(object),
3704
3476
  result = [];
3705
3477
 
3706
3478
  for (var key in object) {
3707
- if (!(key == 'constructor' && (isProto || !hasOwnProperty$2.call(object, key)))) {
3479
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty$1.call(object, key)))) {
3708
3480
  result.push(key);
3709
3481
  }
3710
3482
  }
@@ -3761,8 +3533,8 @@ var freeModule = freeExports && typeof module == 'object' && module && !module.n
3761
3533
  var moduleExports = freeModule && freeModule.exports === freeExports;
3762
3534
 
3763
3535
  /** Built-in value references. */
3764
- var Buffer$1 = moduleExports ? root.Buffer : undefined,
3765
- allocUnsafe = Buffer$1 ? Buffer$1.allocUnsafe : undefined;
3536
+ var Buffer = moduleExports ? root.Buffer : undefined,
3537
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
3766
3538
 
3767
3539
  /**
3768
3540
  * Creates a clone of `buffer`.
@@ -3861,10 +3633,10 @@ function getAllKeysIn(object) {
3861
3633
  }
3862
3634
 
3863
3635
  /** Used for built-in method references. */
3864
- var objectProto$1 = Object.prototype;
3636
+ var objectProto = Object.prototype;
3865
3637
 
3866
3638
  /** Used to check objects for own properties. */
3867
- var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
3639
+ var hasOwnProperty = objectProto.hasOwnProperty;
3868
3640
 
3869
3641
  /**
3870
3642
  * Initializes an array clone.
@@ -3878,7 +3650,7 @@ function initCloneArray(array) {
3878
3650
  result = new array.constructor(length);
3879
3651
 
3880
3652
  // Add properties assigned by `RegExp#exec`.
3881
- if (length && typeof array[0] == 'string' && hasOwnProperty$1.call(array, 'index')) {
3653
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
3882
3654
  result.index = array.index;
3883
3655
  result.input = array.input;
3884
3656
  }
@@ -3958,10 +3730,10 @@ function cloneTypedArray(typedArray, isDeep) {
3958
3730
  /** `Object#toString` result references. */
3959
3731
  var boolTag$1 = '[object Boolean]',
3960
3732
  dateTag$1 = '[object Date]',
3961
- mapTag$3 = '[object Map]',
3733
+ mapTag$2 = '[object Map]',
3962
3734
  numberTag$1 = '[object Number]',
3963
3735
  regexpTag$1 = '[object RegExp]',
3964
- setTag$3 = '[object Set]',
3736
+ setTag$2 = '[object Set]',
3965
3737
  stringTag$1 = '[object String]',
3966
3738
  symbolTag$1 = '[object Symbol]';
3967
3739
 
@@ -4007,7 +3779,7 @@ function initCloneByTag(object, tag, isDeep) {
4007
3779
  case uint8Tag$1: case uint8ClampedTag$1: case uint16Tag$1: case uint32Tag$1:
4008
3780
  return cloneTypedArray(object, isDeep);
4009
3781
 
4010
- case mapTag$3:
3782
+ case mapTag$2:
4011
3783
  return new Ctor;
4012
3784
 
4013
3785
  case numberTag$1:
@@ -4017,7 +3789,7 @@ function initCloneByTag(object, tag, isDeep) {
4017
3789
  case regexpTag$1:
4018
3790
  return cloneRegExp(object);
4019
3791
 
4020
- case setTag$3:
3792
+ case setTag$2:
4021
3793
  return new Ctor;
4022
3794
 
4023
3795
  case symbolTag$1:
@@ -4039,7 +3811,7 @@ var objectCreate = Object.create;
4039
3811
  var baseCreate = (function() {
4040
3812
  function object() {}
4041
3813
  return function(proto) {
4042
- if (!isObject$1(proto)) {
3814
+ if (!isObject(proto)) {
4043
3815
  return {};
4044
3816
  }
4045
3817
  if (objectCreate) {
@@ -4066,7 +3838,7 @@ function initCloneObject(object) {
4066
3838
  }
4067
3839
 
4068
3840
  /** `Object#toString` result references. */
4069
- var mapTag$2 = '[object Map]';
3841
+ var mapTag$1 = '[object Map]';
4070
3842
 
4071
3843
  /**
4072
3844
  * The base implementation of `_.isMap` without Node.js optimizations.
@@ -4076,7 +3848,7 @@ var mapTag$2 = '[object Map]';
4076
3848
  * @returns {boolean} Returns `true` if `value` is a map, else `false`.
4077
3849
  */
4078
3850
  function baseIsMap(value) {
4079
- return isObjectLike(value) && getTag$1(value) == mapTag$2;
3851
+ return isObjectLike(value) && getTag$1(value) == mapTag$1;
4080
3852
  }
4081
3853
 
4082
3854
  /* Node.js helper references. */
@@ -4102,7 +3874,7 @@ var nodeIsMap = nodeUtil && nodeUtil.isMap;
4102
3874
  var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
4103
3875
 
4104
3876
  /** `Object#toString` result references. */
4105
- var setTag$2 = '[object Set]';
3877
+ var setTag$1 = '[object Set]';
4106
3878
 
4107
3879
  /**
4108
3880
  * The base implementation of `_.isSet` without Node.js optimizations.
@@ -4112,7 +3884,7 @@ var setTag$2 = '[object Set]';
4112
3884
  * @returns {boolean} Returns `true` if `value` is a set, else `false`.
4113
3885
  */
4114
3886
  function baseIsSet(value) {
4115
- return isObjectLike(value) && getTag$1(value) == setTag$2;
3887
+ return isObjectLike(value) && getTag$1(value) == setTag$1;
4116
3888
  }
4117
3889
 
4118
3890
  /* Node.js helper references. */
@@ -4138,9 +3910,9 @@ var nodeIsSet = nodeUtil && nodeUtil.isSet;
4138
3910
  var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
4139
3911
 
4140
3912
  /** Used to compose bitmasks for cloning. */
4141
- var CLONE_DEEP_FLAG$1 = 1,
3913
+ var CLONE_DEEP_FLAG = 1,
4142
3914
  CLONE_FLAT_FLAG = 2,
4143
- CLONE_SYMBOLS_FLAG$1 = 4;
3915
+ CLONE_SYMBOLS_FLAG = 4;
4144
3916
 
4145
3917
  /** `Object#toString` result references. */
4146
3918
  var argsTag = '[object Arguments]',
@@ -4150,11 +3922,11 @@ var argsTag = '[object Arguments]',
4150
3922
  errorTag = '[object Error]',
4151
3923
  funcTag = '[object Function]',
4152
3924
  genTag = '[object GeneratorFunction]',
4153
- mapTag$1 = '[object Map]',
3925
+ mapTag = '[object Map]',
4154
3926
  numberTag = '[object Number]',
4155
3927
  objectTag = '[object Object]',
4156
3928
  regexpTag = '[object RegExp]',
4157
- setTag$1 = '[object Set]',
3929
+ setTag = '[object Set]',
4158
3930
  stringTag = '[object String]',
4159
3931
  symbolTag = '[object Symbol]',
4160
3932
  weakMapTag = '[object WeakMap]';
@@ -4178,9 +3950,9 @@ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
4178
3950
  cloneableTags[boolTag] = cloneableTags[dateTag] =
4179
3951
  cloneableTags[float32Tag] = cloneableTags[float64Tag] =
4180
3952
  cloneableTags[int8Tag] = cloneableTags[int16Tag] =
4181
- cloneableTags[int32Tag] = cloneableTags[mapTag$1] =
3953
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
4182
3954
  cloneableTags[numberTag] = cloneableTags[objectTag] =
4183
- cloneableTags[regexpTag] = cloneableTags[setTag$1] =
3955
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
4184
3956
  cloneableTags[stringTag] = cloneableTags[symbolTag] =
4185
3957
  cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
4186
3958
  cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
@@ -4205,9 +3977,9 @@ cloneableTags[weakMapTag] = false;
4205
3977
  */
4206
3978
  function baseClone(value, bitmask, customizer, key, object, stack) {
4207
3979
  var result,
4208
- isDeep = bitmask & CLONE_DEEP_FLAG$1,
3980
+ isDeep = bitmask & CLONE_DEEP_FLAG,
4209
3981
  isFlat = bitmask & CLONE_FLAT_FLAG,
4210
- isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
3982
+ isFull = bitmask & CLONE_SYMBOLS_FLAG;
4211
3983
 
4212
3984
  if (customizer) {
4213
3985
  result = object ? customizer(value, key, object, stack) : customizer(value);
@@ -4215,7 +3987,7 @@ function baseClone(value, bitmask, customizer, key, object, stack) {
4215
3987
  if (result !== undefined) {
4216
3988
  return result;
4217
3989
  }
4218
- if (!isObject$1(value)) {
3990
+ if (!isObject(value)) {
4219
3991
  return value;
4220
3992
  }
4221
3993
  var isArr = isArray(value);
@@ -4279,473 +4051,4 @@ function baseClone(value, bitmask, customizer, key, object, stack) {
4279
4051
  return result;
4280
4052
  }
4281
4053
 
4282
- /** Used to compose bitmasks for cloning. */
4283
- var CLONE_DEEP_FLAG = 1,
4284
- CLONE_SYMBOLS_FLAG = 4;
4285
-
4286
- /**
4287
- * This method is like `_.clone` except that it recursively clones `value`.
4288
- *
4289
- * @static
4290
- * @memberOf _
4291
- * @since 1.0.0
4292
- * @category Lang
4293
- * @param {*} value The value to recursively clone.
4294
- * @returns {*} Returns the deep cloned value.
4295
- * @see _.clone
4296
- * @example
4297
- *
4298
- * var objects = [{ 'a': 1 }, { 'b': 2 }];
4299
- *
4300
- * var deep = _.cloneDeep(objects);
4301
- * console.log(deep[0] === objects[0]);
4302
- * // => false
4303
- */
4304
- function cloneDeep(value) {
4305
- return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
4306
- }
4307
-
4308
- /**
4309
- * Converts `string`, as a whole, to lower case just like
4310
- * [String#toLowerCase](https://mdn.io/toLowerCase).
4311
- *
4312
- * @static
4313
- * @memberOf _
4314
- * @since 4.0.0
4315
- * @category String
4316
- * @param {string} [string=''] The string to convert.
4317
- * @returns {string} Returns the lower cased string.
4318
- * @example
4319
- *
4320
- * _.toLower('--Foo-Bar--');
4321
- * // => '--foo-bar--'
4322
- *
4323
- * _.toLower('fooBar');
4324
- * // => 'foobar'
4325
- *
4326
- * _.toLower('__FOO_BAR__');
4327
- * // => '__foo_bar__'
4328
- */
4329
- function toLower(value) {
4330
- return toString(value).toLowerCase();
4331
- }
4332
-
4333
- /**
4334
- * Performs a deep comparison between two values to determine if they are
4335
- * equivalent.
4336
- *
4337
- * **Note:** This method supports comparing arrays, array buffers, booleans,
4338
- * date objects, error objects, maps, numbers, `Object` objects, regexes,
4339
- * sets, strings, symbols, and typed arrays. `Object` objects are compared
4340
- * by their own, not inherited, enumerable properties. Functions and DOM
4341
- * nodes are compared by strict equality, i.e. `===`.
4342
- *
4343
- * @static
4344
- * @memberOf _
4345
- * @since 0.1.0
4346
- * @category Lang
4347
- * @param {*} value The value to compare.
4348
- * @param {*} other The other value to compare.
4349
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
4350
- * @example
4351
- *
4352
- * var object = { 'a': 1 };
4353
- * var other = { 'a': 1 };
4354
- *
4355
- * _.isEqual(object, other);
4356
- * // => true
4357
- *
4358
- * object === other;
4359
- * // => false
4360
- */
4361
- function isEqual(value, other) {
4362
- return baseIsEqual(value, other);
4363
- }
4364
-
4365
- /** `Object#toString` result references. */
4366
- var mapTag = '[object Map]',
4367
- setTag = '[object Set]';
4368
-
4369
- /** Used for built-in method references. */
4370
- var objectProto = Object.prototype;
4371
-
4372
- /** Used to check objects for own properties. */
4373
- var hasOwnProperty = objectProto.hasOwnProperty;
4374
-
4375
- /**
4376
- * Checks if `value` is an empty object, collection, map, or set.
4377
- *
4378
- * Objects are considered empty if they have no own enumerable string keyed
4379
- * properties.
4380
- *
4381
- * Array-like values such as `arguments` objects, arrays, buffers, strings, or
4382
- * jQuery-like collections are considered empty if they have a `length` of `0`.
4383
- * Similarly, maps and sets are considered empty if they have a `size` of `0`.
4384
- *
4385
- * @static
4386
- * @memberOf _
4387
- * @since 0.1.0
4388
- * @category Lang
4389
- * @param {*} value The value to check.
4390
- * @returns {boolean} Returns `true` if `value` is empty, else `false`.
4391
- * @example
4392
- *
4393
- * _.isEmpty(null);
4394
- * // => true
4395
- *
4396
- * _.isEmpty(true);
4397
- * // => true
4398
- *
4399
- * _.isEmpty(1);
4400
- * // => true
4401
- *
4402
- * _.isEmpty([1, 2, 3]);
4403
- * // => false
4404
- *
4405
- * _.isEmpty({ 'a': 1 });
4406
- * // => false
4407
- */
4408
- function isEmpty(value) {
4409
- if (value == null) {
4410
- return true;
4411
- }
4412
- if (isArrayLike(value) &&
4413
- (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
4414
- isBuffer(value) || isTypedArray(value) || isArguments(value))) {
4415
- return !value.length;
4416
- }
4417
- var tag = getTag$1(value);
4418
- if (tag == mapTag || tag == setTag) {
4419
- return !value.size;
4420
- }
4421
- if (isPrototype(value)) {
4422
- return !baseKeys(value).length;
4423
- }
4424
- for (var key in value) {
4425
- if (hasOwnProperty.call(value, key)) {
4426
- return false;
4427
- }
4428
- }
4429
- return true;
4430
- }
4431
-
4432
- const LOADING_SCRIPTS = {};
4433
-
4434
- let options = {};
4435
-
4436
- function merge(x, y, opt = {}) {
4437
- if (!y || typeof y !== 'object') {
4438
- return x;
4439
- }
4440
- if (!x || typeof x !== 'object') {
4441
- return x;
4442
- }
4443
- function arrayMerge(target, source, options) {
4444
- const destination = target.slice();
4445
- source.forEach((item, index) => {
4446
- if (typeof destination[index] === 'undefined') {
4447
- destination[index] = options.cloneUnlessOtherwiseSpecified(
4448
- item,
4449
- options,
4450
- );
4451
- } else if (options.isMergeableObject(item)) {
4452
- destination[index] = merge(target[index], item, options);
4453
- } else if (target.indexOf(item) === -1) {
4454
- destination.push(item);
4455
- }
4456
- });
4457
- return destination;
4458
- }
4459
- return deepmerge(x, y, {
4460
- arrayMerge,
4461
- });
4462
- }
4463
-
4464
- function setOptions(optns) {
4465
- options = optns;
4466
- }
4467
-
4468
- function getOptions() {
4469
- return options;
4470
- }
4471
-
4472
- function isObject(val) {
4473
- return val && typeof val === 'object' && !(val instanceof Array);
4474
- }
4475
-
4476
- function camelCase(str) {
4477
- return camelize(str);
4478
- }
4479
-
4480
- function snakeCase(str) {
4481
- return decamelize(str, '_');
4482
- }
4483
-
4484
- function toCamel(obj) {
4485
- if (!obj) return obj;
4486
- const objCopy = JSON.parse(JSON.stringify(obj));
4487
- return camelizeKeys(objCopy);
4488
- }
4489
-
4490
- function toCamelPath(str) {
4491
- if (typeof str === 'string') {
4492
- return str.split('.').map(camelize).join('.');
4493
- }
4494
- return str;
4495
- }
4496
-
4497
- function toSnake(obj) {
4498
- if (!obj) return obj;
4499
- const objCopy = JSON.parse(JSON.stringify(obj));
4500
- return decamelizeKeys(objCopy, '_');
4501
- }
4502
-
4503
- function trimBoth(str) {
4504
- return trimStart(trimEnd(str));
4505
- }
4506
-
4507
- function trimStart(str) {
4508
- return typeof str === 'string' ? str.replace(/^[/]+/, '') : '';
4509
- }
4510
-
4511
- function trimEnd(str) {
4512
- return typeof str === 'string' ? str.replace(/[/]+$/, '') : '';
4513
- }
4514
-
4515
- function stringifyQuery(str) {
4516
- return stringify(str);
4517
- }
4518
-
4519
- function map(arr, cb) {
4520
- return arr instanceof Array ? arr.map(cb) : [];
4521
- }
4522
-
4523
- function reduce(arr, cb, init) {
4524
- return arr instanceof Array ? arr.reduce(cb, init) : init;
4525
- }
4526
-
4527
- function isServer() {
4528
- return !(typeof window !== 'undefined' && window && window.document);
4529
- }
4530
-
4531
- function isFunction(func) {
4532
- return typeof func === 'function';
4533
- }
4534
-
4535
- function defaultMethods(request, uri, methods) {
4536
- return {
4537
- list:
4538
- methods.indexOf('list') >= 0
4539
- ? function (query) {
4540
- return request('get', uri, undefined, query);
4541
- }
4542
- : undefined,
4543
-
4544
- get:
4545
- methods.indexOf('get') >= 0
4546
- ? function (id, query) {
4547
- return request('get', uri, id, query);
4548
- }
4549
- : undefined,
4550
- };
4551
- }
4552
-
4553
- async function vaultRequest(method, url, data, opt = undefined) {
4554
- const vaultUrl = options.vaultUrl;
4555
- const timeout = options.timeout;
4556
- const requestId = vaultRequestId();
4557
- const callback = `swell_vault_response_${requestId}`;
4558
-
4559
- data = {
4560
- $jsonp: {
4561
- method,
4562
- callback,
4563
- },
4564
- $data: data,
4565
- $key: options.key,
4566
- };
4567
-
4568
- return new Promise((resolve, reject) => {
4569
- const script = document.createElement('script');
4570
- script.type = 'text/javascript';
4571
- script.src = `${trimEnd(vaultUrl)}/${trimStart(url)}?${serializeData(
4572
- data,
4573
- )}`;
4574
-
4575
- const errorTimeout = setTimeout(() => {
4576
- window[callback]({
4577
- $error: `Request timed out after ${timeout / 1000} seconds`,
4578
- $status: 500,
4579
- });
4580
- }, timeout);
4581
-
4582
- window[callback] = (result) => {
4583
- clearTimeout(errorTimeout);
4584
- if (result && result.$error) {
4585
- const err = new Error(result.$error);
4586
- err.code = 'request_error';
4587
- err.status = result.$status;
4588
- reject(err);
4589
- } else if (!result || result.$status >= 300) {
4590
- const err = new Error(
4591
- 'A connection error occurred while making the request',
4592
- );
4593
- err.code = 'connection_error';
4594
- err.status = result.$status;
4595
- reject(err);
4596
- } else {
4597
- resolve(result.$data);
4598
- }
4599
- delete window[callback];
4600
- script.parentNode.removeChild(script);
4601
- };
4602
-
4603
- document.getElementsByTagName('head')[0].appendChild(script);
4604
- });
4605
- }
4606
-
4607
- function vaultRequestId() {
4608
- window.__swell_vault_request_id = window.__swell_vault_request_id || 0;
4609
- window.__swell_vault_request_id++;
4610
- return window.__swell_vault_request_id;
4611
- }
4612
-
4613
- function serializeData(data) {
4614
- const s = [];
4615
- const add = function (key, value) {
4616
- // If value is a function, invoke it and return its value
4617
- if (typeof value === 'function') {
4618
- value = value();
4619
- } else if (value == null) {
4620
- value = '';
4621
- }
4622
- s[s.length] = encodeURIComponent(key) + '=' + encodeURIComponent(value);
4623
- };
4624
- for (const key in data) {
4625
- buildParams(key, data[key], add);
4626
- }
4627
- return s.join('&').replace(' ', '+');
4628
- }
4629
- const rbracket = /\[\]$/;
4630
- function buildParams(key, obj, add) {
4631
- let name;
4632
- if (obj instanceof Array) {
4633
- for (let i = 0; i < obj.length; i++) {
4634
- if (rbracket.test(key)) {
4635
- // Treat each array item as a scalar.
4636
- add(key, v);
4637
- } else {
4638
- // Item is non-scalar (array or object), encode its numeric index.
4639
- buildParams(
4640
- key + '[' + (typeof v === 'object' && v != null ? i : '') + ']',
4641
- v,
4642
- add,
4643
- );
4644
- }
4645
- }
4646
- } else if (obj && typeof obj === 'object') {
4647
- // Serialize object item.
4648
- for (name in obj) {
4649
- buildParams(key + '[' + name + ']', obj[name], add);
4650
- }
4651
- } else {
4652
- // Serialize scalar item.
4653
- add(key, obj);
4654
- }
4655
- }
4656
-
4657
- function base64Encode(string) {
4658
- if (typeof btoa !== 'undefined') {
4659
- return btoa(string);
4660
- }
4661
- return Buffer.from(string).toString('base64');
4662
- }
4663
-
4664
- function getLocationParams(location) {
4665
- const url = location.search;
4666
- const query = url.substr(1);
4667
- const result = {};
4668
- query.split('&').forEach(function (part) {
4669
- const item = part.split('=');
4670
- result[item[0]] = decodeURIComponent(item[1]);
4671
- });
4672
- return result;
4673
- }
4674
-
4675
- function removeUrlParams() {
4676
- const url = window.location.origin + window.location.pathname;
4677
- window.history.pushState({ path: url }, '', url);
4678
- }
4679
-
4680
- async function loadScript(id, src, attributes = {}) {
4681
- LOADING_SCRIPTS[id] =
4682
- LOADING_SCRIPTS[id] ||
4683
- new Promise((resolve) => {
4684
- const script = document.createElement('script');
4685
- script.id = id;
4686
- script.src = src;
4687
- script.async = true;
4688
- script.type = 'text/javascript';
4689
- for (const [key, value] of Object.entries(attributes)) {
4690
- script.setAttribute(key, value);
4691
- }
4692
- script.addEventListener(
4693
- 'load',
4694
- () => {
4695
- resolve();
4696
- LOADING_SCRIPTS[id] = null;
4697
- },
4698
- {
4699
- once: true,
4700
- },
4701
- );
4702
- document.head.appendChild(script);
4703
- });
4704
- return LOADING_SCRIPTS[id];
4705
- }
4706
-
4707
- function isLiveMode(mode) {
4708
- return mode !== 'test';
4709
- }
4710
-
4711
- var utils = /*#__PURE__*/Object.freeze({
4712
- __proto__: null,
4713
- defaultMethods: defaultMethods,
4714
- set: set,
4715
- get: get,
4716
- uniq: uniq,
4717
- find: find,
4718
- round: round,
4719
- pick: pick,
4720
- findIndex: findIndex,
4721
- camelCase: camelCase,
4722
- cloneDeep: cloneDeep,
4723
- merge: merge,
4724
- setOptions: setOptions,
4725
- getOptions: getOptions,
4726
- toCamel: toCamel,
4727
- toCamelPath: toCamelPath,
4728
- toSnake: toSnake,
4729
- trimBoth: trimBoth,
4730
- trimStart: trimStart,
4731
- trimEnd: trimEnd,
4732
- stringifyQuery: stringifyQuery,
4733
- isServer: isServer,
4734
- isFunction: isFunction,
4735
- isObject: isObject,
4736
- toNumber: toNumber,
4737
- toLower: toLower,
4738
- isEqual: isEqual,
4739
- isEmpty: isEmpty,
4740
- snakeCase: snakeCase,
4741
- map: map,
4742
- reduce: reduce,
4743
- base64Encode: base64Encode,
4744
- vaultRequest: vaultRequest,
4745
- getLocationParams: getLocationParams,
4746
- removeUrlParams: removeUrlParams,
4747
- loadScript: loadScript,
4748
- isLiveMode: isLiveMode
4749
- });
4750
-
4751
- export { isEmpty as A, snakeCase as B, map as C, reduce as D, base64Encode as E, vaultRequest as F, getLocationParams as G, removeUrlParams as H, loadScript as I, isLiveMode as J, utils as K, findIndex as a, cloneDeep as b, camelCase as c, defaultMethods as d, setOptions as e, find as f, get as g, getOptions as h, toCamelPath as i, toSnake as j, trimBoth as k, trimStart as l, merge as m, trimEnd as n, stringifyQuery as o, pick as p, isServer as q, round as r, set as s, toCamel as t, uniq as u, isFunction as v, isObject as w, toNumber as x, toLower as y, isEqual as z };
4054
+ export { SetCache as S, findIndex as a, baseSet as b, baseFindIndex as c, createSet as d, cacheHas as e, find as f, get as g, baseClone as h, toString as i, baseIsEqual as j, isArrayLike as k, isArray as l, isBuffer as m, isTypedArray as n, isArguments as o, pick as p, getTag$1 as q, isPrototype as r, setToArray as s, toNumber as t, baseKeys as u, createRound as v };