{"version":3,"sources":["node_modules/@cloudinary/transformation-builder-sdk/internal/qualifier/QualifierValue.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/aspectRatio/AspectRatioQualifierValue.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/qualifiers/flag.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/aspectRatio.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/internal/utils/toFloatAsString.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/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/internal/utils/prepareColor.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/qualifiers/background/shared/BackgroundGenerativeFillQualifier.js","node_modules/@cloudinary/transformation-builder-sdk/internal/models/createBackgroundModel.js","node_modules/@cloudinary/transformation-builder-sdk/qualifiers/format/FormatQualifier.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/ThumbnailAction.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/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/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/transformation/ImageTransformation.js","node_modules/@cloudinary/url-gen/internal/url/urlUtils/isUrl.js","node_modules/@cloudinary/url-gen/internal/url/urlUtils/isFileName.js","node_modules/@cloudinary/url-gen/internal/url/urlUtils/publicIDContainsVersion.js","node_modules/@cloudinary/url-gen/internal/url/cloudinaryURL.js","node_modules/@cloudinary/url-gen/config/BaseConfig.js","node_modules/@cloudinary/url-gen/internal/internalConstants.js","node_modules/@cloudinary/url-gen/config/URLConfig.js","node_modules/@cloudinary/url-gen/sdkAnalytics/stringPad.js","node_modules/@cloudinary/url-gen/sdkAnalytics/base64Map.js","node_modules/@cloudinary/url-gen/sdkAnalytics/reverseVersion.js","node_modules/@cloudinary/url-gen/sdkAnalytics/padVersion.js","node_modules/@cloudinary/url-gen/sdkAnalytics/encodeVersion.js","node_modules/@cloudinary/url-gen/sdkAnalytics/getAnalyticsOptions.js","node_modules/@cloudinary/url-gen/internal/utils/packageVersion.js","node_modules/@cloudinary/url-gen/sdkAnalytics/encodeOSVersion.js","node_modules/@cloudinary/url-gen/sdkAnalytics/getSDKAnalyticsSignature.js","node_modules/@cloudinary/url-gen/assets/CloudinaryFile.js","node_modules/@cloudinary/url-gen/assets/CloudinaryTransformable.js","node_modules/@cloudinary/url-gen/assets/CloudinaryImage.js","node_modules/@cloudinary/transformation-builder-sdk/transformation/VideoTransformation.js","node_modules/@cloudinary/transformation-builder-sdk/actions/roundCorners/RoundCornersAction.js","node_modules/@cloudinary/transformation-builder-sdk/actions/roundCorners.js","node_modules/@cloudinary/url-gen/assets/CloudinaryVideo.js","node_modules/@cloudinary/url-gen/instance/Cloudinary.js","src/app/shared/services/cloudinary/cloudinary.service.ts"],"sourcesContent":["/**\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 } 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 };","import { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\n/**\n * @memberOf Qualifiers.AspectRatio\n * @extends {SDK.QualifierValue}\n */\nexport class AspectRatioQualifierValue extends QualifierValue {}","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 };","import { createUnsupportedError } from \"../utils/unsupportedError.js\";\n/**\n * Returns the action's model\n */\nexport function qualifierToJson() {\n return this._qualifierModel || {\n 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}","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 } else {\n this.qualifierValue = new QualifierValue();\n this.qualifierValue.addValue(qualifierValue);\n }\n }\n toString() {\n const {\n key,\n delimiter,\n qualifierValue\n } = this;\n return `${key}${delimiter}${qualifierValue.toString()}`;\n }\n addValue(value) {\n this.qualifierValue.addValue(value);\n return this;\n }\n}\nexport { Qualifier };","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 } else {\n qualifierValue = flagType;\n }\n super('fl', qualifierValue);\n this.flagValue = flagValue;\n }\n toString() {\n return super.toString().replace(/\\./g, '%2E');\n }\n getFlagValue() {\n return this.flagValue;\n }\n}\nexport { FlagQualifier };","/**\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,\n anyFormat,\n animatedPng,\n animatedWebP,\n clipEvenOdd,\n lossy,\n preserveTransparency,\n png8,\n png24,\n png32,\n progressive,\n rasterize,\n sanitize,\n stripProfile,\n tiff8Lzw,\n attachment,\n forceIcc,\n forceStrip,\n getInfo,\n immutableCache,\n keepAttribution,\n keepIptc,\n custom,\n streamingAttachment,\n hlsv3,\n keepDar,\n noStream,\n mono,\n layerApply,\n relative,\n regionRelative,\n splice,\n truncateTS,\n waveform,\n ignoreInitialAspectRatio,\n clip,\n tiled,\n noOverflow,\n 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 };","import { AspectRatioQualifierValue } from \"./aspectRatio/AspectRatioQualifierValue.js\";\nimport { ignoreInitialAspectRatio as ignoreInitialAspectRatioFlag } from \"./flag.js\";\n/**\n * @description 1 by 1 aspect ration.\n * @memberOf Qualifiers.AspectRatio\n * @return {string}\n */\nfunction ar1X1() {\n return new AspectRatioQualifierValue('1:1');\n}\n/**\n * @summary qualifier\n * @description 5 by 4 aspect ration.\n * @memberOf Qualifiers.AspectRatio\n * @return {string}\n */\nfunction ar5X4() {\n return new AspectRatioQualifierValue('5:4');\n}\n/**\n * @summary qualifier\n * @description 4 by 3 aspect ration.\n * @memberOf Qualifiers.AspectRatio\n * @return {string}\n */\nfunction ar4X3() {\n return new AspectRatioQualifierValue('4:3');\n}\n/**\n * @summary qualifier\n * @description 3 by 2 aspect ration.\n * @memberOf Qualifiers.AspectRatio\n * @return {string}\n */\nfunction ar3X2() {\n return new AspectRatioQualifierValue('3:2');\n}\n/**\n * @summary qualifier\n * @description 16 by 9 aspect ration.\n * @memberOf Qualifiers.AspectRatio\n * @return {string}\n */\nfunction ar16X9() {\n return new AspectRatioQualifierValue('16:9');\n}\n/**\n * @summary qualifier\n * @description 3 by 1 aspect ration.\n * @memberOf Qualifiers.AspectRatio\n * @return {string}\n */\nfunction ar3X1() {\n return new AspectRatioQualifierValue('3:1');\n}\n/**\n * @summary qualifier\n * @description ignores aspect ratio.\n * @memberOf Qualifiers.AspectRatio\n * @return {IgnoreAspectRatioQualifier}\n */\nfunction ignoreInitialAspectRatio() {\n return ignoreInitialAspectRatioFlag();\n}\n/**\n * @summary qualifier\n * @description A list of all most commonly used aspect ratios. including an ‘ignore aspect ratio’ option which direct the BE to not stick to the original aspect ratio.\n * This is used in the context of resize actions\n * @namespace AspectRatio\n * @memberOf Qualifiers\n * @see Visit {@link Actions.Resize|Resize} for an example\n */\nconst AspectRatio = {\n ar1X1,\n ar5X4,\n ar3X1,\n ar3X2,\n ar4X3,\n ar16X9,\n ignoreInitialAspectRatio\n};\nexport { ar1X1, ar5X4, ar3X1, ar3X2, ar4X3, ar16X9, ignoreInitialAspectRatio, AspectRatio };","/**\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 };","import { createUnsupportedError } from \"../utils/unsupportedError.js\";\n/**\n * Returns the action's model\n */\nexport function actionToJson() {\n var _a, _b, _c;\n const actionModelIsNotEmpty = this._actionModel && Object.keys(this._actionModel).length;\n const sourceTransformationError = (_c = (_b = (_a = this._actionModel) === null || _a === void 0 ? void 0 : _a.source) === null || _b === void 0 ? void 0 : _b.transformation) === null || _c === void 0 ? void 0 : _c.error;\n // Should return error when there is unsupported transformation inside\n if (sourceTransformationError && sourceTransformationError instanceof Error) {\n return {\n error: sourceTransformationError\n };\n }\n if (actionModelIsNotEmpty) {\n return this._actionModel;\n }\n return {\n 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}","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 } 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 } 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 } 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 * @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 } else {\n // If the input already contains a decimal, just return the value\n return returnValue;\n }\n}","/**\n * Flip keys and values for given object\n * @param obj\n */\nfunction objectFlip(obj) {\n const result = {};\n Object.keys(obj).forEach(key => {\n result[obj[key]] = key;\n });\n return result;\n}\nexport { objectFlip };","/**\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 autoPad: 'auto_pad'\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 generativeRestore: 'gen_restore',\n upscale: 'upscale'\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);","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 = {\n dimensions: {}\n };\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 {\n actionType,\n dimensions,\n relative,\n regionRelative\n } = actionModel;\n const {\n aspectRatio,\n width,\n height\n } = 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 };","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 };","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 };","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 };","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 };","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 };","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 };","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 };","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 } 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 } 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}","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 } 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 } 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}\nconst focusOn = AutoFocus.focusOn;\nexport { AutoFocus, focusOn };","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 };","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 {\n object,\n weight,\n avoid\n } = 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 };","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 };","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 };","import { BackgroundQualifier } from \"./base/BackgroundQualifier.js\";\nexport const DEFAULT_INTENSITY = 100;\nexport const DEFAULT_BRIGHTNESS = 0;\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 const intensity = this.intensityLevel !== undefined ? `:${this.intensityLevel}` : '';\n const brightness = this.brightnessLevel !== undefined ? this.intensityLevel !== undefined ? `:${this.brightnessLevel}` : `:${DEFAULT_INTENSITY}:${this.brightnessLevel}` : '';\n return `b_blurred${intensity}${brightness}`;\n }\n}\nexport default BlurredBackgroundAction;","/**\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 } else {\n return color;\n }\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 };","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 };","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 };","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 };","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 };","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 };","import { BackgroundQualifier } from \"./base/BackgroundQualifier.js\";\n/**\n * @description Automatically fills the padded area using generative AI to extend the image seamlessly.\n * Optionally include a prompt to guide the image generation.\n * @memberOf Qualifiers.Background\n */\nclass BackgroundGenerativeFillQualifier extends BackgroundQualifier {\n constructor() {\n super(\"gen_fill\");\n this._backgroundType = 'generativeFill';\n }\n prompt(prompt) {\n this._prompt = prompt;\n return this;\n }\n getPrompt() {\n return this._prompt;\n }\n getBackgroundType() {\n return this._backgroundType;\n }\n /**\n * @description\n * Override the toString() function to explicitly stringify the qualifier.\n */\n toString() {\n return `b_gen_fill${this._prompt ? `:prompt_${this._prompt}` : ''}`;\n }\n}\nexport { BackgroundGenerativeFillQualifier };","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\";\nimport { BackgroundGenerativeFillQualifier } from \"../../qualifiers/background/shared/BackgroundGenerativeFillQualifier.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 {\n backgroundType: 'auto'\n };\n}\n/**\n * Create an IBlurredBackgroundModel from given background\n * @param background\n */\nfunction createBlurredBackgroundModel(background) {\n const {\n intensityLevel,\n brightnessLevel\n } = 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)), {\n backgroundType: 'border'\n });\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)), {\n backgroundType: 'borderGradient'\n });\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)), {\n backgroundType: 'predominant'\n });\n}\n/**\n * Create an IPredominantGradientBackgroundModel from given background\n * @param background\n */\nfunction createPredominantGradientBackgroundModel(background) {\n return Object.assign(Object.assign({}, createBaseGradientBackgroundModel(background)), {\n backgroundType: 'predominantGradient'\n });\n}\n/**\n * Create an IGenerativeFillBackgroundModel from given background\n * @param urlValue\n */\nfunction createGenerativeFillBackgroundModel(background) {\n return Object.assign({\n backgroundType: background.getBackgroundType()\n }, background.getPrompt() ? {\n prompt: background.getPrompt()\n } : {});\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 if (background instanceof BackgroundGenerativeFillQualifier) {\n return createGenerativeFillBackgroundModel(background);\n }\n return createColorBackgroundModel(background);\n}\nexport { createBackgroundModel };","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 };","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\";\nimport { BackgroundGenerativeFillQualifier } from \"./background/shared/BackgroundGenerativeFillQualifier.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}\n/**\n * @summary qualifier\n * @description A qualifier that automatically fills the padded area using generative AI to extend the image seamlessly.\n * @memberOf Qualifiers.Background\n * @return {BackgroundGenerativeFillQualifier}\n */\nfunction generativeFill() {\n return new BackgroundGenerativeFillQualifier();\n}\nconst Background = {\n auto,\n border,\n borderGradient,\n predominantGradient,\n predominant,\n color,\n blurred,\n generativeFill\n};\nexport { auto, border, borderGradient, predominantGradient, predominant, color, blurred, generativeFill, Background };","import { Background } from \"../../qualifiers.js\";\nimport { auto, border, borderGradient, color, generativeFill, predominant, predominantGradient } from \"../../qualifiers/background.js\";\nimport { DEFAULT_BRIGHTNESS, DEFAULT_INTENSITY } from \"../../qualifiers/background/shared/BlurredBackgroundAction.js\";\n/**\n * Create BackgroundQualifier from IBlurredBackgroundModel\n * @param backgroundModel\n */\nfunction createBlurredBackground(backgroundModel) {\n const {\n brightness,\n intensity\n } = backgroundModel;\n const result = Background.blurred();\n result.brightness(brightness !== null && brightness !== void 0 ? brightness : DEFAULT_BRIGHTNESS);\n result.intensity(intensity !== null && intensity !== void 0 ? intensity : DEFAULT_INTENSITY);\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 {\n gradientColors,\n gradientDirection,\n contrast,\n palette\n } = 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 {\n contrast,\n palette\n } = backgroundModel;\n if (contrast) {\n background.contrast();\n }\n if (palette) {\n background.palette(...palette);\n }\n return background;\n}\n/**\n * Create a Generative Fill background from given model\n * @param background\n * @param backgroundModel\n */\nfunction createGenerativeFillBackground(background, backgroundModel) {\n const {\n prompt\n } = backgroundModel;\n if (prompt) {\n background.prompt(prompt);\n }\n return background;\n}\n/**\n * Create BackgroundQualifier from IBackgroundModel\n * @param backgroundModel\n */\nfunction createBackgroundFromModel(backgroundModel) {\n const {\n backgroundType\n } = 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 case 'generativeFill':\n return createGenerativeFillBackground(generativeFill(), backgroundModel);\n default:\n return color(backgroundModel.color);\n }\n}\nexport { createBackgroundFromModel };","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 };","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 };","import { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { ResizeAdvancedAction } from \"./ResizeAdvancedAction.js\";\n/**\n * @description Defines a thumbnail resize action.\n * @extends Actions.Resize.ResizeAdvancedAction\n * @memberOf Actions.Resize\n * @see Visit {@link Actions.Resize| Resize} for examples\n */\nclass ThumbResizeAction extends ResizeAdvancedAction {\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.zoom && result.zoom(actionModel.zoom);\n return result;\n }\n}\nexport { ThumbResizeAction };","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 };","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 * @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\";\nimport { ResizeAdvancedAction } from \"./resize/ResizeAdvancedAction.js\";\nimport { ResizeAutoPadAction } from \"./resize/ResizeAutoPadAction.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 * Automatically determines the best crop based on the gravity and specified dimensions.\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 auto(width, height) {\n return new ResizeAdvancedAction('auto', 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}\n/**\n * @summary action\n * @description\n * Tries to prevent a \"bad crop\" by first attempting to use the auto cropping mode, but adding some padding\n * if the algorithm determines that more of the original image needs to be included in the final image.\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.ResizeAutoPadAction}\n */\nfunction autoPad(width, height) {\n return new ResizeAutoPadAction('auto_pad', 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 auto,\n autoPad\n};\nexport { Resize, imaggaScale, imaggaCrop, crop, fill, scale, minimumPad, fit, pad, limitFit, thumbnail, limitFill, minimumFit, limitPad, fillPad, auto, autoPad };","import { Action } from \"../../../internal/Action.js\";\nimport { QualifierValue } from \"../../../internal/qualifier/QualifierValue.js\";\nimport { Qualifier } from \"../../../internal/qualifier/Qualifier.js\";\nimport { prepareColor } from \"../../../internal/utils/prepareColor.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._actionModel = {};\n this.addQualifier(new Qualifier('b', new QualifierValue(prepareColor(color)).setDelimiter('_')));\n this._actionModel.color = color;\n this._actionModel.actionType = 'backgroundColor';\n }\n static fromJson(actionModel) {\n const {\n color\n } = 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(color);\n return result;\n }\n}\nexport { BackgroundColor };","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 {\n error: createUnsupportedError(`unsupported action ${this.constructor.name}`)\n };\n }\n}\nexport { RawAction };","/**\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 };","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 } 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 * @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 };","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 = {\n mode: mode.getFlagValue()\n };\n this.addFlag(mode);\n } else {\n this._actionModel.progressive = {\n mode: mode\n };\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 {\n formatType,\n lossy,\n progressive,\n preserveTransparency\n } = actionModel;\n let result;\n if (formatType) {\n result = new this('f', formatType);\n } else {\n result = new this('f');\n }\n if (progressive) {\n if (progressive.mode) {\n result.progressive(progressive.mode);\n } else {\n result.progressive();\n }\n }\n lossy && result.lossy();\n preserveTransparency && result.preserveTransparency();\n return result;\n }\n}\nexport { DeliveryFormatAction };","import { Action } from \"../internal/Action.js\";\nimport { BackgroundColor } from \"../actions/background/actions/BackgroundColor.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 } else {\n actionToAdd = new RawAction(action);\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 } else {\n this.actions.push(new RawAction(tx));\n }\n return this;\n }\n /**\n * @return {string}\n */\n toString() {\n return this.actions.map(action => {\n return action.toString();\n }).filter(a => a).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(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 {\n actions\n };\n }\n}\nexport { Transformation };","import { Transformation } from \"./Transformation.js\";\n/**\n * @summary SDK\n * @extends {SDK.Transformation}\n * @memberOf SDK\n */\nclass ImageTransformation extends Transformation {}\nexport { ImageTransformation };","/**\n *\n * @param publicID\n */\nexport function isUrl(publicID) {\n return publicID.match(/^https?:\\//);\n}","/**\n *\n * @param publicID\n */\nexport function isFileName(publicID) {\n return publicID.indexOf('/') < 0;\n}","/**\n *\n * @param publicID\n */\nexport function publicIDContainsVersion(publicID) {\n return publicID.match(/^v[0-9]+/);\n}","import { isUrl } from \"./urlUtils/isUrl.js\";\nimport { isFileName } from \"./urlUtils/isFileName.js\";\nimport { publicIDContainsVersion } from \"./urlUtils/publicIDContainsVersion.js\";\n/**\n * Create the URL prefix for Cloudinary resources.\n * Available use cases\n * http://res.cloudinary.com/{cloudName}\n * https://res.cloudinary.com/{cloudName}\n * https://{cloudName}-res.cloudinary.com/\n * http://{domain}/${cloudName}\n * https://{domain}/${cloudName}\n * https://{domain}\n * @private\n *\n * @param {string} cloudName\n * @param {IURLConfig} urlConfig\n */\nfunction getUrlPrefix(cloudName, urlConfig) {\n const secure = urlConfig.secure;\n const privateCDN = urlConfig.privateCdn;\n const cname = urlConfig.cname;\n const secureDistribution = urlConfig.secureDistribution;\n if (!secure && !cname) {\n return `http://res.cloudinary.com/${cloudName}`;\n }\n if (secure && !secureDistribution && privateCDN) {\n return `https://${cloudName}-res.cloudinary.com`;\n }\n if (secure && !secureDistribution) {\n return `https://res.cloudinary.com/${cloudName}`;\n }\n if (secure && secureDistribution && privateCDN) {\n return `https://${secureDistribution}`;\n }\n if (secure && secureDistribution) {\n return `https://${secureDistribution}/${cloudName}`;\n }\n if (!secure && cname) {\n return `http://${cname}/${cloudName}`;\n } else {\n return 'ERROR';\n }\n}\n/**\n * @private\n * @param assetType\n */\nfunction handleAssetType(assetType) {\n //default to image\n if (!assetType) {\n return 'image';\n }\n return assetType;\n}\n/**\n * @private\n * @param deliveryType\n */\nfunction handleDeliveryType(deliveryType) {\n //default to upload\n if (!deliveryType) {\n return 'upload';\n }\n return deliveryType;\n}\n/**\n *\n * @param {string} publicID\n * @param {number} version\n * @param {boolean} forceVersion\n */\nfunction getUrlVersion(publicID, version, forceVersion) {\n const shouldForceVersion = forceVersion !== false;\n if (version) {\n return `v${version}`;\n }\n // In all these conditions we never force a version\n if (publicIDContainsVersion(publicID) || isUrl(publicID) || isFileName(publicID)) {\n return '';\n }\n return shouldForceVersion ? 'v1' : '';\n}\nexport { handleAssetType, getUrlVersion, handleDeliveryType, getUrlPrefix };","/**\n *\n * @private\n * @param {any} a\n */\nfunction isObject(a) {\n if (typeof a !== 'object' || a instanceof Array) {\n return false;\n } else {\n return true;\n }\n}\nclass Config {\n filterOutNonSupportedKeys(userProvidedConfig, validKeys) {\n const obj = Object.create({});\n if (isObject(userProvidedConfig)) {\n Object.keys(userProvidedConfig).forEach(key => {\n if (validKeys.indexOf(key) >= 0) {\n obj[key] = userProvidedConfig[key];\n } else {\n console.warn('Warning - unsupported key provided to configuration: ', key);\n }\n });\n return obj;\n } else {\n return Object.create({});\n }\n }\n}\nexport default Config;","/**\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 */\n/**\n * @private\n */\nexport const ALLOWED_URL_CONFIG = ['cname', 'secureDistribution', 'privateCdn', 'signUrl', 'longUrlSignature', 'shorten', 'useRootPath', 'secure', 'forceVersion', 'analytics', 'queryParams'];\n/**\n * @private\n */\nexport const ALLOWED_CLOUD_CONFIG = ['cloudName', 'apiKey', 'apiSecret', 'authToken'];","import Config from \"./BaseConfig.js\";\nimport { ALLOWED_URL_CONFIG } from \"../internal/internalConstants.js\";\nclass URLConfig extends Config {\n /**\n * @param {IURLConfig} userURLConfig\n */\n constructor(userURLConfig) {\n super();\n const urlConfig = this.filterOutNonSupportedKeys(userURLConfig, ALLOWED_URL_CONFIG);\n Object.assign(this, {\n secure: true\n }, urlConfig);\n }\n extend(userURLConfig) {\n const urlConfig = this.filterOutNonSupportedKeys(userURLConfig, ALLOWED_URL_CONFIG);\n return new URLConfig(Object.assign({}, this, urlConfig));\n }\n /**\n * @param {string} value Sets the cname\n */\n setCname(value) {\n this.cname = value;\n return this;\n }\n /**\n * @param {string} value Sets the secureDistribution\n */\n setSecureDistribution(value) {\n this.secureDistribution = value;\n return this;\n }\n /**\n * @param {boolean} value Sets whether to use a private CDN (Removes cloudName from URL)\n */\n setPrivateCdn(value) {\n this.privateCdn = value;\n return this;\n }\n /**\n * @param value Sets whether or not to sign the URL\n */\n setSignUrl(value) {\n this.signUrl = value;\n return this;\n }\n /**\n * @param value Sets whether or not to use a long signature\n */\n setLongUrlSignature(value) {\n this.longUrlSignature = value;\n return this;\n }\n /**\n * @param value Sets whether or not to shorten the URL\n */\n setShorten(value) {\n this.shorten = value;\n return this;\n }\n /**\n * @param value Sets whether or not to use a root path\n */\n setUseRootPath(value) {\n this.useRootPath = value;\n return this;\n }\n /**\n * @param value Sets whether or not to deliver the asset through https\n */\n setSecure(value) {\n this.secure = value;\n return this;\n }\n /**\n * @param value Sets whether to force a version in the URL\n */\n setForceVersion(value) {\n this.forceVersion = value;\n return this;\n }\n /**\n * @param params Sets additional params\n */\n setQueryParams(params) {\n this.queryParams = params;\n return this;\n }\n}\nexport default URLConfig;","/**\n * @private\n * @description Adds left padding to a string with the desired substring the provided number of times\n * @example stringPad(foo, 3, 'a'') // -> aaafoo\n * @param {string} value\n * @param {number} _targetLength\n * @param {string} _padString\n */\nexport function stringPad(value, _targetLength, _padString) {\n let targetLength = _targetLength >> 0; //truncate if number or convert non-number to 0;\n let padString = String(typeof _padString !== 'undefined' ? _padString : ' ');\n if (value.length > targetLength) {\n return String(value);\n } else {\n targetLength = targetLength - value.length;\n if (targetLength > padString.length) {\n padString += repeatStringNumTimes(padString, targetLength / padString.length);\n }\n return padString.slice(0, targetLength) + String(value);\n }\n}\n/**\n * @description Repeat a string multiple times, cross-browser-safe alternative to string.repeat()\n * @param string\n * @param _times\n */\nfunction repeatStringNumTimes(string, _times) {\n let times = _times;\n let repeatedString = \"\";\n while (times > 0) {\n repeatedString += string;\n times--;\n }\n return repeatedString;\n}","import { stringPad } from \"./stringPad.js\";\n/**\n * This file maps sequences of 6 bit binary digits to a character in base64.\n * 000000 -> A\n * 110011 -> Z\n * 111111 -> /\n */\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst base64Map = {};\nlet num = 0;\nchars.split('').forEach(char => {\n let key = num.toString(2);\n key = stringPad(key, 6, '0');\n base64Map[key] = char;\n num++;\n});\n/**\n * Map of [six-bit binary codes] -> [Base64 characters]\n */\nexport { base64Map };","/**\n * @private\n * @description Reverses the version positions, x.y.z turns to z.y.x\n * Example: 1.2.3 -> 03.02.01\n * @param {string} semVer Input can be either x.y.z or x.y\n * @return {string} in the form of zz.yy.xx (\n */\nexport function reverseVersion(semVer) {\n if (semVer.split('.').length < 2) {\n throw new Error('invalid semVer, must have at least two segments');\n }\n // Split by '.', reverse, create new array\n return semVer.split('.').reverse().join('.');\n}","import { stringPad } from \"./stringPad.js\";\n/**\n * @private\n * @description Pads each segment with '0' so they have length of 2\n * @param {string} semVer Input can be either x.y.z or x.y\n * @return {string} in the form of xx.yy.zz (\n */\nexport function padVersion(semVer) {\n if (semVer.split('.').length < 2) {\n throw new Error('invalid semVer, must have at least two segments');\n }\n // Split by '.', reverse, create new array with padded values and concat it together\n return semVer.split('.').map(segment => {\n // try to cast to number\n const asNumber = +segment;\n if (isNaN(asNumber) || asNumber < 0) {\n throw 'Invalid version number provided';\n }\n return stringPad(segment, 2, '0');\n }).join('.');\n}","import { base64Map } from \"./base64Map.js\";\nimport { stringPad } from \"./stringPad.js\";\nimport { reverseVersion } from \"./reverseVersion.js\";\nimport { padVersion } from \"./padVersion.js\";\n/**\n * @private\n * @description Encodes a semVer-like version string\n * @param {string} semVer Input can be either x.y.z or x.y\n * @return {string} A string built from 3 characters of the base64 table that encode the semVer\n */\nexport function encodeVersion(semVer) {\n let strResult = '';\n // support x.y or x.y.z by using 'parts' as a variable\n const parts = semVer.split('.').length;\n const paddedStringLength = parts * 6; // we pad to either 12 or 18 characters\n // reverse (but don't mirror) the version. 1.5.15 -> 15.5.1\n const reversedSemver = reverseVersion(semVer);\n // Pad to two spaces, 15.5.1 -> 15.05.01\n const paddedSemver = padVersion(reversedSemver);\n // turn 15.05.01 to a string '150501' then to a number 150501\n const num = parseInt(paddedSemver.split('.').join(''));\n // Represent as binary, add left padding to 12 or 18 characters.\n // 150,501 -> 100100101111100101\n let paddedBinary = num.toString(2);\n paddedBinary = stringPad(paddedBinary, paddedStringLength, '0');\n // Stop in case an invalid version number was provided\n // paddedBinary must be built from sections of 6 bits\n if (paddedBinary.length % 6 !== 0) {\n throw 'Version must be smaller than 43.21.26)';\n }\n // turn every 6 bits into a character using the base64Map\n paddedBinary.match(/.{1,6}/g).forEach(bitString => {\n // console.log(bitString);\n strResult += base64Map[bitString];\n });\n return strResult;\n}","/**\n * @private\n * @description Gets the analyticsOptions from options- should include sdkSemver, techVersion, sdkCode, and feature\n * @param {ITrackedPropertiesThroughAnalytics} options\n * @returns {IAnalyticsOptions}\n */\nexport function getAnalyticsOptions(options) {\n const analyticsOptions = {\n sdkSemver: options.sdkSemver,\n techVersion: options.techVersion,\n sdkCode: options.sdkCode,\n product: options.product,\n feature: '0',\n osType: options.osType,\n osVersion: options.osVersion\n };\n if (options.accessibility) {\n analyticsOptions.feature = 'D';\n }\n if (options.lazyload) {\n analyticsOptions.feature = 'C';\n }\n if (options.responsive) {\n analyticsOptions.feature = 'A';\n }\n if (options.placeholder) {\n analyticsOptions.feature = 'B';\n }\n return analyticsOptions;\n}","const packageVersion = '1.19.0';\n/**\n * Export package version (injected during our build).\n * Reason for this is that If we import values from from package.json,\n * it will cause an error for users who do not have an 'import from json' plugin\n * as part of their build process / bundler.\n */\nexport { packageVersion };","import { base64Map } from \"./base64Map.js\";\n/**\n * @private\n * @description Encodes a semVer-like version string for OS\n * @param {string} semVer Input is x.y\n * @return {string} A string built from 2 characters of the base64 table that encode the semVer\n */\nexport function encodeOSVersion(semVer) {\n const [major, minor] = semVer.split('.');\n //convert to binary\n const binaryMajorVersion = parseInt(major).toString(2);\n const binaryMinorVersion = parseInt(minor).toString(2);\n //pad to 6\n const paddedMajor = binaryMajorVersion.padStart(6, '0');\n const paddedMinor = binaryMinorVersion.padStart(6, '0');\n return base64Map[paddedMajor] + base64Map[paddedMinor];\n}","import { encodeVersion } from \"./encodeVersion.js\";\nimport { getAnalyticsOptions } from \"./getAnalyticsOptions.js\";\nimport { packageVersion } from \"../internal/utils/packageVersion.js\";\nimport { encodeOSVersion } from \"./encodeOSVersion.js\";\n/**\n * @private\n * @description Try to get the node version out of process, if browser just return 0.0.0\n */\nfunction getNodeVersion() {\n const failedVersion = '0.0.0';\n if (typeof window !== 'undefined') {\n return failedVersion;\n } else {\n // node env\n try {\n return process.versions.node || failedVersion;\n } catch (e) {\n return failedVersion;\n }\n }\n}\n/**\n * @private\n * @description Ensure that all values ITrackedPropertiesThroughAnalytics are populated.\n * Accept a partial map of values and returns the complete interface of ITrackedPropertiesThroughAnalytics\n * @param {ITrackedPropertiesThroughAnalytics} trackedAnalytics\n * @param {ITrackedPropertiesThroughAnalytics} trackedAnalytics\n */\nfunction ensureShapeOfTrackedProperties(trackedAnalytics) {\n // try to get the process version from node, but if we're on the client return 0.0.0\n const defaults = {\n techVersion: getNodeVersion(),\n sdkCode: 'T',\n sdkSemver: packageVersion.split('-')[0],\n product: 'A',\n osType: 'Z',\n osVersion: '0.0',\n responsive: false,\n placeholder: false,\n lazyload: false,\n accessibility: false\n };\n if (!trackedAnalytics) {\n return defaults;\n } else {\n return Object.assign(Object.assign({}, defaults), trackedAnalytics);\n }\n}\n/**\n * @private\n * @description Creates the complete SDK signature by using all the values provided by ITrackedPropertiesThroughAnalytics\n * Creation of the signature\n * - Set the AlgoVersion of the encoding, this is an internal letter that represents the version\n * of our encoding algorithm, it will allow us to perform breaking changes if we'll need them.\n * - Take the constant SDK code (Arbitrary letter chosen for each SDK, for Base that letter is 'T')\n * this is used to tell apart which SDK is being tracked.\n * - Take the {major.minor} versions of the node version (techVersion) (14.2, 16.2 etc.)\n * - Take the full semver of the SDK you wish to track\n * - Take the features used(lazy, placeholder etc.) and turn them to a letter (for example accessibility -> D)\n * - Before appending the string, the Versions must be encoded, see the function `encodeVersion` for more details\n * - Append all the variables to a single string\n * - In any case of an error, return the single letter 'E'\n *\n * @return {string} sdkAnalyticsSignature\n */\nexport function getSDKAnalyticsSignature(_trackedAnalytics) {\n const trackedAnalytics = ensureShapeOfTrackedProperties(_trackedAnalytics);\n const analyticsOptions = getAnalyticsOptions(trackedAnalytics);\n try {\n const twoPartVersion = removePatchFromSemver(analyticsOptions.techVersion);\n const encodedSDKVersion = encodeVersion(analyticsOptions.sdkSemver);\n const encodedTechVersion = encodeVersion(twoPartVersion);\n const encodedOSVersion = encodeOSVersion(analyticsOptions.osVersion);\n const featureCode = analyticsOptions.feature;\n const SDKCode = analyticsOptions.sdkCode;\n const {\n product,\n osType\n } = analyticsOptions;\n const algoVersion = 'D'; // The algo version is determined here, it should not be an argument\n return `${algoVersion}${product}${SDKCode}${encodedSDKVersion}${encodedTechVersion}${osType}${encodedOSVersion}${featureCode}`;\n } catch (e) {\n // Either SDK or Node versions were unparsable\n return 'E';\n }\n}\n/**\n * @private\n * @description Removes patch version from the semver if it exists\n * Turns x.y.z OR x.y into x.y\n * @param {'x.y.z' | 'x.y' | string} semVerStr\n */\nfunction removePatchFromSemver(semVerStr) {\n const parts = semVerStr.split('.');\n return `${parts[0]}.${parts[1]}`;\n}","import { getUrlPrefix, getUrlVersion, handleAssetType, handleDeliveryType } from \"../internal/url/cloudinaryURL.js\";\nimport URLConfig from \"../config/URLConfig.js\";\nimport { getSDKAnalyticsSignature } from \"../sdkAnalytics/getSDKAnalyticsSignature.js\";\n/**\n * This const contains all the valid combination of asset/delivery for URL shortening purposes\n * It's exported because it's used in a test, but it's not really shared enough to belong in a separate file\n */\nexport const SEO_TYPES = {\n \"image/upload\": \"images\",\n \"image/private\": \"private_images\",\n \"image/authenticated\": \"authenticated_images\",\n \"raw/upload\": \"files\",\n \"video/upload\": \"videos\"\n};\n/**\n * @description Cloudinary file without a transformation\n * @summary SDK\n * @memberOf SDK\n */\nclass CloudinaryFile {\n constructor(publicID, cloudConfig = {}, urlConfig) {\n this.setPublicID(publicID);\n this.setCloudConfig(cloudConfig);\n this.setURLConfig(urlConfig);\n }\n /**\n * @description Sets the URL Config for this asset\n * @param urlConfig\n * @return {this}\n */\n setURLConfig(urlConfig) {\n this.urlConfig = new URLConfig(urlConfig);\n return this;\n }\n /**\n * @description Sets the Cloud Config for this asset\n * @param urlConfig\n * @return {this}\n */\n setCloudConfig(cloudConfig) {\n this.cloudName = cloudConfig.cloudName;\n this.apiKey = cloudConfig.apiKey;\n this.apiSecret = cloudConfig.apiSecret;\n this.authToken = cloudConfig.authToken;\n return this;\n }\n /**\n * @description Sets the public ID of the asset.\n * @param {string} publicID The public ID of the asset.\n * @return {this}\n */\n setPublicID(publicID) {\n // PublicID must be a string!\n this.publicID = publicID ? publicID.toString() : '';\n return this;\n }\n /**\n * @description Sets the delivery type of the asset.\n * @param {DELIVERY_TYPE | string} newType The type of the asset.\n * @return {this}\n */\n setDeliveryType(newType) {\n this.deliveryType = newType;\n return this;\n }\n /**\n * @description Sets the URL SEO suffix of the asset.\n * @param {string} newSuffix The SEO suffix.\n * @return {this}\n */\n setSuffix(newSuffix) {\n this.suffix = newSuffix;\n return this;\n }\n /**\n * @description Sets the signature of the asset.\n * @param {string} signature The signature.\n * @return {this}\n */\n setSignature(signature) {\n this.signature = signature;\n return this;\n }\n /**\n * @description Sets the version of the asset.\n * @param {string} newVersion The version of the asset.\n * @return {this}\n */\n setVersion(newVersion) {\n if (newVersion) {\n this.version = newVersion;\n }\n return this;\n }\n /**\n * @description Sets the asset type.\n * @param {string} newType The type of the asset.\n * @return {this}\n */\n setAssetType(newType) {\n if (newType) {\n this.assetType = newType;\n }\n return this;\n }\n sign() {\n return this;\n }\n /**\n * @description Serializes to URL string\n * @param overwriteOptions\n */\n toURL(overwriteOptions = {}) {\n return this.createCloudinaryURL(null, overwriteOptions.trackedAnalytics);\n }\n /**\n * @description Validate various options before attempting to create a URL\n * The function will throw in case a violation\n * @throws Validation errors\n */\n validateAssetForURLCreation() {\n if (typeof this.cloudName === 'undefined') {\n throw 'You must supply a cloudName when initializing the asset';\n }\n const suffixContainsDot = this.suffix && this.suffix.indexOf('.') >= 0;\n const suffixContainsSlash = this.suffix && this.suffix.indexOf('/') >= 0;\n if (suffixContainsDot || suffixContainsSlash) {\n throw '`suffix`` should not include . or /';\n }\n }\n /**\n * @description return an SEO friendly name for a combination of asset/delivery, some examples:\n * * image/upload -> images\n * * video/upload -> videos\n * If no match is found, return `{asset}/{delivery}`\n */\n getResourceType() {\n const assetType = handleAssetType(this.assetType);\n const deliveryType = handleDeliveryType(this.deliveryType);\n const hasSuffix = !!this.suffix;\n const regularSEOType = `${assetType}/${deliveryType}`;\n const shortSEOType = SEO_TYPES[`${assetType}/${deliveryType}`];\n const useRootPath = this.urlConfig.useRootPath;\n const shorten = this.urlConfig.shorten;\n // Quick exit incase of useRootPath\n if (useRootPath) {\n if (regularSEOType === 'image/upload') {\n return ''; // For image/upload we're done, just return nothing\n } else {\n throw new Error(`useRootPath can only be used with assetType: 'image' and deliveryType: 'upload'. Provided: ${regularSEOType} instead`);\n }\n }\n if (shorten && regularSEOType === 'image/upload') {\n return 'iu';\n }\n if (hasSuffix) {\n if (shortSEOType) {\n return shortSEOType;\n } else {\n throw new Error(`URL Suffix only supported for ${Object.keys(SEO_TYPES).join(', ')}, Provided: ${regularSEOType} instead`);\n }\n }\n // If all else fails, return the regular image/upload combination (asset/delivery)\n return regularSEOType;\n }\n getSignature() {\n if (this.signature) {\n return `s--${this.signature}--`;\n } else {\n return '';\n }\n }\n /**\n *\n * @description Creates a fully qualified CloudinaryURL\n * @return {string} CloudinaryURL\n * @throws Validation Errors\n */\n createCloudinaryURL(transformation, trackedAnalytics) {\n // In accordance with the existing implementation, if no publicID exists we should return nothing.\n if (!this.publicID) {\n return '';\n }\n // Throws if some options are mis-configured\n // See the function for more information on when it throws\n this.validateAssetForURLCreation();\n const prefix = getUrlPrefix(this.cloudName, this.urlConfig);\n const transformationString = transformation ? transformation.toString() : '';\n const version = getUrlVersion(this.publicID, this.version, this.urlConfig.forceVersion);\n const publicID = this.publicID;\n if (typeof transformation === 'string') {\n const url = [prefix, this.getResourceType(), this.getSignature(), transformationString, version, publicID.replace(/,/g, '%2C'), this.suffix].filter(a => a).join('/');\n return url;\n } else {\n // Avoid applying encodeURI on entire string in case where we have transformations with comma (i.e. f_auto,q_auto)\n // Since encodeURI does not encode commas we replace commas *only* on the publicID\n const safeURL = [encodeURI(prefix), this.getResourceType(), this.getSignature(), encodeURI(transformationString), version, encodeURI(publicID).replace(/,/g, '%2C'), this.suffix && encodeURI(this.suffix)].filter(a => a).join('/').replace(/\\?/g, '%3F').replace(/=/g, '%3D');\n const shouldAddAnalytics = this.urlConfig.analytics !== false && !publicID.includes('?');\n let queryParamsString = '';\n if (typeof this.urlConfig.queryParams === 'object') {\n try {\n const queryParams = new URLSearchParams(this.urlConfig.queryParams);\n if (shouldAddAnalytics) {\n queryParams.set(\"_a\", getSDKAnalyticsSignature(trackedAnalytics));\n }\n queryParamsString = queryParams.toString();\n } catch (err) {\n console.error('Error: URLSearchParams is not available so the queryParams object cannot be parsed, please try passing as an already parsed string');\n }\n } else {\n queryParamsString = this.urlConfig.queryParams || '';\n if (shouldAddAnalytics) {\n queryParamsString += `${queryParamsString.length > 0 ? '&' : ''}_a=${getSDKAnalyticsSignature(trackedAnalytics)}`;\n }\n }\n if (queryParamsString) {\n return `${safeURL}?${queryParamsString}`;\n } else {\n return safeURL;\n }\n }\n }\n}\nexport { CloudinaryFile };","import { CloudinaryFile } from \"./CloudinaryFile.js\";\nimport { DeliveryFormatAction } from \"@cloudinary/transformation-builder-sdk/actions/delivery/DeliveryFormatAction\";\n/**\n * @desc Cloudinary Transformable interface, extended by any class that needs a Transformation Interface\n * @summary SDK\n * @memberOf SDK\n */\nclass CloudinaryTransformable extends CloudinaryFile {\n constructor(publicID, cloudConfig, urlConfig, transformation) {\n /* istanbul ignore next */\n super(publicID, cloudConfig, urlConfig);\n this.transformation = transformation;\n }\n /**\n * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @param {Actions.Animated} animated\n * @return {this}\n */\n animated(animated) {\n this.transformation.animated(animated);\n return this;\n }\n /**\n * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @param {Actions.Border} border\n * @return {this}\n */\n border(border) {\n this.transformation.border(border);\n return this;\n }\n /**\n * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @param {Actions.Reshape} reshape\n * @return {this}\n */\n reshape(reshape) {\n this.transformation.reshape(reshape);\n return this;\n }\n /**\n * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @param {Actions.Resize} resize\n * @return {this}\n */\n resize(resize) {\n this.transformation.resize(resize);\n return this;\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 * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @param {Actions.RoundCorners} roundCorners\n * @return {this}\n */\n roundCorners(roundCorners) {\n this.transformation.roundCorners(roundCorners);\n return this;\n }\n /**\n * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @return {this}\n */\n overlay(overlayAction) {\n this.transformation.overlay(overlayAction);\n return this;\n }\n /**\n * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @param {Actions.Variable} variableAction\n * @return {this}\n */\n addVariable(variableAction) {\n this.transformation.addVariable(variableAction);\n return this;\n }\n /**\n * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @param {Actions.Condition} conditionalAction\n * @return {this}\n */\n conditional(conditionalAction) {\n this.transformation.conditional(conditionalAction);\n return this;\n }\n /**\n * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @param {Actions.Effect} effect\n * @return {this}\n */\n effect(effect) {\n this.transformation.effect(effect);\n return this;\n }\n /**\n * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @param {Actions.Adjust} action\n * @return {this}\n */\n adjust(action) {\n this.transformation.adjust(action);\n return this;\n }\n /**\n * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @param {Actions.Rotate} rotate\n * @return {this}\n */\n rotate(rotate) {\n this.transformation.rotate(rotate);\n return this;\n }\n /**\n * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @param {Actions.NamedTransformation} namedTransformation\n * @return {this}\n */\n namedTransformation(namedTransformation) {\n this.transformation.namedTransformation(namedTransformation);\n return this;\n }\n /**\n * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @param {Actions.Delivery} deliveryAction\n * @return {this}\n */\n delivery(deliveryAction) {\n this.transformation.delivery(deliveryAction);\n return this;\n }\n /**\n * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @param {Qualifiers.color} color\n * @return {this}\n */\n backgroundColor(color) {\n this.transformation.backgroundColor(color);\n return this;\n }\n /**\n * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @param {Actions.PSDTools} action\n * @return {this}\n */\n psdTools(action) {\n this.transformation.psdTools(action);\n return this;\n }\n /**\n * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @param {Actions.Extract} action\n * @return {this}\n */\n extract(action) {\n this.transformation.extract(action);\n return this;\n }\n /**\n * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @param {Qualifiers.Flag | string} flagQualifier\n * @return {this}\n */\n addFlag(flagQualifier) {\n this.transformation.addFlag(flagQualifier);\n return this;\n }\n /**\n * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @param {Actions.CustomFunction} customFunction\n * @return {this}\n */\n customFunction(customFunction) {\n this.transformation.customFunction(customFunction);\n return this;\n }\n /**\n * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @param {SDK.Action | string} action\n * @return {this}\n */\n addAction(action) {\n this.transformation.addAction(action);\n return this;\n }\n /**\n * @description Extend your transformation with another transformation\n * @param { string | SDK.Transformation } tx\n */\n addTransformation(tx) {\n this.transformation.addTransformation(tx);\n return this;\n }\n /**\n * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @return {string}\n */\n toString() {\n return this.transformation.toString();\n }\n /**\n * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @return {this}\n */\n underlay(underlayAction) {\n this.transformation.underlay(underlayAction);\n return this;\n }\n toURL(overwriteOptions = {}) {\n return this.createCloudinaryURL(this.transformation, overwriteOptions === null || overwriteOptions === void 0 ? void 0 : overwriteOptions.trackedAnalytics);\n }\n}\nexport { CloudinaryTransformable };","import { ImageTransformation } from \"@cloudinary/transformation-builder-sdk/transformation/ImageTransformation\";\nimport { CloudinaryTransformable } from \"./CloudinaryTransformable.js\";\n/**\n * @desc Cloudinary image asset, with image-related transformations\n * @summary SDK\n * @memberOf SDK\n */\nclass CloudinaryImage extends CloudinaryTransformable {\n constructor(publicID, cloudConfig, urlConfig) {\n /* istanbul ignore next */\n super(publicID, cloudConfig, urlConfig, new ImageTransformation());\n }\n}\nexport { CloudinaryImage };","import { Transformation } from \"./Transformation.js\";\n/**\n * @summary SDK\n * @extends {SDK.Transformation}\n * @memberOf SDK\n */\nclass VideoTransformation extends Transformation {}\nexport { VideoTransformation };","import { Action } from \"../../internal/Action.js\";\nimport { Qualifier } from \"../../internal/qualifier/Qualifier.js\";\nimport { QualifierValue } from \"../../internal/qualifier/QualifierValue.js\";\n/**\n * @description A class to round one or more corners of an image or video.\n * @extends SDK.Action\n * @memberOf Actions.RoundCorners\n * @see Visit {@link Actions.RoundCorners|RoundCorners} for an example\n */\nclass RoundCornersAction extends Action {\n constructor() {\n super();\n this._actionModel = {};\n this._actionModel.actionType = 'roundCorners';\n }\n /**\n * @param {number} a\n * @param {number} b\n * @param {number} c\n * @param {number} d\n * @return {RoundCornersAction}\n */\n radius(a, b, c, d) {\n const qualifierValue = new QualifierValue();\n // In case a === 0, check typeof\n a !== undefined && qualifierValue.addValue(a);\n b !== undefined && qualifierValue.addValue(b);\n c !== undefined && qualifierValue.addValue(c);\n d !== undefined && qualifierValue.addValue(d);\n const definedRadiuses = [a, b, c, d].filter(r => r !== undefined);\n this._radius = definedRadiuses;\n this._actionModel.radius = definedRadiuses;\n this.addQualifier(new Qualifier('r').addValue(qualifierValue));\n return this;\n }\n /**\n * @description Applies maximum rounding to the corners of the asset. An asset with square dimensions becomes a circle.\n */\n max() {\n this._radius = 'max';\n this._actionModel.radius = 'max';\n return this.addQualifier(new Qualifier('r', 'max'));\n }\n getRadius() {\n return this._radius;\n }\n static fromJson(actionModel) {\n const {\n radius\n } = 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 (Array.isArray(radius)) {\n result.radius(radius[0], radius[1], radius[2], radius[3]);\n }\n if (radius === 'max') {\n result.max();\n }\n return result;\n }\n}\nexport default RoundCornersAction;","/**\n * @description Round one or more corners of an image or video.\n *\n * Learn more:\n * {@link https://cloudinary.com/documentation/effects_and_artistic_enhancements#rounding_corners_and_creating_circular_images|Rounded images}\n * {@link https://cloudinary.com/documentation/video_effects_and_enhancements#rounding|Rounded videos}\n * @memberOf Actions\n * @namespace RoundCorners\n * @example\n * Round corners by a radius\n * import {Cloudinary} from \"@cloudinary/url-gen\";\n * import {byRadius, max} from \"@cloudinary/url-gen/actions/roundCorners\";\n *\n * const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}});\n * const image = yourCldInstance.image('woman');\n * // By a radius\n * image.roundCorners(byRadius(10));\n * // Or just the maximum possible\n * image.roundCorners(max());\n * image.toString();\n */\nimport RoundCornersAction from \"./roundCorners/RoundCornersAction.js\";\n/**\n * @summary action\n * @description Generates an asset with a circular crop using the 'max' radius value.\n * @memberOf Actions.RoundCorners\n * @return {Actions.RoundCorners.RoundCornersAction}\n */\nfunction max() {\n return new RoundCornersAction().max();\n}\n/**\n * @summary action\n * @description Rounds the specified corners of an image or a video by specifying 1-4 pixel values as follows:\n *\n * * 1 value: All four corners are rounded equally according to the specified value.\n * * 2 values: 1st value => top-left & bottom-right. 2nd value => top-right & bottom-left.\n * * 3 values: 1st value => top-left. 2nd value => top-right & bottom-left. 3rd value => bottom-right.\n * * 4 values: Each corner specified separately, in clockwise order, starting with top-left.\n *\n * @param {number} a\n * @param {number} b\n * @param {number} c\n * @param {number} d\n * @memberOf Actions.RoundCorners\n * @return {Actions.RoundCorners.RoundCornersAction}\n */\nfunction byRadius(a, b, c, d) {\n return new RoundCornersAction().radius(a, b, c, d);\n}\nconst RoundCorners = {\n byRadius,\n max\n};\nexport { RoundCorners, byRadius, max };","import { CloudinaryTransformable } from \"./CloudinaryTransformable.js\";\nimport { VideoTransformation } from \"../transformation/VideoTransformation.js\";\n/**\n * @desc Cloudinary video asset, with video-related transformations\n * @summary SDK\n * @memberOf SDK\n */\nclass CloudinaryVideo extends CloudinaryTransformable {\n constructor(publicID, cloudConfig, urlConfig) {\n /* istanbul ignore next */\n super(publicID, cloudConfig, urlConfig, new VideoTransformation());\n this.assetType = 'video';\n }\n /**\n * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @param {Actions.Transcode} action\n * @return {this}\n */\n transcode(action) {\n this.transformation.transcode(action);\n return this;\n }\n /**\n * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation\n * @param {Actions.VideoEdit} action\n * @return {this}\n */\n videoEdit(action) {\n this.transformation.videoEdit(action);\n return this;\n }\n}\nexport { CloudinaryVideo };","import { CloudinaryImage } from \"../assets/CloudinaryImage.js\";\nimport { CloudinaryVideo } from \"../assets/CloudinaryVideo.js\";\nclass Cloudinary {\n constructor(cloudinaryConfig) {\n if (cloudinaryConfig) {\n this.cloudinaryConfig = cloudinaryConfig;\n }\n }\n image(publicID) {\n return new CloudinaryImage(publicID, this.cloudinaryConfig.cloud, this.cloudinaryConfig.url);\n }\n video(publicID) {\n return new CloudinaryVideo(publicID, this.cloudinaryConfig.cloud, this.cloudinaryConfig.url);\n }\n setConfig(cloudinaryConfig) {\n this.cloudinaryConfig = cloudinaryConfig;\n return this;\n }\n getConfig() {\n return this.cloudinaryConfig;\n }\n extendConfig() {\n // Future implementation\n }\n}\nexport { Cloudinary };","import { ResourceType } from '@server/collections/fileSystem/types/fileSystem.types';\r\nimport { Injectable } from '@angular/core';\r\nimport { Cloudinary } from '@cloudinary/url-gen/instance/Cloudinary';\r\nimport { crop, fill, scale, pad, thumbnail } from '@cloudinary/url-gen/actions/resize';\r\nimport { focusOn } from \"@cloudinary/url-gen/qualifiers/gravity\";\r\nimport { FocusOn } from \"@cloudinary/url-gen/qualifiers/focusOn\";\r\nimport { byRadius, max } from \"@cloudinary/url-gen/actions/roundCorners\";\r\nimport { CloudinaryImage } from '@cloudinary/url-gen/assets/CloudinaryImage';\r\n\r\nexport type ResizeMode = 'fill' | 'scale' | 'crop' | 'thumb' | 'avatar' | 'pad';\r\nexport enum ResizeModeEnum { 'fill', 'scale', 'crop', 'thumb', 'avatar', 'pad' };\r\nexport type UploadPreset = 'image' | 'video' | 'raw' | 'company-video' | 'company-video-4-3';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CloudinaryService {\r\n public cloudName = 'expometals';\r\n public uploadImagePreset = 'upload-client-image';\r\n public api_key = '554728287486758';\r\n public uploadPresets = new Map([\r\n ['image', 'upload-client-image'],\r\n ['company-video', '16-9-video'],\r\n ['company-video-4-3', '4-3-video'],\r\n ['video', 'video'],\r\n ['raw', 'raw-files'],\r\n ])\r\n constructor() { }\r\n\r\n public get uploadUrl(): string {\r\n return `https://api.cloudinary.com/v1_1/${this.cloudName}/upload`;\r\n }\r\n\r\n public get uploadLargeUrl(): string {\r\n return `${this.uploadUrl}_large`;\r\n }\r\n\r\n private get cld() {\r\n return new Cloudinary({\r\n cloud: {\r\n cloudName: this.cloudName\r\n }\r\n });\r\n }\r\n\r\n getImageUrl(file: string, w: number, h: number, mode: ResizeMode | ResizeModeEnum, round = false): string {\r\n const { cld } = this;\r\n const img = cld.image(file).format('auto').quality('auto');\r\n\r\n return this.transform(img, w, h, mode, round).toURL();\r\n }\r\n\r\n getVideoImageUrl(public_id: string, w: number, h: number, mode: ResizeMode | ResizeModeEnum) {\r\n const { cld } = this;\r\n const img = cld.image(public_id).setAssetType('video').format('auto').quality('auto');\r\n return this.transform(img, w, h, mode).toURL();\r\n }\r\n\r\n getDownloadUrl(): string {\r\n return\r\n }\r\n\r\n getTruncatedUrl(secureUrl: string): string {\r\n return secureUrl.match(/v[0-9]{10}.*$/)[0];\r\n }\r\n\r\n getUrl(public_id: string, resourceType: ResourceType): string {\r\n return this.cld.image(public_id).setAssetType(resourceType).toURL();\r\n }\r\n\r\n private transform(img, w: number, h: number, mode: ResizeMode | ResizeModeEnum, round = false): CloudinaryImage {\r\n switch (mode) {\r\n case 'fill':\r\n case ResizeModeEnum.fill:\r\n img.resize(fill(w, h));\r\n break;\r\n case 'scale':\r\n case ResizeModeEnum.scale:\r\n img.resize(scale(w, h));\r\n break;\r\n case 'crop':\r\n case ResizeModeEnum.crop:\r\n img.resize(crop(w, h));\r\n break;\r\n case 'avatar':\r\n case ResizeModeEnum.avatar:\r\n img.resize(thumbnail(w, h).gravity(focusOn(FocusOn.face()))).roundCorners(max());\r\n break;\r\n case 'pad':\r\n case ResizeModeEnum.pad:\r\n img.resize(pad(w, h));\r\n break;\r\n }\r\n\r\n if (round) {\r\n img.roundCorners(max());\r\n }\r\n return img;\r\n }\r\n\r\n}\r\n"],"mappings":"0CAIA,IAAMA,EAAN,KAAqB,CAKnB,YAAYC,EAAgB,CAC1B,KAAK,OAAS,CAAC,EACf,KAAK,UAAY,IACb,KAAK,SAASA,C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EAAKJ,EAAGC,EAAGC,CAAI,EAAEO,MAAK,CAC9C,CAEAI,gBAAc,CAEd,CAEAC,gBAAgBC,EAAiB,CAC/B,OAAOA,EAAUC,MAAM,eAAe,EAAE,CAAC,CAC3C,CAEAC,OAAON,EAAmBO,EAA0B,CAClD,OAAO,KAAKvB,IAAIU,MAAMM,CAAS,EAAEC,aAAaM,CAAY,EAAET,MAAK,CACnE,CAEQD,UAAUJ,EAAKJ,EAAWC,EAAWC,EAAmCC,EAAQ,GAAK,CAC3F,OAAQD,EAAI,CACV,IAAK,OACL,KAAKjB,EAAekC,KAClBf,EAAIgB,OAAOD,GAAKnB,EAAGC,CAAC,CAAC,EACrB,MACF,IAAK,QACL,KAAKhB,EAAeoC,MAClBjB,EAAIgB,OAAOC,GAAMrB,EAAGC,CAAC,CAAC,EACtB,MACF,IAAK,OACL,KAAKhB,EAAeqC,KAClBlB,EAAIgB,OAAOE,GAAKtB,EAAGC,CAAC,CAAC,EACrB,MACF,IAAK,SACL,KAAKhB,EAAesC,OAClBnB,EAAIgB,OAAOI,GAAUxB,EAAGC,CAAC,EAAEwB,QAAQC,EAAQC,GAAQC,KAAI,CAAE,CAAC,CAAC,EAAEC,aAAaC,GAAG,CAAE,EAC/E,MACF,IAAK,MACL,KAAK7C,EAAe8C,IAClB3B,EAAIgB,OAAOW,GAAI/B,EAAGC,CAAC,CAAC,EACpB,KACJ,CAEA,OAAIE,GACFC,EAAIyB,aAAaC,GAAG,CAAE,EAEjB1B,CACT,yCAlFWlB,EAAiB,yBAAjBA,EAAiB8C,QAAjB9C,EAAiB+C,UAAAC,WAFhB,MAAM,CAAA,EAEd,IAAOhD,EAAPiD,SAAOjD,CAAiB,GAAA","names":["QualifierValue","qualifierValue","v","value","delimiter","AspectRatioQualifierValue","QualifierValue","UnsupportedError","message","createUnsupportedError","qualifierToJson","createUnsupportedError","QualifierModel","qualifierToJson","Qualifier","QualifierModel","key","qualifierValue","QualifierValue","delimiter","value","FlagQualifier","Qualifier","flagType","flagValue","qualifierValue","QualifierValue","ignoreInitialAspectRatio","FlagQualifier","lossy","FlagQualifier","preserveTransparency","FlagQualifier","progressive","mode","regionRelative","relative","FlagQualifier","ar1X1","AspectRatioQualifierValue","ar5X4","ar4X3","ar3X2","ar16X9","ar3X1","ignoreInitialAspectRatio","AspectRatio","mapToSortedArray","map","flags","array","flag","v","actionToJson","_a","_b","_c","actionModelIsNotEmpty","sourceTransformationError","createUnsupportedError","ActionModel","actionToJson","Action","ActionModel","tag","mapToSortedArray","qualifier","key","value","FlagQualifier","Qualifier","flag","qualifierKey","qualifierValue","toFloatAsString","value","returnValue","objectFlip","obj","result","key","ACTION_TYPE_TO_CROP_MODE_MAP","ACTION_TYPE_TO_DELIVERY_MODE_MAP","ACTION_TYPE_TO_EFFECT_MODE_MAP","ACTION_TYPE_TO_QUALITY_MODE_MAP","ACTION_TYPE_TO_STREAMING_PROFILE_MODE_MAP","CHROMA_VALUE_TO_CHROMA_MODEL_ENUM","COLOR_SPACE_MODEL_MODE_TO_COLOR_SPACE_MODE_MAP","CHROMA_MODEL_ENUM_TO_CHROMA_VALUE","objectFlip","CHROMA_VALUE_TO_CHROMA_MODEL_ENUM","COLOR_SPACE_MODE_TO_COLOR_SPACE_MODEL_MODE_MAP","COLOR_SPACE_MODEL_MODE_TO_COLOR_SPACE_MODE_MAP","CROP_MODE_TO_ACTION_TYPE_MAP","ACTION_TYPE_TO_CROP_MODE_MAP","DELIVERY_MODE_TO_ACTION_TYPE_MAP","ACTION_TYPE_TO_DELIVERY_MODE_MAP","EFFECT_MODE_TO_ACTION_TYPE_MAP","ACTION_TYPE_TO_EFFECT_MODE_MAP","QUALITY_MODE_TO_ACTION_TYPE_MAP","ACTION_TYPE_TO_QUALITY_MODE_MAP","STREAMING_PROFILE_TO_ACTION_TYPE_MAP","ACTION_TYPE_TO_STREAMING_PROFILE_MODE_MAP","ResizeSimpleAction","Action","cropType","cropWidth","cropHeight","CROP_MODE_TO_ACTION_TYPE_MAP","Qualifier","x","ratio","AspectRatioQualifierValue","toFloatAsString","FlagQualifier","relative","regionRelative","actionModel","actionType","dimensions","aspectRatio","width","height","cropMode","ACTION_TYPE_TO_CROP_MODE_MAP","result","ignoreInitialAspectRatio","GravityQualifier","Qualifier","value","QualifierValue","AutoGravity","GravityQualifier","AutoFocusObjects","FocusOnGravity","GravityQualifier","FocusOnObjects","val","CompassGravity","GravityQualifier","dir","compass","direction","CompassGravity","focusOn","args","res","FocusOnGravity","autoGravity","AutoGravity","FocusOnValue","QualifierValue","name","bird","FocusOnValue","dog","cat","microwave","refrigerator","bottle","sink","skateboard","person","advancedFace","advancedFaces","advancedEyes","face","faces","background","aeroplane","bicycle","boat","bus","car","chair","cow","diningtable","horse","motorbike","pottedplant","sheep","sofa","train","tvmonitor","ocr","FocusOn","isIAutoGravityString","gravity","isCompassGravity","gravityValue","getGravityValue","createCompassGravityModel","isOcrGravity","createOcrGravityModel","isAutoGravity","createIAutoFocusObject","values","result","createAutoGravityModel","gravityQualifier","AutoGravity","v","createFocusOnGravityModel","hasAutoGravity","autoFocusObjects","autoGravityInstance","autoGravity","createFocusOnGravity","focusOnValues","g","FocusOnValue","FocusOnGravity","createGravityModel","AutoFocus","_AutoFocus","QualifierValue","focusOn","weight","obj","w","CompassQualifier","QualifierValue","val","isCompassGravityModel","gravityModel","isOcrGravityModel","isAutoGravityModel","createAutoFocusFromModel","autoGravityObjectModel","object","weight","avoid","autoFocus","AutoFocus","FocusOnValue","createAutoGravityFromModel","autoGravity","createFocusOnGravityFromModel","focusOnObjects","str","result","focusOn","createGravityFromModel","CompassGravity","CompassQualifier","ocr","ResizeAdvancedAction","ResizeSimpleAction","gravity","createGravityModel","gravityQualifier","Qualifier","actionModel","result","createGravityFromModel","BackgroundQualifier","Qualifier","backgroundValue","DEFAULT_INTENSITY","DEFAULT_BRIGHTNESS","BlurredBackgroundAction","BackgroundQualifier","value","intensity","brightness","BlurredBackgroundAction_default","prepareColor","color","BaseCommonBackground","BackgroundQualifier","colors","color","prepareColor","BackgroundAutoBorderQualifier","BaseCommonBackground","BaseGradientBackground","BaseCommonBackground","num","direction","BackgroundBorderGradientQualifier","BaseGradientBackground","BackgroundPredominantGradientQualifier","BaseGradientBackground","BackgroundAutoPredominantQualifier","BaseCommonBackground","BackgroundGenerativeFillQualifier","BackgroundQualifier","prompt","getBackgroundValue","background","createAutoBackgroundModel","createBlurredBackgroundModel","intensityLevel","brightnessLevel","result","createContrastPaletteBackgroundModel","contrast","palette","createBorderBackgroundModel","createBaseGradientBackgroundModel","gradientColors","gradientDirection","createBorderGradientBackgroundModel","createColorBackgroundModel","createPredominantBackgroundModel","createPredominantGradientBackgroundModel","createGenerativeFillBackgroundModel","createBackgroundModel","BlurredBackgroundAction_default","BackgroundAutoBorderQualifier","BackgroundBorderGradientQualifier","BackgroundAutoPredominantQualifier","BackgroundPredominantGradientQualifier","BackgroundGenerativeFillQualifier","FormatQualifier","QualifierValue","val","border","BackgroundAutoBorderQualifier","auto","BackgroundQualifier","borderGradient","BackgroundBorderGradientQualifier","predominantGradient","BackgroundPredominantGradientQualifier","predominant","BackgroundAutoPredominantQualifier","color","colorStr","prepareColor","blurred","BlurredBackgroundAction_default","generativeFill","BackgroundGenerativeFillQualifier","Background","createBlurredBackground","backgroundModel","brightness","intensity","result","Background","DEFAULT_BRIGHTNESS","DEFAULT_INTENSITY","createGradientBackground","background","gradientColors","gradientDirection","contrast","palette","createContrastPaletteBackground","createGenerativeFillBackground","prompt","createBackgroundFromModel","backgroundType","auto","border","borderGradient","predominant","predominantGradient","generativeFill","color","ResizePadAction","ResizeAdvancedAction","backgroundQualifier","createBackgroundModel","x","Qualifier","y","actionModel","result","createBackgroundFromModel","ResizeScaleAction","ResizeSimpleAction","GravityQualifier","ThumbResizeAction","ResizeAdvancedAction","z","Qualifier","actionModel","result","ResizeCropAction","ResizeAdvancedAction","x","Qualifier","y","z","actionModel","result","ResizeFillAction","ResizeAdvancedAction","x","Qualifier","y","actionModel","result","scale","width","height","ResizeScaleAction","crop","width","height","ResizeCropAction","fill","ResizeFillAction","pad","width","height","ResizePadAction","thumbnail","width","height","ThumbResizeAction","BackgroundColor","Action","color","Qualifier","QualifierValue","prepareColor","actionModel","RawAction","raw","createUnsupportedError","isErrorObject","obj","errorObj","DeliveryAction","Action","deliveryKey","deliveryType","modelProperty","deliveryTypeValue","FormatQualifier","DELIVERY_MODE_TO_ACTION_TYPE_MAP","Qualifier","ProgressiveQualifier","FlagQualifier","mode","DeliveryFormatAction","DeliveryAction","deliveryKey","deliveryType","lossy","mode","ProgressiveQualifier","progressive","preserveTransparency","actionModel","formatType","result","Transformation","_Transformation","action","actionToAdd","RawAction","tx","a","animatedAction","borderAction","reshapeAction","resizeAction","quality","DeliveryFormatAction","format","roundCornersAction","overlayAction","underlayAction","variableAction","conditionAction","effectAction","rotateAction","namedTransformation","deliveryAction","color","BackgroundColor","flagQualifier","Action","flagToAdd","FlagQualifier","customFunction","actions","json","isErrorObject","ImageTransformation","Transformation","isUrl","publicID","isFileName","publicID","publicIDContainsVersion","publicID","getUrlPrefix","cloudName","urlConfig","secure","privateCDN","cname","secureDistribution","handleAssetType","assetType","handleDeliveryType","deliveryType","getUrlVersion","publicID","version","forceVersion","shouldForceVersion","publicIDContainsVersion","isUrl","isFileName","isObject","a","Config","userProvidedConfig","validKeys","obj","key","BaseConfig_default","ALLOWED_URL_CONFIG","URLConfig","_URLConfig","BaseConfig_default","userURLConfig","urlConfig","ALLOWED_URL_CONFIG","value","params","URLConfig_default","stringPad","value","_targetLength","_padString","targetLength","padString","repeatStringNumTimes","string","_times","times","repeatedString","chars","base64Map","num","char","key","stringPad","reverseVersion","semVer","padVersion","semVer","segment","asNumber","stringPad","encodeVersion","semVer","strResult","paddedStringLength","reversedSemver","reverseVersion","paddedSemver","padVersion","paddedBinary","stringPad","bitString","base64Map","getAnalyticsOptions","options","analyticsOptions","packageVersion","encodeOSVersion","semVer","major","minor","binaryMajorVersion","binaryMinorVersion","paddedMajor","paddedMinor","base64Map","getNodeVersion","failedVersion","ensureShapeOfTrackedProperties","trackedAnalytics","defaults","packageVersion","getSDKAnalyticsSignature","_trackedAnalytics","analyticsOptions","getAnalyticsOptions","twoPartVersion","removePatchFromSemver","encodedSDKVersion","encodeVersion","encodedTechVersion","encodedOSVersion","encodeOSVersion","featureCode","SDKCode","product","osType","semVerStr","parts","SEO_TYPES","CloudinaryFile","publicID","cloudConfig","urlConfig","URLConfig_default","newType","newSuffix","signature","newVersion","overwriteOptions","suffixContainsDot","suffixContainsSlash","assetType","handleAssetType","deliveryType","handleDeliveryType","hasSuffix","regularSEOType","shortSEOType","useRootPath","shorten","transformation","trackedAnalytics","prefix","getUrlPrefix","transformationString","version","getUrlVersion","a","safeURL","shouldAddAnalytics","queryParamsString","queryParams","getSDKAnalyticsSignature","CloudinaryTransformable","CloudinaryFile","publicID","cloudConfig","urlConfig","transformation","animated","border","reshape","resize","quality","DeliveryFormatAction","format","roundCorners","overlayAction","variableAction","conditionalAction","effect","action","rotate","namedTransformation","deliveryAction","color","flagQualifier","customFunction","tx","underlayAction","overwriteOptions","CloudinaryImage","CloudinaryTransformable","publicID","cloudConfig","urlConfig","ImageTransformation","VideoTransformation","Transformation","RoundCornersAction","Action","a","b","c","d","qualifierValue","QualifierValue","definedRadiuses","r","Qualifier","actionModel","radius","result","RoundCornersAction_default","max","RoundCornersAction_default","CloudinaryVideo","CloudinaryTransformable","publicID","cloudConfig","urlConfig","VideoTransformation","action","Cloudinary","cloudinaryConfig","publicID","CloudinaryImage","CloudinaryVideo","ResizeModeEnum","CloudinaryService","constructor","cloudName","uploadImagePreset","api_key","uploadPresets","Map","uploadUrl","uploadLargeUrl","cld","Cloudinary","cloud","getImageUrl","file","w","h","mode","round","img","image","format","quality","transform","toURL","getVideoImageUrl","public_id","setAssetType","getDownloadUrl","getTruncatedUrl","secureUrl","match","getUrl","resourceType","fill","resize","scale","crop","avatar","thumbnail","gravity","focusOn","FocusOn","face","roundCorners","max","pad","factory","ɵfac","providedIn","_CloudinaryService"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80]}