{"version":3,"file":"ArticleMetadataParity.N5LSLAl7.mjs","names":[],"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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