"use strict";var e=require("@gem-sdk/core"),t=require("./helpers.js");const o=(t,o)=>{let l=`
    #image-comparison-left-label-${o} div, #image-comparison-right-label-${o} div {
      ${e.composeBorderCss(t?.labelBorder?.desktop)}
      ${e.composeCornerCss(t?.labelRounded?.desktop)}
    }

    @media only screen and (max-width: 1024px) and (min-width: 768px) {
      #image-comparison-left-label-${o} div, #image-comparison-right-label-${o} div {
        ${e.composeBorderCss(t?.labelBorder?.tablet)}
        ${e.composeCornerCss(t?.labelRounded?.tablet)}
      }
    }

    @media only screen and (max-width: 767px) {
      #image-comparison-left-label-${o} div, #image-comparison-right-label-${o} div {
        ${e.composeBorderCss(t?.labelBorder?.mobile)}
        ${e.composeCornerCss(t?.labelRounded?.mobile)}
      }
    }
  `;return l},l=e=>{let{hover:t,isHorizontal:o}=e;return t?"pointer":o?"ew-resize":"ns-resize"};exports.getArrowStyles=e=>({filter:"drop-shadow(rgba(0, 0, 0, 0.4) 0px 0px 4px)",margin:"left"===e.type?"0 2px 0 0":"0 0 0 2px"}),exports.getContainerStyles=({aspectRatio:t,builderData:o,allImagesLoaded:l=!0})=>({height:"auto",overflow:"hidden",position:"relative","box-sizing":"border-box",display:l?"block":"none",...e.makeStyleResponsive("aspect",t),...e.getCornerCSSFromGlobal(o?.advanced?.rounded)}),exports.getHandleCustomStyles=()=>({width:"auto",height:"auto",display:"flex",flex:"1 0 auto","align-items":"center","box-sizing":"border-box","justify-content":"center"}),exports.getHandleStyles=e=>({display:"flex",flex:"1 0 auto","align-items":"center","box-sizing":"border-box","justify-content":"center","border-radius":"100%",width:`${e.handleSize}px`,height:`${e.handleSize}px`,"box-shadow":"0px 0px 4px 0px rgba(0, 0, 0, 0.40)",transform:e.isHorizontal?"none":"rotate(90deg)",border:`${e.sliderLineWidth}px solid ${e.sliderLineColor}`}),exports.getImageStyles=({type:t,props:o})=>{let{styles:l,leftImageCss:i,rightImageCss:s}=o??{};return{top:0,width:"100%",height:"100%",display:"block",position:"absolute",..."left"===t?i:s,...e.makeStyleResponsive("objf",l?.imageScale)}},exports.getInnerBorderCss=o,exports.getLabelCustomCss=(e,t)=>o(e,t),exports.getLabelStyles=({type:o,styles:l,isHorizontal:i})=>{let s=i?{["left"===o?"left":"right"]:"8px"}:{["left"===o?"top":"bottom"]:"8px"},a=t.generateTranslateByDevices({isHorizontal:i,labelPositionHoz:l?.labelPositionHoz,labelPositionVer:l?.labelPositionVer}),r=e=>t.getLabelPosition({position:e,isHorizontal:i,labelPositionHoz:l?.labelPositionHoz,labelPositionVer:l?.labelPositionVer});return e.makeStyleResponsive(i?"top":"left",r("topLeft")),{opacity:1,...s,...e.composeBorderResponsive(l?.labelBorder),...e.composeTypographyStyle(l?.typo),...e.makeStyleResponsive("t",a),...e.getResponsiveStylePadding(l?.labelPadding),...e.makeStyleResponsive(i?"top":"left",r("topLeft")),...e.makeStyleResponsive(i?"bottom":"right",r("bottomRight")),...e.getResponsiveStyleShadowWithoutState(l?.labelShadow,"box-shadow",l?.labelShadow),...e.getStyleShadow({styleAppliedFor:"text-shadow",value:l?.typo?.custom?.textShadow,isEnableShadow:l?.typo?.custom?.hasShadowText}),...e.makeStyleResponsive("bg",l?.labelBackgroundColor),...e.makeStyle({c:l?.labelTextColor??"#F9F9F9"})}},exports.getLazyPlaceholderStyle=t=>({"--pos":"static","--op":0,...e.makeStyleResponsive("aspect",t)}),exports.getLineStyles=e=>({display:"block",flex:"0 1 auto",background:e.sliderLineColor,"box-shadow":"0px 0px 4px 0px rgba(0, 0, 0, 0.40)",height:e.isHorizontal?"100%":`${e.sliderLineWidth}px`,width:e.isHorizontal?`${e.sliderLineWidth}px`:"100%"}),exports.getOuterWrapperStyles=o=>{let l={desktop:t.FLEX_ALIGN[o?.align?.desktop??"left"],tablet:t.FLEX_ALIGN[o?.align?.tablet??o?.align?.desktop??"left"],mobile:t.FLEX_ALIGN[o?.align?.mobile??o?.align?.tablet??o?.align?.desktop??"left"]};return{...e.makeStyleResponsive("jc",l)}},exports.getSliderCursorStyles=l,exports.getSliderStyles=e=>({"z-index":2,display:"flex",position:"absolute","align-items":"center","justify-content":"center",cursor:l(e),"flex-direction":e.isHorizontal?"column":"row",height:e.isHorizontal?"100%":`${e.handleSize}px`,width:e.isHorizontal?`${e.handleSize}px`:"100%"}),exports.getWrapperWidth=({width:t,leftImageWidth:o=0,rightImageWidth:l=0})=>{let i=e.makeStyleResponsive("w",{desktop:t?.desktop??"0",tablet:t?.tablet??t?.desktop??"0",mobile:t?.mobile??t?.tablet??t?.desktop??"0"});for(let e in i)i[e]="undefinedpx"!==i[e]&&i[e]?i[e]:`${Math.min(o,l)||900}px`;return i};
