{"version":3,"file":"FAQSchema.DFrwQ75j.mjs","names":["__esmMin","init_jsx_runtime","c","addPropertyControls","useLocaleInfo","init_framer_BisrWwwE","ControlType","useLocale","active","raw","fallback","FAQSchema","localeFallback","props","locale","origin","url","path","entities","qaNl","qaEn","chunk","parts","json","value","init_FAQSchema"],"sources":["https:/framerusercontent.com/modules/MiFsG9gHOljeNs4hz0CG/1ZUq6QAfEeDX9GG7fKmK/FAQSchema.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useLocaleInfo}from\"framer\";/** See _locale.md. */function useLocale(fallback){const info=useLocaleInfo?.()??{};const active=info.activeLocale??{};const raw=active.code??active.slug??active.id??\"\";return String(raw).toLowerCase().startsWith(\"nl\")?\"nl\":fallback;}/**\n * FAQSchema\n *\n * Puts the FAQ answers back into the served HTML. Framer accordions mount their\n * answers on click, so a crawler that does not run JavaScript sees the questions\n * and almost none of the answers. The site this replaces server-rendered all of\n * them. See watermelon-jsonld/README.md section 2.\n *\n * Place once per FAQ page, anywhere in the page body. Each page passes only its\n * own pairs, and the Dutch set is separate from the English one: a Framer page and\n * its /nl counterpart are the same page, and the active locale is the only thing\n * that differs between the two renders.\n *\n * Pairs are one string, `question |~| answer ~~ question |~| answer`. Not JSON:\n * the Framer edit DSL strips backslash escapes, so a JSON payload with quotes in it\n * cannot be written into a property control programmatically. No question or answer\n * on this site contains a quote, a newline, `|~|` or `~~` (checked).\n *\n * @framerIntrinsicWidth 0\n * @framerIntrinsicHeight 0\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function FAQSchema(props){const{path,qaEn,qaNl,locale:localeFallback}=props;const locale=useLocale(localeFallback);const origin=\"https://watermelon.ai\";const prefix=locale===\"nl\"?\"/nl\":\"\";const url=`${origin}${prefix}${path}`;const raw=(locale===\"nl\"?qaNl:qaEn)||\"\";const entities=raw.split(\"~~\").map(chunk=>chunk.split(\"|~|\")).filter(parts=>parts.length===2&&parts[0].trim()&&parts[1].trim()).map(parts=>({\"@type\":\"Question\",name:parts[0].trim(),acceptedAnswer:{\"@type\":\"Answer\",text:parts[1].trim()}}));if(!entities.length)return null;const json=JSON.stringify({\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"FAQPage\",// The page's own WebPage node is pasted per page and always\n// carries the un-prefixed URL, so isPartOf points at that one.\n\"@id\":`${url}#faq`,inLanguage:locale,isPartOf:{\"@id\":`${origin}${path}#webpage`},mainEntity:entities}]},(_key,value)=>value===undefined||value===\"\"?undefined:value);return /*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:json.replace(/</g,\"\\\\u003c\")}});}FAQSchema.defaultProps={path:\"/\",qaEn:\"\",qaNl:\"\",locale:\"en\"};addPropertyControls(FAQSchema,{path:{type:ControlType.String,title:\"Path\",defaultValue:\"/\"},qaEn:{type:ControlType.String,title:\"Q&A EN\",displayTextArea:true,defaultValue:\"\"},qaNl:{type:ControlType.String,title:\"Q&A NL\",displayTextArea:true,defaultValue:\"\"},locale:{type:ControlType.Enum,title:\"Fallback\",options:[\"en\",\"nl\"],optionTitles:[\"English\",\"Dutch\"],defaultValue:\"en\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQSchema\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicWidth\":\"0\",\"framerIntrinsicHeight\":\"0\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQSchema.map"],"mappings":"A,oKAAmI,SAASO,EAAU,EAAS,CAAkC,IAAMC,GAA5BJ,IAAgB,GAAG,CAAC,EAAA,CAAoB,cAAc,CAAC,EAAQK,EAAID,EAAO,MAAMA,EAAO,MAAMA,EAAO,IAAI,GAAG,OAAO,OAAOC,CAAG,CAAC,CAAC,YAAY,CAAC,CAA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