snabberb 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4960 @@
1
+ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.toHTML = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
2
+ /*!
3
+ * Cross-Browser Split 1.1.1
4
+ * Copyright 2007-2012 Steven Levithan <stevenlevithan.com>
5
+ * Available under the MIT License
6
+ * ECMAScript compliant, uniform cross-browser split method
7
+ */
8
+
9
+ /**
10
+ * Splits a string into an array of strings using a regex or string separator. Matches of the
11
+ * separator are not included in the result array. However, if `separator` is a regex that contains
12
+ * capturing groups, backreferences are spliced into the result each time `separator` is matched.
13
+ * Fixes browser bugs compared to the native `String.prototype.split` and can be used reliably
14
+ * cross-browser.
15
+ * @param {String} str String to split.
16
+ * @param {RegExp|String} separator Regex or string to use for separating the string.
17
+ * @param {Number} [limit] Maximum number of items to include in the result array.
18
+ * @returns {Array} Array of substrings.
19
+ * @example
20
+ *
21
+ * // Basic use
22
+ * split('a b c d', ' ');
23
+ * // -> ['a', 'b', 'c', 'd']
24
+ *
25
+ * // With limit
26
+ * split('a b c d', ' ', 2);
27
+ * // -> ['a', 'b']
28
+ *
29
+ * // Backreferences in result array
30
+ * split('..word1 word2..', /([a-z]+)(\d+)/i);
31
+ * // -> ['..', 'word', '1', ' ', 'word', '2', '..']
32
+ */
33
+ module.exports = (function split(undef) {
34
+
35
+ var nativeSplit = String.prototype.split,
36
+ compliantExecNpcg = /()??/.exec("")[1] === undef,
37
+ // NPCG: nonparticipating capturing group
38
+ self;
39
+
40
+ self = function(str, separator, limit) {
41
+ // If `separator` is not a regex, use `nativeSplit`
42
+ if (Object.prototype.toString.call(separator) !== "[object RegExp]") {
43
+ return nativeSplit.call(str, separator, limit);
44
+ }
45
+ var output = [],
46
+ flags = (separator.ignoreCase ? "i" : "") + (separator.multiline ? "m" : "") + (separator.extended ? "x" : "") + // Proposed for ES6
47
+ (separator.sticky ? "y" : ""),
48
+ // Firefox 3+
49
+ lastLastIndex = 0,
50
+ // Make `global` and avoid `lastIndex` issues by working with a copy
51
+ separator = new RegExp(separator.source, flags + "g"),
52
+ separator2, match, lastIndex, lastLength;
53
+ str += ""; // Type-convert
54
+ if (!compliantExecNpcg) {
55
+ // Doesn't need flags gy, but they don't hurt
56
+ separator2 = new RegExp("^" + separator.source + "$(?!\\s)", flags);
57
+ }
58
+ /* Values for `limit`, per the spec:
59
+ * If undefined: 4294967295 // Math.pow(2, 32) - 1
60
+ * If 0, Infinity, or NaN: 0
61
+ * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;
62
+ * If negative number: 4294967296 - Math.floor(Math.abs(limit))
63
+ * If other: Type-convert, then use the above rules
64
+ */
65
+ limit = limit === undef ? -1 >>> 0 : // Math.pow(2, 32) - 1
66
+ limit >>> 0; // ToUint32(limit)
67
+ while (match = separator.exec(str)) {
68
+ // `separator.lastIndex` is not reliable cross-browser
69
+ lastIndex = match.index + match[0].length;
70
+ if (lastIndex > lastLastIndex) {
71
+ output.push(str.slice(lastLastIndex, match.index));
72
+ // Fix browsers whose `exec` methods don't consistently return `undefined` for
73
+ // nonparticipating capturing groups
74
+ if (!compliantExecNpcg && match.length > 1) {
75
+ match[0].replace(separator2, function() {
76
+ for (var i = 1; i < arguments.length - 2; i++) {
77
+ if (arguments[i] === undef) {
78
+ match[i] = undef;
79
+ }
80
+ }
81
+ });
82
+ }
83
+ if (match.length > 1 && match.index < str.length) {
84
+ Array.prototype.push.apply(output, match.slice(1));
85
+ }
86
+ lastLength = match[0].length;
87
+ lastLastIndex = lastIndex;
88
+ if (output.length >= limit) {
89
+ break;
90
+ }
91
+ }
92
+ if (separator.lastIndex === match.index) {
93
+ separator.lastIndex++; // Avoid an infinite loop
94
+ }
95
+ }
96
+ if (lastLastIndex === str.length) {
97
+ if (lastLength || !separator.test("")) {
98
+ output.push("");
99
+ }
100
+ } else {
101
+ output.push(str.slice(lastLastIndex));
102
+ }
103
+ return output.length > limit ? output.slice(0, limit) : output;
104
+ };
105
+
106
+ return self;
107
+ })();
108
+
109
+ },{}],2:[function(require,module,exports){
110
+ (function (global){
111
+ /**
112
+ * lodash (Custom Build) <https://lodash.com/>
113
+ * Build: `lodash modularize exports="npm" -o ./`
114
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
115
+ * Released under MIT license <https://lodash.com/license>
116
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
117
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
118
+ */
119
+
120
+ /** Used as references for various `Number` constants. */
121
+ var INFINITY = 1 / 0;
122
+
123
+ /** `Object#toString` result references. */
124
+ var symbolTag = '[object Symbol]';
125
+
126
+ /** Used to match HTML entities and HTML characters. */
127
+ var reUnescapedHtml = /[&<>"'`]/g,
128
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
129
+
130
+ /** Used to map characters to HTML entities. */
131
+ var htmlEscapes = {
132
+ '&': '&amp;',
133
+ '<': '&lt;',
134
+ '>': '&gt;',
135
+ '"': '&quot;',
136
+ "'": '&#39;',
137
+ '`': '&#96;'
138
+ };
139
+
140
+ /** Detect free variable `global` from Node.js. */
141
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
142
+
143
+ /** Detect free variable `self`. */
144
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
145
+
146
+ /** Used as a reference to the global object. */
147
+ var root = freeGlobal || freeSelf || Function('return this')();
148
+
149
+ /**
150
+ * The base implementation of `_.propertyOf` without support for deep paths.
151
+ *
152
+ * @private
153
+ * @param {Object} object The object to query.
154
+ * @returns {Function} Returns the new accessor function.
155
+ */
156
+ function basePropertyOf(object) {
157
+ return function(key) {
158
+ return object == null ? undefined : object[key];
159
+ };
160
+ }
161
+
162
+ /**
163
+ * Used by `_.escape` to convert characters to HTML entities.
164
+ *
165
+ * @private
166
+ * @param {string} chr The matched character to escape.
167
+ * @returns {string} Returns the escaped character.
168
+ */
169
+ var escapeHtmlChar = basePropertyOf(htmlEscapes);
170
+
171
+ /** Used for built-in method references. */
172
+ var objectProto = Object.prototype;
173
+
174
+ /**
175
+ * Used to resolve the
176
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
177
+ * of values.
178
+ */
179
+ var objectToString = objectProto.toString;
180
+
181
+ /** Built-in value references. */
182
+ var Symbol = root.Symbol;
183
+
184
+ /** Used to convert symbols to primitives and strings. */
185
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
186
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
187
+
188
+ /**
189
+ * The base implementation of `_.toString` which doesn't convert nullish
190
+ * values to empty strings.
191
+ *
192
+ * @private
193
+ * @param {*} value The value to process.
194
+ * @returns {string} Returns the string.
195
+ */
196
+ function baseToString(value) {
197
+ // Exit early for strings to avoid a performance hit in some environments.
198
+ if (typeof value == 'string') {
199
+ return value;
200
+ }
201
+ if (isSymbol(value)) {
202
+ return symbolToString ? symbolToString.call(value) : '';
203
+ }
204
+ var result = (value + '');
205
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
206
+ }
207
+
208
+ /**
209
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
210
+ * and has a `typeof` result of "object".
211
+ *
212
+ * @static
213
+ * @memberOf _
214
+ * @since 4.0.0
215
+ * @category Lang
216
+ * @param {*} value The value to check.
217
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
218
+ * @example
219
+ *
220
+ * _.isObjectLike({});
221
+ * // => true
222
+ *
223
+ * _.isObjectLike([1, 2, 3]);
224
+ * // => true
225
+ *
226
+ * _.isObjectLike(_.noop);
227
+ * // => false
228
+ *
229
+ * _.isObjectLike(null);
230
+ * // => false
231
+ */
232
+ function isObjectLike(value) {
233
+ return !!value && typeof value == 'object';
234
+ }
235
+
236
+ /**
237
+ * Checks if `value` is classified as a `Symbol` primitive or object.
238
+ *
239
+ * @static
240
+ * @memberOf _
241
+ * @since 4.0.0
242
+ * @category Lang
243
+ * @param {*} value The value to check.
244
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
245
+ * @example
246
+ *
247
+ * _.isSymbol(Symbol.iterator);
248
+ * // => true
249
+ *
250
+ * _.isSymbol('abc');
251
+ * // => false
252
+ */
253
+ function isSymbol(value) {
254
+ return typeof value == 'symbol' ||
255
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
256
+ }
257
+
258
+ /**
259
+ * Converts `value` to a string. An empty string is returned for `null`
260
+ * and `undefined` values. The sign of `-0` is preserved.
261
+ *
262
+ * @static
263
+ * @memberOf _
264
+ * @since 4.0.0
265
+ * @category Lang
266
+ * @param {*} value The value to process.
267
+ * @returns {string} Returns the string.
268
+ * @example
269
+ *
270
+ * _.toString(null);
271
+ * // => ''
272
+ *
273
+ * _.toString(-0);
274
+ * // => '-0'
275
+ *
276
+ * _.toString([1, 2, 3]);
277
+ * // => '1,2,3'
278
+ */
279
+ function toString(value) {
280
+ return value == null ? '' : baseToString(value);
281
+ }
282
+
283
+ /**
284
+ * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to
285
+ * their corresponding HTML entities.
286
+ *
287
+ * **Note:** No other characters are escaped. To escape additional
288
+ * characters use a third-party library like [_he_](https://mths.be/he).
289
+ *
290
+ * Though the ">" character is escaped for symmetry, characters like
291
+ * ">" and "/" don't need escaping in HTML and have no special meaning
292
+ * unless they're part of a tag or unquoted attribute value. See
293
+ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
294
+ * (under "semi-related fun fact") for more details.
295
+ *
296
+ * Backticks are escaped because in IE < 9, they can break out of
297
+ * attribute values or HTML comments. See [#59](https://html5sec.org/#59),
298
+ * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
299
+ * [#133](https://html5sec.org/#133) of the
300
+ * [HTML5 Security Cheatsheet](https://html5sec.org/) for more details.
301
+ *
302
+ * When working with HTML you should always
303
+ * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
304
+ * XSS vectors.
305
+ *
306
+ * @static
307
+ * @since 0.1.0
308
+ * @memberOf _
309
+ * @category String
310
+ * @param {string} [string=''] The string to escape.
311
+ * @returns {string} Returns the escaped string.
312
+ * @example
313
+ *
314
+ * _.escape('fred, barney, & pebbles');
315
+ * // => 'fred, barney, &amp; pebbles'
316
+ */
317
+ function escape(string) {
318
+ string = toString(string);
319
+ return (string && reHasUnescapedHtml.test(string))
320
+ ? string.replace(reUnescapedHtml, escapeHtmlChar)
321
+ : string;
322
+ }
323
+
324
+ module.exports = escape;
325
+
326
+ }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
327
+ },{}],3:[function(require,module,exports){
328
+ /**
329
+ * lodash (Custom Build) <https://lodash.com/>
330
+ * Build: `lodash modularize exports="npm" -o ./`
331
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
332
+ * Released under MIT license <https://lodash.com/license>
333
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
334
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
335
+ */
336
+
337
+ /** Used as references for various `Number` constants. */
338
+ var MAX_SAFE_INTEGER = 9007199254740991;
339
+
340
+ /** `Object#toString` result references. */
341
+ var argsTag = '[object Arguments]',
342
+ funcTag = '[object Function]',
343
+ genTag = '[object GeneratorFunction]';
344
+
345
+ /** Used to detect unsigned integer values. */
346
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
347
+
348
+ /**
349
+ * The base implementation of `_.times` without support for iteratee shorthands
350
+ * or max array length checks.
351
+ *
352
+ * @private
353
+ * @param {number} n The number of times to invoke `iteratee`.
354
+ * @param {Function} iteratee The function invoked per iteration.
355
+ * @returns {Array} Returns the array of results.
356
+ */
357
+ function baseTimes(n, iteratee) {
358
+ var index = -1,
359
+ result = Array(n);
360
+
361
+ while (++index < n) {
362
+ result[index] = iteratee(index);
363
+ }
364
+ return result;
365
+ }
366
+
367
+ /**
368
+ * Creates a unary function that invokes `func` with its argument transformed.
369
+ *
370
+ * @private
371
+ * @param {Function} func The function to wrap.
372
+ * @param {Function} transform The argument transform.
373
+ * @returns {Function} Returns the new function.
374
+ */
375
+ function overArg(func, transform) {
376
+ return function(arg) {
377
+ return func(transform(arg));
378
+ };
379
+ }
380
+
381
+ /** Used for built-in method references. */
382
+ var objectProto = Object.prototype;
383
+
384
+ /** Used to check objects for own properties. */
385
+ var hasOwnProperty = objectProto.hasOwnProperty;
386
+
387
+ /**
388
+ * Used to resolve the
389
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
390
+ * of values.
391
+ */
392
+ var objectToString = objectProto.toString;
393
+
394
+ /** Built-in value references. */
395
+ var propertyIsEnumerable = objectProto.propertyIsEnumerable;
396
+
397
+ /* Built-in method references for those with the same name as other `lodash` methods. */
398
+ var nativeKeys = overArg(Object.keys, Object);
399
+
400
+ /**
401
+ * Creates an array of the enumerable property names of the array-like `value`.
402
+ *
403
+ * @private
404
+ * @param {*} value The value to query.
405
+ * @param {boolean} inherited Specify returning inherited property names.
406
+ * @returns {Array} Returns the array of property names.
407
+ */
408
+ function arrayLikeKeys(value, inherited) {
409
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
410
+ // Safari 9 makes `arguments.length` enumerable in strict mode.
411
+ var result = (isArray(value) || isArguments(value))
412
+ ? baseTimes(value.length, String)
413
+ : [];
414
+
415
+ var length = result.length,
416
+ skipIndexes = !!length;
417
+
418
+ for (var key in value) {
419
+ if ((inherited || hasOwnProperty.call(value, key)) &&
420
+ !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
421
+ result.push(key);
422
+ }
423
+ }
424
+ return result;
425
+ }
426
+
427
+ /**
428
+ * The base implementation of `baseForOwn` which iterates over `object`
429
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
430
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
431
+ *
432
+ * @private
433
+ * @param {Object} object The object to iterate over.
434
+ * @param {Function} iteratee The function invoked per iteration.
435
+ * @param {Function} keysFunc The function to get the keys of `object`.
436
+ * @returns {Object} Returns `object`.
437
+ */
438
+ var baseFor = createBaseFor();
439
+
440
+ /**
441
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
442
+ *
443
+ * @private
444
+ * @param {Object} object The object to iterate over.
445
+ * @param {Function} iteratee The function invoked per iteration.
446
+ * @returns {Object} Returns `object`.
447
+ */
448
+ function baseForOwn(object, iteratee) {
449
+ return object && baseFor(object, iteratee, keys);
450
+ }
451
+
452
+ /**
453
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
454
+ *
455
+ * @private
456
+ * @param {Object} object The object to query.
457
+ * @returns {Array} Returns the array of property names.
458
+ */
459
+ function baseKeys(object) {
460
+ if (!isPrototype(object)) {
461
+ return nativeKeys(object);
462
+ }
463
+ var result = [];
464
+ for (var key in Object(object)) {
465
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
466
+ result.push(key);
467
+ }
468
+ }
469
+ return result;
470
+ }
471
+
472
+ /**
473
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
474
+ *
475
+ * @private
476
+ * @param {boolean} [fromRight] Specify iterating from right to left.
477
+ * @returns {Function} Returns the new base function.
478
+ */
479
+ function createBaseFor(fromRight) {
480
+ return function(object, iteratee, keysFunc) {
481
+ var index = -1,
482
+ iterable = Object(object),
483
+ props = keysFunc(object),
484
+ length = props.length;
485
+
486
+ while (length--) {
487
+ var key = props[fromRight ? length : ++index];
488
+ if (iteratee(iterable[key], key, iterable) === false) {
489
+ break;
490
+ }
491
+ }
492
+ return object;
493
+ };
494
+ }
495
+
496
+ /**
497
+ * Checks if `value` is a valid array-like index.
498
+ *
499
+ * @private
500
+ * @param {*} value The value to check.
501
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
502
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
503
+ */
504
+ function isIndex(value, length) {
505
+ length = length == null ? MAX_SAFE_INTEGER : length;
506
+ return !!length &&
507
+ (typeof value == 'number' || reIsUint.test(value)) &&
508
+ (value > -1 && value % 1 == 0 && value < length);
509
+ }
510
+
511
+ /**
512
+ * Checks if `value` is likely a prototype object.
513
+ *
514
+ * @private
515
+ * @param {*} value The value to check.
516
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
517
+ */
518
+ function isPrototype(value) {
519
+ var Ctor = value && value.constructor,
520
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
521
+
522
+ return value === proto;
523
+ }
524
+
525
+ /**
526
+ * Checks if `value` is likely an `arguments` object.
527
+ *
528
+ * @static
529
+ * @memberOf _
530
+ * @since 0.1.0
531
+ * @category Lang
532
+ * @param {*} value The value to check.
533
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
534
+ * else `false`.
535
+ * @example
536
+ *
537
+ * _.isArguments(function() { return arguments; }());
538
+ * // => true
539
+ *
540
+ * _.isArguments([1, 2, 3]);
541
+ * // => false
542
+ */
543
+ function isArguments(value) {
544
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
545
+ return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
546
+ (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
547
+ }
548
+
549
+ /**
550
+ * Checks if `value` is classified as an `Array` object.
551
+ *
552
+ * @static
553
+ * @memberOf _
554
+ * @since 0.1.0
555
+ * @category Lang
556
+ * @param {*} value The value to check.
557
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
558
+ * @example
559
+ *
560
+ * _.isArray([1, 2, 3]);
561
+ * // => true
562
+ *
563
+ * _.isArray(document.body.children);
564
+ * // => false
565
+ *
566
+ * _.isArray('abc');
567
+ * // => false
568
+ *
569
+ * _.isArray(_.noop);
570
+ * // => false
571
+ */
572
+ var isArray = Array.isArray;
573
+
574
+ /**
575
+ * Checks if `value` is array-like. A value is considered array-like if it's
576
+ * not a function and has a `value.length` that's an integer greater than or
577
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
578
+ *
579
+ * @static
580
+ * @memberOf _
581
+ * @since 4.0.0
582
+ * @category Lang
583
+ * @param {*} value The value to check.
584
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
585
+ * @example
586
+ *
587
+ * _.isArrayLike([1, 2, 3]);
588
+ * // => true
589
+ *
590
+ * _.isArrayLike(document.body.children);
591
+ * // => true
592
+ *
593
+ * _.isArrayLike('abc');
594
+ * // => true
595
+ *
596
+ * _.isArrayLike(_.noop);
597
+ * // => false
598
+ */
599
+ function isArrayLike(value) {
600
+ return value != null && isLength(value.length) && !isFunction(value);
601
+ }
602
+
603
+ /**
604
+ * This method is like `_.isArrayLike` except that it also checks if `value`
605
+ * is an object.
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 an array-like object,
613
+ * else `false`.
614
+ * @example
615
+ *
616
+ * _.isArrayLikeObject([1, 2, 3]);
617
+ * // => true
618
+ *
619
+ * _.isArrayLikeObject(document.body.children);
620
+ * // => true
621
+ *
622
+ * _.isArrayLikeObject('abc');
623
+ * // => false
624
+ *
625
+ * _.isArrayLikeObject(_.noop);
626
+ * // => false
627
+ */
628
+ function isArrayLikeObject(value) {
629
+ return isObjectLike(value) && isArrayLike(value);
630
+ }
631
+
632
+ /**
633
+ * Checks if `value` is classified as a `Function` object.
634
+ *
635
+ * @static
636
+ * @memberOf _
637
+ * @since 0.1.0
638
+ * @category Lang
639
+ * @param {*} value The value to check.
640
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
641
+ * @example
642
+ *
643
+ * _.isFunction(_);
644
+ * // => true
645
+ *
646
+ * _.isFunction(/abc/);
647
+ * // => false
648
+ */
649
+ function isFunction(value) {
650
+ // The use of `Object#toString` avoids issues with the `typeof` operator
651
+ // in Safari 8-9 which returns 'object' for typed array and other constructors.
652
+ var tag = isObject(value) ? objectToString.call(value) : '';
653
+ return tag == funcTag || tag == genTag;
654
+ }
655
+
656
+ /**
657
+ * Checks if `value` is a valid array-like length.
658
+ *
659
+ * **Note:** This method is loosely based on
660
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
661
+ *
662
+ * @static
663
+ * @memberOf _
664
+ * @since 4.0.0
665
+ * @category Lang
666
+ * @param {*} value The value to check.
667
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
668
+ * @example
669
+ *
670
+ * _.isLength(3);
671
+ * // => true
672
+ *
673
+ * _.isLength(Number.MIN_VALUE);
674
+ * // => false
675
+ *
676
+ * _.isLength(Infinity);
677
+ * // => false
678
+ *
679
+ * _.isLength('3');
680
+ * // => false
681
+ */
682
+ function isLength(value) {
683
+ return typeof value == 'number' &&
684
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
685
+ }
686
+
687
+ /**
688
+ * Checks if `value` is the
689
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
690
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
691
+ *
692
+ * @static
693
+ * @memberOf _
694
+ * @since 0.1.0
695
+ * @category Lang
696
+ * @param {*} value The value to check.
697
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
698
+ * @example
699
+ *
700
+ * _.isObject({});
701
+ * // => true
702
+ *
703
+ * _.isObject([1, 2, 3]);
704
+ * // => true
705
+ *
706
+ * _.isObject(_.noop);
707
+ * // => true
708
+ *
709
+ * _.isObject(null);
710
+ * // => false
711
+ */
712
+ function isObject(value) {
713
+ var type = typeof value;
714
+ return !!value && (type == 'object' || type == 'function');
715
+ }
716
+
717
+ /**
718
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
719
+ * and has a `typeof` result of "object".
720
+ *
721
+ * @static
722
+ * @memberOf _
723
+ * @since 4.0.0
724
+ * @category Lang
725
+ * @param {*} value The value to check.
726
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
727
+ * @example
728
+ *
729
+ * _.isObjectLike({});
730
+ * // => true
731
+ *
732
+ * _.isObjectLike([1, 2, 3]);
733
+ * // => true
734
+ *
735
+ * _.isObjectLike(_.noop);
736
+ * // => false
737
+ *
738
+ * _.isObjectLike(null);
739
+ * // => false
740
+ */
741
+ function isObjectLike(value) {
742
+ return !!value && typeof value == 'object';
743
+ }
744
+
745
+ /**
746
+ * Iterates over own enumerable string keyed properties of an object and
747
+ * invokes `iteratee` for each property. The iteratee is invoked with three
748
+ * arguments: (value, key, object). Iteratee functions may exit iteration
749
+ * early by explicitly returning `false`.
750
+ *
751
+ * @static
752
+ * @memberOf _
753
+ * @since 0.3.0
754
+ * @category Object
755
+ * @param {Object} object The object to iterate over.
756
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
757
+ * @returns {Object} Returns `object`.
758
+ * @see _.forOwnRight
759
+ * @example
760
+ *
761
+ * function Foo() {
762
+ * this.a = 1;
763
+ * this.b = 2;
764
+ * }
765
+ *
766
+ * Foo.prototype.c = 3;
767
+ *
768
+ * _.forOwn(new Foo, function(value, key) {
769
+ * console.log(key);
770
+ * });
771
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
772
+ */
773
+ function forOwn(object, iteratee) {
774
+ return object && baseForOwn(object, typeof iteratee == 'function' ? iteratee : identity);
775
+ }
776
+
777
+ /**
778
+ * Creates an array of the own enumerable property names of `object`.
779
+ *
780
+ * **Note:** Non-object values are coerced to objects. See the
781
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
782
+ * for more details.
783
+ *
784
+ * @static
785
+ * @since 0.1.0
786
+ * @memberOf _
787
+ * @category Object
788
+ * @param {Object} object The object to query.
789
+ * @returns {Array} Returns the array of property names.
790
+ * @example
791
+ *
792
+ * function Foo() {
793
+ * this.a = 1;
794
+ * this.b = 2;
795
+ * }
796
+ *
797
+ * Foo.prototype.c = 3;
798
+ *
799
+ * _.keys(new Foo);
800
+ * // => ['a', 'b'] (iteration order is not guaranteed)
801
+ *
802
+ * _.keys('hi');
803
+ * // => ['0', '1']
804
+ */
805
+ function keys(object) {
806
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
807
+ }
808
+
809
+ /**
810
+ * This method returns the first argument it receives.
811
+ *
812
+ * @static
813
+ * @since 0.1.0
814
+ * @memberOf _
815
+ * @category Util
816
+ * @param {*} value Any value.
817
+ * @returns {*} Returns `value`.
818
+ * @example
819
+ *
820
+ * var object = { 'a': 1 };
821
+ *
822
+ * console.log(_.identity(object) === object);
823
+ * // => true
824
+ */
825
+ function identity(value) {
826
+ return value;
827
+ }
828
+
829
+ module.exports = forOwn;
830
+
831
+ },{}],4:[function(require,module,exports){
832
+ (function (global){
833
+ /**
834
+ * lodash (Custom Build) <https://lodash.com/>
835
+ * Build: `lodash modularize exports="npm" -o ./`
836
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
837
+ * Released under MIT license <https://lodash.com/license>
838
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
839
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
840
+ */
841
+
842
+ /** Used as references for various `Number` constants. */
843
+ var INFINITY = 1 / 0;
844
+
845
+ /** `Object#toString` result references. */
846
+ var symbolTag = '[object Symbol]';
847
+
848
+ /** Used to match words composed of alphanumeric characters. */
849
+ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
850
+
851
+ /** Used to match Latin Unicode letters (excluding mathematical operators). */
852
+ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
853
+
854
+ /** Used to compose unicode character classes. */
855
+ var rsAstralRange = '\\ud800-\\udfff',
856
+ rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
857
+ rsComboSymbolsRange = '\\u20d0-\\u20f0',
858
+ rsDingbatRange = '\\u2700-\\u27bf',
859
+ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
860
+ rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
861
+ rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
862
+ rsPunctuationRange = '\\u2000-\\u206f',
863
+ rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
864
+ rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
865
+ rsVarRange = '\\ufe0e\\ufe0f',
866
+ rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
867
+
868
+ /** Used to compose unicode capture groups. */
869
+ var rsApos = "['\u2019]",
870
+ rsBreak = '[' + rsBreakRange + ']',
871
+ rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
872
+ rsDigits = '\\d+',
873
+ rsDingbat = '[' + rsDingbatRange + ']',
874
+ rsLower = '[' + rsLowerRange + ']',
875
+ rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
876
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
877
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
878
+ rsNonAstral = '[^' + rsAstralRange + ']',
879
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
880
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
881
+ rsUpper = '[' + rsUpperRange + ']',
882
+ rsZWJ = '\\u200d';
883
+
884
+ /** Used to compose unicode regexes. */
885
+ var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')',
886
+ rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')',
887
+ rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
888
+ rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
889
+ reOptMod = rsModifier + '?',
890
+ rsOptVar = '[' + rsVarRange + ']?',
891
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
892
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
893
+ rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
894
+
895
+ /** Used to match apostrophes. */
896
+ var reApos = RegExp(rsApos, 'g');
897
+
898
+ /**
899
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
900
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
901
+ */
902
+ var reComboMark = RegExp(rsCombo, 'g');
903
+
904
+ /** Used to match complex or compound words. */
905
+ var reUnicodeWord = RegExp([
906
+ rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
907
+ rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')',
908
+ rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr,
909
+ rsUpper + '+' + rsOptUpperContr,
910
+ rsDigits,
911
+ rsEmoji
912
+ ].join('|'), 'g');
913
+
914
+ /** Used to detect strings that need a more robust regexp to match words. */
915
+ var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
916
+
917
+ /** Used to map Latin Unicode letters to basic Latin letters. */
918
+ var deburredLetters = {
919
+ // Latin-1 Supplement block.
920
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
921
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
922
+ '\xc7': 'C', '\xe7': 'c',
923
+ '\xd0': 'D', '\xf0': 'd',
924
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
925
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
926
+ '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
927
+ '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
928
+ '\xd1': 'N', '\xf1': 'n',
929
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
930
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
931
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
932
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
933
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
934
+ '\xc6': 'Ae', '\xe6': 'ae',
935
+ '\xde': 'Th', '\xfe': 'th',
936
+ '\xdf': 'ss',
937
+ // Latin Extended-A block.
938
+ '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
939
+ '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
940
+ '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
941
+ '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
942
+ '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
943
+ '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
944
+ '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
945
+ '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
946
+ '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
947
+ '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
948
+ '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
949
+ '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
950
+ '\u0134': 'J', '\u0135': 'j',
951
+ '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
952
+ '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
953
+ '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
954
+ '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
955
+ '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
956
+ '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
957
+ '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
958
+ '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
959
+ '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
960
+ '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
961
+ '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
962
+ '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
963
+ '\u0163': 't', '\u0165': 't', '\u0167': 't',
964
+ '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
965
+ '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
966
+ '\u0174': 'W', '\u0175': 'w',
967
+ '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
968
+ '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
969
+ '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
970
+ '\u0132': 'IJ', '\u0133': 'ij',
971
+ '\u0152': 'Oe', '\u0153': 'oe',
972
+ '\u0149': "'n", '\u017f': 'ss'
973
+ };
974
+
975
+ /** Detect free variable `global` from Node.js. */
976
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
977
+
978
+ /** Detect free variable `self`. */
979
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
980
+
981
+ /** Used as a reference to the global object. */
982
+ var root = freeGlobal || freeSelf || Function('return this')();
983
+
984
+ /**
985
+ * A specialized version of `_.reduce` for arrays without support for
986
+ * iteratee shorthands.
987
+ *
988
+ * @private
989
+ * @param {Array} [array] The array to iterate over.
990
+ * @param {Function} iteratee The function invoked per iteration.
991
+ * @param {*} [accumulator] The initial value.
992
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
993
+ * the initial value.
994
+ * @returns {*} Returns the accumulated value.
995
+ */
996
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
997
+ var index = -1,
998
+ length = array ? array.length : 0;
999
+
1000
+ if (initAccum && length) {
1001
+ accumulator = array[++index];
1002
+ }
1003
+ while (++index < length) {
1004
+ accumulator = iteratee(accumulator, array[index], index, array);
1005
+ }
1006
+ return accumulator;
1007
+ }
1008
+
1009
+ /**
1010
+ * Splits an ASCII `string` into an array of its words.
1011
+ *
1012
+ * @private
1013
+ * @param {string} The string to inspect.
1014
+ * @returns {Array} Returns the words of `string`.
1015
+ */
1016
+ function asciiWords(string) {
1017
+ return string.match(reAsciiWord) || [];
1018
+ }
1019
+
1020
+ /**
1021
+ * The base implementation of `_.propertyOf` without support for deep paths.
1022
+ *
1023
+ * @private
1024
+ * @param {Object} object The object to query.
1025
+ * @returns {Function} Returns the new accessor function.
1026
+ */
1027
+ function basePropertyOf(object) {
1028
+ return function(key) {
1029
+ return object == null ? undefined : object[key];
1030
+ };
1031
+ }
1032
+
1033
+ /**
1034
+ * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
1035
+ * letters to basic Latin letters.
1036
+ *
1037
+ * @private
1038
+ * @param {string} letter The matched letter to deburr.
1039
+ * @returns {string} Returns the deburred letter.
1040
+ */
1041
+ var deburrLetter = basePropertyOf(deburredLetters);
1042
+
1043
+ /**
1044
+ * Checks if `string` contains a word composed of Unicode symbols.
1045
+ *
1046
+ * @private
1047
+ * @param {string} string The string to inspect.
1048
+ * @returns {boolean} Returns `true` if a word is found, else `false`.
1049
+ */
1050
+ function hasUnicodeWord(string) {
1051
+ return reHasUnicodeWord.test(string);
1052
+ }
1053
+
1054
+ /**
1055
+ * Splits a Unicode `string` into an array of its words.
1056
+ *
1057
+ * @private
1058
+ * @param {string} The string to inspect.
1059
+ * @returns {Array} Returns the words of `string`.
1060
+ */
1061
+ function unicodeWords(string) {
1062
+ return string.match(reUnicodeWord) || [];
1063
+ }
1064
+
1065
+ /** Used for built-in method references. */
1066
+ var objectProto = Object.prototype;
1067
+
1068
+ /**
1069
+ * Used to resolve the
1070
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
1071
+ * of values.
1072
+ */
1073
+ var objectToString = objectProto.toString;
1074
+
1075
+ /** Built-in value references. */
1076
+ var Symbol = root.Symbol;
1077
+
1078
+ /** Used to convert symbols to primitives and strings. */
1079
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
1080
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
1081
+
1082
+ /**
1083
+ * The base implementation of `_.toString` which doesn't convert nullish
1084
+ * values to empty strings.
1085
+ *
1086
+ * @private
1087
+ * @param {*} value The value to process.
1088
+ * @returns {string} Returns the string.
1089
+ */
1090
+ function baseToString(value) {
1091
+ // Exit early for strings to avoid a performance hit in some environments.
1092
+ if (typeof value == 'string') {
1093
+ return value;
1094
+ }
1095
+ if (isSymbol(value)) {
1096
+ return symbolToString ? symbolToString.call(value) : '';
1097
+ }
1098
+ var result = (value + '');
1099
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
1100
+ }
1101
+
1102
+ /**
1103
+ * Creates a function like `_.camelCase`.
1104
+ *
1105
+ * @private
1106
+ * @param {Function} callback The function to combine each word.
1107
+ * @returns {Function} Returns the new compounder function.
1108
+ */
1109
+ function createCompounder(callback) {
1110
+ return function(string) {
1111
+ return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
1112
+ };
1113
+ }
1114
+
1115
+ /**
1116
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
1117
+ * and has a `typeof` result of "object".
1118
+ *
1119
+ * @static
1120
+ * @memberOf _
1121
+ * @since 4.0.0
1122
+ * @category Lang
1123
+ * @param {*} value The value to check.
1124
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
1125
+ * @example
1126
+ *
1127
+ * _.isObjectLike({});
1128
+ * // => true
1129
+ *
1130
+ * _.isObjectLike([1, 2, 3]);
1131
+ * // => true
1132
+ *
1133
+ * _.isObjectLike(_.noop);
1134
+ * // => false
1135
+ *
1136
+ * _.isObjectLike(null);
1137
+ * // => false
1138
+ */
1139
+ function isObjectLike(value) {
1140
+ return !!value && typeof value == 'object';
1141
+ }
1142
+
1143
+ /**
1144
+ * Checks if `value` is classified as a `Symbol` primitive or object.
1145
+ *
1146
+ * @static
1147
+ * @memberOf _
1148
+ * @since 4.0.0
1149
+ * @category Lang
1150
+ * @param {*} value The value to check.
1151
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
1152
+ * @example
1153
+ *
1154
+ * _.isSymbol(Symbol.iterator);
1155
+ * // => true
1156
+ *
1157
+ * _.isSymbol('abc');
1158
+ * // => false
1159
+ */
1160
+ function isSymbol(value) {
1161
+ return typeof value == 'symbol' ||
1162
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
1163
+ }
1164
+
1165
+ /**
1166
+ * Converts `value` to a string. An empty string is returned for `null`
1167
+ * and `undefined` values. The sign of `-0` is preserved.
1168
+ *
1169
+ * @static
1170
+ * @memberOf _
1171
+ * @since 4.0.0
1172
+ * @category Lang
1173
+ * @param {*} value The value to process.
1174
+ * @returns {string} Returns the string.
1175
+ * @example
1176
+ *
1177
+ * _.toString(null);
1178
+ * // => ''
1179
+ *
1180
+ * _.toString(-0);
1181
+ * // => '-0'
1182
+ *
1183
+ * _.toString([1, 2, 3]);
1184
+ * // => '1,2,3'
1185
+ */
1186
+ function toString(value) {
1187
+ return value == null ? '' : baseToString(value);
1188
+ }
1189
+
1190
+ /**
1191
+ * Deburrs `string` by converting
1192
+ * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
1193
+ * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
1194
+ * letters to basic Latin letters and removing
1195
+ * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
1196
+ *
1197
+ * @static
1198
+ * @memberOf _
1199
+ * @since 3.0.0
1200
+ * @category String
1201
+ * @param {string} [string=''] The string to deburr.
1202
+ * @returns {string} Returns the deburred string.
1203
+ * @example
1204
+ *
1205
+ * _.deburr('déjà vu');
1206
+ * // => 'deja vu'
1207
+ */
1208
+ function deburr(string) {
1209
+ string = toString(string);
1210
+ return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
1211
+ }
1212
+
1213
+ /**
1214
+ * Converts `string` to
1215
+ * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
1216
+ *
1217
+ * @static
1218
+ * @memberOf _
1219
+ * @since 3.0.0
1220
+ * @category String
1221
+ * @param {string} [string=''] The string to convert.
1222
+ * @returns {string} Returns the kebab cased string.
1223
+ * @example
1224
+ *
1225
+ * _.kebabCase('Foo Bar');
1226
+ * // => 'foo-bar'
1227
+ *
1228
+ * _.kebabCase('fooBar');
1229
+ * // => 'foo-bar'
1230
+ *
1231
+ * _.kebabCase('__FOO_BAR__');
1232
+ * // => 'foo-bar'
1233
+ */
1234
+ var kebabCase = createCompounder(function(result, word, index) {
1235
+ return result + (index ? '-' : '') + word.toLowerCase();
1236
+ });
1237
+
1238
+ /**
1239
+ * Splits `string` into an array of its words.
1240
+ *
1241
+ * @static
1242
+ * @memberOf _
1243
+ * @since 3.0.0
1244
+ * @category String
1245
+ * @param {string} [string=''] The string to inspect.
1246
+ * @param {RegExp|string} [pattern] The pattern to match words.
1247
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
1248
+ * @returns {Array} Returns the words of `string`.
1249
+ * @example
1250
+ *
1251
+ * _.words('fred, barney, & pebbles');
1252
+ * // => ['fred', 'barney', 'pebbles']
1253
+ *
1254
+ * _.words('fred, barney, & pebbles', /[^, ]+/g);
1255
+ * // => ['fred', 'barney', '&', 'pebbles']
1256
+ */
1257
+ function words(string, pattern, guard) {
1258
+ string = toString(string);
1259
+ pattern = guard ? undefined : pattern;
1260
+
1261
+ if (pattern === undefined) {
1262
+ return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
1263
+ }
1264
+ return string.match(pattern) || [];
1265
+ }
1266
+
1267
+ module.exports = kebabCase;
1268
+
1269
+ }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
1270
+ },{}],5:[function(require,module,exports){
1271
+ (function (global){
1272
+ /**
1273
+ * lodash (Custom Build) <https://lodash.com/>
1274
+ * Build: `lodash modularize exports="npm" -o ./`
1275
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
1276
+ * Released under MIT license <https://lodash.com/license>
1277
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1278
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1279
+ */
1280
+
1281
+ /** Used as the size to enable large array optimizations. */
1282
+ var LARGE_ARRAY_SIZE = 200;
1283
+
1284
+ /** Used as the `TypeError` message for "Functions" methods. */
1285
+ var FUNC_ERROR_TEXT = 'Expected a function';
1286
+
1287
+ /** Used to stand-in for `undefined` hash values. */
1288
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
1289
+
1290
+ /** Used to compose bitmasks for comparison styles. */
1291
+ var UNORDERED_COMPARE_FLAG = 1,
1292
+ PARTIAL_COMPARE_FLAG = 2;
1293
+
1294
+ /** Used as references for various `Number` constants. */
1295
+ var INFINITY = 1 / 0,
1296
+ MAX_SAFE_INTEGER = 9007199254740991;
1297
+
1298
+ /** `Object#toString` result references. */
1299
+ var argsTag = '[object Arguments]',
1300
+ arrayTag = '[object Array]',
1301
+ boolTag = '[object Boolean]',
1302
+ dateTag = '[object Date]',
1303
+ errorTag = '[object Error]',
1304
+ funcTag = '[object Function]',
1305
+ genTag = '[object GeneratorFunction]',
1306
+ mapTag = '[object Map]',
1307
+ numberTag = '[object Number]',
1308
+ objectTag = '[object Object]',
1309
+ promiseTag = '[object Promise]',
1310
+ regexpTag = '[object RegExp]',
1311
+ setTag = '[object Set]',
1312
+ stringTag = '[object String]',
1313
+ symbolTag = '[object Symbol]',
1314
+ weakMapTag = '[object WeakMap]';
1315
+
1316
+ var arrayBufferTag = '[object ArrayBuffer]',
1317
+ dataViewTag = '[object DataView]',
1318
+ float32Tag = '[object Float32Array]',
1319
+ float64Tag = '[object Float64Array]',
1320
+ int8Tag = '[object Int8Array]',
1321
+ int16Tag = '[object Int16Array]',
1322
+ int32Tag = '[object Int32Array]',
1323
+ uint8Tag = '[object Uint8Array]',
1324
+ uint8ClampedTag = '[object Uint8ClampedArray]',
1325
+ uint16Tag = '[object Uint16Array]',
1326
+ uint32Tag = '[object Uint32Array]';
1327
+
1328
+ /** Used to match property names within property paths. */
1329
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
1330
+ reIsPlainProp = /^\w*$/,
1331
+ reLeadingDot = /^\./,
1332
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
1333
+
1334
+ /**
1335
+ * Used to match `RegExp`
1336
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
1337
+ */
1338
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
1339
+
1340
+ /** Used to match backslashes in property paths. */
1341
+ var reEscapeChar = /\\(\\)?/g;
1342
+
1343
+ /** Used to detect host constructors (Safari). */
1344
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
1345
+
1346
+ /** Used to detect unsigned integer values. */
1347
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
1348
+
1349
+ /** Used to identify `toStringTag` values of typed arrays. */
1350
+ var typedArrayTags = {};
1351
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
1352
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
1353
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
1354
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
1355
+ typedArrayTags[uint32Tag] = true;
1356
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
1357
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
1358
+ typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
1359
+ typedArrayTags[errorTag] = typedArrayTags[funcTag] =
1360
+ typedArrayTags[mapTag] = typedArrayTags[numberTag] =
1361
+ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
1362
+ typedArrayTags[setTag] = typedArrayTags[stringTag] =
1363
+ typedArrayTags[weakMapTag] = false;
1364
+
1365
+ /** Detect free variable `global` from Node.js. */
1366
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
1367
+
1368
+ /** Detect free variable `self`. */
1369
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
1370
+
1371
+ /** Used as a reference to the global object. */
1372
+ var root = freeGlobal || freeSelf || Function('return this')();
1373
+
1374
+ /** Detect free variable `exports`. */
1375
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
1376
+
1377
+ /** Detect free variable `module`. */
1378
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
1379
+
1380
+ /** Detect the popular CommonJS extension `module.exports`. */
1381
+ var moduleExports = freeModule && freeModule.exports === freeExports;
1382
+
1383
+ /** Detect free variable `process` from Node.js. */
1384
+ var freeProcess = moduleExports && freeGlobal.process;
1385
+
1386
+ /** Used to access faster Node.js helpers. */
1387
+ var nodeUtil = (function() {
1388
+ try {
1389
+ return freeProcess && freeProcess.binding('util');
1390
+ } catch (e) {}
1391
+ }());
1392
+
1393
+ /* Node.js helper references. */
1394
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
1395
+
1396
+ /**
1397
+ * A specialized version of `_.some` for arrays without support for iteratee
1398
+ * shorthands.
1399
+ *
1400
+ * @private
1401
+ * @param {Array} [array] The array to iterate over.
1402
+ * @param {Function} predicate The function invoked per iteration.
1403
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
1404
+ * else `false`.
1405
+ */
1406
+ function arraySome(array, predicate) {
1407
+ var index = -1,
1408
+ length = array ? array.length : 0;
1409
+
1410
+ while (++index < length) {
1411
+ if (predicate(array[index], index, array)) {
1412
+ return true;
1413
+ }
1414
+ }
1415
+ return false;
1416
+ }
1417
+
1418
+ /**
1419
+ * The base implementation of `_.property` without support for deep paths.
1420
+ *
1421
+ * @private
1422
+ * @param {string} key The key of the property to get.
1423
+ * @returns {Function} Returns the new accessor function.
1424
+ */
1425
+ function baseProperty(key) {
1426
+ return function(object) {
1427
+ return object == null ? undefined : object[key];
1428
+ };
1429
+ }
1430
+
1431
+ /**
1432
+ * The base implementation of `_.times` without support for iteratee shorthands
1433
+ * or max array length checks.
1434
+ *
1435
+ * @private
1436
+ * @param {number} n The number of times to invoke `iteratee`.
1437
+ * @param {Function} iteratee The function invoked per iteration.
1438
+ * @returns {Array} Returns the array of results.
1439
+ */
1440
+ function baseTimes(n, iteratee) {
1441
+ var index = -1,
1442
+ result = Array(n);
1443
+
1444
+ while (++index < n) {
1445
+ result[index] = iteratee(index);
1446
+ }
1447
+ return result;
1448
+ }
1449
+
1450
+ /**
1451
+ * The base implementation of `_.unary` without support for storing metadata.
1452
+ *
1453
+ * @private
1454
+ * @param {Function} func The function to cap arguments for.
1455
+ * @returns {Function} Returns the new capped function.
1456
+ */
1457
+ function baseUnary(func) {
1458
+ return function(value) {
1459
+ return func(value);
1460
+ };
1461
+ }
1462
+
1463
+ /**
1464
+ * Gets the value at `key` of `object`.
1465
+ *
1466
+ * @private
1467
+ * @param {Object} [object] The object to query.
1468
+ * @param {string} key The key of the property to get.
1469
+ * @returns {*} Returns the property value.
1470
+ */
1471
+ function getValue(object, key) {
1472
+ return object == null ? undefined : object[key];
1473
+ }
1474
+
1475
+ /**
1476
+ * Checks if `value` is a host object in IE < 9.
1477
+ *
1478
+ * @private
1479
+ * @param {*} value The value to check.
1480
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
1481
+ */
1482
+ function isHostObject(value) {
1483
+ // Many host objects are `Object` objects that can coerce to strings
1484
+ // despite having improperly defined `toString` methods.
1485
+ var result = false;
1486
+ if (value != null && typeof value.toString != 'function') {
1487
+ try {
1488
+ result = !!(value + '');
1489
+ } catch (e) {}
1490
+ }
1491
+ return result;
1492
+ }
1493
+
1494
+ /**
1495
+ * Converts `map` to its key-value pairs.
1496
+ *
1497
+ * @private
1498
+ * @param {Object} map The map to convert.
1499
+ * @returns {Array} Returns the key-value pairs.
1500
+ */
1501
+ function mapToArray(map) {
1502
+ var index = -1,
1503
+ result = Array(map.size);
1504
+
1505
+ map.forEach(function(value, key) {
1506
+ result[++index] = [key, value];
1507
+ });
1508
+ return result;
1509
+ }
1510
+
1511
+ /**
1512
+ * Creates a unary function that invokes `func` with its argument transformed.
1513
+ *
1514
+ * @private
1515
+ * @param {Function} func The function to wrap.
1516
+ * @param {Function} transform The argument transform.
1517
+ * @returns {Function} Returns the new function.
1518
+ */
1519
+ function overArg(func, transform) {
1520
+ return function(arg) {
1521
+ return func(transform(arg));
1522
+ };
1523
+ }
1524
+
1525
+ /**
1526
+ * Converts `set` to an array of its values.
1527
+ *
1528
+ * @private
1529
+ * @param {Object} set The set to convert.
1530
+ * @returns {Array} Returns the values.
1531
+ */
1532
+ function setToArray(set) {
1533
+ var index = -1,
1534
+ result = Array(set.size);
1535
+
1536
+ set.forEach(function(value) {
1537
+ result[++index] = value;
1538
+ });
1539
+ return result;
1540
+ }
1541
+
1542
+ /** Used for built-in method references. */
1543
+ var arrayProto = Array.prototype,
1544
+ funcProto = Function.prototype,
1545
+ objectProto = Object.prototype;
1546
+
1547
+ /** Used to detect overreaching core-js shims. */
1548
+ var coreJsData = root['__core-js_shared__'];
1549
+
1550
+ /** Used to detect methods masquerading as native. */
1551
+ var maskSrcKey = (function() {
1552
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
1553
+ return uid ? ('Symbol(src)_1.' + uid) : '';
1554
+ }());
1555
+
1556
+ /** Used to resolve the decompiled source of functions. */
1557
+ var funcToString = funcProto.toString;
1558
+
1559
+ /** Used to check objects for own properties. */
1560
+ var hasOwnProperty = objectProto.hasOwnProperty;
1561
+
1562
+ /**
1563
+ * Used to resolve the
1564
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
1565
+ * of values.
1566
+ */
1567
+ var objectToString = objectProto.toString;
1568
+
1569
+ /** Used to detect if a method is native. */
1570
+ var reIsNative = RegExp('^' +
1571
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
1572
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
1573
+ );
1574
+
1575
+ /** Built-in value references. */
1576
+ var Symbol = root.Symbol,
1577
+ Uint8Array = root.Uint8Array,
1578
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
1579
+ splice = arrayProto.splice;
1580
+
1581
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1582
+ var nativeKeys = overArg(Object.keys, Object);
1583
+
1584
+ /* Built-in method references that are verified to be native. */
1585
+ var DataView = getNative(root, 'DataView'),
1586
+ Map = getNative(root, 'Map'),
1587
+ Promise = getNative(root, 'Promise'),
1588
+ Set = getNative(root, 'Set'),
1589
+ WeakMap = getNative(root, 'WeakMap'),
1590
+ nativeCreate = getNative(Object, 'create');
1591
+
1592
+ /** Used to detect maps, sets, and weakmaps. */
1593
+ var dataViewCtorString = toSource(DataView),
1594
+ mapCtorString = toSource(Map),
1595
+ promiseCtorString = toSource(Promise),
1596
+ setCtorString = toSource(Set),
1597
+ weakMapCtorString = toSource(WeakMap);
1598
+
1599
+ /** Used to convert symbols to primitives and strings. */
1600
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
1601
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
1602
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
1603
+
1604
+ /**
1605
+ * Creates a hash object.
1606
+ *
1607
+ * @private
1608
+ * @constructor
1609
+ * @param {Array} [entries] The key-value pairs to cache.
1610
+ */
1611
+ function Hash(entries) {
1612
+ var index = -1,
1613
+ length = entries ? entries.length : 0;
1614
+
1615
+ this.clear();
1616
+ while (++index < length) {
1617
+ var entry = entries[index];
1618
+ this.set(entry[0], entry[1]);
1619
+ }
1620
+ }
1621
+
1622
+ /**
1623
+ * Removes all key-value entries from the hash.
1624
+ *
1625
+ * @private
1626
+ * @name clear
1627
+ * @memberOf Hash
1628
+ */
1629
+ function hashClear() {
1630
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
1631
+ }
1632
+
1633
+ /**
1634
+ * Removes `key` and its value from the hash.
1635
+ *
1636
+ * @private
1637
+ * @name delete
1638
+ * @memberOf Hash
1639
+ * @param {Object} hash The hash to modify.
1640
+ * @param {string} key The key of the value to remove.
1641
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1642
+ */
1643
+ function hashDelete(key) {
1644
+ return this.has(key) && delete this.__data__[key];
1645
+ }
1646
+
1647
+ /**
1648
+ * Gets the hash value for `key`.
1649
+ *
1650
+ * @private
1651
+ * @name get
1652
+ * @memberOf Hash
1653
+ * @param {string} key The key of the value to get.
1654
+ * @returns {*} Returns the entry value.
1655
+ */
1656
+ function hashGet(key) {
1657
+ var data = this.__data__;
1658
+ if (nativeCreate) {
1659
+ var result = data[key];
1660
+ return result === HASH_UNDEFINED ? undefined : result;
1661
+ }
1662
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
1663
+ }
1664
+
1665
+ /**
1666
+ * Checks if a hash value for `key` exists.
1667
+ *
1668
+ * @private
1669
+ * @name has
1670
+ * @memberOf Hash
1671
+ * @param {string} key The key of the entry to check.
1672
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1673
+ */
1674
+ function hashHas(key) {
1675
+ var data = this.__data__;
1676
+ return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
1677
+ }
1678
+
1679
+ /**
1680
+ * Sets the hash `key` to `value`.
1681
+ *
1682
+ * @private
1683
+ * @name set
1684
+ * @memberOf Hash
1685
+ * @param {string} key The key of the value to set.
1686
+ * @param {*} value The value to set.
1687
+ * @returns {Object} Returns the hash instance.
1688
+ */
1689
+ function hashSet(key, value) {
1690
+ var data = this.__data__;
1691
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
1692
+ return this;
1693
+ }
1694
+
1695
+ // Add methods to `Hash`.
1696
+ Hash.prototype.clear = hashClear;
1697
+ Hash.prototype['delete'] = hashDelete;
1698
+ Hash.prototype.get = hashGet;
1699
+ Hash.prototype.has = hashHas;
1700
+ Hash.prototype.set = hashSet;
1701
+
1702
+ /**
1703
+ * Creates an list cache object.
1704
+ *
1705
+ * @private
1706
+ * @constructor
1707
+ * @param {Array} [entries] The key-value pairs to cache.
1708
+ */
1709
+ function ListCache(entries) {
1710
+ var index = -1,
1711
+ length = entries ? entries.length : 0;
1712
+
1713
+ this.clear();
1714
+ while (++index < length) {
1715
+ var entry = entries[index];
1716
+ this.set(entry[0], entry[1]);
1717
+ }
1718
+ }
1719
+
1720
+ /**
1721
+ * Removes all key-value entries from the list cache.
1722
+ *
1723
+ * @private
1724
+ * @name clear
1725
+ * @memberOf ListCache
1726
+ */
1727
+ function listCacheClear() {
1728
+ this.__data__ = [];
1729
+ }
1730
+
1731
+ /**
1732
+ * Removes `key` and its value from the list cache.
1733
+ *
1734
+ * @private
1735
+ * @name delete
1736
+ * @memberOf ListCache
1737
+ * @param {string} key The key of the value to remove.
1738
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1739
+ */
1740
+ function listCacheDelete(key) {
1741
+ var data = this.__data__,
1742
+ index = assocIndexOf(data, key);
1743
+
1744
+ if (index < 0) {
1745
+ return false;
1746
+ }
1747
+ var lastIndex = data.length - 1;
1748
+ if (index == lastIndex) {
1749
+ data.pop();
1750
+ } else {
1751
+ splice.call(data, index, 1);
1752
+ }
1753
+ return true;
1754
+ }
1755
+
1756
+ /**
1757
+ * Gets the list cache value for `key`.
1758
+ *
1759
+ * @private
1760
+ * @name get
1761
+ * @memberOf ListCache
1762
+ * @param {string} key The key of the value to get.
1763
+ * @returns {*} Returns the entry value.
1764
+ */
1765
+ function listCacheGet(key) {
1766
+ var data = this.__data__,
1767
+ index = assocIndexOf(data, key);
1768
+
1769
+ return index < 0 ? undefined : data[index][1];
1770
+ }
1771
+
1772
+ /**
1773
+ * Checks if a list cache value for `key` exists.
1774
+ *
1775
+ * @private
1776
+ * @name has
1777
+ * @memberOf ListCache
1778
+ * @param {string} key The key of the entry to check.
1779
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1780
+ */
1781
+ function listCacheHas(key) {
1782
+ return assocIndexOf(this.__data__, key) > -1;
1783
+ }
1784
+
1785
+ /**
1786
+ * Sets the list cache `key` to `value`.
1787
+ *
1788
+ * @private
1789
+ * @name set
1790
+ * @memberOf ListCache
1791
+ * @param {string} key The key of the value to set.
1792
+ * @param {*} value The value to set.
1793
+ * @returns {Object} Returns the list cache instance.
1794
+ */
1795
+ function listCacheSet(key, value) {
1796
+ var data = this.__data__,
1797
+ index = assocIndexOf(data, key);
1798
+
1799
+ if (index < 0) {
1800
+ data.push([key, value]);
1801
+ } else {
1802
+ data[index][1] = value;
1803
+ }
1804
+ return this;
1805
+ }
1806
+
1807
+ // Add methods to `ListCache`.
1808
+ ListCache.prototype.clear = listCacheClear;
1809
+ ListCache.prototype['delete'] = listCacheDelete;
1810
+ ListCache.prototype.get = listCacheGet;
1811
+ ListCache.prototype.has = listCacheHas;
1812
+ ListCache.prototype.set = listCacheSet;
1813
+
1814
+ /**
1815
+ * Creates a map cache object to store key-value pairs.
1816
+ *
1817
+ * @private
1818
+ * @constructor
1819
+ * @param {Array} [entries] The key-value pairs to cache.
1820
+ */
1821
+ function MapCache(entries) {
1822
+ var index = -1,
1823
+ length = entries ? entries.length : 0;
1824
+
1825
+ this.clear();
1826
+ while (++index < length) {
1827
+ var entry = entries[index];
1828
+ this.set(entry[0], entry[1]);
1829
+ }
1830
+ }
1831
+
1832
+ /**
1833
+ * Removes all key-value entries from the map.
1834
+ *
1835
+ * @private
1836
+ * @name clear
1837
+ * @memberOf MapCache
1838
+ */
1839
+ function mapCacheClear() {
1840
+ this.__data__ = {
1841
+ 'hash': new Hash,
1842
+ 'map': new (Map || ListCache),
1843
+ 'string': new Hash
1844
+ };
1845
+ }
1846
+
1847
+ /**
1848
+ * Removes `key` and its value from the map.
1849
+ *
1850
+ * @private
1851
+ * @name delete
1852
+ * @memberOf MapCache
1853
+ * @param {string} key The key of the value to remove.
1854
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1855
+ */
1856
+ function mapCacheDelete(key) {
1857
+ return getMapData(this, key)['delete'](key);
1858
+ }
1859
+
1860
+ /**
1861
+ * Gets the map value for `key`.
1862
+ *
1863
+ * @private
1864
+ * @name get
1865
+ * @memberOf MapCache
1866
+ * @param {string} key The key of the value to get.
1867
+ * @returns {*} Returns the entry value.
1868
+ */
1869
+ function mapCacheGet(key) {
1870
+ return getMapData(this, key).get(key);
1871
+ }
1872
+
1873
+ /**
1874
+ * Checks if a map value for `key` exists.
1875
+ *
1876
+ * @private
1877
+ * @name has
1878
+ * @memberOf MapCache
1879
+ * @param {string} key The key of the entry to check.
1880
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1881
+ */
1882
+ function mapCacheHas(key) {
1883
+ return getMapData(this, key).has(key);
1884
+ }
1885
+
1886
+ /**
1887
+ * Sets the map `key` to `value`.
1888
+ *
1889
+ * @private
1890
+ * @name set
1891
+ * @memberOf MapCache
1892
+ * @param {string} key The key of the value to set.
1893
+ * @param {*} value The value to set.
1894
+ * @returns {Object} Returns the map cache instance.
1895
+ */
1896
+ function mapCacheSet(key, value) {
1897
+ getMapData(this, key).set(key, value);
1898
+ return this;
1899
+ }
1900
+
1901
+ // Add methods to `MapCache`.
1902
+ MapCache.prototype.clear = mapCacheClear;
1903
+ MapCache.prototype['delete'] = mapCacheDelete;
1904
+ MapCache.prototype.get = mapCacheGet;
1905
+ MapCache.prototype.has = mapCacheHas;
1906
+ MapCache.prototype.set = mapCacheSet;
1907
+
1908
+ /**
1909
+ *
1910
+ * Creates an array cache object to store unique values.
1911
+ *
1912
+ * @private
1913
+ * @constructor
1914
+ * @param {Array} [values] The values to cache.
1915
+ */
1916
+ function SetCache(values) {
1917
+ var index = -1,
1918
+ length = values ? values.length : 0;
1919
+
1920
+ this.__data__ = new MapCache;
1921
+ while (++index < length) {
1922
+ this.add(values[index]);
1923
+ }
1924
+ }
1925
+
1926
+ /**
1927
+ * Adds `value` to the array cache.
1928
+ *
1929
+ * @private
1930
+ * @name add
1931
+ * @memberOf SetCache
1932
+ * @alias push
1933
+ * @param {*} value The value to cache.
1934
+ * @returns {Object} Returns the cache instance.
1935
+ */
1936
+ function setCacheAdd(value) {
1937
+ this.__data__.set(value, HASH_UNDEFINED);
1938
+ return this;
1939
+ }
1940
+
1941
+ /**
1942
+ * Checks if `value` is in the array cache.
1943
+ *
1944
+ * @private
1945
+ * @name has
1946
+ * @memberOf SetCache
1947
+ * @param {*} value The value to search for.
1948
+ * @returns {number} Returns `true` if `value` is found, else `false`.
1949
+ */
1950
+ function setCacheHas(value) {
1951
+ return this.__data__.has(value);
1952
+ }
1953
+
1954
+ // Add methods to `SetCache`.
1955
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
1956
+ SetCache.prototype.has = setCacheHas;
1957
+
1958
+ /**
1959
+ * Creates a stack cache object to store key-value pairs.
1960
+ *
1961
+ * @private
1962
+ * @constructor
1963
+ * @param {Array} [entries] The key-value pairs to cache.
1964
+ */
1965
+ function Stack(entries) {
1966
+ this.__data__ = new ListCache(entries);
1967
+ }
1968
+
1969
+ /**
1970
+ * Removes all key-value entries from the stack.
1971
+ *
1972
+ * @private
1973
+ * @name clear
1974
+ * @memberOf Stack
1975
+ */
1976
+ function stackClear() {
1977
+ this.__data__ = new ListCache;
1978
+ }
1979
+
1980
+ /**
1981
+ * Removes `key` and its value from the stack.
1982
+ *
1983
+ * @private
1984
+ * @name delete
1985
+ * @memberOf Stack
1986
+ * @param {string} key The key of the value to remove.
1987
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1988
+ */
1989
+ function stackDelete(key) {
1990
+ return this.__data__['delete'](key);
1991
+ }
1992
+
1993
+ /**
1994
+ * Gets the stack value for `key`.
1995
+ *
1996
+ * @private
1997
+ * @name get
1998
+ * @memberOf Stack
1999
+ * @param {string} key The key of the value to get.
2000
+ * @returns {*} Returns the entry value.
2001
+ */
2002
+ function stackGet(key) {
2003
+ return this.__data__.get(key);
2004
+ }
2005
+
2006
+ /**
2007
+ * Checks if a stack value for `key` exists.
2008
+ *
2009
+ * @private
2010
+ * @name has
2011
+ * @memberOf Stack
2012
+ * @param {string} key The key of the entry to check.
2013
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2014
+ */
2015
+ function stackHas(key) {
2016
+ return this.__data__.has(key);
2017
+ }
2018
+
2019
+ /**
2020
+ * Sets the stack `key` to `value`.
2021
+ *
2022
+ * @private
2023
+ * @name set
2024
+ * @memberOf Stack
2025
+ * @param {string} key The key of the value to set.
2026
+ * @param {*} value The value to set.
2027
+ * @returns {Object} Returns the stack cache instance.
2028
+ */
2029
+ function stackSet(key, value) {
2030
+ var cache = this.__data__;
2031
+ if (cache instanceof ListCache) {
2032
+ var pairs = cache.__data__;
2033
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
2034
+ pairs.push([key, value]);
2035
+ return this;
2036
+ }
2037
+ cache = this.__data__ = new MapCache(pairs);
2038
+ }
2039
+ cache.set(key, value);
2040
+ return this;
2041
+ }
2042
+
2043
+ // Add methods to `Stack`.
2044
+ Stack.prototype.clear = stackClear;
2045
+ Stack.prototype['delete'] = stackDelete;
2046
+ Stack.prototype.get = stackGet;
2047
+ Stack.prototype.has = stackHas;
2048
+ Stack.prototype.set = stackSet;
2049
+
2050
+ /**
2051
+ * Creates an array of the enumerable property names of the array-like `value`.
2052
+ *
2053
+ * @private
2054
+ * @param {*} value The value to query.
2055
+ * @param {boolean} inherited Specify returning inherited property names.
2056
+ * @returns {Array} Returns the array of property names.
2057
+ */
2058
+ function arrayLikeKeys(value, inherited) {
2059
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
2060
+ // Safari 9 makes `arguments.length` enumerable in strict mode.
2061
+ var result = (isArray(value) || isArguments(value))
2062
+ ? baseTimes(value.length, String)
2063
+ : [];
2064
+
2065
+ var length = result.length,
2066
+ skipIndexes = !!length;
2067
+
2068
+ for (var key in value) {
2069
+ if ((inherited || hasOwnProperty.call(value, key)) &&
2070
+ !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
2071
+ result.push(key);
2072
+ }
2073
+ }
2074
+ return result;
2075
+ }
2076
+
2077
+ /**
2078
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
2079
+ *
2080
+ * @private
2081
+ * @param {Array} array The array to inspect.
2082
+ * @param {*} key The key to search for.
2083
+ * @returns {number} Returns the index of the matched value, else `-1`.
2084
+ */
2085
+ function assocIndexOf(array, key) {
2086
+ var length = array.length;
2087
+ while (length--) {
2088
+ if (eq(array[length][0], key)) {
2089
+ return length;
2090
+ }
2091
+ }
2092
+ return -1;
2093
+ }
2094
+
2095
+ /**
2096
+ * The base implementation of `_.get` without support for default values.
2097
+ *
2098
+ * @private
2099
+ * @param {Object} object The object to query.
2100
+ * @param {Array|string} path The path of the property to get.
2101
+ * @returns {*} Returns the resolved value.
2102
+ */
2103
+ function baseGet(object, path) {
2104
+ path = isKey(path, object) ? [path] : castPath(path);
2105
+
2106
+ var index = 0,
2107
+ length = path.length;
2108
+
2109
+ while (object != null && index < length) {
2110
+ object = object[toKey(path[index++])];
2111
+ }
2112
+ return (index && index == length) ? object : undefined;
2113
+ }
2114
+
2115
+ /**
2116
+ * The base implementation of `getTag`.
2117
+ *
2118
+ * @private
2119
+ * @param {*} value The value to query.
2120
+ * @returns {string} Returns the `toStringTag`.
2121
+ */
2122
+ function baseGetTag(value) {
2123
+ return objectToString.call(value);
2124
+ }
2125
+
2126
+ /**
2127
+ * The base implementation of `_.hasIn` without support for deep paths.
2128
+ *
2129
+ * @private
2130
+ * @param {Object} [object] The object to query.
2131
+ * @param {Array|string} key The key to check.
2132
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
2133
+ */
2134
+ function baseHasIn(object, key) {
2135
+ return object != null && key in Object(object);
2136
+ }
2137
+
2138
+ /**
2139
+ * The base implementation of `_.isEqual` which supports partial comparisons
2140
+ * and tracks traversed objects.
2141
+ *
2142
+ * @private
2143
+ * @param {*} value The value to compare.
2144
+ * @param {*} other The other value to compare.
2145
+ * @param {Function} [customizer] The function to customize comparisons.
2146
+ * @param {boolean} [bitmask] The bitmask of comparison flags.
2147
+ * The bitmask may be composed of the following flags:
2148
+ * 1 - Unordered comparison
2149
+ * 2 - Partial comparison
2150
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
2151
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
2152
+ */
2153
+ function baseIsEqual(value, other, customizer, bitmask, stack) {
2154
+ if (value === other) {
2155
+ return true;
2156
+ }
2157
+ if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
2158
+ return value !== value && other !== other;
2159
+ }
2160
+ return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
2161
+ }
2162
+
2163
+ /**
2164
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
2165
+ * deep comparisons and tracks traversed objects enabling objects with circular
2166
+ * references to be compared.
2167
+ *
2168
+ * @private
2169
+ * @param {Object} object The object to compare.
2170
+ * @param {Object} other The other object to compare.
2171
+ * @param {Function} equalFunc The function to determine equivalents of values.
2172
+ * @param {Function} [customizer] The function to customize comparisons.
2173
+ * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`
2174
+ * for more details.
2175
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
2176
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
2177
+ */
2178
+ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
2179
+ var objIsArr = isArray(object),
2180
+ othIsArr = isArray(other),
2181
+ objTag = arrayTag,
2182
+ othTag = arrayTag;
2183
+
2184
+ if (!objIsArr) {
2185
+ objTag = getTag(object);
2186
+ objTag = objTag == argsTag ? objectTag : objTag;
2187
+ }
2188
+ if (!othIsArr) {
2189
+ othTag = getTag(other);
2190
+ othTag = othTag == argsTag ? objectTag : othTag;
2191
+ }
2192
+ var objIsObj = objTag == objectTag && !isHostObject(object),
2193
+ othIsObj = othTag == objectTag && !isHostObject(other),
2194
+ isSameTag = objTag == othTag;
2195
+
2196
+ if (isSameTag && !objIsObj) {
2197
+ stack || (stack = new Stack);
2198
+ return (objIsArr || isTypedArray(object))
2199
+ ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
2200
+ : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
2201
+ }
2202
+ if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
2203
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
2204
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
2205
+
2206
+ if (objIsWrapped || othIsWrapped) {
2207
+ var objUnwrapped = objIsWrapped ? object.value() : object,
2208
+ othUnwrapped = othIsWrapped ? other.value() : other;
2209
+
2210
+ stack || (stack = new Stack);
2211
+ return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
2212
+ }
2213
+ }
2214
+ if (!isSameTag) {
2215
+ return false;
2216
+ }
2217
+ stack || (stack = new Stack);
2218
+ return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
2219
+ }
2220
+
2221
+ /**
2222
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
2223
+ *
2224
+ * @private
2225
+ * @param {Object} object The object to inspect.
2226
+ * @param {Object} source The object of property values to match.
2227
+ * @param {Array} matchData The property names, values, and compare flags to match.
2228
+ * @param {Function} [customizer] The function to customize comparisons.
2229
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
2230
+ */
2231
+ function baseIsMatch(object, source, matchData, customizer) {
2232
+ var index = matchData.length,
2233
+ length = index,
2234
+ noCustomizer = !customizer;
2235
+
2236
+ if (object == null) {
2237
+ return !length;
2238
+ }
2239
+ object = Object(object);
2240
+ while (index--) {
2241
+ var data = matchData[index];
2242
+ if ((noCustomizer && data[2])
2243
+ ? data[1] !== object[data[0]]
2244
+ : !(data[0] in object)
2245
+ ) {
2246
+ return false;
2247
+ }
2248
+ }
2249
+ while (++index < length) {
2250
+ data = matchData[index];
2251
+ var key = data[0],
2252
+ objValue = object[key],
2253
+ srcValue = data[1];
2254
+
2255
+ if (noCustomizer && data[2]) {
2256
+ if (objValue === undefined && !(key in object)) {
2257
+ return false;
2258
+ }
2259
+ } else {
2260
+ var stack = new Stack;
2261
+ if (customizer) {
2262
+ var result = customizer(objValue, srcValue, key, object, source, stack);
2263
+ }
2264
+ if (!(result === undefined
2265
+ ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)
2266
+ : result
2267
+ )) {
2268
+ return false;
2269
+ }
2270
+ }
2271
+ }
2272
+ return true;
2273
+ }
2274
+
2275
+ /**
2276
+ * The base implementation of `_.isNative` without bad shim checks.
2277
+ *
2278
+ * @private
2279
+ * @param {*} value The value to check.
2280
+ * @returns {boolean} Returns `true` if `value` is a native function,
2281
+ * else `false`.
2282
+ */
2283
+ function baseIsNative(value) {
2284
+ if (!isObject(value) || isMasked(value)) {
2285
+ return false;
2286
+ }
2287
+ var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
2288
+ return pattern.test(toSource(value));
2289
+ }
2290
+
2291
+ /**
2292
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
2293
+ *
2294
+ * @private
2295
+ * @param {*} value The value to check.
2296
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
2297
+ */
2298
+ function baseIsTypedArray(value) {
2299
+ return isObjectLike(value) &&
2300
+ isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
2301
+ }
2302
+
2303
+ /**
2304
+ * The base implementation of `_.iteratee`.
2305
+ *
2306
+ * @private
2307
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
2308
+ * @returns {Function} Returns the iteratee.
2309
+ */
2310
+ function baseIteratee(value) {
2311
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
2312
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
2313
+ if (typeof value == 'function') {
2314
+ return value;
2315
+ }
2316
+ if (value == null) {
2317
+ return identity;
2318
+ }
2319
+ if (typeof value == 'object') {
2320
+ return isArray(value)
2321
+ ? baseMatchesProperty(value[0], value[1])
2322
+ : baseMatches(value);
2323
+ }
2324
+ return property(value);
2325
+ }
2326
+
2327
+ /**
2328
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
2329
+ *
2330
+ * @private
2331
+ * @param {Object} object The object to query.
2332
+ * @returns {Array} Returns the array of property names.
2333
+ */
2334
+ function baseKeys(object) {
2335
+ if (!isPrototype(object)) {
2336
+ return nativeKeys(object);
2337
+ }
2338
+ var result = [];
2339
+ for (var key in Object(object)) {
2340
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
2341
+ result.push(key);
2342
+ }
2343
+ }
2344
+ return result;
2345
+ }
2346
+
2347
+ /**
2348
+ * The base implementation of `_.matches` which doesn't clone `source`.
2349
+ *
2350
+ * @private
2351
+ * @param {Object} source The object of property values to match.
2352
+ * @returns {Function} Returns the new spec function.
2353
+ */
2354
+ function baseMatches(source) {
2355
+ var matchData = getMatchData(source);
2356
+ if (matchData.length == 1 && matchData[0][2]) {
2357
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
2358
+ }
2359
+ return function(object) {
2360
+ return object === source || baseIsMatch(object, source, matchData);
2361
+ };
2362
+ }
2363
+
2364
+ /**
2365
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
2366
+ *
2367
+ * @private
2368
+ * @param {string} path The path of the property to get.
2369
+ * @param {*} srcValue The value to match.
2370
+ * @returns {Function} Returns the new spec function.
2371
+ */
2372
+ function baseMatchesProperty(path, srcValue) {
2373
+ if (isKey(path) && isStrictComparable(srcValue)) {
2374
+ return matchesStrictComparable(toKey(path), srcValue);
2375
+ }
2376
+ return function(object) {
2377
+ var objValue = get(object, path);
2378
+ return (objValue === undefined && objValue === srcValue)
2379
+ ? hasIn(object, path)
2380
+ : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
2381
+ };
2382
+ }
2383
+
2384
+ /**
2385
+ * A specialized version of `baseProperty` which supports deep paths.
2386
+ *
2387
+ * @private
2388
+ * @param {Array|string} path The path of the property to get.
2389
+ * @returns {Function} Returns the new accessor function.
2390
+ */
2391
+ function basePropertyDeep(path) {
2392
+ return function(object) {
2393
+ return baseGet(object, path);
2394
+ };
2395
+ }
2396
+
2397
+ /**
2398
+ * The base implementation of `_.pullAt` without support for individual
2399
+ * indexes or capturing the removed elements.
2400
+ *
2401
+ * @private
2402
+ * @param {Array} array The array to modify.
2403
+ * @param {number[]} indexes The indexes of elements to remove.
2404
+ * @returns {Array} Returns `array`.
2405
+ */
2406
+ function basePullAt(array, indexes) {
2407
+ var length = array ? indexes.length : 0,
2408
+ lastIndex = length - 1;
2409
+
2410
+ while (length--) {
2411
+ var index = indexes[length];
2412
+ if (length == lastIndex || index !== previous) {
2413
+ var previous = index;
2414
+ if (isIndex(index)) {
2415
+ splice.call(array, index, 1);
2416
+ }
2417
+ else if (!isKey(index, array)) {
2418
+ var path = castPath(index),
2419
+ object = parent(array, path);
2420
+
2421
+ if (object != null) {
2422
+ delete object[toKey(last(path))];
2423
+ }
2424
+ }
2425
+ else {
2426
+ delete array[toKey(index)];
2427
+ }
2428
+ }
2429
+ }
2430
+ return array;
2431
+ }
2432
+
2433
+ /**
2434
+ * The base implementation of `_.slice` without an iteratee call guard.
2435
+ *
2436
+ * @private
2437
+ * @param {Array} array The array to slice.
2438
+ * @param {number} [start=0] The start position.
2439
+ * @param {number} [end=array.length] The end position.
2440
+ * @returns {Array} Returns the slice of `array`.
2441
+ */
2442
+ function baseSlice(array, start, end) {
2443
+ var index = -1,
2444
+ length = array.length;
2445
+
2446
+ if (start < 0) {
2447
+ start = -start > length ? 0 : (length + start);
2448
+ }
2449
+ end = end > length ? length : end;
2450
+ if (end < 0) {
2451
+ end += length;
2452
+ }
2453
+ length = start > end ? 0 : ((end - start) >>> 0);
2454
+ start >>>= 0;
2455
+
2456
+ var result = Array(length);
2457
+ while (++index < length) {
2458
+ result[index] = array[index + start];
2459
+ }
2460
+ return result;
2461
+ }
2462
+
2463
+ /**
2464
+ * The base implementation of `_.toString` which doesn't convert nullish
2465
+ * values to empty strings.
2466
+ *
2467
+ * @private
2468
+ * @param {*} value The value to process.
2469
+ * @returns {string} Returns the string.
2470
+ */
2471
+ function baseToString(value) {
2472
+ // Exit early for strings to avoid a performance hit in some environments.
2473
+ if (typeof value == 'string') {
2474
+ return value;
2475
+ }
2476
+ if (isSymbol(value)) {
2477
+ return symbolToString ? symbolToString.call(value) : '';
2478
+ }
2479
+ var result = (value + '');
2480
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
2481
+ }
2482
+
2483
+ /**
2484
+ * Casts `value` to a path array if it's not one.
2485
+ *
2486
+ * @private
2487
+ * @param {*} value The value to inspect.
2488
+ * @returns {Array} Returns the cast property path array.
2489
+ */
2490
+ function castPath(value) {
2491
+ return isArray(value) ? value : stringToPath(value);
2492
+ }
2493
+
2494
+ /**
2495
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
2496
+ * partial deep comparisons.
2497
+ *
2498
+ * @private
2499
+ * @param {Array} array The array to compare.
2500
+ * @param {Array} other The other array to compare.
2501
+ * @param {Function} equalFunc The function to determine equivalents of values.
2502
+ * @param {Function} customizer The function to customize comparisons.
2503
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
2504
+ * for more details.
2505
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
2506
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
2507
+ */
2508
+ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
2509
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
2510
+ arrLength = array.length,
2511
+ othLength = other.length;
2512
+
2513
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
2514
+ return false;
2515
+ }
2516
+ // Assume cyclic values are equal.
2517
+ var stacked = stack.get(array);
2518
+ if (stacked && stack.get(other)) {
2519
+ return stacked == other;
2520
+ }
2521
+ var index = -1,
2522
+ result = true,
2523
+ seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;
2524
+
2525
+ stack.set(array, other);
2526
+ stack.set(other, array);
2527
+
2528
+ // Ignore non-index properties.
2529
+ while (++index < arrLength) {
2530
+ var arrValue = array[index],
2531
+ othValue = other[index];
2532
+
2533
+ if (customizer) {
2534
+ var compared = isPartial
2535
+ ? customizer(othValue, arrValue, index, other, array, stack)
2536
+ : customizer(arrValue, othValue, index, array, other, stack);
2537
+ }
2538
+ if (compared !== undefined) {
2539
+ if (compared) {
2540
+ continue;
2541
+ }
2542
+ result = false;
2543
+ break;
2544
+ }
2545
+ // Recursively compare arrays (susceptible to call stack limits).
2546
+ if (seen) {
2547
+ if (!arraySome(other, function(othValue, othIndex) {
2548
+ if (!seen.has(othIndex) &&
2549
+ (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
2550
+ return seen.add(othIndex);
2551
+ }
2552
+ })) {
2553
+ result = false;
2554
+ break;
2555
+ }
2556
+ } else if (!(
2557
+ arrValue === othValue ||
2558
+ equalFunc(arrValue, othValue, customizer, bitmask, stack)
2559
+ )) {
2560
+ result = false;
2561
+ break;
2562
+ }
2563
+ }
2564
+ stack['delete'](array);
2565
+ stack['delete'](other);
2566
+ return result;
2567
+ }
2568
+
2569
+ /**
2570
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
2571
+ * the same `toStringTag`.
2572
+ *
2573
+ * **Note:** This function only supports comparing values with tags of
2574
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
2575
+ *
2576
+ * @private
2577
+ * @param {Object} object The object to compare.
2578
+ * @param {Object} other The other object to compare.
2579
+ * @param {string} tag The `toStringTag` of the objects to compare.
2580
+ * @param {Function} equalFunc The function to determine equivalents of values.
2581
+ * @param {Function} customizer The function to customize comparisons.
2582
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
2583
+ * for more details.
2584
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
2585
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
2586
+ */
2587
+ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
2588
+ switch (tag) {
2589
+ case dataViewTag:
2590
+ if ((object.byteLength != other.byteLength) ||
2591
+ (object.byteOffset != other.byteOffset)) {
2592
+ return false;
2593
+ }
2594
+ object = object.buffer;
2595
+ other = other.buffer;
2596
+
2597
+ case arrayBufferTag:
2598
+ if ((object.byteLength != other.byteLength) ||
2599
+ !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
2600
+ return false;
2601
+ }
2602
+ return true;
2603
+
2604
+ case boolTag:
2605
+ case dateTag:
2606
+ case numberTag:
2607
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
2608
+ // Invalid dates are coerced to `NaN`.
2609
+ return eq(+object, +other);
2610
+
2611
+ case errorTag:
2612
+ return object.name == other.name && object.message == other.message;
2613
+
2614
+ case regexpTag:
2615
+ case stringTag:
2616
+ // Coerce regexes to strings and treat strings, primitives and objects,
2617
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
2618
+ // for more details.
2619
+ return object == (other + '');
2620
+
2621
+ case mapTag:
2622
+ var convert = mapToArray;
2623
+
2624
+ case setTag:
2625
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
2626
+ convert || (convert = setToArray);
2627
+
2628
+ if (object.size != other.size && !isPartial) {
2629
+ return false;
2630
+ }
2631
+ // Assume cyclic values are equal.
2632
+ var stacked = stack.get(object);
2633
+ if (stacked) {
2634
+ return stacked == other;
2635
+ }
2636
+ bitmask |= UNORDERED_COMPARE_FLAG;
2637
+
2638
+ // Recursively compare objects (susceptible to call stack limits).
2639
+ stack.set(object, other);
2640
+ var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
2641
+ stack['delete'](object);
2642
+ return result;
2643
+
2644
+ case symbolTag:
2645
+ if (symbolValueOf) {
2646
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
2647
+ }
2648
+ }
2649
+ return false;
2650
+ }
2651
+
2652
+ /**
2653
+ * A specialized version of `baseIsEqualDeep` for objects with support for
2654
+ * partial deep comparisons.
2655
+ *
2656
+ * @private
2657
+ * @param {Object} object The object to compare.
2658
+ * @param {Object} other The other object to compare.
2659
+ * @param {Function} equalFunc The function to determine equivalents of values.
2660
+ * @param {Function} customizer The function to customize comparisons.
2661
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
2662
+ * for more details.
2663
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
2664
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
2665
+ */
2666
+ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
2667
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
2668
+ objProps = keys(object),
2669
+ objLength = objProps.length,
2670
+ othProps = keys(other),
2671
+ othLength = othProps.length;
2672
+
2673
+ if (objLength != othLength && !isPartial) {
2674
+ return false;
2675
+ }
2676
+ var index = objLength;
2677
+ while (index--) {
2678
+ var key = objProps[index];
2679
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
2680
+ return false;
2681
+ }
2682
+ }
2683
+ // Assume cyclic values are equal.
2684
+ var stacked = stack.get(object);
2685
+ if (stacked && stack.get(other)) {
2686
+ return stacked == other;
2687
+ }
2688
+ var result = true;
2689
+ stack.set(object, other);
2690
+ stack.set(other, object);
2691
+
2692
+ var skipCtor = isPartial;
2693
+ while (++index < objLength) {
2694
+ key = objProps[index];
2695
+ var objValue = object[key],
2696
+ othValue = other[key];
2697
+
2698
+ if (customizer) {
2699
+ var compared = isPartial
2700
+ ? customizer(othValue, objValue, key, other, object, stack)
2701
+ : customizer(objValue, othValue, key, object, other, stack);
2702
+ }
2703
+ // Recursively compare objects (susceptible to call stack limits).
2704
+ if (!(compared === undefined
2705
+ ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))
2706
+ : compared
2707
+ )) {
2708
+ result = false;
2709
+ break;
2710
+ }
2711
+ skipCtor || (skipCtor = key == 'constructor');
2712
+ }
2713
+ if (result && !skipCtor) {
2714
+ var objCtor = object.constructor,
2715
+ othCtor = other.constructor;
2716
+
2717
+ // Non `Object` object instances with different constructors are not equal.
2718
+ if (objCtor != othCtor &&
2719
+ ('constructor' in object && 'constructor' in other) &&
2720
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
2721
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
2722
+ result = false;
2723
+ }
2724
+ }
2725
+ stack['delete'](object);
2726
+ stack['delete'](other);
2727
+ return result;
2728
+ }
2729
+
2730
+ /**
2731
+ * Gets the data for `map`.
2732
+ *
2733
+ * @private
2734
+ * @param {Object} map The map to query.
2735
+ * @param {string} key The reference key.
2736
+ * @returns {*} Returns the map data.
2737
+ */
2738
+ function getMapData(map, key) {
2739
+ var data = map.__data__;
2740
+ return isKeyable(key)
2741
+ ? data[typeof key == 'string' ? 'string' : 'hash']
2742
+ : data.map;
2743
+ }
2744
+
2745
+ /**
2746
+ * Gets the property names, values, and compare flags of `object`.
2747
+ *
2748
+ * @private
2749
+ * @param {Object} object The object to query.
2750
+ * @returns {Array} Returns the match data of `object`.
2751
+ */
2752
+ function getMatchData(object) {
2753
+ var result = keys(object),
2754
+ length = result.length;
2755
+
2756
+ while (length--) {
2757
+ var key = result[length],
2758
+ value = object[key];
2759
+
2760
+ result[length] = [key, value, isStrictComparable(value)];
2761
+ }
2762
+ return result;
2763
+ }
2764
+
2765
+ /**
2766
+ * Gets the native function at `key` of `object`.
2767
+ *
2768
+ * @private
2769
+ * @param {Object} object The object to query.
2770
+ * @param {string} key The key of the method to get.
2771
+ * @returns {*} Returns the function if it's native, else `undefined`.
2772
+ */
2773
+ function getNative(object, key) {
2774
+ var value = getValue(object, key);
2775
+ return baseIsNative(value) ? value : undefined;
2776
+ }
2777
+
2778
+ /**
2779
+ * Gets the `toStringTag` of `value`.
2780
+ *
2781
+ * @private
2782
+ * @param {*} value The value to query.
2783
+ * @returns {string} Returns the `toStringTag`.
2784
+ */
2785
+ var getTag = baseGetTag;
2786
+
2787
+ // Fallback for data views, maps, sets, and weak maps in IE 11,
2788
+ // for data views in Edge < 14, and promises in Node.js.
2789
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
2790
+ (Map && getTag(new Map) != mapTag) ||
2791
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
2792
+ (Set && getTag(new Set) != setTag) ||
2793
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
2794
+ getTag = function(value) {
2795
+ var result = objectToString.call(value),
2796
+ Ctor = result == objectTag ? value.constructor : undefined,
2797
+ ctorString = Ctor ? toSource(Ctor) : undefined;
2798
+
2799
+ if (ctorString) {
2800
+ switch (ctorString) {
2801
+ case dataViewCtorString: return dataViewTag;
2802
+ case mapCtorString: return mapTag;
2803
+ case promiseCtorString: return promiseTag;
2804
+ case setCtorString: return setTag;
2805
+ case weakMapCtorString: return weakMapTag;
2806
+ }
2807
+ }
2808
+ return result;
2809
+ };
2810
+ }
2811
+
2812
+ /**
2813
+ * Checks if `path` exists on `object`.
2814
+ *
2815
+ * @private
2816
+ * @param {Object} object The object to query.
2817
+ * @param {Array|string} path The path to check.
2818
+ * @param {Function} hasFunc The function to check properties.
2819
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
2820
+ */
2821
+ function hasPath(object, path, hasFunc) {
2822
+ path = isKey(path, object) ? [path] : castPath(path);
2823
+
2824
+ var result,
2825
+ index = -1,
2826
+ length = path.length;
2827
+
2828
+ while (++index < length) {
2829
+ var key = toKey(path[index]);
2830
+ if (!(result = object != null && hasFunc(object, key))) {
2831
+ break;
2832
+ }
2833
+ object = object[key];
2834
+ }
2835
+ if (result) {
2836
+ return result;
2837
+ }
2838
+ var length = object ? object.length : 0;
2839
+ return !!length && isLength(length) && isIndex(key, length) &&
2840
+ (isArray(object) || isArguments(object));
2841
+ }
2842
+
2843
+ /**
2844
+ * Checks if `value` is a valid array-like index.
2845
+ *
2846
+ * @private
2847
+ * @param {*} value The value to check.
2848
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
2849
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
2850
+ */
2851
+ function isIndex(value, length) {
2852
+ length = length == null ? MAX_SAFE_INTEGER : length;
2853
+ return !!length &&
2854
+ (typeof value == 'number' || reIsUint.test(value)) &&
2855
+ (value > -1 && value % 1 == 0 && value < length);
2856
+ }
2857
+
2858
+ /**
2859
+ * Checks if `value` is a property name and not a property path.
2860
+ *
2861
+ * @private
2862
+ * @param {*} value The value to check.
2863
+ * @param {Object} [object] The object to query keys on.
2864
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
2865
+ */
2866
+ function isKey(value, object) {
2867
+ if (isArray(value)) {
2868
+ return false;
2869
+ }
2870
+ var type = typeof value;
2871
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
2872
+ value == null || isSymbol(value)) {
2873
+ return true;
2874
+ }
2875
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
2876
+ (object != null && value in Object(object));
2877
+ }
2878
+
2879
+ /**
2880
+ * Checks if `value` is suitable for use as unique object key.
2881
+ *
2882
+ * @private
2883
+ * @param {*} value The value to check.
2884
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
2885
+ */
2886
+ function isKeyable(value) {
2887
+ var type = typeof value;
2888
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
2889
+ ? (value !== '__proto__')
2890
+ : (value === null);
2891
+ }
2892
+
2893
+ /**
2894
+ * Checks if `func` has its source masked.
2895
+ *
2896
+ * @private
2897
+ * @param {Function} func The function to check.
2898
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
2899
+ */
2900
+ function isMasked(func) {
2901
+ return !!maskSrcKey && (maskSrcKey in func);
2902
+ }
2903
+
2904
+ /**
2905
+ * Checks if `value` is likely a prototype object.
2906
+ *
2907
+ * @private
2908
+ * @param {*} value The value to check.
2909
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
2910
+ */
2911
+ function isPrototype(value) {
2912
+ var Ctor = value && value.constructor,
2913
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
2914
+
2915
+ return value === proto;
2916
+ }
2917
+
2918
+ /**
2919
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
2920
+ *
2921
+ * @private
2922
+ * @param {*} value The value to check.
2923
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
2924
+ * equality comparisons, else `false`.
2925
+ */
2926
+ function isStrictComparable(value) {
2927
+ return value === value && !isObject(value);
2928
+ }
2929
+
2930
+ /**
2931
+ * A specialized version of `matchesProperty` for source values suitable
2932
+ * for strict equality comparisons, i.e. `===`.
2933
+ *
2934
+ * @private
2935
+ * @param {string} key The key of the property to get.
2936
+ * @param {*} srcValue The value to match.
2937
+ * @returns {Function} Returns the new spec function.
2938
+ */
2939
+ function matchesStrictComparable(key, srcValue) {
2940
+ return function(object) {
2941
+ if (object == null) {
2942
+ return false;
2943
+ }
2944
+ return object[key] === srcValue &&
2945
+ (srcValue !== undefined || (key in Object(object)));
2946
+ };
2947
+ }
2948
+
2949
+ /**
2950
+ * Gets the parent value at `path` of `object`.
2951
+ *
2952
+ * @private
2953
+ * @param {Object} object The object to query.
2954
+ * @param {Array} path The path to get the parent value of.
2955
+ * @returns {*} Returns the parent value.
2956
+ */
2957
+ function parent(object, path) {
2958
+ return path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
2959
+ }
2960
+
2961
+ /**
2962
+ * Converts `string` to a property path array.
2963
+ *
2964
+ * @private
2965
+ * @param {string} string The string to convert.
2966
+ * @returns {Array} Returns the property path array.
2967
+ */
2968
+ var stringToPath = memoize(function(string) {
2969
+ string = toString(string);
2970
+
2971
+ var result = [];
2972
+ if (reLeadingDot.test(string)) {
2973
+ result.push('');
2974
+ }
2975
+ string.replace(rePropName, function(match, number, quote, string) {
2976
+ result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
2977
+ });
2978
+ return result;
2979
+ });
2980
+
2981
+ /**
2982
+ * Converts `value` to a string key if it's not a string or symbol.
2983
+ *
2984
+ * @private
2985
+ * @param {*} value The value to inspect.
2986
+ * @returns {string|symbol} Returns the key.
2987
+ */
2988
+ function toKey(value) {
2989
+ if (typeof value == 'string' || isSymbol(value)) {
2990
+ return value;
2991
+ }
2992
+ var result = (value + '');
2993
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
2994
+ }
2995
+
2996
+ /**
2997
+ * Converts `func` to its source code.
2998
+ *
2999
+ * @private
3000
+ * @param {Function} func The function to process.
3001
+ * @returns {string} Returns the source code.
3002
+ */
3003
+ function toSource(func) {
3004
+ if (func != null) {
3005
+ try {
3006
+ return funcToString.call(func);
3007
+ } catch (e) {}
3008
+ try {
3009
+ return (func + '');
3010
+ } catch (e) {}
3011
+ }
3012
+ return '';
3013
+ }
3014
+
3015
+ /**
3016
+ * Gets the last element of `array`.
3017
+ *
3018
+ * @static
3019
+ * @memberOf _
3020
+ * @since 0.1.0
3021
+ * @category Array
3022
+ * @param {Array} array The array to query.
3023
+ * @returns {*} Returns the last element of `array`.
3024
+ * @example
3025
+ *
3026
+ * _.last([1, 2, 3]);
3027
+ * // => 3
3028
+ */
3029
+ function last(array) {
3030
+ var length = array ? array.length : 0;
3031
+ return length ? array[length - 1] : undefined;
3032
+ }
3033
+
3034
+ /**
3035
+ * Removes all elements from `array` that `predicate` returns truthy for
3036
+ * and returns an array of the removed elements. The predicate is invoked
3037
+ * with three arguments: (value, index, array).
3038
+ *
3039
+ * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
3040
+ * to pull elements from an array by value.
3041
+ *
3042
+ * @static
3043
+ * @memberOf _
3044
+ * @since 2.0.0
3045
+ * @category Array
3046
+ * @param {Array} array The array to modify.
3047
+ * @param {Function} [predicate=_.identity]
3048
+ * The function invoked per iteration.
3049
+ * @returns {Array} Returns the new array of removed elements.
3050
+ * @example
3051
+ *
3052
+ * var array = [1, 2, 3, 4];
3053
+ * var evens = _.remove(array, function(n) {
3054
+ * return n % 2 == 0;
3055
+ * });
3056
+ *
3057
+ * console.log(array);
3058
+ * // => [1, 3]
3059
+ *
3060
+ * console.log(evens);
3061
+ * // => [2, 4]
3062
+ */
3063
+ function remove(array, predicate) {
3064
+ var result = [];
3065
+ if (!(array && array.length)) {
3066
+ return result;
3067
+ }
3068
+ var index = -1,
3069
+ indexes = [],
3070
+ length = array.length;
3071
+
3072
+ predicate = baseIteratee(predicate, 3);
3073
+ while (++index < length) {
3074
+ var value = array[index];
3075
+ if (predicate(value, index, array)) {
3076
+ result.push(value);
3077
+ indexes.push(index);
3078
+ }
3079
+ }
3080
+ basePullAt(array, indexes);
3081
+ return result;
3082
+ }
3083
+
3084
+ /**
3085
+ * Creates a function that memoizes the result of `func`. If `resolver` is
3086
+ * provided, it determines the cache key for storing the result based on the
3087
+ * arguments provided to the memoized function. By default, the first argument
3088
+ * provided to the memoized function is used as the map cache key. The `func`
3089
+ * is invoked with the `this` binding of the memoized function.
3090
+ *
3091
+ * **Note:** The cache is exposed as the `cache` property on the memoized
3092
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
3093
+ * constructor with one whose instances implement the
3094
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
3095
+ * method interface of `delete`, `get`, `has`, and `set`.
3096
+ *
3097
+ * @static
3098
+ * @memberOf _
3099
+ * @since 0.1.0
3100
+ * @category Function
3101
+ * @param {Function} func The function to have its output memoized.
3102
+ * @param {Function} [resolver] The function to resolve the cache key.
3103
+ * @returns {Function} Returns the new memoized function.
3104
+ * @example
3105
+ *
3106
+ * var object = { 'a': 1, 'b': 2 };
3107
+ * var other = { 'c': 3, 'd': 4 };
3108
+ *
3109
+ * var values = _.memoize(_.values);
3110
+ * values(object);
3111
+ * // => [1, 2]
3112
+ *
3113
+ * values(other);
3114
+ * // => [3, 4]
3115
+ *
3116
+ * object.a = 2;
3117
+ * values(object);
3118
+ * // => [1, 2]
3119
+ *
3120
+ * // Modify the result cache.
3121
+ * values.cache.set(object, ['a', 'b']);
3122
+ * values(object);
3123
+ * // => ['a', 'b']
3124
+ *
3125
+ * // Replace `_.memoize.Cache`.
3126
+ * _.memoize.Cache = WeakMap;
3127
+ */
3128
+ function memoize(func, resolver) {
3129
+ if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
3130
+ throw new TypeError(FUNC_ERROR_TEXT);
3131
+ }
3132
+ var memoized = function() {
3133
+ var args = arguments,
3134
+ key = resolver ? resolver.apply(this, args) : args[0],
3135
+ cache = memoized.cache;
3136
+
3137
+ if (cache.has(key)) {
3138
+ return cache.get(key);
3139
+ }
3140
+ var result = func.apply(this, args);
3141
+ memoized.cache = cache.set(key, result);
3142
+ return result;
3143
+ };
3144
+ memoized.cache = new (memoize.Cache || MapCache);
3145
+ return memoized;
3146
+ }
3147
+
3148
+ // Assign cache to `_.memoize`.
3149
+ memoize.Cache = MapCache;
3150
+
3151
+ /**
3152
+ * Performs a
3153
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
3154
+ * comparison between two values to determine if they are equivalent.
3155
+ *
3156
+ * @static
3157
+ * @memberOf _
3158
+ * @since 4.0.0
3159
+ * @category Lang
3160
+ * @param {*} value The value to compare.
3161
+ * @param {*} other The other value to compare.
3162
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
3163
+ * @example
3164
+ *
3165
+ * var object = { 'a': 1 };
3166
+ * var other = { 'a': 1 };
3167
+ *
3168
+ * _.eq(object, object);
3169
+ * // => true
3170
+ *
3171
+ * _.eq(object, other);
3172
+ * // => false
3173
+ *
3174
+ * _.eq('a', 'a');
3175
+ * // => true
3176
+ *
3177
+ * _.eq('a', Object('a'));
3178
+ * // => false
3179
+ *
3180
+ * _.eq(NaN, NaN);
3181
+ * // => true
3182
+ */
3183
+ function eq(value, other) {
3184
+ return value === other || (value !== value && other !== other);
3185
+ }
3186
+
3187
+ /**
3188
+ * Checks if `value` is likely an `arguments` object.
3189
+ *
3190
+ * @static
3191
+ * @memberOf _
3192
+ * @since 0.1.0
3193
+ * @category Lang
3194
+ * @param {*} value The value to check.
3195
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
3196
+ * else `false`.
3197
+ * @example
3198
+ *
3199
+ * _.isArguments(function() { return arguments; }());
3200
+ * // => true
3201
+ *
3202
+ * _.isArguments([1, 2, 3]);
3203
+ * // => false
3204
+ */
3205
+ function isArguments(value) {
3206
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
3207
+ return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
3208
+ (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
3209
+ }
3210
+
3211
+ /**
3212
+ * Checks if `value` is classified as an `Array` object.
3213
+ *
3214
+ * @static
3215
+ * @memberOf _
3216
+ * @since 0.1.0
3217
+ * @category Lang
3218
+ * @param {*} value The value to check.
3219
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
3220
+ * @example
3221
+ *
3222
+ * _.isArray([1, 2, 3]);
3223
+ * // => true
3224
+ *
3225
+ * _.isArray(document.body.children);
3226
+ * // => false
3227
+ *
3228
+ * _.isArray('abc');
3229
+ * // => false
3230
+ *
3231
+ * _.isArray(_.noop);
3232
+ * // => false
3233
+ */
3234
+ var isArray = Array.isArray;
3235
+
3236
+ /**
3237
+ * Checks if `value` is array-like. A value is considered array-like if it's
3238
+ * not a function and has a `value.length` that's an integer greater than or
3239
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
3240
+ *
3241
+ * @static
3242
+ * @memberOf _
3243
+ * @since 4.0.0
3244
+ * @category Lang
3245
+ * @param {*} value The value to check.
3246
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
3247
+ * @example
3248
+ *
3249
+ * _.isArrayLike([1, 2, 3]);
3250
+ * // => true
3251
+ *
3252
+ * _.isArrayLike(document.body.children);
3253
+ * // => true
3254
+ *
3255
+ * _.isArrayLike('abc');
3256
+ * // => true
3257
+ *
3258
+ * _.isArrayLike(_.noop);
3259
+ * // => false
3260
+ */
3261
+ function isArrayLike(value) {
3262
+ return value != null && isLength(value.length) && !isFunction(value);
3263
+ }
3264
+
3265
+ /**
3266
+ * This method is like `_.isArrayLike` except that it also checks if `value`
3267
+ * is an object.
3268
+ *
3269
+ * @static
3270
+ * @memberOf _
3271
+ * @since 4.0.0
3272
+ * @category Lang
3273
+ * @param {*} value The value to check.
3274
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
3275
+ * else `false`.
3276
+ * @example
3277
+ *
3278
+ * _.isArrayLikeObject([1, 2, 3]);
3279
+ * // => true
3280
+ *
3281
+ * _.isArrayLikeObject(document.body.children);
3282
+ * // => true
3283
+ *
3284
+ * _.isArrayLikeObject('abc');
3285
+ * // => false
3286
+ *
3287
+ * _.isArrayLikeObject(_.noop);
3288
+ * // => false
3289
+ */
3290
+ function isArrayLikeObject(value) {
3291
+ return isObjectLike(value) && isArrayLike(value);
3292
+ }
3293
+
3294
+ /**
3295
+ * Checks if `value` is classified as a `Function` object.
3296
+ *
3297
+ * @static
3298
+ * @memberOf _
3299
+ * @since 0.1.0
3300
+ * @category Lang
3301
+ * @param {*} value The value to check.
3302
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
3303
+ * @example
3304
+ *
3305
+ * _.isFunction(_);
3306
+ * // => true
3307
+ *
3308
+ * _.isFunction(/abc/);
3309
+ * // => false
3310
+ */
3311
+ function isFunction(value) {
3312
+ // The use of `Object#toString` avoids issues with the `typeof` operator
3313
+ // in Safari 8-9 which returns 'object' for typed array and other constructors.
3314
+ var tag = isObject(value) ? objectToString.call(value) : '';
3315
+ return tag == funcTag || tag == genTag;
3316
+ }
3317
+
3318
+ /**
3319
+ * Checks if `value` is a valid array-like length.
3320
+ *
3321
+ * **Note:** This method is loosely based on
3322
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
3323
+ *
3324
+ * @static
3325
+ * @memberOf _
3326
+ * @since 4.0.0
3327
+ * @category Lang
3328
+ * @param {*} value The value to check.
3329
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
3330
+ * @example
3331
+ *
3332
+ * _.isLength(3);
3333
+ * // => true
3334
+ *
3335
+ * _.isLength(Number.MIN_VALUE);
3336
+ * // => false
3337
+ *
3338
+ * _.isLength(Infinity);
3339
+ * // => false
3340
+ *
3341
+ * _.isLength('3');
3342
+ * // => false
3343
+ */
3344
+ function isLength(value) {
3345
+ return typeof value == 'number' &&
3346
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
3347
+ }
3348
+
3349
+ /**
3350
+ * Checks if `value` is the
3351
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
3352
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
3353
+ *
3354
+ * @static
3355
+ * @memberOf _
3356
+ * @since 0.1.0
3357
+ * @category Lang
3358
+ * @param {*} value The value to check.
3359
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
3360
+ * @example
3361
+ *
3362
+ * _.isObject({});
3363
+ * // => true
3364
+ *
3365
+ * _.isObject([1, 2, 3]);
3366
+ * // => true
3367
+ *
3368
+ * _.isObject(_.noop);
3369
+ * // => true
3370
+ *
3371
+ * _.isObject(null);
3372
+ * // => false
3373
+ */
3374
+ function isObject(value) {
3375
+ var type = typeof value;
3376
+ return !!value && (type == 'object' || type == 'function');
3377
+ }
3378
+
3379
+ /**
3380
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
3381
+ * and has a `typeof` result of "object".
3382
+ *
3383
+ * @static
3384
+ * @memberOf _
3385
+ * @since 4.0.0
3386
+ * @category Lang
3387
+ * @param {*} value The value to check.
3388
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
3389
+ * @example
3390
+ *
3391
+ * _.isObjectLike({});
3392
+ * // => true
3393
+ *
3394
+ * _.isObjectLike([1, 2, 3]);
3395
+ * // => true
3396
+ *
3397
+ * _.isObjectLike(_.noop);
3398
+ * // => false
3399
+ *
3400
+ * _.isObjectLike(null);
3401
+ * // => false
3402
+ */
3403
+ function isObjectLike(value) {
3404
+ return !!value && typeof value == 'object';
3405
+ }
3406
+
3407
+ /**
3408
+ * Checks if `value` is classified as a `Symbol` primitive or object.
3409
+ *
3410
+ * @static
3411
+ * @memberOf _
3412
+ * @since 4.0.0
3413
+ * @category Lang
3414
+ * @param {*} value The value to check.
3415
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
3416
+ * @example
3417
+ *
3418
+ * _.isSymbol(Symbol.iterator);
3419
+ * // => true
3420
+ *
3421
+ * _.isSymbol('abc');
3422
+ * // => false
3423
+ */
3424
+ function isSymbol(value) {
3425
+ return typeof value == 'symbol' ||
3426
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
3427
+ }
3428
+
3429
+ /**
3430
+ * Checks if `value` is classified as a typed array.
3431
+ *
3432
+ * @static
3433
+ * @memberOf _
3434
+ * @since 3.0.0
3435
+ * @category Lang
3436
+ * @param {*} value The value to check.
3437
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
3438
+ * @example
3439
+ *
3440
+ * _.isTypedArray(new Uint8Array);
3441
+ * // => true
3442
+ *
3443
+ * _.isTypedArray([]);
3444
+ * // => false
3445
+ */
3446
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
3447
+
3448
+ /**
3449
+ * Converts `value` to a string. An empty string is returned for `null`
3450
+ * and `undefined` values. The sign of `-0` is preserved.
3451
+ *
3452
+ * @static
3453
+ * @memberOf _
3454
+ * @since 4.0.0
3455
+ * @category Lang
3456
+ * @param {*} value The value to process.
3457
+ * @returns {string} Returns the string.
3458
+ * @example
3459
+ *
3460
+ * _.toString(null);
3461
+ * // => ''
3462
+ *
3463
+ * _.toString(-0);
3464
+ * // => '-0'
3465
+ *
3466
+ * _.toString([1, 2, 3]);
3467
+ * // => '1,2,3'
3468
+ */
3469
+ function toString(value) {
3470
+ return value == null ? '' : baseToString(value);
3471
+ }
3472
+
3473
+ /**
3474
+ * Gets the value at `path` of `object`. If the resolved value is
3475
+ * `undefined`, the `defaultValue` is returned in its place.
3476
+ *
3477
+ * @static
3478
+ * @memberOf _
3479
+ * @since 3.7.0
3480
+ * @category Object
3481
+ * @param {Object} object The object to query.
3482
+ * @param {Array|string} path The path of the property to get.
3483
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
3484
+ * @returns {*} Returns the resolved value.
3485
+ * @example
3486
+ *
3487
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
3488
+ *
3489
+ * _.get(object, 'a[0].b.c');
3490
+ * // => 3
3491
+ *
3492
+ * _.get(object, ['a', '0', 'b', 'c']);
3493
+ * // => 3
3494
+ *
3495
+ * _.get(object, 'a.b.c', 'default');
3496
+ * // => 'default'
3497
+ */
3498
+ function get(object, path, defaultValue) {
3499
+ var result = object == null ? undefined : baseGet(object, path);
3500
+ return result === undefined ? defaultValue : result;
3501
+ }
3502
+
3503
+ /**
3504
+ * Checks if `path` is a direct or inherited property of `object`.
3505
+ *
3506
+ * @static
3507
+ * @memberOf _
3508
+ * @since 4.0.0
3509
+ * @category Object
3510
+ * @param {Object} object The object to query.
3511
+ * @param {Array|string} path The path to check.
3512
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
3513
+ * @example
3514
+ *
3515
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
3516
+ *
3517
+ * _.hasIn(object, 'a');
3518
+ * // => true
3519
+ *
3520
+ * _.hasIn(object, 'a.b');
3521
+ * // => true
3522
+ *
3523
+ * _.hasIn(object, ['a', 'b']);
3524
+ * // => true
3525
+ *
3526
+ * _.hasIn(object, 'b');
3527
+ * // => false
3528
+ */
3529
+ function hasIn(object, path) {
3530
+ return object != null && hasPath(object, path, baseHasIn);
3531
+ }
3532
+
3533
+ /**
3534
+ * Creates an array of the own enumerable property names of `object`.
3535
+ *
3536
+ * **Note:** Non-object values are coerced to objects. See the
3537
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
3538
+ * for more details.
3539
+ *
3540
+ * @static
3541
+ * @since 0.1.0
3542
+ * @memberOf _
3543
+ * @category Object
3544
+ * @param {Object} object The object to query.
3545
+ * @returns {Array} Returns the array of property names.
3546
+ * @example
3547
+ *
3548
+ * function Foo() {
3549
+ * this.a = 1;
3550
+ * this.b = 2;
3551
+ * }
3552
+ *
3553
+ * Foo.prototype.c = 3;
3554
+ *
3555
+ * _.keys(new Foo);
3556
+ * // => ['a', 'b'] (iteration order is not guaranteed)
3557
+ *
3558
+ * _.keys('hi');
3559
+ * // => ['0', '1']
3560
+ */
3561
+ function keys(object) {
3562
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
3563
+ }
3564
+
3565
+ /**
3566
+ * This method returns the first argument it receives.
3567
+ *
3568
+ * @static
3569
+ * @since 0.1.0
3570
+ * @memberOf _
3571
+ * @category Util
3572
+ * @param {*} value Any value.
3573
+ * @returns {*} Returns `value`.
3574
+ * @example
3575
+ *
3576
+ * var object = { 'a': 1 };
3577
+ *
3578
+ * console.log(_.identity(object) === object);
3579
+ * // => true
3580
+ */
3581
+ function identity(value) {
3582
+ return value;
3583
+ }
3584
+
3585
+ /**
3586
+ * Creates a function that returns the value at `path` of a given object.
3587
+ *
3588
+ * @static
3589
+ * @memberOf _
3590
+ * @since 2.4.0
3591
+ * @category Util
3592
+ * @param {Array|string} path The path of the property to get.
3593
+ * @returns {Function} Returns the new accessor function.
3594
+ * @example
3595
+ *
3596
+ * var objects = [
3597
+ * { 'a': { 'b': 2 } },
3598
+ * { 'a': { 'b': 1 } }
3599
+ * ];
3600
+ *
3601
+ * _.map(objects, _.property('a.b'));
3602
+ * // => [2, 1]
3603
+ *
3604
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
3605
+ * // => [1, 2]
3606
+ */
3607
+ function property(path) {
3608
+ return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
3609
+ }
3610
+
3611
+ module.exports = remove;
3612
+
3613
+ }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
3614
+ },{}],6:[function(require,module,exports){
3615
+ (function (global){
3616
+ /**
3617
+ * lodash (Custom Build) <https://lodash.com/>
3618
+ * Build: `lodash modularize exports="npm" -o ./`
3619
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
3620
+ * Released under MIT license <https://lodash.com/license>
3621
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
3622
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
3623
+ */
3624
+
3625
+ /** Used as the size to enable large array optimizations. */
3626
+ var LARGE_ARRAY_SIZE = 200;
3627
+
3628
+ /** Used to stand-in for `undefined` hash values. */
3629
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
3630
+
3631
+ /** Used as references for various `Number` constants. */
3632
+ var INFINITY = 1 / 0;
3633
+
3634
+ /** `Object#toString` result references. */
3635
+ var funcTag = '[object Function]',
3636
+ genTag = '[object GeneratorFunction]';
3637
+
3638
+ /**
3639
+ * Used to match `RegExp`
3640
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
3641
+ */
3642
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
3643
+
3644
+ /** Used to detect host constructors (Safari). */
3645
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
3646
+
3647
+ /** Detect free variable `global` from Node.js. */
3648
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
3649
+
3650
+ /** Detect free variable `self`. */
3651
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
3652
+
3653
+ /** Used as a reference to the global object. */
3654
+ var root = freeGlobal || freeSelf || Function('return this')();
3655
+
3656
+ /**
3657
+ * A specialized version of `_.includes` for arrays without support for
3658
+ * specifying an index to search from.
3659
+ *
3660
+ * @private
3661
+ * @param {Array} [array] The array to inspect.
3662
+ * @param {*} target The value to search for.
3663
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
3664
+ */
3665
+ function arrayIncludes(array, value) {
3666
+ var length = array ? array.length : 0;
3667
+ return !!length && baseIndexOf(array, value, 0) > -1;
3668
+ }
3669
+
3670
+ /**
3671
+ * This function is like `arrayIncludes` except that it accepts a comparator.
3672
+ *
3673
+ * @private
3674
+ * @param {Array} [array] The array to inspect.
3675
+ * @param {*} target The value to search for.
3676
+ * @param {Function} comparator The comparator invoked per element.
3677
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
3678
+ */
3679
+ function arrayIncludesWith(array, value, comparator) {
3680
+ var index = -1,
3681
+ length = array ? array.length : 0;
3682
+
3683
+ while (++index < length) {
3684
+ if (comparator(value, array[index])) {
3685
+ return true;
3686
+ }
3687
+ }
3688
+ return false;
3689
+ }
3690
+
3691
+ /**
3692
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
3693
+ * support for iteratee shorthands.
3694
+ *
3695
+ * @private
3696
+ * @param {Array} array The array to inspect.
3697
+ * @param {Function} predicate The function invoked per iteration.
3698
+ * @param {number} fromIndex The index to search from.
3699
+ * @param {boolean} [fromRight] Specify iterating from right to left.
3700
+ * @returns {number} Returns the index of the matched value, else `-1`.
3701
+ */
3702
+ function baseFindIndex(array, predicate, fromIndex, fromRight) {
3703
+ var length = array.length,
3704
+ index = fromIndex + (fromRight ? 1 : -1);
3705
+
3706
+ while ((fromRight ? index-- : ++index < length)) {
3707
+ if (predicate(array[index], index, array)) {
3708
+ return index;
3709
+ }
3710
+ }
3711
+ return -1;
3712
+ }
3713
+
3714
+ /**
3715
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
3716
+ *
3717
+ * @private
3718
+ * @param {Array} array The array to inspect.
3719
+ * @param {*} value The value to search for.
3720
+ * @param {number} fromIndex The index to search from.
3721
+ * @returns {number} Returns the index of the matched value, else `-1`.
3722
+ */
3723
+ function baseIndexOf(array, value, fromIndex) {
3724
+ if (value !== value) {
3725
+ return baseFindIndex(array, baseIsNaN, fromIndex);
3726
+ }
3727
+ var index = fromIndex - 1,
3728
+ length = array.length;
3729
+
3730
+ while (++index < length) {
3731
+ if (array[index] === value) {
3732
+ return index;
3733
+ }
3734
+ }
3735
+ return -1;
3736
+ }
3737
+
3738
+ /**
3739
+ * The base implementation of `_.isNaN` without support for number objects.
3740
+ *
3741
+ * @private
3742
+ * @param {*} value The value to check.
3743
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
3744
+ */
3745
+ function baseIsNaN(value) {
3746
+ return value !== value;
3747
+ }
3748
+
3749
+ /**
3750
+ * Checks if a cache value for `key` exists.
3751
+ *
3752
+ * @private
3753
+ * @param {Object} cache The cache to query.
3754
+ * @param {string} key The key of the entry to check.
3755
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3756
+ */
3757
+ function cacheHas(cache, key) {
3758
+ return cache.has(key);
3759
+ }
3760
+
3761
+ /**
3762
+ * Gets the value at `key` of `object`.
3763
+ *
3764
+ * @private
3765
+ * @param {Object} [object] The object to query.
3766
+ * @param {string} key The key of the property to get.
3767
+ * @returns {*} Returns the property value.
3768
+ */
3769
+ function getValue(object, key) {
3770
+ return object == null ? undefined : object[key];
3771
+ }
3772
+
3773
+ /**
3774
+ * Checks if `value` is a host object in IE < 9.
3775
+ *
3776
+ * @private
3777
+ * @param {*} value The value to check.
3778
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
3779
+ */
3780
+ function isHostObject(value) {
3781
+ // Many host objects are `Object` objects that can coerce to strings
3782
+ // despite having improperly defined `toString` methods.
3783
+ var result = false;
3784
+ if (value != null && typeof value.toString != 'function') {
3785
+ try {
3786
+ result = !!(value + '');
3787
+ } catch (e) {}
3788
+ }
3789
+ return result;
3790
+ }
3791
+
3792
+ /**
3793
+ * Converts `set` to an array of its values.
3794
+ *
3795
+ * @private
3796
+ * @param {Object} set The set to convert.
3797
+ * @returns {Array} Returns the values.
3798
+ */
3799
+ function setToArray(set) {
3800
+ var index = -1,
3801
+ result = Array(set.size);
3802
+
3803
+ set.forEach(function(value) {
3804
+ result[++index] = value;
3805
+ });
3806
+ return result;
3807
+ }
3808
+
3809
+ /** Used for built-in method references. */
3810
+ var arrayProto = Array.prototype,
3811
+ funcProto = Function.prototype,
3812
+ objectProto = Object.prototype;
3813
+
3814
+ /** Used to detect overreaching core-js shims. */
3815
+ var coreJsData = root['__core-js_shared__'];
3816
+
3817
+ /** Used to detect methods masquerading as native. */
3818
+ var maskSrcKey = (function() {
3819
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
3820
+ return uid ? ('Symbol(src)_1.' + uid) : '';
3821
+ }());
3822
+
3823
+ /** Used to resolve the decompiled source of functions. */
3824
+ var funcToString = funcProto.toString;
3825
+
3826
+ /** Used to check objects for own properties. */
3827
+ var hasOwnProperty = objectProto.hasOwnProperty;
3828
+
3829
+ /**
3830
+ * Used to resolve the
3831
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3832
+ * of values.
3833
+ */
3834
+ var objectToString = objectProto.toString;
3835
+
3836
+ /** Used to detect if a method is native. */
3837
+ var reIsNative = RegExp('^' +
3838
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
3839
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
3840
+ );
3841
+
3842
+ /** Built-in value references. */
3843
+ var splice = arrayProto.splice;
3844
+
3845
+ /* Built-in method references that are verified to be native. */
3846
+ var Map = getNative(root, 'Map'),
3847
+ Set = getNative(root, 'Set'),
3848
+ nativeCreate = getNative(Object, 'create');
3849
+
3850
+ /**
3851
+ * Creates a hash object.
3852
+ *
3853
+ * @private
3854
+ * @constructor
3855
+ * @param {Array} [entries] The key-value pairs to cache.
3856
+ */
3857
+ function Hash(entries) {
3858
+ var index = -1,
3859
+ length = entries ? entries.length : 0;
3860
+
3861
+ this.clear();
3862
+ while (++index < length) {
3863
+ var entry = entries[index];
3864
+ this.set(entry[0], entry[1]);
3865
+ }
3866
+ }
3867
+
3868
+ /**
3869
+ * Removes all key-value entries from the hash.
3870
+ *
3871
+ * @private
3872
+ * @name clear
3873
+ * @memberOf Hash
3874
+ */
3875
+ function hashClear() {
3876
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
3877
+ }
3878
+
3879
+ /**
3880
+ * Removes `key` and its value from the hash.
3881
+ *
3882
+ * @private
3883
+ * @name delete
3884
+ * @memberOf Hash
3885
+ * @param {Object} hash The hash to modify.
3886
+ * @param {string} key The key of the value to remove.
3887
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3888
+ */
3889
+ function hashDelete(key) {
3890
+ return this.has(key) && delete this.__data__[key];
3891
+ }
3892
+
3893
+ /**
3894
+ * Gets the hash value for `key`.
3895
+ *
3896
+ * @private
3897
+ * @name get
3898
+ * @memberOf Hash
3899
+ * @param {string} key The key of the value to get.
3900
+ * @returns {*} Returns the entry value.
3901
+ */
3902
+ function hashGet(key) {
3903
+ var data = this.__data__;
3904
+ if (nativeCreate) {
3905
+ var result = data[key];
3906
+ return result === HASH_UNDEFINED ? undefined : result;
3907
+ }
3908
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
3909
+ }
3910
+
3911
+ /**
3912
+ * Checks if a hash value for `key` exists.
3913
+ *
3914
+ * @private
3915
+ * @name has
3916
+ * @memberOf Hash
3917
+ * @param {string} key The key of the entry to check.
3918
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3919
+ */
3920
+ function hashHas(key) {
3921
+ var data = this.__data__;
3922
+ return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
3923
+ }
3924
+
3925
+ /**
3926
+ * Sets the hash `key` to `value`.
3927
+ *
3928
+ * @private
3929
+ * @name set
3930
+ * @memberOf Hash
3931
+ * @param {string} key The key of the value to set.
3932
+ * @param {*} value The value to set.
3933
+ * @returns {Object} Returns the hash instance.
3934
+ */
3935
+ function hashSet(key, value) {
3936
+ var data = this.__data__;
3937
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
3938
+ return this;
3939
+ }
3940
+
3941
+ // Add methods to `Hash`.
3942
+ Hash.prototype.clear = hashClear;
3943
+ Hash.prototype['delete'] = hashDelete;
3944
+ Hash.prototype.get = hashGet;
3945
+ Hash.prototype.has = hashHas;
3946
+ Hash.prototype.set = hashSet;
3947
+
3948
+ /**
3949
+ * Creates an list cache object.
3950
+ *
3951
+ * @private
3952
+ * @constructor
3953
+ * @param {Array} [entries] The key-value pairs to cache.
3954
+ */
3955
+ function ListCache(entries) {
3956
+ var index = -1,
3957
+ length = entries ? entries.length : 0;
3958
+
3959
+ this.clear();
3960
+ while (++index < length) {
3961
+ var entry = entries[index];
3962
+ this.set(entry[0], entry[1]);
3963
+ }
3964
+ }
3965
+
3966
+ /**
3967
+ * Removes all key-value entries from the list cache.
3968
+ *
3969
+ * @private
3970
+ * @name clear
3971
+ * @memberOf ListCache
3972
+ */
3973
+ function listCacheClear() {
3974
+ this.__data__ = [];
3975
+ }
3976
+
3977
+ /**
3978
+ * Removes `key` and its value from the list cache.
3979
+ *
3980
+ * @private
3981
+ * @name delete
3982
+ * @memberOf ListCache
3983
+ * @param {string} key The key of the value to remove.
3984
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3985
+ */
3986
+ function listCacheDelete(key) {
3987
+ var data = this.__data__,
3988
+ index = assocIndexOf(data, key);
3989
+
3990
+ if (index < 0) {
3991
+ return false;
3992
+ }
3993
+ var lastIndex = data.length - 1;
3994
+ if (index == lastIndex) {
3995
+ data.pop();
3996
+ } else {
3997
+ splice.call(data, index, 1);
3998
+ }
3999
+ return true;
4000
+ }
4001
+
4002
+ /**
4003
+ * Gets the list cache value for `key`.
4004
+ *
4005
+ * @private
4006
+ * @name get
4007
+ * @memberOf ListCache
4008
+ * @param {string} key The key of the value to get.
4009
+ * @returns {*} Returns the entry value.
4010
+ */
4011
+ function listCacheGet(key) {
4012
+ var data = this.__data__,
4013
+ index = assocIndexOf(data, key);
4014
+
4015
+ return index < 0 ? undefined : data[index][1];
4016
+ }
4017
+
4018
+ /**
4019
+ * Checks if a list cache value for `key` exists.
4020
+ *
4021
+ * @private
4022
+ * @name has
4023
+ * @memberOf ListCache
4024
+ * @param {string} key The key of the entry to check.
4025
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4026
+ */
4027
+ function listCacheHas(key) {
4028
+ return assocIndexOf(this.__data__, key) > -1;
4029
+ }
4030
+
4031
+ /**
4032
+ * Sets the list cache `key` to `value`.
4033
+ *
4034
+ * @private
4035
+ * @name set
4036
+ * @memberOf ListCache
4037
+ * @param {string} key The key of the value to set.
4038
+ * @param {*} value The value to set.
4039
+ * @returns {Object} Returns the list cache instance.
4040
+ */
4041
+ function listCacheSet(key, value) {
4042
+ var data = this.__data__,
4043
+ index = assocIndexOf(data, key);
4044
+
4045
+ if (index < 0) {
4046
+ data.push([key, value]);
4047
+ } else {
4048
+ data[index][1] = value;
4049
+ }
4050
+ return this;
4051
+ }
4052
+
4053
+ // Add methods to `ListCache`.
4054
+ ListCache.prototype.clear = listCacheClear;
4055
+ ListCache.prototype['delete'] = listCacheDelete;
4056
+ ListCache.prototype.get = listCacheGet;
4057
+ ListCache.prototype.has = listCacheHas;
4058
+ ListCache.prototype.set = listCacheSet;
4059
+
4060
+ /**
4061
+ * Creates a map cache object to store key-value pairs.
4062
+ *
4063
+ * @private
4064
+ * @constructor
4065
+ * @param {Array} [entries] The key-value pairs to cache.
4066
+ */
4067
+ function MapCache(entries) {
4068
+ var index = -1,
4069
+ length = entries ? entries.length : 0;
4070
+
4071
+ this.clear();
4072
+ while (++index < length) {
4073
+ var entry = entries[index];
4074
+ this.set(entry[0], entry[1]);
4075
+ }
4076
+ }
4077
+
4078
+ /**
4079
+ * Removes all key-value entries from the map.
4080
+ *
4081
+ * @private
4082
+ * @name clear
4083
+ * @memberOf MapCache
4084
+ */
4085
+ function mapCacheClear() {
4086
+ this.__data__ = {
4087
+ 'hash': new Hash,
4088
+ 'map': new (Map || ListCache),
4089
+ 'string': new Hash
4090
+ };
4091
+ }
4092
+
4093
+ /**
4094
+ * Removes `key` and its value from the map.
4095
+ *
4096
+ * @private
4097
+ * @name delete
4098
+ * @memberOf MapCache
4099
+ * @param {string} key The key of the value to remove.
4100
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
4101
+ */
4102
+ function mapCacheDelete(key) {
4103
+ return getMapData(this, key)['delete'](key);
4104
+ }
4105
+
4106
+ /**
4107
+ * Gets the map value for `key`.
4108
+ *
4109
+ * @private
4110
+ * @name get
4111
+ * @memberOf MapCache
4112
+ * @param {string} key The key of the value to get.
4113
+ * @returns {*} Returns the entry value.
4114
+ */
4115
+ function mapCacheGet(key) {
4116
+ return getMapData(this, key).get(key);
4117
+ }
4118
+
4119
+ /**
4120
+ * Checks if a map value for `key` exists.
4121
+ *
4122
+ * @private
4123
+ * @name has
4124
+ * @memberOf MapCache
4125
+ * @param {string} key The key of the entry to check.
4126
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4127
+ */
4128
+ function mapCacheHas(key) {
4129
+ return getMapData(this, key).has(key);
4130
+ }
4131
+
4132
+ /**
4133
+ * Sets the map `key` to `value`.
4134
+ *
4135
+ * @private
4136
+ * @name set
4137
+ * @memberOf MapCache
4138
+ * @param {string} key The key of the value to set.
4139
+ * @param {*} value The value to set.
4140
+ * @returns {Object} Returns the map cache instance.
4141
+ */
4142
+ function mapCacheSet(key, value) {
4143
+ getMapData(this, key).set(key, value);
4144
+ return this;
4145
+ }
4146
+
4147
+ // Add methods to `MapCache`.
4148
+ MapCache.prototype.clear = mapCacheClear;
4149
+ MapCache.prototype['delete'] = mapCacheDelete;
4150
+ MapCache.prototype.get = mapCacheGet;
4151
+ MapCache.prototype.has = mapCacheHas;
4152
+ MapCache.prototype.set = mapCacheSet;
4153
+
4154
+ /**
4155
+ *
4156
+ * Creates an array cache object to store unique values.
4157
+ *
4158
+ * @private
4159
+ * @constructor
4160
+ * @param {Array} [values] The values to cache.
4161
+ */
4162
+ function SetCache(values) {
4163
+ var index = -1,
4164
+ length = values ? values.length : 0;
4165
+
4166
+ this.__data__ = new MapCache;
4167
+ while (++index < length) {
4168
+ this.add(values[index]);
4169
+ }
4170
+ }
4171
+
4172
+ /**
4173
+ * Adds `value` to the array cache.
4174
+ *
4175
+ * @private
4176
+ * @name add
4177
+ * @memberOf SetCache
4178
+ * @alias push
4179
+ * @param {*} value The value to cache.
4180
+ * @returns {Object} Returns the cache instance.
4181
+ */
4182
+ function setCacheAdd(value) {
4183
+ this.__data__.set(value, HASH_UNDEFINED);
4184
+ return this;
4185
+ }
4186
+
4187
+ /**
4188
+ * Checks if `value` is in the array cache.
4189
+ *
4190
+ * @private
4191
+ * @name has
4192
+ * @memberOf SetCache
4193
+ * @param {*} value The value to search for.
4194
+ * @returns {number} Returns `true` if `value` is found, else `false`.
4195
+ */
4196
+ function setCacheHas(value) {
4197
+ return this.__data__.has(value);
4198
+ }
4199
+
4200
+ // Add methods to `SetCache`.
4201
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
4202
+ SetCache.prototype.has = setCacheHas;
4203
+
4204
+ /**
4205
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
4206
+ *
4207
+ * @private
4208
+ * @param {Array} array The array to inspect.
4209
+ * @param {*} key The key to search for.
4210
+ * @returns {number} Returns the index of the matched value, else `-1`.
4211
+ */
4212
+ function assocIndexOf(array, key) {
4213
+ var length = array.length;
4214
+ while (length--) {
4215
+ if (eq(array[length][0], key)) {
4216
+ return length;
4217
+ }
4218
+ }
4219
+ return -1;
4220
+ }
4221
+
4222
+ /**
4223
+ * The base implementation of `_.isNative` without bad shim checks.
4224
+ *
4225
+ * @private
4226
+ * @param {*} value The value to check.
4227
+ * @returns {boolean} Returns `true` if `value` is a native function,
4228
+ * else `false`.
4229
+ */
4230
+ function baseIsNative(value) {
4231
+ if (!isObject(value) || isMasked(value)) {
4232
+ return false;
4233
+ }
4234
+ var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
4235
+ return pattern.test(toSource(value));
4236
+ }
4237
+
4238
+ /**
4239
+ * The base implementation of `_.uniqBy` without support for iteratee shorthands.
4240
+ *
4241
+ * @private
4242
+ * @param {Array} array The array to inspect.
4243
+ * @param {Function} [iteratee] The iteratee invoked per element.
4244
+ * @param {Function} [comparator] The comparator invoked per element.
4245
+ * @returns {Array} Returns the new duplicate free array.
4246
+ */
4247
+ function baseUniq(array, iteratee, comparator) {
4248
+ var index = -1,
4249
+ includes = arrayIncludes,
4250
+ length = array.length,
4251
+ isCommon = true,
4252
+ result = [],
4253
+ seen = result;
4254
+
4255
+ if (comparator) {
4256
+ isCommon = false;
4257
+ includes = arrayIncludesWith;
4258
+ }
4259
+ else if (length >= LARGE_ARRAY_SIZE) {
4260
+ var set = iteratee ? null : createSet(array);
4261
+ if (set) {
4262
+ return setToArray(set);
4263
+ }
4264
+ isCommon = false;
4265
+ includes = cacheHas;
4266
+ seen = new SetCache;
4267
+ }
4268
+ else {
4269
+ seen = iteratee ? [] : result;
4270
+ }
4271
+ outer:
4272
+ while (++index < length) {
4273
+ var value = array[index],
4274
+ computed = iteratee ? iteratee(value) : value;
4275
+
4276
+ value = (comparator || value !== 0) ? value : 0;
4277
+ if (isCommon && computed === computed) {
4278
+ var seenIndex = seen.length;
4279
+ while (seenIndex--) {
4280
+ if (seen[seenIndex] === computed) {
4281
+ continue outer;
4282
+ }
4283
+ }
4284
+ if (iteratee) {
4285
+ seen.push(computed);
4286
+ }
4287
+ result.push(value);
4288
+ }
4289
+ else if (!includes(seen, computed, comparator)) {
4290
+ if (seen !== result) {
4291
+ seen.push(computed);
4292
+ }
4293
+ result.push(value);
4294
+ }
4295
+ }
4296
+ return result;
4297
+ }
4298
+
4299
+ /**
4300
+ * Creates a set object of `values`.
4301
+ *
4302
+ * @private
4303
+ * @param {Array} values The values to add to the set.
4304
+ * @returns {Object} Returns the new set.
4305
+ */
4306
+ var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
4307
+ return new Set(values);
4308
+ };
4309
+
4310
+ /**
4311
+ * Gets the data for `map`.
4312
+ *
4313
+ * @private
4314
+ * @param {Object} map The map to query.
4315
+ * @param {string} key The reference key.
4316
+ * @returns {*} Returns the map data.
4317
+ */
4318
+ function getMapData(map, key) {
4319
+ var data = map.__data__;
4320
+ return isKeyable(key)
4321
+ ? data[typeof key == 'string' ? 'string' : 'hash']
4322
+ : data.map;
4323
+ }
4324
+
4325
+ /**
4326
+ * Gets the native function at `key` of `object`.
4327
+ *
4328
+ * @private
4329
+ * @param {Object} object The object to query.
4330
+ * @param {string} key The key of the method to get.
4331
+ * @returns {*} Returns the function if it's native, else `undefined`.
4332
+ */
4333
+ function getNative(object, key) {
4334
+ var value = getValue(object, key);
4335
+ return baseIsNative(value) ? value : undefined;
4336
+ }
4337
+
4338
+ /**
4339
+ * Checks if `value` is suitable for use as unique object key.
4340
+ *
4341
+ * @private
4342
+ * @param {*} value The value to check.
4343
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
4344
+ */
4345
+ function isKeyable(value) {
4346
+ var type = typeof value;
4347
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
4348
+ ? (value !== '__proto__')
4349
+ : (value === null);
4350
+ }
4351
+
4352
+ /**
4353
+ * Checks if `func` has its source masked.
4354
+ *
4355
+ * @private
4356
+ * @param {Function} func The function to check.
4357
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
4358
+ */
4359
+ function isMasked(func) {
4360
+ return !!maskSrcKey && (maskSrcKey in func);
4361
+ }
4362
+
4363
+ /**
4364
+ * Converts `func` to its source code.
4365
+ *
4366
+ * @private
4367
+ * @param {Function} func The function to process.
4368
+ * @returns {string} Returns the source code.
4369
+ */
4370
+ function toSource(func) {
4371
+ if (func != null) {
4372
+ try {
4373
+ return funcToString.call(func);
4374
+ } catch (e) {}
4375
+ try {
4376
+ return (func + '');
4377
+ } catch (e) {}
4378
+ }
4379
+ return '';
4380
+ }
4381
+
4382
+ /**
4383
+ * Creates a duplicate-free version of an array, using
4384
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
4385
+ * for equality comparisons, in which only the first occurrence of each
4386
+ * element is kept.
4387
+ *
4388
+ * @static
4389
+ * @memberOf _
4390
+ * @since 0.1.0
4391
+ * @category Array
4392
+ * @param {Array} array The array to inspect.
4393
+ * @returns {Array} Returns the new duplicate free array.
4394
+ * @example
4395
+ *
4396
+ * _.uniq([2, 1, 2]);
4397
+ * // => [2, 1]
4398
+ */
4399
+ function uniq(array) {
4400
+ return (array && array.length)
4401
+ ? baseUniq(array)
4402
+ : [];
4403
+ }
4404
+
4405
+ /**
4406
+ * Performs a
4407
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
4408
+ * comparison between two values to determine if they are equivalent.
4409
+ *
4410
+ * @static
4411
+ * @memberOf _
4412
+ * @since 4.0.0
4413
+ * @category Lang
4414
+ * @param {*} value The value to compare.
4415
+ * @param {*} other The other value to compare.
4416
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
4417
+ * @example
4418
+ *
4419
+ * var object = { 'a': 1 };
4420
+ * var other = { 'a': 1 };
4421
+ *
4422
+ * _.eq(object, object);
4423
+ * // => true
4424
+ *
4425
+ * _.eq(object, other);
4426
+ * // => false
4427
+ *
4428
+ * _.eq('a', 'a');
4429
+ * // => true
4430
+ *
4431
+ * _.eq('a', Object('a'));
4432
+ * // => false
4433
+ *
4434
+ * _.eq(NaN, NaN);
4435
+ * // => true
4436
+ */
4437
+ function eq(value, other) {
4438
+ return value === other || (value !== value && other !== other);
4439
+ }
4440
+
4441
+ /**
4442
+ * Checks if `value` is classified as a `Function` object.
4443
+ *
4444
+ * @static
4445
+ * @memberOf _
4446
+ * @since 0.1.0
4447
+ * @category Lang
4448
+ * @param {*} value The value to check.
4449
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
4450
+ * @example
4451
+ *
4452
+ * _.isFunction(_);
4453
+ * // => true
4454
+ *
4455
+ * _.isFunction(/abc/);
4456
+ * // => false
4457
+ */
4458
+ function isFunction(value) {
4459
+ // The use of `Object#toString` avoids issues with the `typeof` operator
4460
+ // in Safari 8-9 which returns 'object' for typed array and other constructors.
4461
+ var tag = isObject(value) ? objectToString.call(value) : '';
4462
+ return tag == funcTag || tag == genTag;
4463
+ }
4464
+
4465
+ /**
4466
+ * Checks if `value` is the
4467
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
4468
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
4469
+ *
4470
+ * @static
4471
+ * @memberOf _
4472
+ * @since 0.1.0
4473
+ * @category Lang
4474
+ * @param {*} value The value to check.
4475
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
4476
+ * @example
4477
+ *
4478
+ * _.isObject({});
4479
+ * // => true
4480
+ *
4481
+ * _.isObject([1, 2, 3]);
4482
+ * // => true
4483
+ *
4484
+ * _.isObject(_.noop);
4485
+ * // => true
4486
+ *
4487
+ * _.isObject(null);
4488
+ * // => false
4489
+ */
4490
+ function isObject(value) {
4491
+ var type = typeof value;
4492
+ return !!value && (type == 'object' || type == 'function');
4493
+ }
4494
+
4495
+ /**
4496
+ * This method returns `undefined`.
4497
+ *
4498
+ * @static
4499
+ * @memberOf _
4500
+ * @since 2.3.0
4501
+ * @category Util
4502
+ * @example
4503
+ *
4504
+ * _.times(2, _.noop);
4505
+ * // => [undefined, undefined]
4506
+ */
4507
+ function noop() {
4508
+ // No operation performed.
4509
+ }
4510
+
4511
+ module.exports = uniq;
4512
+
4513
+ }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
4514
+ },{}],7:[function(require,module,exports){
4515
+ /*
4516
+ object-assign
4517
+ (c) Sindre Sorhus
4518
+ @license MIT
4519
+ */
4520
+
4521
+ 'use strict';
4522
+ /* eslint-disable no-unused-vars */
4523
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
4524
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
4525
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
4526
+
4527
+ function toObject(val) {
4528
+ if (val === null || val === undefined) {
4529
+ throw new TypeError('Object.assign cannot be called with null or undefined');
4530
+ }
4531
+
4532
+ return Object(val);
4533
+ }
4534
+
4535
+ function shouldUseNative() {
4536
+ try {
4537
+ if (!Object.assign) {
4538
+ return false;
4539
+ }
4540
+
4541
+ // Detect buggy property enumeration order in older V8 versions.
4542
+
4543
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
4544
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
4545
+ test1[5] = 'de';
4546
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
4547
+ return false;
4548
+ }
4549
+
4550
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
4551
+ var test2 = {};
4552
+ for (var i = 0; i < 10; i++) {
4553
+ test2['_' + String.fromCharCode(i)] = i;
4554
+ }
4555
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
4556
+ return test2[n];
4557
+ });
4558
+ if (order2.join('') !== '0123456789') {
4559
+ return false;
4560
+ }
4561
+
4562
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
4563
+ var test3 = {};
4564
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
4565
+ test3[letter] = letter;
4566
+ });
4567
+ if (Object.keys(Object.assign({}, test3)).join('') !==
4568
+ 'abcdefghijklmnopqrst') {
4569
+ return false;
4570
+ }
4571
+
4572
+ return true;
4573
+ } catch (err) {
4574
+ // We don't expect any of the above to throw, but better to be safe.
4575
+ return false;
4576
+ }
4577
+ }
4578
+
4579
+ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
4580
+ var from;
4581
+ var to = toObject(target);
4582
+ var symbols;
4583
+
4584
+ for (var s = 1; s < arguments.length; s++) {
4585
+ from = Object(arguments[s]);
4586
+
4587
+ for (var key in from) {
4588
+ if (hasOwnProperty.call(from, key)) {
4589
+ to[key] = from[key];
4590
+ }
4591
+ }
4592
+
4593
+ if (getOwnPropertySymbols) {
4594
+ symbols = getOwnPropertySymbols(from);
4595
+ for (var i = 0; i < symbols.length; i++) {
4596
+ if (propIsEnumerable.call(from, symbols[i])) {
4597
+ to[symbols[i]] = from[symbols[i]];
4598
+ }
4599
+ }
4600
+ }
4601
+ }
4602
+
4603
+ return to;
4604
+ };
4605
+
4606
+ },{}],8:[function(require,module,exports){
4607
+
4608
+ // https://github.com/Matt-Esch/virtual-dom/blob/master/virtual-hyperscript/parse-tag.js
4609
+
4610
+ var split = require('browser-split')
4611
+
4612
+ var classIdSplit = /([\.#]?[a-zA-Z0-9\u007F-\uFFFF_:-]+)/
4613
+ var notClassId = /^\.|#/
4614
+
4615
+ module.exports = function parseSelector (selector, upper) {
4616
+ selector = selector || ''
4617
+ var tagName
4618
+ var id = ''
4619
+ var classes = []
4620
+
4621
+ var tagParts = split(selector, classIdSplit)
4622
+
4623
+ if (notClassId.test(tagParts[1]) || selector === '') {
4624
+ tagName = 'div'
4625
+ }
4626
+
4627
+ var part, type, i
4628
+
4629
+ for (i = 0; i < tagParts.length; i++) {
4630
+ part = tagParts[i]
4631
+
4632
+ if (!part) {
4633
+ continue
4634
+ }
4635
+
4636
+ type = part.charAt(0)
4637
+
4638
+ if (!tagName) {
4639
+ tagName = part
4640
+ } else if (type === '.') {
4641
+ classes.push(part.substring(1, part.length))
4642
+ } else if (type === '#') {
4643
+ id = part.substring(1, part.length)
4644
+ }
4645
+ }
4646
+
4647
+ return {
4648
+ tagName: upper === true ? tagName.toUpperCase() : tagName,
4649
+ id: id,
4650
+ className: classes.join(' ')
4651
+ }
4652
+ }
4653
+
4654
+ },{"browser-split":1}],9:[function(require,module,exports){
4655
+
4656
+ // All SVG children elements, not in this list, should self-close
4657
+
4658
+ exports.CONTAINER = {
4659
+ // http://www.w3.org/TR/SVG/intro.html#TermContainerElement
4660
+ 'a': true,
4661
+ 'defs': true,
4662
+ 'glyph': true,
4663
+ 'g': true,
4664
+ 'marker': true,
4665
+ 'mask': true,
4666
+ 'missing-glyph': true,
4667
+ 'pattern': true,
4668
+ 'svg': true,
4669
+ 'switch': true,
4670
+ 'symbol': true,
4671
+ 'text': true,
4672
+
4673
+ // http://www.w3.org/TR/SVG/intro.html#TermDescriptiveElement
4674
+ 'desc': true,
4675
+ 'metadata': true,
4676
+ 'title': true
4677
+ }
4678
+
4679
+ // http://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements
4680
+
4681
+ exports.VOID = {
4682
+ area: true,
4683
+ base: true,
4684
+ br: true,
4685
+ col: true,
4686
+ embed: true,
4687
+ hr: true,
4688
+ img: true,
4689
+ input: true,
4690
+ keygen: true,
4691
+ link: true,
4692
+ meta: true,
4693
+ param: true,
4694
+ source: true,
4695
+ track: true,
4696
+ wbr: true
4697
+ }
4698
+
4699
+ },{}],10:[function(require,module,exports){
4700
+
4701
+ var init = require('./init')
4702
+ var modules = require('./modules')
4703
+
4704
+ var toHTML = init([
4705
+ modules.attributes,
4706
+ modules.props,
4707
+ modules.class,
4708
+ modules.style,
4709
+ modules.dataset
4710
+ ])
4711
+
4712
+ module.exports = toHTML
4713
+
4714
+ },{"./init":11,"./modules":15}],11:[function(require,module,exports){
4715
+
4716
+ var escape = require('lodash.escape')
4717
+ var parseSelector = require('parse-sel')
4718
+ var VOID_ELEMENTS = require('./elements').VOID
4719
+ var CONTAINER_ELEMENTS = require('./elements').CONTAINER
4720
+
4721
+ module.exports = function init (modules) {
4722
+ function parse (vnode, node) {
4723
+ var result = []
4724
+ var attributes = new Map([
4725
+ // These can be overwritten because that’s what happens in snabbdom
4726
+ ['id', node.id],
4727
+ ['class', node.className]
4728
+ ])
4729
+
4730
+ modules.forEach(function (fn, index) {
4731
+ fn(vnode, attributes)
4732
+ })
4733
+ attributes.forEach(function (value, key) {
4734
+ if (value && value !== '') {
4735
+ result.push(key + '="' + value + '"')
4736
+ }
4737
+ })
4738
+
4739
+ return result.join(' ')
4740
+ }
4741
+
4742
+ return function renderToString (vnode) {
4743
+ if (typeof vnode === 'undefined' || vnode === null) {
4744
+ return ''
4745
+ }
4746
+
4747
+ if (!vnode.sel && typeof vnode.text === 'string') {
4748
+ return escape(vnode.text)
4749
+ }
4750
+
4751
+ vnode.data = vnode.data || {}
4752
+
4753
+ // Support thunks
4754
+ if (vnode.data.hook &&
4755
+ typeof vnode.data.hook.init === 'function' &&
4756
+ typeof vnode.data.fn === 'function') {
4757
+ vnode.data.hook.init(vnode)
4758
+ }
4759
+
4760
+ var node = parseSelector(vnode.sel)
4761
+ var tagName = node.tagName
4762
+ var attributes = parse(vnode, node)
4763
+ var svg = vnode.data.ns === 'http://www.w3.org/2000/svg'
4764
+ var tag = []
4765
+
4766
+ if (tagName === '!') {
4767
+ return '<!--' + vnode.text + '-->'
4768
+ }
4769
+
4770
+ // Open tag
4771
+ tag.push('<' + tagName)
4772
+ if (attributes.length) {
4773
+ tag.push(' ' + attributes)
4774
+ }
4775
+ if (svg && CONTAINER_ELEMENTS[tagName] !== true) {
4776
+ tag.push(' /')
4777
+ }
4778
+ tag.push('>')
4779
+
4780
+ // Close tag, if needed
4781
+ if ((VOID_ELEMENTS[tagName] !== true && !svg) ||
4782
+ (svg && CONTAINER_ELEMENTS[tagName] === true)) {
4783
+ if (vnode.data.props && vnode.data.props.innerHTML) {
4784
+ tag.push(vnode.data.props.innerHTML)
4785
+ } else if (vnode.text) {
4786
+ tag.push(escape(vnode.text))
4787
+ } else if (vnode.children) {
4788
+ vnode.children.forEach(function (child) {
4789
+ tag.push(renderToString(child))
4790
+ })
4791
+ }
4792
+ tag.push('</' + tagName + '>')
4793
+ }
4794
+
4795
+ return tag.join('')
4796
+ }
4797
+ }
4798
+
4799
+ },{"./elements":9,"lodash.escape":2,"parse-sel":8}],12:[function(require,module,exports){
4800
+
4801
+ var forOwn = require('lodash.forown')
4802
+ var escape = require('lodash.escape')
4803
+
4804
+ // data.attrs
4805
+
4806
+ module.exports = function attrsModule (vnode, attributes) {
4807
+ var attrs = vnode.data.attrs || {}
4808
+
4809
+ forOwn(attrs, function (value, key) {
4810
+ attributes.set(key, escape(value))
4811
+ })
4812
+ }
4813
+
4814
+ },{"lodash.escape":2,"lodash.forown":3}],13:[function(require,module,exports){
4815
+
4816
+ var forOwn = require('lodash.forown')
4817
+ var remove = require('lodash.remove')
4818
+ var uniq = require('lodash.uniq')
4819
+
4820
+ // data.class
4821
+
4822
+ module.exports = function classModule (vnode, attributes) {
4823
+ var values
4824
+ var _add = []
4825
+ var _remove = []
4826
+ var classes = vnode.data.class || {}
4827
+ var existing = attributes.get('class')
4828
+ existing = existing.length > 0 ? existing.split(' ') : []
4829
+
4830
+ forOwn(classes, function (value, key) {
4831
+ if (value === true) {
4832
+ _add.push(key)
4833
+ } else {
4834
+ _remove.push(key)
4835
+ }
4836
+ })
4837
+
4838
+ values = remove(uniq(existing.concat(_add)), function (value) {
4839
+ return _remove.indexOf(value) < 0
4840
+ })
4841
+
4842
+ if (values.length) {
4843
+ attributes.set('class', values.join(' '))
4844
+ }
4845
+ }
4846
+
4847
+ },{"lodash.forown":3,"lodash.remove":5,"lodash.uniq":6}],14:[function(require,module,exports){
4848
+
4849
+ var forOwn = require('lodash.forown')
4850
+ var escape = require('lodash.escape')
4851
+
4852
+ // data.dataset
4853
+
4854
+ module.exports = function datasetModule (vnode, attributes) {
4855
+ var dataset = vnode.data.dataset || {}
4856
+
4857
+ forOwn(dataset, function (value, key) {
4858
+ attributes.set(`data-${key}`, escape(value))
4859
+ })
4860
+ }
4861
+
4862
+ },{"lodash.escape":2,"lodash.forown":3}],15:[function(require,module,exports){
4863
+
4864
+ module.exports = {
4865
+ class: require('./class'),
4866
+ props: require('./props'),
4867
+ attributes: require('./attributes'),
4868
+ style: require('./style'),
4869
+ dataset: require('./dataset')
4870
+ }
4871
+
4872
+ },{"./attributes":12,"./class":13,"./dataset":14,"./props":16,"./style":17}],16:[function(require,module,exports){
4873
+
4874
+ var forOwn = require('lodash.forown')
4875
+ var escape = require('lodash.escape')
4876
+
4877
+ // https://developer.mozilla.org/en-US/docs/Web/API/element
4878
+ var omit = [
4879
+ 'attributes',
4880
+ 'childElementCount',
4881
+ 'children',
4882
+ 'classList',
4883
+ 'clientHeight',
4884
+ 'clientLeft',
4885
+ 'clientTop',
4886
+ 'clientWidth',
4887
+ 'currentStyle',
4888
+ 'firstElementChild',
4889
+ 'innerHTML',
4890
+ 'lastElementChild',
4891
+ 'nextElementSibling',
4892
+ 'ongotpointercapture',
4893
+ 'onlostpointercapture',
4894
+ 'onwheel',
4895
+ 'outerHTML',
4896
+ 'previousElementSibling',
4897
+ 'runtimeStyle',
4898
+ 'scrollHeight',
4899
+ 'scrollLeft',
4900
+ 'scrollLeftMax',
4901
+ 'scrollTop',
4902
+ 'scrollTopMax',
4903
+ 'scrollWidth',
4904
+ 'tabStop',
4905
+ 'tagName'
4906
+ ]
4907
+
4908
+ // data.props
4909
+
4910
+ module.exports = function propsModule (vnode, attributes) {
4911
+ var props = vnode.data.props || {}
4912
+
4913
+ forOwn(props, function (value, key) {
4914
+ if (omit.indexOf(key) > -1) {
4915
+ return
4916
+ }
4917
+ if (key === 'htmlFor') {
4918
+ key = 'for'
4919
+ }
4920
+ if (key === 'className') {
4921
+ key = 'class'
4922
+ }
4923
+
4924
+ attributes.set(key.toLowerCase(), escape(value))
4925
+ })
4926
+ }
4927
+
4928
+ },{"lodash.escape":2,"lodash.forown":3}],17:[function(require,module,exports){
4929
+
4930
+ var assign = require('object-assign')
4931
+ var forOwn = require('lodash.forown')
4932
+ var escape = require('lodash.escape')
4933
+ var kebabCase = require('lodash.kebabcase')
4934
+
4935
+ // data.style
4936
+
4937
+ module.exports = function styleModule (vnode, attributes) {
4938
+ var values = []
4939
+ var style = vnode.data.style || {}
4940
+
4941
+ // merge in `delayed` properties
4942
+ if (style.delayed) {
4943
+ assign(style, style.delayed)
4944
+ }
4945
+
4946
+ forOwn(style, function (value, key) {
4947
+ // omit hook objects
4948
+ if (typeof value === 'string' || typeof value === 'number') {
4949
+ var kebabKey = kebabCase(key)
4950
+ values.push((key.match(/^--.*/) ? '--' + kebabKey : kebabKey) + ': ' + escape(value))
4951
+ }
4952
+ })
4953
+
4954
+ if (values.length) {
4955
+ attributes.set('style', values.join('; '))
4956
+ }
4957
+ }
4958
+
4959
+ },{"lodash.escape":2,"lodash.forown":3,"lodash.kebabcase":4,"object-assign":7}]},{},[10])(10)
4960
+ });