lodash-rails 4.5.1 → 4.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4a083a2cda5c5b12200adec4f909e7b6f9926e36
4
- data.tar.gz: 20a28f1493f3e3f6a45ac6c26bb8879ff1012f5d
3
+ metadata.gz: f014fb0533f8bbdad7af447f2971e51fe096d89d
4
+ data.tar.gz: 59a1d3694c271e9c9d10574205c9321f3372205e
5
5
  SHA512:
6
- metadata.gz: fbf1205a61922f51bcfbe3f8ca0d920eae7aca3b55477ab39a4484c1a509084c1b2a0b44779bb926d2491b18ce753a19a75b82b038a9e978817abbf4acc1c40e
7
- data.tar.gz: 5763712159a8ac02d3d458923a5b7c09c843ed36e3fab1d8747e7eeaaf6137ff8555bbb335a98257d64088cdbb21a3a39a519ed827f1d71a3705d66ce2ac784c
6
+ metadata.gz: 2a666474bb4040485a681cbb7902dbf317856bd0e94f0404547459a4500ec72cf3a03bbdb0a9ce6ecac31f3c1513753652ca2b982ff2f438ede850ed772722a9
7
+ data.tar.gz: eaac872af0c0d2acf72ad0aa9305fd83c7591bee80cc7200e42d3c30d941a0e05ff3b6d16e0bb19586f44bbd5c104b6db0b48127362a2eb8a4716d2ed9c60f43
data/README.md CHANGED
@@ -18,7 +18,7 @@ Add the necessary library to `app/assets/javascripts/application.js`:
18
18
 
19
19
  ## What's included?
20
20
 
21
- lodash 4.5.1:
21
+ lodash 4.6.1:
22
22
 
23
23
  * lodash.core.js
24
24
  * lodash.core.min.js
@@ -1,5 +1,5 @@
1
1
  module LoDash
2
2
  module Rails
3
- VERSION = "4.5.1"
3
+ VERSION = "4.6.1"
4
4
  end
5
5
  end
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * lodash 4.5.1 (Custom Build) <https://lodash.com/>
3
+ * lodash 4.6.1 (Custom Build) <https://lodash.com/>
4
4
  * Build: `lodash core -o ./dist/lodash.core.js`
5
5
  * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
6
6
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@@ -13,7 +13,10 @@
13
13
  var undefined;
14
14
 
15
15
  /** Used as the semantic version number. */
16
- var VERSION = '4.5.1';
16
+ var VERSION = '4.6.1';
17
+
18
+ /** Used as the `TypeError` message for "Functions" methods. */
19
+ var FUNC_ERROR_TEXT = 'Expected a function';
17
20
 
18
21
  /** Used to compose bitmasks for wrapper metadata. */
19
22
  var BIND_FLAG = 1,
@@ -23,9 +26,6 @@
23
26
  var UNORDERED_COMPARE_FLAG = 1,
24
27
  PARTIAL_COMPARE_FLAG = 2;
25
28
 
26
- /** Used as the `TypeError` message for "Functions" methods. */
27
- var FUNC_ERROR_TEXT = 'Expected a function';
28
-
29
29
  /** Used as references for various `Number` constants. */
30
30
  var INFINITY = 1 / 0,
31
31
  MAX_SAFE_INTEGER = 9007199254740991;
@@ -426,46 +426,48 @@
426
426
  * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
427
427
  * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
428
428
  * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
429
- * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, `difference`,
430
- * `differenceBy`, `differenceWith`, `drop`, `dropRight`, `dropRightWhile`,
431
- * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flattenDepth`,
432
- * `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, `functionsIn`,
433
- * `groupBy`, `initial`, `intersection`, `intersectionBy`, `intersectionWith`,
434
- * `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, `keys`, `keysIn`,
435
- * `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, `memoize`,
436
- * `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, `nthArg`,
437
- * `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, `overEvery`,
438
- * `overSome`, `partial`, `partialRight`, `partition`, `pick`, `pickBy`, `plant`,
439
- * `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, `pullAt`, `push`,
440
- * `range`, `rangeRight`, `rearg`, `reject`, `remove`, `rest`, `reverse`,
441
- * `sampleSize`, `set`, `setWith`, `shuffle`, `slice`, `sort`, `sortBy`,
442
- * `splice`, `spread`, `tail`, `take`, `takeRight`, `takeRightWhile`,
443
- * `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, `toPairs`, `toPairsIn`,
444
- * `toPath`, `toPlainObject`, `transform`, `unary`, `union`, `unionBy`,
445
- * `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, `unshift`, `unzip`,
446
- * `unzipWith`, `values`, `valuesIn`, `without`, `wrap`, `xor`, `xorBy`,
447
- * `xorWith`, `zip`, `zipObject`, `zipObjectDeep`, and `zipWith`
429
+ * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
430
+ * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
431
+ * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
432
+ * `flatten`, `flattenDeep`, `flattenDepth`, `flip`, `flow`, `flowRight`,
433
+ * `fromPairs`, `functions`, `functionsIn`, `groupBy`, `initial`, `intersection`,
434
+ * `intersectionBy`, `intersectionWith`, `invert`, `invertBy`, `invokeMap`,
435
+ * `iteratee`, `keyBy`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`,
436
+ * `matches`, `matchesProperty`, `memoize`, `merge`, `mergeWith`, `method`,
437
+ * `methodOf`, `mixin`, `negate`, `nthArg`, `omit`, `omitBy`, `once`, `orderBy`,
438
+ * `over`, `overArgs`, `overEvery`, `overSome`, `partial`, `partialRight`,
439
+ * `partition`, `pick`, `pickBy`, `plant`, `property`, `propertyOf`, `pull`,
440
+ * `pullAll`, `pullAllBy`, `pullAllWith`, `pullAt`, `push`, `range`,
441
+ * `rangeRight`, `rearg`, `reject`, `remove`, `rest`, `reverse`, `sampleSize`,
442
+ * `set`, `setWith`, `shuffle`, `slice`, `sort`, `sortBy`, `splice`, `spread`,
443
+ * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `tap`, `throttle`,
444
+ * `thru`, `toArray`, `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`,
445
+ * `transform`, `unary`, `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`,
446
+ * `uniqWith`, `unset`, `unshift`, `unzip`, `unzipWith`, `update`, `values`,
447
+ * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, `zipObject`,
448
+ * `zipObjectDeep`, and `zipWith`
448
449
  *
449
450
  * The wrapper methods that are **not** chainable by default are:
450
451
  * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
451
- * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `endsWith`, `eq`,
452
- * `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
453
- * `findLastIndex`, `findLastKey`, `floor`, `forEach`, `forEachRight`, `forIn`,
454
- * `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`,
455
- * `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`,
456
- * `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`,
457
- * `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`,
458
- * `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`,
459
- * `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`,
460
- * `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`,
461
- * `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`,
462
- * `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`,
463
- * `lt`, `lte`, `max`, `maxBy`, `mean`, `min`, `minBy`, `noConflict`, `noop`,
464
- * `now`, `pad`, `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`,
465
- * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `sample`,
466
- * `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`,
467
- * `sortedLastIndex`, `sortedLastIndexBy`, `startCase`, `startsWith`, `subtract`,
468
- * `sum`, `sumBy`, `template`, `times`, `toLower`, `toInteger`, `toLength`,
452
+ * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `each`, `eachRight`,
453
+ * `endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`,
454
+ * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`, `floor`,
455
+ * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`,
456
+ * `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`, `includes`,
457
+ * `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`, `isArrayBuffer`,
458
+ * `isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`, `isDate`,
459
+ * `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`, `isFinite`,
460
+ * `isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`, `isMatchWith`,
461
+ * `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, `isObject`, `isObjectLike`,
462
+ * `isPlainObject`, `isRegExp`, `isSafeInteger`, `isSet`, `isString`,
463
+ * `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`, `join`, `kebabCase`,
464
+ * `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`,
465
+ * `maxBy`, `mean`, `min`, `minBy`, `noConflict`, `noop`, `now`, `pad`,
466
+ * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
467
+ * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
468
+ * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
469
+ * `sortedLastIndexBy`, `startCase`, `startsWith`, `subtract`, `sum`, `sumBy`,
470
+ * `template`, `times`, `toInteger`, `toJSON`, `toLength`, `toLower`,
469
471
  * `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, `trimEnd`,
470
472
  * `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, `upperFirst`,
471
473
  * `value`, and `words`
@@ -765,44 +767,45 @@
765
767
 
766
768
  if (!objIsArr) {
767
769
  objTag = objectToString.call(object);
768
- if (objTag == argsTag) {
769
- objTag = objectTag;
770
- }
770
+ objTag = objTag == argsTag ? objectTag : objTag;
771
771
  }
772
772
  if (!othIsArr) {
773
773
  othTag = objectToString.call(other);
774
- if (othTag == argsTag) {
775
- othTag = objectTag;
776
- }
774
+ othTag = othTag == argsTag ? objectTag : othTag;
777
775
  }
778
776
  var objIsObj = objTag == objectTag && !isHostObject(object),
779
777
  othIsObj = othTag == objectTag && !isHostObject(other),
780
778
  isSameTag = objTag == othTag;
781
779
 
782
- if (isSameTag && !(objIsArr || objIsObj)) {
783
- return equalByTag(object, other, objTag, equalFunc, customizer, bitmask);
780
+ stack || (stack = []);
781
+ var stacked = find(stack, function(entry) {
782
+ return entry[0] === object;
783
+ });
784
+ if (stacked && stacked[1]) {
785
+ return stacked[1] == other;
786
+ }
787
+ stack.push([object, other]);
788
+ if (isSameTag && !objIsObj) {
789
+ var result = (objIsArr || isTypedArray(object))
790
+ ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
791
+ : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
792
+ stack.pop();
793
+ return result;
784
794
  }
785
- var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
786
- if (!isPartial) {
795
+ if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
787
796
  var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
788
797
  othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
789
798
 
790
799
  if (objIsWrapped || othIsWrapped) {
791
- return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, bitmask, stack);
800
+ var result = equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, bitmask, stack);
801
+ stack.pop();
802
+ return result;
792
803
  }
793
804
  }
794
805
  if (!isSameTag) {
795
806
  return false;
796
807
  }
797
- stack || (stack = []);
798
- var stacked = find(stack, function(entry) {
799
- return entry[0] === object;
800
- });
801
- if (stacked && stacked[1]) {
802
- return stacked[1] == other;
803
- }
804
- stack.push([object, other]);
805
- var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, bitmask, stack);
808
+ var result = equalObjects(object, other, equalFunc, customizer, bitmask, stack);
806
809
  stack.pop();
807
810
  return result;
808
811
  }
@@ -1205,9 +1208,9 @@
1205
1208
  * @param {Array} array The array to compare.
1206
1209
  * @param {Array} other The other array to compare.
1207
1210
  * @param {Function} equalFunc The function to determine equivalents of values.
1208
- * @param {Function} [customizer] The function to customize comparisons.
1209
- * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.
1210
- * @param {Object} [stack] Tracks traversed `array` and `other` objects.
1211
+ * @param {Function} customizer The function to customize comparisons.
1212
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details.
1213
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
1211
1214
  * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
1212
1215
  */
1213
1216
  function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
@@ -1263,11 +1266,12 @@
1263
1266
  * @param {Object} other The other object to compare.
1264
1267
  * @param {string} tag The `toStringTag` of the objects to compare.
1265
1268
  * @param {Function} equalFunc The function to determine equivalents of values.
1266
- * @param {Function} [customizer] The function to customize comparisons.
1267
- * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.
1269
+ * @param {Function} customizer The function to customize comparisons.
1270
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details.
1271
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
1268
1272
  * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
