{"version":3,"file":"StructuredData.CBSOU_bP.mjs","names":["__esmMin","init_ssg_sandbox_shims","init_npm_react_18_3_1","window","c","init_jsx_runtime","ce","addPropertyControls","init_framer_CKT6jEEQ","StructuredData","props","imageUrl","image","canonicalUrl","markerId","schemaType","toIsoDate","value","parsed","json","headline","datePublished","videoUrl","publisherName","author","cleaned","MARKER_ATTR","el","script","description","init_StructuredData","ControlType"],"sources":["https:/framerusercontent.com/modules/WWVtzJ0V8o95GUqyXZu3/orw2BYbLjmmEbHaV6nDP/StructuredData.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";const MARKER_ATTR=\"data-structured-data-id\";/**\n * Injects a JSON-LD <script> tag into document.head for SEO structured data\n * (schema.org). Invisible on the page; read by search engines only.\n *\n * Uses imperative DOM injection (document.createElement + appendChild)\n * rather than rendering a <script> as JSX, because Framer's canvas/runtime\n * strips <script> elements rendered directly by code components.\n *\n * @framerIntrinsicWidth 0\n * @framerIntrinsicHeight 0\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function StructuredData(props){const{schemaType=\"Article\",headline=\"\",description=\"\",image,author=\"\",publisherName=\"LightSource\",datePublished,videoUrl=\"\"}=props;const imageUrl=image?.src??\"\";useEffect(()=>{if(typeof document===\"undefined\")return;const canonicalUrl=window.location.href;const markerId=`sd-${schemaType}-${window.location.pathname}`;const toIsoDate=value=>{if(!value)return undefined;const parsed=new Date(value);return Number.isNaN(parsed.getTime())?value:parsed.toISOString();};let json;if(schemaType===\"VideoObject\"){json={\"@context\":\"https://schema.org\",\"@type\":\"VideoObject\",name:headline,description,thumbnailUrl:imageUrl?[imageUrl]:undefined,uploadDate:toIsoDate(datePublished),contentUrl:videoUrl||undefined,embedUrl:videoUrl||undefined};}else if(schemaType===\"DefinedTerm\"){json={\"@context\":\"https://schema.org\",\"@type\":\"DefinedTerm\",name:headline,description,url:canonicalUrl||undefined,inDefinedTermSet:publisherName};}else{json={\"@context\":\"https://schema.org\",\"@type\":schemaType,headline,description,image:imageUrl||undefined,author:author?{\"@type\":\"Person\",name:author}:undefined,publisher:{\"@type\":\"Organization\",name:publisherName},datePublished:toIsoDate(datePublished),mainEntityOfPage:canonicalUrl?{\"@type\":\"WebPage\",\"@id\":canonicalUrl}:undefined};}const cleaned=JSON.parse(JSON.stringify(json));document.querySelectorAll(`script[${MARKER_ATTR}=\"${markerId}\"]`).forEach(el=>el.remove());const script=document.createElement(\"script\");script.type=\"application/ld+json\";script.setAttribute(MARKER_ATTR,markerId);script.textContent=JSON.stringify(cleaned);document.head.appendChild(script);return()=>{script.remove();};},[schemaType,headline,description,imageUrl,author,publisherName,datePublished,videoUrl]);return /*#__PURE__*/_jsx(\"div\",{style:{display:\"none\"}});}addPropertyControls(StructuredData,{schemaType:{type:ControlType.Enum,title:\"Schema Type\",options:[\"Article\",\"BlogPosting\",\"NewsArticle\",\"VideoObject\",\"DefinedTerm\"],optionTitles:[\"Article\",\"Blog Post\",\"News Article\",\"Video\",\"Glossary Term\"],defaultValue:\"Article\"},headline:{type:ControlType.String,title:\"Headline / Name\",defaultValue:\"\"},description:{type:ControlType.String,title:\"Description\",defaultValue:\"\",displayTextArea:true},image:{type:ControlType.ResponsiveImage,title:\"Image\",hidden:props=>props.schemaType===\"DefinedTerm\"},author:{type:ControlType.String,title:\"Author\",defaultValue:\"\",hidden:props=>props.schemaType===\"VideoObject\"||props.schemaType===\"DefinedTerm\"},publisherName:{type:ControlType.String,title:\"Publisher / Site Name\",defaultValue:\"LightSource\"},datePublished:{type:ControlType.Date,title:\"Date Published\",optional:true,hidden:props=>props.schemaType===\"DefinedTerm\"},videoUrl:{type:ControlType.String,title:\"Video URL\",defaultValue:\"\",hidden:props=>props.schemaType!==\"VideoObject\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StructuredData\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"0\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"0\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StructuredData.map"],"mappings":"A,oLAaG,SAAwBS,EAAe,EAAM,CAAC,GAAK,CAAC,aAAW,UAAU,WAAS,GAAG,cAAY,GAAG,QAAM,SAAO,GAAG,gBAAc,cAAc,gBAAc,WAAS,IAAIC,EAAYC,EAASC,GAAO,KAAK,GAA+gD,OAA5gDN,MAAc,CAAC,GAAG,OAAO,SAAW,IAAY,OAAO,IAAMO,EAAaV,EAAO,SAAS,KAAWW,EAAS,MAAMC,EAAW,GAAGZ,EAAO,SAAS,WAAiBa,EAAU,GAAO,CAAC,GAAG,CAACC,EAAM,OAAiB,IAAMC,EAAO,IAAI,KAAKD,CAAK,EAAE,OAAO,OAAO,MAAMC,EAAO,QAAQ,CAAC,EAAED,EAAMC,EAAO,YAAY,CAAE,EAAMC,EAAK,AAA8bA,EAA3bJ,IAAa,cAAoB,CAAC,WAAW,qBAAqB,QAAQ,cAAc,KAAKK,EAAS,cAAY,aAAaT,EAAS,CAACA,CAAQ,EAAE,IAAA,GAAU,WAAWK,EAAUK,CAAa,EAAE,WAAWC,GAAU,IAAA,GAAU,SAASA,GAAU,IAAA,EAAS,EAAWP,IAAa,cAAoB,CAAC,WAAW,qBAAqB,QAAQ,cAAc,KAAKK,EAAS,cAAY,IAAIP,GAAc,IAAA,GAAU,iBAAiBU,CAAa,EAAa,CAAC,WAAW,qBAAqB,QAAQR,EAAW,WAAS,cAAY,MAAMJ,GAAU,IAAA,GAAU,OAAOa,EAAO,CAAC,QAAQ,SAAS,KAAKA,CAAM,EAAE,IAAA,GAAU,UAAU,CAAC,QAAQ,eAAe,KAAKD,CAAa,EAAE,cAAcP,EAAUK,CAAa,EAAE,iBAAiBR,EAAa,CAAC,QAAQ,UAAU,MAAMA,CAAY,EAA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