/**
 * Minified by jsDelivr using Terser v5.48.0.
 * Original file: /npm/@wix/auto_sdk_ricos-services_services@1.0.7/build/cjs/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(t,e)=>{for(var o in e)__defProp(t,o,{get:e[o],enumerable:!0})},__copyProps=(t,e,o,a)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let n of __getOwnPropNames(e))__hasOwnProp.call(t,n)||n===o||__defProp(t,n,{get:()=>e[n],enumerable:!(a=__getOwnPropDesc(e,n))||a.enumerable});return t},__toCommonJS=t=>__copyProps(__defProp({},"__esModule",{value:!0}),t),index_exports={};__export(index_exports,{Alignment:()=>Alignment,AppType:()=>AppType,BackgroundType:()=>BackgroundType,Crop:()=>Crop,DecorationType:()=>DecorationType,Direction:()=>Direction,FontType:()=>FontType,GIFType:()=>GIFType,InitialExpandedItems:()=>InitialExpandedItems,LayoutType:()=>LayoutType,LineStyle:()=>LineStyle,MapType:()=>MapType,NodeType:()=>NodeType,NullValue:()=>NullValue,Orientation:()=>Orientation,PluginContainerDataAlignment:()=>PluginContainerDataAlignment,PollLayoutDirection:()=>PollLayoutDirection,PollLayoutType:()=>PollLayoutType,Position:()=>Position,Source:()=>Source,Target:()=>Target,TargetFormat:()=>TargetFormat,TextAlignment:()=>TextAlignment,ThumbnailsAlignment:()=>ThumbnailsAlignment,Type:()=>Type,VerticalAlignment:()=>VerticalAlignment,ViewMode:()=>ViewMode,ViewRole:()=>ViewRole,VoteRole:()=>VoteRole,Width:()=>Width,WidthType:()=>WidthType,convertFromRicosDocument:()=>convertFromRicosDocument4,convertToRicosDocument:()=>convertToRicosDocument4,validateDocument:()=>validateDocument4}),module.exports=__toCommonJS(index_exports);var import_transform_error=require("@wix/sdk-runtime/transform-error"),import_rename_all_nested_keys=require("@wix/sdk-runtime/rename-all-nested-keys"),import_float=require("@wix/sdk-runtime/transformations/float"),import_float2=require("@wix/sdk-runtime/transformations/float"),import_timestamp=require("@wix/sdk-runtime/transformations/timestamp"),import_timestamp2=require("@wix/sdk-runtime/transformations/timestamp"),import_transform_paths=require("@wix/sdk-runtime/transformations/transform-paths"),import_rest_modules=require("@wix/sdk-runtime/rest-modules");function resolveWixRicosV1RicosServicesUrl(t){return(0,import_rest_modules.resolveUrl)(Object.assign(t,{domainToMappings:{}}))}var PACKAGE_NAME="@wix/auto_sdk_ricos-services_services";function validateDocument(t){return function({host:e}){return{entityFqdn:"wix.ricos.v1.service",method:"POST",methodFqn:"wix.ricos.v1.RicosServices.ValidateDocument",packageName:PACKAGE_NAME,migrationOptions:{optInTransformResponse:!0},url:resolveWixRicosV1RicosServicesUrl({protoPath:"/v1/validate",data:t,host:e}),data:t,transformResponse:t=>(0,import_transform_paths.transformPaths)(t,[{transformFn:import_float2.transformRESTFloatToSDKFloat,paths:[{path:"validDocument.nodes.galleryData.items.image.media.duration"},{path:"validDocument.nodes.galleryData.items.video.media.duration"},{path:"validDocument.nodes.galleryData.items.video.thumbnail.duration"},{path:"validDocument.nodes.galleryData.options.item.ratio"},{path:"validDocument.nodes.imageData.image.duration"},{path:"validDocument.nodes.mapData.mapSettings.lat"},{path:"validDocument.nodes.mapData.mapSettings.lng"},{path:"validDocument.nodes.pollData.poll.image.duration"},{path:"validDocument.nodes.pollData.poll.options.image.duration"},{path:"validDocument.nodes.pollData.design.poll.background.image.duration"},{path:"validDocument.nodes.appEmbedData.image.duration"},{path:"validDocument.nodes.videoData.video.duration"},{path:"validDocument.nodes.videoData.thumbnail.duration"},{path:"validDocument.nodes.audioData.audio.duration"},{path:"validDocument.nodes.audioData.coverImage.duration"}]},{transformFn:import_timestamp2.transformRESTTimestampToSDKTimestamp,paths:[{path:"validDocument.metadata.createdTimestamp"},{path:"validDocument.metadata.updatedTimestamp"}]}])}}}function convertToRicosDocument(t){return function({host:e}){return{entityFqdn:"wix.ricos.v1.service",method:"POST",methodFqn:"wix.ricos.v1.RicosServices.ConvertToRicosDocument",packageName:PACKAGE_NAME,migrationOptions:{optInTransformResponse:!0},url:resolveWixRicosV1RicosServicesUrl({protoPath:"/v1/convert/to-ricos",data:t,host:e}),data:t,transformResponse:t=>(0,import_transform_paths.transformPaths)(t,[{transformFn:import_float2.transformRESTFloatToSDKFloat,paths:[{path:"document.nodes.galleryData.items.image.media.duration"},{path:"document.nodes.galleryData.items.video.media.duration"},{path:"document.nodes.galleryData.items.video.thumbnail.duration"},{path:"document.nodes.galleryData.options.item.ratio"},{path:"document.nodes.imageData.image.duration"},{path:"document.nodes.mapData.mapSettings.lat"},{path:"document.nodes.mapData.mapSettings.lng"},{path:"document.nodes.pollData.poll.image.duration"},{path:"document.nodes.pollData.poll.options.image.duration"},{path:"document.nodes.pollData.design.poll.background.image.duration"},{path:"document.nodes.appEmbedData.image.duration"},{path:"document.nodes.videoData.video.duration"},{path:"document.nodes.videoData.thumbnail.duration"},{path:"document.nodes.audioData.audio.duration"},{path:"document.nodes.audioData.coverImage.duration"}]},{transformFn:import_timestamp2.transformRESTTimestampToSDKTimestamp,paths:[{path:"document.metadata.createdTimestamp"},{path:"document.metadata.updatedTimestamp"}]}])}}}function convertFromRicosDocument(t){return function({host:e}){const o=(0,import_transform_paths.transformPaths)(t,[{transformFn:import_float.transformSDKFloatToRESTFloat,paths:[{path:"document.nodes.galleryData.items.image.media.duration"},{path:"document.nodes.galleryData.items.video.media.duration"},{path:"document.nodes.galleryData.items.video.thumbnail.duration"},{path:"document.nodes.galleryData.options.item.ratio"},{path:"document.nodes.imageData.image.duration"},{path:"document.nodes.mapData.mapSettings.lat"},{path:"document.nodes.mapData.mapSettings.lng"},{path:"document.nodes.pollData.poll.image.duration"},{path:"document.nodes.pollData.poll.options.image.duration"},{path:"document.nodes.pollData.design.poll.background.image.duration"},{path:"document.nodes.appEmbedData.image.duration"},{path:"document.nodes.videoData.video.duration"},{path:"document.nodes.videoData.thumbnail.duration"},{path:"document.nodes.audioData.audio.duration"},{path:"document.nodes.audioData.coverImage.duration"}]},{transformFn:import_timestamp.transformSDKTimestampToRESTTimestamp,paths:[{path:"document.metadata.createdTimestamp"},{path:"document.metadata.updatedTimestamp"}]}]);return{entityFqdn:"wix.ricos.v1.service",method:"POST",methodFqn:"wix.ricos.v1.RicosServices.ConvertFromRicosDocument",packageName:PACKAGE_NAME,migrationOptions:{optInTransformResponse:!0},url:resolveWixRicosV1RicosServicesUrl({protoPath:"/v1/convert/from-ricos",data:o,host:e}),data:o}}}var NodeType=(t=>(t.PARAGRAPH="PARAGRAPH",t.TEXT="TEXT",t.HEADING="HEADING",t.BULLETED_LIST="BULLETED_LIST",t.ORDERED_LIST="ORDERED_LIST",t.LIST_ITEM="LIST_ITEM",t.BLOCKQUOTE="BLOCKQUOTE",t.CODE_BLOCK="CODE_BLOCK",t.VIDEO="VIDEO",t.DIVIDER="DIVIDER",t.FILE="FILE",t.GALLERY="GALLERY",t.GIF="GIF",t.HTML="HTML",t.IMAGE="IMAGE",t.LINK_PREVIEW="LINK_PREVIEW",t.MAP="MAP",t.POLL="POLL",t.APP_EMBED="APP_EMBED",t.BUTTON="BUTTON",t.COLLAPSIBLE_LIST="COLLAPSIBLE_LIST",t.TABLE="TABLE",t.EMBED="EMBED",t.COLLAPSIBLE_ITEM="COLLAPSIBLE_ITEM",t.COLLAPSIBLE_ITEM_TITLE="COLLAPSIBLE_ITEM_TITLE",t.COLLAPSIBLE_ITEM_BODY="COLLAPSIBLE_ITEM_BODY",t.TABLE_CELL="TABLE_CELL",t.TABLE_ROW="TABLE_ROW",t.EXTERNAL="EXTERNAL",t.AUDIO="AUDIO",t.CAPTION="CAPTION",t.LAYOUT="LAYOUT",t.LAYOUT_CELL="LAYOUT_CELL",t))(NodeType||{}),WidthType=(t=>(t.CONTENT="CONTENT",t.SMALL="SMALL",t.ORIGINAL="ORIGINAL",t.FULL_WIDTH="FULL_WIDTH",t))(WidthType||{}),PluginContainerDataAlignment=(t=>(t.CENTER="CENTER",t.LEFT="LEFT",t.RIGHT="RIGHT",t))(PluginContainerDataAlignment||{}),Type=(t=>(t.LINK="LINK",t.ACTION="ACTION",t))(Type||{}),Target=(t=>(t.SELF="SELF",t.BLANK="BLANK",t.PARENT="PARENT",t.TOP="TOP",t))(Target||{}),TextAlignment=(t=>(t.AUTO="AUTO",t.LEFT="LEFT",t.RIGHT="RIGHT",t.CENTER="CENTER",t.JUSTIFY="JUSTIFY",t))(TextAlignment||{}),LineStyle=(t=>(t.SINGLE="SINGLE",t.DOUBLE="DOUBLE",t.DASHED="DASHED",t.DOTTED="DOTTED",t))(LineStyle||{}),Width=(t=>(t.LARGE="LARGE",t.MEDIUM="MEDIUM",t.SMALL="SMALL",t))(Width||{}),Alignment=(t=>(t.CENTER="CENTER",t.LEFT="LEFT",t.RIGHT="RIGHT",t))(Alignment||{}),ViewMode=(t=>(t.NONE="NONE",t.FULL="FULL",t.MINI="MINI",t))(ViewMode||{}),LayoutType=(t=>(t.COLLAGE="COLLAGE",t.MASONRY="MASONRY",t.GRID="GRID",t.THUMBNAIL="THUMBNAIL",t.SLIDER="SLIDER",t.SLIDESHOW="SLIDESHOW",t.PANORAMA="PANORAMA",t.COLUMN="COLUMN",t.MAGIC="MAGIC",t.FULLSIZE="FULLSIZE",t))(LayoutType||{}),Orientation=(t=>(t.ROWS="ROWS",t.COLUMNS="COLUMNS",t))(Orientation||{}),Crop=(t=>(t.FILL="FILL",t.FIT="FIT",t))(Crop||{}),ThumbnailsAlignment=(t=>(t.TOP="TOP",t.RIGHT="RIGHT",t.BOTTOM="BOTTOM",t.LEFT="LEFT",t.NONE="NONE",t))(ThumbnailsAlignment||{}),GIFType=(t=>(t.NORMAL="NORMAL",t.STICKER="STICKER",t))(GIFType||{}),Source=(t=>(t.HTML="HTML",t.ADSENSE="ADSENSE",t))(Source||{}),Position=(t=>(t.START="START",t.END="END",t.TOP="TOP",t.HIDDEN="HIDDEN",t))(Position||{}),MapType=(t=>(t.ROADMAP="ROADMAP",t.SATELITE="SATELITE",t.HYBRID="HYBRID",t.TERRAIN="TERRAIN",t))(MapType||{}),ViewRole=(t=>(t.CREATOR="CREATOR",t.VOTERS="VOTERS",t.EVERYONE="EVERYONE",t))(ViewRole||{}),VoteRole=(t=>(t.SITE_MEMBERS="SITE_MEMBERS",t.ALL="ALL",t))(VoteRole||{}),PollLayoutType=(t=>(t.LIST="LIST",t.GRID="GRID",t))(PollLayoutType||{}),PollLayoutDirection=(t=>(t.LTR="LTR",t.RTL="RTL",t))(PollLayoutDirection||{}),BackgroundType=(t=>(t.COLOR="COLOR",t.IMAGE="IMAGE",t.GRADIENT="GRADIENT",t))(BackgroundType||{}),DecorationType=(t=>(t.BOLD="BOLD",t.ITALIC="ITALIC",t.UNDERLINE="UNDERLINE",t.SPOILER="SPOILER",t.ANCHOR="ANCHOR",t.MENTION="MENTION",t.LINK="LINK",t.COLOR="COLOR",t.FONT_SIZE="FONT_SIZE",t.EXTERNAL="EXTERNAL",t.STRIKETHROUGH="STRIKETHROUGH",t))(DecorationType||{}),FontType=(t=>(t.PX="PX",t.EM="EM",t))(FontType||{}),AppType=(t=>(t.PRODUCT="PRODUCT",t.EVENT="EVENT",t.BOOKING="BOOKING",t))(AppType||{}),InitialExpandedItems=(t=>(t.FIRST="FIRST",t.ALL="ALL",t.NONE="NONE",t))(InitialExpandedItems||{}),Direction=(t=>(t.LTR="LTR",t.RTL="RTL",t))(Direction||{}),VerticalAlignment=(t=>(t.TOP="TOP",t.MIDDLE="MIDDLE",t.BOTTOM="BOTTOM",t))(VerticalAlignment||{}),NullValue=(t=>(t.NULL_VALUE="NULL_VALUE",t))(NullValue||{}),TargetFormat=(t=>(t.UNKNOWN_TARGET_FORMAT="UNKNOWN_TARGET_FORMAT",t.MARKDOWN="MARKDOWN",t.HTML="HTML",t.PLAIN_TEXT="PLAIN_TEXT",t))(TargetFormat||{});async function validateDocument2(t,e){const{httpClient:o,sideEffects:a}=arguments[2],n=validateDocument((0,import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({document:t,plugins:e?.plugins,fixDocument:e?.fixDocument}));a?.onSiteCall?.();try{const t=await o.request(n);return a?.onSuccess?.(t),(0,import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,import_transform_error.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{document:"$[0]",plugins:"$[1].plugins",fixDocument:"$[1].fixDocument"},singleArgumentUnchanged:!1},["document","options"]);throw a?.onError?.(t),e}}async function convertToRicosDocument2(t){const{httpClient:e,sideEffects:o}=arguments[1],a=convertToRicosDocument((0,import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({markdown:t?.markdown,html:t?.html,plainText:t?.plainText,options:t?.options}));o?.onSiteCall?.();try{const t=await e.request(a);return o?.onSuccess?.(t),(0,import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,import_transform_error.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{markdown:"$[0].markdown",html:"$[0].html",plainText:"$[0].plainText",options:"$[0].options"},singleArgumentUnchanged:!1},["options"]);throw o?.onError?.(t),e}}async function convertFromRicosDocument2(t,e){const{httpClient:o,sideEffects:a}=arguments[2],n=convertFromRicosDocument((0,import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({document:t,targetFormat:e?.targetFormat,plainTextOptions:e?.plainTextOptions}));a?.onSiteCall?.();try{const t=await o.request(n);return a?.onSuccess?.(t),(0,import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,import_transform_error.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{document:"$[0]",targetFormat:"$[1].targetFormat",plainTextOptions:"$[1].plainTextOptions"},singleArgumentUnchanged:!1},["document","options"]);throw a?.onError?.(t),e}}function validateDocument3(t){return(e,o)=>validateDocument2(e,o,{httpClient:t})}function convertToRicosDocument3(t){return e=>convertToRicosDocument2(e,{httpClient:t})}function convertFromRicosDocument3(t){return(e,o)=>convertFromRicosDocument2(e,o,{httpClient:t})}var import_rest_modules2=require("@wix/sdk-runtime/rest-modules"),validateDocument4=(0,import_rest_modules2.createRESTModule)(validateDocument3),convertToRicosDocument4=(0,import_rest_modules2.createRESTModule)(convertToRicosDocument3),convertFromRicosDocument4=(0,import_rest_modules2.createRESTModule)(convertFromRicosDocument3);
//# sourceMappingURL=/sm/3159948bf4a26e6df0cf5c2144a82f43215b566c66ee15f0ba02fc90f0fdbf8e.map