three-stdlib
Version:
stand-alone library of threejs examples
1 lines • 655 kB
Source Map (JSON)
{"version":3,"file":"chevrotain.cjs","sources":["../../src/libs/chevrotain.js"],"sourcesContent":["const { CstParser, Lexer, createToken } = /* @__PURE__ */ (() => {\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global\n\n const freeGlobal$1 = freeGlobal\n\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self\n\n /** Used as a reference to the global object. */\n var root = freeGlobal$1 || freeSelf || Function('return this')()\n\n const root$1 = root\n\n /** Built-in value references. */\n var Symbol$1 = root$1.Symbol\n\n const Symbol$2 = Symbol$1\n\n /** Used for built-in method references. */\n var objectProto$j = Object.prototype\n\n /** Used to check objects for own properties. */\n var hasOwnProperty$g = objectProto$j.hasOwnProperty\n\n /**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n var nativeObjectToString$1 = objectProto$j.toString\n\n /** Built-in value references. */\n var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined\n\n /**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n function getRawTag(value) {\n var isOwn = hasOwnProperty$g.call(value, symToStringTag$1),\n tag = value[symToStringTag$1]\n\n try {\n value[symToStringTag$1] = undefined\n var unmasked = true\n } catch (e) {}\n\n var result = nativeObjectToString$1.call(value)\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag$1] = tag\n } else {\n delete value[symToStringTag$1]\n }\n }\n return result\n }\n\n /** Used for built-in method references. */\n var objectProto$i = Object.prototype\n\n /**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n var nativeObjectToString = objectProto$i.toString\n\n /**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n function objectToString(value) {\n return nativeObjectToString.call(value)\n }\n\n /** `Object#toString` result references. */\n var nullTag = '[object Null]',\n undefinedTag = '[object Undefined]'\n\n /** Built-in value references. */\n var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : undefined\n\n /**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n function baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag\n }\n return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value)\n }\n\n /**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n function isObjectLike(value) {\n return value != null && typeof value == 'object'\n }\n\n /** `Object#toString` result references. */\n var symbolTag$3 = '[object Symbol]'\n\n /**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n function isSymbol(value) {\n return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag$3)\n }\n\n /**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length)\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array)\n }\n return result\n }\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n var isArray = Array.isArray\n\n const isArray$1 = isArray\n\n /** Used as references for various `Number` constants. */\n var INFINITY$3 = 1 / 0\n\n /** Used to convert symbols to primitives and strings. */\n var symbolProto$2 = Symbol$2 ? Symbol$2.prototype : undefined,\n symbolToString = symbolProto$2 ? symbolProto$2.toString : undefined\n\n /**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n function baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value\n }\n if (isArray$1(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + ''\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : ''\n }\n var result = value + ''\n return result == '0' && 1 / value == -INFINITY$3 ? '-0' : result\n }\n\n /** Used to match a single whitespace character. */\n var reWhitespace = /\\s/\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\n function trimmedEndIndex(string) {\n var index = string.length\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index\n }\n\n /** Used to match leading whitespace. */\n var reTrimStart = /^\\s+/\n\n /**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\n function baseTrim(string) {\n return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') : string\n }\n\n /**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n function isObject(value) {\n var type = typeof value\n return value != null && (type == 'object' || type == 'function')\n }\n\n /** Used as references for various `Number` constants. */\n var NAN = 0 / 0\n\n /** Used to detect bad signed hexadecimal string values. */\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i\n\n /** Used to detect binary string values. */\n var reIsBinary = /^0b[01]+$/i\n\n /** Used to detect octal string values. */\n var reIsOctal = /^0o[0-7]+$/i\n\n /** Built-in method references without a dependency on `root`. */\n var freeParseInt = parseInt\n\n /**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\n function toNumber(value) {\n if (typeof value == 'number') {\n return value\n }\n if (isSymbol(value)) {\n return NAN\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value\n value = isObject(other) ? other + '' : other\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value\n }\n value = baseTrim(value)\n var isBinary = reIsBinary.test(value)\n return isBinary || reIsOctal.test(value)\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : reIsBadHex.test(value)\n ? NAN\n : +value\n }\n\n /** Used as references for various `Number` constants. */\n var INFINITY$2 = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e308\n\n /**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\n function toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0\n }\n value = toNumber(value)\n if (value === INFINITY$2 || value === -INFINITY$2) {\n var sign = value < 0 ? -1 : 1\n return sign * MAX_INTEGER\n }\n return value === value ? value : 0\n }\n\n /**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\n function toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1\n\n return result === result ? (remainder ? result - remainder : result) : 0\n }\n\n /**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\n function identity(value) {\n return value\n }\n\n /** `Object#toString` result references. */\n var asyncTag = '[object AsyncFunction]',\n funcTag$2 = '[object Function]',\n genTag$1 = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]'\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction(value) {\n if (!isObject(value)) {\n return false\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value)\n return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag\n }\n\n /** Used to detect overreaching core-js shims. */\n var coreJsData = root$1['__core-js_shared__']\n\n const coreJsData$1 = coreJsData\n\n /** Used to detect methods masquerading as native. */\n var maskSrcKey = (function () {\n var uid = /[^.]+$/.exec((coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO) || '')\n return uid ? 'Symbol(src)_1.' + uid : ''\n })()\n\n /**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n function isMasked(func) {\n return !!maskSrcKey && maskSrcKey in func\n }\n\n /** Used for built-in method references. */\n var funcProto$1 = Function.prototype\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString$1 = funcProto$1.toString\n\n /**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\n function toSource(func) {\n if (func != null) {\n try {\n return funcToString$1.call(func)\n } catch (e) {}\n try {\n return func + ''\n } catch (e) {}\n }\n return ''\n }\n\n /**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g\n\n /** Used to detect host constructors (Safari). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/\n\n /** Used for built-in method references. */\n var funcProto = Function.prototype,\n objectProto$h = Object.prototype\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString = funcProto.toString\n\n /** Used to check objects for own properties. */\n var hasOwnProperty$f = objectProto$h.hasOwnProperty\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp(\n '^' +\n funcToString\n .call(hasOwnProperty$f)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') +\n '$',\n )\n\n /**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n function baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor\n return pattern.test(toSource(value))\n }\n\n /**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function getValue(object, key) {\n return object == null ? undefined : object[key]\n }\n\n /**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n function getNative(object, key) {\n var value = getValue(object, key)\n return baseIsNative(value) ? value : undefined\n }\n\n /* Built-in method references that are verified to be native. */\n var WeakMap = getNative(root$1, 'WeakMap')\n\n const WeakMap$1 = WeakMap\n\n /** Built-in value references. */\n var objectCreate = Object.create\n\n /**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\n var baseCreate = (function () {\n function object() {}\n return function (proto) {\n if (!isObject(proto)) {\n return {}\n }\n if (objectCreate) {\n return objectCreate(proto)\n }\n object.prototype = proto\n var result = new object()\n object.prototype = undefined\n return result\n }\n })()\n\n const baseCreate$1 = baseCreate\n\n /**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\n function apply(func, thisArg, args) {\n switch (args.length) {\n case 0:\n return func.call(thisArg)\n case 1:\n return func.call(thisArg, args[0])\n case 2:\n return func.call(thisArg, args[0], args[1])\n case 3:\n return func.call(thisArg, args[0], args[1], args[2])\n }\n return func.apply(thisArg, args)\n }\n\n /**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\n function noop() {\n // No operation performed.\n }\n\n /**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\n function copyArray(source, array) {\n var index = -1,\n length = source.length\n\n array || (array = Array(length))\n while (++index < length) {\n array[index] = source[index]\n }\n return array\n }\n\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\n var HOT_COUNT = 800,\n HOT_SPAN = 16\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeNow = Date.now\n\n /**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\n function shortOut(func) {\n var count = 0,\n lastCalled = 0\n\n return function () {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled)\n\n lastCalled = stamp\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0]\n }\n } else {\n count = 0\n }\n return func.apply(undefined, arguments)\n }\n }\n\n /**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\n function constant(value) {\n return function () {\n return value\n }\n }\n\n var defineProperty = (function () {\n try {\n var func = getNative(Object, 'defineProperty')\n func({}, '', {})\n return func\n } catch (e) {}\n })()\n\n const defineProperty$1 = defineProperty\n\n /**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var baseSetToString = !defineProperty$1\n ? identity\n : function (func, string) {\n return defineProperty$1(func, 'toString', {\n configurable: true,\n enumerable: false,\n value: constant(string),\n writable: true,\n })\n }\n\n const baseSetToString$1 = baseSetToString\n\n /**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var setToString = shortOut(baseSetToString$1)\n\n const setToString$1 = setToString\n\n /**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break\n }\n }\n return array\n }\n\n /**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1)\n\n while (fromRight ? index-- : ++index < length) {\n if (predicate(array[index], index, array)) {\n return index\n }\n }\n return -1\n }\n\n /**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\n function baseIsNaN(value) {\n return value !== value\n }\n\n /**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length\n\n while (++index < length) {\n if (array[index] === value) {\n return index\n }\n }\n return -1\n }\n\n /**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOf(array, value, fromIndex) {\n return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex)\n }\n\n /**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length\n return !!length && baseIndexOf(array, value, 0) > -1\n }\n\n /** Used as references for various `Number` constants. */\n var MAX_SAFE_INTEGER$1 = 9007199254740991\n\n /** Used to detect unsigned integer values. */\n var reIsUint = /^(?:0|[1-9]\\d*)$/\n\n /**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n function isIndex(value, length) {\n var type = typeof value\n length = length == null ? MAX_SAFE_INTEGER$1 : length\n\n return (\n !!length &&\n (type == 'number' || (type != 'symbol' && reIsUint.test(value))) &&\n value > -1 &&\n value % 1 == 0 &&\n value < length\n )\n }\n\n /**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty$1) {\n defineProperty$1(object, key, {\n configurable: true,\n enumerable: true,\n value: value,\n writable: true,\n })\n } else {\n object[key] = value\n }\n }\n\n /**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n function eq(value, other) {\n return value === other || (value !== value && other !== other)\n }\n\n /** Used for built-in method references. */\n var objectProto$g = Object.prototype\n\n /** Used to check objects for own properties. */\n var hasOwnProperty$e = objectProto$g.hasOwnProperty\n\n /**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignValue(object, key, value) {\n var objValue = object[key]\n if (!(hasOwnProperty$e.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value)\n }\n }\n\n /**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\n function copyObject(source, props, object, customizer) {\n var isNew = !object\n object || (object = {})\n\n var index = -1,\n length = props.length\n\n while (++index < length) {\n var key = props[index]\n\n var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined\n\n if (newValue === undefined) {\n newValue = source[key]\n }\n if (isNew) {\n baseAssignValue(object, key, newValue)\n } else {\n assignValue(object, key, newValue)\n }\n }\n return object\n }\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeMax$3 = Math.max\n\n /**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\n function overRest(func, start, transform) {\n start = nativeMax$3(start === undefined ? func.length - 1 : start, 0)\n return function () {\n var args = arguments,\n index = -1,\n length = nativeMax$3(args.length - start, 0),\n array = Array(length)\n\n while (++index < length) {\n array[index] = args[start + index]\n }\n index = -1\n var otherArgs = Array(start + 1)\n while (++index < start) {\n otherArgs[index] = args[index]\n }\n otherArgs[start] = transform(array)\n return apply(func, this, otherArgs)\n }\n }\n\n /**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\n function baseRest(func, start) {\n return setToString$1(overRest(func, start, identity), func + '')\n }\n\n /** Used as references for various `Number` constants. */\n var MAX_SAFE_INTEGER = 9007199254740991\n\n /**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n function isLength(value) {\n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER\n }\n\n /**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n function isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value)\n }\n\n /**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\n function isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false\n }\n var type = typeof index\n if (type == 'number' ? isArrayLike(object) && isIndex(index, object.length) : type == 'string' && index in object) {\n return eq(object[index], value)\n }\n return false\n }\n\n /**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\n function createAssigner(assigner) {\n return baseRest(function (object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined\n\n customizer = assigner.length > 3 && typeof customizer == 'function' ? (length--, customizer) : undefined\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer\n length = 1\n }\n object = Object(object)\n while (++index < length) {\n var source = sources[index]\n if (source) {\n assigner(object, source, index, customizer)\n }\n }\n return object\n })\n }\n\n /** Used for built-in method references. */\n var objectProto$f = Object.prototype\n\n /**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\n function isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$f\n\n return value === proto\n }\n\n /**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\n function baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n)\n\n while (++index < n) {\n result[index] = iteratee(index)\n }\n return result\n }\n\n /** `Object#toString` result references. */\n var argsTag$3 = '[object Arguments]'\n\n /**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\n function baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag$3\n }\n\n /** Used for built-in method references. */\n var objectProto$e = Object.prototype\n\n /** Used to check objects for own properties. */\n var hasOwnProperty$d = objectProto$e.hasOwnProperty\n\n /** Built-in value references. */\n var propertyIsEnumerable$1 = objectProto$e.propertyIsEnumerable\n\n /**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n var isArguments = baseIsArguments(\n (function () {\n return arguments\n })(),\n )\n ? baseIsArguments\n : function (value) {\n return (\n isObjectLike(value) && hasOwnProperty$d.call(value, 'callee') && !propertyIsEnumerable$1.call(value, 'callee')\n )\n }\n\n const isArguments$1 = isArguments\n\n /**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\n function stubFalse() {\n return false\n }\n\n /** Detect free variable `exports`. */\n var freeExports$2 = typeof exports == 'object' && exports && !exports.nodeType && exports\n\n /** Detect free variable `module`. */\n var freeModule$2 = freeExports$2 && typeof module == 'object' && module && !module.nodeType && module\n\n /** Detect the popular CommonJS extension `module.exports`. */\n var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2\n\n /** Built-in value references. */\n var Buffer$1 = moduleExports$2 ? root$1.Buffer : undefined\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : undefined\n\n /**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\n var isBuffer = nativeIsBuffer || stubFalse\n\n const isBuffer$1 = isBuffer\n\n /** `Object#toString` result references. */\n var argsTag$2 = '[object Arguments]',\n arrayTag$2 = '[object Array]',\n boolTag$3 = '[object Boolean]',\n dateTag$3 = '[object Date]',\n errorTag$2 = '[object Error]',\n funcTag$1 = '[object Function]',\n mapTag$6 = '[object Map]',\n numberTag$3 = '[object Number]',\n objectTag$3 = '[object Object]',\n regexpTag$4 = '[object RegExp]',\n setTag$6 = '[object Set]',\n stringTag$4 = '[object String]',\n weakMapTag$2 = '[object WeakMap]'\n\n var arrayBufferTag$3 = '[object ArrayBuffer]',\n dataViewTag$4 = '[object DataView]',\n float32Tag$2 = '[object Float32Array]',\n float64Tag$2 = '[object Float64Array]',\n int8Tag$2 = '[object Int8Array]',\n int16Tag$2 = '[object Int16Array]',\n int32Tag$2 = '[object Int32Array]',\n uint8Tag$2 = '[object Uint8Array]',\n uint8ClampedTag$2 = '[object Uint8ClampedArray]',\n uint16Tag$2 = '[object Uint16Array]',\n uint32Tag$2 = '[object Uint32Array]'\n\n /** Used to identify `toStringTag` values of typed arrays. */\n var typedArrayTags = {}\n typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[\n int16Tag$2\n ] = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2] = typedArrayTags[\n uint16Tag$2\n ] = typedArrayTags[uint32Tag$2] = true\n typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$2] = typedArrayTags[arrayBufferTag$3] = typedArrayTags[\n boolTag$3\n ] = typedArrayTags[dataViewTag$4] = typedArrayTags[dateTag$3] = typedArrayTags[errorTag$2] = typedArrayTags[\n funcTag$1\n ] = typedArrayTags[mapTag$6] = typedArrayTags[numberTag$3] = typedArrayTags[objectTag$3] = typedArrayTags[\n regexpTag$4\n ] = typedArrayTags[setTag$6] = typedArrayTags[stringTag$4] = typedArrayTags[weakMapTag$2] = false\n\n /**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\n function baseIsTypedArray(value) {\n return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]\n }\n\n /**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\n function baseUnary(func) {\n return function (value) {\n return func(value)\n }\n }\n\n /** Detect free variable `exports`. */\n var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports\n\n /** Detect free variable `module`. */\n var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module\n\n /** Detect the popular CommonJS extension `module.exports`. */\n var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1\n\n /** Detect free variable `process` from Node.js. */\n var freeProcess = moduleExports$1 && freeGlobal$1.process\n\n /** Used to access faster Node.js helpers. */\n var nodeUtil = (function () {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule$1 && freeModule$1.require && freeModule$1.require('util').types\n\n if (types) {\n return types\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util')\n } catch (e) {}\n })()\n\n const nodeUtil$1 = nodeUtil\n\n /* Node.js helper references. */\n var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray\n\n /**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray\n\n const isTypedArray$1 = isTypedArray\n\n /** Used for built-in method references. */\n var objectProto$d = Object.prototype\n\n /** Used to check objects for own properties. */\n var hasOwnProperty$c = objectProto$d.hasOwnProperty\n\n /**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\n function arrayLikeKeys(value, inherited) {\n var isArr = isArray$1(value),\n isArg = !isArr && isArguments$1(value),\n isBuff = !isArr && !isArg && isBuffer$1(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray$1(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length\n\n for (var key in value) {\n if (\n (inherited || hasOwnProperty$c.call(value, key)) &&\n !(\n skipIndexes &&\n // Safari 9 has enumerable `arguments.length` in strict mode.\n (key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length))\n )\n ) {\n result.push(key)\n }\n }\n return result\n }\n\n /**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function (arg) {\n return func(transform(arg))\n }\n }\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeKeys = overArg(Object.keys, Object)\n\n const nativeKeys$1 = nativeKeys\n\n /** Used for built-in method references. */\n var objectProto$c = Object.prototype\n\n /** Used to check objects for own properties. */\n var hasOwnProperty$b = objectProto$c.hasOwnProperty\n\n /**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys$1(object)\n }\n var result = []\n for (var key in Object(object)) {\n if (hasOwnProperty$b.call(object, key) && key != 'constructor') {\n result.push(key)\n }\n }\n return result\n }\n\n /**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n function keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object)\n }\n\n /** Used for built-in method references. */\n var objectProto$b = Object.prototype\n\n /** Used to check objects for own properties. */\n var hasOwnProperty$a = objectProto$b.hasOwnProperty\n\n /**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\n var assign = createAssigner(function (object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object)\n return\n }\n for (var key in source) {\n if (hasOwnProperty$a.call(source, key)) {\n assignValue(object, key, source[key])\n }\n }\n })\n\n const assign$1 = assign\n\n /**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function nativeKeysIn(object) {\n var result = []\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key)\n }\n }\n return result\n }\n\n /** Used for built-in method references. */\n var objectProto$a = Object.prototype\n\n /** Used to check objects for own properties. */\n var hasOwnProperty$9 = objectProto$a.hasOwnProperty\n\n /**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object)\n }\n var isProto = isPrototype(object),\n result = []\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty$9.call(object, key)))) {\n result.push(key)\n }\n }\n return result\n }\n\n /**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\n function keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object)\n }\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/\n\n /**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n function isKey(value, object) {\n if (isArray$1(value)) {\n return false\n }\n var type = typeof value\n if (type == 'number' || type == 's