{"version":3,"file":"CMS_Field_Alt_Text.CV9NgiAB.mjs","names":[],"sources":["https:/framerusercontent.com/modules/dS0uSeIx2dlOBtrjjE4I/fbiuxYhm1MSZBpPD7HTI/CMS_Field_Alt_Text.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect}from\"react\";export function withAuthorAltText(Component){return /*#__PURE__*/forwardRef((props,ref)=>{useEffect(()=>{const updateAuthorAttributes=()=>{// Author Name from CMS\nconst authorNameElement=document.querySelector('[data-framer-name=\"Author Name\"]');// Author Image\nconst authorImageElement=document.querySelector('[data-framer-name=\"Author Image\"]');if(!authorNameElement||!authorImageElement)return;const authorName=authorNameElement.textContent?.trim();if(!authorName)return;// Find actual image\nconst image=authorImageElement.querySelector(\"img\");if(image){// Dynamic Alt Text\nimage.setAttribute(\"alt\",authorName);// Find closest author link\nconst authorLink=image.closest(\"a\");if(authorLink){// Add rel=\"author\"\nauthorLink.setAttribute(\"rel\",\"author\");}}};// Initial run\nupdateAuthorAttributes();// Run again after Framer/CMS renders\nconst timer=setTimeout(updateAuthorAttributes,300);return()=>clearTimeout(timer);},[]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withAuthorAltText\":{\"type\":\"reactHoc\",\"name\":\"withAuthorAltText\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CMS_Field_Alt_Text.map"],"mappings":"yHAAmF,SAAgB,EAAkB,EAAU,CAAC,OAAoB,GAAY,EAAM,KAAO,MAAc,CAAC,IAAM,MAA2B,CAC7N,IAAM,EAAkB,SAAS,cAAc,kCAAkC,EAC3E,EAAmB,SAAS,cAAc,mCAAmC,EAAE,GAAG,CAAC,GAAmB,CAAC,EAAmB,OAAO,IAAM,EAAW,EAAkB,aAAa,KAAK,EAAE,GAAG,CAAC,EAAW,OAC7M,IAAM,EAAM,EAAmB,cAAc,KAAK,EAAE,GAAG,EAAM,CAC7D,EAAM,aAAa,MAAM,CAAU,EACnC,IAAM,EAAW,EAAM,QAAQ,GAAG,EAAK,GACvC,EAAW,aAAa,MAAM,QAAQ,CAAG,CAAC,EAC1C,EAAuB,EACvB,IAAM,EAAM,WAAW,EAAuB,GAAG,EAAE,UAAU,aAAa,CAAK,CAAE,EAAE,CAAC,CAAC,EAAsB,EAAK,EAAU,CAAK,MAAI,GAAG,CAAK,CAAC,EAAG,CAAE,iBARvG,IAAwC"}