{"version":3,"file":"SchemaGenerator.Cl-R4whG.mjs","names":["Fragment","BlogEmbed"],"sources":["https:/framer.com/m/BlogEmbed-UJnx.js","https:/framerusercontent.com/modules/duIHGeGIfMWjkAxr5qUp/U60LUa93FhxSJoJSr2oT/BlogEmbed.js","https:/framerusercontent.com/modules/RlvmerqZiHGIUd7nMjit/iUFl2PAg886o5AxdKBIZ/SchemaGenerator.js"],"sourcesContent":["/*\n * EmbedCTAAd\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/zGZRifWRPCVmuQ1GEM7l/kef5a2krg9ib6pwNfXWR/Goaub9_6T.js\"\nexport { default } from \"https://framerusercontent.com/modules/zGZRifWRPCVmuQ1GEM7l/kef5a2krg9ib6pwNfXWR/Goaub9_6T.js\"\n","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{Fragment}from\"react\";import BlogEmbed from\"https://framer.com/m/BlogEmbed-UJnx.js\";import{useMounted}from\"https://framerusercontent.com/modules/Hs5Uxuy5fN2te2lf2Lkp/TS4bN3Uu9v22RgqWue8s/useMounted.js\";import React from\"react\";export function withEmbed(Component){const WrappedComponent=props=>{var _props_children;const{children:childElements}=(props===null||props===void 0?void 0:(_props_children=props.children)===null||_props_children===void 0?void 0:_props_children.props)||{};const mounted=useMounted();// If there are no child elements or not mounted, render the component directly\nif(!childElements||!mounted)return /*#__PURE__*/_jsx(Component,{...props});let h2Count=0;return /*#__PURE__*/_jsx(Component,{...props,children:/*#__PURE__*/_jsx(Fragment,{children:childElements.map((child,index)=>{if(child.type===\"h2\"){h2Count++;// When we reach the third <h2>, insert the embed\nif(h2Count>2){h2Count=0;return /*#__PURE__*/_jsxs(Fragment,{children:[/*#__PURE__*/_jsx(BlogEmbed,{style:{width:\"100%\",margin:\"20px 0\"},variant:\"Embed\"}),child]},`embed-${index}`);}}return child;})})});};// Memoize the wrapped component to prevent unnecessary re-renders\nreturn /*#__PURE__*/React.memo(WrappedComponent);}\nexport const __FramerMetadata__ = {\"exports\":{\"withEmbed\":{\"type\":\"reactHoc\",\"name\":\"withEmbed\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","/**\n * Creates a detailed Schema.org Person object based on provided properties.\n * This function encapsulates the logic from the Person part of the AuthorSchema component.\n *\n * @param props - An object conforming to CreatePersonSchemaProps.\n * @returns A Schema.org Person object, or undefined if essential info is missing.\n */export function createPersonSchema(props){const{name,websiteUrl,authorProfileUrlSegment,organizationUrl,image,description,alumniOf,alumniOfId,linkedin,jobTitle,jobTitleAlternateName,jobTitleUrl,knowsLanguage,knowsAbout}=props;// Essential properties check\nif(!name||!websiteUrl||!authorProfileUrlSegment){console.warn(\"Cannot create Person schema: Missing required fields (name, websiteUrl, authorProfileUrlSegment).\");return undefined;}// Construct URLs and IDs carefully\n// Ensure no double slashes if websiteUrl has trailing slash and segment starts with one (though segment shouldn't)\nconst authorPageUrl=`${websiteUrl.replace(/\\/$/,\"\")}/author/${authorProfileUrlSegment}`;const personId=`${authorPageUrl}#person`// Use #person fragment as in original component\n;const organizationId=organizationUrl?`${organizationUrl}#organization`:undefined// Construct potential org ID\n;// Build the Person object\nconst personSchema={\"@type\":\"Person\",name:name,url:authorPageUrl,\"@id\":personId,// Link to Organization (if URL provided)\nworksFor:organizationId?{\"@id\":organizationId}:undefined,// Handle image - create ImageObject if src exists\nimage:image?.src?{\"@type\":\"ImageObject\",url:image.src}:undefined,description:description||undefined,// Handle AlumniOf - requires both name and ID based on original logic? Let's assume name is enough.\nalumniOf:alumniOf?{\"@type\":\"Organization\",name:alumniOf,\"@id\":alumniOfId||undefined}:undefined,// Handle sameAs (LinkedIn only in the original example)\nsameAs:linkedin?[linkedin]:undefined,// Handle JobTitle - requires jobTitle prop to exist\njobTitle:jobTitle?{\"@type\":\"DefinedTerm\",name:jobTitle,alternateName:jobTitleAlternateName||undefined,sameAs:jobTitleUrl||undefined}:undefined,// Handle knowsLanguage - split comma-separated string\nknowsLanguage:knowsLanguage?.split(\",\").map(lang=>lang.trim()).filter(lang=>lang)??undefined,// Handle knowsAbout - map array, ensure names exist\nknowsAbout:knowsAbout?.map(topic=>({\"@type\":\"Thing\",name:topic.name,alternateName:topic.alternateName||undefined,\"@id\":topic.id||undefined})).filter(topic=>topic.name)??undefined};// Basic cleanup of top-level undefined properties (optional)\n// Note: Nested undefined properties within objects like jobTitle are handled above\nObject.keys(personSchema).forEach(key=>{if(personSchema[key]===undefined){delete personSchema[key];}});return personSchema;}\nexport const __FramerMetadata__ = {\"exports\":{\"createPersonSchema\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"CreatePersonSchemaProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SchemaGenerator.map"],"mappings":"8PAOsH,ICP4K,SAAgB,EAAU,EAAU,CAGtU,OAAoB,EAAM,KAHoU,GAAO,CAAqB,GAAK,CAAC,SAAS,GAAgB,GAA2D,UAAkE,OAAQ,EAAE,CAAO,EAAQ,GAAY,CAC3jB,GAAG,CAAC,GAAe,CAAC,EAAQ,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,CAAC,CAAC,IAAI,EAAQ,EAAE,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,SAAsB,EAAKA,EAAS,CAAC,SAAS,EAAc,KAAK,EAAM,IAAY,EAAM,OAAO,OAAM,IACzO,EAAQ,IAAG,EAAQ,EAAsB,EAAMA,EAAS,CAAC,SAAS,CAAc,EAAKC,EAAU,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,SAAS,CAAC,QAAQ,QAAQ,CAAC,CAAC,EAAM,CAAC,CAAC,SAAS,IAAQ,EAAU,EAAQ,CAAC,CAAC,CAAC,CAAC,EACzJ,kBAHS,IAA4B,IAA8D,IAAsH,ICMtQ,SAAgB,EAAmB,EAAM,CAAC,GAAK,CAAC,OAAK,aAAW,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