const sizeImage=(l="",t,i="fit=scale-down,format=auto")=>{var d,e;return l.includes("surecart.com")&&(null===(d=window.scData)||void 0===d?void 0:d.cdn_root)?`${null===(e=window.scData)||void 0===e?void 0:e.cdn_root}/${i},width=${t}/${l}`:l},getFeaturedProductMediaAttributes=(l,t)=>{var i,d,e;const o=null==l?void 0:l.featured_product_media,u=null==t?void 0:t.image,a={alt:(null===(i=null==o?void 0:o.media)||void 0===i?void 0:i.alt)||(null==l?void 0:l.name),url:(null===(d=null==o?void 0:o.media)||void 0===d?void 0:d.url)||(null==l?void 0:l.image_url),title:(null===(e=null==o?void 0:o.media)||void 0===e?void 0:e.title)||""};return(null==u?void 0:u.url)&&(a.url=u.url,a.alt=a.alt||u.alt,a.title=a.title||u.title),a};export{getFeaturedProductMediaAttributes as g,sizeImage as s};