import{c as t,G as e,S as o,H as d,I as n}from"./_auto-entry_svdv2-6Skf4BwI.js";export{E as calculateScaleFactor,K as getAspectRatio,J as scaleAdIpadAirPortrait}from"./_auto-entry_svdv2-6Skf4BwI.js";import"react/jsx-runtime";const i=i=>{var a,l,s,r,c,u;const{adScaleConfig:v,pageContext:{deviceType:f}}=t.get();if(!(null==v?void 0:v.enabled))return;if(e(i,o.ANY_FULLSCREEN))return;const p=null!==(a=v.adsToBeScaled[f])&&void 0!==a?a:[],m=d(i.targetId.split("-")[0]);if(!p.includes(m))return;const g=null!==(s=null===(l=v.offset)||void 0===l?void 0:l[m])&&void 0!==s?s:0,w=document.getElementById(i.targetId),E=null!==(r=null==w?void 0:w.offsetWidth)&&void 0!==r?r:window.screen.width,I=null!==(u=null===(c=null==w?void 0:w.parentElement)||void 0===c?void 0:c.offsetWidth)&&void 0!==u?u:window.screen.width;n(i,(E<I?E:I)-g)};export{n as scaleAd,i as scaleAds};
