@luludev/configs 0.1.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.
package/dist/utils.js ADDED
@@ -0,0 +1,1599 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
+ get: ((k) => from[k]).bind(null, key),
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
20
+ value: mod,
21
+ enumerable: true
22
+ }) : target, mod));
23
+ //#endregion
24
+ var merge = (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
25
+ /**
26
+ * Lodash (Custom Build) <https://lodash.com/>
27
+ * Build: `lodash modularize exports="npm" -o ./`
28
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
29
+ * Released under MIT license <https://lodash.com/license>
30
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
31
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
32
+ */
33
+ /** Used as the size to enable large array optimizations. */
34
+ var LARGE_ARRAY_SIZE = 200;
35
+ /** Used to stand-in for `undefined` hash values. */
36
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
37
+ /** Used to detect hot functions by number of calls within a span of milliseconds. */
38
+ var HOT_COUNT = 800, HOT_SPAN = 16;
39
+ /** Used as references for various `Number` constants. */
40
+ var MAX_SAFE_INTEGER = 9007199254740991;
41
+ /** `Object#toString` result references. */
42
+ var argsTag = "[object Arguments]", arrayTag = "[object Array]", asyncTag = "[object AsyncFunction]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", nullTag = "[object Null]", objectTag = "[object Object]", proxyTag = "[object Proxy]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", undefinedTag = "[object Undefined]", weakMapTag = "[object WeakMap]";
43
+ var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
44
+ /**
45
+ * Used to match `RegExp`
46
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
47
+ */
48
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
49
+ /** Used to detect host constructors (Safari). */
50
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
51
+ /** Used to detect unsigned integer values. */
52
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
53
+ /** Used to identify `toStringTag` values of typed arrays. */
54
+ var typedArrayTags = {};
55
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
56
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
57
+ /** Detect free variable `global` from Node.js. */
58
+ var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
59
+ /** Detect free variable `self`. */
60
+ var freeSelf = typeof self == "object" && self && self.Object === Object && self;
61
+ /** Used as a reference to the global object. */
62
+ var root = freeGlobal || freeSelf || Function("return this")();
63
+ /** Detect free variable `exports`. */
64
+ var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
65
+ /** Detect free variable `module`. */
66
+ var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
67
+ /** Detect the popular CommonJS extension `module.exports`. */
68
+ var moduleExports = freeModule && freeModule.exports === freeExports;
69
+ /** Detect free variable `process` from Node.js. */
70
+ var freeProcess = moduleExports && freeGlobal.process;
71
+ /** Used to access faster Node.js helpers. */
72
+ var nodeUtil = function() {
73
+ try {
74
+ var types = freeModule && freeModule.require && freeModule.require("util").types;
75
+ if (types) return types;
76
+ return freeProcess && freeProcess.binding && freeProcess.binding("util");
77
+ } catch (e) {}
78
+ }();
79
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
80
+ /**
81
+ * A faster alternative to `Function#apply`, this function invokes `func`
82
+ * with the `this` binding of `thisArg` and the arguments of `args`.
83
+ *
84
+ * @private
85
+ * @param {Function} func The function to invoke.
86
+ * @param {*} thisArg The `this` binding of `func`.
87
+ * @param {Array} args The arguments to invoke `func` with.
88
+ * @returns {*} Returns the result of `func`.
89
+ */
90
+ function apply(func, thisArg, args) {
91
+ switch (args.length) {
92
+ case 0: return func.call(thisArg);
93
+ case 1: return func.call(thisArg, args[0]);
94
+ case 2: return func.call(thisArg, args[0], args[1]);
95
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
96
+ }
97
+ return func.apply(thisArg, args);
98
+ }
99
+ /**
100
+ * The base implementation of `_.times` without support for iteratee shorthands
101
+ * or max array length checks.
102
+ *
103
+ * @private
104
+ * @param {number} n The number of times to invoke `iteratee`.
105
+ * @param {Function} iteratee The function invoked per iteration.
106
+ * @returns {Array} Returns the array of results.
107
+ */
108
+ function baseTimes(n, iteratee) {
109
+ var index = -1, result = Array(n);
110
+ while (++index < n) result[index] = iteratee(index);
111
+ return result;
112
+ }
113
+ /**
114
+ * The base implementation of `_.unary` without support for storing metadata.
115
+ *
116
+ * @private
117
+ * @param {Function} func The function to cap arguments for.
118
+ * @returns {Function} Returns the new capped function.
119
+ */
120
+ function baseUnary(func) {
121
+ return function(value) {
122
+ return func(value);
123
+ };
124
+ }
125
+ /**
126
+ * Gets the value at `key` of `object`.
127
+ *
128
+ * @private
129
+ * @param {Object} [object] The object to query.
130
+ * @param {string} key The key of the property to get.
131
+ * @returns {*} Returns the property value.
132
+ */
133
+ function getValue(object, key) {
134
+ return object == null ? void 0 : object[key];
135
+ }
136
+ /**
137
+ * Creates a unary function that invokes `func` with its argument transformed.
138
+ *
139
+ * @private
140
+ * @param {Function} func The function to wrap.
141
+ * @param {Function} transform The argument transform.
142
+ * @returns {Function} Returns the new function.
143
+ */
144
+ function overArg(func, transform) {
145
+ return function(arg) {
146
+ return func(transform(arg));
147
+ };
148
+ }
149
+ /** Used for built-in method references. */
150
+ var arrayProto = Array.prototype, funcProto = Function.prototype, objectProto = Object.prototype;
151
+ /** Used to detect overreaching core-js shims. */
152
+ var coreJsData = root["__core-js_shared__"];
153
+ /** Used to resolve the decompiled source of functions. */
154
+ var funcToString = funcProto.toString;
155
+ /** Used to check objects for own properties. */
156
+ var hasOwnProperty = objectProto.hasOwnProperty;
157
+ /** Used to detect methods masquerading as native. */
158
+ var maskSrcKey = function() {
159
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
160
+ return uid ? "Symbol(src)_1." + uid : "";
161
+ }();
162
+ /**
163
+ * Used to resolve the
164
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
165
+ * of values.
166
+ */
167
+ var nativeObjectToString = objectProto.toString;
168
+ /** Used to infer the `Object` constructor. */
169
+ var objectCtorString = funcToString.call(Object);
170
+ /** Used to detect if a method is native. */
171
+ var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
172
+ /** Built-in value references. */
173
+ var Buffer = moduleExports ? root.Buffer : void 0, Symbol = root.Symbol, Uint8Array = root.Uint8Array, allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0, getPrototype = overArg(Object.getPrototypeOf, Object), objectCreate = Object.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, symToStringTag = Symbol ? Symbol.toStringTag : void 0;
174
+ var defineProperty = function() {
175
+ try {
176
+ var func = getNative(Object, "defineProperty");
177
+ func({}, "", {});
178
+ return func;
179
+ } catch (e) {}
180
+ }();
181
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0, nativeMax = Math.max, nativeNow = Date.now;
182
+ var Map = getNative(root, "Map"), nativeCreate = getNative(Object, "create");
183
+ /**
184
+ * The base implementation of `_.create` without support for assigning
185
+ * properties to the created object.
186
+ *
187
+ * @private
188
+ * @param {Object} proto The object to inherit from.
189
+ * @returns {Object} Returns the new object.
190
+ */
191
+ var baseCreate = function() {
192
+ function object() {}
193
+ return function(proto) {
194
+ if (!isObject(proto)) return {};
195
+ if (objectCreate) return objectCreate(proto);
196
+ object.prototype = proto;
197
+ var result = new object();
198
+ object.prototype = void 0;
199
+ return result;
200
+ };
201
+ }();
202
+ /**
203
+ * Creates a hash object.
204
+ *
205
+ * @private
206
+ * @constructor
207
+ * @param {Array} [entries] The key-value pairs to cache.
208
+ */
209
+ function Hash(entries) {
210
+ var index = -1, length = entries == null ? 0 : entries.length;
211
+ this.clear();
212
+ while (++index < length) {
213
+ var entry = entries[index];
214
+ this.set(entry[0], entry[1]);
215
+ }
216
+ }
217
+ /**
218
+ * Removes all key-value entries from the hash.
219
+ *
220
+ * @private
221
+ * @name clear
222
+ * @memberOf Hash
223
+ */
224
+ function hashClear() {
225
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
226
+ this.size = 0;
227
+ }
228
+ /**
229
+ * Removes `key` and its value from the hash.
230
+ *
231
+ * @private
232
+ * @name delete
233
+ * @memberOf Hash
234
+ * @param {Object} hash The hash to modify.
235
+ * @param {string} key The key of the value to remove.
236
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
237
+ */
238
+ function hashDelete(key) {
239
+ var result = this.has(key) && delete this.__data__[key];
240
+ this.size -= result ? 1 : 0;
241
+ return result;
242
+ }
243
+ /**
244
+ * Gets the hash value for `key`.
245
+ *
246
+ * @private
247
+ * @name get
248
+ * @memberOf Hash
249
+ * @param {string} key The key of the value to get.
250
+ * @returns {*} Returns the entry value.
251
+ */
252
+ function hashGet(key) {
253
+ var data = this.__data__;
254
+ if (nativeCreate) {
255
+ var result = data[key];
256
+ return result === HASH_UNDEFINED ? void 0 : result;
257
+ }
258
+ return hasOwnProperty.call(data, key) ? data[key] : void 0;
259
+ }
260
+ /**
261
+ * Checks if a hash value for `key` exists.
262
+ *
263
+ * @private
264
+ * @name has
265
+ * @memberOf Hash
266
+ * @param {string} key The key of the entry to check.
267
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
268
+ */
269
+ function hashHas(key) {
270
+ var data = this.__data__;
271
+ return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
272
+ }
273
+ /**
274
+ * Sets the hash `key` to `value`.
275
+ *
276
+ * @private
277
+ * @name set
278
+ * @memberOf Hash
279
+ * @param {string} key The key of the value to set.
280
+ * @param {*} value The value to set.
281
+ * @returns {Object} Returns the hash instance.
282
+ */
283
+ function hashSet(key, value) {
284
+ var data = this.__data__;
285
+ this.size += this.has(key) ? 0 : 1;
286
+ data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
287
+ return this;
288
+ }
289
+ Hash.prototype.clear = hashClear;
290
+ Hash.prototype["delete"] = hashDelete;
291
+ Hash.prototype.get = hashGet;
292
+ Hash.prototype.has = hashHas;
293
+ Hash.prototype.set = hashSet;
294
+ /**
295
+ * Creates an list cache object.
296
+ *
297
+ * @private
298
+ * @constructor
299
+ * @param {Array} [entries] The key-value pairs to cache.
300
+ */
301
+ function ListCache(entries) {
302
+ var index = -1, length = entries == null ? 0 : entries.length;
303
+ this.clear();
304
+ while (++index < length) {
305
+ var entry = entries[index];
306
+ this.set(entry[0], entry[1]);
307
+ }
308
+ }
309
+ /**
310
+ * Removes all key-value entries from the list cache.
311
+ *
312
+ * @private
313
+ * @name clear
314
+ * @memberOf ListCache
315
+ */
316
+ function listCacheClear() {
317
+ this.__data__ = [];
318
+ this.size = 0;
319
+ }
320
+ /**
321
+ * Removes `key` and its value from the list cache.
322
+ *
323
+ * @private
324
+ * @name delete
325
+ * @memberOf ListCache
326
+ * @param {string} key The key of the value to remove.
327
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
328
+ */
329
+ function listCacheDelete(key) {
330
+ var data = this.__data__, index = assocIndexOf(data, key);
331
+ if (index < 0) return false;
332
+ if (index == data.length - 1) data.pop();
333
+ else splice.call(data, index, 1);
334
+ --this.size;
335
+ return true;
336
+ }
337
+ /**
338
+ * Gets the list cache value for `key`.
339
+ *
340
+ * @private
341
+ * @name get
342
+ * @memberOf ListCache
343
+ * @param {string} key The key of the value to get.
344
+ * @returns {*} Returns the entry value.
345
+ */
346
+ function listCacheGet(key) {
347
+ var data = this.__data__, index = assocIndexOf(data, key);
348
+ return index < 0 ? void 0 : data[index][1];
349
+ }
350
+ /**
351
+ * Checks if a list cache value for `key` exists.
352
+ *
353
+ * @private
354
+ * @name has
355
+ * @memberOf ListCache
356
+ * @param {string} key The key of the entry to check.
357
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
358
+ */
359
+ function listCacheHas(key) {
360
+ return assocIndexOf(this.__data__, key) > -1;
361
+ }
362
+ /**
363
+ * Sets the list cache `key` to `value`.
364
+ *
365
+ * @private
366
+ * @name set
367
+ * @memberOf ListCache
368
+ * @param {string} key The key of the value to set.
369
+ * @param {*} value The value to set.
370
+ * @returns {Object} Returns the list cache instance.
371
+ */
372
+ function listCacheSet(key, value) {
373
+ var data = this.__data__, index = assocIndexOf(data, key);
374
+ if (index < 0) {
375
+ ++this.size;
376
+ data.push([key, value]);
377
+ } else data[index][1] = value;
378
+ return this;
379
+ }
380
+ ListCache.prototype.clear = listCacheClear;
381
+ ListCache.prototype["delete"] = listCacheDelete;
382
+ ListCache.prototype.get = listCacheGet;
383
+ ListCache.prototype.has = listCacheHas;
384
+ ListCache.prototype.set = listCacheSet;
385
+ /**
386
+ * Creates a map cache object to store key-value pairs.
387
+ *
388
+ * @private
389
+ * @constructor
390
+ * @param {Array} [entries] The key-value pairs to cache.
391
+ */
392
+ function MapCache(entries) {
393
+ var index = -1, length = entries == null ? 0 : entries.length;
394
+ this.clear();
395
+ while (++index < length) {
396
+ var entry = entries[index];
397
+ this.set(entry[0], entry[1]);
398
+ }
399
+ }
400
+ /**
401
+ * Removes all key-value entries from the map.
402
+ *
403
+ * @private
404
+ * @name clear
405
+ * @memberOf MapCache
406
+ */
407
+ function mapCacheClear() {
408
+ this.size = 0;
409
+ this.__data__ = {
410
+ "hash": new Hash(),
411
+ "map": new (Map || ListCache)(),
412
+ "string": new Hash()
413
+ };
414
+ }
415
+ /**
416
+ * Removes `key` and its value from the map.
417
+ *
418
+ * @private
419
+ * @name delete
420
+ * @memberOf MapCache
421
+ * @param {string} key The key of the value to remove.
422
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
423
+ */
424
+ function mapCacheDelete(key) {
425
+ var result = getMapData(this, key)["delete"](key);
426
+ this.size -= result ? 1 : 0;
427
+ return result;
428
+ }
429
+ /**
430
+ * Gets the map value for `key`.
431
+ *
432
+ * @private
433
+ * @name get
434
+ * @memberOf MapCache
435
+ * @param {string} key The key of the value to get.
436
+ * @returns {*} Returns the entry value.
437
+ */
438
+ function mapCacheGet(key) {
439
+ return getMapData(this, key).get(key);
440
+ }
441
+ /**
442
+ * Checks if a map value for `key` exists.
443
+ *
444
+ * @private
445
+ * @name has
446
+ * @memberOf MapCache
447
+ * @param {string} key The key of the entry to check.
448
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
449
+ */
450
+ function mapCacheHas(key) {
451
+ return getMapData(this, key).has(key);
452
+ }
453
+ /**
454
+ * Sets the map `key` to `value`.
455
+ *
456
+ * @private
457
+ * @name set
458
+ * @memberOf MapCache
459
+ * @param {string} key The key of the value to set.
460
+ * @param {*} value The value to set.
461
+ * @returns {Object} Returns the map cache instance.
462
+ */
463
+ function mapCacheSet(key, value) {
464
+ var data = getMapData(this, key), size = data.size;
465
+ data.set(key, value);
466
+ this.size += data.size == size ? 0 : 1;
467
+ return this;
468
+ }
469
+ MapCache.prototype.clear = mapCacheClear;
470
+ MapCache.prototype["delete"] = mapCacheDelete;
471
+ MapCache.prototype.get = mapCacheGet;
472
+ MapCache.prototype.has = mapCacheHas;
473
+ MapCache.prototype.set = mapCacheSet;
474
+ /**
475
+ * Creates a stack cache object to store key-value pairs.
476
+ *
477
+ * @private
478
+ * @constructor
479
+ * @param {Array} [entries] The key-value pairs to cache.
480
+ */
481
+ function Stack(entries) {
482
+ var data = this.__data__ = new ListCache(entries);
483
+ this.size = data.size;
484
+ }
485
+ /**
486
+ * Removes all key-value entries from the stack.
487
+ *
488
+ * @private
489
+ * @name clear
490
+ * @memberOf Stack
491
+ */
492
+ function stackClear() {
493
+ this.__data__ = new ListCache();
494
+ this.size = 0;
495
+ }
496
+ /**
497
+ * Removes `key` and its value from the stack.
498
+ *
499
+ * @private
500
+ * @name delete
501
+ * @memberOf Stack
502
+ * @param {string} key The key of the value to remove.
503
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
504
+ */
505
+ function stackDelete(key) {
506
+ var data = this.__data__, result = data["delete"](key);
507
+ this.size = data.size;
508
+ return result;
509
+ }
510
+ /**
511
+ * Gets the stack value for `key`.
512
+ *
513
+ * @private
514
+ * @name get
515
+ * @memberOf Stack
516
+ * @param {string} key The key of the value to get.
517
+ * @returns {*} Returns the entry value.
518
+ */
519
+ function stackGet(key) {
520
+ return this.__data__.get(key);
521
+ }
522
+ /**
523
+ * Checks if a stack value for `key` exists.
524
+ *
525
+ * @private
526
+ * @name has
527
+ * @memberOf Stack
528
+ * @param {string} key The key of the entry to check.
529
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
530
+ */
531
+ function stackHas(key) {
532
+ return this.__data__.has(key);
533
+ }
534
+ /**
535
+ * Sets the stack `key` to `value`.
536
+ *
537
+ * @private
538
+ * @name set
539
+ * @memberOf Stack
540
+ * @param {string} key The key of the value to set.
541
+ * @param {*} value The value to set.
542
+ * @returns {Object} Returns the stack cache instance.
543
+ */
544
+ function stackSet(key, value) {
545
+ var data = this.__data__;
546
+ if (data instanceof ListCache) {
547
+ var pairs = data.__data__;
548
+ if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
549
+ pairs.push([key, value]);
550
+ this.size = ++data.size;
551
+ return this;
552
+ }
553
+ data = this.__data__ = new MapCache(pairs);
554
+ }
555
+ data.set(key, value);
556
+ this.size = data.size;
557
+ return this;
558
+ }
559
+ Stack.prototype.clear = stackClear;
560
+ Stack.prototype["delete"] = stackDelete;
561
+ Stack.prototype.get = stackGet;
562
+ Stack.prototype.has = stackHas;
563
+ Stack.prototype.set = stackSet;
564
+ /**
565
+ * Creates an array of the enumerable property names of the array-like `value`.
566
+ *
567
+ * @private
568
+ * @param {*} value The value to query.
569
+ * @param {boolean} inherited Specify returning inherited property names.
570
+ * @returns {Array} Returns the array of property names.
571
+ */
572
+ function arrayLikeKeys(value, inherited) {
573
+ var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
574
+ for (var key in value) if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) result.push(key);
575
+ return result;
576
+ }
577
+ /**
578
+ * This function is like `assignValue` except that it doesn't assign
579
+ * `undefined` values.
580
+ *
581
+ * @private
582
+ * @param {Object} object The object to modify.
583
+ * @param {string} key The key of the property to assign.
584
+ * @param {*} value The value to assign.
585
+ */
586
+ function assignMergeValue(object, key, value) {
587
+ if (value !== void 0 && !eq(object[key], value) || value === void 0 && !(key in object)) baseAssignValue(object, key, value);
588
+ }
589
+ /**
590
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
591
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
592
+ * for equality comparisons.
593
+ *
594
+ * @private
595
+ * @param {Object} object The object to modify.
596
+ * @param {string} key The key of the property to assign.
597
+ * @param {*} value The value to assign.
598
+ */
599
+ function assignValue(object, key, value) {
600
+ var objValue = object[key];
601
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) baseAssignValue(object, key, value);
602
+ }
603
+ /**
604
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
605
+ *
606
+ * @private
607
+ * @param {Array} array The array to inspect.
608
+ * @param {*} key The key to search for.
609
+ * @returns {number} Returns the index of the matched value, else `-1`.
610
+ */
611
+ function assocIndexOf(array, key) {
612
+ var length = array.length;
613
+ while (length--) if (eq(array[length][0], key)) return length;
614
+ return -1;
615
+ }
616
+ /**
617
+ * The base implementation of `assignValue` and `assignMergeValue` without
618
+ * value checks.
619
+ *
620
+ * @private
621
+ * @param {Object} object The object to modify.
622
+ * @param {string} key The key of the property to assign.
623
+ * @param {*} value The value to assign.
624
+ */
625
+ function baseAssignValue(object, key, value) {
626
+ if (key == "__proto__" && defineProperty) defineProperty(object, key, {
627
+ "configurable": true,
628
+ "enumerable": true,
629
+ "value": value,
630
+ "writable": true
631
+ });
632
+ else object[key] = value;
633
+ }
634
+ /**
635
+ * The base implementation of `baseForOwn` which iterates over `object`
636
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
637
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
638
+ *
639
+ * @private
640
+ * @param {Object} object The object to iterate over.
641
+ * @param {Function} iteratee The function invoked per iteration.
642
+ * @param {Function} keysFunc The function to get the keys of `object`.
643
+ * @returns {Object} Returns `object`.
644
+ */
645
+ var baseFor = createBaseFor();
646
+ /**
647
+ * The base implementation of `getTag` without fallbacks for buggy environments.
648
+ *
649
+ * @private
650
+ * @param {*} value The value to query.
651
+ * @returns {string} Returns the `toStringTag`.
652
+ */
653
+ function baseGetTag(value) {
654
+ if (value == null) return value === void 0 ? undefinedTag : nullTag;
655
+ return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
656
+ }
657
+ /**
658
+ * The base implementation of `_.isArguments`.
659
+ *
660
+ * @private
661
+ * @param {*} value The value to check.
662
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
663
+ */
664
+ function baseIsArguments(value) {
665
+ return isObjectLike(value) && baseGetTag(value) == argsTag;
666
+ }
667
+ /**
668
+ * The base implementation of `_.isNative` without bad shim checks.
669
+ *
670
+ * @private
671
+ * @param {*} value The value to check.
672
+ * @returns {boolean} Returns `true` if `value` is a native function,
673
+ * else `false`.
674
+ */
675
+ function baseIsNative(value) {
676
+ if (!isObject(value) || isMasked(value)) return false;
677
+ return (isFunction(value) ? reIsNative : reIsHostCtor).test(toSource(value));
678
+ }
679
+ /**
680
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
681
+ *
682
+ * @private
683
+ * @param {*} value The value to check.
684
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
685
+ */
686
+ function baseIsTypedArray(value) {
687
+ return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
688
+ }
689
+ /**
690
+ * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
691
+ *
692
+ * @private
693
+ * @param {Object} object The object to query.
694
+ * @returns {Array} Returns the array of property names.
695
+ */
696
+ function baseKeysIn(object) {
697
+ if (!isObject(object)) return nativeKeysIn(object);
698
+ var isProto = isPrototype(object), result = [];
699
+ for (var key in object) if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) result.push(key);
700
+ return result;
701
+ }
702
+ /**
703
+ * The base implementation of `_.merge` without support for multiple sources.
704
+ *
705
+ * @private
706
+ * @param {Object} object The destination object.
707
+ * @param {Object} source The source object.
708
+ * @param {number} srcIndex The index of `source`.
709
+ * @param {Function} [customizer] The function to customize merged values.
710
+ * @param {Object} [stack] Tracks traversed source values and their merged
711
+ * counterparts.
712
+ */
713
+ function baseMerge(object, source, srcIndex, customizer, stack) {
714
+ if (object === source) return;
715
+ baseFor(source, function(srcValue, key) {
716
+ stack || (stack = new Stack());
717
+ if (isObject(srcValue)) baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
718
+ else {
719
+ var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : void 0;
720
+ if (newValue === void 0) newValue = srcValue;
721
+ assignMergeValue(object, key, newValue);
722
+ }
723
+ }, keysIn);
724
+ }
725
+ /**
726
+ * A specialized version of `baseMerge` for arrays and objects which performs
727
+ * deep merges and tracks traversed objects enabling objects with circular
728
+ * references to be merged.
729
+ *
730
+ * @private
731
+ * @param {Object} object The destination object.
732
+ * @param {Object} source The source object.
733
+ * @param {string} key The key of the value to merge.
734
+ * @param {number} srcIndex The index of `source`.
735
+ * @param {Function} mergeFunc The function to merge values.
736
+ * @param {Function} [customizer] The function to customize assigned values.
737
+ * @param {Object} [stack] Tracks traversed source values and their merged
738
+ * counterparts.
739
+ */
740
+ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
741
+ var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue);
742
+ if (stacked) {
743
+ assignMergeValue(object, key, stacked);
744
+ return;
745
+ }
746
+ var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : void 0;
747
+ var isCommon = newValue === void 0;
748
+ if (isCommon) {
749
+ var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
750
+ newValue = srcValue;
751
+ if (isArr || isBuff || isTyped) if (isArray(objValue)) newValue = objValue;
752
+ else if (isArrayLikeObject(objValue)) newValue = copyArray(objValue);
753
+ else if (isBuff) {
754
+ isCommon = false;
755
+ newValue = cloneBuffer(srcValue, true);
756
+ } else if (isTyped) {
757
+ isCommon = false;
758
+ newValue = cloneTypedArray(srcValue, true);
759
+ } else newValue = [];
760
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
761
+ newValue = objValue;
762
+ if (isArguments(objValue)) newValue = toPlainObject(objValue);
763
+ else if (!isObject(objValue) || isFunction(objValue)) newValue = initCloneObject(srcValue);
764
+ } else isCommon = false;
765
+ }
766
+ if (isCommon) {
767
+ stack.set(srcValue, newValue);
768
+ mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
769
+ stack["delete"](srcValue);
770
+ }
771
+ assignMergeValue(object, key, newValue);
772
+ }
773
+ /**
774
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
775
+ *
776
+ * @private
777
+ * @param {Function} func The function to apply a rest parameter to.
778
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
779
+ * @returns {Function} Returns the new function.
780
+ */
781
+ function baseRest(func, start) {
782
+ return setToString(overRest(func, start, identity), func + "");
783
+ }
784
+ /**
785
+ * The base implementation of `setToString` without support for hot loop shorting.
786
+ *
787
+ * @private
788
+ * @param {Function} func The function to modify.
789
+ * @param {Function} string The `toString` result.
790
+ * @returns {Function} Returns `func`.
791
+ */
792
+ var baseSetToString = !defineProperty ? identity : function(func, string) {
793
+ return defineProperty(func, "toString", {
794
+ "configurable": true,
795
+ "enumerable": false,
796
+ "value": constant(string),
797
+ "writable": true
798
+ });
799
+ };
800
+ /**
801
+ * Creates a clone of `buffer`.
802
+ *
803
+ * @private
804
+ * @param {Buffer} buffer The buffer to clone.
805
+ * @param {boolean} [isDeep] Specify a deep clone.
806
+ * @returns {Buffer} Returns the cloned buffer.
807
+ */
808
+ function cloneBuffer(buffer, isDeep) {
809
+ if (isDeep) return buffer.slice();
810
+ var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
811
+ buffer.copy(result);
812
+ return result;
813
+ }
814
+ /**
815
+ * Creates a clone of `arrayBuffer`.
816
+ *
817
+ * @private
818
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
819
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
820
+ */
821
+ function cloneArrayBuffer(arrayBuffer) {
822
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
823
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
824
+ return result;
825
+ }
826
+ /**
827
+ * Creates a clone of `typedArray`.
828
+ *
829
+ * @private
830
+ * @param {Object} typedArray The typed array to clone.
831
+ * @param {boolean} [isDeep] Specify a deep clone.
832
+ * @returns {Object} Returns the cloned typed array.
833
+ */
834
+ function cloneTypedArray(typedArray, isDeep) {
835
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
836
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
837
+ }
838
+ /**
839
+ * Copies the values of `source` to `array`.
840
+ *
841
+ * @private
842
+ * @param {Array} source The array to copy values from.
843
+ * @param {Array} [array=[]] The array to copy values to.
844
+ * @returns {Array} Returns `array`.
845
+ */
846
+ function copyArray(source, array) {
847
+ var index = -1, length = source.length;
848
+ array || (array = Array(length));
849
+ while (++index < length) array[index] = source[index];
850
+ return array;
851
+ }
852
+ /**
853
+ * Copies properties of `source` to `object`.
854
+ *
855
+ * @private
856
+ * @param {Object} source The object to copy properties from.
857
+ * @param {Array} props The property identifiers to copy.
858
+ * @param {Object} [object={}] The object to copy properties to.
859
+ * @param {Function} [customizer] The function to customize copied values.
860
+ * @returns {Object} Returns `object`.
861
+ */
862
+ function copyObject(source, props, object, customizer) {
863
+ var isNew = !object;
864
+ object || (object = {});
865
+ var index = -1, length = props.length;
866
+ while (++index < length) {
867
+ var key = props[index];
868
+ var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
869
+ if (newValue === void 0) newValue = source[key];
870
+ if (isNew) baseAssignValue(object, key, newValue);
871
+ else assignValue(object, key, newValue);
872
+ }
873
+ return object;
874
+ }
875
+ /**
876
+ * Creates a function like `_.assign`.
877
+ *
878
+ * @private
879
+ * @param {Function} assigner The function to assign values.
880
+ * @returns {Function} Returns the new assigner function.
881
+ */
882
+ function createAssigner(assigner) {
883
+ return baseRest(function(object, sources) {
884
+ var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0;
885
+ customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0;
886
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
887
+ customizer = length < 3 ? void 0 : customizer;
888
+ length = 1;
889
+ }
890
+ object = Object(object);
891
+ while (++index < length) {
892
+ var source = sources[index];
893
+ if (source) assigner(object, source, index, customizer);
894
+ }
895
+ return object;
896
+ });
897
+ }
898
+ /**
899
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
900
+ *
901
+ * @private
902
+ * @param {boolean} [fromRight] Specify iterating from right to left.
903
+ * @returns {Function} Returns the new base function.
904
+ */
905
+ function createBaseFor(fromRight) {
906
+ return function(object, iteratee, keysFunc) {
907
+ var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
908
+ while (length--) {
909
+ var key = props[fromRight ? length : ++index];
910
+ if (iteratee(iterable[key], key, iterable) === false) break;
911
+ }
912
+ return object;
913
+ };
914
+ }
915
+ /**
916
+ * Gets the data for `map`.
917
+ *
918
+ * @private
919
+ * @param {Object} map The map to query.
920
+ * @param {string} key The reference key.
921
+ * @returns {*} Returns the map data.
922
+ */
923
+ function getMapData(map, key) {
924
+ var data = map.__data__;
925
+ return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
926
+ }
927
+ /**
928
+ * Gets the native function at `key` of `object`.
929
+ *
930
+ * @private
931
+ * @param {Object} object The object to query.
932
+ * @param {string} key The key of the method to get.
933
+ * @returns {*} Returns the function if it's native, else `undefined`.
934
+ */
935
+ function getNative(object, key) {
936
+ var value = getValue(object, key);
937
+ return baseIsNative(value) ? value : void 0;
938
+ }
939
+ /**
940
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
941
+ *
942
+ * @private
943
+ * @param {*} value The value to query.
944
+ * @returns {string} Returns the raw `toStringTag`.
945
+ */
946
+ function getRawTag(value) {
947
+ var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
948
+ try {
949
+ value[symToStringTag] = void 0;
950
+ var unmasked = true;
951
+ } catch (e) {}
952
+ var result = nativeObjectToString.call(value);
953
+ if (unmasked) if (isOwn) value[symToStringTag] = tag;
954
+ else delete value[symToStringTag];
955
+ return result;
956
+ }
957
+ /**
958
+ * Initializes an object clone.
959
+ *
960
+ * @private
961
+ * @param {Object} object The object to clone.
962
+ * @returns {Object} Returns the initialized clone.
963
+ */
964
+ function initCloneObject(object) {
965
+ return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
966
+ }
967
+ /**
968
+ * Checks if `value` is a valid array-like index.
969
+ *
970
+ * @private
971
+ * @param {*} value The value to check.
972
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
973
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
974
+ */
975
+ function isIndex(value, length) {
976
+ var type = typeof value;
977
+ length = length == null ? MAX_SAFE_INTEGER : length;
978
+ return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
979
+ }
980
+ /**
981
+ * Checks if the given arguments are from an iteratee call.
982
+ *
983
+ * @private
984
+ * @param {*} value The potential iteratee value argument.
985
+ * @param {*} index The potential iteratee index or key argument.
986
+ * @param {*} object The potential iteratee object argument.
987
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
988
+ * else `false`.
989
+ */
990
+ function isIterateeCall(value, index, object) {
991
+ if (!isObject(object)) return false;
992
+ var type = typeof index;
993
+ if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) return eq(object[index], value);
994
+ return false;
995
+ }
996
+ /**
997
+ * Checks if `value` is suitable for use as unique object key.
998
+ *
999
+ * @private
1000
+ * @param {*} value The value to check.
1001
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
1002
+ */
1003
+ function isKeyable(value) {
1004
+ var type = typeof value;
1005
+ return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
1006
+ }
1007
+ /**
1008
+ * Checks if `func` has its source masked.
1009
+ *
1010
+ * @private
1011
+ * @param {Function} func The function to check.
1012
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
1013
+ */
1014
+ function isMasked(func) {
1015
+ return !!maskSrcKey && maskSrcKey in func;
1016
+ }
1017
+ /**
1018
+ * Checks if `value` is likely a prototype object.
1019
+ *
1020
+ * @private
1021
+ * @param {*} value The value to check.
1022
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
1023
+ */
1024
+ function isPrototype(value) {
1025
+ var Ctor = value && value.constructor;
1026
+ return value === (typeof Ctor == "function" && Ctor.prototype || objectProto);
1027
+ }
1028
+ /**
1029
+ * This function is like
1030
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1031
+ * except that it includes inherited enumerable properties.
1032
+ *
1033
+ * @private
1034
+ * @param {Object} object The object to query.
1035
+ * @returns {Array} Returns the array of property names.
1036
+ */
1037
+ function nativeKeysIn(object) {
1038
+ var result = [];
1039
+ if (object != null) for (var key in Object(object)) result.push(key);
1040
+ return result;
1041
+ }
1042
+ /**
1043
+ * Converts `value` to a string using `Object.prototype.toString`.
1044
+ *
1045
+ * @private
1046
+ * @param {*} value The value to convert.
1047
+ * @returns {string} Returns the converted string.
1048
+ */
1049
+ function objectToString(value) {
1050
+ return nativeObjectToString.call(value);
1051
+ }
1052
+ /**
1053
+ * A specialized version of `baseRest` which transforms the rest array.
1054
+ *
1055
+ * @private
1056
+ * @param {Function} func The function to apply a rest parameter to.
1057
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
1058
+ * @param {Function} transform The rest array transform.
1059
+ * @returns {Function} Returns the new function.
1060
+ */
1061
+ function overRest(func, start, transform) {
1062
+ start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
1063
+ return function() {
1064
+ var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
1065
+ while (++index < length) array[index] = args[start + index];
1066
+ index = -1;
1067
+ var otherArgs = Array(start + 1);
1068
+ while (++index < start) otherArgs[index] = args[index];
1069
+ otherArgs[start] = transform(array);
1070
+ return apply(func, this, otherArgs);
1071
+ };
1072
+ }
1073
+ /**
1074
+ * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
1075
+ *
1076
+ * @private
1077
+ * @param {Object} object The object to query.
1078
+ * @param {string} key The key of the property to get.
1079
+ * @returns {*} Returns the property value.
1080
+ */
1081
+ function safeGet(object, key) {
1082
+ if (key === "constructor" && typeof object[key] === "function") return;
1083
+ if (key == "__proto__") return;
1084
+ return object[key];
1085
+ }
1086
+ /**
1087
+ * Sets the `toString` method of `func` to return `string`.
1088
+ *
1089
+ * @private
1090
+ * @param {Function} func The function to modify.
1091
+ * @param {Function} string The `toString` result.
1092
+ * @returns {Function} Returns `func`.
1093
+ */
1094
+ var setToString = shortOut(baseSetToString);
1095
+ /**
1096
+ * Creates a function that'll short out and invoke `identity` instead
1097
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
1098
+ * milliseconds.
1099
+ *
1100
+ * @private
1101
+ * @param {Function} func The function to restrict.
1102
+ * @returns {Function} Returns the new shortable function.
1103
+ */
1104
+ function shortOut(func) {
1105
+ var count = 0, lastCalled = 0;
1106
+ return function() {
1107
+ var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
1108
+ lastCalled = stamp;
1109
+ if (remaining > 0) {
1110
+ if (++count >= HOT_COUNT) return arguments[0];
1111
+ } else count = 0;
1112
+ return func.apply(void 0, arguments);
1113
+ };
1114
+ }
1115
+ /**
1116
+ * Converts `func` to its source code.
1117
+ *
1118
+ * @private
1119
+ * @param {Function} func The function to convert.
1120
+ * @returns {string} Returns the source code.
1121
+ */
1122
+ function toSource(func) {
1123
+ if (func != null) {
1124
+ try {
1125
+ return funcToString.call(func);
1126
+ } catch (e) {}
1127
+ try {
1128
+ return func + "";
1129
+ } catch (e) {}
1130
+ }
1131
+ return "";
1132
+ }
1133
+ /**
1134
+ * Performs a
1135
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1136
+ * comparison between two values to determine if they are equivalent.
1137
+ *
1138
+ * @static
1139
+ * @memberOf _
1140
+ * @since 4.0.0
1141
+ * @category Lang
1142
+ * @param {*} value The value to compare.
1143
+ * @param {*} other The other value to compare.
1144
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1145
+ * @example
1146
+ *
1147
+ * var object = { 'a': 1 };
1148
+ * var other = { 'a': 1 };
1149
+ *
1150
+ * _.eq(object, object);
1151
+ * // => true
1152
+ *
1153
+ * _.eq(object, other);
1154
+ * // => false
1155
+ *
1156
+ * _.eq('a', 'a');
1157
+ * // => true
1158
+ *
1159
+ * _.eq('a', Object('a'));
1160
+ * // => false
1161
+ *
1162
+ * _.eq(NaN, NaN);
1163
+ * // => true
1164
+ */
1165
+ function eq(value, other) {
1166
+ return value === other || value !== value && other !== other;
1167
+ }
1168
+ /**
1169
+ * Checks if `value` is likely an `arguments` object.
1170
+ *
1171
+ * @static
1172
+ * @memberOf _
1173
+ * @since 0.1.0
1174
+ * @category Lang
1175
+ * @param {*} value The value to check.
1176
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1177
+ * else `false`.
1178
+ * @example
1179
+ *
1180
+ * _.isArguments(function() { return arguments; }());
1181
+ * // => true
1182
+ *
1183
+ * _.isArguments([1, 2, 3]);
1184
+ * // => false
1185
+ */
1186
+ var isArguments = baseIsArguments(function() {
1187
+ return arguments;
1188
+ }()) ? baseIsArguments : function(value) {
1189
+ return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
1190
+ };
1191
+ /**
1192
+ * Checks if `value` is classified as an `Array` object.
1193
+ *
1194
+ * @static
1195
+ * @memberOf _
1196
+ * @since 0.1.0
1197
+ * @category Lang
1198
+ * @param {*} value The value to check.
1199
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
1200
+ * @example
1201
+ *
1202
+ * _.isArray([1, 2, 3]);
1203
+ * // => true
1204
+ *
1205
+ * _.isArray(document.body.children);
1206
+ * // => false
1207
+ *
1208
+ * _.isArray('abc');
1209
+ * // => false
1210
+ *
1211
+ * _.isArray(_.noop);
1212
+ * // => false
1213
+ */
1214
+ var isArray = Array.isArray;
1215
+ /**
1216
+ * Checks if `value` is array-like. A value is considered array-like if it's
1217
+ * not a function and has a `value.length` that's an integer greater than or
1218
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
1219
+ *
1220
+ * @static
1221
+ * @memberOf _
1222
+ * @since 4.0.0
1223
+ * @category Lang
1224
+ * @param {*} value The value to check.
1225
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
1226
+ * @example
1227
+ *
1228
+ * _.isArrayLike([1, 2, 3]);
1229
+ * // => true
1230
+ *
1231
+ * _.isArrayLike(document.body.children);
1232
+ * // => true
1233
+ *
1234
+ * _.isArrayLike('abc');
1235
+ * // => true
1236
+ *
1237
+ * _.isArrayLike(_.noop);
1238
+ * // => false
1239
+ */
1240
+ function isArrayLike(value) {
1241
+ return value != null && isLength(value.length) && !isFunction(value);
1242
+ }
1243
+ /**
1244
+ * This method is like `_.isArrayLike` except that it also checks if `value`
1245
+ * is an object.
1246
+ *
1247
+ * @static
1248
+ * @memberOf _
1249
+ * @since 4.0.0
1250
+ * @category Lang
1251
+ * @param {*} value The value to check.
1252
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
1253
+ * else `false`.
1254
+ * @example
1255
+ *
1256
+ * _.isArrayLikeObject([1, 2, 3]);
1257
+ * // => true
1258
+ *
1259
+ * _.isArrayLikeObject(document.body.children);
1260
+ * // => true
1261
+ *
1262
+ * _.isArrayLikeObject('abc');
1263
+ * // => false
1264
+ *
1265
+ * _.isArrayLikeObject(_.noop);
1266
+ * // => false
1267
+ */
1268
+ function isArrayLikeObject(value) {
1269
+ return isObjectLike(value) && isArrayLike(value);
1270
+ }
1271
+ /**
1272
+ * Checks if `value` is a buffer.
1273
+ *
1274
+ * @static
1275
+ * @memberOf _
1276
+ * @since 4.3.0
1277
+ * @category Lang
1278
+ * @param {*} value The value to check.
1279
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
1280
+ * @example
1281
+ *
1282
+ * _.isBuffer(new Buffer(2));
1283
+ * // => true
1284
+ *
1285
+ * _.isBuffer(new Uint8Array(2));
1286
+ * // => false
1287
+ */
1288
+ var isBuffer = nativeIsBuffer || stubFalse;
1289
+ /**
1290
+ * Checks if `value` is classified as a `Function` object.
1291
+ *
1292
+ * @static
1293
+ * @memberOf _
1294
+ * @since 0.1.0
1295
+ * @category Lang
1296
+ * @param {*} value The value to check.
1297
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
1298
+ * @example
1299
+ *
1300
+ * _.isFunction(_);
1301
+ * // => true
1302
+ *
1303
+ * _.isFunction(/abc/);
1304
+ * // => false
1305
+ */
1306
+ function isFunction(value) {
1307
+ if (!isObject(value)) return false;
1308
+ var tag = baseGetTag(value);
1309
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
1310
+ }
1311
+ /**
1312
+ * Checks if `value` is a valid array-like length.
1313
+ *
1314
+ * **Note:** This method is loosely based on
1315
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
1316
+ *
1317
+ * @static
1318
+ * @memberOf _
1319
+ * @since 4.0.0
1320
+ * @category Lang
1321
+ * @param {*} value The value to check.
1322
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
1323
+ * @example
1324
+ *
1325
+ * _.isLength(3);
1326
+ * // => true
1327
+ *
1328
+ * _.isLength(Number.MIN_VALUE);
1329
+ * // => false
1330
+ *
1331
+ * _.isLength(Infinity);
1332
+ * // => false
1333
+ *
1334
+ * _.isLength('3');
1335
+ * // => false
1336
+ */
1337
+ function isLength(value) {
1338
+ return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
1339
+ }
1340
+ /**
1341
+ * Checks if `value` is the
1342
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
1343
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
1344
+ *
1345
+ * @static
1346
+ * @memberOf _
1347
+ * @since 0.1.0
1348
+ * @category Lang
1349
+ * @param {*} value The value to check.
1350
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
1351
+ * @example
1352
+ *
1353
+ * _.isObject({});
1354
+ * // => true
1355
+ *
1356
+ * _.isObject([1, 2, 3]);
1357
+ * // => true
1358
+ *
1359
+ * _.isObject(_.noop);
1360
+ * // => true
1361
+ *
1362
+ * _.isObject(null);
1363
+ * // => false
1364
+ */
1365
+ function isObject(value) {
1366
+ var type = typeof value;
1367
+ return value != null && (type == "object" || type == "function");
1368
+ }
1369
+ /**
1370
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
1371
+ * and has a `typeof` result of "object".
1372
+ *
1373
+ * @static
1374
+ * @memberOf _
1375
+ * @since 4.0.0
1376
+ * @category Lang
1377
+ * @param {*} value The value to check.
1378
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
1379
+ * @example
1380
+ *
1381
+ * _.isObjectLike({});
1382
+ * // => true
1383
+ *
1384
+ * _.isObjectLike([1, 2, 3]);
1385
+ * // => true
1386
+ *
1387
+ * _.isObjectLike(_.noop);
1388
+ * // => false
1389
+ *
1390
+ * _.isObjectLike(null);
1391
+ * // => false
1392
+ */
1393
+ function isObjectLike(value) {
1394
+ return value != null && typeof value == "object";
1395
+ }
1396
+ /**
1397
+ * Checks if `value` is a plain object, that is, an object created by the
1398
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
1399
+ *
1400
+ * @static
1401
+ * @memberOf _
1402
+ * @since 0.8.0
1403
+ * @category Lang
1404
+ * @param {*} value The value to check.
1405
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
1406
+ * @example
1407
+ *
1408
+ * function Foo() {
1409
+ * this.a = 1;
1410
+ * }
1411
+ *
1412
+ * _.isPlainObject(new Foo);
1413
+ * // => false
1414
+ *
1415
+ * _.isPlainObject([1, 2, 3]);
1416
+ * // => false
1417
+ *
1418
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
1419
+ * // => true
1420
+ *
1421
+ * _.isPlainObject(Object.create(null));
1422
+ * // => true
1423
+ */
1424
+ function isPlainObject(value) {
1425
+ if (!isObjectLike(value) || baseGetTag(value) != objectTag) return false;
1426
+ var proto = getPrototype(value);
1427
+ if (proto === null) return true;
1428
+ var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
1429
+ return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
1430
+ }
1431
+ /**
1432
+ * Checks if `value` is classified as a typed array.
1433
+ *
1434
+ * @static
1435
+ * @memberOf _
1436
+ * @since 3.0.0
1437
+ * @category Lang
1438
+ * @param {*} value The value to check.
1439
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1440
+ * @example
1441
+ *
1442
+ * _.isTypedArray(new Uint8Array);
1443
+ * // => true
1444
+ *
1445
+ * _.isTypedArray([]);
1446
+ * // => false
1447
+ */
1448
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
1449
+ /**
1450
+ * Converts `value` to a plain object flattening inherited enumerable string
1451
+ * keyed properties of `value` to own properties of the plain object.
1452
+ *
1453
+ * @static
1454
+ * @memberOf _
1455
+ * @since 3.0.0
1456
+ * @category Lang
1457
+ * @param {*} value The value to convert.
1458
+ * @returns {Object} Returns the converted plain object.
1459
+ * @example
1460
+ *
1461
+ * function Foo() {
1462
+ * this.b = 2;
1463
+ * }
1464
+ *
1465
+ * Foo.prototype.c = 3;
1466
+ *
1467
+ * _.assign({ 'a': 1 }, new Foo);
1468
+ * // => { 'a': 1, 'b': 2 }
1469
+ *
1470
+ * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
1471
+ * // => { 'a': 1, 'b': 2, 'c': 3 }
1472
+ */
1473
+ function toPlainObject(value) {
1474
+ return copyObject(value, keysIn(value));
1475
+ }
1476
+ /**
1477
+ * Creates an array of the own and inherited enumerable property names of `object`.
1478
+ *
1479
+ * **Note:** Non-object values are coerced to objects.
1480
+ *
1481
+ * @static
1482
+ * @memberOf _
1483
+ * @since 3.0.0
1484
+ * @category Object
1485
+ * @param {Object} object The object to query.
1486
+ * @returns {Array} Returns the array of property names.
1487
+ * @example
1488
+ *
1489
+ * function Foo() {
1490
+ * this.a = 1;
1491
+ * this.b = 2;
1492
+ * }
1493
+ *
1494
+ * Foo.prototype.c = 3;
1495
+ *
1496
+ * _.keysIn(new Foo);
1497
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
1498
+ */
1499
+ function keysIn(object) {
1500
+ return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
1501
+ }
1502
+ /**
1503
+ * This method is like `_.assign` except that it recursively merges own and
1504
+ * inherited enumerable string keyed properties of source objects into the
1505
+ * destination object. Source properties that resolve to `undefined` are
1506
+ * skipped if a destination value exists. Array and plain object properties
1507
+ * are merged recursively. Other objects and value types are overridden by
1508
+ * assignment. Source objects are applied from left to right. Subsequent
1509
+ * sources overwrite property assignments of previous sources.
1510
+ *
1511
+ * **Note:** This method mutates `object`.
1512
+ *
1513
+ * @static
1514
+ * @memberOf _
1515
+ * @since 0.5.0
1516
+ * @category Object
1517
+ * @param {Object} object The destination object.
1518
+ * @param {...Object} [sources] The source objects.
1519
+ * @returns {Object} Returns `object`.
1520
+ * @example
1521
+ *
1522
+ * var object = {
1523
+ * 'a': [{ 'b': 2 }, { 'd': 4 }]
1524
+ * };
1525
+ *
1526
+ * var other = {
1527
+ * 'a': [{ 'c': 3 }, { 'e': 5 }]
1528
+ * };
1529
+ *
1530
+ * _.merge(object, other);
1531
+ * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
1532
+ */
1533
+ var merge = createAssigner(function(object, source, srcIndex) {
1534
+ baseMerge(object, source, srcIndex);
1535
+ });
1536
+ /**
1537
+ * Creates a function that returns `value`.
1538
+ *
1539
+ * @static
1540
+ * @memberOf _
1541
+ * @since 2.4.0
1542
+ * @category Util
1543
+ * @param {*} value The value to return from the new function.
1544
+ * @returns {Function} Returns the new constant function.
1545
+ * @example
1546
+ *
1547
+ * var objects = _.times(2, _.constant({ 'a': 1 }));
1548
+ *
1549
+ * console.log(objects);
1550
+ * // => [{ 'a': 1 }, { 'a': 1 }]
1551
+ *
1552
+ * console.log(objects[0] === objects[1]);
1553
+ * // => true
1554
+ */
1555
+ function constant(value) {
1556
+ return function() {
1557
+ return value;
1558
+ };
1559
+ }
1560
+ /**
1561
+ * This method returns the first argument it receives.
1562
+ *
1563
+ * @static
1564
+ * @since 0.1.0
1565
+ * @memberOf _
1566
+ * @category Util
1567
+ * @param {*} value Any value.
1568
+ * @returns {*} Returns `value`.
1569
+ * @example
1570
+ *
1571
+ * var object = { 'a': 1 };
1572
+ *
1573
+ * console.log(_.identity(object) === object);
1574
+ * // => true
1575
+ */
1576
+ function identity(value) {
1577
+ return value;
1578
+ }
1579
+ /**
1580
+ * This method returns `false`.
1581
+ *
1582
+ * @static
1583
+ * @memberOf _
1584
+ * @since 4.13.0
1585
+ * @category Util
1586
+ * @returns {boolean} Returns `false`.
1587
+ * @example
1588
+ *
1589
+ * _.times(2, _.stubFalse);
1590
+ * // => [false, false]
1591
+ */
1592
+ function stubFalse() {
1593
+ return false;
1594
+ }
1595
+ module.exports = merge;
1596
+ })))(), 1)).default;
1597
+ export { merge };
1598
+
1599
+ //# sourceMappingURL=utils.js.map