@bringg/dashboard-sdk 9.55.0 → 9.56.0

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.
@@ -22426,7 +22426,7 @@ var lodash_1 = __webpack_require__(96486);
22426
22426
  var BringgException_1 = __webpack_require__(43605);
22427
22427
  var Logger_1 = __importDefault(__webpack_require__(55860));
22428
22428
  var abort_1 = __webpack_require__(34179);
22429
- var version = '9.55.0';
22429
+ var version = '9.56.0';
22430
22430
  function logErrorResponse(response) {
22431
22431
  var data = response.data, status = response.status;
22432
22432
  try {
@@ -29118,8 +29118,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
29118
29118
  return (mod && mod.__esModule) ? mod : { "default": mod };
29119
29119
  };
29120
29120
  Object.defineProperty(exports, "__esModule", ({ value: true }));
29121
+ exports.MAX_CONCURRENT_CHUNKED_REQUESTS = exports.DEFAULT_CHUNK_SIZE = void 0;
29121
29122
  var types_1 = __webpack_require__(63127);
29122
- var lodash_1 = __webpack_require__(96486);
29123
+ var chunk_1 = __importDefault(__webpack_require__(8400));
29124
+ var forEach_1 = __importDefault(__webpack_require__(84486));
29125
+ var last_1 = __importDefault(__webpack_require__(10928));
29123
29126
  var rxjs_1 = __webpack_require__(34143);
29124
29127
  var operators_1 = __webpack_require__(11717);
29125
29128
  var BaseStore_1 = __importDefault(__webpack_require__(14436));
@@ -29127,6 +29130,9 @@ var UsersService_1 = __importDefault(__webpack_require__(95401));
29127
29130
  var User_consts_1 = __webpack_require__(38894);
29128
29131
  var UserHelpers_1 = __webpack_require__(2450);
29129
29132
  var THROTTLE_TIME = 500;
29133
+ var MIN_INTERVAL_BETWEEN_CHUNKED_REQUESTS = 300;
29134
+ exports.DEFAULT_CHUNK_SIZE = 50;
29135
+ exports.MAX_CONCURRENT_CHUNKED_REQUESTS = 4;
29130
29136
  var UsersStore = /** @class */ (function (_super) {
29131
29137
  __extends(UsersStore, _super);
29132
29138
  function UsersStore(session, throttleTimeValue) {
@@ -29323,7 +29329,7 @@ var UsersStore = /** @class */ (function (_super) {
29323
29329
  case 0: return [4 /*yield*/, this.usersService.getAll(page, limit)];
29324
29330
  case 1:
29325
29331
  response = _a.sent();
29326
- (0, lodash_1.forEach)(response.users, function (user) { return (_this.getItem(user.id) ? _this.updateInStore(user) : _this.addToStore(user)); });
29332
+ (0, forEach_1.default)(response.users, function (user) { return (_this.getItem(user.id) ? _this.updateInStore(user) : _this.addToStore(user)); });
29327
29333
  return [2 /*return*/, response];
29328
29334
  }
29329
29335
  });
@@ -29338,7 +29344,7 @@ var UsersStore = /** @class */ (function (_super) {
29338
29344
  case 0: return [4 /*yield*/, this.usersService.getAllKeysetPagination(request)];
29339
29345
  case 1:
29340
29346
  response = _a.sent();
29341
- (0, lodash_1.forEach)(response.users, function (user) { return (_this.getItem(user.id) ? _this.updateInStore(user) : _this.addToStore(user)); });
29347
+ (0, forEach_1.default)(response.users, function (user) { return (_this.getItem(user.id) ? _this.updateInStore(user) : _this.addToStore(user)); });
29342
29348
  this.initGroups(this.getItems());
29343
29349
  return [2 /*return*/, response];
29344
29350
  }
@@ -29531,46 +29537,91 @@ var UsersStore = /** @class */ (function (_super) {
29531
29537
  };
29532
29538
  UsersStore.prototype.getMany = function (ids, commonOptions) {
29533
29539
  return __awaiter(this, void 0, void 0, function () {
29534
- var foundedItems, idsSet, missingIds, missingUsers;
29540
+ var idsSet, uniqIds, foundItems, missingIds, missingUsers, missingIdsChunks, concurrentChunks, concurrentChunks_1, concurrentChunks_1_1, concurrentChunk, promises, rejectReason, results, results_1, results_1_1, result, users, e_8_1;
29541
+ var e_8, _a, e_9, _b;
29535
29542
  var _this = this;
29536
- return __generator(this, function (_a) {
29537
- switch (_a.label) {
29543
+ return __generator(this, function (_c) {
29544
+ switch (_c.label) {
29538
29545
  case 0:
29539
- foundedItems = this.getItemsByIds(ids);
29540
- if (foundedItems.length === ids.length) {
29541
- return [2 /*return*/, foundedItems];
29542
- }
29543
29546
  idsSet = new Set(ids);
29544
- foundedItems.forEach(function (user) { return idsSet.delete(user.id); });
29547
+ uniqIds = Array.from(idsSet);
29548
+ foundItems = this.getItemsByIds(uniqIds);
29549
+ if (foundItems.length === uniqIds.length) {
29550
+ return [2 /*return*/, foundItems];
29551
+ }
29552
+ foundItems.forEach(function (user) { return idsSet.delete(user.id); });
29545
29553
  missingIds = Array.from(idsSet);
29546
- return [4 /*yield*/, this.usersService.fetchAllPages(function (page) {
29547
- if (page === void 0) { page = 1; }
29548
- return __awaiter(_this, void 0, void 0, function () {
29549
- var response, fetchedUsers;
29550
- return __generator(this, function (_a) {
29551
- switch (_a.label) {
29552
- case 0: return [4 /*yield*/, this.usersService.getMany({
29553
- usersIds: missingIds,
29554
- page: page,
29555
- limit: 50
29556
- }, commonOptions)];
29557
- case 1:
29558
- response = _a.sent();
29559
- fetchedUsers = response.users;
29560
- // Adding here and not after getting all, so we won't stop the event loop for too long, if we have a lot
29561
- this.addItems(fetchedUsers);
29562
- return [2 /*return*/, {
29563
- values: fetchedUsers,
29564
- hasMore: response.has_next_page,
29565
- nextCursor: page + 1
29566
- }];
29567
- }
29568
- });
29569
- });
29570
- }, { signal: commonOptions === null || commonOptions === void 0 ? void 0 : commonOptions.signal })];
29554
+ missingUsers = [];
29555
+ missingIdsChunks = (0, chunk_1.default)(missingIds, exports.DEFAULT_CHUNK_SIZE);
29556
+ concurrentChunks = (0, chunk_1.default)(missingIdsChunks, exports.MAX_CONCURRENT_CHUNKED_REQUESTS);
29557
+ _c.label = 1;
29571
29558
  case 1:
29572
- missingUsers = _a.sent();
29573
- return [2 /*return*/, foundedItems.concat(missingUsers)];
29559
+ _c.trys.push([1, 6, 7, 8]);
29560
+ concurrentChunks_1 = __values(concurrentChunks), concurrentChunks_1_1 = concurrentChunks_1.next();
29561
+ _c.label = 2;
29562
+ case 2:
29563
+ if (!!concurrentChunks_1_1.done) return [3 /*break*/, 5];
29564
+ concurrentChunk = concurrentChunks_1_1.value;
29565
+ promises = concurrentChunk.map(function (idsChunk) { return __awaiter(_this, void 0, void 0, function () {
29566
+ var chunkResult;
29567
+ return __generator(this, function (_a) {
29568
+ switch (_a.label) {
29569
+ case 0: return [4 /*yield*/, this.usersService.getMany({ usersIds: idsChunk }, commonOptions)];
29570
+ case 1:
29571
+ chunkResult = _a.sent();
29572
+ return [2 /*return*/, chunkResult.users];
29573
+ }
29574
+ });
29575
+ }); });
29576
+ // Rate limit to one set of requests per MIN_INTERVAL_BETWEEN_CHUNKED_REQUESTS
29577
+ if (concurrentChunk !== (0, last_1.default)(concurrentChunks)) {
29578
+ promises.push(new Promise(function (resolve) { return setTimeout(function () { return resolve([]); }, MIN_INTERVAL_BETWEEN_CHUNKED_REQUESTS); }));
29579
+ }
29580
+ rejectReason = null;
29581
+ return [4 /*yield*/, Promise.allSettled(promises)];
29582
+ case 3:
29583
+ results = _c.sent();
29584
+ try {
29585
+ for (results_1 = (e_9 = void 0, __values(results)), results_1_1 = results_1.next(); !results_1_1.done; results_1_1 = results_1.next()) {
29586
+ result = results_1_1.value;
29587
+ if (result.status === 'fulfilled') {
29588
+ users = result.value;
29589
+ missingUsers.push.apply(missingUsers, __spreadArray([], __read(users), false));
29590
+ this.addItems(users);
29591
+ }
29592
+ else {
29593
+ if (!rejectReason) {
29594
+ rejectReason = result.reason;
29595
+ }
29596
+ }
29597
+ }
29598
+ }
29599
+ catch (e_9_1) { e_9 = { error: e_9_1 }; }
29600
+ finally {
29601
+ try {
29602
+ if (results_1_1 && !results_1_1.done && (_b = results_1.return)) _b.call(results_1);
29603
+ }
29604
+ finally { if (e_9) throw e_9.error; }
29605
+ }
29606
+ if (rejectReason) {
29607
+ throw rejectReason;
29608
+ }
29609
+ _c.label = 4;
29610
+ case 4:
29611
+ concurrentChunks_1_1 = concurrentChunks_1.next();
29612
+ return [3 /*break*/, 2];
29613
+ case 5: return [3 /*break*/, 8];
29614
+ case 6:
29615
+ e_8_1 = _c.sent();
29616
+ e_8 = { error: e_8_1 };
29617
+ return [3 /*break*/, 8];
29618
+ case 7:
29619
+ try {
29620
+ if (concurrentChunks_1_1 && !concurrentChunks_1_1.done && (_a = concurrentChunks_1.return)) _a.call(concurrentChunks_1);
29621
+ }
29622
+ finally { if (e_8) throw e_8.error; }
29623
+ return [7 /*endfinally*/];
29624
+ case 8: return [2 /*return*/, foundItems.concat(missingUsers)];
29574
29625
  }
29575
29626
  });
29576
29627
  });
@@ -46918,6 +46969,44 @@ var baseSetToString = !defineProperty ? identity : function(func, string) {
46918
46969
  module.exports = baseSetToString;
46919
46970
 
46920
46971
 
46972
+ /***/ }),
46973
+
46974
+ /***/ 14259:
46975
+ /***/ ((module) => {
46976
+
46977
+ /**
46978
+ * The base implementation of `_.slice` without an iteratee call guard.
46979
+ *
46980
+ * @private
46981
+ * @param {Array} array The array to slice.
46982
+ * @param {number} [start=0] The start position.
46983
+ * @param {number} [end=array.length] The end position.
46984
+ * @returns {Array} Returns the slice of `array`.
46985
+ */
46986
+ function baseSlice(array, start, end) {
46987
+ var index = -1,
46988
+ length = array.length;
46989
+
46990
+ if (start < 0) {
46991
+ start = -start > length ? 0 : (length + start);
46992
+ }
46993
+ end = end > length ? length : end;
46994
+ if (end < 0) {
46995
+ end += length;
46996
+ }
46997
+ length = start > end ? 0 : ((end - start) >>> 0);
46998
+ start >>>= 0;
46999
+
47000
+ var result = Array(length);
47001
+ while (++index < length) {
47002
+ result[index] = array[index + start];
47003
+ }
47004
+ return result;
47005
+ }
47006
+
47007
+ module.exports = baseSlice;
47008
+
47009
+
46921
47010
  /***/ }),
46922
47011
 
46923
47012
  /***/ 22545:
@@ -46989,6 +47078,32 @@ function baseToString(value) {
46989
47078
  module.exports = baseToString;
46990
47079
 
46991
47080
 
47081
+ /***/ }),
47082
+
47083
+ /***/ 27561:
47084
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
47085
+
47086
+ var trimmedEndIndex = __webpack_require__(67990);
47087
+
47088
+ /** Used to match leading whitespace. */
47089
+ var reTrimStart = /^\s+/;
47090
+
47091
+ /**
47092
+ * The base implementation of `_.trim`.
47093
+ *
47094
+ * @private
47095
+ * @param {string} string The string to trim.
47096
+ * @returns {string} Returns the trimmed string.
47097
+ */
47098
+ function baseTrim(string) {
47099
+ return string
47100
+ ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
47101
+ : string;
47102
+ }
47103
+
47104
+ module.exports = baseTrim;
47105
+
47106
+
46992
47107
  /***/ }),
46993
47108
 
46994
47109
  /***/ 7518:
@@ -47056,6 +47171,27 @@ function cacheHas(cache, key) {
47056
47171
  module.exports = cacheHas;
47057
47172
 
47058
47173
 
47174
+ /***/ }),
47175
+
47176
+ /***/ 54290:
47177
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
47178
+
47179
+ var identity = __webpack_require__(6557);
47180
+
47181
+ /**
47182
+ * Casts `value` to `identity` if it's not a function.
47183
+ *
47184
+ * @private
47185
+ * @param {*} value The value to inspect.
47186
+ * @returns {Function} Returns cast function.
47187
+ */
47188
+ function castFunction(value) {
47189
+ return typeof value == 'function' ? value : identity;
47190
+ }
47191
+
47192
+ module.exports = castFunction;
47193
+
47194
+
47059
47195
  /***/ }),
47060
47196
 
47061
47197
  /***/ 71811:
@@ -49834,6 +49970,32 @@ function toSource(func) {
49834
49970
  module.exports = toSource;
49835
49971
 
49836
49972
 
49973
+ /***/ }),
49974
+
49975
+ /***/ 67990:
49976
+ /***/ ((module) => {
49977
+
49978
+ /** Used to match a single whitespace character. */
49979
+ var reWhitespace = /\s/;
49980
+
49981
+ /**
49982
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
49983
+ * character of `string`.
49984
+ *
49985
+ * @private
49986
+ * @param {string} string The string to inspect.
49987
+ * @returns {number} Returns the index of the last non-whitespace character.
49988
+ */
49989
+ function trimmedEndIndex(string) {
49990
+ var index = string.length;
49991
+
49992
+ while (index-- && reWhitespace.test(string.charAt(index))) {}
49993
+ return index;
49994
+ }
49995
+
49996
+ module.exports = trimmedEndIndex;
49997
+
49998
+
49837
49999
  /***/ }),
49838
50000
 
49839
50001
  /***/ 29018:
@@ -49921,6 +50083,63 @@ var attempt = baseRest(function(func, args) {
49921
50083
  module.exports = attempt;
49922
50084
 
49923
50085
 
50086
+ /***/ }),
50087
+
50088
+ /***/ 8400:
50089
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
50090
+
50091
+ var baseSlice = __webpack_require__(14259),
50092
+ isIterateeCall = __webpack_require__(16612),
50093
+ toInteger = __webpack_require__(40554);
50094
+
50095
+ /* Built-in method references for those with the same name as other `lodash` methods. */
50096
+ var nativeCeil = Math.ceil,
50097
+ nativeMax = Math.max;
50098
+
50099
+ /**
50100
+ * Creates an array of elements split into groups the length of `size`.
50101
+ * If `array` can't be split evenly, the final chunk will be the remaining
50102
+ * elements.
50103
+ *
50104
+ * @static
50105
+ * @memberOf _
50106
+ * @since 3.0.0
50107
+ * @category Array
50108
+ * @param {Array} array The array to process.
50109
+ * @param {number} [size=1] The length of each chunk
50110
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
50111
+ * @returns {Array} Returns the new array of chunks.
50112
+ * @example
50113
+ *
50114
+ * _.chunk(['a', 'b', 'c', 'd'], 2);
50115
+ * // => [['a', 'b'], ['c', 'd']]
50116
+ *
50117
+ * _.chunk(['a', 'b', 'c', 'd'], 3);
50118
+ * // => [['a', 'b', 'c'], ['d']]
50119
+ */
50120
+ function chunk(array, size, guard) {
50121
+ if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
50122
+ size = 1;
50123
+ } else {
50124
+ size = nativeMax(toInteger(size), 0);
50125
+ }
50126
+ var length = array == null ? 0 : array.length;
50127
+ if (!length || size < 1) {
50128
+ return [];
50129
+ }
50130
+ var index = 0,
50131
+ resIndex = 0,
50132
+ result = Array(nativeCeil(length / size));
50133
+
50134
+ while (index < length) {
50135
+ result[resIndex++] = baseSlice(array, index, (index += size));
50136
+ }
50137
+ return result;
50138
+ }
50139
+
50140
+ module.exports = chunk;
50141
+
50142
+
49924
50143
  /***/ }),
