{"version":3,"file":"StructuredData.B0dNLsqc.mjs","names":["__esmMin","c","init_jsx_runtime","addPropertyControls","init_framer_CaDWdxiz","ControlType","StructuredData","props","imageUrl","image","parsed","datePublished","isoDate","data","schemaType","ORGANIZATION_ID","SITE_URL","question","answer","ORGANIZATION_LOGO","description","WEBSITE_ID","pagePath","text","value","url","hasProduct","productType","productId","parentPath","crumbs","parentName","breadcrumbName","productName","headline","serviceType","index","crumb","authorName","init_StructuredData"],"sources":["https:/framerusercontent.com/modules/FX1G6Iefv1WeqRQ1bLH5/Qgy1QNURSkJomiZuBO7c/StructuredData.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";const SITE_URL=\"https://www.lava.xyz\";const ORGANIZATION_ID=\"https://www.lava.xyz/#organization\";const WEBSITE_ID=\"https://www.lava.xyz/#website\";// The Lava mark the site already uses as its favicon and Apple touch icon (Site Settings).\nconst ORGANIZATION_LOGO={\"@type\":\"ImageObject\",url:\"https://framerusercontent.com/images/ASmWP6UNfmsyNPPG6iqeoEZhI.png\",width:992,height:992};export default function StructuredData(props){const{schemaType,headline,description,image,datePublished,authorName,question,answer}=props;const{pagePath,productType,productName,serviceType,breadcrumbName,parentPath,parentName}=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:{\"@type\":\"Organization\",\"@id\":ORGANIZATION_ID,name:\"Lava\",url:SITE_URL},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||ORGANIZATION_LOGO,description:description||undefined,sameAs:[\"https://x.com/lava_xyz\",\"https://www.linkedin.com/company/81954006/\"]},{\"@type\":\"WebSite\",\"@id\":WEBSITE_ID,name:\"Lava\",url:\"https://www.lava.xyz\",publisher:{\"@id\":ORGANIZATION_ID}}]};}else if(schemaType===\"WebPage\"){// Product pages. URLs are always the production ones so @id values stay stable on previews.\n// Every text value comes from the instance's controls; leave a control empty to omit that field.\nif(!pagePath?.startsWith(\"/\"))return null;const text=value=>value?.trim()||undefined;const url=SITE_URL+pagePath;const hasProduct=!!productType&&productType!==\"None\";// Sub-pages (e.g. /card/partners) have no product of their own and point at the parent page's product.\nconst productId=hasProduct?`${url}#product`:parentPath?`${SITE_URL}${parentPath}#product`:undefined;const crumbs=[{name:\"Home\",item:`${SITE_URL}/`},...parentPath?[{name:text(parentName),item:SITE_URL+parentPath}]:[],{name:text(breadcrumbName)||text(productName),item:url}];data={\"@context\":\"https://schema.org\",\"@graph\":[// Google reads each page on its own, so the nodes these @id references point at are repeated here.\n{\"@type\":\"Organization\",\"@id\":ORGANIZATION_ID,name:\"Lava\",url:SITE_URL},{\"@type\":\"WebSite\",\"@id\":WEBSITE_ID,name:\"Lava\",url:SITE_URL,publisher:{\"@id\":ORGANIZATION_ID}},{\"@type\":\"WebPage\",\"@id\":`${url}#webpage`,url,name:text(headline),description:text(description),isPartOf:{\"@id\":WEBSITE_ID},// Sub-pages name the parent product inline, since its full node lives on the parent page.\nabout:hasProduct?{\"@id\":productId}:productId?{\"@id\":productId,name:text(parentName),url:SITE_URL+parentPath}:undefined,mainEntity:hasProduct?{\"@id\":productId}:undefined,breadcrumb:{\"@id\":`${url}#breadcrumb`}},...hasProduct?[{\"@type\":productType,\"@id\":productId,name:text(productName),url,description:text(description),serviceType:text(serviceType),provider:{\"@id\":ORGANIZATION_ID}}]:[],{\"@type\":\"BreadcrumbList\",\"@id\":`${url}#breadcrumb`,itemListElement:crumbs.map((crumb,index)=>({\"@type\":\"ListItem\",position:index+1,name:crumb.name,item:crumb.item}))}]};}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\",\"WebPage\"]},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\"},pagePath:{type:ControlType.String,title:\"Page path\",placeholder:\"/bloc\",hidden:props=>props.schemaType!==\"WebPage\"},productType:{type:ControlType.Enum,title:\"Product type\",options:[\"None\",\"Service\",\"LoanOrCredit\",\"PaymentCard\"],hidden:props=>props.schemaType!==\"WebPage\"},productName:{type:ControlType.String,title:\"Product name\",hidden:props=>props.schemaType!==\"WebPage\"},serviceType:{type:ControlType.String,title:\"Service type\",hidden:props=>props.schemaType!==\"WebPage\"},breadcrumbName:{type:ControlType.String,title:\"Breadcrumb\",hidden:props=>props.schemaType!==\"WebPage\"},parentPath:{type:ControlType.String,title:\"Parent path\",placeholder:\"/card\",hidden:props=>props.schemaType!==\"WebPage\"},parentName:{type:ControlType.String,title:\"Parent name\",hidden:props=>props.schemaType!==\"WebPage\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StructuredData\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StructuredData.map"],"mappings":"A,4JAC8I,SAAwBM,EAAe,EAAM,CAAC,GAAK,CAAC,aAAW,WAAS,cAAY,QAAM,gBAAc,aAAW,WAAS,UAAQC,EAAW,CAAC,WAAS,cAAY,cAAY,cAAY,iBAAe,aAAW,cAAYA,EAAYC,EAAS,OAAOC,GAAQ,SAASA,EAAMA,GAAO,IAGraC,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,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,IAAI,IAAA,GAAcG,EAAK,GAAGC,IAAa,UAC/P,EAAK,CAAC,WAAW,qBAAqB,QAAQ,UAAU,UAAU,CAAC,QAAQ,eAAe,MAAMC,EAAgB,KAAK,OAAO,IAAIC,CAAQ,EAAE,WAAW,CAAC,CAAC,QAAQ,WAAW,KAAKC,GAAU,KAAK,EAAE,eAAe,CAAC,QAAQ,SAAS,KAAKC,GAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,OAAQ,GAAGJ,IAAa,eAAgB,EAAK,CAAC,WAAW,qBAAqB,SAAS,CAAC,CAAC,QAAQ,eAAe,MAAMC,EAAgB,KAAK,OAAO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