"use strict";var core=require("@gem-sdk/core");const DEVICES=["mobile","tablet","desktop"],isFeatureMedia=e=>!!e&&["EXTERNAL_VIDEO","MODEL_3D","VIDEO"].includes(e),getStyleFeaturedImageWidth=e=>{let t={desktop:!1,tablet:!1,mobile:!1},o=e?.ftWidth;return DEVICES.forEach(t=>{let a=core.getResponsiveValueByScreen(e?.position,t),r=core.getResponsiveValueByScreen(e?.galleryVisible,t),s=("left"===a||"right"===a)&&r;o={...o,[t]:s?core.getResponsiveValueByScreen(e?.ftWidthHorizontalLayout,t):core.getResponsiveValueByScreen(e?.ftWidth,t)}}),{...core.makeStyleResponsive("w",core.makeWidth(o,t))}},convertUnitToNumber=(e,t)=>{if(!e)return t;if("number"==typeof e)return e;let o="string"==typeof e?e.replaceAll("px","").replaceAll("%","").replaceAll("rem","").replaceAll("em",""):t;return isNaN(Number(o))?t:Number(o)},getFeatureImageAspectWidth=e=>({desktop:e?.desktop?.width,tablet:e?.tablet?.width,mobile:e?.mobile?.width}),getFeatureImageAspectHeight=e=>({desktop:e?.desktop?.height,tablet:e?.tablet?.height,mobile:e?.mobile?.height}),getFeatureImageAspectRatio=(e,t)=>core.makeAspectRatio(t,getFeatureImageAspectWidth(e),getFeatureImageAspectHeight(e)),getStyleFeatureImageJustify=e=>{let t={desktop:"flex-start",mobile:"flex-start",tablet:"flex-start"},o=["desktop","mobile","tablet"];return o.forEach(o=>{let a=core.getResponsiveValueByScreen(e,o);t={...t,[`${o}`]:"bottom-left"===a?"flex-start":"bottom-center"===a?"center":"left"===a?"flex-start":"flex-end"}}),core.makeStyleResponsive("jc",t)},getZoomLenClass=()=>"!gp-flex gp-absolute gp-z-1 gp-h-[150px] gp-w-[150px] gp-cursor-none gp-rounded-full gp-bg-no-repeat gp-shadow-glasses gp-bg-white",getZoomImageClass=()=>"gp-absolute gp-left-0 gp-top-0 gp-opacity-0 gp-transition-opacity gp-bg-white";exports.convertUnitToNumber=convertUnitToNumber,exports.getFeatureImageAspectRatio=getFeatureImageAspectRatio,exports.getStyleFeatureImageJustify=getStyleFeatureImageJustify,exports.getStyleFeaturedImageWidth=getStyleFeaturedImageWidth,exports.getZoomImageClass=getZoomImageClass,exports.getZoomLenClass=getZoomLenClass,exports.isFeatureMedia=isFeatureMedia;
