1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ScoreTerminal-CR5NMWkk.js","assets/vendor-query-CTPr7COe.js","assets/vendor-react-CWBOl209.js","assets/card-DJ7x89Hu.js","assets/index-BwVwZTqu.js","assets/vendor-router-Tzw_FyRy.js","assets/vendor-helmet-CH9LKosZ.js","assets/vendor-icons-3o8Kmjow.js","assets/index-DM_cVLbB.css","assets/badge-txOk_X55.js","assets/dialog-C3XSrLwo.js","assets/index-DCdkj2k6.js","assets/index-C8087njY.js","assets/index-DOWC6dku.js","assets/index-B3aQLB-B.js","assets/index-CljLvHUg.js","assets/index-BOBH645Q.js","assets/Combination-Bzbz-OPY.js","assets/vendor-supabase-C_wNBzRW.js","assets/PitchDeckViewer-CiOMKjiQ.js","assets/AgentSwarmPanel-BmLILDh8.js","assets/proxy-EGdRh4XT.js","assets/index-DfawMrCs.js","assets/InvestmentThesis-DUv3SnG2.js","assets/MarketIntelligence-BBjDt_ti.js","assets/CompetitorAnalysis-BHDAotCs.js","assets/DeepDiveAnalysis-CJLYPHkZ.js","assets/RiskAssessment-MfNdsuM5.js","assets/FundingAnalysis-BpwdPEI8.js","assets/TractionMetrics-Dh2UaETV.js","assets/TeamAnalysis-BkZowuE4.js","assets/WebPresenceAnalytics-BzAvTndy.js","assets/SocialSignals-Bf3ryYPp.js","assets/NewsAndMedia-CVe_Dfl-.js","assets/LiveDataFeed-KVkETvw2.js","assets/InvestorMatchPanel-CZBnBJX7.js","assets/client-DfMaFnao.js","assets/IntroductionRequest-DXRVDhcW.js","assets/textarea-CMZYcxDO.js","assets/label-DvD5xfXJ.js","assets/switch-z6X8utIN.js","assets/index-njgcCHyS.js","assets/index-Cblbzi1v.js","assets/use-toast-Cm7YHGHB.js","assets/activityTracker-gWle1cDg.js","assets/ConnectionGraph-DpU-Znl_.js","assets/InvestorCRM-CCOF43J9.js","assets/input-e78583lc.js","assets/tabs-CLJ6Xe8z.js","assets/index-DjOZ8nEF.js","assets/index-TQfL9S1F.js","assets/index-B7XEVw87.js","assets/InteractiveDataExplorer-VGTN6BtW.js"])))=>i.map(i=>d[i]); 2import{B as _,_ as c}from"./index-BwVwZTqu.js";import{j as e}from"./vendor-query-CTPr7COe.js";import{r as s}from"./vendor-react-CWBOl209.js";import{supabase as v}from"./client-DfMaFnao.js";import{t as le}from"./activityTracker-gWle1cDg.js";import{B as O}from"./badge-txOk_X55.js";import{u as R}from"./index-B7XEVw87.js";import{D as H,T as W,d as q,aa as me,Y as de,a2 as K,S as Q,c as xe,j as J,a9 as pe,a as Y,Z as he,ab as ge,a6 as ue}from"./vendor-icons-3o8Kmjow.js";import{H as fe}from"./vendor-helmet-CH9LKosZ.js";import{d as je,a as be}from"./vendor-router-Tzw_FyRy.js";import"./vendor-supabase-C_wNBzRW.js";const ye=({startup:t,matchedCount:p,onShare:a})=>{const l=Array.isArray(t.team)?t.team:[],m=Array.isArray(t.traction)?t.traction:t.traction&&typeof t.traction=="object"?Object.entries(t.traction):[],b=(()=>{let n=0;return t.executive_summary&&(n+=20),t.problem&&t.solution&&(n+=25),m.length>2&&(n+=30),l.length>1&&(n+=15),p>50&&(n+=10),n>=85?{grade:"A+",color:"text-emerald-400",bg:"bg-emerald-500/15 border-emerald-500/30"}:n>=70?{grade:"A",color:"text-emerald-400",bg:"bg-emerald-500/15 border-emerald-500/30"}:n>=55?{grade:"B+",color:"text-amber-400",bg:"bg-amber-500/15 border-amber-500/30"}:{grade:"B",color:"text-amber-400",bg:"bg-amber-500/15 border-amber-500/30"}})(),d=(()=>{if(!t.traction)return[];if(typeof t.traction=="object"&&!Array.isArray(t.traction)){const n=t.traction,g=[];return(n.arr||n.revenue)&&g.push({label:"Revenue",value:String(n.arr||n.revenue),icon:H}),n.growth&&g.push({label:"Growth",value:String(n.growth),icon:W}),(n.customers||n.users||n.clients)&&g.push({label:"Users",value:String(n.customers||n.users||n.clients),icon:q}),g.slice(0,3)}return[]})();return e.jsxs("div",{className:"relative overflow-hidden animate-fade-in",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/5 via-transparent to-primary/3"}),e.jsx("div",{className:"absolute top-0 right-0 w-96 h-96 bg-primary/5 rounded-full blur-[120px]"}),e.jsx("div",{className:"absolute bottom-0 left-1/4 w-64 h-64 bg-accent/5 rounded-full blur-[100px]"}),e.jsxs("div",{className:"relative border-b border-border/40 bg-card/30 backdrop-blur-xl",children:[e.jsxs("div",{className:"border-b border-border/20 px-6 py-2 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-500 animate-pulse"}),e.jsx("span",{className:"text-[10px] font-mono text-emerald-400 uppercase tracking-widest",children:"Live Analysis"})]}),e.jsxs("span",{className:"text-[10px] text-muted-foreground font-mono",children:["Updated ",new Date().toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(_,{variant:"ghost",size:"sm",onClick:a,className:"h-7 text-[11px] gap-1.5 text-muted-foreground hover:text-primary",children:[e.jsx(me,{className:"w-3 h-3"})," Share"]})})]}),e.jsx("div",{className:"px-4 sm:px-6 md:px-10 py-8 md:py-10",children:e.jsxs("div",{className:"flex flex-col lg:flex-row gap-8",children:[e.jsx("div",{className:"flex-1",children:e.jsxs("div",{className:"flex items-start gap-5",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"w-[72px] h-[72px] rounded-2xl bg-gradient-to-br from-primary/25 to-primary/5 flex items-center justify-center border border-primary/20 shadow-[0_0_30px_hsl(var(--primary)/0.15)]",children:e.jsx(de,{className:"w-9 h-9 text-primary"})}),e.jsx("div",{className:"absolute -bottom-1 -right-1 w-5 h-5 rounded-full bg-emerald-500/20 border border-emerald-500/40 flex items-center justify-center",children:e.jsx(K,{className:"w-2.5 h-2.5 text-emerald-400"})})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2.5 flex-wrap",children:[e.jsx("h1",{className:"text-3xl md:text-4xl font-extrabold tracking-tight text-foreground",children:t.name}),e.jsx("div",{className:`px-3.5 py-1 rounded-lg border ${b.bg}`,children:e.jsx("span",{className:`text-lg font-black font-mono ${b.color}`,children:b.grade})})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[t.stage&&e.jsx(O,{className:"bg-primary/15 text-primary border-primary/25 font-mono text-[11px] px-3 py-1",children:t.stage}),t.sector?.slice(0,3).map((n,g)=>e.jsx(O,{variant:"outline",className:"font-mono text-[11px] border-border/60 text-muted-foreground",children:n},g))]}),t.vision&&e.jsx("p",{className:"text-muted-foreground text-sm max-w-2xl leading-relaxed",children:t.vision})]})]})}),e.jsx("div",{className:"lg:w-[380px]",children:e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(N,{icon:q,iconColor:"text-primary",label:"INVESTORS",value:String(p),sub:`+${Math.max(1,Math.floor(p*.12))} this week`,subColor:"text-emerald-400"}),e.jsx(N,{icon:H,iconColor:"text-emerald-400",label:"RAISE",value:t.funding_ask_amount?`$${(t.funding_ask_amount/1e6).toFixed(1)}M`:"TBD",sub:t.funding_ask_currency||"USD"}),d.length>0?e.jsxs(e.Fragment,{children:[e.jsx(N,{icon:d[0]?.icon||W,iconColor:"text-amber-400",label:d[0]?.label.toUpperCase()||"TRACTION",value:d[0]?.value||"â",sub:d[1]?`${d[1].label}: ${d[1].value}`:"",subColor:"text-primary"}),e.jsx(N,{icon:Q,iconColor:"text-blue-400",label:"TEAM",value:String(l.length),sub:l[0]?`Led by ${l[0].name?.split(" ")[0]}`:"Members"})]}):e.jsxs(e.Fragment,{children:[e.jsx(N,{icon:xe,iconColor:"text-amber-400",label:"TRACTION",value:String(m.length),sub:"Key metrics"}),e.jsx(N,{icon:Q,iconColor:"text-blue-400",label:"TEAM",value:String(l.length),sub:"Members"})]})]})})]})})]})]})};function N({icon:t,iconColor:p,label:a,value:l,sub:m,subColor:j}){return e.jsxs("div",{className:"bg-card/60 backdrop-blur rounded-xl p-3.5 border border-border/40 hover:border-primary/20 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[e.jsx(t,{className:`w-3.5 h-3.5 ${p} group-hover:scale-110 transition-transform`}),e.jsx("span",{className:"text-[10px] text-muted-foreground font-mono tracking-widest",children:a})]}),e.jsx("div",{className:"text-2xl font-bold font-mono text-foreground",children:l}),m&&e.jsx("div",{className:`text-[11px] mt-0.5 ${j||"text-muted-foreground"}`,children:m})]})}function ve({startup:t,slug:p}){const a="https://pitchdecksai.com",l=`${a}/${p}`,m=`${t.name} Pitch Deck Analysis | Investment Terminal | PitchDeck.ai`,j=t.funding_ask_amount?`$${(t.funding_ask_amount/1e6).toFixed(1)}M`:"",b=t.stage||"",d=t.sector?.join(", ")||"",n=`${t.name} ${b} investment analysis. ${t.executive_summary?.substring(0,120)||`Deep-dive analysis of ${t.name} pitch deck.`}${j?` Raising ${j}.`:""} Access comprehensive market intelligence, team analysis, traction metrics, competitor landscape, risk assessment, and matched investor profiles.`,g=[t.name,`${t.name} pitch deck`,`${t.name} funding`,`${t.name} investment`,`${t.name} analysis`,...t.sector||[],t.stage,"pitch deck analysis","startup investment","venture capital","investor matching","startup due diligence","investment terminal","market intelligence"].filter(
2Boolean).join(", "),k={"@context":"https://schema.org","@type":"Article",headline:`${t.name} - Investment Analysis & Pitch Deck Review`,description:n,datePublished:t.created_at,dateModified:t.updated_at||t.created_at,author:{"@type":"Organization",name:"PitchDeck.ai",url:a},publisher:{"@type":"Organization",name:"PitchDeck.ai",logo:{"@type":"ImageObject",url:`${a}/logo.png`}},mainEntityOfPage:{"@type":"WebPage","@id":l},about:{"@type":"Organization",name:t.name,description:t.executive_summary,foundingDate:new Date(t.created_at).getFullYear(),industry:d},mentions:[...(t.sector||[]).map(f=>({"@type":"Thing",name:f}))]},D={"@context":"https://schema.org","@type":"Organization",name:t.name,description:t.executive_summary,foundingDate:new Date(t.created_at).getFullYear().toString(),industry:d,knowsAbout:t.sector||[],sameAs:[]},u={"@context":"https://schema.org","@type":"FAQPage",mainEntity:[{"@type":"Question",name:`What does ${t.name} do?`,acceptedAnswer:{"@type":"Answer",text:t.solution||t.executive_summary||`${t.name} is a ${b} startup in the ${d} sector.`}},{"@type":"Question",name:`How much funding is ${t.name} raising?`,acceptedAnswer:{"@type":"Answer",text:j?`${t.name} is raising ${j} in their ${b} round.`:`${t.name} is currently fundraising.`}},{"@type":"Question",name:`What sector is ${t.name}
2 in?`,acceptedAnswer:{"@type":"Answer",text:`${t.name} operates in the ${d||"technology"} sector.`}},{"@type":"Question",name:`What problem does ${t.name} solve?`,acceptedAnswer:{"@type":"Answer",text:t.problem||`${t.name} addresses key challenges in the ${d} industry.`}}]},A={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"PitchDeck.ai",item:a},{"@type":"ListItem",position:2,name:"Database",item:`${a}/DB`},{"@type":"ListItem",position:3,name:t.name,item:l}]};return e.jsxs(fe,{children:[e.jsx("title",{children:m}),e.jsx("meta",{name:"title",content:m}),e.jsx("meta",{name:"description",content:n}),e.jsx("meta",{name:"keywords",content:g}),e.jsx("meta",{name:"author",content:"PitchDeck.ai"}),e.jsx("meta",{name:"robots",content:"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1"}),e.jsx("meta",{name:"googlebot",content:"index, follow"}),e.jsx("meta",{name:"bingbot",content:"index, follow"}),e.jsx("link",{rel:"canonical",href:l}),e.jsx("meta",{property:"og:type",content:"article"}),e.jsx("meta",{property:"og:url",content:l}),e.jsx("meta",{property:"og:title",content:m}),e.jsx("meta",{property:"og:description",content:n}),e.jsx("meta",{property:"og:image",content:`${a}/og-image-${p}.png`}),e.jsx("meta",{property:"og:image:width",content:"1200"}),e.jsx("meta",{property:"og:image:height",content:"630"}),e.jsx("meta",{property:"og:site_name",content:"PitchDeck.ai"}),e.jsx("meta",{property:"og:locale",content:"en_US"}),e.jsx("meta",{property:"article:published_time",content:t.created_at}),e.jsx("meta",{property:"article:modified_time",content:t.updated_at||t.created_at}),e.jsx("meta",{property:"article:author",content:"PitchDeck.ai"}),e.jsx("meta",{property:"article:section",content:d||"Startups"}),(t.sector||[]).map(f=>e.jsx("meta",{property:"article:tag",content:f},f)),e.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),e.jsx("meta",{name:"twitter:url",content:l}),e.jsx("meta",{name:"twitter:title",content:m}),e.jsx("meta",{name:"twitter:description",content:n}),e.jsx("meta",{name:"twitter:image",content:`${a}/og-image-${p}.png`}),e.jsx("meta",{name:"twitter:creator",content:"@pitchdeckai"}),e.jsx("meta",{name:"twitter:site",content:"@pitchdeckai"}),e.jsx("meta",{name:"revisit-after",content:"1 days"}),e.jsx("meta",{name:"language",content:"English"}),e.jsx("meta",{name:"rating",content:"general"}),e.jsx("meta",{name:"distribution",content:"global"}),e.jsx("meta",{name:"coverage",content:"Worldwide"}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify(k)}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify(D)}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify(u)}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify(A)}),e.jsx("link",{rel:"preconnect",href:"https://fonts.googleapis.com"}),e.jsx("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:""}),e.jsx("link",{rel:"dns-prefetch",href:"https://www.google-analytics.com"})]})}const _e=s.lazy(()=>c(()=>import("./ScoreTerminal-CR5NMWkk.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])).then(t=>({default:t.ScoreTerminal}))),we=s.lazy(()=>c(()=>import("./PitchDeckViewer-CiOMKjiQ.js"),__vite__mapDeps([19,1,2,4,5,6,7,8])).then(t=>({default:t.PitchDeckViewer}))),Ne=s.lazy(()=>c(()=>import("./AgentSwarmPanel-BmLILDh8.js"),__vite__mapDeps([20,1,2,3,4,5,6,7,8,9,21,22])).then(t=>({default:t.AgentSwarmPanel}))),ke=s.lazy(()=>c(()=>import("./InvestmentThesis-DUv3SnG2.js"),__vite__mapDeps([23,1,2,3,4,5,6,7,8,9,21])).then(t=>({default:t.InvestmentThesis}))),Ae=s.lazy(()=>c(()=>import("./MarketIntelligence-BBjDt_ti.js"),__vite__mapDeps([24,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,21])).then(t=>({default:t.MarketIntelligence}))),Ee=s.lazy(()=>c(()=>import("./CompetitorAnalysis-BHDAotCs.js"),__vite__mapDeps([25,1,2,3,4,5,6,7,8,9,21])).then(t=>({default:t.CompetitorAnalysis}))),De=s.lazy(()=>c(()=>import("./DeepDiveAnalysis-CJLYPHkZ.js"),__vite__mapDeps([26,1,2,3,4,5,6,7,8,9,21])).then(t=>({default:t.DeepDiveAnalysis}))),Se=s.lazy(()=>c(()=>import("./RiskAssessment-MfNdsuM5.js"),__vite__mapDeps([27,1,2,3,4,5,6,7,8,9,21])).then(t=>({default:t.RiskAssessment}))),Ie=s.lazy(()=>c(()=>import("./FundingAnalysis-BpwdPEI8.js"),__vite__mapDeps([28,1,2,3,4,5,6,7,8,9,21])).then(t=>({default:t.FundingAnalysis}))),Te=s.lazy(()=>c(()=>import("./TractionMetrics-Dh2UaETV.js"),__vite__mapDeps([29,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,21])).then(t=>({default:t.TractionMetrics}))),$e=s.lazy(()=>c(()=>import("./TeamAnalysis-BkZowuE4.js"),__vite__mapDeps([30,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,21])).then(t=>({default:t.TeamAnalysis}))),Pe=s.lazy(()=>c(()=>import("./WebPresenceAnalytics-BzAvTndy.js"),__vite__mapDeps([31,1,2,9,4,5,6,7,8,3,21])).then(t=>({default:t.WebPresenceAnalytics}))),Re=s.lazy(()=>c(()=>import("./SocialSignals-Bf3ryYPp.js"),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,21])).then(t=>({default:t.SocialSignals}))),Oe=s.lazy(()=>c(()=>import("./NewsAndMedia-CVe_Dfl-.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,21])).then(t=>({default:t.NewsAndMedia}))),Ce=s.lazy(()=>c(()=>import("./LiveDataFeed-KVkETvw2.js"),__vite__mapDeps([34,1,2,4,5,6,7,8,9,21,22])).then(t=>({default:t.LiveDataFeed}))),ze=s.lazy(()=>c(()=>import("./InvestorMatchPanel-CZBnBJX7.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,8,9,36,18,37,10,11,12,13,14,15,16,17,38,39,40,41,42,43,44,22,21])).then(t=>({default:t.InvestorMatchPanel}))),Le=s.lazy(()=>c(()=>import("./ConnectionGraph-DpU-Znl_.js"),__vite__mapDeps([45,1,2,3,4,5,6,7,8,9,36,18,37,10,11,12,13,14,15,16,17,38,39,40,41,42,43,44,22,21])).then(t=>({default:t.ConnectionGraph}))),Me=s.lazy(()=>c(()=>import("./InvestorCRM-CCOF43J9.js"),__vite__mapDeps([46,1,2,36,18,4,5,6,7,8,47,9,48,11,12,49,13,16,14,50,51,21,22])).then(t=>({default:t.InvestorCRM}))),Ve=s.lazy(()=>c(()=>import("./InteractiveDataExplorer-VGTN6BtW.js"),__vite__mapDeps([52,1,2,4,5,6,7,8,47,9,51,21,22])).then(t=>({default:t.InteractiveDataExplorer}))),Fe=()=>e.jsx("div",{className:"w-full h-48 rounded-2xl bg-card/30 border border-border/1
25 animate-pulse"});function tt(){const{slug:t}=je(),p=be(),[a,l]=s.useState(null),[m,j]=s.useState(null),[b,d]=s.useState(!0),[n,g]=s.useState(0),[k,D]=s.useState(!1),[u,A]=s.useState(null),[f,C]=s.useState(!1),[z,S]=s.useState([]),[Z,L]=s.useState(),[X,M]=s.useState(null),[Ue,ee]=s.useState(!1),[Be,te]=s.useState(!1),[V,T]=s.useState(!1);s.useEffect(()=>{(async()=>{const{data:{user:r}}=await v.auth.getUser();if(r){const{data:i}=await v.from("user_roles").select("role").eq("user_id",r.id).eq("role","admin").maybeSingle();te(!!i)}})()},[]),s.useEffect(()=>{t&&ae()},[t]);const ae=async()=>{try{const{data:r,error:i}=await v.from("startups").select("*").eq("slug",t).single();if(i)throw i;if(l(r),ee(!!r.is_paid_client),r.deck_url){const o=`deck_seen_${r.id}`;typeof window<"u"&&!sessionStorage.getItem(o)&&(T(!0),sessionStorage.setItem(o,"1"))}r.enrichment_data&&Object.keys(r.enrichment_data).length>3?(A(r.enrichment_data),le(r.id,"dataroom_visited",{page:"deck",slug:t})):F(r.id);const{data:x}=await v.from("campaigns").select("*").eq("startup_id",r.id).order("created_at",{ascending:!1}).limit(1).maybeSingle();if(x){j(x);const{count:o}=await v.from("campaign_investors").select("*",{count:"exact",head:!0}).eq("campaign_id",x.id);g(o||0)}}catch(r){console.error("Error loading deck:",r)}finally{d(!1)}},F=s.useCallback(async r=>{D(!0);try{const{data:i,error:x}=await v.functions.invoke("enrich-startup",{body:{startupId:r}});if(x)throw x;i?.enrichment&&(A(i.enrichment),l(o=>o&&{...o,enrichment_data:i.enrichment,enriched_at:new Date().toISOString(),enrichment_provider:i.provider}),i.cached||R.success(`Enrichment complete via ${i.provider}`))}catch(i){console.error("Enrichment error:",i)}finally{D(!1)}},[]),se=()=>{a?.id&&F(a.id)},I=["deck_parser","market","team","traction","competitive","risk","thesis","outreach","flock_insights"],U={deck_parser:"Deck Parser",market:"Market Intel",team:"Team Eval",traction:"Traction",competitive:"Competitive",risk:"Risk Assessment",thesis:"Invest. Thesis",outreach:"Outreach",flock_insights:"Flock Insights"},ne=s.useCallback(async()=>{if(!a?.id)return;C(!0),L(void 0),M(null);const r=I.map(x=>({id:x,name:U[x]||x,provider:"pending",status:"pending"}));S(r);const i=[];I.forEach((x,o)=>{const y=setTimeout(()=>{S(E=>E.map(w=>w.id===x&&w.status==="pending"?{...w,status:"running"}:w))},200+o*300);i.push(y)});try{const x=Date.now(),{data:o,error:y}=await v.functions.invoke("agent-orchestrator",{body:{startupId:a.id,agents:"all",campaignId:m?.id}});if(y)throw y;const E=Date.now()-x;if(L(E),i.forEach(clearTimeout),o?.results&&o?.provider_map){const w=I.map(h=>{const B=o.provider_map[h]||"unknown",P=o.results[h],G=P?.error;return{id:h,name:U[h]||h,provider:B,status:G?"failed":B==="skipped"?"skipped":"complete",elapsed_ms:E/I.length,error:G?typeof P.error=="string"?P.error.slice(0,80):"Unknown error":void 0}});S(w),o.flock_report?.acknowledged&&M(o.flock_report);const{data:$}=await v.from("startups").select("enrichment_data, enriched_at, enrichment_provider").eq("id",a.id).single();$?.enrichment_data&&(A($.enrichment_data),l(h=>h&&{...h,...$}));const oe=Object.values(o.provider_map).filter(h=>h==="flock.io").length,ce=Object.values(o.provider_map).filter(h=>h==="lovable-ai").length;R.success(`Swarm complete: ${o.agents_executed?.length||0} agents in ${(E/1e3).toFixed(1)}s · FlockÃ${oe} · LovableÃ${ce}`)}}catch(x){console.error("Agent swarm error:",x),S(o=>o.map(y=>y.status==="running"||y.status==="pending"?{...y,status:"failed",provider:"error"}:y)),R.error("Agent swarm failed")}finally{C(!1)}},[a?.id,m?.id]),re=async()=>{const r=window.location.href;navigator.share?await navigator.share({title:`${a?.name} - Analysis`,url:r}):await navigator.clipboard.writeText(r)};if(b){const r=(t||"").split("-").map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" ")||"Startup";return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background px-4",children:e.jsxs("div",{className:"text-center max-w-md w-full",children:[e.jsxs("div",{className:"relative w-16 h-16 mx-auto mb-4",children:[e.jsx("div",{className:"absolute inset-0 rounded-2xl bg-primary/20 animate-ping"}),e.jsx("div",{className:"relative w-16 h-16 rounded-2xl bg-primary/10 flex items-center justify-center",children:e.jsx(K,{className:"w-8 h-8 text-primary animate-pulse"})})]}),e.jsxs("h1",{className:"text-2xl sm:text-3xl font-extrabold text-foreground mb-2 tracking-tight",children:[r," ",e.jsx("span",{className:"text-primary",children:"Analysis"})]}),e.jsx("p",{className:"text-muted-foreground font-mono text-sm",children:"Initializing analysis terminalâ¦"})]})})}if(!a)return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:e.jsxs("div",{className:"text-center animate-fade-in",children:[e.jsx(J,{className:"w-16 h-16 text-muted-foreground mx-auto mb-4"}),e.jsx("h1",{className:"text-2xl font-bold mb-2",children:"Deck Not Found"}),e.jsx(_,{onClick:()=>
2p("/"),children:"Go Home"})]})});const ie=[e.jsx(_e,{startup:a,matchedCount:n},"score"),e.jsx(ke,{startup:a,enrichmentData:u},"thesis"),e.jsx(Ae,{startup:a,enrichmentData:u},"market"),e.jsx(Ee,{startup:a,enrichmentData:u},"comp"),e.jsx(De,{startup:a,enrichmentData:u},"deep"),e.jsx(Se,{startup:a,enrichmentData:u},"risk"),e.jsx(Ie,{startup:a},"funding"),e.jsx(Te,{startup:a},"traction"),e.jsx($e,{startup:a},"team"),e.jsx(Pe,{startup:a,enrichmentData:u},"web"),e.jsx(Re,{startup:a,enrichmentData:u},"social"),e.jsx(Oe,{startup:a,enrichmentData:u},"news"),e.jsx(Ce,{startup:a},"live"),e.jsx(ze,{startup:a,campaignId:m?.id},"investors"),e.jsx(Le,{startup:a,campaignId:m?.id},"graph"),e.jsx(Me,{startup:a,campaignId:m?.id},"crm"),e.jsx(Ve,{startup:a},"explorer")];return e.jsxs(e.Fragment,{children:[e.jsx(ve,{startup:a,slug:t||""}),e.jsxs("div",{className:"min-h-screen bg-background overflow-x-hidden",children:[e.jsxs("div",{className:"fixed inset-0 pointer-events-none z-0",children:[e.jsx("div",{className:"absolute inset-0 mesh-gradient opacity-30"}),e.jsx("div",{className:"absolute inset-0 data-grid opacity-5"}),e.jsx("div",{className:"orb orb-primary absolute w-[600px] h-[600px] top-[-10%] left-[10%]"}),e.jsx("div",{className:"orb orb-accent absolute w-[400px] h-[400px] bottom-[10%] right-[5%]",style:{animationDelay:"-10s"}}),e.jsx("div",{className:"orb orb-warm absolute w-[350px] h-[350px] top-[40%] right-[20%]",style:{animationDelay:"-18s"}})]}),e.jsx("nav",{className:"relative z-50 border-b border-border/15 bg-card/30 backdrop-blur-2xl sticky top-0",children:e.jsxs("div",{className:"max-w-[1600px] mx-auto px-2 sm:px-4 md:px-8 py-2.5 sm:py-3 flex items-center justify-between gap-1 overflow-x-hidden",children:[e.jsxs(_,{variant:"ghost",size:"sm",onClick:()=>p("/DB"),className:"gap-1 sm:gap-2 font-mono text-xs text-muted-foreground hover:text-primary flex-shrink-0 px-2",children:[e.jsx(pe,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Back to Terminal"})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsx("div",{className:"w-6 h-6 rounded-lg bg-gradient-to-br from-primary to-primary/60 flex items-center justify-center",children:e.jsx(Y,{className:"w-3 h-3 text-primary-foreground"})}),e.jsx("span",{className:"text-primary font-extrabold font-mono text-xs sm:text-sm tracking-tight",children:"PITCHDECK.AI"})]}),e.jsxs("div",{className:"flex items-center gap-1 sm:gap-2 flex-shrink-0",children:[a.enriched_at&&e.jsx(O,{variant:"outline",className:"text-[9px] border-green-500/30 text-green-400 hidden sm:flex",children:"ENRICHED"}),e.jsxs(_,{variant:"outline",size:"sm",onClick:ne,disabled:f,className:"gap-1 text-[10px] sm:text-xs border-primary/30 text-primary hover:bg-primary/10 px-2 sm:px-3",children:[e.jsx(he,{className:`w-3 h-3 sm:w-3.5 sm:h-3.5 ${f?"animate-pulse":""}`}),e.jsx("span",{className:"hidden sm:inline",children:f?"Swarm Running...":"Agent Swarm"}),e.jsx("span",{className:"sm:hidden",children:f?"...":"Swarm"})]}),a?.deck_url&&e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>T(!0),className:"gap-1 text-[10px] sm:text-xs px-2 sm:px-3 border-accent/40 text-accent hover:bg-accent/10",children:[e.jsx(J,{className:"w-3 h-3 sm:w-3.5 sm:h-3.5"}),e.jsx("span",{className:"hidden sm:inline",children:"View Deck"}),e.jsx("span",{className:"sm:hidden",children:"Deck"})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>p(`/dataroom/${a.slug||a.id}`),className:"gap-1 text-[10px] sm:text-xs px-2 sm:px-3 border-primary/30 text-primary hover:bg-primary/10",children:[e.jsx(ge,{className:"w-3 h-3 sm:w-3.5 sm:h-3.5"}),e.jsx("span",{className:"hidden sm:inline",children:"Data Room"})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:se,disabled:k,className:"gap-1 text-[10px] sm:text-xs px-2 sm:px-3",children:[e.jsx(ue,{className:`w-3 h-3 sm:w-3.5 sm:h-3.5 ${k?"animate-spin":""}`}),e.jsx("span",{className:"hidden sm:inline",children:k?"Enriching...":"Re-Enrich"})]})]})]})}),e.jsx(ye,{startup:a,matchedCount:n,onShare:re}),e.jsx("div",{className:"relative z-10 max-w-[1600px] mx-auto px-3 sm:px-4 md:px-8 pt-6",children:z.length>0&&e.jsx(s.Suspense,{fallback:e.jsx("div",{className:"h-32 rounded-2xl bg-card/30 border border-border/1
25 animate-pulse"}),children:e.jsx(Ne,{isRunning:f,agents:z,totalElapsed:Z,flockReport:X})})}),e.jsx("main",{className:"relative z-10 max-w-[1600px] mx-auto px-3 sm:px-4 md:px-8 py-10 space-y-8 overflow-x-hidden",children:ie.map((r,i)=>e.jsx("div",{className:"scroll-reveal",style:{animationDelay:`${Math.min(i*60,360)}ms`},children:e.jsx(s.Suspense,{fallback:e.jsx(Fe,{}),children:r})},i))}),e.jsxs("footer",{className:"relative z-10 mt-12",children:[e.jsx("div",{className:"section-divider mx-4 md:mx-8"}),e.jsx("div",{className:"py-10",children:e.jsxs("div",{className:"max-w-[1600px] mx-auto px-4 md:px-8 text-center",children:[e.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[e.jsx("div",{className:"w-6 h-6 rounded-lg bg-gradient-to-br from-primary to-primary/60 flex items-center justify-center",children:e.jsx(Y,{className:"w-3 h-3 text-primary-foreground"})}),e.jsx("span",{className:"text-xs font-extrabold gradient-text tracking-tight",children:"PitchDeck.ai"})]}),e.jsxs("p",{className:"text-[10px] text-muted-foreground/40 font-mono tracking-[0.2em] uppercase",children:["AI-POWERED INVESTMENT INTELLIGENCE TERMINAL · © ",new Date().getFullYear()]})]})})]})]}),V&&e.jsx(s.Suspense,{fallback:null,children:e.jsx(we,{open:V,deckUrl:a?.deck_url,startupName:a?.name||"Startup",onClose:()=>T(!1),continueLabel:"Continue to AI Analysis"})})]})}export{tt as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.