{"version":3,"file":"StructuredData.eWCMmpga.mjs","names":["__esmMin","init_jsx_runtime","c","addPropertyControls","init_framer_BisrWwwE","ControlType","StructuredData","props","url","slug","SITE","basePath","imageUrl","image","plain","s","typed","line","faqText","m","questions","faqs","f","faqData","data","schemaType","headline","ORG","dateModified","datePublished","authorName","authorUrl","toJson","d","blocks","i","init_StructuredData"],"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":"A,4JAUG,SAAwBM,EAAe,EAAM,CAAC,GAAK,CAAC,aAAW,cAAc,OAAK,CAAC,EAAE,UAAQ,GAAG,WAAS,cAAY,QAAM,gBAAc,eAAa,aAAW,YAAU,WAAS,QAAMC,EAAYC,EAAIC,EAAK,GAAGC,IAAOC,IAAWF,IAAO,IAAA,GAAgBG,EAASC,GAAO,IAAIA,EAAM,IAAI,MAAM,GAAG,CAAC,CAAC,GAAG,IAAA,GAEpSC,EAAM,IAAIC,GAAG,GAAA,CAAI,QAAQ,WAAW,GAAG,CAAC,CAAC,QAAQ,OAAO,GAAG,CAAC,CAAC,KAAK,EAElEC,EAAM,CAAC,EAAE,IAAI,IAAMC,KAAQC,GAAS,GAAA,CAAI,MAAM,OAAO,EAAE,CAAC,IAAMC,EAAEF,EAAK,MAAM,sBAAsB,EAAME,IAAcA,EAAE,EAAE,CAAC,YAAY,IAAI,IAAIH,EAAM,KAAK,CAAC,SAASG,EAAE,EAAE,CAAC,EAAUH,EAAM,SAAO,EAAMA,EAAM,OAAO,EAAE,CAAC,OAAOG,EAAE,IAAG,CAAC,IAAMC,EAAU,CAAC,GAAGC,EAAK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