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