49925
50144
 
49926
50145
  /***/ 50361:
@@ -50113,6 +50332,54 @@ function flatten(array) {
50113
50332
  module.exports = flatten;
50114
50333
 
50115
50334
 
50335
+ /***/ }),
50336
+
50337
+ /***/ 84486:
50338
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
50339
+
50340
+ var arrayEach = __webpack_require__(77412),
50341
+ baseEach = __webpack_require__(89881),
50342
+ castFunction = __webpack_require__(54290),
50343
+ isArray = __webpack_require__(1469);
50344
+
50345
+ /**
50346
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
50347
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
50348
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
50349
+ *
50350
+ * **Note:** As with other "Collections" methods, objects with a "length"
50351
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
50352
+ * or `_.forOwn` for object iteration.
50353
+ *
50354
+ * @static
50355
+ * @memberOf _
50356
+ * @since 0.1.0
50357
+ * @alias each
50358
+ * @category Collection
50359
+ * @param {Array|Object} collection The collection to iterate over.
50360
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
50361
+ * @returns {Array|Object} Returns `collection`.
50362
+ * @see _.forEachRight
50363
+ * @example
50364
+ *
50365
+ * _.forEach([1, 2], function(value) {
50366
+ * console.log(value);
50367
+ * });
50368
+ * // => Logs `1` then `2`.
50369
+ *
50370
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
50371
+ * console.log(key);
50372
+ * });
50373
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
50374
+ */
50375
+ function forEach(collection, iteratee) {
50376
+ var func = isArray(collection) ? arrayEach : baseEach;
50377
+ return func(collection, castFunction(iteratee));
50378
+ }
50379
+
50380
+ module.exports = forEach;
50381
+
50382
+
50116
50383
  /***/ }),
