{"version":3,"file":"StructuredData.CQMbe3U6.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/ov9nd0Yoh4wgDHBKfK5Z/ldqgCk4nIwBglht0xywR/StructuredData.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useMemo}from\"react\";const SITE=\"https://pulau.studio\";const STUDIO_ID=SITE+\"/#studio\";const PERSON_ID=SITE+\"/#talisa-dwiyani\";const WEBSITE_ID=SITE+\"/#website\";function clean(value){if(typeof value!==\"string\")return undefined;const trimmed=value.trim();return trimmed.length>0?trimmed:undefined;}function isoDate(value){const raw=clean(value);if(!raw)return undefined;const parsed=new Date(raw);if(isNaN(parsed.getTime()))return undefined;return parsed.toISOString().slice(0,10);}function buildProject(props){const title=clean(props.title);const slug=clean(props.slug);if(!title||!slug)return null;const url=SITE+\"/project/\"+slug;const node={\"@type\":\"CreativeWork\",\"@id\":url+\"#project\",name:title,url,creator:{\"@id\":STUDIO_ID},author:{\"@id\":STUDIO_ID},inLanguage:\"en\",isPartOf:{\"@id\":WEBSITE_ID}};const description=clean(props.description);if(description)node.description=description;const image=clean(props.image);if(image)node.image=image;const discipline=clean(props.discipline);if(discipline)node.genre=discipline;const location=clean(props.location);if(location){node.locationCreated={\"@type\":\"Place\",name:location,address:{\"@type\":\"PostalAddress\",addressRegion:\"Bali\",addressCountry:\"ID\"}};}const graph=[node];if(props.showBreadcrumbs){graph.push({\"@type\":\"BreadcrumbList\",\"@id\":url+\"#breadcrumbs\",itemListElement:[{\"@type\":\"ListItem\",position:1,name:\"Home\",item:SITE+\"/\"},{\"@type\":\"ListItem\",position:2,name:title}]});}return{\"@context\":\"https://schema.org\",\"@graph\":graph};}function buildArticle(props){const title=clean(props.title);const slug=clean(props.slug);if(!title||!slug)return null;const url=SITE+\"/blog/\"+slug;const published=isoDate(props.datePublished);const node={\"@type\":\"BlogPosting\",\"@id\":url+\"#article\",headline:title.length>110?title.slice(0,110):title,url,mainEntityOfPage:url,author:{\"@id\":PERSON_ID},publisher:{\"@id\":STUDIO_ID},inLanguage:\"en\",isPartOf:{\"@id\":SITE+\"/blog#blog\"}};const description=clean(props.description);if(description)node.description=description;const image=clean(props.image);if(image)node.image=image;const topic=clean(props.topic);if(topic)node.articleSection=topic;if(published){node.datePublished=published;node.dateModified=isoDate(props.dateModified)||published;}const graph=[node];if(props.showBreadcrumbs){graph.push({\"@type\":\"BreadcrumbList\",\"@id\":url+\"#breadcrumbs\",itemListElement:[{\"@type\":\"ListItem\",position:1,name:\"Home\",item:SITE+\"/\"},{\"@type\":\"ListItem\",position:2,name:\"Journal\",item:SITE+\"/blog\"},{\"@type\":\"ListItem\",position:3,name:title}]});}return{\"@context\":\"https://schema.org\",\"@graph\":graph};}/**\n * Structured Data\n *\n * Emits a JSON-LD <script> for the page it sits on. Renders nothing visible.\n * Sitewide Organization / Person / WebSite entities live in Site Settings →\n * Custom Code (headStart); this component adds the page-level nodes that\n * reference them by @id.\n *\n * @framerIntrinsicWidth 160\n * @framerIntrinsicHeight 32\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function StructuredData(props){const{mode}=props;const isStatic=useIsStaticRenderer();const json=useMemo(()=>{let data=null;if(mode===\"project\"){data=buildProject(props);}else if(mode===\"article\"){data=buildArticle(props);}else{const raw=clean(props.raw);if(raw){try{data=JSON.parse(raw);}catch(error){data=null;}}}if(!data)return null;// Prevent a literal </script> inside any string value from closing the tag early.\nreturn JSON.stringify(data).replace(/</g,\"\\\\u003c\");},[props,mode]);if(isStatic){return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",borderRadius:4,border:\"1px dashed rgba(0,0,0,0.25)\",background:\"rgba(0,0,0,0.03)\",color:json?\"#222\":\"#B00020\",fontSize:10,fontFamily:\"monospace\",letterSpacing:\"-0.01em\",overflow:\"hidden\"},children:json?\"JSON-LD \\xb7 \"+mode:\"JSON-LD \\xb7 invalid\"});}if(!json)return null;return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",display:\"none\"},children:/*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:json}})});}addPropertyControls(StructuredData,{mode:{type:ControlType.Enum,title:\"Mode\",options:[\"raw\",\"project\",\"article\"],optionTitles:[\"Raw JSON\",\"Project\",\"Article\"],defaultValue:\"raw\"},raw:{type:ControlType.String,title:\"JSON\",displayTextArea:true,defaultValue:\"\",placeholder:\"Paste a JSON-LD object\",preventLocalization:true,hidden:props=>props.mode!==\"raw\"},title:{type:ControlType.String,title:\"Title\",defaultValue:\"\",hidden:props=>props.mode===\"raw\"},slug:{type:ControlType.String,title:\"Slug\",defaultValue:\"\",preventLocalization:true,hidden:props=>props.mode===\"raw\"},description:{type:ControlType.String,title:\"Description\",displayTextArea:true,defaultValue:\"\",hidden:props=>props.mode===\"raw\"},image:{type:ControlType.String,title:\"Image URL\",defaultValue:\"\",preventLocalization:true,hidden:props=>props.mode===\"raw\"},discipline:{type:ControlType.String,title:\"Discipline\",defaultValue:\"\",hidden:props=>props.mode!==\"project\"},location:{type:ControlType.String,title:\"Location\",defaultValue:\"\",hidden:props=>props.mode!==\"project\"},topic:{type:ControlType.String,title:\"Topic\",defaultValue:\"\",hidden:props=>props.mode!==\"article\"},datePublished:{type:ControlType.String,title:\"Published\",defaultValue:\"\",preventLocalization:true,hidden:props=>props.mode!==\"article\"},dateModified:{type:ControlType.String,title:\"Updated\",defaultValue:\"\",preventLocalization:true,hidden:props=>props.mode!==\"article\"},showBreadcrumbs:{type:ControlType.Boolean,title:\"Breadcrumbs\",defaultValue:true,hidden:props=>props.mode===\"raw\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StructuredData\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicWidth\":\"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