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,UAAY,SAAU9iB,GAC1CjI,KAAK8qB,SAASpG,QAAUzc,EACxB,IAAIkjB,EAAWnrB,KAAKqE,MAAM8mB,SACtBA,IACIA,aAAoBtwB,SACpBswB,EAASljB,GAGTkjB,EAASzG,QAAUzc,EAG/B,EACA4iB,EAAc7tB,UAAUgL,OAAS,WAC7B,IAAIM,EAAKtI,KAAKqE,MAAOiE,EAAG2iB,OAAQ3iB,EAAGH,QAASG,EAAG4W,QAAS5W,EAAG6iB,SAAU,IAAIC,EAAcvJ,GAAOvZ,EAAI,CAAC,SAAU,UAAW,UAAW,aAEnI,OAAOuhB,GAAM7J,cAAc,QAAS2B,GAAS,CAAC,EAAGyJ,EAAa,CAAEvG,IAAK7kB,KAAK+qB,YAC9E,EACOF,CACX,CAlEkC,CAkEhC/I,GAAMtpB,QAAQyuB","sources":["webpack://anora-lifestyle-gatsby/./node_modules/@cloudinary/react/index.js"],"sourcesContent":["var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nvar lodash_clonedeep = {exports: {}};\n\n/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n(function (module, exports) {\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/**\n * Adds the key-value `pair` to `map`.\n *\n * @private\n * @param {Object} map The map to modify.\n * @param {Array} pair The key-value pair to add.\n * @returns {Object} Returns `map`.\n */\nfunction addMapEntry(map, pair) {\n // Don't return `map.set` because it's not chainable in IE 11.\n map.set(pair[0], pair[1]);\n return map;\n}\n\n/**\n * Adds `value` to `set`.\n *\n * @private\n * @param {Object} set The set to modify.\n * @param {*} value The value to add.\n * @returns {Object} Returns `set`.\n */\nfunction addSetEntry(set, value) {\n // Don't return `set.add` because it's not chainable in IE 11.\n set.add(value);\n return set;\n}\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 */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array ? array.length : 0;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * A specialized version of `_.reduce` 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 * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array ? array.length : 0;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\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 */\nfunction 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/**\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 */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\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 */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.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 */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n this.__data__ = new ListCache(entries);\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n return this.__data__['delete'](key);\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var cache = this.__data__;\n if (cache instanceof ListCache) {\n var pairs = cache.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n return this;\n }\n cache = this.__data__ = new MapCache(pairs);\n }\n cache.set(key, value);\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\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 */\nfunction arrayLikeKeys(value, inherited) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n // Safari 9 makes `arguments.length` enumerable in strict mode.\n var result = (isArray(value) || isArguments(value))\n ? baseTimes(value.length, String)\n : [];\n\n var length = result.length,\n skipIndexes = !!length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n result.push(key);\n }\n }\n return result;\n}\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 */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n object[key] = value;\n }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @param {boolean} [isFull] Specify a clone including symbols.\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, isDeep, isFull, customizer, key, object, stack) {\n var result;\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n if (isHostObject(value)) {\n return object ? value : {};\n }\n result = initCloneObject(isFunc ? {} : value);\n if (!isDeep) {\n return copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, baseClone, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (!isArr) {\n var props = isFull ? getAllKeys(value) : keys(value);\n }\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));\n });\n return result;\n}\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} prototype The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nfunction baseCreate(proto) {\n return isObject(proto) ? objectCreate(proto) : {};\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n return objectToString.call(value);\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 */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\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 */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var result = new buffer.constructor(buffer.length);\n buffer.copy(result);\n return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\n/**\n * Creates a clone of `map`.\n *\n * @private\n * @param {Object} map The map to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned map.\n */\nfunction cloneMap(map, isDeep, cloneFunc) {\n var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);\n return arrayReduce(array, addMapEntry, new map.constructor);\n}\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\n/**\n * Creates a clone of `set`.\n *\n * @private\n * @param {Object} set The set to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned set.\n */\nfunction cloneSet(set, isDeep, cloneFunc) {\n var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);\n return arrayReduce(array, addSetEntry, new set.constructor);\n}\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\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 */\nfunction 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/**\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 */\nfunction copyObject(source, props, object, customizer) {\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\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n assignValue(object, key, newValue === undefined ? source[key] : newValue);\n }\n return object;\n}\n\n/**\n * Copies own symbol properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\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 */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Creates an array of the own enumerable symbol properties of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11,\n// for data views in Edge < 14, and promises in Node.js.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = objectToString.call(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : undefined;\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, cloneFunc, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return cloneMap(object, isDeep, cloneFunc);\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return cloneSet(object, isDeep, cloneFunc);\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\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 */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\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 */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\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 */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, true, true);\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 */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\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 */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\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 */\nvar isArray = Array.isArray;\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 */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an 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 an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\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 */\nvar isBuffer = nativeIsBuffer || stubFalse;\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 */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\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 */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\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 */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\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 */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\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 */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\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 */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = cloneDeep;\n}(lodash_clonedeep, lodash_clonedeep.exports));\n\nvar cloneDeep = lodash_clonedeep.exports;\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\n\n/**\r\n * Iterate through plugins and break in cases where the response is canceled. The\r\n * response is canceled if component is updated or unmounted\r\n * @param element {HTMLImageElement|HTMLVideoElement} Html Image or Video element\r\n * @param pluginCloudinaryAsset {CloudinaryImage|CloudinaryVideo} The Cloudinary asset generated by base\r\n * @param plugins {plugins} array of plugins passed in by the user\r\n * @param pluginState {htmlPluginState} Holds cleanup callbacks and event subscriptions\r\n */\r\nfunction render(element, pluginCloudinaryAsset, plugins, pluginState) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var i, response;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (plugins === undefined)\r\n return [2 /*return*/];\r\n i = 0;\r\n _a.label = 1;\r\n case 1:\r\n if (!(i < plugins.length)) return [3 /*break*/, 4];\r\n return [4 /*yield*/, plugins[i](element, pluginCloudinaryAsset, pluginState)];\r\n case 2:\r\n response = _a.sent();\r\n if (response === 'canceled') {\r\n return [3 /*break*/, 4];\r\n }\r\n _a.label = 3;\r\n case 3:\r\n i++;\r\n return [3 /*break*/, 1];\r\n case 4: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n}\n\nvar HtmlImageLayer = /** @class */ (function () {\r\n function HtmlImageLayer(element, userCloudinaryImage, plugins, analyticsOptions) {\r\n var _this = this;\r\n this.imgElement = element;\r\n this.htmlPluginState = { cleanupCallbacks: [], pluginEventSubscription: [] };\r\n var pluginCloudinaryImage = cloneDeep(userCloudinaryImage);\r\n render(element, pluginCloudinaryImage, plugins, this.htmlPluginState)\r\n .then(function () {\r\n _this.htmlPluginState.pluginEventSubscription.forEach(function (fn) { fn(); });\r\n _this.imgElement.setAttribute('src', pluginCloudinaryImage.toURL({\r\n trackedAnalytics: {\r\n sdkCode: analyticsOptions.sdkCode,\r\n sdkSemver: analyticsOptions.sdkSemver,\r\n techVersion: analyticsOptions.techVersion,\r\n }\r\n }));\r\n });\r\n }\r\n /**\r\n * Called when component is updated and re-triggers render\r\n * @param userCloudinaryImage\r\n * @param plugins\r\n * @param analyticsOptions\r\n */\r\n HtmlImageLayer.prototype.update = function (userCloudinaryImage, plugins, analyticsOptions) {\r\n var _this = this;\r\n var pluginCloudinaryImage = cloneDeep(userCloudinaryImage);\r\n render(this.imgElement, pluginCloudinaryImage, plugins, this.htmlPluginState)\r\n .then(function () {\r\n _this.imgElement.setAttribute('src', pluginCloudinaryImage.toURL({\r\n trackedAnalytics: {\r\n sdkCode: analyticsOptions.sdkCode,\r\n sdkSemver: analyticsOptions.sdkSemver,\r\n techVersion: analyticsOptions.techVersion,\r\n }\r\n }));\r\n });\r\n };\r\n return HtmlImageLayer;\r\n}());\n\n/**\n * @summary SDK\n * @memberOf SDK\n */\nclass QualifierValue {\n /**\n *\n * @param {QualifierValue | QualifierValue[] | any[] | string | number}qualifierValue\n */\n constructor(qualifierValue) {\n this.values = [];\n this.delimiter = ':'; // {value}{delimiter}{value}...\n if (this.hasValue(qualifierValue)) {\n this.addValue(qualifierValue);\n }\n }\n /**\n * @description Joins the provided values with the provided delimiter\n */\n toString() {\n return this.values.join(this.delimiter);\n }\n /**\n * @description Checks if the provided argument has a value\n * @param {any} v\n * @private\n * @return {boolean}\n */\n hasValue(v) {\n return typeof v !== 'undefined' && v !== null && v !== '';\n }\n /**\n * @desc Adds a value for the this qualifier instance\n * @param {any} value\n * @return {this}\n */\n addValue(value) {\n // Append value or array of values\n if (Array.isArray(value)) {\n this.values = this.values.concat(value);\n }\n else {\n this.values.push(value);\n }\n // Remove falsy values\n this.values = this.values.filter((v) => this.hasValue(v));\n return this;\n }\n /**\n * @description Sets the delimiter for this instance\n * @param delimiter\n */\n setDelimiter(delimiter) {\n this.delimiter = delimiter;\n return this;\n }\n}\n\nclass UnsupportedError extends Error {\n constructor(message = 'Unsupported') {\n super(message);\n }\n}\n/**\n * Creates a new UnsupportedError\n * @param message\n */\nfunction createUnsupportedError(message) {\n return new UnsupportedError(message);\n}\n\n/**\n * Returns the action's model\n */\nfunction qualifierToJson() {\n return this._qualifierModel || { error: createUnsupportedError(`unsupported qualifier ${this.constructor.name}`) };\n}\n\nclass QualifierModel {\n constructor() {\n this._qualifierModel = {};\n }\n toJson() {\n return qualifierToJson.apply(this);\n }\n}\n\n/**\n * @summary SDK\n * @memberOf SDK\n */\nclass Qualifier extends QualifierModel {\n constructor(key, qualifierValue) {\n super();\n this.delimiter = '_'; // {key}{delimiter}{qualifierValue}\n this.key = key;\n if (qualifierValue instanceof QualifierValue) {\n this.qualifierValue = qualifierValue;\n }\n else {\n this.qualifierValue = new QualifierValue();\n this.qualifierValue.addValue(qualifierValue);\n }\n }\n toString() {\n const { key, delimiter, qualifierValue } = this;\n return `${key}${delimiter}${qualifierValue.toString()}`;\n }\n addValue(value) {\n this.qualifierValue.addValue(value);\n return this;\n }\n}\n\n/**\n * @memberOf Qualifiers.Flag\n * @extends {SDK.Qualifier}\n * @description the FlagQualifier class\n */\nclass FlagQualifier extends Qualifier {\n constructor(flagType, flagValue) {\n let qualifierValue;\n if (flagValue) {\n qualifierValue = new QualifierValue([flagType, `${flagValue}`]).setDelimiter(':');\n }\n else {\n qualifierValue = flagType;\n }\n super('fl', qualifierValue);\n this.flagValue = flagValue;\n }\n toString() {\n return super.toString().replace(/\\./, '%2E');\n }\n getFlagValue() {\n return this.flagValue;\n }\n}\n\n/**\n * Sort a map by key\n * @private\n * @param map \n * @Return array of map's values sorted by key\n */\nfunction mapToSortedArray(map, flags) {\n const array = Array.from(map.entries());\n // objects from the Array.from() method above are stored in array of arrays:\n // [[qualifierKey, QualifierObj], [qualifierKey, QualifierObj]]\n // Flags is an array of FlagQualifierObj\n // We need to convert it to the same form: [flagQualifier] => ['fl', flagQualifier]\n flags.forEach((flag) => {\n array.push(['fl', flag]); // push ['fl', flagQualifier]\n });\n return array.sort().map((v) => v[1]);\n}\n\n/**\n * Returns the action's model\n */\nfunction actionToJson() {\n const actionModelIsNotEmpty = this._actionModel && Object.keys(this._actionModel).length;\n if (actionModelIsNotEmpty) {\n return this._actionModel;\n }\n return { error: createUnsupportedError(`unsupported action ${this.constructor.name}`) };\n}\n\nclass ActionModel {\n constructor() {\n this._actionModel = {};\n }\n toJson() {\n return actionToJson.apply(this);\n }\n}\n\n/**\n * @summary SDK\n * @memberOf SDK\n * @description Defines the category of transformation to perform.\n */\nclass Action extends ActionModel {\n constructor() {\n super(...arguments);\n // We're using map, to overwrite existing keys. for example:\n // addParam(w_100).addQualifier(w_200) should result in w_200. and not w_100,w_200\n this.qualifiers = new Map();\n // Unlike regular qualifiers, there can be multiple flags in each url component /fl_1,fl_2/\n // If the falgs are added to the qualifiers map, only a single flag could exist in a component (it's a map)\n // So flags are stored separately until the very end because of that reason\n this.flags = [];\n this.delimiter = ','; // {qualifier}{delimiter}{qualifier} for example: `${'w_100'}${','}${'c_fill'}`\n this.actionTag = ''; // A custom name tag to identify this action in the future\n }\n prepareQualifiers() { }\n /**\n * @description Returns the custom name tag that was given to this action\n * @return {string}\n */\n getActionTag() {\n return this.actionTag;\n }\n /**\n * @description Sets the custom name tag for this action\n * @return {this}\n */\n setActionTag(tag) {\n this.actionTag = tag;\n return this;\n }\n /**\n * @description Calls toString() on all child qualifiers (implicitly by using .join()).\n * @return {string}\n */\n toString() {\n this.prepareQualifiers();\n return mapToSortedArray(this.qualifiers, this.flags).join(this.delimiter);\n }\n /**\n * @description Adds the parameter to the action.\n * @param {SDK.Qualifier} qualifier\n * @return {this}\n */\n addQualifier(qualifier) {\n // if string, find the key and value\n if (typeof qualifier === 'string') {\n const [key, value] = qualifier.toLowerCase().split('_');\n if (key === 'fl') {\n // if string qualifier is a flag, store it in the flags arrays\n this.flags.push(new FlagQualifier(value));\n }\n else {\n // if the string qualifier is not a flag, create a new qualifier from it\n this.qualifiers.set(key, new Qualifier(key, value));\n }\n }\n else {\n // if a qualifier object, insert to the qualifiers map\n this.qualifiers.set(qualifier.key, qualifier);\n }\n return this;\n }\n /**\n * @description Adds a flag to the current action.\n * @param {Qualifiers.Flag} flag\n * @return {this}\n */\n addFlag(flag) {\n if (typeof flag === 'string') {\n this.flags.push(new FlagQualifier(flag));\n }\n else {\n if (flag instanceof FlagQualifier) {\n this.flags.push(flag);\n }\n }\n return this;\n }\n addValueToQualifier(qualifierKey, qualifierValue) {\n this.qualifiers.get(qualifierKey).addValue(qualifierValue);\n return this;\n }\n}\n\n/**\n * @memberOf Qualifiers.Region\n */\nclass NamedRegion extends Action {\n constructor(type) {\n super();\n this.regionType = type;\n }\n}\n\n/**\n * @memberOf Qualifiers.Region\n */\nclass CustomRegion extends NamedRegion {\n constructor() {\n super('named');\n }\n /**\n * @description The x position in pixels.\n * @param {number} x\n */\n x(x) {\n this.addQualifier(new Qualifier('x', x));\n return this;\n }\n /**\n * @description The y position in pixels.\n * @param {number} y\n */\n y(y) {\n this.addQualifier(new Qualifier('y', y));\n return this;\n }\n /**\n * @description The width of the region in pixels.\n * @param {number} width\n */\n width(width) {\n this.addQualifier(new Qualifier('w', width));\n return this;\n }\n /**\n * @description The height of the region in pixels.\n * @param {number} height\n */\n height(height) {\n this.addQualifier(new Qualifier('h', height));\n return this;\n }\n}\n\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Region\n * @return {Qualifiers.Region.CustomRegion}\n */\nfunction custom() {\n return new CustomRegion();\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Region\n * @return {Qualifiers.Region.NamedRegion}\n */\nfunction faces() {\n return new NamedRegion('faces');\n}\n\n/**\n * @description The Action class of the blur Builder.\n * @extends SDK.Action\n * @memberOf Actions.Effect\n * @see Visit {@link Actions.Effect|Effect} for an example\n */\nclass BlurAction extends Action {\n constructor(strength) {\n super();\n this._actionModel = {};\n this._strength = strength;\n this._actionModel.actionType = 'blur';\n this._actionModel.strength = strength;\n }\n /**\n * @description Specifies the region to blur.\n * @param {NamedRegion} blurRegion\n */\n region(blurRegion) {\n this._actionModel.region = { RegionType: blurRegion.regionType };\n this._region = blurRegion;\n return this;\n }\n /**\n * @description Sets the strength of the blur effect.\n * @param {number | string} strength\n */\n strength(strength) {\n this._strength = strength;\n this._actionModel.strength = strength;\n return this;\n }\n prepareQualifiers() {\n /*\n * Blur with region is a unique object in this codebase.\n * On top of Blur being an Action with Qualifiers,\n * it also accepts a Qualifier called Region.\n *\n * This Qualifier is in itself composite of qualifiers (such as height, or width).\n * The existence of Region changes the output of Blur in non traditional ways\n * which forced this relatively ad-hoc implementation.\n *\n * Aside from all of that, all of the Qualifiers in the component should be alphabetized\n * This happens naturally in the Action class,\n * however since we're dealing with two levels of qualifiers (Blur and Region),\n * these need to be merged.\n *\n * This function will merge the Region qualifiers with Blur\n * and add all needed implicit qualifiers (like g_ocr_text).\n * We're not using the full Gravity Qualifier here to prevent the code import for such a simplistic case\n */\n const str = this._strength ? `:${this._strength}` : '';\n if ('_region' in this) {\n const qualifiers = this._region.qualifiers;\n // Copy qualifiers from the region \"action\" to the blur action\n qualifiers.forEach((q) => this.addQualifier(q));\n if (this._region.regionType === 'named') {\n this.addQualifier(new Qualifier('e', `blur_region${str}`));\n }\n if (this._region.regionType === 'ocr_text') {\n this.addQualifier(new Qualifier('e', `blur_region${str}`));\n this.addQualifier(new Qualifier('g', `ocr_text`));\n }\n if (this._region.regionType === 'faces') {\n this.addQualifier(new Qualifier('e', `blur_faces${str}`));\n }\n }\n else {\n this.addQualifier(new Qualifier('e', `blur${str}`));\n }\n }\n static fromJson(actionModel) {\n const { actionType, strength, region } = actionModel;\n // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel])\n // This allows the inheriting classes to determine the class to be created\n const result = new this(strength);\n strength && result.strength(strength);\n if (region && region.RegionType === 'faces') {\n result.region(faces());\n }\n if (region && region.RegionType === 'custom') {\n result.region(custom());\n }\n return result;\n }\n}\n\n/**\n * Flip keys and values for given object\n * @param obj\n */\nfunction objectFlip(obj) {\n const result = {};\n Object.keys(obj).forEach((key) => {\n result[obj[key]] = key;\n });\n return result;\n}\n\n/**\n * This file is for internal constants only.\n * It is not intended for public use and is not part of the public API\n */\nconst ACTION_TYPE_TO_CROP_MODE_MAP = {\n limitFit: 'limit',\n limitFill: 'lfill',\n minimumFit: 'mfit',\n thumbnail: 'thumb',\n limitPad: 'lpad',\n minimumPad: 'mpad'\n};\nconst ACTION_TYPE_TO_DELIVERY_MODE_MAP = {\n colorSpace: 'cs',\n dpr: 'dpr',\n density: 'dn',\n defaultImage: 'd',\n format: 'f',\n quality: 'q'\n};\nconst ACTION_TYPE_TO_EFFECT_MODE_MAP = {\n redEye: 'redeye',\n advancedRedEye: 'adv_redeye',\n oilPaint: 'oil_paint',\n unsharpMask: 'unsharp_mask',\n makeTransparent: 'make_transparent'\n};\nconst ACTION_TYPE_TO_QUALITY_MODE_MAP = {\n autoBest: 'auto:best',\n autoEco: 'auto:eco',\n autoGood: 'auto:good',\n autoLow: 'auto:low',\n jpegminiHigh: 'jpegmini:1',\n jpegminiMedium: 'jpegmini:2',\n jpegminiBest: 'jpegmini:0'\n};\nconst ACTION_TYPE_TO_STREAMING_PROFILE_MODE_MAP = {\n fullHd: 'full_hd',\n fullHdWifi: 'full_hd_wifi',\n fullHdLean: 'full_hd_lean',\n hdLean: 'hd_lean'\n};\nconst CHROMA_VALUE_TO_CHROMA_MODEL_ENUM = {\n 444: \"CHROMA_444\",\n 420: \"CHROMA_420\"\n};\nconst COLOR_SPACE_MODEL_MODE_TO_COLOR_SPACE_MODE_MAP = {\n 'noCmyk': 'no_cmyk',\n 'keepCmyk': 'keep_cmyk',\n 'tinySrgb': 'tinysrgb',\n 'srgbTrueColor': 'srgb:truecolor'\n};\nconst CHROMA_MODEL_ENUM_TO_CHROMA_VALUE = objectFlip(CHROMA_VALUE_TO_CHROMA_MODEL_ENUM);\nobjectFlip(COLOR_SPACE_MODEL_MODE_TO_COLOR_SPACE_MODE_MAP);\nconst CROP_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_CROP_MODE_MAP);\nconst DELIVERY_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_DELIVERY_MODE_MAP);\nconst EFFECT_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_EFFECT_MODE_MAP);\nobjectFlip(ACTION_TYPE_TO_QUALITY_MODE_MAP);\nobjectFlip(ACTION_TYPE_TO_STREAMING_PROFILE_MODE_MAP);\n\n/**\n * @description A class that defines a simple effect of the type e_{effectName}\n * @extends SDK.Action\n * @memberOf Actions.Effect\n * @see Visit {@link Actions.Effect|Effect} for an example\n */\nclass SimpleEffectAction extends Action {\n constructor(effectType, level) {\n super();\n this._actionModel = {};\n this._actionModel.actionType = EFFECT_MODE_TO_ACTION_TYPE_MAP[effectType] || effectType;\n const qualifierEffect = this.createEffectQualifier(effectType, level);\n this.addQualifier(qualifierEffect);\n }\n createEffectQualifier(effectType, level) {\n let qualifierValue;\n if (level) {\n qualifierValue = new QualifierValue([effectType, `${level}`]).setDelimiter(':');\n }\n else {\n qualifierValue = new QualifierValue(effectType);\n }\n return new Qualifier('e', qualifierValue);\n }\n static fromJson(actionModel) {\n const { actionType, level, strength } = actionModel;\n const effectType = ACTION_TYPE_TO_EFFECT_MODE_MAP[actionType] || actionType;\n // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel])\n // This allows the inheriting classes to determine the class to be created\n // @ts-ignore\n const result = new this(effectType, level ? level : strength);\n return result;\n }\n}\n\n/**\n * @description A base class for effects with a level, the extending class needs to implement a method that calls setLevel()\n * @extends {Actions.Effect.SimpleEffectAction}\n * @memberOf Actions.Effect\n * @see Visit {@link Actions.Effect|Effect} for an example\n */\nclass LeveledEffectAction extends SimpleEffectAction {\n constructor(effectType, level) {\n super(effectType, level);\n this.LEVEL_NAME = 'level';\n this._actionModel = {};\n this.effectType = effectType;\n this._actionModel.actionType = EFFECT_MODE_TO_ACTION_TYPE_MAP[effectType] || effectType;\n if (level) {\n this.setLevel(level);\n }\n }\n /**\n *\n * @description Sets the effect level for the action\n * @param {string | number} level - The strength of the effect\n * @protected\n */\n setLevel(level) {\n this._actionModel[this.LEVEL_NAME] = level;\n const qualifierEffect = this.createEffectQualifier(this.effectType, level);\n this.addQualifier(qualifierEffect);\n return this;\n }\n}\n\n/**\n * Returns RGB or Color\n * @private\n * @param color\n */\nfunction prepareColor(color) {\n if (color) {\n return color.match(/^#/) ? `rgb:${color.substr(1)}` : color;\n }\n else {\n return color;\n }\n}\n\n/**\n * @description Vectorizes the image.\n * @extends SDK.Action\n * @memberOf Actions.Effect\n * @see Visit {@link Actions.Effect|Effect} for an example\n */\nclass VectorizeEffectAction extends Action {\n constructor() {\n super();\n this._actionModel = {};\n this._actionModel.actionType = 'vectorize';\n }\n /**\n * @description The number of colors. (Range: 2 to 30, Server default: 10)\n * @param {number | string} num\n * @return {this}\n */\n numOfColors(num) {\n this._actionModel.numOfColors = num;\n this._numOfColors = num;\n return this;\n }\n /**\n * @description The level of detail. Specify either a percentage of the original image (Range: 0.0 to 1.0) or an absolute number of pixels (Range: 0 to 1000). (Server default: 300)\n * @param {number | string} num\n * @return {this}\n */\n detailsLevel(num) {\n this._actionModel.detailLevel = num;\n this._detailsLevel = num;\n return this;\n }\n /**\n * @description The size of speckles to suppress. Specify either a percentage of the original image (Range: 0.0 to 1.0) or an absolute number of pixels (Range: 0 to 100, Server default: 2)\n * @param {number | string} num\n * @return {this}\n */\n despeckleLevel(num) {\n this._actionModel.despeckleLevel = num;\n this._despeckleLevel = num;\n return this;\n }\n /**\n * @description The corner threshold. Specify 100 for no smoothing (polygon corners), 0 for completely smooth corners. (Range: 0 to 100, Default: 25)\n * @param {number | string} num\n * @return {this}\n */\n cornersLevel(num) {\n this._actionModel.cornersLevel = num;\n this._cornersLevel = num;\n return this;\n }\n /**\n * @description The optimization value. Specify 100 for least optimization and the largest file. (Range: 0 to 100, Server default: 100).\n * @param {number} num\n * @return {this}\n */\n paths(num) {\n this._actionModel.paths = num;\n this._paths = num;\n return this;\n }\n prepareQualifiers() {\n let str = 'vectorize';\n if (this._numOfColors) {\n str += `:${new QualifierValue(`colors:${this._numOfColors}`).toString()}`;\n }\n if (this._detailsLevel) {\n str += `:${new QualifierValue(`detail:${this._detailsLevel}`).toString()}`;\n }\n if (this._despeckleLevel) {\n str += `:${new QualifierValue(`despeckle:${this._despeckleLevel}`).toString()}`;\n }\n if (this._paths) {\n str += `:${new QualifierValue(`paths:${this._paths}`).toString()}`;\n }\n if (this._cornersLevel) {\n str += `:${new QualifierValue(`corners:${this._cornersLevel}`).toString()}`;\n }\n this.addQualifier(new Qualifier('e', str));\n }\n static fromJson(actionModel) {\n const { actionType, paths, cornersLevel, despeckleLevel, detailLevel, numOfColors } = actionModel;\n // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel])\n // This allows the inheriting classes to determine the class to be created\n const result = new this();\n paths && result.paths(paths);\n cornersLevel && result.cornersLevel(cornersLevel);\n despeckleLevel && result.despeckleLevel(despeckleLevel);\n detailLevel && result.detailsLevel(detailLevel);\n numOfColors && result.numOfColors(numOfColors);\n return result;\n }\n}\n\n/**\n * @description A class that provides a built in level() method that sets the level of the effect\n * @extends {Actions.Effect.LeveledEffectAction}\n * @memberOf Actions.Effect\n * @see Visit {@link Actions.Effect|Effect} for an example\n */\nclass EffectActionWithLevel extends LeveledEffectAction {\n level(value) {\n this._actionModel.level = value;\n return this.setLevel(value);\n }\n}\n\n/**\n * @description Applies stripes to the image to help people with common color-blind conditions to differentiate between colors that are similar for them.\n * You can replace colors using the xray() method.\n * @extends SDK.Action\n * @memberOf Actions.Effect\n * @see Visit {@link Actions.Effect|Effect} for an example\n */\nclass AssistColorBlindEffectAction extends Action {\n constructor() {\n super();\n this._actionModel = {};\n this._actionModel.actionType = 'assistColorblind';\n this.addQualifier(new Qualifier('e', new QualifierValue('assist_colorblind')));\n }\n /**\n * @description Replaces problematic colors with colors that are easier to differentiate.\n * @return {this}\n */\n xray() {\n this._actionModel.type = 'xray';\n return this.addQualifier(new Qualifier('e', new QualifierValue(['assist_colorblind', 'xray']).setDelimiter(':')));\n }\n /**\n * @description Applies stripes of the specified intensity to help people with common color blind conditions to differentiate between colors that are similar for them.\n * @param {number | string} strength The intensity of the stripes. (Range: 1 to 100, Server default: 10)\n * @return {this}\n */\n stripesStrength(strength) {\n this._actionModel.type = 'stripes';\n this._actionModel.stripesStrength = strength;\n return this.addQualifier(new Qualifier('e', new QualifierValue(['assist_colorblind', strength]).setDelimiter(':')));\n }\n static fromJson(actionModel) {\n const { actionType, type, stripesStrength } = actionModel;\n // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel])\n // This allows the inheriting classes to determine the class to be created\n const result = new this();\n if (type === 'xray') {\n result.xray();\n }\n if (type === 'stripes') {\n stripesStrength && result.stripesStrength(stripesStrength);\n }\n return result;\n }\n}\n\n/**\n * @description Applies a colorizing filter to the asset, use the methods in the class to adjust the filter\n * @extends EffectActionWithLevel\n * @memberOf Actions.Effect\n * @see Visit {@link Actions.Effect|Effect} for an example\n */\nclass ColorizeEffectAction extends EffectActionWithLevel {\n /**\n * @description The color to use for colorization. Specify HTML name or RGB hex code. (Server default: gray)\n * @param {string} color HTML name(red, green, etc.) or RGB hex code. (Server default: gray)\n * @return {this}\n */\n color(color) {\n this._actionModel.color = color;\n return this.addQualifier(new Qualifier('co', new QualifierValue(prepareColor(color))));\n }\n static fromJson(actionModel) {\n const { actionType, level, color } = actionModel;\n // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel])\n // This allows the inheriting classes to determine the class to be created\n const result = new this(actionType, level);\n color && result.color(color);\n return result;\n }\n}\n\n/**\n * @description The Action class of the pixelate Builder\n * @extends SDK.Action\n * @memberOf Actions.Effect\n * @see Visit {@link Actions.Effect|Effect} for an example\n */\nclass Pixelate extends Action {\n constructor(squareSize) {\n super();\n this._actionModel = {};\n this._squareSize = squareSize;\n this._actionModel.actionType = 'pixelate';\n this._actionModel.squareSize = squareSize;\n }\n /**\n * @description Specifies the region to piexlate.\n * @param {NamedRegion} pixelateRegion\n */\n region(pixelateRegion) {\n this._region = pixelateRegion;\n this._actionModel.region = { RegionType: this._region.regionType };\n return this;\n }\n /**\n * @description Sets the squareSize of the pixelate effect.\n * @param {number | string} squareSize\n */\n squareSize(squareSize) {\n this._squareSize = squareSize;\n this._actionModel.squareSize = squareSize;\n return this;\n }\n prepareQualifiers() {\n /*\n * pixelate with region is a unique object in this codebase.\n * On top of pixelate being an Action with Qualifiers,\n * it also accepts a Qualifier called Region.\n *\n * This Qualifier is in itself composite of qualifiers (such as height, or width).\n * The existence of Region changes the output of pixelate in non traditional ways\n * which forced this relatively ad-hoc implementation.\n *\n * Aside from all of that, all of the Qualifiers in the component should be alphabetized\n * This happens naturally in the Action class,\n * however since we're dealing with two levels of qualifiers (pixelate and Region),\n * these need to be merged.\n *\n * This function will merge the Region qualifiers with pixelate\n * and add all needed implicit qualifiers (like g_ocr_text).\n * We're not using the full Gravity Qualifier here to prevent the code import for such a simplistic case\n */\n const str = this._squareSize ? `:${this._squareSize}` : '';\n if ('_region' in this) {\n const qualifiers = this._region.qualifiers;\n // Copy qualifiers from the region \"action\" to the pixelate action\n qualifiers.forEach((q) => this.addQualifier(q));\n if (this._region.regionType === 'named') {\n this.addQualifier(new Qualifier('e', `pixelate_region${str}`));\n }\n if (this._region.regionType === 'ocr_text') {\n this.addQualifier(new Qualifier('e', `pixelate_region${str}`));\n this.addQualifier(new Qualifier('g', `ocr_text`));\n }\n if (this._region.regionType === 'faces') {\n this.addQualifier(new Qualifier('e', `pixelate_faces${str}`));\n }\n }\n else {\n this.addQualifier(new Qualifier('e', `pixelate${str}`));\n }\n }\n static fromJson(actionModel) {\n const { actionType, region, squareSize } = actionModel;\n // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel])\n // This allows the inheriting classes to determine the class to be created\n const result = new this(squareSize);\n squareSize && result.squareSize(squareSize);\n if (region && region.RegionType === 'faces') {\n result.region(faces());\n }\n if (region && region.RegionType === 'custom') {\n result.region(custom());\n }\n return result;\n }\n}\n\n/**\n * @summary action\n * @description Applies a blurring filter to the asset.\n * @memberOf Actions.Effect\n * @param {number} blurLevel The strength of the blur. (Range: 1 to 2000, Server default: 100)\n * @return {Actions.Effect.BlurAction}\n */\nfunction blur(blurLevel) {\n return new BlurAction(blurLevel);\n}\n/**\n * @summary action\n * @description Converts the image to gray-scale (multiple shades of gray).\n * @memberOf Actions.Effect\n * @return {Actions.Effect.SimpleEffectAction}\n */\nfunction grayscale() {\n return new SimpleEffectAction('grayscale');\n}\n/**\n * @summary action\n * @description Applies a colorizing filter to the asset.\n * @memberOf Actions.Effect\n * @param {number} colorizeLevel The strength of the color. (Range: 0 to 100, Server default: 100)\n * @return {Actions.Effect.ColorizeEffectAction}\n */\nfunction colorize(colorizeLevel) {\n return new ColorizeEffectAction('colorize', colorizeLevel);\n}\n/**\n * @summary action\n * @description\n * Vectorizes the image.\n * Notes:\n * To deliver the image as a vector image, make sure to change the format (or URL extension) to a vector format, such as SVG.\n * However, you can also deliver in a raster format if you just want to get the 'vectorized' graphic effect.\n * Large images are scaled down to 1000 pixels in the largest dimension before vectorization.\n *\n * @memberOf Actions.Effect\n * @return {Actions.Effect.VectorizeEffectAction}\n */\nfunction vectorize() {\n return new VectorizeEffectAction();\n}\n/**\n * @summary action\n * @description\n * Applies stripes to the image to help people with common color-blind conditions to differentiate between colors that are similar for them.\n * You can replace colors using the xRay() method of the \\Cloudinary\\Transformation\\AssistColorBlind class.\n * @memberOf Actions.Effect\n * @return {Actions.Effect.AssistColorBlindEffectAction}\n */\nfunction assistColorBlind() {\n return new AssistColorBlindEffectAction();\n}\n/**\n * @summary action\n * @description Applies a pixelatering filter to the asset.\n * @memberOf Actions.Effect\n * @param {number} squareSize The squareSize in the pixelation. (Range: 1 to 2000, Server default: 100)\n * @return {Actions.Effect.Pixelate}\n */\nfunction pixelate(squareSize) {\n return new Pixelate(squareSize);\n}\n\n/**\n * @extends SDK.Action\n * @description A class for background transformations.\n */\nclass BackgroundColor extends Action {\n constructor(color) {\n super();\n this.addQualifier(new Qualifier('b', new QualifierValue(color).setDelimiter('_')));\n }\n}\n\n/**\n * @summary SDK\n * @memberOf SDK\n * @description Defines an action that's a string literal, no validations or manipulations are performed\n */\nclass RawAction {\n constructor(raw) {\n this.raw = raw;\n }\n toString() {\n return this.raw;\n }\n toJson() {\n return { error: createUnsupportedError(`unsupported action ${this.constructor.name}`) };\n }\n}\n\n/**\n * Validates obj is an instance of IErrorObject\n * @param obj\n */\nfunction isErrorObject(obj) {\n const errorObj = obj;\n return ('error' in errorObj) && !!errorObj.error;\n}\n\n/**\n * @summary SDK\n * @description - Defines how to transform an asset\n * @memberOf SDK\n */\nclass Transformation {\n constructor() {\n this.actions = [];\n }\n /**\n * @param {SDK.Action | string} action\n * @return {this}\n */\n addAction(action) {\n let actionToAdd;\n if (typeof action === 'string') {\n if (action.indexOf('/') >= 0) {\n throw 'addAction cannot accept a string with a forward slash in it - /, use .addTransformation() instead';\n }\n else {\n actionToAdd = new RawAction(action);\n }\n }\n else {\n actionToAdd = action;\n }\n this.actions.push(actionToAdd);\n return this;\n }\n /**\n * @description Allows the injection of a raw transformation as a string into the transformation, or a Transformation instance that was previously created\n * @param {string | SDK.Transformation} tx\n * @example\n * import {Transformation} from \"@cloudinary/url-gen\";\n *\n * const transformation = new Transformation();\n * transformation.addTransformation('w_100/w_200/w_300');\n * @return {this}\n */\n addTransformation(tx) {\n if (tx instanceof Transformation) {\n // Concat the new actions into the existing actions\n this.actions = this.actions.concat(tx.actions);\n }\n else {\n this.actions.push(new RawAction(tx));\n }\n return this;\n }\n /**\n * @return {string}\n */\n toString() {\n return this.actions\n .map((action) => {\n return action.toString();\n })\n .filter((a) => a)\n .join('/');\n }\n /**\n * @description Delivers an animated GIF.\n * @param {AnimatedAction} animatedAction\n * @return {this}\n */\n animated(animatedAction) {\n return this.addAction(animatedAction);\n }\n /**\n * @description Adds a border around the image.\n * @param {Border} borderAction\n * @return {this}\n */\n border(borderAction) {\n return this.addAction(borderAction);\n }\n /**\n * @description Adjusts the shape of the delivered image. \n * Learn more: {@link https://cloudinary.com/documentation/image_transformations#image_shape_changes_and_distortion_effects|Shape changes and distortion effects}\n * @param {IReshape} reshapeAction\n * @return {this}\n */\n reshape(reshapeAction) {\n return this.addAction(reshapeAction);\n }\n /**\n * @description Resize the asset using provided resize action\n * @param {ResizeSimpleAction} resizeAction\n * @return {this}\n */\n resize(resizeAction) {\n return this.addAction(resizeAction);\n }\n /**\n * @param {DeliveryAction} quality\n * @return {this}\n */\n quality(quality) {\n return this.addAction(quality);\n }\n /**\n * @description Rounds the specified corners of an image.\n * @param roundCornersAction\n * @return {this}\n */\n roundCorners(roundCornersAction) {\n return this.addAction(roundCornersAction);\n }\n /**\n * @description Adds an overlay over the base image.\n * @param {LayerAction} overlayAction\n * @return {this}\n */\n overlay(overlayAction) {\n return this.addAction(overlayAction);\n }\n /**\n * @description Adds an underlay under the base image.\n * @param {LayerAction} underlayAction\n * @return {this}\n */\n underlay(underlayAction) {\n underlayAction.setLayerType('u');\n return this.addAction(underlayAction);\n }\n /**\n * @description Defines an new user variable.\n * @param {VariableAction} variableAction\n * @return {this}\n */\n addVariable(variableAction) {\n return this.addAction(variableAction);\n }\n /**\n * @description Specifies a condition to be met before applying a transformation.\n * @param {ConditionalAction} conditionAction\n * @return {this}\n */\n conditional(conditionAction) {\n return this.addAction(conditionAction);\n }\n /**\n * @description Applies a filter or an effect on an asset.\n * @param {SimpleEffectAction} effectAction\n * @return {this}\n */\n effect(effectAction) {\n return this.addAction(effectAction);\n }\n /**\n * @description Applies adjustment effect on an asset.\n * @param action\n * @return {this}\n */\n adjust(action) {\n return this.addAction(action);\n }\n /**\n * @description Rotates the asset by the given angle.\n * @param {RotateAction} rotateAction\n * @return {this}\n */\n rotate(rotateAction) {\n return this.addAction(rotateAction);\n }\n /**\n * @description Applies a pre-defined named transformation of the given name.\n * @param {NamedTransformation} namedTransformation\n * @return {this}\n */\n namedTransformation(namedTransformation) {\n return this.addAction(namedTransformation);\n }\n /**\n * @description Applies delivery action.\n * @param deliveryAction\n * @return {this}\n */\n delivery(deliveryAction) {\n return this.addAction(deliveryAction);\n }\n /**\n * @description Sets the color of the background.\n * @param {Qualifiers.Color} color\n * @return {this}\n */\n backgroundColor(color) {\n return this.addAction(new BackgroundColor(prepareColor(color)));\n }\n /**\n * @description Adds a layer in a Photoshop document.\n * @param action\n * @return {this}\n */\n psdTools(action) {\n return this.addAction(action);\n }\n /**\n * @description Extracts an image or a page using an index, a range, or a name from a layered media asset.\n * @param action\n * @return {this}\n */\n extract(action) {\n return this.addAction(action);\n }\n /**\n * @description Adds a flag as a separate action.\n * @param {Qualifiers.Flag | string} flagQualifier\n * @return {this}\n */\n addFlag(flagQualifier) {\n const action = new Action();\n let flagToAdd = flagQualifier;\n if (typeof flagQualifier === 'string') {\n flagToAdd = new FlagQualifier(flagQualifier);\n }\n action.addQualifier(flagToAdd);\n return this.addAction(action);\n }\n /**\n * @description Inject a custom function into the image transformation pipeline.\n * @return {this}\n */\n customFunction(customFunction) {\n return this.addAction(customFunction);\n }\n /**\n * Transcodes the video (or audio) to another format.\n * @param {Action} action\n * @return {this}\n */\n transcode(action) {\n return this.addAction(action);\n }\n /**\n * Applies the specified video edit action.\n *\n * @param {videoEditType} action\n * @return {this}\n */\n videoEdit(action) {\n return this.addAction(action);\n }\n toJson() {\n const actions = [];\n for (const action of this.actions) {\n const json = action.toJson();\n if (isErrorObject(json)) {\n // Fail early and return an IErrorObject\n return json;\n }\n actions.push(json);\n }\n return { actions };\n }\n}\n\n/**\n * @description\n * Returns a string representing the float value of the input, if the input was a number-like.\n * Examples:\n * - '1.0' -> '1.0'\n * - 1 -> '1.0'\n * - '5' -> '5.0'\n * - 'auto' -> 'auto'\n * @private\n * @param {string|number} value\n * @return {string}\n */\nfunction toFloatAsString(value) {\n // Turn the input to string\n // The Function will return `returnValue` value if the input is not a number-like expression\n const returnValue = value.toString();\n // if the string contains letters, return the input\n if (returnValue.match(/[A-Z]/gi)) {\n return returnValue;\n }\n // If the leading digit is 0, and we have more than 1 digit, it's not a number.\n // 00, 00000, 0x15 etc.\n if (returnValue.length > 1 && returnValue[0] === '0') {\n return returnValue;\n }\n // Final sanity check, parse the number as a float and check if its NaN\n const isNumberLike = !isNaN(parseFloat(returnValue)) && returnValue.indexOf(':') === -1;\n // If it's a number-like, but the input does not contain a decimal - add it.\n if (isNumberLike && returnValue.indexOf('.') === -1) {\n return `${returnValue}.0`;\n }\n else {\n // If the input already contains a decimal, just return the value\n return returnValue;\n }\n}\n\n/**\n * @memberOf Qualifiers.AspectRatio\n * @extends {SDK.QualifierValue}\n */\nclass AspectRatioQualifierValue extends QualifierValue {\n}\n\n/**\n * @description Defines flags that you can use to alter the default transformation behavior.\n * @namespace Flag\n * @memberOf Qualifiers\n */\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description * Allows specifying only either width or height so the value of the second axis remains as is, and is not\n * recalculated to maintain the aspect ratio of the original image.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction ignoreInitialAspectRatio() {\n return new FlagQualifier('ignore_aspect_ratio');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Automatically use lossy compression when delivering animated GIF files.\n *\n * This flag can also be used as a conditional flag for delivering PNG files: it tells Cloudinary to deliver the\n * image in PNG format (as requested) unless there is no transparency channel - in which case deliver in JPEG\n * format.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction lossy() {\n return new FlagQualifier('lossy');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description When used with automatic fetch_format (f_auto): ensures that images with a transparency channel will be\n * delivered in PNG format.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction preserveTransparency() {\n return new FlagQualifier('preserve_transparency');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Generates a JPG image using the progressive (interlaced) JPG format.\n *\n * This format allows the browser to quickly show a low-quality rendering of the image until the full-quality\n * image is loaded.\n *\n * @param {string} mode? The mode to determine a specific progressive outcome as follows:\n * * semi - A smart optimization of the decoding time, compression level and progressive rendering\n * (less iterations). This is the default mode when using q_auto.\n * * steep - Delivers a preview very quickly, and in a single later phase improves the image to\n * the required resolution.\n * * none - Use this to deliver a non-progressive image. This is the default mode when setting\n * a specific value for quality.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction progressive(mode) {\n return new FlagQualifier('progressive', mode);\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Modifies percentage-based width & height parameters of overlays and underlays (e.g., 1.0) to be relative to the overlaid region\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction regionRelative() {\n return new FlagQualifier('region_relative');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Modifies percentage-based width & height parameters of overlays and underlays (e.g., 1.0) to be relative to the containing image instead of the added layer.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction relative() {\n return new FlagQualifier('relative');\n}\n\n/**\n * @description Defines a resize using width and height.\n * @extends SDK.Action\n * @memberOf Actions.Resize\n * @see Visit {@link Actions.Resize| Resize} for examples\n */\nclass ResizeSimpleAction extends Action {\n /**\n * @param {string} cropType\n * @param {number | string} cropWidth The required width of a transformed asset.\n * @param {number | string} cropHeight The required height of a transformed asset.\n */\n constructor(cropType, cropWidth, cropHeight) {\n super();\n this._actionModel = { dimensions: {} };\n this._actionModel.actionType = CROP_MODE_TO_ACTION_TYPE_MAP[cropType] || cropType;\n this.addQualifier(new Qualifier('c', cropType));\n cropWidth && this.width(cropWidth);\n cropHeight && this.height(cropHeight);\n }\n /**\n * @description Sets the height of the resize\n * @param {string | number} x The height in pixels (if an integer is specified) or as a percentage (if a float is specified).\n */\n height(x) {\n this._actionModel.dimensions.height = x;\n return this.addQualifier(new Qualifier('h', x));\n }\n /**\n * @description Sets the width of the resize\n * @param {string | number} x The width in pixels (if an integer is specified) or as a percentage (if a float is specified).\n */\n width(x) {\n this._actionModel.dimensions.width = x;\n return this.addQualifier(new Qualifier('w', x));\n }\n /**\n * @description Sets the aspect ratio of the asset.\n * For a list of supported types see {@link Qualifiers.AspectRatio|\n * AspectRatio values}\n * @param {AspectRatioType|number|string} ratio The new aspect ratio, specified as a percentage or ratio.\n * @return {this}\n */\n aspectRatio(ratio) {\n // toFloatAsString is used to ensure 1 turns into 1.0\n if (ratio instanceof AspectRatioQualifierValue) {\n this._actionModel.dimensions.aspectRatio = `${ratio}`;\n return this.addQualifier(new Qualifier('ar', ratio));\n }\n if (typeof ratio === 'number' || typeof ratio === 'string') {\n this._actionModel.dimensions.aspectRatio = toFloatAsString(ratio);\n return this.addQualifier(new Qualifier('ar', toFloatAsString(ratio)));\n }\n if (ratio instanceof FlagQualifier) {\n this._actionModel.dimensions.aspectRatio = `${ratio.qualifierValue}`;\n return this.addFlag(ratio);\n }\n }\n /**\n * @description Modifies percentage-based width & height parameters of overlays and underlays (e.g., 1.0) to be relative to the containing image instead of the added layer.\n * @return {this}\n */\n relative() {\n this._actionModel.relative = true;\n return this.addFlag(relative());\n }\n /**\n * @description Modifies percentage-based width & height parameters of overlays and underlays (e.g., 1.0) to be relative to the overlaid region\n * @return {this}\n */\n regionRelative() {\n this._actionModel.regionRelative = true;\n return this.addFlag(regionRelative());\n }\n static fromJson(actionModel) {\n const { actionType, dimensions, relative, regionRelative } = actionModel;\n const { aspectRatio, width, height } = dimensions;\n const cropMode = ACTION_TYPE_TO_CROP_MODE_MAP[actionType] || actionType;\n // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel])\n // This allows the inheriting classes to determine the class to be created\n const result = new this(cropMode, width, height);\n aspectRatio && result.aspectRatio(aspectRatio === 'ignore_aspect_ratio' ? ignoreInitialAspectRatio() : aspectRatio);\n relative && result.relative();\n regionRelative && result.regionRelative();\n return result;\n }\n}\n\n/**\n * @memberOf Gravity.GravityQualifier\n * @extends {SDK.Qualifier}\n */\nclass GravityQualifier extends Qualifier {\n /**\n * @param value, an array containing (GravityObject | AutoGravity | string) or a string;\n */\n constructor(value) {\n super('g', new QualifierValue(value));\n }\n}\n\n/**\n * @description The class for the autoGravity builder\n * @memberOf Qualifiers.Gravity\n * @extends {Qualifiers.Gravity.GravityQualifier}\n */\nclass AutoGravity extends GravityQualifier {\n constructor() {\n // Required due to https://github.com/microsoft/TypeScript/issues/13029\n /* istanbul ignore next */\n super('auto');\n }\n /**\n * @description Autofocuses on objects, allowing their priority within the algorithm to be configured.\n * @param {AutoFocus} AutoFocusObjects\n */\n autoFocus(...AutoFocusObjects) {\n this.addValue(AutoFocusObjects);\n return this;\n }\n}\n\n/**\n * @description The class for the FocusOn builder\n * @memberOf Qualifiers.Gravity\n * @extends {Qualifiers.Gravity.GravityQualifier}\n */\nclass FocusOnGravity extends GravityQualifier {\n constructor(FocusOnObjects) {\n // Required due to https://github.com/microsoft/TypeScript/issues/13029\n /* istanbul ignore next */\n super(FocusOnObjects);\n }\n /**\n * @description Specifies the gravity to use if none of the other gravity objects are found.\n * @param {Qualifiers.Gravity.AutoGravity} val\n */\n fallbackGravity(val) {\n /*\n * FocusOnGravity(this) is already a qualifier, with a key and a value g_{obj1}\n * fallBackGravity also attempts to add a value, to reach the result of g_{obj1}:auto:{obj2}\n * Since AutoGravity is a Qualifier, it also comes with its own g_ key, which needs to be removed.\n * To solve it, we take only the value from the qualifier, instead of the whole thing\n */\n this.addValue(val.qualifierValue);\n return this;\n }\n}\n\n/**\n * @description The class for the CompassGravity builder\n * @memberOf Qualifiers.Gravity\n * @extends {Qualifiers.Gravity.GravityQualifier}\n */\nclass CompassGravity extends GravityQualifier {\n constructor(dir) {\n // Required due to https://github.com/microsoft/TypeScript/issues/13029\n /* istanbul ignore next */\n super(dir);\n }\n}\n\n/**\n * @description Defines the gravity based on directional values from a compass.\n * Learn more: {@link https://cloudinary.com/documentation/image_transformations#control_gravity|Control gravity for images}\n * Learn more: {@link https://cloudinary.com/documentation/image_transformations#control_gravity|Control gravity for videos}\n * @param {Qualifiers.Compass | string} direction A compass Values\n * @memberOf Qualifiers.Gravity\n * @example\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {compass} from \"@cloudinary/url-gen/qualifiers/gravity\";\n * import {north} from \"@cloudinary/url-gen/qualifiers/compass\";\n * import {crop} from \"@cloudinary/url-gen/actions/resize\";\n *\n * const yourCldInstance = new Cloudinary({cloud: {cloudName: 'demo'}});\n * const image = yourCldInstance.image('woman');\n * image.resize(crop().width(300).gravity(compass(north())))\n * @return {CompassGravity}\n */\nfunction compass(direction) {\n return new CompassGravity(direction);\n}\n/**\n * @summary qualifier\n * @description Specifies what to focus on, for example: faces, objects, eyes, etc.\n * @param {...Qualifier.FocusOn} args One or more objects to focus on\n * @memberOf Qualifiers.Gravity\n * @example\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {focusOn} from \"@cloudinary/url-gen/qualifiers/gravity\";\n * import {crop} from \"@cloudinary/url-gen/actions/resize\";\n * import {cat} from \"@cloudinary/url-gen/qualifiers/focusOn\";\n *\n * const yourCldInstance = new Cloudinary({cloud: {cloudName: 'demo'}});\n * const image = yourCldInstance.image('woman');\n * image.resize(crop().width(300).gravity(focusOn(cat())))\n * @return {FocusOnGravity}\n */\nfunction focusOn(...args) {\n const res = [...args];\n return new FocusOnGravity(res);\n}\n/**\n * @summary qualifier\n * @description Automatically identifies the most interesting regions in the asset, can be qualified further by including what to focus on.\n * @memberOf Qualifiers.Gravity\n * @return {Qualifiers.Gravity.AutoGravity}\n * @example\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {autoGravity} from \"@cloudinary/url-gen/qualifiers/gravity\";\n * import {crop} from \"@cloudinary/url-gen/actions/resize\";\n *\n * const yourCldInstance = new Cloudinary({cloud: {cloudName: 'demo'}});\n * const image = yourCldInstance.image('woman');\n * image.resize(crop().width(300).gravity(autoGravity()))\n * @example\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {autoGravity} from \"@cloudinary/url-gen/qualifiers/gravity\";\n * import {crop} from \"@cloudinary/url-gen/actions/resize\";\n * import {cat} from \"@cloudinary/url-gen/qualifiers/focusOn\";\n * import {AutoFocus} from \"@cloudinary/url-gen/qualifiers/autoFocus\";\n *\n * const yourCldInstance = new Cloudinary({cloud: {cloudName: 'demo'}});\n * const image = yourCldInstance.image('woman');\n * image.resize(crop().width(300).gravity(autoGravity().autoFocus(AutoFocus.focusOn(cat()))))\n */\nfunction autoGravity() {\n return new AutoGravity();\n}\n\n/**\n * @memberOf Qualifiers.FocusOn\n * @extends {SDK.QualifierValue}\n */\nclass FocusOnValue extends QualifierValue {\n constructor(name) {\n super();\n this.name = name;\n }\n toString() {\n return this.name;\n }\n}\n\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detect all text elements in an image using the {@link https://cloudinary.com/documentation/image_transformations#control_gravity|OCR Text Detection and Extraction add-on} and use the detected bounding box coordinates as the basis of the transformation.\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction ocr() {\n return new FocusOnValue('ocr_text');\n}\n\n/**\n * true if gravity starts with 'auto' or 'auto:'\n * @param gravity\n */\nfunction isIAutoGravityString(gravity) {\n return gravity && `${gravity}`.split(':')[0] === 'auto';\n}\n/**\n * Validate that given val is an ICompassGravity\n * @param gravity\n */\nfunction isCompassGravity(gravity) {\n //const gravityString = `${(typeof gravity === \"string\" ? gravity : gravity.qualifierValue)}`;\n const gravityValue = getGravityValue(gravity);\n return ['north', 'center', 'east', 'west', 'south', 'north_west', 'south_east', 'south_west', 'north_east'].includes(gravityValue);\n}\n/**\n * Get the value of given gravity\n * @param gravity\n */\nfunction getGravityValue(gravity) {\n return `${gravity}`.replace('g_', '');\n}\n/**\n * Creates a compassGravity model\n * @param gravity\n */\nfunction createCompassGravityModel(gravity) {\n return {\n compass: getGravityValue(gravity),\n gravityType: 'direction'\n };\n}\n/**\n * Validate that given gravity is an instance of ocr gravity\n * @param gravity\n */\nfunction isOcrGravity(gravity) {\n return getGravityValue(gravity) === 'ocr_text';\n}\n/**\n * Creates an ocr gravity model\n */\nfunction createOcrGravityModel() {\n return {\n gravityType: 'ocr'\n };\n}\n/**\n * Validate that given gravity is an instance of AutoGravity\n * @param gravity\n */\nfunction isAutoGravity(gravity) {\n return `${gravity.qualifierValue}`.split(':')[0] === 'auto';\n}\n/**\n * Create an instance of IAutoGravityObjectModel\n * @param gravity\n */\nfunction createIAutoFocusObject(gravity) {\n const gravityString = gravity.toString();\n const values = gravityString.split('_');\n const result = {\n object: values[0]\n };\n if (values.length > 1) {\n if (values[1] === 'avoid') {\n result.avoid = true;\n }\n else {\n result.weight = +values[1];\n }\n }\n return result;\n}\n/**\n * Creates an auto gravity model from given AutoGravity\n * @param gravity\n */\nfunction createAutoGravityModel(gravity) {\n let values;\n const gravityQualifier = gravity === 'auto' ? new AutoGravity() : gravity;\n if (`${gravity}`.startsWith('auto:')) {\n values = `${gravity}`.split(':').filter((v) => v !== 'auto');\n }\n else {\n values = gravityQualifier.qualifierValue.values.filter((v) => v !== 'auto');\n }\n const autoFocus = values.map(createIAutoFocusObject);\n return {\n gravityType: 'auto',\n autoFocus\n };\n}\n/**\n * Create IFocusOnGravityModel from FocusOnGravity\n * @param gravity\n */\nfunction createFocusOnGravityModel(gravity) {\n const hasAutoGravity = `${gravity}`.split(':').includes('auto');\n const values = gravity.qualifierValue.values;\n const focusOnValues = hasAutoGravity ? values.slice(0, values.length - 1) : values;\n const result = {\n gravityType: 'object',\n focusOnObjects: focusOnValues.map((v) => `${v}`)\n };\n if (hasAutoGravity) {\n // Remove the first 'auto' value by slicing it, because it's added by autoGravity()\n const autoFocusObjects = values[values.length - 1].values.slice(1);\n const autoGravityInstance = autoGravity().autoFocus(...autoFocusObjects);\n result.fallbackGravity = createAutoGravityModel(autoGravityInstance);\n }\n return result;\n}\n/**\n * Creates a FocusOnGravity from given string\n * @param gravity\n */\nfunction createFocusOnGravity(gravity) {\n const values = gravity.split(':');\n const focusOnValues = values.map((g) => new FocusOnValue(g));\n return new FocusOnGravity(focusOnValues);\n}\n/**\n * Create a model of given gravity\n * @param gravity\n */\nfunction createGravityModel(gravity) {\n if (isCompassGravity(gravity)) {\n return createCompassGravityModel(gravity);\n }\n if (isOcrGravity(gravity)) {\n return createOcrGravityModel();\n }\n if (isIAutoGravityString(gravity) || isAutoGravity(gravity)) {\n return createAutoGravityModel(gravity);\n }\n return createFocusOnGravityModel(typeof gravity === 'string' ? createFocusOnGravity(gravity) : gravity);\n}\n\n/**\n * @summary qualifier\n * @namespace AutoFocus\n * @memberOf Qualifiers\n * @see Visit {@link Qualifiers.Gravity|Gravity} for an example\n */\n/**\n * @memberOf Qualifiers.AutoFocus\n * @extends {SDK.QualifierValue}\n * @see Visit {@link Qualifiers.Gravity|Gravity} for an example\n */\nclass AutoFocus extends QualifierValue {\n constructor(focusOn, weight) {\n super();\n this._weight = weight;\n this.focusOn = focusOn;\n this.shouldAvoid = false;\n }\n /**\n * @summary qualifier\n * @description Specifies the object to focus on automatically\n * Accepts an AutoFocusObject (which is just a wrapper for a FocusOn object, but with extra method: avoid, weight)\n * @param {Qualifiers.FocusOn} obj The object to focus on.\n * @param {number} weight\n */\n static focusOn(obj, weight) {\n return new AutoFocus(obj, weight);\n }\n shouldAddWeight() {\n return typeof this._weight === 'number' || typeof this._weight === 'string' || this.shouldAvoid;\n }\n /**\n * @summary qualifier\n * @desc Get the name of the of the object\n */\n getName() {\n return this.focusOn.name;\n }\n /**\n * @summary qualifier\n * @desc Get the weight for the object\n */\n getWeight() {\n if (this.shouldAvoid) {\n return 'avoid';\n }\n else {\n return this._weight;\n }\n }\n /**\n * @summary qualifier\n * @desc Return the string representation of this QualifierValue\n */\n toString() {\n // Future proofing, in case we'd like to support some custom string in the future, or if data is coming from a DB\n if (this.shouldAddWeight()) {\n return `${this.getName()}_${this.getWeight()}`;\n }\n else {\n return `${this.getName()}`;\n }\n }\n /**\n * @summary qualifier\n * @description Sets the importance level of the object within the automatic gravity algorithm\n * @param {numebr} w The focus weight for the object\n * @return {this}\n */\n weight(w) {\n this._weight = w;\n return this;\n }\n /**\n * @summary qualifier\n * @description Attempts to avoid the detected object in the image\n * @return {this}\n */\n avoid() {\n this.shouldAvoid = true;\n return this;\n }\n}\n\n/**\n * @memberOf Qualifiers.Compass\n * @extends {SDK.QualifierValue}\n */\nclass CompassQualifier extends QualifierValue {\n constructor(val) {\n super();\n this.val = val;\n }\n toString() {\n return this.val;\n }\n}\n\n/**\n * Validates that gravityModel is an ICompassGravityModel\n * @param gravityModel\n */\nfunction isCompassGravityModel(gravityModel) {\n return gravityModel.gravityType === 'direction';\n}\n/**\n * Validates that gravityModel is an IOcrGravityModel\n * @param gravityModel\n */\nfunction isOcrGravityModel(gravityModel) {\n return gravityModel.gravityType === 'ocr';\n}\n/**\n * Validates that gravityModel is an IAutoGravityModel\n * @param gravityModel\n */\nfunction isAutoGravityModel(gravityModel) {\n return gravityModel.gravityType === 'auto';\n}\n/**\n * Create AutoFocus from IAutoGravityObjectModel\n * @param autoGravityObjectModel\n */\nfunction createAutoFocusFromModel(autoGravityObjectModel) {\n const { object, weight, avoid } = autoGravityObjectModel;\n const autoFocus = new AutoFocus(new FocusOnValue(object));\n (weight || weight === 0) && autoFocus.weight(weight);\n avoid && autoFocus.avoid();\n return autoFocus;\n}\n/**\n * Create AutoGravity from IAutoGravityModel\n * @param gravityModel\n */\nfunction createAutoGravityFromModel(gravityModel) {\n const autoFocusModel = gravityModel.autoFocus || [];\n const autoFocus = autoFocusModel.map(createAutoFocusFromModel);\n return autoGravity().autoFocus(...autoFocus);\n}\n/**\n * Create FocusOnGravity from given IFocusOnGravityModel\n * @param gravityModel\n */\nfunction createFocusOnGravityFromModel(gravityModel) {\n const focusOnObjects = (gravityModel.focusOnObjects || []).map((str) => new FocusOnValue(str));\n const result = focusOn(...focusOnObjects);\n if (gravityModel.fallbackGravity) {\n const autoGravity = createAutoGravityFromModel(gravityModel.fallbackGravity);\n result.fallbackGravity(autoGravity);\n }\n return result;\n}\n/**\n * Create gravity instance from given gravity model\n * @param gravityModel\n */\nfunction createGravityFromModel(gravityModel) {\n if (isCompassGravityModel(gravityModel)) {\n return new CompassGravity(new CompassQualifier(gravityModel.compass));\n }\n if (isOcrGravityModel(gravityModel)) {\n return focusOn(ocr());\n }\n if (isAutoGravityModel(gravityModel)) {\n return createAutoGravityFromModel(gravityModel);\n }\n return createFocusOnGravityFromModel(gravityModel);\n}\n\n/**\n * @description Defines an advanced resize.\n * @extends Actions.Resize.ResizeSimpleAction\n * @memberOf Actions.Resize\n * @see Visit {@link Actions.Resize| Resize} for examples\n */\nclass ResizeAdvancedAction extends ResizeSimpleAction {\n /**\n * @description Which part of the original image to include.\n * @param {Qualifiers.Gravity} gravity\n */\n gravity(gravity) {\n this._actionModel.gravity = createGravityModel(gravity);\n const gravityQualifier = typeof gravity === \"string\" ? new Qualifier('g', gravity) : gravity;\n return this.addQualifier(gravityQualifier);\n }\n static fromJson(actionModel) {\n const result = super.fromJson.apply(this, [actionModel]);\n if (actionModel.gravity) {\n result.gravity(createGravityFromModel(actionModel.gravity));\n }\n return result;\n }\n}\n\n/**\n * @description Defines the visual appearance of the background.\n * @memberOf Qualifiers.Background\n * @extends {SDK.Qualifier}\n */\nclass BackgroundQualifier extends Qualifier {\n constructor(backgroundValue) {\n // The qualifier key for this qualifier\n super('b');\n // Such as color (b_red)\n if (backgroundValue) {\n this.addValue(backgroundValue);\n }\n }\n}\n\n/**\n * @description A class for blurred background transformations.\n * @memberOf Qualifiers.Background\n * @extends {Qualifiers.Background.BackgroundQualifier}\n */\nclass BlurredBackgroundAction extends BackgroundQualifier {\n /**\n * @description Sets the intensity of the blur.\n * @param {number} value - The intensity of the blur.\n */\n intensity(value) {\n this.intensityLevel = value;\n return this;\n }\n /**\n * @description Sets the brightness of the background.\n * @param {number} value - The brightness of the background.\n */\n brightness(value) {\n this.brightnessLevel = value;\n return this;\n }\n /**\n * @description\n * Stringify the qualifier\n * BackgroundQualifiers don't have a value, but instead override the toString() function\n */\n toString() {\n // b_blurred:{intensity}:{brightness}\n return `\n b_blurred\n ${this.intensityLevel ? `:${this.intensityLevel}` : ''}\n ${this.brightnessLevel ? `:${this.brightnessLevel}` : ''}\n `.replace(/\\s+/g, '');\n }\n}\nvar BlurredBackgroundAction$1 = BlurredBackgroundAction;\n\n/**\n * @description Defines the background color to use when resizing with padding.\n * @memberOf Qualifiers.Background\n * @extends {Qualifiers.Background.BackgroundQualifier}\n */\nclass BaseCommonBackground extends BackgroundQualifier {\n constructor() {\n super();\n this._palette = [];\n }\n /**\n * @description Selects the strongest contrasting color to use for padding.\n * @return {this}\n */\n contrast() {\n this._contrast = true;\n return this;\n }\n /**\n * @description Defines the custom colors to use when resizing using content-aware padding.\n * @param {...string} colors One or more colors - Example: palette('green', 'red', blue')\n * @return {this}\n */\n palette(...colors) {\n this._palette = colors.map((color) => {\n return prepareColor(color);\n });\n return this;\n }\n}\n\n/**\n * @description Automatically determines the color to use for padding, if needed when resizing an asset. Selects the\n * predominant color from the border of the image.\n * @memberOf Qualifiers.Background\n * @extends {Qualifiers.Background.BaseCommonBackground}\n */\nclass BackgroundAutoBorderQualifier extends BaseCommonBackground {\n /**\n * @description\n * Stringify the qualifier\n * BackgroundQualifiers don't have a value, but instead override the toString() function.\n */\n toString() {\n return `\n b_auto:border\n ${this._contrast ? '_contrast' : ''}\n ${this._palette.length ? `:palette_${this._palette.join('_')}` : ''}\n `.replace(/\\s+/g, '');\n }\n}\n\n/**\n * @description Defines the gradient fade effect to use for the background when resizing with padding.\n * @memberOf Qualifiers.Background\n * @extends {Qualifiers.Background.BaseCommonBackground}\n */\nclass BaseGradientBackground extends BaseCommonBackground {\n /**\n *\n * @description Sets the number of predominant colors to use (2 or 4).\n * @param {number} num\n * @return {this}\n */\n gradientColors(num) {\n this._gradientColors = num;\n return this;\n }\n /**\n * @description Sets the direction for a background gradient fade effect.\n * @param {Qualifiers.GradientDirection | GradientDirectionType | string} direction Use one of these functions\n * provided by {@link Qualifiers.GradientDirection|GradientDirection}\n * @return {this}\n */\n gradientDirection(direction) {\n this._gradientDirection = direction;\n return this;\n }\n}\n\n/**\n * @description Specifies that the gradient fade effect, used for the background when resizing with padding, uses the\n * predominant colors in the border pixels of the image.\n * @memberOf Qualifiers.Background\n * @extends {Qualifiers.Background.BaseGradientBackground}\n */\nclass BackgroundBorderGradientQualifier extends BaseGradientBackground {\n /**\n * @description\n * Stringify the qualifier\n * BackgroundQualifiers don't have a value, but instead override the toString() function.\n */\n toString() {\n return `\n b_auto:border_gradient\n ${this._contrast ? '_contrast' : ''}\n ${this._gradientColors ? `:${this._gradientColors}` : ''}\n ${this._gradientDirection ? `:${this._gradientDirection}` : ''}\n ${this._palette.length ? `:palette_${this._palette.join('_')}` : ''}\n `.replace(/\\s+/g, '');\n }\n}\n\n/**\n * @description Specifies that the gradient fade effect, used for the background when resizing with padding, uses the\n * predominant colors in the whole of the image.\n * @memberOf Qualifiers.Background\n * @extends {Qualifiers.Background.BaseGradientBackground}\n */\nclass BackgroundPredominantGradientQualifier extends BaseGradientBackground {\n /**\n * @description\n * Stringify the qualifier\n * BackgroundQualifiers don't have a value, but instead override the toString() function.\n */\n toString() {\n return `\n b_auto:predominant_gradient\n ${this._contrast ? '_contrast' : ''}\n ${this._gradientColors ? `:${this._gradientColors}` : ''}\n ${this._gradientDirection ? `:${this._gradientDirection}` : ''}\n ${this._palette.length ? `:palette_${this._palette.join('_')}` : ''}\n `.replace(/\\s+/g, '');\n }\n}\n\n/**\n * @description Automatically determines the color to use for padding, if needed when resizing an asset. Selects the\n * predominant color from the whole image.\n * @memberOf Qualifiers.Background\n * @extends {Qualifiers.Background.BaseCommonBackground}\n */\nclass BackgroundAutoPredominantQualifier extends BaseCommonBackground {\n /**\n * @description\n * Stringify the qualifier\n * BackgroundQualifiers don't have a value, but instead override the toString() function.\n */\n toString() {\n return `\n b_auto:predominant\n ${this._contrast ? '_contrast' : ''}\n ${this._palette.length ? `:palette_${this._palette.join('_')}` : ''}\n `.replace(/\\s+/g, '');\n }\n}\n\n/**\n * Get the value of given background\n * @param background\n */\nfunction getBackgroundValue(background) {\n return `${background}`.replace('b_', '');\n}\n/**\n * Create an IAutoBackgroundModel from given background\n */\nfunction createAutoBackgroundModel() {\n return { backgroundType: 'auto' };\n}\n/**\n * Create an IBlurredBackgroundModel from given background\n * @param background\n */\nfunction createBlurredBackgroundModel(background) {\n const { intensityLevel, brightnessLevel } = background;\n const result = {\n backgroundType: 'blurred'\n };\n if (intensityLevel || intensityLevel === 0) {\n result.intensity = intensityLevel;\n }\n if (brightnessLevel || brightnessLevel === 0) {\n result.brightness = brightnessLevel;\n }\n return result;\n}\n/**\n * Create an IContrastPaletteBackgroundModel from given background\n * @param background\n */\nfunction createContrastPaletteBackgroundModel(background) {\n const contrast = background._contrast;\n const palette = background._palette;\n const result = {\n backgroundType: ''\n };\n if (contrast) {\n result.contrast = true;\n }\n if (palette) {\n result.palette = palette;\n }\n return result;\n}\n/**\n * Create an IBorderBackgroundModel from given background\n * @param background\n */\nfunction createBorderBackgroundModel(background) {\n return Object.assign(Object.assign({}, createContrastPaletteBackgroundModel(background)), { backgroundType: 'border' });\n}\n/**\n * Create an IBaseGradientBackgroundModel from given background\n * @param background\n */\nfunction createBaseGradientBackgroundModel(background) {\n const gradientColors = background._gradientColors;\n const gradientDirection = `${background._gradientDirection}`;\n const result = createContrastPaletteBackgroundModel(background);\n if (gradientColors) {\n result.gradientColors = gradientColors;\n }\n if (gradientDirection) {\n result.gradientDirection = gradientDirection;\n }\n return result;\n}\n/**\n * Create an IBorderGradientBackgroundModel from given background\n * @param background\n */\nfunction createBorderGradientBackgroundModel(background) {\n return Object.assign(Object.assign({}, createBaseGradientBackgroundModel(background)), { backgroundType: 'borderGradient' });\n}\n/**\n * Create an IColorBackgroundModel from given background\n * @param background\n */\nfunction createColorBackgroundModel(background) {\n return {\n backgroundType: 'color',\n color: getBackgroundValue(background)\n };\n}\n/**\n * Create an IPredominantBackgroundModel from given background\n * @param background\n */\nfunction createPredominantBackgroundModel(background) {\n return Object.assign(Object.assign({}, createContrastPaletteBackgroundModel(background)), { backgroundType: 'predominant' });\n}\n/**\n * Create an IPredominantGradientBackgroundModel from given background\n * @param background\n */\nfunction createPredominantGradientBackgroundModel(background) {\n return Object.assign(Object.assign({}, createBaseGradientBackgroundModel(background)), { backgroundType: 'predominantGradient' });\n}\n/**\n * Create an IBackgroundModel from given background\n * @param background\n */\nfunction createBackgroundModel(background) {\n if (getBackgroundValue(background) === 'auto') {\n return createAutoBackgroundModel();\n }\n if (background instanceof BlurredBackgroundAction$1) {\n return createBlurredBackgroundModel(background);\n }\n if (background instanceof BackgroundAutoBorderQualifier) {\n return createBorderBackgroundModel(background);\n }\n if (background instanceof BackgroundBorderGradientQualifier) {\n return createBorderGradientBackgroundModel(background);\n }\n if (background instanceof BackgroundAutoPredominantQualifier) {\n return createPredominantBackgroundModel(background);\n }\n if (background instanceof BackgroundPredominantGradientQualifier) {\n return createPredominantGradientBackgroundModel(background);\n }\n return createColorBackgroundModel(background);\n}\n\n/**\n * @memberOf Qualifiers.Format\n * @extends {SDK.QualifierValue}\n */\nclass FormatQualifier extends QualifierValue {\n constructor(val) {\n super(val);\n this.val = val;\n }\n getValue() {\n return this.val;\n }\n}\n\n/**\n * @summary qualifier\n * @description Image format svg.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction svg() { return new FormatQualifier('svg'); }\n/**\n * @summary qualifier\n * @description Image format auto.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction auto$1() { return new FormatQualifier('auto'); }\n\n/**\n * @description Defines the background color to use instead of transparent background areas or when resizing with padding.\n *\n * Learn more: {@link https://cloudinary.com/documentation/image_transformations#setting_background_color|Setting background for images} | {@link https://cloudinary.com/documentation/video_manipulation_and_delivery#background_color|Setting background for videos}\n *\n * @namespace Background\n * @memberOf Qualifiers\n */\n/**\n * @summary qualifier\n * @description Selects the predominant color while taking only the image border pixels into account.\n * @memberOf Qualifiers.Background\n * @return {BackgroundAutoBorderQualifier}\n */\nfunction border() {\n return new BackgroundAutoBorderQualifier();\n}\n/**\n * @summary qualifier\n * @description Automatically determines the color to use for padding, if needed when resizing an asset.\n *\n * Learn more: {@link https://cloudinary.com/documentation/image_transformations#content_aware_padding|Content-aware padding}\n * @memberOf Qualifiers.Background\n * @return {Qualifiers.Background.BackgroundQualifier}\n */\nfunction auto() {\n return new BackgroundQualifier('auto');\n}\n/**\n * @summary qualifier\n * @description Applies a padding gradient fade effect using the predominant colors in the border of the image.\n * @memberOf Qualifiers.Background\n * @return {BackgroundBorderGradientQualifier}\n */\nfunction borderGradient() {\n return new BackgroundBorderGradientQualifier();\n}\n/**\n * @summary qualifier\n * @description Applies a padding gradient fade effect using the predominant colors in the image.\n * @memberOf Qualifiers.Background\n * @return {BackgroundPredominantGradientQualifier}\n */\nfunction predominantGradient() {\n return new BackgroundPredominantGradientQualifier();\n}\n/**\n * @summary qualifier\n * @description Selects the predominant color while taking all pixels in the image into account\n * @memberOf Qualifiers.Background\n * @return {BackgroundAutoPredominantQualifier}\n */\nfunction predominant() {\n return new BackgroundAutoPredominantQualifier();\n}\n/**\n * @summary qualifier\n * @description Selects the predominant color while taking all pixels in the image into account.\n * @memberOf Qualifiers.Background\n * @return {Qualifiers.Background.BackgroundQualifier}\n */\nfunction color(colorStr) {\n return new BackgroundQualifier(prepareColor(colorStr));\n}\n/**\n * @summary qualifier\n * @description Selects the predominant color while taking all pixels in the image into account.\n * @memberOf Qualifiers.Background\n * @return {BlurredBackgroundAction}\n */\nfunction blurred() {\n return new BlurredBackgroundAction$1();\n}\nconst Background = {\n auto: auto,\n border: border,\n borderGradient: borderGradient,\n predominantGradient: predominantGradient,\n predominant: predominant,\n color: color,\n blurred: blurred\n};\n\n/**\n * Create BackgroundQualifier from IBlurredBackgroundModel\n * @param backgroundModel\n */\nfunction createBlurredBackground(backgroundModel) {\n const { brightness, intensity } = backgroundModel;\n const result = Background.blurred();\n if (brightness || brightness == 0) {\n result.brightness(brightness);\n }\n if (intensity || intensity == 0) {\n result.intensity(intensity);\n }\n return result;\n}\n/**\n * Create a gradientBackground from given model\n * @param background\n * @param backgroundModel\n */\nfunction createGradientBackground(background, backgroundModel) {\n const { gradientColors, gradientDirection, contrast, palette } = backgroundModel;\n if (contrast) {\n background.contrast();\n }\n if (palette) {\n background.palette(...palette);\n }\n if (gradientColors) {\n background.gradientColors(+gradientColors);\n }\n if (gradientDirection) {\n background.gradientDirection(gradientDirection);\n }\n return background;\n}\n/**\n * Crete a background with contrast and palette from given model\n * @param background\n * @param backgroundModel\n */\nfunction createContrastPaletteBackground(background, backgroundModel) {\n const { contrast, palette } = backgroundModel;\n if (contrast) {\n background.contrast();\n }\n if (palette) {\n background.palette(...palette);\n }\n return background;\n}\n/**\n * Create BackgroundQualifier from IBackgroundModel\n * @param backgroundModel\n */\nfunction createBackgroundFromModel(backgroundModel) {\n const { backgroundType } = backgroundModel;\n switch (backgroundType) {\n case 'auto':\n return auto();\n case 'blurred':\n return createBlurredBackground(backgroundModel);\n case 'border':\n return createContrastPaletteBackground(border(), backgroundModel);\n case 'borderGradient':\n return createGradientBackground(borderGradient(), backgroundModel);\n case 'predominant':\n return createContrastPaletteBackground(predominant(), backgroundModel);\n case 'predominantGradient':\n return createGradientBackground(predominantGradient(), backgroundModel);\n default:\n return color(backgroundModel.color);\n }\n}\n\n/**\n * @description Defines an advanced resize with padding.\n * @extends Actions.Resize.ResizeAdvancedAction\n * @memberOf Actions.Resize\n * @see Visit {@link Actions.Resize| Resize} for examples\n */\nclass ResizePadAction extends ResizeAdvancedAction {\n /**\n * @description Sets the background.\n * @param {Qualifiers.Background} backgroundQualifier Defines the background color to use instead of\n * transparent background areas or when resizing with padding.\n */\n background(backgroundQualifier) {\n this._actionModel.background = createBackgroundModel(backgroundQualifier);\n return this.addQualifier(backgroundQualifier);\n }\n /**\n * @description Horizontal position for custom-coordinates based padding.\n * @param {number} x The x position.\n */\n offsetX(x) {\n this._actionModel.x = x;\n return this.addQualifier(new Qualifier('x', x));\n }\n /**\n * @description Vertical position for custom-coordinates based padding\n * @param {number} y The y position.\n */\n offsetY(y) {\n this._actionModel.y = y;\n return this.addQualifier(new Qualifier('y', y));\n }\n static fromJson(actionModel) {\n const result = super.fromJson.apply(this, [actionModel]);\n actionModel.background && result.background(createBackgroundFromModel(actionModel.background));\n actionModel.x && result.offsetX(actionModel.x);\n actionModel.y && result.offsetY(actionModel.y);\n actionModel.zoom && result.zoom(actionModel.zoom);\n return result;\n }\n}\n\n/**\n * @description Defines a scaling resize action.\n * @extends Actions.Resize.ResizeSimpleAction\n * @memberOf Actions.Resize\n * @see Visit {@link Actions.Resize| Resize} for examples\n */\nclass ResizeScaleAction extends ResizeSimpleAction {\n /**\n * @description Changes the aspect ratio of an image while retaining all important content and avoiding unnatural\n * distortions.\n * @return {this}\n */\n liquidRescaling() {\n return this.addQualifier(new GravityQualifier('liquid'));\n }\n}\n\n/**\n * @description Defines how to crop an asset\n * @extends Actions.Resize.ResizeAdvancedAction\n * @memberOf Actions.Resize\n * @see Visit {@link Actions.Resize| Resize} for examples\n */\nclass ResizeCropAction extends ResizeAdvancedAction {\n /**\n * @description Horizontal position for custom-coordinates based cropping.\n * @param {number} x The x position.\n */\n x(x) {\n this._actionModel.x = x;\n return this.addQualifier(new Qualifier('x', x));\n }\n /**\n * @description Vertical position for custom-coordinates based cropping\n * @param {number} y The y position.\n */\n y(y) {\n this._actionModel.y = y;\n return this.addQualifier(new Qualifier('y', y));\n }\n /**\n * @description Controls how much of the original image surrounding the face to keep when using either the 'crop' or 'thumb' cropping modes with face detection.\n * @param {number | string} z The zoom factor. (Default: 1.0)\n */\n zoom(z) {\n this._actionModel.zoom = z;\n return this.addQualifier(new Qualifier('z', z));\n }\n static fromJson(actionModel) {\n const result = super.fromJson.apply(this, [actionModel]);\n actionModel.x && result.x(actionModel.x);\n actionModel.y && result.y(actionModel.y);\n actionModel.zoom && result.zoom(actionModel.zoom);\n return result;\n }\n}\n\n/**\n * @description Defines how to crop-fill an asset\n * @extends Actions.Resize.ResizeAdvancedAction\n * @memberOf Actions.Resize\n * @see Visit {@link Actions.Resize| Resize} for examples\n */\nclass ResizeFillAction extends ResizeAdvancedAction {\n /**\n * @description Absolute X position when used with Gravity.xyCenter {@link Qualifiers.Gravity.GravityQualifier}}\n * @param {number} x The x position.\n */\n x(x) {\n this._actionModel.x = x;\n return this.addQualifier(new Qualifier('x', x));\n }\n /**\n * @description Absolute Y position when used with Gravity.xyCenter {@link Qualifiers.Gravity.GravityQualifier}}\n * @param {number} y The y position.\n */\n y(y) {\n this._actionModel.y = y;\n return this.addQualifier(new Qualifier('y', y));\n }\n static fromJson(actionModel) {\n const result = super.fromJson.apply(this, [actionModel]);\n actionModel.x && result.x(actionModel.x);\n actionModel.y && result.y(actionModel.y);\n return result;\n }\n}\n\n/**\n * @description Determines how to crop, scale, and/or zoom the delivered asset according to the requested dimensions.\n * @memberOf Actions\n * @namespace Resize\n * @see Learn more about Gravity and Focus {@link Qualifiers.Gravity| here }\n * @example\n * Scaling an image
\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {scale, fit, pad, crop} from '@cloudinary/url-gen/actions/resize';\n *\n * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}});\n * const image = yourCldInstance.image('woman');\n *\n * image.resize( scale(100, 100) );\n * // All resize actions have a similar interface.\n * // image.resize( fit(100, 100)) );\n * // image.resize( pad(100, 100)) );\n * // image.resize( crop(100, 100)) );\n * // However, Some actions have additional arguments exposed as builder methods.\n * // See the documentation for each method for more information\n *\n *\n * // Alternative syntax, using builder methods\n * image.resize(\n * scale()\n * .width(100)\n * .height(100)\n * );\n * image.toURL()\n *\n * @example\n * Cropping with automatic focus(Gravity)
\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n *\n * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}});\n * const image = yourCldInstance.image('woman');\n *\n * import {scale} from '@cloudinary/url-gen/actions/resize';\n * import {autoGravity} from '@cloudinary/url-gen/qualifiers/gravity';\n *\n * image.resize( crop(100, 100).gravity(autoGravity()) );\n *\n * // Alternative syntax, using builder methods\n * image.resize(\n * scale()\n * .width(100)\n * .height(100)\n * .gravity(autoGravity())\n * );\n * image.toURL()\n */\n/**\n * @summary action\n * @description\n * Changes the size of the image exactly to the given width and height without necessarily retaining the original aspect ratio:
\n * all original image parts are visible but might be stretched or shrunk.\n * @memberOf Actions.Resize\n * @param {number|string} width The required width of a transformed asset.\n * @param {number|string} height The required height of a transformed asset.\n * @return {Actions.Resize.ScaleAction}\n */\nfunction scale(width, height) {\n return new ResizeScaleAction('scale', width, height);\n}\n/**\n * @summary action\n * @description Extracts a region of the given width and height out of the original image.\n * @memberOf Actions.Resize\n * @param {number|string} width The required width of a transformed asset.\n * @param {number|string} height The required height of a transformed asset.\n * @return {Actions.Resize.ResizeCropAction}\n */\nfunction crop(width, height) {\n return new ResizeCropAction('crop', width, height);\n}\n/**\n * @summary action\n * @description\n * Creates an image with the exact given width and height without distorting the image.
\n * This option first scales up or down as much as needed to at least fill both of the given dimensions.
\n * If the requested aspect ratio is different than the original, cropping will occur on the dimension that exceeds the requested size after scaling.\n * @memberOf Actions.Resize\n * @param {number|string} width The required width of a transformed asset.\n * @param {number|string} height The required height of a transformed asset.\n * @return {Actions.Resize.ResizeFillAction}\n */\nfunction fill(width, height) {\n return new ResizeFillAction('fill', width, height);\n}\n/**\n * @summary action\n * @description\n * Resizes the asset to fill the given width and height while retaining the original aspect ratio.\n *\n * If the proportions of the original asset do not match the given width and height, padding is added to the asset\n * to reach the required size.\n * @memberOf Actions.Resize\n * @param {number|string} width The required width of a transformed asset.\n * @param {number|string} height The required height of a transformed asset.\n * @return {Actions.Resize.ResizePadAction}\n */\nfunction pad(width, height) {\n return new ResizePadAction('pad', width, height);\n}\n\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description North east corner (top right).\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction northEast() {\n return new CompassQualifier('north_east');\n}\n\n/**\n * @description Qualifies the delivery of an asset.\n * @memberOf Actions.Delivery\n * @extends SDK.Action\n */\nclass DeliveryAction extends Action {\n /**\n * @param {string} deliveryKey A generic Delivery Action Key (such as q, f, dn, etc.)\n * @param {string} deliveryType A Format Qualifiers for the action, such as Quality.auto()\n * @param {string} modelProperty internal model property of the action, for example quality uses `level` while dpr uses `density`\n * @see Visit {@link Actions.Delivery|Delivery} for an example\n */\n constructor(deliveryKey, deliveryType, modelProperty) {\n super();\n this._actionModel = {};\n let deliveryTypeValue;\n if (deliveryType instanceof FormatQualifier) {\n deliveryTypeValue = deliveryType.getValue();\n }\n else {\n deliveryTypeValue = deliveryType;\n }\n this._actionModel.actionType = DELIVERY_MODE_TO_ACTION_TYPE_MAP[deliveryKey];\n this._actionModel[modelProperty] = deliveryTypeValue;\n this.addQualifier(new Qualifier(deliveryKey, deliveryType));\n }\n}\n\n/**\n * @description Contains functions to select the mode when using a progressive format.\n * Learn more: {@link https://cloudinary.com/documentation/transformation_reference#fl_progressive|Progressive modes}\n * @memberOf Qualifiers\n * @namespace Progressive\n * @example\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {format} from \"@cloudinary/url-gen/actions/delivery\";\n * import {jpg} from \"@cloudinary/url-gen/qualifiers/format\";\n * import {steep} from \"@cloudinary/url-gen/qualifiers/progressive\";\n *\n * const yourCldInstance = new Cloudinary({cloud: {cloudName: 'demo'}});\n * const image = yourCldInstance.image('woman');\n * image.delivery(format(jpg()).progressive(steep()))\n */\nclass ProgressiveQualifier extends FlagQualifier {\n constructor(mode) {\n super('progressive', mode);\n }\n}\n\n/**\n * @memberOf Actions.Delivery\n * @extends {Actions.Delivery.DeliveryAction}\n * @see Visit {@link Actions.Delivery|Delivery} for an example\n */\nclass DeliveryFormatAction extends DeliveryAction {\n constructor(deliveryKey, deliveryType) {\n super(deliveryKey, deliveryType, 'formatType');\n }\n /**\n * @description Uses lossy compression when delivering animated GIF files.\n * @return {this}\n */\n lossy() {\n this._actionModel.lossy = true;\n this.addFlag(lossy());\n return this;\n }\n /**\n * @description Uses progressive compression when delivering JPG file format.\n * @return {this}\n */\n progressive(mode) {\n if (mode instanceof ProgressiveQualifier) {\n this._actionModel.progressive = { mode: mode.getFlagValue() };\n this.addFlag(mode);\n }\n else {\n this._actionModel.progressive = { mode: mode };\n this.addFlag(progressive(mode));\n }\n return this;\n }\n /**\n * @description Ensures that images with a transparency channel are delivered in PNG format.\n */\n preserveTransparency() {\n this._actionModel.preserveTransparency = true;\n this.addFlag(preserveTransparency());\n return this;\n }\n static fromJson(actionModel) {\n const { formatType, lossy, progressive, preserveTransparency } = actionModel;\n let result;\n if (formatType) {\n result = new this('f', formatType);\n }\n else {\n result = new this('f');\n }\n if (progressive) {\n if (progressive.mode) {\n result.progressive(progressive.mode);\n }\n else {\n result.progressive();\n }\n }\n lossy && result.lossy();\n preserveTransparency && result.preserveTransparency();\n return result;\n }\n}\n\n/**\n * @description Controls the quality of the delivered image or video.\n * @memberOf Actions.Delivery\n * @extends {Actions.Delivery.DeliveryAction}\n * @see Visit {@link Actions.Delivery|Delivery} for an example\n */\nclass DeliveryQualityAction extends DeliveryAction {\n /**\n * @param {Qualifiers.Quality} qualityValue a Quality value\n */\n constructor(qualityValue) {\n super('q', qualityValue.toString(), 'level');\n }\n /**\n * Selet the Chroma sub sampling\n * Learn more: {@link https://cloudinary.com/documentation/image_transformations#toggling_chroma_subsampling|Toggling chroma subsampling}\n * @param {420 | 444 | number} type The chroma sub sampling type\n */\n chromaSubSampling(type) {\n this._actionModel.chromaSubSampling = CHROMA_VALUE_TO_CHROMA_MODEL_ENUM[type];\n const qualityWithSubSampling = new QualifierValue([this._actionModel.level, type]);\n qualityWithSubSampling.setDelimiter(':');\n // We either have chroma or quantization, but not both\n return this.addQualifier(new Qualifier('q', qualityWithSubSampling));\n }\n /**\n * Controls the final quality by setting a maximum quantization percentage\n * @param {number} val\n */\n quantization(val) {\n this._actionModel.quantization = val;\n const qualityWithQuantization = new QualifierValue([this._actionModel.level, `qmax_${val}`]).setDelimiter(':');\n // We either have chroma or quantization, but not both\n return this.addQualifier(new Qualifier('q', qualityWithQuantization));\n }\n static fromJson(actionModel) {\n const { level, chromaSubSampling, quantization } = actionModel;\n const levelType = ACTION_TYPE_TO_QUALITY_MODE_MAP[level] || level;\n const result = new this(levelType);\n if (chromaSubSampling) {\n //Turn strings like 'CHROMA_420' to 420\n const chromaValue = CHROMA_MODEL_ENUM_TO_CHROMA_VALUE[chromaSubSampling.toUpperCase()];\n chromaValue && result.chromaSubSampling(+chromaValue);\n }\n quantization && result.quantization(quantization);\n return result;\n }\n}\n\n/**\n * @description Defines transformations for delivering your assets without changing the visual or audio experience for the end user.\n * @memberOf Actions\n * @namespace Delivery\n * @example\n * See the examples under every method\n */\n/**\n * @summary action\n * @description Defines the format of the delivered asset.\n *\n * Learn more:\n * {@link https://cloudinary.com/documentation/image_transformations#image_format_support|Image formats}\n * {@link https://cloudinary.com/documentation/video_manipulation_and_delivery#transcoding_video_to_other_formats|Video formats}\n *\n * @memberOf Actions.Delivery\n * @param {string} format The file format. For a list of supported format types see {@link Qualifiers.Format| format types} for\n * possible values\n * @return {Actions.Delivery.DeliveryFormat}\n * @example\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {format} from \"@cloudinary/url-gen/actions/delivery\";\n *\n * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}});\n * const image = yourCldInstance.image('woman');\n * image.delivery(\n * format('jpg'),\n * );\n *\n */\nfunction format(format) {\n return new DeliveryFormatAction('f', format);\n}\n/**\n * @summary action\n * @description Controls the quality of the delivered image or video.\n *\n * Learn more: {@link https://cloudinary.com/documentation/image_optimization#how_to_optimize_image_quality|Image quality}\n * {@link https://cloudinary.com/documentation/video_manipulation_and_delivery#quality_control|Video quality}\n * @memberOf Actions.Delivery\n * @param {QualityTypes | string | number | Qualifiers.Quality} qualityType For a list of supported quality types see\n * {@link Qualifiers.Quality| quality types} for\n * possible values.\n * @return {Actions.Delivery.DeliveryQualityAction}\n * @example\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {quality} from \"@cloudinary/url-gen/actions/delivery\";\n * import {quality} from \"@cloudinary/url-gen/qualifiers/quantity\";\n *\n * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}});\n * const image = yourCldInstance.image('woman');\n * image.delivery(\n * quality('auto'),\n * );\n */\nfunction quality(qualityType) {\n return new DeliveryQualityAction(qualityType);\n}\n\n/**\r\n * Predefined accessibility transformations\r\n * @const {Object} Cloudinary.ACCESSIBILITY_MODES\r\n */\r\nvar ACCESSIBILITY_MODES = {\r\n 'darkmode': colorize(70).color('black'),\r\n 'brightmode': colorize(40).color('white'),\r\n 'monochrome': grayscale(),\r\n 'colorblind': assistColorBlind()\r\n};\r\n/**\r\n * Predefined vectorize placeholder transformation\r\n */\r\nvar VECTORIZE = new Transformation()\r\n .effect(vectorize())\r\n .delivery(quality('auto'))\r\n .delivery(format(svg()));\r\n/**\r\n * Predefined pixelate placeholder transformation\r\n */\r\nvar PIXELATE = new Transformation()\r\n .effect(pixelate())\r\n .delivery(quality('auto'))\r\n .delivery(format(auto$1()));\r\n/**\r\n * Predefined blur placeholder transformation\r\n */\r\nvar BLUR = new Transformation()\r\n .effect(blur(2000))\r\n .delivery(quality('auto'))\r\n .delivery(format(auto$1()));\r\n/**\r\n * Predefined predominant color placeholder transformation\r\n */\r\nvar PREDOMINANT_COLOR_TRANSFORM = new Transformation()\r\n .resize(pad('iw_div_2').aspectRatio(1).background(Background.auto()))\r\n .resize(crop(1, 1).gravity(compass(northEast())))\r\n .resize(fill().height('ih').width('iw'))\r\n .delivery(quality('auto'))\r\n .delivery(format(auto$1()));\r\n/**\r\n * Predefined placeholder image options\r\n */\r\nvar PLACEHOLDER_IMAGE_OPTIONS = {\r\n 'vectorize': VECTORIZE,\r\n 'pixelate': PIXELATE,\r\n 'blur': BLUR,\r\n 'predominant-color': PREDOMINANT_COLOR_TRANSFORM\r\n};\r\n/**\r\n * transparent gif\r\n */\r\nvar singleTransparentPixel = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';\r\n/**\r\n * Convert common video file extensions to mime types\r\n * Most other common video file extensions have an identical mime type so do not need conversion.\r\n */\r\nvar VIDEO_MIME_TYPES = {\r\n 'flv': 'x-flv',\r\n '3gp': '3gpp',\r\n 'mov': 'quicktime',\r\n 'mpg': 'mpeg',\r\n 'avi': 'x-msvideo',\r\n 'wmv': 'x-ms-wmv',\r\n 'ogv': 'ogg',\r\n 'webm': 'webm',\r\n 'mp4': 'mp4',\r\n};\n\nvar ANALYTICS_DELIMITER = '?_a=';\r\nvar HtmlVideoLayer = /** @class */ (function () {\r\n function HtmlVideoLayer(element, userCloudinaryVideo, sources, plugins, videoAttributes) {\r\n var _this = this;\r\n this.mimeType = 'video';\r\n this.mimeSubTypes = VIDEO_MIME_TYPES;\r\n this.videoElement = element;\r\n this.originalVideo = userCloudinaryVideo;\r\n this.htmlPluginState = { cleanupCallbacks: [], pluginEventSubscription: [] };\r\n var pluginCloudinaryVideo = cloneDeep(userCloudinaryVideo);\r\n render(element, userCloudinaryVideo, plugins, this.htmlPluginState)\r\n .then(function () {\r\n _this.htmlPluginState.pluginEventSubscription.forEach(function (fn) { fn(); });\r\n _this.setVideoAttributes(videoAttributes);\r\n _this.handleSourceToVideo(pluginCloudinaryVideo, sources);\r\n });\r\n }\r\n /**\r\n * Handles user supplied sources or default sources\r\n * @param userCloudinaryVideo {CloudinaryVideo}\r\n * @param sources\r\n */\r\n HtmlVideoLayer.prototype.handleSourceToVideo = function (userCloudinaryVideo, sources) {\r\n var _this = this;\r\n // checks if user supplied sources\r\n if (sources) {\r\n this.generateUserSources(userCloudinaryVideo, sources);\r\n }\r\n else {\r\n var defaultTypes = ['webm', 'mp4', 'ogv'];\r\n defaultTypes.forEach(function (type) {\r\n _this.appendSourceTag(userCloudinaryVideo, type);\r\n });\r\n }\r\n };\r\n /**\r\n * Generate sources based on user input\r\n * @param userCloudinaryVideo {CloudinaryVideo}\r\n * @param sources\r\n */\r\n HtmlVideoLayer.prototype.generateUserSources = function (userCloudinaryVideo, sources) {\r\n var _this = this;\r\n sources.map(function (_a) {\r\n var type = _a.type, codecs = _a.codecs, transcode = _a.transcode;\r\n return (_this.appendSourceTag(cloneDeep(userCloudinaryVideo)\r\n .transcode(transcode), type, _this.buildMimeType(type, codecs)));\r\n });\r\n };\r\n /**\r\n * Appends source tag to html video element\r\n * @param userCloudinaryVideo {CloudinaryVideo}\r\n * @param type {string}\r\n * @param mimeType {string}\r\n */\r\n HtmlVideoLayer.prototype.appendSourceTag = function (userCloudinaryVideo, type, mimeType) {\r\n var source = document.createElement('source');\r\n var url = userCloudinaryVideo.toURL();\r\n // Split url to get analytics string so that we can insert the file extension (type) before it\r\n // To simplify this we could add a .getPublicId to CloudinaryVideo and do vid.setPublicId(vid.getPublicId+type)\r\n // Another option could be to add a .setExtension, which will allow to do vid.setExtension(type)\r\n var srcParts = url.split(ANALYTICS_DELIMITER);\r\n var analyticsStr = srcParts[1] ? \"\".concat(ANALYTICS_DELIMITER).concat(srcParts[1]) : '';\r\n source.src = \"\".concat(srcParts[0], \".\").concat(type).concat(analyticsStr);\r\n // Ideally, we want to use the VIDEO_MIME_TYPE to detect the mime of the extension\r\n // For future proofing of simple formats (say .foo and mimetype of video/foo), we also fallback to the actual type\r\n source.type = mimeType ? mimeType : \"video/\".concat(VIDEO_MIME_TYPES[type] || type);\r\n this.videoElement.appendChild(source);\r\n };\r\n /**\r\n * Determines MIME type of given source type and codecs.\r\n * @param type - format of the video\r\n * @param codecs - optional information about codecs of the video\r\n */\r\n HtmlVideoLayer.prototype.buildMimeType = function (type, codecs) {\r\n var mimeType = \"\".concat(this.mimeType, \"/\").concat(this.mimeSubTypes[type] || type);\r\n if (codecs) {\r\n mimeType += \"; codecs=\" + (Array.isArray(codecs) ? codecs.join(', ') : codecs);\r\n }\r\n return mimeType;\r\n };\r\n /**\r\n * Iterates through the video attributes and sets to true if passed in by the user.\r\n * In case of poster, sets the poster.\r\n * @param videoAttributes {object} Supported attributes: controls, loop, muted, poster, preload, autoplay, playsinline\r\n */\r\n HtmlVideoLayer.prototype.setVideoAttributes = function (videoAttributes) {\r\n if (videoAttributes) {\r\n for (var _i = 0, _a = Object.entries(videoAttributes); _i < _a.length; _i++) {\r\n var _b = _a[_i], key = _b[0], value = _b[1];\r\n // Boolean attributes are considered to be true if they're present on the element at all.\r\n // You should set value to the empty string (\"\") or the attribute's name.\r\n // See https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute\r\n value && this.videoElement.setAttribute(key, key === 'poster' ? value : '');\r\n }\r\n }\r\n };\r\n /**\r\n * Called when component is updated. If our video source has changed, a video reload is triggered.\r\n * @param updatedCloudinaryVideo\r\n * @param sources\r\n * @param plugins\r\n * @param videoAttributes\r\n */\r\n HtmlVideoLayer.prototype.update = function (updatedCloudinaryVideo, sources, plugins, videoAttributes) {\r\n var _this = this;\r\n if (updatedCloudinaryVideo !== this.originalVideo) {\r\n var sourcesToDelete = this.videoElement.getElementsByTagName(\"SOURCE\");\r\n while (sourcesToDelete[0])\r\n sourcesToDelete[0].parentNode.removeChild(sourcesToDelete[0]);\r\n render(this.videoElement, updatedCloudinaryVideo, plugins, this.htmlPluginState)\r\n .then(function () {\r\n _this.setVideoAttributes(videoAttributes);\r\n _this.handleSourceToVideo(updatedCloudinaryVideo, sources);\r\n _this.videoElement.load();\r\n });\r\n }\r\n };\r\n return HtmlVideoLayer;\r\n}());\n\n/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = 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 */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\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 */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\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 */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\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 */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\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 */\nfunction 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 = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nvar lodash_debounce = debounce;\n\n/**\r\n * Returns true if value is number\r\n * @param value\r\n */\r\nfunction isNum(value) {\r\n return typeof value === \"number\";\r\n}\n\n/**\r\n * return true when window is defined\r\n */\r\nfunction isBrowser() {\r\n return typeof window !== 'undefined';\r\n}\n\n/**\r\n * returns true if input is an image element\r\n * @param i\r\n */\r\nfunction isImage(i) {\r\n return i instanceof HTMLImageElement;\r\n}\n\n/**\r\n * @namespace\r\n * @description Updates the src with the size of the parent element and triggers a resize event for\r\n * subsequent resizing.\r\n * @param steps {number | number[]} The step size in pixels or an array of image widths in pixels.\r\n * @return {Plugin}\r\n * @example NOTE: The following is in React. For further examples, see the Packages tab.\r\n * \r\n */\r\nfunction responsive(_a) {\r\n var _b = _a === void 0 ? {} : _a, steps = _b.steps;\r\n return responsivePlugin.bind(null, steps);\r\n}\r\n/**\r\n * @description Responsive plugin\r\n * @param steps {number | number[]} The step size in pixels.\r\n * @param element {HTMLImageElement} The image element\r\n * @param responsiveImage {CloudinaryImage}\r\n * @param htmlPluginState {HtmlPluginState} holds cleanup callbacks and event subscriptions\r\n */\r\nfunction responsivePlugin(steps, element, responsiveImage, htmlPluginState) {\r\n if (!isBrowser())\r\n return true;\r\n if (!isImage(element))\r\n return;\r\n return new Promise(function (resolve) {\r\n htmlPluginState.cleanupCallbacks.push(function () {\r\n window.removeEventListener(\"resize\", resizeRef);\r\n resolve('canceled');\r\n });\r\n // Use a tagged generic action that can be later searched and replaced.\r\n responsiveImage.addAction(new Action().setActionTag('responsive'));\r\n // Immediately run the resize plugin, ensuring that first render gets a responsive image.\r\n onResize(steps, element, responsiveImage);\r\n var resizeRef;\r\n htmlPluginState.pluginEventSubscription.push(function () {\r\n window.addEventListener('resize', resizeRef = lodash_debounce(function () {\r\n onResize(steps, element, responsiveImage);\r\n }, 100));\r\n });\r\n resolve();\r\n });\r\n}\r\n/**\r\n * On resize updates image src\r\n * @param steps {number | number[]} The step size in pixels.\r\n * | number[] A set of image sizes in pixels.\r\n * @param element {HTMLImageElement} The image element\r\n * @param responsiveImage {CloudinaryImage}\r\n */\r\nfunction onResize(steps, element, responsiveImage) {\r\n updateByContainerWidth(steps, element, responsiveImage);\r\n element.src = responsiveImage.toURL();\r\n}\r\n/**\r\n * Updates the responsiveImage by container width.\r\n * @param steps {number | number[]} The step size in pixels.\r\n * | number[] A set of image sizes in pixels.\r\n * @param element {HTMLImageElement} The image element\r\n * @param responsiveImage {CloudinaryImage}\r\n */\r\nfunction updateByContainerWidth(steps, element, responsiveImage) {\r\n // Default value for responsiveImgWidth, used when no steps are passed.\r\n var responsiveImgWidth = element.parentElement.clientWidth;\r\n if (isNum(steps)) {\r\n var WIDTH_INTERVALS = steps;\r\n // We need to force the container width to be intervals of max width.\r\n responsiveImgWidth = Math.ceil(responsiveImgWidth / WIDTH_INTERVALS) * WIDTH_INTERVALS;\r\n }\r\n else if (Array.isArray(steps)) {\r\n responsiveImgWidth = steps.reduce(function (prev, curr) {\r\n return (Math.abs(curr - responsiveImgWidth) < Math.abs(prev - responsiveImgWidth) ? curr : prev);\r\n });\r\n }\r\n responsiveImage.transformation.actions.forEach(function (action, index) {\r\n if (action instanceof Action && action.getActionTag() === 'responsive') {\r\n responsiveImage.transformation.actions[index] = scale(responsiveImgWidth).setActionTag('responsive');\r\n }\r\n });\r\n}\n\n/**\r\n * @namespace\r\n * @description Loads an image once it is in a certain margin in the viewport. This includes vertical and horizontal scrolling.\r\n * @param rootMargin {string} The root element's bounding box before the intersection test is performed. Default: 0px.\r\n * @param threshold {number} The percentage of the image's visibility at which point the image should load. Default: 0.1 (10%).\r\n * @return {Plugin}\r\n * @example\r\n * \r\n * NOTE: The following is in React. For further examples, see the Packages tab.\r\n * When using the plugin make sure to add dimensions, otherwise the images will load with\r\n * the size of 0x0, meaning the images will be in the viewport and trigger the lazyload plugin.\r\n * \r\n * \r\n */\r\nfunction lazyload(_a) {\r\n var _b = _a === void 0 ? {} : _a, _c = _b.rootMargin, rootMargin = _c === void 0 ? '0px' : _c, _d = _b.threshold, threshold = _d === void 0 ? 0.1 : _d;\r\n return lazyloadPlugin.bind(null, rootMargin, threshold);\r\n}\r\n/**\r\n * @description lazyload plugin\r\n * @param rootMargin {string} The root element's bounding box before the intersection test is performed. Default: 0px.\r\n * @param threshold {number} The percentage of the image's visibility at which point the image should load. Default: 0.1 (10%).\r\n * @param element The image element.\r\n * @param element {HTMLImageElement} The image element.\r\n * @param cloudinaryImage {CloudinaryImage}\r\n * @param htmlPluginState {HtmlPluginState} Holds cleanup callbacks and event subscriptions.\r\n */\r\nfunction lazyloadPlugin(rootMargin, threshold, element, cloudinaryImage, htmlPluginState) {\r\n if (rootMargin === void 0) { rootMargin = '0px'; }\r\n if (threshold === void 0) { threshold = 0.1; }\r\n // if SSR skip plugin\r\n if (!isBrowser())\r\n return false;\r\n return new Promise(function (resolve) {\r\n var onIntersect = function () { return (resolve()); };\r\n var unobserve = detectIntersection(element, onIntersect, rootMargin, threshold);\r\n htmlPluginState.cleanupCallbacks.push(function () {\r\n unobserve();\r\n resolve('canceled');\r\n });\r\n });\r\n}\r\n/**\r\n * Check if IntersectionObserver is supported\r\n * @return {boolean} true if window.IntersectionObserver is defined\r\n */\r\nfunction isIntersectionObserverSupported() {\r\n // Check that 'IntersectionObserver' property is defined on window\r\n return window && 'IntersectionObserver' in window;\r\n}\r\n/**\r\n * Calls onIntersect() to resolve when intersection is detected, or when\r\n * no native lazy loading or when IntersectionObserver isn't supported.\r\n * @param {Element} el - the element to observe\r\n * @param {function} onIntersect - called when the given element is in view\r\n * @param rootMargin {string} The root element's bounding box before the intersection test is performed. Default: 0px.\r\n * @param threshold {number} The percentage of the image's visibility at which point the image should load. Default: 0.1 (10%).\r\n */\r\nfunction detectIntersection(el, onIntersect, rootMargin, threshold) {\r\n try {\r\n if (!isIntersectionObserverSupported()) {\r\n // Return if there's no need or possibility to detect intersection\r\n onIntersect();\r\n return;\r\n }\r\n // Detect intersection with given element using IntersectionObserver\r\n var observer_1 = new IntersectionObserver(function (entries) {\r\n entries.forEach(function (entry) {\r\n if (entry.isIntersecting) {\r\n observer_1.unobserve(entry.target);\r\n onIntersect();\r\n }\r\n });\r\n }, { rootMargin: rootMargin, threshold: threshold });\r\n observer_1.observe(el);\r\n return function () { el && observer_1.observe(el); };\r\n }\r\n catch (e) {\r\n onIntersect();\r\n }\r\n}\n\n/**\r\n * @namespace\r\n * @description Appends accessibility transformations to the original image.\r\n * @return {Plugin}\r\n * @example NOTE: The following is in React. For further examples, see the Packages tab.\r\n * \r\n */\r\nfunction accessibility(_a) {\r\n var _b = _a === void 0 ? {} : _a, _c = _b.mode, mode = _c === void 0 ? 'darkmode' : _c;\r\n return accessibilityPlugin.bind(null, mode);\r\n}\r\n/**\r\n * @description Accessibility plugin\r\n * @param mode {accessibilityMode} The accessibility mode to use. Possible modes: 'darkmode' | 'brightmode' | 'monochrome' | 'colorblind'. Default: 'darkmode'.\r\n * @param element {HTMLImageElement} The image element.\r\n * @param pluginCloudinaryImage {CloudinaryImage}\r\n * @param htmlPluginState {htmlPluginState} Holds cleanup callbacks and event subscriptions.\r\n */\r\nfunction accessibilityPlugin(mode, element, pluginCloudinaryImage, htmlPluginState) {\r\n if (isBrowser()) {\r\n if (!isImage(element))\r\n return;\r\n return new Promise(function (resolve) {\r\n // resolved promise when canceled\r\n htmlPluginState.cleanupCallbacks.push(function () {\r\n resolve('canceled');\r\n });\r\n if (!ACCESSIBILITY_MODES[mode]) {\r\n mode = 'darkmode';\r\n }\r\n pluginCloudinaryImage.effect(ACCESSIBILITY_MODES[mode]);\r\n resolve();\r\n });\r\n }\r\n else {\r\n pluginCloudinaryImage.effect(ACCESSIBILITY_MODES[mode]);\r\n return true;\r\n }\r\n}\n\n/**\r\n * @namespace\r\n * @description Displays a placeholder image until the original image loads.\r\n * @param mode {PlaceholderMode} The type of placeholder image to display. Possible modes: 'vectorize' | 'pixelate' | 'blur' | 'predominant-color'. Default: 'vectorize'.\r\n * @return {Plugin}\r\n * @example NOTE: The following is in React. For further examples, see the Packages tab.\r\n * \r\n */\r\nfunction placeholder(_a) {\r\n var _b = _a === void 0 ? {} : _a, _c = _b.mode, mode = _c === void 0 ? 'vectorize' : _c;\r\n return placeholderPlugin.bind(null, mode);\r\n}\r\n/**\r\n * @description Placeholder plugin\r\n * @param mode {PlaceholderMode} The type of placeholder image to display. Possible modes: 'vectorize' | 'pixelate' | 'blur' | 'predominant-color'. Default: 'vectorize'.\r\n * @param element {HTMLImageElement} The image element.\r\n * @param pluginCloudinaryImage {CloudinaryImage}\r\n * @param htmlPluginState {htmlPluginState} Holds cleanup callbacks and event subscriptions.\r\n */\r\nfunction placeholderPlugin(mode, element, pluginCloudinaryImage, htmlPluginState) {\r\n // @ts-ignore\r\n // If we're using an invalid mode, we default to vectorize\r\n if (!PLACEHOLDER_IMAGE_OPTIONS[mode]) {\r\n mode = 'vectorize';\r\n }\r\n // A placeholder mode maps to an array of transformations\r\n var PLACEHOLDER_ACTIONS = PLACEHOLDER_IMAGE_OPTIONS[mode].actions;\r\n // Before proceeding, clone the original image\r\n // We clone because we don't want to pollute the state of the image\r\n // Future renders (after the placeholder is loaded) should not load placeholder transformations\r\n var placeholderClonedImage = cloneDeep(pluginCloudinaryImage);\r\n //appends a placeholder transformation on the clone\r\n // @ts-ignore\r\n PLACEHOLDER_ACTIONS.forEach(function (transformation) {\r\n placeholderClonedImage.addAction(transformation);\r\n });\r\n if (!isBrowser()) {\r\n // in SSR, we copy the transformations of the clone to the user provided CloudinaryImage\r\n // We return here, since we don't have HTML elements to work with.\r\n pluginCloudinaryImage.transformation = placeholderClonedImage.transformation;\r\n return true;\r\n }\r\n // Client side rendering, if an image was not provided we don't perform any action\r\n if (!isImage(element))\r\n return;\r\n // For the cloned placeholder image, we remove the responsive action.\r\n // There's no need to load e_pixelate,w_{responsive} beacuse that image is temporary as-is\r\n // and it just causes another image to load.\r\n // This also means that the de-facto way to use responsive in SSR is WITH placeholder.\r\n // This also means that the user must provide dimensions for the responsive plugin on the img tag.\r\n placeholderClonedImage.transformation.actions.forEach(function (action, index) {\r\n if (action instanceof Action && action.getActionTag() === 'responsive') {\r\n delete placeholderClonedImage.transformation.actions[index];\r\n }\r\n });\r\n // Set the SRC of the imageElement to the URL of the placeholder Image\r\n element.src = placeholderClonedImage.toURL();\r\n //Fallback, if placeholder errors, load a single transparent pixel\r\n element.onerror = function () {\r\n element.src = singleTransparentPixel;\r\n };\r\n /*\r\n * This plugin loads two images:\r\n * - The first image is loaded as a placeholder\r\n * - The second image is loaded after the placeholder is loaded\r\n *\r\n * Placeholder image loads first. Once it loads, the promise is resolved and the\r\n * larger image will load. Once the larger image loads, promised and plugin is resolved.\r\n */\r\n return new Promise(function (resolve) {\r\n element.onload = function () {\r\n resolve();\r\n };\r\n }).then(function () {\r\n return new Promise(function (resolve) {\r\n htmlPluginState.cleanupCallbacks.push(function () {\r\n element.src = singleTransparentPixel;\r\n resolve('canceled');\r\n });\r\n // load image once placeholder is done loading\r\n var largeImage = new Image();\r\n largeImage.src = pluginCloudinaryImage.toURL();\r\n largeImage.onload = function () {\r\n resolve();\r\n };\r\n // image does not load, resolve\r\n largeImage.onerror = function () {\r\n resolve();\r\n };\r\n });\r\n });\r\n}\n\nfunction serverSideSrc(plugins, serverCloudinaryImage) {\r\n var clonedServerCloudinaryImage = cloneDeep(serverCloudinaryImage);\r\n if (plugins) {\r\n for (var i = 0; i < plugins.length; i++) {\r\n var response = plugins[i](null, clonedServerCloudinaryImage);\r\n if (!response) { //lazyload\r\n break;\r\n }\r\n }\r\n }\r\n return clonedServerCloudinaryImage.toURL();\r\n}\n\n/**\r\n * Cancels currently running plugins. This is called from unmount or update\r\n * @param pluginState {HtmlPluginState} Holds cleanup callbacks and event subscriptions\r\n */\r\nfunction cancelCurrentlyRunningPlugins(pluginState) {\r\n pluginState.cleanupCallbacks.forEach(function (fn) {\r\n fn(); // resolve each promise with 'canceled'\r\n });\r\n}\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\n\nvar react = {exports: {}};\n\nvar react_production_min = {};\n\n/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nvar objectAssign = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n/** @license React v16.14.0\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nvar l=objectAssign,n=\"function\"===typeof Symbol&&Symbol.for,p=n?Symbol.for(\"react.element\"):60103,q=n?Symbol.for(\"react.portal\"):60106,r=n?Symbol.for(\"react.fragment\"):60107,t=n?Symbol.for(\"react.strict_mode\"):60108,u=n?Symbol.for(\"react.profiler\"):60114,v=n?Symbol.for(\"react.provider\"):60109,w=n?Symbol.for(\"react.context\"):60110,x=n?Symbol.for(\"react.forward_ref\"):60112,y=n?Symbol.for(\"react.suspense\"):60113,z=n?Symbol.for(\"react.memo\"):60115,A=n?Symbol.for(\"react.lazy\"):\n60116,B=\"function\"===typeof Symbol&&Symbol.iterator;function C(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cQ.length&&Q.push(a);}\nfunction T(a,b,c,e){var d=typeof a;if(\"undefined\"===d||\"boolean\"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case \"string\":case \"number\":g=!0;break;case \"object\":switch(a.$$typeof){case p:case q:g=!0;}}if(g)return c(e,a,\"\"===b?\".\"+U(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var k=0;k 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n}\nfunction error(format) {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\\n in') === 0;\n\n if (!hasExistingStack) {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n }\n }\n\n var argsWithFormat = args.map(function (item) {\n return '' + item;\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n throw new Error(message);\n } catch (x) {}\n }\n}\n\nvar didWarnStateUpdateForUnmountedComponent = {};\n\nfunction warnNoop(publicInstance, callerName) {\n {\n var _constructor = publicInstance.constructor;\n var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';\n var warningKey = componentName + \".\" + callerName;\n\n if (didWarnStateUpdateForUnmountedComponent[warningKey]) {\n return;\n }\n\n error(\"Can't call %s on a component that is not yet mounted. \" + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);\n\n didWarnStateUpdateForUnmountedComponent[warningKey] = true;\n }\n}\n/**\n * This is the abstract API for an update queue.\n */\n\n\nvar ReactNoopUpdateQueue = {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n return false;\n },\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance, callback, callerName) {\n warnNoop(publicInstance, 'forceUpdate');\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {\n warnNoop(publicInstance, 'replaceState');\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} Name of the calling function in the public API.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState, callback, callerName) {\n warnNoop(publicInstance, 'setState');\n }\n};\n\nvar emptyObject = {};\n\n{\n Object.freeze(emptyObject);\n}\n/**\n * Base class helpers for the updating state of a component.\n */\n\n\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the\n // renderer.\n\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nComponent.prototype.isReactComponent = {};\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n\nComponent.prototype.setState = function (partialState, callback) {\n if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) {\n {\n throw Error( \"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\" );\n }\n }\n\n this.updater.enqueueSetState(this, partialState, callback, 'setState');\n};\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');\n};\n/**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\n\n\n{\n var deprecatedAPIs = {\n isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],\n replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']\n };\n\n var defineDeprecationWarning = function (methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);\n\n return undefined;\n }\n });\n };\n\n for (var fnName in deprecatedAPIs) {\n if (deprecatedAPIs.hasOwnProperty(fnName)) {\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n }\n }\n}\n\nfunction ComponentDummy() {}\n\nComponentDummy.prototype = Component.prototype;\n/**\n * Convenience component with default shallow equality check for sCU.\n */\n\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nvar pureComponentPrototype = PureComponent.prototype = new ComponentDummy();\npureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.\n\n_assign(pureComponentPrototype, Component.prototype);\n\npureComponentPrototype.isPureReactComponent = true;\n\n// an immutable object with a single mutable value\nfunction createRef() {\n var refObject = {\n current: null\n };\n\n {\n Object.seal(refObject);\n }\n\n return refObject;\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n var warnAboutAccessingKey = function () {\n {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n var warnAboutAccessingRef = function () {\n {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {\n var componentName = getComponentName(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n\nfunction createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n return newElement;\n}\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n\nfunction cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\nfunction isValidElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = ('' + key).replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n return '$' + escapedString;\n}\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\n\nvar didWarnAboutMaps = false;\nvar userProvidedKeyEscapeRegex = /\\/+/g;\n\nfunction escapeUserProvidedKey(text) {\n return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');\n}\n\nvar POOL_SIZE = 10;\nvar traverseContextPool = [];\n\nfunction getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) {\n if (traverseContextPool.length) {\n var traverseContext = traverseContextPool.pop();\n traverseContext.result = mapResult;\n traverseContext.keyPrefix = keyPrefix;\n traverseContext.func = mapFunction;\n traverseContext.context = mapContext;\n traverseContext.count = 0;\n return traverseContext;\n } else {\n return {\n result: mapResult,\n keyPrefix: keyPrefix,\n func: mapFunction,\n context: mapContext,\n count: 0\n };\n }\n}\n\nfunction releaseTraverseContext(traverseContext) {\n traverseContext.result = null;\n traverseContext.keyPrefix = null;\n traverseContext.func = null;\n traverseContext.context = null;\n traverseContext.count = 0;\n\n if (traverseContextPool.length < POOL_SIZE) {\n traverseContextPool.push(traverseContext);\n }\n}\n/**\n * @param {?*} children Children tree container.\n * @param {!string} nameSoFar Name of the key path so far.\n * @param {!function} callback Callback to invoke with each child found.\n * @param {?*} traverseContext Used to pass information throughout the traversal\n * process.\n * @return {!number} The number of children in this subtree.\n */\n\n\nfunction traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {\n var type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n var invokeCallback = false;\n\n if (children === null) {\n invokeCallback = true;\n } else {\n switch (type) {\n case 'string':\n case 'number':\n invokeCallback = true;\n break;\n\n case 'object':\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = true;\n }\n\n }\n }\n\n if (invokeCallback) {\n callback(traverseContext, children, // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows.\n nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);\n return 1;\n }\n\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getComponentKey(child, i);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n\n {\n // Warn about using Maps as children\n if (iteratorFn === children.entries) {\n if (!didWarnAboutMaps) {\n warn('Using Maps as children is deprecated and will be removed in ' + 'a future major release. Consider converting children to ' + 'an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n }\n }\n\n var iterator = iteratorFn.call(children);\n var step;\n var ii = 0;\n\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getComponentKey(child, ii++);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else if (type === 'object') {\n var addendum = '';\n\n {\n addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();\n }\n\n var childrenString = '' + children;\n\n {\n {\n throw Error( \"Objects are not valid as a React child (found: \" + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + \").\" + addendum );\n }\n }\n }\n }\n\n return subtreeCount;\n}\n/**\n * Traverses children that are typically specified as `props.children`, but\n * might also be specified through attributes:\n *\n * - `traverseAllChildren(this.props.children, ...)`\n * - `traverseAllChildren(this.props.leftPanelChildren, ...)`\n *\n * The `traverseContext` is an optional argument that is passed through the\n * entire traversal. It can be used to store accumulations or anything else that\n * the callback might find relevant.\n *\n * @param {?*} children Children tree object.\n * @param {!function} callback To invoke upon traversing each child.\n * @param {?*} traverseContext Context for traversal.\n * @return {!number} The number of children in this subtree.\n */\n\n\nfunction traverseAllChildren(children, callback, traverseContext) {\n if (children == null) {\n return 0;\n }\n\n return traverseAllChildrenImpl(children, '', callback, traverseContext);\n}\n/**\n * Generate a key string that identifies a component within a set.\n *\n * @param {*} component A component that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n\nfunction getComponentKey(component, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (typeof component === 'object' && component !== null && component.key != null) {\n // Explicit key\n return escape(component.key);\n } // Implicit key determined by the index in the set\n\n\n return index.toString(36);\n}\n\nfunction forEachSingleChild(bookKeeping, child, name) {\n var func = bookKeeping.func,\n context = bookKeeping.context;\n func.call(context, child, bookKeeping.count++);\n}\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\n\n\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n if (children == null) {\n return children;\n }\n\n var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);\n traverseAllChildren(children, forEachSingleChild, traverseContext);\n releaseTraverseContext(traverseContext);\n}\n\nfunction mapSingleChildIntoContext(bookKeeping, child, childKey) {\n var result = bookKeeping.result,\n keyPrefix = bookKeeping.keyPrefix,\n func = bookKeeping.func,\n context = bookKeeping.context;\n var mappedChild = func.call(context, child, bookKeeping.count++);\n\n if (Array.isArray(mappedChild)) {\n mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) {\n return c;\n });\n } else if (mappedChild != null) {\n if (isValidElement(mappedChild)) {\n mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);\n }\n\n result.push(mappedChild);\n }\n}\n\nfunction mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {\n var escapedPrefix = '';\n\n if (prefix != null) {\n escapedPrefix = escapeUserProvidedKey(prefix) + '/';\n }\n\n var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);\n traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);\n releaseTraverseContext(traverseContext);\n}\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, key, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\n\n\nfunction mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, func, context);\n return result;\n}\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n\nfunction countChildren(children) {\n return traverseAllChildren(children, function () {\n return null;\n }, null);\n}\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n\nfunction toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, function (child) {\n return child;\n });\n return result;\n}\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n\nfunction onlyChild(children) {\n if (!isValidElement(children)) {\n {\n throw Error( \"React.Children.only expected to receive a single React element child.\" );\n }\n }\n\n return children;\n}\n\nfunction createContext(defaultValue, calculateChangedBits) {\n if (calculateChangedBits === undefined) {\n calculateChangedBits = null;\n } else {\n {\n if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') {\n error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits);\n }\n }\n }\n\n var context = {\n $$typeof: REACT_CONTEXT_TYPE,\n _calculateChangedBits: calculateChangedBits,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n // Used to track how many concurrent renderers this context currently\n // supports within in a single renderer. Such as parallel server rendering.\n _threadCount: 0,\n // These are circular\n Provider: null,\n Consumer: null\n };\n context.Provider = {\n $$typeof: REACT_PROVIDER_TYPE,\n _context: context\n };\n var hasWarnedAboutUsingNestedContextConsumers = false;\n var hasWarnedAboutUsingConsumerProvider = false;\n\n {\n // A separate object, but proxies back to the original context object for\n // backwards compatibility. It has a different $$typeof, so we can properly\n // warn for the incorrect usage of Context as a Consumer.\n var Consumer = {\n $$typeof: REACT_CONTEXT_TYPE,\n _context: context,\n _calculateChangedBits: context._calculateChangedBits\n }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here\n\n Object.defineProperties(Consumer, {\n Provider: {\n get: function () {\n if (!hasWarnedAboutUsingConsumerProvider) {\n hasWarnedAboutUsingConsumerProvider = true;\n\n error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');\n }\n\n return context.Provider;\n },\n set: function (_Provider) {\n context.Provider = _Provider;\n }\n },\n _currentValue: {\n get: function () {\n return context._currentValue;\n },\n set: function (_currentValue) {\n context._currentValue = _currentValue;\n }\n },\n _currentValue2: {\n get: function () {\n return context._currentValue2;\n },\n set: function (_currentValue2) {\n context._currentValue2 = _currentValue2;\n }\n },\n _threadCount: {\n get: function () {\n return context._threadCount;\n },\n set: function (_threadCount) {\n context._threadCount = _threadCount;\n }\n },\n Consumer: {\n get: function () {\n if (!hasWarnedAboutUsingNestedContextConsumers) {\n hasWarnedAboutUsingNestedContextConsumers = true;\n\n error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');\n }\n\n return context.Consumer;\n }\n }\n }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty\n\n context.Consumer = Consumer;\n }\n\n {\n context._currentRenderer = null;\n context._currentRenderer2 = null;\n }\n\n return context;\n}\n\nfunction lazy(ctor) {\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _ctor: ctor,\n // React uses these fields to store the result.\n _status: -1,\n _result: null\n };\n\n {\n // In production, this would just set it on the object.\n var defaultProps;\n var propTypes;\n Object.defineProperties(lazyType, {\n defaultProps: {\n configurable: true,\n get: function () {\n return defaultProps;\n },\n set: function (newDefaultProps) {\n error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n defaultProps = newDefaultProps; // Match production behavior more closely:\n\n Object.defineProperty(lazyType, 'defaultProps', {\n enumerable: true\n });\n }\n },\n propTypes: {\n configurable: true,\n get: function () {\n return propTypes;\n },\n set: function (newPropTypes) {\n error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n propTypes = newPropTypes; // Match production behavior more closely:\n\n Object.defineProperty(lazyType, 'propTypes', {\n enumerable: true\n });\n }\n }\n });\n }\n\n return lazyType;\n}\n\nfunction forwardRef(render) {\n {\n if (render != null && render.$$typeof === REACT_MEMO_TYPE) {\n error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');\n } else if (typeof render !== 'function') {\n error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);\n } else {\n if (render.length !== 0 && render.length !== 2) {\n error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');\n }\n }\n\n if (render != null) {\n if (render.defaultProps != null || render.propTypes != null) {\n error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');\n }\n }\n }\n\n return {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: render\n };\n}\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction memo(type, compare) {\n {\n if (!isValidElementType(type)) {\n error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);\n }\n }\n\n return {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: compare === undefined ? null : compare\n };\n}\n\nfunction resolveDispatcher() {\n var dispatcher = ReactCurrentDispatcher.current;\n\n if (!(dispatcher !== null)) {\n {\n throw Error( \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.\" );\n }\n }\n\n return dispatcher;\n}\n\nfunction useContext(Context, unstable_observedBits) {\n var dispatcher = resolveDispatcher();\n\n {\n if (unstable_observedBits !== undefined) {\n error('useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\\n\\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://fb.me/rules-of-hooks' : '');\n } // TODO: add a more generic warning for invalid values.\n\n\n if (Context._context !== undefined) {\n var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs\n // and nobody should be using this in existing code.\n\n if (realContext.Consumer === Context) {\n error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');\n } else if (realContext.Provider === Context) {\n error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');\n }\n }\n }\n\n return dispatcher.useContext(Context, unstable_observedBits);\n}\nfunction useState(initialState) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useState(initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useReducer(reducer, initialArg, init);\n}\nfunction useRef(initialValue) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useRef(initialValue);\n}\nfunction useEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useEffect(create, deps);\n}\nfunction useLayoutEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useLayoutEffect(create, deps);\n}\nfunction useCallback(callback, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useCallback(callback, deps);\n}\nfunction useMemo(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useMemo(create, deps);\n}\nfunction useImperativeHandle(ref, create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useImperativeHandle(ref, create, deps);\n}\nfunction useDebugValue(value, formatterFn) {\n {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDebugValue(value, formatterFn);\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n if (ReactCurrentOwner.current) {\n var name = getComponentName(ReactCurrentOwner.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendumForProps(elementProps) {\n if (elementProps !== null && elementProps !== undefined) {\n return getSourceInfoErrorAddendum(elementProps.__source);\n }\n\n return '';\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentName(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement(element);\n\n {\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner);\n }\n\n setCurrentlyValidatingElement(null);\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n if (typeof node !== 'object') {\n return;\n }\n\n if (Array.isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var name = getComponentName(type);\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n setCurrentlyValidatingElement(element);\n checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum);\n setCurrentlyValidatingElement(null);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true;\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n setCurrentlyValidatingElement(fragment);\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n break;\n }\n }\n\n if (fragment.ref !== null) {\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n }\n\n setCurrentlyValidatingElement(null);\n }\n}\nfunction createElementWithValidation(type, props, children) {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendumForProps(props);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (Array.isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentName(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n {\n error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n }\n\n var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], type);\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n}\nvar didWarnAboutDeprecatedCreateFactory = false;\nfunction createFactoryWithValidation(type) {\n var validatedFactory = createElementWithValidation.bind(null, type);\n validatedFactory.type = type;\n\n {\n if (!didWarnAboutDeprecatedCreateFactory) {\n didWarnAboutDeprecatedCreateFactory = true;\n\n warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');\n } // Legacy hook: remove it\n\n\n Object.defineProperty(validatedFactory, 'type', {\n enumerable: false,\n get: function () {\n warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');\n\n Object.defineProperty(this, 'type', {\n value: type\n });\n return type;\n }\n });\n }\n\n return validatedFactory;\n}\nfunction cloneElementWithValidation(element, props, children) {\n var newElement = cloneElement.apply(this, arguments);\n\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], newElement.type);\n }\n\n validatePropTypes(newElement);\n return newElement;\n}\n\n{\n\n try {\n var frozenObject = Object.freeze({});\n var testMap = new Map([[frozenObject, null]]);\n var testSet = new Set([frozenObject]); // This is necessary for Rollup to not consider these unused.\n // https://github.com/rollup/rollup/issues/1771\n // TODO: we can remove these if Rollup fixes the bug.\n\n testMap.set(0, 0);\n testSet.add(0);\n } catch (e) {\n }\n}\n\nvar createElement$1 = createElementWithValidation ;\nvar cloneElement$1 = cloneElementWithValidation ;\nvar createFactory = createFactoryWithValidation ;\nvar Children = {\n map: mapChildren,\n forEach: forEachChildren,\n count: countChildren,\n toArray: toArray,\n only: onlyChild\n};\n\nreact_development.Children = Children;\nreact_development.Component = Component;\nreact_development.Fragment = REACT_FRAGMENT_TYPE;\nreact_development.Profiler = REACT_PROFILER_TYPE;\nreact_development.PureComponent = PureComponent;\nreact_development.StrictMode = REACT_STRICT_MODE_TYPE;\nreact_development.Suspense = REACT_SUSPENSE_TYPE;\nreact_development.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;\nreact_development.cloneElement = cloneElement$1;\nreact_development.createContext = createContext;\nreact_development.createElement = createElement$1;\nreact_development.createFactory = createFactory;\nreact_development.createRef = createRef;\nreact_development.forwardRef = forwardRef;\nreact_development.isValidElement = isValidElement;\nreact_development.lazy = lazy;\nreact_development.memo = memo;\nreact_development.useCallback = useCallback;\nreact_development.useContext = useContext;\nreact_development.useDebugValue = useDebugValue;\nreact_development.useEffect = useEffect;\nreact_development.useImperativeHandle = useImperativeHandle;\nreact_development.useLayoutEffect = useLayoutEffect;\nreact_development.useMemo = useMemo;\nreact_development.useReducer = useReducer;\nreact_development.useRef = useRef;\nreact_development.useState = useState;\nreact_development.version = ReactVersion;\n })();\n}\n\nif (process.env.NODE_ENV === 'production') {\n react.exports = react_production_min;\n} else {\n react.exports = react_development;\n}\n\nvar React = react.exports;\n\nvar SDKAnalyticsConstants = {\n sdkSemver: '1.4.1',\n techVersion: React.version,\n sdkCode: 'J'\n};\n\n/**\n * @mixin ReactSDK\n * @description The Cloudinary React SDK contains components like \\ to easily render your media assets from Cloudinary.\n * The SDK also comes with support for optional JS plugins that make the components smart, with features like lazy loading, placeholder, accessibility & responsiveness.\n *\n * @example\n * \n * Please note that the order of the plugins is important. See {@link https://cloudinary.com/documentation/sdks/js/frontend-frameworks/index.html#plugin-order|Plugin Order} for more details.\n * \n * // Example\n * import {CloudinaryImage} from \"@cloudinary/url-gen/assets/CloudinaryImage\";\n * import {\n * AdvancedImage,\n * accessibility,\n * responsive,\n * lazyload,\n * placeholder\n * } from '@cloudinary/react';\n *\n * const App = () => {\n *\n * const myCld = new Cloudinary({ cloudName: 'demo'});\n * let img = myCld().image('sample');\n *\n * return (\n * \n * )\n * };\n *\n *\n *\n *\n *\n */\n/**\n * @memberOf ReactSDK\n * @type {Component}\n * @description The Cloudinary image component.\n * @prop {CloudinaryImage} cldImg Generated by @cloudinary/url-gen\n * @prop {Plugins} plugins Advanced image component plugins accessibility(), responsive(), lazyload(), placeholder()\n */\nvar AdvancedImage = /** @class */ (function (_super) {\n __extends(AdvancedImage, _super);\n function AdvancedImage(props) {\n var _this = _super.call(this, props) || this;\n _this.imageRef = React.createRef();\n return _this;\n }\n /**\n * On mount, creates a new HTMLLayer instance and initializes with ref to img element,\n * user generated cloudinaryImage and the plugins to be used.\n */\n AdvancedImage.prototype.componentDidMount = function () {\n this.htmlLayerInstance = new HtmlImageLayer(this.imageRef.current, this.props.cldImg, this.props.plugins, SDKAnalyticsConstants);\n };\n /**\n * On update, we cancel running plugins and update image instance with the state of user\n * cloudinaryImage and the state of plugins.\n */\n AdvancedImage.prototype.componentDidUpdate = function () {\n cancelCurrentlyRunningPlugins(this.htmlLayerInstance.htmlPluginState);\n // call html layer to update the dom again with plugins and reset toBeCanceled\n this.htmlLayerInstance.update(this.props.cldImg, this.props.plugins, SDKAnalyticsConstants);\n };\n /**\n * On unmount, we cancel the currently running plugins.\n */\n AdvancedImage.prototype.componentWillUnmount = function () {\n // Safely cancel running events on unmount.\n cancelCurrentlyRunningPlugins(this.htmlLayerInstance.htmlPluginState);\n };\n AdvancedImage.prototype.render = function () {\n var _a = this.props; _a.cldImg; _a.plugins; var otherProps = __rest(_a, [\"cldImg\", \"plugins\"]) // Assume any other props are for the base element\n ;\n if (isBrowser()) { // On client side render\n return React.createElement(\"img\", __assign({ suppressHydrationWarning: true }, otherProps, { ref: this.imageRef }));\n }\n else { // on server side render\n var src = serverSideSrc(this.props.plugins, this.props.cldImg);\n return React.createElement(\"img\", __assign({}, otherProps, { src: src }));\n }\n };\n return AdvancedImage;\n}(React.Component));\n\nvar VIDEO_ATTRIBUTES_KEYS = ['controls', 'loop', 'muted', 'poster', 'preload', 'autoplay', 'playsinline'];\n/**\n * @memberOf ReactSDK\n * @type {Component}\n * @description The Cloudinary video component.\n * @prop {CloudinaryVideo} transformation Generated by @cloudinary/url-gen\n * @prop {Plugins} plugins Advanced image component plugins lazyload()\n * @prop videoAttributes Optional attributes include controls, loop, muted, poster, preload, autoplay\n * @prop videoEvents Optional video events include play, loadstart, playing, error, ended\n * @prop {VideoSources} sources Optional sources to generate\n * @example\n * \n * Using custom defined resources.\n * \n * const vid = new CloudinaryVideo('dog', {cloudName: 'demo'});\n * const videoEl = useRef();\n * const sources = [\n * {\n * type: 'mp4',\n * codecs: ['vp8', 'vorbis'],\n * transcode: videoCodec(auto())\n * },\n * {\n * type: 'webm',\n * codecs: ['avc1.4D401E', 'mp4a.40.2'],\n * videoCodec: videoCodec(auto())\n * }];\n *\n * return \n */\nvar AdvancedVideo = /** @class */ (function (_super) {\n __extends(AdvancedVideo, _super);\n function AdvancedVideo(props) {\n var _this = _super.call(this, props) || this;\n _this.videoRef = react.exports.createRef();\n _this.attachRef = _this.attachRef.bind(_this);\n return _this;\n }\n /**\n * On mount, creates a new HTMLVideoLayer instance and initializes with ref to video element,\n * user generated cloudinaryVideo and the plugins to be used.\n */\n AdvancedVideo.prototype.componentDidMount = function () {\n this.htmlVideoLayerInstance = new HtmlVideoLayer(this.videoRef && this.videoRef.current, this.props.cldVid, this.props.sources, this.props.plugins, this.getVideoAttributes());\n };\n /**\n * On update, we cancel running plugins and update the video instance if the src\n * was changed.\n */\n AdvancedVideo.prototype.componentDidUpdate = function () {\n cancelCurrentlyRunningPlugins(this.htmlVideoLayerInstance.htmlPluginState);\n // call html layer to update the dom again with plugins and reset toBeCanceled\n this.htmlVideoLayerInstance.update(this.props.cldVid, this.props.sources, this.props.plugins, this.getVideoAttributes());\n };\n /**\n * On unmount, we cancel the currently running plugins.\n */\n AdvancedVideo.prototype.componentWillUnmount = function () {\n // safely cancel running events on unmount\n cancelCurrentlyRunningPlugins(this.htmlVideoLayerInstance.htmlPluginState);\n };\n /**\n * Returns video attributes.\n */\n AdvancedVideo.prototype.getVideoAttributes = function () {\n var _this = this;\n var result = {};\n VIDEO_ATTRIBUTES_KEYS.forEach(function (key) {\n if (key in _this.props) {\n result[key] = _this.props[key];\n }\n });\n return result;\n };\n /**\n * Attach both this.videoRef and props.innerRef as ref to the given element.\n * @param element - the element to attach a ref to\n */\n AdvancedVideo.prototype.attachRef = function (element) {\n this.videoRef.current = element;\n var innerRef = this.props.innerRef;\n if (innerRef) {\n if (innerRef instanceof Function) {\n innerRef(element);\n }\n else {\n innerRef.current = element;\n }\n }\n };\n AdvancedVideo.prototype.render = function () {\n var _a = this.props; _a.cldVid; _a.plugins; _a.sources; _a.innerRef; var videoEvents = __rest(_a, [\"cldVid\", \"plugins\", \"sources\", \"innerRef\"]) // Assume any other props are for the base element\n ;\n return React.createElement(\"video\", __assign({}, videoEvents, { ref: this.attachRef }));\n };\n return AdvancedVideo;\n}(react.exports.Component));\n\nexport { AdvancedImage, AdvancedVideo, accessibility, lazyload, placeholder, responsive };\n"],"names":["commonjsGlobal","globalThis","window","g","self","lodash_clonedeep","exports","module","HASH_UNDEFINED","MAX_SAFE_INTEGER","argsTag","boolTag","dateTag","funcTag","genTag","mapTag","numberTag","objectTag","promiseTag","regexpTag","setTag","stringTag","symbolTag","weakMapTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","reFlags","reIsHostCtor","reIsUint","cloneableTags","freeGlobal","Object","freeSelf","root","Function","freeExports","nodeType","freeModule","moduleExports","addMapEntry","map","pair","set","addSetEntry","value","add","arrayReduce","array","iteratee","accumulator","initAccum","index","length","isHostObject","result","toString","e","mapToArray","Array","size","forEach","key","overArg","func","transform","arg","setToArray","uid","arrayProto","prototype","funcProto","objectProto","coreJsData","maskSrcKey","exec","keys","IE_PROTO","funcToString","hasOwnProperty","objectToString","reIsNative","RegExp","call","replace","Buffer","undefined","Symbol","Uint8Array","getPrototype","getPrototypeOf","objectCreate","create","propertyIsEnumerable","splice","nativeGetSymbols","getOwnPropertySymbols","nativeIsBuffer","isBuffer","nativeKeys","DataView","getNative","Map","Promise","Set","WeakMap","nativeCreate","dataViewCtorString","toSource","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","symbolProto","symbolValueOf","valueOf","Hash","entries","this","clear","entry","ListCache","MapCache","Stack","__data__","arrayLikeKeys","inherited","isArray","isObjectLike","isArrayLike","isArrayLikeObject","isArguments","n","baseTimes","String","skipIndexes","isIndex","push","assignValue","object","objValue","eq","assocIndexOf","baseClone","isDeep","isFull","customizer","stack","isObject","isArr","constructor","input","initCloneArray","source","copyArray","tag","getTag","isFunc","buffer","slice","copy","cloneBuffer","isPrototype","proto","initCloneObject","copyObject","getSymbols","copySymbols","baseAssign","cloneFunc","Ctor","cloneArrayBuffer","dataView","byteOffset","byteLength","cloneDataView","typedArray","cloneTypedArray","cloneMap","regexp","lastIndex","cloneRegExp","cloneSet","symbol","initCloneByTag","stacked","get","props","keysFunc","symbolsFunc","values","offset","arrayPush","baseGetAllKeys","getAllKeys","arrayEach","subValue","baseIsNative","isFunction","test","arrayBuffer","newValue","getMapData","type","data","getValue","has","pop","cache","pairs","LARGE_ARRAY_SIZE","other","ArrayBuffer","resolve","ctorString","isLength","baseKeys","cloneDeep","__awaiter","thisArg","_arguments","P","generator","reject","fulfilled","step","next","rejected","done","then","apply","__generator","body","f","y","t","_","label","sent","trys","ops","verb","iterator","v","op","TypeError","render","element","pluginCloudinaryAsset","plugins","pluginState","i","_a","HtmlImageLayer","userCloudinaryImage","analyticsOptions","_this","imgElement","htmlPluginState","cleanupCallbacks","pluginEventSubscription","pluginCloudinaryImage","fn","setAttribute","toURL","trackedAnalytics","sdkCode","sdkSemver","techVersion","update","QualifierValue","qualifierValue","delimiter","hasValue","addValue","join","concat","filter","setDelimiter","UnsupportedError","Error","message","super","createUnsupportedError","qualifierToJson","_qualifierModel","error","name","Qualifier","toJson","FlagQualifier","flagType","flagValue","getFlagValue","actionToJson","_actionModel","Action","arguments","qualifiers","flags","actionTag","prepareQualifiers","getActionTag","setActionTag","from","flag","sort","mapToSortedArray","addQualifier","qualifier","toLowerCase","split","addFlag","addValueToQualifier","qualifierKey","NamedRegion","regionType","CustomRegion","x","width","height","custom","faces","BlurAction","strength","_strength","actionType","region","blurRegion","RegionType","_region","str","q","static","actionModel","objectFlip","obj","ACTION_TYPE_TO_CROP_MODE_MAP","limitFit","limitFill","minimumFit","thumbnail","limitPad","minimumPad","ACTION_TYPE_TO_EFFECT_MODE_MAP","redEye","advancedRedEye","oilPaint","unsharpMask","makeTransparent","ACTION_TYPE_TO_QUALITY_MODE_MAP","autoBest","autoEco","autoGood","autoLow","jpegminiHigh","jpegminiMedium","jpegminiBest","CHROMA_VALUE_TO_CHROMA_MODEL_ENUM","CHROMA_MODEL_ENUM_TO_CHROMA_VALUE","CROP_MODE_TO_ACTION_TYPE_MAP","DELIVERY_MODE_TO_ACTION_TYPE_MAP","colorSpace","dpr","density","defaultImage","format","quality","EFFECT_MODE_TO_ACTION_TYPE_MAP","fullHd","fullHdWifi","fullHdLean","hdLean","SimpleEffectAction","effectType","level","qualifierEffect","createEffectQualifier","LeveledEffectAction","LEVEL_NAME","setLevel","prepareColor","color","match","substr","VectorizeEffectAction","numOfColors","num","_numOfColors","detailsLevel","detailLevel","_detailsLevel","despeckleLevel","_despeckleLevel","cornersLevel","_cornersLevel","paths","_paths","EffectActionWithLevel","AssistColorBlindEffectAction","xray","stripesStrength","ColorizeEffectAction","Pixelate","squareSize","_squareSize","pixelateRegion","colorize","colorizeLevel","BackgroundColor","RawAction","raw","Transformation","actions","addAction","action","actionToAdd","indexOf","addTransformation","tx","a","animated","animatedAction","border","borderAction","reshape","reshapeAction","resize","resizeAction","roundCorners","roundCornersAction","overlay","overlayAction","underlay","underlayAction","setLayerType","addVariable","variableAction","conditional","conditionAction","effect","effectAction","adjust","rotate","rotateAction","namedTransformation","delivery","deliveryAction","backgroundColor","psdTools","extract","flagQualifier","flagToAdd","customFunction","transcode","videoEdit","json","toFloatAsString","returnValue","isNaN","parseFloat","AspectRatioQualifierValue","ResizeSimpleAction","cropType","cropWidth","cropHeight","dimensions","aspectRatio","ratio","relative","regionRelative","GravityQualifier","AutoGravity","autoFocus","AutoFocusObjects","FocusOnGravity","FocusOnObjects","fallbackGravity","val","CompassGravity","dir","focusOn","args","res","autoGravity","FocusOnValue","getGravityValue","gravity","createIAutoFocusObject","avoid","weight","createAutoGravityModel","gravityQualifier","startsWith","gravityType","createGravityModel","gravityValue","includes","isCompassGravity","compass","createCompassGravityModel","isOcrGravity","isIAutoGravityString","isAutoGravity","hasAutoGravity","focusOnObjects","autoFocusObjects","autoGravityInstance","createFocusOnGravityModel","focusOnValues","createFocusOnGravity","AutoFocus","_weight","shouldAvoid","shouldAddWeight","getName","getWeight","w","CompassQualifier","createAutoFocusFromModel","autoGravityObjectModel","createAutoGravityFromModel","gravityModel","createGravityFromModel","isCompassGravityModel","isOcrGravityModel","isAutoGravityModel","createFocusOnGravityFromModel","ResizeAdvancedAction","fromJson","BackgroundQualifier","backgroundValue","BlurredBackgroundAction$1","intensity","intensityLevel","brightness","brightnessLevel","BaseCommonBackground","_palette","contrast","_contrast","palette","colors","BackgroundAutoBorderQualifier","BaseGradientBackground","gradientColors","_gradientColors","gradientDirection","direction","_gradientDirection","BackgroundBorderGradientQualifier","BackgroundPredominantGradientQualifier","BackgroundAutoPredominantQualifier","getBackgroundValue","background","createContrastPaletteBackgroundModel","backgroundType","createBaseGradientBackgroundModel","createBackgroundModel","createBlurredBackgroundModel","assign","createBorderBackgroundModel","createBorderGradientBackgroundModel","createPredominantBackgroundModel","createPredominantGradientBackgroundModel","createColorBackgroundModel","FormatQualifier","auto$1","auto","borderGradient","predominantGradient","predominant","colorStr","Background","blurred","createGradientBackground","backgroundModel","createContrastPaletteBackground","createBackgroundFromModel","createBlurredBackground","ResizePadAction","backgroundQualifier","offsetX","offsetY","zoom","ResizeCropAction","z","ResizeFillAction","DeliveryAction","deliveryKey","deliveryType","modelProperty","deliveryTypeValue","ProgressiveQualifier","mode","DeliveryFormatAction","lossy","progressive","preserveTransparency","formatType","DeliveryQualityAction","qualityValue","chromaSubSampling","qualityWithSubSampling","quantization","qualityWithQuantization","chromaValue","toUpperCase","qualityType","blurLevel","crop","fill","VIDEO_MIME_TYPES","ANALYTICS_DELIMITER","HtmlVideoLayer","userCloudinaryVideo","sources","videoAttributes","mimeType","mimeSubTypes","videoElement","originalVideo","pluginCloudinaryVideo","setVideoAttributes","handleSourceToVideo","generateUserSources","appendSourceTag","codecs","buildMimeType","document","createElement","srcParts","analyticsStr","src","appendChild","_i","_b","updatedCloudinaryVideo","sourcesToDelete","getElementsByTagName","parentNode","removeChild","load","parseInt","Math","max","min","isBrowser","cancelCurrentlyRunningPlugins","extendStatics","d","b","setPrototypeOf","__proto__","p","__extends","__","__assign","s","__rest","react","react_production_min","propIsEnumerable","toObject","objectAssign","test1","getOwnPropertyNames","test2","fromCharCode","order2","test3","letter","err","shouldUseNative","target","symbols","to","l","for","r","u","A","B","C","c","encodeURIComponent","D","isMounted","enqueueForceUpdate","enqueueReplaceState","enqueueSetState","E","F","context","refs","updater","G","H","isReactComponent","setState","forceUpdate","I","isPureReactComponent","J","current","K","L","ref","__self","__source","M","k","children","h","m","defaultProps","$$typeof","_owner","O","Q","R","keyPrefix","count","S","T","U","V","escape","W","aa","X","N","Y","Z","ba","ReactCurrentDispatcher","ReactCurrentBatchConfig","suspense","ReactCurrentOwner","IsSomeRendererActing","Children","toArray","only","Component","Fragment","Profiler","PureComponent","StrictMode","Suspense","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","cloneElement","createContext","_calculateChangedBits","_currentValue","_currentValue2","_threadCount","Provider","Consumer","_context","createFactory","bind","createRef","forwardRef","isValidElement","lazy","_ctor","_status","_result","memo","compare","useCallback","useContext","useDebugValue","useEffect","useImperativeHandle","useLayoutEffect","useMemo","useReducer","useRef","useState","version","checkPropTypes","typeSpecs","location","componentName","getStack","resetWarningCache","React","SDKAnalyticsConstants","VIDEO_ATTRIBUTES_KEYS","_super","AdvancedImage","imageRef","componentDidMount","htmlLayerInstance","cldImg","componentDidUpdate","componentWillUnmount","otherProps","suppressHydrationWarning","serverCloudinaryImage","clonedServerCloudinaryImage","serverSideSrc","AdvancedVideo","videoRef","attachRef","htmlVideoLayerInstance","cldVid","getVideoAttributes","innerRef","videoEvents"],"sourceRoot":""}