{"version":3,"file":"StructuredData.CaP587A1.mjs","names":[],"sources":["https:/framerusercontent.com/modules/W7DVxr2tC8P3gmlVese3/g980ehAcof0Nuqa5DyUR/StructuredData.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";// Hidden JSON-LD for CMS template pages (blog posts, case studies, service pages).\n// Place one instance on the template and bind its controls to the CMS fields.\n// The site-wide Organization and WebSite schema lives in Framer's custom code\n// (tools/structured-data.head.html); this refers to it by @id.\nconst SITE=\"https://pineo.com\";const ORG={\"@id\":SITE+\"/#organization\"};/**\n * @framerIntrinsicWidth 1\n * @framerIntrinsicHeight 1\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function StructuredData(props){const{schemaType=\"BlogPosting\",faqs=[],faqText=\"\",headline,description,image,datePublished,dateModified,authorName,authorUrl,basePath,slug}=props;const url=slug?`${SITE}${basePath}${slug}`:undefined;const imageUrl=image?.src?image.src.split(\"?\")[0]:undefined;// FAQPage is added alongside the main type when the FAQ list has questions.\n// The text must match the FAQ shown on the page, so bind it to the same CMS list.\nconst plain=s=>(s||\"\").replace(/<[^>]*>/g,\" \").replace(/\\s+/g,\" \").trim();// Pages without a CMS FAQ list (the home page) type their FAQs into \"FAQ text\":\n// one \"Q: ...\" line followed by one \"A: ...\" line per question.\nconst typed=[];for(const line of(faqText||\"\").split(/\\r?\\n/)){const m=line.match(/^\\s*([QA]):\\s*(.*)$/i);if(!m)continue;if(m[1].toUpperCase()===\"Q\")typed.push({question:m[2]});else if(typed.length)typed[typed.length-1].answer=m[2];}const questions=[...faqs,...typed].map(f=>({q:plain(f?.question),a:plain(f?.answer)})).filter(f=>f.q&&f.a);const faqData=questions.length?{\"@context\":\"https://schema.org\",\"@type\":\"FAQPage\",mainEntity:questions.map(f=>({\"@type\":\"Question\",name:f.q,acceptedAnswer:{\"@type\":\"Answer\",text:f.a}}))}:null;let data;if(schemaType===\"None\"){data=null;}else if(schemaType===\"Service\"){data={\"@context\":\"https://schema.org\",\"@type\":\"Service\",name:headline,serviceType:headline,description,url,image:imageUrl,provider:ORG,areaServed:{\"@type\":\"Country\",name:\"United Kingdom\"}};}else{data={\"@context\":\"https://schema.org\",\"@type\":schemaType,headline,description,url,mainEntityOfPage:url,image:imageUrl?[imageUrl]:undefined,datePublished,dateModified:dateModified||datePublished,author:authorName?{\"@type\":\"Person\",name:authorName,url:authorUrl||undefined,worksFor:ORG}:ORG,publisher:ORG,inLanguage:\"en-GB\"};}// JSON.stringify drops undefined values; escape \"<\" so text can't close the script tag\nconst toJson=d=>JSON.stringify(d).replace(/</g,\"\\\\u003c\");const blocks=[data,faqData].filter(Boolean);return /*#__PURE__*/_jsx(\"div\",{style:{display:\"none\"},\"aria-hidden\":true,children:blocks.map((d,i)=>/*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:toJson(d)}},i))});}addPropertyControls(StructuredData,{schemaType:{type:ControlType.Enum,title:\"Type\",options:[\"BlogPosting\",\"Article\",\"Service\",\"None\"],optionTitles:[\"Blog post\",\"Article (case study)\",\"Service\",\"FAQ only\"],defaultValue:\"BlogPosting\"},faqs:{type:ControlType.Array,title:\"FAQs\",control:{type:ControlType.Object,controls:{question:{type:ControlType.String,title:\"Question\",defaultValue:\"\"},answer:{type:ControlType.String,title:\"Answer\",defaultValue:\"\",displayTextArea:true}}},defaultValue:[]},faqText:{type:ControlType.String,title:\"FAQ text\",defaultValue:\"\",displayTextArea:true},headline:{type:ControlType.String,title:\"Title\",defaultValue:\"\"},description:{type:ControlType.String,title:\"Description\",defaultValue:\"\"},image:{type:ControlType.ResponsiveImage,title:\"Image\"},datePublished:{type:ControlType.Date,title:\"Published\"},dateModified:{type:ControlType.Date,title:\"Updated\"},authorName:{type:ControlType.String,title:\"Author\",defaultValue:\"\"},authorUrl:{type:ControlType.String,title:\"Author URL\",defaultValue:\"\"},basePath:{type:ControlType.String,title:\"Base path\",defaultValue:\"/blog/\"},slug:{type:ControlType.String,title:\"Slug\",defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StructuredData\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StructuredData.map"],"mappings":"4JAUG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,aAAW,cAAc,OAAK,CAAC,EAAE,UAAQ,GAAG,WAAS,cAAY,QAAM,gBAAc,eAAa,aAAW,YAAU,WAAS,QAAM,EAAY,EAAI,EAAK,GAAG,IAAO,IAAW,IAAO,IAAA,GAAgB,EAAS,GAAO,IAAI,EAAM,IAAI,MAAM,GAAG,CAAC,CAAC,GAAG,IAAA,GAEpS,EAAM,IAAI,GAAG,GAAA,CAAI,QAAQ,WAAW,GAAG,CAAC,CAAC,QAAQ,OAAO,GAAG,CAAC,CAAC,KAAK,EAElE,EAAM,CAAC,EAAE,IAAI,IAAM,KAAQ,GAAS,GAAA,CAAI,MAAM,OAAO,EAAE,CAAC,IAAM,EAAE,EAAK,MAAM,sBAAsB,EAAM,IAAc,EAAE,EAAE,CAAC,YAAY,IAAI,IAAI,EAAM,KAAK,CAAC,SAAS,EAAE,EAAE,CAAC,EAAU,EAAM,SAAO,EAAM,EAAM,OAAO,EAAE,CAAC,OAAO,EAAE,IAAG,CAAC,IAAM,EAAU,CAAC,GAAG,EAAK,GAAG,CAAK,CAAC,CAAC,IAAI,IAAI,CAAC,EAAE,EAAM,GAAG,QAAQ,EAAE,EAAE,EAAM,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,GAAG,EAAE,GAAG,EAAE,CAAC,EAAQ,EAAQ,EAAU,OAAO,CAAC,WAAW,qBAAqB,QAAQ,UAAU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