UNPKG

cloudinary-video-player

Version:
1,995 lines (1,683 loc) 309 kB
import { g as getDefaultExportFromCjs } from './_commonjsHelpers.js'; import { b as require_root, r as requireIsFunction, a as requireIsObject, f as require_baseGetTag, g as requireIsObjectLike, h as require_freeGlobal, c as requireIsArray, j as require_Symbol, i as isObject$2, d as isString$1, F as FLOATING_TO, k as PRELOAD } from './video-player.const.js'; import { i as isRawUrl, a as appendQueryParams } from './cloudinary-config-from-options.js'; import { _ as _vjs } from './_videojs-proxy.js'; import { L as LAYER_KEYWORD_PARAMS, a as LEGACY_CONDITIONAL_OPERATORS, b as LEGACY_PREDEFINED_VARS, O as OFFSET_ANY_PATTERN_RE, R as RANGE_VALUE_RE, u as unsigned_url_prefix } from './cloudinary-url-prefix.js'; /** Used for built-in method references. */ var _isPrototype; var hasRequired_isPrototype; function require_isPrototype () { if (hasRequired_isPrototype) return _isPrototype; hasRequired_isPrototype = 1; var objectProto = Object.prototype; /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } _isPrototype = isPrototype; return _isPrototype; } /** * Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ var _overArg; var hasRequired_overArg; function require_overArg () { if (hasRequired_overArg) return _overArg; hasRequired_overArg = 1; function overArg(func, transform) { return function(arg) { return func(transform(arg)); }; } _overArg = overArg; return _overArg; } var _nativeKeys; var hasRequired_nativeKeys; function require_nativeKeys () { if (hasRequired_nativeKeys) return _nativeKeys; hasRequired_nativeKeys = 1; var overArg = require_overArg(); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = overArg(Object.keys, Object); _nativeKeys = nativeKeys; return _nativeKeys; } var _baseKeys; var hasRequired_baseKeys; function require_baseKeys () { if (hasRequired_baseKeys) return _baseKeys; hasRequired_baseKeys = 1; var isPrototype = require_isPrototype(), nativeKeys = require_nativeKeys(); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } var result = []; for (var key in Object(object)) { if (hasOwnProperty.call(object, key) && key != 'constructor') { result.push(key); } } return result; } _baseKeys = baseKeys; return _baseKeys; } var _coreJsData; var hasRequired_coreJsData; function require_coreJsData () { if (hasRequired_coreJsData) return _coreJsData; hasRequired_coreJsData = 1; var root = require_root(); /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; _coreJsData = coreJsData; return _coreJsData; } var _isMasked; var hasRequired_isMasked; function require_isMasked () { if (hasRequired_isMasked) return _isMasked; hasRequired_isMasked = 1; var coreJsData = require_coreJsData(); /** Used to detect methods masquerading as native. */ var maskSrcKey = (function() { var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); return uid ? ('Symbol(src)_1.' + uid) : ''; }()); /** * Checks if `func` has its source masked. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ function isMasked(func) { return !!maskSrcKey && (maskSrcKey in func); } _isMasked = isMasked; return _isMasked; } /** Used for built-in method references. */ var _toSource; var hasRequired_toSource; function require_toSource () { if (hasRequired_toSource) return _toSource; hasRequired_toSource = 1; var funcProto = Function.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** * Converts `func` to its source code. * * @private * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { if (func != null) { try { return funcToString.call(func); } catch (e) {} try { return (func + ''); } catch (e) {} } return ''; } _toSource = toSource; return _toSource; } var _baseIsNative; var hasRequired_baseIsNative; function require_baseIsNative () { if (hasRequired_baseIsNative) return _baseIsNative; hasRequired_baseIsNative = 1; var isFunction = requireIsFunction(), isMasked = require_isMasked(), isObject = requireIsObject(), toSource = require_toSource(); /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); /** * The base implementation of `_.isNative` without bad shim checks. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a native function, * else `false`. */ function baseIsNative(value) { if (!isObject(value) || isMasked(value)) { return false; } var pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } _baseIsNative = baseIsNative; return _baseIsNative; } /** * Gets the value at `key` of `object`. * * @private * @param {Object} [object] The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ var _getValue; var hasRequired_getValue; function require_getValue () { if (hasRequired_getValue) return _getValue; hasRequired_getValue = 1; function getValue(object, key) { return object == null ? undefined : object[key]; } _getValue = getValue; return _getValue; } var _getNative; var hasRequired_getNative; function require_getNative () { if (hasRequired_getNative) return _getNative; hasRequired_getNative = 1; var baseIsNative = require_baseIsNative(), getValue = require_getValue(); /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : undefined; } _getNative = getNative; return _getNative; } var _DataView; var hasRequired_DataView; function require_DataView () { if (hasRequired_DataView) return _DataView; hasRequired_DataView = 1; var getNative = require_getNative(), root = require_root(); /* Built-in method references that are verified to be native. */ var DataView = getNative(root, 'DataView'); _DataView = DataView; return _DataView; } var _Map; var hasRequired_Map; function require_Map () { if (hasRequired_Map) return _Map; hasRequired_Map = 1; var getNative = require_getNative(), root = require_root(); /* Built-in method references that are verified to be native. */ var Map = getNative(root, 'Map'); _Map = Map; return _Map; } var _Promise; var hasRequired_Promise; function require_Promise () { if (hasRequired_Promise) return _Promise; hasRequired_Promise = 1; var getNative = require_getNative(), root = require_root(); /* Built-in method references that are verified to be native. */ var Promise = getNative(root, 'Promise'); _Promise = Promise; return _Promise; } var _Set; var hasRequired_Set; function require_Set () { if (hasRequired_Set) return _Set; hasRequired_Set = 1; var getNative = require_getNative(), root = require_root(); /* Built-in method references that are verified to be native. */ var Set = getNative(root, 'Set'); _Set = Set; return _Set; } var _WeakMap; var hasRequired_WeakMap; function require_WeakMap () { if (hasRequired_WeakMap) return _WeakMap; hasRequired_WeakMap = 1; var getNative = require_getNative(), root = require_root(); /* Built-in method references that are verified to be native. */ var WeakMap = getNative(root, 'WeakMap'); _WeakMap = WeakMap; return _WeakMap; } var _getTag; var hasRequired_getTag; function require_getTag () { if (hasRequired_getTag) return _getTag; hasRequired_getTag = 1; var DataView = require_DataView(), Map = require_Map(), Promise = require_Promise(), Set = require_Set(), WeakMap = require_WeakMap(), baseGetTag = require_baseGetTag(), toSource = require_toSource(); /** `Object#toString` result references. */ var mapTag = '[object Map]', objectTag = '[object Object]', promiseTag = '[object Promise]', setTag = '[object Set]', weakMapTag = '[object WeakMap]'; var dataViewTag = '[object DataView]'; /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); /** * Gets the `toStringTag` of `value`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result; }; } _getTag = getTag; return _getTag; } var _baseIsArguments; var hasRequired_baseIsArguments; function require_baseIsArguments () { if (hasRequired_baseIsArguments) return _baseIsArguments; hasRequired_baseIsArguments = 1; var baseGetTag = require_baseGetTag(), isObjectLike = requireIsObjectLike(); /** `Object#toString` result references. */ var argsTag = '[object Arguments]'; /** * The base implementation of `_.isArguments`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag; } _baseIsArguments = baseIsArguments; return _baseIsArguments; } var isArguments_1; var hasRequiredIsArguments; function requireIsArguments () { if (hasRequiredIsArguments) return isArguments_1; hasRequiredIsArguments = 1; var baseIsArguments = require_baseIsArguments(), isObjectLike = requireIsObjectLike(); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; isArguments_1 = isArguments; return isArguments_1; } /** Used as references for various `Number` constants. */ var isLength_1; var hasRequiredIsLength; function requireIsLength () { if (hasRequiredIsLength) return isLength_1; hasRequiredIsLength = 1; var MAX_SAFE_INTEGER = 9007199254740991; /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } isLength_1 = isLength; return isLength_1; } var isArrayLike_1; var hasRequiredIsArrayLike; function requireIsArrayLike () { if (hasRequiredIsArrayLike) return isArrayLike_1; hasRequiredIsArrayLike = 1; var isFunction = requireIsFunction(), isLength = requireIsLength(); /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } isArrayLike_1 = isArrayLike; return isArrayLike_1; } var isBuffer$1 = {exports: {}}; /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ var stubFalse_1; var hasRequiredStubFalse; function requireStubFalse () { if (hasRequiredStubFalse) return stubFalse_1; hasRequiredStubFalse = 1; function stubFalse() { return false; } stubFalse_1 = stubFalse; return stubFalse_1; } isBuffer$1.exports; var hasRequiredIsBuffer; function requireIsBuffer () { if (hasRequiredIsBuffer) return isBuffer$1.exports; hasRequiredIsBuffer = 1; (function (module, exports$1) { var root = require_root(), stubFalse = requireStubFalse(); /** Detect free variable `exports`. */ var freeExports = exports$1 && !exports$1.nodeType && exports$1; /** Detect free variable `module`. */ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer = nativeIsBuffer || stubFalse; module.exports = isBuffer; } (isBuffer$1, isBuffer$1.exports)); return isBuffer$1.exports; } var _baseIsTypedArray; var hasRequired_baseIsTypedArray; function require_baseIsTypedArray () { if (hasRequired_baseIsTypedArray) return _baseIsTypedArray; hasRequired_baseIsTypedArray = 1; var baseGetTag = require_baseGetTag(), isLength = requireIsLength(), isObjectLike = requireIsObjectLike(); /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** Used to identify `toStringTag` values of typed arrays. */ var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** * The base implementation of `_.isTypedArray` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } _baseIsTypedArray = baseIsTypedArray; return _baseIsTypedArray; } /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ var _baseUnary; var hasRequired_baseUnary; function require_baseUnary () { if (hasRequired_baseUnary) return _baseUnary; hasRequired_baseUnary = 1; function baseUnary(func) { return function(value) { return func(value); }; } _baseUnary = baseUnary; return _baseUnary; } var _nodeUtil = {exports: {}}; _nodeUtil.exports; var hasRequired_nodeUtil; function require_nodeUtil () { if (hasRequired_nodeUtil) return _nodeUtil.exports; hasRequired_nodeUtil = 1; (function (module, exports$1) { var freeGlobal = require_freeGlobal(); /** Detect free variable `exports`. */ var freeExports = exports$1 && !exports$1.nodeType && exports$1; /** Detect free variable `module`. */ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { // Use `util.types` for Node.js 10+. var types = freeModule && freeModule.require && freeModule.require('util').types; if (types) { return types; } // Legacy `process.binding('util')` for Node.js < 10. return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); module.exports = nodeUtil; } (_nodeUtil, _nodeUtil.exports)); return _nodeUtil.exports; } var isTypedArray_1; var hasRequiredIsTypedArray; function requireIsTypedArray () { if (hasRequiredIsTypedArray) return isTypedArray_1; hasRequiredIsTypedArray = 1; var baseIsTypedArray = require_baseIsTypedArray(), baseUnary = require_baseUnary(), nodeUtil = require_nodeUtil(); /* Node.js helper references. */ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * Checks if `value` is classified as a typed array. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); * // => true * * _.isTypedArray([]); * // => false */ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; isTypedArray_1 = isTypedArray; return isTypedArray_1; } var isSymbol_1; var hasRequiredIsSymbol; function requireIsSymbol () { if (hasRequiredIsSymbol) return isSymbol_1; hasRequiredIsSymbol = 1; var baseGetTag = require_baseGetTag(), isObjectLike = requireIsObjectLike(); /** `Object#toString` result references. */ var symbolTag = '[object Symbol]'; /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); * // => true * * _.isSymbol('abc'); * // => false */ function isSymbol(value) { return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag); } isSymbol_1 = isSymbol; return isSymbol_1; } var _isKey; var hasRequired_isKey; function require_isKey () { if (hasRequired_isKey) return _isKey; hasRequired_isKey = 1; var isArray = requireIsArray(), isSymbol = requireIsSymbol(); /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; /** * Checks if `value` is a property name and not a property path. * * @private * @param {*} value The value to check. * @param {Object} [object] The object to query keys on. * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { if (isArray(value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || (object != null && value in Object(object)); } _isKey = isKey; return _isKey; } var _nativeCreate; var hasRequired_nativeCreate; function require_nativeCreate () { if (hasRequired_nativeCreate) return _nativeCreate; hasRequired_nativeCreate = 1; var getNative = require_getNative(); /* Built-in method references that are verified to be native. */ var nativeCreate = getNative(Object, 'create'); _nativeCreate = nativeCreate; return _nativeCreate; } var _hashClear; var hasRequired_hashClear; function require_hashClear () { if (hasRequired_hashClear) return _hashClear; hasRequired_hashClear = 1; var nativeCreate = require_nativeCreate(); /** * Removes all key-value entries from the hash. * * @private * @name clear * @memberOf Hash */ function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; } _hashClear = hashClear; return _hashClear; } /** * Removes `key` and its value from the hash. * * @private * @name delete * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ var _hashDelete; var hasRequired_hashDelete; function require_hashDelete () { if (hasRequired_hashDelete) return _hashDelete; hasRequired_hashDelete = 1; function hashDelete(key) { var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } _hashDelete = hashDelete; return _hashDelete; } var _hashGet; var hasRequired_hashGet; function require_hashGet () { if (hasRequired_hashGet) return _hashGet; hasRequired_hashGet = 1; var nativeCreate = require_nativeCreate(); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Gets the hash value for `key`. * * @private * @name get * @memberOf Hash * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function hashGet(key) { var data = this.__data__; if (nativeCreate) { var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } return hasOwnProperty.call(data, key) ? data[key] : undefined; } _hashGet = hashGet; return _hashGet; } var _hashHas; var hasRequired_hashHas; function require_hashHas () { if (hasRequired_hashHas) return _hashHas; hasRequired_hashHas = 1; var nativeCreate = require_nativeCreate(); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Checks if a hash value for `key` exists. * * @private * @name has * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function hashHas(key) { var data = this.__data__; return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); } _hashHas = hashHas; return _hashHas; } var _hashSet; var hasRequired_hashSet; function require_hashSet () { if (hasRequired_hashSet) return _hashSet; hasRequired_hashSet = 1; var nativeCreate = require_nativeCreate(); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Sets the hash `key` to `value`. * * @private * @name set * @memberOf Hash * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the hash instance. */ function hashSet(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; return this; } _hashSet = hashSet; return _hashSet; } var _Hash; var hasRequired_Hash; function require_Hash () { if (hasRequired_Hash) return _Hash; hasRequired_Hash = 1; var hashClear = require_hashClear(), hashDelete = require_hashDelete(), hashGet = require_hashGet(), hashHas = require_hashHas(), hashSet = require_hashSet(); /** * Creates a hash object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Hash(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `Hash`. Hash.prototype.clear = hashClear; Hash.prototype['delete'] = hashDelete; Hash.prototype.get = hashGet; Hash.prototype.has = hashHas; Hash.prototype.set = hashSet; _Hash = Hash; return _Hash; } /** * Removes all key-value entries from the list cache. * * @private * @name clear * @memberOf ListCache */ var _listCacheClear; var hasRequired_listCacheClear; function require_listCacheClear () { if (hasRequired_listCacheClear) return _listCacheClear; hasRequired_listCacheClear = 1; function listCacheClear() { this.__data__ = []; this.size = 0; } _listCacheClear = listCacheClear; return _listCacheClear; } /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ var eq_1; var hasRequiredEq; function requireEq () { if (hasRequiredEq) return eq_1; hasRequiredEq = 1; function eq(value, other) { return value === other || (value !== value && other !== other); } eq_1 = eq; return eq_1; } var _assocIndexOf; var hasRequired_assocIndexOf; function require_assocIndexOf () { if (hasRequired_assocIndexOf) return _assocIndexOf; hasRequired_assocIndexOf = 1; var eq = requireEq(); /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } _assocIndexOf = assocIndexOf; return _assocIndexOf; } var _listCacheDelete; var hasRequired_listCacheDelete; function require_listCacheDelete () { if (hasRequired_listCacheDelete) return _listCacheDelete; hasRequired_listCacheDelete = 1; var assocIndexOf = require_assocIndexOf(); /** Used for built-in method references. */ var arrayProto = Array.prototype; /** Built-in value references. */ var splice = arrayProto.splice; /** * Removes `key` and its value from the list cache. * * @private * @name delete * @memberOf ListCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function listCacheDelete(key) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { return false; } var lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); } else { splice.call(data, index, 1); } --this.size; return true; } _listCacheDelete = listCacheDelete; return _listCacheDelete; } var _listCacheGet; var hasRequired_listCacheGet; function require_listCacheGet () { if (hasRequired_listCacheGet) return _listCacheGet; hasRequired_listCacheGet = 1; var assocIndexOf = require_assocIndexOf(); /** * Gets the list cache value for `key`. * * @private * @name get * @memberOf ListCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function listCacheGet(key) { var data = this.__data__, index = assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } _listCacheGet = listCacheGet; return _listCacheGet; } var _listCacheHas; var hasRequired_listCacheHas; function require_listCacheHas () { if (hasRequired_listCacheHas) return _listCacheHas; hasRequired_listCacheHas = 1; var assocIndexOf = require_assocIndexOf(); /** * Checks if a list cache value for `key` exists. * * @private * @name has * @memberOf ListCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } _listCacheHas = listCacheHas; return _listCacheHas; } var _listCacheSet; var hasRequired_listCacheSet; function require_listCacheSet () { if (hasRequired_listCacheSet) return _listCacheSet; hasRequired_listCacheSet = 1; var assocIndexOf = require_assocIndexOf(); /** * Sets the list cache `key` to `value`. * * @private * @name set * @memberOf ListCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the list cache instance. */ function listCacheSet(key, value) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { ++this.size; data.push([key, value]); } else { data[index][1] = value; } return this; } _listCacheSet = listCacheSet; return _listCacheSet; } var _ListCache; var hasRequired_ListCache; function require_ListCache () { if (hasRequired_ListCache) return _ListCache; hasRequired_ListCache = 1; var listCacheClear = require_listCacheClear(), listCacheDelete = require_listCacheDelete(), listCacheGet = require_listCacheGet(), listCacheHas = require_listCacheHas(), listCacheSet = require_listCacheSet(); /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; _ListCache = ListCache; return _ListCache; } var _mapCacheClear; var hasRequired_mapCacheClear; function require_mapCacheClear () { if (hasRequired_mapCacheClear) return _mapCacheClear; hasRequired_mapCacheClear = 1; var Hash = require_Hash(), ListCache = require_ListCache(), Map = require_Map(); /** * Removes all key-value entries from the map. * * @private * @name clear * @memberOf MapCache */ function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new Hash, 'map': new (Map || ListCache), 'string': new Hash }; } _mapCacheClear = mapCacheClear; return _mapCacheClear; } /** * Checks if `value` is suitable for use as unique object key. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ var _isKeyable; var hasRequired_isKeyable; function require_isKeyable () { if (hasRequired_isKeyable) return _isKeyable; hasRequired_isKeyable = 1; function isKeyable(value) { var type = typeof value; return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') ? (value !== '__proto__') : (value === null); } _isKeyable = isKeyable; return _isKeyable; } var _getMapData; var hasRequired_getMapData; function require_getMapData () { if (hasRequired_getMapData) return _getMapData; hasRequired_getMapData = 1; var isKeyable = require_isKeyable(); /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } _getMapData = getMapData; return _getMapData; } var _mapCacheDelete; var hasRequired_mapCacheDelete; function require_mapCacheDelete () { if (hasRequired_mapCacheDelete) return _mapCacheDelete; hasRequired_mapCacheDelete = 1; var getMapData = require_getMapData(); /** * Removes `key` and its value from the map. * * @private * @name delete * @memberOf MapCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function mapCacheDelete(key) { var result = getMapData(this, key)['delete'](key); this.size -= result ? 1 : 0; return result; } _mapCacheDelete = mapCacheDelete; return _mapCacheDelete; } var _mapCacheGet; var hasRequired_mapCacheGet; function require_mapCacheGet () { if (hasRequired_mapCacheGet) return _mapCacheGet; hasRequired_mapCacheGet = 1; var getMapData = require_getMapData(); /** * Gets the map value for `key`. * * @private * @name get * @memberOf MapCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function mapCacheGet(key) { return getMapData(this, key).get(key); } _mapCacheGet = mapCacheGet; return _mapCacheGet; } var _mapCacheHas; var hasRequired_mapCacheHas; function require_mapCacheHas () { if (hasRequired_mapCacheHas) return _mapCacheHas; hasRequired_mapCacheHas = 1; var getMapData = require_getMapData(); /** * Checks if a map value for `key` exists. * * @private * @name has * @memberOf MapCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function mapCacheHas(key) { return getMapData(this, key).has(key); } _mapCacheHas = mapCacheHas; return _mapCacheHas; } var _mapCacheSet; var hasRequired_mapCacheSet; function require_mapCacheSet () { if (hasRequired_mapCacheSet) return _mapCacheSet; hasRequired_mapCacheSet = 1; var getMapData = require_getMapData(); /** * Sets the map `key` to `value`. * * @private * @name set * @memberOf MapCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the map cache instance. */ function mapCacheSet(key, value) { var data = getMapData(this, key), size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } _mapCacheSet = mapCacheSet; return _mapCacheSet; } var _MapCache; var hasRequired_MapCache; function require_MapCache () { if (hasRequired_MapCache) return _MapCache; hasRequired_MapCache = 1; var mapCacheClear = require_mapCacheClear(), mapCacheDelete = require_mapCacheDelete(), mapCacheGet = require_mapCacheGet(), mapCacheHas = require_mapCacheHas(), mapCacheSet = require_mapCacheSet(); /** * Creates a map cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function MapCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `MapCache`. MapCache.prototype.clear = mapCacheClear; MapCache.prototype['delete'] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; _MapCache = MapCache; return _MapCache; } var memoize_1; var hasRequiredMemoize; function requireMemoize () { if (hasRequiredMemoize) return memoize_1; hasRequiredMemoize = 1; var MapCache = require_MapCache(); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a function that memoizes the result of `func`. If `resolver` is * provided, it determines the cache key for storing the result based on the * arguments provided to the memoized function. By default, the first argument * provided to the memoized function is used as the map cache key. The `func` * is invoked with the `this` binding of the memoized function. * * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to have its output memoized. * @param {Function} [resolver] The function to resolve the cache key. * @returns {Function} Returns the new memoized function. * @example * * var object = { 'a': 1, 'b': 2 }; * var other = { 'c': 3, 'd': 4 }; * * var values = _.memoize(_.values); * values(object); * // => [1, 2] * * values(other); * // => [3, 4] * * object.a = 2; * values(object); * // => [1, 2] * * // Modify the result cache. * values.cache.set(object, ['a', 'b']); * values(object); * // => ['a', 'b'] * * // Replace `_.memoize.Cache`. * _.memoize.Cache = WeakMap; */ function memoize(func, resolver) { if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; if (cache.has(key)) { return cache.get(key); } var result = func.apply(this, args); memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || MapCache); return memoized; } // Expose `MapCache`. memoize.Cache = MapCache; memoize_1 = memoize; return memoize_1; } var _memoizeCapped; var hasRequired_memoizeCapped; function require_memoizeCapped () { if (hasRequired_memoizeCapped) return _memoizeCapped; hasRequired_memoizeCapped = 1; var memoize = requireMemoize(); /** Used as the maximum memoize cache size. */ var MAX_MEMOIZE_SIZE = 500; /** * A specialized version of `_.memoize` which clears the memoized function's * cache when it exceeds `MAX_MEMOIZE_SIZE`. * * @private * @param {Function} func The function to have its output memoized. * @returns {Function} Returns the new memoized function. */ function memoizeCapped(func) { var result = memoize(func, function(key) { if (cache.size === MAX_MEMOIZE_SIZE) { cache.clear(); } return key; }); var cache = result.cache; return result; } _memoizeCapped = memoizeCapped; return _memoizeCapped; } var _stringToPath; var hasRequired_stringToPath; function require_stringToPath () { if (hasRequired_stringToPath) return _stringToPath; hasRequired_stringToPath = 1; var memoizeCapped = require_memoizeCapped(); /** Used to match property names within property paths. */ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; /** * Converts `string` to a property path array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ var stringToPath = memoizeCapped(function(string) { var result = []; if (string.charCodeAt(0) === 46 /* . */) { result.push(''); } string.replace(rePropName, function(match, number, quote, subString) { result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); }); return result; }); _stringToPath = stringToPath; return _stringToPath; } /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ var _arrayMap; var hasRequired_arrayMap; function require_arrayMap () { if (hasRequired_arrayMap) return _arrayMap; hasRequired_arrayMap = 1; function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } _arrayMap = arrayMap; return _arrayMap; } var _baseToString; var hasRequired_baseToString; function require_baseToString () { if (hasRequired_baseToString) return _baseToString; hasRequired_baseToString = 1; var Symbol = require_Symbol(), arrayMap = require_arrayMap(), isArray = requireIsArray(), isSymbol = requireIsSymbol(); /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined; /** * The base implementation of `_.toString` which doesn't convert nullish * values to empty strings. * * @private * @param {*} value The value to process. * @returns {string} Returns the string. */ function baseToString(value) { // Exit early for strings to avoid a performance hit in some environments. if (typeof value == 'string') { return value; } if (isArray(value)) { // Recursively convert values (susceptible to call stack limits). return arrayMap(value, baseToString) + ''; } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -Infinity) ? '-0' : result; } _baseToString = baseToString; return _baseToString; } var toString_1; var hasRequiredToString; function requireToString () { if (hasRequiredToString) return toString_1; hasRequiredToString = 1; var baseToString = require_baseToString(); /** * Converts `value` to a string. An empty string is returned for `null` * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {string} Returns the converted string. * @example * * _.toString(null); * // => '' * * _.toString(-0); * // => '-0' * * _.toString([1, 2, 3]); * // => '1,2,3' */ function toString(value) { return value == null ? '' : baseToString(value); } toString_1 = toString; return toString_1; } var _castPath; var hasRequired_castPath; function require_castPath () { if (hasRequired_castPath) return _castPath; hasRequired_castPath = 1; var isArray = requireIsArray(), isKey = require_isKey(), stringToPath = require_stringToPath(), toString = requireToString(); /** * Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array. */ function castPath(value, object) { if (isArray(value)) { return value; } return isKey(value, object) ? [value] : stringToPath(toString(value)); } _castPath = castPath; return _castPath; } var _toKey; var hasRequired_toKey; function require_toKey () { if (hasRequired_toKey) return _toKey; hasRequired_toKey = 1; var isSymbol = requireIsSymbol(); /** * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ function toKey(value) { if (typeof value == 'string' || isSymbol(value)) { return value; } var result = (value + ''); return (result == '0' && (1 / value) == -Infinity) ? '-0' : result; } _toKey = toKey; return _toKey; } var _baseGet; var hasRequired_baseGet; function require_baseGet () { if (hasRequired_baseGet) return _baseGet; hasRequired_baseGet = 1; var castPath = require_castPath(), toKey = require_toKey(); /** * The base implementation of `_.get` without support for default values. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @returns {*} Returns the resolved value. */ function baseGet(object, path) { path = castPath(path, object); var index = 0, length = path.length; while (object != null && index < length) { object = object[toKey(path[index++])]; } return (index && index =