1269
1273
  */
1270
- function equalByTag(object, other, tag, equalFunc, customizer, bitmask) {
1274
+ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
1271
1275
  switch (tag) {
1272
1276
 
1273
1277
  case boolTag:
@@ -1301,9 +1305,9 @@
1301
1305
  * @param {Object} object The object to compare.
1302
1306
  * @param {Object} other The other object to compare.
1303
1307
  * @param {Function} equalFunc The function to determine equivalents of values.
1304
- * @param {Function} [customizer] The function to customize comparisons.
1305
- * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.
1306
- * @param {Object} [stack] Tracks traversed `object` and `other` objects.
1308
+ * @param {Function} customizer The function to customize comparisons.
1309
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details.
1310
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
1307
1311
  * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
1308
1312
  */
1309
1313
  function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
@@ -1395,7 +1399,7 @@
1395
1399
  */
1396
1400
  function isPrototype(value) {
1397
1401
  var Ctor = value && value.constructor,
1398
- proto = (isFunction(Ctor) && Ctor.prototype) || objectProto;
1402
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
1399
1403
 
1400
1404
  return value === proto;
1401
1405
  }
@@ -2452,8 +2456,7 @@
2452
2456
  * // => false
2453
2457
  */
2454
2458
  function isArrayLike(value) {
2455
- return value != null &&
2456
- !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));
2459
+ return value != null && isLength(getLength(value)) && !isFunction(value);
2457
2460
  }
2458
2461
 
2459
2462
  /**
@@ -2525,14 +2528,14 @@
2525
2528
  }
2526
2529
 
2527
2530
  /**
2528
- * Checks if `value` is empty. A value is considered empty unless it's an
2529
- * `arguments` object, array, string, or jQuery-like collection with a length
2530
- * greater than `0` or an object with own enumerable properties.
2531
+ * Checks if `value` is an empty collection or object. A value is considered
2532
+ * empty if it's an `arguments` object, array, string, or jQuery-like collection
2533
+ * with a length of `0` or has no own enumerable properties.
2531
2534
  *
2532
2535
  * @static
2533
2536
  * @memberOf _
2534
2537
  * @category Lang
2535
- * @param {Array|Object|string} value The value to inspect.
2538
+ * @param {*} value The value to check.
2536
2539
  * @returns {boolean} Returns `true` if `value` is empty, else `false`.
2537
2540
  * @example
2538
2541
  *
@@ -2642,8 +2645,8 @@
2642
2645
  */
2643
2646
  function isFunction(value) {
2644
2647
  // The use of `Object#toString` avoids issues with the `typeof` operator
2645
- // in Safari 8 which returns 'object' for typed array constructors, and
2646
- // PhantomJS 1.9 which returns 'function' for `NodeList` instances.
2648
+ // in Safari 8 which returns 'object' for typed array and weak map constructors,
2649
+ // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
2647
2650
  var tag = isObject(value) ? objectToString.call(value) : '';
2648
2651
  return tag == funcTag || tag == genTag;
2649
2652
  }
@@ -1,29 +1,29 @@
1
1
  /**
2
2
  * @license
3
- * lodash 4.5.1 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
3
+ * lodash 4.6.1 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
4
4
  * Build: `lodash core -o ./dist/lodash.core.js`
5
5
  */
6
6
  ;(function(){function n(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function t(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===an?i===i:r(i,c)))var c=i,f=o}return f}function r(n,t,r){var e;return r(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0}),e}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return O(t,function(t){return n[t]})}function o(n){return n&&n.Object===Object?n:null}function i(n){return vn[n];
7
- }function c(n){var t=false;if(null!=n&&typeof n.toString!="function")try{t=!!(n+"")}catch(r){}return t}function f(n,t){return n=typeof n=="number"||hn.test(n)?+n:-1,n>-1&&0==n%1&&(null==t?9007199254740991:t)>n}function a(n){if(Y(n)&&!Pn(n)){if(n instanceof l)return n;if(En.call(n,"__wrapped__")){var t=new l(n.__wrapped__,n.__chain__);return t.__actions__=N(n.__actions__),t}}return new l(n)}function l(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function p(n,t,r,e){var u;return(u=n===an)||(u=xn[r],
8
- u=(n===u||n!==n&&u!==u)&&!En.call(e,r)),u?t:n}function s(n){return X(n)?Fn(n):{}}function h(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){n.apply(an,r)},t)}function v(n,t){var r=true;return $n(n,function(n,e,u){return r=!!t(n,e,u)}),r}function y(n,t){var r=[];return $n(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function _(t,r,e,u){u||(u=[]);for(var o=-1,i=t.length;++o<i;){var c=t[o];r>0&&Y(c)&&L(c)&&(e||Pn(c)||K(c))?r>1?_(c,r-1,e,u):n(u,c):e||(u[u.length]=c);
9
- }return u}function g(n,t){return n&&qn(n,t,en)}function b(n,t){return y(t,function(t){return Q(n[t])})}function j(n,t,r,e,u){return n===t?true:null==n||null==t||!X(n)&&!Y(t)?n!==n&&t!==t:m(n,t,j,r,e,u)}function m(n,t,r,e,u,o){var i=Pn(n),f=Pn(t),a="[object Array]",l="[object Array]";i||(a=kn.call(n),"[object Arguments]"==a&&(a="[object Object]")),f||(l=kn.call(t),"[object Arguments]"==l&&(l="[object Object]"));var p="[object Object]"==a&&!c(n),f="[object Object]"==l&&!c(t);return!(l=a==l)||i||p?2&u||(a=p&&En.call(n,"__wrapped__"),
10
- f=f&&En.call(t,"__wrapped__"),!a&&!f)?l?(o||(o=[]),(a=J(o,function(t){return t[0]===n}))&&a[1]?a[1]==t:(o.push([n,t]),t=(i?I:q)(n,t,r,e,u,o),o.pop(),t)):false:r(a?n.value():n,f?t.value():t,e,u,o):$(n,t,a)}function d(n){var t=typeof n;return"function"==t?n:null==n?cn:("object"==t?x:A)(n)}function w(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function O(n,t){var r=-1,e=L(n)?Array(n.length):[];return $n(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function x(n){var t=en(n);return function(r){
11
- var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&j(n[u],r[u],an,3)))return false}return true}}function E(n,t){return n=Object(n),P(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function A(n){return function(t){return null==t?an:t[n]}}function k(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function N(n){return k(n,0,n.length)}function S(n,t){var r;return $n(n,function(n,e,u){return r=t(n,e,u),
12
- !r}),!!r}function T(t,r){return P(r,function(t,r){return r.func.apply(r.thisArg,n([t],r.args))},t)}function F(n,t,r,e){r||(r={});for(var u=-1,o=t.length;++u<o;){var i=t[u],c=e?e(r[i],n[i],i,r,n):n[i],f=r,a=f[i];En.call(f,i)&&(a===c||a!==a&&c!==c)&&(c!==an||i in f)||(f[i]=c)}return r}function R(n){return V(function(t,r){var e=-1,u=r.length,o=u>1?r[u-1]:an,o=typeof o=="function"?(u--,o):an;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function B(n){return function(){var t=arguments,r=s(n.prototype),t=n.apply(r,t);
13
- return X(t)?t:r}}function D(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==wn&&this instanceof e?u:n;++c<f;)a[c]=r[c];for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=B(n);return e}function I(n,t,r,e,u,o){var i=-1,c=1&u,f=n.length,a=t.length;if(f!=a&&!(2&u&&a>f))return false;for(a=true;++i<f;){var l=n[i],p=t[i];if(void 0!==an){a=false;break}if(c){if(!S(t,function(n){return l===n||r(l,n,e,u,o);
14
- })){a=false;break}}else if(l!==p&&!r(l,p,e,u,o)){a=false;break}}return a}function $(n,t,r){switch(r){case"[object Boolean]":case"[object Date]":return+n==+t;case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object Number]":return n!=+n?t!=+t:n==+t;case"[object RegExp]":case"[object String]":return n==t+""}return false}function q(n,t,r,e,u,o){var i=2&u,c=en(n),f=c.length,a=en(t).length;if(f!=a&&!i)return false;for(var l=f;l--;){var p=c[l];if(!(i?p in t:En.call(t,p)))return false}for(a=true;++l<f;){
15
- var p=c[l],s=n[p],h=t[p];if(void 0!==an||s!==h&&!r(s,h,e,u,o)){a=false;break}i||(i="constructor"==p)}return a&&!i&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(a=false)),a}function z(n){var t=n?n.length:an;if(W(t)&&(Pn(n)||nn(n)||K(n))){n=String;for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);t=e}else t=null;return t}function C(n){var t=n&&n.constructor,t=Q(t)&&t.prototype||xn;return n===t}function G(n){
16
- return n?n[0]:an}function J(n,t){return r(n,d(t),$n)}function M(n,t){return $n(n,typeof t=="function"?t:cn)}function P(n,t,r){return e(n,d(t),r,3>arguments.length,$n)}function U(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Un(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=an),r}}function V(n){var t;if(typeof n!="function")throw new TypeError("Expected a function");return t=In(t===an?n.length-1:Un(t),0),function(){for(var r=arguments,e=-1,u=In(r.length-t,0),o=Array(u);++e<u;)o[e]=r[t+e];
17
- for(u=Array(t+1),e=-1;++e<t;)u[e]=r[e];return u[t]=o,n.apply(this,u)}}function H(n,t){return n>t}function K(n){return Y(n)&&L(n)&&En.call(n,"callee")&&(!Rn.call(n,"callee")||"[object Arguments]"==kn.call(n))}function L(n){return null!=n&&!(typeof n=="function"&&Q(n))&&W(zn(n))}function Q(n){return n=X(n)?kn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function W(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n}function X(n){var t=typeof n;return!!n&&("object"==t||"function"==t);
18
- }function Y(n){return!!n&&typeof n=="object"}function Z(n){return typeof n=="number"||Y(n)&&"[object Number]"==kn.call(n)}function nn(n){return typeof n=="string"||!Pn(n)&&Y(n)&&"[object String]"==kn.call(n)}function tn(n,t){return t>n}function rn(n){return typeof n=="string"?n:null==n?"":n+""}function en(n){var t=C(n);if(!t&&!L(n))return Dn(Object(n));var r,e=z(n),u=!!e,e=e||[],o=e.length;for(r in n)!En.call(n,r)||u&&("length"==r||f(r,o))||t&&"constructor"==r||e.push(r);return e}function un(n){for(var t=-1,r=C(n),e=w(n),u=e.length,o=z(n),i=!!o,o=o||[],c=o.length;++t<u;){
19
- var a=e[t];i&&("length"==a||f(a,c))||"constructor"==a&&(r||!En.call(n,a))||o.push(a)}return o}function on(n){return n?u(n,en(n)):[]}function cn(n){return n}function fn(t,r,e){var u=en(r),o=b(r,u);null!=e||X(r)&&(o.length||!u.length)||(e=r,r=t,t=this,o=b(r,en(r)));var i=X(e)&&"chain"in e?e.chain:true,c=Q(t);return $n(o,function(e){var u=r[e];t[e]=u,c&&(t.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=t(this.__wrapped__);return(e.__actions__=N(this.__actions__)).push({func:u,args:arguments,
20
- thisArg:t}),e.__chain__=r,e}return u.apply(t,n([this.value()],arguments))})}),t}var an,ln=1/0,pn=/[&<>"'`]/g,sn=RegExp(pn.source),hn=/^(?:0|[1-9]\d*)$/,vn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},yn={"function":true,object:true},_n=yn[typeof exports]&&exports&&!exports.nodeType?exports:an,gn=yn[typeof module]&&module&&!module.nodeType?module:an,bn=gn&&gn.exports===_n?_n:an,jn=o(yn[typeof self]&&self),mn=o(yn[typeof window]&&window),dn=o(yn[typeof this]&&this),wn=o(_n&&gn&&typeof global=="object"&&global)||mn!==(dn&&dn.window)&&mn||jn||dn||Function("return this")(),On=Array.prototype,xn=Object.prototype,En=xn.hasOwnProperty,An=0,kn=xn.toString,Nn=wn._,Sn=wn.Reflect,Tn=Sn?Sn.f:an,Fn=Object.create,Rn=xn.propertyIsEnumerable,Bn=wn.isFinite,Dn=Object.keys,In=Math.max,$n=function(n,t){
21
- return function(r,e){if(null==r)return r;if(!L(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(g),qn=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}();Tn&&!Rn.call({valueOf:1},"valueOf")&&(w=function(n){n=Tn(n);for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r});var zn=A("length"),Cn=V(function(t,r){return Pn(t)||(t=null==t?[]:[Object(t)]),_(r,1),
22
- n(N(t),on)}),Gn=V(function(n,t,r){return D(n,t,r)}),Jn=V(function(n,t){return h(n,1,t)}),Mn=V(function(n,t,r){return h(n,Vn(t)||0,r)}),Pn=Array.isArray,Un=Number,Vn=Number,Hn=R(function(n,t){F(t,en(t),n)}),Kn=R(function(n,t){F(t,un(t),n)}),Ln=R(function(n,t,r,e){F(t,un(t),n,e)}),Qn=V(function(n){return n.push(an,p),Ln.apply(an,n)}),Wn=V(function(n,t){return null==n?{}:E(n,_(t,1))}),Xn=d;l.prototype=s(a.prototype),l.prototype.constructor=l,a.assignIn=Kn,a.before=U,a.bind=Gn,a.chain=function(n){return n=a(n),
23
- n.__chain__=true,n},a.compact=function(n){return y(n,Boolean)},a.concat=Cn,a.create=function(n,t){var r=s(n);return t?Hn(r,t):r},a.defaults=Qn,a.defer=Jn,a.delay=Mn,a.filter=function(n,t){return y(n,d(t))},a.flatten=function(n){return n&&n.length?_(n,1):[]},a.flattenDeep=function(n){return n&&n.length?_(n,ln):[]},a.iteratee=Xn,a.keys=en,a.map=function(n,t){return O(n,d(t))},a.matches=function(n){return x(Hn({},n))},a.mixin=fn,a.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");
24
- return function(){return!n.apply(this,arguments)}},a.once=function(n){return U(2,n)},a.pick=Wn,a.slice=function(n,t,r){var e=n?n.length:0;return r=r===an?e:+r,e?k(n,null==t?0:+t,r):[]},a.sortBy=function(n,t){var r=0;return t=d(t),O(O(n,function(n,e,u){return{c:n,b:r++,a:t(n,e,u)}}).sort(function(n,t){var r;n:{r=n.a;var e=t.a;if(r!==e){var u=null===r,o=r===an,i=r===r,c=null===e,f=e===an,a=e===e;if(r>e&&!c||!i||u&&!f&&a||o&&a){r=1;break n}if(e>r&&!u||!a||c&&!o&&i||f&&i){r=-1;break n}}r=0}return r||n.b-t.b;
25
- }),A("c"))},a.tap=function(n,t){return t(n),n},a.thru=function(n,t){return t(n)},a.toArray=function(n){return L(n)?n.length?N(n):[]:on(n)},a.values=on,a.extend=Kn,fn(a,a),a.clone=function(n){return X(n)?Pn(n)?N(n):F(n,en(n)):n},a.escape=function(n){return(n=rn(n))&&sn.test(n)?n.replace(pn,i):n},a.every=function(n,t,r){return t=r?an:t,v(n,d(t))},a.find=J,a.forEach=M,a.has=function(n,t){return null!=n&&En.call(n,t)},a.head=G,a.identity=cn,a.indexOf=function(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?In(e+r,0):r:0,
26
- r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1},a.isArguments=K,a.isArray=Pn,a.isBoolean=function(n){return true===n||false===n||Y(n)&&"[object Boolean]"==kn.call(n)},a.isDate=function(n){return Y(n)&&"[object Date]"==kn.call(n)},a.isEmpty=function(n){if(L(n)&&(Pn(n)||nn(n)||Q(n.splice)||K(n)))return!n.length;for(var t in n)if(En.call(n,t))return false;return true},a.isEqual=function(n,t){return j(n,t)},a.isFinite=function(n){return typeof n=="number"&&Bn(n)},a.isFunction=Q,a.isNaN=function(n){
7
+ }function c(n){var t=false;if(null!=n&&typeof n.toString!="function")try{t=!!(n+"")}catch(r){}return t}function f(n,t){return n=typeof n=="number"||hn.test(n)?+n:-1,n>-1&&0==n%1&&(null==t?9007199254740991:t)>n}function a(n){if(Y(n)&&!Pn(n)){if(n instanceof l)return n;if(An.call(n,"__wrapped__")){var t=new l(n.__wrapped__,n.__chain__);return t.__actions__=N(n.__actions__),t}}return new l(n)}function l(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function p(n,t,r,e){var u;return(u=n===an)||(u=xn[r],
8
+ u=(n===u||n!==n&&u!==u)&&!An.call(e,r)),u?t:n}function s(n){return X(n)?Fn(n):{}}function h(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){n.apply(an,r)},t)}function v(n,t){var r=true;return $n(n,function(n,e,u){return r=!!t(n,e,u)}),r}function y(n,t){var r=[];return $n(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function _(t,r,e,u){u||(u=[]);for(var o=-1,i=t.length;++o<i;){var c=t[o];r>0&&Y(c)&&L(c)&&(e||Pn(c)||K(c))?r>1?_(c,r-1,e,u):n(u,c):e||(u[u.length]=c);
9
+ }return u}function b(n,t){return n&&qn(n,t,en)}function g(n,t){return y(t,function(t){return Q(n[t])})}function j(n,t,r,e,u){return n===t?true:null==n||null==t||!X(n)&&!Y(t)?n!==n&&t!==t:d(n,t,j,r,e,u)}function d(n,t,r,e,u,o){var i=Pn(n),f=Pn(t),a="[object Array]",l="[object Array]";i||(a=kn.call(n),a="[object Arguments]"==a?"[object Object]":a),f||(l=kn.call(t),l="[object Arguments]"==l?"[object Object]":l);var p="[object Object]"==a&&!c(n),f="[object Object]"==l&&!c(t),l=a==l;o||(o=[]);var s=J(o,function(t){
10
+ return t[0]===n});return s&&s[1]?s[1]==t:(o.push([n,t]),l&&!p?(t=i||isTypedArray(n)?I(n,t,r,e,u,o):$(n,t,a),o.pop(),t):2&u||(i=p&&An.call(n,"__wrapped__"),a=f&&An.call(t,"__wrapped__"),!i&&!a)?l?(t=q(n,t,r,e,u,o),o.pop(),t):false:(t=r(i?n.value():n,a?t.value():t,e,u,o),o.pop(),t))}function m(n){var t=typeof n;return"function"==t?n:null==n?cn:("object"==t?x:E)(n)}function w(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function O(n,t){var r=-1,e=L(n)?Array(n.length):[];return $n(n,function(n,u,o){
11
+ e[++r]=t(n,u,o)}),e}function x(n){var t=en(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&j(n[u],r[u],an,3)))return false}return true}}function A(n,t){return n=Object(n),P(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function E(n){return function(t){return null==t?an:t[n]}}function k(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function N(n){return k(n,0,n.length);
12
+ }function S(n,t){var r;return $n(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function T(t,r){return P(r,function(t,r){return r.func.apply(r.thisArg,n([t],r.args))},t)}function F(n,t,r,e){r||(r={});for(var u=-1,o=t.length;++u<o;){var i=t[u],c=e?e(r[i],n[i],i,r,n):n[i],f=r,a=f[i];An.call(f,i)&&(a===c||a!==a&&c!==c)&&(c!==an||i in f)||(f[i]=c)}return r}function R(n){return V(function(t,r){var e=-1,u=r.length,o=u>1?r[u-1]:an,o=typeof o=="function"?(u--,o):an;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o);
13
+ }return t})}function B(n){return function(){var t=arguments,r=s(n.prototype),t=n.apply(r,t);return X(t)?t:r}}function D(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==wn&&this instanceof e?u:n;++c<f;)a[c]=r[c];for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=B(n);return e}function I(n,t,r,e,u,o){var i=-1,c=1&u,f=n.length,a=t.length;if(f!=a&&!(2&u&&a>f))return false;for(a=true;++i<f;){
14
+ var l=n[i],p=t[i];if(void 0!==an){a=false;break}if(c){if(!S(t,function(n){return l===n||r(l,n,e,u,o)})){a=false;break}}else if(l!==p&&!r(l,p,e,u,o)){a=false;break}}return a}function $(n,t,r){switch(r){case"[object Boolean]":case"[object Date]":return+n==+t;case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object Number]":return n!=+n?t!=+t:n==+t;case"[object RegExp]":case"[object String]":return n==t+""}return false}function q(n,t,r,e,u,o){var i=2&u,c=en(n),f=c.length,a=en(t).length;if(f!=a&&!i)return false;
15
+ for(var l=f;l--;){var p=c[l];if(!(i?p in t:An.call(t,p)))return false}for(a=true;++l<f;){var p=c[l],s=n[p],h=t[p];if(void 0!==an||s!==h&&!r(s,h,e,u,o)){a=false;break}i||(i="constructor"==p)}return a&&!i&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(a=false)),a}function z(n){var t=n?n.length:an;if(W(t)&&(Pn(n)||nn(n)||K(n))){n=String;for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);t=e}else t=null;return t}
16
+ function C(n){var t=n&&n.constructor;return n===(typeof t=="function"&&t.prototype||xn)}function G(n){return n?n[0]:an}function J(n,t){return r(n,m(t),$n)}function M(n,t){return $n(n,typeof t=="function"?t:cn)}function P(n,t,r){return e(n,m(t),r,3>arguments.length,$n)}function U(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Un(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=an),r}}function V(n){var t;if(typeof n!="function")throw new TypeError("Expected a function");
17
+ return t=In(t===an?n.length-1:Un(t),0),function(){for(var r=arguments,e=-1,u=In(r.length-t,0),o=Array(u);++e<u;)o[e]=r[t+e];for(u=Array(t+1),e=-1;++e<t;)u[e]=r[e];return u[t]=o,n.apply(this,u)}}function H(n,t){return n>t}function K(n){return Y(n)&&L(n)&&An.call(n,"callee")&&(!Rn.call(n,"callee")||"[object Arguments]"==kn.call(n))}function L(n){return null!=n&&W(zn(n))&&!Q(n)}function Q(n){return n=X(n)?kn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function W(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n;
18
+ }function X(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function Y(n){return!!n&&typeof n=="object"}function Z(n){return typeof n=="number"||Y(n)&&"[object Number]"==kn.call(n)}function nn(n){return typeof n=="string"||!Pn(n)&&Y(n)&&"[object String]"==kn.call(n)}function tn(n,t){return t>n}function rn(n){return typeof n=="string"?n:null==n?"":n+""}function en(n){var t=C(n);if(!t&&!L(n))return Dn(Object(n));var r,e=z(n),u=!!e,e=e||[],o=e.length;for(r in n)!An.call(n,r)||u&&("length"==r||f(r,o))||t&&"constructor"==r||e.push(r);
19
+ return e}function un(n){for(var t=-1,r=C(n),e=w(n),u=e.length,o=z(n),i=!!o,o=o||[],c=o.length;++t<u;){var a=e[t];i&&("length"==a||f(a,c))||"constructor"==a&&(r||!An.call(n,a))||o.push(a)}return o}function on(n){return n?u(n,en(n)):[]}function cn(n){return n}function fn(t,r,e){var u=en(r),o=g(r,u);null!=e||X(r)&&(o.length||!u.length)||(e=r,r=t,t=this,o=g(r,en(r)));var i=X(e)&&"chain"in e?e.chain:true,c=Q(t);return $n(o,function(e){var u=r[e];t[e]=u,c&&(t.prototype[e]=function(){var r=this.__chain__;if(i||r){
20
+ var e=t(this.__wrapped__);return(e.__actions__=N(this.__actions__)).push({func:u,args:arguments,thisArg:t}),e.__chain__=r,e}return u.apply(t,n([this.value()],arguments))})}),t}var an,ln=1/0,pn=/[&<>"'`]/g,sn=RegExp(pn.source),hn=/^(?:0|[1-9]\d*)$/,vn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},yn={"function":true,object:true},_n=yn[typeof exports]&&exports&&!exports.nodeType?exports:an,bn=yn[typeof module]&&module&&!module.nodeType?module:an,gn=bn&&bn.exports===_n?_n:an,jn=o(yn[typeof self]&&self),dn=o(yn[typeof window]&&window),mn=o(yn[typeof this]&&this),wn=o(_n&&bn&&typeof global=="object"&&global)||dn!==(mn&&mn.window)&&dn||jn||mn||Function("return this")(),On=Array.prototype,xn=Object.prototype,An=xn.hasOwnProperty,En=0,kn=xn.toString,Nn=wn._,Sn=wn.Reflect,Tn=Sn?Sn.f:an,Fn=Object.create,Rn=xn.propertyIsEnumerable,Bn=wn.isFinite,Dn=Object.keys,In=Math.max,$n=function(n,t){
21
+ return function(r,e){if(null==r)return r;if(!L(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(b),qn=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}();Tn&&!Rn.call({valueOf:1},"valueOf")&&(w=function(n){n=Tn(n);for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r});var zn=E("length"),Cn=V(function(t,r){return Pn(t)||(t=null==t?[]:[Object(t)]),_(r,1),
22
+ n(N(t),on)}),Gn=V(function(n,t,r){return D(n,t,r)}),Jn=V(function(n,t){return h(n,1,t)}),Mn=V(function(n,t,r){return h(n,Vn(t)||0,r)}),Pn=Array.isArray,Un=Number,Vn=Number,Hn=R(function(n,t){F(t,en(t),n)}),Kn=R(function(n,t){F(t,un(t),n)}),Ln=R(function(n,t,r,e){F(t,un(t),n,e)}),Qn=V(function(n){return n.push(an,p),Ln.apply(an,n)}),Wn=V(function(n,t){return null==n?{}:A(n,_(t,1))}),Xn=m;l.prototype=s(a.prototype),l.prototype.constructor=l,a.assignIn=Kn,a.before=U,a.bind=Gn,a.chain=function(n){return n=a(n),
23
+ n.__chain__=true,n},a.compact=function(n){return y(n,Boolean)},a.concat=Cn,a.create=function(n,t){var r=s(n);return t?Hn(r,t):r},a.defaults=Qn,a.defer=Jn,a.delay=Mn,a.filter=function(n,t){return y(n,m(t))},a.flatten=function(n){return n&&n.length?_(n,1):[]},a.flattenDeep=function(n){return n&&n.length?_(n,ln):[]},a.iteratee=Xn,a.keys=en,a.map=function(n,t){return O(n,m(t))},a.matches=function(n){return x(Hn({},n))},a.mixin=fn,a.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");
24
+ return function(){return!n.apply(this,arguments)}},a.once=function(n){return U(2,n)},a.pick=Wn,a.slice=function(n,t,r){var e=n?n.length:0;return r=r===an?e:+r,e?k(n,null==t?0:+t,r):[]},a.sortBy=function(n,t){var r=0;return t=m(t),O(O(n,function(n,e,u){return{c:n,b:r++,a:t(n,e,u)}}).sort(function(n,t){var r;n:{r=n.a;var e=t.a;if(r!==e){var u=null===r,o=r===an,i=r===r,c=null===e,f=e===an,a=e===e;if(r>e&&!c||!i||u&&!f&&a||o&&a){r=1;break n}if(e>r&&!u||!a||c&&!o&&i||f&&i){r=-1;break n}}r=0}return r||n.b-t.b;
25
+ }),E("c"))},a.tap=function(n,t){return t(n),n},a.thru=function(n,t){return t(n)},a.toArray=function(n){return L(n)?n.length?N(n):[]:on(n)},a.values=on,a.extend=Kn,fn(a,a),a.clone=function(n){return X(n)?Pn(n)?N(n):F(n,en(n)):n},a.escape=function(n){return(n=rn(n))&&sn.test(n)?n.replace(pn,i):n},a.every=function(n,t,r){return t=r?an:t,v(n,m(t))},a.find=J,a.forEach=M,a.has=function(n,t){return null!=n&&An.call(n,t)},a.head=G,a.identity=cn,a.indexOf=function(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?In(e+r,0):r:0,
26
+ r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1},a.isArguments=K,a.isArray=Pn,a.isBoolean=function(n){return true===n||false===n||Y(n)&&"[object Boolean]"==kn.call(n)},a.isDate=function(n){return Y(n)&&"[object Date]"==kn.call(n)},a.isEmpty=function(n){if(L(n)&&(Pn(n)||nn(n)||Q(n.splice)||K(n)))return!n.length;for(var t in n)if(An.call(n,t))return false;return true},a.isEqual=function(n,t){return j(n,t)},a.isFinite=function(n){return typeof n=="number"&&Bn(n)},a.isFunction=Q,a.isNaN=function(n){
27
27
  return Z(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=Z,a.isObject=X,a.isRegExp=function(n){return X(n)&&"[object RegExp]"==kn.call(n)},a.isString=nn,a.isUndefined=function(n){return n===an},a.last=function(n){var t=n?n.length:0;return t?n[t-1]:an},a.max=function(n){return n&&n.length?t(n,cn,H):an},a.min=function(n){return n&&n.length?t(n,cn,tn):an},a.noConflict=function(){return wn._===this&&(wn._=Nn),this},a.noop=function(){},a.reduce=P,a.result=function(n,t,r){return t=null==n?an:n[t],
28
- t===an&&(t=r),Q(t)?t.call(n):t},a.size=function(n){return null==n?0:(n=L(n)?n:en(n),n.length)},a.some=function(n,t,r){return t=r?an:t,S(n,d(t))},a.uniqueId=function(n){var t=++An;return rn(n)+t},a.each=M,a.first=G,fn(a,function(){var n={};return g(a,function(t,r){En.call(a.prototype,r)||(n[r]=t)}),n}(),{chain:false}),a.VERSION="4.5.1",$n("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:On)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);
29
- a.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=function(){return T(this.__wrapped__,this.__actions__)},(mn||jn||{})._=a,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return a}):_n&&gn?(bn&&((gn.exports=a)._=a),_n._=a):wn._=a}).call(this);
28
+ t===an&&(t=r),Q(t)?t.call(n):t},a.size=function(n){return null==n?0:(n=L(n)?n:en(n),n.length)},a.some=function(n,t,r){return t=r?an:t,S(n,m(t))},a.uniqueId=function(n){var t=++En;return rn(n)+t},a.each=M,a.first=G,fn(a,function(){var n={};return b(a,function(t,r){An.call(a.prototype,r)||(n[r]=t)}),n}(),{chain:false}),a.VERSION="4.6.1",$n("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:On)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);
29
+ a.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=function(){return T(this.__wrapped__,this.__actions__)},(dn||jn||{})._=a,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return a}):_n&&bn?(gn&&((bn.exports=a)._=a),_n._=a):wn._=a}).call(this);
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * lodash 4.5.1 (Custom Build) <https://lodash.com/>
3
+ * lodash 4.6.1 (Custom Build) <https://lodash.com/>
4
4
  * Build: `lodash -o ./dist/lodash.js`
5
5
  * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
6
6
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@@ -13,7 +13,19 @@
13
13
  var undefined;
14
14
 
15
15
  /** Used as the semantic version number. */
16
- var VERSION = '4.5.1';
16
+ var VERSION = '4.6.1';
17
+
18
+ /** Used as the size to enable large array optimizations. */
19
+ var LARGE_ARRAY_SIZE = 200;
20
+
21
+ /** Used as the `TypeError` message for "Functions" methods. */
22
+ var FUNC_ERROR_TEXT = 'Expected a function';
23
+
24
+ /** Used to stand-in for `undefined` hash values. */
25
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
26
+
27
+ /** Used as the internal argument placeholder. */
28
+ var PLACEHOLDER = '__lodash_placeholder__';
17
29
 
18
30
  /** Used to compose bitmasks for wrapper metadata. */
19
31
  var BIND_FLAG = 1,
@@ -39,20 +51,11 @@
39
51
  var HOT_COUNT = 150,
40
52
  HOT_SPAN = 16;
41
53
 
42
- /** Used as the size to enable large array optimizations. */
43
- var LARGE_ARRAY_SIZE = 200;
44
-
45
54
  /** Used to indicate the type of lazy iteratees. */
46
55
  var LAZY_FILTER_FLAG = 1,
47
56
  LAZY_MAP_FLAG = 2,
48
57
  LAZY_WHILE_FLAG = 3;
49
58
 
50
- /** Used as the `TypeError` message for "Functions" methods. */
51
- var FUNC_ERROR_TEXT = 'Expected a function';
52
-
53
- /** Used to stand-in for `undefined` hash values. */
54
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
55
-
56
59
  /** Used as references for various `Number` constants. */
57
60
  var INFINITY = 1 / 0,
58
61
  MAX_SAFE_INTEGER = 9007199254740991,
@@ -64,9 +67,6 @@
64
67
  MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
65
68
  HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
66
69
 
67
- /** Used as the internal argument placeholder. */
68
- var PLACEHOLDER = '__lodash_placeholder__';
69
-
70
70
  /** `Object#toString` result references. */
71
71
  var argsTag = '[object Arguments]',
72
72
  arrayTag = '[object Array]',
@@ -382,6 +382,7 @@
382
382
  * @returns {Object} Returns `map`.
383
383
  */
384
384
  function addMapEntry(map, pair) {
385
+ // Don't return `Map#set` because it doesn't return the map instance in IE 11.
385
386
  map.set(pair[0], pair[1]);
386
387
  return map;
387
388
  }
@@ -539,13 +540,13 @@
539
540
  function arrayFilter(array, predicate) {
540
541
  var index = -1,
541
542
  length = array.length,
542
- resIndex = -1,
543
+ resIndex = 0,
543
544
  result = [];
544
545
 
545
546
  while (++index < length) {
546
547
  var value = array[index];
547
548
  if (predicate(value, index, array)) {
548
- result[++resIndex] = value;
549
+ result[resIndex++] = value;
549
550
  }
550
551
  }
551
552
  return result;
@@ -565,8 +566,7 @@
565
566
  }
566
567
 
567
568
  /**
568
- * A specialized version of `_.includesWith` for arrays without support for
569
- * specifying an index to search from.
569
+ * This function is like `arrayIncludes` except that it accepts a comparator.
570
570
  *
571
571
  * @private
572
572
  * @param {Array} array The array to search.
@@ -790,6 +790,28 @@
790
790
  return -1;
791
791
  }
792
792
 
793
+ /**
794
+ * This function is like `baseIndexOf` except that it accepts a comparator.
795
+ *
796
+ * @private
797
+ * @param {Array} array The array to search.
798
+ * @param {*} value The value to search for.
799
+ * @param {number} fromIndex The index to search from.
800
+ * @param {Function} comparator The comparator invoked per element.
801
+ * @returns {number} Returns the index of the matched value, else `-1`.
802
+ */
803
+ function baseIndexOfWith(array, value, fromIndex, comparator) {
804
+ var index = fromIndex - 1,
805
+ length = array.length;
806
+
807
+ while (++index < length) {
808
+ if (comparator(array[index], value)) {
809
+ return index;
810
+ }
811
+ }
812
+ return -1;
813
+ }
814
+
793
815
  /**
794
816
  * The base implementation of `_.reduce` and `_.reduceRight`, without support
795
817
  * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
@@ -812,9 +834,9 @@
812
834
  }
813
835
 
814
836
  /**
815
- * The base implementation of `_.sortBy` which uses `comparer` to define
816
- * the sort order of `array` and replaces criteria objects with their
817
- * corresponding values.
837
+ * The base implementation of `_.sortBy` which uses `comparer` to define the
838
+ * sort order of `array` and replaces criteria objects with their corresponding
839
+ * values.
818
840
  *
819
841
  * @private
820
842
  * @param {Array} array The array to sort.
@@ -1187,14 +1209,14 @@
1187
1209
  function replaceHolders(array, placeholder) {
1188
1210
  var index = -1,
1189
1211
  length = array.length,
1190
- resIndex = -1,
1212
+ resIndex = 0,
1191
1213
  result = [];
1192
1214
 
1193
1215
  while (++index < length) {
1194
1216
  var value = array[index];
1195
1217
  if (value === placeholder || value === PLACEHOLDER) {
1196
1218
  array[index] = PLACEHOLDER;
1197
- result[++resIndex] = index;
1219
+ result[resIndex++] = index;
1198
1220
  }
1199
1221
  }
1200
1222
  return result;
@@ -1371,6 +1393,12 @@
1371
1393
  /** Used to store function metadata. */
1372
1394
  var metaMap = WeakMap && new WeakMap;
1373
1395
 
1396
+ /** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */
1397
+ var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');
1398
+
1399
+ /** Used to lookup unminified function names. */
1400
+ var realNames = {};
1401
+
1374
1402
  /** Used to detect maps, sets, and weakmaps. */
1375
1403
  var mapCtorString = Map ? funcToString.call(Map) : '',
1376
1404
  setCtorString = Set ? funcToString.call(Set) : '',
@@ -1378,11 +1406,8 @@
1378
1406
 
1379
1407
  /** Used to convert symbols to primitives and strings. */
1380
1408
  var symbolProto = Symbol ? Symbol.prototype : undefined,
1381
- symbolValueOf = Symbol ? symbolProto.valueOf : undefined,
1382
- symbolToString = Symbol ? symbolProto.toString : undefined;
1383
-
1384
- /** Used to lookup unminified function names. */
1385
- var realNames = {};
1409
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
1410
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
1386
1411
 
1387
1412
  /*------------------------------------------------------------------------*/
1388
1413
 
@@ -1428,46 +1453,48 @@
1428
1453
  * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
1429
1454
  * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
1430
1455
  * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
1431
- * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, `difference`,
1432
- * `differenceBy`, `differenceWith`, `drop`, `dropRight`, `dropRightWhile`,
1433
- * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flattenDepth`,
1434
- * `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, `functionsIn`,
1435
- * `groupBy`, `initial`, `intersection`, `intersectionBy`, `intersectionWith`,
1436
- * `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, `keys`, `keysIn`,
1437
- * `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, `memoize`,
1438
- * `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, `nthArg`,
1439
- * `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, `overEvery`,
1440
- * `overSome`, `partial`, `partialRight`, `partition`, `pick`, `pickBy`, `plant`,
1441
- * `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, `pullAt`, `push`,
1442
- * `range`, `rangeRight`, `rearg`, `reject`, `remove`, `rest`, `reverse`,
1443
- * `sampleSize`, `set`, `setWith`, `shuffle`, `slice`, `sort`, `sortBy`,
1444
- * `splice`, `spread`, `tail`, `take`, `takeRight`, `takeRightWhile`,
1445
- * `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, `toPairs`, `toPairsIn`,
1446
- * `toPath`, `toPlainObject`, `transform`, `unary`, `union`, `unionBy`,
1447
- * `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, `unshift`, `unzip`,
1448
- * `unzipWith`, `values`, `valuesIn`, `without`, `wrap`, `xor`, `xorBy`,
1449
- * `xorWith`, `zip`, `zipObject`, `zipObjectDeep`, and `zipWith`
1456
+ * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
1457
+ * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
1458
+ * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
1459
+ * `flatten`, `flattenDeep`, `flattenDepth`, `flip`, `flow`, `flowRight`,
1460
+ * `fromPairs`, `functions`, `functionsIn`, `groupBy`, `initial`, `intersection`,
1461
+ * `intersectionBy`, `intersectionWith`, `invert`, `invertBy`, `invokeMap`,
1462
+ * `iteratee`, `keyBy`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`,
1463
+ * `matches`, `matchesProperty`, `memoize`, `merge`, `mergeWith`, `method`,
1464
+ * `methodOf`, `mixin`, `negate`, `nthArg`, `omit`, `omitBy`, `once`, `orderBy`,
1465
+ * `over`, `overArgs`, `overEvery`, `overSome`, `partial`, `partialRight`,
1466
+ * `partition`, `pick`, `pickBy`, `plant`, `property`, `propertyOf`, `pull`,
1467
+ * `pullAll`, `pullAllBy`, `pullAllWith`, `pullAt`, `push`, `range`,
1468
+ * `rangeRight`, `rearg`, `reject`, `remove`, `rest`, `reverse`, `sampleSize`,
1469
+ * `set`, `setWith`, `shuffle`, `slice`, `sort`, `sortBy`, `splice`, `spread`,
1470
+ * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `tap`, `throttle`,
1471
+ * `thru`, `toArray`, `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`,
1472
+ * `transform`, `unary`, `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`,
1473
+ * `uniqWith`, `unset`, `unshift`, `unzip`, `unzipWith`, `update`, `values`,
1474
+ * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, `zipObject`,
1475
+ * `zipObjectDeep`, and `zipWith`
1450
1476
  *
1451
1477
  * The wrapper methods that are **not** chainable by default are:
1452
1478
  * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
1453
- * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `endsWith`, `eq`,
1454
- * `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
1455
- * `findLastIndex`, `findLastKey`, `floor`, `forEach`, `forEachRight`, `forIn`,
1456
- * `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`,
1457
- * `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`,
1458
- * `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`,
1459
- * `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`,
1460
- * `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`,
1461
- * `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`,
1462
- * `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`,
1463
- * `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`,
1464
- * `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`,
1465
- * `lt`, `lte`, `max`, `maxBy`, `mean`, `min`, `minBy`, `noConflict`, `noop`,
1466
- * `now`, `pad`, `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`,
1467
- * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `sample`,
1468
- * `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`,
1469
- * `sortedLastIndex`, `sortedLastIndexBy`, `startCase`, `startsWith`, `subtract`,
1470
- * `sum`, `sumBy`, `template`, `times`, `toLower`, `toInteger`, `toLength`,
1479
+ * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `each`, `eachRight`,
1480
+ * `endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`,
1481
+ * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`, `floor`,
1482
+ * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`,
1483
+ * `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`, `includes`,
1484
+ * `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`, `isArrayBuffer`,
1485
+ * `isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`, `isDate`,
1486
+ * `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`, `isFinite`,
1487
+ * `isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`, `isMatchWith`,
1488
+ * `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, `isObject`, `isObjectLike`,
1489
+ * `isPlainObject`, `isRegExp`, `isSafeInteger`, `isSet`, `isString`,
1490
+ * `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`, `join`, `kebabCase`,
1491
+ * `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`,
1492
+ * `maxBy`, `mean`, `min`, `minBy`, `noConflict`, `noop`, `now`, `pad`,
1493
+ * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
1494
+ * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
1495
+ * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
1496
+ * `sortedLastIndexBy`, `startCase`, `startsWith`, `subtract`, `sum`, `sumBy`,
1497
+ * `template`, `times`, `toInteger`, `toJSON`, `toLength`, `toLower`,
1471
1498
  * `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, `trimEnd`,
1472
1499
  * `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, `upperFirst`,
1473
1500
  * `value`, and `words`
@@ -2156,7 +2183,8 @@
2156
2183
  }
2157
2184
 
2158
2185
  /**
2159
- * This function is like `assignValue` except that it doesn't assign `undefined` values.
2186
+ * This function is like `assignValue` except that it doesn't assign
2187
+ * `undefined` values.
2160
2188
  *
2161
2189
  * @private
2162
2190
  * @param {Object} object The object to modify.
@@ -2300,13 +2328,14 @@
2300
2328
  * @private
2301
2329
  * @param {*} value The value to clone.
2302
2330
  * @param {boolean} [isDeep] Specify a deep clone.
2331
+ * @param {boolean} [isFull] Specify a clone including symbols.
2303
2332
  * @param {Function} [customizer] The function to customize cloning.
2304
2333
  * @param {string} [key] The key of `value`.
2305
2334
  * @param {Object} [object] The parent object of `value`.
2306
2335
  * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
2307
2336
  * @returns {*} Returns the cloned value.
2308
2337
  */
2309
- function baseClone(value, isDeep, customizer, key, object, stack) {
2338
+ function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
2310
2339
  var result;
2311
2340
  if (customizer) {
2312
2341
  result = object ? customizer(value, key, object, stack) : customizer(value);
@@ -2336,7 +2365,8 @@
2336
2365
  }
2337
2366
  result = initCloneObject(isFunc ? {} : value);
2338
2367
  if (!isDeep) {
2339
- return copySymbols(value, baseAssign(result, value));
2368
+ result = baseAssign(result, value);
2369
+ return isFull ? copySymbols(value, result) : result;
2340
2370
  }
2341
2371
  } else {
2342
2372
  if (!cloneableTags[tag]) {
@@ -2355,9 +2385,9 @@
2355
2385
 
2356
2386
  // Recursively populate clone (susceptible to call stack limits).
2357
2387
  (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {
2358
- assignValue(result, key, baseClone(subValue, isDeep, customizer, key, value, stack));
2388
+ assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
2359
2389
  });
2360
- return isArr ? result : copySymbols(value, result);
2390
+ return (isFull && !isArr) ? copySymbols(value, result) : result;
2361
2391
  }
2362
2392
 
2363
2393
  /**
@@ -2739,9 +2769,11 @@
2739
2769
  */
2740
2770
  function baseIntersection(arrays, iteratee, comparator) {
2741
2771
  var includes = comparator ? arrayIncludesWith : arrayIncludes,
2772
+ length = arrays[0].length,
2742
2773
  othLength = arrays.length,
2743
2774
  othIndex = othLength,
2744
2775
  caches = Array(othLength),
2776
+ maxLength = Infinity,
2745
2777
  result = [];
2746
2778
 
2747
2779
  while (othIndex--) {
@@ -2749,18 +2781,18 @@
2749
2781
  if (othIndex && iteratee) {
2750
2782
  array = arrayMap(array, baseUnary(iteratee));
2751
2783
  }
2752
- caches[othIndex] = !comparator && (iteratee || array.length >= 120)
2784
+ maxLength = nativeMin(array.length, maxLength);
2785
+ caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
2753
2786
  ? new SetCache(othIndex && array)
2754
2787
  : undefined;
2755
2788
  }
2756
2789
  array = arrays[0];
2757
2790
 
2758
2791
  var index = -1,
2759
- length = array.length,
2760
2792
  seen = caches[0];
2761
2793
 
2762
2794
  outer:
2763
- while (++index < length) {
2795
+ while (++index < length && result.length < maxLength) {
2764
2796
  var value = array[index],
2765
2797
  computed = iteratee ? iteratee(value) : value;
2766
2798
 
@@ -2768,7 +2800,7 @@
2768
2800
  ? cacheHas(seen, computed)
2769
2801
  : includes(result, computed, comparator)
2770
2802
  )) {
2771
- var othIndex = othLength;
2803
+ othIndex = othLength;
2772
2804
  while (--othIndex) {
2773
2805
  var cache = caches[othIndex];
2774
2806
  if (!(cache
@@ -2872,33 +2904,28 @@
2872
2904
 
2873
2905
  if (!objIsArr) {
2874
2906
  objTag = getTag(object);
2875
- if (objTag == argsTag) {
2876
- objTag = objectTag;
2877
- } else if (objTag != objectTag) {
2878
- objIsArr = isTypedArray(object);
2879
- }
2907
+ objTag = objTag == argsTag ? objectTag : objTag;
2880
2908
  }
2881
2909
  if (!othIsArr) {
2882
2910
  othTag = getTag(other);
2883
- if (othTag == argsTag) {
2884
- othTag = objectTag;
2885
- } else if (othTag != objectTag) {
2886
- othIsArr = isTypedArray(other);
2887
- }
2911
+ othTag = othTag == argsTag ? objectTag : othTag;
2888
2912
  }
2889
2913
  var objIsObj = objTag == objectTag && !isHostObject(object),
2890
2914
  othIsObj = othTag == objectTag && !isHostObject(other),
2891
2915
  isSameTag = objTag == othTag;
2892
2916
 
2893
- if (isSameTag && !(objIsArr || objIsObj)) {
2894
- return equalByTag(object, other, objTag, equalFunc, customizer, bitmask);
2917
+ if (isSameTag && !objIsObj) {
2918
+ stack || (stack = new Stack);
2919
+ return (objIsArr || isTypedArray(object))
2920
+ ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
2921
+ : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
2895
2922
  }
2896
- var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
2897
- if (!isPartial) {
2923
+ if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
2898
2924
  var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
2899
2925
  othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
2900
2926
 
2901
2927
  if (objIsWrapped || othIsWrapped) {
2928
+ stack || (stack = new Stack);
2902
2929
  return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, bitmask, stack);
2903
2930
  }
2904
2931
  }
@@ -2906,7 +2933,7 @@
2906
2933
  return false;
2907
2934
  }
2908
2935
  stack || (stack = new Stack);
2909
- return (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, bitmask, stack);
2936
+ return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
2910
2937
  }
2911
2938
 
2912
2939
  /**
@@ -3163,7 +3190,7 @@
3163
3190
  }
3164
3191
  else {
3165
3192
  isCommon = false;
3166
- newValue = baseClone(srcValue, true);
3193
+ newValue = baseClone(srcValue, !customizer);
3167
3194
  }
3168
3195
  }
3169
3196
  else if (isPlainObject(srcValue) || isArguments(srcValue)) {
@@ -3172,7 +3199,7 @@
3172
3199
  }
3173
3200
  else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
3174
3201
  isCommon = false;
3175
- newValue = baseClone(srcValue, true);
3202
+ newValue = baseClone(srcValue, !customizer);
3176
3203
  }
3177
3204
  else {
3178
3205
  newValue = objValue;
@@ -3188,6 +3215,7 @@
3188
3215
  // Recursively merge objects and arrays (susceptible to call stack limits).
3189
3216
  mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
3190
3217
  }
3218
+ stack['delete'](srcValue);
3191
3219
  assignMergeValue(object, key, newValue);
3192
3220
  }
3193
3221
 
@@ -3201,12 +3229,8 @@
3201
3229
  * @returns {Array} Returns the new sorted array.
3202
3230
  */
3203
3231
  function baseOrderBy(collection, iteratees, orders) {
3204
- var index = -1,
3205
- toIteratee = getIteratee();
3206
-
3207
- iteratees = arrayMap(iteratees.length ? iteratees : Array(1), function(iteratee) {
3208
- return toIteratee(iteratee);
3209
- });
3232
+ var index = -1;
3233
+ iteratees = arrayMap(iteratees.length ? iteratees : Array(1), getIteratee());
3210
3234
 
3211
3235
  var result = baseMap(collection, function(value, key, collection) {
3212
3236
  var criteria = arrayMap(iteratees, function(iteratee) {
@@ -3283,18 +3307,6 @@
3283
3307
  };
3284
3308
  }
3285
3309
 
3286
- /**
3287
- * The base implementation of `_.pullAll`.
3288
- *
3289
- * @private
3290
- * @param {Array} array The array to modify.
3291
- * @param {Array} values The values to remove.
3292
- * @returns {Array} Returns `array`.
3293
- */
3294
- function basePullAll(array, values) {
3295
- return basePullAllBy(array, values);
3296
- }
3297
-
3298
3310
  /**
3299
3311
  * The base implementation of `_.pullAllBy` without support for iteratee
3300
3312
  * shorthands.
@@ -3303,22 +3315,24 @@
3303
3315
  * @param {Array} array The array to modify.
3304
3316
  * @param {Array} values The values to remove.
3305
3317
  * @param {Function} [iteratee] The iteratee invoked per element.
3318
+ * @param {Function} [comparator] The comparator invoked per element.
3306
3319
  * @returns {Array} Returns `array`.
3307
3320
  */
3308
- function basePullAllBy(array, values, iteratee) {
3309
- var index = -1,
3321
+ function basePullAll(array, values, iteratee, comparator) {
3322
+ var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
3323
+ index = -1,
3310
3324
  length = values.length,
3311
3325
  seen = array;
3312
3326
 
3313
3327
  if (iteratee) {
3314
- seen = arrayMap(array, function(value) { return iteratee(value); });
3328
+ seen = arrayMap(array, baseUnary(iteratee));
3315
3329
  }
3316
3330
  while (++index < length) {
3317
3331
  var fromIndex = 0,
3318
3332
  value = values[index],
3319
3333
  computed = iteratee ? iteratee(value) : value;
3320
3334
 
3321
- while ((fromIndex = baseIndexOf(seen, computed, fromIndex)) > -1) {
3335
+ while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
3322
3336
  if (seen !== array) {
3323
3337
  splice.call(seen, fromIndex, 1);
3324
3338
  }
@@ -3604,7 +3618,7 @@
3604
3618
  value = array[0],
3605
3619
  computed = iteratee ? iteratee(value) : value,
3606
3620
  seen = computed,
3607
- resIndex = 0,
3621
+ resIndex = 1,
3608
3622
  result = [value];
3609
3623
 
3610
3624
  while (++index < length) {
@@ -3613,7 +3627,7 @@
3613
3627
 
3614
3628
  if (!eq(computed, seen)) {
3615
3629
  seen = computed;
3616
- result[++resIndex] = value;
3630
+ result[resIndex++] = value;
3617
3631
  }
3618
3632
  }
3619
3633
  return result;
@@ -3694,6 +3708,20 @@
3694
3708
  return (object != null && has(object, key)) ? delete object[key] : true;
3695
3709
  }
3696
3710
 
3711
+ /**
3712
+ * The base implementation of `_.update`.
3713
+ *
3714
+ * @private
3715
+ * @param {Object} object The object to query.
3716
+ * @param {Array|string} path The path of the property to update.
3717
+ * @param {Function} updater The function to produce the updated value.
3718
+ * @param {Function} [customizer] The function to customize path creation.
3719
+ * @returns {Object} Returns `object`.
3720
+ */
3721
+ function baseUpdate(object, path, updater, customizer) {
3722
+ return baseSet(object, path, updater(baseGet(object, path)), customizer);
3723
+ }
3724
+
3697
3725
  /**
3698
3726
  * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
3699
3727
  * without support for iteratee shorthands.
@@ -3795,9 +3823,7 @@
3795
3823
  if (isDeep) {
3796
3824
  return buffer.slice();
3797
3825
  }
3798
- var Ctor = buffer.constructor,
3799
- result = new Ctor(buffer.length);
3800
-
3826
+ var result = new buffer.constructor(buffer.length);
3801
3827
  buffer.copy(result);
3802
3828
  return result;
3803
3829
  }
@@ -3810,11 +3836,8 @@
3810
3836
  * @returns {ArrayBuffer} Returns the cloned array buffer.
3811
3837
  */
3812
3838
  function cloneArrayBuffer(arrayBuffer) {
3813
- var Ctor = arrayBuffer.constructor,
3814
- result = new Ctor(arrayBuffer.byteLength),
3815
- view = new Uint8Array(result);
3816
-
3817
- view.set(new Uint8Array(arrayBuffer));
3839
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
3840
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
3818
3841
  return result;
3819
3842
  }
3820
3843
 
@@ -3826,8 +3849,7 @@
3826
3849
  * @returns {Object} Returns the cloned map.
3827
3850
  */
3828
3851
  function cloneMap(map) {
3829
- var Ctor = map.constructor;
3830
- return arrayReduce(mapToArray(map), addMapEntry, new Ctor);
3852
+ return arrayReduce(mapToArray(map), addMapEntry, new map.constructor);
3831
3853
  }
3832
3854
 
3833
3855
  /**
@@ -3838,9 +3860,7 @@
3838
3860
  * @returns {Object} Returns the cloned regexp.
3839
3861
  */
3840
3862
  function cloneRegExp(regexp) {
3841
- var Ctor = regexp.constructor,
3842
- result = new Ctor(regexp.source, reFlags.exec(regexp));
3843
-
3863
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
3844
3864
  result.lastIndex = regexp.lastIndex;
3845
3865
  return result;
3846
3866
  }
@@ -3853,8 +3873,7 @@
3853
3873
  * @returns {Object} Returns the cloned set.
3854
3874
  */
3855
3875
  function cloneSet(set) {
3856
- var Ctor = set.constructor;
3857
- return arrayReduce(setToArray(set), addSetEntry, new Ctor);
3876
+ return arrayReduce(setToArray(set), addSetEntry, new set.constructor);
3858
3877
  }
3859
3878
 
3860
3879
  /**
@@ -3865,7 +3884,7 @@
3865
3884
  * @returns {Object} Returns the cloned symbol object.
3866
3885
  */
3867
3886
  function cloneSymbol(symbol) {
3868
- return Symbol ? Object(symbolValueOf.call(symbol)) : {};
3887
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
3869
3888
  }
3870
3889
 
3871
3890
  /**
@@ -3877,11 +3896,8 @@
3877
3896
  * @returns {Object} Returns the cloned typed array.
3878
3897
  */
3879
3898
  function cloneTypedArray(typedArray, isDeep) {
3880
- var arrayBuffer = typedArray.buffer,
3881
- buffer = isDeep ? cloneArrayBuffer(arrayBuffer) : arrayBuffer,
3882
- Ctor = typedArray.constructor;
3883
-
3884
- return new Ctor(buffer, typedArray.byteOffset, typedArray.length);
3899
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
3900
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
3885
3901
  }
3886
3902
 
3887
3903
  /**
@@ -4678,9 +4694,9 @@
4678
4694
  * @param {Array} array The array to compare.
4679
4695
  * @param {Array} other The other array to compare.
4680
4696
  * @param {Function} equalFunc The function to determine equivalents of values.
4681
- * @param {Function} [customizer] The function to customize comparisons.
4682
- * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.
4683
- * @param {Object} [stack] Tracks traversed `array` and `other` objects.
4697
+ * @param {Function} customizer The function to customize comparisons.
4698
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details.
4699
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
4684
4700
  * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
4685
4701
  */
4686
4702
  function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
@@ -4747,11 +4763,12 @@
4747
4763
  * @param {Object} other The other object to compare.
4748
4764
  * @param {string} tag The `toStringTag` of the objects to compare.
4749
4765
  * @param {Function} equalFunc The function to determine equivalents of values.
4750
- * @param {Function} [customizer] The function to customize comparisons.
4751
- * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.
4766
+ * @param {Function} customizer The function to customize comparisons.
4767
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details.
4768
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
4752
4769
  * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
4753
4770
  */
4754
- function equalByTag(object, other, tag, equalFunc, customizer, bitmask) {
4771
+ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
4755
4772
  switch (tag) {
4756
4773
  case arrayBufferTag:
4757
4774
  if ((object.byteLength != other.byteLength) ||
@@ -4786,12 +4803,21 @@
4786
4803
  var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
4787
4804
  convert || (convert = setToArray);
4788
4805
 
4806
+ if (object.size != other.size && !isPartial) {
4807
+ return false;
4808
+ }
4809
+ // Assume cyclic values are equal.
4810
+ var stacked = stack.get(object);
4811
+ if (stacked) {
4812
+ return stacked == other;
4813
+ }
4789
4814
  // Recursively compare objects (susceptible to call stack limits).
4790
- return (isPartial || object.size == other.size) &&
4791
- equalFunc(convert(object), convert(other), customizer, bitmask | UNORDERED_COMPARE_FLAG);
4815
+ return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask | UNORDERED_COMPARE_FLAG, stack.set(object, other));
4792
4816
 
4793
4817
  case symbolTag:
4794
- return !!Symbol && (symbolValueOf.call(object) == symbolValueOf.call(other));
4818
+ if (symbolValueOf) {
4819
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
4820
+ }
4795
4821
  }
4796
4822
  return false;
4797
4823
  }
@@ -4804,9 +4830,9 @@
4804
4830
  * @param {Object} object The object to compare.
4805
4831
  * @param {Object} other The other object to compare.
4806
4832
  * @param {Function} equalFunc The function to determine equivalents of values.
4807
- * @param {Function} [customizer] The function to customize comparisons.
4808
- * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.
4809
- * @param {Object} [stack] Tracks traversed `object` and `other` objects.
4833
+ * @param {Function} customizer The function to customize comparisons.
4834
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details.
4835
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
4810
4836
  * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
4811
4837
  */
4812
4838
  function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
@@ -4959,7 +4985,7 @@
4959
4985
  * @returns {*} Returns the function if it's native, else `undefined`.
4960
4986
  */
4961
4987
  function getNative(object, key) {
4962
- var value = object == null ? undefined : object[key];
4988
+ var value = object[key];
4963
4989
  return isNative(value) ? value : undefined;
4964
4990
  }
4965
4991
 
@@ -5101,7 +5127,7 @@
5101
5127
  * @returns {Object} Returns the initialized clone.
5102
5128
  */
5103
5129
  function initCloneObject(object) {
5104
- return (isFunction(object.constructor) && !isPrototype(object))
5130
+ return (typeof object.constructor == 'function' && !isPrototype(object))
5105
5131
  ? baseCreate(getPrototypeOf(object))
5106
5132
  : {};
5107
5133
  }
@@ -5250,7 +5276,7 @@
5250
5276
  */
5251
5277
  function isPrototype(value) {
5252
5278
  var Ctor = value && value.constructor,
5253
- proto = (isFunction(Ctor) && Ctor.prototype) || objectProto;
5279
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
5254
5280
 
5255
5281
  return value === proto;
5256
5282
  }
@@ -5351,8 +5377,7 @@
5351
5377
  */
5352
5378
  function mergeDefaults(objValue, srcValue, key, object, source, stack) {
5353
5379
  if (isObject(objValue) && isObject(srcValue)) {
5354
- stack.set(srcValue, objValue);
5355
- baseMerge(objValue, srcValue, undefined, mergeDefaults, stack);
5380
+ baseMerge(objValue, srcValue, undefined, mergeDefaults, stack.set(srcValue, objValue));
5356
5381
  }
5357
5382
  return objValue;
5358
5383
  }
@@ -5486,11 +5511,11 @@
5486
5511
  return [];
5487
5512
  }
5488
5513
  var index = 0,
5489
- resIndex = -1,
5514
+ resIndex = 0,
5490
5515
  result = Array(nativeCeil(length / size));
5491
5516
 
5492
5517
  while (index < length) {
5493
- result[++resIndex] = baseSlice(array, index, (index += size));
5518
+ result[resIndex++] = baseSlice(array, index, (index += size));
5494
5519
  }
5495
5520
  return result;
5496
5521
  }
@@ -5512,13 +5537,13 @@
5512
5537
  function compact(array) {
5513
5538
  var index = -1,
5514
5539
  length = array ? array.length : 0,
5515
- resIndex = -1,
5540
+ resIndex = 0,
5516
5541
  result = [];
5517
5542
 
5518
5543
  while (++index < length) {
5519
5544
  var value = array[index];
5520
5545
  if (value) {
5521
- result[++resIndex] = value;
5546
+ result[resIndex++] = value;
5522
5547
  }
5523
5548
  }
5524
5549
  return result;
@@ -5556,7 +5581,8 @@
5556
5581
  /**
5557
5582
  * Creates an array of unique `array` values not included in the other
5558
5583
  * given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
5559
- * for equality comparisons.
5584
+ * for equality comparisons. The order of result values is determined by the
5585
+ * order they occur in the first array.
5560
5586
  *
5561
5587
  * @static
5562
5588
  * @memberOf _
@@ -5578,7 +5604,8 @@
5578
5604
  /**
5579
5605
  * This method is like `_.difference` except that it accepts `iteratee` which
5580
5606
  * is invoked for each element of `array` and `values` to generate the criterion
5581
- * by which uniqueness is computed. The iteratee is invoked with one argument: (value).
5607
+ * by which they're compared. Result values are chosen from the first array.
5608
+ * The iteratee is invoked with one argument: (value).
5582
5609
  *
5583
5610
  * @static
5584
5611
  * @memberOf _
@@ -5608,8 +5635,9 @@
5608
5635
 
5609
5636
  /**
5610
5637
  * This method is like `_.difference` except that it accepts `comparator`
5611
- * which is invoked to compare elements of `array` to `values`. The comparator
5612
- * is invoked with two arguments: (arrVal, othVal).
5638
+ * which is invoked to compare elements of `array` to `values`. Result values
5639
+ * are chosen from the first array. The comparator is invoked with two arguments:
5640
+ * (arrVal, othVal).
5613
5641
  *
5614
5642
  * @static
5615
5643
  * @memberOf _
@@ -6065,13 +6093,14 @@
6065
6093
  /**
6066
6094
  * Creates an array of unique values that are included in all given arrays
6067
6095
  * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
6068
- * for equality comparisons.
6096
+ * for equality comparisons. The order of result values is determined by the
6097
+ * order they occur in the first array.
6069
6098
  *
6070
6099
  * @static
6071
6100
  * @memberOf _
6072
6101
  * @category Array
6073
6102
  * @param {...Array} [arrays] The arrays to inspect.
6074
- * @returns {Array} Returns the new array of shared values.
6103
+ * @returns {Array} Returns the new array of intersecting values.
6075
6104
  * @example
6076
6105
  *
6077
6106
  * _.intersection([2, 1], [4, 2], [1, 2]);
@@ -6087,14 +6116,15 @@
6087
6116
  /**
6088
6117
  * This method is like `_.intersection` except that it accepts `iteratee`
6089
6118
  * which is invoked for each element of each `arrays` to generate the criterion
6090
- * by which uniqueness is computed. The iteratee is invoked with one argument: (value).
6119
+ * by which they're compared. Result values are chosen from the first array.
6120
+ * The iteratee is invoked with one argument: (value).
6091
6121
  *
6092
6122
  * @static
6093
6123
  * @memberOf _
6094
6124
  * @category Array
6095
6125
  * @param {...Array} [arrays] The arrays to inspect.
6096
6126
  * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
6097
- * @returns {Array} Returns the new array of shared values.
6127
+ * @returns {Array} Returns the new array of intersecting values.
6098
6128
  * @example
6099
6129
  *
6100
6130
  * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor);
@@ -6120,15 +6150,16 @@
6120
6150
 
6121
6151
  /**
6122
6152
  * This method is like `_.intersection` except that it accepts `comparator`
6123
- * which is invoked to compare elements of `arrays`. The comparator is invoked
6124
- * with two arguments: (arrVal, othVal).
6153
+ * which is invoked to compare elements of `arrays`. Result values are chosen
6154
+ * from the first array. The comparator is invoked with two arguments:
6155
+ * (arrVal, othVal).
6125
6156
  *
6126
6157
  * @static
6127
6158
  * @memberOf _
6128
6159
  * @category Array
6129
6160
  * @param {...Array} [arrays] The arrays to inspect.
6130
6161
  * @param {Function} [comparator] The comparator invoked per element.
6131
- * @returns {Array} Returns the new array of shared values.
6162
+ * @returns {Array} Returns the new array of intersecting values.
6132
6163
  * @example
6133
6164
  *
6134
6165
  * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
@@ -6280,7 +6311,7 @@
6280
6311
  /**
6281
6312
  * This method is like `_.pullAll` except that it accepts `iteratee` which is
6282
6313
  * invoked for each element of `array` and `values` to generate the criterion
6283
- * by which uniqueness is computed. The iteratee is invoked with one argument: (value).
6314
+ * by which they're compared. The iteratee is invoked with one argument: (value).
6284
6315
  *
6285
6316
  * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
6286
6317
  *
@@ -6301,7 +6332,35 @@
6301
6332
  */
6302
6333
  function pullAllBy(array, values, iteratee) {
6303
6334
  return (array && array.length && values && values.length)
6304
- ? basePullAllBy(array, values, getIteratee(iteratee))
6335
+ ? basePullAll(array, values, getIteratee(iteratee))
6336
+ : array;
6337
+ }
6338
+
6339
+ /**
6340
+ * This method is like `_.pullAll` except that it accepts `comparator` which
6341
+ * is invoked to compare elements of `array` to `values`. The comparator is
6342
+ * invoked with two arguments: (arrVal, othVal).
6343
+ *
6344
+ * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
6345
+ *
6346
+ * @static
6347
+ * @memberOf _
6348
+ * @category Array
6349
+ * @param {Array} array The array to modify.
6350
+ * @param {Array} values The values to remove.
6351
+ * @param {Function} [comparator] The comparator invoked per element.
6352
+ * @returns {Array} Returns `array`.
6353
+ * @example
6354
+ *
6355
+ * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
6356
+ *
6357
+ * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
6358
+ * console.log(array);
6359
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
6360
+ */
6361
+ function pullAllWith(array, values, comparator) {
6362
+ return (array && array.length && values && values.length)
6363
+ ? basePullAll(array, values, undefined, comparator)
6305
6364
  : array;
6306
6365
  }
6307
6366
 
@@ -7023,7 +7082,8 @@
7023
7082
 
7024
7083
  /**
7025
7084
  * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
7026
- * of the given arrays.
7085
+ * of the given arrays. The order of result values is determined by the order
7086
+ * they occur in the arrays.
7027
7087
  *
7028
7088
  * @static
7029
7089
  * @memberOf _
@@ -7042,7 +7102,7 @@
7042
7102
  /**
7043
7103
  * This method is like `_.xor` except that it accepts `iteratee` which is
7044
7104
  * invoked for each element of each `arrays` to generate the criterion by which
7045
- * uniqueness is computed. The iteratee is invoked with one argument: (value).
7105
+ * by which they're compared. The iteratee is invoked with one argument: (value).
7046
7106
  *
7047
7107
  * @static
7048
7108
  * @memberOf _
@@ -9409,7 +9469,7 @@
9409
9469
  * // => true
9410
9470
  */
9411
9471
  function clone(value) {
9412
- return baseClone(value);
9472
+ return baseClone(value, false, true);
9413
9473
  }
9414
9474
 
9415
9475
  /**
@@ -9442,7 +9502,7 @@
9442
9502
  * // => 0
9443
9503
  */
9444
9504
  function cloneWith(value, customizer) {
9445
- return baseClone(value, false, customizer);
9505
+ return baseClone(value, false, true, customizer);
9446
9506
  }
9447
9507
 
9448
9508
  /**
@@ -9462,7 +9522,7 @@
9462
9522
  * // => false
9463
9523
  */
9464
9524
  function cloneDeep(value) {
9465
- return baseClone(value, true);
9525
+ return baseClone(value, true, true);
9466
9526
  }
9467
9527
 
9468
9528
  /**
@@ -9492,7 +9552,7 @@
9492
9552
  * // => 20
9493
9553
  */
9494
9554
  function cloneDeepWith(value, customizer) {
9495
- return baseClone(value, true, customizer);
9555
+ return baseClone(value, true, true, customizer);
9496
9556
  }
9497
9557
 
9498
9558
  /**
@@ -9669,8 +9729,7 @@
9669
9729
  * // => false
9670
9730
  */
9671
9731
  function isArrayLike(value) {
9672
- return value != null &&
9673
- !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));
9732
+ return value != null && isLength(getLength(value)) && !isFunction(value);
9674
9733
  }
9675
9734
 
9676
9735
  /**
@@ -9782,14 +9841,14 @@
9782
9841
  }
9783
9842
 
9784
9843
  /**
9785
- * Checks if `value` is empty. A value is considered empty unless it's an
9786
- * `arguments` object, array, string, or jQuery-like collection with a length
9787
- * greater than `0` or an object with own enumerable properties.
9844
+ * Checks if `value` is an empty collection or object. A value is considered
9845
+ * empty if it's an `arguments` object, array, string, or jQuery-like collection
9846
+ * with a length of `0` or has no own enumerable properties.
9788
9847
  *
9789
9848
  * @static
9790
9849
  * @memberOf _
9791
9850
  * @category Lang
9792
- * @param {Array|Object|string} value The value to inspect.
9851
+ * @param {*} value The value to check.
9793
9852
  * @returns {boolean} Returns `true` if `value` is empty, else `false`.
9794
9853
  * @example
9795
9854
  *
@@ -9961,8 +10020,8 @@
9961
10020
  */
9962
10021
  function isFunction(value) {
9963
10022
  // The use of `Object#toString` avoids issues with the `typeof` operator
9964
- // in Safari 8 which returns 'object' for typed array constructors, and
9965
- // PhantomJS 1.9 which returns 'function' for `NodeList` instances.
10023
+ // in Safari 8 which returns 'object' for typed array and weak map constructors,
10024
+ // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
9966
10025
  var tag = isObject(value) ? objectToString.call(value) : '';
9967
10026
  return tag == funcTag || tag == genTag;
9968
10027
  }
@@ -10798,7 +10857,7 @@
10798
10857
  return '';
10799
10858
  }
10800
10859
  if (isSymbol(value)) {
10801
- return Symbol ? symbolToString.call(value) : '';
10860
+ return symbolToString ? symbolToString.call(value) : '';
10802
10861
  }
10803
10862
  var result = (value + '');
10804
10863
  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
@@ -10837,7 +10896,15 @@
10837
10896
  * // => { 'a': 1, 'c': 3, 'e': 5 }
10838
10897
  */
10839
10898
  var assign = createAssigner(function(object, source) {
10840
- copyObject(source, keys(source), object);
10899
+ if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) {
10900
+ copyObject(source, keys(source), object);
10901
+ return;
10902
+ }
10903
+ for (var key in source) {
10904
+ if (hasOwnProperty.call(source, key)) {
10905
+ assignValue(object, key, source[key]);
10906
+ }
10907
+ }
10841
10908
  });
10842
10909
 
10843
10910
  /**
@@ -10870,7 +10937,13 @@
10870
10937
  * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 }
10871
10938
  */
10872
10939
  var assignIn = createAssigner(function(object, source) {
10873
- copyObject(source, keysIn(source), object);
10940
+ if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) {
10941
+ copyObject(source, keysIn(source), object);
10942
+ return;
10943
+ }
10944
+ for (var key in source) {
10945
+ assignValue(object, key, source[key]);
10946
+ }
10874
10947
  });
10875
10948
 
10876
10949
  /**
@@ -11601,12 +11674,13 @@
11601
11674
  }
11602
11675
 
11603
11676
  /**
11604
- * Recursively merges own and inherited enumerable properties of source objects
11605
- * into the destination object. Source properties that resolve to `undefined`
11606
- * are skipped if a destination value exists. Array and plain object properties
11607
- * are merged recursively. Other objects and value types are overridden by
11608
- * assignment. Source objects are applied from left to right. Subsequent
11609
- * sources overwrite property assignments of previous sources.
11677
+ * This method is like `_.assign` except that it recursively merges own and
11678
+ * inherited enumerable properties of source objects into the destination
11679
+ * object. Source properties that resolve to `undefined` are skipped if a
11680
+ * destination value exists. Array and plain object properties are merged
11681
+ * recursively.Other objects and value types are overridden by assignment.
11682
+ * Source objects are applied from left to right. Subsequent sources
11683
+ * overwrite property assignments of previous sources.
11610
11684
  *
11611
11685
  * **Note:** This method mutates `object`.
11612
11686
  *
@@ -11859,8 +11933,10 @@
11859
11933
  * @returns {Object} Returns `object`.
11860
11934
  * @example
11861
11935
  *
11862
- * _.setWith({ '0': { 'length': 2 } }, '[0][1][2]', 3, Object);
11863
- * // => { '0': { '1': { '2': 3 }, 'length': 2 } }
11936
+ * var object = {};
11937
+ *
11938
+ * _.setWith(object, '[0][1]', 'a', Object);
11939
+ * // => { '0': { '1': 'a' } }
11864
11940
  */
11865
11941
  function setWith(object, path, value, customizer) {
11866
11942
  customizer = typeof customizer == 'function' ? customizer : undefined;
@@ -11997,6 +12073,64 @@
11997
12073
  return object == null ? true : baseUnset(object, path);
11998
12074
  }
11999
12075
 
12076
+ /**
12077
+ * This method is like `_.set` except that accepts `updater` to produce the
12078
+ * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
12079
+ * is invoked with one argument: (value).
12080
+ *
12081
+ * **Note:** This method mutates `object`.
12082
+ *
12083
+ * @static
12084
+ * @memberOf _
12085
+ * @category Object
12086
+ * @param {Object} object The object to modify.
12087
+ * @param {Array|string} path The path of the property to set.
12088
+ * @param {Function} updater The function to produce the updated value.
12089
+ * @returns {Object} Returns `object`.
12090
+ * @example
12091
+ *
12092
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
12093
+ *
12094
+ * _.update(object, 'a[0].b.c', function(n) { return n * n; });
12095
+ * console.log(object.a[0].b.c);
12096
+ * // => 9
12097
+ *
12098
+ * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
12099
+ * console.log(object.x[0].y.z);
12100
+ * // => 0
12101
+ */
12102
+ function update(object, path, updater) {
12103
+ return object == null ? object : baseUpdate(object, path, baseCastFunction(updater));
12104
+ }
12105
+
12106
+ /**
12107
+ * This method is like `_.update` except that it accepts `customizer` which is
12108
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
12109
+ * path creation is handled by the method instead. The `customizer` is invoked
12110
+ * with three arguments: (nsValue, key, nsObject).
12111
+ *
12112
+ * **Note:** This method mutates `object`.
12113
+ *
12114
+ * @static
12115
+ * @memberOf _
12116
+ * @category Object
12117
+ * @param {Object} object The object to modify.
12118
+ * @param {Array|string} path The path of the property to set.
12119
+ * @param {Function} updater The function to produce the updated value.
12120
+ * @param {Function} [customizer] The function to customize assigned values.
12121
+ * @returns {Object} Returns `object`.
12122
+ * @example
12123
+ *
12124
+ * var object = {};
12125
+ *
12126
+ * _.updateWith(object, '[0][1]', _.constant('a'), Object);
12127
+ * // => { '0': { '1': 'a' } }
12128
+ */
12129
+ function updateWith(object, path, updater, customizer) {
12130
+ customizer = typeof customizer == 'function' ? customizer : undefined;
12131
+ return object == null ? object : baseUpdate(object, path, baseCastFunction(updater), customizer);
12132
+ }
12133
+
12000
12134
  /**
12001
12135
  * Creates an array of the own enumerable property values of `object`.
12002
12136
  *
@@ -12933,7 +13067,8 @@
12933
13067
  }
12934
13068
 
12935
13069
  /**
12936
- * Converts `string`, as a whole, to lower case.
13070
+ * Converts `string`, as a whole, to lower case just like
13071
+ * [String#toLowerCase](https://mdn.io/toLowerCase).
12937
13072
  *
12938
13073
  * @static
12939
13074
  * @memberOf _
@@ -12956,7 +13091,8 @@
12956
13091
  }
12957
13092
 
12958
13093
  /**
12959
- * Converts `string`, as a whole, to upper case.
13094
+ * Converts `string`, as a whole, to upper case just like
13095
+ * [String#toUpperCase](https://mdn.io/toUpperCase).
12960
13096
  *
12961
13097
  * @static
12962
13098
  * @memberOf _
@@ -14330,6 +14466,7 @@
14330
14466
 
14331
14467
  // Ensure wrappers are instances of `baseLodash`.
14332
14468
  lodash.prototype = baseLodash.prototype;
14469
+ lodash.prototype.constructor = lodash;
14333
14470
 
14334
14471
  LodashWrapper.prototype = baseCreate(baseLodash.prototype);
14335
14472
  LodashWrapper.prototype.constructor = LodashWrapper;
@@ -14451,6 +14588,7 @@
14451
14588
  lodash.pull = pull;
14452
14589
  lodash.pullAll = pullAll;
14453
14590
  lodash.pullAllBy = pullAllBy;
14591
+ lodash.pullAllWith = pullAllWith;
14454
14592
  lodash.pullAt = pullAt;
14455
14593
  lodash.range = range;
14456
14594
  lodash.rangeRight = rangeRight;
@@ -14493,6 +14631,8 @@
14493
14631
  lodash.unset = unset;
14494
14632
  lodash.unzip = unzip;
14495
14633
  lodash.unzipWith = unzipWith;
14634
+ lodash.update = update;
14635
+ lodash.updateWith = updateWith;
14496
14636
  lodash.values = values;
14497
14637
  lodash.valuesIn = valuesIn;
14498
14638
  lodash.without = without;