{"version":3,"file":"FAQSchema.X86It5lF.mjs","names":[],"sources":["https:/framerusercontent.com/modules/OCZwrrPKXgyLjuQB3JBJ/lY51CqDOAG0ZFurePtBQ/FAQSchema.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";// Accepts a plain [{question, answer}] list (or a full FAQPage object).\nfunction buildSchema(raw){try{const parsed=JSON.parse(raw);let schema=parsed;if(Array.isArray(parsed)){const items=parsed.filter(item=>item&&item.question&&item.answer);schema={\"@context\":\"https://schema.org\",\"@type\":\"FAQPage\",mainEntity:items.map(item=>({\"@type\":\"Question\",name:item.question,acceptedAnswer:{\"@type\":\"Answer\",text:item.answer}}))};}const count=Array.isArray(schema.mainEntity)?schema.mainEntity.length:0;if(!count)return null;// Escape \"<\" so answer text can never close the script tag early.\nconst json=JSON.stringify(schema).replace(/</g,\"<\");return{json,count};}catch(e){return null;}}/**\n * FAQ Schema\n *\n * Writes this page's FAQPage JSON-LD straight into the page HTML, so search\n * engines and AI crawlers can read it without running JavaScript.\n * Keep the Q&As identical to the FAQ section on the page.\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function FAQSchema(props){const{faqJson=\"[]\"}=props;const schema=buildSchema(faqJson);const onCanvas=RenderTarget.current()===RenderTarget.canvas;if(onCanvas){return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",minWidth:\"max-content\",padding:\"4px 8px\",borderRadius:6,fontSize:11,fontFamily:\"sans-serif\",color:schema?\"#0B6B2E\":\"#B42318\",background:schema?\"#E8F7EE\":\"#FDECEC\"},children:schema?`FAQ schema: ${schema.count} questions`:\"FAQ schema: invalid or empty JSON\"});}if(!schema)return null;return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:0,height:0,overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:schema.json}})});}addPropertyControls(FAQSchema,{faqJson:{type:ControlType.String,title:\"FAQ JSON\",description:'List of {\"question\",\"answer\"} pairs, matching the FAQ section on this page word for word.',displayTextArea:true,preventLocalization:true,defaultValue:\"[]\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQSchema\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQSchema.map"],"mappings":"mKACA,SAAS,EAAY,EAAI,CAAC,GAAG,CAAC,IAAM,EAAO,KAAK,MAAM,CAAG,EAAM,EAAO,EAAU,MAAM,QAAQ,CAAM,IAAqE,EAAO,CAAC,WAAW,qBAAqB,QAAQ,UAAU,WAAhH,EAAO,OAAO,GAAM,GAAM,EAAK,UAAU,EAAK,MAAiF,CAAC,CAAC,IAAI,IAAO,CAAC,QAAQ,WAAW,KAAK,EAAK,SAAS,eAAe,CAAC,QAAQ,SAAS,KAAK,EAAK,MAAM,CAAC,EAAE,CAAC,GAAG,IAAM,EAAM,MAAM,QAAQ,EAAO,UAAU,EAAE,EAAO,WAAW,OAAO,EAChX,OADsX,EAChX,CAAC,KAAhD,KAAK,UAAU,CAAM,CAAC,CAAC,QAAQ,KAAK,GAAe,EAAE,OAAK,EADkX,IAChX,MAAS,CAAC,OAAO,IAAK,CAAC,CAS3F,SAAwB,EAAU,EAAM,CAAC,GAAK,CAAC,UAAQ,MAAM,EAAY,EAAO,EAAY,CAAO,EAAga,OAA/Y,EAAa,QAAQ,IAAI,EAAa,OAAwC,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,SAAS,cAAc,QAAQ,UAAU,aAAa,EAAE,SAAS,GAAG,WAAW,aAAa,MAAM,EAAO,UAAU,UAAU,WAAW,EAAO,UAAU,SAAS,EAAE,SAAS,EAAO,eAAe,EAAO,MAAM,YAAY,mCAAmC,CAAC,EAA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