{"version":3,"file":"Structured_Data.CJB4DUUw.mjs","names":[],"sources":["https:/framerusercontent.com/modules/QbH8EI1jeaMcDAn46gWy/Nx15nk5AR0fU64AMRr4x/Structured_Data.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";const MAX_ITEMS=8;/**\n * STRUCTURED DATA\n *\n * Renders page-specific JSON-LD (Article, FAQPage, or HowTo) as a\n * `<script type=\"application/ld+json\">` tag, invisible on the canvas\n * and in the browser, readable by search and AI crawlers.\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function StructuredData(props){const{schemaType,headline,description,authorName,datePublished,dateModified,image,publisherName,publisherLogo,howToName,howToDescription,totalTime}=props;const toIso=value=>{if(!value)return value;const parsed=new Date(value);return isNaN(parsed.getTime())?value:parsed.toISOString().slice(0,10);};let data=null;if(schemaType===\"Article\"){data={\"@context\":\"https://schema.org\",\"@type\":\"Article\",headline,description,image:image?.src?[image.src]:undefined,datePublished:toIso(datePublished),dateModified:toIso(dateModified||datePublished),author:authorName?{\"@type\":\"Person\",name:authorName}:undefined,publisher:publisherName?{\"@type\":\"Organization\",name:publisherName,logo:publisherLogo?{\"@type\":\"ImageObject\",url:publisherLogo}:undefined}:undefined,mainEntityOfPage:typeof window!==\"undefined\"?{\"@type\":\"WebPage\",\"@id\":window.location.href}:undefined};}else if(schemaType===\"FAQPage\"){const items=[];for(let i=1;i<=MAX_ITEMS;i++){const question=props[`question${i}`];const answer=props[`answer${i}`];if(question&&answer)items.push({question,answer});}data={\"@context\":\"https://schema.org\",\"@type\":\"FAQPage\",mainEntity:items.map(item=>({\"@type\":\"Question\",name:item.question,acceptedAnswer:{\"@type\":\"Answer\",text:item.answer}}))};}else if(schemaType===\"HowTo\"){const stepItems=[];for(let i=1;i<=MAX_ITEMS;i++){const name=props[`stepName${i}`];const text=props[`stepText${i}`];if(name)stepItems.push({name,text:text||name});}data={\"@context\":\"https://schema.org\",\"@type\":\"HowTo\",name:howToName,description:howToDescription,totalTime:totalTime||undefined,step:stepItems.map(s=>({\"@type\":\"HowToStep\",name:s.name,text:s.text}))};}if(!data)return null;return /*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:JSON.stringify(data)}});}StructuredData.defaultProps={schemaType:\"Article\",headline:\"Article headline\",description:\"Article description\",authorName:\"Author name\",datePublished:\"2026-01-01\",dateModified:\"\",image:undefined,publisherName:\"Brandry\",publisherLogo:\"\",howToName:\"How it works\",howToDescription:\"Description of the process\",totalTime:\"\"};const controls={schemaType:{type:ControlType.Enum,title:\"Schema Type\",options:[\"Article\",\"FAQPage\",\"HowTo\"],optionTitles:[\"Article\",\"FAQ Page\",\"How To\"],defaultValue:\"Article\"},/* Article */headline:{type:ControlType.String,title:\"Headline\",defaultValue:\"Article headline\",hidden:props=>props.schemaType!==\"Article\"},description:{type:ControlType.String,title:\"Description\",displayTextArea:true,hidden:props=>props.schemaType!==\"Article\"},authorName:{type:ControlType.String,title:\"Author Name\",hidden:props=>props.schemaType!==\"Article\"},datePublished:{type:ControlType.String,title:\"Date Published\",placeholder:\"YYYY-MM-DD\",hidden:props=>props.schemaType!==\"Article\"},dateModified:{type:ControlType.String,title:\"Date Modified\",placeholder:\"YYYY-MM-DD (optional)\",hidden:props=>props.schemaType!==\"Article\"},image:{type:ControlType.ResponsiveImage,title:\"Image\",hidden:props=>props.schemaType!==\"Article\"},publisherName:{type:ControlType.String,title:\"Publisher Name\",defaultValue:\"Brandry\",hidden:props=>props.schemaType!==\"Article\"},publisherLogo:{type:ControlType.String,title:\"Publisher Logo URL\",hidden:props=>props.schemaType!==\"Article\"},/* HowTo */howToName:{type:ControlType.String,title:\"Process Name\",hidden:props=>props.schemaType!==\"HowTo\"},howToDescription:{type:ControlType.String,title:\"Process Description\",displayTextArea:true,hidden:props=>props.schemaType!==\"HowTo\"},totalTime:{type:ControlType.String,title:\"Total Time\",placeholder:\"e.g. P21D\",hidden:props=>props.schemaType!==\"HowTo\"}};for(let i=1;i<=MAX_ITEMS;i++){controls[`question${i}`]={type:ControlType.String,title:`Question ${i}`,displayTextArea:true,hidden:props=>props.schemaType!==\"FAQPage\"};controls[`answer${i}`]={type:ControlType.String,title:`Answer ${i}`,displayTextArea:true,hidden:props=>props.schemaType!==\"FAQPage\"};controls[`stepName${i}`]={type:ControlType.String,title:`Step ${i} Name`,hidden:props=>props.schemaType!==\"HowTo\"};controls[`stepText${i}`]={type:ControlType.String,title:`Step ${i} Text`,displayTextArea:true,hidden:props=>props.schemaType!==\"HowTo\"};}addPropertyControls(StructuredData,controls);\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StructuredData\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Structured_Data.map"],"mappings":"0KASG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,aAAW,WAAS,cAAY,aAAW,gBAAc,eAAa,QAAM,gBAAc,gBAAc,YAAU,mBAAiB,aAAW,EAAY,EAAM,GAAO,CAAC,GAAG,CAAC,EAAM,OAAO,EAAM,IAAM,EAAO,IAAI,KAAK,CAAK,EAAE,OAAO,MAAM,EAAO,QAAQ,CAAC,EAAE,EAAM,EAAO,YAAY,CAAC,CAAC,MAAM,EAAE,EAAE,CAAE,EAAM,EAAK,KAAK,GAAG,IAAa,UAAW,EAAK,CAAC,WAAW,qBAAqB,QAAQ,UAAU,WAAS,cAAY,MAAM,GAAO,IAAI,CAAC,EAAM,GAAG,EAAE,IAAA,GAAU,cAAc,EAAM,CAAa,EAAE,aAAa,EAAM,GAAc,CAAa,EAAE,OAAO,EAAW,CAAC,QAAQ,SAAS,KAAK,CAAU,EAAE,IAAA,GAAU,UAAU,EAAc,CAAC,QAAQ,eAAe,KAAK,EAAc,KAA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