import{r as g}from"./vendor-react-C0ZmnAiH.js";import{l as p}from"./index-1Tge9Z5s.js";var n={VITE_API_HOST_PORT:"443",VITE_API_HOST:"https://modelworks.ai",VITE_WEB_URL:"https://modelworks.ai"};const h=(m={})=>{const a=`${window.location.origin}${location.pathname}`,c={title:"ModelWorks",description:"ModelWorks is where the world's agents discover, embed, and run AI Circuits.",keywords:"mcp, llm, api, models, circuits, AI, ModelWorks",viewport:"width=device-width, initial-scale=1",canonical:a,ogTitle:"ModelWorks",ogDescription:"ModelWorks is where the world's agents discover, embed, and run AI Circuits.",ogType:"website",ogUrl:a,image:"https://modelworks.ai/images/og_1200_600.jpg",ogSiteName:"ModelWorks",twitterCard:"summary_large_image",favicon:p,contentSecurityPolicy:`
            default-src 'self';
            img-src 'self' blob: data: https://storage.googleapis.com ${n.VITE_API_HOST} ${n.VITE_WEB_URL};
            connect-src 'self' https://storage.googleapis.com ${n.VITE_API_HOST} ${n.VITE_API_HOST}:${n.VITE_API_HOST_PORT} ${n.VITE_WEB_URL} https://challenges.cloudflare.com https://api.stripe.com;
            script-src 'self' 'unsafe-inline' 'wasm-unsafe-eval' https://challenges.cloudflare.com https://m.stripe.network https://js.stripe.com https://cdn.jsdelivr.net;
            frame-src 'self' https://challenges.cloudflare.com https://js.stripe.com https://hooks.stripe.com;
            style-src 'self' 'unsafe-inline';
        `},e={...c,...m};g.useEffect(()=>{document.title=e.title||c.title;const i=(t,s)=>{let o=document.querySelector(`meta[name="${t}"]`);o||(o=document.createElement("meta"),o.setAttribute("name",t),document.head.appendChild(o)),o.setAttribute("content",s)},r=(t,s)=>{let o=document.querySelector(`meta[property="${t}"]`);o||(o=document.createElement("meta"),o.setAttribute("property",t),document.head.appendChild(o)),o.setAttribute("content",s)};if(e.description&&i("description",e.description),e.keywords&&i("keywords",e.keywords),e.viewport&&i("viewport",e.viewport),e.canonical){let t=document.querySelector("link[rel='canonical']");t||(t=document.createElement("link"),t.setAttribute("rel","canonical"),document.head.appendChild(t)),t.setAttribute("href",e.canonical)}e.ogTitle&&r("og:title",e.ogTitle),e.ogDescription&&r("og:description",e.ogDescription),e.ogType&&r("og:type",e.ogType),e.ogUrl&&r("og:url",e.ogUrl),e.ogSiteName&&r("og:site_name",e.ogSiteName),e.image&&r("og:image",e.image),e.twitterCard&&i("twitter:card",e.twitterCard),e.ogTitle&&i("twitter:title",e.ogTitle),e.ogDescription&&i("twitter:description",e.ogDescription),e.image&&i("twitter:image",e.image),e.ogImages&&Object.keys(e.ogImages).length>0&&i("mw:og:images",JSON.stringify(e.ogImages));const l=document.querySelector("link[rel='icon']");if(l)l.setAttribute("href",e.favicon||c.favicon);else{const t=document.createElement("link");t.rel="icon",t.type="image/svg+xml",t.href=e.favicon||c.favicon,document.head.appendChild(t)}const d=document.querySelector("meta[http-equiv='Content-Security-Policy']");if(d)d.setAttribute("content",e.contentSecurityPolicy||c.contentSecurityPolicy);else{const t=document.createElement("meta");t.httpEquiv="Content-Security-Policy",t.content=e.contentSecurityPolicy||c.contentSecurityPolicy,document.head.appendChild(t)}},[e.title,e.description,e.keywords,e.viewport,e.canonical,e.ogTitle,e.ogDescription,e.ogType,e.ogUrl,e.ogSiteName,e.image,e.twitterCard,e.favicon,e.contentSecurityPolicy,e.ogImages])};export{h as u};