{"version":3,"file":"StructuredData.jMZROFro.mjs","names":["__esmMin","c","init_jsx_runtime","addPropertyControls","init_framer_BWFVvmND","ControlType","StructuredData","props","imageUrl","image","parsed","datePublished","isoDate","data","schemaType","ORGANIZATION_ID","question","answer","description","authorName","init_StructuredData"],"sources":["https:/framerusercontent.com/modules/FX1G6Iefv1WeqRQ1bLH5/0eU9ZfXckMomZhFHYUKY/StructuredData.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";const ORGANIZATION_ID=\"https://www.lava.xyz/#organization\";export default function StructuredData(props){const{schemaType,headline,description,image,datePublished,authorName,question,answer}=props;const imageUrl=typeof image===\"string\"?image:image?.src;// Framer passes dates as display text (e.g. \"Oct 19, 2026\"); schema.org wants ISO 8601.\n// \"Oct 19, 2026\" parses as local midnight, so read the local calendar date.\n// toISOString() would convert to UTC and return the previous day east of UTC.\nconst parsed=datePublished?new Date(datePublished):null;const isoDate=parsed&&!isNaN(parsed.getTime())?`${parsed.getFullYear()}-${String(parsed.getMonth()+1).padStart(2,\"0\")}-${String(parsed.getDate()).padStart(2,\"0\")}`:undefined;let data;if(schemaType===\"FAQPage\"){// Question = CMS Title (some titles end in a space); answer = the plain-text copy of the visible answer.\ndata={\"@context\":\"https://schema.org\",\"@type\":\"FAQPage\",publisher:{\"@id\":ORGANIZATION_ID},mainEntity:[{\"@type\":\"Question\",name:question?.trim(),acceptedAnswer:{\"@type\":\"Answer\",text:answer?.trim()}}]};}else if(schemaType===\"Organization\"){data={\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":ORGANIZATION_ID,name:\"Lava\",url:\"https://www.lava.xyz\",logo:imageUrl||undefined,description:description||undefined,sameAs:[\"https://x.com/lava_xyz\",\"https://www.linkedin.com/company/81954006/\"]},{\"@type\":\"WebSite\",\"@id\":\"https://www.lava.xyz/#website\",name:\"Lava\",url:\"https://www.lava.xyz\",publisher:{\"@id\":ORGANIZATION_ID}}]};}else{data={\"@context\":\"https://schema.org\",\"@type\":schemaType||\"Article\",headline,description:description||undefined,image:imageUrl?[imageUrl]:undefined,datePublished:isoDate,author:authorName?{\"@type\":authorName===\"Lava\"?\"Organization\":\"Person\",name:authorName}:undefined,publisher:{\"@type\":\"Organization\",name:\"Lava\",url:\"https://www.lava.xyz\"}};}return /*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",// JSON.stringify drops undefined fields; escape \"<\" so text can't close the tag\ndangerouslySetInnerHTML:{__html:JSON.stringify(data).replace(/</g,\"\\\\u003c\")}});}StructuredData.defaultProps={schemaType:\"Article\"};addPropertyControls(StructuredData,{schemaType:{type:ControlType.Enum,title:\"Type\",options:[\"Article\",\"BlogPosting\",\"FAQPage\",\"Organization\"]},headline:{type:ControlType.String,title:\"Headline\"},description:{type:ControlType.String,title:\"Description\"},image:{type:ControlType.ResponsiveImage,title:\"Image\"},datePublished:{type:ControlType.String,title:\"Date\"},authorName:{type:ControlType.String,title:\"Author\"},question:{type:ControlType.String,title:\"Question\"},answer:{type:ControlType.String,title:\"Answer\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StructuredData\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StructuredData.map"],"mappings":"A,4JAA0J,SAAwBM,EAAe,EAAM,CAAC,GAAK,CAAC,aAAW,WAAS,cAAY,QAAM,gBAAc,aAAW,WAAS,UAAQC,EAAYC,EAAS,OAAOC,GAAQ,SAASA,EAAMA,GAAO,IAGlVC,EAAOC,EAAc,IAAI,KAAKA,CAAa,EAAE,KAAWC,EAAQF,GAAQ,CAAC,MAAMA,EAAO,QAAQ,CAAC,EAAE,GAAGA,EAAO,YAAY,EAAE,GAAG,OAAOA,EAAO,SAAS,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,OAAOA,EAAO,QAAQ,CA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