{"version":3,"file":"CMS_Field_Alt_Text.CGGfOw9L.mjs","names":["forwardRef","useEffect","_jsx","__esmMin","init_npm_react_18_3_1","ce","init_jsx_runtime","J","c","withAuthorAltText","Component","props","ref","updateAuthorAttributes","authorNameElement","authorImageElement","authorName","image","authorLink","timer","init_CMS_Field_Alt_Text"],"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":"A,yHAAmF,SAAgBS,EAAkBC,EAAU,CAAC,MAAoBV,iBAAYW,EAAMC,KAAOX,MAAc,CAAC,IAAMY,MAA2B,CAC7N,IAAMC,EAAkB,SAAS,cAAc,kCAAkC,EAC3EC,EAAmB,SAAS,cAAc,mCAAmC,EAAE,GAAG,CAACD,GAAmB,CAACC,EAAmB,OAAO,IAAMC,EAAWF,EAAkB,aAAa,KAAK,EAAE,GAAG,CAACE,EAAW,OAC7M,IAAMC,EAAMF,EAAmB,cAAc,KAAK,EAAE,GAAGE,EAAM,CAC7DA,EAAM,aAAa,MAAMD,CAAU,EACnC,IAAME,EAAWD,EAAM,QAAQ,GAAG,EAAKC,GACvCA,EAAW,aAAa,MAAM,QAAQ,CAAG,CAAC,EAC1CL,EAAuB,EACvB,IAAMM,EAAM,WAAWN,EAAuB,GAAG,EAAE,UAAU,aAAaM,CAAK,CAAE,EAAE,CAAC,CAAC,EAAsBjB,gBAAKQ,EAAU,CAAKE,MAAI,GAAGD,CAAK,CAAC,EAAG,CAAE,C"}