{"version":3,"file":"SeoTags.cq-R43eD.mjs","names":["__esmMin","init_jsx_runtime","c","p","init_npm_react_18_3_1","ce","addPropertyControls","RenderTarget","ControlType","init_framer_BWFVvmND","SeoTags","props","title","description","metaDesc","ogPairs","prop","val","el","robotsEl","noindex","emitArticle","articleSchema","slug","url","BASE","headline","schema","ORG_ID","dateModified","datePublished","init_SeoTags"],"sources":["https:/framerusercontent.com/modules/8YLa8j2oVg3jkzdgYA57/1bSfGca8pkgvZocQa3v5/SeoTags.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * SeoTags — invisible per-page SEO tag setter for static pages.\n * Sets document.title, meta description, og:title/og:description, and\n * (optionally) a robots noindex tag once the page renders. Google indexes\n * the rendered DOM, so these are picked up even though the baked HTML\n * carries the site defaults.\n * NOTE: real titles/descriptions now live in Framer Page Settings (Kevin,\n * 2026-07-14) — this component is a backup layer + the noindex mechanism.\n * Do NOT render <title>/<meta> elements in SSR output here: React's server\n * renderer flags them as invalid nesting and it duplicates the Page\n * Settings tags. (Tried 2026-07-13; reverted.)\n * Optional Article JSON-LD via articleSchema+slug props for future pages\n * whose content component lacks it. Shows a small chip on the canvas.\n */const BASE=\"https://drhomeinvestor.com\";const ORG_ID=\"https://drhomeinvestor.com/#organization\";export default function SeoTags(props){const{title=\"\",description=\"\",noindex=false,articleSchema=false,slug=\"\",datePublished=\"2026-07-07\",dateModified=\"\"}=props;React.useEffect(()=>{if(typeof document===\"undefined\")return;if(title)document.title=title;if(description){let metaDesc=document.querySelector('meta[name=\"description\"]');if(!metaDesc){metaDesc=document.createElement(\"meta\");metaDesc.name=\"description\";document.head.appendChild(metaDesc);}metaDesc.content=description;}const ogPairs=[[\"og:title\",title],[\"og:description\",description]];for(const[prop,val]of ogPairs){if(!val)continue;const el=document.querySelector(`meta[property=\"${prop}\"]`);if(el)el.content=val;}let robotsEl=null;if(noindex){robotsEl=document.createElement(\"meta\");robotsEl.name=\"robots\";robotsEl.content=\"noindex\";document.head.appendChild(robotsEl);}return()=>{// Don't leak noindex into other pages on client-side navigation.\nif(robotsEl&&robotsEl.parentNode)robotsEl.parentNode.removeChild(robotsEl);};},[title,description,noindex]);const emitArticle=articleSchema&&Boolean(slug);if(RenderTarget.current()===RenderTarget.canvas){return /*#__PURE__*/_jsxs(\"div\",{style:{fontFamily:\"'DM Sans', sans-serif\",fontSize:11,fontWeight:700,color:\"#1B4F8E\",background:\"#EBF2FB\",border:\"1px dashed #1B4F8E\",borderRadius:6,padding:\"4px 10px\",width:\"fit-content\"},children:[\"SEO: \",title||\"(no title)\",\" \",noindex?\"\\xb7 NOINDEX\":\"\"]});}if(emitArticle){const url=BASE+(slug.startsWith(\"/\")?slug:\"/\"+slug);const headline=title.replace(/\\s*\\|\\s*Dr Home Investor\\s*$/,\"\");const schema=JSON.stringify({\"@context\":\"https://schema.org\",\"@type\":\"Article\",headline,description,url,mainEntityOfPage:{\"@type\":\"WebPage\",\"@id\":url},author:{\"@id\":ORG_ID},publisher:{\"@id\":ORG_ID},datePublished,dateModified:dateModified||datePublished,inLanguage:\"en-US\"});return /*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:schema}});}return null;}addPropertyControls(SeoTags,{title:{type:ControlType.String,title:\"Title\",defaultValue:\"\"},description:{type:ControlType.String,title:\"Meta Description\",displayTextArea:true,defaultValue:\"\"},noindex:{type:ControlType.Boolean,title:\"Noindex\",defaultValue:false},articleSchema:{type:ControlType.Boolean,title:\"Article schema\",defaultValue:false},slug:{type:ControlType.String,title:\"Page path\",defaultValue:\"\"},datePublished:{type:ControlType.String,title:\"Published\",defaultValue:\"2026-07-07\"},dateModified:{type:ControlType.String,title:\"Modified\",defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SeoTags\",\"slots\":[],\"annotations\":{\"framerContractVersion\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