From c9d2f273213df523e50ded4030aa52ef0cd2f559 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Philipczyk?= Date: Fri, 18 Nov 2022 17:22:04 +0100 Subject: [PATCH 1/3] chore: add generated files --- packages/html/index.d.ts | 13 + packages/html/index.esm.js | 5701 ++++++++++++++++ packages/html/index.esm.js.map | 1 + packages/html/index.js | 5713 ++++++++++++++++ packages/html/index.js.map | 1 + packages/html/index.umd.js | 5719 +++++++++++++++++ packages/html/index.umd.js.map | 1 + packages/html/layers/htmlImageLayer.d.ts | 14 + packages/html/layers/htmlVideoLayer.d.ts | 59 + packages/html/plugins/accessibility.d.ts | 20 + packages/html/plugins/lazyload.d.ts | 20 + packages/html/plugins/placeholder.d.ts | 12 + packages/html/plugins/responsive.d.ts | 13 + packages/html/types.d.ts | 33 + .../utils/cancelCurrentlyRunningPlugins.d.ts | 6 + packages/html/utils/internalConstants.d.ts | 55 + packages/html/utils/isBrowser.d.ts | 4 + packages/html/utils/isImage.d.ts | 5 + packages/html/utils/isNum.d.ts | 5 + packages/html/utils/render.d.ts | 11 + packages/html/utils/screenWidths.d.ts | 4 + packages/html/utils/serverSideSrc.d.ts | 9 + 22 files changed, 17419 insertions(+) create mode 100644 packages/html/index.d.ts create mode 100644 packages/html/index.esm.js create mode 100644 packages/html/index.esm.js.map create mode 100644 packages/html/index.js create mode 100644 packages/html/index.js.map create mode 100644 packages/html/index.umd.js create mode 100644 packages/html/index.umd.js.map create mode 100644 packages/html/layers/htmlImageLayer.d.ts create mode 100644 packages/html/layers/htmlVideoLayer.d.ts create mode 100644 packages/html/plugins/accessibility.d.ts create mode 100644 packages/html/plugins/lazyload.d.ts create mode 100644 packages/html/plugins/placeholder.d.ts create mode 100644 packages/html/plugins/responsive.d.ts create mode 100644 packages/html/types.d.ts create mode 100644 packages/html/utils/cancelCurrentlyRunningPlugins.d.ts create mode 100644 packages/html/utils/internalConstants.d.ts create mode 100644 packages/html/utils/isBrowser.d.ts create mode 100644 packages/html/utils/isImage.d.ts create mode 100644 packages/html/utils/isNum.d.ts create mode 100644 packages/html/utils/render.d.ts create mode 100644 packages/html/utils/screenWidths.d.ts create mode 100644 packages/html/utils/serverSideSrc.d.ts diff --git a/packages/html/index.d.ts b/packages/html/index.d.ts new file mode 100644 index 00000000..6943604f --- /dev/null +++ b/packages/html/index.d.ts @@ -0,0 +1,13 @@ +/** + * Import and export all needed types + */ +export { HtmlImageLayer } from './layers/htmlImageLayer.js'; +export { HtmlVideoLayer } from './layers/htmlVideoLayer.js'; +export { responsive } from './plugins/responsive.js'; +export { lazyload } from './plugins/lazyload.js'; +export { accessibility } from './plugins/accessibility.js'; +export { placeholder } from './plugins/placeholder.js'; +export { isBrowser } from './utils/isBrowser.js'; +export { serverSideSrc } from './utils/serverSideSrc.js'; +export { Plugins, VideoSources, PictureSources } from './types.js'; +export { cancelCurrentlyRunningPlugins } from './utils/cancelCurrentlyRunningPlugins.js'; diff --git a/packages/html/index.esm.js b/packages/html/index.esm.js new file mode 100644 index 00000000..5f691b14 --- /dev/null +++ b/packages/html/index.esm.js @@ -0,0 +1,5701 @@ +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +var lodash_clonedeep = {exports: {}}; + +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +(function (module, exports) { +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = +cloneableTags[boolTag] = cloneableTags[dateTag] = +cloneableTags[float32Tag] = cloneableTags[float64Tag] = +cloneableTags[int8Tag] = cloneableTags[int16Tag] = +cloneableTags[int32Tag] = cloneableTags[mapTag] = +cloneableTags[numberTag] = cloneableTags[objectTag] = +cloneableTags[regexpTag] = cloneableTags[setTag] = +cloneableTags[stringTag] = cloneableTags[symbolTag] = +cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = +cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Detect free variable `exports`. */ +var freeExports = exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** + * Adds the key-value `pair` to `map`. + * + * @private + * @param {Object} map The map to modify. + * @param {Array} pair The key-value pair to add. + * @returns {Object} Returns `map`. + */ +function addMapEntry(map, pair) { + // Don't return `map.set` because it's not chainable in IE 11. + map.set(pair[0], pair[1]); + return map; +} + +/** + * Adds `value` to `set`. + * + * @private + * @param {Object} set The set to modify. + * @param {*} value The value to add. + * @returns {Object} Returns `set`. + */ +function addSetEntry(set, value) { + // Don't return `set.add` because it's not chainable in IE 11. + set.add(value); + return set; +} + +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array ? array.length : 0; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array ? array.length : 0; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeKeys = overArg(Object.keys, Object); + +/* Built-in method references that are verified to be native. */ +var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), + Set = getNative(root, 'Set'), + WeakMap = getNative(root, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + this.__data__ = new ListCache(entries); +} + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new ListCache; +} + +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + return this.__data__['delete'](key); +} + +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} + +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var cache = this.__data__; + if (cache instanceof ListCache) { + var pairs = cache.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + return this; + } + cache = this.__data__ = new MapCache(pairs); + } + cache.set(key, value); + return this; +} + +// Add methods to `Stack`. +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + // Safari 9 makes `arguments.length` enumerable in strict mode. + var result = (isArray(value) || isArguments(value)) + ? baseTimes(value.length, String) + : []; + + var length = result.length, + skipIndexes = !!length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && (key == 'length' || isIndex(key, length)))) { + result.push(key); + } + } + return result; +} + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + object[key] = value; + } +} + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); +} + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @param {boolean} [isFull] Specify a clone including symbols. + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, isDeep, isFull, customizer, key, object, stack) { + var result; + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + if (isHostObject(value)) { + return object ? value : {}; + } + result = initCloneObject(isFunc ? {} : value); + if (!isDeep) { + return copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, baseClone, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (!isArr) { + var props = isFull ? getAllKeys(value) : keys(value); + } + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); + }); + return result; +} + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ +function baseCreate(proto) { + return isObject(proto) ? objectCreate(proto) : {}; +} + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); +} + +/** + * The base implementation of `getTag`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + return objectToString.call(value); +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var result = new buffer.constructor(buffer.length); + buffer.copy(result); + return result; +} + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; +} + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +/** + * Creates a clone of `map`. + * + * @private + * @param {Object} map The map to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned map. + */ +function cloneMap(map, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map); + return arrayReduce(array, addMapEntry, new map.constructor); +} + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +/** + * Creates a clone of `set`. + * + * @private + * @param {Object} set The set to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned set. + */ +function cloneSet(set, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set); + return arrayReduce(array, addSetEntry, new set.constructor); +} + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} + +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + assignValue(object, key, newValue === undefined ? source[key] : newValue); + } + return object; +} + +/** + * Copies own symbol properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); +} + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); +} + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Creates an array of the own enumerable symbol properties of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = baseGetTag; + +// Fallback for data views, maps, sets, and weak maps in IE 11, +// for data views in Edge < 14, and promises in Node.js. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = objectToString.call(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : undefined; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; +} + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; +} + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, cloneFunc, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return cloneMap(object, isDeep, cloneFunc); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return cloneSet(object, isDeep, cloneFunc); + + case symbolTag: + return cloneSymbol(object); + } +} + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ +function cloneDeep(value) { + return baseClone(value, true, true); +} + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +module.exports = cloneDeep; +}(lodash_clonedeep, lodash_clonedeep.exports)); + +var cloneDeep = lodash_clonedeep.exports; + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + 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; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +/** + * Iterate through plugins and break in cases where the response is canceled. The + * response is canceled if component is updated or unmounted + * @param element {HTMLImageElement|HTMLVideoElement} Html Image or Video element + * @param pluginCloudinaryAsset {CloudinaryImage|CloudinaryVideo} The Cloudinary asset generated by base + * @param plugins {plugins} array of plugins passed in by the user + * @param pluginState {htmlPluginState} Holds cleanup callbacks and event subscriptions + */ +function render(element, pluginCloudinaryAsset, plugins, pluginState) { + return __awaiter(this, void 0, void 0, function () { + var i, response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (plugins === undefined) + return [2 /*return*/]; + i = 0; + _a.label = 1; + case 1: + if (!(i < plugins.length)) return [3 /*break*/, 4]; + return [4 /*yield*/, plugins[i](element, pluginCloudinaryAsset, pluginState)]; + case 2: + response = _a.sent(); + if (response === 'canceled') { + return [3 /*break*/, 4]; + } + _a.label = 3; + case 3: + i++; + return [3 /*break*/, 1]; + case 4: return [2 /*return*/]; + } + }); + }); +} + +var HtmlImageLayer = /** @class */ (function () { + function HtmlImageLayer(element, userCloudinaryImage, plugins, analyticsOptions) { + var _this = this; + this.imgElement = element; + this.htmlPluginState = { cleanupCallbacks: [], pluginEventSubscription: [] }; + var pluginCloudinaryImage = cloneDeep(userCloudinaryImage); + render(element, pluginCloudinaryImage, plugins, this.htmlPluginState) + .then(function () { + _this.htmlPluginState.pluginEventSubscription.forEach(function (fn) { fn(); }); + _this.imgElement.setAttribute('src', pluginCloudinaryImage.toURL({ + trackedAnalytics: { + sdkCode: analyticsOptions.sdkCode, + sdkSemver: analyticsOptions.sdkSemver, + techVersion: analyticsOptions.techVersion, + } + })); + }); + } + /** + * Called when component is updated and re-triggers render + * @param userCloudinaryImage + * @param plugins + * @param analyticsOptions + */ + HtmlImageLayer.prototype.update = function (userCloudinaryImage, plugins, analyticsOptions) { + var _this = this; + var pluginCloudinaryImage = cloneDeep(userCloudinaryImage); + render(this.imgElement, pluginCloudinaryImage, plugins, this.htmlPluginState) + .then(function () { + _this.imgElement.setAttribute('src', pluginCloudinaryImage.toURL({ + trackedAnalytics: { + sdkCode: analyticsOptions.sdkCode, + sdkSemver: analyticsOptions.sdkSemver, + techVersion: analyticsOptions.techVersion, + } + })); + }); + }; + return HtmlImageLayer; +}()); + +/** + * @summary SDK + * @memberOf SDK + */ +class QualifierValue { + /** + * + * @param {QualifierValue | QualifierValue[] | any[] | string | number}qualifierValue + */ + constructor(qualifierValue) { + this.values = []; + this.delimiter = ':'; // {value}{delimiter}{value}... + if (this.hasValue(qualifierValue)) { + this.addValue(qualifierValue); + } + } + /** + * @description Joins the provided values with the provided delimiter + */ + toString() { + return this.values.join(this.delimiter); + } + /** + * @description Checks if the provided argument has a value + * @param {any} v + * @private + * @return {boolean} + */ + hasValue(v) { + return typeof v !== 'undefined' && v !== null && v !== ''; + } + /** + * @desc Adds a value for the this qualifier instance + * @param {any} value + * @return {this} + */ + addValue(value) { + // Append value or array of values + if (Array.isArray(value)) { + this.values = this.values.concat(value); + } + else { + this.values.push(value); + } + // Remove falsy values + this.values = this.values.filter((v) => this.hasValue(v)); + return this; + } + /** + * @description Sets the delimiter for this instance + * @param delimiter + */ + setDelimiter(delimiter) { + this.delimiter = delimiter; + return this; + } +} + +class UnsupportedError extends Error { + constructor(message = 'Unsupported') { + super(message); + } +} +/** + * Creates a new UnsupportedError + * @param message + */ +function createUnsupportedError(message) { + return new UnsupportedError(message); +} + +/** + * Returns the action's model + */ +function qualifierToJson() { + return this._qualifierModel || { error: createUnsupportedError(`unsupported qualifier ${this.constructor.name}`) }; +} + +class QualifierModel { + constructor() { + this._qualifierModel = {}; + } + toJson() { + return qualifierToJson.apply(this); + } +} + +/** + * @summary SDK + * @memberOf SDK + */ +class Qualifier extends QualifierModel { + constructor(key, qualifierValue) { + super(); + this.delimiter = '_'; // {key}{delimiter}{qualifierValue} + this.key = key; + if (qualifierValue instanceof QualifierValue) { + this.qualifierValue = qualifierValue; + } + else { + this.qualifierValue = new QualifierValue(); + this.qualifierValue.addValue(qualifierValue); + } + } + toString() { + const { key, delimiter, qualifierValue } = this; + return `${key}${delimiter}${qualifierValue.toString()}`; + } + addValue(value) { + this.qualifierValue.addValue(value); + return this; + } +} + +/** + * @memberOf Qualifiers.Flag + * @extends {SDK.Qualifier} + * @description the FlagQualifier class + */ +class FlagQualifier extends Qualifier { + constructor(flagType, flagValue) { + let qualifierValue; + if (flagValue) { + qualifierValue = new QualifierValue([flagType, `${flagValue}`]).setDelimiter(':'); + } + else { + qualifierValue = flagType; + } + super('fl', qualifierValue); + this.flagValue = flagValue; + } + toString() { + return super.toString().replace(/\./, '%2E'); + } + getFlagValue() { + return this.flagValue; + } +} + +/** + * Sort a map by key + * @private + * @param map + * @Return array of map's values sorted by key + */ +function mapToSortedArray(map, flags) { + const array = Array.from(map.entries()); + // objects from the Array.from() method above are stored in array of arrays: + // [[qualifierKey, QualifierObj], [qualifierKey, QualifierObj]] + // Flags is an array of FlagQualifierObj + // We need to convert it to the same form: [flagQualifier] => ['fl', flagQualifier] + flags.forEach((flag) => { + array.push(['fl', flag]); // push ['fl', flagQualifier] + }); + return array.sort().map((v) => v[1]); +} + +/** + * Returns the action's model + */ +function actionToJson() { + const actionModelIsNotEmpty = this._actionModel && Object.keys(this._actionModel).length; + if (actionModelIsNotEmpty) { + return this._actionModel; + } + return { error: createUnsupportedError(`unsupported action ${this.constructor.name}`) }; +} + +class ActionModel { + constructor() { + this._actionModel = {}; + } + toJson() { + return actionToJson.apply(this); + } +} + +/** + * @summary SDK + * @memberOf SDK + * @description Defines the category of transformation to perform. + */ +class Action extends ActionModel { + constructor() { + super(...arguments); + // We're using map, to overwrite existing keys. for example: + // addParam(w_100).addQualifier(w_200) should result in w_200. and not w_100,w_200 + this.qualifiers = new Map(); + // Unlike regular qualifiers, there can be multiple flags in each url component /fl_1,fl_2/ + // If the falgs are added to the qualifiers map, only a single flag could exist in a component (it's a map) + // So flags are stored separately until the very end because of that reason + this.flags = []; + this.delimiter = ','; // {qualifier}{delimiter}{qualifier} for example: `${'w_100'}${','}${'c_fill'}` + this.actionTag = ''; // A custom name tag to identify this action in the future + } + prepareQualifiers() { } + /** + * @description Returns the custom name tag that was given to this action + * @return {string} + */ + getActionTag() { + return this.actionTag; + } + /** + * @description Sets the custom name tag for this action + * @return {this} + */ + setActionTag(tag) { + this.actionTag = tag; + return this; + } + /** + * @description Calls toString() on all child qualifiers (implicitly by using .join()). + * @return {string} + */ + toString() { + this.prepareQualifiers(); + return mapToSortedArray(this.qualifiers, this.flags).join(this.delimiter); + } + /** + * @description Adds the parameter to the action. + * @param {SDK.Qualifier} qualifier + * @return {this} + */ + addQualifier(qualifier) { + // if string, find the key and value + if (typeof qualifier === 'string') { + const [key, value] = qualifier.toLowerCase().split('_'); + if (key === 'fl') { + // if string qualifier is a flag, store it in the flags arrays + this.flags.push(new FlagQualifier(value)); + } + else { + // if the string qualifier is not a flag, create a new qualifier from it + this.qualifiers.set(key, new Qualifier(key, value)); + } + } + else { + // if a qualifier object, insert to the qualifiers map + this.qualifiers.set(qualifier.key, qualifier); + } + return this; + } + /** + * @description Adds a flag to the current action. + * @param {Qualifiers.Flag} flag + * @return {this} + */ + addFlag(flag) { + if (typeof flag === 'string') { + this.flags.push(new FlagQualifier(flag)); + } + else { + if (flag instanceof FlagQualifier) { + this.flags.push(flag); + } + } + return this; + } + addValueToQualifier(qualifierKey, qualifierValue) { + this.qualifiers.get(qualifierKey).addValue(qualifierValue); + return this; + } +} + +/** + * @memberOf Qualifiers.Region + */ +class NamedRegion extends Action { + constructor(type) { + super(); + this.regionType = type; + } +} + +/** + * @memberOf Qualifiers.Region + */ +class CustomRegion extends NamedRegion { + constructor() { + super('named'); + } + /** + * @description The x position in pixels. + * @param {number} x + */ + x(x) { + this.addQualifier(new Qualifier('x', x)); + return this; + } + /** + * @description The y position in pixels. + * @param {number} y + */ + y(y) { + this.addQualifier(new Qualifier('y', y)); + return this; + } + /** + * @description The width of the region in pixels. + * @param {number} width + */ + width(width) { + this.addQualifier(new Qualifier('w', width)); + return this; + } + /** + * @description The height of the region in pixels. + * @param {number} height + */ + height(height) { + this.addQualifier(new Qualifier('h', height)); + return this; + } +} + +/** + * @summary qualifier + * @memberOf Qualifiers.Region + * @return {Qualifiers.Region.CustomRegion} + */ +function custom() { + return new CustomRegion(); +} +/** + * @summary qualifier + * @memberOf Qualifiers.Region + * @return {Qualifiers.Region.NamedRegion} + */ +function faces() { + return new NamedRegion('faces'); +} + +/** + * @description The Action class of the blur Builder. + * @extends SDK.Action + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ +class BlurAction extends Action { + constructor(strength) { + super(); + this._actionModel = {}; + this._strength = strength; + this._actionModel.actionType = 'blur'; + this._actionModel.strength = strength; + } + /** + * @description Specifies the region to blur. + * @param {NamedRegion} blurRegion + */ + region(blurRegion) { + this._actionModel.region = { RegionType: blurRegion.regionType }; + this._region = blurRegion; + return this; + } + /** + * @description Sets the strength of the blur effect. + * @param {number | string} strength + */ + strength(strength) { + this._strength = strength; + this._actionModel.strength = strength; + return this; + } + prepareQualifiers() { + /* + * Blur with region is a unique object in this codebase. + * On top of Blur being an Action with Qualifiers, + * it also accepts a Qualifier called Region. + * + * This Qualifier is in itself composite of qualifiers (such as height, or width). + * The existence of Region changes the output of Blur in non traditional ways + * which forced this relatively ad-hoc implementation. + * + * Aside from all of that, all of the Qualifiers in the component should be alphabetized + * This happens naturally in the Action class, + * however since we're dealing with two levels of qualifiers (Blur and Region), + * these need to be merged. + * + * This function will merge the Region qualifiers with Blur + * and add all needed implicit qualifiers (like g_ocr_text). + * We're not using the full Gravity Qualifier here to prevent the code import for such a simplistic case + */ + const str = this._strength ? `:${this._strength}` : ''; + if ('_region' in this) { + const qualifiers = this._region.qualifiers; + // Copy qualifiers from the region "action" to the blur action + qualifiers.forEach((q) => this.addQualifier(q)); + if (this._region.regionType === 'named') { + this.addQualifier(new Qualifier('e', `blur_region${str}`)); + } + if (this._region.regionType === 'ocr_text') { + this.addQualifier(new Qualifier('e', `blur_region${str}`)); + this.addQualifier(new Qualifier('g', `ocr_text`)); + } + if (this._region.regionType === 'faces') { + this.addQualifier(new Qualifier('e', `blur_faces${str}`)); + } + } + else { + this.addQualifier(new Qualifier('e', `blur${str}`)); + } + } + static fromJson(actionModel) { + const { actionType, strength, region } = actionModel; + // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel]) + // This allows the inheriting classes to determine the class to be created + const result = new this(strength); + strength && result.strength(strength); + if (region && region.RegionType === 'faces') { + result.region(faces()); + } + if (region && region.RegionType === 'custom') { + result.region(custom()); + } + return result; + } +} + +/** + * Flip keys and values for given object + * @param obj + */ +function objectFlip(obj) { + const result = {}; + Object.keys(obj).forEach((key) => { + result[obj[key]] = key; + }); + return result; +} + +/** + * This file is for internal constants only. + * It is not intended for public use and is not part of the public API + */ +const ACTION_TYPE_TO_CROP_MODE_MAP = { + limitFit: 'limit', + limitFill: 'lfill', + minimumFit: 'mfit', + thumbnail: 'thumb', + limitPad: 'lpad', + minimumPad: 'mpad' +}; +const ACTION_TYPE_TO_DELIVERY_MODE_MAP = { + colorSpace: 'cs', + dpr: 'dpr', + density: 'dn', + defaultImage: 'd', + format: 'f', + quality: 'q' +}; +const ACTION_TYPE_TO_EFFECT_MODE_MAP = { + redEye: 'redeye', + advancedRedEye: 'adv_redeye', + oilPaint: 'oil_paint', + unsharpMask: 'unsharp_mask', + makeTransparent: 'make_transparent' +}; +const ACTION_TYPE_TO_QUALITY_MODE_MAP = { + autoBest: 'auto:best', + autoEco: 'auto:eco', + autoGood: 'auto:good', + autoLow: 'auto:low', + jpegminiHigh: 'jpegmini:1', + jpegminiMedium: 'jpegmini:2', + jpegminiBest: 'jpegmini:0' +}; +const ACTION_TYPE_TO_STREAMING_PROFILE_MODE_MAP = { + fullHd: 'full_hd', + fullHdWifi: 'full_hd_wifi', + fullHdLean: 'full_hd_lean', + hdLean: 'hd_lean' +}; +const CHROMA_VALUE_TO_CHROMA_MODEL_ENUM = { + 444: "CHROMA_444", + 420: "CHROMA_420" +}; +const COLOR_SPACE_MODEL_MODE_TO_COLOR_SPACE_MODE_MAP = { + 'noCmyk': 'no_cmyk', + 'keepCmyk': 'keep_cmyk', + 'tinySrgb': 'tinysrgb', + 'srgbTrueColor': 'srgb:truecolor' +}; +const CHROMA_MODEL_ENUM_TO_CHROMA_VALUE = objectFlip(CHROMA_VALUE_TO_CHROMA_MODEL_ENUM); +objectFlip(COLOR_SPACE_MODEL_MODE_TO_COLOR_SPACE_MODE_MAP); +const CROP_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_CROP_MODE_MAP); +const DELIVERY_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_DELIVERY_MODE_MAP); +const EFFECT_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_EFFECT_MODE_MAP); +objectFlip(ACTION_TYPE_TO_QUALITY_MODE_MAP); +objectFlip(ACTION_TYPE_TO_STREAMING_PROFILE_MODE_MAP); + +/** + * @description A class that defines a simple effect of the type e_{effectName} + * @extends SDK.Action + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ +class SimpleEffectAction extends Action { + constructor(effectType, level) { + super(); + this._actionModel = {}; + this._actionModel.actionType = EFFECT_MODE_TO_ACTION_TYPE_MAP[effectType] || effectType; + const qualifierEffect = this.createEffectQualifier(effectType, level); + this.addQualifier(qualifierEffect); + } + createEffectQualifier(effectType, level) { + let qualifierValue; + if (level) { + qualifierValue = new QualifierValue([effectType, `${level}`]).setDelimiter(':'); + } + else { + qualifierValue = new QualifierValue(effectType); + } + return new Qualifier('e', qualifierValue); + } + static fromJson(actionModel) { + const { actionType, level, strength } = actionModel; + const effectType = ACTION_TYPE_TO_EFFECT_MODE_MAP[actionType] || actionType; + // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel]) + // This allows the inheriting classes to determine the class to be created + // @ts-ignore + const result = new this(effectType, level ? level : strength); + return result; + } +} + +/** + * @description A base class for effects with a level, the extending class needs to implement a method that calls setLevel() + * @extends {Actions.Effect.SimpleEffectAction} + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ +class LeveledEffectAction extends SimpleEffectAction { + constructor(effectType, level) { + super(effectType, level); + this.LEVEL_NAME = 'level'; + this._actionModel = {}; + this.effectType = effectType; + this._actionModel.actionType = EFFECT_MODE_TO_ACTION_TYPE_MAP[effectType] || effectType; + if (level) { + this.setLevel(level); + } + } + /** + * + * @description Sets the effect level for the action + * @param {string | number} level - The strength of the effect + * @protected + */ + setLevel(level) { + this._actionModel[this.LEVEL_NAME] = level; + const qualifierEffect = this.createEffectQualifier(this.effectType, level); + this.addQualifier(qualifierEffect); + return this; + } +} + +/** + * Returns RGB or Color + * @private + * @param color + */ +function prepareColor(color) { + if (color) { + return color.match(/^#/) ? `rgb:${color.substr(1)}` : color; + } + else { + return color; + } +} + +/** + * @description Vectorizes the image. + * @extends SDK.Action + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ +class VectorizeEffectAction extends Action { + constructor() { + super(); + this._actionModel = {}; + this._actionModel.actionType = 'vectorize'; + } + /** + * @description The number of colors. (Range: 2 to 30, Server default: 10) + * @param {number | string} num + * @return {this} + */ + numOfColors(num) { + this._actionModel.numOfColors = num; + this._numOfColors = num; + return this; + } + /** + * @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) + * @param {number | string} num + * @return {this} + */ + detailsLevel(num) { + this._actionModel.detailLevel = num; + this._detailsLevel = num; + return this; + } + /** + * @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) + * @param {number | string} num + * @return {this} + */ + despeckleLevel(num) { + this._actionModel.despeckleLevel = num; + this._despeckleLevel = num; + return this; + } + /** + * @description The corner threshold. Specify 100 for no smoothing (polygon corners), 0 for completely smooth corners. (Range: 0 to 100, Default: 25) + * @param {number | string} num + * @return {this} + */ + cornersLevel(num) { + this._actionModel.cornersLevel = num; + this._cornersLevel = num; + return this; + } + /** + * @description The optimization value. Specify 100 for least optimization and the largest file. (Range: 0 to 100, Server default: 100). + * @param {number} num + * @return {this} + */ + paths(num) { + this._actionModel.paths = num; + this._paths = num; + return this; + } + prepareQualifiers() { + let str = 'vectorize'; + if (this._numOfColors) { + str += `:${new QualifierValue(`colors:${this._numOfColors}`).toString()}`; + } + if (this._detailsLevel) { + str += `:${new QualifierValue(`detail:${this._detailsLevel}`).toString()}`; + } + if (this._despeckleLevel) { + str += `:${new QualifierValue(`despeckle:${this._despeckleLevel}`).toString()}`; + } + if (this._paths) { + str += `:${new QualifierValue(`paths:${this._paths}`).toString()}`; + } + if (this._cornersLevel) { + str += `:${new QualifierValue(`corners:${this._cornersLevel}`).toString()}`; + } + this.addQualifier(new Qualifier('e', str)); + } + static fromJson(actionModel) { + const { actionType, paths, cornersLevel, despeckleLevel, detailLevel, numOfColors } = actionModel; + // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel]) + // This allows the inheriting classes to determine the class to be created + const result = new this(); + paths && result.paths(paths); + cornersLevel && result.cornersLevel(cornersLevel); + despeckleLevel && result.despeckleLevel(despeckleLevel); + detailLevel && result.detailsLevel(detailLevel); + numOfColors && result.numOfColors(numOfColors); + return result; + } +} + +/** + * @description A class that provides a built in level() method that sets the level of the effect + * @extends {Actions.Effect.LeveledEffectAction} + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ +class EffectActionWithLevel extends LeveledEffectAction { + level(value) { + this._actionModel.level = value; + return this.setLevel(value); + } +} + +/** + * @description Applies stripes to the image to help people with common color-blind conditions to differentiate between colors that are similar for them. + * You can replace colors using the xray() method. + * @extends SDK.Action + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ +class AssistColorBlindEffectAction extends Action { + constructor() { + super(); + this._actionModel = {}; + this._actionModel.actionType = 'assistColorblind'; + this.addQualifier(new Qualifier('e', new QualifierValue('assist_colorblind'))); + } + /** + * @description Replaces problematic colors with colors that are easier to differentiate. + * @return {this} + */ + xray() { + this._actionModel.type = 'xray'; + return this.addQualifier(new Qualifier('e', new QualifierValue(['assist_colorblind', 'xray']).setDelimiter(':'))); + } + /** + * @description Applies stripes of the specified intensity to help people with common color blind conditions to differentiate between colors that are similar for them. + * @param {number | string} strength The intensity of the stripes. (Range: 1 to 100, Server default: 10) + * @return {this} + */ + stripesStrength(strength) { + this._actionModel.type = 'stripes'; + this._actionModel.stripesStrength = strength; + return this.addQualifier(new Qualifier('e', new QualifierValue(['assist_colorblind', strength]).setDelimiter(':'))); + } + static fromJson(actionModel) { + const { actionType, type, stripesStrength } = actionModel; + // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel]) + // This allows the inheriting classes to determine the class to be created + const result = new this(); + if (type === 'xray') { + result.xray(); + } + if (type === 'stripes') { + stripesStrength && result.stripesStrength(stripesStrength); + } + return result; + } +} + +/** + * @description Applies a colorizing filter to the asset, use the methods in the class to adjust the filter + * @extends EffectActionWithLevel + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ +class ColorizeEffectAction extends EffectActionWithLevel { + /** + * @description The color to use for colorization. Specify HTML name or RGB hex code. (Server default: gray) + * @param {string} color HTML name(red, green, etc.) or RGB hex code. (Server default: gray) + * @return {this} + */ + color(color) { + this._actionModel.color = color; + return this.addQualifier(new Qualifier('co', new QualifierValue(prepareColor(color)))); + } + static fromJson(actionModel) { + const { actionType, level, color } = actionModel; + // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel]) + // This allows the inheriting classes to determine the class to be created + const result = new this(actionType, level); + color && result.color(color); + return result; + } +} + +/** + * @description The Action class of the pixelate Builder + * @extends SDK.Action + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ +class Pixelate extends Action { + constructor(squareSize) { + super(); + this._actionModel = {}; + this._squareSize = squareSize; + this._actionModel.actionType = 'pixelate'; + this._actionModel.squareSize = squareSize; + } + /** + * @description Specifies the region to piexlate. + * @param {NamedRegion} pixelateRegion + */ + region(pixelateRegion) { + this._region = pixelateRegion; + this._actionModel.region = { RegionType: this._region.regionType }; + return this; + } + /** + * @description Sets the squareSize of the pixelate effect. + * @param {number | string} squareSize + */ + squareSize(squareSize) { + this._squareSize = squareSize; + this._actionModel.squareSize = squareSize; + return this; + } + prepareQualifiers() { + /* + * pixelate with region is a unique object in this codebase. + * On top of pixelate being an Action with Qualifiers, + * it also accepts a Qualifier called Region. + * + * This Qualifier is in itself composite of qualifiers (such as height, or width). + * The existence of Region changes the output of pixelate in non traditional ways + * which forced this relatively ad-hoc implementation. + * + * Aside from all of that, all of the Qualifiers in the component should be alphabetized + * This happens naturally in the Action class, + * however since we're dealing with two levels of qualifiers (pixelate and Region), + * these need to be merged. + * + * This function will merge the Region qualifiers with pixelate + * and add all needed implicit qualifiers (like g_ocr_text). + * We're not using the full Gravity Qualifier here to prevent the code import for such a simplistic case + */ + const str = this._squareSize ? `:${this._squareSize}` : ''; + if ('_region' in this) { + const qualifiers = this._region.qualifiers; + // Copy qualifiers from the region "action" to the pixelate action + qualifiers.forEach((q) => this.addQualifier(q)); + if (this._region.regionType === 'named') { + this.addQualifier(new Qualifier('e', `pixelate_region${str}`)); + } + if (this._region.regionType === 'ocr_text') { + this.addQualifier(new Qualifier('e', `pixelate_region${str}`)); + this.addQualifier(new Qualifier('g', `ocr_text`)); + } + if (this._region.regionType === 'faces') { + this.addQualifier(new Qualifier('e', `pixelate_faces${str}`)); + } + } + else { + this.addQualifier(new Qualifier('e', `pixelate${str}`)); + } + } + static fromJson(actionModel) { + const { actionType, region, squareSize } = actionModel; + // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel]) + // This allows the inheriting classes to determine the class to be created + const result = new this(squareSize); + squareSize && result.squareSize(squareSize); + if (region && region.RegionType === 'faces') { + result.region(faces()); + } + if (region && region.RegionType === 'custom') { + result.region(custom()); + } + return result; + } +} + +/** + * @summary action + * @description Applies a blurring filter to the asset. + * @memberOf Actions.Effect + * @param {number} blurLevel The strength of the blur. (Range: 1 to 2000, Server default: 100) + * @return {Actions.Effect.BlurAction} + */ +function blur(blurLevel) { + return new BlurAction(blurLevel); +} +/** + * @summary action + * @description Converts the image to gray-scale (multiple shades of gray). + * @memberOf Actions.Effect + * @return {Actions.Effect.SimpleEffectAction} + */ +function grayscale() { + return new SimpleEffectAction('grayscale'); +} +/** + * @summary action + * @description Applies a colorizing filter to the asset. + * @memberOf Actions.Effect + * @param {number} colorizeLevel The strength of the color. (Range: 0 to 100, Server default: 100) + * @return {Actions.Effect.ColorizeEffectAction} + */ +function colorize(colorizeLevel) { + return new ColorizeEffectAction('colorize', colorizeLevel); +} +/** + * @summary action + * @description + * Vectorizes the image. + * Notes: + * To deliver the image as a vector image, make sure to change the format (or URL extension) to a vector format, such as SVG.
+ * However, you can also deliver in a raster format if you just want to get the 'vectorized' graphic effect.
+ * Large images are scaled down to 1000 pixels in the largest dimension before vectorization. + * + * @memberOf Actions.Effect + * @return {Actions.Effect.VectorizeEffectAction} + */ +function vectorize() { + return new VectorizeEffectAction(); +} +/** + * @summary action + * @description + * Applies stripes to the image to help people with common color-blind conditions to differentiate between colors that are similar for them.
+ * You can replace colors using the xRay() method of the \Cloudinary\Transformation\AssistColorBlind class. + * @memberOf Actions.Effect + * @return {Actions.Effect.AssistColorBlindEffectAction} + */ +function assistColorBlind() { + return new AssistColorBlindEffectAction(); +} +/** + * @summary action + * @description Applies a pixelatering filter to the asset. + * @memberOf Actions.Effect + * @param {number} squareSize The squareSize in the pixelation. (Range: 1 to 2000, Server default: 100) + * @return {Actions.Effect.Pixelate} + */ +function pixelate(squareSize) { + return new Pixelate(squareSize); +} + +/** + * @extends SDK.Action + * @description A class for background transformations. + */ +class BackgroundColor extends Action { + constructor(color) { + super(); + this.addQualifier(new Qualifier('b', new QualifierValue(color).setDelimiter('_'))); + } +} + +/** + * @summary SDK + * @memberOf SDK + * @description Defines an action that's a string literal, no validations or manipulations are performed + */ +class RawAction { + constructor(raw) { + this.raw = raw; + } + toString() { + return this.raw; + } + toJson() { + return { error: createUnsupportedError(`unsupported action ${this.constructor.name}`) }; + } +} + +/** + * Validates obj is an instance of IErrorObject + * @param obj + */ +function isErrorObject(obj) { + const errorObj = obj; + return ('error' in errorObj) && !!errorObj.error; +} + +/** + * @description Defines flags that you can use to alter the default transformation behavior. + * @namespace Flag + * @memberOf Qualifiers + */ +/** + * @summary qualifier + * @memberOf Qualifiers.Flag + * @description * Allows specifying only either width or height so the value of the second axis remains as is, and is not + * recalculated to maintain the aspect ratio of the original image. + * @return {Qualifiers.Flag.FlagQualifier} + */ +function ignoreInitialAspectRatio() { + return new FlagQualifier('ignore_aspect_ratio'); +} +/** + * @summary qualifier + * @memberOf Qualifiers.Flag + * @description Automatically use lossy compression when delivering animated GIF files. + * + * This flag can also be used as a conditional flag for delivering PNG files: it tells Cloudinary to deliver the + * image in PNG format (as requested) unless there is no transparency channel - in which case deliver in JPEG + * format. + * @return {Qualifiers.Flag.FlagQualifier} + */ +function lossy() { + return new FlagQualifier('lossy'); +} +/** + * @summary qualifier + * @memberOf Qualifiers.Flag + * @description When used with automatic fetch_format (f_auto): ensures that images with a transparency channel will be + * delivered in PNG format. + * @return {Qualifiers.Flag.FlagQualifier} + */ +function preserveTransparency() { + return new FlagQualifier('preserve_transparency'); +} +/** + * @summary qualifier + * @memberOf Qualifiers.Flag + * @description Generates a JPG image using the progressive (interlaced) JPG format. + * + * This format allows the browser to quickly show a low-quality rendering of the image until the full-quality + * image is loaded. + * + * @param {string} mode? The mode to determine a specific progressive outcome as follows: + * * semi - A smart optimization of the decoding time, compression level and progressive rendering + * (less iterations). This is the default mode when using q_auto. + * * steep - Delivers a preview very quickly, and in a single later phase improves the image to + * the required resolution. + * * none - Use this to deliver a non-progressive image. This is the default mode when setting + * a specific value for quality. + * @return {Qualifiers.Flag.FlagQualifier} + */ +function progressive(mode) { + return new FlagQualifier('progressive', mode); +} +/** + * @summary qualifier + * @memberOf Qualifiers.Flag + * @description Modifies percentage-based width & height parameters of overlays and underlays (e.g., 1.0) to be relative to the overlaid region + * @return {Qualifiers.Flag.FlagQualifier} + */ +function regionRelative() { + return new FlagQualifier('region_relative'); +} +/** + * @summary qualifier + * @memberOf Qualifiers.Flag + * @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. + * @return {Qualifiers.Flag.FlagQualifier} + */ +function relative() { + return new FlagQualifier('relative'); +} + +/** + * @memberOf Qualifiers.Format + * @extends {SDK.QualifierValue} + */ +class FormatQualifier extends QualifierValue { + constructor(val) { + super(val); + this.val = val; + } + getValue() { + return this.val; + } +} + +/** + * @description Qualifies the delivery of an asset. + * @memberOf Actions.Delivery + * @extends SDK.Action + */ +class DeliveryAction extends Action { + /** + * @param {string} deliveryKey A generic Delivery Action Key (such as q, f, dn, etc.) + * @param {string} deliveryType A Format Qualifiers for the action, such as Quality.auto() + * @param {string} modelProperty internal model property of the action, for example quality uses `level` while dpr uses `density` + * @see Visit {@link Actions.Delivery|Delivery} for an example + */ + constructor(deliveryKey, deliveryType, modelProperty) { + super(); + this._actionModel = {}; + let deliveryTypeValue; + if (deliveryType instanceof FormatQualifier) { + deliveryTypeValue = deliveryType.getValue(); + } + else { + deliveryTypeValue = deliveryType; + } + this._actionModel.actionType = DELIVERY_MODE_TO_ACTION_TYPE_MAP[deliveryKey]; + this._actionModel[modelProperty] = deliveryTypeValue; + this.addQualifier(new Qualifier(deliveryKey, deliveryType)); + } +} + +/** + * @description Contains functions to select the mode when using a progressive format. + * Learn more: {@link https://cloudinary.com/documentation/transformation_reference#fl_progressive|Progressive modes} + * @memberOf Qualifiers + * @namespace Progressive + * @example + * import {Cloudinary} from "@cloudinary/url-gen"; + * import {format} from "@cloudinary/url-gen/actions/delivery"; + * import {jpg} from "@cloudinary/url-gen/qualifiers/format"; + * import {steep} from "@cloudinary/url-gen/qualifiers/progressive"; + * + * const yourCldInstance = new Cloudinary({cloud: {cloudName: 'demo'}}); + * const image = yourCldInstance.image('woman'); + * image.delivery(format(jpg()).progressive(steep())) + */ +class ProgressiveQualifier extends FlagQualifier { + constructor(mode) { + super('progressive', mode); + } +} + +/** + * @memberOf Actions.Delivery + * @extends {Actions.Delivery.DeliveryAction} + * @see Visit {@link Actions.Delivery|Delivery} for an example + */ +class DeliveryFormatAction extends DeliveryAction { + constructor(deliveryKey, deliveryType) { + super(deliveryKey, deliveryType, 'formatType'); + } + /** + * @description Uses lossy compression when delivering animated GIF files. + * @return {this} + */ + lossy() { + this._actionModel.lossy = true; + this.addFlag(lossy()); + return this; + } + /** + * @description Uses progressive compression when delivering JPG file format. + * @return {this} + */ + progressive(mode) { + if (mode instanceof ProgressiveQualifier) { + this._actionModel.progressive = { mode: mode.getFlagValue() }; + this.addFlag(mode); + } + else { + this._actionModel.progressive = { mode: mode }; + this.addFlag(progressive(mode)); + } + return this; + } + /** + * @description Ensures that images with a transparency channel are delivered in PNG format. + */ + preserveTransparency() { + this._actionModel.preserveTransparency = true; + this.addFlag(preserveTransparency()); + return this; + } + static fromJson(actionModel) { + const { formatType, lossy, progressive, preserveTransparency } = actionModel; + let result; + if (formatType) { + result = new this('f', formatType); + } + else { + result = new this('f'); + } + if (progressive) { + if (progressive.mode) { + result.progressive(progressive.mode); + } + else { + result.progressive(); + } + } + lossy && result.lossy(); + preserveTransparency && result.preserveTransparency(); + return result; + } +} + +/** + * @summary SDK + * @description - Defines how to transform an asset + * @memberOf SDK + */ +class Transformation { + constructor() { + this.actions = []; + } + /** + * @param {SDK.Action | string} action + * @return {this} + */ + addAction(action) { + let actionToAdd; + if (typeof action === 'string') { + if (action.indexOf('/') >= 0) { + throw 'addAction cannot accept a string with a forward slash in it - /, use .addTransformation() instead'; + } + else { + actionToAdd = new RawAction(action); + } + } + else { + actionToAdd = action; + } + this.actions.push(actionToAdd); + return this; + } + /** + * @description Allows the injection of a raw transformation as a string into the transformation, or a Transformation instance that was previously created + * @param {string | SDK.Transformation} tx + * @example + * import {Transformation} from "@cloudinary/url-gen"; + * + * const transformation = new Transformation(); + * transformation.addTransformation('w_100/w_200/w_300'); + * @return {this} + */ + addTransformation(tx) { + if (tx instanceof Transformation) { + // Concat the new actions into the existing actions + this.actions = this.actions.concat(tx.actions); + } + else { + this.actions.push(new RawAction(tx)); + } + return this; + } + /** + * @return {string} + */ + toString() { + return this.actions + .map((action) => { + return action.toString(); + }) + .filter((a) => a) + .join('/'); + } + /** + * @description Delivers an animated GIF. + * @param {AnimatedAction} animatedAction + * @return {this} + */ + animated(animatedAction) { + return this.addAction(animatedAction); + } + /** + * @description Adds a border around the image. + * @param {Border} borderAction + * @return {this} + */ + border(borderAction) { + return this.addAction(borderAction); + } + /** + * @description Adjusts the shape of the delivered image.
+ * Learn more: {@link https://cloudinary.com/documentation/effects_and_artistic_enhancements#distort|Shape changes and distortion effects} + * @param {IReshape} reshapeAction + * @return {this} + */ + reshape(reshapeAction) { + return this.addAction(reshapeAction); + } + /** + * @description Resize the asset using provided resize action + * @param {ResizeSimpleAction} resizeAction + * @return {this} + */ + resize(resizeAction) { + return this.addAction(resizeAction); + } + /** + * @desc An alias to Action Delivery.quality + * @param {string|number} quality + * @return {this} + */ + quality(quality) { + this.addAction(new DeliveryFormatAction('q', quality)); + return this; + } + /** + * @desc An alias to Action Delivery.format + * @param {string} format + * @return {this} + */ + format(format) { + this.addAction(new DeliveryFormatAction('f', format)); + return this; + } + /** + * @description Rounds the specified corners of an image. + * @param roundCornersAction + * @return {this} + */ + roundCorners(roundCornersAction) { + return this.addAction(roundCornersAction); + } + /** + * @description Adds an overlay over the base image. + * @param {LayerAction} overlayAction + * @return {this} + */ + overlay(overlayAction) { + return this.addAction(overlayAction); + } + /** + * @description Adds an underlay under the base image. + * @param {LayerAction} underlayAction + * @return {this} + */ + underlay(underlayAction) { + underlayAction.setLayerType('u'); + return this.addAction(underlayAction); + } + /** + * @description Defines an new user variable. + * @param {VariableAction} variableAction + * @return {this} + */ + addVariable(variableAction) { + return this.addAction(variableAction); + } + /** + * @description Specifies a condition to be met before applying a transformation. + * @param {ConditionalAction} conditionAction + * @return {this} + */ + conditional(conditionAction) { + return this.addAction(conditionAction); + } + /** + * @description Applies a filter or an effect on an asset. + * @param {SimpleEffectAction} effectAction + * @return {this} + */ + effect(effectAction) { + return this.addAction(effectAction); + } + /** + * @description Applies adjustment effect on an asset. + * @param action + * @return {this} + */ + adjust(action) { + return this.addAction(action); + } + /** + * @description Rotates the asset by the given angle. + * @param {RotateAction} rotateAction + * @return {this} + */ + rotate(rotateAction) { + return this.addAction(rotateAction); + } + /** + * @description Applies a pre-defined named transformation of the given name. + * @param {NamedTransformation} namedTransformation + * @return {this} + */ + namedTransformation(namedTransformation) { + return this.addAction(namedTransformation); + } + /** + * @description Applies delivery action. + * @param deliveryAction + * @return {this} + */ + delivery(deliveryAction) { + return this.addAction(deliveryAction); + } + /** + * @description Sets the color of the background. + * @param {Qualifiers.Color} color + * @return {this} + */ + backgroundColor(color) { + return this.addAction(new BackgroundColor(prepareColor(color))); + } + /** + * @description Adds a layer in a Photoshop document. + * @param action + * @return {this} + */ + psdTools(action) { + return this.addAction(action); + } + /** + * @description Extracts an image or a page using an index, a range, or a name from a layered media asset. + * @param action + * @return {this} + */ + extract(action) { + return this.addAction(action); + } + /** + * @description Adds a flag as a separate action. + * @param {Qualifiers.Flag | string} flagQualifier + * @return {this} + */ + addFlag(flagQualifier) { + const action = new Action(); + let flagToAdd = flagQualifier; + if (typeof flagQualifier === 'string') { + flagToAdd = new FlagQualifier(flagQualifier); + } + action.addQualifier(flagToAdd); + return this.addAction(action); + } + /** + * @description Inject a custom function into the image transformation pipeline. + * @return {this} + */ + customFunction(customFunction) { + return this.addAction(customFunction); + } + /** + * Transcodes the video (or audio) to another format. + * @param {Action} action + * @return {this} + */ + transcode(action) { + return this.addAction(action); + } + /** + * Applies the specified video edit action. + * + * @param {videoEditType} action + * @return {this} + */ + videoEdit(action) { + return this.addAction(action); + } + toJson() { + const actions = []; + for (const action of this.actions) { + const json = action.toJson(); + if (isErrorObject(json)) { + // Fail early and return an IErrorObject + return json; + } + actions.push(json); + } + return { actions }; + } +} + +/** + * @description + * Returns a string representing the float value of the input, if the input was a number-like. + * Examples: + * - '1.0' -> '1.0' + * - 1 -> '1.0' + * - '5' -> '5.0' + * - 'auto' -> 'auto' + * @private + * @param {string|number} value + * @return {string} + */ +function toFloatAsString(value) { + // Turn the input to string + // The Function will return `returnValue` value if the input is not a number-like expression + const returnValue = value.toString(); + // if the string contains letters, return the input + if (returnValue.match(/[A-Z]/gi)) { + return returnValue; + } + // If the leading digit is 0, and we have more than 1 digit, it's not a number. + // 00, 00000, 0x15 etc. + if (returnValue.length > 1 && returnValue[0] === '0') { + return returnValue; + } + // Final sanity check, parse the number as a float and check if its NaN + const isNumberLike = !isNaN(parseFloat(returnValue)) && returnValue.indexOf(':') === -1; + // If it's a number-like, but the input does not contain a decimal - add it. + if (isNumberLike && returnValue.indexOf('.') === -1) { + return `${returnValue}.0`; + } + else { + // If the input already contains a decimal, just return the value + return returnValue; + } +} + +/** + * @memberOf Qualifiers.AspectRatio + * @extends {SDK.QualifierValue} + */ +class AspectRatioQualifierValue extends QualifierValue { +} + +/** + * @description Defines a resize using width and height. + * @extends SDK.Action + * @memberOf Actions.Resize + * @see Visit {@link Actions.Resize| Resize} for examples + */ +class ResizeSimpleAction extends Action { + /** + * @param {string} cropType + * @param {number | string} cropWidth The required width of a transformed asset. + * @param {number | string} cropHeight The required height of a transformed asset. + */ + constructor(cropType, cropWidth, cropHeight) { + super(); + this._actionModel = { dimensions: {} }; + this._actionModel.actionType = CROP_MODE_TO_ACTION_TYPE_MAP[cropType] || cropType; + this.addQualifier(new Qualifier('c', cropType)); + cropWidth && this.width(cropWidth); + cropHeight && this.height(cropHeight); + } + /** + * @description Sets the height of the resize + * @param {string | number} x The height in pixels (if an integer is specified) or as a percentage (if a float is specified). + */ + height(x) { + this._actionModel.dimensions.height = x; + return this.addQualifier(new Qualifier('h', x)); + } + /** + * @description Sets the width of the resize + * @param {string | number} x The width in pixels (if an integer is specified) or as a percentage (if a float is specified). + */ + width(x) { + this._actionModel.dimensions.width = x; + return this.addQualifier(new Qualifier('w', x)); + } + /** + * @description Sets the aspect ratio of the asset. + * For a list of supported types see {@link Qualifiers.AspectRatio| + * AspectRatio values} + * @param {AspectRatioType|number|string} ratio The new aspect ratio, specified as a percentage or ratio. + * @return {this} + */ + aspectRatio(ratio) { + // toFloatAsString is used to ensure 1 turns into 1.0 + if (ratio instanceof AspectRatioQualifierValue) { + this._actionModel.dimensions.aspectRatio = `${ratio}`; + return this.addQualifier(new Qualifier('ar', ratio)); + } + if (typeof ratio === 'number' || typeof ratio === 'string') { + this._actionModel.dimensions.aspectRatio = toFloatAsString(ratio); + return this.addQualifier(new Qualifier('ar', toFloatAsString(ratio))); + } + if (ratio instanceof FlagQualifier) { + this._actionModel.dimensions.aspectRatio = `${ratio.qualifierValue}`; + return this.addFlag(ratio); + } + } + /** + * @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. + * @return {this} + */ + relative() { + this._actionModel.relative = true; + return this.addFlag(relative()); + } + /** + * @description Modifies percentage-based width & height parameters of overlays and underlays (e.g., 1.0) to be relative to the overlaid region + * @return {this} + */ + regionRelative() { + this._actionModel.regionRelative = true; + return this.addFlag(regionRelative()); + } + static fromJson(actionModel) { + const { actionType, dimensions, relative, regionRelative } = actionModel; + const { aspectRatio, width, height } = dimensions; + const cropMode = ACTION_TYPE_TO_CROP_MODE_MAP[actionType] || actionType; + // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel]) + // This allows the inheriting classes to determine the class to be created + const result = new this(cropMode, width, height); + aspectRatio && result.aspectRatio(aspectRatio === 'ignore_aspect_ratio' ? ignoreInitialAspectRatio() : aspectRatio); + relative && result.relative(); + regionRelative && result.regionRelative(); + return result; + } +} + +/** + * @memberOf Gravity.GravityQualifier + * @extends {SDK.Qualifier} + */ +class GravityQualifier extends Qualifier { + /** + * @param value, an array containing (GravityObject | AutoGravity | string) or a string; + */ + constructor(value) { + super('g', new QualifierValue(value)); + } +} + +/** + * @description The class for the autoGravity builder + * @memberOf Qualifiers.Gravity + * @extends {Qualifiers.Gravity.GravityQualifier} + */ +class AutoGravity extends GravityQualifier { + constructor() { + // Required due to https://github.com/microsoft/TypeScript/issues/13029 + /* istanbul ignore next */ + super('auto'); + } + /** + * @description Autofocuses on objects, allowing their priority within the algorithm to be configured. + * @param {AutoFocus} AutoFocusObjects + */ + autoFocus(...AutoFocusObjects) { + this.addValue(AutoFocusObjects); + return this; + } +} + +/** + * @description The class for the FocusOn builder + * @memberOf Qualifiers.Gravity + * @extends {Qualifiers.Gravity.GravityQualifier} + */ +class FocusOnGravity extends GravityQualifier { + constructor(FocusOnObjects) { + // Required due to https://github.com/microsoft/TypeScript/issues/13029 + /* istanbul ignore next */ + super(FocusOnObjects); + } + /** + * @description Specifies the gravity to use if none of the other gravity objects are found. + * @param {Qualifiers.Gravity.AutoGravity} val + */ + fallbackGravity(val) { + /* + * FocusOnGravity(this) is already a qualifier, with a key and a value g_{obj1} + * fallBackGravity also attempts to add a value, to reach the result of g_{obj1}:auto:{obj2} + * Since AutoGravity is a Qualifier, it also comes with its own g_ key, which needs to be removed. + * To solve it, we take only the value from the qualifier, instead of the whole thing + */ + this.addValue(val.qualifierValue); + return this; + } +} + +/** + * @description The class for the CompassGravity builder + * @memberOf Qualifiers.Gravity + * @extends {Qualifiers.Gravity.GravityQualifier} + */ +class CompassGravity extends GravityQualifier { + constructor(dir) { + // Required due to https://github.com/microsoft/TypeScript/issues/13029 + /* istanbul ignore next */ + super(dir); + } +} + +/** + * @description Defines the gravity based on directional values from a compass. + * Learn more: {@link https://cloudinary.com/documentation/resizing_and_cropping#control_gravity|Control gravity for images} + * Learn more: {@link https://cloudinary.com/documentation/video_resizing_and_cropping#control_gravity|Control gravity for videos} + * @param {Qualifiers.Compass | string} direction A compass Values + * @memberOf Qualifiers.Gravity + * @example + * import {Cloudinary} from "@cloudinary/url-gen"; + * import {compass} from "@cloudinary/url-gen/qualifiers/gravity"; + * import {north} from "@cloudinary/url-gen/qualifiers/compass"; + * import {crop} from "@cloudinary/url-gen/actions/resize"; + * + * const yourCldInstance = new Cloudinary({cloud: {cloudName: 'demo'}}); + * const image = yourCldInstance.image('woman'); + * image.resize(crop().width(300).gravity(compass(north()))) + * @return {CompassGravity} + */ +function compass(direction) { + return new CompassGravity(direction); +} +/** + * @summary qualifier + * @description Specifies what to focus on, for example: faces, objects, eyes, etc. + * @param {...Qualifier.FocusOn} args One or more objects to focus on + * @memberOf Qualifiers.Gravity + * @example + * import {Cloudinary} from "@cloudinary/url-gen"; + * import {focusOn} from "@cloudinary/url-gen/qualifiers/gravity"; + * import {crop} from "@cloudinary/url-gen/actions/resize"; + * import {cat} from "@cloudinary/url-gen/qualifiers/focusOn"; + * + * const yourCldInstance = new Cloudinary({cloud: {cloudName: 'demo'}}); + * const image = yourCldInstance.image('woman'); + * image.resize(crop().width(300).gravity(focusOn(cat()))) + * @return {FocusOnGravity} + */ +function focusOn(...args) { + const res = [...args]; + return new FocusOnGravity(res); +} +/** + * @summary qualifier + * @description Automatically identifies the most interesting regions in the asset, can be qualified further by including what to focus on. + * @memberOf Qualifiers.Gravity + * @return {Qualifiers.Gravity.AutoGravity} + * @example + * import {Cloudinary} from "@cloudinary/url-gen"; + * import {autoGravity} from "@cloudinary/url-gen/qualifiers/gravity"; + * import {crop} from "@cloudinary/url-gen/actions/resize"; + * + * const yourCldInstance = new Cloudinary({cloud: {cloudName: 'demo'}}); + * const image = yourCldInstance.image('woman'); + * image.resize(crop().width(300).gravity(autoGravity())) + * @example + * import {Cloudinary} from "@cloudinary/url-gen"; + * import {autoGravity} from "@cloudinary/url-gen/qualifiers/gravity"; + * import {crop} from "@cloudinary/url-gen/actions/resize"; + * import {cat} from "@cloudinary/url-gen/qualifiers/focusOn"; + * import {AutoFocus} from "@cloudinary/url-gen/qualifiers/autoFocus"; + * + * const yourCldInstance = new Cloudinary({cloud: {cloudName: 'demo'}}); + * const image = yourCldInstance.image('woman'); + * image.resize(crop().width(300).gravity(autoGravity().autoFocus(AutoFocus.focusOn(cat())))) + */ +function autoGravity() { + return new AutoGravity(); +} + +/** + * @memberOf Qualifiers.FocusOn + * @extends {SDK.QualifierValue} + */ +class FocusOnValue extends QualifierValue { + constructor(name) { + super(); + this.name = name; + } + toString() { + return this.name; + } +} + +/** + * @summary qualifier + * @memberOf Qualifiers.FocusOn + * @description Detect all text elements in an image using the {@link https://cloudinary.com/documentation/ocr_text_detection_and_extraction_addon|OCR Text Detection and Extraction add-on} and use the detected bounding box coordinates as the basis of the transformation. + * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue + */ +function ocr() { + return new FocusOnValue('ocr_text'); +} + +/** + * true if gravity starts with 'auto' or 'auto:' + * @param gravity + */ +function isIAutoGravityString(gravity) { + return gravity && `${gravity}`.split(':')[0] === 'auto'; +} +/** + * Validate that given val is an ICompassGravity + * @param gravity + */ +function isCompassGravity(gravity) { + //const gravityString = `${(typeof gravity === "string" ? gravity : gravity.qualifierValue)}`; + const gravityValue = getGravityValue(gravity); + return ['north', 'center', 'east', 'west', 'south', 'north_west', 'south_east', 'south_west', 'north_east'].includes(gravityValue); +} +/** + * Get the value of given gravity + * @param gravity + */ +function getGravityValue(gravity) { + return `${gravity}`.replace('g_', ''); +} +/** + * Creates a compassGravity model + * @param gravity + */ +function createCompassGravityModel(gravity) { + return { + compass: getGravityValue(gravity), + gravityType: 'direction' + }; +} +/** + * Validate that given gravity is an instance of ocr gravity + * @param gravity + */ +function isOcrGravity(gravity) { + return getGravityValue(gravity) === 'ocr_text'; +} +/** + * Creates an ocr gravity model + */ +function createOcrGravityModel() { + return { + gravityType: 'ocr' + }; +} +/** + * Validate that given gravity is an instance of AutoGravity + * @param gravity + */ +function isAutoGravity(gravity) { + return `${gravity.qualifierValue}`.split(':')[0] === 'auto'; +} +/** + * Create an instance of IAutoGravityObjectModel + * @param gravity + */ +function createIAutoFocusObject(gravity) { + const gravityString = gravity.toString(); + const values = gravityString.split('_'); + const result = { + object: values[0] + }; + if (values.length > 1) { + if (values[1] === 'avoid') { + result.avoid = true; + } + else { + result.weight = +values[1]; + } + } + return result; +} +/** + * Creates an auto gravity model from given AutoGravity + * @param gravity + */ +function createAutoGravityModel(gravity) { + let values; + const gravityQualifier = gravity === 'auto' ? new AutoGravity() : gravity; + if (`${gravity}`.startsWith('auto:')) { + values = `${gravity}`.split(':').filter((v) => v !== 'auto'); + } + else { + values = gravityQualifier.qualifierValue.values.filter((v) => v !== 'auto'); + } + const autoFocus = values.map(createIAutoFocusObject); + return { + gravityType: 'auto', + autoFocus + }; +} +/** + * Create IFocusOnGravityModel from FocusOnGravity + * @param gravity + */ +function createFocusOnGravityModel(gravity) { + const hasAutoGravity = `${gravity}`.split(':').includes('auto'); + const values = gravity.qualifierValue.values; + const focusOnValues = hasAutoGravity ? values.slice(0, values.length - 1) : values; + const result = { + gravityType: 'object', + focusOnObjects: focusOnValues.map((v) => `${v}`) + }; + if (hasAutoGravity) { + // Remove the first 'auto' value by slicing it, because it's added by autoGravity() + const autoFocusObjects = values[values.length - 1].values.slice(1); + const autoGravityInstance = autoGravity().autoFocus(...autoFocusObjects); + result.fallbackGravity = createAutoGravityModel(autoGravityInstance); + } + return result; +} +/** + * Creates a FocusOnGravity from given string + * @param gravity + */ +function createFocusOnGravity(gravity) { + const values = gravity.split(':'); + const focusOnValues = values.map((g) => new FocusOnValue(g)); + return new FocusOnGravity(focusOnValues); +} +/** + * Create a model of given gravity + * @param gravity + */ +function createGravityModel(gravity) { + if (isCompassGravity(gravity)) { + return createCompassGravityModel(gravity); + } + if (isOcrGravity(gravity)) { + return createOcrGravityModel(); + } + if (isIAutoGravityString(gravity) || isAutoGravity(gravity)) { + return createAutoGravityModel(gravity); + } + return createFocusOnGravityModel(typeof gravity === 'string' ? createFocusOnGravity(gravity) : gravity); +} + +/** + * @summary qualifier + * @namespace AutoFocus + * @memberOf Qualifiers + * @see Visit {@link Qualifiers.Gravity|Gravity} for an example + */ +/** + * @memberOf Qualifiers.AutoFocus + * @extends {SDK.QualifierValue} + * @see Visit {@link Qualifiers.Gravity|Gravity} for an example + */ +class AutoFocus extends QualifierValue { + constructor(focusOn, weight) { + super(); + this._weight = weight; + this.focusOn = focusOn; + this.shouldAvoid = false; + } + /** + * @summary qualifier + * @description Specifies the object to focus on automatically + * Accepts an AutoFocusObject (which is just a wrapper for a FocusOn object, but with extra method: avoid, weight) + * @param {Qualifiers.FocusOn} obj The object to focus on. + * @param {number} weight + */ + static focusOn(obj, weight) { + return new AutoFocus(obj, weight); + } + shouldAddWeight() { + return typeof this._weight === 'number' || typeof this._weight === 'string' || this.shouldAvoid; + } + /** + * @summary qualifier + * @desc Get the name of the of the object + */ + getName() { + return this.focusOn.name; + } + /** + * @summary qualifier + * @desc Get the weight for the object + */ + getWeight() { + if (this.shouldAvoid) { + return 'avoid'; + } + else { + return this._weight; + } + } + /** + * @summary qualifier + * @desc Return the string representation of this QualifierValue + */ + toString() { + // Future proofing, in case we'd like to support some custom string in the future, or if data is coming from a DB + if (this.shouldAddWeight()) { + return `${this.getName()}_${this.getWeight()}`; + } + else { + return `${this.getName()}`; + } + } + /** + * @summary qualifier + * @description Sets the importance level of the object within the automatic gravity algorithm + * @param {numebr} w The focus weight for the object + * @return {this} + */ + weight(w) { + this._weight = w; + return this; + } + /** + * @summary qualifier + * @description Attempts to avoid the detected object in the image + * @return {this} + */ + avoid() { + this.shouldAvoid = true; + return this; + } +} + +/** + * @memberOf Qualifiers.Compass + * @extends {SDK.QualifierValue} + */ +class CompassQualifier extends QualifierValue { + constructor(val) { + super(); + this.val = val; + } + toString() { + return this.val; + } +} + +/** + * Validates that gravityModel is an ICompassGravityModel + * @param gravityModel + */ +function isCompassGravityModel(gravityModel) { + return gravityModel.gravityType === 'direction'; +} +/** + * Validates that gravityModel is an IOcrGravityModel + * @param gravityModel + */ +function isOcrGravityModel(gravityModel) { + return gravityModel.gravityType === 'ocr'; +} +/** + * Validates that gravityModel is an IAutoGravityModel + * @param gravityModel + */ +function isAutoGravityModel(gravityModel) { + return gravityModel.gravityType === 'auto'; +} +/** + * Create AutoFocus from IAutoGravityObjectModel + * @param autoGravityObjectModel + */ +function createAutoFocusFromModel(autoGravityObjectModel) { + const { object, weight, avoid } = autoGravityObjectModel; + const autoFocus = new AutoFocus(new FocusOnValue(object)); + (weight || weight === 0) && autoFocus.weight(weight); + avoid && autoFocus.avoid(); + return autoFocus; +} +/** + * Create AutoGravity from IAutoGravityModel + * @param gravityModel + */ +function createAutoGravityFromModel(gravityModel) { + const autoFocusModel = gravityModel.autoFocus || []; + const autoFocus = autoFocusModel.map(createAutoFocusFromModel); + return autoGravity().autoFocus(...autoFocus); +} +/** + * Create FocusOnGravity from given IFocusOnGravityModel + * @param gravityModel + */ +function createFocusOnGravityFromModel(gravityModel) { + const focusOnObjects = (gravityModel.focusOnObjects || []).map((str) => new FocusOnValue(str)); + const result = focusOn(...focusOnObjects); + if (gravityModel.fallbackGravity) { + const autoGravity = createAutoGravityFromModel(gravityModel.fallbackGravity); + result.fallbackGravity(autoGravity); + } + return result; +} +/** + * Create gravity instance from given gravity model + * @param gravityModel + */ +function createGravityFromModel(gravityModel) { + if (isCompassGravityModel(gravityModel)) { + return new CompassGravity(new CompassQualifier(gravityModel.compass)); + } + if (isOcrGravityModel(gravityModel)) { + return focusOn(ocr()); + } + if (isAutoGravityModel(gravityModel)) { + return createAutoGravityFromModel(gravityModel); + } + return createFocusOnGravityFromModel(gravityModel); +} + +/** + * @description Defines an advanced resize. + * @extends Actions.Resize.ResizeSimpleAction + * @memberOf Actions.Resize + * @see Visit {@link Actions.Resize| Resize} for examples + */ +class ResizeAdvancedAction extends ResizeSimpleAction { + /** + * @description Which part of the original image to include. + * @param {Qualifiers.Gravity} gravity + */ + gravity(gravity) { + this._actionModel.gravity = createGravityModel(gravity); + const gravityQualifier = typeof gravity === "string" ? new Qualifier('g', gravity) : gravity; + return this.addQualifier(gravityQualifier); + } + static fromJson(actionModel) { + const result = super.fromJson.apply(this, [actionModel]); + if (actionModel.gravity) { + result.gravity(createGravityFromModel(actionModel.gravity)); + } + return result; + } +} + +/** + * @description Defines the visual appearance of the background. + * @memberOf Qualifiers.Background + * @extends {SDK.Qualifier} + */ +class BackgroundQualifier extends Qualifier { + constructor(backgroundValue) { + // The qualifier key for this qualifier + super('b'); + // Such as color (b_red) + if (backgroundValue) { + this.addValue(backgroundValue); + } + } +} + +/** + * @description A class for blurred background transformations. + * @memberOf Qualifiers.Background + * @extends {Qualifiers.Background.BackgroundQualifier} + */ +class BlurredBackgroundAction extends BackgroundQualifier { + /** + * @description Sets the intensity of the blur. + * @param {number} value - The intensity of the blur. + */ + intensity(value) { + this.intensityLevel = value; + return this; + } + /** + * @description Sets the brightness of the background. + * @param {number} value - The brightness of the background. + */ + brightness(value) { + this.brightnessLevel = value; + return this; + } + /** + * @description + * Stringify the qualifier + * BackgroundQualifiers don't have a value, but instead override the toString() function + */ + toString() { + // b_blurred:{intensity}:{brightness} + return ` + b_blurred + ${this.intensityLevel ? `:${this.intensityLevel}` : ''} + ${this.brightnessLevel ? `:${this.brightnessLevel}` : ''} + `.replace(/\s+/g, ''); + } +} +var BlurredBackgroundAction$1 = BlurredBackgroundAction; + +/** + * @description Defines the background color to use when resizing with padding. + * @memberOf Qualifiers.Background + * @extends {Qualifiers.Background.BackgroundQualifier} + */ +class BaseCommonBackground extends BackgroundQualifier { + constructor() { + super(); + this._palette = []; + } + /** + * @description Selects the strongest contrasting color to use for padding. + * @return {this} + */ + contrast() { + this._contrast = true; + return this; + } + /** + * @description Defines the custom colors to use when resizing using content-aware padding. + * @param {...string} colors One or more colors - Example: palette('green', 'red', blue') + * @return {this} + */ + palette(...colors) { + this._palette = colors.map((color) => { + return prepareColor(color); + }); + return this; + } +} + +/** + * @description Automatically determines the color to use for padding, if needed when resizing an asset. Selects the + * predominant color from the border of the image. + * @memberOf Qualifiers.Background + * @extends {Qualifiers.Background.BaseCommonBackground} + */ +class BackgroundAutoBorderQualifier extends BaseCommonBackground { + /** + * @description + * Stringify the qualifier + * BackgroundQualifiers don't have a value, but instead override the toString() function. + */ + toString() { + return ` + b_auto:border + ${this._contrast ? '_contrast' : ''} + ${this._palette.length ? `:palette_${this._palette.join('_')}` : ''} + `.replace(/\s+/g, ''); + } +} + +/** + * @description Defines the gradient fade effect to use for the background when resizing with padding. + * @memberOf Qualifiers.Background + * @extends {Qualifiers.Background.BaseCommonBackground} + */ +class BaseGradientBackground extends BaseCommonBackground { + /** + * + * @description Sets the number of predominant colors to use (2 or 4). + * @param {number} num + * @return {this} + */ + gradientColors(num) { + this._gradientColors = num; + return this; + } + /** + * @description Sets the direction for a background gradient fade effect. + * @param {Qualifiers.GradientDirection | GradientDirectionType | string} direction Use one of these functions + * provided by {@link Qualifiers.GradientDirection|GradientDirection} + * @return {this} + */ + gradientDirection(direction) { + this._gradientDirection = direction; + return this; + } +} + +/** + * @description Specifies that the gradient fade effect, used for the background when resizing with padding, uses the + * predominant colors in the border pixels of the image. + * @memberOf Qualifiers.Background + * @extends {Qualifiers.Background.BaseGradientBackground} + */ +class BackgroundBorderGradientQualifier extends BaseGradientBackground { + /** + * @description + * Stringify the qualifier + * BackgroundQualifiers don't have a value, but instead override the toString() function. + */ + toString() { + return ` + b_auto:border_gradient + ${this._contrast ? '_contrast' : ''} + ${this._gradientColors ? `:${this._gradientColors}` : ''} + ${this._gradientDirection ? `:${this._gradientDirection}` : ''} + ${this._palette.length ? `:palette_${this._palette.join('_')}` : ''} + `.replace(/\s+/g, ''); + } +} + +/** + * @description Specifies that the gradient fade effect, used for the background when resizing with padding, uses the + * predominant colors in the whole of the image. + * @memberOf Qualifiers.Background + * @extends {Qualifiers.Background.BaseGradientBackground} + */ +class BackgroundPredominantGradientQualifier extends BaseGradientBackground { + /** + * @description + * Stringify the qualifier + * BackgroundQualifiers don't have a value, but instead override the toString() function. + */ + toString() { + return ` + b_auto:predominant_gradient + ${this._contrast ? '_contrast' : ''} + ${this._gradientColors ? `:${this._gradientColors}` : ''} + ${this._gradientDirection ? `:${this._gradientDirection}` : ''} + ${this._palette.length ? `:palette_${this._palette.join('_')}` : ''} + `.replace(/\s+/g, ''); + } +} + +/** + * @description Automatically determines the color to use for padding, if needed when resizing an asset. Selects the + * predominant color from the whole image. + * @memberOf Qualifiers.Background + * @extends {Qualifiers.Background.BaseCommonBackground} + */ +class BackgroundAutoPredominantQualifier extends BaseCommonBackground { + /** + * @description + * Stringify the qualifier + * BackgroundQualifiers don't have a value, but instead override the toString() function. + */ + toString() { + return ` + b_auto:predominant + ${this._contrast ? '_contrast' : ''} + ${this._palette.length ? `:palette_${this._palette.join('_')}` : ''} + `.replace(/\s+/g, ''); + } +} + +/** + * Get the value of given background + * @param background + */ +function getBackgroundValue(background) { + return `${background}`.replace('b_', ''); +} +/** + * Create an IAutoBackgroundModel from given background + */ +function createAutoBackgroundModel() { + return { backgroundType: 'auto' }; +} +/** + * Create an IBlurredBackgroundModel from given background + * @param background + */ +function createBlurredBackgroundModel(background) { + const { intensityLevel, brightnessLevel } = background; + const result = { + backgroundType: 'blurred' + }; + if (intensityLevel || intensityLevel === 0) { + result.intensity = intensityLevel; + } + if (brightnessLevel || brightnessLevel === 0) { + result.brightness = brightnessLevel; + } + return result; +} +/** + * Create an IContrastPaletteBackgroundModel from given background + * @param background + */ +function createContrastPaletteBackgroundModel(background) { + const contrast = background._contrast; + const palette = background._palette; + const result = { + backgroundType: '' + }; + if (contrast) { + result.contrast = true; + } + if (palette) { + result.palette = palette; + } + return result; +} +/** + * Create an IBorderBackgroundModel from given background + * @param background + */ +function createBorderBackgroundModel(background) { + return Object.assign(Object.assign({}, createContrastPaletteBackgroundModel(background)), { backgroundType: 'border' }); +} +/** + * Create an IBaseGradientBackgroundModel from given background + * @param background + */ +function createBaseGradientBackgroundModel(background) { + const gradientColors = background._gradientColors; + const gradientDirection = `${background._gradientDirection}`; + const result = createContrastPaletteBackgroundModel(background); + if (gradientColors) { + result.gradientColors = gradientColors; + } + if (gradientDirection) { + result.gradientDirection = gradientDirection; + } + return result; +} +/** + * Create an IBorderGradientBackgroundModel from given background + * @param background + */ +function createBorderGradientBackgroundModel(background) { + return Object.assign(Object.assign({}, createBaseGradientBackgroundModel(background)), { backgroundType: 'borderGradient' }); +} +/** + * Create an IColorBackgroundModel from given background + * @param background + */ +function createColorBackgroundModel(background) { + return { + backgroundType: 'color', + color: getBackgroundValue(background) + }; +} +/** + * Create an IPredominantBackgroundModel from given background + * @param background + */ +function createPredominantBackgroundModel(background) { + return Object.assign(Object.assign({}, createContrastPaletteBackgroundModel(background)), { backgroundType: 'predominant' }); +} +/** + * Create an IPredominantGradientBackgroundModel from given background + * @param background + */ +function createPredominantGradientBackgroundModel(background) { + return Object.assign(Object.assign({}, createBaseGradientBackgroundModel(background)), { backgroundType: 'predominantGradient' }); +} +/** + * Create an IBackgroundModel from given background + * @param background + */ +function createBackgroundModel(background) { + if (getBackgroundValue(background) === 'auto') { + return createAutoBackgroundModel(); + } + if (background instanceof BlurredBackgroundAction$1) { + return createBlurredBackgroundModel(background); + } + if (background instanceof BackgroundAutoBorderQualifier) { + return createBorderBackgroundModel(background); + } + if (background instanceof BackgroundBorderGradientQualifier) { + return createBorderGradientBackgroundModel(background); + } + if (background instanceof BackgroundAutoPredominantQualifier) { + return createPredominantBackgroundModel(background); + } + if (background instanceof BackgroundPredominantGradientQualifier) { + return createPredominantGradientBackgroundModel(background); + } + return createColorBackgroundModel(background); +} + +/** + * @summary qualifier + * @description Image format svg. + * @memberOf Qualifiers.Format + * @return {Qualifiers.Format.FormatQualifier} + */ +function svg() { return new FormatQualifier('svg'); } +/** + * @summary qualifier + * @description Image format auto. + * @memberOf Qualifiers.Format + * @return {Qualifiers.Format.FormatQualifier} + */ +function auto$1() { return new FormatQualifier('auto'); } + +/** + * @description Defines the background color to use instead of transparent background areas or when resizing with padding. + * + * Learn more: {@link https://cloudinary.com/documentation/effects_and_artistic_enhancements#setting_background_color|Setting background for images} | {@link https://cloudinary.com/documentation/video_effects_and_enhancements#background_color|Setting background for videos} + * + * @namespace Background + * @memberOf Qualifiers + */ +/** + * @summary qualifier + * @description Selects the predominant color while taking only the image border pixels into account. + * @memberOf Qualifiers.Background + * @return {BackgroundAutoBorderQualifier} + */ +function border() { + return new BackgroundAutoBorderQualifier(); +} +/** + * @summary qualifier + * @description Automatically determines the color to use for padding, if needed when resizing an asset. + * + * Learn more: {@link https://cloudinary.com/documentation/effects_and_artistic_enhancements#content_aware_padding|Content-aware padding} + * @memberOf Qualifiers.Background + * @return {Qualifiers.Background.BackgroundQualifier} + */ +function auto() { + return new BackgroundQualifier('auto'); +} +/** + * @summary qualifier + * @description Applies a padding gradient fade effect using the predominant colors in the border of the image. + * @memberOf Qualifiers.Background + * @return {BackgroundBorderGradientQualifier} + */ +function borderGradient() { + return new BackgroundBorderGradientQualifier(); +} +/** + * @summary qualifier + * @description Applies a padding gradient fade effect using the predominant colors in the image. + * @memberOf Qualifiers.Background + * @return {BackgroundPredominantGradientQualifier} + */ +function predominantGradient() { + return new BackgroundPredominantGradientQualifier(); +} +/** + * @summary qualifier + * @description Selects the predominant color while taking all pixels in the image into account + * @memberOf Qualifiers.Background + * @return {BackgroundAutoPredominantQualifier} + */ +function predominant() { + return new BackgroundAutoPredominantQualifier(); +} +/** + * @summary qualifier + * @description Selects the predominant color while taking all pixels in the image into account. + * @memberOf Qualifiers.Background + * @return {Qualifiers.Background.BackgroundQualifier} + */ +function color(colorStr) { + return new BackgroundQualifier(prepareColor(colorStr)); +} +/** + * @summary qualifier + * @description Selects the predominant color while taking all pixels in the image into account. + * @memberOf Qualifiers.Background + * @return {BlurredBackgroundAction} + */ +function blurred() { + return new BlurredBackgroundAction$1(); +} +const Background = { + auto: auto, + border: border, + borderGradient: borderGradient, + predominantGradient: predominantGradient, + predominant: predominant, + color: color, + blurred: blurred +}; + +/** + * Create BackgroundQualifier from IBlurredBackgroundModel + * @param backgroundModel + */ +function createBlurredBackground(backgroundModel) { + const { brightness, intensity } = backgroundModel; + const result = Background.blurred(); + if (brightness || brightness == 0) { + result.brightness(brightness); + } + if (intensity || intensity == 0) { + result.intensity(intensity); + } + return result; +} +/** + * Create a gradientBackground from given model + * @param background + * @param backgroundModel + */ +function createGradientBackground(background, backgroundModel) { + const { gradientColors, gradientDirection, contrast, palette } = backgroundModel; + if (contrast) { + background.contrast(); + } + if (palette) { + background.palette(...palette); + } + if (gradientColors) { + background.gradientColors(+gradientColors); + } + if (gradientDirection) { + background.gradientDirection(gradientDirection); + } + return background; +} +/** + * Crete a background with contrast and palette from given model + * @param background + * @param backgroundModel + */ +function createContrastPaletteBackground(background, backgroundModel) { + const { contrast, palette } = backgroundModel; + if (contrast) { + background.contrast(); + } + if (palette) { + background.palette(...palette); + } + return background; +} +/** + * Create BackgroundQualifier from IBackgroundModel + * @param backgroundModel + */ +function createBackgroundFromModel(backgroundModel) { + const { backgroundType } = backgroundModel; + switch (backgroundType) { + case 'auto': + return auto(); + case 'blurred': + return createBlurredBackground(backgroundModel); + case 'border': + return createContrastPaletteBackground(border(), backgroundModel); + case 'borderGradient': + return createGradientBackground(borderGradient(), backgroundModel); + case 'predominant': + return createContrastPaletteBackground(predominant(), backgroundModel); + case 'predominantGradient': + return createGradientBackground(predominantGradient(), backgroundModel); + default: + return color(backgroundModel.color); + } +} + +/** + * @description Defines an advanced resize with padding. + * @extends Actions.Resize.ResizeAdvancedAction + * @memberOf Actions.Resize + * @see Visit {@link Actions.Resize| Resize} for examples + */ +class ResizePadAction extends ResizeAdvancedAction { + /** + * @description Sets the background. + * @param {Qualifiers.Background} backgroundQualifier Defines the background color to use instead of + * transparent background areas or when resizing with padding. + */ + background(backgroundQualifier) { + this._actionModel.background = createBackgroundModel(backgroundQualifier); + return this.addQualifier(backgroundQualifier); + } + /** + * @description Horizontal position for custom-coordinates based padding. + * @param {number} x The x position. + */ + offsetX(x) { + this._actionModel.x = x; + return this.addQualifier(new Qualifier('x', x)); + } + /** + * @description Vertical position for custom-coordinates based padding + * @param {number} y The y position. + */ + offsetY(y) { + this._actionModel.y = y; + return this.addQualifier(new Qualifier('y', y)); + } + static fromJson(actionModel) { + const result = super.fromJson.apply(this, [actionModel]); + actionModel.background && result.background(createBackgroundFromModel(actionModel.background)); + actionModel.x && result.offsetX(actionModel.x); + actionModel.y && result.offsetY(actionModel.y); + actionModel.zoom && result.zoom(actionModel.zoom); + return result; + } +} + +/** + * @description Defines a scaling resize action. + * @extends Actions.Resize.ResizeSimpleAction + * @memberOf Actions.Resize + * @see Visit {@link Actions.Resize| Resize} for examples + */ +class ResizeScaleAction extends ResizeSimpleAction { + /** + * @description Changes the aspect ratio of an image while retaining all important content and avoiding unnatural + * distortions. + * @return {this} + */ + liquidRescaling() { + return this.addQualifier(new GravityQualifier('liquid')); + } +} + +/** + * @description Defines how to crop an asset + * @extends Actions.Resize.ResizeAdvancedAction + * @memberOf Actions.Resize + * @see Visit {@link Actions.Resize| Resize} for examples + */ +class ResizeCropAction extends ResizeAdvancedAction { + /** + * @description Horizontal position for custom-coordinates based cropping. + * @param {number} x The x position. + */ + x(x) { + this._actionModel.x = x; + return this.addQualifier(new Qualifier('x', x)); + } + /** + * @description Vertical position for custom-coordinates based cropping + * @param {number} y The y position. + */ + y(y) { + this._actionModel.y = y; + return this.addQualifier(new Qualifier('y', y)); + } + /** + * @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. + * @param {number | string} z The zoom factor. (Default: 1.0) + */ + zoom(z) { + this._actionModel.zoom = z; + return this.addQualifier(new Qualifier('z', z)); + } + static fromJson(actionModel) { + const result = super.fromJson.apply(this, [actionModel]); + actionModel.x && result.x(actionModel.x); + actionModel.y && result.y(actionModel.y); + actionModel.zoom && result.zoom(actionModel.zoom); + return result; + } +} + +/** + * @description Defines how to crop-fill an asset + * @extends Actions.Resize.ResizeAdvancedAction + * @memberOf Actions.Resize + * @see Visit {@link Actions.Resize| Resize} for examples + */ +class ResizeFillAction extends ResizeAdvancedAction { + /** + * @description Absolute X position when used with Gravity.xyCenter {@link Qualifiers.Gravity.GravityQualifier}} + * @param {number} x The x position. + */ + x(x) { + this._actionModel.x = x; + return this.addQualifier(new Qualifier('x', x)); + } + /** + * @description Absolute Y position when used with Gravity.xyCenter {@link Qualifiers.Gravity.GravityQualifier}} + * @param {number} y The y position. + */ + y(y) { + this._actionModel.y = y; + return this.addQualifier(new Qualifier('y', y)); + } + static fromJson(actionModel) { + const result = super.fromJson.apply(this, [actionModel]); + actionModel.x && result.x(actionModel.x); + actionModel.y && result.y(actionModel.y); + return result; + } +} + +/** + * @description Determines how to crop, scale, and/or zoom the delivered asset according to the requested dimensions. + * @memberOf Actions + * @namespace Resize + * @see Learn more about Gravity and Focus {@link Qualifiers.Gravity| here } + * @example + *

Scaling an image

+ * import {Cloudinary} from "@cloudinary/url-gen"; + * import {scale, fit, pad, crop} from '@cloudinary/url-gen/actions/resize'; + * + * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}}); + * const image = yourCldInstance.image('woman'); + * + * image.resize( scale(100, 100) ); + * // All resize actions have a similar interface. + * // image.resize( fit(100, 100)) ); + * // image.resize( pad(100, 100)) ); + * // image.resize( crop(100, 100)) ); + * // However, Some actions have additional arguments exposed as builder methods. + * // See the documentation for each method for more information + * + * + * // Alternative syntax, using builder methods + * image.resize( + * scale() + * .width(100) + * .height(100) + * ); + * image.toString() + * + * @example + *

Cropping with automatic focus(Gravity)

+ * import {Cloudinary} from "@cloudinary/url-gen"; + * + * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}}); + * const image = yourCldInstance.image('woman'); + * + * import {scale} from '@cloudinary/url-gen/actions/resize'; + * import {autoGravity} from '@cloudinary/url-gen/qualifiers/gravity'; + * + * image.resize( crop(100, 100).gravity(autoGravity()) ); + * + * // Alternative syntax, using builder methods + * image.resize( + * scale() + * .width(100) + * .height(100) + * .gravity(autoGravity()) + * ); + * image.toString() + */ +/** + * @summary action + * @description + * Changes the size of the image exactly to the given width and height without necessarily retaining the original aspect ratio:
+ * all original image parts are visible but might be stretched or shrunk. + * @memberOf Actions.Resize + * @param {number|string} width The required width of a transformed asset. + * @param {number|string} height The required height of a transformed asset. + * @return {Actions.Resize.ScaleAction} + */ +function scale(width, height) { + return new ResizeScaleAction('scale', width, height); +} +/** + * @summary action + * @description Extracts a region of the given width and height out of the original image. + * @memberOf Actions.Resize + * @param {number|string} width The required width of a transformed asset. + * @param {number|string} height The required height of a transformed asset. + * @return {Actions.Resize.ResizeCropAction} + */ +function crop(width, height) { + return new ResizeCropAction('crop', width, height); +} +/** + * @summary action + * @description + * Creates an image with the exact given width and height without distorting the image.
+ * This option first scales up or down as much as needed to at least fill both of the given dimensions.

+ * If the requested aspect ratio is different than the original, cropping will occur on the dimension that exceeds the requested size after scaling. + * @memberOf Actions.Resize + * @param {number|string} width The required width of a transformed asset. + * @param {number|string} height The required height of a transformed asset. + * @return {Actions.Resize.ResizeFillAction} + */ +function fill(width, height) { + return new ResizeFillAction('fill', width, height); +} +/** + * @summary action + * @description + * Resizes the asset to fill the given width and height while retaining the original aspect ratio. + * + * If the proportions of the original asset do not match the given width and height, padding is added to the asset + * to reach the required size. + * @memberOf Actions.Resize + * @param {number|string} width The required width of a transformed asset. + * @param {number|string} height The required height of a transformed asset. + * @return {Actions.Resize.ResizePadAction} + */ +function pad(width, height) { + return new ResizePadAction('pad', width, height); +} + +/** + * @description Controls the quality of the delivered image or video. + * @memberOf Actions.Delivery + * @extends {Actions.Delivery.DeliveryAction} + * @see Visit {@link Actions.Delivery|Delivery} for an example + */ +class DeliveryQualityAction extends DeliveryAction { + /** + * @param {Qualifiers.Quality} qualityValue a Quality value + */ + constructor(qualityValue) { + super('q', qualityValue.toString(), 'level'); + } + /** + * Selet the Chroma sub sampling
+ * Learn more: {@link https://cloudinary.com/documentation/image_optimization#toggle_chroma_subsampling|Toggling chroma subsampling} + * @param {420 | 444 | number} type The chroma sub sampling type + */ + chromaSubSampling(type) { + this._actionModel.chromaSubSampling = CHROMA_VALUE_TO_CHROMA_MODEL_ENUM[type]; + const qualityWithSubSampling = new QualifierValue([this._actionModel.level, type]); + qualityWithSubSampling.setDelimiter(':'); + // We either have chroma or quantization, but not both + return this.addQualifier(new Qualifier('q', qualityWithSubSampling)); + } + /** + * Controls the final quality by setting a maximum quantization percentage + * @param {number} val + */ + quantization(val) { + this._actionModel.quantization = val; + const qualityWithQuantization = new QualifierValue([this._actionModel.level, `qmax_${val}`]).setDelimiter(':'); + // We either have chroma or quantization, but not both + return this.addQualifier(new Qualifier('q', qualityWithQuantization)); + } + static fromJson(actionModel) { + const { level, chromaSubSampling, quantization } = actionModel; + const levelType = ACTION_TYPE_TO_QUALITY_MODE_MAP[level] || level; + const result = new this(levelType); + if (chromaSubSampling) { + //Turn strings like 'CHROMA_420' to 420 + const chromaValue = CHROMA_MODEL_ENUM_TO_CHROMA_VALUE[chromaSubSampling.toUpperCase()]; + chromaValue && result.chromaSubSampling(+chromaValue); + } + quantization && result.quantization(quantization); + return result; + } +} + +/** + * @description Defines transformations for delivering your assets without changing the visual or audio experience for the end user. + * @memberOf Actions + * @namespace Delivery + * @example + * See the examples under every method + */ +/** + * @summary action + * @description Defines the format of the delivered asset. + * + * Learn more: + * {@link https://cloudinary.com/documentation/image_transformations#image_format_support|Image formats} + * {@link https://cloudinary.com/documentation/video_manipulation_and_delivery#transcoding_video_to_other_formats|Video formats} + * + * @memberOf Actions.Delivery + * @param {string} format The file format. For a list of supported format types see {@link Qualifiers.Format| format types} for + * possible values + * @return {Actions.Delivery.DeliveryFormat} + * @example + * import {Cloudinary} from "@cloudinary/url-gen"; + * import {format} from "@cloudinary/url-gen/actions/delivery"; + * + * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}}); + * const image = yourCldInstance.image('woman'); + * image.delivery( + * format('jpg'), + * ); + * + */ +function format(format) { + return new DeliveryFormatAction('f', format); +} +/** + * @summary action + * @description Controls the quality of the delivered image or video. + * + * Learn more: {@link https://cloudinary.com/documentation/image_optimization#how_to_optimize_image_quality|Image quality} + * {@link https://cloudinary.com/documentation/video_optimization#how_to_optimize_video_quality|Video quality} + * @memberOf Actions.Delivery + * @param {QualityTypes | string | number | Qualifiers.Quality} qualityType For a list of supported quality types see + * {@link Qualifiers.Quality| quality types} for + * possible values. + * @return {Actions.Delivery.DeliveryQualityAction} + * @example + * import {Cloudinary} from "@cloudinary/url-gen"; + * import {quality} from "@cloudinary/url-gen/actions/delivery"; + * import {quality} from "@cloudinary/url-gen/qualifiers/quantity"; + * + * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}}); + * const image = yourCldInstance.image('woman'); + * image.delivery( + * quality('auto'), + * ); + */ +function quality(qualityType) { + return new DeliveryQualityAction(qualityType); +} + +/** + * @summary qualifier + * @memberOf Qualifiers.Compass + * @description North east corner (top right). + * @return {Qualifiers.Compass.CompassQualifier} Compass + */ +function northEast() { + return new CompassQualifier('north_east'); +} + +/** + * Predefined accessibility transformations + * @const {Object} Cloudinary.ACCESSIBILITY_MODES + */ +var ACCESSIBILITY_MODES = { + 'darkmode': colorize(70).color('black'), + 'brightmode': colorize(40).color('white'), + 'monochrome': grayscale(), + 'colorblind': assistColorBlind() +}; +/** + * Predefined vectorize placeholder transformation + */ +var VECTORIZE = new Transformation() + .effect(vectorize()) + .delivery(quality('auto')) + .delivery(format(svg())); +/** + * Predefined pixelate placeholder transformation + */ +var PIXELATE = new Transformation() + .effect(pixelate()) + .delivery(quality('auto')) + .delivery(format(auto$1())); +/** + * Predefined blur placeholder transformation + */ +var BLUR = new Transformation() + .effect(blur(2000)) + .delivery(quality('auto')) + .delivery(format(auto$1())); +/** + * Predefined predominant color placeholder transformation + */ +var PREDOMINANT_COLOR_TRANSFORM = new Transformation() + .resize(pad('iw_div_2').aspectRatio(1).background(Background.auto())) + .resize(crop(1, 1).gravity(compass(northEast()))) + .resize(fill().height('ih').width('iw')) + .delivery(quality('auto')) + .delivery(format(auto$1())); +/** + * Predefined placeholder image options + */ +var PLACEHOLDER_IMAGE_OPTIONS = { + 'vectorize': VECTORIZE, + 'pixelate': PIXELATE, + 'blur': BLUR, + 'predominant-color': PREDOMINANT_COLOR_TRANSFORM +}; +/** + * transparent gif + */ +var singleTransparentPixel = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='; +/** + * Convert common video file extensions to mime types + * Most other common video file extensions have an identical mime type so do not need conversion. + */ +var VIDEO_MIME_TYPES = { + 'flv': 'x-flv', + '3gp': '3gpp', + 'mov': 'quicktime', + 'mpg': 'mpeg', + 'avi': 'x-msvideo', + 'wmv': 'x-ms-wmv', + 'ogv': 'ogg', + 'webm': 'webm', + 'mp4': 'mp4', +}; + +var ANALYTICS_DELIMITER = '?_a='; +var HtmlVideoLayer = /** @class */ (function () { + function HtmlVideoLayer(element, userCloudinaryVideo, sources, plugins, videoAttributes) { + var _this = this; + this.mimeType = 'video'; + this.mimeSubTypes = VIDEO_MIME_TYPES; + this.videoElement = element; + this.originalVideo = userCloudinaryVideo; + this.htmlPluginState = { cleanupCallbacks: [], pluginEventSubscription: [] }; + var pluginCloudinaryVideo = cloneDeep(userCloudinaryVideo); + render(element, userCloudinaryVideo, plugins, this.htmlPluginState) + .then(function () { + _this.htmlPluginState.pluginEventSubscription.forEach(function (fn) { fn(); }); + _this.setVideoAttributes(videoAttributes); + _this.handleSourceToVideo(pluginCloudinaryVideo, sources); + }); + } + /** + * Handles user supplied sources or default sources + * @param userCloudinaryVideo {CloudinaryVideo} + * @param sources + */ + HtmlVideoLayer.prototype.handleSourceToVideo = function (userCloudinaryVideo, sources) { + var _this = this; + // checks if user supplied sources + if (sources) { + this.generateUserSources(userCloudinaryVideo, sources); + } + else { + var defaultTypes = ['webm', 'mp4', 'ogv']; + defaultTypes.forEach(function (type) { + _this.appendSourceTag(userCloudinaryVideo, type); + }); + } + }; + /** + * Generate sources based on user input + * @param userCloudinaryVideo {CloudinaryVideo} + * @param sources + */ + HtmlVideoLayer.prototype.generateUserSources = function (userCloudinaryVideo, sources) { + var _this = this; + sources.map(function (_a) { + var type = _a.type, codecs = _a.codecs, transcode = _a.transcode; + return (_this.appendSourceTag(cloneDeep(userCloudinaryVideo) + .transcode(transcode), type, _this.buildMimeType(type, codecs))); + }); + }; + /** + * Appends source tag to html video element + * @param userCloudinaryVideo {CloudinaryVideo} + * @param type {string} + * @param mimeType {string} + */ + HtmlVideoLayer.prototype.appendSourceTag = function (userCloudinaryVideo, type, mimeType) { + var source = document.createElement('source'); + var url = userCloudinaryVideo.toURL(); + // Split url to get analytics string so that we can insert the file extension (type) before it + // To simplify this we could add a .getPublicId to CloudinaryVideo and do vid.setPublicId(vid.getPublicId+type) + // Another option could be to add a .setExtension, which will allow to do vid.setExtension(type) + var srcParts = url.split(ANALYTICS_DELIMITER); + var analyticsStr = srcParts[1] ? "".concat(ANALYTICS_DELIMITER).concat(srcParts[1]) : ''; + source.src = "".concat(srcParts[0], ".").concat(type).concat(analyticsStr); + // Ideally, we want to use the VIDEO_MIME_TYPE to detect the mime of the extension + // For future proofing of simple formats (say .foo and mimetype of video/foo), we also fallback to the actual type + source.type = mimeType ? mimeType : "video/".concat(VIDEO_MIME_TYPES[type] || type); + this.videoElement.appendChild(source); + }; + /** + * Determines MIME type of given source type and codecs. + * @param type - format of the video + * @param codecs - optional information about codecs of the video + */ + HtmlVideoLayer.prototype.buildMimeType = function (type, codecs) { + var mimeType = "".concat(this.mimeType, "/").concat(this.mimeSubTypes[type] || type); + if (codecs) { + mimeType += "; codecs=" + (Array.isArray(codecs) ? codecs.join(', ') : codecs); + } + return mimeType; + }; + /** + * Iterates through the video attributes and sets to true if passed in by the user. + * In case of poster, sets the poster. + * @param videoAttributes {object} Supported attributes: controls, loop, muted, poster, preload, autoplay, playsinline + */ + HtmlVideoLayer.prototype.setVideoAttributes = function (videoAttributes) { + if (videoAttributes) { + for (var _i = 0, _a = Object.entries(videoAttributes); _i < _a.length; _i++) { + var _b = _a[_i], key = _b[0], value = _b[1]; + // Boolean attributes are considered to be true if they're present on the element at all. + // You should set value to the empty string ("") or the attribute's name. + // See https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute + value && this.videoElement.setAttribute(key, key === 'poster' ? value : ''); + } + } + }; + /** + * Called when component is updated. If our video source has changed, a video reload is triggered. + * @param updatedCloudinaryVideo + * @param sources + * @param plugins + * @param videoAttributes + */ + HtmlVideoLayer.prototype.update = function (updatedCloudinaryVideo, sources, plugins, videoAttributes) { + var _this = this; + if (updatedCloudinaryVideo !== this.originalVideo) { + var sourcesToDelete = this.videoElement.getElementsByTagName("SOURCE"); + while (sourcesToDelete[0]) + sourcesToDelete[0].parentNode.removeChild(sourcesToDelete[0]); + render(this.videoElement, updatedCloudinaryVideo, plugins, this.htmlPluginState) + .then(function () { + _this.setVideoAttributes(videoAttributes); + _this.handleSourceToVideo(updatedCloudinaryVideo, sources); + _this.videoElement.load(); + }); + } + }; + return HtmlVideoLayer; +}()); + +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** Used to match leading and trailing whitespace. */ +var reTrim = /^\s+|\s+$/g; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return root.Date.now(); +}; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + result = wait - timeSinceLastCall; + + return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +var lodash_debounce = debounce; + +/** + * Returns true if value is number + * @param value + */ +function isNum(value) { + return typeof value === "number"; +} + +/** + * return true when window is defined + */ +function isBrowser() { + return typeof window !== 'undefined'; +} + +/** + * returns true if input is an image element + * @param i + */ +function isImage(i) { + return i instanceof HTMLImageElement; +} + +/** + * @namespace + * @description Updates the src with the size of the parent element and triggers a resize event for + * subsequent resizing. + * @param steps {number | number[]} The step size in pixels or an array of image widths in pixels. + * @return {Plugin} + * @example NOTE: The following is in React. For further examples, see the Packages tab. + * + */ +function responsive(_a) { + var _b = _a === void 0 ? {} : _a, steps = _b.steps; + return responsivePlugin.bind(null, steps); +} +/** + * @description Responsive plugin + * @param steps {number | number[]} The step size in pixels. + * @param element {HTMLImageElement} The image element + * @param responsiveImage {CloudinaryImage} + * @param htmlPluginState {HtmlPluginState} holds cleanup callbacks and event subscriptions + */ +function responsivePlugin(steps, element, responsiveImage, htmlPluginState) { + if (!isBrowser()) + return true; + if (!isImage(element)) + return; + return new Promise(function (resolve) { + htmlPluginState.cleanupCallbacks.push(function () { + window.removeEventListener("resize", resizeRef); + resolve('canceled'); + }); + // Use a tagged generic action that can be later searched and replaced. + responsiveImage.addAction(new Action().setActionTag('responsive')); + // Immediately run the resize plugin, ensuring that first render gets a responsive image. + onResize(steps, element, responsiveImage); + var resizeRef; + htmlPluginState.pluginEventSubscription.push(function () { + window.addEventListener('resize', resizeRef = lodash_debounce(function () { + onResize(steps, element, responsiveImage); + }, 100)); + }); + resolve(); + }); +} +/** + * On resize updates image src + * @param steps {number | number[]} The step size in pixels. + * | number[] A set of image sizes in pixels. + * @param element {HTMLImageElement} The image element + * @param responsiveImage {CloudinaryImage} + */ +function onResize(steps, element, responsiveImage) { + updateByContainerWidth(steps, element, responsiveImage); + element.src = responsiveImage.toURL(); +} +/** + * Updates the responsiveImage by container width. + * @param steps {number | number[]} The step size in pixels. + * | number[] A set of image sizes in pixels. + * @param element {HTMLImageElement} The image element + * @param responsiveImage {CloudinaryImage} + */ +function updateByContainerWidth(steps, element, responsiveImage) { + // Default value for responsiveImgWidth, used when no steps are passed. + var responsiveImgWidth = element.parentElement.clientWidth; + if (isNum(steps)) { + var WIDTH_INTERVALS = steps; + // We need to force the container width to be intervals of max width. + responsiveImgWidth = Math.ceil(responsiveImgWidth / WIDTH_INTERVALS) * WIDTH_INTERVALS; + } + else if (Array.isArray(steps)) { + responsiveImgWidth = steps.reduce(function (prev, curr) { + return (Math.abs(curr - responsiveImgWidth) < Math.abs(prev - responsiveImgWidth) ? curr : prev); + }); + } + responsiveImage.transformation.actions.forEach(function (action, index) { + if (action instanceof Action && action.getActionTag() === 'responsive') { + responsiveImage.transformation.actions[index] = scale(responsiveImgWidth).setActionTag('responsive'); + } + }); +} + +/** + * @namespace + * @description Loads an image once it is in a certain margin in the viewport. This includes vertical and horizontal scrolling. + * @param rootMargin {string} The root element's bounding box before the intersection test is performed. Default: 0px. + * @param threshold {number} The percentage of the image's visibility at which point the image should load. Default: 0.1 (10%). + * @return {Plugin} + * @example + * + * NOTE: The following is in React. For further examples, see the Packages tab. + * When using the plugin make sure to add dimensions, otherwise the images will load with + * the size of 0x0, meaning the images will be in the viewport and trigger the lazyload plugin. + * + * + */ +function lazyload(_a) { + 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; + return lazyloadPlugin.bind(null, rootMargin, threshold); +} +/** + * @description lazyload plugin + * @param rootMargin {string} The root element's bounding box before the intersection test is performed. Default: 0px. + * @param threshold {number} The percentage of the image's visibility at which point the image should load. Default: 0.1 (10%). + * @param element The image element. + * @param element {HTMLImageElement} The image element. + * @param cloudinaryImage {CloudinaryImage} + * @param htmlPluginState {HtmlPluginState} Holds cleanup callbacks and event subscriptions. + */ +function lazyloadPlugin(rootMargin, threshold, element, cloudinaryImage, htmlPluginState) { + if (rootMargin === void 0) { rootMargin = '0px'; } + if (threshold === void 0) { threshold = 0.1; } + // if SSR skip plugin + if (!isBrowser()) + return false; + return new Promise(function (resolve) { + var onIntersect = function () { return (resolve()); }; + var unobserve = detectIntersection(element, onIntersect, rootMargin, threshold); + htmlPluginState.cleanupCallbacks.push(function () { + unobserve(); + resolve('canceled'); + }); + }); +} +/** + * Check if IntersectionObserver is supported + * @return {boolean} true if window.IntersectionObserver is defined + */ +function isIntersectionObserverSupported() { + // Check that 'IntersectionObserver' property is defined on window + return window && 'IntersectionObserver' in window; +} +/** + * Calls onIntersect() to resolve when intersection is detected, or when + * no native lazy loading or when IntersectionObserver isn't supported. + * @param {Element} el - the element to observe + * @param {function} onIntersect - called when the given element is in view + * @param rootMargin {string} The root element's bounding box before the intersection test is performed. Default: 0px. + * @param threshold {number} The percentage of the image's visibility at which point the image should load. Default: 0.1 (10%). + */ +function detectIntersection(el, onIntersect, rootMargin, threshold) { + try { + if (!isIntersectionObserverSupported()) { + // Return if there's no need or possibility to detect intersection + onIntersect(); + return; + } + // Detect intersection with given element using IntersectionObserver + var observer_1 = new IntersectionObserver(function (entries) { + entries.forEach(function (entry) { + if (entry.isIntersecting) { + observer_1.unobserve(entry.target); + onIntersect(); + } + }); + }, { rootMargin: rootMargin, threshold: threshold }); + observer_1.observe(el); + return function () { el && observer_1.observe(el); }; + } + catch (e) { + onIntersect(); + } +} + +/** + * @namespace + * @description Appends accessibility transformations to the original image. + * @return {Plugin} + * @example NOTE: The following is in React. For further examples, see the Packages tab. + * + */ +function accessibility(_a) { + var _b = _a === void 0 ? {} : _a, _c = _b.mode, mode = _c === void 0 ? 'darkmode' : _c; + return accessibilityPlugin.bind(null, mode); +} +/** + * @description Accessibility plugin + * @param mode {accessibilityMode} The accessibility mode to use. Possible modes: 'darkmode' | 'brightmode' | 'monochrome' | 'colorblind'. Default: 'darkmode'. + * @param element {HTMLImageElement} The image element. + * @param pluginCloudinaryImage {CloudinaryImage} + * @param htmlPluginState {htmlPluginState} Holds cleanup callbacks and event subscriptions. + */ +function accessibilityPlugin(mode, element, pluginCloudinaryImage, htmlPluginState) { + if (isBrowser()) { + if (!isImage(element)) + return; + return new Promise(function (resolve) { + // resolved promise when canceled + htmlPluginState.cleanupCallbacks.push(function () { + resolve('canceled'); + }); + if (!ACCESSIBILITY_MODES[mode]) { + mode = 'darkmode'; + } + pluginCloudinaryImage.effect(ACCESSIBILITY_MODES[mode]); + resolve(); + }); + } + else { + pluginCloudinaryImage.effect(ACCESSIBILITY_MODES[mode]); + return true; + } +} + +/** + * @namespace + * @description Displays a placeholder image until the original image loads. + * @param mode {PlaceholderMode} The type of placeholder image to display. Possible modes: 'vectorize' | 'pixelate' | 'blur' | 'predominant-color'. Default: 'vectorize'. + * @return {Plugin} + * @example NOTE: The following is in React. For further examples, see the Packages tab. + * + */ +function placeholder(_a) { + var _b = _a === void 0 ? {} : _a, _c = _b.mode, mode = _c === void 0 ? 'vectorize' : _c; + return placeholderPlugin.bind(null, mode); +} +/** + * @description Placeholder plugin + * @param mode {PlaceholderMode} The type of placeholder image to display. Possible modes: 'vectorize' | 'pixelate' | 'blur' | 'predominant-color'. Default: 'vectorize'. + * @param element {HTMLImageElement} The image element. + * @param pluginCloudinaryImage {CloudinaryImage} + * @param htmlPluginState {htmlPluginState} Holds cleanup callbacks and event subscriptions. + */ +function placeholderPlugin(mode, element, pluginCloudinaryImage, htmlPluginState) { + // @ts-ignore + // If we're using an invalid mode, we default to vectorize + if (!PLACEHOLDER_IMAGE_OPTIONS[mode]) { + mode = 'vectorize'; + } + // A placeholder mode maps to an array of transformations + var PLACEHOLDER_ACTIONS = PLACEHOLDER_IMAGE_OPTIONS[mode].actions; + // Before proceeding, clone the original image + // We clone because we don't want to pollute the state of the image + // Future renders (after the placeholder is loaded) should not load placeholder transformations + var placeholderClonedImage = cloneDeep(pluginCloudinaryImage); + //appends a placeholder transformation on the clone + // @ts-ignore + PLACEHOLDER_ACTIONS.forEach(function (transformation) { + placeholderClonedImage.addAction(transformation); + }); + if (!isBrowser()) { + // in SSR, we copy the transformations of the clone to the user provided CloudinaryImage + // We return here, since we don't have HTML elements to work with. + pluginCloudinaryImage.transformation = placeholderClonedImage.transformation; + return true; + } + // Client side rendering, if an image was not provided we don't perform any action + if (!isImage(element)) + return; + // For the cloned placeholder image, we remove the responsive action. + // There's no need to load e_pixelate,w_{responsive} beacuse that image is temporary as-is + // and it just causes another image to load. + // This also means that the de-facto way to use responsive in SSR is WITH placeholder. + // This also means that the user must provide dimensions for the responsive plugin on the img tag. + placeholderClonedImage.transformation.actions.forEach(function (action, index) { + if (action instanceof Action && action.getActionTag() === 'responsive') { + delete placeholderClonedImage.transformation.actions[index]; + } + }); + // Set the SRC of the imageElement to the URL of the placeholder Image + element.src = placeholderClonedImage.toURL(); + //Fallback, if placeholder errors, load a single transparent pixel + element.onerror = function () { + element.src = singleTransparentPixel; + }; + /* + * This plugin loads two images: + * - The first image is loaded as a placeholder + * - The second image is loaded after the placeholder is loaded + * + * Placeholder image loads first. Once it loads, the promise is resolved and the + * larger image will load. Once the larger image loads, promised and plugin is resolved. + */ + return new Promise(function (resolve) { + element.onload = function () { + resolve(); + }; + }).then(function () { + return new Promise(function (resolve) { + htmlPluginState.cleanupCallbacks.push(function () { + element.src = singleTransparentPixel; + resolve('canceled'); + }); + // load image once placeholder is done loading + var largeImage = new Image(); + largeImage.src = pluginCloudinaryImage.toURL(); + largeImage.onload = function () { + resolve(); + }; + // image does not load, resolve + largeImage.onerror = function () { + resolve(); + }; + }); + }); +} + +function serverSideSrc(plugins, serverCloudinaryImage, analyticsOptions) { + var clonedServerCloudinaryImage = cloneDeep(serverCloudinaryImage); + if (plugins) { + for (var i = 0; i < plugins.length; i++) { + var response = plugins[i](null, clonedServerCloudinaryImage); + if (!response) { //lazyload + break; + } + } + } + return clonedServerCloudinaryImage.toURL(analyticsOptions ? { trackedAnalytics: analyticsOptions } : null); +} + +/** + * Cancels currently running plugins. This is called from unmount or update + * @param pluginState {HtmlPluginState} Holds cleanup callbacks and event subscriptions + */ +function cancelCurrentlyRunningPlugins(pluginState) { + pluginState.cleanupCallbacks.forEach(function (fn) { + fn(); // resolve each promise with 'canceled' + }); +} + +export { HtmlImageLayer, HtmlVideoLayer, accessibility, cancelCurrentlyRunningPlugins, isBrowser, lazyload, placeholder, responsive, serverSideSrc }; +//# sourceMappingURL=index.esm.js.map diff --git a/packages/html/index.esm.js.map b/packages/html/index.esm.js.map new file mode 100644 index 00000000..24bf6832 --- /dev/null +++ b/packages/html/index.esm.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.esm.js","sources":["node_modules/lodash.clonedeep/index.js","node_modules/tslib/tslib.es6.js","node_modules/@cloudinary/transformation-builder-sdk/internal/qualifier/QualifierValue.js","node_modules/@cloudinary/transformation-builder-sdk/internal/utils/unsupportedError.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/qualifierToJson.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/QualifierModel.js","node_modules/@cloudinary/transformation-builder-sdk/internal/qualifier/Qualifier.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/flag/FlagQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/internal/utils/dataStructureUtils.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/actionToJson.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/ActionModel.js","node_modules/@cloudinary/transformation-builder-sdk/internal/Action.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/region/NamedRegion.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/region/CustomRegion.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/region.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/blur/Blur.js","node_modules/@cloudinary/transformation-builder-sdk/internal/utils/objectFlip.js","node_modules/@cloudinary/transformation-builder-sdk/internal/internalConstants.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/EffectActions/SimpleEffectAction.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/EffectActions/LeveledEffectAction.js","node_modules/@cloudinary/transformation-builder-sdk/internal/utils/prepareColor.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/Vectorize.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/EffectActions/EffectActionWithLevel.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/AssistColorBlind.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/Colorize.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/pixelate/Pixelate.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect.js","node_modules/@cloudinary/transformation-builder-sdk/actions/background/actions/BackgroundColor.js","node_modules/@cloudinary/transformation-builder-sdk/internal/RawAction.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/IErrorObject.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/flag.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/format/FormatQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/actions/delivery/DeliveryAction.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/progressive.js","node_modules/@cloudinary/transformation-builder-sdk/actions/delivery/DeliveryFormatAction.js","node_modules/@cloudinary/transformation-builder-sdk/transformation/Transformation.js","node_modules/@cloudinary/transformation-builder-sdk/internal/utils/toFloatAsString.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/aspectRatio/AspectRatioQualifierValue.js","node_modules/@cloudinary/transformation-builder-sdk/actions/resize/ResizeSimpleAction.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/gravity/GravityQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/gravity/autoGravity/AutoGravity.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/gravity/focusOnGravity/FocusOnGravity.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/gravity/compassGravity/CompassGravity.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/gravity.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/gravity/qualifiers/focusOn/FocusOnValue.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/focusOn.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/createGravityModel.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/autoFocus.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/gravity/qualifiers/compass/CompassQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/createGravityFromModel.js","node_modules/@cloudinary/transformation-builder-sdk/actions/resize/ResizeAdvancedAction.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/base/BackgroundQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/BlurredBackgroundAction.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/base/BaseCommonBackground.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/auto/BackgroundAutoBorderQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/base/BaseGradientBackground.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/gradient/BackgroundBorderGradientQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/gradient/BackgroundPredominantGradientQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/auto/BackgroundAutoPredominantQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/createBackgroundModel.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/format.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/createBackgroundFromModel.js","node_modules/@cloudinary/transformation-builder-sdk/actions/resize/ResizePadAction.js","node_modules/@cloudinary/transformation-builder-sdk/actions/resize/ResizeScaleAction.js","node_modules/@cloudinary/transformation-builder-sdk/actions/resize/ResizeCropAction.js","node_modules/@cloudinary/transformation-builder-sdk/actions/resize/ResizeFillAction.js","node_modules/@cloudinary/transformation-builder-sdk/actions/resize.js","node_modules/@cloudinary/transformation-builder-sdk/actions/delivery/DeliveryQualityAction.js","node_modules/@cloudinary/transformation-builder-sdk/actions/delivery.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/compass.js","node_modules/lodash.debounce/index.js"],"sourcesContent":["/**\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 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 global == 'object' && global && global.Object === Object && global;\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 = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == '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","/*! *****************************************************************************\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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\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\nexport var __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\nexport function __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}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __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\nexport function __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}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\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}\nexport { QualifierValue };\n","class 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}\nexport { UnsupportedError, createUnsupportedError };\n","import { createUnsupportedError } from \"../utils/unsupportedError.js\";\n/**\n * Returns the action's model\n */\nexport function qualifierToJson() {\n return this._qualifierModel || { error: createUnsupportedError(`unsupported qualifier ${this.constructor.name}`) };\n}\n","import { qualifierToJson } from \"./qualifierToJson.js\";\nexport class QualifierModel {\n constructor() {\n this._qualifierModel = {};\n }\n toJson() {\n return qualifierToJson.apply(this);\n }\n}\n","import { QualifierValue } from './QualifierValue.js';\nimport { QualifierModel } from '../models/QualifierModel.js';\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}\nexport { Qualifier };\n","import { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\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}\nexport { FlagQualifier };\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 * Checks if `value` is a string.\n * @private\n * @param {*} value The value to check.\n * @return {boolean} `true` if `value` is a string, else `false`.\n */\nfunction isString(value) {\n return (typeof value === 'string' || value instanceof String);\n}\nexport { isString, mapToSortedArray };\n","import { createUnsupportedError } from \"../utils/unsupportedError.js\";\n/**\n * Returns the action's model\n */\nexport function 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","import { actionToJson } from \"./actionToJson.js\";\nexport class ActionModel {\n constructor() {\n this._actionModel = {};\n }\n toJson() {\n return actionToJson.apply(this);\n }\n}\n","import { FlagQualifier } from \"../qualifiers/flag/FlagQualifier.js\";\nimport { Qualifier } from \"./qualifier/Qualifier.js\";\nimport { mapToSortedArray } from \"./utils/dataStructureUtils.js\";\nimport { ActionModel } from \"./models/ActionModel.js\";\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}\nexport { Action };\n","import { Action } from \"../../internal/Action.js\";\n/**\n * @memberOf Qualifiers.Region\n */\nclass NamedRegion extends Action {\n constructor(type) {\n super();\n this.regionType = type;\n }\n}\nexport { NamedRegion };\n","import { NamedRegion } from \"./NamedRegion.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\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}\nexport { CustomRegion };\n","import { CustomRegion } from \"./region/CustomRegion.js\";\nimport { NamedRegion } from \"./region/NamedRegion.js\";\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 * @summary qualifier\n * @memberOf Qualifiers.Region\n * @return {Qualifiers.Region.NamedRegion}\n */\nfunction ocr() {\n return new NamedRegion('ocr_text');\n}\n/**\n * @description Contains functions to select the type of region, used with Effect.blur() and Effect.pixelate().\n * See also: {@link Actions.Effect.BlurAction|Blur Action}\n * See also: {@link Actions.Effect.Pixelate|Blur Action}\n * See also: {@link Actions.Effect|Possible effects}\n * @namespace Region\n * @memberOf Qualifiers\n */\nconst Region = { ocr, faces, custom };\nexport { Region, ocr, faces, custom };\n","import { Qualifier } from \"../../../internal/qualifier/Qualifier.js\";\nimport { Action } from \"../../../internal/Action.js\";\nimport { custom, faces } from \"../../../qualifiers/region.js\";\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}\nexport { BlurAction };\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}\nexport { objectFlip };\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 */\nimport { objectFlip } from \"./utils/objectFlip.js\";\nexport const CONDITIONAL_OPERATORS = {\n \"=\": \"eq\",\n \"!=\": \"ne\",\n \"<\": \"lt\",\n \">\": \"gt\",\n \"<=\": \"lte\",\n \">=\": \"gte\",\n \"&&\": \"and\",\n \"||\": \"or\",\n \"*\": \"mul\",\n \"/\": \"div\",\n \"+\": \"add\",\n \"-\": \"sub\",\n \"^\": \"pow\"\n};\nexport const RESERVED_NAMES = {\n \"aspect_ratio\": \"ar\",\n \"aspectRatio\": \"ar\",\n \"current_page\": \"cp\",\n \"currentPage\": \"cp\",\n \"duration\": \"du\",\n \"face_count\": \"fc\",\n \"faceCount\": \"fc\",\n \"height\": \"h\",\n \"initial_aspect_ratio\": \"iar\",\n \"initial_height\": \"ih\",\n \"initial_width\": \"iw\",\n \"initialAspectRatio\": \"iar\",\n \"initialHeight\": \"ih\",\n \"initialWidth\": \"iw\",\n \"initial_duration\": \"idu\",\n \"initialDuration\": \"idu\",\n \"page_count\": \"pc\",\n \"page_x\": \"px\",\n \"page_y\": \"py\",\n \"pageCount\": \"pc\",\n \"pageX\": \"px\",\n \"pageY\": \"py\",\n \"tags\": \"tags\",\n \"width\": \"w\",\n \"trimmed_aspect_ratio\": \"tar\",\n \"current_public_id\": \"cpi\",\n \"initial_density\": \"idn\",\n \"page_names\": \"pgnames\"\n};\nexport const 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};\nexport const 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};\nexport const 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};\nexport const 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};\nexport const 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};\nexport const CHROMA_VALUE_TO_CHROMA_MODEL_ENUM = {\n 444: \"CHROMA_444\",\n 420: \"CHROMA_420\"\n};\nexport const 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};\nexport const ACTION_TYPE_TO_BLEND_MODE_MAP = {\n 'antiRemoval': 'anti_removal'\n};\nexport const CHROMA_MODEL_ENUM_TO_CHROMA_VALUE = objectFlip(CHROMA_VALUE_TO_CHROMA_MODEL_ENUM);\nexport const COLOR_SPACE_MODE_TO_COLOR_SPACE_MODEL_MODE_MAP = objectFlip(COLOR_SPACE_MODEL_MODE_TO_COLOR_SPACE_MODE_MAP);\nexport const CROP_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_CROP_MODE_MAP);\nexport const DELIVERY_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_DELIVERY_MODE_MAP);\nexport const EFFECT_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_EFFECT_MODE_MAP);\nexport const QUALITY_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_QUALITY_MODE_MAP);\nexport const STREAMING_PROFILE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_STREAMING_PROFILE_MODE_MAP);\n","import { Action } from \"../../../internal/Action.js\";\nimport { QualifierValue } from \"../../../internal/qualifier/QualifierValue.js\";\nimport { Qualifier } from \"../../../internal/qualifier/Qualifier.js\";\nimport { ACTION_TYPE_TO_EFFECT_MODE_MAP, EFFECT_MODE_TO_ACTION_TYPE_MAP } from \"../../../internal/internalConstants.js\";\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}\nexport { SimpleEffectAction };\n","import { SimpleEffectAction } from \"./SimpleEffectAction.js\";\nimport { EFFECT_MODE_TO_ACTION_TYPE_MAP } from \"../../../internal/internalConstants.js\";\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}\nexport { LeveledEffectAction };\n","/**\n * Returns RGB or Color\n * @private\n * @param color\n */\nexport function prepareColor(color) {\n if (color) {\n return color.match(/^#/) ? `rgb:${color.substr(1)}` : color;\n }\n else {\n return color;\n }\n}\n","import { Action } from \"../../internal/Action.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\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}\nexport { VectorizeEffectAction };\n","import { LeveledEffectAction } from \"./LeveledEffectAction.js\";\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}\nexport { EffectActionWithLevel };\n","import { Action } from \"../../internal/Action.js\";\nimport { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\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}\nexport { AssistColorBlindEffectAction };\n","import { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { prepareColor } from \"../../internal/utils/prepareColor.js\";\nimport { EffectActionWithLevel } from \"./EffectActions/EffectActionWithLevel.js\";\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}\nexport { ColorizeEffectAction };\n","import { Qualifier } from \"../../../internal/qualifier/Qualifier.js\";\nimport { Action } from \"../../../internal/Action.js\";\nimport { custom, faces } from \"../../../qualifiers/region.js\";\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}\nexport { Pixelate };\n","import { BlurAction } from \"./effect/blur/Blur.js\";\nimport { AccelerationEffectAction } from \"./effect/leveled/Accelerate.js\";\nimport { LoopEffectAction } from \"./effect/leveled/Loop.js\";\nimport { CartoonifyEffect } from \"./effect/Cartoonify.js\";\nimport { EffectOutline } from \"./effect/Outline.js\";\nimport { SimpleEffectAction } from \"./effect/EffectActions/SimpleEffectAction.js\";\nimport { MakeTransparentEffectAction } from \"./effect/leveled/MakeTransparent.js\";\nimport { VectorizeEffectAction } from \"./effect/Vectorize.js\";\nimport { SimulateColorBlindEffectAction } from \"./effect/SimulateColorBlind.js\";\nimport { EffectActionWithLevel } from \"./effect/EffectActions/EffectActionWithLevel.js\";\nimport { AssistColorBlindEffectAction } from \"./effect/AssistColorBlind.js\";\nimport { GradientFadeEffectAction } from \"./effect/GradientFade.js\";\nimport { FadeOutEffectAction } from \"./effect/leveled/FadeOut.js\";\nimport { ColorizeEffectAction } from \"./effect/Colorize.js\";\nimport { ShadowEffectAction } from \"./effect/Shadow.js\";\nimport { StyleTransfer } from \"./effect/StyleTransfer.js\";\nimport { DitherEffectAction } from \"./effect/Dither.js\";\nimport { DeshakeEffectAction } from \"./effect/leveled/Deshake.js\";\nimport { Pixelate } from \"./effect/pixelate/Pixelate.js\";\nimport { EffectActionWithStrength } from \"./effect/EffectActions/EffectActionWithStrength.js\";\nimport { BlackwhiteEffectAction } from \"./effect/leveled/Blackwhite.js\";\nimport { FadeInEffectAction } from \"./effect/leveled/FadeIn.js\";\nimport { RemoveBackgroundAction } from \"./effect/RemoveBackgroundAction.js\";\nimport { ThemeEffect } from \"./effect/Theme.js\";\nimport { BackgroundRemoval } from \"./effect/BackgroundRemoval.js\";\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 Changes the color scheme of the image to sepia.\n * @memberOf Actions.Effect\n * @param {number} level The level of sepia to apply. (Range: 1 to 100, Server default: 80)\n * @return {Actions.Effect.EffectActionWithLevel}\n */\nfunction sepia(level) {\n return new EffectActionWithLevel('sepia', level);\n}\n/**\n * @summary action\n * @description Applies a shadow filter to the asset.\n * @memberOf Actions.Effect\n * @param shadowLevel\n * @return {Actions.Effect.ShadowEffectAction}\n */\nfunction shadow(shadowLevel) {\n return new ShadowEffectAction('shadow', shadowLevel);\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 Applies an oilPaint filter to the asset.\n * @memberOf Actions.Effect\n * @param {number} oilPaintLevel The strength of the effect. (Range: 0 to 100, Server default: 30)\n * @return {Actions.Effect.EffectActionWithStrength}\n */\nfunction oilPaint(oilPaintLevel) {\n return new EffectActionWithStrength('oil_paint', oilPaintLevel);\n}\n/**\n * @summary action\n * @description Applies an artistic filter to the asset.\n * @memberOf Actions.Effect\n * @param {ArtisticFilterType | string} artisticFilterType\n * @return {Actions.Effect.SimpleEffectAction}\n */\nfunction artisticFilter(artisticFilterType) {\n return new SimpleEffectAction('art', artisticFilterType);\n}\n/**\n * @summary action\n * @description Applies a cartoonify effect to the asset.\n * @memberOf Actions.Effect\n * @param cartoonifyLevel The thickness of the lines. (Range: 0 to 100, Server default: 50)\n * @return {Actions.Effect.CartoonifyEffect}\n */\nfunction cartoonify(cartoonifyLevel) {\n return new CartoonifyEffect('cartoonify', cartoonifyLevel);\n}\n/**\n * @summary action\n * @description Adds an outline to a transparent image. For examples, see the Image Transformations guide.\n * @memberOf Actions.Effect\n * @return {Actions.Effect.EffectOutline}\n */\nfunction outline() {\n return new EffectOutline();\n}\n/**\n * @summary action\n * @description Applies a complex deep learning neural network algorithm that extracts artistic styles from a source image and applies them to the content of a target photograph.
\n * Learn more: {@link https://cloudinary.com/documentation/neural_artwork_style_transfer_addon|Neural Artwork Style Transfer}\n * @memberOf Actions.Effect\n * @param {ImageSource} imageSource `import {image} from '@cloudinary/url-gen/qualifiers/sources`\n * @return {Actions.Effect.StyleTransfer}\n */\nfunction styleTransfer(imageSource) {\n return new StyleTransfer(imageSource);\n}\n/**\n * @summary action\n * @description\n * Causes a video clip to play forwards and then backwards.\n * Use in conjunction with trimming parameters ('duration', 'start_offset', or 'end_offset') and the 'loop' effect to deliver a classic (short, repeating) boomerang clip.
\n * For details and examples, see 'Create a boomerang video clip' in the Video Transformations guide.\n * @memberOf Actions.Effect\n * @return {Actions.Effect.SimpleEffectAction}\n */\nfunction boomerang() {\n return new SimpleEffectAction('boomerang');\n}\n/**\n * @summary action\n * @description\n * Removes red eyes with the Advanced Facial Attribute Detection add-on.\n * For details, see the Advanced Facial Attribute Detection add-on documentation.\n * @memberOf Actions.Effect\n * @return {Actions.Effect.SimpleEffectAction}\n */\nfunction advancedRedEye() {\n return new SimpleEffectAction('adv_redeye');\n}\n/**\n * @summary action\n * @description Converts the image to black and white.\n * @memberOf Actions.Effect\n * @param {number | string} level The balance between black (100) and white (0). (Range: 0 to 100, Server default: 50)\n * @return {Actions.Effect.BlackwhiteEffectAction}\n */\nfunction blackwhite(level) {\n return new BlackwhiteEffectAction('blackwhite', level);\n}\n/**\n * @summary action\n * @description Negates the image colors (negative).\n * @memberOf Actions.Effect\n * @return {Actions.Effect.SimpleEffectAction}\n */\nfunction negate() {\n return new SimpleEffectAction('negate');\n}\n/**\n * @summary action\n * @description Removes red eyes in the image.\n * @memberOf Actions.Effect\n * @return {Actions.Effect.SimpleEffectAction}\n */\nfunction redEye() {\n return new SimpleEffectAction('redeye');\n}\n/**\n * @summary action\n * @description Plays the video or audio file in reverse.\n * @memberOf Actions.Effect\n * @return {Actions.Effect.SimpleEffectAction}\n */\nfunction reverse() {\n return new SimpleEffectAction('reverse');\n}\n/**\n * @summary action\n * @description Changes the speed of the video playback.\n * @memberOf Actions.Effect\n * @param {number} speedIncreasePercent The percentage change of speed. Positive numbers speed up the playback, negative numbers slow down the playback (Range: -50 to 100, Server default: 0)\n * @return {Actions.Effect.AccelerationEffectAction}\n */\nfunction accelerate(speedIncreasePercent) {\n return new AccelerationEffectAction(speedIncreasePercent);\n}\n/**\n * @summary action\n * @description\n * Fade in at the beginning of the video.\n * For details and examples, see 'Fade in and out' in the Video Transformations guide.\n * @memberOf Actions.Effect\n * @param {number} fadeLength The time in ms for the fade to occur. (Server default: 2000)\n * @return {Actions.Effect.FadeInEffectAction}\n */\nfunction fadeIn(fadeLength) {\n return new FadeInEffectAction(fadeLength);\n}\n/**\n * @summary action\n * @description\n * Fade out at the end of the video.\n * For details and examples, see 'Fade in and out' in the Video Transformations guide.\n * @memberOf Actions.Effect\n * @param {number} fadeLength The time in ms for the fade to occur. (Server default: 2000)\n * @return {Actions.Effect.FadeoutEffectAction}\n */\nfunction fadeOut(fadeLength) {\n return new FadeOutEffectAction(fadeLength);\n}\n/**\n * @summary action\n * @description\n * Delivers a video or animated GIF that contains additional loops of the video/GIF.\n * The total number of iterations is the number of additional loops plus one.
\n * For animated GIFs only, you can also specify the loop effect without a numeric value to instruct it to loop the GIF infinitely.\n * @memberOf Actions.Effect\n * @param {number} additionalLoops The additional number of times to play the video or animated GIF.\n * @return {Actions.Effect.LoopEffectAction}\n */\nfunction loop(additionalLoops) {\n return new LoopEffectAction('loop', additionalLoops);\n}\n/**\n * @summary action\n * @description\n * Makes the background of the image transparent (or solid white for formats that do not support transparency).\n * The background is determined as all pixels that resemble the pixels on the edges of the image.\n *\n * @memberOf Actions.Effect\n * @param {number} tolerance The tolerance used to accommodate variance in the background color. (Range: 0 to 100, Server default: 10)\n * @return {Actions.Effect.MakeTransparentEffectAction}\n */\nfunction makeTransparent(tolerance) {\n return new MakeTransparentEffectAction('make_transparent', tolerance);\n}\n/**\n * @summary action\n * @description Adds visual noise to the video, visible as a random flicker of \"dots\" or \"snow\".\n * @memberOf Actions.Effect\n * @param {number} percentage The percent of noise to apply. (Range: 0 to 100 Server default: 0)\n * @return {Actions.Effect.EffectActionWithLevel}\n */\nfunction noise(percentage) {\n return new EffectActionWithLevel('noise', percentage);\n}\n/**\n * @summary action\n * @description Applies a vignette effect.\n * @memberOf Actions.Effect\n * @param {number} strength The strength of the vignette. (Range: 0 to 100, Server default: 20)\n * @return {Actions.Effect.EffectActionWithStrength}\n */\nfunction vignette(strength) {\n return new EffectActionWithStrength('vignette', strength);\n}\n/**\n * @summary action\n * @description\n * Applies an ordered dither filter to the image.\n * Use the constants defined in {@link Qualifiers.Dither|@cloudinary/url-gen/qualifiers/dither} for ditherType.\n * @memberOf Actions.Effect\n * @param {Qualifiers.Dither} ditherType - The dither type applied to the image\n * @return {Actions.Effect.DitherEffectAction}\n */\nfunction dither(ditherType) {\n return new DitherEffectAction('ordered_dither', ditherType);\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 a gradient fade effect from one edge of the image.\n * Use .x() or .y() to indicate from which edge to fade and how much of the image should be faded.\n * Values of x and y can be specified as a percentage (Range: 0.0 to 1.0), or in pixels (integer values).
\n * Positive values fade from the top (y) or left (x). Negative values fade from the bottom (y) or right (x).
\n * By default, the gradient is applied to the top 50% of the image (y = 0.5).
\n * Only one direction can be specified but the fade can be applied symmetrically using the mode parameter.
\n * To apply different amounts of fade to multiple edges, use chained fade effects.\n *\n * @memberOf Actions.Effect\n * @return {Actions.Effect.GradientFadeEffectAction}\n */\nfunction gradientFade() {\n return new GradientFadeEffectAction();\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\n * Simulates the way an image would appear to someone with the specified color blind condition.
\n * For a list of supported color blind conditions see {@link Qualifiers.SimulateColorBlindValues| types of color blindness} for possible values\n * @memberOf Actions.Effect\n * @return {Actions.Effect.SimulateColorBlindEffectAction}\n */\nfunction simulateColorBlind() {\n return new SimulateColorBlindEffectAction();\n}\n/**\n * @summary action\n * @description Removes small motion shifts from the video. with a maximum extent of movement in the horizontal and vertical direction of 32 pixels\n * @memberOf Actions.Effect\n * @return {Actions.Effect.DeshakeEffectAction}\n */\nfunction deshake(pixels) {\n return new DeshakeEffectAction('deshake', pixels);\n}\n/**\n * @summary action\n * @description Supports the concatenation of videos with a custom transition by including a transition video as an\n * additional layer and specifying the transition effect\n * @memberOf Actions.Effect\n * @return {Actions.Effect.SimpleEffectAction}\n */\nfunction transition() {\n return new SimpleEffectAction('transition');\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 * @summary action\n * @description Makes the background of an image transparent (or solid white for JPGs).
\n * Use when the background is a uniform color.\n * {@link https://cloudinary.com/documentation/transformation_reference#e_bgremoval|Background Removal}\n *\n * @memberOf Actions.Effect\n * @return {Actions.Effect.RemoveBackgroundAction}\n */\nfunction removeBackground() {\n return new RemoveBackgroundAction();\n}\n/**\n * @summary action\n * @description Uses the Cloudinary AI Background Removal add-on to make the background of an image transparent.
\n * When combined with other transformations, this effect must be specified in the first component.\n * {@link https://cloudinary.com/documentation/transformation_reference#e_background_removal|Background Removal}\n *\n * @memberOf Actions.Effect\n * @return {Actions.Effect.BackgroundRemoval}\n */\nfunction backgroundRemoval() {\n return new BackgroundRemoval();\n}\n/**\n *\n * @description Changes the main background color to the one specified, as if a 'theme change' was applied (e.g. dark mode vs light mode).\n * @param {SystemColors} color\n * @return {Actions.Effect.ThemeEffect}\n */\nfunction theme(color) {\n return new ThemeEffect(color);\n}\n/**\n * @description Defines effects that you can apply to transform your assets.\n * @memberOf Actions\n * @namespace Effect\n * @example\n * An extreme example of using many effects on the same asset\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * // Import everything, or just the action you need for tree-shaking purposes\n * import {Effect, sepia} from \"@cloudinary/url-gen/actions/effect\";\n * import {ArtisticFilter, alDente} from \"../../../src/qualifiers/artisticFilter\";\n * import {ShakeStrength, pixels16} from \"../../../src/qualifiers/shakeStrength\";\n *\n * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}});\n * const image = yourCldInstance.image('woman');\n *\n * image.effect(Effect.advancedRedEye())\n * .effect(Effect.accelerate())\n * .effect(Effect.accelerate(100))\n * .effect(Effect.accelerate().rate(5))\n * .effect(Effect.boomerang())\n * .effect(Effect.blackwhite())\n * .effect(Effect.blackwhite(10))\n * .effect(Effect.blackwhite().threshold(20))\n * .effect(Effect.fadeIn(100))\n * .effect(Effect.fadeIn().duration(5))\n * .effect(Effect.fadeOut(100))\n * .effect(Effect.fadeOut().duration(5))\n * .effect(Effect.grayscale())\n * .effect(Effect.loop())\n * .effect(Effect.loop(100))\n * .effect(Effect.loop().additionalIterations(5))\n * .effect(Effect.makeTransparent())\n * .effect(Effect.makeTransparent(100))\n * .effect(Effect.makeTransparent().tolerance(5))\n * .effect(Effect.makeTransparent().tolerance(5).colorToReplace('red'))\n * .effect(Effect.noise())\n * .effect(Effect.noise(100))\n * .effect(Effect.noise().level(5))\n * .effect(Effect.negate())\n * .effect(Effect.reverse())\n * .effect(Effect.redEye())\n * .effect(Effect.sepia())\n * .effect(Effect.sepia(100))\n * .effect(Effect.sepia().level(5))\n * .effect(Effect.vignette())\n * .effect(Effect.vignette(100))\n * .effect(Effect.vignette().strength(5))\n * .effect(Effect.deshake())\n * .effect(Effect.deshake(10))\n * .effect(Effect.artisticFilter(alDente())\n * .effect(Effect.deshake().shakeStrength(pixels16()))\n * .effect(Effect.backgroundRemoval().fineEdges(true).hints([ForegroundObject.DOG, ForegroundObject.CAT])\n */\nconst Effect = {\n pixelate: pixelate,\n deshake: deshake,\n boomerang: boomerang,\n advancedRedEye: advancedRedEye,\n blackwhite,\n negate: negate,\n redEye: redEye,\n reverse: reverse,\n accelerate: accelerate,\n fadeIn: fadeIn,\n fadeOut: fadeOut,\n loop: loop,\n makeTransparent: makeTransparent,\n noise: noise,\n vignette: vignette,\n blur: blur,\n grayscale: grayscale,\n sepia: sepia,\n shadow: shadow,\n colorize: colorize,\n oilPaint: oilPaint,\n artisticFilter: artisticFilter,\n cartoonify: cartoonify,\n outline: outline,\n styleTransfer: styleTransfer,\n gradientFade: gradientFade,\n vectorize: vectorize,\n assistColorBlind: assistColorBlind,\n simulateColorBlind: simulateColorBlind,\n transition: transition,\n dither: dither,\n removeBackground,\n backgroundRemoval,\n theme\n};\nexport { Effect, pixelate, deshake, boomerang, advancedRedEye, blackwhite, negate, redEye, reverse, accelerate, fadeIn, fadeOut, loop, makeTransparent, noise, vignette, blur, grayscale, sepia, shadow, colorize, oilPaint, artisticFilter, cartoonify, outline, styleTransfer, gradientFade, vectorize, assistColorBlind, simulateColorBlind, transition, dither, removeBackground, backgroundRemoval, theme };\n","import { Action } from \"../../../internal/Action.js\";\nimport { QualifierValue } from \"../../../internal/qualifier/QualifierValue.js\";\nimport { Qualifier } from \"../../../internal/qualifier/Qualifier.js\";\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}\nexport { BackgroundColor };\n","import { createUnsupportedError } from \"./utils/unsupportedError.js\";\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}\nexport { RawAction };\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}\nexport { isErrorObject };\n","/**\n * @description Defines flags that you can use to alter the default transformation behavior.\n * @namespace Flag\n * @memberOf Qualifiers\n */\nimport { FlagQualifier } from \"./flag/FlagQualifier.js\";\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Used when delivering a video file as an image format that supports animation, such as animated WebP.\n * Plays all frames rather than just delivering the first one as a static image.\n * Use this flag in addition to the flag or parameter controlling the delivery format,\n * for example f_auto or fl_awebp.\n\n * Note: When delivering a video in GIF format, it is delivered as an animated GIF by default and this flag is not\n * necessary. To deliver a single frame of a video in GIF format, use the page parameter.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction animated() {\n return new FlagQualifier('animated');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description When converting animated images to WebP format, generate an animated WebP from all the frames in the\n * original\n * animated file instead of only from the first still frame.\n *\n * Note that animated WebPs are not supported in all browsers and versions.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction animatedWebP() {\n return new FlagQualifier('awebp');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description When used together with automatic quality (q_auto):\n * allow switching to PNG8 encoding if the quality algorithm decides that it's more efficient.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction anyFormat() {\n return new FlagQualifier('any_format');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description When converting animated images to PNG format, generates an animated PNG from all the frames in the\n * original\n * animated file instead of only from the first still frame.\n *\n * Note that animated PNGs are not supported in all browsers and versions.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction animatedPng() {\n return new FlagQualifier('apng');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Trims pixels according to a clipping path included in the original image\n * (e.g., manually created using PhotoShop).\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction clip() {\n return new FlagQualifier('clip');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Trims pixels according to a clipping path included in the original image (e.g., manually created\n * using PhotoShop)\n * using an evenodd clipping rule.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction clipEvenOdd() {\n return new FlagQualifier('clip_evenodd');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Instructs Cloudinary to clear all image meta-data (IPTC, Exif and XMP) while applying an incoming\n * transformation.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction forceStrip() {\n return new FlagQualifier('force_strip');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Allows custom flag\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction custom(value) {\n return new FlagQualifier(value);\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Adds ICC color space metadata to the image, even when the original image doesn't contain any ICC data.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction forceIcc() {\n return new FlagQualifier('force_icc');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Delivers the image as an attachment.\n * @param {string} filename The attachment's filename\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction attachment(filename) {\n return new FlagQualifier('attachment', filename);\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Returns metadata of the input asset and of the transformed output asset in JSON instead of the\n * transformed image.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction getInfo() {\n return new FlagQualifier('getinfo');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Deliver an HLS adaptive bitrate streaming file as HLS v3 instead of the default version (HLS v4).\n * Delivering in this format requires a private CDN configuration.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction hlsv3() {\n return new FlagQualifier('hlsv3');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Sets the cache-control to immutable for the asset.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction immutableCache() {\n return new FlagQualifier('immutable_cache');\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 Keeps the copyright related fields when stripping meta-data.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction keepAttribution() {\n return new FlagQualifier('keep_attribution');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * Keep the Display Aspect Ratio metadata of the uploaded video (if it’s different from the current video\n * dimensions).\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction keepDar() {\n return new FlagQualifier('keep_dar');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Keeps all meta-data.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction keepIptc() {\n return new FlagQualifier('keep_iptc');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Applies all chained transformations, until a transformation component that includes this flag, on the last added\n * overlay or underlay instead of applying on the containing image.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction layerApply() {\n return new FlagQualifier('layer_apply');\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 Convert the audio channel to mono\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction mono() {\n return new FlagQualifier('mono');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Used internally by Position within an Overlay, this flag will tile the overlay across your image.\n *\n * Learn more: {@link https://cloudinary.com/documentation/transformation_reference#fl_no_overflow|Overflow in overlays}\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction noOverflow() {\n return new FlagQualifier('no_overflow');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Don't stream a video that is currently being generated on the fly. Wait until the video is fully generated.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction noStream() {\n return new FlagQualifier('no_stream');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Generate PNG images in the png24 format.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction png24() {\n return new FlagQualifier('png24');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Generate PNG images in the png32 format.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction png32() {\n return new FlagQualifier('png32');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Generate PNG images in the PNG8 format.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction png8() {\n return new FlagQualifier('png8');\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 Reduces the image to one flat pixelated layer (as opposed to the default vector based graphic) in\n * order to enable\n * PDF resizing and overlay manipulations.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction rasterize() {\n return new FlagQualifier('rasterize');\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 * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Instructs Cloudinary to run a sanitizer on the image (relevant only for the SVG format).\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction sanitize() {\n return new FlagQualifier('sanitize');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Splices the video stipulated as an overlay on to the end of the container video instead of adding it as an\n * overlay.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction splice() {\n return new FlagQualifier('splice');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Instructs Cloudinary to clear all ICC color profile data included with the image.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction stripProfile() {\n return new FlagQualifier('strip_profile');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description If the requested video transformation has already been generated, this flag works identically to\n * Flag::attachment.\n *\n * However, if the video transformation is being requested for the first time, this flag causes the video download\n * to begin immediately, streaming it as a fragmented video file.\n *\n * In contrast, if the regular fl_attachment flag is used when a user requests a new video transformation,\n * the download will begin only after the complete transformed video has been generated.\n *\n * Most standard video players successfully play fragmented video files without issue.\n *\n * @param {string} filename The attachment's filename\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction streamingAttachment(filename) {\n return new FlagQualifier('streaming_attachment', filename);\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Generates TIFF images using LZW compression and in the TIFF8 format.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction tiff8Lzw() {\n return new FlagQualifier('tiff8_lzw');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Used internally by Position within an Overlay, this flag will tile the overlay across your image.\n *\n * Learn more: {@link https://cloudinary.com/documentation/layers#automatic_tiling|Tiling overlay}\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction tiled() {\n return new FlagQualifier('tiled');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Truncate (trim) a video file based on the start time defined in the metadata (relevant only where the metadata\n * includes a directive to play only a section of the video).\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction truncateTS() {\n return new FlagQualifier('truncate_ts');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Create a waveform image (in the format specified by the file extension) from the audio or video file.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction waveform() {\n return new FlagQualifier('waveform');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description A qualifier that ensures that an alpha channel is not applied to a TIFF image if it is a mask channel.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction ignoreMaskChannels() {\n return new FlagQualifier('ignore_mask_channels');\n}\nconst Flag = {\n animated, anyFormat, animatedPng, animatedWebP,\n clipEvenOdd, lossy, preserveTransparency, png8, png24, png32, progressive, rasterize,\n sanitize, stripProfile, tiff8Lzw, attachment, forceIcc, forceStrip, getInfo, immutableCache,\n keepAttribution, keepIptc, custom, streamingAttachment, hlsv3, keepDar, noStream, mono,\n layerApply, relative, regionRelative, splice, truncateTS, waveform, ignoreInitialAspectRatio, clip,\n tiled, noOverflow, ignoreMaskChannels\n};\nexport { Flag, animated, anyFormat, animatedPng, animatedWebP, clipEvenOdd, lossy, preserveTransparency, png8, png24, png32, progressive, rasterize, sanitize, stripProfile, tiff8Lzw, attachment, forceIcc, forceStrip, getInfo, immutableCache, keepAttribution, keepIptc, custom, streamingAttachment, hlsv3, keepDar, noStream, mono, layerApply, relative, regionRelative, splice, truncateTS, waveform, ignoreInitialAspectRatio, clip, tiled, noOverflow, ignoreMaskChannels };\n","import { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\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}\nexport { FormatQualifier };\n","import { Action } from \"../../internal/Action.js\";\nimport { FormatQualifier } from \"../../qualifiers/format/FormatQualifier.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { DELIVERY_MODE_TO_ACTION_TYPE_MAP } from \"../../internal/internalConstants.js\";\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}\nexport { DeliveryAction };\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 */\nimport { FlagQualifier } from \"./flag/FlagQualifier.js\";\nclass ProgressiveQualifier extends FlagQualifier {\n constructor(mode) {\n super('progressive', mode);\n }\n}\n/**\n * @memberOf Qualifiers.Progressive\n */\nfunction none() {\n return new ProgressiveQualifier('none');\n}\n/**\n * @memberOf Qualifiers.Progressive\n */\nfunction semi() {\n return new ProgressiveQualifier('semi');\n}\n/**\n * @memberOf Qualifiers.Progressive\n */\nfunction steep() {\n return new ProgressiveQualifier('steep');\n}\n/**\n * @memberOf Qualifiers.Progressive\n */\nfunction progressive() {\n return new ProgressiveQualifier();\n}\nconst Progressive = {\n semi,\n none,\n steep,\n progressive,\n ProgressiveQualifier\n};\nexport { Progressive, semi, none, steep, progressive, ProgressiveQualifier };\n","import { lossy, preserveTransparency, progressive } from \"../../qualifiers/flag.js\";\nimport { DeliveryAction } from \"./DeliveryAction.js\";\nimport { ProgressiveQualifier } from \"../../qualifiers/progressive.js\";\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}\nexport { DeliveryFormatAction };\n","import { Action } from \"../internal/Action.js\";\nimport { BackgroundColor } from \"../actions/background/actions/BackgroundColor.js\";\nimport { prepareColor } from \"../internal/utils/prepareColor.js\";\nimport { FlagQualifier } from \"../qualifiers/flag/FlagQualifier.js\";\nimport { RawAction } from \"../internal/RawAction.js\";\nimport { isErrorObject } from \"../internal/models/IErrorObject.js\";\nimport { DeliveryFormatAction } from \"../actions/delivery/DeliveryFormatAction.js\";\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/effects_and_artistic_enhancements#distort|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 * @desc An alias to Action Delivery.quality\n * @param {string|number} quality\n * @return {this}\n */\n quality(quality) {\n this.addAction(new DeliveryFormatAction('q', quality));\n return this;\n }\n /**\n * @desc An alias to Action Delivery.format\n * @param {string} format\n * @return {this}\n */\n format(format) {\n this.addAction(new DeliveryFormatAction('f', format));\n return this;\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}\nexport { Transformation };\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 */\nexport function 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","import { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\n/**\n * @memberOf Qualifiers.AspectRatio\n * @extends {SDK.QualifierValue}\n */\nexport class AspectRatioQualifierValue extends QualifierValue {\n}\n","import { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { Action } from \"../../internal/Action.js\";\nimport { toFloatAsString } from \"../../internal/utils/toFloatAsString.js\";\nimport { AspectRatioQualifierValue } from \"../../qualifiers/aspectRatio/AspectRatioQualifierValue.js\";\nimport { ignoreInitialAspectRatio, regionRelative, relative } from \"../../qualifiers/flag.js\";\nimport { FlagQualifier } from \"../../qualifiers/flag/FlagQualifier.js\";\nimport { ACTION_TYPE_TO_CROP_MODE_MAP, CROP_MODE_TO_ACTION_TYPE_MAP } from \"../../internal/internalConstants.js\";\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}\nexport { ResizeSimpleAction };\n","import { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\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}\nexport { GravityQualifier };\n","import { GravityQualifier } from \"../GravityQualifier.js\";\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}\nexport { AutoGravity };\n","import { GravityQualifier } from \"../GravityQualifier.js\";\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}\nexport { FocusOnGravity };\n","import { GravityQualifier } from \"../GravityQualifier.js\";\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}\nexport { CompassGravity };\n","import { CompassGravity } from \"./gravity/compassGravity/CompassGravity.js\";\nimport { FocusOnGravity } from \"./gravity/focusOnGravity/FocusOnGravity.js\";\nimport { AutoGravity } from \"./gravity/autoGravity/AutoGravity.js\";\nimport { XYCenterGravity } from \"./gravity/xyCenterGravity/XYCenterGravity.js\";\n/**\n * @description Defines the gravity based on directional values from a compass.\n * Learn more: {@link https://cloudinary.com/documentation/resizing_and_cropping#control_gravity|Control gravity for images}\n * Learn more: {@link https://cloudinary.com/documentation/video_resizing_and_cropping#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 * @summary qualifier\n * @description Set the center of gravity to the given x & y coordinates.\n * @memberOf Qualifiers.Gravity\n * @return {XYCenterGravity}\n */\nfunction xyCenter() {\n return new XYCenterGravity();\n}\n/**\n * @description A qualifier that determines which part of an asset to focus on, and thus which part of the asset to keep,
\n * when any part of the asset is cropped. For overlays, this setting determines where to place the overlay.\n * @namespace Gravity\n * @memberOf Qualifiers\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 *\n * // Expand every function separately to see its own example\n */\nconst Gravity = {\n compass: compass,\n autoGravity: autoGravity,\n focusOn: focusOn,\n xyCenter\n};\nexport { Gravity, compass, autoGravity, focusOn, xyCenter };\n","import { QualifierValue } from \"../../../../internal/qualifier/QualifierValue.js\";\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}\nexport { FocusOnValue };\n","import { FocusOnValue } from \"./gravity/qualifiers/focusOn/FocusOnValue.js\";\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects birds\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction bird() {\n return new FocusOnValue('bird');\n}\n/**\n * @summary qualifier\n * @description Detects dogs\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction dog() {\n return new FocusOnValue('dog');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects cats\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction cat() {\n return new FocusOnValue('cat');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects microwaves\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction microwave() {\n return new FocusOnValue('microwave');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects refrigerators\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction refrigerator() {\n return new FocusOnValue('refrigerator');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects bottles\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction bottle() {\n return new FocusOnValue('bottle');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects sinks\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction sink() {\n return new FocusOnValue('sink');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects skateboards\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction skateboard() {\n return new FocusOnValue('skateboard');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects people\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction person() {\n return new FocusOnValue('person');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects the largest face in an image with the Advanced Facial Attribute Detection add-on and makes it the focus of the transformation.\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction advancedFace() {\n return new FocusOnValue('adv_face');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects all faces in an image with the Advanced Facial Attribute Detection add-on and makes them the focus of the transformation.\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction advancedFaces() {\n return new FocusOnValue('adv_faces');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects all eyes in an image with the Advanced Facial Attribute Detection add-on and makes them the focus of the transformation.\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction advancedEyes() {\n return new FocusOnValue('adv_eyes');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects the largest face in the asset and makes it the focus of the transformation.\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction face() {\n return new FocusOnValue('face');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects all the faces in the asset and makes them the focus of the transformation.\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction faces() {\n return new FocusOnValue('faces');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects all the faces in the asset and makes them the focus of the transformation.\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction background() {\n return new FocusOnValue('background');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects aeroplane\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction aeroplane() {\n return new FocusOnValue('aeroplane');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects bicycle\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction bicycle() {\n return new FocusOnValue('bicycle');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects boat\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction boat() {\n return new FocusOnValue('boat');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects bus\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction bus() {\n return new FocusOnValue('bus');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects car\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction car() {\n return new FocusOnValue('car');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects chair\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction chair() {\n return new FocusOnValue('chair');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects cow\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction cow() {\n return new FocusOnValue('cow');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects diningtable\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction diningtable() {\n return new FocusOnValue('diningtable');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects horse\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction horse() {\n return new FocusOnValue('horse');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects motorbike\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction motorbike() {\n return new FocusOnValue('motorbike');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects pottedplant\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction pottedplant() {\n return new FocusOnValue('pottedplant');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects sheep\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction sheep() {\n return new FocusOnValue('sheep');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects sofa\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction sofa() {\n return new FocusOnValue('sofa');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects train\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction train() {\n return new FocusOnValue('train');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects tvmonitor\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction tvmonitor() {\n return new FocusOnValue('tvmonitor');\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/ocr_text_detection_and_extraction_addon|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 * @memberOf Qualifiers\n * @namespace FocusOn\n * @see Visit {@link Qualifiers.Gravity|Gravity} for an example\n */\nconst FocusOn = {\n person,\n cat,\n microwave,\n refrigerator,\n skateboard,\n bird,\n bottle,\n dog,\n sink,\n face,\n train,\n sofa,\n sheep,\n pottedplant,\n horse,\n faces,\n cow,\n bus,\n boat,\n advancedEyes,\n advancedFace,\n advancedFaces,\n aeroplane,\n background,\n bicycle,\n car,\n chair,\n diningtable,\n tvmonitor,\n motorbike,\n ocr\n};\nexport { FocusOnValue, FocusOn, person, cat, microwave, refrigerator, skateboard, bird, bottle, dog, sink, face, train, sofa, sheep, pottedplant, horse, faces, cow, bus, boat, advancedEyes, advancedFace, advancedFaces, aeroplane, background, bicycle, car, chair, diningtable, tvmonitor, motorbike, ocr };\n","import { AutoGravity } from \"../../qualifiers/gravity/autoGravity/AutoGravity.js\";\nimport { FocusOnGravity } from \"../../qualifiers/gravity/focusOnGravity/FocusOnGravity.js\";\nimport { autoGravity } from \"../../qualifiers/gravity.js\";\nimport { FocusOnValue } from \"../../qualifiers/focusOn.js\";\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 */\nexport function 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","import { QualifierValue } from \"../internal/qualifier/QualifierValue.js\";\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}\nexport { AutoFocus };\n","import { QualifierValue } from \"../../../../internal/qualifier/QualifierValue.js\";\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}\nexport { CompassQualifier };\n","import { autoGravity, focusOn } from \"../../qualifiers/gravity.js\";\nimport { FocusOnValue, ocr } from \"../../qualifiers/focusOn.js\";\nimport { AutoFocus } from \"../../qualifiers/autoFocus.js\";\nimport { CompassGravity } from \"../../qualifiers/gravity/compassGravity/CompassGravity.js\";\nimport { CompassQualifier } from \"../../qualifiers/gravity/qualifiers/compass/CompassQualifier.js\";\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}\nexport { createGravityFromModel };\n","import { ResizeSimpleAction } from \"./ResizeSimpleAction.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { createGravityModel } from \"../../internal/models/createGravityModel.js\";\nimport { createGravityFromModel } from \"../../internal/models/createGravityFromModel.js\";\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}\nexport { ResizeAdvancedAction };\n","import { Qualifier } from \"../../../../internal/qualifier/Qualifier.js\";\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}\nexport { BackgroundQualifier };\n","import { BackgroundQualifier } from \"./base/BackgroundQualifier.js\";\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}\nexport default BlurredBackgroundAction;\n","import { prepareColor } from \"../../../../internal/utils/prepareColor.js\";\nimport { BackgroundQualifier } from \"./BackgroundQualifier.js\";\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}\nexport { BaseCommonBackground };\n","import { BaseCommonBackground } from \"../base/BaseCommonBackground.js\";\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}\nexport { BackgroundAutoBorderQualifier };\n","import { BaseCommonBackground } from \"./BaseCommonBackground.js\";\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}\nexport { BaseGradientBackground };\n","import { BaseGradientBackground } from \"../base/BaseGradientBackground.js\";\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}\nexport { BackgroundBorderGradientQualifier };\n","import { BaseGradientBackground } from \"../base/BaseGradientBackground.js\";\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}\nexport { BackgroundPredominantGradientQualifier };\n","import { BaseCommonBackground } from \"../base/BaseCommonBackground.js\";\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}\nexport { BackgroundAutoPredominantQualifier };\n","import BlurredBackgroundAction from \"../../qualifiers/background/shared/BlurredBackgroundAction.js\";\nimport { BackgroundAutoBorderQualifier } from \"../../qualifiers/background/shared/auto/BackgroundAutoBorderQualifier.js\";\nimport { BackgroundBorderGradientQualifier } from \"../../qualifiers/background/shared/gradient/BackgroundBorderGradientQualifier.js\";\nimport { BackgroundPredominantGradientQualifier } from \"../../qualifiers/background/shared/gradient/BackgroundPredominantGradientQualifier.js\";\nimport { BackgroundAutoPredominantQualifier } from \"../../qualifiers/background/shared/auto/BackgroundAutoPredominantQualifier.js\";\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) {\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}\nexport { createBackgroundModel };\n","import { FormatQualifier } from \"./format/FormatQualifier.js\";\n/**\n * @description Contains functions to select the asset format, can be used to convert images and videos to other formats.\n * @memberOf Qualifiers\n * @namespace Format\n * @see Visit {@link Actions.Delivery.format|Delivery Format} for an example\n */\n/**\n * @summary qualifier\n * @description Image format heic.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction heic() { return new FormatQualifier('heic'); }\n/**\n * @summary qualifier\n * @description Image format flif.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction flif() { return new FormatQualifier('flif'); }\n/**\n * @summary qualifier\n * @description Image format ai.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction ai() { return new FormatQualifier('ai'); }\n/**\n * @summary qualifier\n * @description Image format wdp.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction wdp() { return new FormatQualifier('wdp'); }\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 webp.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction webp() { return new FormatQualifier('webp'); }\n/**\n * @summary qualifier\n * @description Image format psd.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction psd() { return new FormatQualifier('psd'); }\n/**\n * @summary qualifier\n * @description Image format jp2.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction jp2() { return new FormatQualifier('jp2'); }\n/**\n * @summary qualifier\n * @description Image format jpc.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction jpc() { return new FormatQualifier('jpc'); }\n/**\n * @summary qualifier\n * @description Image format eps.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction eps() { return new FormatQualifier('eps'); }\n/**\n * @summary qualifier\n * @description Image format tiff.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction tiff() { return new FormatQualifier('tiff'); }\n/**\n * @summary qualifier\n * @description Image format pdf.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction pdf() { return new FormatQualifier('pdf'); }\n/**\n * @summary qualifier\n * @description Image format ico.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction ico() { return new FormatQualifier('ico'); }\n/**\n * @summary qualifier\n * @description Image format bmp.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction bmp() { return new FormatQualifier('bmp'); }\n/**\n * @summary qualifier\n * @description Image format png.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction png() { return new FormatQualifier('png'); }\n/**\n * @summary qualifier\n * @description Image format gif.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction gif() { return new FormatQualifier('gif'); }\n/**\n * @summary qualifier\n * @description Image format auto.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction auto() { return new FormatQualifier('auto'); }\n/**\n * @summary qualifier\n * @description Image format jpg.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction jpg() { return new FormatQualifier('jpg'); }\n/**\n * @summary qualifier\n * @description Image format djvu.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction djvu() { return new FormatQualifier('djvu'); }\n/**\n * @summary qualifier\n * @description Image format ps.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction ps() { return new FormatQualifier('ps'); }\n/**\n * @summary qualifier\n * @description Image format ept.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction ept() { return new FormatQualifier('ept'); }\n/**\n * @summary qualifier\n * @description Image format eps3.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction eps3() { return new FormatQualifier('eps3'); }\n/**\n * @summary qualifier\n * @description Image format fxb.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction fxb() { return new FormatQualifier('fxb'); }\n/**\n * @summary qualifier\n * @description Image format gltf.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction gltf() { return new FormatQualifier('gltf'); }\n/**\n * @summary qualifier\n * @description Image format heif.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction heif() { return new FormatQualifier('heif'); }\n/**\n * @summary qualifier\n * @description Image format indd.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction indd() { return new FormatQualifier('indd'); }\n/**\n * @summary qualifier\n * @description Image format jpe.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction jpe() { return new FormatQualifier('jpe'); }\n/**\n * @summary qualifier\n * @description Image format jpeg.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction jpeg() { return new FormatQualifier('jpeg'); }\n/**\n * @summary qualifier\n * @description Image format jxr.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction jxr() { return new FormatQualifier('jxr'); }\n/**\n * @summary qualifier\n * @description Image format hdp.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction hdp() { return new FormatQualifier('hdp'); }\n/**\n * @summary qualifier\n * @description Image format spd.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction spd() { return new FormatQualifier('spd'); }\n/**\n * @summary qualifier\n * @description Image format arw.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction arw() { return new FormatQualifier('arw'); }\n/**\n * @summary qualifier\n * @description Image format cr2.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction cr2() { return new FormatQualifier('cr2'); }\n/**\n * @summary qualifier\n * @description Image format tga.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction tga() { return new FormatQualifier('tga'); }\n/**\n * @summary qualifier\n * @description Image format tif.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction tif() { return new FormatQualifier('tif'); }\n/**\n * @summary qualifier\n * @description Image format avif.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction avif() { return new FormatQualifier('avif'); }\n/**\n * @summary qualifier\n * @description format usdz.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction usdz() { return new FormatQualifier('usdz'); }\n/**\n * @summary qualifier\n * @description Image format 3g2.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction video3g2() { return new FormatQualifier('3g2'); }\n/**\n * @summary qualifier\n * @description Image format 3gp.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction video3gp() { return new FormatQualifier('3gp'); }\n/**\n * @summary qualifier\n * @description Image format avi.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoAvi() { return new FormatQualifier('avi'); }\n/**\n * @summary qualifier\n * @description Image format flv.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoFlv() { return new FormatQualifier('flv'); }\n/**\n * @summary qualifier\n * @description Image format m3u8.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoM3u8() { return new FormatQualifier('m3u8'); }\n/**\n * @summary qualifier\n * @description Image format ts.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoTs() { return new FormatQualifier('ts'); }\n/**\n * @summary qualifier\n * @description Image format mov.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoMov() { return new FormatQualifier('mov'); }\n/**\n * @summary qualifier\n * @description Image format mkv.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoMkv() { return new FormatQualifier('mkv'); }\n/**\n * @summary qualifier\n * @description Image format mp4.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoMp4() { return new FormatQualifier('mp4'); }\n/**\n * @summary qualifier\n * @description Image format mpeg.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoMpeg() { return new FormatQualifier('mpeg'); }\n/**\n * @summary qualifier\n * @description Image format mpd.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoMpd() { return new FormatQualifier('mpd'); }\n/**\n * @summary qualifier\n * @description Image format mxf.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoMxf() { return new FormatQualifier('mxf'); }\n/**\n * @summary qualifier\n * @description Image format ogv.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoOgv() { return new FormatQualifier('ogv'); }\n/**\n * @summary qualifier\n * @description Image format webm.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoWebm() { return new FormatQualifier('webm'); }\n/**\n * @summary qualifier\n * @description Image format wmv.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoWmv() { return new FormatQualifier('wmv'); }\n/**\n * @summary qualifier\n * @description Image format m2ts.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoM2ts() { return new FormatQualifier('m2ts'); }\n/**\n * @summary qualifier\n * @description Image format mts.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoMts() { return new FormatQualifier('mts'); }\n/**\n * @summary qualifier\n * @description Audio format aac.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioAac() { return new FormatQualifier('aac'); }\n/**\n * @summary qualifier\n * @description Audio format aiff.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioAiff() { return new FormatQualifier('aiff'); }\n/**\n * @summary qualifier\n * @description Audio format amr.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioAmr() { return new FormatQualifier('amr'); }\n/**\n * @summary qualifier\n * @description Audio format flac.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioFlac() { return new FormatQualifier('flac'); }\n/**\n * @summary qualifier\n * @description Audio format m4a.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioM4a() { return new FormatQualifier('m4a'); }\n/**\n * @summary qualifier\n * @description Audio format mp3.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioMp3() { return new FormatQualifier('mp3'); }\n/**\n * @summary qualifier\n * @description Audio format ogg.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioOgg() { return new FormatQualifier('ogg'); }\n/**\n * @summary qualifier\n * @description Audio format opus.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioOpus() { return new FormatQualifier('opus'); }\n/**\n * @summary qualifier\n * @description Audio format wav.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioWav() { return new FormatQualifier('wav'); }\n/**\n * @summary qualifier\n * @description Image format glb.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction glb() { return new FormatQualifier('glb'); }\nconst Format = { usdz, jp2, ai, auto, bmp, eps, flif, gif, heic, ico, jpc, jpg, pdf, png, psd, svg, tiff, wdp, webp, arw, audioAac, audioAiff, audioAmr, audioFlac, audioM4a, audioMp3, audioOgg, audioOpus, audioWav, avif, cr2, djvu, eps3, ept, fxb, gltf, hdp, heif, indd, jpe, jpeg, jxr, ps, spd, tga, tif, video3g2, video3gp, videoAvi, videoFlv, videoM2ts, videoM3u8, videoMkv, videoMov, videoMp4, videoMpd, videoMpeg, videoMts, videoMxf, videoOgv, videoTs, videoWebm, videoWmv, glb };\nexport { usdz, jp2, ai, auto, bmp, eps, flif, gif, heic, ico, jpc, jpg, pdf, png, psd, svg, tiff, wdp, webp, arw, audioAac, audioAiff, audioAmr, audioFlac, audioM4a, audioMp3, audioOgg, audioOpus, audioWav, avif, cr2, djvu, eps3, ept, fxb, gltf, hdp, heif, indd, jpe, jpeg, jxr, ps, spd, tga, tif, video3g2, video3gp, videoAvi, videoFlv, videoM2ts, videoM3u8, videoMkv, videoMov, videoMp4, videoMpd, videoMpeg, videoMts, videoMxf, videoOgv, videoTs, videoWebm, videoWmv, glb, Format };\n","import { prepareColor } from \"../internal/utils/prepareColor.js\";\nimport { BackgroundAutoBorderQualifier } from \"./background/shared/auto/BackgroundAutoBorderQualifier.js\";\nimport { BackgroundBorderGradientQualifier } from \"./background/shared/gradient/BackgroundBorderGradientQualifier.js\";\nimport { BackgroundAutoPredominantQualifier } from \"./background/shared/auto/BackgroundAutoPredominantQualifier.js\";\nimport { BackgroundPredominantGradientQualifier } from \"./background/shared/gradient/BackgroundPredominantGradientQualifier.js\";\nimport BlurredBackgroundAction from \"./background/shared/BlurredBackgroundAction.js\";\nimport { BackgroundQualifier } from \"./background/shared/base/BackgroundQualifier.js\";\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/effects_and_artistic_enhancements#setting_background_color|Setting background for images} | {@link https://cloudinary.com/documentation/video_effects_and_enhancements#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/effects_and_artistic_enhancements#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();\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};\nexport { auto, border, borderGradient, predominantGradient, predominant, color, blurred, Background };\n","import { Background } from \"../../qualifiers.js\";\nimport { auto, border, borderGradient, color, predominant, predominantGradient } from \"../../qualifiers/background.js\";\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}\nexport { createBackgroundFromModel };\n","import { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { ResizeAdvancedAction } from \"./ResizeAdvancedAction.js\";\nimport { createBackgroundModel } from \"../../internal/models/createBackgroundModel.js\";\nimport { createBackgroundFromModel } from \"../../internal/models/createBackgroundFromModel.js\";\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}\nexport { ResizePadAction };\n","import { ResizeSimpleAction } from \"./ResizeSimpleAction.js\";\nimport { GravityQualifier } from \"../../qualifiers/gravity/GravityQualifier.js\";\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}\nexport { ResizeScaleAction };\n","import { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { ResizeAdvancedAction } from \"./ResizeAdvancedAction.js\";\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}\nexport { ResizeCropAction };\n","import { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { ResizeAdvancedAction } from \"./ResizeAdvancedAction.js\";\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}\nexport { ResizeFillAction };\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.toString()\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.toString()\n */\nimport { ResizePadAction } from \"./resize/ResizePadAction.js\";\nimport { ResizeSimpleAction } from \"./resize/ResizeSimpleAction.js\";\nimport { ResizeScaleAction } from \"./resize/ResizeScaleAction.js\";\nimport { ThumbResizeAction } from \"./resize/ThumbnailAction.js\";\nimport { ResizeCropAction } from \"./resize/ResizeCropAction.js\";\nimport { ResizeFillAction } from \"./resize/ResizeFillAction.js\";\nimport { ResizeLimitFitAction } from \"./resize/ResizeLimitFitAction.js\";\nimport { ResizeLimitFillAction } from \"./resize/ResizeLimitFillAction.js\";\nimport { ResizeLimitPadAction } from \"./resize/ResizeLimitPadAction.js\";\nimport { ResizeMinimumPadAction } from \"./resize/ResizeMinimumPadAction.js\";\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\n * Scales your image based on automatically calculated areas of interest within each specific photo.\n *\n * For details, see the Imagga Crop and Scale {@link https://cloudinary.com/documentation/imagga_crop_and_scale_addon#smartly_scale_images|add-on documentation}.\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.ResizeSimpleAction}\n */\nfunction imaggaScale(width, height) {\n return new ResizeSimpleAction('imagga_scale', width, height);\n}\n/**\n * @summary action\n * @description\n * Crops your image based on automatically calculated areas of interest within each specific photo.\n *\n * For details, see the Imagga Crop and Scale {@link https://cloudinary.com/documentation/imagga_crop_and_scale_addon#smartly_crop_images|add-on documentation}.\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.ResizeSimpleAction}\n */\nfunction imaggaCrop(width, height) {\n return new ResizeSimpleAction('imagga_crop', 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 * The image is resized so that it takes up as much space as possible within a bounding box defined by the given width and height parameters.
\n * The original aspect ratio is retained and all of the original image is visible.\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.ResizeSimpleAction}\n */\nfunction fit(width, height) {\n return new ResizeSimpleAction('fit', 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 * @summary action\n * @description\n * Creates an asset with the exact given width and height without distorting the asset, but only if the original\n * asset is larger than the specified resolution limits.\n *\n * The asset is scaled down to fill the given width and height without distorting the asset, and then the dimension\n * that exceeds the request is cropped. If the original dimensions are both smaller than the requested size, it is\n * not resized at all.\n *\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.ResizeLimitFillAction}\n */\nfunction limitFill(width, height) {\n return new ResizeLimitFillAction('lfill', width, height);\n}\n/**\n * @summary action\n * @description\n * Resizes the asset so that it takes up as much space as possible within a bounding box defined by the given\n * width and height parameters, but only if the original asset is larger than the given limit (width and height).\n *\n * The asset is scaled down, the original aspect ratio is retained and all of the original asset is visible.\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.ResizeSimpleAction}\n */\nfunction limitFit(width, height) {\n return new ResizeLimitFitAction('limit', 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, but only if the\n * original asset is smaller than the given minimum (width and height).\n *\n * The asset is scaled up. If the proportions of the original asset do not match the given width and height,\n * padding is added to the asset 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 minimumPad(width, height) {\n return new ResizeMinimumPadAction('mpad', width, height);\n}\n/**\n * @summary action\n * @description\n * Resizes the asset so that it takes up as much space as possible within a bounding box defined by the given\n * width and height parameters, but only if the original asset is smaller than the given minimum (width and height).\n *\n * The asset is scaled up, the original aspect ratio is retained and all of the original asset is visible.\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.ResizeSimpleAction}\n */\nfunction minimumFit(width, height) {\n return new ResizeSimpleAction('mfit', width, height);\n}\n/**\n * @summary action\n * @memberOf Actions.Resize\n * @description\n * Tries to prevent a \"bad crop\" by first attempting to use the fill mode, but adding padding if it is determined\n * that more of the original image needs to be included in the final image.\n *\n * Especially useful if the aspect ratio of the delivered image is considerably different from the original's\n * aspect ratio.\n *\n * Only supported in conjunction with Automatic cropping.\n *\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 fillPad(width, height) {\n return new ResizePadAction('fill_pad', width, height);\n}\n/**\n * @summary action\n * @description\n * The thumb cropping mode is specifically used for creating image thumbnails from either face or custom coordinates,
\n * and must always be accompanied by the gravity parameter set to one of the face detection or custom values.\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.ThumbResizeAction}\n */\nfunction thumbnail(width, height) {\n return new ThumbResizeAction('thumb', 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, but only if the\n * original asset is larger than the given limit (width and height).\n *\n * The asset is scaled down. If the proportions of the original asset do not match the given width and height,\n * padding is added to the asset to reach the required size.\n *\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 limitPad(width, height) {\n return new ResizeLimitPadAction('lpad', width, height);\n}\nconst Resize = {\n imaggaScale,\n imaggaCrop,\n crop,\n fill,\n scale,\n minimumPad,\n fit,\n pad,\n limitFit,\n thumbnail,\n limitFill,\n minimumFit,\n limitPad,\n fillPad\n};\nexport { Resize, imaggaScale, imaggaCrop, crop, fill, scale, minimumPad, fit, pad, limitFit, thumbnail, limitFill, minimumFit, limitPad, fillPad };\n","import { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { DeliveryAction } from \"./DeliveryAction.js\";\nimport { CHROMA_VALUE_TO_CHROMA_MODEL_ENUM, CHROMA_MODEL_ENUM_TO_CHROMA_VALUE, ACTION_TYPE_TO_QUALITY_MODE_MAP } from \"../../internal/internalConstants.js\";\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_optimization#toggle_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}\nexport { DeliveryQualityAction };\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 */\nimport { DeliveryFormatAction } from \"./delivery/DeliveryFormatAction.js\";\nimport { DeliveryQualityAction } from \"./delivery/DeliveryQualityAction.js\";\nimport { DeliveryColorSpaceFromICCAction } from \"./delivery/DeliveryColorSpaceFromICCAction.js\";\nimport { DeliveryAction } from \"./delivery/DeliveryAction.js\";\nimport { DeliveryColorSpaceAction } from \"./delivery/DeliveryColorSpaceAction.js\";\nimport { DeliveryDPRAction } from \"./delivery/DeliveryDPRAction.js\";\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 Deliver the image in the specified device pixel ratio.\n * @memberOf Actions.Delivery\n * @param {string} dpr The DPR (Device Pixel Ratio). Any positive float value.\n * @return {Actions.Delivery.DeliveryAction}\n * @example\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {dpr} 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 * dpr('2.0'),\n * );\n */\nfunction dpr(dpr) {\n return new DeliveryDPRAction(dpr);\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_optimization#how_to_optimize_video_quality|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 * @summary action\n * @description Controls the density to use when delivering an image or when converting a vector file such as a PDF or EPS\n * document to a web image delivery format.\n * @memberOf Actions.Delivery\n * @param {number | string} value The density in dpi.\n * @return {Actions.Delivery.DeliveryAction}\n * @example\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {density} 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 * density(150),\n * );\n */\nfunction density(value) {\n return new DeliveryAction('dn', value, 'density');\n}\n/**\n * @summary action\n * @description Default images can be used in the case that a requested image does not exist.\n * @memberOf Actions.Delivery\n * @param {string} publicIdWithExtension Default image public ID\n * @return {Actions.Delivery.DeliveryAction}\n * @example\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {defaultImage} 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 * defaultImage('sample'),\n * );\n */\nfunction defaultImage(publicIdWithExtension) {\n return new DeliveryAction('d', publicIdWithExtension, 'defaultImage');\n}\n/**\n * @summary action\n * @description Controls the color space used for the delivered image.\n * @memberOf Actions.Delivery\n * @param {string | Qualifiers.ColorSpace} mode The color space.\n * @return {Actions.Delivery.DeliveryAction}\n * @example\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {colorSpace} from \"@cloudinary/url-gen/actions/delivery\";\n * import {trueColor} from \"@cloudinary/url-gen/qualifiers/colorSpace\";\n *\n * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}});\n * const image = yourCldInstance.image('woman');\n * image.delivery(\n * colorSpace(trueColor()),\n * );\n */\nfunction colorSpace(mode) {\n return new DeliveryColorSpaceAction(mode);\n}\n/**\n * @summary action\n * @description Specifies the ICC profile to use for the color space.\n * The ICC file must be uploaded to your account as a raw, authenticated file.\n * @memberOf Actions.Delivery\n * @param {string} publicId The public ID (including the file extension) of the ICC profile that defines the\n * color space.\n * @return {Actions.Delivery.DeliveryColorSpaceFromICC}\n * @example\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {colorSpaceFromICC} from \"@cloudinary/url-gen/actions/delivery\";\n * import {trueColor} from \"@cloudinary/url-gen/qualifiers/colorSpace\";\n *\n * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}});\n * const image = yourCldInstance.image('woman');\n * image.delivery(\n * colorSpaceFromICC('sample.icc'),\n * );\n */\nfunction colorSpaceFromICC(publicId) {\n return new DeliveryColorSpaceFromICCAction(publicId);\n}\nconst Delivery = {\n format,\n dpr,\n density,\n defaultImage,\n colorSpace,\n colorSpaceFromICC,\n quality\n};\nexport { Delivery, format, dpr, quality, density, defaultImage, colorSpace, colorSpaceFromICC };\n","import { CompassQualifier } from \"./gravity/qualifiers/compass/CompassQualifier.js\";\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description South center part (bottom center).\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction south() {\n return new CompassQualifier('south');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description North center part (top center).\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction north() {\n return new CompassQualifier('north');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description Middle east part (right).\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction east() {\n return new CompassQualifier('east');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description Middle west part (left).\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction west() {\n return new CompassQualifier('west');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description North west corner (top left).\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction northWest() {\n return new CompassQualifier('north_west');\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 * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description South west corner (bottom left).\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction southWest() {\n return new CompassQualifier('south_west');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description South east corner (bottom right).\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction southEast() {\n return new CompassQualifier('south_east');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description The center of the image.\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction center() {\n return new CompassQualifier('center');\n}\n/**\n * @description Defines the focal Compass for certain methods of cropping.\n * @namespace Compass\n * @memberOf Qualifiers\n * @see Visit {@link Qualifiers.Gravity|Gravity} for an example\n */\nclass Compass {\n}\nCompass.north = north;\nCompass.west = west;\nCompass.east = east;\nCompass.south = south;\nCompass.center = center;\nCompass.northWest = northWest;\nCompass.southEast = southEast;\nCompass.southWest = southWest;\nCompass.northEast = northEast;\nexport { Compass, north, west, east, south, center, northWest, southEast, southWest, northEast };\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 global == 'object' && global && global.Object === Object && global;\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\nmodule.exports = debounce;\n"],"names":["global","BlurredBackgroundAction","auto"],"mappings":";;;;;;;;;;;;;;AASA;AACA,IAAI,gBAAgB,GAAG,GAAG,CAAC;AAC3B;AACA;AACA,IAAI,cAAc,GAAG,2BAA2B,CAAC;AACjD;AACA;AACA,IAAI,gBAAgB,GAAG,gBAAgB,CAAC;AACxC;AACA;AACA,IAAI,OAAO,GAAG,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,QAAQ,CAAC;AACzE,KAAK,CAAC,oBAAoB,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,CAAC;AAC3F,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,WAAW,CAAC,KAAK,EAAE;AAC5B,EAAE,OAAO,KAAK,IAAI,IAAI,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AACvE,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,iBAAiB,CAAC,KAAK,EAAE;AAClC,EAAE,OAAO,YAAY,CAAC,KAAK,CAAC,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC;AACnD,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,QAAQ,GAAG,cAAc,IAAI,SAAS,CAAC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,UAAU,CAAC,KAAK,EAAE;AAC3B;AACA;AACA,EAAE,IAAI,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AAC9D,EAAE,OAAO,GAAG,IAAI,OAAO,IAAI,GAAG,IAAI,MAAM,CAAC;AACzC,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,QAAQ,CAAC,KAAK,EAAE;AACzB,EAAE,OAAO,OAAO,KAAK,IAAI,QAAQ;AACjC,IAAI,KAAK,GAAG,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,gBAAgB,CAAC;AAC9D,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,QAAQ,CAAC,KAAK,EAAE;AACzB,EAAE,IAAI,IAAI,GAAG,OAAO,KAAK,CAAC;AAC1B,EAAE,OAAO,CAAC,CAAC,KAAK,KAAK,IAAI,IAAI,QAAQ,IAAI,IAAI,IAAI,UAAU,CAAC,CAAC;AAC7D,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,YAAY,CAAC,KAAK,EAAE;AAC7B,EAAE,OAAO,CAAC,CAAC,KAAK,IAAI,OAAO,KAAK,IAAI,QAAQ,CAAC;AAC7C,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,IAAI,CAAC,MAAM,EAAE;AACtB,EAAE,OAAO,WAAW,CAAC,MAAM,CAAC,GAAG,aAAa,CAA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QAAQ,GAAG,CAAC,GAAG,CAAC,CAAC;AACpD,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AAC9C,CAAC;AACD;AACA,IAAA,eAAc,GAAG,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/packages/html/index.js b/packages/html/index.js new file mode 100644 index 00000000..825f6da1 --- /dev/null +++ b/packages/html/index.js @@ -0,0 +1,5713 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +var lodash_clonedeep = {exports: {}}; + +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +(function (module, exports) { +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = +cloneableTags[boolTag] = cloneableTags[dateTag] = +cloneableTags[float32Tag] = cloneableTags[float64Tag] = +cloneableTags[int8Tag] = cloneableTags[int16Tag] = +cloneableTags[int32Tag] = cloneableTags[mapTag] = +cloneableTags[numberTag] = cloneableTags[objectTag] = +cloneableTags[regexpTag] = cloneableTags[setTag] = +cloneableTags[stringTag] = cloneableTags[symbolTag] = +cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = +cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Detect free variable `exports`. */ +var freeExports = exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** + * Adds the key-value `pair` to `map`. + * + * @private + * @param {Object} map The map to modify. + * @param {Array} pair The key-value pair to add. + * @returns {Object} Returns `map`. + */ +function addMapEntry(map, pair) { + // Don't return `map.set` because it's not chainable in IE 11. + map.set(pair[0], pair[1]); + return map; +} + +/** + * Adds `value` to `set`. + * + * @private + * @param {Object} set The set to modify. + * @param {*} value The value to add. + * @returns {Object} Returns `set`. + */ +function addSetEntry(set, value) { + // Don't return `set.add` because it's not chainable in IE 11. + set.add(value); + return set; +} + +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array ? array.length : 0; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array ? array.length : 0; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeKeys = overArg(Object.keys, Object); + +/* Built-in method references that are verified to be native. */ +var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), + Set = getNative(root, 'Set'), + WeakMap = getNative(root, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + this.__data__ = new ListCache(entries); +} + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new ListCache; +} + +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + return this.__data__['delete'](key); +} + +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} + +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var cache = this.__data__; + if (cache instanceof ListCache) { + var pairs = cache.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + return this; + } + cache = this.__data__ = new MapCache(pairs); + } + cache.set(key, value); + return this; +} + +// Add methods to `Stack`. +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + // Safari 9 makes `arguments.length` enumerable in strict mode. + var result = (isArray(value) || isArguments(value)) + ? baseTimes(value.length, String) + : []; + + var length = result.length, + skipIndexes = !!length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && (key == 'length' || isIndex(key, length)))) { + result.push(key); + } + } + return result; +} + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + object[key] = value; + } +} + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); +} + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @param {boolean} [isFull] Specify a clone including symbols. + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, isDeep, isFull, customizer, key, object, stack) { + var result; + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + if (isHostObject(value)) { + return object ? value : {}; + } + result = initCloneObject(isFunc ? {} : value); + if (!isDeep) { + return copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, baseClone, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (!isArr) { + var props = isFull ? getAllKeys(value) : keys(value); + } + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); + }); + return result; +} + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ +function baseCreate(proto) { + return isObject(proto) ? objectCreate(proto) : {}; +} + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); +} + +/** + * The base implementation of `getTag`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + return objectToString.call(value); +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var result = new buffer.constructor(buffer.length); + buffer.copy(result); + return result; +} + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; +} + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +/** + * Creates a clone of `map`. + * + * @private + * @param {Object} map The map to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned map. + */ +function cloneMap(map, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map); + return arrayReduce(array, addMapEntry, new map.constructor); +} + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +/** + * Creates a clone of `set`. + * + * @private + * @param {Object} set The set to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned set. + */ +function cloneSet(set, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set); + return arrayReduce(array, addSetEntry, new set.constructor); +} + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} + +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + assignValue(object, key, newValue === undefined ? source[key] : newValue); + } + return object; +} + +/** + * Copies own symbol properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); +} + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); +} + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Creates an array of the own enumerable symbol properties of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = baseGetTag; + +// Fallback for data views, maps, sets, and weak maps in IE 11, +// for data views in Edge < 14, and promises in Node.js. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = objectToString.call(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : undefined; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; +} + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; +} + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, cloneFunc, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return cloneMap(object, isDeep, cloneFunc); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return cloneSet(object, isDeep, cloneFunc); + + case symbolTag: + return cloneSymbol(object); + } +} + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ +function cloneDeep(value) { + return baseClone(value, true, true); +} + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +module.exports = cloneDeep; +}(lodash_clonedeep, lodash_clonedeep.exports)); + +var cloneDeep = lodash_clonedeep.exports; + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + 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; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +/** + * Iterate through plugins and break in cases where the response is canceled. The + * response is canceled if component is updated or unmounted + * @param element {HTMLImageElement|HTMLVideoElement} Html Image or Video element + * @param pluginCloudinaryAsset {CloudinaryImage|CloudinaryVideo} The Cloudinary asset generated by base + * @param plugins {plugins} array of plugins passed in by the user + * @param pluginState {htmlPluginState} Holds cleanup callbacks and event subscriptions + */ +function render(element, pluginCloudinaryAsset, plugins, pluginState) { + return __awaiter(this, void 0, void 0, function () { + var i, response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (plugins === undefined) + return [2 /*return*/]; + i = 0; + _a.label = 1; + case 1: + if (!(i < plugins.length)) return [3 /*break*/, 4]; + return [4 /*yield*/, plugins[i](element, pluginCloudinaryAsset, pluginState)]; + case 2: + response = _a.sent(); + if (response === 'canceled') { + return [3 /*break*/, 4]; + } + _a.label = 3; + case 3: + i++; + return [3 /*break*/, 1]; + case 4: return [2 /*return*/]; + } + }); + }); +} + +var HtmlImageLayer = /** @class */ (function () { + function HtmlImageLayer(element, userCloudinaryImage, plugins, analyticsOptions) { + var _this = this; + this.imgElement = element; + this.htmlPluginState = { cleanupCallbacks: [], pluginEventSubscription: [] }; + var pluginCloudinaryImage = cloneDeep(userCloudinaryImage); + render(element, pluginCloudinaryImage, plugins, this.htmlPluginState) + .then(function () { + _this.htmlPluginState.pluginEventSubscription.forEach(function (fn) { fn(); }); + _this.imgElement.setAttribute('src', pluginCloudinaryImage.toURL({ + trackedAnalytics: { + sdkCode: analyticsOptions.sdkCode, + sdkSemver: analyticsOptions.sdkSemver, + techVersion: analyticsOptions.techVersion, + } + })); + }); + } + /** + * Called when component is updated and re-triggers render + * @param userCloudinaryImage + * @param plugins + * @param analyticsOptions + */ + HtmlImageLayer.prototype.update = function (userCloudinaryImage, plugins, analyticsOptions) { + var _this = this; + var pluginCloudinaryImage = cloneDeep(userCloudinaryImage); + render(this.imgElement, pluginCloudinaryImage, plugins, this.htmlPluginState) + .then(function () { + _this.imgElement.setAttribute('src', pluginCloudinaryImage.toURL({ + trackedAnalytics: { + sdkCode: analyticsOptions.sdkCode, + sdkSemver: analyticsOptions.sdkSemver, + techVersion: analyticsOptions.techVersion, + } + })); + }); + }; + return HtmlImageLayer; +}()); + +/** + * @summary SDK + * @memberOf SDK + */ +class QualifierValue { + /** + * + * @param {QualifierValue | QualifierValue[] | any[] | string | number}qualifierValue + */ + constructor(qualifierValue) { + this.values = []; + this.delimiter = ':'; // {value}{delimiter}{value}... + if (this.hasValue(qualifierValue)) { + this.addValue(qualifierValue); + } + } + /** + * @description Joins the provided values with the provided delimiter + */ + toString() { + return this.values.join(this.delimiter); + } + /** + * @description Checks if the provided argument has a value + * @param {any} v + * @private + * @return {boolean} + */ + hasValue(v) { + return typeof v !== 'undefined' && v !== null && v !== ''; + } + /** + * @desc Adds a value for the this qualifier instance + * @param {any} value + * @return {this} + */ + addValue(value) { + // Append value or array of values + if (Array.isArray(value)) { + this.values = this.values.concat(value); + } + else { + this.values.push(value); + } + // Remove falsy values + this.values = this.values.filter((v) => this.hasValue(v)); + return this; + } + /** + * @description Sets the delimiter for this instance + * @param delimiter + */ + setDelimiter(delimiter) { + this.delimiter = delimiter; + return this; + } +} + +class UnsupportedError extends Error { + constructor(message = 'Unsupported') { + super(message); + } +} +/** + * Creates a new UnsupportedError + * @param message + */ +function createUnsupportedError(message) { + return new UnsupportedError(message); +} + +/** + * Returns the action's model + */ +function qualifierToJson() { + return this._qualifierModel || { error: createUnsupportedError(`unsupported qualifier ${this.constructor.name}`) }; +} + +class QualifierModel { + constructor() { + this._qualifierModel = {}; + } + toJson() { + return qualifierToJson.apply(this); + } +} + +/** + * @summary SDK + * @memberOf SDK + */ +class Qualifier extends QualifierModel { + constructor(key, qualifierValue) { + super(); + this.delimiter = '_'; // {key}{delimiter}{qualifierValue} + this.key = key; + if (qualifierValue instanceof QualifierValue) { + this.qualifierValue = qualifierValue; + } + else { + this.qualifierValue = new QualifierValue(); + this.qualifierValue.addValue(qualifierValue); + } + } + toString() { + const { key, delimiter, qualifierValue } = this; + return `${key}${delimiter}${qualifierValue.toString()}`; + } + addValue(value) { + this.qualifierValue.addValue(value); + return this; + } +} + +/** + * @memberOf Qualifiers.Flag + * @extends {SDK.Qualifier} + * @description the FlagQualifier class + */ +class FlagQualifier extends Qualifier { + constructor(flagType, flagValue) { + let qualifierValue; + if (flagValue) { + qualifierValue = new QualifierValue([flagType, `${flagValue}`]).setDelimiter(':'); + } + else { + qualifierValue = flagType; + } + super('fl', qualifierValue); + this.flagValue = flagValue; + } + toString() { + return super.toString().replace(/\./, '%2E'); + } + getFlagValue() { + return this.flagValue; + } +} + +/** + * Sort a map by key + * @private + * @param map + * @Return array of map's values sorted by key + */ +function mapToSortedArray(map, flags) { + const array = Array.from(map.entries()); + // objects from the Array.from() method above are stored in array of arrays: + // [[qualifierKey, QualifierObj], [qualifierKey, QualifierObj]] + // Flags is an array of FlagQualifierObj + // We need to convert it to the same form: [flagQualifier] => ['fl', flagQualifier] + flags.forEach((flag) => { + array.push(['fl', flag]); // push ['fl', flagQualifier] + }); + return array.sort().map((v) => v[1]); +} + +/** + * Returns the action's model + */ +function actionToJson() { + const actionModelIsNotEmpty = this._actionModel && Object.keys(this._actionModel).length; + if (actionModelIsNotEmpty) { + return this._actionModel; + } + return { error: createUnsupportedError(`unsupported action ${this.constructor.name}`) }; +} + +class ActionModel { + constructor() { + this._actionModel = {}; + } + toJson() { + return actionToJson.apply(this); + } +} + +/** + * @summary SDK + * @memberOf SDK + * @description Defines the category of transformation to perform. + */ +class Action extends ActionModel { + constructor() { + super(...arguments); + // We're using map, to overwrite existing keys. for example: + // addParam(w_100).addQualifier(w_200) should result in w_200. and not w_100,w_200 + this.qualifiers = new Map(); + // Unlike regular qualifiers, there can be multiple flags in each url component /fl_1,fl_2/ + // If the falgs are added to the qualifiers map, only a single flag could exist in a component (it's a map) + // So flags are stored separately until the very end because of that reason + this.flags = []; + this.delimiter = ','; // {qualifier}{delimiter}{qualifier} for example: `${'w_100'}${','}${'c_fill'}` + this.actionTag = ''; // A custom name tag to identify this action in the future + } + prepareQualifiers() { } + /** + * @description Returns the custom name tag that was given to this action + * @return {string} + */ + getActionTag() { + return this.actionTag; + } + /** + * @description Sets the custom name tag for this action + * @return {this} + */ + setActionTag(tag) { + this.actionTag = tag; + return this; + } + /** + * @description Calls toString() on all child qualifiers (implicitly by using .join()). + * @return {string} + */ + toString() { + this.prepareQualifiers(); + return mapToSortedArray(this.qualifiers, this.flags).join(this.delimiter); + } + /** + * @description Adds the parameter to the action. + * @param {SDK.Qualifier} qualifier + * @return {this} + */ + addQualifier(qualifier) { + // if string, find the key and value + if (typeof qualifier === 'string') { + const [key, value] = qualifier.toLowerCase().split('_'); + if (key === 'fl') { + // if string qualifier is a flag, store it in the flags arrays + this.flags.push(new FlagQualifier(value)); + } + else { + // if the string qualifier is not a flag, create a new qualifier from it + this.qualifiers.set(key, new Qualifier(key, value)); + } + } + else { + // if a qualifier object, insert to the qualifiers map + this.qualifiers.set(qualifier.key, qualifier); + } + return this; + } + /** + * @description Adds a flag to the current action. + * @param {Qualifiers.Flag} flag + * @return {this} + */ + addFlag(flag) { + if (typeof flag === 'string') { + this.flags.push(new FlagQualifier(flag)); + } + else { + if (flag instanceof FlagQualifier) { + this.flags.push(flag); + } + } + return this; + } + addValueToQualifier(qualifierKey, qualifierValue) { + this.qualifiers.get(qualifierKey).addValue(qualifierValue); + return this; + } +} + +/** + * @memberOf Qualifiers.Region + */ +class NamedRegion extends Action { + constructor(type) { + super(); + this.regionType = type; + } +} + +/** + * @memberOf Qualifiers.Region + */ +class CustomRegion extends NamedRegion { + constructor() { + super('named'); + } + /** + * @description The x position in pixels. + * @param {number} x + */ + x(x) { + this.addQualifier(new Qualifier('x', x)); + return this; + } + /** + * @description The y position in pixels. + * @param {number} y + */ + y(y) { + this.addQualifier(new Qualifier('y', y)); + return this; + } + /** + * @description The width of the region in pixels. + * @param {number} width + */ + width(width) { + this.addQualifier(new Qualifier('w', width)); + return this; + } + /** + * @description The height of the region in pixels. + * @param {number} height + */ + height(height) { + this.addQualifier(new Qualifier('h', height)); + return this; + } +} + +/** + * @summary qualifier + * @memberOf Qualifiers.Region + * @return {Qualifiers.Region.CustomRegion} + */ +function custom() { + return new CustomRegion(); +} +/** + * @summary qualifier + * @memberOf Qualifiers.Region + * @return {Qualifiers.Region.NamedRegion} + */ +function faces() { + return new NamedRegion('faces'); +} + +/** + * @description The Action class of the blur Builder. + * @extends SDK.Action + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ +class BlurAction extends Action { + constructor(strength) { + super(); + this._actionModel = {}; + this._strength = strength; + this._actionModel.actionType = 'blur'; + this._actionModel.strength = strength; + } + /** + * @description Specifies the region to blur. + * @param {NamedRegion} blurRegion + */ + region(blurRegion) { + this._actionModel.region = { RegionType: blurRegion.regionType }; + this._region = blurRegion; + return this; + } + /** + * @description Sets the strength of the blur effect. + * @param {number | string} strength + */ + strength(strength) { + this._strength = strength; + this._actionModel.strength = strength; + return this; + } + prepareQualifiers() { + /* + * Blur with region is a unique object in this codebase. + * On top of Blur being an Action with Qualifiers, + * it also accepts a Qualifier called Region. + * + * This Qualifier is in itself composite of qualifiers (such as height, or width). + * The existence of Region changes the output of Blur in non traditional ways + * which forced this relatively ad-hoc implementation. + * + * Aside from all of that, all of the Qualifiers in the component should be alphabetized + * This happens naturally in the Action class, + * however since we're dealing with two levels of qualifiers (Blur and Region), + * these need to be merged. + * + * This function will merge the Region qualifiers with Blur + * and add all needed implicit qualifiers (like g_ocr_text). + * We're not using the full Gravity Qualifier here to prevent the code import for such a simplistic case + */ + const str = this._strength ? `:${this._strength}` : ''; + if ('_region' in this) { + const qualifiers = this._region.qualifiers; + // Copy qualifiers from the region "action" to the blur action + qualifiers.forEach((q) => this.addQualifier(q)); + if (this._region.regionType === 'named') { + this.addQualifier(new Qualifier('e', `blur_region${str}`)); + } + if (this._region.regionType === 'ocr_text') { + this.addQualifier(new Qualifier('e', `blur_region${str}`)); + this.addQualifier(new Qualifier('g', `ocr_text`)); + } + if (this._region.regionType === 'faces') { + this.addQualifier(new Qualifier('e', `blur_faces${str}`)); + } + } + else { + this.addQualifier(new Qualifier('e', `blur${str}`)); + } + } + static fromJson(actionModel) { + const { actionType, strength, region } = actionModel; + // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel]) + // This allows the inheriting classes to determine the class to be created + const result = new this(strength); + strength && result.strength(strength); + if (region && region.RegionType === 'faces') { + result.region(faces()); + } + if (region && region.RegionType === 'custom') { + result.region(custom()); + } + return result; + } +} + +/** + * Flip keys and values for given object + * @param obj + */ +function objectFlip(obj) { + const result = {}; + Object.keys(obj).forEach((key) => { + result[obj[key]] = key; + }); + return result; +} + +/** + * This file is for internal constants only. + * It is not intended for public use and is not part of the public API + */ +const ACTION_TYPE_TO_CROP_MODE_MAP = { + limitFit: 'limit', + limitFill: 'lfill', + minimumFit: 'mfit', + thumbnail: 'thumb', + limitPad: 'lpad', + minimumPad: 'mpad' +}; +const ACTION_TYPE_TO_DELIVERY_MODE_MAP = { + colorSpace: 'cs', + dpr: 'dpr', + density: 'dn', + defaultImage: 'd', + format: 'f', + quality: 'q' +}; +const ACTION_TYPE_TO_EFFECT_MODE_MAP = { + redEye: 'redeye', + advancedRedEye: 'adv_redeye', + oilPaint: 'oil_paint', + unsharpMask: 'unsharp_mask', + makeTransparent: 'make_transparent' +}; +const ACTION_TYPE_TO_QUALITY_MODE_MAP = { + autoBest: 'auto:best', + autoEco: 'auto:eco', + autoGood: 'auto:good', + autoLow: 'auto:low', + jpegminiHigh: 'jpegmini:1', + jpegminiMedium: 'jpegmini:2', + jpegminiBest: 'jpegmini:0' +}; +const ACTION_TYPE_TO_STREAMING_PROFILE_MODE_MAP = { + fullHd: 'full_hd', + fullHdWifi: 'full_hd_wifi', + fullHdLean: 'full_hd_lean', + hdLean: 'hd_lean' +}; +const CHROMA_VALUE_TO_CHROMA_MODEL_ENUM = { + 444: "CHROMA_444", + 420: "CHROMA_420" +}; +const COLOR_SPACE_MODEL_MODE_TO_COLOR_SPACE_MODE_MAP = { + 'noCmyk': 'no_cmyk', + 'keepCmyk': 'keep_cmyk', + 'tinySrgb': 'tinysrgb', + 'srgbTrueColor': 'srgb:truecolor' +}; +const CHROMA_MODEL_ENUM_TO_CHROMA_VALUE = objectFlip(CHROMA_VALUE_TO_CHROMA_MODEL_ENUM); +objectFlip(COLOR_SPACE_MODEL_MODE_TO_COLOR_SPACE_MODE_MAP); +const CROP_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_CROP_MODE_MAP); +const DELIVERY_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_DELIVERY_MODE_MAP); +const EFFECT_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_EFFECT_MODE_MAP); +objectFlip(ACTION_TYPE_TO_QUALITY_MODE_MAP); +objectFlip(ACTION_TYPE_TO_STREAMING_PROFILE_MODE_MAP); + +/** + * @description A class that defines a simple effect of the type e_{effectName} + * @extends SDK.Action + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ +class SimpleEffectAction extends Action { + constructor(effectType, level) { + super(); + this._actionModel = {}; + this._actionModel.actionType = EFFECT_MODE_TO_ACTION_TYPE_MAP[effectType] || effectType; + const qualifierEffect = this.createEffectQualifier(effectType, level); + this.addQualifier(qualifierEffect); + } + createEffectQualifier(effectType, level) { + let qualifierValue; + if (level) { + qualifierValue = new QualifierValue([effectType, `${level}`]).setDelimiter(':'); + } + else { + qualifierValue = new QualifierValue(effectType); + } + return new Qualifier('e', qualifierValue); + } + static fromJson(actionModel) { + const { actionType, level, strength } = actionModel; + const effectType = ACTION_TYPE_TO_EFFECT_MODE_MAP[actionType] || actionType; + // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel]) + // This allows the inheriting classes to determine the class to be created + // @ts-ignore + const result = new this(effectType, level ? level : strength); + return result; + } +} + +/** + * @description A base class for effects with a level, the extending class needs to implement a method that calls setLevel() + * @extends {Actions.Effect.SimpleEffectAction} + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ +class LeveledEffectAction extends SimpleEffectAction { + constructor(effectType, level) { + super(effectType, level); + this.LEVEL_NAME = 'level'; + this._actionModel = {}; + this.effectType = effectType; + this._actionModel.actionType = EFFECT_MODE_TO_ACTION_TYPE_MAP[effectType] || effectType; + if (level) { + this.setLevel(level); + } + } + /** + * + * @description Sets the effect level for the action + * @param {string | number} level - The strength of the effect + * @protected + */ + setLevel(level) { + this._actionModel[this.LEVEL_NAME] = level; + const qualifierEffect = this.createEffectQualifier(this.effectType, level); + this.addQualifier(qualifierEffect); + return this; + } +} + +/** + * Returns RGB or Color + * @private + * @param color + */ +function prepareColor(color) { + if (color) { + return color.match(/^#/) ? `rgb:${color.substr(1)}` : color; + } + else { + return color; + } +} + +/** + * @description Vectorizes the image. + * @extends SDK.Action + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ +class VectorizeEffectAction extends Action { + constructor() { + super(); + this._actionModel = {}; + this._actionModel.actionType = 'vectorize'; + } + /** + * @description The number of colors. (Range: 2 to 30, Server default: 10) + * @param {number | string} num + * @return {this} + */ + numOfColors(num) { + this._actionModel.numOfColors = num; + this._numOfColors = num; + return this; + } + /** + * @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) + * @param {number | string} num + * @return {this} + */ + detailsLevel(num) { + this._actionModel.detailLevel = num; + this._detailsLevel = num; + return this; + } + /** + * @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) + * @param {number | string} num + * @return {this} + */ + despeckleLevel(num) { + this._actionModel.despeckleLevel = num; + this._despeckleLevel = num; + return this; + } + /** + * @description The corner threshold. Specify 100 for no smoothing (polygon corners), 0 for completely smooth corners. (Range: 0 to 100, Default: 25) + * @param {number | string} num + * @return {this} + */ + cornersLevel(num) { + this._actionModel.cornersLevel = num; + this._cornersLevel = num; + return this; + } + /** + * @description The optimization value. Specify 100 for least optimization and the largest file. (Range: 0 to 100, Server default: 100). + * @param {number} num + * @return {this} + */ + paths(num) { + this._actionModel.paths = num; + this._paths = num; + return this; + } + prepareQualifiers() { + let str = 'vectorize'; + if (this._numOfColors) { + str += `:${new QualifierValue(`colors:${this._numOfColors}`).toString()}`; + } + if (this._detailsLevel) { + str += `:${new QualifierValue(`detail:${this._detailsLevel}`).toString()}`; + } + if (this._despeckleLevel) { + str += `:${new QualifierValue(`despeckle:${this._despeckleLevel}`).toString()}`; + } + if (this._paths) { + str += `:${new QualifierValue(`paths:${this._paths}`).toString()}`; + } + if (this._cornersLevel) { + str += `:${new QualifierValue(`corners:${this._cornersLevel}`).toString()}`; + } + this.addQualifier(new Qualifier('e', str)); + } + static fromJson(actionModel) { + const { actionType, paths, cornersLevel, despeckleLevel, detailLevel, numOfColors } = actionModel; + // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel]) + // This allows the inheriting classes to determine the class to be created + const result = new this(); + paths && result.paths(paths); + cornersLevel && result.cornersLevel(cornersLevel); + despeckleLevel && result.despeckleLevel(despeckleLevel); + detailLevel && result.detailsLevel(detailLevel); + numOfColors && result.numOfColors(numOfColors); + return result; + } +} + +/** + * @description A class that provides a built in level() method that sets the level of the effect + * @extends {Actions.Effect.LeveledEffectAction} + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ +class EffectActionWithLevel extends LeveledEffectAction { + level(value) { + this._actionModel.level = value; + return this.setLevel(value); + } +} + +/** + * @description Applies stripes to the image to help people with common color-blind conditions to differentiate between colors that are similar for them. + * You can replace colors using the xray() method. + * @extends SDK.Action + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ +class AssistColorBlindEffectAction extends Action { + constructor() { + super(); + this._actionModel = {}; + this._actionModel.actionType = 'assistColorblind'; + this.addQualifier(new Qualifier('e', new QualifierValue('assist_colorblind'))); + } + /** + * @description Replaces problematic colors with colors that are easier to differentiate. + * @return {this} + */ + xray() { + this._actionModel.type = 'xray'; + return this.addQualifier(new Qualifier('e', new QualifierValue(['assist_colorblind', 'xray']).setDelimiter(':'))); + } + /** + * @description Applies stripes of the specified intensity to help people with common color blind conditions to differentiate between colors that are similar for them. + * @param {number | string} strength The intensity of the stripes. (Range: 1 to 100, Server default: 10) + * @return {this} + */ + stripesStrength(strength) { + this._actionModel.type = 'stripes'; + this._actionModel.stripesStrength = strength; + return this.addQualifier(new Qualifier('e', new QualifierValue(['assist_colorblind', strength]).setDelimiter(':'))); + } + static fromJson(actionModel) { + const { actionType, type, stripesStrength } = actionModel; + // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel]) + // This allows the inheriting classes to determine the class to be created + const result = new this(); + if (type === 'xray') { + result.xray(); + } + if (type === 'stripes') { + stripesStrength && result.stripesStrength(stripesStrength); + } + return result; + } +} + +/** + * @description Applies a colorizing filter to the asset, use the methods in the class to adjust the filter + * @extends EffectActionWithLevel + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ +class ColorizeEffectAction extends EffectActionWithLevel { + /** + * @description The color to use for colorization. Specify HTML name or RGB hex code. (Server default: gray) + * @param {string} color HTML name(red, green, etc.) or RGB hex code. (Server default: gray) + * @return {this} + */ + color(color) { + this._actionModel.color = color; + return this.addQualifier(new Qualifier('co', new QualifierValue(prepareColor(color)))); + } + static fromJson(actionModel) { + const { actionType, level, color } = actionModel; + // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel]) + // This allows the inheriting classes to determine the class to be created + const result = new this(actionType, level); + color && result.color(color); + return result; + } +} + +/** + * @description The Action class of the pixelate Builder + * @extends SDK.Action + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ +class Pixelate extends Action { + constructor(squareSize) { + super(); + this._actionModel = {}; + this._squareSize = squareSize; + this._actionModel.actionType = 'pixelate'; + this._actionModel.squareSize = squareSize; + } + /** + * @description Specifies the region to piexlate. + * @param {NamedRegion} pixelateRegion + */ + region(pixelateRegion) { + this._region = pixelateRegion; + this._actionModel.region = { RegionType: this._region.regionType }; + return this; + } + /** + * @description Sets the squareSize of the pixelate effect. + * @param {number | string} squareSize + */ + squareSize(squareSize) { + this._squareSize = squareSize; + this._actionModel.squareSize = squareSize; + return this; + } + prepareQualifiers() { + /* + * pixelate with region is a unique object in this codebase. + * On top of pixelate being an Action with Qualifiers, + * it also accepts a Qualifier called Region. + * + * This Qualifier is in itself composite of qualifiers (such as height, or width). + * The existence of Region changes the output of pixelate in non traditional ways + * which forced this relatively ad-hoc implementation. + * + * Aside from all of that, all of the Qualifiers in the component should be alphabetized + * This happens naturally in the Action class, + * however since we're dealing with two levels of qualifiers (pixelate and Region), + * these need to be merged. + * + * This function will merge the Region qualifiers with pixelate + * and add all needed implicit qualifiers (like g_ocr_text). + * We're not using the full Gravity Qualifier here to prevent the code import for such a simplistic case + */ + const str = this._squareSize ? `:${this._squareSize}` : ''; + if ('_region' in this) { + const qualifiers = this._region.qualifiers; + // Copy qualifiers from the region "action" to the pixelate action + qualifiers.forEach((q) => this.addQualifier(q)); + if (this._region.regionType === 'named') { + this.addQualifier(new Qualifier('e', `pixelate_region${str}`)); + } + if (this._region.regionType === 'ocr_text') { + this.addQualifier(new Qualifier('e', `pixelate_region${str}`)); + this.addQualifier(new Qualifier('g', `ocr_text`)); + } + if (this._region.regionType === 'faces') { + this.addQualifier(new Qualifier('e', `pixelate_faces${str}`)); + } + } + else { + this.addQualifier(new Qualifier('e', `pixelate${str}`)); + } + } + static fromJson(actionModel) { + const { actionType, region, squareSize } = actionModel; + // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel]) + // This allows the inheriting classes to determine the class to be created + const result = new this(squareSize); + squareSize && result.squareSize(squareSize); + if (region && region.RegionType === 'faces') { + result.region(faces()); + } + if (region && region.RegionType === 'custom') { + result.region(custom()); + } + return result; + } +} + +/** + * @summary action + * @description Applies a blurring filter to the asset. + * @memberOf Actions.Effect + * @param {number} blurLevel The strength of the blur. (Range: 1 to 2000, Server default: 100) + * @return {Actions.Effect.BlurAction} + */ +function blur(blurLevel) { + return new BlurAction(blurLevel); +} +/** + * @summary action + * @description Converts the image to gray-scale (multiple shades of gray). + * @memberOf Actions.Effect + * @return {Actions.Effect.SimpleEffectAction} + */ +function grayscale() { + return new SimpleEffectAction('grayscale'); +} +/** + * @summary action + * @description Applies a colorizing filter to the asset. + * @memberOf Actions.Effect + * @param {number} colorizeLevel The strength of the color. (Range: 0 to 100, Server default: 100) + * @return {Actions.Effect.ColorizeEffectAction} + */ +function colorize(colorizeLevel) { + return new ColorizeEffectAction('colorize', colorizeLevel); +} +/** + * @summary action + * @description + * Vectorizes the image. + * Notes: + * To deliver the image as a vector image, make sure to change the format (or URL extension) to a vector format, such as SVG.
+ * However, you can also deliver in a raster format if you just want to get the 'vectorized' graphic effect.
+ * Large images are scaled down to 1000 pixels in the largest dimension before vectorization. + * + * @memberOf Actions.Effect + * @return {Actions.Effect.VectorizeEffectAction} + */ +function vectorize() { + return new VectorizeEffectAction(); +} +/** + * @summary action + * @description + * Applies stripes to the image to help people with common color-blind conditions to differentiate between colors that are similar for them.
+ * You can replace colors using the xRay() method of the \Cloudinary\Transformation\AssistColorBlind class. + * @memberOf Actions.Effect + * @return {Actions.Effect.AssistColorBlindEffectAction} + */ +function assistColorBlind() { + return new AssistColorBlindEffectAction(); +} +/** + * @summary action + * @description Applies a pixelatering filter to the asset. + * @memberOf Actions.Effect + * @param {number} squareSize The squareSize in the pixelation. (Range: 1 to 2000, Server default: 100) + * @return {Actions.Effect.Pixelate} + */ +function pixelate(squareSize) { + return new Pixelate(squareSize); +} + +/** + * @extends SDK.Action + * @description A class for background transformations. + */ +class BackgroundColor extends Action { + constructor(color) { + super(); + this.addQualifier(new Qualifier('b', new QualifierValue(color).setDelimiter('_'))); + } +} + +/** + * @summary SDK + * @memberOf SDK + * @description Defines an action that's a string literal, no validations or manipulations are performed + */ +class RawAction { + constructor(raw) { + this.raw = raw; + } + toString() { + return this.raw; + } + toJson() { + return { error: createUnsupportedError(`unsupported action ${this.constructor.name}`) }; + } +} + +/** + * Validates obj is an instance of IErrorObject + * @param obj + */ +function isErrorObject(obj) { + const errorObj = obj; + return ('error' in errorObj) && !!errorObj.error; +} + +/** + * @description Defines flags that you can use to alter the default transformation behavior. + * @namespace Flag + * @memberOf Qualifiers + */ +/** + * @summary qualifier + * @memberOf Qualifiers.Flag + * @description * Allows specifying only either width or height so the value of the second axis remains as is, and is not + * recalculated to maintain the aspect ratio of the original image. + * @return {Qualifiers.Flag.FlagQualifier} + */ +function ignoreInitialAspectRatio() { + return new FlagQualifier('ignore_aspect_ratio'); +} +/** + * @summary qualifier + * @memberOf Qualifiers.Flag + * @description Automatically use lossy compression when delivering animated GIF files. + * + * This flag can also be used as a conditional flag for delivering PNG files: it tells Cloudinary to deliver the + * image in PNG format (as requested) unless there is no transparency channel - in which case deliver in JPEG + * format. + * @return {Qualifiers.Flag.FlagQualifier} + */ +function lossy() { + return new FlagQualifier('lossy'); +} +/** + * @summary qualifier + * @memberOf Qualifiers.Flag + * @description When used with automatic fetch_format (f_auto): ensures that images with a transparency channel will be + * delivered in PNG format. + * @return {Qualifiers.Flag.FlagQualifier} + */ +function preserveTransparency() { + return new FlagQualifier('preserve_transparency'); +} +/** + * @summary qualifier + * @memberOf Qualifiers.Flag + * @description Generates a JPG image using the progressive (interlaced) JPG format. + * + * This format allows the browser to quickly show a low-quality rendering of the image until the full-quality + * image is loaded. + * + * @param {string} mode? The mode to determine a specific progressive outcome as follows: + * * semi - A smart optimization of the decoding time, compression level and progressive rendering + * (less iterations). This is the default mode when using q_auto. + * * steep - Delivers a preview very quickly, and in a single later phase improves the image to + * the required resolution. + * * none - Use this to deliver a non-progressive image. This is the default mode when setting + * a specific value for quality. + * @return {Qualifiers.Flag.FlagQualifier} + */ +function progressive(mode) { + return new FlagQualifier('progressive', mode); +} +/** + * @summary qualifier + * @memberOf Qualifiers.Flag + * @description Modifies percentage-based width & height parameters of overlays and underlays (e.g., 1.0) to be relative to the overlaid region + * @return {Qualifiers.Flag.FlagQualifier} + */ +function regionRelative() { + return new FlagQualifier('region_relative'); +} +/** + * @summary qualifier + * @memberOf Qualifiers.Flag + * @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. + * @return {Qualifiers.Flag.FlagQualifier} + */ +function relative() { + return new FlagQualifier('relative'); +} + +/** + * @memberOf Qualifiers.Format + * @extends {SDK.QualifierValue} + */ +class FormatQualifier extends QualifierValue { + constructor(val) { + super(val); + this.val = val; + } + getValue() { + return this.val; + } +} + +/** + * @description Qualifies the delivery of an asset. + * @memberOf Actions.Delivery + * @extends SDK.Action + */ +class DeliveryAction extends Action { + /** + * @param {string} deliveryKey A generic Delivery Action Key (such as q, f, dn, etc.) + * @param {string} deliveryType A Format Qualifiers for the action, such as Quality.auto() + * @param {string} modelProperty internal model property of the action, for example quality uses `level` while dpr uses `density` + * @see Visit {@link Actions.Delivery|Delivery} for an example + */ + constructor(deliveryKey, deliveryType, modelProperty) { + super(); + this._actionModel = {}; + let deliveryTypeValue; + if (deliveryType instanceof FormatQualifier) { + deliveryTypeValue = deliveryType.getValue(); + } + else { + deliveryTypeValue = deliveryType; + } + this._actionModel.actionType = DELIVERY_MODE_TO_ACTION_TYPE_MAP[deliveryKey]; + this._actionModel[modelProperty] = deliveryTypeValue; + this.addQualifier(new Qualifier(deliveryKey, deliveryType)); + } +} + +/** + * @description Contains functions to select the mode when using a progressive format. + * Learn more: {@link https://cloudinary.com/documentation/transformation_reference#fl_progressive|Progressive modes} + * @memberOf Qualifiers + * @namespace Progressive + * @example + * import {Cloudinary} from "@cloudinary/url-gen"; + * import {format} from "@cloudinary/url-gen/actions/delivery"; + * import {jpg} from "@cloudinary/url-gen/qualifiers/format"; + * import {steep} from "@cloudinary/url-gen/qualifiers/progressive"; + * + * const yourCldInstance = new Cloudinary({cloud: {cloudName: 'demo'}}); + * const image = yourCldInstance.image('woman'); + * image.delivery(format(jpg()).progressive(steep())) + */ +class ProgressiveQualifier extends FlagQualifier { + constructor(mode) { + super('progressive', mode); + } +} + +/** + * @memberOf Actions.Delivery + * @extends {Actions.Delivery.DeliveryAction} + * @see Visit {@link Actions.Delivery|Delivery} for an example + */ +class DeliveryFormatAction extends DeliveryAction { + constructor(deliveryKey, deliveryType) { + super(deliveryKey, deliveryType, 'formatType'); + } + /** + * @description Uses lossy compression when delivering animated GIF files. + * @return {this} + */ + lossy() { + this._actionModel.lossy = true; + this.addFlag(lossy()); + return this; + } + /** + * @description Uses progressive compression when delivering JPG file format. + * @return {this} + */ + progressive(mode) { + if (mode instanceof ProgressiveQualifier) { + this._actionModel.progressive = { mode: mode.getFlagValue() }; + this.addFlag(mode); + } + else { + this._actionModel.progressive = { mode: mode }; + this.addFlag(progressive(mode)); + } + return this; + } + /** + * @description Ensures that images with a transparency channel are delivered in PNG format. + */ + preserveTransparency() { + this._actionModel.preserveTransparency = true; + this.addFlag(preserveTransparency()); + return this; + } + static fromJson(actionModel) { + const { formatType, lossy, progressive, preserveTransparency } = actionModel; + let result; + if (formatType) { + result = new this('f', formatType); + } + else { + result = new this('f'); + } + if (progressive) { + if (progressive.mode) { + result.progressive(progressive.mode); + } + else { + result.progressive(); + } + } + lossy && result.lossy(); + preserveTransparency && result.preserveTransparency(); + return result; + } +} + +/** + * @summary SDK + * @description - Defines how to transform an asset + * @memberOf SDK + */ +class Transformation { + constructor() { + this.actions = []; + } + /** + * @param {SDK.Action | string} action + * @return {this} + */ + addAction(action) { + let actionToAdd; + if (typeof action === 'string') { + if (action.indexOf('/') >= 0) { + throw 'addAction cannot accept a string with a forward slash in it - /, use .addTransformation() instead'; + } + else { + actionToAdd = new RawAction(action); + } + } + else { + actionToAdd = action; + } + this.actions.push(actionToAdd); + return this; + } + /** + * @description Allows the injection of a raw transformation as a string into the transformation, or a Transformation instance that was previously created + * @param {string | SDK.Transformation} tx + * @example + * import {Transformation} from "@cloudinary/url-gen"; + * + * const transformation = new Transformation(); + * transformation.addTransformation('w_100/w_200/w_300'); + * @return {this} + */ + addTransformation(tx) { + if (tx instanceof Transformation) { + // Concat the new actions into the existing actions + this.actions = this.actions.concat(tx.actions); + } + else { + this.actions.push(new RawAction(tx)); + } + return this; + } + /** + * @return {string} + */ + toString() { + return this.actions + .map((action) => { + return action.toString(); + }) + .filter((a) => a) + .join('/'); + } + /** + * @description Delivers an animated GIF. + * @param {AnimatedAction} animatedAction + * @return {this} + */ + animated(animatedAction) { + return this.addAction(animatedAction); + } + /** + * @description Adds a border around the image. + * @param {Border} borderAction + * @return {this} + */ + border(borderAction) { + return this.addAction(borderAction); + } + /** + * @description Adjusts the shape of the delivered image.
+ * Learn more: {@link https://cloudinary.com/documentation/effects_and_artistic_enhancements#distort|Shape changes and distortion effects} + * @param {IReshape} reshapeAction + * @return {this} + */ + reshape(reshapeAction) { + return this.addAction(reshapeAction); + } + /** + * @description Resize the asset using provided resize action + * @param {ResizeSimpleAction} resizeAction + * @return {this} + */ + resize(resizeAction) { + return this.addAction(resizeAction); + } + /** + * @desc An alias to Action Delivery.quality + * @param {string|number} quality + * @return {this} + */ + quality(quality) { + this.addAction(new DeliveryFormatAction('q', quality)); + return this; + } + /** + * @desc An alias to Action Delivery.format + * @param {string} format + * @return {this} + */ + format(format) { + this.addAction(new DeliveryFormatAction('f', format)); + return this; + } + /** + * @description Rounds the specified corners of an image. + * @param roundCornersAction + * @return {this} + */ + roundCorners(roundCornersAction) { + return this.addAction(roundCornersAction); + } + /** + * @description Adds an overlay over the base image. + * @param {LayerAction} overlayAction + * @return {this} + */ + overlay(overlayAction) { + return this.addAction(overlayAction); + } + /** + * @description Adds an underlay under the base image. + * @param {LayerAction} underlayAction + * @return {this} + */ + underlay(underlayAction) { + underlayAction.setLayerType('u'); + return this.addAction(underlayAction); + } + /** + * @description Defines an new user variable. + * @param {VariableAction} variableAction + * @return {this} + */ + addVariable(variableAction) { + return this.addAction(variableAction); + } + /** + * @description Specifies a condition to be met before applying a transformation. + * @param {ConditionalAction} conditionAction + * @return {this} + */ + conditional(conditionAction) { + return this.addAction(conditionAction); + } + /** + * @description Applies a filter or an effect on an asset. + * @param {SimpleEffectAction} effectAction + * @return {this} + */ + effect(effectAction) { + return this.addAction(effectAction); + } + /** + * @description Applies adjustment effect on an asset. + * @param action + * @return {this} + */ + adjust(action) { + return this.addAction(action); + } + /** + * @description Rotates the asset by the given angle. + * @param {RotateAction} rotateAction + * @return {this} + */ + rotate(rotateAction) { + return this.addAction(rotateAction); + } + /** + * @description Applies a pre-defined named transformation of the given name. + * @param {NamedTransformation} namedTransformation + * @return {this} + */ + namedTransformation(namedTransformation) { + return this.addAction(namedTransformation); + } + /** + * @description Applies delivery action. + * @param deliveryAction + * @return {this} + */ + delivery(deliveryAction) { + return this.addAction(deliveryAction); + } + /** + * @description Sets the color of the background. + * @param {Qualifiers.Color} color + * @return {this} + */ + backgroundColor(color) { + return this.addAction(new BackgroundColor(prepareColor(color))); + } + /** + * @description Adds a layer in a Photoshop document. + * @param action + * @return {this} + */ + psdTools(action) { + return this.addAction(action); + } + /** + * @description Extracts an image or a page using an index, a range, or a name from a layered media asset. + * @param action + * @return {this} + */ + extract(action) { + return this.addAction(action); + } + /** + * @description Adds a flag as a separate action. + * @param {Qualifiers.Flag | string} flagQualifier + * @return {this} + */ + addFlag(flagQualifier) { + const action = new Action(); + let flagToAdd = flagQualifier; + if (typeof flagQualifier === 'string') { + flagToAdd = new FlagQualifier(flagQualifier); + } + action.addQualifier(flagToAdd); + return this.addAction(action); + } + /** + * @description Inject a custom function into the image transformation pipeline. + * @return {this} + */ + customFunction(customFunction) { + return this.addAction(customFunction); + } + /** + * Transcodes the video (or audio) to another format. + * @param {Action} action + * @return {this} + */ + transcode(action) { + return this.addAction(action); + } + /** + * Applies the specified video edit action. + * + * @param {videoEditType} action + * @return {this} + */ + videoEdit(action) { + return this.addAction(action); + } + toJson() { + const actions = []; + for (const action of this.actions) { + const json = action.toJson(); + if (isErrorObject(json)) { + // Fail early and return an IErrorObject + return json; + } + actions.push(json); + } + return { actions }; + } +} + +/** + * @description + * Returns a string representing the float value of the input, if the input was a number-like. + * Examples: + * - '1.0' -> '1.0' + * - 1 -> '1.0' + * - '5' -> '5.0' + * - 'auto' -> 'auto' + * @private + * @param {string|number} value + * @return {string} + */ +function toFloatAsString(value) { + // Turn the input to string + // The Function will return `returnValue` value if the input is not a number-like expression + const returnValue = value.toString(); + // if the string contains letters, return the input + if (returnValue.match(/[A-Z]/gi)) { + return returnValue; + } + // If the leading digit is 0, and we have more than 1 digit, it's not a number. + // 00, 00000, 0x15 etc. + if (returnValue.length > 1 && returnValue[0] === '0') { + return returnValue; + } + // Final sanity check, parse the number as a float and check if its NaN + const isNumberLike = !isNaN(parseFloat(returnValue)) && returnValue.indexOf(':') === -1; + // If it's a number-like, but the input does not contain a decimal - add it. + if (isNumberLike && returnValue.indexOf('.') === -1) { + return `${returnValue}.0`; + } + else { + // If the input already contains a decimal, just return the value + return returnValue; + } +} + +/** + * @memberOf Qualifiers.AspectRatio + * @extends {SDK.QualifierValue} + */ +class AspectRatioQualifierValue extends QualifierValue { +} + +/** + * @description Defines a resize using width and height. + * @extends SDK.Action + * @memberOf Actions.Resize + * @see Visit {@link Actions.Resize| Resize} for examples + */ +class ResizeSimpleAction extends Action { + /** + * @param {string} cropType + * @param {number | string} cropWidth The required width of a transformed asset. + * @param {number | string} cropHeight The required height of a transformed asset. + */ + constructor(cropType, cropWidth, cropHeight) { + super(); + this._actionModel = { dimensions: {} }; + this._actionModel.actionType = CROP_MODE_TO_ACTION_TYPE_MAP[cropType] || cropType; + this.addQualifier(new Qualifier('c', cropType)); + cropWidth && this.width(cropWidth); + cropHeight && this.height(cropHeight); + } + /** + * @description Sets the height of the resize + * @param {string | number} x The height in pixels (if an integer is specified) or as a percentage (if a float is specified). + */ + height(x) { + this._actionModel.dimensions.height = x; + return this.addQualifier(new Qualifier('h', x)); + } + /** + * @description Sets the width of the resize + * @param {string | number} x The width in pixels (if an integer is specified) or as a percentage (if a float is specified). + */ + width(x) { + this._actionModel.dimensions.width = x; + return this.addQualifier(new Qualifier('w', x)); + } + /** + * @description Sets the aspect ratio of the asset. + * For a list of supported types see {@link Qualifiers.AspectRatio| + * AspectRatio values} + * @param {AspectRatioType|number|string} ratio The new aspect ratio, specified as a percentage or ratio. + * @return {this} + */ + aspectRatio(ratio) { + // toFloatAsString is used to ensure 1 turns into 1.0 + if (ratio instanceof AspectRatioQualifierValue) { + this._actionModel.dimensions.aspectRatio = `${ratio}`; + return this.addQualifier(new Qualifier('ar', ratio)); + } + if (typeof ratio === 'number' || typeof ratio === 'string') { + this._actionModel.dimensions.aspectRatio = toFloatAsString(ratio); + return this.addQualifier(new Qualifier('ar', toFloatAsString(ratio))); + } + if (ratio instanceof FlagQualifier) { + this._actionModel.dimensions.aspectRatio = `${ratio.qualifierValue}`; + return this.addFlag(ratio); + } + } + /** + * @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. + * @return {this} + */ + relative() { + this._actionModel.relative = true; + return this.addFlag(relative()); + } + /** + * @description Modifies percentage-based width & height parameters of overlays and underlays (e.g., 1.0) to be relative to the overlaid region + * @return {this} + */ + regionRelative() { + this._actionModel.regionRelative = true; + return this.addFlag(regionRelative()); + } + static fromJson(actionModel) { + const { actionType, dimensions, relative, regionRelative } = actionModel; + const { aspectRatio, width, height } = dimensions; + const cropMode = ACTION_TYPE_TO_CROP_MODE_MAP[actionType] || actionType; + // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel]) + // This allows the inheriting classes to determine the class to be created + const result = new this(cropMode, width, height); + aspectRatio && result.aspectRatio(aspectRatio === 'ignore_aspect_ratio' ? ignoreInitialAspectRatio() : aspectRatio); + relative && result.relative(); + regionRelative && result.regionRelative(); + return result; + } +} + +/** + * @memberOf Gravity.GravityQualifier + * @extends {SDK.Qualifier} + */ +class GravityQualifier extends Qualifier { + /** + * @param value, an array containing (GravityObject | AutoGravity | string) or a string; + */ + constructor(value) { + super('g', new QualifierValue(value)); + } +} + +/** + * @description The class for the autoGravity builder + * @memberOf Qualifiers.Gravity + * @extends {Qualifiers.Gravity.GravityQualifier} + */ +class AutoGravity extends GravityQualifier { + constructor() { + // Required due to https://github.com/microsoft/TypeScript/issues/13029 + /* istanbul ignore next */ + super('auto'); + } + /** + * @description Autofocuses on objects, allowing their priority within the algorithm to be configured. + * @param {AutoFocus} AutoFocusObjects + */ + autoFocus(...AutoFocusObjects) { + this.addValue(AutoFocusObjects); + return this; + } +} + +/** + * @description The class for the FocusOn builder + * @memberOf Qualifiers.Gravity + * @extends {Qualifiers.Gravity.GravityQualifier} + */ +class FocusOnGravity extends GravityQualifier { + constructor(FocusOnObjects) { + // Required due to https://github.com/microsoft/TypeScript/issues/13029 + /* istanbul ignore next */ + super(FocusOnObjects); + } + /** + * @description Specifies the gravity to use if none of the other gravity objects are found. + * @param {Qualifiers.Gravity.AutoGravity} val + */ + fallbackGravity(val) { + /* + * FocusOnGravity(this) is already a qualifier, with a key and a value g_{obj1} + * fallBackGravity also attempts to add a value, to reach the result of g_{obj1}:auto:{obj2} + * Since AutoGravity is a Qualifier, it also comes with its own g_ key, which needs to be removed. + * To solve it, we take only the value from the qualifier, instead of the whole thing + */ + this.addValue(val.qualifierValue); + return this; + } +} + +/** + * @description The class for the CompassGravity builder + * @memberOf Qualifiers.Gravity + * @extends {Qualifiers.Gravity.GravityQualifier} + */ +class CompassGravity extends GravityQualifier { + constructor(dir) { + // Required due to https://github.com/microsoft/TypeScript/issues/13029 + /* istanbul ignore next */ + super(dir); + } +} + +/** + * @description Defines the gravity based on directional values from a compass. + * Learn more: {@link https://cloudinary.com/documentation/resizing_and_cropping#control_gravity|Control gravity for images} + * Learn more: {@link https://cloudinary.com/documentation/video_resizing_and_cropping#control_gravity|Control gravity for videos} + * @param {Qualifiers.Compass | string} direction A compass Values + * @memberOf Qualifiers.Gravity + * @example + * import {Cloudinary} from "@cloudinary/url-gen"; + * import {compass} from "@cloudinary/url-gen/qualifiers/gravity"; + * import {north} from "@cloudinary/url-gen/qualifiers/compass"; + * import {crop} from "@cloudinary/url-gen/actions/resize"; + * + * const yourCldInstance = new Cloudinary({cloud: {cloudName: 'demo'}}); + * const image = yourCldInstance.image('woman'); + * image.resize(crop().width(300).gravity(compass(north()))) + * @return {CompassGravity} + */ +function compass(direction) { + return new CompassGravity(direction); +} +/** + * @summary qualifier + * @description Specifies what to focus on, for example: faces, objects, eyes, etc. + * @param {...Qualifier.FocusOn} args One or more objects to focus on + * @memberOf Qualifiers.Gravity + * @example + * import {Cloudinary} from "@cloudinary/url-gen"; + * import {focusOn} from "@cloudinary/url-gen/qualifiers/gravity"; + * import {crop} from "@cloudinary/url-gen/actions/resize"; + * import {cat} from "@cloudinary/url-gen/qualifiers/focusOn"; + * + * const yourCldInstance = new Cloudinary({cloud: {cloudName: 'demo'}}); + * const image = yourCldInstance.image('woman'); + * image.resize(crop().width(300).gravity(focusOn(cat()))) + * @return {FocusOnGravity} + */ +function focusOn(...args) { + const res = [...args]; + return new FocusOnGravity(res); +} +/** + * @summary qualifier + * @description Automatically identifies the most interesting regions in the asset, can be qualified further by including what to focus on. + * @memberOf Qualifiers.Gravity + * @return {Qualifiers.Gravity.AutoGravity} + * @example + * import {Cloudinary} from "@cloudinary/url-gen"; + * import {autoGravity} from "@cloudinary/url-gen/qualifiers/gravity"; + * import {crop} from "@cloudinary/url-gen/actions/resize"; + * + * const yourCldInstance = new Cloudinary({cloud: {cloudName: 'demo'}}); + * const image = yourCldInstance.image('woman'); + * image.resize(crop().width(300).gravity(autoGravity())) + * @example + * import {Cloudinary} from "@cloudinary/url-gen"; + * import {autoGravity} from "@cloudinary/url-gen/qualifiers/gravity"; + * import {crop} from "@cloudinary/url-gen/actions/resize"; + * import {cat} from "@cloudinary/url-gen/qualifiers/focusOn"; + * import {AutoFocus} from "@cloudinary/url-gen/qualifiers/autoFocus"; + * + * const yourCldInstance = new Cloudinary({cloud: {cloudName: 'demo'}}); + * const image = yourCldInstance.image('woman'); + * image.resize(crop().width(300).gravity(autoGravity().autoFocus(AutoFocus.focusOn(cat())))) + */ +function autoGravity() { + return new AutoGravity(); +} + +/** + * @memberOf Qualifiers.FocusOn + * @extends {SDK.QualifierValue} + */ +class FocusOnValue extends QualifierValue { + constructor(name) { + super(); + this.name = name; + } + toString() { + return this.name; + } +} + +/** + * @summary qualifier + * @memberOf Qualifiers.FocusOn + * @description Detect all text elements in an image using the {@link https://cloudinary.com/documentation/ocr_text_detection_and_extraction_addon|OCR Text Detection and Extraction add-on} and use the detected bounding box coordinates as the basis of the transformation. + * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue + */ +function ocr() { + return new FocusOnValue('ocr_text'); +} + +/** + * true if gravity starts with 'auto' or 'auto:' + * @param gravity + */ +function isIAutoGravityString(gravity) { + return gravity && `${gravity}`.split(':')[0] === 'auto'; +} +/** + * Validate that given val is an ICompassGravity + * @param gravity + */ +function isCompassGravity(gravity) { + //const gravityString = `${(typeof gravity === "string" ? gravity : gravity.qualifierValue)}`; + const gravityValue = getGravityValue(gravity); + return ['north', 'center', 'east', 'west', 'south', 'north_west', 'south_east', 'south_west', 'north_east'].includes(gravityValue); +} +/** + * Get the value of given gravity + * @param gravity + */ +function getGravityValue(gravity) { + return `${gravity}`.replace('g_', ''); +} +/** + * Creates a compassGravity model + * @param gravity + */ +function createCompassGravityModel(gravity) { + return { + compass: getGravityValue(gravity), + gravityType: 'direction' + }; +} +/** + * Validate that given gravity is an instance of ocr gravity + * @param gravity + */ +function isOcrGravity(gravity) { + return getGravityValue(gravity) === 'ocr_text'; +} +/** + * Creates an ocr gravity model + */ +function createOcrGravityModel() { + return { + gravityType: 'ocr' + }; +} +/** + * Validate that given gravity is an instance of AutoGravity + * @param gravity + */ +function isAutoGravity(gravity) { + return `${gravity.qualifierValue}`.split(':')[0] === 'auto'; +} +/** + * Create an instance of IAutoGravityObjectModel + * @param gravity + */ +function createIAutoFocusObject(gravity) { + const gravityString = gravity.toString(); + const values = gravityString.split('_'); + const result = { + object: values[0] + }; + if (values.length > 1) { + if (values[1] === 'avoid') { + result.avoid = true; + } + else { + result.weight = +values[1]; + } + } + return result; +} +/** + * Creates an auto gravity model from given AutoGravity + * @param gravity + */ +function createAutoGravityModel(gravity) { + let values; + const gravityQualifier = gravity === 'auto' ? new AutoGravity() : gravity; + if (`${gravity}`.startsWith('auto:')) { + values = `${gravity}`.split(':').filter((v) => v !== 'auto'); + } + else { + values = gravityQualifier.qualifierValue.values.filter((v) => v !== 'auto'); + } + const autoFocus = values.map(createIAutoFocusObject); + return { + gravityType: 'auto', + autoFocus + }; +} +/** + * Create IFocusOnGravityModel from FocusOnGravity + * @param gravity + */ +function createFocusOnGravityModel(gravity) { + const hasAutoGravity = `${gravity}`.split(':').includes('auto'); + const values = gravity.qualifierValue.values; + const focusOnValues = hasAutoGravity ? values.slice(0, values.length - 1) : values; + const result = { + gravityType: 'object', + focusOnObjects: focusOnValues.map((v) => `${v}`) + }; + if (hasAutoGravity) { + // Remove the first 'auto' value by slicing it, because it's added by autoGravity() + const autoFocusObjects = values[values.length - 1].values.slice(1); + const autoGravityInstance = autoGravity().autoFocus(...autoFocusObjects); + result.fallbackGravity = createAutoGravityModel(autoGravityInstance); + } + return result; +} +/** + * Creates a FocusOnGravity from given string + * @param gravity + */ +function createFocusOnGravity(gravity) { + const values = gravity.split(':'); + const focusOnValues = values.map((g) => new FocusOnValue(g)); + return new FocusOnGravity(focusOnValues); +} +/** + * Create a model of given gravity + * @param gravity + */ +function createGravityModel(gravity) { + if (isCompassGravity(gravity)) { + return createCompassGravityModel(gravity); + } + if (isOcrGravity(gravity)) { + return createOcrGravityModel(); + } + if (isIAutoGravityString(gravity) || isAutoGravity(gravity)) { + return createAutoGravityModel(gravity); + } + return createFocusOnGravityModel(typeof gravity === 'string' ? createFocusOnGravity(gravity) : gravity); +} + +/** + * @summary qualifier + * @namespace AutoFocus + * @memberOf Qualifiers + * @see Visit {@link Qualifiers.Gravity|Gravity} for an example + */ +/** + * @memberOf Qualifiers.AutoFocus + * @extends {SDK.QualifierValue} + * @see Visit {@link Qualifiers.Gravity|Gravity} for an example + */ +class AutoFocus extends QualifierValue { + constructor(focusOn, weight) { + super(); + this._weight = weight; + this.focusOn = focusOn; + this.shouldAvoid = false; + } + /** + * @summary qualifier + * @description Specifies the object to focus on automatically + * Accepts an AutoFocusObject (which is just a wrapper for a FocusOn object, but with extra method: avoid, weight) + * @param {Qualifiers.FocusOn} obj The object to focus on. + * @param {number} weight + */ + static focusOn(obj, weight) { + return new AutoFocus(obj, weight); + } + shouldAddWeight() { + return typeof this._weight === 'number' || typeof this._weight === 'string' || this.shouldAvoid; + } + /** + * @summary qualifier + * @desc Get the name of the of the object + */ + getName() { + return this.focusOn.name; + } + /** + * @summary qualifier + * @desc Get the weight for the object + */ + getWeight() { + if (this.shouldAvoid) { + return 'avoid'; + } + else { + return this._weight; + } + } + /** + * @summary qualifier + * @desc Return the string representation of this QualifierValue + */ + toString() { + // Future proofing, in case we'd like to support some custom string in the future, or if data is coming from a DB + if (this.shouldAddWeight()) { + return `${this.getName()}_${this.getWeight()}`; + } + else { + return `${this.getName()}`; + } + } + /** + * @summary qualifier + * @description Sets the importance level of the object within the automatic gravity algorithm + * @param {numebr} w The focus weight for the object + * @return {this} + */ + weight(w) { + this._weight = w; + return this; + } + /** + * @summary qualifier + * @description Attempts to avoid the detected object in the image + * @return {this} + */ + avoid() { + this.shouldAvoid = true; + return this; + } +} + +/** + * @memberOf Qualifiers.Compass + * @extends {SDK.QualifierValue} + */ +class CompassQualifier extends QualifierValue { + constructor(val) { + super(); + this.val = val; + } + toString() { + return this.val; + } +} + +/** + * Validates that gravityModel is an ICompassGravityModel + * @param gravityModel + */ +function isCompassGravityModel(gravityModel) { + return gravityModel.gravityType === 'direction'; +} +/** + * Validates that gravityModel is an IOcrGravityModel + * @param gravityModel + */ +function isOcrGravityModel(gravityModel) { + return gravityModel.gravityType === 'ocr'; +} +/** + * Validates that gravityModel is an IAutoGravityModel + * @param gravityModel + */ +function isAutoGravityModel(gravityModel) { + return gravityModel.gravityType === 'auto'; +} +/** + * Create AutoFocus from IAutoGravityObjectModel + * @param autoGravityObjectModel + */ +function createAutoFocusFromModel(autoGravityObjectModel) { + const { object, weight, avoid } = autoGravityObjectModel; + const autoFocus = new AutoFocus(new FocusOnValue(object)); + (weight || weight === 0) && autoFocus.weight(weight); + avoid && autoFocus.avoid(); + return autoFocus; +} +/** + * Create AutoGravity from IAutoGravityModel + * @param gravityModel + */ +function createAutoGravityFromModel(gravityModel) { + const autoFocusModel = gravityModel.autoFocus || []; + const autoFocus = autoFocusModel.map(createAutoFocusFromModel); + return autoGravity().autoFocus(...autoFocus); +} +/** + * Create FocusOnGravity from given IFocusOnGravityModel + * @param gravityModel + */ +function createFocusOnGravityFromModel(gravityModel) { + const focusOnObjects = (gravityModel.focusOnObjects || []).map((str) => new FocusOnValue(str)); + const result = focusOn(...focusOnObjects); + if (gravityModel.fallbackGravity) { + const autoGravity = createAutoGravityFromModel(gravityModel.fallbackGravity); + result.fallbackGravity(autoGravity); + } + return result; +} +/** + * Create gravity instance from given gravity model + * @param gravityModel + */ +function createGravityFromModel(gravityModel) { + if (isCompassGravityModel(gravityModel)) { + return new CompassGravity(new CompassQualifier(gravityModel.compass)); + } + if (isOcrGravityModel(gravityModel)) { + return focusOn(ocr()); + } + if (isAutoGravityModel(gravityModel)) { + return createAutoGravityFromModel(gravityModel); + } + return createFocusOnGravityFromModel(gravityModel); +} + +/** + * @description Defines an advanced resize. + * @extends Actions.Resize.ResizeSimpleAction + * @memberOf Actions.Resize + * @see Visit {@link Actions.Resize| Resize} for examples + */ +class ResizeAdvancedAction extends ResizeSimpleAction { + /** + * @description Which part of the original image to include. + * @param {Qualifiers.Gravity} gravity + */ + gravity(gravity) { + this._actionModel.gravity = createGravityModel(gravity); + const gravityQualifier = typeof gravity === "string" ? new Qualifier('g', gravity) : gravity; + return this.addQualifier(gravityQualifier); + } + static fromJson(actionModel) { + const result = super.fromJson.apply(this, [actionModel]); + if (actionModel.gravity) { + result.gravity(createGravityFromModel(actionModel.gravity)); + } + return result; + } +} + +/** + * @description Defines the visual appearance of the background. + * @memberOf Qualifiers.Background + * @extends {SDK.Qualifier} + */ +class BackgroundQualifier extends Qualifier { + constructor(backgroundValue) { + // The qualifier key for this qualifier + super('b'); + // Such as color (b_red) + if (backgroundValue) { + this.addValue(backgroundValue); + } + } +} + +/** + * @description A class for blurred background transformations. + * @memberOf Qualifiers.Background + * @extends {Qualifiers.Background.BackgroundQualifier} + */ +class BlurredBackgroundAction extends BackgroundQualifier { + /** + * @description Sets the intensity of the blur. + * @param {number} value - The intensity of the blur. + */ + intensity(value) { + this.intensityLevel = value; + return this; + } + /** + * @description Sets the brightness of the background. + * @param {number} value - The brightness of the background. + */ + brightness(value) { + this.brightnessLevel = value; + return this; + } + /** + * @description + * Stringify the qualifier + * BackgroundQualifiers don't have a value, but instead override the toString() function + */ + toString() { + // b_blurred:{intensity}:{brightness} + return ` + b_blurred + ${this.intensityLevel ? `:${this.intensityLevel}` : ''} + ${this.brightnessLevel ? `:${this.brightnessLevel}` : ''} + `.replace(/\s+/g, ''); + } +} +var BlurredBackgroundAction$1 = BlurredBackgroundAction; + +/** + * @description Defines the background color to use when resizing with padding. + * @memberOf Qualifiers.Background + * @extends {Qualifiers.Background.BackgroundQualifier} + */ +class BaseCommonBackground extends BackgroundQualifier { + constructor() { + super(); + this._palette = []; + } + /** + * @description Selects the strongest contrasting color to use for padding. + * @return {this} + */ + contrast() { + this._contrast = true; + return this; + } + /** + * @description Defines the custom colors to use when resizing using content-aware padding. + * @param {...string} colors One or more colors - Example: palette('green', 'red', blue') + * @return {this} + */ + palette(...colors) { + this._palette = colors.map((color) => { + return prepareColor(color); + }); + return this; + } +} + +/** + * @description Automatically determines the color to use for padding, if needed when resizing an asset. Selects the + * predominant color from the border of the image. + * @memberOf Qualifiers.Background + * @extends {Qualifiers.Background.BaseCommonBackground} + */ +class BackgroundAutoBorderQualifier extends BaseCommonBackground { + /** + * @description + * Stringify the qualifier + * BackgroundQualifiers don't have a value, but instead override the toString() function. + */ + toString() { + return ` + b_auto:border + ${this._contrast ? '_contrast' : ''} + ${this._palette.length ? `:palette_${this._palette.join('_')}` : ''} + `.replace(/\s+/g, ''); + } +} + +/** + * @description Defines the gradient fade effect to use for the background when resizing with padding. + * @memberOf Qualifiers.Background + * @extends {Qualifiers.Background.BaseCommonBackground} + */ +class BaseGradientBackground extends BaseCommonBackground { + /** + * + * @description Sets the number of predominant colors to use (2 or 4). + * @param {number} num + * @return {this} + */ + gradientColors(num) { + this._gradientColors = num; + return this; + } + /** + * @description Sets the direction for a background gradient fade effect. + * @param {Qualifiers.GradientDirection | GradientDirectionType | string} direction Use one of these functions + * provided by {@link Qualifiers.GradientDirection|GradientDirection} + * @return {this} + */ + gradientDirection(direction) { + this._gradientDirection = direction; + return this; + } +} + +/** + * @description Specifies that the gradient fade effect, used for the background when resizing with padding, uses the + * predominant colors in the border pixels of the image. + * @memberOf Qualifiers.Background + * @extends {Qualifiers.Background.BaseGradientBackground} + */ +class BackgroundBorderGradientQualifier extends BaseGradientBackground { + /** + * @description + * Stringify the qualifier + * BackgroundQualifiers don't have a value, but instead override the toString() function. + */ + toString() { + return ` + b_auto:border_gradient + ${this._contrast ? '_contrast' : ''} + ${this._gradientColors ? `:${this._gradientColors}` : ''} + ${this._gradientDirection ? `:${this._gradientDirection}` : ''} + ${this._palette.length ? `:palette_${this._palette.join('_')}` : ''} + `.replace(/\s+/g, ''); + } +} + +/** + * @description Specifies that the gradient fade effect, used for the background when resizing with padding, uses the + * predominant colors in the whole of the image. + * @memberOf Qualifiers.Background + * @extends {Qualifiers.Background.BaseGradientBackground} + */ +class BackgroundPredominantGradientQualifier extends BaseGradientBackground { + /** + * @description + * Stringify the qualifier + * BackgroundQualifiers don't have a value, but instead override the toString() function. + */ + toString() { + return ` + b_auto:predominant_gradient + ${this._contrast ? '_contrast' : ''} + ${this._gradientColors ? `:${this._gradientColors}` : ''} + ${this._gradientDirection ? `:${this._gradientDirection}` : ''} + ${this._palette.length ? `:palette_${this._palette.join('_')}` : ''} + `.replace(/\s+/g, ''); + } +} + +/** + * @description Automatically determines the color to use for padding, if needed when resizing an asset. Selects the + * predominant color from the whole image. + * @memberOf Qualifiers.Background + * @extends {Qualifiers.Background.BaseCommonBackground} + */ +class BackgroundAutoPredominantQualifier extends BaseCommonBackground { + /** + * @description + * Stringify the qualifier + * BackgroundQualifiers don't have a value, but instead override the toString() function. + */ + toString() { + return ` + b_auto:predominant + ${this._contrast ? '_contrast' : ''} + ${this._palette.length ? `:palette_${this._palette.join('_')}` : ''} + `.replace(/\s+/g, ''); + } +} + +/** + * Get the value of given background + * @param background + */ +function getBackgroundValue(background) { + return `${background}`.replace('b_', ''); +} +/** + * Create an IAutoBackgroundModel from given background + */ +function createAutoBackgroundModel() { + return { backgroundType: 'auto' }; +} +/** + * Create an IBlurredBackgroundModel from given background + * @param background + */ +function createBlurredBackgroundModel(background) { + const { intensityLevel, brightnessLevel } = background; + const result = { + backgroundType: 'blurred' + }; + if (intensityLevel || intensityLevel === 0) { + result.intensity = intensityLevel; + } + if (brightnessLevel || brightnessLevel === 0) { + result.brightness = brightnessLevel; + } + return result; +} +/** + * Create an IContrastPaletteBackgroundModel from given background + * @param background + */ +function createContrastPaletteBackgroundModel(background) { + const contrast = background._contrast; + const palette = background._palette; + const result = { + backgroundType: '' + }; + if (contrast) { + result.contrast = true; + } + if (palette) { + result.palette = palette; + } + return result; +} +/** + * Create an IBorderBackgroundModel from given background + * @param background + */ +function createBorderBackgroundModel(background) { + return Object.assign(Object.assign({}, createContrastPaletteBackgroundModel(background)), { backgroundType: 'border' }); +} +/** + * Create an IBaseGradientBackgroundModel from given background + * @param background + */ +function createBaseGradientBackgroundModel(background) { + const gradientColors = background._gradientColors; + const gradientDirection = `${background._gradientDirection}`; + const result = createContrastPaletteBackgroundModel(background); + if (gradientColors) { + result.gradientColors = gradientColors; + } + if (gradientDirection) { + result.gradientDirection = gradientDirection; + } + return result; +} +/** + * Create an IBorderGradientBackgroundModel from given background + * @param background + */ +function createBorderGradientBackgroundModel(background) { + return Object.assign(Object.assign({}, createBaseGradientBackgroundModel(background)), { backgroundType: 'borderGradient' }); +} +/** + * Create an IColorBackgroundModel from given background + * @param background + */ +function createColorBackgroundModel(background) { + return { + backgroundType: 'color', + color: getBackgroundValue(background) + }; +} +/** + * Create an IPredominantBackgroundModel from given background + * @param background + */ +function createPredominantBackgroundModel(background) { + return Object.assign(Object.assign({}, createContrastPaletteBackgroundModel(background)), { backgroundType: 'predominant' }); +} +/** + * Create an IPredominantGradientBackgroundModel from given background + * @param background + */ +function createPredominantGradientBackgroundModel(background) { + return Object.assign(Object.assign({}, createBaseGradientBackgroundModel(background)), { backgroundType: 'predominantGradient' }); +} +/** + * Create an IBackgroundModel from given background + * @param background + */ +function createBackgroundModel(background) { + if (getBackgroundValue(background) === 'auto') { + return createAutoBackgroundModel(); + } + if (background instanceof BlurredBackgroundAction$1) { + return createBlurredBackgroundModel(background); + } + if (background instanceof BackgroundAutoBorderQualifier) { + return createBorderBackgroundModel(background); + } + if (background instanceof BackgroundBorderGradientQualifier) { + return createBorderGradientBackgroundModel(background); + } + if (background instanceof BackgroundAutoPredominantQualifier) { + return createPredominantBackgroundModel(background); + } + if (background instanceof BackgroundPredominantGradientQualifier) { + return createPredominantGradientBackgroundModel(background); + } + return createColorBackgroundModel(background); +} + +/** + * @summary qualifier + * @description Image format svg. + * @memberOf Qualifiers.Format + * @return {Qualifiers.Format.FormatQualifier} + */ +function svg() { return new FormatQualifier('svg'); } +/** + * @summary qualifier + * @description Image format auto. + * @memberOf Qualifiers.Format + * @return {Qualifiers.Format.FormatQualifier} + */ +function auto$1() { return new FormatQualifier('auto'); } + +/** + * @description Defines the background color to use instead of transparent background areas or when resizing with padding. + * + * Learn more: {@link https://cloudinary.com/documentation/effects_and_artistic_enhancements#setting_background_color|Setting background for images} | {@link https://cloudinary.com/documentation/video_effects_and_enhancements#background_color|Setting background for videos} + * + * @namespace Background + * @memberOf Qualifiers + */ +/** + * @summary qualifier + * @description Selects the predominant color while taking only the image border pixels into account. + * @memberOf Qualifiers.Background + * @return {BackgroundAutoBorderQualifier} + */ +function border() { + return new BackgroundAutoBorderQualifier(); +} +/** + * @summary qualifier + * @description Automatically determines the color to use for padding, if needed when resizing an asset. + * + * Learn more: {@link https://cloudinary.com/documentation/effects_and_artistic_enhancements#content_aware_padding|Content-aware padding} + * @memberOf Qualifiers.Background + * @return {Qualifiers.Background.BackgroundQualifier} + */ +function auto() { + return new BackgroundQualifier('auto'); +} +/** + * @summary qualifier + * @description Applies a padding gradient fade effect using the predominant colors in the border of the image. + * @memberOf Qualifiers.Background + * @return {BackgroundBorderGradientQualifier} + */ +function borderGradient() { + return new BackgroundBorderGradientQualifier(); +} +/** + * @summary qualifier + * @description Applies a padding gradient fade effect using the predominant colors in the image. + * @memberOf Qualifiers.Background + * @return {BackgroundPredominantGradientQualifier} + */ +function predominantGradient() { + return new BackgroundPredominantGradientQualifier(); +} +/** + * @summary qualifier + * @description Selects the predominant color while taking all pixels in the image into account + * @memberOf Qualifiers.Background + * @return {BackgroundAutoPredominantQualifier} + */ +function predominant() { + return new BackgroundAutoPredominantQualifier(); +} +/** + * @summary qualifier + * @description Selects the predominant color while taking all pixels in the image into account. + * @memberOf Qualifiers.Background + * @return {Qualifiers.Background.BackgroundQualifier} + */ +function color(colorStr) { + return new BackgroundQualifier(prepareColor(colorStr)); +} +/** + * @summary qualifier + * @description Selects the predominant color while taking all pixels in the image into account. + * @memberOf Qualifiers.Background + * @return {BlurredBackgroundAction} + */ +function blurred() { + return new BlurredBackgroundAction$1(); +} +const Background = { + auto: auto, + border: border, + borderGradient: borderGradient, + predominantGradient: predominantGradient, + predominant: predominant, + color: color, + blurred: blurred +}; + +/** + * Create BackgroundQualifier from IBlurredBackgroundModel + * @param backgroundModel + */ +function createBlurredBackground(backgroundModel) { + const { brightness, intensity } = backgroundModel; + const result = Background.blurred(); + if (brightness || brightness == 0) { + result.brightness(brightness); + } + if (intensity || intensity == 0) { + result.intensity(intensity); + } + return result; +} +/** + * Create a gradientBackground from given model + * @param background + * @param backgroundModel + */ +function createGradientBackground(background, backgroundModel) { + const { gradientColors, gradientDirection, contrast, palette } = backgroundModel; + if (contrast) { + background.contrast(); + } + if (palette) { + background.palette(...palette); + } + if (gradientColors) { + background.gradientColors(+gradientColors); + } + if (gradientDirection) { + background.gradientDirection(gradientDirection); + } + return background; +} +/** + * Crete a background with contrast and palette from given model + * @param background + * @param backgroundModel + */ +function createContrastPaletteBackground(background, backgroundModel) { + const { contrast, palette } = backgroundModel; + if (contrast) { + background.contrast(); + } + if (palette) { + background.palette(...palette); + } + return background; +} +/** + * Create BackgroundQualifier from IBackgroundModel + * @param backgroundModel + */ +function createBackgroundFromModel(backgroundModel) { + const { backgroundType } = backgroundModel; + switch (backgroundType) { + case 'auto': + return auto(); + case 'blurred': + return createBlurredBackground(backgroundModel); + case 'border': + return createContrastPaletteBackground(border(), backgroundModel); + case 'borderGradient': + return createGradientBackground(borderGradient(), backgroundModel); + case 'predominant': + return createContrastPaletteBackground(predominant(), backgroundModel); + case 'predominantGradient': + return createGradientBackground(predominantGradient(), backgroundModel); + default: + return color(backgroundModel.color); + } +} + +/** + * @description Defines an advanced resize with padding. + * @extends Actions.Resize.ResizeAdvancedAction + * @memberOf Actions.Resize + * @see Visit {@link Actions.Resize| Resize} for examples + */ +class ResizePadAction extends ResizeAdvancedAction { + /** + * @description Sets the background. + * @param {Qualifiers.Background} backgroundQualifier Defines the background color to use instead of + * transparent background areas or when resizing with padding. + */ + background(backgroundQualifier) { + this._actionModel.background = createBackgroundModel(backgroundQualifier); + return this.addQualifier(backgroundQualifier); + } + /** + * @description Horizontal position for custom-coordinates based padding. + * @param {number} x The x position. + */ + offsetX(x) { + this._actionModel.x = x; + return this.addQualifier(new Qualifier('x', x)); + } + /** + * @description Vertical position for custom-coordinates based padding + * @param {number} y The y position. + */ + offsetY(y) { + this._actionModel.y = y; + return this.addQualifier(new Qualifier('y', y)); + } + static fromJson(actionModel) { + const result = super.fromJson.apply(this, [actionModel]); + actionModel.background && result.background(createBackgroundFromModel(actionModel.background)); + actionModel.x && result.offsetX(actionModel.x); + actionModel.y && result.offsetY(actionModel.y); + actionModel.zoom && result.zoom(actionModel.zoom); + return result; + } +} + +/** + * @description Defines a scaling resize action. + * @extends Actions.Resize.ResizeSimpleAction + * @memberOf Actions.Resize + * @see Visit {@link Actions.Resize| Resize} for examples + */ +class ResizeScaleAction extends ResizeSimpleAction { + /** + * @description Changes the aspect ratio of an image while retaining all important content and avoiding unnatural + * distortions. + * @return {this} + */ + liquidRescaling() { + return this.addQualifier(new GravityQualifier('liquid')); + } +} + +/** + * @description Defines how to crop an asset + * @extends Actions.Resize.ResizeAdvancedAction + * @memberOf Actions.Resize + * @see Visit {@link Actions.Resize| Resize} for examples + */ +class ResizeCropAction extends ResizeAdvancedAction { + /** + * @description Horizontal position for custom-coordinates based cropping. + * @param {number} x The x position. + */ + x(x) { + this._actionModel.x = x; + return this.addQualifier(new Qualifier('x', x)); + } + /** + * @description Vertical position for custom-coordinates based cropping + * @param {number} y The y position. + */ + y(y) { + this._actionModel.y = y; + return this.addQualifier(new Qualifier('y', y)); + } + /** + * @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. + * @param {number | string} z The zoom factor. (Default: 1.0) + */ + zoom(z) { + this._actionModel.zoom = z; + return this.addQualifier(new Qualifier('z', z)); + } + static fromJson(actionModel) { + const result = super.fromJson.apply(this, [actionModel]); + actionModel.x && result.x(actionModel.x); + actionModel.y && result.y(actionModel.y); + actionModel.zoom && result.zoom(actionModel.zoom); + return result; + } +} + +/** + * @description Defines how to crop-fill an asset + * @extends Actions.Resize.ResizeAdvancedAction + * @memberOf Actions.Resize + * @see Visit {@link Actions.Resize| Resize} for examples + */ +class ResizeFillAction extends ResizeAdvancedAction { + /** + * @description Absolute X position when used with Gravity.xyCenter {@link Qualifiers.Gravity.GravityQualifier}} + * @param {number} x The x position. + */ + x(x) { + this._actionModel.x = x; + return this.addQualifier(new Qualifier('x', x)); + } + /** + * @description Absolute Y position when used with Gravity.xyCenter {@link Qualifiers.Gravity.GravityQualifier}} + * @param {number} y The y position. + */ + y(y) { + this._actionModel.y = y; + return this.addQualifier(new Qualifier('y', y)); + } + static fromJson(actionModel) { + const result = super.fromJson.apply(this, [actionModel]); + actionModel.x && result.x(actionModel.x); + actionModel.y && result.y(actionModel.y); + return result; + } +} + +/** + * @description Determines how to crop, scale, and/or zoom the delivered asset according to the requested dimensions. + * @memberOf Actions + * @namespace Resize + * @see Learn more about Gravity and Focus {@link Qualifiers.Gravity| here } + * @example + *

Scaling an image

+ * import {Cloudinary} from "@cloudinary/url-gen"; + * import {scale, fit, pad, crop} from '@cloudinary/url-gen/actions/resize'; + * + * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}}); + * const image = yourCldInstance.image('woman'); + * + * image.resize( scale(100, 100) ); + * // All resize actions have a similar interface. + * // image.resize( fit(100, 100)) ); + * // image.resize( pad(100, 100)) ); + * // image.resize( crop(100, 100)) ); + * // However, Some actions have additional arguments exposed as builder methods. + * // See the documentation for each method for more information + * + * + * // Alternative syntax, using builder methods + * image.resize( + * scale() + * .width(100) + * .height(100) + * ); + * image.toString() + * + * @example + *

Cropping with automatic focus(Gravity)

+ * import {Cloudinary} from "@cloudinary/url-gen"; + * + * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}}); + * const image = yourCldInstance.image('woman'); + * + * import {scale} from '@cloudinary/url-gen/actions/resize'; + * import {autoGravity} from '@cloudinary/url-gen/qualifiers/gravity'; + * + * image.resize( crop(100, 100).gravity(autoGravity()) ); + * + * // Alternative syntax, using builder methods + * image.resize( + * scale() + * .width(100) + * .height(100) + * .gravity(autoGravity()) + * ); + * image.toString() + */ +/** + * @summary action + * @description + * Changes the size of the image exactly to the given width and height without necessarily retaining the original aspect ratio:
+ * all original image parts are visible but might be stretched or shrunk. + * @memberOf Actions.Resize + * @param {number|string} width The required width of a transformed asset. + * @param {number|string} height The required height of a transformed asset. + * @return {Actions.Resize.ScaleAction} + */ +function scale(width, height) { + return new ResizeScaleAction('scale', width, height); +} +/** + * @summary action + * @description Extracts a region of the given width and height out of the original image. + * @memberOf Actions.Resize + * @param {number|string} width The required width of a transformed asset. + * @param {number|string} height The required height of a transformed asset. + * @return {Actions.Resize.ResizeCropAction} + */ +function crop(width, height) { + return new ResizeCropAction('crop', width, height); +} +/** + * @summary action + * @description + * Creates an image with the exact given width and height without distorting the image.
+ * This option first scales up or down as much as needed to at least fill both of the given dimensions.

+ * If the requested aspect ratio is different than the original, cropping will occur on the dimension that exceeds the requested size after scaling. + * @memberOf Actions.Resize + * @param {number|string} width The required width of a transformed asset. + * @param {number|string} height The required height of a transformed asset. + * @return {Actions.Resize.ResizeFillAction} + */ +function fill(width, height) { + return new ResizeFillAction('fill', width, height); +} +/** + * @summary action + * @description + * Resizes the asset to fill the given width and height while retaining the original aspect ratio. + * + * If the proportions of the original asset do not match the given width and height, padding is added to the asset + * to reach the required size. + * @memberOf Actions.Resize + * @param {number|string} width The required width of a transformed asset. + * @param {number|string} height The required height of a transformed asset. + * @return {Actions.Resize.ResizePadAction} + */ +function pad(width, height) { + return new ResizePadAction('pad', width, height); +} + +/** + * @description Controls the quality of the delivered image or video. + * @memberOf Actions.Delivery + * @extends {Actions.Delivery.DeliveryAction} + * @see Visit {@link Actions.Delivery|Delivery} for an example + */ +class DeliveryQualityAction extends DeliveryAction { + /** + * @param {Qualifiers.Quality} qualityValue a Quality value + */ + constructor(qualityValue) { + super('q', qualityValue.toString(), 'level'); + } + /** + * Selet the Chroma sub sampling
+ * Learn more: {@link https://cloudinary.com/documentation/image_optimization#toggle_chroma_subsampling|Toggling chroma subsampling} + * @param {420 | 444 | number} type The chroma sub sampling type + */ + chromaSubSampling(type) { + this._actionModel.chromaSubSampling = CHROMA_VALUE_TO_CHROMA_MODEL_ENUM[type]; + const qualityWithSubSampling = new QualifierValue([this._actionModel.level, type]); + qualityWithSubSampling.setDelimiter(':'); + // We either have chroma or quantization, but not both + return this.addQualifier(new Qualifier('q', qualityWithSubSampling)); + } + /** + * Controls the final quality by setting a maximum quantization percentage + * @param {number} val + */ + quantization(val) { + this._actionModel.quantization = val; + const qualityWithQuantization = new QualifierValue([this._actionModel.level, `qmax_${val}`]).setDelimiter(':'); + // We either have chroma or quantization, but not both + return this.addQualifier(new Qualifier('q', qualityWithQuantization)); + } + static fromJson(actionModel) { + const { level, chromaSubSampling, quantization } = actionModel; + const levelType = ACTION_TYPE_TO_QUALITY_MODE_MAP[level] || level; + const result = new this(levelType); + if (chromaSubSampling) { + //Turn strings like 'CHROMA_420' to 420 + const chromaValue = CHROMA_MODEL_ENUM_TO_CHROMA_VALUE[chromaSubSampling.toUpperCase()]; + chromaValue && result.chromaSubSampling(+chromaValue); + } + quantization && result.quantization(quantization); + return result; + } +} + +/** + * @description Defines transformations for delivering your assets without changing the visual or audio experience for the end user. + * @memberOf Actions + * @namespace Delivery + * @example + * See the examples under every method + */ +/** + * @summary action + * @description Defines the format of the delivered asset. + * + * Learn more: + * {@link https://cloudinary.com/documentation/image_transformations#image_format_support|Image formats} + * {@link https://cloudinary.com/documentation/video_manipulation_and_delivery#transcoding_video_to_other_formats|Video formats} + * + * @memberOf Actions.Delivery + * @param {string} format The file format. For a list of supported format types see {@link Qualifiers.Format| format types} for + * possible values + * @return {Actions.Delivery.DeliveryFormat} + * @example + * import {Cloudinary} from "@cloudinary/url-gen"; + * import {format} from "@cloudinary/url-gen/actions/delivery"; + * + * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}}); + * const image = yourCldInstance.image('woman'); + * image.delivery( + * format('jpg'), + * ); + * + */ +function format(format) { + return new DeliveryFormatAction('f', format); +} +/** + * @summary action + * @description Controls the quality of the delivered image or video. + * + * Learn more: {@link https://cloudinary.com/documentation/image_optimization#how_to_optimize_image_quality|Image quality} + * {@link https://cloudinary.com/documentation/video_optimization#how_to_optimize_video_quality|Video quality} + * @memberOf Actions.Delivery + * @param {QualityTypes | string | number | Qualifiers.Quality} qualityType For a list of supported quality types see + * {@link Qualifiers.Quality| quality types} for + * possible values. + * @return {Actions.Delivery.DeliveryQualityAction} + * @example + * import {Cloudinary} from "@cloudinary/url-gen"; + * import {quality} from "@cloudinary/url-gen/actions/delivery"; + * import {quality} from "@cloudinary/url-gen/qualifiers/quantity"; + * + * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}}); + * const image = yourCldInstance.image('woman'); + * image.delivery( + * quality('auto'), + * ); + */ +function quality(qualityType) { + return new DeliveryQualityAction(qualityType); +} + +/** + * @summary qualifier + * @memberOf Qualifiers.Compass + * @description North east corner (top right). + * @return {Qualifiers.Compass.CompassQualifier} Compass + */ +function northEast() { + return new CompassQualifier('north_east'); +} + +/** + * Predefined accessibility transformations + * @const {Object} Cloudinary.ACCESSIBILITY_MODES + */ +var ACCESSIBILITY_MODES = { + 'darkmode': colorize(70).color('black'), + 'brightmode': colorize(40).color('white'), + 'monochrome': grayscale(), + 'colorblind': assistColorBlind() +}; +/** + * Predefined vectorize placeholder transformation + */ +var VECTORIZE = new Transformation() + .effect(vectorize()) + .delivery(quality('auto')) + .delivery(format(svg())); +/** + * Predefined pixelate placeholder transformation + */ +var PIXELATE = new Transformation() + .effect(pixelate()) + .delivery(quality('auto')) + .delivery(format(auto$1())); +/** + * Predefined blur placeholder transformation + */ +var BLUR = new Transformation() + .effect(blur(2000)) + .delivery(quality('auto')) + .delivery(format(auto$1())); +/** + * Predefined predominant color placeholder transformation + */ +var PREDOMINANT_COLOR_TRANSFORM = new Transformation() + .resize(pad('iw_div_2').aspectRatio(1).background(Background.auto())) + .resize(crop(1, 1).gravity(compass(northEast()))) + .resize(fill().height('ih').width('iw')) + .delivery(quality('auto')) + .delivery(format(auto$1())); +/** + * Predefined placeholder image options + */ +var PLACEHOLDER_IMAGE_OPTIONS = { + 'vectorize': VECTORIZE, + 'pixelate': PIXELATE, + 'blur': BLUR, + 'predominant-color': PREDOMINANT_COLOR_TRANSFORM +}; +/** + * transparent gif + */ +var singleTransparentPixel = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='; +/** + * Convert common video file extensions to mime types + * Most other common video file extensions have an identical mime type so do not need conversion. + */ +var VIDEO_MIME_TYPES = { + 'flv': 'x-flv', + '3gp': '3gpp', + 'mov': 'quicktime', + 'mpg': 'mpeg', + 'avi': 'x-msvideo', + 'wmv': 'x-ms-wmv', + 'ogv': 'ogg', + 'webm': 'webm', + 'mp4': 'mp4', +}; + +var ANALYTICS_DELIMITER = '?_a='; +var HtmlVideoLayer = /** @class */ (function () { + function HtmlVideoLayer(element, userCloudinaryVideo, sources, plugins, videoAttributes) { + var _this = this; + this.mimeType = 'video'; + this.mimeSubTypes = VIDEO_MIME_TYPES; + this.videoElement = element; + this.originalVideo = userCloudinaryVideo; + this.htmlPluginState = { cleanupCallbacks: [], pluginEventSubscription: [] }; + var pluginCloudinaryVideo = cloneDeep(userCloudinaryVideo); + render(element, userCloudinaryVideo, plugins, this.htmlPluginState) + .then(function () { + _this.htmlPluginState.pluginEventSubscription.forEach(function (fn) { fn(); }); + _this.setVideoAttributes(videoAttributes); + _this.handleSourceToVideo(pluginCloudinaryVideo, sources); + }); + } + /** + * Handles user supplied sources or default sources + * @param userCloudinaryVideo {CloudinaryVideo} + * @param sources + */ + HtmlVideoLayer.prototype.handleSourceToVideo = function (userCloudinaryVideo, sources) { + var _this = this; + // checks if user supplied sources + if (sources) { + this.generateUserSources(userCloudinaryVideo, sources); + } + else { + var defaultTypes = ['webm', 'mp4', 'ogv']; + defaultTypes.forEach(function (type) { + _this.appendSourceTag(userCloudinaryVideo, type); + }); + } + }; + /** + * Generate sources based on user input + * @param userCloudinaryVideo {CloudinaryVideo} + * @param sources + */ + HtmlVideoLayer.prototype.generateUserSources = function (userCloudinaryVideo, sources) { + var _this = this; + sources.map(function (_a) { + var type = _a.type, codecs = _a.codecs, transcode = _a.transcode; + return (_this.appendSourceTag(cloneDeep(userCloudinaryVideo) + .transcode(transcode), type, _this.buildMimeType(type, codecs))); + }); + }; + /** + * Appends source tag to html video element + * @param userCloudinaryVideo {CloudinaryVideo} + * @param type {string} + * @param mimeType {string} + */ + HtmlVideoLayer.prototype.appendSourceTag = function (userCloudinaryVideo, type, mimeType) { + var source = document.createElement('source'); + var url = userCloudinaryVideo.toURL(); + // Split url to get analytics string so that we can insert the file extension (type) before it + // To simplify this we could add a .getPublicId to CloudinaryVideo and do vid.setPublicId(vid.getPublicId+type) + // Another option could be to add a .setExtension, which will allow to do vid.setExtension(type) + var srcParts = url.split(ANALYTICS_DELIMITER); + var analyticsStr = srcParts[1] ? "".concat(ANALYTICS_DELIMITER).concat(srcParts[1]) : ''; + source.src = "".concat(srcParts[0], ".").concat(type).concat(analyticsStr); + // Ideally, we want to use the VIDEO_MIME_TYPE to detect the mime of the extension + // For future proofing of simple formats (say .foo and mimetype of video/foo), we also fallback to the actual type + source.type = mimeType ? mimeType : "video/".concat(VIDEO_MIME_TYPES[type] || type); + this.videoElement.appendChild(source); + }; + /** + * Determines MIME type of given source type and codecs. + * @param type - format of the video + * @param codecs - optional information about codecs of the video + */ + HtmlVideoLayer.prototype.buildMimeType = function (type, codecs) { + var mimeType = "".concat(this.mimeType, "/").concat(this.mimeSubTypes[type] || type); + if (codecs) { + mimeType += "; codecs=" + (Array.isArray(codecs) ? codecs.join(', ') : codecs); + } + return mimeType; + }; + /** + * Iterates through the video attributes and sets to true if passed in by the user. + * In case of poster, sets the poster. + * @param videoAttributes {object} Supported attributes: controls, loop, muted, poster, preload, autoplay, playsinline + */ + HtmlVideoLayer.prototype.setVideoAttributes = function (videoAttributes) { + if (videoAttributes) { + for (var _i = 0, _a = Object.entries(videoAttributes); _i < _a.length; _i++) { + var _b = _a[_i], key = _b[0], value = _b[1]; + // Boolean attributes are considered to be true if they're present on the element at all. + // You should set value to the empty string ("") or the attribute's name. + // See https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute + value && this.videoElement.setAttribute(key, key === 'poster' ? value : ''); + } + } + }; + /** + * Called when component is updated. If our video source has changed, a video reload is triggered. + * @param updatedCloudinaryVideo + * @param sources + * @param plugins + * @param videoAttributes + */ + HtmlVideoLayer.prototype.update = function (updatedCloudinaryVideo, sources, plugins, videoAttributes) { + var _this = this; + if (updatedCloudinaryVideo !== this.originalVideo) { + var sourcesToDelete = this.videoElement.getElementsByTagName("SOURCE"); + while (sourcesToDelete[0]) + sourcesToDelete[0].parentNode.removeChild(sourcesToDelete[0]); + render(this.videoElement, updatedCloudinaryVideo, plugins, this.htmlPluginState) + .then(function () { + _this.setVideoAttributes(videoAttributes); + _this.handleSourceToVideo(updatedCloudinaryVideo, sources); + _this.videoElement.load(); + }); + } + }; + return HtmlVideoLayer; +}()); + +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** Used to match leading and trailing whitespace. */ +var reTrim = /^\s+|\s+$/g; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return root.Date.now(); +}; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + result = wait - timeSinceLastCall; + + return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +var lodash_debounce = debounce; + +/** + * Returns true if value is number + * @param value + */ +function isNum(value) { + return typeof value === "number"; +} + +/** + * return true when window is defined + */ +function isBrowser() { + return typeof window !== 'undefined'; +} + +/** + * returns true if input is an image element + * @param i + */ +function isImage(i) { + return i instanceof HTMLImageElement; +} + +/** + * @namespace + * @description Updates the src with the size of the parent element and triggers a resize event for + * subsequent resizing. + * @param steps {number | number[]} The step size in pixels or an array of image widths in pixels. + * @return {Plugin} + * @example NOTE: The following is in React. For further examples, see the Packages tab. + * + */ +function responsive(_a) { + var _b = _a === void 0 ? {} : _a, steps = _b.steps; + return responsivePlugin.bind(null, steps); +} +/** + * @description Responsive plugin + * @param steps {number | number[]} The step size in pixels. + * @param element {HTMLImageElement} The image element + * @param responsiveImage {CloudinaryImage} + * @param htmlPluginState {HtmlPluginState} holds cleanup callbacks and event subscriptions + */ +function responsivePlugin(steps, element, responsiveImage, htmlPluginState) { + if (!isBrowser()) + return true; + if (!isImage(element)) + return; + return new Promise(function (resolve) { + htmlPluginState.cleanupCallbacks.push(function () { + window.removeEventListener("resize", resizeRef); + resolve('canceled'); + }); + // Use a tagged generic action that can be later searched and replaced. + responsiveImage.addAction(new Action().setActionTag('responsive')); + // Immediately run the resize plugin, ensuring that first render gets a responsive image. + onResize(steps, element, responsiveImage); + var resizeRef; + htmlPluginState.pluginEventSubscription.push(function () { + window.addEventListener('resize', resizeRef = lodash_debounce(function () { + onResize(steps, element, responsiveImage); + }, 100)); + }); + resolve(); + }); +} +/** + * On resize updates image src + * @param steps {number | number[]} The step size in pixels. + * | number[] A set of image sizes in pixels. + * @param element {HTMLImageElement} The image element + * @param responsiveImage {CloudinaryImage} + */ +function onResize(steps, element, responsiveImage) { + updateByContainerWidth(steps, element, responsiveImage); + element.src = responsiveImage.toURL(); +} +/** + * Updates the responsiveImage by container width. + * @param steps {number | number[]} The step size in pixels. + * | number[] A set of image sizes in pixels. + * @param element {HTMLImageElement} The image element + * @param responsiveImage {CloudinaryImage} + */ +function updateByContainerWidth(steps, element, responsiveImage) { + // Default value for responsiveImgWidth, used when no steps are passed. + var responsiveImgWidth = element.parentElement.clientWidth; + if (isNum(steps)) { + var WIDTH_INTERVALS = steps; + // We need to force the container width to be intervals of max width. + responsiveImgWidth = Math.ceil(responsiveImgWidth / WIDTH_INTERVALS) * WIDTH_INTERVALS; + } + else if (Array.isArray(steps)) { + responsiveImgWidth = steps.reduce(function (prev, curr) { + return (Math.abs(curr - responsiveImgWidth) < Math.abs(prev - responsiveImgWidth) ? curr : prev); + }); + } + responsiveImage.transformation.actions.forEach(function (action, index) { + if (action instanceof Action && action.getActionTag() === 'responsive') { + responsiveImage.transformation.actions[index] = scale(responsiveImgWidth).setActionTag('responsive'); + } + }); +} + +/** + * @namespace + * @description Loads an image once it is in a certain margin in the viewport. This includes vertical and horizontal scrolling. + * @param rootMargin {string} The root element's bounding box before the intersection test is performed. Default: 0px. + * @param threshold {number} The percentage of the image's visibility at which point the image should load. Default: 0.1 (10%). + * @return {Plugin} + * @example + * + * NOTE: The following is in React. For further examples, see the Packages tab. + * When using the plugin make sure to add dimensions, otherwise the images will load with + * the size of 0x0, meaning the images will be in the viewport and trigger the lazyload plugin. + * + * + */ +function lazyload(_a) { + 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; + return lazyloadPlugin.bind(null, rootMargin, threshold); +} +/** + * @description lazyload plugin + * @param rootMargin {string} The root element's bounding box before the intersection test is performed. Default: 0px. + * @param threshold {number} The percentage of the image's visibility at which point the image should load. Default: 0.1 (10%). + * @param element The image element. + * @param element {HTMLImageElement} The image element. + * @param cloudinaryImage {CloudinaryImage} + * @param htmlPluginState {HtmlPluginState} Holds cleanup callbacks and event subscriptions. + */ +function lazyloadPlugin(rootMargin, threshold, element, cloudinaryImage, htmlPluginState) { + if (rootMargin === void 0) { rootMargin = '0px'; } + if (threshold === void 0) { threshold = 0.1; } + // if SSR skip plugin + if (!isBrowser()) + return false; + return new Promise(function (resolve) { + var onIntersect = function () { return (resolve()); }; + var unobserve = detectIntersection(element, onIntersect, rootMargin, threshold); + htmlPluginState.cleanupCallbacks.push(function () { + unobserve(); + resolve('canceled'); + }); + }); +} +/** + * Check if IntersectionObserver is supported + * @return {boolean} true if window.IntersectionObserver is defined + */ +function isIntersectionObserverSupported() { + // Check that 'IntersectionObserver' property is defined on window + return window && 'IntersectionObserver' in window; +} +/** + * Calls onIntersect() to resolve when intersection is detected, or when + * no native lazy loading or when IntersectionObserver isn't supported. + * @param {Element} el - the element to observe + * @param {function} onIntersect - called when the given element is in view + * @param rootMargin {string} The root element's bounding box before the intersection test is performed. Default: 0px. + * @param threshold {number} The percentage of the image's visibility at which point the image should load. Default: 0.1 (10%). + */ +function detectIntersection(el, onIntersect, rootMargin, threshold) { + try { + if (!isIntersectionObserverSupported()) { + // Return if there's no need or possibility to detect intersection + onIntersect(); + return; + } + // Detect intersection with given element using IntersectionObserver + var observer_1 = new IntersectionObserver(function (entries) { + entries.forEach(function (entry) { + if (entry.isIntersecting) { + observer_1.unobserve(entry.target); + onIntersect(); + } + }); + }, { rootMargin: rootMargin, threshold: threshold }); + observer_1.observe(el); + return function () { el && observer_1.observe(el); }; + } + catch (e) { + onIntersect(); + } +} + +/** + * @namespace + * @description Appends accessibility transformations to the original image. + * @return {Plugin} + * @example NOTE: The following is in React. For further examples, see the Packages tab. + * + */ +function accessibility(_a) { + var _b = _a === void 0 ? {} : _a, _c = _b.mode, mode = _c === void 0 ? 'darkmode' : _c; + return accessibilityPlugin.bind(null, mode); +} +/** + * @description Accessibility plugin + * @param mode {accessibilityMode} The accessibility mode to use. Possible modes: 'darkmode' | 'brightmode' | 'monochrome' | 'colorblind'. Default: 'darkmode'. + * @param element {HTMLImageElement} The image element. + * @param pluginCloudinaryImage {CloudinaryImage} + * @param htmlPluginState {htmlPluginState} Holds cleanup callbacks and event subscriptions. + */ +function accessibilityPlugin(mode, element, pluginCloudinaryImage, htmlPluginState) { + if (isBrowser()) { + if (!isImage(element)) + return; + return new Promise(function (resolve) { + // resolved promise when canceled + htmlPluginState.cleanupCallbacks.push(function () { + resolve('canceled'); + }); + if (!ACCESSIBILITY_MODES[mode]) { + mode = 'darkmode'; + } + pluginCloudinaryImage.effect(ACCESSIBILITY_MODES[mode]); + resolve(); + }); + } + else { + pluginCloudinaryImage.effect(ACCESSIBILITY_MODES[mode]); + return true; + } +} + +/** + * @namespace + * @description Displays a placeholder image until the original image loads. + * @param mode {PlaceholderMode} The type of placeholder image to display. Possible modes: 'vectorize' | 'pixelate' | 'blur' | 'predominant-color'. Default: 'vectorize'. + * @return {Plugin} + * @example NOTE: The following is in React. For further examples, see the Packages tab. + * + */ +function placeholder(_a) { + var _b = _a === void 0 ? {} : _a, _c = _b.mode, mode = _c === void 0 ? 'vectorize' : _c; + return placeholderPlugin.bind(null, mode); +} +/** + * @description Placeholder plugin + * @param mode {PlaceholderMode} The type of placeholder image to display. Possible modes: 'vectorize' | 'pixelate' | 'blur' | 'predominant-color'. Default: 'vectorize'. + * @param element {HTMLImageElement} The image element. + * @param pluginCloudinaryImage {CloudinaryImage} + * @param htmlPluginState {htmlPluginState} Holds cleanup callbacks and event subscriptions. + */ +function placeholderPlugin(mode, element, pluginCloudinaryImage, htmlPluginState) { + // @ts-ignore + // If we're using an invalid mode, we default to vectorize + if (!PLACEHOLDER_IMAGE_OPTIONS[mode]) { + mode = 'vectorize'; + } + // A placeholder mode maps to an array of transformations + var PLACEHOLDER_ACTIONS = PLACEHOLDER_IMAGE_OPTIONS[mode].actions; + // Before proceeding, clone the original image + // We clone because we don't want to pollute the state of the image + // Future renders (after the placeholder is loaded) should not load placeholder transformations + var placeholderClonedImage = cloneDeep(pluginCloudinaryImage); + //appends a placeholder transformation on the clone + // @ts-ignore + PLACEHOLDER_ACTIONS.forEach(function (transformation) { + placeholderClonedImage.addAction(transformation); + }); + if (!isBrowser()) { + // in SSR, we copy the transformations of the clone to the user provided CloudinaryImage + // We return here, since we don't have HTML elements to work with. + pluginCloudinaryImage.transformation = placeholderClonedImage.transformation; + return true; + } + // Client side rendering, if an image was not provided we don't perform any action + if (!isImage(element)) + return; + // For the cloned placeholder image, we remove the responsive action. + // There's no need to load e_pixelate,w_{responsive} beacuse that image is temporary as-is + // and it just causes another image to load. + // This also means that the de-facto way to use responsive in SSR is WITH placeholder. + // This also means that the user must provide dimensions for the responsive plugin on the img tag. + placeholderClonedImage.transformation.actions.forEach(function (action, index) { + if (action instanceof Action && action.getActionTag() === 'responsive') { + delete placeholderClonedImage.transformation.actions[index]; + } + }); + // Set the SRC of the imageElement to the URL of the placeholder Image + element.src = placeholderClonedImage.toURL(); + //Fallback, if placeholder errors, load a single transparent pixel + element.onerror = function () { + element.src = singleTransparentPixel; + }; + /* + * This plugin loads two images: + * - The first image is loaded as a placeholder + * - The second image is loaded after the placeholder is loaded + * + * Placeholder image loads first. Once it loads, the promise is resolved and the + * larger image will load. Once the larger image loads, promised and plugin is resolved. + */ + return new Promise(function (resolve) { + element.onload = function () { + resolve(); + }; + }).then(function () { + return new Promise(function (resolve) { + htmlPluginState.cleanupCallbacks.push(function () { + element.src = singleTransparentPixel; + resolve('canceled'); + }); + // load image once placeholder is done loading + var largeImage = new Image(); + largeImage.src = pluginCloudinaryImage.toURL(); + largeImage.onload = function () { + resolve(); + }; + // image does not load, resolve + largeImage.onerror = function () { + resolve(); + }; + }); + }); +} + +function serverSideSrc(plugins, serverCloudinaryImage, analyticsOptions) { + var clonedServerCloudinaryImage = cloneDeep(serverCloudinaryImage); + if (plugins) { + for (var i = 0; i < plugins.length; i++) { + var response = plugins[i](null, clonedServerCloudinaryImage); + if (!response) { //lazyload + break; + } + } + } + return clonedServerCloudinaryImage.toURL(analyticsOptions ? { trackedAnalytics: analyticsOptions } : null); +} + +/** + * Cancels currently running plugins. This is called from unmount or update + * @param pluginState {HtmlPluginState} Holds cleanup callbacks and event subscriptions + */ +function cancelCurrentlyRunningPlugins(pluginState) { + pluginState.cleanupCallbacks.forEach(function (fn) { + fn(); // resolve each promise with 'canceled' + }); +} + +exports.HtmlImageLayer = HtmlImageLayer; +exports.HtmlVideoLayer = HtmlVideoLayer; +exports.accessibility = accessibility; +exports.cancelCurrentlyRunningPlugins = cancelCurrentlyRunningPlugins; +exports.isBrowser = isBrowser; +exports.lazyload = lazyload; +exports.placeholder = placeholder; +exports.responsive = responsive; +exports.serverSideSrc = serverSideSrc; +//# sourceMappingURL=index.js.map diff --git a/packages/html/index.js.map b/packages/html/index.js.map new file mode 100644 index 00000000..cc1d2310 --- /dev/null +++ b/packages/html/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["node_modules/lodash.clonedeep/index.js","node_modules/tslib/tslib.es6.js","node_modules/@cloudinary/transformation-builder-sdk/internal/qualifier/QualifierValue.js","node_modules/@cloudinary/transformation-builder-sdk/internal/utils/unsupportedError.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/qualifierToJson.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/QualifierModel.js","node_modules/@cloudinary/transformation-builder-sdk/internal/qualifier/Qualifier.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/flag/FlagQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/internal/utils/dataStructureUtils.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/actionToJson.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/ActionModel.js","node_modules/@cloudinary/transformation-builder-sdk/internal/Action.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/region/NamedRegion.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/region/CustomRegion.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/region.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/blur/Blur.js","node_modules/@cloudinary/transformation-builder-sdk/internal/utils/objectFlip.js","node_modules/@cloudinary/transformation-builder-sdk/internal/internalConstants.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/EffectActions/SimpleEffectAction.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/EffectActions/LeveledEffectAction.js","node_modules/@cloudinary/transformation-builder-sdk/internal/utils/prepareColor.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/Vectorize.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/EffectActions/EffectActionWithLevel.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/AssistColorBlind.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/Colorize.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/pixelate/Pixelate.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect.js","node_modules/@cloudinary/transformation-builder-sdk/actions/background/actions/BackgroundColor.js","node_modules/@cloudinary/transformation-builder-sdk/internal/RawAction.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/IErrorObject.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/flag.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/format/FormatQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/actions/delivery/DeliveryAction.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/progressive.js","node_modules/@cloudinary/transformation-builder-sdk/actions/delivery/DeliveryFormatAction.js","node_modules/@cloudinary/transformation-builder-sdk/transformation/Transformation.js","node_modules/@cloudinary/transformation-builder-sdk/internal/utils/toFloatAsString.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/aspectRatio/AspectRatioQualifierValue.js","node_modules/@cloudinary/transformation-builder-sdk/actions/resize/ResizeSimpleAction.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/gravity/GravityQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/gravity/autoGravity/AutoGravity.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/gravity/focusOnGravity/FocusOnGravity.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/gravity/compassGravity/CompassGravity.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/gravity.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/gravity/qualifiers/focusOn/FocusOnValue.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/focusOn.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/createGravityModel.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/autoFocus.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/gravity/qualifiers/compass/CompassQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/createGravityFromModel.js","node_modules/@cloudinary/transformation-builder-sdk/actions/resize/ResizeAdvancedAction.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/base/BackgroundQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/BlurredBackgroundAction.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/base/BaseCommonBackground.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/auto/BackgroundAutoBorderQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/base/BaseGradientBackground.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/gradient/BackgroundBorderGradientQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/gradient/BackgroundPredominantGradientQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/auto/BackgroundAutoPredominantQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/createBackgroundModel.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/format.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/createBackgroundFromModel.js","node_modules/@cloudinary/transformation-builder-sdk/actions/resize/ResizePadAction.js","node_modules/@cloudinary/transformation-builder-sdk/actions/resize/ResizeScaleAction.js","node_modules/@cloudinary/transformation-builder-sdk/actions/resize/ResizeCropAction.js","node_modules/@cloudinary/transformation-builder-sdk/actions/resize/ResizeFillAction.js","node_modules/@cloudinary/transformation-builder-sdk/actions/resize.js","node_modules/@cloudinary/transformation-builder-sdk/actions/delivery/DeliveryQualityAction.js","node_modules/@cloudinary/transformation-builder-sdk/actions/delivery.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/compass.js","node_modules/lodash.debounce/index.js"],"sourcesContent":["/**\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 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 global == 'object' && global && global.Object === Object && global;\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 = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == '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","/*! *****************************************************************************\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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\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\nexport var __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\nexport function __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}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __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\nexport function __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}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\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}\nexport { QualifierValue };\n","class 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}\nexport { UnsupportedError, createUnsupportedError };\n","import { createUnsupportedError } from \"../utils/unsupportedError.js\";\n/**\n * Returns the action's model\n */\nexport function qualifierToJson() {\n return this._qualifierModel || { error: createUnsupportedError(`unsupported qualifier ${this.constructor.name}`) };\n}\n","import { qualifierToJson } from \"./qualifierToJson.js\";\nexport class QualifierModel {\n constructor() {\n this._qualifierModel = {};\n }\n toJson() {\n return qualifierToJson.apply(this);\n }\n}\n","import { QualifierValue } from './QualifierValue.js';\nimport { QualifierModel } from '../models/QualifierModel.js';\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}\nexport { Qualifier };\n","import { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\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}\nexport { FlagQualifier };\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 * Checks if `value` is a string.\n * @private\n * @param {*} value The value to check.\n * @return {boolean} `true` if `value` is a string, else `false`.\n */\nfunction isString(value) {\n return (typeof value === 'string' || value instanceof String);\n}\nexport { isString, mapToSortedArray };\n","import { createUnsupportedError } from \"../utils/unsupportedError.js\";\n/**\n * Returns the action's model\n */\nexport function 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","import { actionToJson } from \"./actionToJson.js\";\nexport class ActionModel {\n constructor() {\n this._actionModel = {};\n }\n toJson() {\n return actionToJson.apply(this);\n }\n}\n","import { FlagQualifier } from \"../qualifiers/flag/FlagQualifier.js\";\nimport { Qualifier } from \"./qualifier/Qualifier.js\";\nimport { mapToSortedArray } from \"./utils/dataStructureUtils.js\";\nimport { ActionModel } from \"./models/ActionModel.js\";\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}\nexport { Action };\n","import { Action } from \"../../internal/Action.js\";\n/**\n * @memberOf Qualifiers.Region\n */\nclass NamedRegion extends Action {\n constructor(type) {\n super();\n this.regionType = type;\n }\n}\nexport { NamedRegion };\n","import { NamedRegion } from \"./NamedRegion.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\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}\nexport { CustomRegion };\n","import { CustomRegion } from \"./region/CustomRegion.js\";\nimport { NamedRegion } from \"./region/NamedRegion.js\";\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 * @summary qualifier\n * @memberOf Qualifiers.Region\n * @return {Qualifiers.Region.NamedRegion}\n */\nfunction ocr() {\n return new NamedRegion('ocr_text');\n}\n/**\n * @description Contains functions to select the type of region, used with Effect.blur() and Effect.pixelate().\n * See also: {@link Actions.Effect.BlurAction|Blur Action}\n * See also: {@link Actions.Effect.Pixelate|Blur Action}\n * See also: {@link Actions.Effect|Possible effects}\n * @namespace Region\n * @memberOf Qualifiers\n */\nconst Region = { ocr, faces, custom };\nexport { Region, ocr, faces, custom };\n","import { Qualifier } from \"../../../internal/qualifier/Qualifier.js\";\nimport { Action } from \"../../../internal/Action.js\";\nimport { custom, faces } from \"../../../qualifiers/region.js\";\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}\nexport { BlurAction };\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}\nexport { objectFlip };\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 */\nimport { objectFlip } from \"./utils/objectFlip.js\";\nexport const CONDITIONAL_OPERATORS = {\n \"=\": \"eq\",\n \"!=\": \"ne\",\n \"<\": \"lt\",\n \">\": \"gt\",\n \"<=\": \"lte\",\n \">=\": \"gte\",\n \"&&\": \"and\",\n \"||\": \"or\",\n \"*\": \"mul\",\n \"/\": \"div\",\n \"+\": \"add\",\n \"-\": \"sub\",\n \"^\": \"pow\"\n};\nexport const RESERVED_NAMES = {\n \"aspect_ratio\": \"ar\",\n \"aspectRatio\": \"ar\",\n \"current_page\": \"cp\",\n \"currentPage\": \"cp\",\n \"duration\": \"du\",\n \"face_count\": \"fc\",\n \"faceCount\": \"fc\",\n \"height\": \"h\",\n \"initial_aspect_ratio\": \"iar\",\n \"initial_height\": \"ih\",\n \"initial_width\": \"iw\",\n \"initialAspectRatio\": \"iar\",\n \"initialHeight\": \"ih\",\n \"initialWidth\": \"iw\",\n \"initial_duration\": \"idu\",\n \"initialDuration\": \"idu\",\n \"page_count\": \"pc\",\n \"page_x\": \"px\",\n \"page_y\": \"py\",\n \"pageCount\": \"pc\",\n \"pageX\": \"px\",\n \"pageY\": \"py\",\n \"tags\": \"tags\",\n \"width\": \"w\",\n \"trimmed_aspect_ratio\": \"tar\",\n \"current_public_id\": \"cpi\",\n \"initial_density\": \"idn\",\n \"page_names\": \"pgnames\"\n};\nexport const 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};\nexport const 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};\nexport const 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};\nexport const 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};\nexport const 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};\nexport const CHROMA_VALUE_TO_CHROMA_MODEL_ENUM = {\n 444: \"CHROMA_444\",\n 420: \"CHROMA_420\"\n};\nexport const 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};\nexport const ACTION_TYPE_TO_BLEND_MODE_MAP = {\n 'antiRemoval': 'anti_removal'\n};\nexport const CHROMA_MODEL_ENUM_TO_CHROMA_VALUE = objectFlip(CHROMA_VALUE_TO_CHROMA_MODEL_ENUM);\nexport const COLOR_SPACE_MODE_TO_COLOR_SPACE_MODEL_MODE_MAP = objectFlip(COLOR_SPACE_MODEL_MODE_TO_COLOR_SPACE_MODE_MAP);\nexport const CROP_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_CROP_MODE_MAP);\nexport const DELIVERY_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_DELIVERY_MODE_MAP);\nexport const EFFECT_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_EFFECT_MODE_MAP);\nexport const QUALITY_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_QUALITY_MODE_MAP);\nexport const STREAMING_PROFILE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_STREAMING_PROFILE_MODE_MAP);\n","import { Action } from \"../../../internal/Action.js\";\nimport { QualifierValue } from \"../../../internal/qualifier/QualifierValue.js\";\nimport { Qualifier } from \"../../../internal/qualifier/Qualifier.js\";\nimport { ACTION_TYPE_TO_EFFECT_MODE_MAP, EFFECT_MODE_TO_ACTION_TYPE_MAP } from \"../../../internal/internalConstants.js\";\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}\nexport { SimpleEffectAction };\n","import { SimpleEffectAction } from \"./SimpleEffectAction.js\";\nimport { EFFECT_MODE_TO_ACTION_TYPE_MAP } from \"../../../internal/internalConstants.js\";\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}\nexport { LeveledEffectAction };\n","/**\n * Returns RGB or Color\n * @private\n * @param color\n */\nexport function prepareColor(color) {\n if (color) {\n return color.match(/^#/) ? `rgb:${color.substr(1)}` : color;\n }\n else {\n return color;\n }\n}\n","import { Action } from \"../../internal/Action.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\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}\nexport { VectorizeEffectAction };\n","import { LeveledEffectAction } from \"./LeveledEffectAction.js\";\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}\nexport { EffectActionWithLevel };\n","import { Action } from \"../../internal/Action.js\";\nimport { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\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}\nexport { AssistColorBlindEffectAction };\n","import { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { prepareColor } from \"../../internal/utils/prepareColor.js\";\nimport { EffectActionWithLevel } from \"./EffectActions/EffectActionWithLevel.js\";\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}\nexport { ColorizeEffectAction };\n","import { Qualifier } from \"../../../internal/qualifier/Qualifier.js\";\nimport { Action } from \"../../../internal/Action.js\";\nimport { custom, faces } from \"../../../qualifiers/region.js\";\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}\nexport { Pixelate };\n","import { BlurAction } from \"./effect/blur/Blur.js\";\nimport { AccelerationEffectAction } from \"./effect/leveled/Accelerate.js\";\nimport { LoopEffectAction } from \"./effect/leveled/Loop.js\";\nimport { CartoonifyEffect } from \"./effect/Cartoonify.js\";\nimport { EffectOutline } from \"./effect/Outline.js\";\nimport { SimpleEffectAction } from \"./effect/EffectActions/SimpleEffectAction.js\";\nimport { MakeTransparentEffectAction } from \"./effect/leveled/MakeTransparent.js\";\nimport { VectorizeEffectAction } from \"./effect/Vectorize.js\";\nimport { SimulateColorBlindEffectAction } from \"./effect/SimulateColorBlind.js\";\nimport { EffectActionWithLevel } from \"./effect/EffectActions/EffectActionWithLevel.js\";\nimport { AssistColorBlindEffectAction } from \"./effect/AssistColorBlind.js\";\nimport { GradientFadeEffectAction } from \"./effect/GradientFade.js\";\nimport { FadeOutEffectAction } from \"./effect/leveled/FadeOut.js\";\nimport { ColorizeEffectAction } from \"./effect/Colorize.js\";\nimport { ShadowEffectAction } from \"./effect/Shadow.js\";\nimport { StyleTransfer } from \"./effect/StyleTransfer.js\";\nimport { DitherEffectAction } from \"./effect/Dither.js\";\nimport { DeshakeEffectAction } from \"./effect/leveled/Deshake.js\";\nimport { Pixelate } from \"./effect/pixelate/Pixelate.js\";\nimport { EffectActionWithStrength } from \"./effect/EffectActions/EffectActionWithStrength.js\";\nimport { BlackwhiteEffectAction } from \"./effect/leveled/Blackwhite.js\";\nimport { FadeInEffectAction } from \"./effect/leveled/FadeIn.js\";\nimport { RemoveBackgroundAction } from \"./effect/RemoveBackgroundAction.js\";\nimport { ThemeEffect } from \"./effect/Theme.js\";\nimport { BackgroundRemoval } from \"./effect/BackgroundRemoval.js\";\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 Changes the color scheme of the image to sepia.\n * @memberOf Actions.Effect\n * @param {number} level The level of sepia to apply. (Range: 1 to 100, Server default: 80)\n * @return {Actions.Effect.EffectActionWithLevel}\n */\nfunction sepia(level) {\n return new EffectActionWithLevel('sepia', level);\n}\n/**\n * @summary action\n * @description Applies a shadow filter to the asset.\n * @memberOf Actions.Effect\n * @param shadowLevel\n * @return {Actions.Effect.ShadowEffectAction}\n */\nfunction shadow(shadowLevel) {\n return new ShadowEffectAction('shadow', shadowLevel);\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 Applies an oilPaint filter to the asset.\n * @memberOf Actions.Effect\n * @param {number} oilPaintLevel The strength of the effect. (Range: 0 to 100, Server default: 30)\n * @return {Actions.Effect.EffectActionWithStrength}\n */\nfunction oilPaint(oilPaintLevel) {\n return new EffectActionWithStrength('oil_paint', oilPaintLevel);\n}\n/**\n * @summary action\n * @description Applies an artistic filter to the asset.\n * @memberOf Actions.Effect\n * @param {ArtisticFilterType | string} artisticFilterType\n * @return {Actions.Effect.SimpleEffectAction}\n */\nfunction artisticFilter(artisticFilterType) {\n return new SimpleEffectAction('art', artisticFilterType);\n}\n/**\n * @summary action\n * @description Applies a cartoonify effect to the asset.\n * @memberOf Actions.Effect\n * @param cartoonifyLevel The thickness of the lines. (Range: 0 to 100, Server default: 50)\n * @return {Actions.Effect.CartoonifyEffect}\n */\nfunction cartoonify(cartoonifyLevel) {\n return new CartoonifyEffect('cartoonify', cartoonifyLevel);\n}\n/**\n * @summary action\n * @description Adds an outline to a transparent image. For examples, see the Image Transformations guide.\n * @memberOf Actions.Effect\n * @return {Actions.Effect.EffectOutline}\n */\nfunction outline() {\n return new EffectOutline();\n}\n/**\n * @summary action\n * @description Applies a complex deep learning neural network algorithm that extracts artistic styles from a source image and applies them to the content of a target photograph.
\n * Learn more: {@link https://cloudinary.com/documentation/neural_artwork_style_transfer_addon|Neural Artwork Style Transfer}\n * @memberOf Actions.Effect\n * @param {ImageSource} imageSource `import {image} from '@cloudinary/url-gen/qualifiers/sources`\n * @return {Actions.Effect.StyleTransfer}\n */\nfunction styleTransfer(imageSource) {\n return new StyleTransfer(imageSource);\n}\n/**\n * @summary action\n * @description\n * Causes a video clip to play forwards and then backwards.\n * Use in conjunction with trimming parameters ('duration', 'start_offset', or 'end_offset') and the 'loop' effect to deliver a classic (short, repeating) boomerang clip.
\n * For details and examples, see 'Create a boomerang video clip' in the Video Transformations guide.\n * @memberOf Actions.Effect\n * @return {Actions.Effect.SimpleEffectAction}\n */\nfunction boomerang() {\n return new SimpleEffectAction('boomerang');\n}\n/**\n * @summary action\n * @description\n * Removes red eyes with the Advanced Facial Attribute Detection add-on.\n * For details, see the Advanced Facial Attribute Detection add-on documentation.\n * @memberOf Actions.Effect\n * @return {Actions.Effect.SimpleEffectAction}\n */\nfunction advancedRedEye() {\n return new SimpleEffectAction('adv_redeye');\n}\n/**\n * @summary action\n * @description Converts the image to black and white.\n * @memberOf Actions.Effect\n * @param {number | string} level The balance between black (100) and white (0). (Range: 0 to 100, Server default: 50)\n * @return {Actions.Effect.BlackwhiteEffectAction}\n */\nfunction blackwhite(level) {\n return new BlackwhiteEffectAction('blackwhite', level);\n}\n/**\n * @summary action\n * @description Negates the image colors (negative).\n * @memberOf Actions.Effect\n * @return {Actions.Effect.SimpleEffectAction}\n */\nfunction negate() {\n return new SimpleEffectAction('negate');\n}\n/**\n * @summary action\n * @description Removes red eyes in the image.\n * @memberOf Actions.Effect\n * @return {Actions.Effect.SimpleEffectAction}\n */\nfunction redEye() {\n return new SimpleEffectAction('redeye');\n}\n/**\n * @summary action\n * @description Plays the video or audio file in reverse.\n * @memberOf Actions.Effect\n * @return {Actions.Effect.SimpleEffectAction}\n */\nfunction reverse() {\n return new SimpleEffectAction('reverse');\n}\n/**\n * @summary action\n * @description Changes the speed of the video playback.\n * @memberOf Actions.Effect\n * @param {number} speedIncreasePercent The percentage change of speed. Positive numbers speed up the playback, negative numbers slow down the playback (Range: -50 to 100, Server default: 0)\n * @return {Actions.Effect.AccelerationEffectAction}\n */\nfunction accelerate(speedIncreasePercent) {\n return new AccelerationEffectAction(speedIncreasePercent);\n}\n/**\n * @summary action\n * @description\n * Fade in at the beginning of the video.\n * For details and examples, see 'Fade in and out' in the Video Transformations guide.\n * @memberOf Actions.Effect\n * @param {number} fadeLength The time in ms for the fade to occur. (Server default: 2000)\n * @return {Actions.Effect.FadeInEffectAction}\n */\nfunction fadeIn(fadeLength) {\n return new FadeInEffectAction(fadeLength);\n}\n/**\n * @summary action\n * @description\n * Fade out at the end of the video.\n * For details and examples, see 'Fade in and out' in the Video Transformations guide.\n * @memberOf Actions.Effect\n * @param {number} fadeLength The time in ms for the fade to occur. (Server default: 2000)\n * @return {Actions.Effect.FadeoutEffectAction}\n */\nfunction fadeOut(fadeLength) {\n return new FadeOutEffectAction(fadeLength);\n}\n/**\n * @summary action\n * @description\n * Delivers a video or animated GIF that contains additional loops of the video/GIF.\n * The total number of iterations is the number of additional loops plus one.
\n * For animated GIFs only, you can also specify the loop effect without a numeric value to instruct it to loop the GIF infinitely.\n * @memberOf Actions.Effect\n * @param {number} additionalLoops The additional number of times to play the video or animated GIF.\n * @return {Actions.Effect.LoopEffectAction}\n */\nfunction loop(additionalLoops) {\n return new LoopEffectAction('loop', additionalLoops);\n}\n/**\n * @summary action\n * @description\n * Makes the background of the image transparent (or solid white for formats that do not support transparency).\n * The background is determined as all pixels that resemble the pixels on the edges of the image.\n *\n * @memberOf Actions.Effect\n * @param {number} tolerance The tolerance used to accommodate variance in the background color. (Range: 0 to 100, Server default: 10)\n * @return {Actions.Effect.MakeTransparentEffectAction}\n */\nfunction makeTransparent(tolerance) {\n return new MakeTransparentEffectAction('make_transparent', tolerance);\n}\n/**\n * @summary action\n * @description Adds visual noise to the video, visible as a random flicker of \"dots\" or \"snow\".\n * @memberOf Actions.Effect\n * @param {number} percentage The percent of noise to apply. (Range: 0 to 100 Server default: 0)\n * @return {Actions.Effect.EffectActionWithLevel}\n */\nfunction noise(percentage) {\n return new EffectActionWithLevel('noise', percentage);\n}\n/**\n * @summary action\n * @description Applies a vignette effect.\n * @memberOf Actions.Effect\n * @param {number} strength The strength of the vignette. (Range: 0 to 100, Server default: 20)\n * @return {Actions.Effect.EffectActionWithStrength}\n */\nfunction vignette(strength) {\n return new EffectActionWithStrength('vignette', strength);\n}\n/**\n * @summary action\n * @description\n * Applies an ordered dither filter to the image.\n * Use the constants defined in {@link Qualifiers.Dither|@cloudinary/url-gen/qualifiers/dither} for ditherType.\n * @memberOf Actions.Effect\n * @param {Qualifiers.Dither} ditherType - The dither type applied to the image\n * @return {Actions.Effect.DitherEffectAction}\n */\nfunction dither(ditherType) {\n return new DitherEffectAction('ordered_dither', ditherType);\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 a gradient fade effect from one edge of the image.\n * Use .x() or .y() to indicate from which edge to fade and how much of the image should be faded.\n * Values of x and y can be specified as a percentage (Range: 0.0 to 1.0), or in pixels (integer values).
\n * Positive values fade from the top (y) or left (x). Negative values fade from the bottom (y) or right (x).
\n * By default, the gradient is applied to the top 50% of the image (y = 0.5).
\n * Only one direction can be specified but the fade can be applied symmetrically using the mode parameter.
\n * To apply different amounts of fade to multiple edges, use chained fade effects.\n *\n * @memberOf Actions.Effect\n * @return {Actions.Effect.GradientFadeEffectAction}\n */\nfunction gradientFade() {\n return new GradientFadeEffectAction();\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\n * Simulates the way an image would appear to someone with the specified color blind condition.
\n * For a list of supported color blind conditions see {@link Qualifiers.SimulateColorBlindValues| types of color blindness} for possible values\n * @memberOf Actions.Effect\n * @return {Actions.Effect.SimulateColorBlindEffectAction}\n */\nfunction simulateColorBlind() {\n return new SimulateColorBlindEffectAction();\n}\n/**\n * @summary action\n * @description Removes small motion shifts from the video. with a maximum extent of movement in the horizontal and vertical direction of 32 pixels\n * @memberOf Actions.Effect\n * @return {Actions.Effect.DeshakeEffectAction}\n */\nfunction deshake(pixels) {\n return new DeshakeEffectAction('deshake', pixels);\n}\n/**\n * @summary action\n * @description Supports the concatenation of videos with a custom transition by including a transition video as an\n * additional layer and specifying the transition effect\n * @memberOf Actions.Effect\n * @return {Actions.Effect.SimpleEffectAction}\n */\nfunction transition() {\n return new SimpleEffectAction('transition');\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 * @summary action\n * @description Makes the background of an image transparent (or solid white for JPGs).
\n * Use when the background is a uniform color.\n * {@link https://cloudinary.com/documentation/transformation_reference#e_bgremoval|Background Removal}\n *\n * @memberOf Actions.Effect\n * @return {Actions.Effect.RemoveBackgroundAction}\n */\nfunction removeBackground() {\n return new RemoveBackgroundAction();\n}\n/**\n * @summary action\n * @description Uses the Cloudinary AI Background Removal add-on to make the background of an image transparent.
\n * When combined with other transformations, this effect must be specified in the first component.\n * {@link https://cloudinary.com/documentation/transformation_reference#e_background_removal|Background Removal}\n *\n * @memberOf Actions.Effect\n * @return {Actions.Effect.BackgroundRemoval}\n */\nfunction backgroundRemoval() {\n return new BackgroundRemoval();\n}\n/**\n *\n * @description Changes the main background color to the one specified, as if a 'theme change' was applied (e.g. dark mode vs light mode).\n * @param {SystemColors} color\n * @return {Actions.Effect.ThemeEffect}\n */\nfunction theme(color) {\n return new ThemeEffect(color);\n}\n/**\n * @description Defines effects that you can apply to transform your assets.\n * @memberOf Actions\n * @namespace Effect\n * @example\n * An extreme example of using many effects on the same asset\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * // Import everything, or just the action you need for tree-shaking purposes\n * import {Effect, sepia} from \"@cloudinary/url-gen/actions/effect\";\n * import {ArtisticFilter, alDente} from \"../../../src/qualifiers/artisticFilter\";\n * import {ShakeStrength, pixels16} from \"../../../src/qualifiers/shakeStrength\";\n *\n * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}});\n * const image = yourCldInstance.image('woman');\n *\n * image.effect(Effect.advancedRedEye())\n * .effect(Effect.accelerate())\n * .effect(Effect.accelerate(100))\n * .effect(Effect.accelerate().rate(5))\n * .effect(Effect.boomerang())\n * .effect(Effect.blackwhite())\n * .effect(Effect.blackwhite(10))\n * .effect(Effect.blackwhite().threshold(20))\n * .effect(Effect.fadeIn(100))\n * .effect(Effect.fadeIn().duration(5))\n * .effect(Effect.fadeOut(100))\n * .effect(Effect.fadeOut().duration(5))\n * .effect(Effect.grayscale())\n * .effect(Effect.loop())\n * .effect(Effect.loop(100))\n * .effect(Effect.loop().additionalIterations(5))\n * .effect(Effect.makeTransparent())\n * .effect(Effect.makeTransparent(100))\n * .effect(Effect.makeTransparent().tolerance(5))\n * .effect(Effect.makeTransparent().tolerance(5).colorToReplace('red'))\n * .effect(Effect.noise())\n * .effect(Effect.noise(100))\n * .effect(Effect.noise().level(5))\n * .effect(Effect.negate())\n * .effect(Effect.reverse())\n * .effect(Effect.redEye())\n * .effect(Effect.sepia())\n * .effect(Effect.sepia(100))\n * .effect(Effect.sepia().level(5))\n * .effect(Effect.vignette())\n * .effect(Effect.vignette(100))\n * .effect(Effect.vignette().strength(5))\n * .effect(Effect.deshake())\n * .effect(Effect.deshake(10))\n * .effect(Effect.artisticFilter(alDente())\n * .effect(Effect.deshake().shakeStrength(pixels16()))\n * .effect(Effect.backgroundRemoval().fineEdges(true).hints([ForegroundObject.DOG, ForegroundObject.CAT])\n */\nconst Effect = {\n pixelate: pixelate,\n deshake: deshake,\n boomerang: boomerang,\n advancedRedEye: advancedRedEye,\n blackwhite,\n negate: negate,\n redEye: redEye,\n reverse: reverse,\n accelerate: accelerate,\n fadeIn: fadeIn,\n fadeOut: fadeOut,\n loop: loop,\n makeTransparent: makeTransparent,\n noise: noise,\n vignette: vignette,\n blur: blur,\n grayscale: grayscale,\n sepia: sepia,\n shadow: shadow,\n colorize: colorize,\n oilPaint: oilPaint,\n artisticFilter: artisticFilter,\n cartoonify: cartoonify,\n outline: outline,\n styleTransfer: styleTransfer,\n gradientFade: gradientFade,\n vectorize: vectorize,\n assistColorBlind: assistColorBlind,\n simulateColorBlind: simulateColorBlind,\n transition: transition,\n dither: dither,\n removeBackground,\n backgroundRemoval,\n theme\n};\nexport { Effect, pixelate, deshake, boomerang, advancedRedEye, blackwhite, negate, redEye, reverse, accelerate, fadeIn, fadeOut, loop, makeTransparent, noise, vignette, blur, grayscale, sepia, shadow, colorize, oilPaint, artisticFilter, cartoonify, outline, styleTransfer, gradientFade, vectorize, assistColorBlind, simulateColorBlind, transition, dither, removeBackground, backgroundRemoval, theme };\n","import { Action } from \"../../../internal/Action.js\";\nimport { QualifierValue } from \"../../../internal/qualifier/QualifierValue.js\";\nimport { Qualifier } from \"../../../internal/qualifier/Qualifier.js\";\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}\nexport { BackgroundColor };\n","import { createUnsupportedError } from \"./utils/unsupportedError.js\";\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}\nexport { RawAction };\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}\nexport { isErrorObject };\n","/**\n * @description Defines flags that you can use to alter the default transformation behavior.\n * @namespace Flag\n * @memberOf Qualifiers\n */\nimport { FlagQualifier } from \"./flag/FlagQualifier.js\";\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Used when delivering a video file as an image format that supports animation, such as animated WebP.\n * Plays all frames rather than just delivering the first one as a static image.\n * Use this flag in addition to the flag or parameter controlling the delivery format,\n * for example f_auto or fl_awebp.\n\n * Note: When delivering a video in GIF format, it is delivered as an animated GIF by default and this flag is not\n * necessary. To deliver a single frame of a video in GIF format, use the page parameter.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction animated() {\n return new FlagQualifier('animated');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description When converting animated images to WebP format, generate an animated WebP from all the frames in the\n * original\n * animated file instead of only from the first still frame.\n *\n * Note that animated WebPs are not supported in all browsers and versions.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction animatedWebP() {\n return new FlagQualifier('awebp');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description When used together with automatic quality (q_auto):\n * allow switching to PNG8 encoding if the quality algorithm decides that it's more efficient.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction anyFormat() {\n return new FlagQualifier('any_format');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description When converting animated images to PNG format, generates an animated PNG from all the frames in the\n * original\n * animated file instead of only from the first still frame.\n *\n * Note that animated PNGs are not supported in all browsers and versions.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction animatedPng() {\n return new FlagQualifier('apng');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Trims pixels according to a clipping path included in the original image\n * (e.g., manually created using PhotoShop).\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction clip() {\n return new FlagQualifier('clip');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Trims pixels according to a clipping path included in the original image (e.g., manually created\n * using PhotoShop)\n * using an evenodd clipping rule.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction clipEvenOdd() {\n return new FlagQualifier('clip_evenodd');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Instructs Cloudinary to clear all image meta-data (IPTC, Exif and XMP) while applying an incoming\n * transformation.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction forceStrip() {\n return new FlagQualifier('force_strip');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Allows custom flag\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction custom(value) {\n return new FlagQualifier(value);\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Adds ICC color space metadata to the image, even when the original image doesn't contain any ICC data.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction forceIcc() {\n return new FlagQualifier('force_icc');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Delivers the image as an attachment.\n * @param {string} filename The attachment's filename\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction attachment(filename) {\n return new FlagQualifier('attachment', filename);\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Returns metadata of the input asset and of the transformed output asset in JSON instead of the\n * transformed image.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction getInfo() {\n return new FlagQualifier('getinfo');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Deliver an HLS adaptive bitrate streaming file as HLS v3 instead of the default version (HLS v4).\n * Delivering in this format requires a private CDN configuration.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction hlsv3() {\n return new FlagQualifier('hlsv3');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Sets the cache-control to immutable for the asset.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction immutableCache() {\n return new FlagQualifier('immutable_cache');\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 Keeps the copyright related fields when stripping meta-data.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction keepAttribution() {\n return new FlagQualifier('keep_attribution');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * Keep the Display Aspect Ratio metadata of the uploaded video (if it’s different from the current video\n * dimensions).\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction keepDar() {\n return new FlagQualifier('keep_dar');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Keeps all meta-data.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction keepIptc() {\n return new FlagQualifier('keep_iptc');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Applies all chained transformations, until a transformation component that includes this flag, on the last added\n * overlay or underlay instead of applying on the containing image.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction layerApply() {\n return new FlagQualifier('layer_apply');\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 Convert the audio channel to mono\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction mono() {\n return new FlagQualifier('mono');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Used internally by Position within an Overlay, this flag will tile the overlay across your image.\n *\n * Learn more: {@link https://cloudinary.com/documentation/transformation_reference#fl_no_overflow|Overflow in overlays}\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction noOverflow() {\n return new FlagQualifier('no_overflow');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Don't stream a video that is currently being generated on the fly. Wait until the video is fully generated.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction noStream() {\n return new FlagQualifier('no_stream');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Generate PNG images in the png24 format.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction png24() {\n return new FlagQualifier('png24');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Generate PNG images in the png32 format.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction png32() {\n return new FlagQualifier('png32');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Generate PNG images in the PNG8 format.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction png8() {\n return new FlagQualifier('png8');\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 Reduces the image to one flat pixelated layer (as opposed to the default vector based graphic) in\n * order to enable\n * PDF resizing and overlay manipulations.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction rasterize() {\n return new FlagQualifier('rasterize');\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 * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Instructs Cloudinary to run a sanitizer on the image (relevant only for the SVG format).\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction sanitize() {\n return new FlagQualifier('sanitize');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Splices the video stipulated as an overlay on to the end of the container video instead of adding it as an\n * overlay.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction splice() {\n return new FlagQualifier('splice');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Instructs Cloudinary to clear all ICC color profile data included with the image.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction stripProfile() {\n return new FlagQualifier('strip_profile');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description If the requested video transformation has already been generated, this flag works identically to\n * Flag::attachment.\n *\n * However, if the video transformation is being requested for the first time, this flag causes the video download\n * to begin immediately, streaming it as a fragmented video file.\n *\n * In contrast, if the regular fl_attachment flag is used when a user requests a new video transformation,\n * the download will begin only after the complete transformed video has been generated.\n *\n * Most standard video players successfully play fragmented video files without issue.\n *\n * @param {string} filename The attachment's filename\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction streamingAttachment(filename) {\n return new FlagQualifier('streaming_attachment', filename);\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Generates TIFF images using LZW compression and in the TIFF8 format.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction tiff8Lzw() {\n return new FlagQualifier('tiff8_lzw');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Used internally by Position within an Overlay, this flag will tile the overlay across your image.\n *\n * Learn more: {@link https://cloudinary.com/documentation/layers#automatic_tiling|Tiling overlay}\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction tiled() {\n return new FlagQualifier('tiled');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Truncate (trim) a video file based on the start time defined in the metadata (relevant only where the metadata\n * includes a directive to play only a section of the video).\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction truncateTS() {\n return new FlagQualifier('truncate_ts');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Create a waveform image (in the format specified by the file extension) from the audio or video file.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction waveform() {\n return new FlagQualifier('waveform');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description A qualifier that ensures that an alpha channel is not applied to a TIFF image if it is a mask channel.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction ignoreMaskChannels() {\n return new FlagQualifier('ignore_mask_channels');\n}\nconst Flag = {\n animated, anyFormat, animatedPng, animatedWebP,\n clipEvenOdd, lossy, preserveTransparency, png8, png24, png32, progressive, rasterize,\n sanitize, stripProfile, tiff8Lzw, attachment, forceIcc, forceStrip, getInfo, immutableCache,\n keepAttribution, keepIptc, custom, streamingAttachment, hlsv3, keepDar, noStream, mono,\n layerApply, relative, regionRelative, splice, truncateTS, waveform, ignoreInitialAspectRatio, clip,\n tiled, noOverflow, ignoreMaskChannels\n};\nexport { Flag, animated, anyFormat, animatedPng, animatedWebP, clipEvenOdd, lossy, preserveTransparency, png8, png24, png32, progressive, rasterize, sanitize, stripProfile, tiff8Lzw, attachment, forceIcc, forceStrip, getInfo, immutableCache, keepAttribution, keepIptc, custom, streamingAttachment, hlsv3, keepDar, noStream, mono, layerApply, relative, regionRelative, splice, truncateTS, waveform, ignoreInitialAspectRatio, clip, tiled, noOverflow, ignoreMaskChannels };\n","import { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\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}\nexport { FormatQualifier };\n","import { Action } from \"../../internal/Action.js\";\nimport { FormatQualifier } from \"../../qualifiers/format/FormatQualifier.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { DELIVERY_MODE_TO_ACTION_TYPE_MAP } from \"../../internal/internalConstants.js\";\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}\nexport { DeliveryAction };\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 */\nimport { FlagQualifier } from \"./flag/FlagQualifier.js\";\nclass ProgressiveQualifier extends FlagQualifier {\n constructor(mode) {\n super('progressive', mode);\n }\n}\n/**\n * @memberOf Qualifiers.Progressive\n */\nfunction none() {\n return new ProgressiveQualifier('none');\n}\n/**\n * @memberOf Qualifiers.Progressive\n */\nfunction semi() {\n return new ProgressiveQualifier('semi');\n}\n/**\n * @memberOf Qualifiers.Progressive\n */\nfunction steep() {\n return new ProgressiveQualifier('steep');\n}\n/**\n * @memberOf Qualifiers.Progressive\n */\nfunction progressive() {\n return new ProgressiveQualifier();\n}\nconst Progressive = {\n semi,\n none,\n steep,\n progressive,\n ProgressiveQualifier\n};\nexport { Progressive, semi, none, steep, progressive, ProgressiveQualifier };\n","import { lossy, preserveTransparency, progressive } from \"../../qualifiers/flag.js\";\nimport { DeliveryAction } from \"./DeliveryAction.js\";\nimport { ProgressiveQualifier } from \"../../qualifiers/progressive.js\";\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}\nexport { DeliveryFormatAction };\n","import { Action } from \"../internal/Action.js\";\nimport { BackgroundColor } from \"../actions/background/actions/BackgroundColor.js\";\nimport { prepareColor } from \"../internal/utils/prepareColor.js\";\nimport { FlagQualifier } from \"../qualifiers/flag/FlagQualifier.js\";\nimport { RawAction } from \"../internal/RawAction.js\";\nimport { isErrorObject } from \"../internal/models/IErrorObject.js\";\nimport { DeliveryFormatAction } from \"../actions/delivery/DeliveryFormatAction.js\";\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/effects_and_artistic_enhancements#distort|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 * @desc An alias to Action Delivery.quality\n * @param {string|number} quality\n * @return {this}\n */\n quality(quality) {\n this.addAction(new DeliveryFormatAction('q', quality));\n return this;\n }\n /**\n * @desc An alias to Action Delivery.format\n * @param {string} format\n * @return {this}\n */\n format(format) {\n this.addAction(new DeliveryFormatAction('f', format));\n return this;\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}\nexport { Transformation };\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 */\nexport function 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","import { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\n/**\n * @memberOf Qualifiers.AspectRatio\n * @extends {SDK.QualifierValue}\n */\nexport class AspectRatioQualifierValue extends QualifierValue {\n}\n","import { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { Action } from \"../../internal/Action.js\";\nimport { toFloatAsString } from \"../../internal/utils/toFloatAsString.js\";\nimport { AspectRatioQualifierValue } from \"../../qualifiers/aspectRatio/AspectRatioQualifierValue.js\";\nimport { ignoreInitialAspectRatio, regionRelative, relative } from \"../../qualifiers/flag.js\";\nimport { FlagQualifier } from \"../../qualifiers/flag/FlagQualifier.js\";\nimport { ACTION_TYPE_TO_CROP_MODE_MAP, CROP_MODE_TO_ACTION_TYPE_MAP } from \"../../internal/internalConstants.js\";\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}\nexport { ResizeSimpleAction };\n","import { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\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}\nexport { GravityQualifier };\n","import { GravityQualifier } from \"../GravityQualifier.js\";\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}\nexport { AutoGravity };\n","import { GravityQualifier } from \"../GravityQualifier.js\";\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}\nexport { FocusOnGravity };\n","import { GravityQualifier } from \"../GravityQualifier.js\";\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}\nexport { CompassGravity };\n","import { CompassGravity } from \"./gravity/compassGravity/CompassGravity.js\";\nimport { FocusOnGravity } from \"./gravity/focusOnGravity/FocusOnGravity.js\";\nimport { AutoGravity } from \"./gravity/autoGravity/AutoGravity.js\";\nimport { XYCenterGravity } from \"./gravity/xyCenterGravity/XYCenterGravity.js\";\n/**\n * @description Defines the gravity based on directional values from a compass.\n * Learn more: {@link https://cloudinary.com/documentation/resizing_and_cropping#control_gravity|Control gravity for images}\n * Learn more: {@link https://cloudinary.com/documentation/video_resizing_and_cropping#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 * @summary qualifier\n * @description Set the center of gravity to the given x & y coordinates.\n * @memberOf Qualifiers.Gravity\n * @return {XYCenterGravity}\n */\nfunction xyCenter() {\n return new XYCenterGravity();\n}\n/**\n * @description A qualifier that determines which part of an asset to focus on, and thus which part of the asset to keep,
\n * when any part of the asset is cropped. For overlays, this setting determines where to place the overlay.\n * @namespace Gravity\n * @memberOf Qualifiers\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 *\n * // Expand every function separately to see its own example\n */\nconst Gravity = {\n compass: compass,\n autoGravity: autoGravity,\n focusOn: focusOn,\n xyCenter\n};\nexport { Gravity, compass, autoGravity, focusOn, xyCenter };\n","import { QualifierValue } from \"../../../../internal/qualifier/QualifierValue.js\";\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}\nexport { FocusOnValue };\n","import { FocusOnValue } from \"./gravity/qualifiers/focusOn/FocusOnValue.js\";\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects birds\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction bird() {\n return new FocusOnValue('bird');\n}\n/**\n * @summary qualifier\n * @description Detects dogs\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction dog() {\n return new FocusOnValue('dog');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects cats\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction cat() {\n return new FocusOnValue('cat');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects microwaves\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction microwave() {\n return new FocusOnValue('microwave');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects refrigerators\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction refrigerator() {\n return new FocusOnValue('refrigerator');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects bottles\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction bottle() {\n return new FocusOnValue('bottle');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects sinks\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction sink() {\n return new FocusOnValue('sink');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects skateboards\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction skateboard() {\n return new FocusOnValue('skateboard');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects people\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction person() {\n return new FocusOnValue('person');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects the largest face in an image with the Advanced Facial Attribute Detection add-on and makes it the focus of the transformation.\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction advancedFace() {\n return new FocusOnValue('adv_face');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects all faces in an image with the Advanced Facial Attribute Detection add-on and makes them the focus of the transformation.\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction advancedFaces() {\n return new FocusOnValue('adv_faces');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects all eyes in an image with the Advanced Facial Attribute Detection add-on and makes them the focus of the transformation.\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction advancedEyes() {\n return new FocusOnValue('adv_eyes');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects the largest face in the asset and makes it the focus of the transformation.\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction face() {\n return new FocusOnValue('face');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects all the faces in the asset and makes them the focus of the transformation.\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction faces() {\n return new FocusOnValue('faces');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects all the faces in the asset and makes them the focus of the transformation.\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction background() {\n return new FocusOnValue('background');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects aeroplane\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction aeroplane() {\n return new FocusOnValue('aeroplane');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects bicycle\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction bicycle() {\n return new FocusOnValue('bicycle');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects boat\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction boat() {\n return new FocusOnValue('boat');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects bus\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction bus() {\n return new FocusOnValue('bus');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects car\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction car() {\n return new FocusOnValue('car');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects chair\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction chair() {\n return new FocusOnValue('chair');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects cow\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction cow() {\n return new FocusOnValue('cow');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects diningtable\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction diningtable() {\n return new FocusOnValue('diningtable');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects horse\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction horse() {\n return new FocusOnValue('horse');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects motorbike\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction motorbike() {\n return new FocusOnValue('motorbike');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects pottedplant\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction pottedplant() {\n return new FocusOnValue('pottedplant');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects sheep\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction sheep() {\n return new FocusOnValue('sheep');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects sofa\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction sofa() {\n return new FocusOnValue('sofa');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects train\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction train() {\n return new FocusOnValue('train');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects tvmonitor\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction tvmonitor() {\n return new FocusOnValue('tvmonitor');\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/ocr_text_detection_and_extraction_addon|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 * @memberOf Qualifiers\n * @namespace FocusOn\n * @see Visit {@link Qualifiers.Gravity|Gravity} for an example\n */\nconst FocusOn = {\n person,\n cat,\n microwave,\n refrigerator,\n skateboard,\n bird,\n bottle,\n dog,\n sink,\n face,\n train,\n sofa,\n sheep,\n pottedplant,\n horse,\n faces,\n cow,\n bus,\n boat,\n advancedEyes,\n advancedFace,\n advancedFaces,\n aeroplane,\n background,\n bicycle,\n car,\n chair,\n diningtable,\n tvmonitor,\n motorbike,\n ocr\n};\nexport { FocusOnValue, FocusOn, person, cat, microwave, refrigerator, skateboard, bird, bottle, dog, sink, face, train, sofa, sheep, pottedplant, horse, faces, cow, bus, boat, advancedEyes, advancedFace, advancedFaces, aeroplane, background, bicycle, car, chair, diningtable, tvmonitor, motorbike, ocr };\n","import { AutoGravity } from \"../../qualifiers/gravity/autoGravity/AutoGravity.js\";\nimport { FocusOnGravity } from \"../../qualifiers/gravity/focusOnGravity/FocusOnGravity.js\";\nimport { autoGravity } from \"../../qualifiers/gravity.js\";\nimport { FocusOnValue } from \"../../qualifiers/focusOn.js\";\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 */\nexport function 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","import { QualifierValue } from \"../internal/qualifier/QualifierValue.js\";\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}\nexport { AutoFocus };\n","import { QualifierValue } from \"../../../../internal/qualifier/QualifierValue.js\";\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}\nexport { CompassQualifier };\n","import { autoGravity, focusOn } from \"../../qualifiers/gravity.js\";\nimport { FocusOnValue, ocr } from \"../../qualifiers/focusOn.js\";\nimport { AutoFocus } from \"../../qualifiers/autoFocus.js\";\nimport { CompassGravity } from \"../../qualifiers/gravity/compassGravity/CompassGravity.js\";\nimport { CompassQualifier } from \"../../qualifiers/gravity/qualifiers/compass/CompassQualifier.js\";\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}\nexport { createGravityFromModel };\n","import { ResizeSimpleAction } from \"./ResizeSimpleAction.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { createGravityModel } from \"../../internal/models/createGravityModel.js\";\nimport { createGravityFromModel } from \"../../internal/models/createGravityFromModel.js\";\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}\nexport { ResizeAdvancedAction };\n","import { Qualifier } from \"../../../../internal/qualifier/Qualifier.js\";\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}\nexport { BackgroundQualifier };\n","import { BackgroundQualifier } from \"./base/BackgroundQualifier.js\";\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}\nexport default BlurredBackgroundAction;\n","import { prepareColor } from \"../../../../internal/utils/prepareColor.js\";\nimport { BackgroundQualifier } from \"./BackgroundQualifier.js\";\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}\nexport { BaseCommonBackground };\n","import { BaseCommonBackground } from \"../base/BaseCommonBackground.js\";\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}\nexport { BackgroundAutoBorderQualifier };\n","import { BaseCommonBackground } from \"./BaseCommonBackground.js\";\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}\nexport { BaseGradientBackground };\n","import { BaseGradientBackground } from \"../base/BaseGradientBackground.js\";\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}\nexport { BackgroundBorderGradientQualifier };\n","import { BaseGradientBackground } from \"../base/BaseGradientBackground.js\";\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}\nexport { BackgroundPredominantGradientQualifier };\n","import { BaseCommonBackground } from \"../base/BaseCommonBackground.js\";\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}\nexport { BackgroundAutoPredominantQualifier };\n","import BlurredBackgroundAction from \"../../qualifiers/background/shared/BlurredBackgroundAction.js\";\nimport { BackgroundAutoBorderQualifier } from \"../../qualifiers/background/shared/auto/BackgroundAutoBorderQualifier.js\";\nimport { BackgroundBorderGradientQualifier } from \"../../qualifiers/background/shared/gradient/BackgroundBorderGradientQualifier.js\";\nimport { BackgroundPredominantGradientQualifier } from \"../../qualifiers/background/shared/gradient/BackgroundPredominantGradientQualifier.js\";\nimport { BackgroundAutoPredominantQualifier } from \"../../qualifiers/background/shared/auto/BackgroundAutoPredominantQualifier.js\";\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) {\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}\nexport { createBackgroundModel };\n","import { FormatQualifier } from \"./format/FormatQualifier.js\";\n/**\n * @description Contains functions to select the asset format, can be used to convert images and videos to other formats.\n * @memberOf Qualifiers\n * @namespace Format\n * @see Visit {@link Actions.Delivery.format|Delivery Format} for an example\n */\n/**\n * @summary qualifier\n * @description Image format heic.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction heic() { return new FormatQualifier('heic'); }\n/**\n * @summary qualifier\n * @description Image format flif.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction flif() { return new FormatQualifier('flif'); }\n/**\n * @summary qualifier\n * @description Image format ai.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction ai() { return new FormatQualifier('ai'); }\n/**\n * @summary qualifier\n * @description Image format wdp.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction wdp() { return new FormatQualifier('wdp'); }\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 webp.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction webp() { return new FormatQualifier('webp'); }\n/**\n * @summary qualifier\n * @description Image format psd.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction psd() { return new FormatQualifier('psd'); }\n/**\n * @summary qualifier\n * @description Image format jp2.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction jp2() { return new FormatQualifier('jp2'); }\n/**\n * @summary qualifier\n * @description Image format jpc.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction jpc() { return new FormatQualifier('jpc'); }\n/**\n * @summary qualifier\n * @description Image format eps.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction eps() { return new FormatQualifier('eps'); }\n/**\n * @summary qualifier\n * @description Image format tiff.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction tiff() { return new FormatQualifier('tiff'); }\n/**\n * @summary qualifier\n * @description Image format pdf.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction pdf() { return new FormatQualifier('pdf'); }\n/**\n * @summary qualifier\n * @description Image format ico.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction ico() { return new FormatQualifier('ico'); }\n/**\n * @summary qualifier\n * @description Image format bmp.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction bmp() { return new FormatQualifier('bmp'); }\n/**\n * @summary qualifier\n * @description Image format png.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction png() { return new FormatQualifier('png'); }\n/**\n * @summary qualifier\n * @description Image format gif.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction gif() { return new FormatQualifier('gif'); }\n/**\n * @summary qualifier\n * @description Image format auto.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction auto() { return new FormatQualifier('auto'); }\n/**\n * @summary qualifier\n * @description Image format jpg.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction jpg() { return new FormatQualifier('jpg'); }\n/**\n * @summary qualifier\n * @description Image format djvu.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction djvu() { return new FormatQualifier('djvu'); }\n/**\n * @summary qualifier\n * @description Image format ps.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction ps() { return new FormatQualifier('ps'); }\n/**\n * @summary qualifier\n * @description Image format ept.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction ept() { return new FormatQualifier('ept'); }\n/**\n * @summary qualifier\n * @description Image format eps3.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction eps3() { return new FormatQualifier('eps3'); }\n/**\n * @summary qualifier\n * @description Image format fxb.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction fxb() { return new FormatQualifier('fxb'); }\n/**\n * @summary qualifier\n * @description Image format gltf.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction gltf() { return new FormatQualifier('gltf'); }\n/**\n * @summary qualifier\n * @description Image format heif.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction heif() { return new FormatQualifier('heif'); }\n/**\n * @summary qualifier\n * @description Image format indd.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction indd() { return new FormatQualifier('indd'); }\n/**\n * @summary qualifier\n * @description Image format jpe.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction jpe() { return new FormatQualifier('jpe'); }\n/**\n * @summary qualifier\n * @description Image format jpeg.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction jpeg() { return new FormatQualifier('jpeg'); }\n/**\n * @summary qualifier\n * @description Image format jxr.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction jxr() { return new FormatQualifier('jxr'); }\n/**\n * @summary qualifier\n * @description Image format hdp.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction hdp() { return new FormatQualifier('hdp'); }\n/**\n * @summary qualifier\n * @description Image format spd.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction spd() { return new FormatQualifier('spd'); }\n/**\n * @summary qualifier\n * @description Image format arw.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction arw() { return new FormatQualifier('arw'); }\n/**\n * @summary qualifier\n * @description Image format cr2.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction cr2() { return new FormatQualifier('cr2'); }\n/**\n * @summary qualifier\n * @description Image format tga.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction tga() { return new FormatQualifier('tga'); }\n/**\n * @summary qualifier\n * @description Image format tif.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction tif() { return new FormatQualifier('tif'); }\n/**\n * @summary qualifier\n * @description Image format avif.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction avif() { return new FormatQualifier('avif'); }\n/**\n * @summary qualifier\n * @description format usdz.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction usdz() { return new FormatQualifier('usdz'); }\n/**\n * @summary qualifier\n * @description Image format 3g2.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction video3g2() { return new FormatQualifier('3g2'); }\n/**\n * @summary qualifier\n * @description Image format 3gp.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction video3gp() { return new FormatQualifier('3gp'); }\n/**\n * @summary qualifier\n * @description Image format avi.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoAvi() { return new FormatQualifier('avi'); }\n/**\n * @summary qualifier\n * @description Image format flv.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoFlv() { return new FormatQualifier('flv'); }\n/**\n * @summary qualifier\n * @description Image format m3u8.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoM3u8() { return new FormatQualifier('m3u8'); }\n/**\n * @summary qualifier\n * @description Image format ts.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoTs() { return new FormatQualifier('ts'); }\n/**\n * @summary qualifier\n * @description Image format mov.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoMov() { return new FormatQualifier('mov'); }\n/**\n * @summary qualifier\n * @description Image format mkv.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoMkv() { return new FormatQualifier('mkv'); }\n/**\n * @summary qualifier\n * @description Image format mp4.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoMp4() { return new FormatQualifier('mp4'); }\n/**\n * @summary qualifier\n * @description Image format mpeg.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoMpeg() { return new FormatQualifier('mpeg'); }\n/**\n * @summary qualifier\n * @description Image format mpd.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoMpd() { return new FormatQualifier('mpd'); }\n/**\n * @summary qualifier\n * @description Image format mxf.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoMxf() { return new FormatQualifier('mxf'); }\n/**\n * @summary qualifier\n * @description Image format ogv.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoOgv() { return new FormatQualifier('ogv'); }\n/**\n * @summary qualifier\n * @description Image format webm.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoWebm() { return new FormatQualifier('webm'); }\n/**\n * @summary qualifier\n * @description Image format wmv.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoWmv() { return new FormatQualifier('wmv'); }\n/**\n * @summary qualifier\n * @description Image format m2ts.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoM2ts() { return new FormatQualifier('m2ts'); }\n/**\n * @summary qualifier\n * @description Image format mts.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoMts() { return new FormatQualifier('mts'); }\n/**\n * @summary qualifier\n * @description Audio format aac.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioAac() { return new FormatQualifier('aac'); }\n/**\n * @summary qualifier\n * @description Audio format aiff.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioAiff() { return new FormatQualifier('aiff'); }\n/**\n * @summary qualifier\n * @description Audio format amr.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioAmr() { return new FormatQualifier('amr'); }\n/**\n * @summary qualifier\n * @description Audio format flac.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioFlac() { return new FormatQualifier('flac'); }\n/**\n * @summary qualifier\n * @description Audio format m4a.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioM4a() { return new FormatQualifier('m4a'); }\n/**\n * @summary qualifier\n * @description Audio format mp3.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioMp3() { return new FormatQualifier('mp3'); }\n/**\n * @summary qualifier\n * @description Audio format ogg.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioOgg() { return new FormatQualifier('ogg'); }\n/**\n * @summary qualifier\n * @description Audio format opus.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioOpus() { return new FormatQualifier('opus'); }\n/**\n * @summary qualifier\n * @description Audio format wav.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioWav() { return new FormatQualifier('wav'); }\n/**\n * @summary qualifier\n * @description Image format glb.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction glb() { return new FormatQualifier('glb'); }\nconst Format = { usdz, jp2, ai, auto, bmp, eps, flif, gif, heic, ico, jpc, jpg, pdf, png, psd, svg, tiff, wdp, webp, arw, audioAac, audioAiff, audioAmr, audioFlac, audioM4a, audioMp3, audioOgg, audioOpus, audioWav, avif, cr2, djvu, eps3, ept, fxb, gltf, hdp, heif, indd, jpe, jpeg, jxr, ps, spd, tga, tif, video3g2, video3gp, videoAvi, videoFlv, videoM2ts, videoM3u8, videoMkv, videoMov, videoMp4, videoMpd, videoMpeg, videoMts, videoMxf, videoOgv, videoTs, videoWebm, videoWmv, glb };\nexport { usdz, jp2, ai, auto, bmp, eps, flif, gif, heic, ico, jpc, jpg, pdf, png, psd, svg, tiff, wdp, webp, arw, audioAac, audioAiff, audioAmr, audioFlac, audioM4a, audioMp3, audioOgg, audioOpus, audioWav, avif, cr2, djvu, eps3, ept, fxb, gltf, hdp, heif, indd, jpe, jpeg, jxr, ps, spd, tga, tif, video3g2, video3gp, videoAvi, videoFlv, videoM2ts, videoM3u8, videoMkv, videoMov, videoMp4, videoMpd, videoMpeg, videoMts, videoMxf, videoOgv, videoTs, videoWebm, videoWmv, glb, Format };\n","import { prepareColor } from \"../internal/utils/prepareColor.js\";\nimport { BackgroundAutoBorderQualifier } from \"./background/shared/auto/BackgroundAutoBorderQualifier.js\";\nimport { BackgroundBorderGradientQualifier } from \"./background/shared/gradient/BackgroundBorderGradientQualifier.js\";\nimport { BackgroundAutoPredominantQualifier } from \"./background/shared/auto/BackgroundAutoPredominantQualifier.js\";\nimport { BackgroundPredominantGradientQualifier } from \"./background/shared/gradient/BackgroundPredominantGradientQualifier.js\";\nimport BlurredBackgroundAction from \"./background/shared/BlurredBackgroundAction.js\";\nimport { BackgroundQualifier } from \"./background/shared/base/BackgroundQualifier.js\";\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/effects_and_artistic_enhancements#setting_background_color|Setting background for images} | {@link https://cloudinary.com/documentation/video_effects_and_enhancements#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/effects_and_artistic_enhancements#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();\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};\nexport { auto, border, borderGradient, predominantGradient, predominant, color, blurred, Background };\n","import { Background } from \"../../qualifiers.js\";\nimport { auto, border, borderGradient, color, predominant, predominantGradient } from \"../../qualifiers/background.js\";\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}\nexport { createBackgroundFromModel };\n","import { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { ResizeAdvancedAction } from \"./ResizeAdvancedAction.js\";\nimport { createBackgroundModel } from \"../../internal/models/createBackgroundModel.js\";\nimport { createBackgroundFromModel } from \"../../internal/models/createBackgroundFromModel.js\";\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}\nexport { ResizePadAction };\n","import { ResizeSimpleAction } from \"./ResizeSimpleAction.js\";\nimport { GravityQualifier } from \"../../qualifiers/gravity/GravityQualifier.js\";\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}\nexport { ResizeScaleAction };\n","import { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { ResizeAdvancedAction } from \"./ResizeAdvancedAction.js\";\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}\nexport { ResizeCropAction };\n","import { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { ResizeAdvancedAction } from \"./ResizeAdvancedAction.js\";\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}\nexport { ResizeFillAction };\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.toString()\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.toString()\n */\nimport { ResizePadAction } from \"./resize/ResizePadAction.js\";\nimport { ResizeSimpleAction } from \"./resize/ResizeSimpleAction.js\";\nimport { ResizeScaleAction } from \"./resize/ResizeScaleAction.js\";\nimport { ThumbResizeAction } from \"./resize/ThumbnailAction.js\";\nimport { ResizeCropAction } from \"./resize/ResizeCropAction.js\";\nimport { ResizeFillAction } from \"./resize/ResizeFillAction.js\";\nimport { ResizeLimitFitAction } from \"./resize/ResizeLimitFitAction.js\";\nimport { ResizeLimitFillAction } from \"./resize/ResizeLimitFillAction.js\";\nimport { ResizeLimitPadAction } from \"./resize/ResizeLimitPadAction.js\";\nimport { ResizeMinimumPadAction } from \"./resize/ResizeMinimumPadAction.js\";\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\n * Scales your image based on automatically calculated areas of interest within each specific photo.\n *\n * For details, see the Imagga Crop and Scale {@link https://cloudinary.com/documentation/imagga_crop_and_scale_addon#smartly_scale_images|add-on documentation}.\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.ResizeSimpleAction}\n */\nfunction imaggaScale(width, height) {\n return new ResizeSimpleAction('imagga_scale', width, height);\n}\n/**\n * @summary action\n * @description\n * Crops your image based on automatically calculated areas of interest within each specific photo.\n *\n * For details, see the Imagga Crop and Scale {@link https://cloudinary.com/documentation/imagga_crop_and_scale_addon#smartly_crop_images|add-on documentation}.\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.ResizeSimpleAction}\n */\nfunction imaggaCrop(width, height) {\n return new ResizeSimpleAction('imagga_crop', 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 * The image is resized so that it takes up as much space as possible within a bounding box defined by the given width and height parameters.
\n * The original aspect ratio is retained and all of the original image is visible.\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.ResizeSimpleAction}\n */\nfunction fit(width, height) {\n return new ResizeSimpleAction('fit', 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 * @summary action\n * @description\n * Creates an asset with the exact given width and height without distorting the asset, but only if the original\n * asset is larger than the specified resolution limits.\n *\n * The asset is scaled down to fill the given width and height without distorting the asset, and then the dimension\n * that exceeds the request is cropped. If the original dimensions are both smaller than the requested size, it is\n * not resized at all.\n *\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.ResizeLimitFillAction}\n */\nfunction limitFill(width, height) {\n return new ResizeLimitFillAction('lfill', width, height);\n}\n/**\n * @summary action\n * @description\n * Resizes the asset so that it takes up as much space as possible within a bounding box defined by the given\n * width and height parameters, but only if the original asset is larger than the given limit (width and height).\n *\n * The asset is scaled down, the original aspect ratio is retained and all of the original asset is visible.\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.ResizeSimpleAction}\n */\nfunction limitFit(width, height) {\n return new ResizeLimitFitAction('limit', 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, but only if the\n * original asset is smaller than the given minimum (width and height).\n *\n * The asset is scaled up. If the proportions of the original asset do not match the given width and height,\n * padding is added to the asset 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 minimumPad(width, height) {\n return new ResizeMinimumPadAction('mpad', width, height);\n}\n/**\n * @summary action\n * @description\n * Resizes the asset so that it takes up as much space as possible within a bounding box defined by the given\n * width and height parameters, but only if the original asset is smaller than the given minimum (width and height).\n *\n * The asset is scaled up, the original aspect ratio is retained and all of the original asset is visible.\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.ResizeSimpleAction}\n */\nfunction minimumFit(width, height) {\n return new ResizeSimpleAction('mfit', width, height);\n}\n/**\n * @summary action\n * @memberOf Actions.Resize\n * @description\n * Tries to prevent a \"bad crop\" by first attempting to use the fill mode, but adding padding if it is determined\n * that more of the original image needs to be included in the final image.\n *\n * Especially useful if the aspect ratio of the delivered image is considerably different from the original's\n * aspect ratio.\n *\n * Only supported in conjunction with Automatic cropping.\n *\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 fillPad(width, height) {\n return new ResizePadAction('fill_pad', width, height);\n}\n/**\n * @summary action\n * @description\n * The thumb cropping mode is specifically used for creating image thumbnails from either face or custom coordinates,
\n * and must always be accompanied by the gravity parameter set to one of the face detection or custom values.\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.ThumbResizeAction}\n */\nfunction thumbnail(width, height) {\n return new ThumbResizeAction('thumb', 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, but only if the\n * original asset is larger than the given limit (width and height).\n *\n * The asset is scaled down. If the proportions of the original asset do not match the given width and height,\n * padding is added to the asset to reach the required size.\n *\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 limitPad(width, height) {\n return new ResizeLimitPadAction('lpad', width, height);\n}\nconst Resize = {\n imaggaScale,\n imaggaCrop,\n crop,\n fill,\n scale,\n minimumPad,\n fit,\n pad,\n limitFit,\n thumbnail,\n limitFill,\n minimumFit,\n limitPad,\n fillPad\n};\nexport { Resize, imaggaScale, imaggaCrop, crop, fill, scale, minimumPad, fit, pad, limitFit, thumbnail, limitFill, minimumFit, limitPad, fillPad };\n","import { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { DeliveryAction } from \"./DeliveryAction.js\";\nimport { CHROMA_VALUE_TO_CHROMA_MODEL_ENUM, CHROMA_MODEL_ENUM_TO_CHROMA_VALUE, ACTION_TYPE_TO_QUALITY_MODE_MAP } from \"../../internal/internalConstants.js\";\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_optimization#toggle_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}\nexport { DeliveryQualityAction };\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 */\nimport { DeliveryFormatAction } from \"./delivery/DeliveryFormatAction.js\";\nimport { DeliveryQualityAction } from \"./delivery/DeliveryQualityAction.js\";\nimport { DeliveryColorSpaceFromICCAction } from \"./delivery/DeliveryColorSpaceFromICCAction.js\";\nimport { DeliveryAction } from \"./delivery/DeliveryAction.js\";\nimport { DeliveryColorSpaceAction } from \"./delivery/DeliveryColorSpaceAction.js\";\nimport { DeliveryDPRAction } from \"./delivery/DeliveryDPRAction.js\";\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 Deliver the image in the specified device pixel ratio.\n * @memberOf Actions.Delivery\n * @param {string} dpr The DPR (Device Pixel Ratio). Any positive float value.\n * @return {Actions.Delivery.DeliveryAction}\n * @example\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {dpr} 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 * dpr('2.0'),\n * );\n */\nfunction dpr(dpr) {\n return new DeliveryDPRAction(dpr);\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_optimization#how_to_optimize_video_quality|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 * @summary action\n * @description Controls the density to use when delivering an image or when converting a vector file such as a PDF or EPS\n * document to a web image delivery format.\n * @memberOf Actions.Delivery\n * @param {number | string} value The density in dpi.\n * @return {Actions.Delivery.DeliveryAction}\n * @example\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {density} 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 * density(150),\n * );\n */\nfunction density(value) {\n return new DeliveryAction('dn', value, 'density');\n}\n/**\n * @summary action\n * @description Default images can be used in the case that a requested image does not exist.\n * @memberOf Actions.Delivery\n * @param {string} publicIdWithExtension Default image public ID\n * @return {Actions.Delivery.DeliveryAction}\n * @example\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {defaultImage} 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 * defaultImage('sample'),\n * );\n */\nfunction defaultImage(publicIdWithExtension) {\n return new DeliveryAction('d', publicIdWithExtension, 'defaultImage');\n}\n/**\n * @summary action\n * @description Controls the color space used for the delivered image.\n * @memberOf Actions.Delivery\n * @param {string | Qualifiers.ColorSpace} mode The color space.\n * @return {Actions.Delivery.DeliveryAction}\n * @example\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {colorSpace} from \"@cloudinary/url-gen/actions/delivery\";\n * import {trueColor} from \"@cloudinary/url-gen/qualifiers/colorSpace\";\n *\n * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}});\n * const image = yourCldInstance.image('woman');\n * image.delivery(\n * colorSpace(trueColor()),\n * );\n */\nfunction colorSpace(mode) {\n return new DeliveryColorSpaceAction(mode);\n}\n/**\n * @summary action\n * @description Specifies the ICC profile to use for the color space.\n * The ICC file must be uploaded to your account as a raw, authenticated file.\n * @memberOf Actions.Delivery\n * @param {string} publicId The public ID (including the file extension) of the ICC profile that defines the\n * color space.\n * @return {Actions.Delivery.DeliveryColorSpaceFromICC}\n * @example\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {colorSpaceFromICC} from \"@cloudinary/url-gen/actions/delivery\";\n * import {trueColor} from \"@cloudinary/url-gen/qualifiers/colorSpace\";\n *\n * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}});\n * const image = yourCldInstance.image('woman');\n * image.delivery(\n * colorSpaceFromICC('sample.icc'),\n * );\n */\nfunction colorSpaceFromICC(publicId) {\n return new DeliveryColorSpaceFromICCAction(publicId);\n}\nconst Delivery = {\n format,\n dpr,\n density,\n defaultImage,\n colorSpace,\n colorSpaceFromICC,\n quality\n};\nexport { Delivery, format, dpr, quality, density, defaultImage, colorSpace, colorSpaceFromICC };\n","import { CompassQualifier } from \"./gravity/qualifiers/compass/CompassQualifier.js\";\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description South center part (bottom center).\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction south() {\n return new CompassQualifier('south');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description North center part (top center).\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction north() {\n return new CompassQualifier('north');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description Middle east part (right).\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction east() {\n return new CompassQualifier('east');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description Middle west part (left).\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction west() {\n return new CompassQualifier('west');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description North west corner (top left).\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction northWest() {\n return new CompassQualifier('north_west');\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 * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description South west corner (bottom left).\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction southWest() {\n return new CompassQualifier('south_west');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description South east corner (bottom right).\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction southEast() {\n return new CompassQualifier('south_east');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description The center of the image.\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction center() {\n return new CompassQualifier('center');\n}\n/**\n * @description Defines the focal Compass for certain methods of cropping.\n * @namespace Compass\n * @memberOf Qualifiers\n * @see Visit {@link Qualifiers.Gravity|Gravity} for an example\n */\nclass Compass {\n}\nCompass.north = north;\nCompass.west = west;\nCompass.east = east;\nCompass.south = south;\nCompass.center = center;\nCompass.northWest = northWest;\nCompass.southEast = southEast;\nCompass.southWest = southWest;\nCompass.northEast = northEast;\nexport { Compass, north, west, east, south, center, northWest, southEast, southWest, northEast };\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 global == 'object' && global && global.Object === Object && global;\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\nmodule.exports = debounce;\n"],"names":["global","BlurredBackgroundAction","auto"],"mappings":";;;;;;;;;;;;;;;;;;AASA;AACA,IAA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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,WAAW,CAAC,KAAK,EAAE;AAC5B;AACA,EAAE,OAAO,iBAAiB,CAAC,KAAK,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC;AACzE,KAAK,CAAC,oBAAoB,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,CAAC;AAC3F,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,WAAW,CAAC,KAAK,EAAE;AAC5B,EAAE,OAAO,KAAK,IAAI,IAAI,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AACvE,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,iBAAiB,CAAC,KAAK,EAAE;AAClC,EAAE,OAAO,YAAY,CAAC,KAAK,CAAC,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC;AACnD,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,QAAQ,GAAG,cAAc,IAAI,SAAS,CAAC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,UAAU,CAAC,KAAK,EAAE;AAC3B;AACA;AACA,EAAE,IAAI,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AAC9D,EAAE,OAAO,GAAG,IAAI,OAAO,IAAI,GAAG,IAAI,MAAM,CAAC;AACzC,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,QAAQ,CAAC,KAAK,EAAE;AACzB,EAAE,OAAO,OAAO,KAAK,IAAI,QAAQ;AACjC,IAAI,KAAK,GAAG,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,gBAAgB,CAAC;AAC9D,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,QAAQ,CAAC,KAAK,EAAE;AACzB,EAAE,IAAI,IAAI,GAAG,OAAO,KAAK,CAAC;AAC1B,EAAE,OAAO,CAAC,CAAC,KAAK,KAAK,IAAI,IAAI,QAAQ,IAAI,IAAI,IAAI,UAAU,CAAC,CAAC;AAC7D,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,YAAY,CAAC,KAAK,EAAE;AAC7B,EAAE,OAAO,CAAC,CAAC,KAAK,IAAI,OAAO,KAAK,IAAI,QAAQ,CAAC;AAC7C,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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AC,KAAK,CAAC,CAAC;AACxC,EAAE,OAAO,CAAC,QAAQ,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;AAC3C,MAAM,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,GAAG,CAAC,GAAG,CAAC,CAAC;AACpD,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AAC9C,CAAC;AACD;AACA,IAAA,eAAc,GAAG,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/packages/html/index.umd.js b/packages/html/index.umd.js new file mode 100644 index 00000000..bc8ebe53 --- /dev/null +++ b/packages/html/index.umd.js @@ -0,0 +1,5719 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.CloudinaryHtml = {})); +})(this, (function (exports) { 'use strict'; + + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + var lodash_clonedeep = {exports: {}}; + + /** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + + (function (module, exports) { + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = + cloneableTags[boolTag] = cloneableTags[dateTag] = + cloneableTags[float32Tag] = cloneableTags[float64Tag] = + cloneableTags[int8Tag] = cloneableTags[int16Tag] = + cloneableTags[int32Tag] = cloneableTags[mapTag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[setTag] = + cloneableTags[stringTag] = cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[weakMapTag] = false; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** + * Adds the key-value `pair` to `map`. + * + * @private + * @param {Object} map The map to modify. + * @param {Array} pair The key-value pair to add. + * @returns {Object} Returns `map`. + */ + function addMapEntry(map, pair) { + // Don't return `map.set` because it's not chainable in IE 11. + map.set(pair[0], pair[1]); + return map; + } + + /** + * Adds `value` to `set`. + * + * @private + * @param {Object} set The set to modify. + * @param {*} value The value to add. + * @returns {Object} Returns `set`. + */ + function addSetEntry(set, value) { + // Don't return `set.add` because it's not chainable in IE 11. + set.add(value); + return set; + } + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array ? array.length : 0; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array ? array.length : 0; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + + /** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ + function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; + } + + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = root['__core-js_shared__']; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** Built-in value references. */ + var Buffer = moduleExports ? root.Buffer : undefined, + Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeKeys = overArg(Object.keys, Object); + + /* Built-in method references that are verified to be native. */ + var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), + Set = getNative(root, 'Set'), + WeakMap = getNative(root, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + } + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; + } + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); + } + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + } + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; + } + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; + } + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); + } + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + this.__data__ = new ListCache(entries); + } + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache; + } + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + return this.__data__['delete'](key); + } + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var cache = this.__data__; + if (cache instanceof ListCache) { + var pairs = cache.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + return this; + } + cache = this.__data__ = new MapCache(pairs); + } + cache.set(key, value); + return this; + } + + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + // Safari 9 makes `arguments.length` enumerable in strict mode. + var result = (isArray(value) || isArguments(value)) + ? baseTimes(value.length, String) + : []; + + var length = result.length, + skipIndexes = !!length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && (key == 'length' || isIndex(key, length)))) { + result.push(key); + } + } + return result; + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + object[key] = value; + } + } + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @param {boolean} [isFull] Specify a clone including symbols. + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, isDeep, isFull, customizer, key, object, stack) { + var result; + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + if (isHostObject(value)) { + return object ? value : {}; + } + result = initCloneObject(isFunc ? {} : value); + if (!isDeep) { + return copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, baseClone, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (!isArr) { + var props = isFull ? getAllKeys(value) : keys(value); + } + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); + }); + return result; + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ + function baseCreate(proto) { + return isObject(proto) ? objectCreate(proto) : {}; + } + + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + + /** + * The base implementation of `getTag`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + return objectToString.call(value); + } + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var result = new buffer.constructor(buffer.length); + buffer.copy(result); + return result; + } + + /** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; + } + + /** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + + /** + * Creates a clone of `map`. + * + * @private + * @param {Object} map The map to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned map. + */ + function cloneMap(map, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map); + return arrayReduce(array, addMapEntry, new map.constructor); + } + + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + + /** + * Creates a clone of `set`. + * + * @private + * @param {Object} set The set to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned set. + */ + function cloneSet(set, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set); + return arrayReduce(array, addSetEntry, new set.constructor); + } + + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + assignValue(object, key, newValue === undefined ? source[key] : newValue); + } + return object; + } + + /** + * Copies own symbol properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + + /** + * Creates an array of the own enumerable symbol properties of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + var getTag = baseGetTag; + + // Fallback for data views, maps, sets, and weak maps in IE 11, + // for data views in Edge < 14, and promises in Node.js. + if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = objectToString.call(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : undefined; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; + } + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, cloneFunc, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return cloneMap(object, isDeep, cloneFunc); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return cloneSet(object, isDeep, cloneFunc); + + case symbolTag: + return cloneSymbol(object); + } + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); + } + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); + } + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; + } + + /** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ + function cloneDeep(value) { + return baseClone(value, true, true); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); + } + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = nativeIsBuffer || stubFalse; + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + + /** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ + function stubArray() { + return []; + } + + /** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ + function stubFalse() { + return false; + } + + module.exports = cloneDeep; + }(lodash_clonedeep, lodash_clonedeep.exports)); + + var cloneDeep = lodash_clonedeep.exports; + + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + + function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + } + + function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + 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; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + } + + /** + * Iterate through plugins and break in cases where the response is canceled. The + * response is canceled if component is updated or unmounted + * @param element {HTMLImageElement|HTMLVideoElement} Html Image or Video element + * @param pluginCloudinaryAsset {CloudinaryImage|CloudinaryVideo} The Cloudinary asset generated by base + * @param plugins {plugins} array of plugins passed in by the user + * @param pluginState {htmlPluginState} Holds cleanup callbacks and event subscriptions + */ + function render(element, pluginCloudinaryAsset, plugins, pluginState) { + return __awaiter(this, void 0, void 0, function () { + var i, response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (plugins === undefined) + return [2 /*return*/]; + i = 0; + _a.label = 1; + case 1: + if (!(i < plugins.length)) return [3 /*break*/, 4]; + return [4 /*yield*/, plugins[i](element, pluginCloudinaryAsset, pluginState)]; + case 2: + response = _a.sent(); + if (response === 'canceled') { + return [3 /*break*/, 4]; + } + _a.label = 3; + case 3: + i++; + return [3 /*break*/, 1]; + case 4: return [2 /*return*/]; + } + }); + }); + } + + var HtmlImageLayer = /** @class */ (function () { + function HtmlImageLayer(element, userCloudinaryImage, plugins, analyticsOptions) { + var _this = this; + this.imgElement = element; + this.htmlPluginState = { cleanupCallbacks: [], pluginEventSubscription: [] }; + var pluginCloudinaryImage = cloneDeep(userCloudinaryImage); + render(element, pluginCloudinaryImage, plugins, this.htmlPluginState) + .then(function () { + _this.htmlPluginState.pluginEventSubscription.forEach(function (fn) { fn(); }); + _this.imgElement.setAttribute('src', pluginCloudinaryImage.toURL({ + trackedAnalytics: { + sdkCode: analyticsOptions.sdkCode, + sdkSemver: analyticsOptions.sdkSemver, + techVersion: analyticsOptions.techVersion, + } + })); + }); + } + /** + * Called when component is updated and re-triggers render + * @param userCloudinaryImage + * @param plugins + * @param analyticsOptions + */ + HtmlImageLayer.prototype.update = function (userCloudinaryImage, plugins, analyticsOptions) { + var _this = this; + var pluginCloudinaryImage = cloneDeep(userCloudinaryImage); + render(this.imgElement, pluginCloudinaryImage, plugins, this.htmlPluginState) + .then(function () { + _this.imgElement.setAttribute('src', pluginCloudinaryImage.toURL({ + trackedAnalytics: { + sdkCode: analyticsOptions.sdkCode, + sdkSemver: analyticsOptions.sdkSemver, + techVersion: analyticsOptions.techVersion, + } + })); + }); + }; + return HtmlImageLayer; + }()); + + /** + * @summary SDK + * @memberOf SDK + */ + class QualifierValue { + /** + * + * @param {QualifierValue | QualifierValue[] | any[] | string | number}qualifierValue + */ + constructor(qualifierValue) { + this.values = []; + this.delimiter = ':'; // {value}{delimiter}{value}... + if (this.hasValue(qualifierValue)) { + this.addValue(qualifierValue); + } + } + /** + * @description Joins the provided values with the provided delimiter + */ + toString() { + return this.values.join(this.delimiter); + } + /** + * @description Checks if the provided argument has a value + * @param {any} v + * @private + * @return {boolean} + */ + hasValue(v) { + return typeof v !== 'undefined' && v !== null && v !== ''; + } + /** + * @desc Adds a value for the this qualifier instance + * @param {any} value + * @return {this} + */ + addValue(value) { + // Append value or array of values + if (Array.isArray(value)) { + this.values = this.values.concat(value); + } + else { + this.values.push(value); + } + // Remove falsy values + this.values = this.values.filter((v) => this.hasValue(v)); + return this; + } + /** + * @description Sets the delimiter for this instance + * @param delimiter + */ + setDelimiter(delimiter) { + this.delimiter = delimiter; + return this; + } + } + + class UnsupportedError extends Error { + constructor(message = 'Unsupported') { + super(message); + } + } + /** + * Creates a new UnsupportedError + * @param message + */ + function createUnsupportedError(message) { + return new UnsupportedError(message); + } + + /** + * Returns the action's model + */ + function qualifierToJson() { + return this._qualifierModel || { error: createUnsupportedError(`unsupported qualifier ${this.constructor.name}`) }; + } + + class QualifierModel { + constructor() { + this._qualifierModel = {}; + } + toJson() { + return qualifierToJson.apply(this); + } + } + + /** + * @summary SDK + * @memberOf SDK + */ + class Qualifier extends QualifierModel { + constructor(key, qualifierValue) { + super(); + this.delimiter = '_'; // {key}{delimiter}{qualifierValue} + this.key = key; + if (qualifierValue instanceof QualifierValue) { + this.qualifierValue = qualifierValue; + } + else { + this.qualifierValue = new QualifierValue(); + this.qualifierValue.addValue(qualifierValue); + } + } + toString() { + const { key, delimiter, qualifierValue } = this; + return `${key}${delimiter}${qualifierValue.toString()}`; + } + addValue(value) { + this.qualifierValue.addValue(value); + return this; + } + } + + /** + * @memberOf Qualifiers.Flag + * @extends {SDK.Qualifier} + * @description the FlagQualifier class + */ + class FlagQualifier extends Qualifier { + constructor(flagType, flagValue) { + let qualifierValue; + if (flagValue) { + qualifierValue = new QualifierValue([flagType, `${flagValue}`]).setDelimiter(':'); + } + else { + qualifierValue = flagType; + } + super('fl', qualifierValue); + this.flagValue = flagValue; + } + toString() { + return super.toString().replace(/\./, '%2E'); + } + getFlagValue() { + return this.flagValue; + } + } + + /** + * Sort a map by key + * @private + * @param map + * @Return array of map's values sorted by key + */ + function mapToSortedArray(map, flags) { + const array = Array.from(map.entries()); + // objects from the Array.from() method above are stored in array of arrays: + // [[qualifierKey, QualifierObj], [qualifierKey, QualifierObj]] + // Flags is an array of FlagQualifierObj + // We need to convert it to the same form: [flagQualifier] => ['fl', flagQualifier] + flags.forEach((flag) => { + array.push(['fl', flag]); // push ['fl', flagQualifier] + }); + return array.sort().map((v) => v[1]); + } + + /** + * Returns the action's model + */ + function actionToJson() { + const actionModelIsNotEmpty = this._actionModel && Object.keys(this._actionModel).length; + if (actionModelIsNotEmpty) { + return this._actionModel; + } + return { error: createUnsupportedError(`unsupported action ${this.constructor.name}`) }; + } + + class ActionModel { + constructor() { + this._actionModel = {}; + } + toJson() { + return actionToJson.apply(this); + } + } + + /** + * @summary SDK + * @memberOf SDK + * @description Defines the category of transformation to perform. + */ + class Action extends ActionModel { + constructor() { + super(...arguments); + // We're using map, to overwrite existing keys. for example: + // addParam(w_100).addQualifier(w_200) should result in w_200. and not w_100,w_200 + this.qualifiers = new Map(); + // Unlike regular qualifiers, there can be multiple flags in each url component /fl_1,fl_2/ + // If the falgs are added to the qualifiers map, only a single flag could exist in a component (it's a map) + // So flags are stored separately until the very end because of that reason + this.flags = []; + this.delimiter = ','; // {qualifier}{delimiter}{qualifier} for example: `${'w_100'}${','}${'c_fill'}` + this.actionTag = ''; // A custom name tag to identify this action in the future + } + prepareQualifiers() { } + /** + * @description Returns the custom name tag that was given to this action + * @return {string} + */ + getActionTag() { + return this.actionTag; + } + /** + * @description Sets the custom name tag for this action + * @return {this} + */ + setActionTag(tag) { + this.actionTag = tag; + return this; + } + /** + * @description Calls toString() on all child qualifiers (implicitly by using .join()). + * @return {string} + */ + toString() { + this.prepareQualifiers(); + return mapToSortedArray(this.qualifiers, this.flags).join(this.delimiter); + } + /** + * @description Adds the parameter to the action. + * @param {SDK.Qualifier} qualifier + * @return {this} + */ + addQualifier(qualifier) { + // if string, find the key and value + if (typeof qualifier === 'string') { + const [key, value] = qualifier.toLowerCase().split('_'); + if (key === 'fl') { + // if string qualifier is a flag, store it in the flags arrays + this.flags.push(new FlagQualifier(value)); + } + else { + // if the string qualifier is not a flag, create a new qualifier from it + this.qualifiers.set(key, new Qualifier(key, value)); + } + } + else { + // if a qualifier object, insert to the qualifiers map + this.qualifiers.set(qualifier.key, qualifier); + } + return this; + } + /** + * @description Adds a flag to the current action. + * @param {Qualifiers.Flag} flag + * @return {this} + */ + addFlag(flag) { + if (typeof flag === 'string') { + this.flags.push(new FlagQualifier(flag)); + } + else { + if (flag instanceof FlagQualifier) { + this.flags.push(flag); + } + } + return this; + } + addValueToQualifier(qualifierKey, qualifierValue) { + this.qualifiers.get(qualifierKey).addValue(qualifierValue); + return this; + } + } + + /** + * @memberOf Qualifiers.Region + */ + class NamedRegion extends Action { + constructor(type) { + super(); + this.regionType = type; + } + } + + /** + * @memberOf Qualifiers.Region + */ + class CustomRegion extends NamedRegion { + constructor() { + super('named'); + } + /** + * @description The x position in pixels. + * @param {number} x + */ + x(x) { + this.addQualifier(new Qualifier('x', x)); + return this; + } + /** + * @description The y position in pixels. + * @param {number} y + */ + y(y) { + this.addQualifier(new Qualifier('y', y)); + return this; + } + /** + * @description The width of the region in pixels. + * @param {number} width + */ + width(width) { + this.addQualifier(new Qualifier('w', width)); + return this; + } + /** + * @description The height of the region in pixels. + * @param {number} height + */ + height(height) { + this.addQualifier(new Qualifier('h', height)); + return this; + } + } + + /** + * @summary qualifier + * @memberOf Qualifiers.Region + * @return {Qualifiers.Region.CustomRegion} + */ + function custom() { + return new CustomRegion(); + } + /** + * @summary qualifier + * @memberOf Qualifiers.Region + * @return {Qualifiers.Region.NamedRegion} + */ + function faces() { + return new NamedRegion('faces'); + } + + /** + * @description The Action class of the blur Builder. + * @extends SDK.Action + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ + class BlurAction extends Action { + constructor(strength) { + super(); + this._actionModel = {}; + this._strength = strength; + this._actionModel.actionType = 'blur'; + this._actionModel.strength = strength; + } + /** + * @description Specifies the region to blur. + * @param {NamedRegion} blurRegion + */ + region(blurRegion) { + this._actionModel.region = { RegionType: blurRegion.regionType }; + this._region = blurRegion; + return this; + } + /** + * @description Sets the strength of the blur effect. + * @param {number | string} strength + */ + strength(strength) { + this._strength = strength; + this._actionModel.strength = strength; + return this; + } + prepareQualifiers() { + /* + * Blur with region is a unique object in this codebase. + * On top of Blur being an Action with Qualifiers, + * it also accepts a Qualifier called Region. + * + * This Qualifier is in itself composite of qualifiers (such as height, or width). + * The existence of Region changes the output of Blur in non traditional ways + * which forced this relatively ad-hoc implementation. + * + * Aside from all of that, all of the Qualifiers in the component should be alphabetized + * This happens naturally in the Action class, + * however since we're dealing with two levels of qualifiers (Blur and Region), + * these need to be merged. + * + * This function will merge the Region qualifiers with Blur + * and add all needed implicit qualifiers (like g_ocr_text). + * We're not using the full Gravity Qualifier here to prevent the code import for such a simplistic case + */ + const str = this._strength ? `:${this._strength}` : ''; + if ('_region' in this) { + const qualifiers = this._region.qualifiers; + // Copy qualifiers from the region "action" to the blur action + qualifiers.forEach((q) => this.addQualifier(q)); + if (this._region.regionType === 'named') { + this.addQualifier(new Qualifier('e', `blur_region${str}`)); + } + if (this._region.regionType === 'ocr_text') { + this.addQualifier(new Qualifier('e', `blur_region${str}`)); + this.addQualifier(new Qualifier('g', `ocr_text`)); + } + if (this._region.regionType === 'faces') { + this.addQualifier(new Qualifier('e', `blur_faces${str}`)); + } + } + else { + this.addQualifier(new Qualifier('e', `blur${str}`)); + } + } + static fromJson(actionModel) { + const { actionType, strength, region } = actionModel; + // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel]) + // This allows the inheriting classes to determine the class to be created + const result = new this(strength); + strength && result.strength(strength); + if (region && region.RegionType === 'faces') { + result.region(faces()); + } + if (region && region.RegionType === 'custom') { + result.region(custom()); + } + return result; + } + } + + /** + * Flip keys and values for given object + * @param obj + */ + function objectFlip(obj) { + const result = {}; + Object.keys(obj).forEach((key) => { + result[obj[key]] = key; + }); + return result; + } + + /** + * This file is for internal constants only. + * It is not intended for public use and is not part of the public API + */ + const ACTION_TYPE_TO_CROP_MODE_MAP = { + limitFit: 'limit', + limitFill: 'lfill', + minimumFit: 'mfit', + thumbnail: 'thumb', + limitPad: 'lpad', + minimumPad: 'mpad' + }; + const ACTION_TYPE_TO_DELIVERY_MODE_MAP = { + colorSpace: 'cs', + dpr: 'dpr', + density: 'dn', + defaultImage: 'd', + format: 'f', + quality: 'q' + }; + const ACTION_TYPE_TO_EFFECT_MODE_MAP = { + redEye: 'redeye', + advancedRedEye: 'adv_redeye', + oilPaint: 'oil_paint', + unsharpMask: 'unsharp_mask', + makeTransparent: 'make_transparent' + }; + const ACTION_TYPE_TO_QUALITY_MODE_MAP = { + autoBest: 'auto:best', + autoEco: 'auto:eco', + autoGood: 'auto:good', + autoLow: 'auto:low', + jpegminiHigh: 'jpegmini:1', + jpegminiMedium: 'jpegmini:2', + jpegminiBest: 'jpegmini:0' + }; + const ACTION_TYPE_TO_STREAMING_PROFILE_MODE_MAP = { + fullHd: 'full_hd', + fullHdWifi: 'full_hd_wifi', + fullHdLean: 'full_hd_lean', + hdLean: 'hd_lean' + }; + const CHROMA_VALUE_TO_CHROMA_MODEL_ENUM = { + 444: "CHROMA_444", + 420: "CHROMA_420" + }; + const COLOR_SPACE_MODEL_MODE_TO_COLOR_SPACE_MODE_MAP = { + 'noCmyk': 'no_cmyk', + 'keepCmyk': 'keep_cmyk', + 'tinySrgb': 'tinysrgb', + 'srgbTrueColor': 'srgb:truecolor' + }; + const CHROMA_MODEL_ENUM_TO_CHROMA_VALUE = objectFlip(CHROMA_VALUE_TO_CHROMA_MODEL_ENUM); + objectFlip(COLOR_SPACE_MODEL_MODE_TO_COLOR_SPACE_MODE_MAP); + const CROP_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_CROP_MODE_MAP); + const DELIVERY_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_DELIVERY_MODE_MAP); + const EFFECT_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_EFFECT_MODE_MAP); + objectFlip(ACTION_TYPE_TO_QUALITY_MODE_MAP); + objectFlip(ACTION_TYPE_TO_STREAMING_PROFILE_MODE_MAP); + + /** + * @description A class that defines a simple effect of the type e_{effectName} + * @extends SDK.Action + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ + class SimpleEffectAction extends Action { + constructor(effectType, level) { + super(); + this._actionModel = {}; + this._actionModel.actionType = EFFECT_MODE_TO_ACTION_TYPE_MAP[effectType] || effectType; + const qualifierEffect = this.createEffectQualifier(effectType, level); + this.addQualifier(qualifierEffect); + } + createEffectQualifier(effectType, level) { + let qualifierValue; + if (level) { + qualifierValue = new QualifierValue([effectType, `${level}`]).setDelimiter(':'); + } + else { + qualifierValue = new QualifierValue(effectType); + } + return new Qualifier('e', qualifierValue); + } + static fromJson(actionModel) { + const { actionType, level, strength } = actionModel; + const effectType = ACTION_TYPE_TO_EFFECT_MODE_MAP[actionType] || actionType; + // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel]) + // This allows the inheriting classes to determine the class to be created + // @ts-ignore + const result = new this(effectType, level ? level : strength); + return result; + } + } + + /** + * @description A base class for effects with a level, the extending class needs to implement a method that calls setLevel() + * @extends {Actions.Effect.SimpleEffectAction} + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ + class LeveledEffectAction extends SimpleEffectAction { + constructor(effectType, level) { + super(effectType, level); + this.LEVEL_NAME = 'level'; + this._actionModel = {}; + this.effectType = effectType; + this._actionModel.actionType = EFFECT_MODE_TO_ACTION_TYPE_MAP[effectType] || effectType; + if (level) { + this.setLevel(level); + } + } + /** + * + * @description Sets the effect level for the action + * @param {string | number} level - The strength of the effect + * @protected + */ + setLevel(level) { + this._actionModel[this.LEVEL_NAME] = level; + const qualifierEffect = this.createEffectQualifier(this.effectType, level); + this.addQualifier(qualifierEffect); + return this; + } + } + + /** + * Returns RGB or Color + * @private + * @param color + */ + function prepareColor(color) { + if (color) { + return color.match(/^#/) ? `rgb:${color.substr(1)}` : color; + } + else { + return color; + } + } + + /** + * @description Vectorizes the image. + * @extends SDK.Action + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ + class VectorizeEffectAction extends Action { + constructor() { + super(); + this._actionModel = {}; + this._actionModel.actionType = 'vectorize'; + } + /** + * @description The number of colors. (Range: 2 to 30, Server default: 10) + * @param {number | string} num + * @return {this} + */ + numOfColors(num) { + this._actionModel.numOfColors = num; + this._numOfColors = num; + return this; + } + /** + * @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) + * @param {number | string} num + * @return {this} + */ + detailsLevel(num) { + this._actionModel.detailLevel = num; + this._detailsLevel = num; + return this; + } + /** + * @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) + * @param {number | string} num + * @return {this} + */ + despeckleLevel(num) { + this._actionModel.despeckleLevel = num; + this._despeckleLevel = num; + return this; + } + /** + * @description The corner threshold. Specify 100 for no smoothing (polygon corners), 0 for completely smooth corners. (Range: 0 to 100, Default: 25) + * @param {number | string} num + * @return {this} + */ + cornersLevel(num) { + this._actionModel.cornersLevel = num; + this._cornersLevel = num; + return this; + } + /** + * @description The optimization value. Specify 100 for least optimization and the largest file. (Range: 0 to 100, Server default: 100). + * @param {number} num + * @return {this} + */ + paths(num) { + this._actionModel.paths = num; + this._paths = num; + return this; + } + prepareQualifiers() { + let str = 'vectorize'; + if (this._numOfColors) { + str += `:${new QualifierValue(`colors:${this._numOfColors}`).toString()}`; + } + if (this._detailsLevel) { + str += `:${new QualifierValue(`detail:${this._detailsLevel}`).toString()}`; + } + if (this._despeckleLevel) { + str += `:${new QualifierValue(`despeckle:${this._despeckleLevel}`).toString()}`; + } + if (this._paths) { + str += `:${new QualifierValue(`paths:${this._paths}`).toString()}`; + } + if (this._cornersLevel) { + str += `:${new QualifierValue(`corners:${this._cornersLevel}`).toString()}`; + } + this.addQualifier(new Qualifier('e', str)); + } + static fromJson(actionModel) { + const { actionType, paths, cornersLevel, despeckleLevel, detailLevel, numOfColors } = actionModel; + // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel]) + // This allows the inheriting classes to determine the class to be created + const result = new this(); + paths && result.paths(paths); + cornersLevel && result.cornersLevel(cornersLevel); + despeckleLevel && result.despeckleLevel(despeckleLevel); + detailLevel && result.detailsLevel(detailLevel); + numOfColors && result.numOfColors(numOfColors); + return result; + } + } + + /** + * @description A class that provides a built in level() method that sets the level of the effect + * @extends {Actions.Effect.LeveledEffectAction} + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ + class EffectActionWithLevel extends LeveledEffectAction { + level(value) { + this._actionModel.level = value; + return this.setLevel(value); + } + } + + /** + * @description Applies stripes to the image to help people with common color-blind conditions to differentiate between colors that are similar for them. + * You can replace colors using the xray() method. + * @extends SDK.Action + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ + class AssistColorBlindEffectAction extends Action { + constructor() { + super(); + this._actionModel = {}; + this._actionModel.actionType = 'assistColorblind'; + this.addQualifier(new Qualifier('e', new QualifierValue('assist_colorblind'))); + } + /** + * @description Replaces problematic colors with colors that are easier to differentiate. + * @return {this} + */ + xray() { + this._actionModel.type = 'xray'; + return this.addQualifier(new Qualifier('e', new QualifierValue(['assist_colorblind', 'xray']).setDelimiter(':'))); + } + /** + * @description Applies stripes of the specified intensity to help people with common color blind conditions to differentiate between colors that are similar for them. + * @param {number | string} strength The intensity of the stripes. (Range: 1 to 100, Server default: 10) + * @return {this} + */ + stripesStrength(strength) { + this._actionModel.type = 'stripes'; + this._actionModel.stripesStrength = strength; + return this.addQualifier(new Qualifier('e', new QualifierValue(['assist_colorblind', strength]).setDelimiter(':'))); + } + static fromJson(actionModel) { + const { actionType, type, stripesStrength } = actionModel; + // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel]) + // This allows the inheriting classes to determine the class to be created + const result = new this(); + if (type === 'xray') { + result.xray(); + } + if (type === 'stripes') { + stripesStrength && result.stripesStrength(stripesStrength); + } + return result; + } + } + + /** + * @description Applies a colorizing filter to the asset, use the methods in the class to adjust the filter + * @extends EffectActionWithLevel + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ + class ColorizeEffectAction extends EffectActionWithLevel { + /** + * @description The color to use for colorization. Specify HTML name or RGB hex code. (Server default: gray) + * @param {string} color HTML name(red, green, etc.) or RGB hex code. (Server default: gray) + * @return {this} + */ + color(color) { + this._actionModel.color = color; + return this.addQualifier(new Qualifier('co', new QualifierValue(prepareColor(color)))); + } + static fromJson(actionModel) { + const { actionType, level, color } = actionModel; + // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel]) + // This allows the inheriting classes to determine the class to be created + const result = new this(actionType, level); + color && result.color(color); + return result; + } + } + + /** + * @description The Action class of the pixelate Builder + * @extends SDK.Action + * @memberOf Actions.Effect + * @see Visit {@link Actions.Effect|Effect} for an example + */ + class Pixelate extends Action { + constructor(squareSize) { + super(); + this._actionModel = {}; + this._squareSize = squareSize; + this._actionModel.actionType = 'pixelate'; + this._actionModel.squareSize = squareSize; + } + /** + * @description Specifies the region to piexlate. + * @param {NamedRegion} pixelateRegion + */ + region(pixelateRegion) { + this._region = pixelateRegion; + this._actionModel.region = { RegionType: this._region.regionType }; + return this; + } + /** + * @description Sets the squareSize of the pixelate effect. + * @param {number | string} squareSize + */ + squareSize(squareSize) { + this._squareSize = squareSize; + this._actionModel.squareSize = squareSize; + return this; + } + prepareQualifiers() { + /* + * pixelate with region is a unique object in this codebase. + * On top of pixelate being an Action with Qualifiers, + * it also accepts a Qualifier called Region. + * + * This Qualifier is in itself composite of qualifiers (such as height, or width). + * The existence of Region changes the output of pixelate in non traditional ways + * which forced this relatively ad-hoc implementation. + * + * Aside from all of that, all of the Qualifiers in the component should be alphabetized + * This happens naturally in the Action class, + * however since we're dealing with two levels of qualifiers (pixelate and Region), + * these need to be merged. + * + * This function will merge the Region qualifiers with pixelate + * and add all needed implicit qualifiers (like g_ocr_text). + * We're not using the full Gravity Qualifier here to prevent the code import for such a simplistic case + */ + const str = this._squareSize ? `:${this._squareSize}` : ''; + if ('_region' in this) { + const qualifiers = this._region.qualifiers; + // Copy qualifiers from the region "action" to the pixelate action + qualifiers.forEach((q) => this.addQualifier(q)); + if (this._region.regionType === 'named') { + this.addQualifier(new Qualifier('e', `pixelate_region${str}`)); + } + if (this._region.regionType === 'ocr_text') { + this.addQualifier(new Qualifier('e', `pixelate_region${str}`)); + this.addQualifier(new Qualifier('g', `ocr_text`)); + } + if (this._region.regionType === 'faces') { + this.addQualifier(new Qualifier('e', `pixelate_faces${str}`)); + } + } + else { + this.addQualifier(new Qualifier('e', `pixelate${str}`)); + } + } + static fromJson(actionModel) { + const { actionType, region, squareSize } = actionModel; + // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel]) + // This allows the inheriting classes to determine the class to be created + const result = new this(squareSize); + squareSize && result.squareSize(squareSize); + if (region && region.RegionType === 'faces') { + result.region(faces()); + } + if (region && region.RegionType === 'custom') { + result.region(custom()); + } + return result; + } + } + + /** + * @summary action + * @description Applies a blurring filter to the asset. + * @memberOf Actions.Effect + * @param {number} blurLevel The strength of the blur. (Range: 1 to 2000, Server default: 100) + * @return {Actions.Effect.BlurAction} + */ + function blur(blurLevel) { + return new BlurAction(blurLevel); + } + /** + * @summary action + * @description Converts the image to gray-scale (multiple shades of gray). + * @memberOf Actions.Effect + * @return {Actions.Effect.SimpleEffectAction} + */ + function grayscale() { + return new SimpleEffectAction('grayscale'); + } + /** + * @summary action + * @description Applies a colorizing filter to the asset. + * @memberOf Actions.Effect + * @param {number} colorizeLevel The strength of the color. (Range: 0 to 100, Server default: 100) + * @return {Actions.Effect.ColorizeEffectAction} + */ + function colorize(colorizeLevel) { + return new ColorizeEffectAction('colorize', colorizeLevel); + } + /** + * @summary action + * @description + * Vectorizes the image. + * Notes: + * To deliver the image as a vector image, make sure to change the format (or URL extension) to a vector format, such as SVG.
+ * However, you can also deliver in a raster format if you just want to get the 'vectorized' graphic effect.
+ * Large images are scaled down to 1000 pixels in the largest dimension before vectorization. + * + * @memberOf Actions.Effect + * @return {Actions.Effect.VectorizeEffectAction} + */ + function vectorize() { + return new VectorizeEffectAction(); + } + /** + * @summary action + * @description + * Applies stripes to the image to help people with common color-blind conditions to differentiate between colors that are similar for them.
+ * You can replace colors using the xRay() method of the \Cloudinary\Transformation\AssistColorBlind class. + * @memberOf Actions.Effect + * @return {Actions.Effect.AssistColorBlindEffectAction} + */ + function assistColorBlind() { + return new AssistColorBlindEffectAction(); + } + /** + * @summary action + * @description Applies a pixelatering filter to the asset. + * @memberOf Actions.Effect + * @param {number} squareSize The squareSize in the pixelation. (Range: 1 to 2000, Server default: 100) + * @return {Actions.Effect.Pixelate} + */ + function pixelate(squareSize) { + return new Pixelate(squareSize); + } + + /** + * @extends SDK.Action + * @description A class for background transformations. + */ + class BackgroundColor extends Action { + constructor(color) { + super(); + this.addQualifier(new Qualifier('b', new QualifierValue(color).setDelimiter('_'))); + } + } + + /** + * @summary SDK + * @memberOf SDK + * @description Defines an action that's a string literal, no validations or manipulations are performed + */ + class RawAction { + constructor(raw) { + this.raw = raw; + } + toString() { + return this.raw; + } + toJson() { + return { error: createUnsupportedError(`unsupported action ${this.constructor.name}`) }; + } + } + + /** + * Validates obj is an instance of IErrorObject + * @param obj + */ + function isErrorObject(obj) { + const errorObj = obj; + return ('error' in errorObj) && !!errorObj.error; + } + + /** + * @description Defines flags that you can use to alter the default transformation behavior. + * @namespace Flag + * @memberOf Qualifiers + */ + /** + * @summary qualifier + * @memberOf Qualifiers.Flag + * @description * Allows specifying only either width or height so the value of the second axis remains as is, and is not + * recalculated to maintain the aspect ratio of the original image. + * @return {Qualifiers.Flag.FlagQualifier} + */ + function ignoreInitialAspectRatio() { + return new FlagQualifier('ignore_aspect_ratio'); + } + /** + * @summary qualifier + * @memberOf Qualifiers.Flag + * @description Automatically use lossy compression when delivering animated GIF files. + * + * This flag can also be used as a conditional flag for delivering PNG files: it tells Cloudinary to deliver the + * image in PNG format (as requested) unless there is no transparency channel - in which case deliver in JPEG + * format. + * @return {Qualifiers.Flag.FlagQualifier} + */ + function lossy() { + return new FlagQualifier('lossy'); + } + /** + * @summary qualifier + * @memberOf Qualifiers.Flag + * @description When used with automatic fetch_format (f_auto): ensures that images with a transparency channel will be + * delivered in PNG format. + * @return {Qualifiers.Flag.FlagQualifier} + */ + function preserveTransparency() { + return new FlagQualifier('preserve_transparency'); + } + /** + * @summary qualifier + * @memberOf Qualifiers.Flag + * @description Generates a JPG image using the progressive (interlaced) JPG format. + * + * This format allows the browser to quickly show a low-quality rendering of the image until the full-quality + * image is loaded. + * + * @param {string} mode? The mode to determine a specific progressive outcome as follows: + * * semi - A smart optimization of the decoding time, compression level and progressive rendering + * (less iterations). This is the default mode when using q_auto. + * * steep - Delivers a preview very quickly, and in a single later phase improves the image to + * the required resolution. + * * none - Use this to deliver a non-progressive image. This is the default mode when setting + * a specific value for quality. + * @return {Qualifiers.Flag.FlagQualifier} + */ + function progressive(mode) { + return new FlagQualifier('progressive', mode); + } + /** + * @summary qualifier + * @memberOf Qualifiers.Flag + * @description Modifies percentage-based width & height parameters of overlays and underlays (e.g., 1.0) to be relative to the overlaid region + * @return {Qualifiers.Flag.FlagQualifier} + */ + function regionRelative() { + return new FlagQualifier('region_relative'); + } + /** + * @summary qualifier + * @memberOf Qualifiers.Flag + * @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. + * @return {Qualifiers.Flag.FlagQualifier} + */ + function relative() { + return new FlagQualifier('relative'); + } + + /** + * @memberOf Qualifiers.Format + * @extends {SDK.QualifierValue} + */ + class FormatQualifier extends QualifierValue { + constructor(val) { + super(val); + this.val = val; + } + getValue() { + return this.val; + } + } + + /** + * @description Qualifies the delivery of an asset. + * @memberOf Actions.Delivery + * @extends SDK.Action + */ + class DeliveryAction extends Action { + /** + * @param {string} deliveryKey A generic Delivery Action Key (such as q, f, dn, etc.) + * @param {string} deliveryType A Format Qualifiers for the action, such as Quality.auto() + * @param {string} modelProperty internal model property of the action, for example quality uses `level` while dpr uses `density` + * @see Visit {@link Actions.Delivery|Delivery} for an example + */ + constructor(deliveryKey, deliveryType, modelProperty) { + super(); + this._actionModel = {}; + let deliveryTypeValue; + if (deliveryType instanceof FormatQualifier) { + deliveryTypeValue = deliveryType.getValue(); + } + else { + deliveryTypeValue = deliveryType; + } + this._actionModel.actionType = DELIVERY_MODE_TO_ACTION_TYPE_MAP[deliveryKey]; + this._actionModel[modelProperty] = deliveryTypeValue; + this.addQualifier(new Qualifier(deliveryKey, deliveryType)); + } + } + + /** + * @description Contains functions to select the mode when using a progressive format. + * Learn more: {@link https://cloudinary.com/documentation/transformation_reference#fl_progressive|Progressive modes} + * @memberOf Qualifiers + * @namespace Progressive + * @example + * import {Cloudinary} from "@cloudinary/url-gen"; + * import {format} from "@cloudinary/url-gen/actions/delivery"; + * import {jpg} from "@cloudinary/url-gen/qualifiers/format"; + * import {steep} from "@cloudinary/url-gen/qualifiers/progressive"; + * + * const yourCldInstance = new Cloudinary({cloud: {cloudName: 'demo'}}); + * const image = yourCldInstance.image('woman'); + * image.delivery(format(jpg()).progressive(steep())) + */ + class ProgressiveQualifier extends FlagQualifier { + constructor(mode) { + super('progressive', mode); + } + } + + /** + * @memberOf Actions.Delivery + * @extends {Actions.Delivery.DeliveryAction} + * @see Visit {@link Actions.Delivery|Delivery} for an example + */ + class DeliveryFormatAction extends DeliveryAction { + constructor(deliveryKey, deliveryType) { + super(deliveryKey, deliveryType, 'formatType'); + } + /** + * @description Uses lossy compression when delivering animated GIF files. + * @return {this} + */ + lossy() { + this._actionModel.lossy = true; + this.addFlag(lossy()); + return this; + } + /** + * @description Uses progressive compression when delivering JPG file format. + * @return {this} + */ + progressive(mode) { + if (mode instanceof ProgressiveQualifier) { + this._actionModel.progressive = { mode: mode.getFlagValue() }; + this.addFlag(mode); + } + else { + this._actionModel.progressive = { mode: mode }; + this.addFlag(progressive(mode)); + } + return this; + } + /** + * @description Ensures that images with a transparency channel are delivered in PNG format. + */ + preserveTransparency() { + this._actionModel.preserveTransparency = true; + this.addFlag(preserveTransparency()); + return this; + } + static fromJson(actionModel) { + const { formatType, lossy, progressive, preserveTransparency } = actionModel; + let result; + if (formatType) { + result = new this('f', formatType); + } + else { + result = new this('f'); + } + if (progressive) { + if (progressive.mode) { + result.progressive(progressive.mode); + } + else { + result.progressive(); + } + } + lossy && result.lossy(); + preserveTransparency && result.preserveTransparency(); + return result; + } + } + + /** + * @summary SDK + * @description - Defines how to transform an asset + * @memberOf SDK + */ + class Transformation { + constructor() { + this.actions = []; + } + /** + * @param {SDK.Action | string} action + * @return {this} + */ + addAction(action) { + let actionToAdd; + if (typeof action === 'string') { + if (action.indexOf('/') >= 0) { + throw 'addAction cannot accept a string with a forward slash in it - /, use .addTransformation() instead'; + } + else { + actionToAdd = new RawAction(action); + } + } + else { + actionToAdd = action; + } + this.actions.push(actionToAdd); + return this; + } + /** + * @description Allows the injection of a raw transformation as a string into the transformation, or a Transformation instance that was previously created + * @param {string | SDK.Transformation} tx + * @example + * import {Transformation} from "@cloudinary/url-gen"; + * + * const transformation = new Transformation(); + * transformation.addTransformation('w_100/w_200/w_300'); + * @return {this} + */ + addTransformation(tx) { + if (tx instanceof Transformation) { + // Concat the new actions into the existing actions + this.actions = this.actions.concat(tx.actions); + } + else { + this.actions.push(new RawAction(tx)); + } + return this; + } + /** + * @return {string} + */ + toString() { + return this.actions + .map((action) => { + return action.toString(); + }) + .filter((a) => a) + .join('/'); + } + /** + * @description Delivers an animated GIF. + * @param {AnimatedAction} animatedAction + * @return {this} + */ + animated(animatedAction) { + return this.addAction(animatedAction); + } + /** + * @description Adds a border around the image. + * @param {Border} borderAction + * @return {this} + */ + border(borderAction) { + return this.addAction(borderAction); + } + /** + * @description Adjusts the shape of the delivered image.
+ * Learn more: {@link https://cloudinary.com/documentation/effects_and_artistic_enhancements#distort|Shape changes and distortion effects} + * @param {IReshape} reshapeAction + * @return {this} + */ + reshape(reshapeAction) { + return this.addAction(reshapeAction); + } + /** + * @description Resize the asset using provided resize action + * @param {ResizeSimpleAction} resizeAction + * @return {this} + */ + resize(resizeAction) { + return this.addAction(resizeAction); + } + /** + * @desc An alias to Action Delivery.quality + * @param {string|number} quality + * @return {this} + */ + quality(quality) { + this.addAction(new DeliveryFormatAction('q', quality)); + return this; + } + /** + * @desc An alias to Action Delivery.format + * @param {string} format + * @return {this} + */ + format(format) { + this.addAction(new DeliveryFormatAction('f', format)); + return this; + } + /** + * @description Rounds the specified corners of an image. + * @param roundCornersAction + * @return {this} + */ + roundCorners(roundCornersAction) { + return this.addAction(roundCornersAction); + } + /** + * @description Adds an overlay over the base image. + * @param {LayerAction} overlayAction + * @return {this} + */ + overlay(overlayAction) { + return this.addAction(overlayAction); + } + /** + * @description Adds an underlay under the base image. + * @param {LayerAction} underlayAction + * @return {this} + */ + underlay(underlayAction) { + underlayAction.setLayerType('u'); + return this.addAction(underlayAction); + } + /** + * @description Defines an new user variable. + * @param {VariableAction} variableAction + * @return {this} + */ + addVariable(variableAction) { + return this.addAction(variableAction); + } + /** + * @description Specifies a condition to be met before applying a transformation. + * @param {ConditionalAction} conditionAction + * @return {this} + */ + conditional(conditionAction) { + return this.addAction(conditionAction); + } + /** + * @description Applies a filter or an effect on an asset. + * @param {SimpleEffectAction} effectAction + * @return {this} + */ + effect(effectAction) { + return this.addAction(effectAction); + } + /** + * @description Applies adjustment effect on an asset. + * @param action + * @return {this} + */ + adjust(action) { + return this.addAction(action); + } + /** + * @description Rotates the asset by the given angle. + * @param {RotateAction} rotateAction + * @return {this} + */ + rotate(rotateAction) { + return this.addAction(rotateAction); + } + /** + * @description Applies a pre-defined named transformation of the given name. + * @param {NamedTransformation} namedTransformation + * @return {this} + */ + namedTransformation(namedTransformation) { + return this.addAction(namedTransformation); + } + /** + * @description Applies delivery action. + * @param deliveryAction + * @return {this} + */ + delivery(deliveryAction) { + return this.addAction(deliveryAction); + } + /** + * @description Sets the color of the background. + * @param {Qualifiers.Color} color + * @return {this} + */ + backgroundColor(color) { + return this.addAction(new BackgroundColor(prepareColor(color))); + } + /** + * @description Adds a layer in a Photoshop document. + * @param action + * @return {this} + */ + psdTools(action) { + return this.addAction(action); + } + /** + * @description Extracts an image or a page using an index, a range, or a name from a layered media asset. + * @param action + * @return {this} + */ + extract(action) { + return this.addAction(action); + } + /** + * @description Adds a flag as a separate action. + * @param {Qualifiers.Flag | string} flagQualifier + * @return {this} + */ + addFlag(flagQualifier) { + const action = new Action(); + let flagToAdd = flagQualifier; + if (typeof flagQualifier === 'string') { + flagToAdd = new FlagQualifier(flagQualifier); + } + action.addQualifier(flagToAdd); + return this.addAction(action); + } + /** + * @description Inject a custom function into the image transformation pipeline. + * @return {this} + */ + customFunction(customFunction) { + return this.addAction(customFunction); + } + /** + * Transcodes the video (or audio) to another format. + * @param {Action} action + * @return {this} + */ + transcode(action) { + return this.addAction(action); + } + /** + * Applies the specified video edit action. + * + * @param {videoEditType} action + * @return {this} + */ + videoEdit(action) { + return this.addAction(action); + } + toJson() { + const actions = []; + for (const action of this.actions) { + const json = action.toJson(); + if (isErrorObject(json)) { + // Fail early and return an IErrorObject + return json; + } + actions.push(json); + } + return { actions }; + } + } + + /** + * @description + * Returns a string representing the float value of the input, if the input was a number-like. + * Examples: + * - '1.0' -> '1.0' + * - 1 -> '1.0' + * - '5' -> '5.0' + * - 'auto' -> 'auto' + * @private + * @param {string|number} value + * @return {string} + */ + function toFloatAsString(value) { + // Turn the input to string + // The Function will return `returnValue` value if the input is not a number-like expression + const returnValue = value.toString(); + // if the string contains letters, return the input + if (returnValue.match(/[A-Z]/gi)) { + return returnValue; + } + // If the leading digit is 0, and we have more than 1 digit, it's not a number. + // 00, 00000, 0x15 etc. + if (returnValue.length > 1 && returnValue[0] === '0') { + return returnValue; + } + // Final sanity check, parse the number as a float and check if its NaN + const isNumberLike = !isNaN(parseFloat(returnValue)) && returnValue.indexOf(':') === -1; + // If it's a number-like, but the input does not contain a decimal - add it. + if (isNumberLike && returnValue.indexOf('.') === -1) { + return `${returnValue}.0`; + } + else { + // If the input already contains a decimal, just return the value + return returnValue; + } + } + + /** + * @memberOf Qualifiers.AspectRatio + * @extends {SDK.QualifierValue} + */ + class AspectRatioQualifierValue extends QualifierValue { + } + + /** + * @description Defines a resize using width and height. + * @extends SDK.Action + * @memberOf Actions.Resize + * @see Visit {@link Actions.Resize| Resize} for examples + */ + class ResizeSimpleAction extends Action { + /** + * @param {string} cropType + * @param {number | string} cropWidth The required width of a transformed asset. + * @param {number | string} cropHeight The required height of a transformed asset. + */ + constructor(cropType, cropWidth, cropHeight) { + super(); + this._actionModel = { dimensions: {} }; + this._actionModel.actionType = CROP_MODE_TO_ACTION_TYPE_MAP[cropType] || cropType; + this.addQualifier(new Qualifier('c', cropType)); + cropWidth && this.width(cropWidth); + cropHeight && this.height(cropHeight); + } + /** + * @description Sets the height of the resize + * @param {string | number} x The height in pixels (if an integer is specified) or as a percentage (if a float is specified). + */ + height(x) { + this._actionModel.dimensions.height = x; + return this.addQualifier(new Qualifier('h', x)); + } + /** + * @description Sets the width of the resize + * @param {string | number} x The width in pixels (if an integer is specified) or as a percentage (if a float is specified). + */ + width(x) { + this._actionModel.dimensions.width = x; + return this.addQualifier(new Qualifier('w', x)); + } + /** + * @description Sets the aspect ratio of the asset. + * For a list of supported types see {@link Qualifiers.AspectRatio| + * AspectRatio values} + * @param {AspectRatioType|number|string} ratio The new aspect ratio, specified as a percentage or ratio. + * @return {this} + */ + aspectRatio(ratio) { + // toFloatAsString is used to ensure 1 turns into 1.0 + if (ratio instanceof AspectRatioQualifierValue) { + this._actionModel.dimensions.aspectRatio = `${ratio}`; + return this.addQualifier(new Qualifier('ar', ratio)); + } + if (typeof ratio === 'number' || typeof ratio === 'string') { + this._actionModel.dimensions.aspectRatio = toFloatAsString(ratio); + return this.addQualifier(new Qualifier('ar', toFloatAsString(ratio))); + } + if (ratio instanceof FlagQualifier) { + this._actionModel.dimensions.aspectRatio = `${ratio.qualifierValue}`; + return this.addFlag(ratio); + } + } + /** + * @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. + * @return {this} + */ + relative() { + this._actionModel.relative = true; + return this.addFlag(relative()); + } + /** + * @description Modifies percentage-based width & height parameters of overlays and underlays (e.g., 1.0) to be relative to the overlaid region + * @return {this} + */ + regionRelative() { + this._actionModel.regionRelative = true; + return this.addFlag(regionRelative()); + } + static fromJson(actionModel) { + const { actionType, dimensions, relative, regionRelative } = actionModel; + const { aspectRatio, width, height } = dimensions; + const cropMode = ACTION_TYPE_TO_CROP_MODE_MAP[actionType] || actionType; + // We are using this() to allow inheriting classes to use super.fromJson.apply(this, [actionModel]) + // This allows the inheriting classes to determine the class to be created + const result = new this(cropMode, width, height); + aspectRatio && result.aspectRatio(aspectRatio === 'ignore_aspect_ratio' ? ignoreInitialAspectRatio() : aspectRatio); + relative && result.relative(); + regionRelative && result.regionRelative(); + return result; + } + } + + /** + * @memberOf Gravity.GravityQualifier + * @extends {SDK.Qualifier} + */ + class GravityQualifier extends Qualifier { + /** + * @param value, an array containing (GravityObject | AutoGravity | string) or a string; + */ + constructor(value) { + super('g', new QualifierValue(value)); + } + } + + /** + * @description The class for the autoGravity builder + * @memberOf Qualifiers.Gravity + * @extends {Qualifiers.Gravity.GravityQualifier} + */ + class AutoGravity extends GravityQualifier { + constructor() { + // Required due to https://github.com/microsoft/TypeScript/issues/13029 + /* istanbul ignore next */ + super('auto'); + } + /** + * @description Autofocuses on objects, allowing their priority within the algorithm to be configured. + * @param {AutoFocus} AutoFocusObjects + */ + autoFocus(...AutoFocusObjects) { + this.addValue(AutoFocusObjects); + return this; + } + } + + /** + * @description The class for the FocusOn builder + * @memberOf Qualifiers.Gravity + * @extends {Qualifiers.Gravity.GravityQualifier} + */ + class FocusOnGravity extends GravityQualifier { + constructor(FocusOnObjects) { + // Required due to https://github.com/microsoft/TypeScript/issues/13029 + /* istanbul ignore next */ + super(FocusOnObjects); + } + /** + * @description Specifies the gravity to use if none of the other gravity objects are found. + * @param {Qualifiers.Gravity.AutoGravity} val + */ + fallbackGravity(val) { + /* + * FocusOnGravity(this) is already a qualifier, with a key and a value g_{obj1} + * fallBackGravity also attempts to add a value, to reach the result of g_{obj1}:auto:{obj2} + * Since AutoGravity is a Qualifier, it also comes with its own g_ key, which needs to be removed. + * To solve it, we take only the value from the qualifier, instead of the whole thing + */ + this.addValue(val.qualifierValue); + return this; + } + } + + /** + * @description The class for the CompassGravity builder + * @memberOf Qualifiers.Gravity + * @extends {Qualifiers.Gravity.GravityQualifier} + */ + class CompassGravity extends GravityQualifier { + constructor(dir) { + // Required due to https://github.com/microsoft/TypeScript/issues/13029 + /* istanbul ignore next */ + super(dir); + } + } + + /** + * @description Defines the gravity based on directional values from a compass. + * Learn more: {@link https://cloudinary.com/documentation/resizing_and_cropping#control_gravity|Control gravity for images} + * Learn more: {@link https://cloudinary.com/documentation/video_resizing_and_cropping#control_gravity|Control gravity for videos} + * @param {Qualifiers.Compass | string} direction A compass Values + * @memberOf Qualifiers.Gravity + * @example + * import {Cloudinary} from "@cloudinary/url-gen"; + * import {compass} from "@cloudinary/url-gen/qualifiers/gravity"; + * import {north} from "@cloudinary/url-gen/qualifiers/compass"; + * import {crop} from "@cloudinary/url-gen/actions/resize"; + * + * const yourCldInstance = new Cloudinary({cloud: {cloudName: 'demo'}}); + * const image = yourCldInstance.image('woman'); + * image.resize(crop().width(300).gravity(compass(north()))) + * @return {CompassGravity} + */ + function compass(direction) { + return new CompassGravity(direction); + } + /** + * @summary qualifier + * @description Specifies what to focus on, for example: faces, objects, eyes, etc. + * @param {...Qualifier.FocusOn} args One or more objects to focus on + * @memberOf Qualifiers.Gravity + * @example + * import {Cloudinary} from "@cloudinary/url-gen"; + * import {focusOn} from "@cloudinary/url-gen/qualifiers/gravity"; + * import {crop} from "@cloudinary/url-gen/actions/resize"; + * import {cat} from "@cloudinary/url-gen/qualifiers/focusOn"; + * + * const yourCldInstance = new Cloudinary({cloud: {cloudName: 'demo'}}); + * const image = yourCldInstance.image('woman'); + * image.resize(crop().width(300).gravity(focusOn(cat()))) + * @return {FocusOnGravity} + */ + function focusOn(...args) { + const res = [...args]; + return new FocusOnGravity(res); + } + /** + * @summary qualifier + * @description Automatically identifies the most interesting regions in the asset, can be qualified further by including what to focus on. + * @memberOf Qualifiers.Gravity + * @return {Qualifiers.Gravity.AutoGravity} + * @example + * import {Cloudinary} from "@cloudinary/url-gen"; + * import {autoGravity} from "@cloudinary/url-gen/qualifiers/gravity"; + * import {crop} from "@cloudinary/url-gen/actions/resize"; + * + * const yourCldInstance = new Cloudinary({cloud: {cloudName: 'demo'}}); + * const image = yourCldInstance.image('woman'); + * image.resize(crop().width(300).gravity(autoGravity())) + * @example + * import {Cloudinary} from "@cloudinary/url-gen"; + * import {autoGravity} from "@cloudinary/url-gen/qualifiers/gravity"; + * import {crop} from "@cloudinary/url-gen/actions/resize"; + * import {cat} from "@cloudinary/url-gen/qualifiers/focusOn"; + * import {AutoFocus} from "@cloudinary/url-gen/qualifiers/autoFocus"; + * + * const yourCldInstance = new Cloudinary({cloud: {cloudName: 'demo'}}); + * const image = yourCldInstance.image('woman'); + * image.resize(crop().width(300).gravity(autoGravity().autoFocus(AutoFocus.focusOn(cat())))) + */ + function autoGravity() { + return new AutoGravity(); + } + + /** + * @memberOf Qualifiers.FocusOn + * @extends {SDK.QualifierValue} + */ + class FocusOnValue extends QualifierValue { + constructor(name) { + super(); + this.name = name; + } + toString() { + return this.name; + } + } + + /** + * @summary qualifier + * @memberOf Qualifiers.FocusOn + * @description Detect all text elements in an image using the {@link https://cloudinary.com/documentation/ocr_text_detection_and_extraction_addon|OCR Text Detection and Extraction add-on} and use the detected bounding box coordinates as the basis of the transformation. + * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue + */ + function ocr() { + return new FocusOnValue('ocr_text'); + } + + /** + * true if gravity starts with 'auto' or 'auto:' + * @param gravity + */ + function isIAutoGravityString(gravity) { + return gravity && `${gravity}`.split(':')[0] === 'auto'; + } + /** + * Validate that given val is an ICompassGravity + * @param gravity + */ + function isCompassGravity(gravity) { + //const gravityString = `${(typeof gravity === "string" ? gravity : gravity.qualifierValue)}`; + const gravityValue = getGravityValue(gravity); + return ['north', 'center', 'east', 'west', 'south', 'north_west', 'south_east', 'south_west', 'north_east'].includes(gravityValue); + } + /** + * Get the value of given gravity + * @param gravity + */ + function getGravityValue(gravity) { + return `${gravity}`.replace('g_', ''); + } + /** + * Creates a compassGravity model + * @param gravity + */ + function createCompassGravityModel(gravity) { + return { + compass: getGravityValue(gravity), + gravityType: 'direction' + }; + } + /** + * Validate that given gravity is an instance of ocr gravity + * @param gravity + */ + function isOcrGravity(gravity) { + return getGravityValue(gravity) === 'ocr_text'; + } + /** + * Creates an ocr gravity model + */ + function createOcrGravityModel() { + return { + gravityType: 'ocr' + }; + } + /** + * Validate that given gravity is an instance of AutoGravity + * @param gravity + */ + function isAutoGravity(gravity) { + return `${gravity.qualifierValue}`.split(':')[0] === 'auto'; + } + /** + * Create an instance of IAutoGravityObjectModel + * @param gravity + */ + function createIAutoFocusObject(gravity) { + const gravityString = gravity.toString(); + const values = gravityString.split('_'); + const result = { + object: values[0] + }; + if (values.length > 1) { + if (values[1] === 'avoid') { + result.avoid = true; + } + else { + result.weight = +values[1]; + } + } + return result; + } + /** + * Creates an auto gravity model from given AutoGravity + * @param gravity + */ + function createAutoGravityModel(gravity) { + let values; + const gravityQualifier = gravity === 'auto' ? new AutoGravity() : gravity; + if (`${gravity}`.startsWith('auto:')) { + values = `${gravity}`.split(':').filter((v) => v !== 'auto'); + } + else { + values = gravityQualifier.qualifierValue.values.filter((v) => v !== 'auto'); + } + const autoFocus = values.map(createIAutoFocusObject); + return { + gravityType: 'auto', + autoFocus + }; + } + /** + * Create IFocusOnGravityModel from FocusOnGravity + * @param gravity + */ + function createFocusOnGravityModel(gravity) { + const hasAutoGravity = `${gravity}`.split(':').includes('auto'); + const values = gravity.qualifierValue.values; + const focusOnValues = hasAutoGravity ? values.slice(0, values.length - 1) : values; + const result = { + gravityType: 'object', + focusOnObjects: focusOnValues.map((v) => `${v}`) + }; + if (hasAutoGravity) { + // Remove the first 'auto' value by slicing it, because it's added by autoGravity() + const autoFocusObjects = values[values.length - 1].values.slice(1); + const autoGravityInstance = autoGravity().autoFocus(...autoFocusObjects); + result.fallbackGravity = createAutoGravityModel(autoGravityInstance); + } + return result; + } + /** + * Creates a FocusOnGravity from given string + * @param gravity + */ + function createFocusOnGravity(gravity) { + const values = gravity.split(':'); + const focusOnValues = values.map((g) => new FocusOnValue(g)); + return new FocusOnGravity(focusOnValues); + } + /** + * Create a model of given gravity + * @param gravity + */ + function createGravityModel(gravity) { + if (isCompassGravity(gravity)) { + return createCompassGravityModel(gravity); + } + if (isOcrGravity(gravity)) { + return createOcrGravityModel(); + } + if (isIAutoGravityString(gravity) || isAutoGravity(gravity)) { + return createAutoGravityModel(gravity); + } + return createFocusOnGravityModel(typeof gravity === 'string' ? createFocusOnGravity(gravity) : gravity); + } + + /** + * @summary qualifier + * @namespace AutoFocus + * @memberOf Qualifiers + * @see Visit {@link Qualifiers.Gravity|Gravity} for an example + */ + /** + * @memberOf Qualifiers.AutoFocus + * @extends {SDK.QualifierValue} + * @see Visit {@link Qualifiers.Gravity|Gravity} for an example + */ + class AutoFocus extends QualifierValue { + constructor(focusOn, weight) { + super(); + this._weight = weight; + this.focusOn = focusOn; + this.shouldAvoid = false; + } + /** + * @summary qualifier + * @description Specifies the object to focus on automatically + * Accepts an AutoFocusObject (which is just a wrapper for a FocusOn object, but with extra method: avoid, weight) + * @param {Qualifiers.FocusOn} obj The object to focus on. + * @param {number} weight + */ + static focusOn(obj, weight) { + return new AutoFocus(obj, weight); + } + shouldAddWeight() { + return typeof this._weight === 'number' || typeof this._weight === 'string' || this.shouldAvoid; + } + /** + * @summary qualifier + * @desc Get the name of the of the object + */ + getName() { + return this.focusOn.name; + } + /** + * @summary qualifier + * @desc Get the weight for the object + */ + getWeight() { + if (this.shouldAvoid) { + return 'avoid'; + } + else { + return this._weight; + } + } + /** + * @summary qualifier + * @desc Return the string representation of this QualifierValue + */ + toString() { + // Future proofing, in case we'd like to support some custom string in the future, or if data is coming from a DB + if (this.shouldAddWeight()) { + return `${this.getName()}_${this.getWeight()}`; + } + else { + return `${this.getName()}`; + } + } + /** + * @summary qualifier + * @description Sets the importance level of the object within the automatic gravity algorithm + * @param {numebr} w The focus weight for the object + * @return {this} + */ + weight(w) { + this._weight = w; + return this; + } + /** + * @summary qualifier + * @description Attempts to avoid the detected object in the image + * @return {this} + */ + avoid() { + this.shouldAvoid = true; + return this; + } + } + + /** + * @memberOf Qualifiers.Compass + * @extends {SDK.QualifierValue} + */ + class CompassQualifier extends QualifierValue { + constructor(val) { + super(); + this.val = val; + } + toString() { + return this.val; + } + } + + /** + * Validates that gravityModel is an ICompassGravityModel + * @param gravityModel + */ + function isCompassGravityModel(gravityModel) { + return gravityModel.gravityType === 'direction'; + } + /** + * Validates that gravityModel is an IOcrGravityModel + * @param gravityModel + */ + function isOcrGravityModel(gravityModel) { + return gravityModel.gravityType === 'ocr'; + } + /** + * Validates that gravityModel is an IAutoGravityModel + * @param gravityModel + */ + function isAutoGravityModel(gravityModel) { + return gravityModel.gravityType === 'auto'; + } + /** + * Create AutoFocus from IAutoGravityObjectModel + * @param autoGravityObjectModel + */ + function createAutoFocusFromModel(autoGravityObjectModel) { + const { object, weight, avoid } = autoGravityObjectModel; + const autoFocus = new AutoFocus(new FocusOnValue(object)); + (weight || weight === 0) && autoFocus.weight(weight); + avoid && autoFocus.avoid(); + return autoFocus; + } + /** + * Create AutoGravity from IAutoGravityModel + * @param gravityModel + */ + function createAutoGravityFromModel(gravityModel) { + const autoFocusModel = gravityModel.autoFocus || []; + const autoFocus = autoFocusModel.map(createAutoFocusFromModel); + return autoGravity().autoFocus(...autoFocus); + } + /** + * Create FocusOnGravity from given IFocusOnGravityModel + * @param gravityModel + */ + function createFocusOnGravityFromModel(gravityModel) { + const focusOnObjects = (gravityModel.focusOnObjects || []).map((str) => new FocusOnValue(str)); + const result = focusOn(...focusOnObjects); + if (gravityModel.fallbackGravity) { + const autoGravity = createAutoGravityFromModel(gravityModel.fallbackGravity); + result.fallbackGravity(autoGravity); + } + return result; + } + /** + * Create gravity instance from given gravity model + * @param gravityModel + */ + function createGravityFromModel(gravityModel) { + if (isCompassGravityModel(gravityModel)) { + return new CompassGravity(new CompassQualifier(gravityModel.compass)); + } + if (isOcrGravityModel(gravityModel)) { + return focusOn(ocr()); + } + if (isAutoGravityModel(gravityModel)) { + return createAutoGravityFromModel(gravityModel); + } + return createFocusOnGravityFromModel(gravityModel); + } + + /** + * @description Defines an advanced resize. + * @extends Actions.Resize.ResizeSimpleAction + * @memberOf Actions.Resize + * @see Visit {@link Actions.Resize| Resize} for examples + */ + class ResizeAdvancedAction extends ResizeSimpleAction { + /** + * @description Which part of the original image to include. + * @param {Qualifiers.Gravity} gravity + */ + gravity(gravity) { + this._actionModel.gravity = createGravityModel(gravity); + const gravityQualifier = typeof gravity === "string" ? new Qualifier('g', gravity) : gravity; + return this.addQualifier(gravityQualifier); + } + static fromJson(actionModel) { + const result = super.fromJson.apply(this, [actionModel]); + if (actionModel.gravity) { + result.gravity(createGravityFromModel(actionModel.gravity)); + } + return result; + } + } + + /** + * @description Defines the visual appearance of the background. + * @memberOf Qualifiers.Background + * @extends {SDK.Qualifier} + */ + class BackgroundQualifier extends Qualifier { + constructor(backgroundValue) { + // The qualifier key for this qualifier + super('b'); + // Such as color (b_red) + if (backgroundValue) { + this.addValue(backgroundValue); + } + } + } + + /** + * @description A class for blurred background transformations. + * @memberOf Qualifiers.Background + * @extends {Qualifiers.Background.BackgroundQualifier} + */ + class BlurredBackgroundAction extends BackgroundQualifier { + /** + * @description Sets the intensity of the blur. + * @param {number} value - The intensity of the blur. + */ + intensity(value) { + this.intensityLevel = value; + return this; + } + /** + * @description Sets the brightness of the background. + * @param {number} value - The brightness of the background. + */ + brightness(value) { + this.brightnessLevel = value; + return this; + } + /** + * @description + * Stringify the qualifier + * BackgroundQualifiers don't have a value, but instead override the toString() function + */ + toString() { + // b_blurred:{intensity}:{brightness} + return ` + b_blurred + ${this.intensityLevel ? `:${this.intensityLevel}` : ''} + ${this.brightnessLevel ? `:${this.brightnessLevel}` : ''} + `.replace(/\s+/g, ''); + } + } + var BlurredBackgroundAction$1 = BlurredBackgroundAction; + + /** + * @description Defines the background color to use when resizing with padding. + * @memberOf Qualifiers.Background + * @extends {Qualifiers.Background.BackgroundQualifier} + */ + class BaseCommonBackground extends BackgroundQualifier { + constructor() { + super(); + this._palette = []; + } + /** + * @description Selects the strongest contrasting color to use for padding. + * @return {this} + */ + contrast() { + this._contrast = true; + return this; + } + /** + * @description Defines the custom colors to use when resizing using content-aware padding. + * @param {...string} colors One or more colors - Example: palette('green', 'red', blue') + * @return {this} + */ + palette(...colors) { + this._palette = colors.map((color) => { + return prepareColor(color); + }); + return this; + } + } + + /** + * @description Automatically determines the color to use for padding, if needed when resizing an asset. Selects the + * predominant color from the border of the image. + * @memberOf Qualifiers.Background + * @extends {Qualifiers.Background.BaseCommonBackground} + */ + class BackgroundAutoBorderQualifier extends BaseCommonBackground { + /** + * @description + * Stringify the qualifier + * BackgroundQualifiers don't have a value, but instead override the toString() function. + */ + toString() { + return ` + b_auto:border + ${this._contrast ? '_contrast' : ''} + ${this._palette.length ? `:palette_${this._palette.join('_')}` : ''} + `.replace(/\s+/g, ''); + } + } + + /** + * @description Defines the gradient fade effect to use for the background when resizing with padding. + * @memberOf Qualifiers.Background + * @extends {Qualifiers.Background.BaseCommonBackground} + */ + class BaseGradientBackground extends BaseCommonBackground { + /** + * + * @description Sets the number of predominant colors to use (2 or 4). + * @param {number} num + * @return {this} + */ + gradientColors(num) { + this._gradientColors = num; + return this; + } + /** + * @description Sets the direction for a background gradient fade effect. + * @param {Qualifiers.GradientDirection | GradientDirectionType | string} direction Use one of these functions + * provided by {@link Qualifiers.GradientDirection|GradientDirection} + * @return {this} + */ + gradientDirection(direction) { + this._gradientDirection = direction; + return this; + } + } + + /** + * @description Specifies that the gradient fade effect, used for the background when resizing with padding, uses the + * predominant colors in the border pixels of the image. + * @memberOf Qualifiers.Background + * @extends {Qualifiers.Background.BaseGradientBackground} + */ + class BackgroundBorderGradientQualifier extends BaseGradientBackground { + /** + * @description + * Stringify the qualifier + * BackgroundQualifiers don't have a value, but instead override the toString() function. + */ + toString() { + return ` + b_auto:border_gradient + ${this._contrast ? '_contrast' : ''} + ${this._gradientColors ? `:${this._gradientColors}` : ''} + ${this._gradientDirection ? `:${this._gradientDirection}` : ''} + ${this._palette.length ? `:palette_${this._palette.join('_')}` : ''} + `.replace(/\s+/g, ''); + } + } + + /** + * @description Specifies that the gradient fade effect, used for the background when resizing with padding, uses the + * predominant colors in the whole of the image. + * @memberOf Qualifiers.Background + * @extends {Qualifiers.Background.BaseGradientBackground} + */ + class BackgroundPredominantGradientQualifier extends BaseGradientBackground { + /** + * @description + * Stringify the qualifier + * BackgroundQualifiers don't have a value, but instead override the toString() function. + */ + toString() { + return ` + b_auto:predominant_gradient + ${this._contrast ? '_contrast' : ''} + ${this._gradientColors ? `:${this._gradientColors}` : ''} + ${this._gradientDirection ? `:${this._gradientDirection}` : ''} + ${this._palette.length ? `:palette_${this._palette.join('_')}` : ''} + `.replace(/\s+/g, ''); + } + } + + /** + * @description Automatically determines the color to use for padding, if needed when resizing an asset. Selects the + * predominant color from the whole image. + * @memberOf Qualifiers.Background + * @extends {Qualifiers.Background.BaseCommonBackground} + */ + class BackgroundAutoPredominantQualifier extends BaseCommonBackground { + /** + * @description + * Stringify the qualifier + * BackgroundQualifiers don't have a value, but instead override the toString() function. + */ + toString() { + return ` + b_auto:predominant + ${this._contrast ? '_contrast' : ''} + ${this._palette.length ? `:palette_${this._palette.join('_')}` : ''} + `.replace(/\s+/g, ''); + } + } + + /** + * Get the value of given background + * @param background + */ + function getBackgroundValue(background) { + return `${background}`.replace('b_', ''); + } + /** + * Create an IAutoBackgroundModel from given background + */ + function createAutoBackgroundModel() { + return { backgroundType: 'auto' }; + } + /** + * Create an IBlurredBackgroundModel from given background + * @param background + */ + function createBlurredBackgroundModel(background) { + const { intensityLevel, brightnessLevel } = background; + const result = { + backgroundType: 'blurred' + }; + if (intensityLevel || intensityLevel === 0) { + result.intensity = intensityLevel; + } + if (brightnessLevel || brightnessLevel === 0) { + result.brightness = brightnessLevel; + } + return result; + } + /** + * Create an IContrastPaletteBackgroundModel from given background + * @param background + */ + function createContrastPaletteBackgroundModel(background) { + const contrast = background._contrast; + const palette = background._palette; + const result = { + backgroundType: '' + }; + if (contrast) { + result.contrast = true; + } + if (palette) { + result.palette = palette; + } + return result; + } + /** + * Create an IBorderBackgroundModel from given background + * @param background + */ + function createBorderBackgroundModel(background) { + return Object.assign(Object.assign({}, createContrastPaletteBackgroundModel(background)), { backgroundType: 'border' }); + } + /** + * Create an IBaseGradientBackgroundModel from given background + * @param background + */ + function createBaseGradientBackgroundModel(background) { + const gradientColors = background._gradientColors; + const gradientDirection = `${background._gradientDirection}`; + const result = createContrastPaletteBackgroundModel(background); + if (gradientColors) { + result.gradientColors = gradientColors; + } + if (gradientDirection) { + result.gradientDirection = gradientDirection; + } + return result; + } + /** + * Create an IBorderGradientBackgroundModel from given background + * @param background + */ + function createBorderGradientBackgroundModel(background) { + return Object.assign(Object.assign({}, createBaseGradientBackgroundModel(background)), { backgroundType: 'borderGradient' }); + } + /** + * Create an IColorBackgroundModel from given background + * @param background + */ + function createColorBackgroundModel(background) { + return { + backgroundType: 'color', + color: getBackgroundValue(background) + }; + } + /** + * Create an IPredominantBackgroundModel from given background + * @param background + */ + function createPredominantBackgroundModel(background) { + return Object.assign(Object.assign({}, createContrastPaletteBackgroundModel(background)), { backgroundType: 'predominant' }); + } + /** + * Create an IPredominantGradientBackgroundModel from given background + * @param background + */ + function createPredominantGradientBackgroundModel(background) { + return Object.assign(Object.assign({}, createBaseGradientBackgroundModel(background)), { backgroundType: 'predominantGradient' }); + } + /** + * Create an IBackgroundModel from given background + * @param background + */ + function createBackgroundModel(background) { + if (getBackgroundValue(background) === 'auto') { + return createAutoBackgroundModel(); + } + if (background instanceof BlurredBackgroundAction$1) { + return createBlurredBackgroundModel(background); + } + if (background instanceof BackgroundAutoBorderQualifier) { + return createBorderBackgroundModel(background); + } + if (background instanceof BackgroundBorderGradientQualifier) { + return createBorderGradientBackgroundModel(background); + } + if (background instanceof BackgroundAutoPredominantQualifier) { + return createPredominantBackgroundModel(background); + } + if (background instanceof BackgroundPredominantGradientQualifier) { + return createPredominantGradientBackgroundModel(background); + } + return createColorBackgroundModel(background); + } + + /** + * @summary qualifier + * @description Image format svg. + * @memberOf Qualifiers.Format + * @return {Qualifiers.Format.FormatQualifier} + */ + function svg() { return new FormatQualifier('svg'); } + /** + * @summary qualifier + * @description Image format auto. + * @memberOf Qualifiers.Format + * @return {Qualifiers.Format.FormatQualifier} + */ + function auto$1() { return new FormatQualifier('auto'); } + + /** + * @description Defines the background color to use instead of transparent background areas or when resizing with padding. + * + * Learn more: {@link https://cloudinary.com/documentation/effects_and_artistic_enhancements#setting_background_color|Setting background for images} | {@link https://cloudinary.com/documentation/video_effects_and_enhancements#background_color|Setting background for videos} + * + * @namespace Background + * @memberOf Qualifiers + */ + /** + * @summary qualifier + * @description Selects the predominant color while taking only the image border pixels into account. + * @memberOf Qualifiers.Background + * @return {BackgroundAutoBorderQualifier} + */ + function border() { + return new BackgroundAutoBorderQualifier(); + } + /** + * @summary qualifier + * @description Automatically determines the color to use for padding, if needed when resizing an asset. + * + * Learn more: {@link https://cloudinary.com/documentation/effects_and_artistic_enhancements#content_aware_padding|Content-aware padding} + * @memberOf Qualifiers.Background + * @return {Qualifiers.Background.BackgroundQualifier} + */ + function auto() { + return new BackgroundQualifier('auto'); + } + /** + * @summary qualifier + * @description Applies a padding gradient fade effect using the predominant colors in the border of the image. + * @memberOf Qualifiers.Background + * @return {BackgroundBorderGradientQualifier} + */ + function borderGradient() { + return new BackgroundBorderGradientQualifier(); + } + /** + * @summary qualifier + * @description Applies a padding gradient fade effect using the predominant colors in the image. + * @memberOf Qualifiers.Background + * @return {BackgroundPredominantGradientQualifier} + */ + function predominantGradient() { + return new BackgroundPredominantGradientQualifier(); + } + /** + * @summary qualifier + * @description Selects the predominant color while taking all pixels in the image into account + * @memberOf Qualifiers.Background + * @return {BackgroundAutoPredominantQualifier} + */ + function predominant() { + return new BackgroundAutoPredominantQualifier(); + } + /** + * @summary qualifier + * @description Selects the predominant color while taking all pixels in the image into account. + * @memberOf Qualifiers.Background + * @return {Qualifiers.Background.BackgroundQualifier} + */ + function color(colorStr) { + return new BackgroundQualifier(prepareColor(colorStr)); + } + /** + * @summary qualifier + * @description Selects the predominant color while taking all pixels in the image into account. + * @memberOf Qualifiers.Background + * @return {BlurredBackgroundAction} + */ + function blurred() { + return new BlurredBackgroundAction$1(); + } + const Background = { + auto: auto, + border: border, + borderGradient: borderGradient, + predominantGradient: predominantGradient, + predominant: predominant, + color: color, + blurred: blurred + }; + + /** + * Create BackgroundQualifier from IBlurredBackgroundModel + * @param backgroundModel + */ + function createBlurredBackground(backgroundModel) { + const { brightness, intensity } = backgroundModel; + const result = Background.blurred(); + if (brightness || brightness == 0) { + result.brightness(brightness); + } + if (intensity || intensity == 0) { + result.intensity(intensity); + } + return result; + } + /** + * Create a gradientBackground from given model + * @param background + * @param backgroundModel + */ + function createGradientBackground(background, backgroundModel) { + const { gradientColors, gradientDirection, contrast, palette } = backgroundModel; + if (contrast) { + background.contrast(); + } + if (palette) { + background.palette(...palette); + } + if (gradientColors) { + background.gradientColors(+gradientColors); + } + if (gradientDirection) { + background.gradientDirection(gradientDirection); + } + return background; + } + /** + * Crete a background with contrast and palette from given model + * @param background + * @param backgroundModel + */ + function createContrastPaletteBackground(background, backgroundModel) { + const { contrast, palette } = backgroundModel; + if (contrast) { + background.contrast(); + } + if (palette) { + background.palette(...palette); + } + return background; + } + /** + * Create BackgroundQualifier from IBackgroundModel + * @param backgroundModel + */ + function createBackgroundFromModel(backgroundModel) { + const { backgroundType } = backgroundModel; + switch (backgroundType) { + case 'auto': + return auto(); + case 'blurred': + return createBlurredBackground(backgroundModel); + case 'border': + return createContrastPaletteBackground(border(), backgroundModel); + case 'borderGradient': + return createGradientBackground(borderGradient(), backgroundModel); + case 'predominant': + return createContrastPaletteBackground(predominant(), backgroundModel); + case 'predominantGradient': + return createGradientBackground(predominantGradient(), backgroundModel); + default: + return color(backgroundModel.color); + } + } + + /** + * @description Defines an advanced resize with padding. + * @extends Actions.Resize.ResizeAdvancedAction + * @memberOf Actions.Resize + * @see Visit {@link Actions.Resize| Resize} for examples + */ + class ResizePadAction extends ResizeAdvancedAction { + /** + * @description Sets the background. + * @param {Qualifiers.Background} backgroundQualifier Defines the background color to use instead of + * transparent background areas or when resizing with padding. + */ + background(backgroundQualifier) { + this._actionModel.background = createBackgroundModel(backgroundQualifier); + return this.addQualifier(backgroundQualifier); + } + /** + * @description Horizontal position for custom-coordinates based padding. + * @param {number} x The x position. + */ + offsetX(x) { + this._actionModel.x = x; + return this.addQualifier(new Qualifier('x', x)); + } + /** + * @description Vertical position for custom-coordinates based padding + * @param {number} y The y position. + */ + offsetY(y) { + this._actionModel.y = y; + return this.addQualifier(new Qualifier('y', y)); + } + static fromJson(actionModel) { + const result = super.fromJson.apply(this, [actionModel]); + actionModel.background && result.background(createBackgroundFromModel(actionModel.background)); + actionModel.x && result.offsetX(actionModel.x); + actionModel.y && result.offsetY(actionModel.y); + actionModel.zoom && result.zoom(actionModel.zoom); + return result; + } + } + + /** + * @description Defines a scaling resize action. + * @extends Actions.Resize.ResizeSimpleAction + * @memberOf Actions.Resize + * @see Visit {@link Actions.Resize| Resize} for examples + */ + class ResizeScaleAction extends ResizeSimpleAction { + /** + * @description Changes the aspect ratio of an image while retaining all important content and avoiding unnatural + * distortions. + * @return {this} + */ + liquidRescaling() { + return this.addQualifier(new GravityQualifier('liquid')); + } + } + + /** + * @description Defines how to crop an asset + * @extends Actions.Resize.ResizeAdvancedAction + * @memberOf Actions.Resize + * @see Visit {@link Actions.Resize| Resize} for examples + */ + class ResizeCropAction extends ResizeAdvancedAction { + /** + * @description Horizontal position for custom-coordinates based cropping. + * @param {number} x The x position. + */ + x(x) { + this._actionModel.x = x; + return this.addQualifier(new Qualifier('x', x)); + } + /** + * @description Vertical position for custom-coordinates based cropping + * @param {number} y The y position. + */ + y(y) { + this._actionModel.y = y; + return this.addQualifier(new Qualifier('y', y)); + } + /** + * @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. + * @param {number | string} z The zoom factor. (Default: 1.0) + */ + zoom(z) { + this._actionModel.zoom = z; + return this.addQualifier(new Qualifier('z', z)); + } + static fromJson(actionModel) { + const result = super.fromJson.apply(this, [actionModel]); + actionModel.x && result.x(actionModel.x); + actionModel.y && result.y(actionModel.y); + actionModel.zoom && result.zoom(actionModel.zoom); + return result; + } + } + + /** + * @description Defines how to crop-fill an asset + * @extends Actions.Resize.ResizeAdvancedAction + * @memberOf Actions.Resize + * @see Visit {@link Actions.Resize| Resize} for examples + */ + class ResizeFillAction extends ResizeAdvancedAction { + /** + * @description Absolute X position when used with Gravity.xyCenter {@link Qualifiers.Gravity.GravityQualifier}} + * @param {number} x The x position. + */ + x(x) { + this._actionModel.x = x; + return this.addQualifier(new Qualifier('x', x)); + } + /** + * @description Absolute Y position when used with Gravity.xyCenter {@link Qualifiers.Gravity.GravityQualifier}} + * @param {number} y The y position. + */ + y(y) { + this._actionModel.y = y; + return this.addQualifier(new Qualifier('y', y)); + } + static fromJson(actionModel) { + const result = super.fromJson.apply(this, [actionModel]); + actionModel.x && result.x(actionModel.x); + actionModel.y && result.y(actionModel.y); + return result; + } + } + + /** + * @description Determines how to crop, scale, and/or zoom the delivered asset according to the requested dimensions. + * @memberOf Actions + * @namespace Resize + * @see Learn more about Gravity and Focus {@link Qualifiers.Gravity| here } + * @example + *

Scaling an image

+ * import {Cloudinary} from "@cloudinary/url-gen"; + * import {scale, fit, pad, crop} from '@cloudinary/url-gen/actions/resize'; + * + * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}}); + * const image = yourCldInstance.image('woman'); + * + * image.resize( scale(100, 100) ); + * // All resize actions have a similar interface. + * // image.resize( fit(100, 100)) ); + * // image.resize( pad(100, 100)) ); + * // image.resize( crop(100, 100)) ); + * // However, Some actions have additional arguments exposed as builder methods. + * // See the documentation for each method for more information + * + * + * // Alternative syntax, using builder methods + * image.resize( + * scale() + * .width(100) + * .height(100) + * ); + * image.toString() + * + * @example + *

Cropping with automatic focus(Gravity)

+ * import {Cloudinary} from "@cloudinary/url-gen"; + * + * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}}); + * const image = yourCldInstance.image('woman'); + * + * import {scale} from '@cloudinary/url-gen/actions/resize'; + * import {autoGravity} from '@cloudinary/url-gen/qualifiers/gravity'; + * + * image.resize( crop(100, 100).gravity(autoGravity()) ); + * + * // Alternative syntax, using builder methods + * image.resize( + * scale() + * .width(100) + * .height(100) + * .gravity(autoGravity()) + * ); + * image.toString() + */ + /** + * @summary action + * @description + * Changes the size of the image exactly to the given width and height without necessarily retaining the original aspect ratio:
+ * all original image parts are visible but might be stretched or shrunk. + * @memberOf Actions.Resize + * @param {number|string} width The required width of a transformed asset. + * @param {number|string} height The required height of a transformed asset. + * @return {Actions.Resize.ScaleAction} + */ + function scale(width, height) { + return new ResizeScaleAction('scale', width, height); + } + /** + * @summary action + * @description Extracts a region of the given width and height out of the original image. + * @memberOf Actions.Resize + * @param {number|string} width The required width of a transformed asset. + * @param {number|string} height The required height of a transformed asset. + * @return {Actions.Resize.ResizeCropAction} + */ + function crop(width, height) { + return new ResizeCropAction('crop', width, height); + } + /** + * @summary action + * @description + * Creates an image with the exact given width and height without distorting the image.
+ * This option first scales up or down as much as needed to at least fill both of the given dimensions.

+ * If the requested aspect ratio is different than the original, cropping will occur on the dimension that exceeds the requested size after scaling. + * @memberOf Actions.Resize + * @param {number|string} width The required width of a transformed asset. + * @param {number|string} height The required height of a transformed asset. + * @return {Actions.Resize.ResizeFillAction} + */ + function fill(width, height) { + return new ResizeFillAction('fill', width, height); + } + /** + * @summary action + * @description + * Resizes the asset to fill the given width and height while retaining the original aspect ratio. + * + * If the proportions of the original asset do not match the given width and height, padding is added to the asset + * to reach the required size. + * @memberOf Actions.Resize + * @param {number|string} width The required width of a transformed asset. + * @param {number|string} height The required height of a transformed asset. + * @return {Actions.Resize.ResizePadAction} + */ + function pad(width, height) { + return new ResizePadAction('pad', width, height); + } + + /** + * @description Controls the quality of the delivered image or video. + * @memberOf Actions.Delivery + * @extends {Actions.Delivery.DeliveryAction} + * @see Visit {@link Actions.Delivery|Delivery} for an example + */ + class DeliveryQualityAction extends DeliveryAction { + /** + * @param {Qualifiers.Quality} qualityValue a Quality value + */ + constructor(qualityValue) { + super('q', qualityValue.toString(), 'level'); + } + /** + * Selet the Chroma sub sampling
+ * Learn more: {@link https://cloudinary.com/documentation/image_optimization#toggle_chroma_subsampling|Toggling chroma subsampling} + * @param {420 | 444 | number} type The chroma sub sampling type + */ + chromaSubSampling(type) { + this._actionModel.chromaSubSampling = CHROMA_VALUE_TO_CHROMA_MODEL_ENUM[type]; + const qualityWithSubSampling = new QualifierValue([this._actionModel.level, type]); + qualityWithSubSampling.setDelimiter(':'); + // We either have chroma or quantization, but not both + return this.addQualifier(new Qualifier('q', qualityWithSubSampling)); + } + /** + * Controls the final quality by setting a maximum quantization percentage + * @param {number} val + */ + quantization(val) { + this._actionModel.quantization = val; + const qualityWithQuantization = new QualifierValue([this._actionModel.level, `qmax_${val}`]).setDelimiter(':'); + // We either have chroma or quantization, but not both + return this.addQualifier(new Qualifier('q', qualityWithQuantization)); + } + static fromJson(actionModel) { + const { level, chromaSubSampling, quantization } = actionModel; + const levelType = ACTION_TYPE_TO_QUALITY_MODE_MAP[level] || level; + const result = new this(levelType); + if (chromaSubSampling) { + //Turn strings like 'CHROMA_420' to 420 + const chromaValue = CHROMA_MODEL_ENUM_TO_CHROMA_VALUE[chromaSubSampling.toUpperCase()]; + chromaValue && result.chromaSubSampling(+chromaValue); + } + quantization && result.quantization(quantization); + return result; + } + } + + /** + * @description Defines transformations for delivering your assets without changing the visual or audio experience for the end user. + * @memberOf Actions + * @namespace Delivery + * @example + * See the examples under every method + */ + /** + * @summary action + * @description Defines the format of the delivered asset. + * + * Learn more: + * {@link https://cloudinary.com/documentation/image_transformations#image_format_support|Image formats} + * {@link https://cloudinary.com/documentation/video_manipulation_and_delivery#transcoding_video_to_other_formats|Video formats} + * + * @memberOf Actions.Delivery + * @param {string} format The file format. For a list of supported format types see {@link Qualifiers.Format| format types} for + * possible values + * @return {Actions.Delivery.DeliveryFormat} + * @example + * import {Cloudinary} from "@cloudinary/url-gen"; + * import {format} from "@cloudinary/url-gen/actions/delivery"; + * + * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}}); + * const image = yourCldInstance.image('woman'); + * image.delivery( + * format('jpg'), + * ); + * + */ + function format(format) { + return new DeliveryFormatAction('f', format); + } + /** + * @summary action + * @description Controls the quality of the delivered image or video. + * + * Learn more: {@link https://cloudinary.com/documentation/image_optimization#how_to_optimize_image_quality|Image quality} + * {@link https://cloudinary.com/documentation/video_optimization#how_to_optimize_video_quality|Video quality} + * @memberOf Actions.Delivery + * @param {QualityTypes | string | number | Qualifiers.Quality} qualityType For a list of supported quality types see + * {@link Qualifiers.Quality| quality types} for + * possible values. + * @return {Actions.Delivery.DeliveryQualityAction} + * @example + * import {Cloudinary} from "@cloudinary/url-gen"; + * import {quality} from "@cloudinary/url-gen/actions/delivery"; + * import {quality} from "@cloudinary/url-gen/qualifiers/quantity"; + * + * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}}); + * const image = yourCldInstance.image('woman'); + * image.delivery( + * quality('auto'), + * ); + */ + function quality(qualityType) { + return new DeliveryQualityAction(qualityType); + } + + /** + * @summary qualifier + * @memberOf Qualifiers.Compass + * @description North east corner (top right). + * @return {Qualifiers.Compass.CompassQualifier} Compass + */ + function northEast() { + return new CompassQualifier('north_east'); + } + + /** + * Predefined accessibility transformations + * @const {Object} Cloudinary.ACCESSIBILITY_MODES + */ + var ACCESSIBILITY_MODES = { + 'darkmode': colorize(70).color('black'), + 'brightmode': colorize(40).color('white'), + 'monochrome': grayscale(), + 'colorblind': assistColorBlind() + }; + /** + * Predefined vectorize placeholder transformation + */ + var VECTORIZE = new Transformation() + .effect(vectorize()) + .delivery(quality('auto')) + .delivery(format(svg())); + /** + * Predefined pixelate placeholder transformation + */ + var PIXELATE = new Transformation() + .effect(pixelate()) + .delivery(quality('auto')) + .delivery(format(auto$1())); + /** + * Predefined blur placeholder transformation + */ + var BLUR = new Transformation() + .effect(blur(2000)) + .delivery(quality('auto')) + .delivery(format(auto$1())); + /** + * Predefined predominant color placeholder transformation + */ + var PREDOMINANT_COLOR_TRANSFORM = new Transformation() + .resize(pad('iw_div_2').aspectRatio(1).background(Background.auto())) + .resize(crop(1, 1).gravity(compass(northEast()))) + .resize(fill().height('ih').width('iw')) + .delivery(quality('auto')) + .delivery(format(auto$1())); + /** + * Predefined placeholder image options + */ + var PLACEHOLDER_IMAGE_OPTIONS = { + 'vectorize': VECTORIZE, + 'pixelate': PIXELATE, + 'blur': BLUR, + 'predominant-color': PREDOMINANT_COLOR_TRANSFORM + }; + /** + * transparent gif + */ + var singleTransparentPixel = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='; + /** + * Convert common video file extensions to mime types + * Most other common video file extensions have an identical mime type so do not need conversion. + */ + var VIDEO_MIME_TYPES = { + 'flv': 'x-flv', + '3gp': '3gpp', + 'mov': 'quicktime', + 'mpg': 'mpeg', + 'avi': 'x-msvideo', + 'wmv': 'x-ms-wmv', + 'ogv': 'ogg', + 'webm': 'webm', + 'mp4': 'mp4', + }; + + var ANALYTICS_DELIMITER = '?_a='; + var HtmlVideoLayer = /** @class */ (function () { + function HtmlVideoLayer(element, userCloudinaryVideo, sources, plugins, videoAttributes) { + var _this = this; + this.mimeType = 'video'; + this.mimeSubTypes = VIDEO_MIME_TYPES; + this.videoElement = element; + this.originalVideo = userCloudinaryVideo; + this.htmlPluginState = { cleanupCallbacks: [], pluginEventSubscription: [] }; + var pluginCloudinaryVideo = cloneDeep(userCloudinaryVideo); + render(element, userCloudinaryVideo, plugins, this.htmlPluginState) + .then(function () { + _this.htmlPluginState.pluginEventSubscription.forEach(function (fn) { fn(); }); + _this.setVideoAttributes(videoAttributes); + _this.handleSourceToVideo(pluginCloudinaryVideo, sources); + }); + } + /** + * Handles user supplied sources or default sources + * @param userCloudinaryVideo {CloudinaryVideo} + * @param sources + */ + HtmlVideoLayer.prototype.handleSourceToVideo = function (userCloudinaryVideo, sources) { + var _this = this; + // checks if user supplied sources + if (sources) { + this.generateUserSources(userCloudinaryVideo, sources); + } + else { + var defaultTypes = ['webm', 'mp4', 'ogv']; + defaultTypes.forEach(function (type) { + _this.appendSourceTag(userCloudinaryVideo, type); + }); + } + }; + /** + * Generate sources based on user input + * @param userCloudinaryVideo {CloudinaryVideo} + * @param sources + */ + HtmlVideoLayer.prototype.generateUserSources = function (userCloudinaryVideo, sources) { + var _this = this; + sources.map(function (_a) { + var type = _a.type, codecs = _a.codecs, transcode = _a.transcode; + return (_this.appendSourceTag(cloneDeep(userCloudinaryVideo) + .transcode(transcode), type, _this.buildMimeType(type, codecs))); + }); + }; + /** + * Appends source tag to html video element + * @param userCloudinaryVideo {CloudinaryVideo} + * @param type {string} + * @param mimeType {string} + */ + HtmlVideoLayer.prototype.appendSourceTag = function (userCloudinaryVideo, type, mimeType) { + var source = document.createElement('source'); + var url = userCloudinaryVideo.toURL(); + // Split url to get analytics string so that we can insert the file extension (type) before it + // To simplify this we could add a .getPublicId to CloudinaryVideo and do vid.setPublicId(vid.getPublicId+type) + // Another option could be to add a .setExtension, which will allow to do vid.setExtension(type) + var srcParts = url.split(ANALYTICS_DELIMITER); + var analyticsStr = srcParts[1] ? "".concat(ANALYTICS_DELIMITER).concat(srcParts[1]) : ''; + source.src = "".concat(srcParts[0], ".").concat(type).concat(analyticsStr); + // Ideally, we want to use the VIDEO_MIME_TYPE to detect the mime of the extension + // For future proofing of simple formats (say .foo and mimetype of video/foo), we also fallback to the actual type + source.type = mimeType ? mimeType : "video/".concat(VIDEO_MIME_TYPES[type] || type); + this.videoElement.appendChild(source); + }; + /** + * Determines MIME type of given source type and codecs. + * @param type - format of the video + * @param codecs - optional information about codecs of the video + */ + HtmlVideoLayer.prototype.buildMimeType = function (type, codecs) { + var mimeType = "".concat(this.mimeType, "/").concat(this.mimeSubTypes[type] || type); + if (codecs) { + mimeType += "; codecs=" + (Array.isArray(codecs) ? codecs.join(', ') : codecs); + } + return mimeType; + }; + /** + * Iterates through the video attributes and sets to true if passed in by the user. + * In case of poster, sets the poster. + * @param videoAttributes {object} Supported attributes: controls, loop, muted, poster, preload, autoplay, playsinline + */ + HtmlVideoLayer.prototype.setVideoAttributes = function (videoAttributes) { + if (videoAttributes) { + for (var _i = 0, _a = Object.entries(videoAttributes); _i < _a.length; _i++) { + var _b = _a[_i], key = _b[0], value = _b[1]; + // Boolean attributes are considered to be true if they're present on the element at all. + // You should set value to the empty string ("") or the attribute's name. + // See https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute + value && this.videoElement.setAttribute(key, key === 'poster' ? value : ''); + } + } + }; + /** + * Called when component is updated. If our video source has changed, a video reload is triggered. + * @param updatedCloudinaryVideo + * @param sources + * @param plugins + * @param videoAttributes + */ + HtmlVideoLayer.prototype.update = function (updatedCloudinaryVideo, sources, plugins, videoAttributes) { + var _this = this; + if (updatedCloudinaryVideo !== this.originalVideo) { + var sourcesToDelete = this.videoElement.getElementsByTagName("SOURCE"); + while (sourcesToDelete[0]) + sourcesToDelete[0].parentNode.removeChild(sourcesToDelete[0]); + render(this.videoElement, updatedCloudinaryVideo, plugins, this.htmlPluginState) + .then(function () { + _this.setVideoAttributes(videoAttributes); + _this.handleSourceToVideo(updatedCloudinaryVideo, sources); + _this.videoElement.load(); + }); + } + }; + return HtmlVideoLayer; + }()); + + /** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + + /** Used as the `TypeError` message for "Functions" methods. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used as references for various `Number` constants. */ + var NAN = 0 / 0; + + /** `Object#toString` result references. */ + var symbolTag = '[object Symbol]'; + + /** Used to match leading and trailing whitespace. */ + var reTrim = /^\s+|\s+$/g; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Built-in method references without a dependency on `root`. */ + var freeParseInt = parseInt; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeMax = Math.max, + nativeMin = Math.min; + + /** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ + var now = function() { + return root.Date.now(); + }; + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + result = wait - timeSinceLastCall; + + return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); + } + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); + } + + var lodash_debounce = debounce; + + /** + * Returns true if value is number + * @param value + */ + function isNum(value) { + return typeof value === "number"; + } + + /** + * return true when window is defined + */ + function isBrowser() { + return typeof window !== 'undefined'; + } + + /** + * returns true if input is an image element + * @param i + */ + function isImage(i) { + return i instanceof HTMLImageElement; + } + + /** + * @namespace + * @description Updates the src with the size of the parent element and triggers a resize event for + * subsequent resizing. + * @param steps {number | number[]} The step size in pixels or an array of image widths in pixels. + * @return {Plugin} + * @example NOTE: The following is in React. For further examples, see the Packages tab. + * + */ + function responsive(_a) { + var _b = _a === void 0 ? {} : _a, steps = _b.steps; + return responsivePlugin.bind(null, steps); + } + /** + * @description Responsive plugin + * @param steps {number | number[]} The step size in pixels. + * @param element {HTMLImageElement} The image element + * @param responsiveImage {CloudinaryImage} + * @param htmlPluginState {HtmlPluginState} holds cleanup callbacks and event subscriptions + */ + function responsivePlugin(steps, element, responsiveImage, htmlPluginState) { + if (!isBrowser()) + return true; + if (!isImage(element)) + return; + return new Promise(function (resolve) { + htmlPluginState.cleanupCallbacks.push(function () { + window.removeEventListener("resize", resizeRef); + resolve('canceled'); + }); + // Use a tagged generic action that can be later searched and replaced. + responsiveImage.addAction(new Action().setActionTag('responsive')); + // Immediately run the resize plugin, ensuring that first render gets a responsive image. + onResize(steps, element, responsiveImage); + var resizeRef; + htmlPluginState.pluginEventSubscription.push(function () { + window.addEventListener('resize', resizeRef = lodash_debounce(function () { + onResize(steps, element, responsiveImage); + }, 100)); + }); + resolve(); + }); + } + /** + * On resize updates image src + * @param steps {number | number[]} The step size in pixels. + * | number[] A set of image sizes in pixels. + * @param element {HTMLImageElement} The image element + * @param responsiveImage {CloudinaryImage} + */ + function onResize(steps, element, responsiveImage) { + updateByContainerWidth(steps, element, responsiveImage); + element.src = responsiveImage.toURL(); + } + /** + * Updates the responsiveImage by container width. + * @param steps {number | number[]} The step size in pixels. + * | number[] A set of image sizes in pixels. + * @param element {HTMLImageElement} The image element + * @param responsiveImage {CloudinaryImage} + */ + function updateByContainerWidth(steps, element, responsiveImage) { + // Default value for responsiveImgWidth, used when no steps are passed. + var responsiveImgWidth = element.parentElement.clientWidth; + if (isNum(steps)) { + var WIDTH_INTERVALS = steps; + // We need to force the container width to be intervals of max width. + responsiveImgWidth = Math.ceil(responsiveImgWidth / WIDTH_INTERVALS) * WIDTH_INTERVALS; + } + else if (Array.isArray(steps)) { + responsiveImgWidth = steps.reduce(function (prev, curr) { + return (Math.abs(curr - responsiveImgWidth) < Math.abs(prev - responsiveImgWidth) ? curr : prev); + }); + } + responsiveImage.transformation.actions.forEach(function (action, index) { + if (action instanceof Action && action.getActionTag() === 'responsive') { + responsiveImage.transformation.actions[index] = scale(responsiveImgWidth).setActionTag('responsive'); + } + }); + } + + /** + * @namespace + * @description Loads an image once it is in a certain margin in the viewport. This includes vertical and horizontal scrolling. + * @param rootMargin {string} The root element's bounding box before the intersection test is performed. Default: 0px. + * @param threshold {number} The percentage of the image's visibility at which point the image should load. Default: 0.1 (10%). + * @return {Plugin} + * @example + * + * NOTE: The following is in React. For further examples, see the Packages tab. + * When using the plugin make sure to add dimensions, otherwise the images will load with + * the size of 0x0, meaning the images will be in the viewport and trigger the lazyload plugin. + * + * + */ + function lazyload(_a) { + 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; + return lazyloadPlugin.bind(null, rootMargin, threshold); + } + /** + * @description lazyload plugin + * @param rootMargin {string} The root element's bounding box before the intersection test is performed. Default: 0px. + * @param threshold {number} The percentage of the image's visibility at which point the image should load. Default: 0.1 (10%). + * @param element The image element. + * @param element {HTMLImageElement} The image element. + * @param cloudinaryImage {CloudinaryImage} + * @param htmlPluginState {HtmlPluginState} Holds cleanup callbacks and event subscriptions. + */ + function lazyloadPlugin(rootMargin, threshold, element, cloudinaryImage, htmlPluginState) { + if (rootMargin === void 0) { rootMargin = '0px'; } + if (threshold === void 0) { threshold = 0.1; } + // if SSR skip plugin + if (!isBrowser()) + return false; + return new Promise(function (resolve) { + var onIntersect = function () { return (resolve()); }; + var unobserve = detectIntersection(element, onIntersect, rootMargin, threshold); + htmlPluginState.cleanupCallbacks.push(function () { + unobserve(); + resolve('canceled'); + }); + }); + } + /** + * Check if IntersectionObserver is supported + * @return {boolean} true if window.IntersectionObserver is defined + */ + function isIntersectionObserverSupported() { + // Check that 'IntersectionObserver' property is defined on window + return window && 'IntersectionObserver' in window; + } + /** + * Calls onIntersect() to resolve when intersection is detected, or when + * no native lazy loading or when IntersectionObserver isn't supported. + * @param {Element} el - the element to observe + * @param {function} onIntersect - called when the given element is in view + * @param rootMargin {string} The root element's bounding box before the intersection test is performed. Default: 0px. + * @param threshold {number} The percentage of the image's visibility at which point the image should load. Default: 0.1 (10%). + */ + function detectIntersection(el, onIntersect, rootMargin, threshold) { + try { + if (!isIntersectionObserverSupported()) { + // Return if there's no need or possibility to detect intersection + onIntersect(); + return; + } + // Detect intersection with given element using IntersectionObserver + var observer_1 = new IntersectionObserver(function (entries) { + entries.forEach(function (entry) { + if (entry.isIntersecting) { + observer_1.unobserve(entry.target); + onIntersect(); + } + }); + }, { rootMargin: rootMargin, threshold: threshold }); + observer_1.observe(el); + return function () { el && observer_1.observe(el); }; + } + catch (e) { + onIntersect(); + } + } + + /** + * @namespace + * @description Appends accessibility transformations to the original image. + * @return {Plugin} + * @example NOTE: The following is in React. For further examples, see the Packages tab. + * + */ + function accessibility(_a) { + var _b = _a === void 0 ? {} : _a, _c = _b.mode, mode = _c === void 0 ? 'darkmode' : _c; + return accessibilityPlugin.bind(null, mode); + } + /** + * @description Accessibility plugin + * @param mode {accessibilityMode} The accessibility mode to use. Possible modes: 'darkmode' | 'brightmode' | 'monochrome' | 'colorblind'. Default: 'darkmode'. + * @param element {HTMLImageElement} The image element. + * @param pluginCloudinaryImage {CloudinaryImage} + * @param htmlPluginState {htmlPluginState} Holds cleanup callbacks and event subscriptions. + */ + function accessibilityPlugin(mode, element, pluginCloudinaryImage, htmlPluginState) { + if (isBrowser()) { + if (!isImage(element)) + return; + return new Promise(function (resolve) { + // resolved promise when canceled + htmlPluginState.cleanupCallbacks.push(function () { + resolve('canceled'); + }); + if (!ACCESSIBILITY_MODES[mode]) { + mode = 'darkmode'; + } + pluginCloudinaryImage.effect(ACCESSIBILITY_MODES[mode]); + resolve(); + }); + } + else { + pluginCloudinaryImage.effect(ACCESSIBILITY_MODES[mode]); + return true; + } + } + + /** + * @namespace + * @description Displays a placeholder image until the original image loads. + * @param mode {PlaceholderMode} The type of placeholder image to display. Possible modes: 'vectorize' | 'pixelate' | 'blur' | 'predominant-color'. Default: 'vectorize'. + * @return {Plugin} + * @example NOTE: The following is in React. For further examples, see the Packages tab. + * + */ + function placeholder(_a) { + var _b = _a === void 0 ? {} : _a, _c = _b.mode, mode = _c === void 0 ? 'vectorize' : _c; + return placeholderPlugin.bind(null, mode); + } + /** + * @description Placeholder plugin + * @param mode {PlaceholderMode} The type of placeholder image to display. Possible modes: 'vectorize' | 'pixelate' | 'blur' | 'predominant-color'. Default: 'vectorize'. + * @param element {HTMLImageElement} The image element. + * @param pluginCloudinaryImage {CloudinaryImage} + * @param htmlPluginState {htmlPluginState} Holds cleanup callbacks and event subscriptions. + */ + function placeholderPlugin(mode, element, pluginCloudinaryImage, htmlPluginState) { + // @ts-ignore + // If we're using an invalid mode, we default to vectorize + if (!PLACEHOLDER_IMAGE_OPTIONS[mode]) { + mode = 'vectorize'; + } + // A placeholder mode maps to an array of transformations + var PLACEHOLDER_ACTIONS = PLACEHOLDER_IMAGE_OPTIONS[mode].actions; + // Before proceeding, clone the original image + // We clone because we don't want to pollute the state of the image + // Future renders (after the placeholder is loaded) should not load placeholder transformations + var placeholderClonedImage = cloneDeep(pluginCloudinaryImage); + //appends a placeholder transformation on the clone + // @ts-ignore + PLACEHOLDER_ACTIONS.forEach(function (transformation) { + placeholderClonedImage.addAction(transformation); + }); + if (!isBrowser()) { + // in SSR, we copy the transformations of the clone to the user provided CloudinaryImage + // We return here, since we don't have HTML elements to work with. + pluginCloudinaryImage.transformation = placeholderClonedImage.transformation; + return true; + } + // Client side rendering, if an image was not provided we don't perform any action + if (!isImage(element)) + return; + // For the cloned placeholder image, we remove the responsive action. + // There's no need to load e_pixelate,w_{responsive} beacuse that image is temporary as-is + // and it just causes another image to load. + // This also means that the de-facto way to use responsive in SSR is WITH placeholder. + // This also means that the user must provide dimensions for the responsive plugin on the img tag. + placeholderClonedImage.transformation.actions.forEach(function (action, index) { + if (action instanceof Action && action.getActionTag() === 'responsive') { + delete placeholderClonedImage.transformation.actions[index]; + } + }); + // Set the SRC of the imageElement to the URL of the placeholder Image + element.src = placeholderClonedImage.toURL(); + //Fallback, if placeholder errors, load a single transparent pixel + element.onerror = function () { + element.src = singleTransparentPixel; + }; + /* + * This plugin loads two images: + * - The first image is loaded as a placeholder + * - The second image is loaded after the placeholder is loaded + * + * Placeholder image loads first. Once it loads, the promise is resolved and the + * larger image will load. Once the larger image loads, promised and plugin is resolved. + */ + return new Promise(function (resolve) { + element.onload = function () { + resolve(); + }; + }).then(function () { + return new Promise(function (resolve) { + htmlPluginState.cleanupCallbacks.push(function () { + element.src = singleTransparentPixel; + resolve('canceled'); + }); + // load image once placeholder is done loading + var largeImage = new Image(); + largeImage.src = pluginCloudinaryImage.toURL(); + largeImage.onload = function () { + resolve(); + }; + // image does not load, resolve + largeImage.onerror = function () { + resolve(); + }; + }); + }); + } + + function serverSideSrc(plugins, serverCloudinaryImage, analyticsOptions) { + var clonedServerCloudinaryImage = cloneDeep(serverCloudinaryImage); + if (plugins) { + for (var i = 0; i < plugins.length; i++) { + var response = plugins[i](null, clonedServerCloudinaryImage); + if (!response) { //lazyload + break; + } + } + } + return clonedServerCloudinaryImage.toURL(analyticsOptions ? { trackedAnalytics: analyticsOptions } : null); + } + + /** + * Cancels currently running plugins. This is called from unmount or update + * @param pluginState {HtmlPluginState} Holds cleanup callbacks and event subscriptions + */ + function cancelCurrentlyRunningPlugins(pluginState) { + pluginState.cleanupCallbacks.forEach(function (fn) { + fn(); // resolve each promise with 'canceled' + }); + } + + exports.HtmlImageLayer = HtmlImageLayer; + exports.HtmlVideoLayer = HtmlVideoLayer; + exports.accessibility = accessibility; + exports.cancelCurrentlyRunningPlugins = cancelCurrentlyRunningPlugins; + exports.isBrowser = isBrowser; + exports.lazyload = lazyload; + exports.placeholder = placeholder; + exports.responsive = responsive; + exports.serverSideSrc = serverSideSrc; + + Object.defineProperty(exports, '__esModule', { value: true }); + +})); +//# sourceMappingURL=index.umd.js.map diff --git a/packages/html/index.umd.js.map b/packages/html/index.umd.js.map new file mode 100644 index 00000000..5bc97199 --- /dev/null +++ b/packages/html/index.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.umd.js","sources":["node_modules/lodash.clonedeep/index.js","node_modules/tslib/tslib.es6.js","node_modules/@cloudinary/transformation-builder-sdk/internal/qualifier/QualifierValue.js","node_modules/@cloudinary/transformation-builder-sdk/internal/utils/unsupportedError.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/qualifierToJson.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/QualifierModel.js","node_modules/@cloudinary/transformation-builder-sdk/internal/qualifier/Qualifier.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/flag/FlagQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/internal/utils/dataStructureUtils.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/actionToJson.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/ActionModel.js","node_modules/@cloudinary/transformation-builder-sdk/internal/Action.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/region/NamedRegion.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/region/CustomRegion.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/region.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/blur/Blur.js","node_modules/@cloudinary/transformation-builder-sdk/internal/utils/objectFlip.js","node_modules/@cloudinary/transformation-builder-sdk/internal/internalConstants.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/EffectActions/SimpleEffectAction.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/EffectActions/LeveledEffectAction.js","node_modules/@cloudinary/transformation-builder-sdk/internal/utils/prepareColor.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/Vectorize.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/EffectActions/EffectActionWithLevel.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/AssistColorBlind.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/Colorize.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect/pixelate/Pixelate.js","node_modules/@cloudinary/transformation-builder-sdk/actions/effect.js","node_modules/@cloudinary/transformation-builder-sdk/actions/background/actions/BackgroundColor.js","node_modules/@cloudinary/transformation-builder-sdk/internal/RawAction.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/IErrorObject.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/flag.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/format/FormatQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/actions/delivery/DeliveryAction.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/progressive.js","node_modules/@cloudinary/transformation-builder-sdk/actions/delivery/DeliveryFormatAction.js","node_modules/@cloudinary/transformation-builder-sdk/transformation/Transformation.js","node_modules/@cloudinary/transformation-builder-sdk/internal/utils/toFloatAsString.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/aspectRatio/AspectRatioQualifierValue.js","node_modules/@cloudinary/transformation-builder-sdk/actions/resize/ResizeSimpleAction.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/gravity/GravityQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/gravity/autoGravity/AutoGravity.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/gravity/focusOnGravity/FocusOnGravity.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/gravity/compassGravity/CompassGravity.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/gravity.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/gravity/qualifiers/focusOn/FocusOnValue.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/focusOn.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/createGravityModel.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/autoFocus.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/gravity/qualifiers/compass/CompassQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/createGravityFromModel.js","node_modules/@cloudinary/transformation-builder-sdk/actions/resize/ResizeAdvancedAction.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/base/BackgroundQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/BlurredBackgroundAction.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/base/BaseCommonBackground.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/auto/BackgroundAutoBorderQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/base/BaseGradientBackground.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/gradient/BackgroundBorderGradientQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/gradient/BackgroundPredominantGradientQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background/shared/auto/BackgroundAutoPredominantQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/createBackgroundModel.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/format.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/background.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/createBackgroundFromModel.js","node_modules/@cloudinary/transformation-builder-sdk/actions/resize/ResizePadAction.js","node_modules/@cloudinary/transformation-builder-sdk/actions/resize/ResizeScaleAction.js","node_modules/@cloudinary/transformation-builder-sdk/actions/resize/ResizeCropAction.js","node_modules/@cloudinary/transformation-builder-sdk/actions/resize/ResizeFillAction.js","node_modules/@cloudinary/transformation-builder-sdk/actions/resize.js","node_modules/@cloudinary/transformation-builder-sdk/actions/delivery/DeliveryQualityAction.js","node_modules/@cloudinary/transformation-builder-sdk/actions/delivery.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/compass.js","node_modules/lodash.debounce/index.js"],"sourcesContent":["/**\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 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 global == 'object' && global && global.Object === Object && global;\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 = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == '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","/*! *****************************************************************************\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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\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\nexport var __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\nexport function __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}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __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\nexport function __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}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\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}\nexport { QualifierValue };\n","class 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}\nexport { UnsupportedError, createUnsupportedError };\n","import { createUnsupportedError } from \"../utils/unsupportedError.js\";\n/**\n * Returns the action's model\n */\nexport function qualifierToJson() {\n return this._qualifierModel || { error: createUnsupportedError(`unsupported qualifier ${this.constructor.name}`) };\n}\n","import { qualifierToJson } from \"./qualifierToJson.js\";\nexport class QualifierModel {\n constructor() {\n this._qualifierModel = {};\n }\n toJson() {\n return qualifierToJson.apply(this);\n }\n}\n","import { QualifierValue } from './QualifierValue.js';\nimport { QualifierModel } from '../models/QualifierModel.js';\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}\nexport { Qualifier };\n","import { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\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}\nexport { FlagQualifier };\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 * Checks if `value` is a string.\n * @private\n * @param {*} value The value to check.\n * @return {boolean} `true` if `value` is a string, else `false`.\n */\nfunction isString(value) {\n return (typeof value === 'string' || value instanceof String);\n}\nexport { isString, mapToSortedArray };\n","import { createUnsupportedError } from \"../utils/unsupportedError.js\";\n/**\n * Returns the action's model\n */\nexport function 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","import { actionToJson } from \"./actionToJson.js\";\nexport class ActionModel {\n constructor() {\n this._actionModel = {};\n }\n toJson() {\n return actionToJson.apply(this);\n }\n}\n","import { FlagQualifier } from \"../qualifiers/flag/FlagQualifier.js\";\nimport { Qualifier } from \"./qualifier/Qualifier.js\";\nimport { mapToSortedArray } from \"./utils/dataStructureUtils.js\";\nimport { ActionModel } from \"./models/ActionModel.js\";\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}\nexport { Action };\n","import { Action } from \"../../internal/Action.js\";\n/**\n * @memberOf Qualifiers.Region\n */\nclass NamedRegion extends Action {\n constructor(type) {\n super();\n this.regionType = type;\n }\n}\nexport { NamedRegion };\n","import { NamedRegion } from \"./NamedRegion.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\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}\nexport { CustomRegion };\n","import { CustomRegion } from \"./region/CustomRegion.js\";\nimport { NamedRegion } from \"./region/NamedRegion.js\";\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 * @summary qualifier\n * @memberOf Qualifiers.Region\n * @return {Qualifiers.Region.NamedRegion}\n */\nfunction ocr() {\n return new NamedRegion('ocr_text');\n}\n/**\n * @description Contains functions to select the type of region, used with Effect.blur() and Effect.pixelate().\n * See also: {@link Actions.Effect.BlurAction|Blur Action}\n * See also: {@link Actions.Effect.Pixelate|Blur Action}\n * See also: {@link Actions.Effect|Possible effects}\n * @namespace Region\n * @memberOf Qualifiers\n */\nconst Region = { ocr, faces, custom };\nexport { Region, ocr, faces, custom };\n","import { Qualifier } from \"../../../internal/qualifier/Qualifier.js\";\nimport { Action } from \"../../../internal/Action.js\";\nimport { custom, faces } from \"../../../qualifiers/region.js\";\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}\nexport { BlurAction };\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}\nexport { objectFlip };\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 */\nimport { objectFlip } from \"./utils/objectFlip.js\";\nexport const CONDITIONAL_OPERATORS = {\n \"=\": \"eq\",\n \"!=\": \"ne\",\n \"<\": \"lt\",\n \">\": \"gt\",\n \"<=\": \"lte\",\n \">=\": \"gte\",\n \"&&\": \"and\",\n \"||\": \"or\",\n \"*\": \"mul\",\n \"/\": \"div\",\n \"+\": \"add\",\n \"-\": \"sub\",\n \"^\": \"pow\"\n};\nexport const RESERVED_NAMES = {\n \"aspect_ratio\": \"ar\",\n \"aspectRatio\": \"ar\",\n \"current_page\": \"cp\",\n \"currentPage\": \"cp\",\n \"duration\": \"du\",\n \"face_count\": \"fc\",\n \"faceCount\": \"fc\",\n \"height\": \"h\",\n \"initial_aspect_ratio\": \"iar\",\n \"initial_height\": \"ih\",\n \"initial_width\": \"iw\",\n \"initialAspectRatio\": \"iar\",\n \"initialHeight\": \"ih\",\n \"initialWidth\": \"iw\",\n \"initial_duration\": \"idu\",\n \"initialDuration\": \"idu\",\n \"page_count\": \"pc\",\n \"page_x\": \"px\",\n \"page_y\": \"py\",\n \"pageCount\": \"pc\",\n \"pageX\": \"px\",\n \"pageY\": \"py\",\n \"tags\": \"tags\",\n \"width\": \"w\",\n \"trimmed_aspect_ratio\": \"tar\",\n \"current_public_id\": \"cpi\",\n \"initial_density\": \"idn\",\n \"page_names\": \"pgnames\"\n};\nexport const 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};\nexport const 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};\nexport const 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};\nexport const 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};\nexport const 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};\nexport const CHROMA_VALUE_TO_CHROMA_MODEL_ENUM = {\n 444: \"CHROMA_444\",\n 420: \"CHROMA_420\"\n};\nexport const 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};\nexport const ACTION_TYPE_TO_BLEND_MODE_MAP = {\n 'antiRemoval': 'anti_removal'\n};\nexport const CHROMA_MODEL_ENUM_TO_CHROMA_VALUE = objectFlip(CHROMA_VALUE_TO_CHROMA_MODEL_ENUM);\nexport const COLOR_SPACE_MODE_TO_COLOR_SPACE_MODEL_MODE_MAP = objectFlip(COLOR_SPACE_MODEL_MODE_TO_COLOR_SPACE_MODE_MAP);\nexport const CROP_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_CROP_MODE_MAP);\nexport const DELIVERY_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_DELIVERY_MODE_MAP);\nexport const EFFECT_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_EFFECT_MODE_MAP);\nexport const QUALITY_MODE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_QUALITY_MODE_MAP);\nexport const STREAMING_PROFILE_TO_ACTION_TYPE_MAP = objectFlip(ACTION_TYPE_TO_STREAMING_PROFILE_MODE_MAP);\n","import { Action } from \"../../../internal/Action.js\";\nimport { QualifierValue } from \"../../../internal/qualifier/QualifierValue.js\";\nimport { Qualifier } from \"../../../internal/qualifier/Qualifier.js\";\nimport { ACTION_TYPE_TO_EFFECT_MODE_MAP, EFFECT_MODE_TO_ACTION_TYPE_MAP } from \"../../../internal/internalConstants.js\";\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}\nexport { SimpleEffectAction };\n","import { SimpleEffectAction } from \"./SimpleEffectAction.js\";\nimport { EFFECT_MODE_TO_ACTION_TYPE_MAP } from \"../../../internal/internalConstants.js\";\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}\nexport { LeveledEffectAction };\n","/**\n * Returns RGB or Color\n * @private\n * @param color\n */\nexport function prepareColor(color) {\n if (color) {\n return color.match(/^#/) ? `rgb:${color.substr(1)}` : color;\n }\n else {\n return color;\n }\n}\n","import { Action } from \"../../internal/Action.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\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}\nexport { VectorizeEffectAction };\n","import { LeveledEffectAction } from \"./LeveledEffectAction.js\";\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}\nexport { EffectActionWithLevel };\n","import { Action } from \"../../internal/Action.js\";\nimport { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\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}\nexport { AssistColorBlindEffectAction };\n","import { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { prepareColor } from \"../../internal/utils/prepareColor.js\";\nimport { EffectActionWithLevel } from \"./EffectActions/EffectActionWithLevel.js\";\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}\nexport { ColorizeEffectAction };\n","import { Qualifier } from \"../../../internal/qualifier/Qualifier.js\";\nimport { Action } from \"../../../internal/Action.js\";\nimport { custom, faces } from \"../../../qualifiers/region.js\";\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}\nexport { Pixelate };\n","import { BlurAction } from \"./effect/blur/Blur.js\";\nimport { AccelerationEffectAction } from \"./effect/leveled/Accelerate.js\";\nimport { LoopEffectAction } from \"./effect/leveled/Loop.js\";\nimport { CartoonifyEffect } from \"./effect/Cartoonify.js\";\nimport { EffectOutline } from \"./effect/Outline.js\";\nimport { SimpleEffectAction } from \"./effect/EffectActions/SimpleEffectAction.js\";\nimport { MakeTransparentEffectAction } from \"./effect/leveled/MakeTransparent.js\";\nimport { VectorizeEffectAction } from \"./effect/Vectorize.js\";\nimport { SimulateColorBlindEffectAction } from \"./effect/SimulateColorBlind.js\";\nimport { EffectActionWithLevel } from \"./effect/EffectActions/EffectActionWithLevel.js\";\nimport { AssistColorBlindEffectAction } from \"./effect/AssistColorBlind.js\";\nimport { GradientFadeEffectAction } from \"./effect/GradientFade.js\";\nimport { FadeOutEffectAction } from \"./effect/leveled/FadeOut.js\";\nimport { ColorizeEffectAction } from \"./effect/Colorize.js\";\nimport { ShadowEffectAction } from \"./effect/Shadow.js\";\nimport { StyleTransfer } from \"./effect/StyleTransfer.js\";\nimport { DitherEffectAction } from \"./effect/Dither.js\";\nimport { DeshakeEffectAction } from \"./effect/leveled/Deshake.js\";\nimport { Pixelate } from \"./effect/pixelate/Pixelate.js\";\nimport { EffectActionWithStrength } from \"./effect/EffectActions/EffectActionWithStrength.js\";\nimport { BlackwhiteEffectAction } from \"./effect/leveled/Blackwhite.js\";\nimport { FadeInEffectAction } from \"./effect/leveled/FadeIn.js\";\nimport { RemoveBackgroundAction } from \"./effect/RemoveBackgroundAction.js\";\nimport { ThemeEffect } from \"./effect/Theme.js\";\nimport { BackgroundRemoval } from \"./effect/BackgroundRemoval.js\";\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 Changes the color scheme of the image to sepia.\n * @memberOf Actions.Effect\n * @param {number} level The level of sepia to apply. (Range: 1 to 100, Server default: 80)\n * @return {Actions.Effect.EffectActionWithLevel}\n */\nfunction sepia(level) {\n return new EffectActionWithLevel('sepia', level);\n}\n/**\n * @summary action\n * @description Applies a shadow filter to the asset.\n * @memberOf Actions.Effect\n * @param shadowLevel\n * @return {Actions.Effect.ShadowEffectAction}\n */\nfunction shadow(shadowLevel) {\n return new ShadowEffectAction('shadow', shadowLevel);\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 Applies an oilPaint filter to the asset.\n * @memberOf Actions.Effect\n * @param {number} oilPaintLevel The strength of the effect. (Range: 0 to 100, Server default: 30)\n * @return {Actions.Effect.EffectActionWithStrength}\n */\nfunction oilPaint(oilPaintLevel) {\n return new EffectActionWithStrength('oil_paint', oilPaintLevel);\n}\n/**\n * @summary action\n * @description Applies an artistic filter to the asset.\n * @memberOf Actions.Effect\n * @param {ArtisticFilterType | string} artisticFilterType\n * @return {Actions.Effect.SimpleEffectAction}\n */\nfunction artisticFilter(artisticFilterType) {\n return new SimpleEffectAction('art', artisticFilterType);\n}\n/**\n * @summary action\n * @description Applies a cartoonify effect to the asset.\n * @memberOf Actions.Effect\n * @param cartoonifyLevel The thickness of the lines. (Range: 0 to 100, Server default: 50)\n * @return {Actions.Effect.CartoonifyEffect}\n */\nfunction cartoonify(cartoonifyLevel) {\n return new CartoonifyEffect('cartoonify', cartoonifyLevel);\n}\n/**\n * @summary action\n * @description Adds an outline to a transparent image. For examples, see the Image Transformations guide.\n * @memberOf Actions.Effect\n * @return {Actions.Effect.EffectOutline}\n */\nfunction outline() {\n return new EffectOutline();\n}\n/**\n * @summary action\n * @description Applies a complex deep learning neural network algorithm that extracts artistic styles from a source image and applies them to the content of a target photograph.
\n * Learn more: {@link https://cloudinary.com/documentation/neural_artwork_style_transfer_addon|Neural Artwork Style Transfer}\n * @memberOf Actions.Effect\n * @param {ImageSource} imageSource `import {image} from '@cloudinary/url-gen/qualifiers/sources`\n * @return {Actions.Effect.StyleTransfer}\n */\nfunction styleTransfer(imageSource) {\n return new StyleTransfer(imageSource);\n}\n/**\n * @summary action\n * @description\n * Causes a video clip to play forwards and then backwards.\n * Use in conjunction with trimming parameters ('duration', 'start_offset', or 'end_offset') and the 'loop' effect to deliver a classic (short, repeating) boomerang clip.
\n * For details and examples, see 'Create a boomerang video clip' in the Video Transformations guide.\n * @memberOf Actions.Effect\n * @return {Actions.Effect.SimpleEffectAction}\n */\nfunction boomerang() {\n return new SimpleEffectAction('boomerang');\n}\n/**\n * @summary action\n * @description\n * Removes red eyes with the Advanced Facial Attribute Detection add-on.\n * For details, see the Advanced Facial Attribute Detection add-on documentation.\n * @memberOf Actions.Effect\n * @return {Actions.Effect.SimpleEffectAction}\n */\nfunction advancedRedEye() {\n return new SimpleEffectAction('adv_redeye');\n}\n/**\n * @summary action\n * @description Converts the image to black and white.\n * @memberOf Actions.Effect\n * @param {number | string} level The balance between black (100) and white (0). (Range: 0 to 100, Server default: 50)\n * @return {Actions.Effect.BlackwhiteEffectAction}\n */\nfunction blackwhite(level) {\n return new BlackwhiteEffectAction('blackwhite', level);\n}\n/**\n * @summary action\n * @description Negates the image colors (negative).\n * @memberOf Actions.Effect\n * @return {Actions.Effect.SimpleEffectAction}\n */\nfunction negate() {\n return new SimpleEffectAction('negate');\n}\n/**\n * @summary action\n * @description Removes red eyes in the image.\n * @memberOf Actions.Effect\n * @return {Actions.Effect.SimpleEffectAction}\n */\nfunction redEye() {\n return new SimpleEffectAction('redeye');\n}\n/**\n * @summary action\n * @description Plays the video or audio file in reverse.\n * @memberOf Actions.Effect\n * @return {Actions.Effect.SimpleEffectAction}\n */\nfunction reverse() {\n return new SimpleEffectAction('reverse');\n}\n/**\n * @summary action\n * @description Changes the speed of the video playback.\n * @memberOf Actions.Effect\n * @param {number} speedIncreasePercent The percentage change of speed. Positive numbers speed up the playback, negative numbers slow down the playback (Range: -50 to 100, Server default: 0)\n * @return {Actions.Effect.AccelerationEffectAction}\n */\nfunction accelerate(speedIncreasePercent) {\n return new AccelerationEffectAction(speedIncreasePercent);\n}\n/**\n * @summary action\n * @description\n * Fade in at the beginning of the video.\n * For details and examples, see 'Fade in and out' in the Video Transformations guide.\n * @memberOf Actions.Effect\n * @param {number} fadeLength The time in ms for the fade to occur. (Server default: 2000)\n * @return {Actions.Effect.FadeInEffectAction}\n */\nfunction fadeIn(fadeLength) {\n return new FadeInEffectAction(fadeLength);\n}\n/**\n * @summary action\n * @description\n * Fade out at the end of the video.\n * For details and examples, see 'Fade in and out' in the Video Transformations guide.\n * @memberOf Actions.Effect\n * @param {number} fadeLength The time in ms for the fade to occur. (Server default: 2000)\n * @return {Actions.Effect.FadeoutEffectAction}\n */\nfunction fadeOut(fadeLength) {\n return new FadeOutEffectAction(fadeLength);\n}\n/**\n * @summary action\n * @description\n * Delivers a video or animated GIF that contains additional loops of the video/GIF.\n * The total number of iterations is the number of additional loops plus one.
\n * For animated GIFs only, you can also specify the loop effect without a numeric value to instruct it to loop the GIF infinitely.\n * @memberOf Actions.Effect\n * @param {number} additionalLoops The additional number of times to play the video or animated GIF.\n * @return {Actions.Effect.LoopEffectAction}\n */\nfunction loop(additionalLoops) {\n return new LoopEffectAction('loop', additionalLoops);\n}\n/**\n * @summary action\n * @description\n * Makes the background of the image transparent (or solid white for formats that do not support transparency).\n * The background is determined as all pixels that resemble the pixels on the edges of the image.\n *\n * @memberOf Actions.Effect\n * @param {number} tolerance The tolerance used to accommodate variance in the background color. (Range: 0 to 100, Server default: 10)\n * @return {Actions.Effect.MakeTransparentEffectAction}\n */\nfunction makeTransparent(tolerance) {\n return new MakeTransparentEffectAction('make_transparent', tolerance);\n}\n/**\n * @summary action\n * @description Adds visual noise to the video, visible as a random flicker of \"dots\" or \"snow\".\n * @memberOf Actions.Effect\n * @param {number} percentage The percent of noise to apply. (Range: 0 to 100 Server default: 0)\n * @return {Actions.Effect.EffectActionWithLevel}\n */\nfunction noise(percentage) {\n return new EffectActionWithLevel('noise', percentage);\n}\n/**\n * @summary action\n * @description Applies a vignette effect.\n * @memberOf Actions.Effect\n * @param {number} strength The strength of the vignette. (Range: 0 to 100, Server default: 20)\n * @return {Actions.Effect.EffectActionWithStrength}\n */\nfunction vignette(strength) {\n return new EffectActionWithStrength('vignette', strength);\n}\n/**\n * @summary action\n * @description\n * Applies an ordered dither filter to the image.\n * Use the constants defined in {@link Qualifiers.Dither|@cloudinary/url-gen/qualifiers/dither} for ditherType.\n * @memberOf Actions.Effect\n * @param {Qualifiers.Dither} ditherType - The dither type applied to the image\n * @return {Actions.Effect.DitherEffectAction}\n */\nfunction dither(ditherType) {\n return new DitherEffectAction('ordered_dither', ditherType);\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 a gradient fade effect from one edge of the image.\n * Use .x() or .y() to indicate from which edge to fade and how much of the image should be faded.\n * Values of x and y can be specified as a percentage (Range: 0.0 to 1.0), or in pixels (integer values).
\n * Positive values fade from the top (y) or left (x). Negative values fade from the bottom (y) or right (x).
\n * By default, the gradient is applied to the top 50% of the image (y = 0.5).
\n * Only one direction can be specified but the fade can be applied symmetrically using the mode parameter.
\n * To apply different amounts of fade to multiple edges, use chained fade effects.\n *\n * @memberOf Actions.Effect\n * @return {Actions.Effect.GradientFadeEffectAction}\n */\nfunction gradientFade() {\n return new GradientFadeEffectAction();\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\n * Simulates the way an image would appear to someone with the specified color blind condition.
\n * For a list of supported color blind conditions see {@link Qualifiers.SimulateColorBlindValues| types of color blindness} for possible values\n * @memberOf Actions.Effect\n * @return {Actions.Effect.SimulateColorBlindEffectAction}\n */\nfunction simulateColorBlind() {\n return new SimulateColorBlindEffectAction();\n}\n/**\n * @summary action\n * @description Removes small motion shifts from the video. with a maximum extent of movement in the horizontal and vertical direction of 32 pixels\n * @memberOf Actions.Effect\n * @return {Actions.Effect.DeshakeEffectAction}\n */\nfunction deshake(pixels) {\n return new DeshakeEffectAction('deshake', pixels);\n}\n/**\n * @summary action\n * @description Supports the concatenation of videos with a custom transition by including a transition video as an\n * additional layer and specifying the transition effect\n * @memberOf Actions.Effect\n * @return {Actions.Effect.SimpleEffectAction}\n */\nfunction transition() {\n return new SimpleEffectAction('transition');\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 * @summary action\n * @description Makes the background of an image transparent (or solid white for JPGs).
\n * Use when the background is a uniform color.\n * {@link https://cloudinary.com/documentation/transformation_reference#e_bgremoval|Background Removal}\n *\n * @memberOf Actions.Effect\n * @return {Actions.Effect.RemoveBackgroundAction}\n */\nfunction removeBackground() {\n return new RemoveBackgroundAction();\n}\n/**\n * @summary action\n * @description Uses the Cloudinary AI Background Removal add-on to make the background of an image transparent.
\n * When combined with other transformations, this effect must be specified in the first component.\n * {@link https://cloudinary.com/documentation/transformation_reference#e_background_removal|Background Removal}\n *\n * @memberOf Actions.Effect\n * @return {Actions.Effect.BackgroundRemoval}\n */\nfunction backgroundRemoval() {\n return new BackgroundRemoval();\n}\n/**\n *\n * @description Changes the main background color to the one specified, as if a 'theme change' was applied (e.g. dark mode vs light mode).\n * @param {SystemColors} color\n * @return {Actions.Effect.ThemeEffect}\n */\nfunction theme(color) {\n return new ThemeEffect(color);\n}\n/**\n * @description Defines effects that you can apply to transform your assets.\n * @memberOf Actions\n * @namespace Effect\n * @example\n * An extreme example of using many effects on the same asset\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * // Import everything, or just the action you need for tree-shaking purposes\n * import {Effect, sepia} from \"@cloudinary/url-gen/actions/effect\";\n * import {ArtisticFilter, alDente} from \"../../../src/qualifiers/artisticFilter\";\n * import {ShakeStrength, pixels16} from \"../../../src/qualifiers/shakeStrength\";\n *\n * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}});\n * const image = yourCldInstance.image('woman');\n *\n * image.effect(Effect.advancedRedEye())\n * .effect(Effect.accelerate())\n * .effect(Effect.accelerate(100))\n * .effect(Effect.accelerate().rate(5))\n * .effect(Effect.boomerang())\n * .effect(Effect.blackwhite())\n * .effect(Effect.blackwhite(10))\n * .effect(Effect.blackwhite().threshold(20))\n * .effect(Effect.fadeIn(100))\n * .effect(Effect.fadeIn().duration(5))\n * .effect(Effect.fadeOut(100))\n * .effect(Effect.fadeOut().duration(5))\n * .effect(Effect.grayscale())\n * .effect(Effect.loop())\n * .effect(Effect.loop(100))\n * .effect(Effect.loop().additionalIterations(5))\n * .effect(Effect.makeTransparent())\n * .effect(Effect.makeTransparent(100))\n * .effect(Effect.makeTransparent().tolerance(5))\n * .effect(Effect.makeTransparent().tolerance(5).colorToReplace('red'))\n * .effect(Effect.noise())\n * .effect(Effect.noise(100))\n * .effect(Effect.noise().level(5))\n * .effect(Effect.negate())\n * .effect(Effect.reverse())\n * .effect(Effect.redEye())\n * .effect(Effect.sepia())\n * .effect(Effect.sepia(100))\n * .effect(Effect.sepia().level(5))\n * .effect(Effect.vignette())\n * .effect(Effect.vignette(100))\n * .effect(Effect.vignette().strength(5))\n * .effect(Effect.deshake())\n * .effect(Effect.deshake(10))\n * .effect(Effect.artisticFilter(alDente())\n * .effect(Effect.deshake().shakeStrength(pixels16()))\n * .effect(Effect.backgroundRemoval().fineEdges(true).hints([ForegroundObject.DOG, ForegroundObject.CAT])\n */\nconst Effect = {\n pixelate: pixelate,\n deshake: deshake,\n boomerang: boomerang,\n advancedRedEye: advancedRedEye,\n blackwhite,\n negate: negate,\n redEye: redEye,\n reverse: reverse,\n accelerate: accelerate,\n fadeIn: fadeIn,\n fadeOut: fadeOut,\n loop: loop,\n makeTransparent: makeTransparent,\n noise: noise,\n vignette: vignette,\n blur: blur,\n grayscale: grayscale,\n sepia: sepia,\n shadow: shadow,\n colorize: colorize,\n oilPaint: oilPaint,\n artisticFilter: artisticFilter,\n cartoonify: cartoonify,\n outline: outline,\n styleTransfer: styleTransfer,\n gradientFade: gradientFade,\n vectorize: vectorize,\n assistColorBlind: assistColorBlind,\n simulateColorBlind: simulateColorBlind,\n transition: transition,\n dither: dither,\n removeBackground,\n backgroundRemoval,\n theme\n};\nexport { Effect, pixelate, deshake, boomerang, advancedRedEye, blackwhite, negate, redEye, reverse, accelerate, fadeIn, fadeOut, loop, makeTransparent, noise, vignette, blur, grayscale, sepia, shadow, colorize, oilPaint, artisticFilter, cartoonify, outline, styleTransfer, gradientFade, vectorize, assistColorBlind, simulateColorBlind, transition, dither, removeBackground, backgroundRemoval, theme };\n","import { Action } from \"../../../internal/Action.js\";\nimport { QualifierValue } from \"../../../internal/qualifier/QualifierValue.js\";\nimport { Qualifier } from \"../../../internal/qualifier/Qualifier.js\";\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}\nexport { BackgroundColor };\n","import { createUnsupportedError } from \"./utils/unsupportedError.js\";\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}\nexport { RawAction };\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}\nexport { isErrorObject };\n","/**\n * @description Defines flags that you can use to alter the default transformation behavior.\n * @namespace Flag\n * @memberOf Qualifiers\n */\nimport { FlagQualifier } from \"./flag/FlagQualifier.js\";\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Used when delivering a video file as an image format that supports animation, such as animated WebP.\n * Plays all frames rather than just delivering the first one as a static image.\n * Use this flag in addition to the flag or parameter controlling the delivery format,\n * for example f_auto or fl_awebp.\n\n * Note: When delivering a video in GIF format, it is delivered as an animated GIF by default and this flag is not\n * necessary. To deliver a single frame of a video in GIF format, use the page parameter.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction animated() {\n return new FlagQualifier('animated');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description When converting animated images to WebP format, generate an animated WebP from all the frames in the\n * original\n * animated file instead of only from the first still frame.\n *\n * Note that animated WebPs are not supported in all browsers and versions.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction animatedWebP() {\n return new FlagQualifier('awebp');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description When used together with automatic quality (q_auto):\n * allow switching to PNG8 encoding if the quality algorithm decides that it's more efficient.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction anyFormat() {\n return new FlagQualifier('any_format');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description When converting animated images to PNG format, generates an animated PNG from all the frames in the\n * original\n * animated file instead of only from the first still frame.\n *\n * Note that animated PNGs are not supported in all browsers and versions.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction animatedPng() {\n return new FlagQualifier('apng');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Trims pixels according to a clipping path included in the original image\n * (e.g., manually created using PhotoShop).\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction clip() {\n return new FlagQualifier('clip');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Trims pixels according to a clipping path included in the original image (e.g., manually created\n * using PhotoShop)\n * using an evenodd clipping rule.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction clipEvenOdd() {\n return new FlagQualifier('clip_evenodd');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Instructs Cloudinary to clear all image meta-data (IPTC, Exif and XMP) while applying an incoming\n * transformation.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction forceStrip() {\n return new FlagQualifier('force_strip');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Allows custom flag\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction custom(value) {\n return new FlagQualifier(value);\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Adds ICC color space metadata to the image, even when the original image doesn't contain any ICC data.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction forceIcc() {\n return new FlagQualifier('force_icc');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Delivers the image as an attachment.\n * @param {string} filename The attachment's filename\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction attachment(filename) {\n return new FlagQualifier('attachment', filename);\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Returns metadata of the input asset and of the transformed output asset in JSON instead of the\n * transformed image.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction getInfo() {\n return new FlagQualifier('getinfo');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Deliver an HLS adaptive bitrate streaming file as HLS v3 instead of the default version (HLS v4).\n * Delivering in this format requires a private CDN configuration.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction hlsv3() {\n return new FlagQualifier('hlsv3');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Sets the cache-control to immutable for the asset.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction immutableCache() {\n return new FlagQualifier('immutable_cache');\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 Keeps the copyright related fields when stripping meta-data.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction keepAttribution() {\n return new FlagQualifier('keep_attribution');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * Keep the Display Aspect Ratio metadata of the uploaded video (if it’s different from the current video\n * dimensions).\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction keepDar() {\n return new FlagQualifier('keep_dar');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Keeps all meta-data.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction keepIptc() {\n return new FlagQualifier('keep_iptc');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Applies all chained transformations, until a transformation component that includes this flag, on the last added\n * overlay or underlay instead of applying on the containing image.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction layerApply() {\n return new FlagQualifier('layer_apply');\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 Convert the audio channel to mono\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction mono() {\n return new FlagQualifier('mono');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Used internally by Position within an Overlay, this flag will tile the overlay across your image.\n *\n * Learn more: {@link https://cloudinary.com/documentation/transformation_reference#fl_no_overflow|Overflow in overlays}\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction noOverflow() {\n return new FlagQualifier('no_overflow');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Don't stream a video that is currently being generated on the fly. Wait until the video is fully generated.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction noStream() {\n return new FlagQualifier('no_stream');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Generate PNG images in the png24 format.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction png24() {\n return new FlagQualifier('png24');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Generate PNG images in the png32 format.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction png32() {\n return new FlagQualifier('png32');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Generate PNG images in the PNG8 format.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction png8() {\n return new FlagQualifier('png8');\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 Reduces the image to one flat pixelated layer (as opposed to the default vector based graphic) in\n * order to enable\n * PDF resizing and overlay manipulations.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction rasterize() {\n return new FlagQualifier('rasterize');\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 * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Instructs Cloudinary to run a sanitizer on the image (relevant only for the SVG format).\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction sanitize() {\n return new FlagQualifier('sanitize');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Splices the video stipulated as an overlay on to the end of the container video instead of adding it as an\n * overlay.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction splice() {\n return new FlagQualifier('splice');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Instructs Cloudinary to clear all ICC color profile data included with the image.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction stripProfile() {\n return new FlagQualifier('strip_profile');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description If the requested video transformation has already been generated, this flag works identically to\n * Flag::attachment.\n *\n * However, if the video transformation is being requested for the first time, this flag causes the video download\n * to begin immediately, streaming it as a fragmented video file.\n *\n * In contrast, if the regular fl_attachment flag is used when a user requests a new video transformation,\n * the download will begin only after the complete transformed video has been generated.\n *\n * Most standard video players successfully play fragmented video files without issue.\n *\n * @param {string} filename The attachment's filename\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction streamingAttachment(filename) {\n return new FlagQualifier('streaming_attachment', filename);\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Generates TIFF images using LZW compression and in the TIFF8 format.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction tiff8Lzw() {\n return new FlagQualifier('tiff8_lzw');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Used internally by Position within an Overlay, this flag will tile the overlay across your image.\n *\n * Learn more: {@link https://cloudinary.com/documentation/layers#automatic_tiling|Tiling overlay}\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction tiled() {\n return new FlagQualifier('tiled');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Truncate (trim) a video file based on the start time defined in the metadata (relevant only where the metadata\n * includes a directive to play only a section of the video).\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction truncateTS() {\n return new FlagQualifier('truncate_ts');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description Create a waveform image (in the format specified by the file extension) from the audio or video file.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction waveform() {\n return new FlagQualifier('waveform');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Flag\n * @description A qualifier that ensures that an alpha channel is not applied to a TIFF image if it is a mask channel.\n * @return {Qualifiers.Flag.FlagQualifier}\n */\nfunction ignoreMaskChannels() {\n return new FlagQualifier('ignore_mask_channels');\n}\nconst Flag = {\n animated, anyFormat, animatedPng, animatedWebP,\n clipEvenOdd, lossy, preserveTransparency, png8, png24, png32, progressive, rasterize,\n sanitize, stripProfile, tiff8Lzw, attachment, forceIcc, forceStrip, getInfo, immutableCache,\n keepAttribution, keepIptc, custom, streamingAttachment, hlsv3, keepDar, noStream, mono,\n layerApply, relative, regionRelative, splice, truncateTS, waveform, ignoreInitialAspectRatio, clip,\n tiled, noOverflow, ignoreMaskChannels\n};\nexport { Flag, animated, anyFormat, animatedPng, animatedWebP, clipEvenOdd, lossy, preserveTransparency, png8, png24, png32, progressive, rasterize, sanitize, stripProfile, tiff8Lzw, attachment, forceIcc, forceStrip, getInfo, immutableCache, keepAttribution, keepIptc, custom, streamingAttachment, hlsv3, keepDar, noStream, mono, layerApply, relative, regionRelative, splice, truncateTS, waveform, ignoreInitialAspectRatio, clip, tiled, noOverflow, ignoreMaskChannels };\n","import { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\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}\nexport { FormatQualifier };\n","import { Action } from \"../../internal/Action.js\";\nimport { FormatQualifier } from \"../../qualifiers/format/FormatQualifier.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { DELIVERY_MODE_TO_ACTION_TYPE_MAP } from \"../../internal/internalConstants.js\";\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}\nexport { DeliveryAction };\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 */\nimport { FlagQualifier } from \"./flag/FlagQualifier.js\";\nclass ProgressiveQualifier extends FlagQualifier {\n constructor(mode) {\n super('progressive', mode);\n }\n}\n/**\n * @memberOf Qualifiers.Progressive\n */\nfunction none() {\n return new ProgressiveQualifier('none');\n}\n/**\n * @memberOf Qualifiers.Progressive\n */\nfunction semi() {\n return new ProgressiveQualifier('semi');\n}\n/**\n * @memberOf Qualifiers.Progressive\n */\nfunction steep() {\n return new ProgressiveQualifier('steep');\n}\n/**\n * @memberOf Qualifiers.Progressive\n */\nfunction progressive() {\n return new ProgressiveQualifier();\n}\nconst Progressive = {\n semi,\n none,\n steep,\n progressive,\n ProgressiveQualifier\n};\nexport { Progressive, semi, none, steep, progressive, ProgressiveQualifier };\n","import { lossy, preserveTransparency, progressive } from \"../../qualifiers/flag.js\";\nimport { DeliveryAction } from \"./DeliveryAction.js\";\nimport { ProgressiveQualifier } from \"../../qualifiers/progressive.js\";\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}\nexport { DeliveryFormatAction };\n","import { Action } from \"../internal/Action.js\";\nimport { BackgroundColor } from \"../actions/background/actions/BackgroundColor.js\";\nimport { prepareColor } from \"../internal/utils/prepareColor.js\";\nimport { FlagQualifier } from \"../qualifiers/flag/FlagQualifier.js\";\nimport { RawAction } from \"../internal/RawAction.js\";\nimport { isErrorObject } from \"../internal/models/IErrorObject.js\";\nimport { DeliveryFormatAction } from \"../actions/delivery/DeliveryFormatAction.js\";\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/effects_and_artistic_enhancements#distort|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 * @desc An alias to Action Delivery.quality\n * @param {string|number} quality\n * @return {this}\n */\n quality(quality) {\n this.addAction(new DeliveryFormatAction('q', quality));\n return this;\n }\n /**\n * @desc An alias to Action Delivery.format\n * @param {string} format\n * @return {this}\n */\n format(format) {\n this.addAction(new DeliveryFormatAction('f', format));\n return this;\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}\nexport { Transformation };\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 */\nexport function 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","import { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\n/**\n * @memberOf Qualifiers.AspectRatio\n * @extends {SDK.QualifierValue}\n */\nexport class AspectRatioQualifierValue extends QualifierValue {\n}\n","import { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { Action } from \"../../internal/Action.js\";\nimport { toFloatAsString } from \"../../internal/utils/toFloatAsString.js\";\nimport { AspectRatioQualifierValue } from \"../../qualifiers/aspectRatio/AspectRatioQualifierValue.js\";\nimport { ignoreInitialAspectRatio, regionRelative, relative } from \"../../qualifiers/flag.js\";\nimport { FlagQualifier } from \"../../qualifiers/flag/FlagQualifier.js\";\nimport { ACTION_TYPE_TO_CROP_MODE_MAP, CROP_MODE_TO_ACTION_TYPE_MAP } from \"../../internal/internalConstants.js\";\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}\nexport { ResizeSimpleAction };\n","import { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\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}\nexport { GravityQualifier };\n","import { GravityQualifier } from \"../GravityQualifier.js\";\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}\nexport { AutoGravity };\n","import { GravityQualifier } from \"../GravityQualifier.js\";\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}\nexport { FocusOnGravity };\n","import { GravityQualifier } from \"../GravityQualifier.js\";\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}\nexport { CompassGravity };\n","import { CompassGravity } from \"./gravity/compassGravity/CompassGravity.js\";\nimport { FocusOnGravity } from \"./gravity/focusOnGravity/FocusOnGravity.js\";\nimport { AutoGravity } from \"./gravity/autoGravity/AutoGravity.js\";\nimport { XYCenterGravity } from \"./gravity/xyCenterGravity/XYCenterGravity.js\";\n/**\n * @description Defines the gravity based on directional values from a compass.\n * Learn more: {@link https://cloudinary.com/documentation/resizing_and_cropping#control_gravity|Control gravity for images}\n * Learn more: {@link https://cloudinary.com/documentation/video_resizing_and_cropping#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 * @summary qualifier\n * @description Set the center of gravity to the given x & y coordinates.\n * @memberOf Qualifiers.Gravity\n * @return {XYCenterGravity}\n */\nfunction xyCenter() {\n return new XYCenterGravity();\n}\n/**\n * @description A qualifier that determines which part of an asset to focus on, and thus which part of the asset to keep,
\n * when any part of the asset is cropped. For overlays, this setting determines where to place the overlay.\n * @namespace Gravity\n * @memberOf Qualifiers\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 *\n * // Expand every function separately to see its own example\n */\nconst Gravity = {\n compass: compass,\n autoGravity: autoGravity,\n focusOn: focusOn,\n xyCenter\n};\nexport { Gravity, compass, autoGravity, focusOn, xyCenter };\n","import { QualifierValue } from \"../../../../internal/qualifier/QualifierValue.js\";\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}\nexport { FocusOnValue };\n","import { FocusOnValue } from \"./gravity/qualifiers/focusOn/FocusOnValue.js\";\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects birds\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction bird() {\n return new FocusOnValue('bird');\n}\n/**\n * @summary qualifier\n * @description Detects dogs\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction dog() {\n return new FocusOnValue('dog');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects cats\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction cat() {\n return new FocusOnValue('cat');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects microwaves\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction microwave() {\n return new FocusOnValue('microwave');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects refrigerators\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction refrigerator() {\n return new FocusOnValue('refrigerator');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects bottles\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction bottle() {\n return new FocusOnValue('bottle');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects sinks\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction sink() {\n return new FocusOnValue('sink');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects skateboards\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction skateboard() {\n return new FocusOnValue('skateboard');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects people\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction person() {\n return new FocusOnValue('person');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects the largest face in an image with the Advanced Facial Attribute Detection add-on and makes it the focus of the transformation.\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction advancedFace() {\n return new FocusOnValue('adv_face');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects all faces in an image with the Advanced Facial Attribute Detection add-on and makes them the focus of the transformation.\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction advancedFaces() {\n return new FocusOnValue('adv_faces');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects all eyes in an image with the Advanced Facial Attribute Detection add-on and makes them the focus of the transformation.\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction advancedEyes() {\n return new FocusOnValue('adv_eyes');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects the largest face in the asset and makes it the focus of the transformation.\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction face() {\n return new FocusOnValue('face');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects all the faces in the asset and makes them the focus of the transformation.\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction faces() {\n return new FocusOnValue('faces');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects all the faces in the asset and makes them the focus of the transformation.\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction background() {\n return new FocusOnValue('background');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects aeroplane\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction aeroplane() {\n return new FocusOnValue('aeroplane');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects bicycle\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction bicycle() {\n return new FocusOnValue('bicycle');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects boat\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction boat() {\n return new FocusOnValue('boat');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects bus\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction bus() {\n return new FocusOnValue('bus');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects car\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction car() {\n return new FocusOnValue('car');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects chair\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction chair() {\n return new FocusOnValue('chair');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects cow\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction cow() {\n return new FocusOnValue('cow');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects diningtable\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction diningtable() {\n return new FocusOnValue('diningtable');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects horse\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction horse() {\n return new FocusOnValue('horse');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects motorbike\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction motorbike() {\n return new FocusOnValue('motorbike');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects pottedplant\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction pottedplant() {\n return new FocusOnValue('pottedplant');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects sheep\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction sheep() {\n return new FocusOnValue('sheep');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects sofa\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction sofa() {\n return new FocusOnValue('sofa');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects train\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction train() {\n return new FocusOnValue('train');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.FocusOn\n * @description Detects tvmonitor\n * @return {Qualifiers.FocusOn.FocusOnValue} FocusOnValue\n */\nfunction tvmonitor() {\n return new FocusOnValue('tvmonitor');\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/ocr_text_detection_and_extraction_addon|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 * @memberOf Qualifiers\n * @namespace FocusOn\n * @see Visit {@link Qualifiers.Gravity|Gravity} for an example\n */\nconst FocusOn = {\n person,\n cat,\n microwave,\n refrigerator,\n skateboard,\n bird,\n bottle,\n dog,\n sink,\n face,\n train,\n sofa,\n sheep,\n pottedplant,\n horse,\n faces,\n cow,\n bus,\n boat,\n advancedEyes,\n advancedFace,\n advancedFaces,\n aeroplane,\n background,\n bicycle,\n car,\n chair,\n diningtable,\n tvmonitor,\n motorbike,\n ocr\n};\nexport { FocusOnValue, FocusOn, person, cat, microwave, refrigerator, skateboard, bird, bottle, dog, sink, face, train, sofa, sheep, pottedplant, horse, faces, cow, bus, boat, advancedEyes, advancedFace, advancedFaces, aeroplane, background, bicycle, car, chair, diningtable, tvmonitor, motorbike, ocr };\n","import { AutoGravity } from \"../../qualifiers/gravity/autoGravity/AutoGravity.js\";\nimport { FocusOnGravity } from \"../../qualifiers/gravity/focusOnGravity/FocusOnGravity.js\";\nimport { autoGravity } from \"../../qualifiers/gravity.js\";\nimport { FocusOnValue } from \"../../qualifiers/focusOn.js\";\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 */\nexport function 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","import { QualifierValue } from \"../internal/qualifier/QualifierValue.js\";\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}\nexport { AutoFocus };\n","import { QualifierValue } from \"../../../../internal/qualifier/QualifierValue.js\";\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}\nexport { CompassQualifier };\n","import { autoGravity, focusOn } from \"../../qualifiers/gravity.js\";\nimport { FocusOnValue, ocr } from \"../../qualifiers/focusOn.js\";\nimport { AutoFocus } from \"../../qualifiers/autoFocus.js\";\nimport { CompassGravity } from \"../../qualifiers/gravity/compassGravity/CompassGravity.js\";\nimport { CompassQualifier } from \"../../qualifiers/gravity/qualifiers/compass/CompassQualifier.js\";\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}\nexport { createGravityFromModel };\n","import { ResizeSimpleAction } from \"./ResizeSimpleAction.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { createGravityModel } from \"../../internal/models/createGravityModel.js\";\nimport { createGravityFromModel } from \"../../internal/models/createGravityFromModel.js\";\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}\nexport { ResizeAdvancedAction };\n","import { Qualifier } from \"../../../../internal/qualifier/Qualifier.js\";\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}\nexport { BackgroundQualifier };\n","import { BackgroundQualifier } from \"./base/BackgroundQualifier.js\";\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}\nexport default BlurredBackgroundAction;\n","import { prepareColor } from \"../../../../internal/utils/prepareColor.js\";\nimport { BackgroundQualifier } from \"./BackgroundQualifier.js\";\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}\nexport { BaseCommonBackground };\n","import { BaseCommonBackground } from \"../base/BaseCommonBackground.js\";\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}\nexport { BackgroundAutoBorderQualifier };\n","import { BaseCommonBackground } from \"./BaseCommonBackground.js\";\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}\nexport { BaseGradientBackground };\n","import { BaseGradientBackground } from \"../base/BaseGradientBackground.js\";\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}\nexport { BackgroundBorderGradientQualifier };\n","import { BaseGradientBackground } from \"../base/BaseGradientBackground.js\";\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}\nexport { BackgroundPredominantGradientQualifier };\n","import { BaseCommonBackground } from \"../base/BaseCommonBackground.js\";\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}\nexport { BackgroundAutoPredominantQualifier };\n","import BlurredBackgroundAction from \"../../qualifiers/background/shared/BlurredBackgroundAction.js\";\nimport { BackgroundAutoBorderQualifier } from \"../../qualifiers/background/shared/auto/BackgroundAutoBorderQualifier.js\";\nimport { BackgroundBorderGradientQualifier } from \"../../qualifiers/background/shared/gradient/BackgroundBorderGradientQualifier.js\";\nimport { BackgroundPredominantGradientQualifier } from \"../../qualifiers/background/shared/gradient/BackgroundPredominantGradientQualifier.js\";\nimport { BackgroundAutoPredominantQualifier } from \"../../qualifiers/background/shared/auto/BackgroundAutoPredominantQualifier.js\";\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) {\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}\nexport { createBackgroundModel };\n","import { FormatQualifier } from \"./format/FormatQualifier.js\";\n/**\n * @description Contains functions to select the asset format, can be used to convert images and videos to other formats.\n * @memberOf Qualifiers\n * @namespace Format\n * @see Visit {@link Actions.Delivery.format|Delivery Format} for an example\n */\n/**\n * @summary qualifier\n * @description Image format heic.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction heic() { return new FormatQualifier('heic'); }\n/**\n * @summary qualifier\n * @description Image format flif.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction flif() { return new FormatQualifier('flif'); }\n/**\n * @summary qualifier\n * @description Image format ai.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction ai() { return new FormatQualifier('ai'); }\n/**\n * @summary qualifier\n * @description Image format wdp.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction wdp() { return new FormatQualifier('wdp'); }\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 webp.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction webp() { return new FormatQualifier('webp'); }\n/**\n * @summary qualifier\n * @description Image format psd.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction psd() { return new FormatQualifier('psd'); }\n/**\n * @summary qualifier\n * @description Image format jp2.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction jp2() { return new FormatQualifier('jp2'); }\n/**\n * @summary qualifier\n * @description Image format jpc.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction jpc() { return new FormatQualifier('jpc'); }\n/**\n * @summary qualifier\n * @description Image format eps.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction eps() { return new FormatQualifier('eps'); }\n/**\n * @summary qualifier\n * @description Image format tiff.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction tiff() { return new FormatQualifier('tiff'); }\n/**\n * @summary qualifier\n * @description Image format pdf.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction pdf() { return new FormatQualifier('pdf'); }\n/**\n * @summary qualifier\n * @description Image format ico.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction ico() { return new FormatQualifier('ico'); }\n/**\n * @summary qualifier\n * @description Image format bmp.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction bmp() { return new FormatQualifier('bmp'); }\n/**\n * @summary qualifier\n * @description Image format png.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction png() { return new FormatQualifier('png'); }\n/**\n * @summary qualifier\n * @description Image format gif.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction gif() { return new FormatQualifier('gif'); }\n/**\n * @summary qualifier\n * @description Image format auto.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction auto() { return new FormatQualifier('auto'); }\n/**\n * @summary qualifier\n * @description Image format jpg.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction jpg() { return new FormatQualifier('jpg'); }\n/**\n * @summary qualifier\n * @description Image format djvu.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction djvu() { return new FormatQualifier('djvu'); }\n/**\n * @summary qualifier\n * @description Image format ps.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction ps() { return new FormatQualifier('ps'); }\n/**\n * @summary qualifier\n * @description Image format ept.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction ept() { return new FormatQualifier('ept'); }\n/**\n * @summary qualifier\n * @description Image format eps3.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction eps3() { return new FormatQualifier('eps3'); }\n/**\n * @summary qualifier\n * @description Image format fxb.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction fxb() { return new FormatQualifier('fxb'); }\n/**\n * @summary qualifier\n * @description Image format gltf.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction gltf() { return new FormatQualifier('gltf'); }\n/**\n * @summary qualifier\n * @description Image format heif.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction heif() { return new FormatQualifier('heif'); }\n/**\n * @summary qualifier\n * @description Image format indd.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction indd() { return new FormatQualifier('indd'); }\n/**\n * @summary qualifier\n * @description Image format jpe.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction jpe() { return new FormatQualifier('jpe'); }\n/**\n * @summary qualifier\n * @description Image format jpeg.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction jpeg() { return new FormatQualifier('jpeg'); }\n/**\n * @summary qualifier\n * @description Image format jxr.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction jxr() { return new FormatQualifier('jxr'); }\n/**\n * @summary qualifier\n * @description Image format hdp.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction hdp() { return new FormatQualifier('hdp'); }\n/**\n * @summary qualifier\n * @description Image format spd.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction spd() { return new FormatQualifier('spd'); }\n/**\n * @summary qualifier\n * @description Image format arw.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction arw() { return new FormatQualifier('arw'); }\n/**\n * @summary qualifier\n * @description Image format cr2.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction cr2() { return new FormatQualifier('cr2'); }\n/**\n * @summary qualifier\n * @description Image format tga.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction tga() { return new FormatQualifier('tga'); }\n/**\n * @summary qualifier\n * @description Image format tif.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction tif() { return new FormatQualifier('tif'); }\n/**\n * @summary qualifier\n * @description Image format avif.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction avif() { return new FormatQualifier('avif'); }\n/**\n * @summary qualifier\n * @description format usdz.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction usdz() { return new FormatQualifier('usdz'); }\n/**\n * @summary qualifier\n * @description Image format 3g2.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction video3g2() { return new FormatQualifier('3g2'); }\n/**\n * @summary qualifier\n * @description Image format 3gp.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction video3gp() { return new FormatQualifier('3gp'); }\n/**\n * @summary qualifier\n * @description Image format avi.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoAvi() { return new FormatQualifier('avi'); }\n/**\n * @summary qualifier\n * @description Image format flv.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoFlv() { return new FormatQualifier('flv'); }\n/**\n * @summary qualifier\n * @description Image format m3u8.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoM3u8() { return new FormatQualifier('m3u8'); }\n/**\n * @summary qualifier\n * @description Image format ts.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoTs() { return new FormatQualifier('ts'); }\n/**\n * @summary qualifier\n * @description Image format mov.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoMov() { return new FormatQualifier('mov'); }\n/**\n * @summary qualifier\n * @description Image format mkv.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoMkv() { return new FormatQualifier('mkv'); }\n/**\n * @summary qualifier\n * @description Image format mp4.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoMp4() { return new FormatQualifier('mp4'); }\n/**\n * @summary qualifier\n * @description Image format mpeg.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoMpeg() { return new FormatQualifier('mpeg'); }\n/**\n * @summary qualifier\n * @description Image format mpd.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoMpd() { return new FormatQualifier('mpd'); }\n/**\n * @summary qualifier\n * @description Image format mxf.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoMxf() { return new FormatQualifier('mxf'); }\n/**\n * @summary qualifier\n * @description Image format ogv.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoOgv() { return new FormatQualifier('ogv'); }\n/**\n * @summary qualifier\n * @description Image format webm.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoWebm() { return new FormatQualifier('webm'); }\n/**\n * @summary qualifier\n * @description Image format wmv.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoWmv() { return new FormatQualifier('wmv'); }\n/**\n * @summary qualifier\n * @description Image format m2ts.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoM2ts() { return new FormatQualifier('m2ts'); }\n/**\n * @summary qualifier\n * @description Image format mts.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction videoMts() { return new FormatQualifier('mts'); }\n/**\n * @summary qualifier\n * @description Audio format aac.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioAac() { return new FormatQualifier('aac'); }\n/**\n * @summary qualifier\n * @description Audio format aiff.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioAiff() { return new FormatQualifier('aiff'); }\n/**\n * @summary qualifier\n * @description Audio format amr.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioAmr() { return new FormatQualifier('amr'); }\n/**\n * @summary qualifier\n * @description Audio format flac.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioFlac() { return new FormatQualifier('flac'); }\n/**\n * @summary qualifier\n * @description Audio format m4a.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioM4a() { return new FormatQualifier('m4a'); }\n/**\n * @summary qualifier\n * @description Audio format mp3.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioMp3() { return new FormatQualifier('mp3'); }\n/**\n * @summary qualifier\n * @description Audio format ogg.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioOgg() { return new FormatQualifier('ogg'); }\n/**\n * @summary qualifier\n * @description Audio format opus.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioOpus() { return new FormatQualifier('opus'); }\n/**\n * @summary qualifier\n * @description Audio format wav.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction audioWav() { return new FormatQualifier('wav'); }\n/**\n * @summary qualifier\n * @description Image format glb.\n * @memberOf Qualifiers.Format\n * @return {Qualifiers.Format.FormatQualifier}\n */\nfunction glb() { return new FormatQualifier('glb'); }\nconst Format = { usdz, jp2, ai, auto, bmp, eps, flif, gif, heic, ico, jpc, jpg, pdf, png, psd, svg, tiff, wdp, webp, arw, audioAac, audioAiff, audioAmr, audioFlac, audioM4a, audioMp3, audioOgg, audioOpus, audioWav, avif, cr2, djvu, eps3, ept, fxb, gltf, hdp, heif, indd, jpe, jpeg, jxr, ps, spd, tga, tif, video3g2, video3gp, videoAvi, videoFlv, videoM2ts, videoM3u8, videoMkv, videoMov, videoMp4, videoMpd, videoMpeg, videoMts, videoMxf, videoOgv, videoTs, videoWebm, videoWmv, glb };\nexport { usdz, jp2, ai, auto, bmp, eps, flif, gif, heic, ico, jpc, jpg, pdf, png, psd, svg, tiff, wdp, webp, arw, audioAac, audioAiff, audioAmr, audioFlac, audioM4a, audioMp3, audioOgg, audioOpus, audioWav, avif, cr2, djvu, eps3, ept, fxb, gltf, hdp, heif, indd, jpe, jpeg, jxr, ps, spd, tga, tif, video3g2, video3gp, videoAvi, videoFlv, videoM2ts, videoM3u8, videoMkv, videoMov, videoMp4, videoMpd, videoMpeg, videoMts, videoMxf, videoOgv, videoTs, videoWebm, videoWmv, glb, Format };\n","import { prepareColor } from \"../internal/utils/prepareColor.js\";\nimport { BackgroundAutoBorderQualifier } from \"./background/shared/auto/BackgroundAutoBorderQualifier.js\";\nimport { BackgroundBorderGradientQualifier } from \"./background/shared/gradient/BackgroundBorderGradientQualifier.js\";\nimport { BackgroundAutoPredominantQualifier } from \"./background/shared/auto/BackgroundAutoPredominantQualifier.js\";\nimport { BackgroundPredominantGradientQualifier } from \"./background/shared/gradient/BackgroundPredominantGradientQualifier.js\";\nimport BlurredBackgroundAction from \"./background/shared/BlurredBackgroundAction.js\";\nimport { BackgroundQualifier } from \"./background/shared/base/BackgroundQualifier.js\";\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/effects_and_artistic_enhancements#setting_background_color|Setting background for images} | {@link https://cloudinary.com/documentation/video_effects_and_enhancements#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/effects_and_artistic_enhancements#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();\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};\nexport { auto, border, borderGradient, predominantGradient, predominant, color, blurred, Background };\n","import { Background } from \"../../qualifiers.js\";\nimport { auto, border, borderGradient, color, predominant, predominantGradient } from \"../../qualifiers/background.js\";\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}\nexport { createBackgroundFromModel };\n","import { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { ResizeAdvancedAction } from \"./ResizeAdvancedAction.js\";\nimport { createBackgroundModel } from \"../../internal/models/createBackgroundModel.js\";\nimport { createBackgroundFromModel } from \"../../internal/models/createBackgroundFromModel.js\";\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}\nexport { ResizePadAction };\n","import { ResizeSimpleAction } from \"./ResizeSimpleAction.js\";\nimport { GravityQualifier } from \"../../qualifiers/gravity/GravityQualifier.js\";\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}\nexport { ResizeScaleAction };\n","import { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { ResizeAdvancedAction } from \"./ResizeAdvancedAction.js\";\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}\nexport { ResizeCropAction };\n","import { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { ResizeAdvancedAction } from \"./ResizeAdvancedAction.js\";\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}\nexport { ResizeFillAction };\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.toString()\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.toString()\n */\nimport { ResizePadAction } from \"./resize/ResizePadAction.js\";\nimport { ResizeSimpleAction } from \"./resize/ResizeSimpleAction.js\";\nimport { ResizeScaleAction } from \"./resize/ResizeScaleAction.js\";\nimport { ThumbResizeAction } from \"./resize/ThumbnailAction.js\";\nimport { ResizeCropAction } from \"./resize/ResizeCropAction.js\";\nimport { ResizeFillAction } from \"./resize/ResizeFillAction.js\";\nimport { ResizeLimitFitAction } from \"./resize/ResizeLimitFitAction.js\";\nimport { ResizeLimitFillAction } from \"./resize/ResizeLimitFillAction.js\";\nimport { ResizeLimitPadAction } from \"./resize/ResizeLimitPadAction.js\";\nimport { ResizeMinimumPadAction } from \"./resize/ResizeMinimumPadAction.js\";\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\n * Scales your image based on automatically calculated areas of interest within each specific photo.\n *\n * For details, see the Imagga Crop and Scale {@link https://cloudinary.com/documentation/imagga_crop_and_scale_addon#smartly_scale_images|add-on documentation}.\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.ResizeSimpleAction}\n */\nfunction imaggaScale(width, height) {\n return new ResizeSimpleAction('imagga_scale', width, height);\n}\n/**\n * @summary action\n * @description\n * Crops your image based on automatically calculated areas of interest within each specific photo.\n *\n * For details, see the Imagga Crop and Scale {@link https://cloudinary.com/documentation/imagga_crop_and_scale_addon#smartly_crop_images|add-on documentation}.\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.ResizeSimpleAction}\n */\nfunction imaggaCrop(width, height) {\n return new ResizeSimpleAction('imagga_crop', 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 * The image is resized so that it takes up as much space as possible within a bounding box defined by the given width and height parameters.
\n * The original aspect ratio is retained and all of the original image is visible.\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.ResizeSimpleAction}\n */\nfunction fit(width, height) {\n return new ResizeSimpleAction('fit', 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 * @summary action\n * @description\n * Creates an asset with the exact given width and height without distorting the asset, but only if the original\n * asset is larger than the specified resolution limits.\n *\n * The asset is scaled down to fill the given width and height without distorting the asset, and then the dimension\n * that exceeds the request is cropped. If the original dimensions are both smaller than the requested size, it is\n * not resized at all.\n *\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.ResizeLimitFillAction}\n */\nfunction limitFill(width, height) {\n return new ResizeLimitFillAction('lfill', width, height);\n}\n/**\n * @summary action\n * @description\n * Resizes the asset so that it takes up as much space as possible within a bounding box defined by the given\n * width and height parameters, but only if the original asset is larger than the given limit (width and height).\n *\n * The asset is scaled down, the original aspect ratio is retained and all of the original asset is visible.\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.ResizeSimpleAction}\n */\nfunction limitFit(width, height) {\n return new ResizeLimitFitAction('limit', 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, but only if the\n * original asset is smaller than the given minimum (width and height).\n *\n * The asset is scaled up. If the proportions of the original asset do not match the given width and height,\n * padding is added to the asset 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 minimumPad(width, height) {\n return new ResizeMinimumPadAction('mpad', width, height);\n}\n/**\n * @summary action\n * @description\n * Resizes the asset so that it takes up as much space as possible within a bounding box defined by the given\n * width and height parameters, but only if the original asset is smaller than the given minimum (width and height).\n *\n * The asset is scaled up, the original aspect ratio is retained and all of the original asset is visible.\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.ResizeSimpleAction}\n */\nfunction minimumFit(width, height) {\n return new ResizeSimpleAction('mfit', width, height);\n}\n/**\n * @summary action\n * @memberOf Actions.Resize\n * @description\n * Tries to prevent a \"bad crop\" by first attempting to use the fill mode, but adding padding if it is determined\n * that more of the original image needs to be included in the final image.\n *\n * Especially useful if the aspect ratio of the delivered image is considerably different from the original's\n * aspect ratio.\n *\n * Only supported in conjunction with Automatic cropping.\n *\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 fillPad(width, height) {\n return new ResizePadAction('fill_pad', width, height);\n}\n/**\n * @summary action\n * @description\n * The thumb cropping mode is specifically used for creating image thumbnails from either face or custom coordinates,
\n * and must always be accompanied by the gravity parameter set to one of the face detection or custom values.\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.ThumbResizeAction}\n */\nfunction thumbnail(width, height) {\n return new ThumbResizeAction('thumb', 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, but only if the\n * original asset is larger than the given limit (width and height).\n *\n * The asset is scaled down. If the proportions of the original asset do not match the given width and height,\n * padding is added to the asset to reach the required size.\n *\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 limitPad(width, height) {\n return new ResizeLimitPadAction('lpad', width, height);\n}\nconst Resize = {\n imaggaScale,\n imaggaCrop,\n crop,\n fill,\n scale,\n minimumPad,\n fit,\n pad,\n limitFit,\n thumbnail,\n limitFill,\n minimumFit,\n limitPad,\n fillPad\n};\nexport { Resize, imaggaScale, imaggaCrop, crop, fill, scale, minimumPad, fit, pad, limitFit, thumbnail, limitFill, minimumFit, limitPad, fillPad };\n","import { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { DeliveryAction } from \"./DeliveryAction.js\";\nimport { CHROMA_VALUE_TO_CHROMA_MODEL_ENUM, CHROMA_MODEL_ENUM_TO_CHROMA_VALUE, ACTION_TYPE_TO_QUALITY_MODE_MAP } from \"../../internal/internalConstants.js\";\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_optimization#toggle_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}\nexport { DeliveryQualityAction };\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 */\nimport { DeliveryFormatAction } from \"./delivery/DeliveryFormatAction.js\";\nimport { DeliveryQualityAction } from \"./delivery/DeliveryQualityAction.js\";\nimport { DeliveryColorSpaceFromICCAction } from \"./delivery/DeliveryColorSpaceFromICCAction.js\";\nimport { DeliveryAction } from \"./delivery/DeliveryAction.js\";\nimport { DeliveryColorSpaceAction } from \"./delivery/DeliveryColorSpaceAction.js\";\nimport { DeliveryDPRAction } from \"./delivery/DeliveryDPRAction.js\";\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 Deliver the image in the specified device pixel ratio.\n * @memberOf Actions.Delivery\n * @param {string} dpr The DPR (Device Pixel Ratio). Any positive float value.\n * @return {Actions.Delivery.DeliveryAction}\n * @example\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {dpr} 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 * dpr('2.0'),\n * );\n */\nfunction dpr(dpr) {\n return new DeliveryDPRAction(dpr);\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_optimization#how_to_optimize_video_quality|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 * @summary action\n * @description Controls the density to use when delivering an image or when converting a vector file such as a PDF or EPS\n * document to a web image delivery format.\n * @memberOf Actions.Delivery\n * @param {number | string} value The density in dpi.\n * @return {Actions.Delivery.DeliveryAction}\n * @example\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {density} 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 * density(150),\n * );\n */\nfunction density(value) {\n return new DeliveryAction('dn', value, 'density');\n}\n/**\n * @summary action\n * @description Default images can be used in the case that a requested image does not exist.\n * @memberOf Actions.Delivery\n * @param {string} publicIdWithExtension Default image public ID\n * @return {Actions.Delivery.DeliveryAction}\n * @example\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {defaultImage} 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 * defaultImage('sample'),\n * );\n */\nfunction defaultImage(publicIdWithExtension) {\n return new DeliveryAction('d', publicIdWithExtension, 'defaultImage');\n}\n/**\n * @summary action\n * @description Controls the color space used for the delivered image.\n * @memberOf Actions.Delivery\n * @param {string | Qualifiers.ColorSpace} mode The color space.\n * @return {Actions.Delivery.DeliveryAction}\n * @example\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {colorSpace} from \"@cloudinary/url-gen/actions/delivery\";\n * import {trueColor} from \"@cloudinary/url-gen/qualifiers/colorSpace\";\n *\n * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}});\n * const image = yourCldInstance.image('woman');\n * image.delivery(\n * colorSpace(trueColor()),\n * );\n */\nfunction colorSpace(mode) {\n return new DeliveryColorSpaceAction(mode);\n}\n/**\n * @summary action\n * @description Specifies the ICC profile to use for the color space.\n * The ICC file must be uploaded to your account as a raw, authenticated file.\n * @memberOf Actions.Delivery\n * @param {string} publicId The public ID (including the file extension) of the ICC profile that defines the\n * color space.\n * @return {Actions.Delivery.DeliveryColorSpaceFromICC}\n * @example\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {colorSpaceFromICC} from \"@cloudinary/url-gen/actions/delivery\";\n * import {trueColor} from \"@cloudinary/url-gen/qualifiers/colorSpace\";\n *\n * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}});\n * const image = yourCldInstance.image('woman');\n * image.delivery(\n * colorSpaceFromICC('sample.icc'),\n * );\n */\nfunction colorSpaceFromICC(publicId) {\n return new DeliveryColorSpaceFromICCAction(publicId);\n}\nconst Delivery = {\n format,\n dpr,\n density,\n defaultImage,\n colorSpace,\n colorSpaceFromICC,\n quality\n};\nexport { Delivery, format, dpr, quality, density, defaultImage, colorSpace, colorSpaceFromICC };\n","import { CompassQualifier } from \"./gravity/qualifiers/compass/CompassQualifier.js\";\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description South center part (bottom center).\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction south() {\n return new CompassQualifier('south');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description North center part (top center).\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction north() {\n return new CompassQualifier('north');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description Middle east part (right).\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction east() {\n return new CompassQualifier('east');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description Middle west part (left).\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction west() {\n return new CompassQualifier('west');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description North west corner (top left).\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction northWest() {\n return new CompassQualifier('north_west');\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 * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description South west corner (bottom left).\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction southWest() {\n return new CompassQualifier('south_west');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description South east corner (bottom right).\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction southEast() {\n return new CompassQualifier('south_east');\n}\n/**\n * @summary qualifier\n * @memberOf Qualifiers.Compass\n * @description The center of the image.\n * @return {Qualifiers.Compass.CompassQualifier} Compass\n */\nfunction center() {\n return new CompassQualifier('center');\n}\n/**\n * @description Defines the focal Compass for certain methods of cropping.\n * @namespace Compass\n * @memberOf Qualifiers\n * @see Visit {@link Qualifiers.Gravity|Gravity} for an example\n */\nclass Compass {\n}\nCompass.north = north;\nCompass.west = west;\nCompass.east = east;\nCompass.south = south;\nCompass.center = center;\nCompass.northWest = northWest;\nCompass.southEast = southEast;\nCompass.southWest = southWest;\nCompass.northEast = northEast;\nexport { Compass, north, west, east, south, center, northWest, southEast, southWest, northEast };\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 global == 'object' && global && global.Object === Object && global;\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\nmodule.exports = debounce;\n"],"names":["global","BlurredBackgroundAction","auto"],"mappings":";;;;;;;;;;;;;;;;;;;;CASA;CACA,IAAI,gBAAgB,GAAG,GAAG,CAAC;AAC3B;CACA;CACA,IAAI,cAAc,GAAG,2BAA2B,CAAC;AACjD;CACA;CACA,IAAI,gBAAgB,GAAG,gBAAgB,CAAC;AACxC;CACA;CACA,IAAI,OAAO,GAAG,oBAAoB;CAClC,IAAI,QAAQ,GAAG,gBAAgB;CAC/B,IAAI,OAAO,GAAG,kBAAkB;CAChC,IAAI,OAAO,GAAG,eAAe;CAC7B,IAAI,QAAQ,GAAG,gBAAgB;CAC/B,IAAI,OAAO,GAAG,mBAAmB;CACjC,IAAI,MAAM,GAAG,4BAA4B;CACzC,IAAI,MAAM,GAAG,cAAc;CAC3B,IAAI,SAAS,GAAG,iBAAiB;CACjC,IAAI,SAAS,GAAG,iBAAiB;CACjC,IAAI,UAAU,GAAG,kBAAkB;CACnC,IAAI,SAAS,GAAG,iBAAiB;CACjC,IAAI,MAAM,GAAG,cAAc;CAC3B,IAAI,SAAS,GAAG,iBAAiB;CACjC,IAAI,SAAS,GAAG,iBAAiB;CACjC,IAAI,UAAU,GAAG,kBAAkB,CAAC;AACpC;CACA,IAAI,cAAc,GAAG,sBAAsB;CAC3C,IAAI,WAAW,GAAG,mBAAmB;CACrC,IAAI,UAAU,GAAG,uBAAuB;CACxC,IAAI,UAAU,GAAG,uBAAuB;CACxC,IAAI,OAAO,GAAG,oBAAoB;CAClC,IAAI,QAAQ,GAAG,qBA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ACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE;CAC1B,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,KAAK,CAAC,CAAC;CACjE,CAAC;AACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,SAAS,WAAW,CAAC,KAAK,EAAE;CAC5B;CACA,EAAE,OAAO,iBAAiB,CAAC,KAAK,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC;CACzE,KAAK,CAAC,oBAAoB,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,CAAC;CAC3F,CAAC;AACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;AAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,SAAS,WAAW,CAAC,KAAK,EAAE;CAC5B,EAAE,OAAO,KAAK,IAAI,IAAI,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;CACvE,CAAC;AACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,SAAS,iBAAiB,CAAC,KAAK,EAAE;CAClC,EAAE,OAAO,YAAY,CAAC,KAAK,CAAC,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC;CACnD,CAAC;AACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,IAAI,QAAQ,GAAG,cAAc,IAAI,SAAS,CAAC;AAC3C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,SAAS,UAAU,CAAC,KAAK,EAAE;CAC3B;CACA;CACA,EAAE,IAAI,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;CAC9D,EAAE,OAAO,GAAG,IAAI,OAAO,IAAI,GAAG,IAAI,MAAM,CAAC;CACzC,CAAC;AACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,SAAS,QAAQ,CAAC,KAAK,EAAE;CACzB,EAAE,OAAO,OAAO,KAAK,IAAI,QAAQ;CACjC,IAAI,KAAK,GAAG,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,gBAAgB,CAAC;CAC9D,CAAC;AACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,SAAS,QAAQ,CAAC,KAAK,EAAE;CACzB,EAAE,IAAI,IAAI,GAAG,OAAO,KAAK,CAAC;CAC1B,EAAE,OAAO,CAAC,CAAC,KAAK,KAAK,IAAI,IAAI,QAAQ,IAAI,IAAI,IAAI,UAAU,CAAC,CAAC;CAC7D,CAAC;AACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,SAAS,YAAY,CAAC,KAAK,EAAE;CAC7B,EAAE,OAAO,CAAC,CAAC,KAAK,IAAI,OAAO,KAAK,IAAI,QAAQ,CAAC;CAC7C,CAAC;AACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,SAAS,IAAI,CAAC,MAAM,EAAE;CACtB,EAAE,OAAO,WAAW,CAAC,MAAM,CAAC,GAAG,aAAa,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;CACxE,CAAC;AACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,SAAS,SAAS,GAAG;CACrB,EAAE,OAAO,EAAE,CAAC;CACZ,CAAC;AACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,SAAS,SAAS,GAAG;CACrB,EAAE,OAAO,KAAK,CAAC;CACf,CAAC;AACD;CACA,MAAA,CAAA,OAAA,GAAiB,SAAS,CAAA;;;;;CCntD1B;CACA;AACA;CACA;CACA;AACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AAuDA;CACO,SAAS,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;CAC7D,IAAI,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KA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f21f602 --- /dev/null +++ b/packages/html/layers/htmlImageLayer.d.ts @@ -0,0 +1,14 @@ +import { CloudinaryImage } from "@cloudinary/url-gen/assets/CloudinaryImage"; +import { Plugins, HtmlPluginState, AnalyticsOptions } from '../types.js'; +export declare class HtmlImageLayer { + private imgElement; + htmlPluginState: HtmlPluginState; + constructor(element: HTMLImageElement | null, userCloudinaryImage: CloudinaryImage, plugins?: Plugins, analyticsOptions?: AnalyticsOptions); + /** + * Called when component is updated and re-triggers render + * @param userCloudinaryImage + * @param plugins + * @param analyticsOptions + */ + update(userCloudinaryImage: CloudinaryImage, plugins: any, analyticsOptions?: AnalyticsOptions): void; +} diff --git a/packages/html/layers/htmlVideoLayer.d.ts b/packages/html/layers/htmlVideoLayer.d.ts new file mode 100644 index 00000000..daa025d2 --- /dev/null +++ b/packages/html/layers/htmlVideoLayer.d.ts @@ -0,0 +1,59 @@ +import { Plugins, HtmlPluginState, VideoSources, VideoType } from '../types.js'; +import { CloudinaryVideo } from "@cloudinary/url-gen"; +export declare class HtmlVideoLayer { + videoElement: any; + originalVideo: CloudinaryVideo; + htmlPluginState: HtmlPluginState; + mimeType: string; + mimeSubTypes: { + flv: string; + '3gp': string; + mov: string; + mpg: string; + avi: string; + wmv: string; + ogv: string; + webm: string; + mp4: string; + }; + constructor(element: HTMLVideoElement | null, userCloudinaryVideo: CloudinaryVideo, sources: VideoSources, plugins?: Plugins, videoAttributes?: object); + /** + * Handles user supplied sources or default sources + * @param userCloudinaryVideo {CloudinaryVideo} + * @param sources + */ + handleSourceToVideo(userCloudinaryVideo: CloudinaryVideo, sources: VideoSources): void; + /** + * Generate sources based on user input + * @param userCloudinaryVideo {CloudinaryVideo} + * @param sources + */ + generateUserSources(userCloudinaryVideo: CloudinaryVideo, sources: VideoSources): void; + /** + * Appends source tag to html video element + * @param userCloudinaryVideo {CloudinaryVideo} + * @param type {string} + * @param mimeType {string} + */ + appendSourceTag(userCloudinaryVideo: CloudinaryVideo, type: string, mimeType?: string): void; + /** + * Determines MIME type of given source type and codecs. + * @param type - format of the video + * @param codecs - optional information about codecs of the video + */ + buildMimeType(type: VideoType, codecs: string[]): string; + /** + * Iterates through the video attributes and sets to true if passed in by the user. + * In case of poster, sets the poster. + * @param videoAttributes {object} Supported attributes: controls, loop, muted, poster, preload, autoplay, playsinline + */ + setVideoAttributes(videoAttributes: object): void; + /** + * Called when component is updated. If our video source has changed, a video reload is triggered. + * @param updatedCloudinaryVideo + * @param sources + * @param plugins + * @param videoAttributes + */ + update(updatedCloudinaryVideo: CloudinaryVideo, sources: VideoSources, plugins?: Plugins, videoAttributes?: object): void; +} diff --git a/packages/html/plugins/accessibility.d.ts b/packages/html/plugins/accessibility.d.ts new file mode 100644 index 00000000..ef2a24b5 --- /dev/null +++ b/packages/html/plugins/accessibility.d.ts @@ -0,0 +1,20 @@ +import { CloudinaryImage } from "@cloudinary/url-gen/assets/CloudinaryImage"; +import { Plugin, AccessibilityMode, HtmlPluginState } from "../types.js"; +/** + * @namespace + * @description Appends accessibility transformations to the original image. + * @return {Plugin} + * @example NOTE: The following is in React. For further examples, see the Packages tab. + * + */ +export declare function accessibility({ mode }?: { + mode?: string; +}): Plugin; +/** + * @description Accessibility plugin + * @param mode {accessibilityMode} The accessibility mode to use. Possible modes: 'darkmode' | 'brightmode' | 'monochrome' | 'colorblind'. Default: 'darkmode'. + * @param element {HTMLImageElement} The image element. + * @param pluginCloudinaryImage {CloudinaryImage} + * @param htmlPluginState {htmlPluginState} Holds cleanup callbacks and event subscriptions. + */ +export declare function accessibilityPlugin(mode: AccessibilityMode, element: HTMLImageElement, pluginCloudinaryImage: CloudinaryImage, htmlPluginState: HtmlPluginState): Promise | boolean; diff --git a/packages/html/plugins/lazyload.d.ts b/packages/html/plugins/lazyload.d.ts new file mode 100644 index 00000000..54a38ce5 --- /dev/null +++ b/packages/html/plugins/lazyload.d.ts @@ -0,0 +1,20 @@ +import { Plugin } from '../types.js'; +/** + * @namespace + * @description Loads an image once it is in a certain margin in the viewport. This includes vertical and horizontal scrolling. + * @param rootMargin {string} The root element's bounding box before the intersection test is performed. Default: 0px. + * @param threshold {number} The percentage of the image's visibility at which point the image should load. Default: 0.1 (10%). + * @return {Plugin} + * @example + * + * NOTE: The following is in React. For further examples, see the Packages tab. + * When using the plugin make sure to add dimensions, otherwise the images will load with + * the size of 0x0, meaning the images will be in the viewport and trigger the lazyload plugin. + * + * + */ +export declare function lazyload({ rootMargin, threshold }?: { + rootMargin?: string; + threshold?: number; +}): Plugin; diff --git a/packages/html/plugins/placeholder.d.ts b/packages/html/plugins/placeholder.d.ts new file mode 100644 index 00000000..b0499906 --- /dev/null +++ b/packages/html/plugins/placeholder.d.ts @@ -0,0 +1,12 @@ +import { Plugin } from "../types"; +/** + * @namespace + * @description Displays a placeholder image until the original image loads. + * @param mode {PlaceholderMode} The type of placeholder image to display. Possible modes: 'vectorize' | 'pixelate' | 'blur' | 'predominant-color'. Default: 'vectorize'. + * @return {Plugin} + * @example NOTE: The following is in React. For further examples, see the Packages tab. + * + */ +export declare function placeholder({ mode }?: { + mode?: string; +}): Plugin; diff --git a/packages/html/plugins/responsive.d.ts b/packages/html/plugins/responsive.d.ts new file mode 100644 index 00000000..ca6607b1 --- /dev/null +++ b/packages/html/plugins/responsive.d.ts @@ -0,0 +1,13 @@ +import { Plugin } from "../types.js"; +/** + * @namespace + * @description Updates the src with the size of the parent element and triggers a resize event for + * subsequent resizing. + * @param steps {number | number[]} The step size in pixels or an array of image widths in pixels. + * @return {Plugin} + * @example NOTE: The following is in React. For further examples, see the Packages tab. + * + */ +export declare function responsive({ steps }?: { + steps?: number | number[]; +}): Plugin; diff --git a/packages/html/types.d.ts b/packages/html/types.d.ts new file mode 100644 index 00000000..7b8c65f4 --- /dev/null +++ b/packages/html/types.d.ts @@ -0,0 +1,33 @@ +import { CloudinaryImage } from "@cloudinary/url-gen/assets/CloudinaryImage"; +import { VideoCodecAction } from "@cloudinary/url-gen/actions/transcode/VideoCodecAction"; +export type Plugin = (element: HTMLImageElement | HTMLVideoElement, cloudinaryImage: CloudinaryImage, htmlPluginState?: HtmlPluginState) => Promise; +export type Plugins = Plugin[]; +export type AccessibilityMode = 'darkmode' | 'brightmode' | 'monochrome' | 'colorblind'; +export type PlaceholderMode = 'vectorize' | 'pixelate' | 'blur' | 'predominant-color'; +export type HtmlPluginState = { + cleanupCallbacks: Function[]; + pluginEventSubscription: Function[]; +}; +export type VideoSources = { + type: VideoType; + codecs: Array; + transcode: VideoCodecAction; +}[] | undefined; +export type VideoType = 'flv' | '3gp' | 'mov' | 'mpg' | 'avi' | 'wmv' | 'ogv' | string; +export type PictureSources = { + minWidth?: number; + maxWidth?: number; + image: CloudinaryImage; + sizes?: string; +}[]; +export type PictureSource = { + minWidth?: number; + maxWidth?: number; + image: CloudinaryImage; + sizes?: string; +}; +export type AnalyticsOptions = { + sdkSemver: string; + techVersion: string; + sdkCode: string; +}; diff --git a/packages/html/utils/cancelCurrentlyRunningPlugins.d.ts b/packages/html/utils/cancelCurrentlyRunningPlugins.d.ts new file mode 100644 index 00000000..9b5c8de7 --- /dev/null +++ b/packages/html/utils/cancelCurrentlyRunningPlugins.d.ts @@ -0,0 +1,6 @@ +import { HtmlPluginState } from '../types.js'; +/** + * Cancels currently running plugins. This is called from unmount or update + * @param pluginState {HtmlPluginState} Holds cleanup callbacks and event subscriptions + */ +export declare function cancelCurrentlyRunningPlugins(pluginState: HtmlPluginState): void; diff --git a/packages/html/utils/internalConstants.d.ts b/packages/html/utils/internalConstants.d.ts new file mode 100644 index 00000000..d94c4f30 --- /dev/null +++ b/packages/html/utils/internalConstants.d.ts @@ -0,0 +1,55 @@ +import { Transformation } from "@cloudinary/url-gen/transformation/Transformation"; +/** + * Predefined accessibility transformations + * @const {Object} Cloudinary.ACCESSIBILITY_MODES + */ +export declare const ACCESSIBILITY_MODES: { + darkmode: import("@cloudinary/transformation-builder-sdk/actions/effect/Colorize").ColorizeEffectAction; + brightmode: import("@cloudinary/transformation-builder-sdk/actions/effect/Colorize").ColorizeEffectAction; + monochrome: import("@cloudinary/transformation-builder-sdk/actions/effect/EffectActions/SimpleEffectAction").SimpleEffectAction; + colorblind: import("@cloudinary/transformation-builder-sdk/actions/effect/AssistColorBlind").AssistColorBlindEffectAction; +}; +/** + * Predefined vectorize placeholder transformation + */ +export declare const VECTORIZE: Transformation; +/** + * Predefined pixelate placeholder transformation + */ +export declare const PIXELATE: Transformation; +/** + * Predefined blur placeholder transformation + */ +export declare const BLUR: Transformation; +/** + * Predefined predominant color placeholder transformation + */ +export declare const PREDOMINANT_COLOR_TRANSFORM: Transformation; +/** + * Predefined placeholder image options + */ +export declare const PLACEHOLDER_IMAGE_OPTIONS: { + vectorize: Transformation; + pixelate: Transformation; + blur: Transformation; + 'predominant-color': Transformation; +}; +/** + * transparent gif + */ +export declare const singleTransparentPixel = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; +/** + * Convert common video file extensions to mime types + * Most other common video file extensions have an identical mime type so do not need conversion. + */ +export declare const VIDEO_MIME_TYPES: { + flv: string; + '3gp': string; + mov: string; + mpg: string; + avi: string; + wmv: string; + ogv: string; + webm: string; + mp4: string; +}; diff --git a/packages/html/utils/isBrowser.d.ts b/packages/html/utils/isBrowser.d.ts new file mode 100644 index 00000000..4af9024f --- /dev/null +++ b/packages/html/utils/isBrowser.d.ts @@ -0,0 +1,4 @@ +/** + * return true when window is defined + */ +export declare function isBrowser(): boolean; diff --git a/packages/html/utils/isImage.d.ts b/packages/html/utils/isImage.d.ts new file mode 100644 index 00000000..3d38f302 --- /dev/null +++ b/packages/html/utils/isImage.d.ts @@ -0,0 +1,5 @@ +/** + * returns true if input is an image element + * @param i + */ +export declare function isImage(i: any): i is HTMLImageElement; diff --git a/packages/html/utils/isNum.d.ts b/packages/html/utils/isNum.d.ts new file mode 100644 index 00000000..25248ee3 --- /dev/null +++ b/packages/html/utils/isNum.d.ts @@ -0,0 +1,5 @@ +/** + * Returns true if value is number + * @param value + */ +export declare function isNum(value: number | number[]): boolean; diff --git a/packages/html/utils/render.d.ts b/packages/html/utils/render.d.ts new file mode 100644 index 00000000..0e0ee9d1 --- /dev/null +++ b/packages/html/utils/render.d.ts @@ -0,0 +1,11 @@ +import { Plugins, HtmlPluginState } from '../types.js'; +import { CloudinaryVideo, CloudinaryImage } from "@cloudinary/url-gen"; +/** + * Iterate through plugins and break in cases where the response is canceled. The + * response is canceled if component is updated or unmounted + * @param element {HTMLImageElement|HTMLVideoElement} Html Image or Video element + * @param pluginCloudinaryAsset {CloudinaryImage|CloudinaryVideo} The Cloudinary asset generated by base + * @param plugins {plugins} array of plugins passed in by the user + * @param pluginState {htmlPluginState} Holds cleanup callbacks and event subscriptions + */ +export declare function render(element: HTMLImageElement | HTMLVideoElement, pluginCloudinaryAsset: CloudinaryImage | CloudinaryVideo, plugins: Plugins, pluginState: HtmlPluginState): Promise; diff --git a/packages/html/utils/screenWidths.d.ts b/packages/html/utils/screenWidths.d.ts new file mode 100644 index 00000000..682b8373 --- /dev/null +++ b/packages/html/utils/screenWidths.d.ts @@ -0,0 +1,4 @@ +/** + * Predefined screen dimension table ordered by ranking + */ +export declare const screeWidths: number[]; diff --git a/packages/html/utils/serverSideSrc.d.ts b/packages/html/utils/serverSideSrc.d.ts new file mode 100644 index 00000000..0727be58 --- /dev/null +++ b/packages/html/utils/serverSideSrc.d.ts @@ -0,0 +1,9 @@ +/** + * Calculates the SSR src based on plugins + * @param plugins The plugins array of plugins passed in by the user + * @param serverCloudinaryImage {CloudinaryImage} + * @return {string} return the src + */ +import { CloudinaryImage } from "@cloudinary/url-gen/assets/CloudinaryImage"; +import { AnalyticsOptions, Plugins } from "../types.js"; +export declare function serverSideSrc(plugins?: Plugins, serverCloudinaryImage?: CloudinaryImage, analyticsOptions?: AnalyticsOptions): string; From da01e14fd0e815f63f4dffc6563ac0d67a02af94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Philipczyk?= Date: Fri, 18 Nov 2022 17:22:49 +0100 Subject: [PATCH 2/3] feat: use angular partial compilation mode --- packages/angular/package.json | 1 + .../angular/projects/cloudinary-library/tsconfig.lib.prod.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/angular/package.json b/packages/angular/package.json index 9d3c4eef..eb5459fc 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -12,6 +12,7 @@ "bundlewatch": "bundlewatch --config bundlewatch.config.js", "lint": "ng lint", "e2e": "ng e2e", + "update": "ng update @angular/animations@11 @angular/common@11 @angular/compiler@11 @angular/core@11 @angular/forms@11 @angular/platform-browser@11 @angular/platform-browser-dynamic@11 @angular/router@11 @angular/cli@11 @angular/compiler-cli@11", "prepare-version": "node -e \"console.log('export let APP_VERSION = \\'' + process.env.npm_package_version +'\\';')\" > projects/cloudinary-library/src/lib/version.ts" }, "private": true, diff --git a/packages/angular/projects/cloudinary-library/tsconfig.lib.prod.json b/packages/angular/projects/cloudinary-library/tsconfig.lib.prod.json index 832377c9..77a859b1 100644 --- a/packages/angular/projects/cloudinary-library/tsconfig.lib.prod.json +++ b/packages/angular/projects/cloudinary-library/tsconfig.lib.prod.json @@ -25,7 +25,7 @@ "strictInjectionParameters": true, "flatModuleId": "AUTOGENERATED", "flatModuleOutFile": "AUTOGENERATED", - "enableIvy": false + "compilationMode": "partial" }, "exclude": [ "src/test.ts", From 56eabe40e4489d73f82323ee3cde844343aa0c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Philipczyk?= Date: Wed, 23 Nov 2022 09:41:54 +0100 Subject: [PATCH 3/3] feat: update to angular 11 --- packages/angular/package.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/angular/package.json b/packages/angular/package.json index eb5459fc..e552e2bc 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -17,22 +17,22 @@ }, "private": true, "dependencies": { - "@angular/animations": "~10.2.4", - "@angular/common": "~10.2.4", - "@angular/compiler": "~10.2.4", - "@angular/core": "~10.2.4", - "@angular/forms": "~10.2.4", - "@angular/platform-browser": "~10.2.4", - "@angular/platform-browser-dynamic": "~10.2.4", - "@angular/router": "~10.2.4", + "@angular/animations": "~11.2.14", + "@angular/common": "~11.2.14", + "@angular/compiler": "~11.2.14", + "@angular/core": "~11.2.14", + "@angular/forms": "~11.2.14", + "@angular/platform-browser": "~11.2.14", + "@angular/platform-browser-dynamic": "~11.2.14", + "@angular/router": "~11.2.14", "rxjs": "~6.6.0", "tslib": "^2.0.0", "zone.js": "~0.10.2" }, "devDependencies": { - "@angular-devkit/build-angular": "~0.1002.3", - "@angular/cli": "~10.2.3", - "@angular/compiler-cli": "~10.2.4", + "@angular-devkit/build-angular": "~0.1102.19", + "@angular/cli": "~11.2.19", + "@angular/compiler-cli": "~11.2.14", "@cloudinary/html": "^1.6.0", "@cloudinary/url-gen": "^1.8.6", "@types/jasmine": "~3.5.0", @@ -42,12 +42,12 @@ "codelyzer": "^6.0.0", "jasmine-core": "~3.6.0", "jasmine-spec-reporter": "~5.0.0", - "karma": "~5.0.0", + "karma": "~6.4.1", "karma-chrome-launcher": "~3.1.0", "karma-coverage-istanbul-reporter": "~3.0.2", "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "^1.5.0", - "ng-packagr": "^10.1.0", + "ng-packagr": "^11.2.4", "protractor": "~7.0.0", "ts-node": "~8.3.0", "tslint": "~6.1.0", @@ -58,4 +58,4 @@ "minimist": "1.2.6" } } -} +} \ No newline at end of file