50117
50384
 
50118
50385
  /***/ 27361:
@@ -51002,6 +51269,33 @@ function keysIn(object) {
51002
51269
  module.exports = keysIn;
51003
51270
 
51004
51271
 
51272
+ /***/ }),
51273
+
51274
+ /***/ 10928:
51275
+ /***/ ((module) => {
51276
+
51277
+ /**
51278
+ * Gets the last element of `array`.
51279
+ *
51280
+ * @static
51281
+ * @memberOf _
51282
+ * @since 0.1.0
51283
+ * @category Array
51284
+ * @param {Array} array The array to query.
51285
+ * @returns {*} Returns the last element of `array`.
51286
+ * @example
51287
+ *
51288
+ * _.last([1, 2, 3]);
51289
+ * // => 3
51290
+ */
51291
+ function last(array) {
51292
+ var length = array == null ? 0 : array.length;
51293
+ return length ? array[length - 1] : undefined;
51294
+ }
51295
+
51296
+ module.exports = last;
51297
+
51298
+
51005
51299
  /***/ }),
51006
51300
 
51007
51301
  /***/ 96486:
@@ -68770,6 +69064,169 @@ var templateSettings = {
68770
69064
  module.exports = templateSettings;
68771
69065
 
68772
69066
 
69067
+ /***/ }),
69068
+
69069
+ /***/ 18601:
69070
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
69071
+
69072
+ var toNumber = __webpack_require__(14841);
69073
+
69074
+ /** Used as references for various `Number` constants. */
69075
+ var INFINITY = 1 / 0,
69076
+ MAX_INTEGER = 1.7976931348623157e+308;
69077
+
69078
+ /**
69079
+ * Converts `value` to a finite number.
69080
+ *
69081
+ * @static
69082
+ * @memberOf _
69083
+ * @since 4.12.0
69084
+ * @category Lang
69085
+ * @param {*} value The value to convert.
69086
+ * @returns {number} Returns the converted number.
69087
+ * @example
69088
+ *
69089
+ * _.toFinite(3.2);
69090
+ * // => 3.2
69091
+ *
69092
+ * _.toFinite(Number.MIN_VALUE);
69093
+ * // => 5e-324
69094
+ *
69095
+ * _.toFinite(Infinity);
69096
+ * // => 1.7976931348623157e+308
69097
+ *
69098
+ * _.toFinite('3.2');
69099
+ * // => 3.2
69100
+ */
69101
+ function toFinite(value) {
69102
+ if (!value) {
69103
+ return value === 0 ? value : 0;
69104
+ }
69105
+ value = toNumber(value);
69106
+ if (value === INFINITY || value === -INFINITY) {
69107
+ var sign = (value < 0 ? -1 : 1);
69108
+ return sign * MAX_INTEGER;
69109
+ }
69110
+ return value === value ? value : 0;
69111
+ }
69112
+
69113
+ module.exports = toFinite;
69114
+
69115
+
69116
+ /***/ }),
69117
+
69118
+ /***/ 40554:
69119
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
69120
+
69121
+ var toFinite = __webpack_require__(18601);
69122
+
69123
+ /**
69124
+ * Converts `value` to an integer.
69125
+ *
69126
+ * **Note:** This method is loosely based on
69127
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
69128
+ *
69129
+ * @static
69130
+ * @memberOf _
69131
+ * @since 4.0.0
69132
+ * @category Lang
69133
+ * @param {*} value The value to convert.
69134
+ * @returns {number} Returns the converted integer.
69135
+ * @example
69136
+ *
69137
+ * _.toInteger(3.2);
69138
+ * // => 3
69139
+ *
69140
+ * _.toInteger(Number.MIN_VALUE);
69141
+ * // => 0
69142
+ *
69143
+ * _.toInteger(Infinity);
69144
+ * // => 1.7976931348623157e+308
69145
+ *
69146
+ * _.toInteger('3.2');
69147
+ * // => 3
69148
+ */
69149
+ function toInteger(value) {
69150
+ var result = toFinite(value),
69151
+ remainder = result % 1;
69152
+
69153
+ return result === result ? (remainder ? result - remainder : result) : 0;
69154
+ }
69155
+
69156
+ module.exports = toInteger;
69157
+
69158
+
69159
+ /***/ }),
69160
+
69161
+ /***/ 14841:
69162
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
69163
+
69164
+ var baseTrim = __webpack_require__(27561),
69165
+ isObject = __webpack_require__(13218),
69166
+ isSymbol = __webpack_require__(33448);
69167
+
69168
+ /** Used as references for various `Number` constants. */
69169
+ var NAN = 0 / 0;
69170
+
69171
+ /** Used to detect bad signed hexadecimal string values. */
69172
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
69173
+
69174
+ /** Used to detect binary string values. */
69175
+ var reIsBinary = /^0b[01]+$/i;
69176
+
69177
+ /** Used to detect octal string values. */
69178
+ var reIsOctal = /^0o[0-7]+$/i;
69179
+
69180
+ /** Built-in method references without a dependency on `root`. */
69181
+ var freeParseInt = parseInt;
69182
+
69183
+ /**
69184
+ * Converts `value` to a number.
69185
+ *
69186
+ * @static
69187
+ * @memberOf _
69188
+ * @since 4.0.0
69189
+ * @category Lang
69190
+ * @param {*} value The value to process.
69191
+ * @returns {number} Returns the number.
69192
+ * @example
69193
+ *
69194
+ * _.toNumber(3.2);
69195
+ * // => 3.2
69196
+ *
69197
+ * _.toNumber(Number.MIN_VALUE);
69198
+ * // => 5e-324
69199
+ *
69200
+ * _.toNumber(Infinity);
69201
+ * // => Infinity
69202
+ *
69203
+ * _.toNumber('3.2');
69204
+ * // => 3.2
69205
+ */
69206
+ function toNumber(value) {
69207
+ if (typeof value == 'number') {
69208
+ return value;
69209
+ }
69210
+ if (isSymbol(value)) {
69211
+ return NAN;
69212
+ }
69213
+ if (isObject(value)) {
69214
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
69215
+ value = isObject(other) ? (other + '') : other;
69216
+ }
69217
+ if (typeof value != 'string') {
69218
+ return value === 0 ? value : +value;
69219
+ }
69220
+ value = baseTrim(value);
69221
+ var isBinary = reIsBinary.test(value);
69222
+ return (isBinary || reIsOctal.test(value))
69223
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
69224
+ : (reIsBadHex.test(value) ? NAN : +value);
69225
+ }
69226
+
69227
+ module.exports = toNumber;
69228
+
69229
+
68773
69230
  /***/ }),
68774
69231
 
68775
69232
  /***/ 79833: