@hailin-zheng/editor-core 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index-cjs.js CHANGED
@@ -245,8 +245,8 @@ function setNotifyChangedCallback(target, p, cb) {
245
245
  activeFns.pop();
246
246
  }
247
247
  const isDate = (val) => val instanceof Date;
248
- const objectToString = Object.prototype.toString;
249
- const toTypeString = (value) => objectToString.call(value);
248
+ const objectToString$4 = Object.prototype.toString;
249
+ const toTypeString = (value) => objectToString$4.call(value);
250
250
  const toRawType = (value) => {
251
251
  return toTypeString(value).slice(8, -1);
252
252
  };
@@ -19517,12 +19517,437 @@ class DocumentSvg {
19517
19517
  }
19518
19518
  }
19519
19519
 
19520
- var escape = require('lodash.escape');
19521
- var parseSelector = require('parse-sel');
19522
- var VOID_ELEMENTS = require('./elements').VOID;
19523
- var CONTAINER_ELEMENTS = require('./elements').CONTAINER;
19520
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
19524
19521
 
19525
- module.exports = function init (modules) {
19522
+ function createCommonjsModule(fn, module) {
19523
+ return module = { exports: {} }, fn(module, module.exports), module.exports;
19524
+ }
19525
+
19526
+ /**
19527
+ * lodash (Custom Build) <https://lodash.com/>
19528
+ * Build: `lodash modularize exports="npm" -o ./`
19529
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
19530
+ * Released under MIT license <https://lodash.com/license>
19531
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
19532
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
19533
+ */
19534
+
19535
+ /** Used as references for various `Number` constants. */
19536
+ var INFINITY$2 = 1 / 0;
19537
+
19538
+ /** `Object#toString` result references. */
19539
+ var symbolTag$1 = '[object Symbol]';
19540
+
19541
+ /** Used to match HTML entities and HTML characters. */
19542
+ var reUnescapedHtml = /[&<>"'`]/g,
19543
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
19544
+
19545
+ /** Used to map characters to HTML entities. */
19546
+ var htmlEscapes = {
19547
+ '&': '&amp;',
19548
+ '<': '&lt;',
19549
+ '>': '&gt;',
19550
+ '"': '&quot;',
19551
+ "'": '&#39;',
19552
+ '`': '&#96;'
19553
+ };
19554
+
19555
+ /** Detect free variable `global` from Node.js. */
19556
+ var freeGlobal$2 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
19557
+
19558
+ /** Detect free variable `self`. */
19559
+ var freeSelf$2 = typeof self == 'object' && self && self.Object === Object && self;
19560
+
19561
+ /** Used as a reference to the global object. */
19562
+ var root$2 = freeGlobal$2 || freeSelf$2 || Function('return this')();
19563
+
19564
+ /**
19565
+ * The base implementation of `_.propertyOf` without support for deep paths.
19566
+ *
19567
+ * @private
19568
+ * @param {Object} object The object to query.
19569
+ * @returns {Function} Returns the new accessor function.
19570
+ */
19571
+ function basePropertyOf$1(object) {
19572
+ return function(key) {
19573
+ return object == null ? undefined : object[key];
19574
+ };
19575
+ }
19576
+
19577
+ /**
19578
+ * Used by `_.escape` to convert characters to HTML entities.
19579
+ *
19580
+ * @private
19581
+ * @param {string} chr The matched character to escape.
19582
+ * @returns {string} Returns the escaped character.
19583
+ */
19584
+ var escapeHtmlChar = basePropertyOf$1(htmlEscapes);
19585
+
19586
+ /** Used for built-in method references. */
19587
+ var objectProto$3 = Object.prototype;
19588
+
19589
+ /**
19590
+ * Used to resolve the
19591
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
19592
+ * of values.
19593
+ */
19594
+ var objectToString$3 = objectProto$3.toString;
19595
+
19596
+ /** Built-in value references. */
19597
+ var Symbol$2 = root$2.Symbol;
19598
+
19599
+ /** Used to convert symbols to primitives and strings. */
19600
+ var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : undefined,
19601
+ symbolToString$1 = symbolProto$1 ? symbolProto$1.toString : undefined;
19602
+
19603
+ /**
19604
+ * The base implementation of `_.toString` which doesn't convert nullish
19605
+ * values to empty strings.
19606
+ *
19607
+ * @private
19608
+ * @param {*} value The value to process.
19609
+ * @returns {string} Returns the string.
19610
+ */
19611
+ function baseToString$1(value) {
19612
+ // Exit early for strings to avoid a performance hit in some environments.
19613
+ if (typeof value == 'string') {
19614
+ return value;
19615
+ }
19616
+ if (isSymbol$1(value)) {
19617
+ return symbolToString$1 ? symbolToString$1.call(value) : '';
19618
+ }
19619
+ var result = (value + '');
19620
+ return (result == '0' && (1 / value) == -INFINITY$2) ? '-0' : result;
19621
+ }
19622
+
19623
+ /**
19624
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
19625
+ * and has a `typeof` result of "object".
19626
+ *
19627
+ * @static
19628
+ * @memberOf _
19629
+ * @since 4.0.0
19630
+ * @category Lang
19631
+ * @param {*} value The value to check.
19632
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
19633
+ * @example
19634
+ *
19635
+ * _.isObjectLike({});
19636
+ * // => true
19637
+ *
19638
+ * _.isObjectLike([1, 2, 3]);
19639
+ * // => true
19640
+ *
19641
+ * _.isObjectLike(_.noop);
19642
+ * // => false
19643
+ *
19644
+ * _.isObjectLike(null);
19645
+ * // => false
19646
+ */
19647
+ function isObjectLike$2(value) {
19648
+ return !!value && typeof value == 'object';
19649
+ }
19650
+
19651
+ /**
19652
+ * Checks if `value` is classified as a `Symbol` primitive or object.
19653
+ *
19654
+ * @static
19655
+ * @memberOf _
19656
+ * @since 4.0.0
19657
+ * @category Lang
19658
+ * @param {*} value The value to check.
19659
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
19660
+ * @example
19661
+ *
19662
+ * _.isSymbol(Symbol.iterator);
19663
+ * // => true
19664
+ *
19665
+ * _.isSymbol('abc');
19666
+ * // => false
19667
+ */
19668
+ function isSymbol$1(value) {
19669
+ return typeof value == 'symbol' ||
19670
+ (isObjectLike$2(value) && objectToString$3.call(value) == symbolTag$1);
19671
+ }
19672
+
19673
+ /**
19674
+ * Converts `value` to a string. An empty string is returned for `null`
19675
+ * and `undefined` values. The sign of `-0` is preserved.
19676
+ *
19677
+ * @static
19678
+ * @memberOf _
19679
+ * @since 4.0.0
19680
+ * @category Lang
19681
+ * @param {*} value The value to process.
19682
+ * @returns {string} Returns the string.
19683
+ * @example
19684
+ *
19685
+ * _.toString(null);
19686
+ * // => ''
19687
+ *
19688
+ * _.toString(-0);
19689
+ * // => '-0'
19690
+ *
19691
+ * _.toString([1, 2, 3]);
19692
+ * // => '1,2,3'
19693
+ */
19694
+ function toString$1(value) {
19695
+ return value == null ? '' : baseToString$1(value);
19696
+ }
19697
+
19698
+ /**
19699
+ * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to
19700
+ * their corresponding HTML entities.
19701
+ *
19702
+ * **Note:** No other characters are escaped. To escape additional
19703
+ * characters use a third-party library like [_he_](https://mths.be/he).
19704
+ *
19705
+ * Though the ">" character is escaped for symmetry, characters like
19706
+ * ">" and "/" don't need escaping in HTML and have no special meaning
19707
+ * unless they're part of a tag or unquoted attribute value. See
19708
+ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
19709
+ * (under "semi-related fun fact") for more details.
19710
+ *
19711
+ * Backticks are escaped because in IE < 9, they can break out of
19712
+ * attribute values or HTML comments. See [#59](https://html5sec.org/#59),
19713
+ * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
19714
+ * [#133](https://html5sec.org/#133) of the
19715
+ * [HTML5 Security Cheatsheet](https://html5sec.org/) for more details.
19716
+ *
19717
+ * When working with HTML you should always
19718
+ * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
19719
+ * XSS vectors.
19720
+ *
19721
+ * @static
19722
+ * @since 0.1.0
19723
+ * @memberOf _
19724
+ * @category String
19725
+ * @param {string} [string=''] The string to escape.
19726
+ * @returns {string} Returns the escaped string.
19727
+ * @example
19728
+ *
19729
+ * _.escape('fred, barney, & pebbles');
19730
+ * // => 'fred, barney, &amp; pebbles'
19731
+ */
19732
+ function escape(string) {
19733
+ string = toString$1(string);
19734
+ return (string && reHasUnescapedHtml.test(string))
19735
+ ? string.replace(reUnescapedHtml, escapeHtmlChar)
19736
+ : string;
19737
+ }
19738
+
19739
+ var lodash_escape = escape;
19740
+
19741
+ /*!
19742
+ * Cross-Browser Split 1.1.1
19743
+ * Copyright 2007-2012 Steven Levithan <stevenlevithan.com>
19744
+ * Available under the MIT License
19745
+ * ECMAScript compliant, uniform cross-browser split method
19746
+ */
19747
+
19748
+ /**
19749
+ * Splits a string into an array of strings using a regex or string separator. Matches of the
19750
+ * separator are not included in the result array. However, if `separator` is a regex that contains
19751
+ * capturing groups, backreferences are spliced into the result each time `separator` is matched.
19752
+ * Fixes browser bugs compared to the native `String.prototype.split` and can be used reliably
19753
+ * cross-browser.
19754
+ * @param {String} str String to split.
19755
+ * @param {RegExp|String} separator Regex or string to use for separating the string.
19756
+ * @param {Number} [limit] Maximum number of items to include in the result array.
19757
+ * @returns {Array} Array of substrings.
19758
+ * @example
19759
+ *
19760
+ * // Basic use
19761
+ * split('a b c d', ' ');
19762
+ * // -> ['a', 'b', 'c', 'd']
19763
+ *
19764
+ * // With limit
19765
+ * split('a b c d', ' ', 2);
19766
+ * // -> ['a', 'b']
19767
+ *
19768
+ * // Backreferences in result array
19769
+ * split('..word1 word2..', /([a-z]+)(\d+)/i);
19770
+ * // -> ['..', 'word', '1', ' ', 'word', '2', '..']
19771
+ */
19772
+ var browserSplit = (function split(undef) {
19773
+
19774
+ var nativeSplit = String.prototype.split,
19775
+ compliantExecNpcg = /()??/.exec("")[1] === undef,
19776
+ // NPCG: nonparticipating capturing group
19777
+ self;
19778
+
19779
+ self = function(str, separator, limit) {
19780
+ // If `separator` is not a regex, use `nativeSplit`
19781
+ if (Object.prototype.toString.call(separator) !== "[object RegExp]") {
19782
+ return nativeSplit.call(str, separator, limit);
19783
+ }
19784
+ var output = [],
19785
+ flags = (separator.ignoreCase ? "i" : "") + (separator.multiline ? "m" : "") + (separator.extended ? "x" : "") + // Proposed for ES6
19786
+ (separator.sticky ? "y" : ""),
19787
+ // Firefox 3+
19788
+ lastLastIndex = 0,
19789
+ // Make `global` and avoid `lastIndex` issues by working with a copy
19790
+ separator = new RegExp(separator.source, flags + "g"),
19791
+ separator2, match, lastIndex, lastLength;
19792
+ str += ""; // Type-convert
19793
+ if (!compliantExecNpcg) {
19794
+ // Doesn't need flags gy, but they don't hurt
19795
+ separator2 = new RegExp("^" + separator.source + "$(?!\\s)", flags);
19796
+ }
19797
+ /* Values for `limit`, per the spec:
19798
+ * If undefined: 4294967295 // Math.pow(2, 32) - 1
19799
+ * If 0, Infinity, or NaN: 0
19800
+ * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;
19801
+ * If negative number: 4294967296 - Math.floor(Math.abs(limit))
19802
+ * If other: Type-convert, then use the above rules
19803
+ */
19804
+ limit = limit === undef ? -1 >>> 0 : // Math.pow(2, 32) - 1
19805
+ limit >>> 0; // ToUint32(limit)
19806
+ while (match = separator.exec(str)) {
19807
+ // `separator.lastIndex` is not reliable cross-browser
19808
+ lastIndex = match.index + match[0].length;
19809
+ if (lastIndex > lastLastIndex) {
19810
+ output.push(str.slice(lastLastIndex, match.index));
19811
+ // Fix browsers whose `exec` methods don't consistently return `undefined` for
19812
+ // nonparticipating capturing groups
19813
+ if (!compliantExecNpcg && match.length > 1) {
19814
+ match[0].replace(separator2, function() {
19815
+ for (var i = 1; i < arguments.length - 2; i++) {
19816
+ if (arguments[i] === undef) {
19817
+ match[i] = undef;
19818
+ }
19819
+ }
19820
+ });
19821
+ }
19822
+ if (match.length > 1 && match.index < str.length) {
19823
+ Array.prototype.push.apply(output, match.slice(1));
19824
+ }
19825
+ lastLength = match[0].length;
19826
+ lastLastIndex = lastIndex;
19827
+ if (output.length >= limit) {
19828
+ break;
19829
+ }
19830
+ }
19831
+ if (separator.lastIndex === match.index) {
19832
+ separator.lastIndex++; // Avoid an infinite loop
19833
+ }
19834
+ }
19835
+ if (lastLastIndex === str.length) {
19836
+ if (lastLength || !separator.test("")) {
19837
+ output.push("");
19838
+ }
19839
+ } else {
19840
+ output.push(str.slice(lastLastIndex));
19841
+ }
19842
+ return output.length > limit ? output.slice(0, limit) : output;
19843
+ };
19844
+
19845
+ return self;
19846
+ })();
19847
+
19848
+ // https://github.com/Matt-Esch/virtual-dom/blob/master/virtual-hyperscript/parse-tag.js
19849
+
19850
+
19851
+
19852
+ var classIdSplit = /([\.#]?[a-zA-Z0-9\u007F-\uFFFF_:-]+)/;
19853
+ var notClassId = /^\.|#/;
19854
+
19855
+ var parseSel = function parseSelector (selector, upper) {
19856
+ selector = selector || '';
19857
+ var tagName;
19858
+ var id = '';
19859
+ var classes = [];
19860
+
19861
+ var tagParts = browserSplit(selector, classIdSplit);
19862
+
19863
+ if (notClassId.test(tagParts[1]) || selector === '') {
19864
+ tagName = 'div';
19865
+ }
19866
+
19867
+ var part, type, i;
19868
+
19869
+ for (i = 0; i < tagParts.length; i++) {
19870
+ part = tagParts[i];
19871
+
19872
+ if (!part) {
19873
+ continue
19874
+ }
19875
+
19876
+ type = part.charAt(0);
19877
+
19878
+ if (!tagName) {
19879
+ tagName = part;
19880
+ } else if (type === '.') {
19881
+ classes.push(part.substring(1, part.length));
19882
+ } else if (type === '#') {
19883
+ id = part.substring(1, part.length);
19884
+ }
19885
+ }
19886
+
19887
+ return {
19888
+ tagName: upper === true ? tagName.toUpperCase() : tagName,
19889
+ id: id,
19890
+ className: classes.join(' ')
19891
+ }
19892
+ };
19893
+
19894
+ // All SVG children elements, not in this list, should self-close
19895
+
19896
+ var CONTAINER = {
19897
+ // http://www.w3.org/TR/SVG/intro.html#TermContainerElement
19898
+ 'a': true,
19899
+ 'defs': true,
19900
+ 'glyph': true,
19901
+ 'g': true,
19902
+ 'marker': true,
19903
+ 'mask': true,
19904
+ 'missing-glyph': true,
19905
+ 'pattern': true,
19906
+ 'svg': true,
19907
+ 'switch': true,
19908
+ 'symbol': true,
19909
+ 'text': true,
19910
+ 'clipPath': true,
19911
+ 'linearGradient': true,
19912
+
19913
+ 'style': true,
19914
+ 'script': true,
19915
+
19916
+ // http://www.w3.org/TR/SVG/intro.html#TermDescriptiveElement
19917
+ 'desc': true,
19918
+ 'metadata': true,
19919
+ 'title': true
19920
+ };
19921
+
19922
+ // http://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements
19923
+
19924
+ var VOID = {
19925
+ area: true,
19926
+ base: true,
19927
+ br: true,
19928
+ col: true,
19929
+ embed: true,
19930
+ hr: true,
19931
+ img: true,
19932
+ input: true,
19933
+ keygen: true,
19934
+ link: true,
19935
+ meta: true,
19936
+ param: true,
19937
+ source: true,
19938
+ track: true,
19939
+ wbr: true
19940
+ };
19941
+
19942
+ var elements = {
19943
+ CONTAINER: CONTAINER,
19944
+ VOID: VOID
19945
+ };
19946
+
19947
+ var VOID_ELEMENTS = elements.VOID;
19948
+ var CONTAINER_ELEMENTS = elements.CONTAINER;
19949
+
19950
+ var init = function init (modules) {
19526
19951
  function parse (vnode, node) {
19527
19952
  var result = [];
19528
19953
  var attributes = new Map([
@@ -19549,7 +19974,7 @@ module.exports = function init (modules) {
19549
19974
  }
19550
19975
 
19551
19976
  if (!vnode.sel && typeof vnode.text === 'string') {
19552
- return escape(vnode.text)
19977
+ return lodash_escape(vnode.text)
19553
19978
  }
19554
19979
 
19555
19980
  vnode.data = vnode.data || {};
@@ -19561,7 +19986,7 @@ module.exports = function init (modules) {
19561
19986
  vnode.data.hook.init(vnode);
19562
19987
  }
19563
19988
 
19564
- var node = parseSelector(vnode.sel);
19989
+ var node = parseSel(vnode.sel);
19565
19990
  var tagName = node.tagName;
19566
19991
  var attributes = parse(vnode, node);
19567
19992
  var svg = vnode.data.ns === 'http://www.w3.org/2000/svg';
@@ -19587,7 +20012,7 @@ module.exports = function init (modules) {
19587
20012
  if (vnode.data.props && vnode.data.props.innerHTML) {
19588
20013
  tag.push(vnode.data.props.innerHTML);
19589
20014
  } else if (vnode.text) {
19590
- tag.push(escape(vnode.text));
20015
+ tag.push(lodash_escape(vnode.text));
19591
20016
  } else if (vnode.children) {
19592
20017
  vnode.children.forEach(function (child) {
19593
20018
  tag.push(renderToString(child));
@@ -19600,16 +20025,4442 @@ module.exports = function init (modules) {
19600
20025
  }
19601
20026
  };
19602
20027
 
19603
- var init = /*#__PURE__*/Object.freeze({
19604
- __proto__: null
19605
- });
20028
+ /**
20029
+ * lodash (Custom Build) <https://lodash.com/>
20030
+ * Build: `lodash modularize exports="npm" -o ./`
20031
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
20032
+ * Released under MIT license <https://lodash.com/license>
20033
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
20034
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
20035
+ */
20036
+
20037
+ /** Used as references for various `Number` constants. */
20038
+ var MAX_SAFE_INTEGER = 9007199254740991;
20039
+
20040
+ /** `Object#toString` result references. */
20041
+ var argsTag = '[object Arguments]',
20042
+ funcTag$1 = '[object Function]',
20043
+ genTag$1 = '[object GeneratorFunction]';
20044
+
20045
+ /** Used to detect unsigned integer values. */
20046
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
20047
+
20048
+ /**
20049
+ * The base implementation of `_.times` without support for iteratee shorthands
20050
+ * or max array length checks.
20051
+ *
20052
+ * @private
20053
+ * @param {number} n The number of times to invoke `iteratee`.
20054
+ * @param {Function} iteratee The function invoked per iteration.
20055
+ * @returns {Array} Returns the array of results.
20056
+ */
20057
+ function baseTimes(n, iteratee) {
20058
+ var index = -1,
20059
+ result = Array(n);
20060
+
20061
+ while (++index < n) {
20062
+ result[index] = iteratee(index);
20063
+ }
20064
+ return result;
20065
+ }
20066
+
20067
+ /**
20068
+ * Creates a unary function that invokes `func` with its argument transformed.
20069
+ *
20070
+ * @private
20071
+ * @param {Function} func The function to wrap.
20072
+ * @param {Function} transform The argument transform.
20073
+ * @returns {Function} Returns the new function.
20074
+ */
20075
+ function overArg(func, transform) {
20076
+ return function(arg) {
20077
+ return func(transform(arg));
20078
+ };
20079
+ }
20080
+
20081
+ /** Used for built-in method references. */
20082
+ var objectProto$2 = Object.prototype;
20083
+
20084
+ /** Used to check objects for own properties. */
20085
+ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
20086
+
20087
+ /**
20088
+ * Used to resolve the
20089
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
20090
+ * of values.
20091
+ */
20092
+ var objectToString$2 = objectProto$2.toString;
20093
+
20094
+ /** Built-in value references. */
20095
+ var propertyIsEnumerable = objectProto$2.propertyIsEnumerable;
20096
+
20097
+ /* Built-in method references for those with the same name as other `lodash` methods. */
20098
+ var nativeKeys = overArg(Object.keys, Object);
20099
+
20100
+ /**
20101
+ * Creates an array of the enumerable property names of the array-like `value`.
20102
+ *
20103
+ * @private
20104
+ * @param {*} value The value to query.
20105
+ * @param {boolean} inherited Specify returning inherited property names.
20106
+ * @returns {Array} Returns the array of property names.
20107
+ */
20108
+ function arrayLikeKeys(value, inherited) {
20109
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
20110
+ // Safari 9 makes `arguments.length` enumerable in strict mode.
20111
+ var result = (isArray(value) || isArguments(value))
20112
+ ? baseTimes(value.length, String)
20113
+ : [];
20114
+
20115
+ var length = result.length,
20116
+ skipIndexes = !!length;
20117
+
20118
+ for (var key in value) {
20119
+ if ((inherited || hasOwnProperty$2.call(value, key)) &&
20120
+ !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
20121
+ result.push(key);
20122
+ }
20123
+ }
20124
+ return result;
20125
+ }
20126
+
20127
+ /**
20128
+ * The base implementation of `baseForOwn` which iterates over `object`
20129
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
20130
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
20131
+ *
20132
+ * @private
20133
+ * @param {Object} object The object to iterate over.
20134
+ * @param {Function} iteratee The function invoked per iteration.
20135
+ * @param {Function} keysFunc The function to get the keys of `object`.
20136
+ * @returns {Object} Returns `object`.
20137
+ */
20138
+ var baseFor = createBaseFor();
20139
+
20140
+ /**
20141
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
20142
+ *
20143
+ * @private
20144
+ * @param {Object} object The object to iterate over.
20145
+ * @param {Function} iteratee The function invoked per iteration.
20146
+ * @returns {Object} Returns `object`.
20147
+ */
20148
+ function baseForOwn(object, iteratee) {
20149
+ return object && baseFor(object, iteratee, keys);
20150
+ }
20151
+
20152
+ /**
20153
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
20154
+ *
20155
+ * @private
20156
+ * @param {Object} object The object to query.
20157
+ * @returns {Array} Returns the array of property names.
20158
+ */
20159
+ function baseKeys(object) {
20160
+ if (!isPrototype(object)) {
20161
+ return nativeKeys(object);
20162
+ }
20163
+ var result = [];
20164
+ for (var key in Object(object)) {
20165
+ if (hasOwnProperty$2.call(object, key) && key != 'constructor') {
20166
+ result.push(key);
20167
+ }
20168
+ }
20169
+ return result;
20170
+ }
20171
+
20172
+ /**
20173
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
20174
+ *
20175
+ * @private
20176
+ * @param {boolean} [fromRight] Specify iterating from right to left.
20177
+ * @returns {Function} Returns the new base function.
20178
+ */
20179
+ function createBaseFor(fromRight) {
20180
+ return function(object, iteratee, keysFunc) {
20181
+ var index = -1,
20182
+ iterable = Object(object),
20183
+ props = keysFunc(object),
20184
+ length = props.length;
20185
+
20186
+ while (length--) {
20187
+ var key = props[fromRight ? length : ++index];
20188
+ if (iteratee(iterable[key], key, iterable) === false) {
20189
+ break;
20190
+ }
20191
+ }
20192
+ return object;
20193
+ };
20194
+ }
20195
+
20196
+ /**
20197
+ * Checks if `value` is a valid array-like index.
20198
+ *
20199
+ * @private
20200
+ * @param {*} value The value to check.
20201
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
20202
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
20203
+ */
20204
+ function isIndex(value, length) {
20205
+ length = length == null ? MAX_SAFE_INTEGER : length;
20206
+ return !!length &&
20207
+ (typeof value == 'number' || reIsUint.test(value)) &&
20208
+ (value > -1 && value % 1 == 0 && value < length);
20209
+ }
20210
+
20211
+ /**
20212
+ * Checks if `value` is likely a prototype object.
20213
+ *
20214
+ * @private
20215
+ * @param {*} value The value to check.
20216
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
20217
+ */
20218
+ function isPrototype(value) {
20219
+ var Ctor = value && value.constructor,
20220
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$2;
20221
+
20222
+ return value === proto;
20223
+ }
20224
+
20225
+ /**
20226
+ * Checks if `value` is likely an `arguments` object.
20227
+ *
20228
+ * @static
20229
+ * @memberOf _
20230
+ * @since 0.1.0
20231
+ * @category Lang
20232
+ * @param {*} value The value to check.
20233
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
20234
+ * else `false`.
20235
+ * @example
20236
+ *
20237
+ * _.isArguments(function() { return arguments; }());
20238
+ * // => true
20239
+ *
20240
+ * _.isArguments([1, 2, 3]);
20241
+ * // => false
20242
+ */
20243
+ function isArguments(value) {
20244
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
20245
+ return isArrayLikeObject(value) && hasOwnProperty$2.call(value, 'callee') &&
20246
+ (!propertyIsEnumerable.call(value, 'callee') || objectToString$2.call(value) == argsTag);
20247
+ }
20248
+
20249
+ /**
20250
+ * Checks if `value` is classified as an `Array` object.
20251
+ *
20252
+ * @static
20253
+ * @memberOf _
20254
+ * @since 0.1.0
20255
+ * @category Lang
20256
+ * @param {*} value The value to check.
20257
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
20258
+ * @example
20259
+ *
20260
+ * _.isArray([1, 2, 3]);
20261
+ * // => true
20262
+ *
20263
+ * _.isArray(document.body.children);
20264
+ * // => false
20265
+ *
20266
+ * _.isArray('abc');
20267
+ * // => false
20268
+ *
20269
+ * _.isArray(_.noop);
20270
+ * // => false
20271
+ */
20272
+ var isArray = Array.isArray;
20273
+
20274
+ /**
20275
+ * Checks if `value` is array-like. A value is considered array-like if it's
20276
+ * not a function and has a `value.length` that's an integer greater than or
20277
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
20278
+ *
20279
+ * @static
20280
+ * @memberOf _
20281
+ * @since 4.0.0
20282
+ * @category Lang
20283
+ * @param {*} value The value to check.
20284
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
20285
+ * @example
20286
+ *
20287
+ * _.isArrayLike([1, 2, 3]);
20288
+ * // => true
20289
+ *
20290
+ * _.isArrayLike(document.body.children);
20291
+ * // => true
20292
+ *
20293
+ * _.isArrayLike('abc');
20294
+ * // => true
20295
+ *
20296
+ * _.isArrayLike(_.noop);
20297
+ * // => false
20298
+ */
20299
+ function isArrayLike(value) {
20300
+ return value != null && isLength(value.length) && !isFunction$1(value);
20301
+ }
20302
+
20303
+ /**
20304
+ * This method is like `_.isArrayLike` except that it also checks if `value`
20305
+ * is an object.
20306
+ *
20307
+ * @static
20308
+ * @memberOf _
20309
+ * @since 4.0.0
20310
+ * @category Lang
20311
+ * @param {*} value The value to check.
20312
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
20313
+ * else `false`.
20314
+ * @example
20315
+ *
20316
+ * _.isArrayLikeObject([1, 2, 3]);
20317
+ * // => true
20318
+ *
20319
+ * _.isArrayLikeObject(document.body.children);
20320
+ * // => true
20321
+ *
20322
+ * _.isArrayLikeObject('abc');
20323
+ * // => false
20324
+ *
20325
+ * _.isArrayLikeObject(_.noop);
20326
+ * // => false
20327
+ */
20328
+ function isArrayLikeObject(value) {
20329
+ return isObjectLike$1(value) && isArrayLike(value);
20330
+ }
20331
+
20332
+ /**
20333
+ * Checks if `value` is classified as a `Function` object.
20334
+ *
20335
+ * @static
20336
+ * @memberOf _
20337
+ * @since 0.1.0
20338
+ * @category Lang
20339
+ * @param {*} value The value to check.
20340
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
20341
+ * @example
20342
+ *
20343
+ * _.isFunction(_);
20344
+ * // => true
20345
+ *
20346
+ * _.isFunction(/abc/);
20347
+ * // => false
20348
+ */
20349
+ function isFunction$1(value) {
20350
+ // The use of `Object#toString` avoids issues with the `typeof` operator
20351
+ // in Safari 8-9 which returns 'object' for typed array and other constructors.
20352
+ var tag = isObject$1(value) ? objectToString$2.call(value) : '';
20353
+ return tag == funcTag$1 || tag == genTag$1;
20354
+ }
20355
+
20356
+ /**
20357
+ * Checks if `value` is a valid array-like length.
20358
+ *
20359
+ * **Note:** This method is loosely based on
20360
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
20361
+ *
20362
+ * @static
20363
+ * @memberOf _
20364
+ * @since 4.0.0
20365
+ * @category Lang
20366
+ * @param {*} value The value to check.
20367
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
20368
+ * @example
20369
+ *
20370
+ * _.isLength(3);
20371
+ * // => true
20372
+ *
20373
+ * _.isLength(Number.MIN_VALUE);
20374
+ * // => false
20375
+ *
20376
+ * _.isLength(Infinity);
20377
+ * // => false
20378
+ *
20379
+ * _.isLength('3');
20380
+ * // => false
20381
+ */
20382
+ function isLength(value) {
20383
+ return typeof value == 'number' &&
20384
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
20385
+ }
20386
+
20387
+ /**
20388
+ * Checks if `value` is the
20389
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
20390
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
20391
+ *
20392
+ * @static
20393
+ * @memberOf _
20394
+ * @since 0.1.0
20395
+ * @category Lang
20396
+ * @param {*} value The value to check.
20397
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
20398
+ * @example
20399
+ *
20400
+ * _.isObject({});
20401
+ * // => true
20402
+ *
20403
+ * _.isObject([1, 2, 3]);
20404
+ * // => true
20405
+ *
20406
+ * _.isObject(_.noop);
20407
+ * // => true
20408
+ *
20409
+ * _.isObject(null);
20410
+ * // => false
20411
+ */
20412
+ function isObject$1(value) {
20413
+ var type = typeof value;
20414
+ return !!value && (type == 'object' || type == 'function');
20415
+ }
20416
+
20417
+ /**
20418
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
20419
+ * and has a `typeof` result of "object".
20420
+ *
20421
+ * @static
20422
+ * @memberOf _
20423
+ * @since 4.0.0
20424
+ * @category Lang
20425
+ * @param {*} value The value to check.
20426
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
20427
+ * @example
20428
+ *
20429
+ * _.isObjectLike({});
20430
+ * // => true
20431
+ *
20432
+ * _.isObjectLike([1, 2, 3]);
20433
+ * // => true
20434
+ *
20435
+ * _.isObjectLike(_.noop);
20436
+ * // => false
20437
+ *
20438
+ * _.isObjectLike(null);
20439
+ * // => false
20440
+ */
20441
+ function isObjectLike$1(value) {
20442
+ return !!value && typeof value == 'object';
20443
+ }
20444
+
20445
+ /**
20446
+ * Iterates over own enumerable string keyed properties of an object and
20447
+ * invokes `iteratee` for each property. The iteratee is invoked with three
20448
+ * arguments: (value, key, object). Iteratee functions may exit iteration
20449
+ * early by explicitly returning `false`.
20450
+ *
20451
+ * @static
20452
+ * @memberOf _
20453
+ * @since 0.3.0
20454
+ * @category Object
20455
+ * @param {Object} object The object to iterate over.
20456
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
20457
+ * @returns {Object} Returns `object`.
20458
+ * @see _.forOwnRight
20459
+ * @example
20460
+ *
20461
+ * function Foo() {
20462
+ * this.a = 1;
20463
+ * this.b = 2;
20464
+ * }
20465
+ *
20466
+ * Foo.prototype.c = 3;
20467
+ *
20468
+ * _.forOwn(new Foo, function(value, key) {
20469
+ * console.log(key);
20470
+ * });
20471
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
20472
+ */
20473
+ function forOwn(object, iteratee) {
20474
+ return object && baseForOwn(object, typeof iteratee == 'function' ? iteratee : identity);
20475
+ }
20476
+
20477
+ /**
20478
+ * Creates an array of the own enumerable property names of `object`.
20479
+ *
20480
+ * **Note:** Non-object values are coerced to objects. See the
20481
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
20482
+ * for more details.
20483
+ *
20484
+ * @static
20485
+ * @since 0.1.0
20486
+ * @memberOf _
20487
+ * @category Object
20488
+ * @param {Object} object The object to query.
20489
+ * @returns {Array} Returns the array of property names.
20490
+ * @example
20491
+ *
20492
+ * function Foo() {
20493
+ * this.a = 1;
20494
+ * this.b = 2;
20495
+ * }
20496
+ *
20497
+ * Foo.prototype.c = 3;
20498
+ *
20499
+ * _.keys(new Foo);
20500
+ * // => ['a', 'b'] (iteration order is not guaranteed)
20501
+ *
20502
+ * _.keys('hi');
20503
+ * // => ['0', '1']
20504
+ */
20505
+ function keys(object) {
20506
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
20507
+ }
20508
+
20509
+ /**
20510
+ * This method returns the first argument it receives.
20511
+ *
20512
+ * @static
20513
+ * @since 0.1.0
20514
+ * @memberOf _
20515
+ * @category Util
20516
+ * @param {*} value Any value.
20517
+ * @returns {*} Returns `value`.
20518
+ * @example
20519
+ *
20520
+ * var object = { 'a': 1 };
20521
+ *
20522
+ * console.log(_.identity(object) === object);
20523
+ * // => true
20524
+ */
20525
+ function identity(value) {
20526
+ return value;
20527
+ }
20528
+
20529
+ var lodash_forown = forOwn;
20530
+
20531
+ var lodash_remove = createCommonjsModule(function (module, exports) {
20532
+ /**
20533
+ * lodash (Custom Build) <https://lodash.com/>
20534
+ * Build: `lodash modularize exports="npm" -o ./`
20535
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
20536
+ * Released under MIT license <https://lodash.com/license>
20537
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
20538
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
20539
+ */
20540
+
20541
+ /** Used as the size to enable large array optimizations. */
20542
+ var LARGE_ARRAY_SIZE = 200;
20543
+
20544
+ /** Used as the `TypeError` message for "Functions" methods. */
20545
+ var FUNC_ERROR_TEXT = 'Expected a function';
20546
+
20547
+ /** Used to stand-in for `undefined` hash values. */
20548
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
20549
+
20550
+ /** Used to compose bitmasks for comparison styles. */
20551
+ var UNORDERED_COMPARE_FLAG = 1,
20552
+ PARTIAL_COMPARE_FLAG = 2;
20553
+
20554
+ /** Used as references for various `Number` constants. */
20555
+ var INFINITY = 1 / 0,
20556
+ MAX_SAFE_INTEGER = 9007199254740991;
20557
+
20558
+ /** `Object#toString` result references. */
20559
+ var argsTag = '[object Arguments]',
20560
+ arrayTag = '[object Array]',
20561
+ boolTag = '[object Boolean]',
20562
+ dateTag = '[object Date]',
20563
+ errorTag = '[object Error]',
20564
+ funcTag = '[object Function]',
20565
+ genTag = '[object GeneratorFunction]',
20566
+ mapTag = '[object Map]',
20567
+ numberTag = '[object Number]',
20568
+ objectTag = '[object Object]',
20569
+ promiseTag = '[object Promise]',
20570
+ regexpTag = '[object RegExp]',
20571
+ setTag = '[object Set]',
20572
+ stringTag = '[object String]',
20573
+ symbolTag = '[object Symbol]',
20574
+ weakMapTag = '[object WeakMap]';
20575
+
20576
+ var arrayBufferTag = '[object ArrayBuffer]',
20577
+ dataViewTag = '[object DataView]',
20578
+ float32Tag = '[object Float32Array]',
20579
+ float64Tag = '[object Float64Array]',
20580
+ int8Tag = '[object Int8Array]',
20581
+ int16Tag = '[object Int16Array]',
20582
+ int32Tag = '[object Int32Array]',
20583
+ uint8Tag = '[object Uint8Array]',
20584
+ uint8ClampedTag = '[object Uint8ClampedArray]',
20585
+ uint16Tag = '[object Uint16Array]',
20586
+ uint32Tag = '[object Uint32Array]';
20587
+
20588
+ /** Used to match property names within property paths. */
20589
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
20590
+ reIsPlainProp = /^\w*$/,
20591
+ reLeadingDot = /^\./,
20592
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
20593
+
20594
+ /**
20595
+ * Used to match `RegExp`
20596
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
20597
+ */
20598
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
20599
+
20600
+ /** Used to match backslashes in property paths. */
20601
+ var reEscapeChar = /\\(\\)?/g;
20602
+
20603
+ /** Used to detect host constructors (Safari). */
20604
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
20605
+
20606
+ /** Used to detect unsigned integer values. */
20607
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
20608
+
20609
+ /** Used to identify `toStringTag` values of typed arrays. */
20610
+ var typedArrayTags = {};
20611
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
20612
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
20613
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
20614
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
20615
+ typedArrayTags[uint32Tag] = true;
20616
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
20617
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
20618
+ typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
20619
+ typedArrayTags[errorTag] = typedArrayTags[funcTag] =
20620
+ typedArrayTags[mapTag] = typedArrayTags[numberTag] =
20621
+ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
20622
+ typedArrayTags[setTag] = typedArrayTags[stringTag] =
20623
+ typedArrayTags[weakMapTag] = false;
20624
+
20625
+ /** Detect free variable `global` from Node.js. */
20626
+ var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
20627
+
20628
+ /** Detect free variable `self`. */
20629
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
20630
+
20631
+ /** Used as a reference to the global object. */
20632
+ var root = freeGlobal || freeSelf || Function('return this')();
20633
+
20634
+ /** Detect free variable `exports`. */
20635
+ var freeExports = exports && !exports.nodeType && exports;
20636
+
20637
+ /** Detect free variable `module`. */
20638
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
20639
+
20640
+ /** Detect the popular CommonJS extension `module.exports`. */
20641
+ var moduleExports = freeModule && freeModule.exports === freeExports;
20642
+
20643
+ /** Detect free variable `process` from Node.js. */
20644
+ var freeProcess = moduleExports && freeGlobal.process;
20645
+
20646
+ /** Used to access faster Node.js helpers. */
20647
+ var nodeUtil = (function() {
20648
+ try {
20649
+ return freeProcess && freeProcess.binding('util');
20650
+ } catch (e) {}
20651
+ }());
20652
+
20653
+ /* Node.js helper references. */
20654
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
20655
+
20656
+ /**
20657
+ * A specialized version of `_.some` for arrays without support for iteratee
20658
+ * shorthands.
20659
+ *
20660
+ * @private
20661
+ * @param {Array} [array] The array to iterate over.
20662
+ * @param {Function} predicate The function invoked per iteration.
20663
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
20664
+ * else `false`.
20665
+ */
20666
+ function arraySome(array, predicate) {
20667
+ var index = -1,
20668
+ length = array ? array.length : 0;
20669
+
20670
+ while (++index < length) {
20671
+ if (predicate(array[index], index, array)) {
20672
+ return true;
20673
+ }
20674
+ }
20675
+ return false;
20676
+ }
20677
+
20678
+ /**
20679
+ * The base implementation of `_.property` without support for deep paths.
20680
+ *
20681
+ * @private
20682
+ * @param {string} key The key of the property to get.
20683
+ * @returns {Function} Returns the new accessor function.
20684
+ */
20685
+ function baseProperty(key) {
20686
+ return function(object) {
20687
+ return object == null ? undefined : object[key];
20688
+ };
20689
+ }
20690
+
20691
+ /**
20692
+ * The base implementation of `_.times` without support for iteratee shorthands
20693
+ * or max array length checks.
20694
+ *
20695
+ * @private
20696
+ * @param {number} n The number of times to invoke `iteratee`.
20697
+ * @param {Function} iteratee The function invoked per iteration.
20698
+ * @returns {Array} Returns the array of results.
20699
+ */
20700
+ function baseTimes(n, iteratee) {
20701
+ var index = -1,
20702
+ result = Array(n);
20703
+
20704
+ while (++index < n) {
20705
+ result[index] = iteratee(index);
20706
+ }
20707
+ return result;
20708
+ }
20709
+
20710
+ /**
20711
+ * The base implementation of `_.unary` without support for storing metadata.
20712
+ *
20713
+ * @private
20714
+ * @param {Function} func The function to cap arguments for.
20715
+ * @returns {Function} Returns the new capped function.
20716
+ */
20717
+ function baseUnary(func) {
20718
+ return function(value) {
20719
+ return func(value);
20720
+ };
20721
+ }
20722
+
20723
+ /**
20724
+ * Gets the value at `key` of `object`.
20725
+ *
20726
+ * @private
20727
+ * @param {Object} [object] The object to query.
20728
+ * @param {string} key The key of the property to get.
20729
+ * @returns {*} Returns the property value.
20730
+ */
20731
+ function getValue(object, key) {
20732
+ return object == null ? undefined : object[key];
20733
+ }
20734
+
20735
+ /**
20736
+ * Checks if `value` is a host object in IE < 9.
20737
+ *
20738
+ * @private
20739
+ * @param {*} value The value to check.
20740
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
20741
+ */
20742
+ function isHostObject(value) {
20743
+ // Many host objects are `Object` objects that can coerce to strings
20744
+ // despite having improperly defined `toString` methods.
20745
+ var result = false;
20746
+ if (value != null && typeof value.toString != 'function') {
20747
+ try {
20748
+ result = !!(value + '');
20749
+ } catch (e) {}
20750
+ }
20751
+ return result;
20752
+ }
20753
+
20754
+ /**
20755
+ * Converts `map` to its key-value pairs.
20756
+ *
20757
+ * @private
20758
+ * @param {Object} map The map to convert.
20759
+ * @returns {Array} Returns the key-value pairs.
20760
+ */
20761
+ function mapToArray(map) {
20762
+ var index = -1,
20763
+ result = Array(map.size);
20764
+
20765
+ map.forEach(function(value, key) {
20766
+ result[++index] = [key, value];
20767
+ });
20768
+ return result;
20769
+ }
20770
+
20771
+ /**
20772
+ * Creates a unary function that invokes `func` with its argument transformed.
20773
+ *
20774
+ * @private
20775
+ * @param {Function} func The function to wrap.
20776
+ * @param {Function} transform The argument transform.
20777
+ * @returns {Function} Returns the new function.
20778
+ */
20779
+ function overArg(func, transform) {
20780
+ return function(arg) {
20781
+ return func(transform(arg));
20782
+ };
20783
+ }
20784
+
20785
+ /**
20786
+ * Converts `set` to an array of its values.
20787
+ *
20788
+ * @private
20789
+ * @param {Object} set The set to convert.
20790
+ * @returns {Array} Returns the values.
20791
+ */
20792
+ function setToArray(set) {
20793
+ var index = -1,
20794
+ result = Array(set.size);
20795
+
20796
+ set.forEach(function(value) {
20797
+ result[++index] = value;
20798
+ });
20799
+ return result;
20800
+ }
20801
+
20802
+ /** Used for built-in method references. */
20803
+ var arrayProto = Array.prototype,
20804
+ funcProto = Function.prototype,
20805
+ objectProto = Object.prototype;
20806
+
20807
+ /** Used to detect overreaching core-js shims. */
20808
+ var coreJsData = root['__core-js_shared__'];
20809
+
20810
+ /** Used to detect methods masquerading as native. */
20811
+ var maskSrcKey = (function() {
20812
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
20813
+ return uid ? ('Symbol(src)_1.' + uid) : '';
20814
+ }());
20815
+
20816
+ /** Used to resolve the decompiled source of functions. */
20817
+ var funcToString = funcProto.toString;
20818
+
20819
+ /** Used to check objects for own properties. */
20820
+ var hasOwnProperty = objectProto.hasOwnProperty;
20821
+
20822
+ /**
20823
+ * Used to resolve the
20824
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
20825
+ * of values.
20826
+ */
20827
+ var objectToString = objectProto.toString;
20828
+
20829
+ /** Used to detect if a method is native. */
20830
+ var reIsNative = RegExp('^' +
20831
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
20832
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
20833
+ );
20834
+
20835
+ /** Built-in value references. */
20836
+ var Symbol = root.Symbol,
20837
+ Uint8Array = root.Uint8Array,
20838
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
20839
+ splice = arrayProto.splice;
20840
+
20841
+ /* Built-in method references for those with the same name as other `lodash` methods. */
20842
+ var nativeKeys = overArg(Object.keys, Object);
20843
+
20844
+ /* Built-in method references that are verified to be native. */
20845
+ var DataView = getNative(root, 'DataView'),
20846
+ Map = getNative(root, 'Map'),
20847
+ Promise = getNative(root, 'Promise'),
20848
+ Set = getNative(root, 'Set'),
20849
+ WeakMap = getNative(root, 'WeakMap'),
20850
+ nativeCreate = getNative(Object, 'create');
20851
+
20852
+ /** Used to detect maps, sets, and weakmaps. */
20853
+ var dataViewCtorString = toSource(DataView),
20854
+ mapCtorString = toSource(Map),
20855
+ promiseCtorString = toSource(Promise),
20856
+ setCtorString = toSource(Set),
20857
+ weakMapCtorString = toSource(WeakMap);
20858
+
20859
+ /** Used to convert symbols to primitives and strings. */
20860
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
20861
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
20862
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
20863
+
20864
+ /**
20865
+ * Creates a hash object.
20866
+ *
20867
+ * @private
20868
+ * @constructor
20869
+ * @param {Array} [entries] The key-value pairs to cache.
20870
+ */
20871
+ function Hash(entries) {
20872
+ var index = -1,
20873
+ length = entries ? entries.length : 0;
20874
+
20875
+ this.clear();
20876
+ while (++index < length) {
20877
+ var entry = entries[index];
20878
+ this.set(entry[0], entry[1]);
20879
+ }
20880
+ }
20881
+
20882
+ /**
20883
+ * Removes all key-value entries from the hash.
20884
+ *
20885
+ * @private
20886
+ * @name clear
20887
+ * @memberOf Hash
20888
+ */
20889
+ function hashClear() {
20890
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
20891
+ }
20892
+
20893
+ /**
20894
+ * Removes `key` and its value from the hash.
20895
+ *
20896
+ * @private
20897
+ * @name delete
20898
+ * @memberOf Hash
20899
+ * @param {Object} hash The hash to modify.
20900
+ * @param {string} key The key of the value to remove.
20901
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
20902
+ */
20903
+ function hashDelete(key) {
20904
+ return this.has(key) && delete this.__data__[key];
20905
+ }
20906
+
20907
+ /**
20908
+ * Gets the hash value for `key`.
20909
+ *
20910
+ * @private
20911
+ * @name get
20912
+ * @memberOf Hash
20913
+ * @param {string} key The key of the value to get.
20914
+ * @returns {*} Returns the entry value.
20915
+ */
20916
+ function hashGet(key) {
20917
+ var data = this.__data__;
20918
+ if (nativeCreate) {
20919
+ var result = data[key];
20920
+ return result === HASH_UNDEFINED ? undefined : result;
20921
+ }
20922
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
20923
+ }
20924
+
20925
+ /**
20926
+ * Checks if a hash value for `key` exists.
20927
+ *
20928
+ * @private
20929
+ * @name has
20930
+ * @memberOf Hash
20931
+ * @param {string} key The key of the entry to check.
20932
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
20933
+ */
20934
+ function hashHas(key) {
20935
+ var data = this.__data__;
20936
+ return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
20937
+ }
20938
+
20939
+ /**
20940
+ * Sets the hash `key` to `value`.
20941
+ *
20942
+ * @private
20943
+ * @name set
20944
+ * @memberOf Hash
20945
+ * @param {string} key The key of the value to set.
20946
+ * @param {*} value The value to set.
20947
+ * @returns {Object} Returns the hash instance.
20948
+ */
20949
+ function hashSet(key, value) {
20950
+ var data = this.__data__;
20951
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
20952
+ return this;
20953
+ }
20954
+
20955
+ // Add methods to `Hash`.
20956
+ Hash.prototype.clear = hashClear;
20957
+ Hash.prototype['delete'] = hashDelete;
20958
+ Hash.prototype.get = hashGet;
20959
+ Hash.prototype.has = hashHas;
20960
+ Hash.prototype.set = hashSet;
20961
+
20962
+ /**
20963
+ * Creates an list cache object.
20964
+ *
20965
+ * @private
20966
+ * @constructor
20967
+ * @param {Array} [entries] The key-value pairs to cache.
20968
+ */
20969
+ function ListCache(entries) {
20970
+ var index = -1,
20971
+ length = entries ? entries.length : 0;
20972
+
20973
+ this.clear();
20974
+ while (++index < length) {
20975
+ var entry = entries[index];
20976
+ this.set(entry[0], entry[1]);
20977
+ }
20978
+ }
20979
+
20980
+ /**
20981
+ * Removes all key-value entries from the list cache.
20982
+ *
20983
+ * @private
20984
+ * @name clear
20985
+ * @memberOf ListCache
20986
+ */
20987
+ function listCacheClear() {
20988
+ this.__data__ = [];
20989
+ }
20990
+
20991
+ /**
20992
+ * Removes `key` and its value from the list cache.
20993
+ *
20994
+ * @private
20995
+ * @name delete
20996
+ * @memberOf ListCache
20997
+ * @param {string} key The key of the value to remove.
20998
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
20999
+ */
21000
+ function listCacheDelete(key) {
21001
+ var data = this.__data__,
21002
+ index = assocIndexOf(data, key);
21003
+
21004
+ if (index < 0) {
21005
+ return false;
21006
+ }
21007
+ var lastIndex = data.length - 1;
21008
+ if (index == lastIndex) {
21009
+ data.pop();
21010
+ } else {
21011
+ splice.call(data, index, 1);
21012
+ }
21013
+ return true;
21014
+ }
21015
+
21016
+ /**
21017
+ * Gets the list cache value for `key`.
21018
+ *
21019
+ * @private
21020
+ * @name get
21021
+ * @memberOf ListCache
21022
+ * @param {string} key The key of the value to get.
21023
+ * @returns {*} Returns the entry value.
21024
+ */
21025
+ function listCacheGet(key) {
21026
+ var data = this.__data__,
21027
+ index = assocIndexOf(data, key);
21028
+
21029
+ return index < 0 ? undefined : data[index][1];
21030
+ }
21031
+
21032
+ /**
21033
+ * Checks if a list cache value for `key` exists.
21034
+ *
21035
+ * @private
21036
+ * @name has
21037
+ * @memberOf ListCache
21038
+ * @param {string} key The key of the entry to check.
21039
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
21040
+ */
21041
+ function listCacheHas(key) {
21042
+ return assocIndexOf(this.__data__, key) > -1;
21043
+ }
21044
+
21045
+ /**
21046
+ * Sets the list cache `key` to `value`.
21047
+ *
21048
+ * @private
21049
+ * @name set
21050
+ * @memberOf ListCache
21051
+ * @param {string} key The key of the value to set.
21052
+ * @param {*} value The value to set.
21053
+ * @returns {Object} Returns the list cache instance.
21054
+ */
21055
+ function listCacheSet(key, value) {
21056
+ var data = this.__data__,
21057
+ index = assocIndexOf(data, key);
21058
+
21059
+ if (index < 0) {
21060
+ data.push([key, value]);
21061
+ } else {
21062
+ data[index][1] = value;
21063
+ }
21064
+ return this;
21065
+ }
21066
+
21067
+ // Add methods to `ListCache`.
21068
+ ListCache.prototype.clear = listCacheClear;
21069
+ ListCache.prototype['delete'] = listCacheDelete;
21070
+ ListCache.prototype.get = listCacheGet;
21071
+ ListCache.prototype.has = listCacheHas;
21072
+ ListCache.prototype.set = listCacheSet;
21073
+
21074
+ /**
21075
+ * Creates a map cache object to store key-value pairs.
21076
+ *
21077
+ * @private
21078
+ * @constructor
21079
+ * @param {Array} [entries] The key-value pairs to cache.
21080
+ */
21081
+ function MapCache(entries) {
21082
+ var index = -1,
21083
+ length = entries ? entries.length : 0;
21084
+
21085
+ this.clear();
21086
+ while (++index < length) {
21087
+ var entry = entries[index];
21088
+ this.set(entry[0], entry[1]);
21089
+ }
21090
+ }
21091
+
21092
+ /**
21093
+ * Removes all key-value entries from the map.
21094
+ *
21095
+ * @private
21096
+ * @name clear
21097
+ * @memberOf MapCache
21098
+ */
21099
+ function mapCacheClear() {
21100
+ this.__data__ = {
21101
+ 'hash': new Hash,
21102
+ 'map': new (Map || ListCache),
21103
+ 'string': new Hash
21104
+ };
21105
+ }
21106
+
21107
+ /**
21108
+ * Removes `key` and its value from the map.
21109
+ *
21110
+ * @private
21111
+ * @name delete
21112
+ * @memberOf MapCache
21113
+ * @param {string} key The key of the value to remove.
21114
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
21115
+ */
21116
+ function mapCacheDelete(key) {
21117
+ return getMapData(this, key)['delete'](key);
21118
+ }
21119
+
21120
+ /**
21121
+ * Gets the map value for `key`.
21122
+ *
21123
+ * @private
21124
+ * @name get
21125
+ * @memberOf MapCache
21126
+ * @param {string} key The key of the value to get.
21127
+ * @returns {*} Returns the entry value.
21128
+ */
21129
+ function mapCacheGet(key) {
21130
+ return getMapData(this, key).get(key);
21131
+ }
21132
+
21133
+ /**
21134
+ * Checks if a map value for `key` exists.
21135
+ *
21136
+ * @private
21137
+ * @name has
21138
+ * @memberOf MapCache
21139
+ * @param {string} key The key of the entry to check.
21140
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
21141
+ */
21142
+ function mapCacheHas(key) {
21143
+ return getMapData(this, key).has(key);
21144
+ }
21145
+
21146
+ /**
21147
+ * Sets the map `key` to `value`.
21148
+ *
21149
+ * @private
21150
+ * @name set
21151
+ * @memberOf MapCache
21152
+ * @param {string} key The key of the value to set.
21153
+ * @param {*} value The value to set.
21154
+ * @returns {Object} Returns the map cache instance.
21155
+ */
21156
+ function mapCacheSet(key, value) {
21157
+ getMapData(this, key).set(key, value);
21158
+ return this;
21159
+ }
21160
+
21161
+ // Add methods to `MapCache`.
21162
+ MapCache.prototype.clear = mapCacheClear;
21163
+ MapCache.prototype['delete'] = mapCacheDelete;
21164
+ MapCache.prototype.get = mapCacheGet;
21165
+ MapCache.prototype.has = mapCacheHas;
21166
+ MapCache.prototype.set = mapCacheSet;
21167
+
21168
+ /**
21169
+ *
21170
+ * Creates an array cache object to store unique values.
21171
+ *
21172
+ * @private
21173
+ * @constructor
21174
+ * @param {Array} [values] The values to cache.
21175
+ */
21176
+ function SetCache(values) {
21177
+ var index = -1,
21178
+ length = values ? values.length : 0;
21179
+
21180
+ this.__data__ = new MapCache;
21181
+ while (++index < length) {
21182
+ this.add(values[index]);
21183
+ }
21184
+ }
21185
+
21186
+ /**
21187
+ * Adds `value` to the array cache.
21188
+ *
21189
+ * @private
21190
+ * @name add
21191
+ * @memberOf SetCache
21192
+ * @alias push
21193
+ * @param {*} value The value to cache.
21194
+ * @returns {Object} Returns the cache instance.
21195
+ */
21196
+ function setCacheAdd(value) {
21197
+ this.__data__.set(value, HASH_UNDEFINED);
21198
+ return this;
21199
+ }
21200
+
21201
+ /**
21202
+ * Checks if `value` is in the array cache.
21203
+ *
21204
+ * @private
21205
+ * @name has
21206
+ * @memberOf SetCache
21207
+ * @param {*} value The value to search for.
21208
+ * @returns {number} Returns `true` if `value` is found, else `false`.
21209
+ */
21210
+ function setCacheHas(value) {
21211
+ return this.__data__.has(value);
21212
+ }
21213
+
21214
+ // Add methods to `SetCache`.
21215
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
21216
+ SetCache.prototype.has = setCacheHas;
21217
+
21218
+ /**
21219
+ * Creates a stack cache object to store key-value pairs.
21220
+ *
21221
+ * @private
21222
+ * @constructor
21223
+ * @param {Array} [entries] The key-value pairs to cache.
21224
+ */
21225
+ function Stack(entries) {
21226
+ this.__data__ = new ListCache(entries);
21227
+ }
21228
+
21229
+ /**
21230
+ * Removes all key-value entries from the stack.
21231
+ *
21232
+ * @private
21233
+ * @name clear
21234
+ * @memberOf Stack
21235
+ */
21236
+ function stackClear() {
21237
+ this.__data__ = new ListCache;
21238
+ }
21239
+
21240
+ /**
21241
+ * Removes `key` and its value from the stack.
21242
+ *
21243
+ * @private
21244
+ * @name delete
21245
+ * @memberOf Stack
21246
+ * @param {string} key The key of the value to remove.
21247
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
21248
+ */
21249
+ function stackDelete(key) {
21250
+ return this.__data__['delete'](key);
21251
+ }
21252
+
21253
+ /**
21254
+ * Gets the stack value for `key`.
21255
+ *
21256
+ * @private
21257
+ * @name get
21258
+ * @memberOf Stack
21259
+ * @param {string} key The key of the value to get.
21260
+ * @returns {*} Returns the entry value.
21261
+ */
21262
+ function stackGet(key) {
21263
+ return this.__data__.get(key);
21264
+ }
21265
+
21266
+ /**
21267
+ * Checks if a stack value for `key` exists.
21268
+ *
21269
+ * @private
21270
+ * @name has
21271
+ * @memberOf Stack
21272
+ * @param {string} key The key of the entry to check.
21273
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
21274
+ */
21275
+ function stackHas(key) {
21276
+ return this.__data__.has(key);
21277
+ }
21278
+
21279
+ /**
21280
+ * Sets the stack `key` to `value`.
21281
+ *
21282
+ * @private
21283
+ * @name set
21284
+ * @memberOf Stack
21285
+ * @param {string} key The key of the value to set.
21286
+ * @param {*} value The value to set.
21287
+ * @returns {Object} Returns the stack cache instance.
21288
+ */
21289
+ function stackSet(key, value) {
21290
+ var cache = this.__data__;
21291
+ if (cache instanceof ListCache) {
21292
+ var pairs = cache.__data__;
21293
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
21294
+ pairs.push([key, value]);
21295
+ return this;
21296
+ }
21297
+ cache = this.__data__ = new MapCache(pairs);
21298
+ }
21299
+ cache.set(key, value);
21300
+ return this;
21301
+ }
21302
+
21303
+ // Add methods to `Stack`.
21304
+ Stack.prototype.clear = stackClear;
21305
+ Stack.prototype['delete'] = stackDelete;
21306
+ Stack.prototype.get = stackGet;
21307
+ Stack.prototype.has = stackHas;
21308
+ Stack.prototype.set = stackSet;
21309
+
21310
+ /**
21311
+ * Creates an array of the enumerable property names of the array-like `value`.
21312
+ *
21313
+ * @private
21314
+ * @param {*} value The value to query.
21315
+ * @param {boolean} inherited Specify returning inherited property names.
21316
+ * @returns {Array} Returns the array of property names.
21317
+ */
21318
+ function arrayLikeKeys(value, inherited) {
21319
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
21320
+ // Safari 9 makes `arguments.length` enumerable in strict mode.
21321
+ var result = (isArray(value) || isArguments(value))
21322
+ ? baseTimes(value.length, String)
21323
+ : [];
21324
+
21325
+ var length = result.length,
21326
+ skipIndexes = !!length;
21327
+
21328
+ for (var key in value) {
21329
+ if ((inherited || hasOwnProperty.call(value, key)) &&
21330
+ !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
21331
+ result.push(key);
21332
+ }
21333
+ }
21334
+ return result;
21335
+ }
21336
+
21337
+ /**
21338
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
21339
+ *
21340
+ * @private
21341
+ * @param {Array} array The array to inspect.
21342
+ * @param {*} key The key to search for.
21343
+ * @returns {number} Returns the index of the matched value, else `-1`.
21344
+ */
21345
+ function assocIndexOf(array, key) {
21346
+ var length = array.length;
21347
+ while (length--) {
21348
+ if (eq(array[length][0], key)) {
21349
+ return length;
21350
+ }
21351
+ }
21352
+ return -1;
21353
+ }
21354
+
21355
+ /**
21356
+ * The base implementation of `_.get` without support for default values.
21357
+ *
21358
+ * @private
21359
+ * @param {Object} object The object to query.
21360
+ * @param {Array|string} path The path of the property to get.
21361
+ * @returns {*} Returns the resolved value.
21362
+ */
21363
+ function baseGet(object, path) {
21364
+ path = isKey(path, object) ? [path] : castPath(path);
21365
+
21366
+ var index = 0,
21367
+ length = path.length;
21368
+
21369
+ while (object != null && index < length) {
21370
+ object = object[toKey(path[index++])];
21371
+ }
21372
+ return (index && index == length) ? object : undefined;
21373
+ }
21374
+
21375
+ /**
21376
+ * The base implementation of `getTag`.
21377
+ *
21378
+ * @private
21379
+ * @param {*} value The value to query.
21380
+ * @returns {string} Returns the `toStringTag`.
21381
+ */
21382
+ function baseGetTag(value) {
21383
+ return objectToString.call(value);
21384
+ }
21385
+
21386
+ /**
21387
+ * The base implementation of `_.hasIn` without support for deep paths.
21388
+ *
21389
+ * @private
21390
+ * @param {Object} [object] The object to query.
21391
+ * @param {Array|string} key The key to check.
21392
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
21393
+ */
21394
+ function baseHasIn(object, key) {
21395
+ return object != null && key in Object(object);
21396
+ }
21397
+
21398
+ /**
21399
+ * The base implementation of `_.isEqual` which supports partial comparisons
21400
+ * and tracks traversed objects.
21401
+ *
21402
+ * @private
21403
+ * @param {*} value The value to compare.
21404
+ * @param {*} other The other value to compare.
21405
+ * @param {Function} [customizer] The function to customize comparisons.
21406
+ * @param {boolean} [bitmask] The bitmask of comparison flags.
21407
+ * The bitmask may be composed of the following flags:
21408
+ * 1 - Unordered comparison
21409
+ * 2 - Partial comparison
21410
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
21411
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
21412
+ */
21413
+ function baseIsEqual(value, other, customizer, bitmask, stack) {
21414
+ if (value === other) {
21415
+ return true;
21416
+ }
21417
+ if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
21418
+ return value !== value && other !== other;
21419
+ }
21420
+ return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
21421
+ }
21422
+
21423
+ /**
21424
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
21425
+ * deep comparisons and tracks traversed objects enabling objects with circular
21426
+ * references to be compared.
21427
+ *
21428
+ * @private
21429
+ * @param {Object} object The object to compare.
21430
+ * @param {Object} other The other object to compare.
21431
+ * @param {Function} equalFunc The function to determine equivalents of values.
21432
+ * @param {Function} [customizer] The function to customize comparisons.
21433
+ * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`
21434
+ * for more details.
21435
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
21436
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
21437
+ */
21438
+ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
21439
+ var objIsArr = isArray(object),
21440
+ othIsArr = isArray(other),
21441
+ objTag = arrayTag,
21442
+ othTag = arrayTag;
21443
+
21444
+ if (!objIsArr) {
21445
+ objTag = getTag(object);
21446
+ objTag = objTag == argsTag ? objectTag : objTag;
21447
+ }
21448
+ if (!othIsArr) {
21449
+ othTag = getTag(other);
21450
+ othTag = othTag == argsTag ? objectTag : othTag;
21451
+ }
21452
+ var objIsObj = objTag == objectTag && !isHostObject(object),
21453
+ othIsObj = othTag == objectTag && !isHostObject(other),
21454
+ isSameTag = objTag == othTag;
21455
+
21456
+ if (isSameTag && !objIsObj) {
21457
+ stack || (stack = new Stack);
21458
+ return (objIsArr || isTypedArray(object))
21459
+ ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
21460
+ : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
21461
+ }
21462
+ if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
21463
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
21464
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
21465
+
21466
+ if (objIsWrapped || othIsWrapped) {
21467
+ var objUnwrapped = objIsWrapped ? object.value() : object,
21468
+ othUnwrapped = othIsWrapped ? other.value() : other;
21469
+
21470
+ stack || (stack = new Stack);
21471
+ return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
21472
+ }
21473
+ }
21474
+ if (!isSameTag) {
21475
+ return false;
21476
+ }
21477
+ stack || (stack = new Stack);
21478
+ return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
21479
+ }
21480
+
21481
+ /**
21482
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
21483
+ *
21484
+ * @private
21485
+ * @param {Object} object The object to inspect.
21486
+ * @param {Object} source The object of property values to match.
21487
+ * @param {Array} matchData The property names, values, and compare flags to match.
21488
+ * @param {Function} [customizer] The function to customize comparisons.
21489
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
21490
+ */
21491
+ function baseIsMatch(object, source, matchData, customizer) {
21492
+ var index = matchData.length,
21493
+ length = index,
21494
+ noCustomizer = !customizer;
21495
+
21496
+ if (object == null) {
21497
+ return !length;
21498
+ }
21499
+ object = Object(object);
21500
+ while (index--) {
21501
+ var data = matchData[index];
21502
+ if ((noCustomizer && data[2])
21503
+ ? data[1] !== object[data[0]]
21504
+ : !(data[0] in object)
21505
+ ) {
21506
+ return false;
21507
+ }
21508
+ }
21509
+ while (++index < length) {
21510
+ data = matchData[index];
21511
+ var key = data[0],
21512
+ objValue = object[key],
21513
+ srcValue = data[1];
21514
+
21515
+ if (noCustomizer && data[2]) {
21516
+ if (objValue === undefined && !(key in object)) {
21517
+ return false;
21518
+ }
21519
+ } else {
21520
+ var stack = new Stack;
21521
+ if (customizer) {
21522
+ var result = customizer(objValue, srcValue, key, object, source, stack);
21523
+ }
21524
+ if (!(result === undefined
21525
+ ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)
21526
+ : result
21527
+ )) {
21528
+ return false;
21529
+ }
21530
+ }
21531
+ }
21532
+ return true;
21533
+ }
21534
+
21535
+ /**
21536
+ * The base implementation of `_.isNative` without bad shim checks.
21537
+ *
21538
+ * @private
21539
+ * @param {*} value The value to check.
21540
+ * @returns {boolean} Returns `true` if `value` is a native function,
21541
+ * else `false`.
21542
+ */
21543
+ function baseIsNative(value) {
21544
+ if (!isObject(value) || isMasked(value)) {
21545
+ return false;
21546
+ }
21547
+ var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
21548
+ return pattern.test(toSource(value));
21549
+ }
21550
+
21551
+ /**
21552
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
21553
+ *
21554
+ * @private
21555
+ * @param {*} value The value to check.
21556
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
21557
+ */
21558
+ function baseIsTypedArray(value) {
21559
+ return isObjectLike(value) &&
21560
+ isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
21561
+ }
21562
+
21563
+ /**
21564
+ * The base implementation of `_.iteratee`.
21565
+ *
21566
+ * @private
21567
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
21568
+ * @returns {Function} Returns the iteratee.
21569
+ */
21570
+ function baseIteratee(value) {
21571
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
21572
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
21573
+ if (typeof value == 'function') {
21574
+ return value;
21575
+ }
21576
+ if (value == null) {
21577
+ return identity;
21578
+ }
21579
+ if (typeof value == 'object') {
21580
+ return isArray(value)
21581
+ ? baseMatchesProperty(value[0], value[1])
21582
+ : baseMatches(value);
21583
+ }
21584
+ return property(value);
21585
+ }
21586
+
21587
+ /**
21588
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
21589
+ *
21590
+ * @private
21591
+ * @param {Object} object The object to query.
21592
+ * @returns {Array} Returns the array of property names.
21593
+ */
21594
+ function baseKeys(object) {
21595
+ if (!isPrototype(object)) {
21596
+ return nativeKeys(object);
21597
+ }
21598
+ var result = [];
21599
+ for (var key in Object(object)) {
21600
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
21601
+ result.push(key);
21602
+ }
21603
+ }
21604
+ return result;
21605
+ }
21606
+
21607
+ /**
21608
+ * The base implementation of `_.matches` which doesn't clone `source`.
21609
+ *
21610
+ * @private
21611
+ * @param {Object} source The object of property values to match.
21612
+ * @returns {Function} Returns the new spec function.
21613
+ */
21614
+ function baseMatches(source) {
21615
+ var matchData = getMatchData(source);
21616
+ if (matchData.length == 1 && matchData[0][2]) {
21617
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
21618
+ }
21619
+ return function(object) {
21620
+ return object === source || baseIsMatch(object, source, matchData);
21621
+ };
21622
+ }
21623
+
21624
+ /**
21625
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
21626
+ *
21627
+ * @private
21628
+ * @param {string} path The path of the property to get.
21629
+ * @param {*} srcValue The value to match.
21630
+ * @returns {Function} Returns the new spec function.
21631
+ */
21632
+ function baseMatchesProperty(path, srcValue) {
21633
+ if (isKey(path) && isStrictComparable(srcValue)) {
21634
+ return matchesStrictComparable(toKey(path), srcValue);
21635
+ }
21636
+ return function(object) {
21637
+ var objValue = get(object, path);
21638
+ return (objValue === undefined && objValue === srcValue)
21639
+ ? hasIn(object, path)
21640
+ : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
21641
+ };
21642
+ }
21643
+
21644
+ /**
21645
+ * A specialized version of `baseProperty` which supports deep paths.
21646
+ *
21647
+ * @private
21648
+ * @param {Array|string} path The path of the property to get.
21649
+ * @returns {Function} Returns the new accessor function.
21650
+ */
21651
+ function basePropertyDeep(path) {
21652
+ return function(object) {
21653
+ return baseGet(object, path);
21654
+ };
21655
+ }
21656
+
21657
+ /**
21658
+ * The base implementation of `_.pullAt` without support for individual
21659
+ * indexes or capturing the removed elements.
21660
+ *
21661
+ * @private
21662
+ * @param {Array} array The array to modify.
21663
+ * @param {number[]} indexes The indexes of elements to remove.
21664
+ * @returns {Array} Returns `array`.
21665
+ */
21666
+ function basePullAt(array, indexes) {
21667
+ var length = array ? indexes.length : 0,
21668
+ lastIndex = length - 1;
21669
+
21670
+ while (length--) {
21671
+ var index = indexes[length];
21672
+ if (length == lastIndex || index !== previous) {
21673
+ var previous = index;
21674
+ if (isIndex(index)) {
21675
+ splice.call(array, index, 1);
21676
+ }
21677
+ else if (!isKey(index, array)) {
21678
+ var path = castPath(index),
21679
+ object = parent(array, path);
21680
+
21681
+ if (object != null) {
21682
+ delete object[toKey(last(path))];
21683
+ }
21684
+ }
21685
+ else {
21686
+ delete array[toKey(index)];
21687
+ }
21688
+ }
21689
+ }
21690
+ return array;
21691
+ }
21692
+
21693
+ /**
21694
+ * The base implementation of `_.slice` without an iteratee call guard.
21695
+ *
21696
+ * @private
21697
+ * @param {Array} array The array to slice.
21698
+ * @param {number} [start=0] The start position.
21699
+ * @param {number} [end=array.length] The end position.
21700
+ * @returns {Array} Returns the slice of `array`.
21701
+ */
21702
+ function baseSlice(array, start, end) {
21703
+ var index = -1,
21704
+ length = array.length;
21705
+
21706
+ if (start < 0) {
21707
+ start = -start > length ? 0 : (length + start);
21708
+ }
21709
+ end = end > length ? length : end;
21710
+ if (end < 0) {
21711
+ end += length;
21712
+ }
21713
+ length = start > end ? 0 : ((end - start) >>> 0);
21714
+ start >>>= 0;
21715
+
21716
+ var result = Array(length);
21717
+ while (++index < length) {
21718
+ result[index] = array[index + start];
21719
+ }
21720
+ return result;
21721
+ }
21722
+
21723
+ /**
21724
+ * The base implementation of `_.toString` which doesn't convert nullish
21725
+ * values to empty strings.
21726
+ *
21727
+ * @private
21728
+ * @param {*} value The value to process.
21729
+ * @returns {string} Returns the string.
21730
+ */
21731
+ function baseToString(value) {
21732
+ // Exit early for strings to avoid a performance hit in some environments.
21733
+ if (typeof value == 'string') {
21734
+ return value;
21735
+ }
21736
+ if (isSymbol(value)) {
21737
+ return symbolToString ? symbolToString.call(value) : '';
21738
+ }
21739
+ var result = (value + '');
21740
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
21741
+ }
21742
+
21743
+ /**
21744
+ * Casts `value` to a path array if it's not one.
21745
+ *
21746
+ * @private
21747
+ * @param {*} value The value to inspect.
21748
+ * @returns {Array} Returns the cast property path array.
21749
+ */
21750
+ function castPath(value) {
21751
+ return isArray(value) ? value : stringToPath(value);
21752
+ }
21753
+
21754
+ /**
21755
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
21756
+ * partial deep comparisons.
21757
+ *
21758
+ * @private
21759
+ * @param {Array} array The array to compare.
21760
+ * @param {Array} other The other array to compare.
21761
+ * @param {Function} equalFunc The function to determine equivalents of values.
21762
+ * @param {Function} customizer The function to customize comparisons.
21763
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
21764
+ * for more details.
21765
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
21766
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
21767
+ */
21768
+ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
21769
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
21770
+ arrLength = array.length,
21771
+ othLength = other.length;
21772
+
21773
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
21774
+ return false;
21775
+ }
21776
+ // Assume cyclic values are equal.
21777
+ var stacked = stack.get(array);
21778
+ if (stacked && stack.get(other)) {
21779
+ return stacked == other;
21780
+ }
21781
+ var index = -1,
21782
+ result = true,
21783
+ seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;
21784
+
21785
+ stack.set(array, other);
21786
+ stack.set(other, array);
21787
+
21788
+ // Ignore non-index properties.
21789
+ while (++index < arrLength) {
21790
+ var arrValue = array[index],
21791
+ othValue = other[index];
21792
+
21793
+ if (customizer) {
21794
+ var compared = isPartial
21795
+ ? customizer(othValue, arrValue, index, other, array, stack)
21796
+ : customizer(arrValue, othValue, index, array, other, stack);
21797
+ }
21798
+ if (compared !== undefined) {
21799
+ if (compared) {
21800
+ continue;
21801
+ }
21802
+ result = false;
21803
+ break;
21804
+ }
21805
+ // Recursively compare arrays (susceptible to call stack limits).
21806
+ if (seen) {
21807
+ if (!arraySome(other, function(othValue, othIndex) {
21808
+ if (!seen.has(othIndex) &&
21809
+ (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
21810
+ return seen.add(othIndex);
21811
+ }
21812
+ })) {
21813
+ result = false;
21814
+ break;
21815
+ }
21816
+ } else if (!(
21817
+ arrValue === othValue ||
21818
+ equalFunc(arrValue, othValue, customizer, bitmask, stack)
21819
+ )) {
21820
+ result = false;
21821
+ break;
21822
+ }
21823
+ }
21824
+ stack['delete'](array);
21825
+ stack['delete'](other);
21826
+ return result;
21827
+ }
21828
+
21829
+ /**
21830
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
21831
+ * the same `toStringTag`.
21832
+ *
21833
+ * **Note:** This function only supports comparing values with tags of
21834
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
21835
+ *
21836
+ * @private
21837
+ * @param {Object} object The object to compare.
21838
+ * @param {Object} other The other object to compare.
21839
+ * @param {string} tag The `toStringTag` of the objects to compare.
21840
+ * @param {Function} equalFunc The function to determine equivalents of values.
21841
+ * @param {Function} customizer The function to customize comparisons.
21842
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
21843
+ * for more details.
21844
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
21845
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
21846
+ */
21847
+ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
21848
+ switch (tag) {
21849
+ case dataViewTag:
21850
+ if ((object.byteLength != other.byteLength) ||
21851
+ (object.byteOffset != other.byteOffset)) {
21852
+ return false;
21853
+ }
21854
+ object = object.buffer;
21855
+ other = other.buffer;
21856
+
21857
+ case arrayBufferTag:
21858
+ if ((object.byteLength != other.byteLength) ||
21859
+ !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
21860
+ return false;
21861
+ }
21862
+ return true;
21863
+
21864
+ case boolTag:
21865
+ case dateTag:
21866
+ case numberTag:
21867
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
21868
+ // Invalid dates are coerced to `NaN`.
21869
+ return eq(+object, +other);
21870
+
21871
+ case errorTag:
21872
+ return object.name == other.name && object.message == other.message;
21873
+
21874
+ case regexpTag:
21875
+ case stringTag:
21876
+ // Coerce regexes to strings and treat strings, primitives and objects,
21877
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
21878
+ // for more details.
21879
+ return object == (other + '');
21880
+
21881
+ case mapTag:
21882
+ var convert = mapToArray;
21883
+
21884
+ case setTag:
21885
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
21886
+ convert || (convert = setToArray);
21887
+
21888
+ if (object.size != other.size && !isPartial) {
21889
+ return false;
21890
+ }
21891
+ // Assume cyclic values are equal.
21892
+ var stacked = stack.get(object);
21893
+ if (stacked) {
21894
+ return stacked == other;
21895
+ }
21896
+ bitmask |= UNORDERED_COMPARE_FLAG;
21897
+
21898
+ // Recursively compare objects (susceptible to call stack limits).
21899
+ stack.set(object, other);
21900
+ var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
21901
+ stack['delete'](object);
21902
+ return result;
21903
+
21904
+ case symbolTag:
21905
+ if (symbolValueOf) {
21906
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
21907
+ }
21908
+ }
21909
+ return false;
21910
+ }
21911
+
21912
+ /**
21913
+ * A specialized version of `baseIsEqualDeep` for objects with support for
21914
+ * partial deep comparisons.
21915
+ *
21916
+ * @private
21917
+ * @param {Object} object The object to compare.
21918
+ * @param {Object} other The other object to compare.
21919
+ * @param {Function} equalFunc The function to determine equivalents of values.
21920
+ * @param {Function} customizer The function to customize comparisons.
21921
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
21922
+ * for more details.
21923
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
21924
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
21925
+ */
21926
+ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
21927
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
21928
+ objProps = keys(object),
21929
+ objLength = objProps.length,
21930
+ othProps = keys(other),
21931
+ othLength = othProps.length;
21932
+
21933
+ if (objLength != othLength && !isPartial) {
21934
+ return false;
21935
+ }
21936
+ var index = objLength;
21937
+ while (index--) {
21938
+ var key = objProps[index];
21939
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
21940
+ return false;
21941
+ }
21942
+ }
21943
+ // Assume cyclic values are equal.
21944
+ var stacked = stack.get(object);
21945
+ if (stacked && stack.get(other)) {
21946
+ return stacked == other;
21947
+ }
21948
+ var result = true;
21949
+ stack.set(object, other);
21950
+ stack.set(other, object);
21951
+
21952
+ var skipCtor = isPartial;
21953
+ while (++index < objLength) {
21954
+ key = objProps[index];
21955
+ var objValue = object[key],
21956
+ othValue = other[key];
21957
+
21958
+ if (customizer) {
21959
+ var compared = isPartial
21960
+ ? customizer(othValue, objValue, key, other, object, stack)
21961
+ : customizer(objValue, othValue, key, object, other, stack);
21962
+ }
21963
+ // Recursively compare objects (susceptible to call stack limits).
21964
+ if (!(compared === undefined
21965
+ ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))
21966
+ : compared
21967
+ )) {
21968
+ result = false;
21969
+ break;
21970
+ }
21971
+ skipCtor || (skipCtor = key == 'constructor');
21972
+ }
21973
+ if (result && !skipCtor) {
21974
+ var objCtor = object.constructor,
21975
+ othCtor = other.constructor;
21976
+
21977
+ // Non `Object` object instances with different constructors are not equal.
21978
+ if (objCtor != othCtor &&
21979
+ ('constructor' in object && 'constructor' in other) &&
21980
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
21981
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
21982
+ result = false;
21983
+ }
21984
+ }
21985
+ stack['delete'](object);
21986
+ stack['delete'](other);
21987
+ return result;
21988
+ }
21989
+
21990
+ /**
21991
+ * Gets the data for `map`.
21992
+ *
21993
+ * @private
21994
+ * @param {Object} map The map to query.
21995
+ * @param {string} key The reference key.
21996
+ * @returns {*} Returns the map data.
21997
+ */
21998
+ function getMapData(map, key) {
21999
+ var data = map.__data__;
22000
+ return isKeyable(key)
22001
+ ? data[typeof key == 'string' ? 'string' : 'hash']
22002
+ : data.map;
22003
+ }
22004
+
22005
+ /**
22006
+ * Gets the property names, values, and compare flags of `object`.
22007
+ *
22008
+ * @private
22009
+ * @param {Object} object The object to query.
22010
+ * @returns {Array} Returns the match data of `object`.
22011
+ */
22012
+ function getMatchData(object) {
22013
+ var result = keys(object),
22014
+ length = result.length;
22015
+
22016
+ while (length--) {
22017
+ var key = result[length],
22018
+ value = object[key];
22019
+
22020
+ result[length] = [key, value, isStrictComparable(value)];
22021
+ }
22022
+ return result;
22023
+ }
22024
+
22025
+ /**
22026
+ * Gets the native function at `key` of `object`.
22027
+ *
22028
+ * @private
22029
+ * @param {Object} object The object to query.
22030
+ * @param {string} key The key of the method to get.
22031
+ * @returns {*} Returns the function if it's native, else `undefined`.
22032
+ */
22033
+ function getNative(object, key) {
22034
+ var value = getValue(object, key);
22035
+ return baseIsNative(value) ? value : undefined;
22036
+ }
22037
+
22038
+ /**
22039
+ * Gets the `toStringTag` of `value`.
22040
+ *
22041
+ * @private
22042
+ * @param {*} value The value to query.
22043
+ * @returns {string} Returns the `toStringTag`.
22044
+ */
22045
+ var getTag = baseGetTag;
22046
+
22047
+ // Fallback for data views, maps, sets, and weak maps in IE 11,
22048
+ // for data views in Edge < 14, and promises in Node.js.
22049
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
22050
+ (Map && getTag(new Map) != mapTag) ||
22051
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
22052
+ (Set && getTag(new Set) != setTag) ||
22053
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
22054
+ getTag = function(value) {
22055
+ var result = objectToString.call(value),
22056
+ Ctor = result == objectTag ? value.constructor : undefined,
22057
+ ctorString = Ctor ? toSource(Ctor) : undefined;
22058
+
22059
+ if (ctorString) {
22060
+ switch (ctorString) {
22061
+ case dataViewCtorString: return dataViewTag;
22062
+ case mapCtorString: return mapTag;
22063
+ case promiseCtorString: return promiseTag;
22064
+ case setCtorString: return setTag;
22065
+ case weakMapCtorString: return weakMapTag;
22066
+ }
22067
+ }
22068
+ return result;
22069
+ };
22070
+ }
22071
+
22072
+ /**
22073
+ * Checks if `path` exists on `object`.
22074
+ *
22075
+ * @private
22076
+ * @param {Object} object The object to query.
22077
+ * @param {Array|string} path The path to check.
22078
+ * @param {Function} hasFunc The function to check properties.
22079
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
22080
+ */
22081
+ function hasPath(object, path, hasFunc) {
22082
+ path = isKey(path, object) ? [path] : castPath(path);
22083
+
22084
+ var result,
22085
+ index = -1,
22086
+ length = path.length;
22087
+
22088
+ while (++index < length) {
22089
+ var key = toKey(path[index]);
22090
+ if (!(result = object != null && hasFunc(object, key))) {
22091
+ break;
22092
+ }
22093
+ object = object[key];
22094
+ }
22095
+ if (result) {
22096
+ return result;
22097
+ }
22098
+ var length = object ? object.length : 0;
22099
+ return !!length && isLength(length) && isIndex(key, length) &&
22100
+ (isArray(object) || isArguments(object));
22101
+ }
22102
+
22103
+ /**
22104
+ * Checks if `value` is a valid array-like index.
22105
+ *
22106
+ * @private
22107
+ * @param {*} value The value to check.
22108
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
22109
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
22110
+ */
22111
+ function isIndex(value, length) {
22112
+ length = length == null ? MAX_SAFE_INTEGER : length;
22113
+ return !!length &&
22114
+ (typeof value == 'number' || reIsUint.test(value)) &&
22115
+ (value > -1 && value % 1 == 0 && value < length);
22116
+ }
22117
+
22118
+ /**
22119
+ * Checks if `value` is a property name and not a property path.
22120
+ *
22121
+ * @private
22122
+ * @param {*} value The value to check.
22123
+ * @param {Object} [object] The object to query keys on.
22124
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
22125
+ */
22126
+ function isKey(value, object) {
22127
+ if (isArray(value)) {
22128
+ return false;
22129
+ }
22130
+ var type = typeof value;
22131
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
22132
+ value == null || isSymbol(value)) {
22133
+ return true;
22134
+ }
22135
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
22136
+ (object != null && value in Object(object));
22137
+ }
22138
+
22139
+ /**
22140
+ * Checks if `value` is suitable for use as unique object key.
22141
+ *
22142
+ * @private
22143
+ * @param {*} value The value to check.
22144
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
22145
+ */
22146
+ function isKeyable(value) {
22147
+ var type = typeof value;
22148
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
22149
+ ? (value !== '__proto__')
22150
+ : (value === null);
22151
+ }
22152
+
22153
+ /**
22154
+ * Checks if `func` has its source masked.
22155
+ *
22156
+ * @private
22157
+ * @param {Function} func The function to check.
22158
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
22159
+ */
22160
+ function isMasked(func) {
22161
+ return !!maskSrcKey && (maskSrcKey in func);
22162
+ }
22163
+
22164
+ /**
22165
+ * Checks if `value` is likely a prototype object.
22166
+ *
22167
+ * @private
22168
+ * @param {*} value The value to check.
22169
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
22170
+ */
22171
+ function isPrototype(value) {
22172
+ var Ctor = value && value.constructor,
22173
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
22174
+
22175
+ return value === proto;
22176
+ }
22177
+
22178
+ /**
22179
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
22180
+ *
22181
+ * @private
22182
+ * @param {*} value The value to check.
22183
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
22184
+ * equality comparisons, else `false`.
22185
+ */
22186
+ function isStrictComparable(value) {
22187
+ return value === value && !isObject(value);
22188
+ }
22189
+
22190
+ /**
22191
+ * A specialized version of `matchesProperty` for source values suitable
22192
+ * for strict equality comparisons, i.e. `===`.
22193
+ *
22194
+ * @private
22195
+ * @param {string} key The key of the property to get.
22196
+ * @param {*} srcValue The value to match.
22197
+ * @returns {Function} Returns the new spec function.
22198
+ */
22199
+ function matchesStrictComparable(key, srcValue) {
22200
+ return function(object) {
22201
+ if (object == null) {
22202
+ return false;
22203
+ }
22204
+ return object[key] === srcValue &&
22205
+ (srcValue !== undefined || (key in Object(object)));
22206
+ };
22207
+ }
22208
+
22209
+ /**
22210
+ * Gets the parent value at `path` of `object`.
22211
+ *
22212
+ * @private
22213
+ * @param {Object} object The object to query.
22214
+ * @param {Array} path The path to get the parent value of.
22215
+ * @returns {*} Returns the parent value.
22216
+ */
22217
+ function parent(object, path) {
22218
+ return path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
22219
+ }
22220
+
22221
+ /**
22222
+ * Converts `string` to a property path array.
22223
+ *
22224
+ * @private
22225
+ * @param {string} string The string to convert.
22226
+ * @returns {Array} Returns the property path array.
22227
+ */
22228
+ var stringToPath = memoize(function(string) {
22229
+ string = toString(string);
22230
+
22231
+ var result = [];
22232
+ if (reLeadingDot.test(string)) {
22233
+ result.push('');
22234
+ }
22235
+ string.replace(rePropName, function(match, number, quote, string) {
22236
+ result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
22237
+ });
22238
+ return result;
22239
+ });
22240
+
22241
+ /**
22242
+ * Converts `value` to a string key if it's not a string or symbol.
22243
+ *
22244
+ * @private
22245
+ * @param {*} value The value to inspect.
22246
+ * @returns {string|symbol} Returns the key.
22247
+ */
22248
+ function toKey(value) {
22249
+ if (typeof value == 'string' || isSymbol(value)) {
22250
+ return value;
22251
+ }
22252
+ var result = (value + '');
22253
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
22254
+ }
22255
+
22256
+ /**
22257
+ * Converts `func` to its source code.
22258
+ *
22259
+ * @private
22260
+ * @param {Function} func The function to process.
22261
+ * @returns {string} Returns the source code.
22262
+ */
22263
+ function toSource(func) {
22264
+ if (func != null) {
22265
+ try {
22266
+ return funcToString.call(func);
22267
+ } catch (e) {}
22268
+ try {
22269
+ return (func + '');
22270
+ } catch (e) {}
22271
+ }
22272
+ return '';
22273
+ }
22274
+
22275
+ /**
22276
+ * Gets the last element of `array`.
22277
+ *
22278
+ * @static
22279
+ * @memberOf _
22280
+ * @since 0.1.0
22281
+ * @category Array
22282
+ * @param {Array} array The array to query.
22283
+ * @returns {*} Returns the last element of `array`.
22284
+ * @example
22285
+ *
22286
+ * _.last([1, 2, 3]);
22287
+ * // => 3
22288
+ */
22289
+ function last(array) {
22290
+ var length = array ? array.length : 0;
22291
+ return length ? array[length - 1] : undefined;
22292
+ }
22293
+
22294
+ /**
22295
+ * Removes all elements from `array` that `predicate` returns truthy for
22296
+ * and returns an array of the removed elements. The predicate is invoked
22297
+ * with three arguments: (value, index, array).
22298
+ *
22299
+ * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
22300
+ * to pull elements from an array by value.
22301
+ *
22302
+ * @static
22303
+ * @memberOf _
22304
+ * @since 2.0.0
22305
+ * @category Array
22306
+ * @param {Array} array The array to modify.
22307
+ * @param {Function} [predicate=_.identity]
22308
+ * The function invoked per iteration.
22309
+ * @returns {Array} Returns the new array of removed elements.
22310
+ * @example
22311
+ *
22312
+ * var array = [1, 2, 3, 4];
22313
+ * var evens = _.remove(array, function(n) {
22314
+ * return n % 2 == 0;
22315
+ * });
22316
+ *
22317
+ * console.log(array);
22318
+ * // => [1, 3]
22319
+ *
22320
+ * console.log(evens);
22321
+ * // => [2, 4]
22322
+ */
22323
+ function remove(array, predicate) {
22324
+ var result = [];
22325
+ if (!(array && array.length)) {
22326
+ return result;
22327
+ }
22328
+ var index = -1,
22329
+ indexes = [],
22330
+ length = array.length;
22331
+
22332
+ predicate = baseIteratee(predicate);
22333
+ while (++index < length) {
22334
+ var value = array[index];
22335
+ if (predicate(value, index, array)) {
22336
+ result.push(value);
22337
+ indexes.push(index);
22338
+ }
22339
+ }
22340
+ basePullAt(array, indexes);
22341
+ return result;
22342
+ }
22343
+
22344
+ /**
22345
+ * Creates a function that memoizes the result of `func`. If `resolver` is
22346
+ * provided, it determines the cache key for storing the result based on the
22347
+ * arguments provided to the memoized function. By default, the first argument
22348
+ * provided to the memoized function is used as the map cache key. The `func`
22349
+ * is invoked with the `this` binding of the memoized function.
22350
+ *
22351
+ * **Note:** The cache is exposed as the `cache` property on the memoized
22352
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
22353
+ * constructor with one whose instances implement the
22354
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
22355
+ * method interface of `delete`, `get`, `has`, and `set`.
22356
+ *
22357
+ * @static
22358
+ * @memberOf _
22359
+ * @since 0.1.0
22360
+ * @category Function
22361
+ * @param {Function} func The function to have its output memoized.
22362
+ * @param {Function} [resolver] The function to resolve the cache key.
22363
+ * @returns {Function} Returns the new memoized function.
22364
+ * @example
22365
+ *
22366
+ * var object = { 'a': 1, 'b': 2 };
22367
+ * var other = { 'c': 3, 'd': 4 };
22368
+ *
22369
+ * var values = _.memoize(_.values);
22370
+ * values(object);
22371
+ * // => [1, 2]
22372
+ *
22373
+ * values(other);
22374
+ * // => [3, 4]
22375
+ *
22376
+ * object.a = 2;
22377
+ * values(object);
22378
+ * // => [1, 2]
22379
+ *
22380
+ * // Modify the result cache.
22381
+ * values.cache.set(object, ['a', 'b']);
22382
+ * values(object);
22383
+ * // => ['a', 'b']
22384
+ *
22385
+ * // Replace `_.memoize.Cache`.
22386
+ * _.memoize.Cache = WeakMap;
22387
+ */
22388
+ function memoize(func, resolver) {
22389
+ if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
22390
+ throw new TypeError(FUNC_ERROR_TEXT);
22391
+ }
22392
+ var memoized = function() {
22393
+ var args = arguments,
22394
+ key = resolver ? resolver.apply(this, args) : args[0],
22395
+ cache = memoized.cache;
22396
+
22397
+ if (cache.has(key)) {
22398
+ return cache.get(key);
22399
+ }
22400
+ var result = func.apply(this, args);
22401
+ memoized.cache = cache.set(key, result);
22402
+ return result;
22403
+ };
22404
+ memoized.cache = new (memoize.Cache || MapCache);
22405
+ return memoized;
22406
+ }
22407
+
22408
+ // Assign cache to `_.memoize`.
22409
+ memoize.Cache = MapCache;
22410
+
22411
+ /**
22412
+ * Performs a
22413
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
22414
+ * comparison between two values to determine if they are equivalent.
22415
+ *
22416
+ * @static
22417
+ * @memberOf _
22418
+ * @since 4.0.0
22419
+ * @category Lang
22420
+ * @param {*} value The value to compare.
22421
+ * @param {*} other The other value to compare.
22422
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
22423
+ * @example
22424
+ *
22425
+ * var object = { 'a': 1 };
22426
+ * var other = { 'a': 1 };
22427
+ *
22428
+ * _.eq(object, object);
22429
+ * // => true
22430
+ *
22431
+ * _.eq(object, other);
22432
+ * // => false
22433
+ *
22434
+ * _.eq('a', 'a');
22435
+ * // => true
22436
+ *
22437
+ * _.eq('a', Object('a'));
22438
+ * // => false
22439
+ *
22440
+ * _.eq(NaN, NaN);
22441
+ * // => true
22442
+ */
22443
+ function eq(value, other) {
22444
+ return value === other || (value !== value && other !== other);
22445
+ }
22446
+
22447
+ /**
22448
+ * Checks if `value` is likely an `arguments` object.
22449
+ *
22450
+ * @static
22451
+ * @memberOf _
22452
+ * @since 0.1.0
22453
+ * @category Lang
22454
+ * @param {*} value The value to check.
22455
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
22456
+ * else `false`.
22457
+ * @example
22458
+ *
22459
+ * _.isArguments(function() { return arguments; }());
22460
+ * // => true
22461
+ *
22462
+ * _.isArguments([1, 2, 3]);
22463
+ * // => false
22464
+ */
22465
+ function isArguments(value) {
22466
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
22467
+ return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
22468
+ (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
22469
+ }
22470
+
22471
+ /**
22472
+ * Checks if `value` is classified as an `Array` object.
22473
+ *
22474
+ * @static
22475
+ * @memberOf _
22476
+ * @since 0.1.0
22477
+ * @category Lang
22478
+ * @param {*} value The value to check.
22479
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
22480
+ * @example
22481
+ *
22482
+ * _.isArray([1, 2, 3]);
22483
+ * // => true
22484
+ *
22485
+ * _.isArray(document.body.children);
22486
+ * // => false
22487
+ *
22488
+ * _.isArray('abc');
22489
+ * // => false
22490
+ *
22491
+ * _.isArray(_.noop);
22492
+ * // => false
22493
+ */
22494
+ var isArray = Array.isArray;
22495
+
22496
+ /**
22497
+ * Checks if `value` is array-like. A value is considered array-like if it's
22498
+ * not a function and has a `value.length` that's an integer greater than or
22499
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
22500
+ *
22501
+ * @static
22502
+ * @memberOf _
22503
+ * @since 4.0.0
22504
+ * @category Lang
22505
+ * @param {*} value The value to check.
22506
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
22507
+ * @example
22508
+ *
22509
+ * _.isArrayLike([1, 2, 3]);
22510
+ * // => true
22511
+ *
22512
+ * _.isArrayLike(document.body.children);
22513
+ * // => true
22514
+ *
22515
+ * _.isArrayLike('abc');
22516
+ * // => true
22517
+ *
22518
+ * _.isArrayLike(_.noop);
22519
+ * // => false
22520
+ */
22521
+ function isArrayLike(value) {
22522
+ return value != null && isLength(value.length) && !isFunction(value);
22523
+ }
22524
+
22525
+ /**
22526
+ * This method is like `_.isArrayLike` except that it also checks if `value`
22527
+ * is an object.
22528
+ *
22529
+ * @static
22530
+ * @memberOf _
22531
+ * @since 4.0.0
22532
+ * @category Lang
22533
+ * @param {*} value The value to check.
22534
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
22535
+ * else `false`.
22536
+ * @example
22537
+ *
22538
+ * _.isArrayLikeObject([1, 2, 3]);
22539
+ * // => true
22540
+ *
22541
+ * _.isArrayLikeObject(document.body.children);
22542
+ * // => true
22543
+ *
22544
+ * _.isArrayLikeObject('abc');
22545
+ * // => false
22546
+ *
22547
+ * _.isArrayLikeObject(_.noop);
22548
+ * // => false
22549
+ */
22550
+ function isArrayLikeObject(value) {
22551
+ return isObjectLike(value) && isArrayLike(value);
22552
+ }
22553
+
22554
+ /**
22555
+ * Checks if `value` is classified as a `Function` object.
22556
+ *
22557
+ * @static
22558
+ * @memberOf _
22559
+ * @since 0.1.0
22560
+ * @category Lang
22561
+ * @param {*} value The value to check.
22562
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
22563
+ * @example
22564
+ *
22565
+ * _.isFunction(_);
22566
+ * // => true
22567
+ *
22568
+ * _.isFunction(/abc/);
22569
+ * // => false
22570
+ */
22571
+ function isFunction(value) {
22572
+ // The use of `Object#toString` avoids issues with the `typeof` operator
22573
+ // in Safari 8-9 which returns 'object' for typed array and other constructors.
22574
+ var tag = isObject(value) ? objectToString.call(value) : '';
22575
+ return tag == funcTag || tag == genTag;
22576
+ }
22577
+
22578
+ /**
22579
+ * Checks if `value` is a valid array-like length.
22580
+ *
22581
+ * **Note:** This method is loosely based on
22582
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
22583
+ *
22584
+ * @static
22585
+ * @memberOf _
22586
+ * @since 4.0.0
22587
+ * @category Lang
22588
+ * @param {*} value The value to check.
22589
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
22590
+ * @example
22591
+ *
22592
+ * _.isLength(3);
22593
+ * // => true
22594
+ *
22595
+ * _.isLength(Number.MIN_VALUE);
22596
+ * // => false
22597
+ *
22598
+ * _.isLength(Infinity);
22599
+ * // => false
22600
+ *
22601
+ * _.isLength('3');
22602
+ * // => false
22603
+ */
22604
+ function isLength(value) {
22605
+ return typeof value == 'number' &&
22606
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
22607
+ }
22608
+
22609
+ /**
22610
+ * Checks if `value` is the
22611
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
22612
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
22613
+ *
22614
+ * @static
22615
+ * @memberOf _
22616
+ * @since 0.1.0
22617
+ * @category Lang
22618
+ * @param {*} value The value to check.
22619
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
22620
+ * @example
22621
+ *
22622
+ * _.isObject({});
22623
+ * // => true
22624
+ *
22625
+ * _.isObject([1, 2, 3]);
22626
+ * // => true
22627
+ *
22628
+ * _.isObject(_.noop);
22629
+ * // => true
22630
+ *
22631
+ * _.isObject(null);
22632
+ * // => false
22633
+ */
22634
+ function isObject(value) {
22635
+ var type = typeof value;
22636
+ return !!value && (type == 'object' || type == 'function');
22637
+ }
22638
+
22639
+ /**
22640
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
22641
+ * and has a `typeof` result of "object".
22642
+ *
22643
+ * @static
22644
+ * @memberOf _
22645
+ * @since 4.0.0
22646
+ * @category Lang
22647
+ * @param {*} value The value to check.
22648
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
22649
+ * @example
22650
+ *
22651
+ * _.isObjectLike({});
22652
+ * // => true
22653
+ *
22654
+ * _.isObjectLike([1, 2, 3]);
22655
+ * // => true
22656
+ *
22657
+ * _.isObjectLike(_.noop);
22658
+ * // => false
22659
+ *
22660
+ * _.isObjectLike(null);
22661
+ * // => false
22662
+ */
22663
+ function isObjectLike(value) {
22664
+ return !!value && typeof value == 'object';
22665
+ }
22666
+
22667
+ /**
22668
+ * Checks if `value` is classified as a `Symbol` primitive or object.
22669
+ *
22670
+ * @static
22671
+ * @memberOf _
22672
+ * @since 4.0.0
22673
+ * @category Lang
22674
+ * @param {*} value The value to check.
22675
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
22676
+ * @example
22677
+ *
22678
+ * _.isSymbol(Symbol.iterator);
22679
+ * // => true
22680
+ *
22681
+ * _.isSymbol('abc');
22682
+ * // => false
22683
+ */
22684
+ function isSymbol(value) {
22685
+ return typeof value == 'symbol' ||
22686
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
22687
+ }
22688
+
22689
+ /**
22690
+ * Checks if `value` is classified as a typed array.
22691
+ *
22692
+ * @static
22693
+ * @memberOf _
22694
+ * @since 3.0.0
22695
+ * @category Lang
22696
+ * @param {*} value The value to check.
22697
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
22698
+ * @example
22699
+ *
22700
+ * _.isTypedArray(new Uint8Array);
22701
+ * // => true
22702
+ *
22703
+ * _.isTypedArray([]);
22704
+ * // => false
22705
+ */
22706
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
22707
+
22708
+ /**
22709
+ * Converts `value` to a string. An empty string is returned for `null`
22710
+ * and `undefined` values. The sign of `-0` is preserved.
22711
+ *
22712
+ * @static
22713
+ * @memberOf _
22714
+ * @since 4.0.0
22715
+ * @category Lang
22716
+ * @param {*} value The value to process.
22717
+ * @returns {string} Returns the string.
22718
+ * @example
22719
+ *
22720
+ * _.toString(null);
22721
+ * // => ''
22722
+ *
22723
+ * _.toString(-0);
22724
+ * // => '-0'
22725
+ *
22726
+ * _.toString([1, 2, 3]);
22727
+ * // => '1,2,3'
22728
+ */
22729
+ function toString(value) {
22730
+ return value == null ? '' : baseToString(value);
22731
+ }
22732
+
22733
+ /**
22734
+ * Gets the value at `path` of `object`. If the resolved value is
22735
+ * `undefined`, the `defaultValue` is returned in its place.
22736
+ *
22737
+ * @static
22738
+ * @memberOf _
22739
+ * @since 3.7.0
22740
+ * @category Object
22741
+ * @param {Object} object The object to query.
22742
+ * @param {Array|string} path The path of the property to get.
22743
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
22744
+ * @returns {*} Returns the resolved value.
22745
+ * @example
22746
+ *
22747
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
22748
+ *
22749
+ * _.get(object, 'a[0].b.c');
22750
+ * // => 3
22751
+ *
22752
+ * _.get(object, ['a', '0', 'b', 'c']);
22753
+ * // => 3
22754
+ *
22755
+ * _.get(object, 'a.b.c', 'default');
22756
+ * // => 'default'
22757
+ */
22758
+ function get(object, path, defaultValue) {
22759
+ var result = object == null ? undefined : baseGet(object, path);
22760
+ return result === undefined ? defaultValue : result;
22761
+ }
22762
+
22763
+ /**
22764
+ * Checks if `path` is a direct or inherited property of `object`.
22765
+ *
22766
+ * @static
22767
+ * @memberOf _
22768
+ * @since 4.0.0
22769
+ * @category Object
22770
+ * @param {Object} object The object to query.
22771
+ * @param {Array|string} path The path to check.
22772
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
22773
+ * @example
22774
+ *
22775
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
22776
+ *
22777
+ * _.hasIn(object, 'a');
22778
+ * // => true
22779
+ *
22780
+ * _.hasIn(object, 'a.b');
22781
+ * // => true
22782
+ *
22783
+ * _.hasIn(object, ['a', 'b']);
22784
+ * // => true
22785
+ *
22786
+ * _.hasIn(object, 'b');
22787
+ * // => false
22788
+ */
22789
+ function hasIn(object, path) {
22790
+ return object != null && hasPath(object, path, baseHasIn);
22791
+ }
22792
+
22793
+ /**
22794
+ * Creates an array of the own enumerable property names of `object`.
22795
+ *
22796
+ * **Note:** Non-object values are coerced to objects. See the
22797
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
22798
+ * for more details.
22799
+ *
22800
+ * @static
22801
+ * @since 0.1.0
22802
+ * @memberOf _
22803
+ * @category Object
22804
+ * @param {Object} object The object to query.
22805
+ * @returns {Array} Returns the array of property names.
22806
+ * @example
22807
+ *
22808
+ * function Foo() {
22809
+ * this.a = 1;
22810
+ * this.b = 2;
22811
+ * }
22812
+ *
22813
+ * Foo.prototype.c = 3;
22814
+ *
22815
+ * _.keys(new Foo);
22816
+ * // => ['a', 'b'] (iteration order is not guaranteed)
22817
+ *
22818
+ * _.keys('hi');
22819
+ * // => ['0', '1']
22820
+ */
22821
+ function keys(object) {
22822
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
22823
+ }
22824
+
22825
+ /**
22826
+ * This method returns the first argument it receives.
22827
+ *
22828
+ * @static
22829
+ * @since 0.1.0
22830
+ * @memberOf _
22831
+ * @category Util
22832
+ * @param {*} value Any value.
22833
+ * @returns {*} Returns `value`.
22834
+ * @example
22835
+ *
22836
+ * var object = { 'a': 1 };
22837
+ *
22838
+ * console.log(_.identity(object) === object);
22839
+ * // => true
22840
+ */
22841
+ function identity(value) {
22842
+ return value;
22843
+ }
22844
+
22845
+ /**
22846
+ * Creates a function that returns the value at `path` of a given object.
22847
+ *
22848
+ * @static
22849
+ * @memberOf _
22850
+ * @since 2.4.0
22851
+ * @category Util
22852
+ * @param {Array|string} path The path of the property to get.
22853
+ * @returns {Function} Returns the new accessor function.
22854
+ * @example
22855
+ *
22856
+ * var objects = [
22857
+ * { 'a': { 'b': 2 } },
22858
+ * { 'a': { 'b': 1 } }
22859
+ * ];
22860
+ *
22861
+ * _.map(objects, _.property('a.b'));
22862
+ * // => [2, 1]
22863
+ *
22864
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
22865
+ * // => [1, 2]
22866
+ */
22867
+ function property(path) {
22868
+ return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
22869
+ }
22870
+
22871
+ module.exports = remove;
22872
+ });
22873
+
22874
+ /**
22875
+ * lodash (Custom Build) <https://lodash.com/>
22876
+ * Build: `lodash modularize exports="npm" -o ./`
22877
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
22878
+ * Released under MIT license <https://lodash.com/license>
22879
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
22880
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
22881
+ */
22882
+
22883
+ /** Used as the size to enable large array optimizations. */
22884
+ var LARGE_ARRAY_SIZE = 200;
22885
+
22886
+ /** Used to stand-in for `undefined` hash values. */
22887
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
22888
+
22889
+ /** Used as references for various `Number` constants. */
22890
+ var INFINITY$1 = 1 / 0;
22891
+
22892
+ /** `Object#toString` result references. */
22893
+ var funcTag = '[object Function]',
22894
+ genTag = '[object GeneratorFunction]';
22895
+
22896
+ /**
22897
+ * Used to match `RegExp`
22898
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
22899
+ */
22900
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
22901
+
22902
+ /** Used to detect host constructors (Safari). */
22903
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
22904
+
22905
+ /** Detect free variable `global` from Node.js. */
22906
+ var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
22907
+
22908
+ /** Detect free variable `self`. */
22909
+ var freeSelf$1 = typeof self == 'object' && self && self.Object === Object && self;
22910
+
22911
+ /** Used as a reference to the global object. */
22912
+ var root$1 = freeGlobal$1 || freeSelf$1 || Function('return this')();
22913
+
22914
+ /**
22915
+ * A specialized version of `_.includes` for arrays without support for
22916
+ * specifying an index to search from.
22917
+ *
22918
+ * @private
22919
+ * @param {Array} [array] The array to inspect.
22920
+ * @param {*} target The value to search for.
22921
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
22922
+ */
22923
+ function arrayIncludes(array, value) {
22924
+ var length = array ? array.length : 0;
22925
+ return !!length && baseIndexOf(array, value, 0) > -1;
22926
+ }
22927
+
22928
+ /**
22929
+ * This function is like `arrayIncludes` except that it accepts a comparator.
22930
+ *
22931
+ * @private
22932
+ * @param {Array} [array] The array to inspect.
22933
+ * @param {*} target The value to search for.
22934
+ * @param {Function} comparator The comparator invoked per element.
22935
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
22936
+ */
22937
+ function arrayIncludesWith(array, value, comparator) {
22938
+ var index = -1,
22939
+ length = array ? array.length : 0;
22940
+
22941
+ while (++index < length) {
22942
+ if (comparator(value, array[index])) {
22943
+ return true;
22944
+ }
22945
+ }
22946
+ return false;
22947
+ }
22948
+
22949
+ /**
22950
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
22951
+ * support for iteratee shorthands.
22952
+ *
22953
+ * @private
22954
+ * @param {Array} array The array to inspect.
22955
+ * @param {Function} predicate The function invoked per iteration.
22956
+ * @param {number} fromIndex The index to search from.
22957
+ * @param {boolean} [fromRight] Specify iterating from right to left.
22958
+ * @returns {number} Returns the index of the matched value, else `-1`.
22959
+ */
22960
+ function baseFindIndex(array, predicate, fromIndex, fromRight) {
22961
+ var length = array.length,
22962
+ index = fromIndex + (fromRight ? 1 : -1);
22963
+
22964
+ while ((fromRight ? index-- : ++index < length)) {
22965
+ if (predicate(array[index], index, array)) {
22966
+ return index;
22967
+ }
22968
+ }
22969
+ return -1;
22970
+ }
22971
+
22972
+ /**
22973
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
22974
+ *
22975
+ * @private
22976
+ * @param {Array} array The array to inspect.
22977
+ * @param {*} value The value to search for.
22978
+ * @param {number} fromIndex The index to search from.
22979
+ * @returns {number} Returns the index of the matched value, else `-1`.
22980
+ */
22981
+ function baseIndexOf(array, value, fromIndex) {
22982
+ if (value !== value) {
22983
+ return baseFindIndex(array, baseIsNaN, fromIndex);
22984
+ }
22985
+ var index = fromIndex - 1,
22986
+ length = array.length;
22987
+
22988
+ while (++index < length) {
22989
+ if (array[index] === value) {
22990
+ return index;
22991
+ }
22992
+ }
22993
+ return -1;
22994
+ }
22995
+
22996
+ /**
22997
+ * The base implementation of `_.isNaN` without support for number objects.
22998
+ *
22999
+ * @private
23000
+ * @param {*} value The value to check.
23001
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
23002
+ */
23003
+ function baseIsNaN(value) {
23004
+ return value !== value;
23005
+ }
23006
+
23007
+ /**
23008
+ * Checks if a cache value for `key` exists.
23009
+ *
23010
+ * @private
23011
+ * @param {Object} cache The cache to query.
23012
+ * @param {string} key The key of the entry to check.
23013
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
23014
+ */
23015
+ function cacheHas(cache, key) {
23016
+ return cache.has(key);
23017
+ }
23018
+
23019
+ /**
23020
+ * Gets the value at `key` of `object`.
23021
+ *
23022
+ * @private
23023
+ * @param {Object} [object] The object to query.
23024
+ * @param {string} key The key of the property to get.
23025
+ * @returns {*} Returns the property value.
23026
+ */
23027
+ function getValue(object, key) {
23028
+ return object == null ? undefined : object[key];
23029
+ }
23030
+
23031
+ /**
23032
+ * Checks if `value` is a host object in IE < 9.
23033
+ *
23034
+ * @private
23035
+ * @param {*} value The value to check.
23036
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
23037
+ */
23038
+ function isHostObject(value) {
23039
+ // Many host objects are `Object` objects that can coerce to strings
23040
+ // despite having improperly defined `toString` methods.
23041
+ var result = false;
23042
+ if (value != null && typeof value.toString != 'function') {
23043
+ try {
23044
+ result = !!(value + '');
23045
+ } catch (e) {}
23046
+ }
23047
+ return result;
23048
+ }
23049
+
23050
+ /**
23051
+ * Converts `set` to an array of its values.
23052
+ *
23053
+ * @private
23054
+ * @param {Object} set The set to convert.
23055
+ * @returns {Array} Returns the values.
23056
+ */
23057
+ function setToArray(set) {
23058
+ var index = -1,
23059
+ result = Array(set.size);
23060
+
23061
+ set.forEach(function(value) {
23062
+ result[++index] = value;
23063
+ });
23064
+ return result;
23065
+ }
23066
+
23067
+ /** Used for built-in method references. */
23068
+ var arrayProto = Array.prototype,
23069
+ funcProto = Function.prototype,
23070
+ objectProto$1 = Object.prototype;
23071
+
23072
+ /** Used to detect overreaching core-js shims. */
23073
+ var coreJsData = root$1['__core-js_shared__'];
23074
+
23075
+ /** Used to detect methods masquerading as native. */
23076
+ var maskSrcKey = (function() {
23077
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
23078
+ return uid ? ('Symbol(src)_1.' + uid) : '';
23079
+ }());
23080
+
23081
+ /** Used to resolve the decompiled source of functions. */
23082
+ var funcToString = funcProto.toString;
23083
+
23084
+ /** Used to check objects for own properties. */
23085
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
23086
+
23087
+ /**
23088
+ * Used to resolve the
23089
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
23090
+ * of values.
23091
+ */
23092
+ var objectToString$1 = objectProto$1.toString;
23093
+
23094
+ /** Used to detect if a method is native. */
23095
+ var reIsNative = RegExp('^' +
23096
+ funcToString.call(hasOwnProperty$1).replace(reRegExpChar, '\\$&')
23097
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
23098
+ );
23099
+
23100
+ /** Built-in value references. */
23101
+ var splice = arrayProto.splice;
23102
+
23103
+ /* Built-in method references that are verified to be native. */
23104
+ var Map$1 = getNative(root$1, 'Map'),
23105
+ Set$1 = getNative(root$1, 'Set'),
23106
+ nativeCreate = getNative(Object, 'create');
23107
+
23108
+ /**
23109
+ * Creates a hash object.
23110
+ *
23111
+ * @private
23112
+ * @constructor
23113
+ * @param {Array} [entries] The key-value pairs to cache.
23114
+ */
23115
+ function Hash(entries) {
23116
+ var index = -1,
23117
+ length = entries ? entries.length : 0;
23118
+
23119
+ this.clear();
23120
+ while (++index < length) {
23121
+ var entry = entries[index];
23122
+ this.set(entry[0], entry[1]);
23123
+ }
23124
+ }
23125
+
23126
+ /**
23127
+ * Removes all key-value entries from the hash.
23128
+ *
23129
+ * @private
23130
+ * @name clear
23131
+ * @memberOf Hash
23132
+ */
23133
+ function hashClear() {
23134
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
23135
+ }
23136
+
23137
+ /**
23138
+ * Removes `key` and its value from the hash.
23139
+ *
23140
+ * @private
23141
+ * @name delete
23142
+ * @memberOf Hash
23143
+ * @param {Object} hash The hash to modify.
23144
+ * @param {string} key The key of the value to remove.
23145
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
23146
+ */
23147
+ function hashDelete(key) {
23148
+ return this.has(key) && delete this.__data__[key];
23149
+ }
23150
+
23151
+ /**
23152
+ * Gets the hash value for `key`.
23153
+ *
23154
+ * @private
23155
+ * @name get
23156
+ * @memberOf Hash
23157
+ * @param {string} key The key of the value to get.
23158
+ * @returns {*} Returns the entry value.
23159
+ */
23160
+ function hashGet(key) {
23161
+ var data = this.__data__;
23162
+ if (nativeCreate) {
23163
+ var result = data[key];
23164
+ return result === HASH_UNDEFINED ? undefined : result;
23165
+ }
23166
+ return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
23167
+ }
23168
+
23169
+ /**
23170
+ * Checks if a hash value for `key` exists.
23171
+ *
23172
+ * @private
23173
+ * @name has
23174
+ * @memberOf Hash
23175
+ * @param {string} key The key of the entry to check.
23176
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
23177
+ */
23178
+ function hashHas(key) {
23179
+ var data = this.__data__;
23180
+ return nativeCreate ? data[key] !== undefined : hasOwnProperty$1.call(data, key);
23181
+ }
23182
+
23183
+ /**
23184
+ * Sets the hash `key` to `value`.
23185
+ *
23186
+ * @private
23187
+ * @name set
23188
+ * @memberOf Hash
23189
+ * @param {string} key The key of the value to set.
23190
+ * @param {*} value The value to set.
23191
+ * @returns {Object} Returns the hash instance.
23192
+ */
23193
+ function hashSet(key, value) {
23194
+ var data = this.__data__;
23195
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
23196
+ return this;
23197
+ }
23198
+
23199
+ // Add methods to `Hash`.
23200
+ Hash.prototype.clear = hashClear;
23201
+ Hash.prototype['delete'] = hashDelete;
23202
+ Hash.prototype.get = hashGet;
23203
+ Hash.prototype.has = hashHas;
23204
+ Hash.prototype.set = hashSet;
23205
+
23206
+ /**
23207
+ * Creates an list cache object.
23208
+ *
23209
+ * @private
23210
+ * @constructor
23211
+ * @param {Array} [entries] The key-value pairs to cache.
23212
+ */
23213
+ function ListCache(entries) {
23214
+ var index = -1,
23215
+ length = entries ? entries.length : 0;
23216
+
23217
+ this.clear();
23218
+ while (++index < length) {
23219
+ var entry = entries[index];
23220
+ this.set(entry[0], entry[1]);
23221
+ }
23222
+ }
23223
+
23224
+ /**
23225
+ * Removes all key-value entries from the list cache.
23226
+ *
23227
+ * @private
23228
+ * @name clear
23229
+ * @memberOf ListCache
23230
+ */
23231
+ function listCacheClear() {
23232
+ this.__data__ = [];
23233
+ }
23234
+
23235
+ /**
23236
+ * Removes `key` and its value from the list cache.
23237
+ *
23238
+ * @private
23239
+ * @name delete
23240
+ * @memberOf ListCache
23241
+ * @param {string} key The key of the value to remove.
23242
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
23243
+ */
23244
+ function listCacheDelete(key) {
23245
+ var data = this.__data__,
23246
+ index = assocIndexOf(data, key);
23247
+
23248
+ if (index < 0) {
23249
+ return false;
23250
+ }
23251
+ var lastIndex = data.length - 1;
23252
+ if (index == lastIndex) {
23253
+ data.pop();
23254
+ } else {
23255
+ splice.call(data, index, 1);
23256
+ }
23257
+ return true;
23258
+ }
23259
+
23260
+ /**
23261
+ * Gets the list cache value for `key`.
23262
+ *
23263
+ * @private
23264
+ * @name get
23265
+ * @memberOf ListCache
23266
+ * @param {string} key The key of the value to get.
23267
+ * @returns {*} Returns the entry value.
23268
+ */
23269
+ function listCacheGet(key) {
23270
+ var data = this.__data__,
23271
+ index = assocIndexOf(data, key);
23272
+
23273
+ return index < 0 ? undefined : data[index][1];
23274
+ }
23275
+
23276
+ /**
23277
+ * Checks if a list cache value for `key` exists.
23278
+ *
23279
+ * @private
23280
+ * @name has
23281
+ * @memberOf ListCache
23282
+ * @param {string} key The key of the entry to check.
23283
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
23284
+ */
23285
+ function listCacheHas(key) {
23286
+ return assocIndexOf(this.__data__, key) > -1;
23287
+ }
23288
+
23289
+ /**
23290
+ * Sets the list cache `key` to `value`.
23291
+ *
23292
+ * @private
23293
+ * @name set
23294
+ * @memberOf ListCache
23295
+ * @param {string} key The key of the value to set.
23296
+ * @param {*} value The value to set.
23297
+ * @returns {Object} Returns the list cache instance.
23298
+ */
23299
+ function listCacheSet(key, value) {
23300
+ var data = this.__data__,
23301
+ index = assocIndexOf(data, key);
23302
+
23303
+ if (index < 0) {
23304
+ data.push([key, value]);
23305
+ } else {
23306
+ data[index][1] = value;
23307
+ }
23308
+ return this;
23309
+ }
23310
+
23311
+ // Add methods to `ListCache`.
23312
+ ListCache.prototype.clear = listCacheClear;
23313
+ ListCache.prototype['delete'] = listCacheDelete;
23314
+ ListCache.prototype.get = listCacheGet;
23315
+ ListCache.prototype.has = listCacheHas;
23316
+ ListCache.prototype.set = listCacheSet;
23317
+
23318
+ /**
23319
+ * Creates a map cache object to store key-value pairs.
23320
+ *
23321
+ * @private
23322
+ * @constructor
23323
+ * @param {Array} [entries] The key-value pairs to cache.
23324
+ */
23325
+ function MapCache(entries) {
23326
+ var index = -1,
23327
+ length = entries ? entries.length : 0;
23328
+
23329
+ this.clear();
23330
+ while (++index < length) {
23331
+ var entry = entries[index];
23332
+ this.set(entry[0], entry[1]);
23333
+ }
23334
+ }
23335
+
23336
+ /**
23337
+ * Removes all key-value entries from the map.
23338
+ *
23339
+ * @private
23340
+ * @name clear
23341
+ * @memberOf MapCache
23342
+ */
23343
+ function mapCacheClear() {
23344
+ this.__data__ = {
23345
+ 'hash': new Hash,
23346
+ 'map': new (Map$1 || ListCache),
23347
+ 'string': new Hash
23348
+ };
23349
+ }
23350
+
23351
+ /**
23352
+ * Removes `key` and its value from the map.
23353
+ *
23354
+ * @private
23355
+ * @name delete
23356
+ * @memberOf MapCache
23357
+ * @param {string} key The key of the value to remove.
23358
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
23359
+ */
23360
+ function mapCacheDelete(key) {
23361
+ return getMapData(this, key)['delete'](key);
23362
+ }
23363
+
23364
+ /**
23365
+ * Gets the map value for `key`.
23366
+ *
23367
+ * @private
23368
+ * @name get
23369
+ * @memberOf MapCache
23370
+ * @param {string} key The key of the value to get.
23371
+ * @returns {*} Returns the entry value.
23372
+ */
23373
+ function mapCacheGet(key) {
23374
+ return getMapData(this, key).get(key);
23375
+ }
23376
+
23377
+ /**
23378
+ * Checks if a map value for `key` exists.
23379
+ *
23380
+ * @private
23381
+ * @name has
23382
+ * @memberOf MapCache
23383
+ * @param {string} key The key of the entry to check.
23384
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
23385
+ */
23386
+ function mapCacheHas(key) {
23387
+ return getMapData(this, key).has(key);
23388
+ }
23389
+
23390
+ /**
23391
+ * Sets the map `key` to `value`.
23392
+ *
23393
+ * @private
23394
+ * @name set
23395
+ * @memberOf MapCache
23396
+ * @param {string} key The key of the value to set.
23397
+ * @param {*} value The value to set.
23398
+ * @returns {Object} Returns the map cache instance.
23399
+ */
23400
+ function mapCacheSet(key, value) {
23401
+ getMapData(this, key).set(key, value);
23402
+ return this;
23403
+ }
23404
+
23405
+ // Add methods to `MapCache`.
23406
+ MapCache.prototype.clear = mapCacheClear;
23407
+ MapCache.prototype['delete'] = mapCacheDelete;
23408
+ MapCache.prototype.get = mapCacheGet;
23409
+ MapCache.prototype.has = mapCacheHas;
23410
+ MapCache.prototype.set = mapCacheSet;
23411
+
23412
+ /**
23413
+ *
23414
+ * Creates an array cache object to store unique values.
23415
+ *
23416
+ * @private
23417
+ * @constructor
23418
+ * @param {Array} [values] The values to cache.
23419
+ */
23420
+ function SetCache(values) {
23421
+ var index = -1,
23422
+ length = values ? values.length : 0;
23423
+
23424
+ this.__data__ = new MapCache;
23425
+ while (++index < length) {
23426
+ this.add(values[index]);
23427
+ }
23428
+ }
23429
+
23430
+ /**
23431
+ * Adds `value` to the array cache.
23432
+ *
23433
+ * @private
23434
+ * @name add
23435
+ * @memberOf SetCache
23436
+ * @alias push
23437
+ * @param {*} value The value to cache.
23438
+ * @returns {Object} Returns the cache instance.
23439
+ */
23440
+ function setCacheAdd(value) {
23441
+ this.__data__.set(value, HASH_UNDEFINED);
23442
+ return this;
23443
+ }
23444
+
23445
+ /**
23446
+ * Checks if `value` is in the array cache.
23447
+ *
23448
+ * @private
23449
+ * @name has
23450
+ * @memberOf SetCache
23451
+ * @param {*} value The value to search for.
23452
+ * @returns {number} Returns `true` if `value` is found, else `false`.
23453
+ */
23454
+ function setCacheHas(value) {
23455
+ return this.__data__.has(value);
23456
+ }
23457
+
23458
+ // Add methods to `SetCache`.
23459
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
23460
+ SetCache.prototype.has = setCacheHas;
23461
+
23462
+ /**
23463
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
23464
+ *
23465
+ * @private
23466
+ * @param {Array} array The array to inspect.
23467
+ * @param {*} key The key to search for.
23468
+ * @returns {number} Returns the index of the matched value, else `-1`.
23469
+ */
23470
+ function assocIndexOf(array, key) {
23471
+ var length = array.length;
23472
+ while (length--) {
23473
+ if (eq(array[length][0], key)) {
23474
+ return length;
23475
+ }
23476
+ }
23477
+ return -1;
23478
+ }
23479
+
23480
+ /**
23481
+ * The base implementation of `_.isNative` without bad shim checks.
23482
+ *
23483
+ * @private
23484
+ * @param {*} value The value to check.
23485
+ * @returns {boolean} Returns `true` if `value` is a native function,
23486
+ * else `false`.
23487
+ */
23488
+ function baseIsNative(value) {
23489
+ if (!isObject(value) || isMasked(value)) {
23490
+ return false;
23491
+ }
23492
+ var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
23493
+ return pattern.test(toSource(value));
23494
+ }
23495
+
23496
+ /**
23497
+ * The base implementation of `_.uniqBy` without support for iteratee shorthands.
23498
+ *
23499
+ * @private
23500
+ * @param {Array} array The array to inspect.
23501
+ * @param {Function} [iteratee] The iteratee invoked per element.
23502
+ * @param {Function} [comparator] The comparator invoked per element.
23503
+ * @returns {Array} Returns the new duplicate free array.
23504
+ */
23505
+ function baseUniq(array, iteratee, comparator) {
23506
+ var index = -1,
23507
+ includes = arrayIncludes,
23508
+ length = array.length,
23509
+ isCommon = true,
23510
+ result = [],
23511
+ seen = result;
23512
+
23513
+ if (comparator) {
23514
+ isCommon = false;
23515
+ includes = arrayIncludesWith;
23516
+ }
23517
+ else if (length >= LARGE_ARRAY_SIZE) {
23518
+ var set = iteratee ? null : createSet(array);
23519
+ if (set) {
23520
+ return setToArray(set);
23521
+ }
23522
+ isCommon = false;
23523
+ includes = cacheHas;
23524
+ seen = new SetCache;
23525
+ }
23526
+ else {
23527
+ seen = iteratee ? [] : result;
23528
+ }
23529
+ outer:
23530
+ while (++index < length) {
23531
+ var value = array[index],
23532
+ computed = iteratee ? iteratee(value) : value;
23533
+
23534
+ value = (comparator || value !== 0) ? value : 0;
23535
+ if (isCommon && computed === computed) {
23536
+ var seenIndex = seen.length;
23537
+ while (seenIndex--) {
23538
+ if (seen[seenIndex] === computed) {
23539
+ continue outer;
23540
+ }
23541
+ }
23542
+ if (iteratee) {
23543
+ seen.push(computed);
23544
+ }
23545
+ result.push(value);
23546
+ }
23547
+ else if (!includes(seen, computed, comparator)) {
23548
+ if (seen !== result) {
23549
+ seen.push(computed);
23550
+ }
23551
+ result.push(value);
23552
+ }
23553
+ }
23554
+ return result;
23555
+ }
23556
+
23557
+ /**
23558
+ * Creates a set object of `values`.
23559
+ *
23560
+ * @private
23561
+ * @param {Array} values The values to add to the set.
23562
+ * @returns {Object} Returns the new set.
23563
+ */
23564
+ var createSet = !(Set$1 && (1 / setToArray(new Set$1([,-0]))[1]) == INFINITY$1) ? noop : function(values) {
23565
+ return new Set$1(values);
23566
+ };
23567
+
23568
+ /**
23569
+ * Gets the data for `map`.
23570
+ *
23571
+ * @private
23572
+ * @param {Object} map The map to query.
23573
+ * @param {string} key The reference key.
23574
+ * @returns {*} Returns the map data.
23575
+ */
23576
+ function getMapData(map, key) {
23577
+ var data = map.__data__;
23578
+ return isKeyable(key)
23579
+ ? data[typeof key == 'string' ? 'string' : 'hash']
23580
+ : data.map;
23581
+ }
23582
+
23583
+ /**
23584
+ * Gets the native function at `key` of `object`.
23585
+ *
23586
+ * @private
23587
+ * @param {Object} object The object to query.
23588
+ * @param {string} key The key of the method to get.
23589
+ * @returns {*} Returns the function if it's native, else `undefined`.
23590
+ */
23591
+ function getNative(object, key) {
23592
+ var value = getValue(object, key);
23593
+ return baseIsNative(value) ? value : undefined;
23594
+ }
23595
+
23596
+ /**
23597
+ * Checks if `value` is suitable for use as unique object key.
23598
+ *
23599
+ * @private
23600
+ * @param {*} value The value to check.
23601
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
23602
+ */
23603
+ function isKeyable(value) {
23604
+ var type = typeof value;
23605
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
23606
+ ? (value !== '__proto__')
23607
+ : (value === null);
23608
+ }
23609
+
23610
+ /**
23611
+ * Checks if `func` has its source masked.
23612
+ *
23613
+ * @private
23614
+ * @param {Function} func The function to check.
23615
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
23616
+ */
23617
+ function isMasked(func) {
23618
+ return !!maskSrcKey && (maskSrcKey in func);
23619
+ }
23620
+
23621
+ /**
23622
+ * Converts `func` to its source code.
23623
+ *
23624
+ * @private
23625
+ * @param {Function} func The function to process.
23626
+ * @returns {string} Returns the source code.
23627
+ */
23628
+ function toSource(func) {
23629
+ if (func != null) {
23630
+ try {
23631
+ return funcToString.call(func);
23632
+ } catch (e) {}
23633
+ try {
23634
+ return (func + '');
23635
+ } catch (e) {}
23636
+ }
23637
+ return '';
23638
+ }
23639
+
23640
+ /**
23641
+ * Creates a duplicate-free version of an array, using
23642
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
23643
+ * for equality comparisons, in which only the first occurrence of each
23644
+ * element is kept.
23645
+ *
23646
+ * @static
23647
+ * @memberOf _
23648
+ * @since 0.1.0
23649
+ * @category Array
23650
+ * @param {Array} array The array to inspect.
23651
+ * @returns {Array} Returns the new duplicate free array.
23652
+ * @example
23653
+ *
23654
+ * _.uniq([2, 1, 2]);
23655
+ * // => [2, 1]
23656
+ */
23657
+ function uniq(array) {
23658
+ return (array && array.length)
23659
+ ? baseUniq(array)
23660
+ : [];
23661
+ }
23662
+
23663
+ /**
23664
+ * Performs a
23665
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
23666
+ * comparison between two values to determine if they are equivalent.
23667
+ *
23668
+ * @static
23669
+ * @memberOf _
23670
+ * @since 4.0.0
23671
+ * @category Lang
23672
+ * @param {*} value The value to compare.
23673
+ * @param {*} other The other value to compare.
23674
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
23675
+ * @example
23676
+ *
23677
+ * var object = { 'a': 1 };
23678
+ * var other = { 'a': 1 };
23679
+ *
23680
+ * _.eq(object, object);
23681
+ * // => true
23682
+ *
23683
+ * _.eq(object, other);
23684
+ * // => false
23685
+ *
23686
+ * _.eq('a', 'a');
23687
+ * // => true
23688
+ *
23689
+ * _.eq('a', Object('a'));
23690
+ * // => false
23691
+ *
23692
+ * _.eq(NaN, NaN);
23693
+ * // => true
23694
+ */
23695
+ function eq(value, other) {
23696
+ return value === other || (value !== value && other !== other);
23697
+ }
23698
+
23699
+ /**
23700
+ * Checks if `value` is classified as a `Function` object.
23701
+ *
23702
+ * @static
23703
+ * @memberOf _
23704
+ * @since 0.1.0
23705
+ * @category Lang
23706
+ * @param {*} value The value to check.
23707
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
23708
+ * @example
23709
+ *
23710
+ * _.isFunction(_);
23711
+ * // => true
23712
+ *
23713
+ * _.isFunction(/abc/);
23714
+ * // => false
23715
+ */
23716
+ function isFunction(value) {
23717
+ // The use of `Object#toString` avoids issues with the `typeof` operator
23718
+ // in Safari 8-9 which returns 'object' for typed array and other constructors.
23719
+ var tag = isObject(value) ? objectToString$1.call(value) : '';
23720
+ return tag == funcTag || tag == genTag;
23721
+ }
23722
+
23723
+ /**
23724
+ * Checks if `value` is the
23725
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
23726
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
23727
+ *
23728
+ * @static
23729
+ * @memberOf _
23730
+ * @since 0.1.0
23731
+ * @category Lang
23732
+ * @param {*} value The value to check.
23733
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
23734
+ * @example
23735
+ *
23736
+ * _.isObject({});
23737
+ * // => true
23738
+ *
23739
+ * _.isObject([1, 2, 3]);
23740
+ * // => true
23741
+ *
23742
+ * _.isObject(_.noop);
23743
+ * // => true
23744
+ *
23745
+ * _.isObject(null);
23746
+ * // => false
23747
+ */
23748
+ function isObject(value) {
23749
+ var type = typeof value;
23750
+ return !!value && (type == 'object' || type == 'function');
23751
+ }
23752
+
23753
+ /**
23754
+ * This method returns `undefined`.
23755
+ *
23756
+ * @static
23757
+ * @memberOf _
23758
+ * @since 2.3.0
23759
+ * @category Util
23760
+ * @example
23761
+ *
23762
+ * _.times(2, _.noop);
23763
+ * // => [undefined, undefined]
23764
+ */
23765
+ function noop() {
23766
+ // No operation performed.
23767
+ }
23768
+
23769
+ var lodash_uniq = uniq;
23770
+
23771
+ // data.class
23772
+
23773
+ var _class = function classModule (vnode, attributes) {
23774
+ var values;
23775
+ var _add = [];
23776
+ var _remove = [];
23777
+ var classes = vnode.data.class || {};
23778
+ var existing = attributes.get('class');
23779
+ existing = existing.length > 0 ? existing.split(' ') : [];
23780
+
23781
+ lodash_forown(classes, function (value, key) {
23782
+ if (value) {
23783
+ _add.push(key);
23784
+ } else {
23785
+ _remove.push(key);
23786
+ }
23787
+ });
23788
+
23789
+ values = lodash_remove(lodash_uniq(existing.concat(_add)), function (value) {
23790
+ return _remove.indexOf(value) < 0
23791
+ });
23792
+
23793
+ if (values.length) {
23794
+ attributes.set('class', values.join(' '));
23795
+ }
23796
+ };
23797
+
23798
+ // https://developer.mozilla.org/en-US/docs/Web/API/element
23799
+ var omit = [
23800
+ 'attributes',
23801
+ 'childElementCount',
23802
+ 'children',
23803
+ 'classList',
23804
+ 'clientHeight',
23805
+ 'clientLeft',
23806
+ 'clientTop',
23807
+ 'clientWidth',
23808
+ 'currentStyle',
23809
+ 'firstElementChild',
23810
+ 'innerHTML',
23811
+ 'lastElementChild',
23812
+ 'nextElementSibling',
23813
+ 'ongotpointercapture',
23814
+ 'onlostpointercapture',
23815
+ 'onwheel',
23816
+ 'outerHTML',
23817
+ 'previousElementSibling',
23818
+ 'runtimeStyle',
23819
+ 'scrollHeight',
23820
+ 'scrollLeft',
23821
+ 'scrollLeftMax',
23822
+ 'scrollTop',
23823
+ 'scrollTopMax',
23824
+ 'scrollWidth',
23825
+ 'tabStop',
23826
+ 'tagName'
23827
+ ];
23828
+
23829
+ // https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attributes
23830
+ var booleanAttributes = [
23831
+ 'disabled',
23832
+ 'visible',
23833
+ 'checked',
23834
+ 'readonly',
23835
+ 'required',
23836
+ 'allowfullscreen',
23837
+ 'autofocus',
23838
+ 'autoplay',
23839
+ 'compact',
23840
+ 'controls',
23841
+ 'default',
23842
+ 'formnovalidate',
23843
+ 'hidden',
23844
+ 'ismap',
23845
+ 'itemscope',
23846
+ 'loop',
23847
+ 'multiple',
23848
+ 'muted',
23849
+ 'noresize',
23850
+ 'noshade',
23851
+ 'novalidate',
23852
+ 'nowrap',
23853
+ 'open',
23854
+ 'reversed',
23855
+ 'seamless',
23856
+ 'selected',
23857
+ 'sortable',
23858
+ 'truespeed',
23859
+ 'typemustmatch'
23860
+ ];
23861
+
23862
+ // data.props
23863
+
23864
+ var props = function propsModule (vnode, attributes) {
23865
+ var props = vnode.data.props || {};
23866
+
23867
+ lodash_forown(props, function (value, key) {
23868
+ if (omit.indexOf(key) > -1) {
23869
+ return
23870
+ }
23871
+ if (key === 'htmlFor') {
23872
+ key = 'for';
23873
+ }
23874
+ if (key === 'className') {
23875
+ key = 'class';
23876
+ }
23877
+
23878
+ var lkey = key.toLowerCase();
23879
+ if (~booleanAttributes.indexOf(lkey)) {
23880
+ if (value) { // set attr only when truthy
23881
+ attributes.set(lkey, lkey);
23882
+ }
23883
+ } else {
23884
+ attributes.set(lkey, lodash_escape(value));
23885
+ }
23886
+ });
23887
+ };
23888
+
23889
+ // data.attrs
23890
+
23891
+ var attributes = function attrsModule (vnode, attributes) {
23892
+ var attrs = vnode.data.attrs || {};
23893
+
23894
+ lodash_forown(attrs, function (value, key) {
23895
+ attributes.set(key, lodash_escape(value));
23896
+ });
23897
+ };
23898
+
23899
+ /*
23900
+ object-assign
23901
+ (c) Sindre Sorhus
23902
+ @license MIT
23903
+ */
23904
+ /* eslint-disable no-unused-vars */
23905
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
23906
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
23907
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
23908
+
23909
+ function toObject(val) {
23910
+ if (val === null || val === undefined) {
23911
+ throw new TypeError('Object.assign cannot be called with null or undefined');
23912
+ }
23913
+
23914
+ return Object(val);
23915
+ }
23916
+
23917
+ function shouldUseNative() {
23918
+ try {
23919
+ if (!Object.assign) {
23920
+ return false;
23921
+ }
23922
+
23923
+ // Detect buggy property enumeration order in older V8 versions.
23924
+
23925
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
23926
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
23927
+ test1[5] = 'de';
23928
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
23929
+ return false;
23930
+ }
23931
+
23932
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
23933
+ var test2 = {};
23934
+ for (var i = 0; i < 10; i++) {
23935
+ test2['_' + String.fromCharCode(i)] = i;
23936
+ }
23937
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
23938
+ return test2[n];
23939
+ });
23940
+ if (order2.join('') !== '0123456789') {
23941
+ return false;
23942
+ }
23943
+
23944
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
23945
+ var test3 = {};
23946
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
23947
+ test3[letter] = letter;
23948
+ });
23949
+ if (Object.keys(Object.assign({}, test3)).join('') !==
23950
+ 'abcdefghijklmnopqrst') {
23951
+ return false;
23952
+ }
23953
+
23954
+ return true;
23955
+ } catch (err) {
23956
+ // We don't expect any of the above to throw, but better to be safe.
23957
+ return false;
23958
+ }
23959
+ }
23960
+
23961
+ var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
23962
+ var from;
23963
+ var to = toObject(target);
23964
+ var symbols;
23965
+
23966
+ for (var s = 1; s < arguments.length; s++) {
23967
+ from = Object(arguments[s]);
23968
+
23969
+ for (var key in from) {
23970
+ if (hasOwnProperty.call(from, key)) {
23971
+ to[key] = from[key];
23972
+ }
23973
+ }
23974
+
23975
+ if (getOwnPropertySymbols) {
23976
+ symbols = getOwnPropertySymbols(from);
23977
+ for (var i = 0; i < symbols.length; i++) {
23978
+ if (propIsEnumerable.call(from, symbols[i])) {
23979
+ to[symbols[i]] = from[symbols[i]];
23980
+ }
23981
+ }
23982
+ }
23983
+ }
23984
+
23985
+ return to;
23986
+ };
23987
+
23988
+ /**
23989
+ * lodash (Custom Build) <https://lodash.com/>
23990
+ * Build: `lodash modularize exports="npm" -o ./`
23991
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
23992
+ * Released under MIT license <https://lodash.com/license>
23993
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
23994
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
23995
+ */
23996
+
23997
+ /** Used as references for various `Number` constants. */
23998
+ var INFINITY = 1 / 0;
23999
+
24000
+ /** `Object#toString` result references. */
24001
+ var symbolTag = '[object Symbol]';
24002
+
24003
+ /** Used to match words composed of alphanumeric characters. */
24004
+ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
24005
+
24006
+ /** Used to match Latin Unicode letters (excluding mathematical operators). */
24007
+ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
24008
+
24009
+ /** Used to compose unicode character classes. */
24010
+ var rsAstralRange = '\\ud800-\\udfff',
24011
+ rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
24012
+ rsComboSymbolsRange = '\\u20d0-\\u20f0',
24013
+ rsDingbatRange = '\\u2700-\\u27bf',
24014
+ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
24015
+ rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
24016
+ rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
24017
+ rsPunctuationRange = '\\u2000-\\u206f',
24018
+ rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
24019
+ rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
24020
+ rsVarRange = '\\ufe0e\\ufe0f',
24021
+ rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
24022
+
24023
+ /** Used to compose unicode capture groups. */
24024
+ var rsApos = "['\u2019]",
24025
+ rsBreak = '[' + rsBreakRange + ']',
24026
+ rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
24027
+ rsDigits = '\\d+',
24028
+ rsDingbat = '[' + rsDingbatRange + ']',
24029
+ rsLower = '[' + rsLowerRange + ']',
24030
+ rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
24031
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
24032
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
24033
+ rsNonAstral = '[^' + rsAstralRange + ']',
24034
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
24035
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
24036
+ rsUpper = '[' + rsUpperRange + ']',
24037
+ rsZWJ = '\\u200d';
24038
+
24039
+ /** Used to compose unicode regexes. */
24040
+ var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')',
24041
+ rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')',
24042
+ rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
24043
+ rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
24044
+ reOptMod = rsModifier + '?',
24045
+ rsOptVar = '[' + rsVarRange + ']?',
24046
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
24047
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
24048
+ rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
24049
+
24050
+ /** Used to match apostrophes. */
24051
+ var reApos = RegExp(rsApos, 'g');
24052
+
24053
+ /**
24054
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
24055
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
24056
+ */
24057
+ var reComboMark = RegExp(rsCombo, 'g');
24058
+
24059
+ /** Used to match complex or compound words. */
24060
+ var reUnicodeWord = RegExp([
24061
+ rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
24062
+ rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')',
24063
+ rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr,
24064
+ rsUpper + '+' + rsOptUpperContr,
24065
+ rsDigits,
24066
+ rsEmoji
24067
+ ].join('|'), 'g');
24068
+
24069
+ /** Used to detect strings that need a more robust regexp to match words. */
24070
+ var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
24071
+
24072
+ /** Used to map Latin Unicode letters to basic Latin letters. */
24073
+ var deburredLetters = {
24074
+ // Latin-1 Supplement block.
24075
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
24076
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
24077
+ '\xc7': 'C', '\xe7': 'c',
24078
+ '\xd0': 'D', '\xf0': 'd',
24079
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
24080
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
24081
+ '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
24082
+ '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
24083
+ '\xd1': 'N', '\xf1': 'n',
24084
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
24085
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
24086
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
24087
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
24088
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
24089
+ '\xc6': 'Ae', '\xe6': 'ae',
24090
+ '\xde': 'Th', '\xfe': 'th',
24091
+ '\xdf': 'ss',
24092
+ // Latin Extended-A block.
24093
+ '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
24094
+ '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
24095
+ '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
24096
+ '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
24097
+ '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
24098
+ '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
24099
+ '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
24100
+ '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
24101
+ '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
24102
+ '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
24103
+ '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
24104
+ '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
24105
+ '\u0134': 'J', '\u0135': 'j',
24106
+ '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
24107
+ '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
24108
+ '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
24109
+ '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
24110
+ '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
24111
+ '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
24112
+ '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
24113
+ '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
24114
+ '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
24115
+ '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
24116
+ '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
24117
+ '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
24118
+ '\u0163': 't', '\u0165': 't', '\u0167': 't',
24119
+ '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
24120
+ '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
24121
+ '\u0174': 'W', '\u0175': 'w',
24122
+ '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
24123
+ '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
24124
+ '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
24125
+ '\u0132': 'IJ', '\u0133': 'ij',
24126
+ '\u0152': 'Oe', '\u0153': 'oe',
24127
+ '\u0149': "'n", '\u017f': 'ss'
24128
+ };
24129
+
24130
+ /** Detect free variable `global` from Node.js. */
24131
+ var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
24132
+
24133
+ /** Detect free variable `self`. */
24134
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
24135
+
24136
+ /** Used as a reference to the global object. */
24137
+ var root = freeGlobal || freeSelf || Function('return this')();
24138
+
24139
+ /**
24140
+ * A specialized version of `_.reduce` for arrays without support for
24141
+ * iteratee shorthands.
24142
+ *
24143
+ * @private
24144
+ * @param {Array} [array] The array to iterate over.
24145
+ * @param {Function} iteratee The function invoked per iteration.
24146
+ * @param {*} [accumulator] The initial value.
24147
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
24148
+ * the initial value.
24149
+ * @returns {*} Returns the accumulated value.
24150
+ */
24151
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
24152
+ var index = -1,
24153
+ length = array ? array.length : 0;
24154
+
24155
+ if (initAccum && length) {
24156
+ accumulator = array[++index];
24157
+ }
24158
+ while (++index < length) {
24159
+ accumulator = iteratee(accumulator, array[index], index, array);
24160
+ }
24161
+ return accumulator;
24162
+ }
24163
+
24164
+ /**
24165
+ * Splits an ASCII `string` into an array of its words.
24166
+ *
24167
+ * @private
24168
+ * @param {string} The string to inspect.
24169
+ * @returns {Array} Returns the words of `string`.
24170
+ */
24171
+ function asciiWords(string) {
24172
+ return string.match(reAsciiWord) || [];
24173
+ }
24174
+
24175
+ /**
24176
+ * The base implementation of `_.propertyOf` without support for deep paths.
24177
+ *
24178
+ * @private
24179
+ * @param {Object} object The object to query.
24180
+ * @returns {Function} Returns the new accessor function.
24181
+ */
24182
+ function basePropertyOf(object) {
24183
+ return function(key) {
24184
+ return object == null ? undefined : object[key];
24185
+ };
24186
+ }
24187
+
24188
+ /**
24189
+ * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
24190
+ * letters to basic Latin letters.
24191
+ *
24192
+ * @private
24193
+ * @param {string} letter The matched letter to deburr.
24194
+ * @returns {string} Returns the deburred letter.
24195
+ */
24196
+ var deburrLetter = basePropertyOf(deburredLetters);
24197
+
24198
+ /**
24199
+ * Checks if `string` contains a word composed of Unicode symbols.
24200
+ *
24201
+ * @private
24202
+ * @param {string} string The string to inspect.
24203
+ * @returns {boolean} Returns `true` if a word is found, else `false`.
24204
+ */
24205
+ function hasUnicodeWord(string) {
24206
+ return reHasUnicodeWord.test(string);
24207
+ }
24208
+
24209
+ /**
24210
+ * Splits a Unicode `string` into an array of its words.
24211
+ *
24212
+ * @private
24213
+ * @param {string} The string to inspect.
24214
+ * @returns {Array} Returns the words of `string`.
24215
+ */
24216
+ function unicodeWords(string) {
24217
+ return string.match(reUnicodeWord) || [];
24218
+ }
24219
+
24220
+ /** Used for built-in method references. */
24221
+ var objectProto = Object.prototype;
24222
+
24223
+ /**
24224
+ * Used to resolve the
24225
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
24226
+ * of values.
24227
+ */
24228
+ var objectToString = objectProto.toString;
24229
+
24230
+ /** Built-in value references. */
24231
+ var Symbol$1 = root.Symbol;
24232
+
24233
+ /** Used to convert symbols to primitives and strings. */
24234
+ var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined,
24235
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
24236
+
24237
+ /**
24238
+ * The base implementation of `_.toString` which doesn't convert nullish
24239
+ * values to empty strings.
24240
+ *
24241
+ * @private
24242
+ * @param {*} value The value to process.
24243
+ * @returns {string} Returns the string.
24244
+ */
24245
+ function baseToString(value) {
24246
+ // Exit early for strings to avoid a performance hit in some environments.
24247
+ if (typeof value == 'string') {
24248
+ return value;
24249
+ }
24250
+ if (isSymbol(value)) {
24251
+ return symbolToString ? symbolToString.call(value) : '';
24252
+ }
24253
+ var result = (value + '');
24254
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
24255
+ }
24256
+
24257
+ /**
24258
+ * Creates a function like `_.camelCase`.
24259
+ *
24260
+ * @private
24261
+ * @param {Function} callback The function to combine each word.
24262
+ * @returns {Function} Returns the new compounder function.
24263
+ */
24264
+ function createCompounder(callback) {
24265
+ return function(string) {
24266
+ return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
24267
+ };
24268
+ }
24269
+
24270
+ /**
24271
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
24272
+ * and has a `typeof` result of "object".
24273
+ *
24274
+ * @static
24275
+ * @memberOf _
24276
+ * @since 4.0.0
24277
+ * @category Lang
24278
+ * @param {*} value The value to check.
24279
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
24280
+ * @example
24281
+ *
24282
+ * _.isObjectLike({});
24283
+ * // => true
24284
+ *
24285
+ * _.isObjectLike([1, 2, 3]);
24286
+ * // => true
24287
+ *
24288
+ * _.isObjectLike(_.noop);
24289
+ * // => false
24290
+ *
24291
+ * _.isObjectLike(null);
24292
+ * // => false
24293
+ */
24294
+ function isObjectLike(value) {
24295
+ return !!value && typeof value == 'object';
24296
+ }
24297
+
24298
+ /**
24299
+ * Checks if `value` is classified as a `Symbol` primitive or object.
24300
+ *
24301
+ * @static
24302
+ * @memberOf _
24303
+ * @since 4.0.0
24304
+ * @category Lang
24305
+ * @param {*} value The value to check.
24306
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
24307
+ * @example
24308
+ *
24309
+ * _.isSymbol(Symbol.iterator);
24310
+ * // => true
24311
+ *
24312
+ * _.isSymbol('abc');
24313
+ * // => false
24314
+ */
24315
+ function isSymbol(value) {
24316
+ return typeof value == 'symbol' ||
24317
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
24318
+ }
24319
+
24320
+ /**
24321
+ * Converts `value` to a string. An empty string is returned for `null`
24322
+ * and `undefined` values. The sign of `-0` is preserved.
24323
+ *
24324
+ * @static
24325
+ * @memberOf _
24326
+ * @since 4.0.0
24327
+ * @category Lang
24328
+ * @param {*} value The value to process.
24329
+ * @returns {string} Returns the string.
24330
+ * @example
24331
+ *
24332
+ * _.toString(null);
24333
+ * // => ''
24334
+ *
24335
+ * _.toString(-0);
24336
+ * // => '-0'
24337
+ *
24338
+ * _.toString([1, 2, 3]);
24339
+ * // => '1,2,3'
24340
+ */
24341
+ function toString(value) {
24342
+ return value == null ? '' : baseToString(value);
24343
+ }
24344
+
24345
+ /**
24346
+ * Deburrs `string` by converting
24347
+ * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
24348
+ * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
24349
+ * letters to basic Latin letters and removing
24350
+ * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
24351
+ *
24352
+ * @static
24353
+ * @memberOf _
24354
+ * @since 3.0.0
24355
+ * @category String
24356
+ * @param {string} [string=''] The string to deburr.
24357
+ * @returns {string} Returns the deburred string.
24358
+ * @example
24359
+ *
24360
+ * _.deburr('déjà vu');
24361
+ * // => 'deja vu'
24362
+ */
24363
+ function deburr(string) {
24364
+ string = toString(string);
24365
+ return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
24366
+ }
24367
+
24368
+ /**
24369
+ * Converts `string` to
24370
+ * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
24371
+ *
24372
+ * @static
24373
+ * @memberOf _
24374
+ * @since 3.0.0
24375
+ * @category String
24376
+ * @param {string} [string=''] The string to convert.
24377
+ * @returns {string} Returns the kebab cased string.
24378
+ * @example
24379
+ *
24380
+ * _.kebabCase('Foo Bar');
24381
+ * // => 'foo-bar'
24382
+ *
24383
+ * _.kebabCase('fooBar');
24384
+ * // => 'foo-bar'
24385
+ *
24386
+ * _.kebabCase('__FOO_BAR__');
24387
+ * // => 'foo-bar'
24388
+ */
24389
+ var kebabCase = createCompounder(function(result, word, index) {
24390
+ return result + (index ? '-' : '') + word.toLowerCase();
24391
+ });
24392
+
24393
+ /**
24394
+ * Splits `string` into an array of its words.
24395
+ *
24396
+ * @static
24397
+ * @memberOf _
24398
+ * @since 3.0.0
24399
+ * @category String
24400
+ * @param {string} [string=''] The string to inspect.
24401
+ * @param {RegExp|string} [pattern] The pattern to match words.
24402
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
24403
+ * @returns {Array} Returns the words of `string`.
24404
+ * @example
24405
+ *
24406
+ * _.words('fred, barney, & pebbles');
24407
+ * // => ['fred', 'barney', 'pebbles']
24408
+ *
24409
+ * _.words('fred, barney, & pebbles', /[^, ]+/g);
24410
+ * // => ['fred', 'barney', '&', 'pebbles']
24411
+ */
24412
+ function words(string, pattern, guard) {
24413
+ string = toString(string);
24414
+ pattern = guard ? undefined : pattern;
24415
+
24416
+ if (pattern === undefined) {
24417
+ return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
24418
+ }
24419
+ return string.match(pattern) || [];
24420
+ }
24421
+
24422
+ var lodash_kebabcase = kebabCase;
24423
+
24424
+ // data.style
24425
+
24426
+ var style = function styleModule (vnode, attributes) {
24427
+ var values = [];
24428
+ var style = vnode.data.style || {};
24429
+
24430
+ // merge in `delayed` properties
24431
+ if (style.delayed) {
24432
+ objectAssign(style, style.delayed);
24433
+ }
24434
+
24435
+ lodash_forown(style, function (value, key) {
24436
+ // omit hook objects
24437
+ if (typeof value === 'string' || typeof value === 'number') {
24438
+ var kebabKey = lodash_kebabcase(key);
24439
+ values.push((key.match(/^--.*/) ? '--' + kebabKey : kebabKey) + ': ' + lodash_escape(value));
24440
+ }
24441
+ });
24442
+
24443
+ if (values.length) {
24444
+ attributes.set('style', values.join('; '));
24445
+ }
24446
+ };
24447
+
24448
+ // data.dataset
24449
+
24450
+ var dataset = function datasetModule (vnode, attributes) {
24451
+ var dataset = vnode.data.dataset || {};
24452
+
24453
+ lodash_forown(dataset, function (value, key) {
24454
+ attributes.set(`data-${key}`, lodash_escape(value));
24455
+ });
24456
+ };
19606
24457
 
19607
- module.exports = {
19608
- class: require('./class'),
19609
- props: require('./props'),
19610
- attributes: require('./attributes'),
19611
- style: require('./style'),
19612
- dataset: require('./dataset')
24458
+ var modules = {
24459
+ class: _class,
24460
+ props: props,
24461
+ attributes: attributes,
24462
+ style: style,
24463
+ dataset: dataset
19613
24464
  };
19614
24465
 
19615
24466
  /**
@@ -19777,10 +24628,10 @@ class DocumentPrintOffscreenBase {
19777
24628
  children: [...pageSvgVNodes]
19778
24629
  });
19779
24630
  const patch = init([
19780
- undefined,
19781
- undefined,
19782
- undefined,
19783
- undefined
24631
+ modules.class,
24632
+ modules.props,
24633
+ modules.attributes,
24634
+ modules.style
19784
24635
  ]);
19785
24636
  new DOMParser();
19786
24637
  const domNodes = pageSvgVNodes.map(item => patch(item)); //.map(item => docParser.parseFromString(item, 'text/html').firstChild) as Array<HTMLElement>;
@@ -22318,7 +27169,7 @@ exports.getCalleeName = getCalleeName;
22318
27169
  exports.getFocusTextSegment = getFocusTextSegment;
22319
27170
  exports.invokeTypeHandler = invokeTypeHandler;
22320
27171
  exports.isDate = isDate;
22321
- exports.objectToString = objectToString;
27172
+ exports.objectToString = objectToString$4;
22322
27173
  exports.onTableContextmenu = onTableContextmenu;
22323
27174
  exports.onceTask = onceTask;
22324
27175
  exports.parser = parser;