{"version":3,"file":"AcoSeoStructuredData.CIXustlY.mjs","names":[],"sources":["https:/framerusercontent.com/modules/kvALgEkl5bfjqrSfAdAt/H49nduKIiCezWWLZZEhx/AcoSeoStructuredData.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";const origin=\"https://www.acokk.co.jp\";const organizationId=`${origin}/#organization`;function publicUrl(value){if(!value.startsWith(\"/\")||value.startsWith(\"//\")||/[?#\\\\\\s]/u.test(value))return;const url=new URL(value,origin);if(url.origin!==origin||url.pathname!==value)return;return url.href;}function verifiedDate(value){const match=value.trim().match(/^(\\d{4})[-./](\\d{1,2})[-./](\\d{1,2})(?:T.*)?$/);if(!match)return;const date=`${match[1]}-${match[2].padStart(2,\"0\")}-${match[3].padStart(2,\"0\")}`;if(!Number.isFinite(Date.parse(date)))return;return new Date(date).toISOString().slice(0,10)===date?date:undefined;}/** CMS values are supplied as props at render time. No DOM, effect or browser URL inference. */export function buildSeoGraph(props){const title=(props.title||\"\").trim();const slug=(props.slug||\"\").trim();const collection=(props.collectionPath||\"\").replace(/\\/$/,\"\");// Framer Slug bindings return a relative page URL; plain slugs are also supported.\nconst segment=slug.startsWith(`${collection}/`)?slug.slice(collection.length+1):slug;const pagePath=slug?`${collection}/${segment}`:props.pagePath;const url=publicUrl(pagePath||\"\");if(!url||!title||slug&&(!collection||/[/\\\\?#]/.test(segment)))return null;const graph=[{\"@type\":\"Organization\",\"@id\":organizationId,name:\"株式会社アコー\",url:`${origin}/`,foundingDate:\"1977-02-14\",address:{\"@type\":\"PostalAddress\",postalCode:\"279-0022\",addressCountry:\"JP\",addressRegion:\"千葉県\",addressLocality:\"浦安市\",streetAddress:\"今川1-1-40\"},telephone:\"+81-47-352-4761\",sameAs:[\"https://www.instagram.com/aco_clean_air/\",\"https://www.youtube.com/acomovie\"]}];const page={\"@type\":\"WebPage\",\"@id\":`${url}#webpage`,url,name:title,inLanguage:\"ja\",publisher:{\"@id\":organizationId}};graph.push(page);const currentLabel=(props.currentLabel||title).trim();const parentUrl=publicUrl(props.parentPath||\"\");// Emit only explicitly supplied, visible breadcrumbs. Never infer hierarchy from the URL.\nif(currentLabel&&url!==`${origin}/`&&(parentUrl||props.parentPath===\"/\")){const crumbs=[{name:\"ホーム\",item:`${origin}/`}];if(parentUrl&&parentUrl!==`${origin}/`&&parentUrl!==url&&props.parentLabel?.trim()){crumbs.push({name:props.parentLabel.trim(),item:parentUrl});}crumbs.push({name:currentLabel,item:url});page.breadcrumb={\"@id\":`${url}#breadcrumb`};graph.push({\"@type\":\"BreadcrumbList\",\"@id\":`${url}#breadcrumb`,itemListElement:crumbs.map((crumb,index)=>({\"@type\":\"ListItem\",position:index+1,...crumb}))});}if(props.kind===\"Article\"){const article={\"@type\":\"Article\",\"@id\":`${url}#article`,url,headline:title,inLanguage:\"ja\",publisher:{\"@id\":organizationId},mainEntityOfPage:{\"@id\":`${url}#webpage`}};const date=verifiedDate(props.publishedDate||\"\");if(date)article.datePublished=date;if(props.authorName?.trim())article.author={\"@type\":\"Person\",name:props.authorName.trim()};if(props.description?.trim())article.description=props.description.trim();graph.push(article);page.mainEntity={\"@id\":article[\"@id\"]};}else if(props.kind===\"Product\"&&props.description?.trim()){const product={\"@type\":\"Product\",\"@id\":`${url}#product`,url,name:title,description:props.description.trim(),manufacturer:{\"@id\":organizationId},mainEntityOfPage:{\"@id\":`${url}#webpage`}};graph.push(product);page.mainEntity={\"@id\":product[\"@id\"]};}return{\"@context\":\"https://schema.org\",\"@graph\":graph};}/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function AcoSeoStructuredData(props){if(RenderTarget.current()===RenderTarget.canvas)return null;const data=buildSeoGraph(props);if(!data)return null;const json=JSON.stringify(data).replace(/</g,\"\\\\u003c\").replace(/>/g,\"\\\\u003e\").replace(/&/g,\"\\\\u0026\").replace(/\\u2028/g,\"\\\\u2028\").replace(/\\u2029/g,\"\\\\u2029\");return /*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",\"data-aco-seo\":\"true\",dangerouslySetInnerHTML:{__html:json}});}addPropertyControls(AcoSeoStructuredData,{kind:{type:ControlType.Enum,options:[\"WebPage\",\"Article\",\"Product\"],defaultValue:\"WebPage\",title:\"Type\"},pagePath:{type:ControlType.String,title:\"Page path\",defaultValue:\"\"},collectionPath:{type:ControlType.String,title:\"Collection\",defaultValue:\"\"},slug:{type:ControlType.String,title:\"CMS slug\",defaultValue:\"\"},title:{type:ControlType.String,title:\"Title\",defaultValue:\"\"},description:{type:ControlType.String,title:\"Description\",defaultValue:\"\",displayTextArea:true},publishedDate:{type:ControlType.String,title:\"Published\",defaultValue:\"\"},parentPath:{type:ControlType.String,title:\"Crumb parent\",defaultValue:\"\"},parentLabel:{type:ControlType.String,title:\"Parent label\",defaultValue:\"\"},currentLabel:{type:ControlType.String,title:\"Current label\",defaultValue:\"\"},authorName:{type:ControlType.String,title:\"Author\",defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AcoSeoStructuredData\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"buildSeoGraph\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AcoSeoStructuredData.map"],"mappings":"mKAAkM,SAAS,EAAU,EAAM,CAAC,GAAG,CAAC,EAAM,WAAW,GAAG,GAAG,EAAM,WAAW,IAAI,GAAG,YAAY,KAAK,CAAK,EAAE,OAAO,IAAM,EAAI,IAAI,IAAI,EAAM,CAAM,EAAK,OAAI,SAAS,GAAQ,EAAI,WAAW,GAAa,OAAO,EAAI,IAAK,CAAC,SAAS,EAAa,EAAM,CAAC,IAAM,EAAM,EAAM,KAAK,CAAC,CAAC,MAAM,+CAA+C,EAAE,GA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