{"version":3,"file":"ArticleMetadataParity.DIa5-ASc.mjs","names":["__esmMin","c","init_jsx_runtime","ce","init_npm_react_18_3_1","init_framer_BWFVvmND","addPropertyControls","ControlType","ArticleMetadataParity","socialImage","saved","set","value","element","selector","created","tag","identity","k","v","attribute","before","canonical","style","init_ArticleMetadataParity"],"sources":["https:/framerusercontent.com/modules/mZ5LMvHnIybEdKDXi6Ag/IaEPxCuFTUlFZDROHKxv/ArticleMetadataParity.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Preserves article social images; Framer owns canonical and og:url metadata.\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ArticleMetadataParity({canonical=\"\",socialImage=\"\",style}){React.useEffect(()=>{if(typeof document===\"undefined\"||!socialImage)return;const saved=[];const set=(selector,tag,identity,attribute,value)=>{if(!value)return;let element=document.head.querySelector(selector);const created=!element;if(!element){element=document.createElement(tag);Object.entries(identity).forEach(([k,v])=>element.setAttribute(k,v));document.head.appendChild(element);}saved.push({element,attribute,before:element.getAttribute(attribute),created,value});element.setAttribute(attribute,value);};set('meta[property=\"og:image\"]',\"meta\",{property:\"og:image\"},\"content\",socialImage);set('meta[name=\"twitter:image\"]',\"meta\",{name:\"twitter:image\"},\"content\",socialImage);return()=>saved.forEach(({element,attribute,before,created,value})=>{if(element.getAttribute(attribute)!==value)return;if(created)element.remove();else if(before===null)element.removeAttribute(attribute);else element.setAttribute(attribute,before);});},[canonical,socialImage]);return /*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{...style,position:\"relative\",display:\"block\",width:1,height:1,pointerEvents:\"none\"}});}addPropertyControls(ArticleMetadataParity,{canonical:{type:ControlType.String,title:\"Canonical URL\",defaultValue:\"\"},socialImage:{type:ControlType.String,title:\"Source social image\",defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ArticleMetadataParity\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ArticleMetadataParity.map"],"mappings":"A,0KAIG,SAAwBQ,EAAsB,CAAC,YAAU,GAAG,cAAY,GAAG,SAAO,CAAg8B,OAA/7BL,MAAoB,CAAC,GAAG,OAAO,SAAW,KAAa,CAACM,EAAY,OAAO,IAAMC,EAAM,CAAC,EAAQC,GAAK,EAAS,EAAI,EAAS,EAAU,IAAQ,CAAC,GAAG,CAACC,EAAM,OAAO,IAAIC,EAAQ,SAAS,KAAK,cAAcC,CAAQ,EAAQC,EAAQ,CAACF,EAAYA,IAAS,EAAQ,SAAS,cAAcG,CAAG,EAAE,OAAO,QAAQC,CAAQ,CAAC,CAAC,SAAS,CAACC,EAAEC,KAAKN,EAAQ,aAAaK,EAAEC,CAAC,CAAC,EAAE,SAAS,KAAK,YAAYN,CAAO,GAAGH,EAAM,KAAK,CAAC,UAAQ,YAAU,OAAOG,EAAQ,aAAaO,CAAS,EAAE,UAAQ,OAAK,CAAC,EAAEP,EAAQ,aAAaO,EAAUR,CAAK,CAAE,EAA4K,OAA1KD,EAAI,4BAA4B,OAAO,CAAC,SAAS,UAAU,EAAE,UAAUF,CAAW,EAAEE,EAAI,6BAA6B,OAAO,CAAC,KAAK,eAAe,EAAE,UAAUF,CAAW,MAAYC,EAAM,SAAS,CAAC,UAAQ,YAAU,SAAO,UAAQ,WAAS,CAAIG,EAAQ,aAAaO,CAAS,IAAIR,IAAgBG,EAAQF,EAAQ,OAAO,EAAUQ,IAAS,KAAKR,EAAQ,gBAAgBO,CAAS,EAAOP,EAAQ,aAAaO,EAAUC,CAAM,EAAE,CAAC,CAAE,EAAE,CAACC,EAAUb,CAAW,CAAC,EAAsB,gBAAK,OAAO,CAAC,cAAc,OAAO,MAAM,CAAC,GAAGc,EAAM,SAAS,WAAW,QAAQ,QAAQ,MAAM,EAAE,OAAO,EAAE,cAAc,MAAM,CAAC,CAAC,CAAE,C,0CAACjB,EAAoBE,EAAsB,CAAC,UAAU,CAAC,KAAKD,EAAY,OAAO,MAAM,gBAAgB,aAAa,EAAE,EAAE,YAAY,CAAC,KAAKA,EAAY,OAAO,MAAM,sBAAsB,aAAa,EAAE,CAAC,CAAC,C"}