1import{r as j,j as e,b as we}from"./vendor-react-CjtdLP_L.js";import{q as V,h as gt}from"./index-CaH9w3gZ.js";import{A as Ps,p as Is,s as Ds}from"./confirmed-competitor-request-SvVwHOfv.js";import{r as Ls}from"./aeo-brand-portrayal-html-aGdXNXpd.js";import{p as ye,c as La}from"./aeo-answer-analysis-CmUTsi9x.js";import{L as Rt,b as _a,g as Jt}from"./index-DpJDnEHE.js";import{k as ne,u as _s}from"./useAuth-BOD9I5M3.js";import{F as Os}from"./Footer-i6iw7uTD.js";import{A as Fs}from"./AeoAdminPreviewBoundary-rHLpcqux.js";import{b as Pt,B as G}from"./button-CgHkADzY.js";import{B as It}from"./badge-C1_E7bcS.js";import{i as Ws}from"./AuthModal-XlKB8C9v.js";import{a as Us}from"./index-DMBtqBCC.js";import{a as Z}from"./utils-09jiQjc0.js";import{S as I,E as lt,f as Q,R as Bs}from"./ReportPrintChrome-COIsrSqL.js";import{g as W}from"./aeo-format-xMMG7p15.js";import{b as qs}from"./beacon-stats-C7kUzuLS.js";import{a as Zt}from"./aeo-answer-excerpt-Cd6HhTS4.js";import{A as zs,R as Hs,a as Ys}from"./ReportLanguageDialog-DKR7JjgW.js";import{n as Oa}from"./aeo-schema-CyOn1Fli.js";import Gs from"./OutcomeUploads-CEy6Qo9a.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./Navigation-BihYueM1.js";import"./vendor-query-Dm6IpjeQ.js";import"./queryClient-CAqhRfHG.js";import"./auth-return-to-JRaTzEJL.js";import"./consent-D3s5Yi52.js";import"./workspace-account-requests-DGgpqxXh.js";import"./index-CXo7hDKg.js";import"./vendor-icons-CEtKkbCp.js";import"./index-DYd1AhEw.js";import"./index-CfHttwlL.js";import"./index-Bnm5UW7A.js";import"./index-CFQO6bFv.js";import"./vendor-i18n-B-dTb0jX.js";import"./dropdown-menu-YjUv8fUk.js";import"./index-NncAJq6c.js";import"./BeaconMark-BfuppPGY.js";import"./index-DC01emjG.js";import"./WorkspacePreferences-CMsTGmr9.js";import"./workspace-context-CmD3Vyun.js";import"./workspace-route-transition-Dap2JeOj.js";import"./beacon-request-Bo3SWsEZ.js";import"./beacon-access-LXtv0J6t.js";import"./Logo-Dtk25poC.js";import"./app-chrome-Chb-SQcU.js";import"./index-CTrG49eW.js";import"./vendor-motion-DcfotHwo.js";import"./dialog-BmoBvzwc.js";import"./types-CGFT8RdL.js";import"./public-product-facts-DAmplUKb.js";import"./vendor-react-icons-C3u-PHNU.js";import"./supabase--Raqy1d_.js";import"./prompeteer-brand-DVsJ2OA0.js";import"./categories-C1hOYFnK.js";const Vs=new Set(["R11","R12","R14","P1","P2","P3","P4","P5","P6","P7","P8","A1","A2","A3","A4","A5","A6","A7","A8","E1","E2","E3","E4","E5","E6","E7","E8","G5"]);function _e(t){const a=String(t.find(r=>r.id==="P10")?.evidence??""),n=String(t.find(r=>r.id==="R1")?.evidence??"").match(/^HTTP ([1-5]\d\d)(?:\b|$)/)?.[1],l=/^(?:no content check ran:|no document was retrieved, so no content check ran)/i.test(a),i=n&&n!=="200"&&/^every content check read the anonymous response \(/.test(a);return!l&&!i?null:n&&n!=="200"?`The website returned HTTP ${n} to the anonymous request, and the audit did not obtain a readable page. Website content was not measured.`:/served a (?:soft-404|consent-wall|interstitial)/.test(a)?"The website served an error page or access wall instead of the requested page. Website content was not measured.":"The audit did not obtain a readable page, so website content was not measured."}const Fa="Ask your web team to review the recorded response and its server or firewall logs, restore access for the intended visitors and verified crawlers, then rerun the website audit. Keep access controls for other traffic in place.",Wa="Headings, page copy, indexing directives and structured data need a readable page before they can be assessed. Saved AI answers and citations remain separate evidence.",_=t=>t!==null&&typeof t=="object"&&!Array.isArray(t)?t:{},oe=t=>Array.isArray(t)?t:[],F=(t,a)=>{const s=_(t);return Object.fromEntries(a.filter(n=>s[n]!==void 0).map(n=>[n,s[n]]))},Ks=(t,a)=>Object.fromEntries(Object.entries(_(t)).map(([s,n])=>[s,F(n,a)]));function Qs(t){const a=_(t);return{...F(a,["total","grade","criticalCount","importantCount","passCount","unverifiedIds","droppedPillars"]),...typeof a.measuredWeight=="number"?{isPartial:a.measuredWeight<70}:typeof a.isPartial=="boolean"?{isPartial:a.isPartial}:{},...a.capped?{capped:F(a.capped,["by","title"])}:{},pillars:oe(a.pillars).map(s=>F(s,["pillar","label","score","counted","unverified","contributes"]))}}const ot=t=>{const a=_(t);return{...F(a,["total","grade","gate"]),...a.heldBy?{heldBy:F(a.heldBy,["id","title"])}:{heldBy:null}}},Xs={R1:"An error response can prevent a visitor or retrieval service from reaching the page content.",R2:"A working HTTPS address gives visitors and retrieval services a secure, consistent destination.",R3:"Shorter redirect paths reduce unnecessary requests before the page can be read.",R4:"A readable robots file lets crawlers understand the access policy you intend.",R5:"Retrieval access determines whether a permitted crawler can inspect your current content.",R6:"Training access is a separate policy choice that your team should make deliberately.",R7:"Firewall or rate-limit refusals can prevent otherwise permitted crawlers from receiving the page.",R8:"Faster initial responses reduce the time visitors and retrieval services spend waiting for content.",R9:"Compression reduces the bytes needed to transfer the same page content.",R10:"A current sitemap helps services discover your canonical pages and their reported update dates.",R11:"A consistent canonical address helps distinguish the intended page from duplicate URL variants.",R12:"An unintended indexing restriction can keep a page out of the indexes that honor it.",R13:"Archive presence is a limited observation about the domain, not proof of AI visibility.",R14:"Snippet restrictions can limit how services use page text in previews and answers.",P1:"Initial HTML makes meaningful body content accessible without depending on JavaScript execution.",P2:"A page shell without its main content gives a basic retrieval client little to read.",P3:"Consistent content across browser and crawler responses reduces ambiguity about what the page says.",P4:"A clear main heading helps readers understand the pageâs subject.",P5:"Descriptive heading structure makes the page easier to scan and navigate.",P6:"Meaningful page regions help readers and assistive tools distinguish primary content from navigation.",P7:"A focused main content area helps separate useful information from repeated navigation and page furniture.",P8:"A manageable page response improves access for clients with limited processing resources.",P10:"The recorded response identifies which page content was available for this assessment.",A1:"A clear opening helps readers understand the offer and its intended audie
1nce, even when they encounter a short excerpt.",A2:"Descriptive headings help readers find the answer they need. Use buyer questions where they fit the section.",A3:"Self-contained paragraphs keep claims and qualifications together when readers encounter an excerpt.",A4:"Well-structured lists and tables make suitable comparisons easier to understand.",A5:"Visible answers to real buyer questions help readers resolve common uncertainties.",A6:"Question-and-answer content is useful when it addresses real needs and accurately reflects the visible page.",A7:"Plain language helps readers understand the answer without unnecessary interpretation.",A8:"A clear opening heading and summary help readers understand the page before they explore its details.",E1:"Accurate structured identity information helps distinguish the organisation described by the page.",E2:"Consistent names and identifiers reduce ambiguity about the business or product.",E3:"Relevant identity links help readers connect the page to the organisationâs other established profiles.",E4:"Consistent structured-data references connect the page, its publisher and its author without broken identity links.",E5:"Accurate authorship helps readers assess relevant expertise where a byline is expected.",E6:"An accurate modification date states when the content was last changed.",E7:"Truthful update information helps readers judge when content was last revised.",E8:"Accurate page-preview information helps a shared link represent the page clearly.",E9:"An established public entity record may help distinguish the organisation from similarly named entities.",E10:"Relevant independent reviews and comparisons help buyers assess your offer beyond the claims on your own website.",E11:"A first archive date describes the domainâs recorded history, not the age or credibility of the business.",G1:"An accurate text alternative can make useful content easier for compatible agents to consume.",G2:"For a business offering external APIs, a catalogue can help compatible clients find the supported descriptions. Confirm applicability before implementing it.",G3:"An agent interface can support a defined product workflow. Confirm the business value and access requirements before planning an integration.",G4:"For a business offering an HTTP API, an accurate description helps compatible clients use it. This is not a requirement to create a public API.",G5:"A declared alternate format helps compatible clients discover another representation of the same content.",G6:"A maintained site summary can serve as documentation for readers and compatible tools."};function Ua(t,a){return typeof a!="string"||t!=="A5"&&t!=="E2"?a:a.split(/\s+(?:A5|E2) was folded into\b/,1)[0].trim()}function Js(t){const a=F(t,["check","outcome"]);for(const s of["check","outcome"])typeof a[s]=="string"&&/^[A-Z]\d+ passes on a re-run\.?$/i.test(a[s].trim())&&(a[s]="A new website audit marks this finding as passed.");return a}function Zs(t){const a=_(t);return{current:ot(a.current),ifAllFixed:ot(a.ifAllFixed),...a.ifAllShippable?{ifAllShippable:ot(a.ifAllShippable)}:{},items:oe(a.items).map(s=>{const n=_(s);return{...F(n,["id","pillar","title","severity","fix","impact","effort","owner","horizon","dependsOn","gated","earned","projectedTotal","projectedGrade"]),...n.evidence!==void 0?{evidence:Ua(n.id,n.evidence)}:{},why:Xs[n.id]??"Review the recorded finding and address the page behavior described before measuring again.",how:oe(n.how).filter(l=>typeof l=="string").filter(l=>!/openrouter|knowledge[_ -]?(id|source|catalog)|prompt[_ -]?version|routing policy|research catalog/i.test(l)).map(l=>l.replace(/https?:\/\/\S+/g,"").replace(/\[(?:research|knowledge|source)[-_:][^\]]+\]/gi,"").replace("the audit range is a guideline","use the length the answer needs").replace("Use enough words for accuracy; use the length the answer needs.","Use the length the answer needs for accuracy.").replace("Use lists for genuinely sequential or parallel information.","Use lists for sequential or parallel information.").trim()).filter(Boolean),...n.acceptance?{acceptance:Js(n.acceptance)}:{}}})}}function en(t){const a=_(t),s=_(a.identity),n=_(a.deepSample),l=_(a.offsiteSignals);return{...F(a,["robotsPresent","blockedRetrieval","blockedTraining"]),...a.resourceValidationVersion===1?{resourceValidationVersion:1,resourceValidation:Object.fromEntries(Object.entries(_(a.resourceValidation)).slice(0,20).map(([i,r])=>[i,F(r,["status","reason","httpStatus","mediaType"])]))}:{},...a.responses?{responses:Ks(a.responses,["status","bytes","ms","ok"])}:{},...a.discovery?{discovery:Object.fromEntries(Object.entries(_(a.discovery)).filter(([,i])=>typeof i=="number"))}:{},...a.identity?{identity:{...F(s,["kind","name","legalName","logoUrl","iconUrl","sameAsCount","wikidataId","authorDeclared","types"]),nameDeclared:typeof s.nameDeclared=="boolean"?s.nameDeclared:!!s.nameSource&&s.nameSource!=="domain",location:s.location?F(s.location,["locality","region","country"]):null,page:s.page?F(s.page,["path","title"]):null}}:{},...a.deepSample?{deepSample:{...F(n,["url","reason","fetchedAt","status","bytes","ms","finalUrl","contentType"]),page:n.page?F(n.page,["words","bodyWords","landmark","headings","questionHeadings","jsonLdBlocks","jsonLdParsed","jsonLdTypes","title","hasDescription","canonical","canonicalMatchesUrl","pageState"]):null}}:{},...a.offsiteSignals?{offsiteSignals:{...F(l,["measuredAt","outOfBudget"]),signals:oe(l.signals).map(i=>F(i,["id","label","status","value","evidence","sourceUrl","measuredAt"]))}}:{}}}function tn(t){const a=_(t),s=_e(oe(a.checks).map(u=>{const h=_(u);return{id:String(h.id),evidence:h.evidence}})),n=_(_(a.observations).document),l=oe(a.checks).map(_).find(u=>u.id==="P3"&&u.status==="pass"),i=typeof l?.evidence=="string"?/^(\d+) vs (\d+) words$/.exec(l.evidence):null,r=_(_(_(a.observations).responses).anonymous),o=typeof n.anonymousWords=="number"&&Number.isFinite(n.anonymousWords)?n.anonymousWords:r.ok&&r.status===200&&i?Number(i[2]):null,c=oe(_(_(a.observations).offsiteSignals).signals).map(_),d={R13:"corpus",E9:"entity",E10:"mentions",E11:"domain-age"},p=a.observations?en(a.observations):null;return/^https?:\/\/(?:www\.)?prompeteer\.ai(?:[/:]|$)/i.test(String(a.url))&&p?.identity&&Object.assign(p.identity,{name:"Prompeteer"}),{...F(a,["id","url","shareToken","freshness","fetchedAt","durationMs","canEditCompetitors"]),score:Qs(a.score),...s?{websiteContent:{status:"unmeasured",reason:s}}:{},checks:oe(a.checks).map(u=>{const h=_(u);
1if(s&&Vs.has(String(h.id)))return{...F(h,["id","pillar","title"]),status:"unverified",severity:"none",evidence:s};const x=c.find(f=>f.id===d[h.id]&&["present","absent","not-measured"].includes(f.status)&&typeof f.evidence=="string");return x?{...F(h,["id","pillar","severity","fix"]),title:x.label||h.title,status:x.status==="not-measured"?"unverified":"info",evidence:`${x.evidence} This supplementary observation does not change the readiness score.`}:{...F(h,["id","pillar","title","status","severity","fix"]),...h.evidence!==void 0?{evidence:h.id==="P10"&&typeof h.evidence=="string"&&h.evidence.includes("because the anonymous fetch returned nothing readable")&&o!==null&&o>0?h.evidence.replace("because the anonymous fetch returned nothing readable",`; the saved anonymous response contained ${o} words`):Ua(h.id,h.evidence)}:{}}}),...a.profile?{profile:F(a.profile,["family","category","region"])}:{},...s?{plan:null}:a.plan?{plan:Zs(a.plan)}:{},...p?{observations:s?{...p,identity:null}:p}:{}}}const S=t=>String(t??"").replace(/[&<>"']/g,a=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[a]),he=t=>t===null?"Not measured":`${t}%`,se=t=>t&&Number.isFinite(Date.parse(t))?new Date(t).toISOString().slice(0,10):null,an=t=>se(t.sampledAt)?`${se(t.sampledFrom)&&se(t.sampledFrom)!==se(t.sampledAt)?`${se(t.sampledFrom)} to `:""}${se(t.sampledAt)} (UTC)`:"No dated answers",et=t=>`${t.answers} answers · ${t.questions} questions · ${t.models} models · ${an(t)}`,tt=t=>`<p class="aa-note">These are sampled web-grounded API answers; consumer-app results may differ. Model-memory answers are excluded.${t.excludedLegacyAnswers?` ${S(t.excludedLegacyAnswers)} older answers lack complete evidence and are excluded.`:""}</p>`,sn=` 2.aa-analysis{color:var(--public-ink,#161817);font-family:inherit;margin:28px 0 36px;min-width:0}.aa-analysis *{box-sizing:border-box}.aa-analysis h3{font-size:21px;font-weight:600;line-height:1.25;letter-spacing:-.02em;margin:0 0 9px}.aa-analysis p{font-size:13.5px;line-height:1.65;color:var(--public-ink-2,#57534e);margin:8px 0;max-width:90ch}.aa-analysis .aa-summary{border-left:2px solid var(--public-hairline,#e7e5e4);padding-left:15px;margin:16px 0 20px}.aa-summary b{display:block;font-size:12px;color:var(--public-ink,#161817);margin-bottom:5px}.aa-analysis .aa-meta,.aa-analysis .aa-note{font-size:12px;color:var(--public-ink-2,#57534e)}.aa-analysis .aa-table{min-width:0;table-layout:fixed;width:100%;border-collapse:collapse;text-align:left;font-size:13px;margin:18px 0}.aa-table th,.aa-table td{padding:12px 8px;border-bottom:1px solid var(--public-hairline,#e7e5e4);vertical-align:top}.aa-table th{font-weight:500;font-size:11.5px;color:var(--public-ink-2,#57534e)}.aa-table th:first-child,.aa-table td:first-child{padding-left:0}.aa-table th:last-child,.aa-table td:last-child{padding-right:0}.aa-table th:not(:first-child),.aa-table td:not(:first-child){text-align:right;white-space:nowrap}.aa-table th:first-child{width:54%}.aa-table .aa-name{width:54%;white-space:normal;overflow-wrap:anywhere}.aa-name strong{font-weight:600}.aa-rank{font-size:12px;color:var(--public-ink-2,#57534e);margin-right:10px}.aa-count{display:block;white-space:normal;overflow-wrap:anywhere;line-height:1.45;font-size:11px;color:var(--public-ink-2,#57534e);margin-top:4px}.aa-bar{height:4px;background:var(--public-hairline,#e7e5e4);margin:8px 0 3px;width:min(230px,100%);border-radius:3px}.aa-bar i{display:block;height:100%;background:#b45c3a;border-radius:3px}.aa-you .aa-bar i{background:#166b50}.aa-you strong{color:#166b50}.aa-tag{font-size:11px;color:#166b50;margin-left:7px}.aa-source{padding:16px 0;border-bottom:1px solid var(--public-hairline,#e7e5e4);break-inside:avoid}.aa-source>summary{cursor:pointer;min-height:44px;font-size:14px;line-height:1.55;overflow-wrap:anywhere}.aa-source>summary .aa-count{display:inline;margin-left:10px}.aa-source .aa-source-path{display:block;margin:4px 0 0;overflow-wrap:anywhere}.aa-source a{color:var(--public-accent,#166b50);text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere;font-size:12px;line-height:1.6}.aa-source a:focus-visible,.aa-source summary:focus-visible{outline:2px solid #166b50;outline-offset:4px}.aa-observations{padding-left:19px;margin:14px 0 4px}.aa-observations li{font-size:12px;line-height:1.6;margin:8px 0;color:var(--public-ink-2,#57534e)}.aa-source-category{text-transform:none;font-size:11px;color:var(--public-ink-2,#57534e)}.aa-kpis{display:flex;gap:26px;flex-wrap:wrap;margin:22px 0}.aa-kpis div{min-width:115px}.aa-kpis strong{display:block;font-size:26px;line-height:1.2;font-weight:600;letter-spacing:-.03em;color:#166b50}
2.aa-kpis span{display:block;font-size:12px;color:var(--public-ink-2,#57534e);margin-top:5px}.aa-evidence-link a{color:var(--public-accent,#166b50);text-underline-offset:3px}.aa-evidence-link a:focus-visible{outline:2px solid #166b50;outline-offset:4px}#citation-evidence-appendix{scroll-margin-top:24px}.aa-print-only{display:none}.aa-more>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-size:13px;font-weight:600;color:#166b50}.aa-diagnostics{margin-top:24px}.aa-diagnostics h4{font-size:15px;font-weight:600;line-height:1.4;margin:22px 0 7px;break-after:avoid}.aa-diagnostics .aa-source-coverage th:first-child{width:34%}.aa-diagnostics .aa-source-coverage th{white-space:normal;overflow-wrap:anywhere}.aa-source-coverage tbody th{background:transparent;color:var(--public-ink,#161817);text-align:start;font-size:12px;font-weight:600}.aa-source-coverage .aa-bar{display:block;width:100%;max-width:92px;margin-inline-start:auto}.aa-diagnostics [data-top-cited-pages] th:first-child{width:76%}.aa-diagnostics [data-top-cited-pages] a{color:var(--public-accent,#166b50);text-underline-offset:3px;overflow-wrap:anywhere}.aa-diagnostics .aa-note{break-after:avoid}@media(max-width:600px){.aa-diagnostics .aa-source-coverage{min-width:0;font-size:11px}.aa-diagnostics .aa-source-coverage th,.aa-diagnostics .aa-source-coverage td{padding:10px 4px}.aa-source-coverage tbody th{font-size:11px}.aa-diagnostics [data-top-cited-pages]{min-width:0}.aa-diagnostics [data-top-cited-pages] th:first-child{width:66%}}@media(max-width:600px){.aa-table{font-size:12px}.aa-table th,.aa-table td{padding:12px 5px}.aa-table .aa-name{width:45%}.aa-table th{font-size:10px}.aa-rank{margin-right:5px}.aa-tag{display:block;margin:3px 0}.aa-kpis{gap:18px}.aa-kpis div{min-width:90px}.aa-source>summary .aa-count{display:block;white-space:normal;overflow-wrap:anywhere;line-height:1.45;margin-left:0}.aa-analysis h3{font-size:20px}}@media print{#citation-evidence-appendix{break-before:page}.aa-analysis{margin:18px 0 24px}.aa-source{padding:8px 0;break-inside:auto}.aa-more{break-inside:auto}.aa-citation-intro{break-inside:avoid}.aa-source>summary{min-height:0;font-size:13px;line-height:1.5;break-inside:avoid;break-after:avoid;display:block;list-style:none}.aa-source::details-content,.aa-more::details-content{display:contents}.aa-source>summary .aa-count{display:inline}.aa-more>summary{min-height:0;break-after:avoid}.aa-screen-only{display:none!important}.aa-print-only{display:inline}.aa-source>p{margin:5px 0;break-inside:avoid;break-after:avoid}.aa-observation-source{font-size:10px;overflow-wrap:anywhere}.aa-table tr{break-inside:avoid}.aa-observations{columns:auto;column-gap:normal;margin:8px 0 3px;break-before:avoid}.aa-observations li{line-height:1.5;margin:6px 0;break-inside:avoid;orphans:3;widows:3}.aa-observations li:first-child{break-before:avoid}.aa-analysis a{color:#166b50}} 3`;function nn(t){const a=new Set(t?.competitorSelection?.source==="user-confirmed"?t.competitorSelection.domains:[]);if(t){const c=t.businesses.filter(d=>d.isYou||a.has(d.domain));t={...t,businesses:c.map(d=>({...d,rank:c.length>1&&t.answers>0?1+c.filter(p=>p.mentioned>d.mentioned).length:null}))}}const s=t&&t.answers>0,n=t?.businesses.find(c=>c.isYou),l=t?.businesses[0],i=t?.businesses.some(c=>c.topThree!==void 0||c.positionRate!==void 0),r=c=>{const d=t?.answers??0,p=c.topThree,u=c.positionRate;return d>0&&Number.isInteger(p)&&p>=0&&p<=d&&typeof u=="number"&&Number.isFinite(u)&&u>=0&&u<=100&&Math.abs(u-p/d*100)<.11?`${S(he(u))}<span class="aa-count">${S(p)} / ${S(d)} answers</span>`:"Not measured"},o=t&&s&&n?`${n.name} is named in ${n.mentioned} of ${S(t.answers)} comparable answers (${he(n.mentionRate)}). ${t.businesses.length>1&&l?`The highest mention rate is ${he(l.mentionRate)}; equal rates share a rank.`:"Your mention rate remains separate from competitor rankings."}`:"No complete, dated web-grounded answers are available for this comparison. Website readiness remains a separate measurement.";return t?.businesses.some(c=>!c.isYou)?`<section class="aa-analysis" data-answer-visibility><h3>How you compare in AI answers</h3><p class="bridge">Compare how often the same sampled answers name your business and cite your website.</p><div class="aa-summary"><b>Executive summary</b><p class="section-summary">${S(o)}</p></div>${t?`<p class="aa-meta">${S(et(t))}</p>`:""}${t?.businesses.length?`<table class="aa-table"><caption class="sr-only">Business visibility in the same sampled AI answers</caption><thead><tr><th scope="col">Business</th><th scope="col">Mentioned</th><th scope="col">Cited</th>${i?'<th scope="col">Position</th>':""}</tr></thead><tbody>${t.businesses.map(c=>`<tr${c.isYou?' class="aa-you"':""}><td class="aa-name"><span class="aa-rank">
3${c.rank===null?"â":S(c.rank)}</span><strong>${S(c.name)}</strong>${c.isYou?'<span class="aa-tag">Your business</span>':""}<span class="aa-count">${S(c.domain)}</span>${c.mentionRate===null?"":`<div class="aa-bar" aria-hidden="true"><i style="width:${Math.max(0,Math.min(100,c.mentionRate))}%"></i></div>`}</td><td>${S(he(c.mentionRate))}<span class="aa-count">${S(c.mentioned)} / ${S(t.answers)} answers</span></td><td>${S(he(c.citationRate))}<span class="aa-count">${S(c.cited)} / ${S(t.answers)} answers</span></td>${i?`<td>${r(c)}</td>`:""}</tr>`).join("")}</tbody></table>`:""}${t?tt(t):""}<p class="aa-note">This rank compares mention rates across these businesses. Mentions can describe compatibility or a provider relationship; they do not establish a recommendation or direct competition. Recommendation order within an answer and website readiness are separate measurements.</p></section>`:`<section class="aa-analysis" data-answer-visibility><h3>Your business in AI answers</h3><p class="section-summary">${S(o)}</p>${t?`<p class="aa-meta">${S(et(t))}</p>`:""}<h4>No competitors have been confirmed</h4><p class="bridge">Confirm the businesses you compete with to compare visibility and share of voice. Other websites cited in answers remain in the citation evidence.</p>${t?tt(t):""}</section>`}const rn="<!--aeo-citation-appendix:start-->",ln="<!--aeo-citation-appendix:end-->";function on(t,a){if(t.rollup?.version!==1)return"";const s=(r,o)=>o>0&&Number.isInteger(r)&&r>=0&&r<=o?`${r} / ${o}`:"Not recorded",n=t.rollup.byEngine.map(r=>`<tr data-citation-model="${S(r.engine)}"><th scope="row">${S(a[r.engine]??r.engine)}</th><td><strong>
3${S(s(r.citedAnswers,r.answers))}</strong>${r.answers>0?`<span class="aa-bar" aria-hidden="true"><i style="width:${Math.max(0,Math.min(100,r.citedAnswers/r.answers*100))}%"></i></span>`:""}</td><td>${S(s(r.ownSiteCitedAnswers,r.answers))}</td><td>${S(s(r.retrievalReferenceCitedAnswers,r.answers))}</td></tr>`).join(""),i=t.rollup.topExactPages.filter(r=>ye(r.url)&&La(r.url)==="page").slice(0,6).map(r=>{const o=ye(r.url),c=new URL(o).pathname;return`<tr><td><a href="${S(o)}" target="_blank" rel="noopener noreferrer nofollow">${S(r.domain)}</a><span class="aa-count">${S(c.length>90?`${c.slice(0,87)}â¦`:c)}</span></td><td>${S(s(r.answers,t.answers))}<span class="aa-count">${S(he(r.share))}</span></td></tr>`}).join("");return`<div class="aa-diagnostics"><h4>Citation coverage by model</h4><p class="aa-note">Answers with any recorded citation, your website citation, or an unresolved retrieval reference. These columns overlap; each uses that modelâs completed answers.</p><div class="table-wrap"><table class="aa-table aa-source-coverage"><thead><tr><th scope="col">Model</th><th scope="col">Any citation</th><th scope="col">Your website</th><th scope="col">Unresolved</th></tr></thead><tbody>${n}</tbody></table></div>${i?`<h4>Most-cited pages</h4><p class="aa-note">Exact destinations from the saved answers. Citation frequency does not establish authority or direct competition.</p><table class="aa-table" data-top-cited-pages><thead><tr><th scope="col">Page</th><th scope="col">Answers citing it</th></tr></thead><tbody>${i}</tbody></table>`:'<p class="aa-note">No exact destination pages were recorded. Unresolved retrieval references remain available in the appendix.</p>'}${t.totalSources>t.sources.length?`<p class="aa-note">The appendix contains ${S(t.sources.length)} of ${S(t.totalSources)} source records. Coverage above uses the full saved set.</p>`:""}</div>`}function cn(t,a={},s="full"){if(s==="appendix"&&!t?.sources.length)return"";const n={owned:"Your website",competitor:"Compared business","review-site":"Review site",community:"Community",reference:"Reference",publisher:"Publisher",video:"Video",social:"Social",corporate:"Company site",institutional:"Institution",other:"Other source"},l=h=>{const x=ye(h.url),f=La(x)==="retrieval-reference",b=x&&new URL(x).hostname==="vertexaisearch.cloud.google.com"?"Google search reference":"Unresolved short link",y=x?new URL(x).pathname+new URL(x).search:"",m=y.length>110?`${y.slice(0,107)}â¦`:y,w=new Map;for(const g of h.observations)w.set(g.question,[...w.get(g.question)??[],g]);return`<details class="aa-source"><summary><strong>${S(f?b:h.domain)}</strong>${x?`<span class="aa-count aa-source-path">${S(f?"Destination page not resolved":m)}</span>`:'<span class="aa-count aa-source-path">Domain reference</span>'}<span class="aa-count">${S(h.answers)} of ${S(t.answers)} answers · ${S(he(h.share))}</span><span class="aa-count aa-source-category">${S(f?"Retrieval reference":n[h.category]??"Other source")}</span></summary><p>${x?`<a href="${S(x)}" target="_blank" rel="noopener noreferrer nofollow">${S(f?"Open retrieval reference":x.length>140?"Open cited page":x)}</a>`:"The cited domain was recorded; an exact page URL is unavailable."}</p><ol class="aa-observations">${[...w].map(([g,C])=>`<li><strong>${S(g)}</strong><br><span class="aa-print-only aa-observation-source">${S(f?b:h.domain)}${x&&!f?` · ${S(m)}`:""}<br></span>${C.map($=>`${S(a[$.engine]??$.engine)} · ${S(se($.sampledAt))}`).join("; ")}</li>`).join("")}</ol></details>`},i=t?.answers?`${t.citedAnswers} of ${S(t.answers)} sampled answers include recorded citations. Use the cited pages to see which material appears in these answers; a citation does not establish why an engine chose it.`:"No complete citation evidence is available for this snapshot. Missing evidence does not establish that AI answers never cite your website.",r=t?`${t.sources.slice(0,8).map(l).join("")}${t.sources.length>8?`<details class="aa-more"><summary><span class="aa-screen-only">View ${t.sources.length-8} more recorded sources</span><span class="aa-print-only">Additional recorded sources · ${t.sources.length-8}</span></summary>${t.sources.slice(8).map(l).join("")}</details>`:""}${t.totalSources>t.sources.length?`<p class="aa-note">Showing the ${S(t.sources.length)} most cited sources of ${S(t.totalSources)} recorded sources.</p>`:""}`:"",o=(t?.modelWrittenLinks??[]).filter(h=>ye(h.url)).slice(0,128),c=(t?.resolvedReferences??[]).filter(h=>ye(h.originalUrl)&&ye(h.destinationUrl)).slice(0,128),d=`${o.length?`<details class="aa-more" data-model-written-links><summary>Links written in answers · ${o.length}</summary><p class="aa-note">These links appear in model-written text. They do not establish provider retrieval and are excluded from attributed citation totals.</p><ol>${o.map(h=>`<li><a href="${S(h.url)}" rel="noopener noreferrer nofollow">${S(h.url)}</a> · ${S(a[h.engine]??h.engine)} · ${S(se(h.sampledAt))}<p>${S(h.question)}</p></li>`).join("")}</ol></details>`:""}${c.length?`<details class="aa-more" data-citation-resolutions><summary>Resolved retrieval references · ${c.length}</summary><p class="aa-note">Destination pages observed through HTTP redirects. Original references and collection dates remain unchanged.</p><ol>${c.map(h=>`<li><a href="${S(h.destinationUrl)}" rel="noopener noreferrer nofollow">${S(h.destinationUrl)}</a> · resolved ${S(se(h.resolvedAt))} · ${S(a[h.engine]??h.engine)}<p>${S(h.question)}</p><a href="${S(h.originalUrl)}" rel="noopener noreferrer nofollow">Original retrieval reference</a></li>`).join("")}</ol></details>`:""}`,p=t?`<p class="aa-meta">${S(et(t))}</p><div class="aa-kpis"><div><strong>${S(t.exactPages)}</strong><span>Exact pages recorded</span></div><div><strong>${S(t.domainOnlySources)}</strong><span>Domain-only references</span></div>${t.retrievalReferences?`<div><strong>${S(t.retrievalReferences)}</strong><span>Unresolved retrieval references</span></div>`:""}</div>`:"",u='<p class="aa-note">A page counts once per answer. Different pages from one website are listed separately. Unresolved retrieval references are excluded from exact-page counts; citation rates are not measures of source authority.</p>';return s==="appendix"?`${rn}<section id="citation-evidence-appendix" class="aa-analysis" data-citation-evidence-appendix><h2>Citation evidence</h2><p class="bridge"><span class="aa-screen-only">Every recorded source below includes its sampled question, engine and date. Expand a source to inspect the evidence.</span><span class="aa-print-only">Recorded sources with their sampled questions, engines and dates.</span></p><p class="section-summary">The question and sample date travel with each reference; unresolved retrieval references remain separate from exact cited pages.</p><p class="aa-meta">${S(et(t))}</p>${r}${d}${tt(t)}${u}<p class="aa-note"><a href="#engines">Return to AI visibility</a></p></section>${ln}`:`<section class="aa-analysis" data-source-citations><div class="aa-citation-intro"><h3>Pages cited in AI answers</h3><p class="bridge">Review the public pages referenced by the sampled answers, with the question, engine and date attached.</p><div class="aa-summary"><b>Executive summary</b><p class="section-summary">${S(i)}</p></div>${p}</div>${t?on(t,a):""}${s==="full"?r+d:t?.sources.length?'<p class="aa-evidence-link"><a href="#citation-evidence-appendix">Explore the full citation evidence</a></p>':""}${t?tt(t):""}${u}</section>`}function ct({engines:t,view:a}){const s=j.useMemo(()=>a==="portrayal"?Ls(t?.brandPortrayal):a==="competition"?nn(t?.answerVisibility):cn(t?.sourceCitations,Object.fromEntries((t?.engines??[]).map(n=>[n.id,n.label]))),[t,a]);return e.jsxs("div",{"data-testid":`answer-evidence-${a}`,children:[e.jsx("style",{children:sn}),e.jsx("div",{dangerouslySetInnerHTML:{__html:s}})]})}function Ue(){const[t,a]=j.useState(()=>typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches);return j.useEffect(()=>{const s=requestAnimationFrame(()=>a(!0));return()=>cancelAnimationFrame(s)},[]),t}const $e="width 700ms cubic-bezier(.2,.7,.2,1)",Re="#FFFFFF",dn="#0C0C0C",Dt=[{hex:"#266BA0",name:"blue",letterInk:Re},{hex:"#399D80",name:"teal",letterInk:dn},{hex:"#7C4BD2",name:"purple",letterInk:Re},{hex:"#B93076",name:"magenta",letterInk:Re},{hex:"#965808",name:"amber",letterInk:Re}],Ba="var(--public-chart-mark, var(--public-highlight-ink))",un="green",Lt="var(--public-chart-neutral, var(--public-ink-3))",pn="grey",mn="#FFFFFF",hn="#DEDCD7",at={you:600,other:500},xn=(t,a)=>t<a?-1:t>a?1:0;function gn(t){const a=new Set,s=[];for(const l of t)l.isYou||a.has(l.domain)||(a.add(l.domain),s.push(l));const n=s.every(l=>typeof l.setIndex=="number");return s.sort((l,i)=>n?l.setIndex-i.setIndex:xn(l.domain,i.domain)).map(l=>l.domain)}function fn(t,a){return gn(a).indexOf(t)}function bn(t,a){return a?Ba:Dt[t]?.hex??Lt}function vn(t,a){return a?un:Dt[t]?.name??pn}function yn(t,a){return a?"var(--aeo-monogram-ink, #FFFFFF)":Dt[t]?.letterInk??"var(--public-ground)"}function _t(t,a){const s=t.isYou?-1:fn(t.domain,a);return{index:s,color:bn(s,t.isYou),colorName:vn(s,t.isYou),ink:yn(s,t.isYou)}}const ea=Ba,ta=Lt,wn="var(--public-chart-wash, var(--public-highlight-wash))",jn="var(--public-chart-edge, var(--public-highlight-edge))",kn="var(--public-chart-ink, var(--public-highlight-ink))",qa=t=>t<0?"var(--public-danger)":t>0?"var(--public-assurance)":"var(--public-ink)";function ce({label:t,fg:a,edge:s,bg:n="var(--public-ground)",mono:l=!1,className:i="",testId:r,title:o}){return e.jsx("span",{"data-testid":r,title:o,className:`inline-flex items-center whitespace-nowrap rounded-[calc(var(--public-radius-control)/2)] h-5 px-1.5 text-[10.5px] leading-none font-mono font-medium tracking-[0.08em] ${l?"":"uppercase"} ${i}`.trim(),style:{background:n,color:a,border:`1px solid ${s}`},children:t})}function Nn({pillars:t,otherLabel:a,biggestGap:s}){const n=Ue(),l=i=>n?`${Math.max(0,Math.min(100,i))}%`:"0%";return e.jsxs("div",{children:[e.jsx("div",{className:"flex flex-col gap-3",children:t.map(i=>{const r=i.setMedian??i.median,o=typeof r=="number",c=s===i.pillar,d=typeof i.delta=="number"&&Number.isFinite(i.delta)?i.delta:null,p=d===null?"":d>0?"+":d<0?"â":"";return e.jsxs("div",{"data-testid":`pillar-row-${i.pillar}`,"data-worst":c?"true":"false",className:"grid items-center gap-x-3 gap-y-1 rounded-xl px-3 py-2","aria-label":c?`${i.label}, widest gap`:i.label,style:{gridTemplateColumns:"minmax(0,1fr) 48px",background:c?wn:"transparent"},children:[e.jsxs("div",{"data-testid":"pillar-row",className:"min-w-0",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[e.jsxs("span",{className:"flex items-baseline gap-2 min-w-0",children:[e.jsx("span",{className:"text-[12.5px] font-medium",style:{color:"var(--public-ink)"},children:i.label}),c&&e.jsx(ce,{testId:"pillar-worst-tag",label:"widest gap",fg:kn,edge:jn,className:"shrink-0"})]}),e.jsxs("span",{"data-testid":"pillar-values",className:"text-[12px] tabular-nums whitespace-nowrap",style:{color:"var(--public-ink-2)"},children:[e.jsx("span",{style:{color:"var(--public-ink)",fontWeight:600},children:i.yours})," · ",o?r:"â"]})]}),e.jsxs("div",{className:"mt-1 flex flex-col gap-[3px] border-b pb-[3px]",style:{borderColor:"var(--public-hairline)"},children:[e.jsx("div",{className:"h-[6px]",title:`You: ${i.yours}/100`,children:e.jsx("div",{"data-testid":"bar-you",className:"h-[6px] rounded-full",style:{width:l(i.yours),background:ea,transition:$e}})}),e.jsx("div",{className:"h-[6px]",title:o?`${a}: ${r}/100`:`${a}: not measured`,children:o&&e.jsx("div",{"data-testid":"bar-other",className:"h-[6px] rounded-full",style:{width:l(r),background:ta,transition:$e}})})]})]}),e.jsx("span",{"data-testid":"pillar-delta",className:"text-[13px] font-semibold tabular-nums text-right",style:{color:o&&d!==null?qa(d):"var(--public-ink-2)"},children:o&&d!==null?`${p}${Math.abs(d)}`:"â"})]},i.pillar)})}),e.jsxs("div",{className:"mt-2 flex flex-wrap gap-4 text-[12.5px] px-3",style:{color:"var(--public-ink-2)"},"aria-label":"Legend",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx("i",{className:"inline-block w-[14px] h-[6px] rounded-full",style:{background:ea}}),"You"]}),e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx("i",{className:"inline-block w-[14px] h-[6px] rounded-full",style:{background:ta}}),a]})]}),e.jsx("div",{className:"sr-only",children:e.jsxs("table",{children:[e.jsxs("caption",{children:["Pillar scores out of 100, you against ",a.toLowerCase()]}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Pillar"}),e.jsx("th",{children:"You"}),e.jsx("th",{children:a}),e.jsx("th",{children:"Gap"})]})}),e.jsx("tbody",{children:t.map(i=>{const r=i.setMedian??i.median,o=typeof r=="number";return e.jsxs("tr",{children:[e.jsx("td",{children:i.label}),e.jsx("td",{children:i.yours}),e.jsx("td",{children:o?r:"not measured"}),e.jsx("td",{children:o&&typeof i.delta=="number"?i.delta:"not measured"})]},i.pillar)})})]})})]})}const qe=t=>typeof t.rank=="number"?String(t.rank).padStart(2,"0"):t.id,$n={W:560,H:260,PAD_L:48,PAD_R:96,PAD_T:18,PAD_B:36,R:11,GAP:26,maxPerRow:4,medianLabelInMargin:!0},An={W:360,H:300,PAD_L:48,PAD_R:12,PAD_T:18,PAD_B:40,R:11,GAP:26,maxPerRow:3,medianLabelInMargin:!1},za=["low","medium","high"],Sn={low:0,medium:1,high:2};function aa(t,a){const s=t.impact>=a,n=t.effort!=="high";return s?n?"quick-win":"major-project":n?"fill-in":"reconsider"}const Cn={"quick-win":"Quick win","major-project":"Major project","fill-in":"Fill-in",re
3consider:"Reconsider"},Tn=t=>{const a=[...t].sort((s,n)=>s-n);return a.length?a[Math.floor(a.length/2)]:0};function Ha(t,a){const s=a.W-a.PAD_L-a.PAD_R,n=a.H-a.PAD_T-a.PAD_B,l=Math.max(1,...t.map(o=>o.impact));return{plotW:s,plotH:n,maxImpact:l,x:o=>a.PAD_L+(Sn[o]+.5)/3*s,y:o=>a.PAD_T+a.R+(1-o/l)*(n-2*a.R),xMid:a.PAD_L+2/3*s}}function Mn(t,a){const{plotH:s,x:n,y:l}=Ha(t,a),i=Math.max(.08*s,a.GAP),r=new Map;for(const o of za){const c=t.filter(u=>u.effort===o).sort((u,h)=>h.impact-u.impact||u.id.localeCompare(h.id)),d=[];for(const u of c){const h=d[d.length-1];h&&Math.abs(l(u.impact)-l(h[0].impact))<=i?h.push(u):d.push([u])}let p=-1/0;for(const u of d){const h=u.reduce((y,m)=>y+l(m.impact),0)/u.length,x=[];for(let y=0;y<u.length;y+=a.maxPerRow)x.push(u.slice(y,y+a.maxPerRow));let f=Math.round(h-(x.length-1)*a.GAP/2);f=Math.max(f,Math.ceil(a.PAD_T+a.R),p+a.GAP);const b=Math.round(n(o));x.forEach((y,m)=>{const w=f+m*a.GAP;y.forEach((g,C)=>r.set(g.id,{...g,cx:b+(C-(y.length-1)/2)*a.GAP,cy:w}))}),p=f+(x.length-1)*a.GAP}}return t.map(o=>r.get(o.id))}const sa="(max-width: 639px)";function En(){const t=typeof window<"u"&&typeof window.matchMedia=="function",[a,s]=j.useState(()=>t?window.matchMedia(sa).matches:!1);return j.useEffect(()=>{if(!t)return;const n=window.matchMedia(sa),l=()=>s(n.matches);return n.addEventListener("change",l),l(),()=>n.removeEventListener("change",l)},[t]),a}const Ie={critical:"var(--public-danger)",important:"var(--public-ink)",minor:"var(--public-ink-3)"},Rn=t=>Ie[t]??Ie.minor,Pn={critical:"Critical",important:"Important",minor:"Minor"};function dt({color:t}){return e.jsx("i",{"aria-hidden":!0,className:"inline-block w-[11px] h-[11px] rounded-full shrink-0",style:{background:"var(--public-ground)",border:`2.5px solid ${t}`}})}function In({items:t}){const a=En();if(!t.length)return null;const s=a?An:$n,{W:n,H:l,PAD_L:i,PAD_R:r,PAD_T:o,PAD_B:c,R:d}=s,{maxImpact:p,x:u,y:h,xMid:x}=Ha(t,s),f=Tn(t.map(g=>g.impact)),b=h(f),y=Mn(t,s),m=t.filter(g=>aa(g,f)==="quick-win"),w="Geist, ui-sans-serif, system-ui, sans-serif";return e.jsxs("div",{"data-testid":"priority-map",className:"flex flex-col gap-5 max-w-[560px]",children:[e.jsxs("div",{"data-testid":"priority-quickwins",className:"order-1 lg:order-2 rounded-xl px-5 py-4 lg:py-3 lg:flex lg:flex-wrap lg:items-baseline lg:gap-x-5 lg:gap-y-1",style:{background:"var(--public-paper)",border:"1px solid var(--public-hairline)"},children:[e.jsxs("div",{className:"font-mono text-[10.5px] tracking-[0.13em] uppercase mb-2 lg:mb-0 lg:shrink-0",style:{color:"var(--public-chart-ink)"},children:["Start here · ",m.length," quick ",m.length===1?"win":"wins"]}),m.length?e.jsx("ol",{className:"flex flex-col gap-1.5 lg:flex-row lg:flex-wrap lg:gap-x-5 lg:gap-y-1 min-w-0",children:m.map(g=>e.jsxs("li",{className:"flex items-baseline gap-2 text-[13.5px]",style:{color:"var(--public-ink)"},children:[typeof g.rank=="number"&&e.jsx("span",{className:"font-mono text-[11px] tabular-nums shrink-0",style:{color:"var(--public-ink-3)"},children:qe(g)}),e.jsxs("span",{className:"text-[12.5px] font-semibold tabular-nums shrink-0",style:{color:"var(--public-chart-ink)"},children:["+",g.impact,e.jsx("span",{className:"sr-only",children:" points"})]}),e.jsx("span",{children:g.title})]},g.id))}):e.jsx("p",{className:"text-[13px]",style:{color:"var(--public-ink-2)"},children:"No low-effort, high-impact fixes remain. The remaining work is listed below."})]}),e.jsxs("figure",{className:"order-2 lg:order-1 m-0 min-w-0",children:[e.jsxs("svg",{viewBox:`0 0 ${n} ${l}`,className:"w-full h-auto",role:"img","aria-label":`Prioritisation map: ${t.length} fixes by points gained and effort; ${m.length} quick ${m.length===1?"win":"wins"}.`,children:[e.jsx("rect",{x:i,y:o,width:x-i,height:Math.max(0,b-o),fill:"var(--public-chart-wash)",rx:"8"}),e.jsx("text",{x:i+10,y:o+16,fontSize:"11.5",fontWeight:"600",fontFamily:w,fill:"var(--public-chart-ink)",children:"Quick wins"}),e.jsx("line",{x1:i,x2:n-r,y1:b,y2:b,stroke:"var(--public-hairline-strong)",strokeDasharray:"3 4"}),s.medianLabelInMargin&&e.jsxs("text",{x:n-r+8,y:b+4,fontSize:"11.5",fontFamily:w,fill:"var(--public-ink-2)",children:["median +",f," points"]}),e.jsx("line",{x1:i,x2:n-r,y1:l-c,y2:l-c,stroke:"var(--public-hairline)"}),za.map(g=>e.jsxs("text",{x:u(g),y:l-c+18,fontSize:"11.5",fontFamily:w,textAnchor:"middle",fill:"var(--public-ink-2)",children:[g," effort"]},g)),e.jsxs("text",{x:i-8,y:h(p)+4,fontSize:"11.5",fontFamily:w,textAnchor:"end",fill:"var(--public-ink-2)",className:"tabular-nums",children:["+",p]}),e.jsx("text",{x:i-8,y:l-c,fontSize:"11.5",fontFamily:w,textAnchor:"end",fill:"var(--public-ink-2)",children:"0"}),e.jsx("text",{transform:`translate(12 ${(l-c+o)/2}) rotate(-90)`,fontSize:"11.5",fontFamily:w,textAnchor:"middle",fill:"var(--public-ink-2)",children:"points gained"}),y.map(g=>e.jsxs("g",{"data-testid":"priority-dot",style:{cursor:"default"},children:[e.jsx("title",{children:`${typeof g.rank=="number"?`${qe(g)} · `:""}${g.title} (${g.id}) â ${g.severity}, ${g.effort} effort, +${g.impact} points`}
3),e.jsx("circle",{cx:g.cx,cy:g.cy,r:d,fill:"var(--public-ground)",stroke:Rn(g.severity),strokeWidth:"3"}),e.jsx("text",{x:g.cx,y:g.cy+4,fontSize:"11",fontWeight:"700",fontFamily:w,textAnchor:"middle",fill:"var(--public-ink)",children:qe(g)})]},g.id))]}),e.jsxs("figcaption",{className:"mt-2 flex flex-wrap gap-x-4 gap-y-1 text-[11.5px]",style:{color:"var(--public-ink-2)"},children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(dt,{color:Ie.critical}),"Critical"]}),e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(dt,{color:Ie.important}),"Important"]}),e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(dt,{color:Ie.minor}),"Minor"]}),!s.medianLabelInMargin&&e.jsxs("span",{children:["Dashed line = median +",f," points"]}),e.jsx("span",{children:"Effort is our estimate of engineering work."})]}),e.jsx("div",{className:"sr-only",children:e.jsxs("table",{children:[e.jsx("caption",{children:"Fixes by points gained and effort"}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Fix"}),e.jsx("th",{children:"Impact"}),e.jsx("th",{children:"Effort"}),e.jsx("th",{children:"Severity"}),e.jsx("th",{children:"Quadrant"})]})}),e.jsx("tbody",{children:t.map(g=>e.jsxs("tr",{children:[e.jsxs("td",{children:[typeof g.rank=="number"?`${qe(g)} `:"",g.title," (",g.id,")"]}),e.jsxs("td",{children:["+",g.impact," points"]}),e.jsx("td",{children:g.effort}),e.jsx("td",{children:Pn[g.severity]??g.severity}),e.jsx("td",{children:Cn[aa(g,f)]})]},g.id))})]})})]})]})}const Dn=60,Ce=2,na={critical:["Critical","var(--public-danger-wash)","var(--public-danger)","var(--public-danger-edge)"],important:["Important","var(--public-chart-wash)","var(--public-chart-ink)","var(--public-chart-edge)"],minor:["Minor","var(--public-paper)","var(--public-ink-2)","var(--public-hairline-strong)"]},Ln={low:"Low effort",medium:"Medium effort",high:"High effort",earned:"Earned over months"},_n={engineering:"Engineering",content:"Content",marketing:"Marketing",analytics:"Analytics"},Ya="text-[13px] font-medium";function On(t,a=18){if(t.length<3)return t.map(()=>0);const[s,n,l]=t;return l-s<a?null:[0,n-s<a||l-n<a?1:0,0]}function Fn(t){const a=[];let s=t.current.total;for(const n of t.items){const l=Math.min(100,Math.max(s,n.projectedTotal));l>s&&a.push({item:n,from:s,to:l,delta:l-s}),s=Math.max(s,l)}return a}function Wn({plan:t}){const a=t.current.total,s=Fn(t),n=t.items.filter(p=>p.impact>0),l=Math.min(3,n.length),i=n[l-1],r=W(t.ifAllFixed.grade,t.ifAllFixed.total),o=[`Score ${a}/100 now`,i?`${W(i.projectedGrade,i.projectedTotal)} after the top ${l}`:null,`${r} after all listed changes are verified.`].filter(Boolean).join("; "),c=[{key:"now",at:a,node:e.jsxs(e.Fragment,{children:["Now · ",e.jsx("strong",{style:{color:"var(--public-ink)"},children:W(t.current.grade,a)})]})},...i?[{key:"top",at:i.projectedTotal,node:e.jsxs(e.Fragment,{children:["After the top ",l," · ",e.jsx("strong",{style:{color:"var(--public-ink)"},children:W(i.projectedGrade,i.projectedTotal)})]})}]:[],{key:"all",at:Math.min(100,t.ifAllFixed.total),node:e.jsxs(e.Fragment,{children:["All fixed · ",e.jsx("strong",{style:{color:"var(--public-chart-ink)"},children:r})]})}],d=On(c.map(p=>p.at));return e.jsxs("div",{"data-testid":"plan-path",className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex h-[10px] w-full rounded-full overflow-hidden",style:{background:"var(--public-hairline)"},role:"img","aria-label":o,children:[e.jsx("div",{className:"flex-none",style:{width:`${a}%`,background:"var(--public-ink)"}}),s.map(({item:p,delta:u,to:h})=>e.jsx("div",{className:"flex-none","data-testid":"plan-path-segment","data-to":h,title:`${p.title}: +${u} on the path, reaches ${W(p.projectedGrade,p.projectedTotal)}`,style:{width:`${u}%`,background:"var(--public-chart-mark-strong)",borderLeft:"2px solid var(--public-ground)"}},p.id))]}),e.jsx("div",{"data-testid":"plan-path-list",className:`flex flex-col gap-1 text-[12.5px] tabular-nums ${d?"sm:hidden":""}`,style:{color:"var(--public-ink-2)"},children:c.map(p=>e.jsx("span",{className:"whitespace-nowrap",children:p.node},p.key))}),d&&e.jsx("div",{"data-testid":"plan-path-labels",className:"relative hidden sm:block text-[12.5px] leading-[18px] tabular-nums","aria-hidden":"true",style:{height:`${(Math.max(...d)+1)*18}px`,color:"var(--public-ink-2)"},children:c.map((p,u)=>e.jsxs("span",{"data-testid":"plan-path-label","data-at":p.at,className:"absolute whitespace-nowrap",style:{left:`${p.at}%`,top:`${d[u]*18}px`,transform:"translateX(-100%)"},children:[e.jsx("span",{className:"absolute right-0 -top-[7px] h-[6px] w-px",style:{background:"var(--public-ink-3)"}}),p.node]},p.key))}),t.ifAllShippable&&t.ifAllShippable.total<t.ifAllFixed.total&&e.jsxs("p",{"data-testid":"plan-shippable",className:"text-[12.5px] leading-[1.5] tabular-nums",style:{color:"var(--public-ink-2)"},children:["Website changes alone could reach ",W(t.ifAllShippable.grade,t.ifAllShippable.total),". The remaining ",t.ifAllFixed.total-t.ifAllShippable.total," points depend on longer-term factors beyond a website release."]}),e.jsx("div",{className:"sr-only",children:e.jsxs("table",{children:[e.jsx("caption",{children:"Score path, fix by fix"}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Fix"}),e.jsx("th",{children:"Points"}),e.jsx("th",{children:"Reaches"})]})}),e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("td",{children:"Now"}),e.jsx("td",{children:"0"}),e.jsx("td",{children:W(t.current.grade,a,{outOf:!0})})]}),n.map(p=>e.jsxs("tr",{children:[e.jsxs("td",{children:[p.id," ",p.title]}),e.jsxs("td",{children:["+",p.impact]}),e.jsx("td",{children:W(p.projectedGrade,p.projectedTotal)})]}
3,p.id)),e.jsxs("tr",{children:[e.jsx("td",{children:"All fixed"}),e.jsxs("td",{children:["+",Math.max(0,t.ifAllFixed.total-a)]}),e.jsx("td",{children:r})]})]})]})})]})}function Un({plan:t}){const[a,s]=j.useState(()=>new Set(t.items.slice(0,1).map(o=>o.id))),[n,l]=j.useState(!1);j.useEffect(()=>{const o=()=>we.flushSync(()=>l(!0)),c=()=>we.flushSync(()=>l(!1));window.addEventListener("beforeprint",o),window.addEventListener("afterprint",c);const d=window.matchMedia?.("print"),p=u=>we.flushSync(()=>l(u.matches));return d?.matches&&l(!0),d?.addEventListener?.("change",p),()=>{window.removeEventListener("beforeprint",o),window.removeEventListener("afterprint",c),d?.removeEventListener?.("change",p)}},[]);const i=j.useCallback(o=>{s(c=>{const d=new Set(c);return d.has(o)?d.delete(o):(d.add(o),ne("aeo_plan_item_opened","ai_visibility",o)),d})},[]);if(!t.items.length)return null;const r=(o,c)=>{const[d,p,u,h]=na[o.severity]??na.minor,x=n||a.has(o.id),f=`plan-${o.id}-detail`,b=W(o.projectedGrade,o.projectedTotal);return e.jsxs("li",{"data-testid":"plan-item",className:"grid gap-x-4 gap-y-1.5 p-5 sm:p-6 grid-cols-[36px_minmax(0,1fr)] sm:grid-cols-[36px_minmax(0,1fr)_128px] rounded-[var(--public-radius-surface)] border border-[var(--public-hairline)] bg-[var(--public-ground)] print:rounded-none print:border-x-0 print:border-t-0 print:p-0 print:py-4",children:[e.jsx("span",{className:"col-start-1 row-start-1 font-mono text-[15px] font-medium tabular-nums leading-none pt-1",style:{color:"var(--public-ink-3)"},children:String(c+1).padStart(2,"0")}),e.jsxs("div",{className:"col-start-2 row-start-1 min-w-0 flex flex-wrap items-center gap-x-2 gap-y-1",children:[e.jsx("span",{className:"text-[15px] font-semibold tracking-[-0.01em]",style:{color:"var(--public-ink)"},children:o.title}),e.jsxs("span",{className:"inline-flex items-center gap-1.5 whitespace-nowrap",children:[e.jsx(ce,{testId:"plan-check-id",mono:!0,label:o.id,title:"Rubric check",fg:"var(--public-ink-3)",edge:"var(--public-hairline)"}),e.jsx(ce,{label:d,bg:p,fg:u,edge:h}),e.jsx(ce,{label:Ln[o.effort],bg:"var(--public-paper)",fg:"var(--public-ink-2)",edge:"var(--public-hairline-strong)"}),o.owner&&e.jsx(ce,{testId:"plan-owner",label:_n[o.owner],bg:"var(--public-paper)",fg:"var(--public-ink-2)",edge:"var(--public-hairline-strong)"})]})]}),e.jsxs("div",{className:"col-start-2 row-start-2 sm:col-start-3 sm:row-start-1 sm:row-span-2 flex items-baseline gap-2 sm:flex-col sm:items-end sm:gap-1 sm:pt-0.5 tabular-nums",children:[e.jsxs("span",{className:"text-[15px] font-semibold",style:{color:o.impact>0?"var(--public-chart-ink)":"var(--public-ink-2)"},children:["+",o.impact,e.jsx("span",{className:"sr-only",children:" readiness points"})]}),e.jsxs("span",{className:"text-[12.5px] whitespace-nowrap",style:{color:"var(--public-ink-2)"},children:[e.jsx("span",{"aria-hidden":"true",children:"â "}),e.jsx("span",{className:"sr-only",children:"reaches "}),b]})]}),e.jsxs("div",{className:"col-start-2 row-start-3 sm:row-start-2 min-w-0 flex flex-col gap-1.5",children:[e.jsx("span",{className:"text-[12.5px]",style:{color:"var(--public-ink-2)"},children:o.evidence}),x&&e.jsxs("div",{id:f,className:"mt-2 grid gap-x-8 gap-y-4 md:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-mono text-[10.5px] tracking-[0.12em] uppercase mb-1.5",style:{color:"var(--public-ink-2)"},children:"Why it matters"}),e.jsx("p",{"data-testid":"plan-why",className:"text-[13.5px] leading-[1.5] max-w-[65ch]",style:{color:"var(--public-ink)"},children:o.why})]}),e.jsxs("div",{children:[e.jsx("div",{className:"font-mono text-[10.5px] tracking-[0.12em] uppercase mb-1.5",style:{color:"var(--public-ink-2)"},children:"How to fix it"}),e.jsx("ol",{"data-testid":"plan-how",className:"flex flex-col gap-1.5 max-w-[65ch]",children:o.how.map((y,m)=>e.jsxs("li",{className:"flex gap-2 text-[13.5px] leading-[1.5]",style:{color:"var(--public-ink)"},children:[e.jsxs("span",{className:"font-mono text-[11px] pt-[3px] shrink-0 tabular-nums",style:{color:"var(--public-ink-2)"},children:[m+1,"."]}),e.jsx("span",{children:y})]},m))}),o.fix&&o.fix.length<=Dn&&e.jsx("code",{"data-testid":"plan-snippet",className:"mt-2 block font-mono text-[11.5px] leading-relaxed rounded-[var(--public-radius-control)] px-3 py-2 overflow-x-auto",style:{background:"var(--public-paper)",border:"1px solid var(--public-hairline)",color:"var(--public-ink-2)"},children:o.fix})]}),o.acceptance&&e.jsxs("div",{"data-testid":"plan-acceptance",className:"md:col-span-2 text-[12.5px] leading-[1.5]",style:{color:"var(--public-ink-2)"},children:[e.jsx("span",{className:"font-mono text-[10.5px] tracking-[0.12em] uppercase mr-2",style:{color:"var(--public-ink-3)"},children:"Done when"}),o.acceptance.check,o.acceptance.outcome?`; ${o.acceptance.outcome}`:""]})]}),e.jsx("button",{type:"button","data-testid":"plan-toggle",onClick:()=>i(o.id),"aria-expanded":x,"aria-controls":f,className:`self-start inl
3ine-flex items-center min-h-11 sm:min-h-10 -ml-2 px-2 ${Ya} print:hidden rounded-[var(--public-radius-control)] outline-none focus-visible:[box-shadow:var(--public-focus-ring)]`,style:{color:"var(--public-second)"},children:x?"Hide details":"View details"})]})]},o.id)};return e.jsxs("section",{className:"py-8","data-testid":"action-plan",children:[e.jsx(I,{eyebrow:"Action plan",title:"Your action plan",lede:"Use these recommendations to plan your next website changes. Estimated score improvements help you prioritise; verify the results with a new audit.",summary:t.items.length?`The plan contains ${t.items.length} prioritised fixes. Start with â${t.items[0].title}â, then validate each change against its check before moving on; the projected ${W(t.ifAllFixed.grade,t.ifAllFixed.total,{outOf:!0})} assumes every listed check passes and does not forecast citations.`:"No score-improving changes are listed in this snapshot. Maintain the checks that pass, investigate any unverified evidence, and compare a new audit after the next material website change.",meta:`${t.items.length} ${t.items.length===1?"fix":"fixes"} · ranked by estimated score improvement`}),e.jsx(Wn,{plan:t}),e.jsx("div",{className:"mt-7",children:e.jsx(In,{items:t.items.map((o,c)=>({item:o,rank:c+1})).filter(o=>o.item.effort!=="earned").map(({item:o,rank:c})=>({id:o.id,title:o.title,impact:o.impact,effort:o.effort,severity:o.severity,rank:c}))})}),e.jsx("ol",{className:"mt-6 flex flex-col gap-3 print:gap-0",children:t.items.slice(0,Ce).map((o,c)=>r(o,c))}),t.items.length>Ce&&e.jsx("ol",{start:Ce+1,className:"mt-3 flex flex-col gap-3 print:mt-0 print:gap-0",children:t.items.slice(Ce).map((o,c)=>r(o,c+Ce))})]})}const Bn="Search Console settings";function qn({className:t,compact:a=!1}){const[s,n]=j.useState(null),[l,i]=j.useState(!1);return j.useEffect(()=>{const r=new AbortController,o=setTimeout(()=>r.abort(),15e3);return V("/api/aeo/search-console/status",{credentials:"include",cache:"no-store",signal:r.signal}).then(async c=>{if(!c.ok)throw Error();return c.json()}).then(c=>{r.signal.aborted||n(c)}).catch(()=>i(!0)).finally(()=>clearTimeout(o)),()=>{r.abort(),clearTimeout(o)}},[]),!s&&!l?null:e.jsxs("div",{className:Z("flex flex-col gap-2 sm:flex-row sm:items-center",t),style:{color:"var(--public-ink-2)"},"data-testid":"aeo-gsc-offer",children:[!a&&e.jsx("span",{className:"max-w-[62ch] text-sm",children:l?"Search Console status is unavailable.":s?.status==="connected"?`Search Console connected${s.siteUrl?" · "+s.siteUrl:""}. Finalized search observations are collected separately from AI answers.`:s?.status==="unconfigured"?"Search Console requires administrator configuration.":"Connect your verified property to see Google Search performance for this page."}),e.jsx(Rt,{href:gt("/settings?tab=aeo"),className:Z(Pt({variant:"outline",size:"sm"}),"min-h-11 w-fit"),"data-testid":"aeo-gsc-connect",children:Bn})]})}const zn=["anonymous","Googlebot","OAI-SearchBot","GPTBot","ClaudeBot","PerplexityBot"],ia={anonymous:"Browser",Googlebot:"Googlebot","OAI-SearchBot":"OAI-SearchBot · ChatGPT search",GPTBot:"GPTBot · OpenAI training",ClaudeBot:"ClaudeBot · Anthropic",PerplexityBot:"PerplexityBot"},Hn=[["retrievability","Retrievability"],["parseability","Parseability"],["answerability","Answerability"],["entity","Entity and trust"],["agent","Agent readiness"]],ut=[["/llms.txt","llms.txt"],["/llms-full.txt","llms-full.txt"],["/.well-known/agent-content/index.json","Agent content index"],["/.well-known/agent-skills/index.json","Agent skills index"],["/.well-known/api-catalog","API catalog · RFC 9727"],["/.well-known/mcp.json","MCP endpoint"],["/openapi.yaml","OpenAPI document"]],Yn=new Set(["/llms.txt","/llms-full.txt"]),ra=t=>t>=1048576?`${(t/1048576).toFixed(1)} MB`:t>=10240?`${Math.round(t/1024)} KB`:t>=1024?`${(t/1024).toFixed(1)} KB`:`${t} B`,Gn=t=>{const a=[...t].sort((s,n)=>s-n);return a.length?a[Math.floor(a.length/2)]:0},Ga="grid grid-flow-dense items-center gap-x-3 gap-y-2.5 grid-cols-[minmax(0,1fr)_auto] sm:grid-cols-[minmax(96px,36%)_minmax(0,1fr)_auto]",ft="contents",bt="col-start-1",vt="col-start-1 col-span-2 sm:col-start-2 sm:col-span-1 min-w-0",yt="col-start-2 sm:col-start-3 text-[12.5px] tabular-nums whitespace-nowrap text-right";function Vn({responses:t}){const a=Ue(),s=zn.filter(u=>t[u]).map(u=>({client:u,...t[u]})),n=t.anonymous,l=s.filter(u=>u.client!=="anonymous"),i=Math.max(1,...s.map(u=>u.bytes)),r=n?n.bytes/i*100:null,o=l.filter(u=>u.status===200).map(u=>u.bytes),c=n&&n.bytes>0&&o.length?Math.round(Gn(o)/n.bytes*100):null,d=l.filter(u=>u.status===403||u.status===429).map(u=>ia[u.client]??u.client),p=u=>ia[u]??u;return e.jsxs("div",{children:[e.jsx(I,{as:"h3",title:"What each AI crawler received",meta:`${l.length}
3 crawlers · homepage bytes`}),e.jsxs("div",{"data-testid":"crawler-chart",className:Ga,children:[r!==null&&e.jsxs("div",{"data-testid":"crawler-browser-row",className:ft,"aria-hidden":"true",children:[e.jsx("span",{className:`${bt} hidden sm:block`}),e.jsx("div",{className:`${vt} relative h-[16px]`,children:e.jsxs("span",{"data-testid":"crawler-browser-ref",className:"absolute top-0 text-[11.5px] whitespace-nowrap leading-none tabular-nums",style:{left:`${r}%`,transform:r>50?"translateX(-100%)":"none",color:"var(--public-ink-2)"},children:["Browser · ",ra(n.bytes)]})}),e.jsx("span",{className:`${yt} hidden sm:block`})]}),l.map(u=>{const h=u.status!==200,x=h?"var(--public-danger)":"var(--public-chart-mark)";return e.jsxs("div",{"data-testid":"crawler-bar",className:ft,children:[e.jsx("span",{className:`${bt} text-[12.5px] font-medium truncate`,style:{color:"var(--public-ink)"},title:p(u.client),children:p(u.client)}),e.jsx("span",{className:yt,style:{color:h?"var(--public-danger)":"var(--public-ink-2)"},children:h?`HTTP ${u.status} · turned away`:`${ra(u.bytes)} · ${u.ms} ms`}),e.jsxs("div",{className:`${vt} relative`,title:h?`${p(u.client)}: HTTP ${u.status}`:`${p(u.client)}: ${u.bytes.toLocaleString()} bytes in ${u.ms} ms`,children:[e.jsx("div",{className:"h-[8px] rounded-full overflow-hidden",style:{background:"var(--public-hairline)"},children:e.jsx("div",{className:"h-[8px] rounded-full",style:{width:a?`${Math.max(h?0:1.5,u.bytes/i*100)}%`:"0%",background:x,transition:$e}})}),r!==null&&e.jsx("span",{"aria-hidden":"true",className:"absolute top-[-3px] bottom-[-3px] w-px",style:{left:`calc(${r}% - 1px)`,background:"var(--public-ink-3)"}})]})]},u.client)})]}),e.jsxs("p",{"data-testid":"crawler-insight",className:"mt-3 text-[13px] leading-relaxed max-w-[70ch]",style:{color:"var(--public-ink-2)"},children:[d.length>0&&e.jsxs(e.Fragment,{children:[d.join(", ")," ",d.length===1?"was":"were"," refused by your server or CDN, so to ",d.length===1?"it":"them"," this page does not exist. "]}),c===null?"No crawler response completed, so the gap could not be measured.":c<60?`Crawlers receive ${c}% of the browser's bytes (median of ${o.length}). A byte difference can include scripts and assets; inspect the extracted text before concluding content is missing.`:`Crawlers receive ${c}% of the browser's bytes (median of ${o.length}): the same document, which is what an answer engine needs.`]}),e.jsx("div",{className:"sr-only",children:e.jsxs("table",{children:[e.jsx("caption",{children:"Bytes received per crawler"}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Crawler"}),e.jsx("th",{children:"HTTP status"}),e.jsx("th",{children:"Bytes"}),e.jsx("th",{children:"Time"})]})}),e.jsx("tbody",{children:s.map(u=>e.jsxs("tr",{children:[e.jsx("td",{children:p(u.client)}),e.jsx("td",{children:u.status}),e.jsx("td",{children:u.bytes}),e.jsxs("td",{children:[u.ms," ms"]})]},u.client))})]})})]})}const Te=[{key:"pass",label:"Pass",fill:"var(--public-assurance)"},{key:"fail",label:"Fail or warn",fill:"var(--public-danger)"},{key:"unverified",label:"Unverified",fill:"var(--public-ink-3)"},{key:"info",label:"Not scored",fill:"var(--public-hairline-strong)",outline:"var(--public-ink-3)"}],Kn=({fill:t,outline:a})=>({background:t,boxShadow:a?`inset 0 0 0 1px ${a}`:void 0});function Qn({fill:t,outline:a,outcome:s}){return e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true","data-testid":"legend-swatch","data-outcome":s,className:"shrink-0",children:e.jsx("rect",{x:a?.5:0,y:a?.5:0,width:a?11:12,height:a?11:12,rx:"2",fill:t,stroke:a,strokeWidth:a?1:0})})}const Xn=t=>t==="warn"?"fail":t==="info"?"info":t==="unverified"?"unverified":t==="fail"?"fail":"pass";function Jn({checks:t}){const a=Hn.map(([s,n])=>{const l=t.filter(u=>u.pillar===s),i={pass:0,fail:0,unverified:0,info:0};for(const u of l)i[Xn(u.status)]+=1;const r=l.filter(u=>u.status==="warn").length,o=Math.max(1,l.length),c=u=>u==="fail"?r>0?"fail or warn":"fail":u==="info"?"not scored":u,d=Te.filter(({key:u})=>i[u]>0||u==="pass").map(({key:u})=>`${i[u]} ${c(u)}`).join(" · "),p=Te.filter(({key:u})=>i[u]>0);return{key:s,label:n,counts:i,total:o,summary:d,segments:p}});return e.jsxs("div",{children:[e.jsx(I,{as:"h3",title:"Check outcomes by pillar",meta:`${t.length} checks`}),e.jsx("div",{"data-testid":"outcome-chart",className:Ga,children:a.map(s=>e.jsxs("div",{"data-testid":"pillar-outcome",className:ft,children:[e.jsx("span",{className:`${bt} text-[12.5px] font-medium`,style:{color:"var(--public-ink)"},children:s.label}),e.jsx("span",{className:yt,style:{color:"var(--public-ink-2)"},children:s.summary}),e.jsx("div",{className:`${vt} flex h-[8px] rounded-full overflow-hidden`,style:{background:"var(--public-hairline)"},children:s.segments.map((n,l)=>e.jsx("div",{"data-testid":`outcome-${n.key}`,style:{width:`${s.counts[n.key]/s.total*100}%`,...Kn(n),borderRight:l<s.segments.length-1?"2px solid var(--public-ground)":void 0}},n.key))})]},s.key))}),e.jsx("div",{className:"mt-3 flex flex-wrap gap-4 text-[11.5px]",style:{color:"var(--public-ink-2)"},"aria-label":"Legend",children:Te.map(({key:s,label:n,fill:l,outline:i})=>e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(Qn,{fill:l,outline:i,outcome:s}),n]},s))}),e.jsx("div",{className:"sr-only",children:e.jsxs("table",{children:[e.jsx("caption",{children:"Check outcomes by pillar"}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Pillar"}),Te.map(({key:s,label:n})=>e.jsx("th",{children:n},s))]})}),e.jsx("tbody",{children:a.map(s=>e.jsxs("tr",{children:[e.jsx("td",{children:s.label}),Te.map(({key:n})=>e.jsx("td",{children:s.counts[n]},n))]},s.key))})]})})]})}function Zn(t){return t===void 0?{text:"Not checked",tone:"absent"}:t===200?{text:"Live",tone:"live"}:t===404||t===410?{text:"Missing",tone:"absent"}:t===0?{text:"Unreachable",tone:"absent"}:{text:`HTTP ${t}`,tone:"error"}}function ei({discovery:t}){const a=ut.filter(([s])=>t[s]===200).length;return e.jsxs("div",{children:[e.jsx(I,{as:"h3",title:"Agent discovery files",meta:`${a} of ${ut.length} live`}),e.jsx("div",{"data-testid":"discovery-grid",className:"grid gap-2 grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",children:ut.map(([s,n])=>{const{text:l,tone:i}=Zn(t[s]),r=i==="live"?"var(--public-assurance)":i==="error"?"var(--public-danger)":"var(--public-ink-2)",o=i==="live"?{background:"var(--public-assurance)"}:i==="error"?{background:"var(--public-danger)"}:{background:"transparent",boxShadow:"inset 0 0 0 1px var(--public-hairline-strong)"};return e.jsxs("div",{"data-testid":`discovery-${s}`,className:"flex flex-col gap-1 rounded-lg px-3 py-2 min-w-0",style:{border:"1px solid var(--public-hairline)",background:"var(--public-ground)"},children:[e.jsx("span",{className:"text-[12.5px] font-medium",style:{color:"var(--public-ink)",overflowWrap:"anywhere"},children:n}),e.jsxs("span",{"data-testid":"discovery-status",className:"flex items-center gap-1.5 text-[11px] font-semibold",style:{color:r},children:[e.jsx("span",{"aria-hidden":"true",className:"inline-block w-[7px] h-[7px] rounded-full shrink-0",style:o}),l,Yn.has(s)?e.jsx("span",{className:"font-normal",style:{color:"var(--public-ink-2)"},children:" · not scored"}):null]}),e.jsx("code",{className:"font-mono text-[11px]",style:{color:"var(--public-ink-2)",overflowWrap:"anywhere"},children:s})]},s)})})]})}function ti(){return e.jsxs("div",{"data-testid":"gsc-card",className:"rounded-2xl px-5 py-5 sm:px-6 md:px-8 md:py-7 flex flex-col lg:flex-row lg:items-end gap-5 justify-between",style:{background:"var(--public-paper)",border:"1px solid var(--public-hairline)"},children:[e.jsx("div",{className:"min-w-0 [&>div]:mb-0",children:e.jsx(I,{as:"h3",eyebrow:"Your search data",title:"Connect Google Search Console to see the questions buyers ask before finding you",lede:"Use your search queries to inform content priorities. The connection is read-only and can be disconnected at any time."})}
3),e.jsx(qn,{className:"shrink-0",compact:!0})]})}function ai({checks:t,observations:a,id:s,interactive:n=!0}){const l=a?.responses,i=!!l&&Object.keys(l).length>0,r=a?.discovery,o=!!r&&Object.keys(r).length>0;return e.jsxs("section",{className:"py-8","data-testid":"report-analytics",children:[e.jsx(I,{id:s,eyebrow:"Evidence",title:"Review the recorded website evidence",lede:"Inspect the page responses, check results and discovery endpoints recorded in this audit. Unverified results identify evidence that still needs checking.",summary:`${t.filter(c=>c.status==="pass").length} of ${t.length} checks passed, ${t.filter(c=>c.status==="fail").length} failed and ${t.filter(c=>c.status==="unverified").length} were unverified${t.some(c=>!["pass","fail","unverified"].includes(c.status))?`; ${t.filter(c=>!["pass","fail","unverified"].includes(c.status)).length} have another status shown below`:""}. Use these observations to confirm the cause of each finding; response sizes and discovery files are diagnostic signals, so inspect the returned content before deciding what to change.`}),e.jsxs("div",{"data-testid":"evidence-grid",className:"grid gap-10 lg:grid-cols-2",children:[i&&e.jsx(Vn,{responses:l}),e.jsx(Jn,{checks:t})]}),o&&e.jsx("div",{"data-testid":"evidence-discovery",className:"mt-10",children:e.jsx(ei,{discovery:r})}),n&&e.jsx("div",{className:"mt-10 print-hide",children:e.jsx(ti,{})})]})}const J={auditedAt:"2026-09-05T02:56:53.072Z",report:{url:"https://prompeteer.ai/",shareToken:"sample",freshness:"fresh",fetchedAt:"2026-09-05T02:56:53.072Z",durationMs:1364,canEditCompetitors:!1,score:{total:67,grade:"C+",criticalCount:2,importantCount:3,passCount:31,pillars:[{pillar:"retrievability",label:"Retrievability",score:100,counted:11,unverified:1},{pillar:"parseability",label:"Parseability",score:40,counted:8,unverified:0},{pillar:"answerability",label:"Answerability",score:22,counted:7,unverified:0},{pillar:"entity",label:"Entity and trust",score:83,counted:8,unverified:3},{pillar:"agent",label:"Agent readiness",score:100,counted:5,unverified:0}]},checks:[{id:"R1",pillar:"retrievability",title:"Canonical URL responds",status:"pass",severity:"none",evidence:"HTTP 200 in 175ms"},{id:"R2",pillar:"retrievability",title:"Served over HTTPS",status:"pass",severity:"none",evidence:"https://prompeteer.ai/"},{id:"R3",pillar:"retrievability",title:"Short redirect chain",status:"pass",severity:"none",evidence:"0 hops"},{id:"R4",pillar:"retrievability",title:"robots.txt is readable",status:"pass",severity:"none",evidence:"44908 bytes"},{id:"R5",pillar:"retrievability",title:"Retrieval crawlers allowed",status:"pass",severity:"none",evidence:"8 agents allowed"},{id:"R6",pillar:"retrievability",title:"Training crawler posture",status:"info",severity:"none",evidence:"All training agents allowed"},{id:"R7",pillar:"retrievability",title:"Crawlers reach the edge",status:"pass",severity:"none",evidence:"5 agents received 200"},{id:"R8",pillar:"retrievability",title:"Responds quickly",status:"pass",severity:"none",evidence:"175ms"},{id:"R9",pillar:"retrievability",title:"Response is compressed",status:"pass",severity:"none",evidence:"content-encoding: br"},{id:"R10",pillar:"retrievability",title:"Sitemap reachable",status:"pass",severity:"none",evidence:"sitemap.xml returned 200"},{id:"R11",pillar:"retrievability",title:"Self-referential canonical",status:"pass",severity:"none",evidence:"https://prompeteer.ai/"},{id:"R12",pillar:"retrievability",title:"Page is indexable",status:"pass",severity:"none",evidence:"no noindex directive"},{id:"R13",pillar:"retrievability",title:"Present in the open training corpus",status:"unverified",severity:"none",evidence:"Common Crawl not reachable"},{id:"P1",pillar:"parseability",title:"Content present without JavaScript",status:"fail",severity:"critical",evidence:"61 words in raw HTML",fix:"Server-render meaningful body content to make it accessible without JavaScript."},{id:"P2",pillar:"parseability",title:"Not an empty SPA shell",status:"fail",severity:"critical",evidence:"mount element is empty and the document holds only 61 words",fix:"Pre-render or server-render this route."},{id:"P3",pillar:"parseability",title:"Bots and humans get the same page",status:"pass",severity:"none",evidence:"61 vs 0 words"},{id:"P4",pillar:"parseability",title:"Exactly one H1",status:"pass",severity:"none",evidence:"The AI Fluency Agent"},{id:"P5",pillar:"parseability",title:"Heading levels are not skipped",status:"pass",severity:"none",evidence:"1 headings"},{id:"P6",pillar:"parseability",title:"Content sits in a landmark",status:"pass",severity:"none",evidence:"<main>"},{id:"P7",pillar:"parseability",title:"Content outweighs boilerplate",status:"pass",severity:"none",evidence:"100% of body text"},{id:"P8",pillar:"parseability",title:"HTML within size limits",status:"pass",severity:"none",evidence:"text/html; charset=utf-8, 1172 bytes"},{id:"A1",pillar:"answerability",title:"Answer-first opening",status:"fail",severity:"important",evidence:"35-word o
3pening paragraph",fix:"Open with a clear, self-contained answer to the main reader question."},{id:"A2",pillar:"answerability",title:"Question-shaped headings",status:"fail",severity:"important",evidence:"0 question headings",fix:"Phrase section headings as the questions buyers ask."},{id:"A3",pillar:"answerability",title:"Paragraphs are extractable",status:"fail",severity:"minor",evidence:"median 35 words",fix:"Use self-contained paragraphs; let accuracy and comprehension determine their length."},{id:"A4",pillar:"answerability",title:"Structured content present",status:"fail",severity:"minor",evidence:"no list or table",fix:"Add a list or comparison table."},{id:"A5",pillar:"answerability",title:"Visible FAQ",status:"fail",severity:"minor",evidence:"0 visible questions",fix:"Publish a short FAQ as visible copy."},{id:"A6",pillar:"answerability",title:"FAQ schema matches visible Q&A",status:"info",severity:"none",evidence:"no FAQPage schema"},{id:"A7",pillar:"answerability",title:"Sentences are readable",status:"pass",severity:"none",evidence:"mean 14 words"},{id:"A8",pillar:"answerability",title:"Summary near the top",status:"pass",severity:"none",evidence:'"The AI Fluency Agent" followed by prose'},{id:"E1",pillar:"entity",title:"Structured data present",status:"pass",severity:"none",evidence:"1 ld+json blocks, all parse"},{id:"E2",pillar:"entity",title:"Organization identified",status:"pass",severity:"none",evidence:"types: Organization, ImageObject, WebSite, Person, WebPage"},{id:"E3",pillar:"entity",title:"sameAs links",status:"pass",severity:"none",evidence:"4 sameAs"},{id:"E4",pillar:"entity",title:"Connected entity graph",status:"pass",severity:"none",evidence:"4 nodes, 3 references, all resolve"},{id:"E5",pillar:"entity",title:"Author is resolvable",status:"fail",severity:"important",evidence:"no author in the entity graph",fix:"Name an author and resolve it to a Person node."},{id:"E6",pillar:"entity",title:"dateModified is precise",status:"pass",severity:"none",evidence:"2026-08-25T00:00:00-07:00"},{id:"E7",pillar:"entity",title:"Freshness is real",status:"pass",severity:"none",evidence:"modified 2026-08-25T00:00:00-07:00"},{id:"E8",pillar:"entity",title:"Social card complete",status:"pass",severity:"none",evidence:"og:title, og:description and og:image present"},{id:"E9",pillar:"entity",title:"Resolvable public entity",status:"unverified",severity:"none",evidence:"Wikidata not reachable"},{id:"E10",pillar:"entity",title:"Off-site brand mentions",status:"unverified",severity:"none",evidence:"mention source not reachable"},{id:"E11",pillar:"entity",title:"Established domain history",status:"unverified",severity:"none",evidence:"archive not reachable"},{id:"G1",pillar:"agent",title:"Markdown twin available",status:"pass",severity:"none",evidence:"Accept: text/markdown honoured"},{id:"G2",pillar:"agent",title:"Well-known discovery",status:"pass",severity:"none",evidence:"/.well-known/agent-content/index.json, /.well-known/agent-skills/index.json, /.well-known/api-catalog, /.well-known/mcp.json"},{id:"G3",pillar:"agent",title:"MCP endpoint declared",status:"pass",severity:"none",evidence:"MCP surface responds"},{id:"G4",pillar:"agent",title:"Machine-readable API surface",status:"pass",severity:"none",evidence:"OpenAPI or api-catalog present"},{id:"G5",pillar:"agent",title:"Link: alternate header",status:"pass",severity:"none",evidence:"Link header advertises alternates"},{id:"G6",pillar:"agent",title:"llms.txt (reported, not scored)",status:"info",severity:"none",evidence:"present â no engine has confirmed using it, so it does not affect this score"}],plan:{current:{total:67,grade:"C+",heldBy:null},ifAllFixed:{total:100,grade:"A+",heldBy:null},items:[{id:"P1",pillar:"parseability",title:"Content present without JavaScript",severity:"critical",evidence:"61 words in raw HTML",fix:"Server-render meaningful body text into the initial HTML.",impact:7,effort:"high",projectedTotal:74,projectedGrade:"C+",why:"Initial HTML makes meaningful body content accessible without depending on JavaScript execution.",how:["Server-render meaningful body text into the initial HTML.","Compare the HTML response with the rendered page.","Include sufficient useful context; avoid word-count filler."]},{id:"P2",pillar:"parseability",title:"Not an empty SPA shell",severity:"critical",evidence:"mount element is empty and the document holds only 61 words",fix:"Render the meaningful public content into the initial HTML.",impact:7,effort:"high",projectedTotal:82,projectedGrade:"B",why:"A page shell without its main content gives a basic retrieval client little to read.",how:["Render the meaningful public content into the initial HTML.","Check the page with JavaScript disabled.","Keep the visible content consistent across supported clients."]},{id:"A1",pillar:"answerability",title:"Answer-first opening",severity:"important",evidence:"35-word o
3pening paragraph",fix:"Open with a direct answer to the main reader question.",impact:4,effort:"low",projectedTotal:86,projectedGrade:"B+",why:"A clear opening helps readers understand the offer and its intended audience, even when they encounter a short excerpt.",how:["Open with a direct answer to the main reader question.","Name the product and the audience it serves.","Use enough words for accuracy; use the length the answer needs."]},{id:"A2",pillar:"answerability",title:"Question-shaped headings",severity:"important",evidence:"0 question headings",fix:"Use headings that describe each section; questions are optional.",impact:4,effort:"low",projectedTotal:91,projectedGrade:"A",why:"Descriptive headings help readers find the answer they need. Use buyer questions where they fit the section.",how:["Use headings that describe each section; questions are optional.","Start each section with a direct, supported answer.","Prioritize useful coverage over a heading-count target."]},{id:"E5",pillar:"entity",title:"Author is resolvable",severity:"important",evidence:"no author in the entity graph",fix:"Show a truthful byline and useful profile where appropriate.",impact:2,effort:"medium",projectedTotal:93,projectedGrade:"A",why:"Accurate authorship helps readers assess relevant expertise where a byline is expected.",how:["Show a truthful byline and useful profile where appropriate.","Match authored-article markup to the visible author.","Use an organisation as author when that is accurate."]},{id:"A3",pillar:"answerability",title:"Paragraphs are extractable",severity:"minor",evidence:"median 35 words",fix:"Develop one complete idea per paragraph.",impact:2,effort:"medium",projectedTotal:96,projectedGrade:"A+",why:"Self-contained paragraphs keep claims and qualifications together when readers encounter an excerpt.",how:["Develop one complete idea per paragraph.","Split dense blocks naturally; keep qualifications beside their claims.","Let accuracy and comprehension determine paragraph length."]},{id:"A4",pillar:"answerability",title:"Structured content present",severity:"minor",evidence:"no list or table",fix:"Use lists for genuinely sequential or parallel information.",impact:2,effort:"low",projectedTotal:98,projectedGrade:"A+",why:"Well-structured lists and tables make suitable comparisons easier to understand.",how:["Use lists for genuinely sequential or parallel information.","Use tables for comparisons with consistent criteria.","Keep qualifications and units beside the facts they describe."]},{id:"A5",pillar:"answerability",title:"Visible FAQ",severity:"minor",evidence:"0 visible questions",fix:"Review actual customer questions and available query evidence.",impact:2,effort:"low",projectedTotal:100,projectedGrade:"A+",why:"Visible answers to real buyer questions help readers resolve common uncertainties.",how:["Review actual customer questions and available query evidence.","Answer relevant questions directly using current business facts.","Omit repetitive questions and unsupported claims."]}]},observations:{robotsPresent:!0,blockedRetrieval:[],blockedTraining:[],responses:{anonymous:{status:200,bytes:2932,ms:175,ok:!0},Googlebot:{status:200,bytes:1172,ms:181,ok:!0},GPTBot:{status:200,bytes:1174,ms:179,ok:!0},"OAI-SearchBot":{status:200,bytes:1176,ms:174,ok:!0},ClaudeBot:{status:200,bytes:1175,ms:179,ok:!0},PerplexityBot:{status:200,bytes:1177,ms:179,ok:!0}},discovery:{"/llms.txt":200,"/llms-full.txt":200,"/.well-known/agent-content/index.json":200,"/.well-known/agent-skills/index.json":200,"/.well-known/api-catalog":200,"/.well-known/mcp.json":200,"/openapi.yaml":200},identity:{kind:"company",name:"Prompeteer",legalName:null,logoUrl:"https://storage.googleapis.com/prompeteerai546783809302/production/social-share-logo.png",iconUrl:"https://prompeteer.ai/apple-touch-icon.png",sameAsCount:2,authorDeclared:!1,types:["Organization"],nameDeclared:!0,location:null,page:null}}},benchmark:{kind:"set",rank:3,of:6,yourDomain:"prompeteer.ai",biggestGap:{pillar:"parseability",label:"Parseability",delta:-45},pillars:[{pillar:"retrievability",label:"Retrievability",yours:100,setMedian:94,delta:6},{pillar:"parseability",label:"Parseability",yours:40,setMedian:85,delta:-45},{pillar:"answerability",label:"Answerability",yours:22,setMedian:11,delta:11},{pillar:"entity",label:"Entity and trust",yours:83,setMedian:33,delta:50},{pillar:"agent",label:"Agent readiness",yours:100,setMedian:0,delta:100}],rows:[{domain:"langfuse.com",score:78,grade:"B-",isYou:!1,status:"graded",pillars:{retrievability:94,parseability:100,answerability:67,entity:33,agent:60}},{domain:"promptlayer.com",score:74,grade:"C+",isYou:!1,status:"graded",pillars:{retrievability:100,parseability:95,answerability:45,entity:75,agent:0}},{domain:"prompeteer.ai",score:67,grade:"C+",isYou:!0,status:"graded",pillars:{retrievability:100,parseability:40,answerability:22,entity:83,agent:100}},{domain:"prompthub.us",score:57,grade:"C",isYou:!1,status:"graded",pillars:{retrievability:94,parseability:85,answerability:11,entity:33,agent:0}},{domain:"humanloop.com",score:51,grade:"C",isYou:!1,status:"graded",pillars:{retrievability:100,parseability:55,answerability:11,entity:33,agent:0}},{domain:"promptperfect.jina.ai",score:44,grade:"D",isYou:!1,status:"graded",pillars:{retrievability:94,parseability:50,answerability:0,entity:25,agent:0}}]},engines:{status:"ok",domain:"prompeteer.ai",brand:"Prompeteer",corpus:{status:"pending",vertical:"saas",questions:0,sampledAt:null,note:"No current answer sample is available for this category yet."},engines:[{id:"perplexity",label:"Perplexity",vendor:"Perplexity",method:"grounded",fidelity:"proxy",parity:{retrieval:"unknown",note:"Measured through an API. Consumer-app answers may differ; equivalence has not been verified."},reads:{status:"allowed",crawlers:[{ua:"PerplexityBot",allowed:!0,fetched:!0,words:null},{ua:"Perplexity-User",allowed:!0,fetched:null,words:null}]},cites:{share:null,n:0,note:"No answers from this engine in the corpus yet."},recommends:{share:null,n:0,firstPlace:null,note:"No answers from this engine in the corpus yet."}},{id:"chatgpt",label:"ChatGPT",vendor:"OpenAI",method:"grounded",fidelity:"proxy",parity:{retrieval:"unknown",note:"Measured through an API. Consumer-app answers may differ; equivalence has not been verified."},reads:{status:"allowed",crawlers:[{ua:"OAI-SearchBot",allowed:!0,fetched:!0,words:null},{ua:"ChatGPT-User",allowed:!0,fetched:null,words:null}]},cites:{share:null,n:0,note:"No answers from this engine in the corpus yet."},recommends:{share:null,n:0,firstPlace:null,note:"No answers from this engine in the corpus yet."}},{id:"ai-overviews",label:"Gemini (Google grounding)",vendor:"Google",method:"grounded",fidelity:"proxy",parity:{retrieval:"unknown",note:"Measured through an API. Consumer-app answers may differ; equivalence has not been verified."},reads:{status:"allowed",crawlers:[{ua:"Googlebot",allowed:!0,fetched:!0,words:null}]},cites:{share:null,n:0,note:"No answers from this engine in the corpus yet."},recommends:{share:null,n:0,firstPlace:null,note:"No answers from this engine in the corpus yet."}}]}},la="var(--public-chart-wash, var(--public-highlight-wash))",oa="var(--public-chart-ink, var(--public-highlight-ink))",si=t=>`${t}${["th","st","nd","rd"][t%100>10&&t%100<14||Math.min(t%10,4)===4||t%10>3?0:t%10]}`,ni=t=>`https://www.google.com/s2/favicons?sz=64&domain=${encodeURIComponent(t)}`;function Ot({domain:t,color:a,ink:s=Re,size:n=22,className:l=""}){const[i,r]=j.useState(!1);if(i){const o=t.replace(/^www\./,"")[0]?.toUpperCase()??"?";return e.jsx("span",{"data-testid":"competitor-monogram","aria-hidden":"true",className:`inline-flex shrink-0 items-center justify-center rounded-full font-semibold leading-none ${l}`.trim(),style:{width:n,height:n,background:a,color:s,fontSize:Math.round(n*.5)},children:o})}return e.jsx("img",{"data-testid":"competitor-favicon",src:ni(t),alt:"",width:n,height:n,loading:"lazy",decoding:"async",onError:()=>r(!0),className:`shrink-0 rounded-[calc(var(--public-radius-control)/2)] object-contain ${l}`.trim(),style:{width:n,height:n,background:mn,border:`1px solid ${hn}`}})}function ii({rows:t}){const a=Ue(),s=f=>f.status==="graded"&&f.score!==null&&Number.isFinite(f.score)&&f.score>=0&&f.score<=100?f.score:null,n=[...t].sort((f,b)=>(s(b)??-1)-(s(f)??-1)||f.domain.localeCompare(b.domain)),l=n.filter(f=>s(f)!==null),i=n.find(f=>f.isYou),r=i?s(i):null,o=l[0],c=o?l.filter(f=>f.score===o.score):[],d=r===null?null:1+l.filter(f=>f.score>r).length,p=r!==null&&l.filter(f=>f.score===r).length>1,u=n.length-l.length,h=d!==null?`${p?"You are tied":"You are"} ${si(d)} of ${l.length} measured sites.`:"Your ranking is not measured yet.",x=!o||r===null?"":d===1?c.length>1?` Shared lead at ${r}/100.`:` You lead at ${r}/100.`:` ${o.domain}${c.length>1?` and ${c.length-1} other${c.length===2?"":"s"}`:""} ${c.length>1?"lead":"leads"} at ${o.score}/100, ${o.score-r} points ahead.`;return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex justify-between gap-3 px-3 pb-2 font-mono text-[11.5px] font-medium uppercase tracking-[0.08em]",style:{color:"var(--public-ink-3)"},children:[e.jsx("span",{children:"Technical readiness"}),e.jsx("span",{children:"Score / 100"})]}),e.jsx("ol",{className:"m-0 p-0 list-none flex flex-col gap-1","aria-label":"Your website, competitors and peers ranked by AEO score",children:n.map(f=>{const b=s(f),y=b===null,m=y?null:1+l.filter(C=>C.score>b).length,w=b!==null&&r!==null?b-r:null,g=_t(f,t);return e.jsxs("li",{"data-testid":"rank-row","data-you":f.isYou?"true":"false","data-pending":y?"true":"false","data-color":g.colorName,className:"grid items-center gap-x-3 rounded-[var(--public-radius-control)] px-3 py-2.5",value:m??void 0,style:{gridTemplateColumns:"18px 24px minmax(0,1fr) 86px",background:f.isYou?la:"transparent"},children:[e.jsx("span",{className:"font-mono text-[11.5px] tabular-nums",style:{color:f.isYou?oa:"var(--public-ink-3)",fontWeight:f.isYou?600:500},children:y?e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":"true",children:"-"}),e.jsx("span",{className:"sr-only",children:"not yet measured"})]}):m}),e.jsx(Ot,{domain:f.domain,color:g.color,ink:g.ink,size:24}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-baseline gap-1.5 min-w-0",children:[e.jsx("span",{"data-testid":"rank-domain",title:f.domain,className:"text-[13.5px] truncate min-w-0",style:{fontWeight:f.isYou?at.you:at.other,color:"var(--public-ink)"},children:f.domain}),e.jsxs("span",{"data-testid":"rank-color",className:"sr-only",children:[", ",g.colorName," mark"]}),f.isYou&&e.jsx(ce,{label:"you",fg:oa,bg:la,edge:"var(--public-chart-edge, var(--public-highlight-edge))",className:"shrink-0"})]}),e.jsx("div",{className:"mt-1 h-[7px] border-b",style:{borderColor:"var(--public-hairline)"},title:y?`${f.domain}: measuring`:`${f.domain}: ${f.grade?W(f.grade,f.score,{outOf:!0}):`${f.score}/100`}`,children:!y&&e.jsx("div",{"data-testid":"rank-bar",className:"h-[6px] rounded-full origin-left",style:{width:`${b}%`,transform:a?"scaleX(1)":"scaleX(0)",background:g.color,transition:$e.replace("width","transform")}})})]}),e.jsxs("span",{className:"text-right tabular-nums whitespace-nowrap",children:[e.jsx("span",{"data-testid":"rank-score",className:"block text-[13px]",style:{color:y?"var(--public-ink-2)":f.isYou?"var(--public-ink)":"var(--public-ink-2)",fontWeight:f.isYou?700:500},children:y?f.status==="failed"?"Unavailable":"Measuring":f.grade?W(f.grade,b):b}),!f.isYou&&w!==null&&e.jsx("span",{"data-testid":"rank-delta",className:"block text-[11px]",style:{color:"var(--public-ink-2)"},children:w===0?"Tied with you":`${w>0?"+":""}${w} vs you`})]})]},f.domain)})}),e.jsxs("p",{"data-testid":"rank-summary",className:"mt-2 px-3 text-[12.5px]",style:{color:"var(--public-ink-2)"},children:[h,x,u>0?` ${u} site${u===1?"":"s"} awaiting measurement.`:""]})]})}const Je=[["retrievability","Retrievability"],["parseability","Parseability"],["answerability","Answerability"],["entity","Entity and trust"],["agent","Agent readiness"]],xe=t=>typeof t=="number"&&Number.isFinite(t)&&t>=0&&t<=100;function ri(t){const a=t.filter(s=>s.status==="graded"&&s.pillars&&xe(s.score));return Je.map(([s,n])=>{const l=a.map(c=>({...c,value:c.pillars[s]})).filter(c=>xe(c.value)),i=l.find(c=>c.isYou)?.value??null,r=l.length?Math.max(...l.map(c=>c.value)):null,o=l.filter(c=>c.value===r);return{key:s,label:n,yours:i,leaderScore:r,leaders:o,gap:i!==null&&r!==null?i-r:null}})}function li({rows:t,biggestGap:a}){const s=j.useId(),[n,l]=j.useState(""),i=ri(t),r=t.filter(u=>u.status==="graded"&&u.pillars&&xe(u.score)),o=r.find(u=>u.isYou),c=r.filter(u=>!u.isYou).sort((u,h)=>h.score-u.score),d=c.find(u=>u.domain===n)??c[0],p=(u=!1)=>e.jsxs("table",{className:`w-full ${u?"table-fixed [overflow-wrap:anywhere]":"min-w-[640px]"} text-left text-[13px] tabular-nums [&_th]:py-3 [&_th]:pr-4 [&_td]:py-3 [&_td]:pr-4`,style:{color:"var(--public-ink-2)"},children:[e.jsx("caption",{className:"pb-3 text-left text-[13px] font-medium",style:{color:"var(--public-ink)"},children:u?"All competitor pillar scores (out of 100)":"Exact scores for every measured site (out of 100)"}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",children:"Site"}),Je.map(([h,x])=>e.jsx("th",{scope:"col",children:x},h))]})}),e.jsx("tbody",{children:r.map(h=>e.jsxs("tr",{style:{borderTop:"1px solid var(--public-hairline)"},children:[e.jsxs("th",{scope:"row",className:"font-medium break-all",style:{color:h.isYou?"var(--public-chart-ink, var(--public-highlight-ink))":"var(--public-ink)"},children:[h.domain,h.isYou?" (you)":""]}),Je.map(([x])=>e.jsx("td",{children:xe(h.pillars[x])?h.pillars[x]:"Not measured"},x))]},h.domain))})]});return e.jsxs("div",{"data-testid":"competitive-field",children:[d&&e.jsxs(e.Fragment,{children:[e.jsxs("label",{htmlFor:s,className:"print-hide flex flex-col gap-2 mb-5 text-[12px]",style:{color:"var(--public-ink-2)"},children:["Compare with",e.jsx("select",{id:s,value:d.domain,onChange:u=>l(u.target.value),className:"min-h-[44px] w-full rounded-[var(--public-radius-control)] px-3 text-[13px]",style:{background:"var(--public-ground)",color:"var(--public-ink)",border:"1px solid var(--public-hairline-strong)"},children:c.map(u=>e.jsxs("option",{value:u.domain,children:[u.domain,u===c[0]?" · highest total score":""]},u.domain))})]}),e.jsxs("p",{className:"text-[12px] leading-relaxed mb-5",style:{color:"var(--public-ink-2)"},children:[e.jsx("span",{style:{color:"var(--public-chart-ink)"},children:"You"})," compared with ",e.jsx("span",{style:{color:"var(--public-chart-compare, var(--public-chart-neutral))"},children:d.domain})," · scores out of 100"]}),e.jsx("div",{className:"flex flex-col gap-5","data-testid":"selected-peer-comparison",children:Je.map(([u,h])=>e.jsxs("div",{children:[e.jsx("h4",{className:"text-[13px] font-medium mb-2",children:h}),[{row:o,label:"You",color:"var(--public-chart-ink)"},{row:d,label:d.domain,color:"var(--public-chart-compare, var(--public-chart-neutral))"}].map(x=>{const f=x.row?.pillars?.[u];return e.jsxs("div",{className:"grid grid-cols-[minmax(0,100px)_minmax(0,1fr)_36px] gap-3 items-center py-1 text-[11px]",children:[e.jsx("span",{className:"truncate",title:x.label,style:{color:"var(--public-ink-2)"},children:x.label}),e.jsx("div",{className:"h-[6px] rounded-full overflow-hidden",style:{background:"var(--public-hairline)"},children:xe(f)&&e.jsx("div",{className:"h-full rounded-full",style:{width:`${f}%`,background:x.color}})}),e.jsx("span",{className:"text-right tabular-nums font-medium","aria-label":`${x.label} ${h}: ${xe(f)?f:"Not measured"}`,children:xe(f)?f:"â"})]},x.label)})]},u))})]}),e.jsxs("details",{className:"aeo-evidence-disclosure",children:[e.jsx("summary",{children:"Compare every pillar leader"}),e.jsx("div",{children:e.jsxs("table",{className:"block sm:table print:table w-full table-fixed text-left text-[14px] tabular-nums",children:[e.jsx("caption",{className:"block sm:table-caption print:table-caption pb-4 text-left text-[13px] font-medium",style:{color:"var(--public-ink-2)"},children:"Pillar comparison, scores out of 100"}),e.jsxs("colgroup",{className:"hidden sm:table-column-group print:table-column-group",children:[e.jsx("col",{style:{width:"28%"}}),e.jsx("col",{style:
3{width:"14%"}}),e.jsx("col",{style:{width:"36%"}}),e.jsx("col",{style:{width:"22%"}})]}),e.jsx("thead",{className:"hidden sm:table-header-group print:table-header-group",style:{color:"var(--public-ink-2)"},children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",className:"pb-3 pr-3 text-[12px] font-medium",children:"Pillar"}),e.jsx("th",{scope:"col",className:"pb-3 pr-3 text-[12px] font-medium",children:"You"}),e.jsx("th",{scope:"col",className:"pb-3 pr-3 text-[12px] font-medium",children:"Leader"}),e.jsx("th",{scope:"col",className:"pb-3 text-right text-[12px] font-medium",children:"Gap"})]})}),e.jsx("tbody",{className:"block sm:table-row-group print:table-row-group",children:i.map(({key:u,label:h,yours:x,leaderScore:f,leaders:b,gap:y})=>{const m=b.length===1&&b[0].isYou,w=b.find(g=>g.isYou)??b[0];return e.jsxs("tr",{"data-testid":"pillar-comparison-row","data-pillar":u,className:"grid grid-cols-[18%_56%_26%] sm:table-row print:table-row",style:{borderTop:"1px solid var(--public-hairline)"},children:[e.jsxs("th",{scope:"row",className:"col-span-3 py-3 sm:py-4 print:py-4 pr-3 align-top font-medium",style:{color:"var(--public-ink)"},children:[h,a===u&&y!==null&&y<0&&e.jsx("span",{className:"mt-1 block text-[11px] font-normal",style:{color:"var(--public-ink-2)"},children:"Largest gap"})]}),e.jsxs("td",{"data-testid":"pillar-your-score",className:"pb-4 sm:py-4 print:py-4 pr-3 align-top font-semibold",style:{color:"var(--public-chart-ink, var(--public-highlight-ink))"},children:[e.jsx("span",{className:"mb-1 block sm:hidden print:hidden text-[11px] font-normal",style:{color:"var(--public-ink-2)"},children:"You"}),x??"N/A"]}),e.jsxs("td",{className:"pb-4 sm:py-4 print:py-4 pr-3 align-top",style:{color:"var(--public-ink)"},children:[e.jsx("span",{className:"mb-1 block sm:hidden print:hidden text-[11px]",style:{color:"var(--public-ink-2)"},children:"Leader"}),f??"N/A",w&&e.jsxs("span",{className:"mt-1 block break-all text-[12px] leading-snug",title:b.map(g=>g.domain).join(", "),style:{color:"var(--public-ink-2)"},children:[w.isYou?"You":w.domain,b.length>1?` (+${b.length-1} tied)`:""]})]}),e.jsxs("td",{"data-testid":"pillar-gap",className:"pb-4 sm:py-4 print:py-4 text-right align-top whitespace-nowrap",style:{color:"var(--public-ink-2)"},children:[e.jsx("span",{className:"mb-1 block sm:hidden print:hidden text-[11px]",children:"Gap"}),y===null?"N/A":y===0?m?"Leading":"Tied":`${y} pts`]})]},u)})})]})})]}),e.jsxs("details",{className:"mt-3 border-t print-hide",style:{borderColor:"var(--public-hairline)"},children:[e.jsxs("summary",{className:"min-h-11 cursor-pointer py-3 text-[13px] font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",style:{color:"var(--public-ink)"},children:["Compare all ",r.length," measured sites"]}),e.jsx("div",{className:"overflow-x-auto pb-3",children:p()})]}),e.jsx("div",{"data-testid":"pillar-scores-print",className:"hidden print:block mt-5",children:p(!0)}),e.jsx("p",{className:"mt-2 text-[12px] leading-relaxed",style:{color:"var(--public-ink-2)"},children:"Gap is your score minus the highest measured score. N/A means a pillar has not been measured."})]})}function Va(){const[t,a]=j.useState(!1);return j.useEffect(()=>{const s=()=>we.flushSync(()=>a(!0)),n=()=>we.flushSync(()=>a(!1));window.addEventListener("beforeprint",s),window.addEventListener("afterprint",n);const l=window.matchMedia?.("print"),i=r=>we.flushSync(()=>a(r.matches));return l?.matches&&a(!0),l?.addEventListener?.("change",i),()=>{window.removeEventListener("beforeprint",s),window.removeEventListener("afterprint",n),l?.removeEventListener?.("change",i)}},[]),t}const oi=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ci=t=>{const a=new Date(t);return Number.isNaN(a.getTime())?t.slice(0,10):`${a.getUTCDate()} ${oi[a.getUTCMonth()]} ${a.getUTCFullYear()}`},st=10,di={chatgpt:"openai.com",claude:"anthropic.com","meta-ai":"meta.ai",perplexity:"perplexity.ai","ai-overviews":"google.com",grok:"x.ai"},ui={good:"â",bad:"â",mixed:"â",none:"â"},pi={good:"var(--public-accent)",bad:"var(--public-danger)",mixed:"var(--public-accent)",none:"var(--public-ink-3)"};function Ka(){const t=J.engines;return t&&t.status==="ok"?{...t,corpus:{...t.corpus,note:t.corpus.status==="ready"?"Historical answer sample. This example does not refresh.":"Historical sample. AI answers were not collected for this snapshot; this sample does not refresh."},engines:t.engines.map(a=>["same-product","same-model"].includes(a.fidelity??"")?{...a,fidelity:"proxy",parity:{consumerModel:null,retrieval:"unknown",note:"The recorded provider API is an indicator. Consumer-app parity was not verified."}}:a)}:null}function Ft(t){return t.fidelity??"unknown"}const wt={"same-product":"Direct measurement","same-model":"API sample",proxy:"API sample",unverified:"Unavailable",unknown:"Unverified coverage"},Qa={"same-product":"measured on the named product","same-model":"consumer-app answers may differ from this API sample",proxy:"consumer-app answers may differ from this API sample",unverified:"no current measurement is available for this engine",unknown:"equivalence with the named consumer product has not been verified"},mi={"same-product":"grade","same-model":"status",proxy:"status",unverified:"status",unknown:"status"};function hi(t){return t.method==="memory"?"No live web search.":t.method==="unavailable"?"No current answer measurement.":"Answers sampled with web search."}function xi(t){const a=t.parity?.note?.trim();
3return a||(Ft(t)==="unknown"?"Equivalence with the consumer product has not been verified.":"Consumer-app results may differ from these measurements.")}function gi(t){const{status:a,crawlers:s,note:n}=t.reads,l=s.map(d=>d.ua);if(s.length===0)return{tone:"none",text:"No crawler published",detail:n??(t.method==="memory"?"an ungrounded model does not read the live site":"vendor publishes no crawler")};if(t.method==="memory")return{tone:"none",text:"No crawler",detail:"not applicable",title:n??"An ungrounded model does not read the live site."};if(t.method==="unavailable")return{tone:"none",text:"Not checked",detail:`${l.join(", ")} not fetched`,title:n};const i=s.filter(d=>d.allowed===!0),r=s.filter(d=>d.allowed===!1),o=s.map(d=>d.words).filter(d=>typeof d=="number"&&d>0),c=o.length?`${Math.min(...o).toLocaleString("en-US")} words received`:void 0;if(a==="allowed")return{tone:"good",text:"Allowed",detail:c??(l.length?`${l.join(", ")} allowed in robots.txt`:void 0),title:n};if(a==="blocked"){if(r.length)return{tone:"bad",text:"Blocked",detail:`${r.map(p=>p.ua).join(", ")} disallowed in robots.txt`,title:n};const d=s.filter(p=>p.fetchOutcome==="refused");return d.length?{tone:"bad",text:"Access refused",detail:`${d.map(p=>p.ua).join(", ")} returned an HTTP access refusal`,title:n}:{tone:"mixed",text:"Access unconfirmed",detail:"The stored fetch did not confirm page content.",title:n}}return s.some(d=>d.fetchOutcome==="unverified"||d.fetchOutcome==="empty")?{tone:"mixed",text:"Fetch unverified",detail:`${i.length===s.length?"robots.txt permits access; ":""}the request did not confirm page content.`,title:n}:a==="partial"?{tone:"mixed",text:`${i.length} of ${s.length} crawlers allowed`,detail:[i.length?`${i.map(d=>d.ua).join(", ")} allowed`:null,r.length?`${r.map(d=>d.ua).join(", ")} blocked`:null].filter(Boolean).join(" · ")||void 0,title:n}:{tone:"none",text:"Not checked",detail:`${l.join(", ")} not yet fetched`,title:n}}function ca(t,a,s){const n=a==="cites"?t.cites:t.recommends,l=a==="cites"?"cite you":"name you";if(t.method==="unavailable")return{tone:"none",text:"Not measured",title:n.note??"No first-party API to query."};if(t.method==="memory"&&a==="cites")return{tone:"none",text:"Memory only",detail:"cannot cite without search",title:n.note??"An ungrounded model has no sources to link."};if(n.share===null||n.n<=0)return{tone:"none",text:"Not measured",detail:s?void 0:"no answers yet",title:n.note};const i=Math.max(0,Math.min(100,n.share)),r=Math.round(i*n.n/100),o={tone:r>0?"good":"bad",text:`${r} of ${n.n} answers ${l} (${Math.round(i)}%)`,bar:n.n>=st?i:void 0,title:n.note};if(a==="recommends"){const c=t.recommends.firstPlace;typeof c=="number"&&(o.detail=`named before tracked peers in ${Math.round(Math.max(0,Math.min(100,c))*n.n/100)} of ${n.n}`)}return o}const fi={global:"global",us:"United States",uk:"United Kingdom",eu:"Europe",in:"India",apac:"Asia Pacific",latam:"Latin America",mena:"Middle East",ca:"Canada",au:"Australia",br:"Brazil",jp:"Japan",sea:"Southeast Asia",africa:"Africa"};function bi(t){const a=`${t.engines.length} engines`;if(t.corpus.status!=="ready")return`${a} · ${t.corpus.status==="pending"?"awaiting answers":"answers unavailable"}`;const s=`${t.corpus.questions} question${t.corpus.questions===1?"":"s"}`;return t.corpus.sampledAt?`${a} · ${s} · measured ${ci(t.corpus.sampledAt)}`:`${a} · ${s}`}function vi(t){if(!t.corpus.category)return null;const a=t.corpus.region&&t.corpus.region!=="global"?`${fi[t.corpus.region]??t.corpus.region} + global`:"global";return`Questions cover ${t.corpus.category} in ${a}.`}function Oe(t){return t.corpus.status==="pending"?t.corpus.note??"AI answer collection is scheduled. Citation and mention rates will appear here when dated answers are available.":t.corpus.status==="unavailable"?t.corpus.note??"AI answer measurements are currently unavailable. The website audit remains available.":null}const Ze=20;function yi({tone:t}){return e.jsx("span",{"aria-hidden":"true",className:"inline-block w-[14px] mt-[2px] text-[13px] leading-none text-center shrink-0",style:{color:pi[t]},children:ui[t]})}function ze({facts:t,mounted:a,footnote:s=!1}){const n=s&&!!t.title&&t.title!==t.detail&&t.title!==t.text;return e.jsxs("div",{className:"min-w-0",title:t.title,children:[e.jsxs("div",{"data-testid":"cell-line",className:"flex items-start gap-1.5 text-[12.5px] leading-snug",style:{color:t.tone
3==="none"?"var(--public-ink-2)":"var(--public-ink)"},children:[e.jsx(yi,{tone:t.tone}),e.jsx("span",{className:"tabular-nums",children:t.text})]}),t.detail&&e.jsx("div",{className:"mt-0.5 text-[12.5px] leading-snug",style:{color:"var(--public-ink-2)",paddingLeft:Ze},children:t.detail}),n&&e.jsx("div",{"data-testid":"cell-footnote",className:"mt-0.5 text-[12px] leading-snug",style:{color:"var(--public-ink-2)",paddingLeft:Ze},children:t.title}),t.bar!==void 0&&e.jsx("div",{"aria-hidden":"true",className:"mt-1.5 h-[4px] w-full max-w-[160px]",style:{marginLeft:Ze},children:e.jsx("div",{"data-testid":"share-bar",className:"h-[4px] rounded-full",style:{width:a?`${t.bar}%`:"0%",background:"var(--public-chart-mark)",transition:$e}})})]})}function wi({id:t,vendor:a}){const[s,n]=j.useState(!1),l=di[t];return s||!l?e.jsx("span",{"aria-hidden":"true",className:"inline-flex w-[18px] h-[18px] rounded-[calc(var(--public-radius-control)/2)] items-center justify-center text-[10px] font-bold shrink-0",style:{background:"var(--public-surface-2)",color:"var(--public-ink-2)"},children:a[0]?.toUpperCase()}):e.jsx("img",{src:`https://www.google.com/s2/favicons?sz=64&domain=${encodeURIComponent(l)}`,alt:"",width:18,height:18,loading:"lazy",onError:()=>n(!0),className:"rounded-[calc(var(--public-radius-control)/2)] shrink-0",style:{background:"var(--public-paper)"}})}function ji({fidelity:t,consumerModel:a}){const s=`${wt[t]}: ${Qa[t]}.${a?` The consumer surface runs ${a}.`:""}`;return e.jsx(It,{job:mi[t],size:"xs","data-testid":"fidelity-badge","data-fidelity":t,title:s,className:"align-[2px]",children:wt[t]})}function da({row:t}){const a=Ft(t);return e.jsxs("div",{className:"flex items-start gap-2.5 min-w-0",children:[e.jsx("span",{className:"mt-[1px]",children:e.jsx(wi,{id:t.id,vendor:t.vendor})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"text-[13.5px] font-semibold leading-tight",style:{color:"var(--public-ink)"},children:[t.label," ",e.jsx(ji,{fidelity:a,consumerModel:t.parity?.consumerModel})]}),e.jsx("div",{className:"mt-0.5 text-[12.5px] leading-snug",style:{color:"var(--public-ink-2)"},children:hi(t)}),e.jsx("div",{"data-testid":"engine-parity",className:"mt-0.5 text-[12.5px] leading-snug",style:{color:"var(--public-ink-2)"},children:xi(t)})]})]})}function ki(){return e.jsxs("div",{"data-testid":"engine-matrix-loading","aria-busy":"true",className:"flex flex-col gap-3",children:[e.jsx("div",{className:"h-[10px] w-[120px] rounded-full animate-pulse motion-reduce:animate-none",style:{background:"var(--public-hairline)"}}),e.jsx("div",{className:"h-[22px] w-[60%] max-w-[420px] rounded-[calc(var(--public-radius-control)/2)] animate-pulse motion-reduce:animate-none",style:{background:"var(--public-hairline)"}}),e.jsx("div",{className:"mt-3 flex flex-col divide-y",style:{borderColor:"var(--public-hairline)"},children:[0,1,2,3].map(t=>e.jsxs("div",{className:"grid gap-4 py-3.5 grid-cols-1 md:grid-cols-[minmax(0,2fr)_repeat(3,minmax(0,1fr))]",style:{borderColor:"var(--public-hairline)"},children:[e.jsx("div",{className:"h-[14px] w-[70%] rounded-full animate-pulse motion-reduce:animate-none",style:{background:"var(--public-hairline)"}}),e.jsx("div",{className:"h-[14px] w-[60%] rounded-full animate-pulse motion-reduce:animate-none hidden md:block",style:{background:"var(--public-hairline)"}}),e.jsx("div",{className:"h-[14px] w-[60%] rounded-full animate-pulse motion-reduce:animate-none hidden md:block",style:{background:"var(--public-hairline)"}}),e.jsx("div",{className:"h-[14px] w-[60%] rounded-full animate-pulse motion-reduce:animate-none hidden md:block",style:{background:"var(--public-hairline)"}})]},t))})]})}const Ni=[{key:"reads",label:"Crawler access",hint:"crawler allowed and receives the page"},{key:"cites",label:"Citations",hint:"answers that link to your domain"},{key:"recommends",label:"Brand mentions",hint:"answers that name your brand"}];function ua({token:t,sample:a,initial:s}){const[n,l]=j.useState(()=>s??(a?Ka():void 0)),i=s!==void 0?s:n,[r,o]=j.useState(!1),c=Ue(),d=Va();if(j.useEffect(()=>{if(s||a||!t)return;let m=!0;return(async()=>{try{const w=await V(`/api/aeo/engines/${encodeURIComponent(t)}`);if(!w.ok)throw new Error(String(w.status));const g=await w.json();if(!m)return;g?.status==="ok"?l(g):o(!0)}catch{m&&o(!0)}})(),()=>{m=!1}},[t,a,s]),r||!a&&!s&&!t)return null;const p=i?.engines.filter(m=>m.cites.n>0).length??0,u=(m,w=null)=>e.jsx(I,{eyebrow:"Answer engines",title:"Crawler access and AI answer visibility",lede:`Review crawler access alongside citations and brand mentions in sampled AI answers.${w?` ${w}`:""}`,summary:i?.corpus.status==="ready"&&p>0?`${p} ${p===1?"engine has":"engines have"} sampled citation evidence across ${i.corpus.questions} ${i.corpus.questions===1?"question":"questions"}. Resolve access restrictions first, then review the questions where your business is missing. Consumer-app answers may differ from these API samples.`:"Crawler access can be assessed from the website audit, but there is no current answer sample to establish citation or brand-mention rates. Resolve any access restrictions now and review answer evidence when a dated sample becomes available.",meta:m});if(i===void 0)return e.jsxs("div",{"data-testid":"engine-matrix",className:"report-engine-matrix",children:[u("loading saved evidenceâ¦"),e.jsx(ki,{})]});if(i===null)return e.jsxs("div",{"data-testid":"engine-matrix",className:"report-engine-matrix",children:[u(a?"historical sample":"awaiting answers"),e.jsx("p",{"data-testid":"engine-matrix-note",className:"text-[13.5px] leading-relaxed max-w-[68ch]",style:{color:"var(--public-ink-2)"},children:a?"Historical sample. AI answers were not collected for this snapshot; this sample does not refresh.":Oe({corpus:{status:"pending",vertical:"",questions:0,sampledAt:null}})}),e.jsx(pa,{memory:!1,smallSample:!1})]});const h=i.corpus.status!=="ready",x=Oe(i),f=i.engines.map(m=>({row:m,reads:gi(m),cites:ca(m,"cites",h),recommends:ca(m,"recommends",h)})),b=i.engines.some(m=>m.method==="memory"),y=!h&&i.engines.some(m=>m.cites.share!==null&&m.cites.n>0&&m.cites.n<st||m.recommends.share!==null&&m.recommends.n>0&&m.recommends.n<st);return e.jsxs("div",{"data-testid":"engine-matrix","data-corpus":i.corpus.status,className:"report-engine-matrix",children:[u(bi(i),vi(i)),x&&e.jsx("p",{"data-testid":"engine-matrix-note",className:"mb-4 text-[13.5px] leading-relaxed max-w-[68ch]",style:{color:"var(--public-ink-2)"},children:x}),e.jsxs("div",{"data-ui":"ink-band",className:`${d?"":"dark "}rounded-[var(--public-radius-surface)] bg-[var(--public-ground)] text-[var(--public-ink)] p-3 sm:p-5 print:rounded-none print:p-0`,children:[e.jsx("div",{"data-testid":"engine-table",className:"hidden md:block print:block overflow-x-auto rounded-[var(--public-radius-control)]",style:{border:"1px solid var(--public-hairline)"},children:e.jsxs("table",{className:"w-full text-left border-collapse table-fixed",style:{minWidth:720},children:[e.jsxs("caption",{className:"sr-only",children:["Answer engines for ",i.domain,": crawler access, citations and mentions of ",i.brand,"."]}),e.jsx("thead",{children:e.jsxs("tr",{style:{background:"var(--public-paper)"},children:[e.jsx("th",{scope:"col",className:"px-4 py-2.5 text-[12.5px] font-medium",style:{color:"var(--public-ink-2)",width:"34%"},children:"Engine"}),Ni.map(m=>e.jsx("th",{scope:"col",className:"px-4 py-2.5 text-[12.5px] font-medium",style:{color:"var(--public-ink-2)",width:"22%",paddingLeft:`calc(1rem + ${Ze}px)`},title:m.hint,children:m.label},m.key))]})}),e.jsx("tbody",{children:f.map(({row:m,reads:w,cites:g,recommends:C})=>e.jsxs("tr",{"data-testid":"engine-row","data-engine":m.id,style:{borderTop:"1px solid var(--public-hairline)"},children:[e.jsx("th",{scope:"row",className:"px-4 py-3.5 align-top font-normal",children:e.jsx(da,{row:m})}),e.jsx("td",{className:"px-4 py-3.5 align-top",children:e.jsx(ze,{facts:w,mounted:c})}),e.jsx("td",{className:"px-4 py-3.5 align-top",children:e.jsx(ze,{facts:g,mounted:c})}),e.jsx("td",{className:"px-4 py-3.5 align-top",children:e.jsx(ze,{facts:C,mounted:c})})]},m.id))})]})}),e.jsx("div",{"data-testid":"engine-cards",className:"md:hidden print:hidden flex flex-col gap-3",children:f.map(({row:m,reads:w,cites:g,recommends:C})=>e.jsxs("article",{"data-testid":"engine-card","data-engine":m.id,"aria-label":m.label,className:"rounded-[var(--public-radius-control)] px-4 py-3.5",style:{border:"1px solid var(--public-hairline)",background:"var(--public-ground)"},children:[e.jsx(da,{row:m}),e.jsx("dl",{className:"mt-3 grid gap-y-2.5",style:{gridTemplateColumns:"92px minmax(0,1fr)"},children:[["Access",w],["Citations",g],["Mentions",C]].map(([$,T])=>e.jsxs("div",{className:"contents",children:[e.jsx("dt",{className:"text-[12.5px] pt-[1px]",style:{color:"var(--public-ink-2)"},children:$}),e.jsx("dd",{className:"m-0 min-w-0",children:e.jsx(ze,{facts:T,mounted:c,footnote:!0})})]},$))})]},m.id))})]}),e.jsx(pa,{memory:b,smallSample:y,legend:Ai(i.engines)})]})}const $i=["same-product","same-model","proxy","unverified","unknown"];function Ai(t){const a=new Set(t.map(Ft));return $i.filter(s=>a.has(s)).map(s=>`${wt[s]} â ${Qa[s]}.`).join(" ")}function pa({memory:t,smallSample:a,legend:s}){return e.jsxs("p",{"data-testid":"engine-matrix-footer",className:"mt-4 text-[12.5px] leading-relaxed max-w-[80ch]",style:{color:"var(--public-ink-2)"},children:["API samples provide an indication of visibility. Results can vary by engine, question, location and date.",t?" Samples without live web search do not measure current website citations.":"",a?` Small sample: fewer than ${st} answers for an engine, so treat the percentages as preliminary.`:""]})}const ma=12e4,Si=15e3,ha=[2e3,4e3,8e3,15e3];function Ci(t,a){if(t.engines.length>0&&t.engines.every(n=>n.coverage))return t.engines.some(n=>{const l=n.coverage;return l.status==="complete"||l.status==="failed"||l.status==="unavailable"?!1:l.status==="pending"||l.remaining>l.failed});if(t.corpus.status==="pending")return!0;
3if(t.corpus.status!=="ready")return!1;const s=t.engines.filter(n=>n.method==="grounded");return s.some(n=>!(n.cites.n>0))?!0:t.voice?.questions?.length?t.voice.questions.some(n=>s.some(l=>{const i=n.engines?.[l.id];return i!=="present"&&i!=="absent"})):a}function Ti(t){if(!t||typeof t!="object")return!1;const a=t;return a.status==="ok"&&["ready","pending","unavailable"].includes(a.corpus?.status)&&Array.isArray(a.engines)&&a.engines.every(s=>s&&typeof s=="object"&&s.cites&&typeof s.cites.n=="number"&&s.recommends&&typeof s.recommends.n=="number")}function Mi(t){const[a,s]=j.useState({data:void 0,phase:"idle"}),[n,l]=j.useState(0),i=j.useCallback(()=>l(o=>o+1),[]);j.useEffect(()=>{if(!t)return;let o=!1,c=!1,d=0,p=!1,u,h,x=null;const f=Date.now()+ma,b=()=>document.visibilityState==="hidden",y=(E,N)=>{o||s(k=>({token:t,phase:E,data:N===void 0?k.token===t?k.data:void 0:N}))},m=()=>{window.clearTimeout(u),u=void 0},w=()=>{c||o||(c=!0,m(),window.clearTimeout(h),x?.abort(),y("timed-out"))},g=window.setTimeout(w,ma),C=E=>{c=!0,m(),window.clearTimeout(g),y(E)},$=async()=>{if(o||c||x)return;if(m(),Date.now()>=f){w();return}if(b()){y("paused");return}const E=new AbortController;x=E,h=window.setTimeout(()=>E.abort(),Si),y("checking");try{const N=await fetch(`/api/aeo/engines/${encodeURIComponent(t)}`,{signal:E.signal});if(!N.ok)throw new Error("Evidence unavailable");const k=await N.json();if(o||c)return;if(E.signal.aborted)throw new Error("Evidence request timed out");if(!Ti(k))throw new Error("Invalid evidence");if(y("checking",k),Ci(k,p))p=!0,b()?y("paused"):(y("waiting"),u=window.setTimeout($,ha[Math.min(d++,ha.length-1)]));else{const D=k.engines.some(P=>P.coverage&&P.coverage.status!=="complete");C(k.corpus.status==="unavailable"?"unavailable":D?"partial":"ready")}}catch{!o&&!c&&(s(N=>({token:t,phase:"error",data:N.token===t?N.data??null:null})),c=!0,window.clearTimeout(g))}finally{window.clearTimeout(h),x=null}},T=()=>{if(!(o||c)){if(Date.now()>=f){w();return}b()?(m(),x||y("paused")):x||$()}};return document.addEventListener("visibilitychange",T),$(),()=>{o=!0,m(),window.clearTimeout(g),window.clearTimeout(h),x?.abort(),document.removeEventListener("visibilitychange",T)}},[t,n]);const r=t&&a.token===t?a:{data:void 0,phase:t?"checking":"idle"};return{...r,retry:i,loading:r.phase==="checking"}}function Ei(t,a){switch(t){case"checking":return"Checking stored AI answer evidence. Your website audit keeps its original date.";case"waiting":return a?"Available answers are shown below. AI answer collection follows the scheduled refresh; this page checks for additional saved answers.":"AI answer collection is scheduled. Your website audit is ready; this page checks for saved answers while it is open.";case"paused":return"Automatic checks are paused while this tab is in the background.";case"timed-out":return a?"Available answers are shown below. Automatic checks have paused; AI answer collection follows the scheduled refresh.":"AI answer collection is scheduled. Automatic checks have paused; return after the scheduled refresh to review saved results.";case"error":return"Could not check AI evidence. Your website report is still available. Try again.";case"unavailable":return"AI answer evidence is currently unavailable. Your website audit is still available.";case"partial":return"Available answers are shown. Some models could not complete their samples; see each modelâs coverage for details.";default:return"Latest available AI answer evidence is shown. The website audit keeps its original date."}}const Ri=Lt,Pi="var(--public-chart-mark)",ie="var(--public-hairline)",je={present:"named",absent:"not named",unmeasured:"not measured"};function Ii(t,a){const s=qs(t,a);return s?[s.lower,s.upper]:null}const ke=t=>`${Math.round(Math.max(0,Math.min(100,t)))}%`;function Di(t){const a=t.voice;if(!a)return[];const s=[],n=Ii(a.mentioned,a.answers);s.push(a.overallShare===null||!n?{label:"Share of voice",value:"Not measured",detail:"no answers sampled yet",tone:"neutral"}:{label:"Share of voice",value:ke(a.overallShare),detail:`${a.mentioned} of ${a.answers} answers name ${t.brand} · 95% range ${Math.round(n[0]*100)}â${Math.round(n[1]*100)}
3%`,tone:a.mentioned>0?"neutral":"bad"}),s.push(a.firstMentionShare===null?{label:"First mention",value:"Not measured",detail:a.competitors?"no answers sampled yet":"measured once rivals are detected in the answers",tone:"neutral"}:{label:"First mention",value:ke(a.firstMentionShare),detail:`named before tracked peers in ${a.firstMentions} of ${a.answers} answers · compared with ${a.competitors} detected peer${a.competitors===1?"":"s"}`,tone:a.firstMentions>0?"neutral":"bad"});const l=new Set(t.engines.filter(c=>c.method==="grounded").map(c=>c.id)),i=a.byEngine.filter(c=>l.has(c.id)),r=i.reduce((c,d)=>c+d.asked,0),o=i.reduce((c,d)=>c+d.cited,0);return s.push(r===0?{label:"Citation rate",value:"Not measured",detail:"no answers with web search yet",tone:"neutral"}:{label:"Citation rate",value:ke(o/r*100),detail:`${o} of ${r} answers with web search link to ${t.domain}`,tone:o>0?"neutral":"bad"}),s}function Li({facts:t}){const a=s=>s==="bad"?"var(--public-danger)":"var(--public-ink)";return e.jsx("dl",{"data-testid":"voice-facts",className:"grid gap-px rounded-[var(--public-radius-surface)] overflow-hidden grid-cols-1 sm:grid-cols-3 print:grid-cols-3 m-0",style:{background:ie,border:`1px solid ${ie}`},children:t.map(s=>e.jsxs("div",{"data-testid":"voice-fact",className:"px-4 py-3.5 min-h-[92px] min-w-0 flex flex-col print:min-h-0 print:py-1.5 print:px-3 print:break-inside-avoid",style:{background:"var(--public-ground)"},children:[e.jsx("dt",{className:"text-[12.5px] leading-snug",style:{color:"var(--public-ink-2)"},children:s.label}),e.jsxs("dd",{className:"m-0 mt-1.5 min-w-0 print:mt-1",children:[e.jsx("div",{className:"text-[20px] font-semibold tracking-[-0.02em] leading-tight tabular-nums print:text-[18px]",style:{color:a(s.tone),overflowWrap:"anywhere"},children:s.value}),e.jsx("div",{className:"mt-0.5 text-[12.5px] leading-snug print:text-[11.5px]",style:{color:"var(--public-ink-2)",overflowWrap:"anywhere"},children:s.detail})]})]},s.label))})}function Xa({share:t,color:a,mounted:s}){return e.jsx("div",{"aria-hidden":"true",className:"h-[4px] w-full rounded-full overflow-hidden",style:{background:ie},children:t!==null&&e.jsx("div",{"data-testid":"voice-bar",className:"h-[4px] rounded-full",style:{width:s?`${Math.max(0,Math.min(100,t))}%`:"0%",background:a,transition:$e}})})}function _i({v:t,competitors:a,mounted:s}){return t.absent===0?e.jsx("p",{"data-testid":"voice-cited-empty",className:"text-[13.5px] leading-relaxed",style:{color:"var(--public-ink-2)"},children:"Every sampled answer names you; nobody is cited in your place."}):t.citedInstead.length?e.jsx("ol",{"data-testid":"voice-cited-instead",className:"m-0 p-0 list-none flex flex-col",children:t.citedInstead.map((n,l)=>{const i=a.find(o=>o.domain===n.domain),r=i?.color||Ri;return e.jsxs("li",{"data-testid":"voice-cited-row","data-in-set":i?"true":void 0,title:`${n.domain}: cited in ${n.answers} of the ${t.absent} answers that do not name you${n.share!==null?` (${ke(n.share)})`:""}${i?" · selected competitor":""}`,className:"grid items-center gap-x-3 py-2.5 print:py-1 print:break-inside-avoid",style:{gridTemplateColumns:"18px 22px minmax(0,1fr) auto",borderBottom:`1px solid ${ie}`},children:[e.jsx("span",{className:"font-mono text-[11px] tabular-nums",style:{color:"var(--public-ink-3)"},children:String(l+1).padStart(2,"0")}),e.jsx(Ot,{domain:n.domain,color:r,ink:i?.ink||"var(--public-ground)",size:22}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-[13.5px] font-medium leading-tight",style:{color:"var(--public-ink)",overflowWrap:"anywhere"},children:n.domain}),e.jsx("div",{className:"mt-1.5 max-w-[240px] print:mt-1",children:e.jsx(Xa,{share:n.share,color:r,mounted:s})})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("div",{className:"text-[12.5px] tabular-nums whitespace-nowrap",style:{color:"var(--public-ink-2)"},children:[n.answers," of ",t.absent,n.share!==null?` (${ke(n.share)})`:""]}),i&&e.jsx(ce,{testId:"voice-in-set",label:"Selected peer",fg:"var(--public-ink-2)",edge:r,className:"mt-1"})]})]},n.domain)})}):e.jsxs("p",{"data-testid":"voice-cited-empty",className:"text-[13.5px] leading-relaxed",style:{color:"var(--public-ink-2)"},children:["The ",t.absent," answer",t.absent===1?"":"s"," you are missing from cite no domains."]})}function Oi({v:t,mounted:a}){return e.jsx("ol",{"data-testid":"voice-regions",className:"m-0 p-0 list-none flex flex-col",children:t.regi
3ons.map(s=>e.jsxs("li",{"data-testid":"voice-region-row","data-region":s.region,className:"grid items-center gap-x-3 py-2.5 print:py-1 print:break-inside-avoid",style:{gridTemplateColumns:"minmax(96px, 30%) minmax(0,1fr) auto",borderBottom:`1px solid ${ie}`},children:[e.jsx("span",{className:"text-[13px] font-medium leading-tight",style:{color:s.share===null?"var(--public-ink-2)":"var(--public-ink)"},children:s.label}),e.jsx(Xa,{share:s.share,color:Pi,mounted:a}),e.jsx("span",{className:"text-[12.5px] tabular-nums text-right whitespace-nowrap",style:{color:"var(--public-ink-2)"},children:s.share===null?"Not measured":`${s.mentioned} of ${s.asked} (${ke(s.share)})`})]},s.region))})}function Wt({state:t}){return e.jsxs("svg",{"aria-hidden":"true",width:"12",height:"12",viewBox:"0 0 12 12",className:"inline-block align-middle",children:[t==="present"&&e.jsx("circle",{cx:"6",cy:"6",r:"5",fill:"var(--public-assurance)"}),t==="absent"&&e.jsx("circle",{cx:"6",cy:"6",r:"4.25",fill:"none",stroke:"var(--public-danger)",strokeWidth:"1.5"}),t==="unmeasured"&&e.jsx("line",{x1:"2.5",y1:"6",x2:"9.5",y2:"6",stroke:"var(--public-ink-2)",strokeWidth:"1.5",strokeLinecap:"round"})]})}function Fi(){return e.jsx("span",{"data-testid":"voice-legend","aria-hidden":"true",className:"inline-flex flex-wrap gap-x-3 gap-y-1 text-[11.5px]",style:{color:"var(--public-ink-2)"},children:["present","absent","unmeasured"].map(t=>e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(Wt,{state:t}),je[t]]},t))})}function Wi(t){const a=new Map(t.regions.map(l=>[l.region,l.label])),s=[],n=new Map;for(const l of t.questions)n.has(l.region)||(n.set(l.region,[]),s.push(l.region)),n.get(l.region).push(l);return s.map(l=>({region:l,label:a.get(l)??l,questions:n.get(l)}))}const Ja=["present","absent","unmeasured"];function Ui({on:t,onToggle:a,hiddenRows:s}){return e.jsxs("div",{"data-testid":"voice-filter",className:"print-hide flex flex-wrap items-center gap-x-2 gap-y-1 mb-2",children:[e.jsx("span",{className:"text-[11.5px]",style:{color:"var(--public-ink-3)"},children:"Show"}),Ja.map(n=>{const l=t.has(n),i=l&&t.size===1;return e.jsxs("button",{type:"button","data-testid":"voice-filter-toggle","data-state":n,"data-selected":l?"true":"false","aria-pressed":l,disabled:i,onClick:()=>a(n),title:i?"The last state stays on":l?`Hide ${je[n]}`:`Show ${je[n]}`,className:"inline-flex items-center gap-1.5 rounded-[var(--public-radius-control)] min-h-9 px-2.5 py-1 text-[12px] outline-none transition-colors duration-color ease-public motion-reduce:transition-none focus-visible:[box-shadow:var(--public-focus-ring)] disabled:cursor-default",style:{border:`1px solid ${l?"var(--public-hairline-strong)":ie}`,color:l?"var(--public-ink)":"var(--public-ink-3)",background:l?"var(--public-paper)":"transparent"},children:[e.jsx(Wt,{state:n}),je[n]]},n)}),e.jsx("span",{"data-testid":"voice-filter-count",role:"status",className:"text-[11.5px] tabular-nums",style:{color:"var(--public-ink-3)"},children:s===0?"all questions":`${s} question${s===1?"":"s"} hidden`})]})}function Bi({v:t,engines:a,brand:s}){const n=Wi(t),l=n.length>1,[i,r]=j.useState(()=>new Set(Ja)),[o,c]=j.useState([0,0]),d=j.useRef(new Map),[p,u]=j.useState(null),h=(N,k)=>N.engines[k.id]??"unmeasured",x=N=>a.some(k=>i.has(h(N,k))),f=t.questions.filter(N=>!x(N)).length,b=N=>r(k=>{const D=new Set(k);if(D.has(N)){if(D.size===1)return k;D.delete(N)}else D.add(N);return D}),y=n.flatMap(N=>N.questions),m=new Map(y.map((N,k)=>[N,k])),w=y.flatMap((N,k)=>x(N)?[k]:[]),g=Math.max(0,a.length-1),C=w.includes(o[0])?o[0]:w[0]??0,$=Math.min(Math.max(0,o[1]),g),T=(N,k)=>{c([N,k]),d.current.get(`${N}:${k}`)?.focus()},E=N=>{const k=w.indexOf(C);if(k===-1||!w.length)return;const D=P=>w[Math.max(0,Math.min(w.length-1,P))];switch(N.key){case"ArrowRight":T(C,Math.min(g,$+1));break;case"ArrowLeft":T(C,Math.max(0,$-1));break;case"ArrowDown":T(D(k+1),$);break;case"ArrowUp":T(D(k-1),$);break;case"Home":T(N.ctrlKey?w[0]:C,0);break;case"End":T(N.ctrlKey?w[w.length-1]:C,g);break;default:return}N.preventDefault()};return e.jsxs(e.Fragment,{children:[e.jsx(Ui,{on:i,onToggle:b,hiddenRows:f}),e.jsx("div",{"data-testid":"voice-grid",className:"relative overflow-x-auto print:overflow-visible rounded-[var(--public-radius-control)]",style:{border:`1px solid ${ie}`},children:e.jsxs("table",{className:"w-full border-collapse text-left print:!min-w-0 print:table-fixed",style:{minWidth:260+a.length*76},children:[e.jsxs("caption",{className:"sr-only",children:["Buyer questions by engine: whether each engineâs stored answer names ",s,", grouped by region. The grid is one tab stop; use the arrow keys to move between cells."]}),e.jsx("thead",{children:e.jsxs("tr",{style:{background:"var(--public-paper)"},children:[e.jsx("th",{scope:"col",className:"px-3 py-2 text-[12.5px] font-medium print:py-1 print:text-[11px]",style:{color:"var(--public-ink-2)"},children:"Buyer question"}),a.map(N=>e.jsx("th",{scope:"col",className:"px-1 py-2 text-[12.5px] font-medium text-center leading-tight whitespace-normal break-words w-[76px] print:whitespace-normal print:w-[48px] print:py-1 print:text-[10.5px]",style:{color:"var(--public-ink-2)"},title:N.label,children:N.label},N.id))]})}),n.map(N=>e.jsxs("tbody",{"data-testid":"voice-group","data-region":N.region,children:[l&&e.jsx("tr",{style:{borderTop:`1px solid ${ie}`,background:"var(--public-paper)"},children:e.jsx("th",{scope:"colgroup",colSpan:a.length+1,className:"px-3 py-1 text-left font-normal print:py-0.5",children:e.jsx(lt,{children:N.label})})}),N.questions.map(k=>{const D=x(k);return e.jsxs("tr",{"data-testid":"voice-row","data-region":k.region,"data-visible":D?"true":"false",className:D?"":"hidden print:!table-row",style:{borderTop:`1px solid ${ie}`},children:[e.jsxs("th",{scope:"row",className:"px-3 py-2 align-middle font-normal text-[12.5px] leading-snug print:py-0.5 print:text-[11px] print:leading-[1.3]",style:{color:"var(--public-ink)"},children:[k.text,!l&&e.jsxs("span",{className:"sr-only",children:[" (",N.label,")"]})]}),a.map((P,q)=>{const H=h(k,P),K=!i.has(H),z=`${k.text} · ${P.label} · ${je[H]}`,v=m.get(k),M=v===C&&q===$;return e.jsxs("td",{"data-testid":"voice-cell","data-state":H,"data-dim":K?"true":"false",className:`px-1 py-2 text-center align-middle print:py-0.5 print:!opacity-100 ${K?"opacity-40":""}`,children:[e.jsx("span",{tabIndex:M?0:-1,title:z,"data-testid":"voice-cell-target",ref:L=>{L?d.current.set(`${v}:${q}`,L):d.current.delete(`${v}:${q}`)},onPointerEnter:()=>u(z),onPointerLeave:()=>u(null),onFocus:()=>{u(z),c([v,q])},onBlur:()=>u(null),onKeyDown:E,className:"inline-flex h-[24px] w-[24px] items-center justify-center rounded-full outline-none focus-visible:[box-shadow:var(--public-focus-ring)] hover:bg-[var(--public-paper)] print:!inline print:!h-auto print:!w-auto print:!rounded-none",children:e.jsx(Wt,{state:H})}),e.jsxs("span",{className:"sr-only",children:[P.label,": ",je[H]]})]},P.id)})]},`${k.region}:${k.text}`)})]},N.region))]})}),e.jsx("p",{"data-testid":"voice-cell-readout",role:"status","aria-live":"polite",className:"print-hide mt-2 min-h-[18px] text-[12.5px] leading-[18px]",style:{color:"var(--public-ink-2)"},children:p??""})]})}function qi(){return e.jsxs("div",{"data-testid":"voice-loading","aria-busy":"true",className:"flex flex-col gap-3",children:[e.jsx("div",{className:"grid gap-3 grid-cols-1 sm:grid-cols-3",children:[0,1,2].map(t=>e.jsx("div",{className:"h-[64px] rounded-[var(--public-radius-control)] animate-pulse motion-reduce:animate-none",style:{background:"var(--public-hairline)"}},t))}),e.jsx("div",{className:"mt-3 flex flex-col divide-y",style:{borderColor:"var(--public-hairline)"},children:[0,1,2,3].map(t=>e.jsxs("div",{className:"grid gap-4 py-3.5 grid-cols-[minmax(0,2fr)_minmax(0,1fr)]",style:{borderColor:"var(--public-hairline)"},children:[e.jsx("div",{className:"h-[14px] w-[70%] rounded-full animate-pulse motion-reduce:animate-none",style:{background:"var(--public-hairline)"}}),e.jsx("div",{className:"h-[14px] w-[60%] rounded-full animate-pulse motion-reduce:animate-none",style:{background:"var(--public-hairline)"}})]},t))})]})}function zi({engines:t,competitors:a=[]}){const s=Ue(),n=t?.engines.filter(d=>d.measurementLayer==="native-search"||!d.measurementLayer&&d.method!=="memory")??[],l=d=>e.jsx(I,{eyebrow:"Answer metrics",title:"How often the engines name you",lede:"Mention rate measures the share of sampled search answers that name your business. First mention records whether it is named before tracked peers.",summary:t?.corpus.status==="ready"&&t.voice&&t.voice.answers>0?`Your brand appears in ${t.voice.mentioned} of ${t.voice.answers} sampled answers. Inspect the questions where it is absent and the sources cited there to identify content gaps worth reviewing. These percentages describe the sampled answers, not the entire market.`:"Brand visibility has not yet been measured in a current answer sample. The readiness grade alone cannot establish whether engines mention your brand; use this section once dated answers are available to identify gaps in the questions buyers ask.",meta:d});if(t===void 0)return e.jsxs("div",{"data-testid":"share-of-voice","data-state":"loading","aria-busy":"true",children:[l("measuringâ¦"),e.jsx(qi,{})]});const i=t?.voice,r=!!t&&t.corpus.status==="ready"&&!!i&&i.answers>0;
3if(!t||!r){const d=t?Oe(t)??(i?"No current answers are available for your category yet.":"Share of voice will appear when current sampled answers are available."):Oe({corpus:{status:"pending",vertical:"",questions:0,sampledAt:null}});return e.jsxs("div",{"data-testid":"share-of-voice","data-state":"pending",children:[l(t&&t.corpus.status!=="ready"?t.corpus.status==="pending"?"awaiting answers":"answers unavailable":"not yet measured"),e.jsx("p",{"data-testid":"voice-note",className:"text-[13.5px] leading-relaxed max-w-[68ch]",style:{color:"var(--public-ink-2)"},children:d})]})}const o=i,c=Di(t);return e.jsxs("div",{"data-testid":"share-of-voice","data-state":"ready",children:[e.jsx("div",{className:"print:-mb-2",children:l(`${o.answers} answer${o.answers===1?"":"s"} · ${o.questions.length} buyer question${o.questions.length===1?"":"s"}`)}),e.jsx(Li,{facts:c}),e.jsxs("div",{"data-testid":"voice-card",className:"mt-8 grid gap-8 lg:grid-cols-2 rounded-[var(--public-radius-surface)] border border-[var(--public-hairline)] bg-[var(--public-ground)] p-5 sm:p-6 print:grid-cols-2 print:mt-4 print:gap-6 print:rounded-none print:border-0 print:p-0",children:[e.jsxs("div",{className:"min-w-0 print:break-inside-avoid",children:[e.jsx("div",{className:"print:-mb-3",children:e.jsx(I,{as:"h3",title:"Websites cited when your brand is absent"})}),e.jsx(_i,{v:o,competitors:a,mounted:s})]}),e.jsxs("div",{className:"min-w-0 print:break-inside-avoid",children:[e.jsx("div",{className:"print:-mb-3",children:e.jsx(I,{as:"h3",title:"Share by region"})}),e.jsx(Oi,{v:o,mounted:s})]})]}),e.jsxs("div",{className:"mt-8 print:mt-4",children:[e.jsx("div",{className:"print:-mb-3",children:e.jsx(I,{as:"h3",title:"Coverage by buyer question",meta:e.jsxs("span",{className:"flex flex-wrap items-center justify-end gap-x-4 gap-y-1",children:[e.jsx(Fi,{}),e.jsxs("span",{children:[o.questions.length," question",o.questions.length===1?"":"s"," à ",n.length," search engines"]})]})})}),e.jsx(Bi,{v:o,engines:n,brand:t.brand})]}),e.jsx("p",{"data-testid":"voice-footer",className:"mt-4 text-[12.5px] leading-relaxed max-w-[80ch] print:mt-3 print:text-[11.5px]",style:{color:"var(--public-ink-2)"},children:"One stored answer per question and engine. The range beside the mention rate indicates uncertainty in this sample. Model-memory comparisons appear separately."})]})}function jt(t,a){const s=t.observations?.[a.id];if(s&&["ranked","mentioned","cited","absent","unmeasured"].includes(s.state)){const l=s.state==="ranked"&&Number.isSafeInteger(s.position)&&s.position>0?s.position:null,i=s.state==="ranked"&&l===null?"mentioned":s.state,r={ranked:[`#${l}`,"Position in the sampled recommendation list."],mentioned:["Mentioned · unranked","Your business is named without a recorded recommendation position."],cited:["Cited only","The answer links to your site without naming your business."],absent:["Not mentioned or cited","An answer was recorded. It neither names your business nor cites your site."],unmeasured:["Not measured","No answer observation is available for this question and engine."]};return{state:i,label:r[i][0],detail:r[i][1],position:l,sampledAt:i!=="unmeasured"&&typeof s.sampledAt=="string"?s.sampledAt:null,evidence:i!=="unmeasured"&&typeof s.evidence=="string"?s.evidence:null,answerPreview:i!=="unmeasured"&&typeof s.answerPreview=="string"?s.answerPreview:void 0}}const n=t.engines?.[a.id];return n==="present"?{state:"mentioned",label:"Mentioned",detail:"Position and answer excerpt were not recorded in this older snapshot.",position:null,sampledAt:null,evidence:null}:n==="absent"?{state:"not-named",label:"Not named",detail:"Citation and position details were not recorded in this older snapshot.",position:null,sampledAt:null,evidence:null}:{state:"unmeasured",label:"Not measured",detail:"No answer observation is available for this question and engine.",position:null,sampledAt:null,evidence:null}}function Hi(t){if(!t)return null;const a=new Date(t);return Number.isFinite(a.getTime())?{iso:a.toISOString(),label:`${Q(t)} · ${String(a.getUTCHours()).padStart(2,"0")}
3:${String(a.getUTCMinutes()).padStart(2,"0")} UTC`}:null}function Yi({question:t,engine:a}){const s=jt(t,a),n=["ranked","mentioned","cited"].includes(s.state),l=s.state==="absent"||s.state==="not-named",i=n?"var(--public-chart-ink)":l?"var(--public-chart-compare-ink)":"var(--public-ink-2)",r=n?"var(--public-chart-wash)":l?"color-mix(in srgb, var(--public-chart-compare) 8%, var(--public-ground))":"var(--public-paper)",o=Hi(s.sampledAt),c=Zt(s.evidence),d=c?null:Zt(s.answerPreview);return e.jsxs("li",{"data-testid":"search-presence-result","data-state":s.state,className:"grid grid-cols-1 gap-3 py-4 sm:grid-cols-[minmax(0,170px)_minmax(0,1fr)] sm:gap-6 print:grid-cols-[150px_minmax(0,1fr)] print:gap-4 print:py-2 print:break-inside-avoid",style:{borderTop:"1px solid var(--public-hairline)"},children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 sm:block print:block min-w-0",children:[e.jsx("div",{className:"text-[13.5px] font-semibold leading-snug break-words",style:{color:"var(--public-ink)"},children:a.label}),e.jsx("div",{className:"shrink-0 sm:mt-2 print:mt-1 inline-flex max-w-full flex-col items-start rounded-lg px-2.5 py-1.5",style:{background:r,color:i},children:s.position!==null?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-[10.5px] font-medium leading-snug",children:"Observed position"}),e.jsx("span",{className:"text-[24px] font-semibold tabular-nums tracking-[-0.035em] leading-tight print:text-[19px]",children:s.label})]}):e.jsx("span",{className:"text-[12px] font-semibold leading-snug whitespace-normal",children:s.label})})]}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-[12.5px] leading-relaxed",style:{color:"var(--public-ink-2)"},children:s.detail}),c&&e.jsxs("div",{className:"mt-2 text-[13px] leading-relaxed",style:{color:"var(--public-ink)"},children:[e.jsx("span",{className:"sr-only",children:"Answer excerpt: "}),e.jsx("p",{"data-testid":"search-presence-excerpt",className:"break-words [overflow-wrap:anywhere]",children:c})]}),d&&e.jsxs("div",{className:"mt-2 text-[13px] leading-relaxed",style:{color:"var(--public-ink)"},children:[e.jsx("span",{className:"text-[11.5px] font-medium",style:{color:"var(--public-ink-2)"},children:"Recorded answer excerpt"}),e.jsx("p",{"data-testid":"search-presence-answer-preview",translate:"no",dir:"auto",className:"break-words [overflow-wrap:anywhere]",children:d})]}),e.jsx("p",{className:"mt-2 text-[11.5px] leading-snug",style:{color:"var(--public-ink-3)"},children:o?e.jsxs(e.Fragment,{children:["Checked ",e.jsx("time",{dateTime:o.iso,children:o.label})]}):s.state==="unmeasured"?"Awaiting measurement":"Check date not recorded"})]})]})}function xa({question:t,engines:a,index:s,total:n,print:l=!1}){return e.jsxs("div",{"data-testid":"search-presence-question",className:l?"mb-6 last:mb-0":"",children:[e.jsxs("div",{className:"pb-4 print:pb-2 print:break-after-avoid",children:[e.jsx(lt,{children:`Question ${s+1} of ${n}${t.region?` · ${t.region}`:""}`}),e.jsx("h3",{className:"mt-2 text-[17px] leading-snug font-semibold tracking-[-0.02em] break-words print:text-[15px]",style:{color:"var(--public-ink)"},children:t.text})]}),e.jsx("ul",{className:"m-0 p-0 list-none","aria-label":`Results for ${t.text}`,children:a.map(i=>e.jsx(Yi,{engine:i,question:t},i.id))})]})}function Gi(t,a){const n=t.flatMap(c=>a.map(d=>jt(c,d))).filter(c=>c.state!=="unmeasured");if(!n.length)return"No question-level answers have been measured for this report yet. A missing observation does not establish that your business is absent; review these results when answer evidence is available.";const l=n.filter(c=>["ranked","mentioned","cited"].includes(c.state)).length,i=n.filter(c=>c.position!==null).length,r=n.some(c=>c.state==="not-named"),o=t.filter(c=>a.some(d=>jt(c,d).state!=="unmeasured")).length;return`Your business ${r?"is confirmed in":"appears in"} ${l} of ${n.length} measured answers across ${o} ${o===1?"question":"questions"}.${r?" Older snapshots do not include complete citation or position details.":` ${i?`${i} ${i===1?"answer records":"answers record"} an explicit recommendation position.`:"No explicit recommendation position is recorded."}`} Review the exact questions and answer excerpts to understand where your business is included or missing.`}function ga({engines:t,sample:a=!1,layer:s="native-search"}){const n=j.useId(),[l,i]=j.useState(0),[r,o]=j.useState("all"),c=(s==="model-memory"?t?.supplementalVoice??t?.voice:t?.voice)?.questions??[],d=(t?.engines??[]).filter(b=>(b.measurementLayer??(b.method==="memory"?"model-memory":"native-search"))===s),p=l<c.length?l:0,u=c[p],h=d.some(b=>b.id===r)?r:"all",x=h==="all"?d:d.filter(b=>b.id===h),f=c.length>0&&d.length>0;return e.jsxs("div",{"data-testid":"search-presence",className:"print:break-before-page print:pt-0",children:[e.jsx(I,{eyebrow:s==="model-memory"?"Model-memory comparison":"AI visibility",title:s==="model-memory"?"What models know about your business":"Where your business appears",id:`${n}-heading`,lede:"See whether your business is named, cited or ranked in the AI answers to each question.",summary:Gi(c,d),meta:f?`${c.length} questions · ${d.length} engines`:void 0}),e.jsxs("p",{className:"mb-5 max-w-[90ch] text-[12px] leading-relaxed",style:{color:"var(--public-ink-2)"},children:[a?"Historical sample. ":"",s==="model-memory"?"These answers use model memory without live web search. They are kept separate from web-grounded visibility and citation rates. ":"These are dated API answer samples. ","Positions describe explicit recommendation lists in those answers; they are not guaranteed rankings in consumer apps."]}),f?e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-testid":"search-presence-screen",className:"print-hide",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-[minmax(0,1fr)_220px] gap-3 mb-6",children:[e.jsxs("label",{htmlFor:`${n}-question`,className:"min-w-0 flex flex-col gap-1.5 text-[12px] font-medium",style:{color:"var(--public-ink-2)"},children:["Question",e.jsx("select",{id:`${n}-question`,"aria-label":"Question",value:p,onChange:b=>i(Number(b.target.value)),className:"w-full min-w-0 min-h-[44px] rounded-lg pl-3 pr-8 text-[13px] outline-none focus-visible:[box-shadow:var(--public-focus-ring)]",style:{border:"1px solid var(--public-hairline-strong)",background:"var(--public-ground)",color:"var(--public-ink)"},children:c.map((b,y)=>e.jsxs("option",{value:y,children:[y+1,". ",b.text]},`${b.text}:${b.region}:${y}`))})]}),e.jsxs("label",{htmlFor:`${n}-engine`,className:"min-w-0 flex flex-col gap-1.5 text-[12px] font-medium",style:{color:"var(--public-ink-2)"},children:["Engine",e.jsxs("select",{id:`${n}-engine`,"aria-label":"Engine",value:h,onChange:b=>o(b.target.value),className:"w-full min-w-0 min-h-[44px] rounded-lg pl-3 pr-8 text-[13px] outline-none focus-visible:[box-shadow:var(--public-focus-ring)]",style:{border:"1px solid var(--public-hairline-strong)",background:"var(--public-ground)",color:"var(--public-ink)"},children:[e.jsx("option",{value:"all",children:"All engines"}),d.map(b=>e.jsx("option",{value:b.id,children:b.label},b.id))]})]})]}),e.jsxs("p",{className:"sr-only",role:"status","aria-live":"polite",children:["Showing question ",p+1," of ",c.length,", ",x.length," ",x.length===1?"engine":"engines","."]}),e.jsx(xa,{question:u,engines:x,index:p,total:c.length})]}),e.jsx("div",{"data-testid":"search-presence-print",className:"hidden print:block",children:c.map((b,y)=>e.jsx(xa,{question:b,engines:d,index:y,total:c.length,print:!0},`${b.text}:${b.region}:${y}`))})]}):e.jsx("p",{"data-testid":"search-presence-empty",role:"status",className:"py-5 text-[13.5px] leading-relaxed",style:{color:"var(--public-ink-2)",borderTop:"1px solid var(--public-hairline)"},children:t===void 0?"Loading saved search observationsâ¦":"Question-level search observations are not available for this report."})]})}function Ut(t){const a=t.axes.filter(s=>s.rate!==null);return!a.length||a.some(s=>s.rate!==0)?null:{unmeasured:t.axes.length-a.length,layers:["native-search","model-memory"].map(s=>{const n=a.filter(r=>r.layer===s),l=n.flatMap(r=>r.sampledFrom?[r.sampledFrom]:[]).sort(),i=n.flatMap(r=>r.sampledAt?[r.sampledAt]:[]).sort();return{layer:s,models:n.length,answers:n.reduce((r,o)=>r+o.answers,0),sampledFrom:l[0]??null,sampledAt:i.at(-1)??null,undatedModels:n.filter(r=>!r.sampledFrom||!r.sampledAt).length}})}}const fa=["chatgpt","perplexity","ai-overviews","meta-ai","grok","deepseek-proxy","qwen-proxy","glm-proxy","claude"],Vi={chatgpt:"OpenAI",perplexity:"Perplexity","ai-overviews":"Gemini","meta-ai":"Meta",grok:"Grok","deepseek-proxy":"DeepSeek","qwen-proxy":"Qwen","glm-proxy":"GLM",claude:"Claude"},ba=t=>typeof t=="string"&&Number.isFinite(Date.parse(t))?new Date(t).toISOString():null,He=t=>Number.isSafeInteger(t)&&t>=0;function Za(t){const a=[...t.engines].sort((s,n)=>fa.indexOf(s.id)-fa.indexOf(n.id)).map(s=>{const n=s.measurementLayer??(s.method==="memory"?"model-memory":"native-search"),l=n==="model-memory"?t.supplementalVoice??t.voice:t.voice,i=l?.byEngine.find(p=>p.id===s.id),r=!!i&&He(i.asked)&&i.asked>0&&He(i.mentioned)&&i.mentioned<=i.asked,o=l?.questions.flatMap(p=>{const u=p.observations?.[s.id];return u&&u.state!=="unmeasured"?[u]:[]})??[],c=o.map(p=>ba(p.sampledAt)).filter(p=>p!==null).sort(),d=n==="native-search"?ba(t.corpus.sampledAt):null;return{id:s.id,label:s.label,shortLabel:Vi[s.id]??s.label,model:s.model,layer:n,rate:r?i.mentioned/i.asked*100:null,mentioned:r?i.mentioned:0,answers:r?i.asked:0,firstPositions:r?o.filter(p=>p.state==="ranked"&&p.position===1).length:0,sampledFrom:r?c[0]??d:null,sampledAt:r?c.at(-1)??d:null,coverage:s.coverage?.status??(r?"partial":"unavailable"),expected:s.coverage&&He(s.coverage.expected)?s.coverage.expected:null,remaining:s.coverage&&He(s.coverage.remaining)?s.coverage.remaining:null}});return{brand:t.brand,domain:t.domain,axes:a,measured:a.filter(s=>s.rate!==null).length,total:a.length}}function kt(t){return t.rate===null?"Not measured":t.rate===0?"Not named in sampled answers":t.firstPositions>0?`Ranked #1 in ${t.firstPositions} sampled ${t.firstPositions===1?"answer":"answers"}`:t.rate===100?"Named in every sampled answer":t.rate>=50?"Named in at least half of sampled answers":"Named in fewer than half of sampled answers"}const Ki={native:"#237A5B",memory:"#A9543D",grid:"#DCE4DF",text:"#263B32",muted:"#69766F"},B=t=>String(t).replace(/[&<>"']/g,a=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[a]),va=t=>Number(t.toFixed(2)),nt=t=>t===null?"â":`${Number(t.toFixed(1))}%`;function Ne(t,a=!1){const s=t.id==="chatgpt"||t.id==="meta-ai"?t.shortLabel:a?t.label:t.shortLabel,[n,...l]=s.split(" · ");return`${/\bAPI\b/i.test(n)?n:`${n} API`}${l.length?` · ${l.join(" · ")}`:""}`}function Qi(t){return`<div class="aeo-model-value-plot" data-model-value-plot><p class="aeo-model-value-context">Unbranded discovery asks whether a model names your business without being given its name. These are saved API samples; consumer-app results can differ.</p>${["native-search","model-memory"].map(a=>{const s=t.axes.filter(n=>n.layer===a);return s.length?`<div class="aeo-value-layer" data-value-layer="${a}"><h4>${a==="native-search"?"Web-grounded answers":"Model memory"}</h4><p class="aeo-value-layer-note">${a==="native-search"?"Answers with retrieved web context":"Answers without live web search"}</p><div class="aeo-value-scale" aria-hidden="true"><span>0%</span><span>50%</span><span>100%</span></div>${s.map(n=>`<div class="aeo-value-row" data-model-value="${B(n.id)}" data-rate="${n.rate??""}"><div class="aeo-value-label"><strong>${B(Ne(n))}</strong><span><b translate="no" dir="ltr">${nt(n.rate)}</b></span></div><p class="aeo-value-count">${n.rate===null?"Not measured":`${n.answers} ${n.answers===1?"answer":"answers"} completed · ${n.mentioned} named`}</p>${n.rate===null?'<div class="aeo-value-unmeasured" aria-hidden="true"></div>':`<div class="aeo-value-track" aria-hidden="true"><i style="width:${Math.max(0,Math.min(100,n.rate))}%"></i>${n.rate===0?'<span class="aeo-value-zero"></span>':""}</div>`}</div>`).join("")}</div>`:""}).join("")}</div>`}const Xi=` 4.aeo-model-value-plot{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:32px;margin:24px 0;color:var(--public-ink,#263b32)} 5.aeo-model-value-context{grid-column:1/-1;font-size:12px;line-height:1.6;margin:0;max-width:90ch;color:var(--public-ink-2,#69766f)}.aeo-value-row .aeo-value-count{font-size:11px;line-height:1.5;font-variant-numeric:tabular-nums;margin:5px 0 0;color:var(--public-ink-2,#69766f)} 6.aeo-value-layer{min-width:0;break-inside:avoid}.aeo-value-layer h4{font-size:14px;font-weight:600;line-height:1.4;margin:0 0 4px}.aeo-value-layer .aeo-value-layer-note{font-size:11px;line-height:1.5;margin:0 0 14px;color:var(--public-ink-2,#69766f)} 7.aeo-value-scale{display:flex;justify-content:space-between;font-size:10px;line-height:1.4;font-variant-numeric:tabular-nums;color:var(--public-ink-2,#69766f);padding-bottom:4px;border-bottom:1px solid var(--public-hairline,#dce4df)} 8.aeo-value-row{padding:12px 0;break-inside:avoid}.aeo-value-label{display:flex;justify-content:space-between;align-items:baseline;gap:12px;font-size:13px;line-height:1.4}.aeo-value-label>strong{font-weight:550;overflow-wrap:anywhere}.aeo-value-label>span{display:flex;align-items:baseline;justify-content:flex-end;
8gap:12px;flex-wrap:wrap;text-align:right}.aeo-value-label b{font-size:14px;font-weight:650;font-variant-numeric:tabular-nums;color:var(--public-chart-ink,#176b52)}.aeo-value-label small{font-size:11px;font-variant-numeric:tabular-nums;color:var(--public-ink-2,#69766f)} 9.aeo-value-track,.aeo-value-unmeasured{height:5px;margin-top:8px;position:relative;border-radius:2px}.aeo-value-track{background:var(--public-hairline,#e7ece8)}.aeo-value-track>i{display:block;height:100%;border-radius:inherit;background:var(--public-chart-mark,#237a5b)}.aeo-value-zero{position:absolute;left:0;top:-2px;width:1px;height:9px;background:var(--public-chart-mark,#237a5b)}.aeo-value-unmeasured{border-bottom:1px dashed var(--public-hairline-strong,#bac7bf)} 10[data-value-layer=model-memory] .aeo-value-track>i,[data-value-layer=model-memory] .aeo-value-zero{background:var(--public-chart-compare,#a9543d)}[data-value-layer=model-memory] .aeo-value-label b{color:var(--public-chart-compare,#a9543d)} 11@media(max-width:600px){.aeo-model-value-plot{grid-template-columns:minmax(0,1fr);gap:24px}.aeo-value-label>span{gap:10px}.aeo-value-row{padding:13px 0}} 12@media print{.aeo-model-value-plot{grid-template-columns:repeat(2,minmax(0,1fr));gap:26px;margin:18px 0;break-inside:avoid}.aeo-value-row{padding:9px 0}.aeo-value-label{font-size:12px}.aeo-value-label b{font-size:13px}.aeo-value-label small{font-size:10px}.aeo-value-layer h4{font-size:13px}.aeo-value-layer .aeo-value-layer-note{font-size:10px}} 13`;function Ji(t){const a=Ut(t);return a?`<div class="aeo-radar-absence" data-radar-measured-absence><h3>No mentions in completed samples</h3><p>Completed answers did not name this business. Unmeasured models are excluded.</p><div class="aeo-radar-absence-layers">${a.layers.map(s=>{const n=s.sampledAt?`<p class="aeo-radar-absence-date">Sample dates (UTC)<br><time translate="no" dir="ltr">${B(s.sampledFrom&&s.sampledFrom!==s.sampledAt?`${s.sampledFrom} â ${s.sampledAt}`:s.sampledAt)}</time></p>`:"";return`<div data-radar-layer="${s.layer}"><h4>${s.layer==="native-search"?"Web-grounded answers":"Model memory"}</h4>${s.answers?`<strong class="aeo-radar-absence-count" translate="no" dir="ltr">0 / ${s.answers}</strong><p>
13Answers named this business</p><p class="aeo-radar-absence-models">Models measured: <b translate="no" dir="ltr">${s.models}</b></p>${n}${s.undatedModels?"<p>Some sample dates are unavailable.</p>":""}`:"<strong>Not measured</strong><p>No completed samples in this layer.</p>"}</div>`}).join("")}</div></div>`:""}const Zi=` 14.aeo-radar-absence{margin:22px 0 8px;padding:20px 22px;border:1px solid var(--public-hairline,#dce4df);border-radius:8px;background:var(--public-paper,#fafbf9);color:var(--public-ink,#263b32);break-inside:avoid} 15.aeo-radar-absence h3{font-size:20px;line-height:1.3;letter-spacing:-.02em;margin:0 0 8px}.aeo-radar-absence p{font-size:12px;line-height:1.5;margin:5px 0;color:var(--public-ink-2,#69766f)} 16.aeo-radar-absence-layers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-top:18px}.aeo-radar-absence-layers>div{min-width:0;border-top:1px solid var(--public-hairline,#dce4df);padding-top:12px} 17.aeo-radar-absence h4{font-size:12px;font-weight:600;margin:0 0 8px}.aeo-radar-absence-count{display:block;width:fit-content;font-size:29px;line-height:1.2;letter-spacing:-.03em;font-variant-numeric:tabular-nums}.aeo-radar-absence time{display:inline-block;max-width:100%;overflow-wrap:anywhere;font-size:11px}.aeo-radar-absence-models b{font-variant-numeric:tabular-nums}.aeo-radar-absence-date{margin-top:10px!important} 18@media(max-width:440px){.aeo-radar-absence{padding:18px}.aeo-radar-absence-layers{grid-template-columns:1fr;gap:14px}.aeo-radar-absence h3{font-size:18px}} 19@media print{.aeo-radar-absence{padding:15px 18px;margin:16px 0 8px}.aeo-radar-absence-layers{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.aeo-radar-absence h3{font-size:18px}.aeo-radar-absence-count{font-size:26px}} 20`,Me=(t,a,s,n=137)=>{const l=-Math.PI/2+t*Math.PI*2/a;return{x:va(260+Math.cos(l)*n*s/100),y:va(225+Math.sin(l)*n*s/100)}};function er(t,a={}){const s=(a.idPrefix??"aeo-model-radar").replace(/[^a-zA-Z0-9_-]/g,"-"),n=Object.fromEntries(Object.entries({...Ki,...a.colors}).map(([u,h])=>[u,B(h)])),{axes:l}=t,i=l.length;if(!i)return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 520 440" role="img" aria-label="No AI answer samples available"><text x="260" y="220" text-anchor="middle" fill="${n.muted}" font-family="sans-serif" font-size="16">No AI answer samples available</text></svg>`;const r=l.every(u=>u.rate===null);if(Ut(t)||r){const u=l.map((h,x)=>{const f=70+x*38+(r?32:0),b=h.rate!==null,y=h.layer==="native-search"?n.native:n.memory,m=`${Ne(h,!0)}: ${b?`0%; ${h.answers} answers completed; 0 named.`:"Not measured."}`,w=b?h.layer==="native-search"?`<circle data-radar-point="${B(h.id)}" cx="26" cy="${f-5}" r="5" fill="none" stroke="${y}" stroke-width="2"><title>${B(m)}</title></circle>`:`<rect data-radar-point="${B(h.id)}" x="21" y="${f-10}" width="10" height="10" rx="1" fill="none" stroke="${y}" stroke-width="2"><title>${B(m)}</title></rect>`:"";return`<line x1="18" y1="${f+14}" x2="502" y2="${f+14}" stroke="${n.grid}"/>${w}<text x="47" y="${f}" fill="${n.text}" font-size="22" font-weight="600" translate="no">${B(h.shortLabel)}</text><text x="330" y="${f}" text-anchor="end" fill="${n.muted}" font-size="22" translate="no">${b?`0 / ${h.answers}`:"â"}</text><text x="492" y="${f}" text-anchor="end" fill="${n.text}" font-size="24" font-weight="600" translate="no">${b?"0%":"â"}</text>`}).join("");return`<svg xmlns="http://www.w3.org/2000/svg" data-radar-state="${r?"unmeasured":"measured-absence"}" viewBox="0 0 520 ${84+i*38+(r?32:0)}" role="img" aria-labelledby="${s}-title ${s}-desc" style="display:block;width:100%;height:auto;font-family:inherit"><title id="${s}-title">${B(t.brand||t.domain)}: ${r?"no completed answer samples":"no mentions in completed samples"}</title><desc id="${s}-desc">${r?"No completed answer samples are available for this panel. Dashes indicate missing measurements, not zero mentions.":"Each measured model has a zero mention rate. Exact named-answer counts appear on separate rows. A dash means not measured."} Web-grounded and model-memory samples remain separate; these API samples do not establish consumer-app results.</desc>${r?`<text x="26" y="25" fill="${n.text}" font-size="24" font-weight="600">No completed answer samples</text>`:""}<text x="47" y="${r?61:29}" fill="${n.muted}" font-size="18">Model</text><text x="330" y="${r?61:29}" text-anchor="end" fill="${n.muted}" font-size="18">Named / answers</text><text x="492" y="${r?61:29}" text-anchor="end" fill="${n.muted}" font-size="18">Mention rate</text>${u}</svg>`}const o=[25,50,75,100].map(u=>`<circle cx="260" cy="225" r="${137*u/100}" fill="none" stroke="${n.grid}" stroke-width="1"/><text x="268" y="${225-137*u/100+13}" fill="${n.muted}" font-size="14">${u}%</text>`).join(""),c=l.map((u,h)=>
20{const x=Me(h,i,100),f=Me(h,i,100,178),b=f.x<250?"end":f.x>270?"start":"middle";return`<line x1="260" y1="225" x2="${x.x}" y2="${x.y}" stroke="${n.grid}" stroke-width="1"/><text x="${f.x}" y="${f.y-4}" text-anchor="${b}" fill="${n.text}" font-size="18" font-weight="600">${B(u.shortLabel)}</text><text x="${f.x}" y="${f.y+16}" text-anchor="${b}" fill="${n.muted}" font-size="16">${u.rate===null?"â":nt(u.rate)}</text>`}).join(""),d=i<3?"":l.map((u,h)=>{const x=l[(h+1)%i];if(u.rate===null||x.rate===null||u.layer!==x.layer)return"";const f=Me(h,i,u.rate),b=Me((h+1)%i,i,x.rate);return`<line data-radar-segment="${B(u.id)}:${B(x.id)}" x1="${f.x}" y1="${f.y}" x2="${b.x}" y2="${b.y}" stroke="${u.layer==="native-search"?n.native:n.memory}" stroke-width="2.5"${u.layer==="model-memory"?' stroke-dasharray="5 4"':""}/>`}).join(""),p=l.map((u,h)=>{if(u.rate===null)return"";const x=Me(h,i,u.rate),f=`${Ne(u,!0)}: ${nt(u.rate)}; ${u.mentioned} of ${u.answers} answers named the business. ${kt(u)}.`;return u.layer==="native-search"?`<circle data-radar-point="${B(u.id)}" cx="${x.x}" cy="${x.y}" r="5" fill="${n.native}" stroke="white" stroke-width="2"><title>${B(f)}</title></circle>`:`<rect data-radar-point="${B(u.id)}" x="${x.x-5}" y="${x.y-5}" width="10" height="10" rx="1" fill="${n.memory}" stroke="white" stroke-width="2"><title>${B(f)}</title></rect>`}).join("");return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 520 440" role="img" aria-labelledby="${s}-title ${s}-desc" style="display:block;width:100%;height:auto;font-family:inherit"><title id="${s}-title">${B(t.brand||t.domain)}: AI model mention rate</title><desc id="${s}-desc">Each spoke uses the same 0 to 100 percent scale: answers naming the business divided by sampled answers for that model. Circles show web-grounded answers; squares show model memory. Missing measurements have no point or connecting line. Shape area is not an overall score. Exact counts and dates are in the accompanying table.</desc>${o}${c}${d}${p}<text x="252" y="240" text-anchor="end" fill="${n.muted}" font-size="14">0</text></svg>`}function tr(t){if(!t.engines)return t.fallback;const a=t.engines.answerVisibility,s=a?.businesses.find(p=>p.isYou),n=Za(t.engines).axes.filter(p=>p.layer==="native-search"),l=a?.answers&&s?a.answers:n.reduce((p,u)=>p+u.answers,0),i=a?.answers&&s?s.mentioned:n.reduce((p,u)=>p+u.mentioned,0),r=a?.answers?a.sampledAt:n.map(p=>p.sampledAt).filter(p=>!!p).sort().at(-1),o=r&&Number.isFinite(Date.parse(r))?`, last sampled ${new Date(r).toISOString().slice(0,10)} (UTC)`:"",c=l>0?`Your website scores ${t.score}/100 for readiness; your business is named in ${i} of ${l} sampled web-grounded API answers (${Math.round(i/l*1e3)/10}%)${o}. Review the measured questions and cited pages to understand the visibility results; consumer-app answers may differ.`:`Your website scores ${t.score}/100 for readiness. AI answer visibility has not been measured for this snapshot; crawler access alone does not establish mentions or citations.`,d=t.nextAction?.trim();return`${c} ${d?`Next technical action: ${d.replace(/[.!?]+$/,"")}; verify the change with a new website audit.`:"Review any unmeasured website findings before deciding what to change."}`}const Bt=[[95,"A+"],[90,"A"],[85,"B+"],[80,"B"],[75,"B-"],[60,"C+"],[50,"C"],[35,"D"],[0,"F"]];function es(t){return Bt.find(([a])=>t>=a)[1]}function ar(t,a){return Bt.filter(([s])=>s>t&&s<=a&&s>0).map(([s,n])=>[s,n])}const sr=Object.freeze({});function nr(t,a=[]){const s=a.find(n=>Object.prototype.hasOwnProperty.call(sr,n.id))??null;return{total:t,grade:es(t),gate:s?"held":"clear",heldBy:s}}const ir=t=>`${t}${["th","st","nd","rd"][t%100>10&&t%100<14||t%10>3?0:t%10]}`,rr=t=>{const a=[...t].sort((s,n)=>s-n);return a.length?a[Math.floor(a.length/2)]:0};function lr(t,a,s){const n=[];if(a?.kind==="set"&&a.rank&&a.of){const r=(a.rows??[]).filter(o=>!o.isYou&&o.score!==null).sort((o,c)=>c.score-o.score)[0];n.push({label:"Standing",value:`${ir(a.rank)} of ${a.of}`,detail:r?`${r.domain} leads at ${r.score}/100`:"among your competitors and peers",tone:a.rank===1?"good":"neutral"})}else a?.kind==="aggregate"&&a.percentile!==null&&a.percentile!==void 0?n.push({label:"Standing",value:`Top ${100-a.percentile}%`,detail:`of ${a.sampleSize} sites measured`,tone:"neutral"}
20):n.push({label:"Standing",value:"Unranked",detail:"add competitors to compare readiness",tone:"neutral"});const l=t.observations?.responses;if(l?.anonymous?.bytes>0){const r=Object.entries(l).filter(([o,c])=>o!=="anonymous"&&c.status===200).map(([,o])=>o.bytes);if(r.length){const o=Math.round(rr(r)/l.anonymous.bytes*100);n.push({label:"Crawlers receive",value:`${o}%`,detail:`of the browser's bytes (median of ${r.length} crawler${r.length===1?"":"s"})`,tone:o<60?"bad":"good"})}}if(s){const r=s.engines.filter(o=>o.cites.n>0);if(s.corpus.status!=="ready"||r.length===0)n.push({label:"Engines citing you",value:"Not measured",detail:Oe(s)??"No engine has answers for this category yet.",tone:"neutral"});else{const o=r.filter(u=>(u.cites.share??0)>0).length,c=r.reduce((u,h)=>u+h.cites.n,0),d=s.engines.filter(u=>u.cites.n<=0).length,p=[r.length===1?"engine measured":"engines measured",d?`${d} of ${s.engines.length} not yet measured`:null,`${c} answer${c===1?"":"s"}`].filter(Boolean).join(" · ");n.push({label:"Engines citing you",value:`${o} of ${r.length}`,detail:p,tone:o>0?"good":"bad"})}}const i=t.plan?.items??[];if(!i.length&&a?.biggestGap&&n.push({label:"Biggest gap",value:a.biggestGap.label,detail:`${Math.abs(a.biggestGap.delta)} points below the peer median`,tone:"bad"}),i.length){const r=i[Math.min(2,i.length-1)];n.push({label:`After ${Math.min(3,i.length)} priority ${i.length===1?"fix":"fixes"}`,value:W(r.projectedGrade,r.projectedTotal),detail:`from ${W(t.score.grade,t.score.total,{outOf:!0})} in this audit`,tone:"neutral"})}return n}function or({report:t,benchmark:a,engines:s,showComparison:n=!0}){const l=lr(t,a,s).filter(p=>n||!["Standing","Biggest gap"].includes(p.label));if(!l.length)return null;const i=p=>p==="bad"?"var(--public-danger)":p==="good"?"var(--public-assurance)":"var(--public-ink)",r={3:3,4:4,5:5}[l.length]??4,o={3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5"}[r],c=l.length%2===1,d=p=>[p%2===1?"border-l":"border-l-0",p>=2?"border-t":"border-t-0",p%r===0?"md:border-l-0":"md:border-l","md:border-t-0",p%2===1?"lg:border-l":"lg:border-l-0",p>=2?"lg:border-t":"lg:border-t-0"].join(" ");return e.jsx("dl",{"data-testid":"key-facts",className:`grid grid-cols-2 ${o} lg:grid-cols-2 m-0 border-y border-[var(--public-hairline)]`,children:l.map((p,u)=>e.jsxs("div",{"data-testid":"key-fact",className:`px-4 py-5 sm:px-5 min-h-[92px] min-w-0 flex flex-col border-[var(--public-hairline)] ${d(u)} ${c&&u===l.length-1?"col-span-2 md:col-span-1 lg:col-span-2":""}`,style:{background:"var(--public-ground)"},children:[e.jsx("dt",{className:"text-[12.5px] leading-snug",style:{color:"var(--public-ink-2)"},children:p.label}),e.jsxs("dd",{className:"m-0 mt-2 min-w-0",children:[e.jsx("div",{className:"text-[28px] sm:text-[34px] font-[620] tracking-[-0.04em] leading-none tabular-nums",style:{color:i(p.tone),overflowWrap:"anywhere"},children:p.value}),e.jsx("div",{className:"mt-2 text-[12.5px] leading-snug",style:{color:"var(--public-ink-2)",overflowWrap:"anywhere"},children:p.detail})]})]},p.label))})}const cr={company:"Company","local-business":"Local business",person:"Personal site",publisher:"Publisher",documentation:"Documentation site",government:"Government body",education:"Educational institution",nonprofit:"Nonprofit",website:"Website"},dr=t=>{try{return new URL(t).hostname.replace(/^www\./,"")}catch{return t.replace(/^https?:\/\//,"").replace(/^www\./,"").split("/")[0]}};function ur(t){const a=t.trim();if(!/^[A-Za-z]{2}$/.test(a))return a;try{return(typeof Intl<"u"&&"DisplayNames"in Intl?new Intl.DisplayNames(["en"],{type:"region"}):null)?.of(a.toUpperCase())??a}catch{return a}}function pr(t){if(!t)return null;const a=t.country?ur(t.country):null;return t.locality?[t.locality,t.region??a].filter(Boolean).join(", "):t.region?[t.region,a].filter(Boolean).join(", "):a}const mr=t=>t&&t[0].toUpperCase()+t.slice(1),hr=32,ya=1.6,xr=(t,a)=>t>0&&a>0&&t/a<=ya&&a/t<=ya;function gr({identity:t,domain:a,name:s}){const n=[];t?.logoUrl&&n.push({kind:"logo",src:t.logoUrl}),t?.iconUrl&&n.push({kind:"icon",src:t.iconUrl}),n.push({kind:"favicon",src:`https://www.google.com/s2/favicons?sz=64&domain=${encodeURIComponent(a)}`});const[l,i]=j.useState(0),r=n[l],o="0 0 0 1px var(--public-hairline-strong)";return r?r.kind==="logo"?e.jsx("span",{"data-testid":"entity-tile","data-tile":"logo",className:"inline-flex w-[34px] h-[34px] shrink-0 rounded-[calc(var(--public-radius-control)-3px)] items-center justify-center overflow-hidden",style:{background:"var(--public-ground)",boxShadow:o},children:e.jsx("img",{src:r.src,alt:"",width:26,height:26,referrerPolicy:"no-referrer",onError:()=>i(c=>c+1),onLoad:c=>
20{const{naturalWidth:d,naturalHeight:p}=c.currentTarget;d>0&&p>0&&!xr(d,p)&&i(u=>u+1)},className:"block",style:{width:26,height:26,objectFit:"contain"}})}):e.jsx("span",{"data-testid":"entity-tile","data-tile":r.kind,className:"inline-flex w-[34px] h-[34px] shrink-0 rounded-[calc(var(--public-radius-control)-3px)] items-center justify-center overflow-hidden",style:{background:"var(--public-paper)",boxShadow:o},children:e.jsx("img",{src:r.src,alt:"",width:34,height:34,referrerPolicy:"no-referrer",onError:()=>i(c=>c+1),className:"block",style:{width:34,height:34,objectFit:"contain"}})}):e.jsx("span",{"data-testid":"entity-tile","data-tile":"monogram","aria-hidden":"true",className:"inline-flex w-[34px] h-[34px] shrink-0 rounded-[calc(var(--public-radius-control)-3px)] items-center justify-center text-[16px] font-semibold leading-none",style:{background:"var(--public-surface-2)",color:"var(--public-ink-2)"},children:(s.trim()[0]??a[0]??"").toUpperCase()})}function fr({declared:t}){return t?e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",className:"shrink-0",children:e.jsx("path",{d:"M2.2 6.3 4.8 8.8 9.8 3.4",stroke:"var(--public-assurance)",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}):e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",className:"shrink-0",children:e.jsx("path",{d:"M2.5 6h7",stroke:"var(--public-ink-3)",strokeWidth:"1.6",strokeLinecap:"round"})})}function br(t){const a=t.sameAsCount>0;return[{label:"Name",declared:t.nameDeclared??(t.nameSource==="jsonld"||t.nameSource==="og:site_name")},{label:"Logo",declared:t.logoUrl!==null},{label:"Location",declared:t.location!==null},{label:a?`${t.sameAsCount} profile link${t.sameAsCount===1?"":"s"}`:"Profile links",declared:a}]}function wa({url:t,identity:a,category:s,gauge:n,headline:l,diagnosis:i,attribution:r,grounding:o}){const c=dr(t),d=a??null,p=c==="prompeteer.ai"?"Prompeteer":d?.name??c,u=d?.page?.path??null,h=pr(d?.location??null),x=[d?cr[d.kind]:null,s?mr(s.trim()):null,h].filter(b=>!!b),f=p.length>hr;return e.jsxs("section",{"data-testid":"entity-hero","aria-label":"Website identity",className:"flex flex-col gap-6 print:gap-3",children:[e.jsxs("div",{"data-testid":"entity-lockup",className:"flex flex-col items-center text-center gap-5 py-2 md:flex-row md:justify-between md:text-left md:gap-10 md:py-3 print:py-0 print:gap-3",children:[e.jsxs("div",{className:"min-w-0 w-full max-w-[760px] flex flex-col items-center md:items-start",children:[e.jsxs("div",{className:"flex items-center justify-center md:justify-start gap-3 max-w-full",children:[e.jsx(gr,{identity:d,domain:c,name:p},`${c}|${d?.logoUrl??""}|${d?.iconUrl??""}`),e.jsx("h1",{"data-testid":"entity-name",className:`m-0 min-w-0 ${f?"text-[24px] sm:text-[32px] print:text-[23px]":"text-[34px] sm:text-[42px] lg:text-[49px] print:text-[34px]"} font-[620] tracking-[-0.045em] leading-[1.06]`,style:{color:"var(--public-ink)",textWrap:"balance",overflowWrap:"anywhere"},children:p})]}),e.jsxs("div",{className:"mt-2 flex flex-wrap justify-center md:justify-start items-center gap-x-2 gap-y-1 min-w-0 max-w-full",children:[e.jsxs("span",{"data-testid":"entity-domain",className:"font-mono text-[13px] leading-snug",style:{color:"var(--public-ink-2)",overflowWrap:"anywhere"},children:[c,u&&e.jsx("span",{"data-testid":"entity-path",children:u})]}),d?.page&&e.jsx("span",{"data-testid":"entity-page",className:"inline-flex items-center rounded-[calc(var(--public-radius-control)/2)] px-2 py-0.5 text-[12px] leading-snug max-w-full min-w-0",style:{color:"var(--public-ink-2)",border:"1px solid var(--public-hairline-strong)"},children:e.jsxs("span",{className:"truncate",children:["Page · ",d.page.title??d.page.path]})})]}),x.length>0&&e.jsx("p",{"data-testid":"entity-meta",className:"m-0 mt-2 text-[12.5px] leading-snug",style:{color:"var(--public-ink-2)"},children:x.join(" · ")})]}),e.jsx("div",{"data-testid":"entity-gauge",className:"min-w-0 w-[200px] md:w-[208px] shrink-0 flex justify-center",children:n})]}
20),e.jsxs("div",{className:"min-w-0 md:min-h-[6.5rem]",children:[e.jsx("p",{"data-testid":"summary-bridge",className:"mb-3 text-[13.5px] leading-relaxed max-w-[90ch]",style:{color:"var(--public-ink-2)"},children:"This report reviews how AI systems can access and understand your website. It brings together priority findings, competitor comparisons and the evidence behind your results."}),e.jsx("h2",{"data-testid":"summary-headline",className:"text-[22px] lg:text-[26px] font-semibold tracking-[-0.028em] leading-[1.15]",style:{color:"var(--public-ink)",textWrap:"balance"},children:l}),e.jsx("p",{"data-testid":"summary-diagnosis",className:"mt-2.5 text-[14px] md:text-[15px] leading-relaxed max-w-[100ch]",style:{color:"var(--public-ink-2)"},children:i}),r&&e.jsx("p",{"data-testid":"advisor-reading",className:"mt-2 text-[12px] leading-snug",style:{color:"var(--public-ink-2)"},children:r}),o&&e.jsx("p",{"data-testid":"summary-grounding",className:"mt-1 text-[12px] leading-snug",style:{color:"var(--public-ink-2)"},children:o})]}),e.jsxs("div",{"data-testid":"entity-declared",className:"pt-4 print:pt-3",style:{borderTop:"1px solid var(--public-hairline)"},children:[e.jsx(lt,{children:"Declared on the page"}),d?e.jsx("ul",{className:"m-0 p-0 list-none mt-2 flex flex-wrap gap-x-5 gap-y-1.5",children:br(d).map(b=>e.jsxs("li",{"data-testid":"entity-declared-item","data-declared":b.declared?"true":"false",className:"inline-flex items-center gap-1.5 text-[12.5px] leading-snug",style:{color:b.declared?"var(--public-ink-2)":"var(--public-ink-3)"},children:[e.jsx(fr,{declared:b.declared}),e.jsx("span",{className:"sr-only",children:b.declared?"Declared: ":"Not declared: "}),b.label]},b.label))}):e.jsx("p",{"data-testid":"entity-not-measured",className:"m-0 mt-2 text-[12.5px] leading-snug",style:{color:"var(--public-ink-3)"},children:"Not measured on this run."})]})]})}const vr={retrievability:{short:"Can AI crawlers reach the page?",why:"robots.txt, the CDN, status codes and speed. If a retrieval crawler cannot fetch the page, nothing else on it exists."},parseability:{short:"Does the content exist without JavaScript?",why:"Many retrieval crawlers do not execute JavaScript. Content present in the initial HTML is easier for these crawlers to extract."},answerability:{short:"Can a passage be lifted out as the answer?",why:"Clear passages, useful headings and appropriate lists help retrieval systems identify relevant answers. These features do not guarantee citations."},entity:{short:"Do engines know who you are?",why:"Consistent entity markup, linked profiles, accurate dates and named authors help systems identify the source. Attribution remains the answer engineâs decision."},agent:{short:"Can an agent act on your site, not just read it?",why:"Machine-readable content and documented interfaces help compatible agents discover supported capabilities. Files alone do not verify a working transaction."}};function ts(t){return t>=70?"var(--public-assurance)":t>=45?"var(--public-warning, var(--public-highlight-ink))":"var(--public-danger)"}function yr(t){return t>=70?"var(--public-assurance)":t>=45?"var(--public-warning-mark, var(--public-highlight-ink))":"var(--public-danger)"}const ja=["zero","one","two","three","four","five","six","seven","eight","nine"],wr=t=>t<ja.length?ja[t]:String(t);function jr(t){const a=t.score.pillars;if(!a.length)return null;const s=t.plan?.items??[];if(s.length){const l=new Map;for(const r of s){const o=l.get(r.pillar)??{impact:0,fixes:0};l.set(r.pillar,{impact:o.impact+r.impact,fixes:o.fixes+1})}let i=null;for(const r of a){const o=l.get(r.pillar);o&&(!i||o.impact>i.impact)&&(i={pillar:r,...o})}if(i)return i}return{pillar:[...a].sort((l,i)=>l.score-i.score)[0],impact:0,fixes:0}}function kr(t){const{total:a,grade:s}=t.score,n=t.plan?.items??[],l=jr(t),i=`The audited page scores ${W(s,a,{outOf:!0})} for AI readiness.`;if(!l||!n.length){const p=l&&l.pillar.counted>0&&l.pillar.score<90?` Review ${l.pillar.label.toLowerCase()}, the lowest-scoring area, and verify any checks that could not run.`:" Maintain the checks that pass and verify any evidence that c
20ould not be measured.";return{headline:"Executive summary",diagnosis:`${i}${p} Actual mentions and citations are measured separately in the answer-engine results.`,pillar:l?.pillar.pillar??null}}const o={retrievability:"crawler access and page delivery",parseability:"how reliably crawlers can extract the page content",answerability:"how clearly the page answers relevant questions",entity:"the identity and trust signals declared on the page","entity-trust":"the identity and trust signals declared on the page",agent:"the information exposed for automated discovery"}[l.pillar.pillar]??l.pillar.label.toLowerCase();return{headline:"Executive summary",diagnosis:`${l.pillar.pillar==="parseability"&&t.checks.some(p=>["P1","P2"].includes(p.id)&&p.status==="fail")?"Some page content is missing from the HTML delivered to crawlers.":`The largest actionable gap concerns ${o}.`} Your current readiness score is ${W(s,a,{outOf:!0})}; resolving ${wr(l.fixes)} priority ${l.fixes===1?"issue":"issues"} could add ${l.impact} points. Start with these changes, then run another audit to confirm the improvement.`,pillar:l.pillar.pillar}}const Nr=236,$r=176,as=118,ss=118,Nt=88,ka=t=>(210-2.4*t)*Math.PI/180,$t=(t,a=Nt)=>[as+a*Math.cos(ka(t)),ss-a*Math.sin(ka(t))];function Na(t,a){const[s,n]=$t(t),[l,i]=$t(a);return`M ${s.toFixed(2)} ${n.toFixed(2)} A ${Nt} ${Nt} 0 ${(a-t)*2.4>180?1:0} 1 ${l.toFixed(2)} ${i.toFixed(2)}`}function Ar({score:t,grade:a}){const s=Math.max(0,Math.min(100,t)),n=yr(s),[l,i]=$t(s);return e.jsxs("div",{"data-testid":"gauge-figure",className:"relative w-full max-w-[200px] md:max-w-[228px]",children:[e.jsxs("svg",{viewBox:`0 0 ${Nr} ${$r}`,fill:"none",role:"img",className:"block w-full h-auto","data-testid":"gauge","aria-label":`AI Agent Discovery Readiness: grade ${a}, ${t} out of 100`,children:[e.jsx("path",{d:Na(0,100),stroke:"var(--public-hairline)",strokeWidth:"12",strokeLinecap:"round",fill:"none"}),s>0&&e.jsx("path",{d:Na(0,Math.max(s,.5)),stroke:n,strokeWidth:"12",strokeLinecap:"round",fill:"none"}),e.jsx("circle",{cx:l,cy:i,r:"9",fill:"var(--public-ground)",stroke:n,strokeWidth:"4"}),e.jsx("text",{x:as,y:ss+10,textAnchor:"middle",fontSize:"48",fontWeight:"600",letterSpacing:"-2.2",fill:"var(--public-ink)",children:a})]}),e.jsx("div",{className:"absolute inset-x-0 top-[76%] text-center tabular-nums leading-snug","aria-hidden":"true",children:e.jsxs("div",{"data-testid":"gauge-score",className:"text-[13.5px] font-medium",style:{color:"var(--public-ink)"},children:[t,"/100"]})})]})}function Sr(t){const a=t.capped;return a&&typeof a.by=="string"&&a.by?[{id:a.by,title:String(a.title??a.by)}]:[]}function Cr({state:t}){return t.gate!=="held"||!t.heldBy?null:e.jsxs("div",{"data-testid":"summary-gate","data-held-by":t.heldBy.id,role:"status",className:"rounded-[var(--public-radius-control)] px-4 py-3 flex flex-col gap-1.5",style:{border:"1px solid var(--public-danger)",background:"var(--public-ground)"},children:[e.jsxs("div",{"data-testid":"summary-gate-headline",className:"text-[13.5px] font-semibold leading-snug",style:{color:"var(--public-danger)"},children:["Grade held: ",t.heldBy.id," â ",t.heldBy.title]}),e.jsx("p",{className:"m-0 text-[13px] leading-relaxed max-w-[70ch]",style:{color:"var(--public-ink-2)"},children:"Resolve this critical issue before relying on the overall readiness score. Run another audit after the change to confirm it has been addressed."})]})}const Tr="sm:min-h-[2.75em] sm:flex sm:items-end",Mr="sm:min-h-[2.75em]";function Er({p:t}){const a=t.counted>0,s=t.counted+t.unverified,n=vr[t.pillar],l=`${t.counted} of ${s} checks measured${n?`. ${n.why}`:""}`;return e.jsxs("div",{"data-testid":"summary-pillar",title:l,className:"grid grid-cols-[minmax(0,1fr)_96px_44px] items-center gap-x-3 sm:flex sm:flex-col sm:items-stretch sm:gap-2 min-w-0",children:[e.jsx("span",{"data-testid":"summary-pillar-label",className:`text-[12.5px] leading-snug sm:order-1 ${Tr}`,style:{color:"var(--public-ink-2)"},children:e.jsx("span",{children:t.label})}),e.jsx("div",{className:"sm:order-3 h-[5px] rounded-full overflow-hidden",style:{background:"var(--public-hairline)"},children:a&&e.jsx("div",{className:"h-full rounded-full",style:{width:`${Math.max(0,Math.min(100,t.score))}%`,background:ts(t.score)}})}),e.jsx("span",{"data-testid":"summary-pillar-score",className:"text-[17px] sm:text-[27px] font-semibold tracking-[-0.03em] tabular-nums leading-none text-right sm:text-left sm:order-2",style:{color:a&&t.score<45?"var(--public-danger)":"var(--public-ink)"},children:a?t.score:e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":"true",children:"â"}),e.jsx("span",{className:"sr-only",children:"Not measured"})]})}),n&&e.jsx("span",{"data-testid":"summary-pillar-caption",className:`hidden sm:block sm:order-4 text-[12.5px] leading-snug ${Mr}`,style:{color:"var(--public-ink-2)"},children:n.short})]})}function Rr({report:t,benchmark:a,engines:s,advisor:n,afterIdentity:l}){const i=_e(t.checks),r=j.useMemo(()=>kr(t),[t]),o=j.useMemo(()=>nr(t.score.total,Sr(t.score)),[t.score]),c=t.plan?.items??[],d=c.slice(0,3),p=r.headline,u=tr({score:t.score.total,engines:s,nextAction:c[0]?.fix,fallback:n?.reading.diagnosis??r.diagnosis}),h=(n?.reading.avoid??[]).filter(x=>
20typeof x=="string"&&x.trim().length>0).slice(0,3);return i?e.jsxs("div",{"data-testid":"report-summary",className:"flex flex-col gap-8",children:[e.jsx(wa,{url:t.url,identity:null,category:s?.corpus?.category??null,gauge:e.jsx("p",{"data-testid":"readiness-unmeasured",className:"text-[20px] font-semibold",children:"Website readiness: Not measured"}),headline:"Restore page access before assessing website content",diagnosis:`${i} ${Fa}`}),l,e.jsx("p",{className:"text-[14px] leading-relaxed",children:Wa})]}):e.jsxs("div",{"data-testid":"report-summary",className:"flex flex-col gap-8",children:[e.jsx(Cr,{state:o}),e.jsx(wa,{url:t.url,identity:t.observations?.identity??null,category:s?.corpus?.category??null,gauge:e.jsxs("div",{className:"w-[200px] md:w-[228px] flex flex-col items-center",children:[e.jsx(Ar,{score:t.score.total,grade:t.score.grade}),e.jsx("p",{className:"mt-3 text-center text-[12px] leading-snug font-medium",style:{color:"var(--public-ink-2)"},children:"AI Agent Discovery Readiness"})]}),headline:p,diagnosis:u}),l,e.jsxs("div",{"data-testid":"summary-grid",className:"grid grid-cols-1 gap-y-7 lg:grid-cols-[minmax(0,1.1fr)_minmax(0,1fr)] lg:gap-x-10 items-start",children:[(d.length>0||h.length>0)&&e.jsxs("div",{"data-testid":"summary-week",className:"min-w-0",children:[d.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-[12.5px] font-semibold mb-1",style:{color:"var(--public-ink)"},children:"Start here"}),e.jsx("ol",{className:"flex flex-col",children:d.map(x=>e.jsxs("li",{"data-testid":"summary-week-item",className:"grid grid-cols-[40px_minmax(0,1fr)] items-baseline gap-x-3 py-2",style:{borderTop:"1px solid var(--public-hairline)"},children:[e.jsxs("span",{className:"text-[15px] font-semibold tabular-nums",style:{color:"var(--public-chart-ink)"},children:["+",x.impact]}),e.jsxs("span",{className:"text-[13.5px] leading-snug min-w-0",style:{color:"var(--public-ink)"},children:[x.title," ",e.jsxs("span",{className:"text-[12.5px] tabular-nums whitespace-nowrap",style:{color:"var(--public-ink-2)"},children:["â ",W(x.projectedGrade,x.projectedTotal)]})]})]},x.id))}),n?.reading.expect&&e.jsx("p",{"data-testid":"summary-expect",className:"mt-2.5 text-[13px] leading-relaxed max-w-[60ch]",style:{color:"var(--public-ink-2)"},children:n.reading.expect})]}),h.length>0&&e.jsxs("div",{"data-testid":"summary-avoid",className:d.length>0?"mt-5":"",children:[e.jsx("div",{className:"text-[12.5px] font-semibold mb-1",style:{color:"var(--public-ink)"},children:"Avoid"}),e.jsx("ul",{className:"flex flex-col",children:h.map(x=>e.jsxs("li",{"data-testid":"summary-avoid-item",className:"grid grid-cols-[40px_minmax(0,1fr)] items-baseline gap-x-3 py-2",style:{borderTop:"1px solid var(--public-hairline)"},children:[e.jsx("span",{"aria-hidden":"true",className:"text-[15px] font-semibold leading-none",style:{color:"var(--public-danger)"},children:"Ã"}),e.jsx("span",{className:"text-[13.5px] leading-snug min-w-0",style:{color:"var(--public-ink)"},children:x})]},x))})]})]}),e.jsx("div",{className:"min-w-0",children:e.jsx(or,{report:t,benchmark:a,engines:s,showComparison:!1})})]}),e.jsx("div",{"data-testid":"summary-pillars",className:"pt-6 grid grid-cols-1 gap-y-3 sm:grid-cols-2 sm:gap-6 lg:grid-cols-5",style:{borderTop:"1px solid var(--public-hairline)"},children:t.score.pillars.map(x=>e.jsx(Er,{p:x},x.pillar))})]})}const pt=nt,$a=t=>t.layer==="native-search"?"Web-grounded answers":"Model memory",Aa=t=>{const a=Q(t.sampledAt??void 0),s=Q(t.sampledFrom??void 0);return a?s&&s!==a?`${s} â ${a}`:a:"Date unavailable"};function Pr({engines:t}){const a=j.useId(),s=j.useMemo(()=>t?Za(t):null,[t]),n=s?Ut(s):null,l=!!s?.axes.length&&s.measured===0,[i,r]=j.useState(null),o=s?.axes.find(y=>y.id===i)??s?.axes[0],c=j.useMemo(()=>s?er(s,{idPrefix:a,colors:{native:"var(--public-chart-mark)",memory:"var(--public-chart-compare)",grid:"var(--public-hairline-strong)",text:"var(--public-ink)",muted:"var(--public-ink-2)"}}):"",[s,a]),d=s?.axes.filter(y=>y.layer==="native-search"&&y.rate!==null)??[],p=s?.axes.filter(y=>y.layer==="model-memory"&&y.rate!==null)??[],u=d.reduce((y,m)=>y+m.answers,0),h=d.reduce((y,m)=>y+m.mentioned,0),x=t?.voice?.byEngine.filter(y=>d.some(m=>m.id===y.id)&&Number.isSafeInteger(y.cited)&&y.cited>=0&&y.cited<=y.asked)??[],f=x.reduce((y,m)=>y+m.cited,0),b=x.reduce((y,m)=>y+m.asked,0);return e.jsxs("section",{className:"aeo-model-visibility","data-testid":"model-visibility-radar","aria-labelledby":`${a}-heading`,children:[e.jsxs("style",{children:[Zi,Xi]}),e.jsxs("div",{className:"aeo-visibility-heading",children:[e.jsxs("div",{children:[e.jsx("p",{className:"aeo-chapter-kicker",children:"Observed AI visibility"}),e.jsx("h2",{id:`${a}-heading`,children:"Unprompted brand mentions"})]}),e.jsx("span",{className:"aeo-coverage-label",children:s?`${s.measured} of ${s.total} models measured`:t===void 0?"Checking answer evidence":"Answer evidence unavailable"})]}),e.jsx("p",{className:"aeo-chapter-bridge",children:l?"Dated answer samples are not available for this model panel.":"The questions describe your business category without naming your brand. Results show how often each model names it in completed answers."}),e.jsxs("dl",{className:"aeo-visibility-kpis",children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Search mention rate"}),e.jsx("dd",{children:pt(u?h/u*100:null)}),e.jsx("p",{children:u?`${h} of ${u} web-grounded answers`:"No web-grounded answers measured"})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Search citation rate"}),e.jsx("dd",{children:pt(b?f/b*100:null)}),e.jsx("p",{children:b?`${f} of ${b} web-grounded answers`:"No citation sample measured"})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Model coverage"}),e.jsx("dd",{children:s?`${s.measured}/${s.total}`:"â"}),e.jsx("p",{children:s?`${d.length} search · ${p.length} model memory`:"Available results appear as they arrive"})]})]}),s&&s.axes.length>0?e.jsxs(e.Fragment,{children:[n&&e.jsx("div",{dangerouslySetInnerHTML:{__html:Ji(s)}}),l&&e.jsx("p",{className:"aeo-evidence-empty",children:"No completed answer samples"}),e.jsx("div",{dangerouslySetInnerHTML:{__html:Qi(s)}}),e.jsx("p",{className:"aeo-value-explanation",children:"Bars use a shared 0â100% scale. 0% means the business was not named in completed answers; it does not mean the calls failed. A dash means no measured rate."}),e.jsxs("div",{className:`aeo-radar-layout${n||l?" aeo-radar-inspection-only":""}`,children:[!n&&!l&&e.jsxs("details",{className:"aeo-radar-visual",children:[e.jsx("summary",{children:"Explore the optional radar view"}),e.jsxs("figure",{className:"aeo-radar-figure",children:[e.jsx("div",{dangerouslySetInnerHTML:{__html:c}}),e.jsxs("figcaption",{children:[e.jsxs("span",{className:"aeo-radar-key",children:[e.jsx("i",{className:"aeo-radar-native"}),"Web-grounded answers"]}),e.jsxs("span",{className:"aeo-radar-key",children:[e.jsx("i",{className:"aeo-radar-memory"}),"Model memory"]})]}),e.jsx("p",{children:n?"Each row shows a recorded result. A dash means not measured.":l?"A dash means not measured. No visibility value is inferred.":"0â100% on every spoke. Missing points mean unmeasured; line breaks separate measurement layers. The shape is not an overall score."})]})]}),e.jsxs("div",{className:"aeo-radar-inspector print-hide",children:[e.jsx("div",{className:"aeo-radar-selector",role:"group","aria-label":"Inspect a model",children:s.axes.map(y=>e.jsxs("button",{type:"button","aria-pressed":o?.id===y.id,onClick:()=>r(y.id),children:[e.jsx("span",{children:Ne(y)}),e.jsx("strong",{children:pt(y.rate)})]},y.id))}),o&&e.jsxs("div",{className:"aeo-radar-detail","aria-live":"polite","aria-atomic":"true",children:[e.jsx("p",{className:"aeo-chapter-kicker",children:$a(o)}),e.jsx("h3",{children:Ne(o,!0)}),e.jsx("p",{className:"aeo-radar-reading",children:kt(o)}),e.jsx("p",{children:o.rate===null?"No completed answer sample is available for this model. It contributes no value to the chart.":`${o.mentioned} of ${o.answers} sampled answers named ${s.brand||s.domain}. ${o.firstPositions?"The recorded #1 result applies only to those sampled answers.":"Mention rate does not establish a re
20commendation position."}`}),e.jsxs("dl",{children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Sample dates"}),e.jsx("dd",{children:Aa(o)})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Coverage"}),e.jsxs("dd",{children:[o.answers,o.expected!==null?` of ${o.expected}`:""," answers · ",o.coverage]})]})]}),o.layer==="model-memory"&&e.jsx("p",{className:"aeo-radar-scope",children:"This is a model-memory comparison without live web search. It is separate from search mention and citation rates."}),o.model&&e.jsxs("p",{className:"aeo-radar-model",children:["Model: ",o.model]})]})]})]}),e.jsxs("details",{className:"aeo-evidence-disclosure aeo-radar-data",children:[e.jsx("summary",{children:"View exact model results and dates"}),e.jsx("div",{className:"aeo-table-scroll",children:e.jsxs("table",{children:[e.jsxs("caption",{children:["Unprompted brand mentions · ",s.brand||s.domain,". Web-grounded and model-memory samples are separate measurement layers."]}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",children:"Model / layer"}),e.jsx("th",{scope:"col",children:"Mention rate"}),e.jsx("th",{scope:"col",children:"Completed / named"}),e.jsx("th",{scope:"col",children:"Recorded result"}),e.jsx("th",{scope:"col",children:"Sample dates"})]})}),e.jsx("tbody",{children:s.axes.map(y=>e.jsxs("tr",{children:[e.jsxs("th",{scope:"row",children:[Ne(y,!0),e.jsx("small",{children:$a(y)}),y.model&&e.jsx("small",{children:y.model})]}),e.jsx("td",{children:y.rate===null?"Not measured":`${y.rate.toFixed(1)}%`}),e.jsx("td",{children:y.rate===null?"â":`${y.answers} completed · ${y.mentioned} named`}),e.jsx("td",{children:kt(y)}),e.jsx("td",{children:Aa(y)})]},y.id))})]})})]})]}):e.jsx("p",{className:"aeo-evidence-empty",children:"Your readiness audit is available. Model visibility appears when dated AI answers have been collected; no visibility score is inferred from the website grade."})]})}const ns=[{id:"summary",label:"Overview"},{id:"engines",label:"AI visibility"},{id:"competition",label:"Competitors"},{id:"plan",label:"Action plan"},{id:"trend",label:"Progress"}],is=".prompeteer-nav-shell",Ir=12,it=68;function Dr(){if(typeof document>"u")return it;const t=document.querySelector(is);return t?Math.max(0,t.getBoundingClientRect().bottom):it}function Lr({sections:t,onCta:a,ctaLabel:s="Create action plan",meta:n}){const l=j.useRef(null),i=j.useRef(null),r=j.useRef(null),o=j.useRef(it),c=j.useRef(0),[d,p]=j.useState(it),[u,h]=j.useState(0),[x,f]=j.useState(!1),[b,y]=j.useState(t[0]?.id??null),[m,w]=j.useState(!1),g=j.useCallback(()=>{const $=r.current;$&&w($.scrollWidth-$.clientWidth-$.scrollLeft>1)},[]);j.useEffect(()=>{const $=l.current;if(!$)return;const T=()=>{const k=Dr();o.current=k,p(k);const D=$.getBoundingClientRect().height;h(D);const P=k+D+Ir;c.current=P,$.closest(".report-root")?.style.setProperty("--report-nav-offset",`${Math.round(P)}px`),g()};if(T(),typeof ResizeObserver>"u")return window.addEventListener("resize",T),()=>window.removeEventListener("resize",T);const E=new ResizeObserver(T);E.observe($);const N=document.querySelector(is);return N&&E.observe(N),()=>E.disconnect()},[g]),j.useEffect(()=>{if(!t.length)return;let $=0,T=!1;const E=()=>{const k=i.current;k&&f(k.getBoundingClientRect().top<=o.current+.5);const D=document.documentElement;if(D.scrollHeight>window.innerHeight&&window.innerHeight+window.scrollY>=D.scrollHeight-2){y(t[t.length-1].id);return}const H=c.current+1;let K=null;for(const z of t){const v=document.getElementById(z.id);v&&v.getBoundingClientRect().top<=H&&(K=z.id)}y(K??t[0].id)},N=()=>{T||(T=!0,$=requestAnimationFrame(()=>{T=!1,E()}))};return E(),window.addEventListener("scroll",N,{passive:!0}),window.addEventListener("resize",N),()=>{window.removeEventListener("scroll",N),window.removeEventListener("resize",N),$&&cancelAnimationFrame($)}},[t]),j.useEffect(()=>{const $=r.current;if(!b||!$)return;const T=$.querySelector(`[data-section-id="${b}"]`);if(!T)return;const E=T.offsetLeft,N=E+T.offsetWidth;E<$.scrollLeft?$.scrollLeft=Math.max(0,E-8):N>$.scrollLeft+$.clientWidth&&($.scrollLeft=N-$.clientWidth+8),g()},[b,g]);const C=j.useCallback($=>T=>{const E=document.getElementById($);if(!E)return;T.preventDefault();const N=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;E.scrollIntoView({behavior:N?"auto":"smooth",block:"start"}),typeof history<"u"&&history.replaceState&&history.replaceState(null,"",`#${$}`),y($)},[]);return t.length?e.jsx("div",{ref:i,"data-testid":"report-nav-slot",className:"print-hide",style:{height:x?u:void 0},children:e.jsx("nav",{ref:l,"data-testid":"report-nav","aria-label":"Report sections","data-stuck":x?"true":void 0,className:`report-nav print-hide z-30 ${x?"fixed left-0 right-0 px-5 md:px-10 py-1":"relative"}
20`,style:{top:x?d:void 0},children:e.jsxs("div",{"data-testid":"report-nav-pill",className:`${x?"max-w-[1360px] mx-auto shadow-lift":"shadow-rest"} flex items-center gap-3 rounded-[var(--public-radius-surface)] border border-[var(--public-hairline)] bg-[var(--public-ground)] pl-2 pr-3 sm:pr-4 transition-shadow duration-shadow ease-public motion-reduce:transition-none`,children:[e.jsxs("div",{className:"relative flex-1 min-w-0",children:[e.jsx("div",{ref:r,"data-testid":"report-nav-list",onScroll:g,className:"min-w-0 overflow-x-auto flex gap-1 px-1",style:{scrollbarWidth:"none"},children:t.map($=>{const T=$.id===b;return e.jsx("a",{href:`#${$.id}`,"data-section-id":$.id,onClick:C($.id),"aria-current":T?"location":void 0,className:"inline-flex items-center shrink-0 min-h-[52px] px-2.5 text-[14px] whitespace-nowrap rounded-none outline-none transition-colors duration-color ease-public motion-reduce:transition-none focus-visible:[box-shadow:var(--public-focus-ring)]",style:{color:T?"var(--public-ink)":"var(--public-ink-2)",fontWeight:600,borderBottom:`2px solid ${T?"var(--public-accent)":"transparent"}`},children:$.label},$.id)})}),m&&e.jsx("div",{"data-testid":"report-nav-fade","aria-hidden":"true",className:"pointer-events-none absolute inset-y-0 right-0 w-6",style:{background:"var(--public-ground)",boxShadow:"-20px 0 20px -4px var(--public-ground)",opacity:.92}})]}),n&&e.jsx("span",{"data-testid":"report-nav-meta",className:"hidden md:inline-flex shrink-0 items-center font-mono text-[12px] whitespace-nowrap",style:{color:"var(--public-ink-3)"},children:n}),a&&x&&e.jsx(G,{size:"sm",onClick:a,className:"hidden md:inline-flex shrink-0 my-1",children:s})]})})}):null}const _r={summary:"Readiness, model visibility and immediate priorities.",engines:"Dated answers, citations and recorded positions.",competition:"Your position against competitors and peers.",plan:"Priorities, supporting evidence and verification steps.",trend:"Readiness, visibility and business outcomes over time."},Or=ns.map(t=>({id:t.id,title:t.label,note:_r[t.id]}));function Fr(t){const a=new Set(t.map(s=>s.id));return Or.filter(s=>a.has(s.id))}function Wr({sections:t,children:a}){const s=Fr(t);return e.jsxs("div",{"data-testid":"report-cover",className:"report-cover",children:[a,e.jsxs("nav",{"data-testid":"report-cover-contents","aria-label":"Contents",className:"report-cover-contents hidden pt-5 mt-2",style:{borderTop:"1px solid var(--public-hairline)"},children:[e.jsx("div",{className:"font-mono text-[10.5px] tracking-[0.13em] mb-3",style:{color:"var(--public-ink-3)"},children:"CONTENTS"}),e.jsx("ol",{className:"m-0 p-0 list-none grid grid-cols-3 gap-x-8",children:s.map((n,l)=>e.jsxs("li",{"data-testid":"report-cover-entry",className:"grid gap-x-3 py-1.5 items-baseline",style:{gridTemplateColumns:"22px minmax(0,1fr)",borderBottom:"1px solid var(--public-hairline)"},children:[e.jsx("span",{className:"font-mono text-[11px] tabular-nums",style:{color:"var(--public-ink-3)"},children:String(l+1).padStart(2,"0")}),e.jsxs("span",{className:"min-w-0",children:[e.jsx("span",{className:"block text-[13.5px] font-semibold tracking-[-0.01em]",style:{color:"var(--public-ink)"},children:n.title}),e.jsx("span",{className:"report-cover-note block text-[11.5px] leading-snug",style:{color:"var(--public-ink-2)"},children:n.note})]})]},n.id))})]})]})}function Ur(t){if(!t)return null;const a=new Date(t);if(!Number.isFinite(a.getTime()))return null;const s=a.getUTCDate();a.setUTCDate(1),a.setUTCMonth(a.getUTCMonth()+1);const n=new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth()+1,0)).getUTCDate();return a.setUTCDate(Math.min(s,n)),a.toISOString()}function Br({fetchedAt:t,engines:a,sample:s=!1,now:n=Date.now()}){const l=Ur(t),i=l!==null&&Date.parse(l)<=n,r=a?.corpus,o=[{label:"Website snapshot",value:Q(t)||"Date unavailable",detail:s?"Historical sample. It does not refresh.":"The crawl behind this report. Re-measure after publishing fixes."},{label:"AI answer evidence",value:a?r?.status==="ready"?Q(r.sampledAt)||"Sample date unavailable":r?.status==="pending"?"Awaiting a sample":"Unavailable":a===void 0?"Loading evidence":"Unavailable",detail:r?.status==="ready"?`${r.questions} sampled buyer questions. API answers can differ from consumer apps.`:"Missing answers are unmeasured. They are never a zero visibility score."},{label:"Monthly review",value:s?"Example only":l?`${i?"Due since ":"Due "}${Q(l)}`:"Date unavailable",detail:s?"Your report will show its own review date.":"Review the company, competitors and questions each month. Watch emails cover score changes."}];return e.jsx("aside",{"aria-label":"Report freshness and review schedule","data-testid":"report-freshness",className:"my-4 roun
20ded-xl px-5 py-4",style:{background:"var(--public-paper)",border:"1px solid var(--public-hairline)"},children:e.jsx("dl",{className:"m-0 grid grid-cols-1 gap-5 md:grid-cols-3 md:gap-8",children:o.map(c=>e.jsxs("div",{className:"min-w-0",children:[e.jsx("dt",{className:"text-[12px] font-medium",style:{color:"var(--public-ink-2)"},children:c.label}),e.jsx("dd",{className:"m-0 mt-1 text-[14px] font-semibold",children:c.value}),e.jsx("dd",{className:"m-0 mt-1 text-[12.5px] leading-relaxed",style:{color:"var(--public-ink-2)"},children:c.detail})]},c.label))})})}function qr(t,a=!1){const[s,n]=j.useState(null);return j.useEffect(()=>{if(n(null),a||!t)return;let l=!1;const i=new AbortController,r=window.setTimeout(()=>i.abort(),65e3);return V(`/api/aeo/advisor/${encodeURIComponent(t)}`,{signal:i.signal}).then(o=>o.ok?o.json():null).then(o=>{!l&&o?.token===t&&o?.reading&&n(o)}).catch(()=>{}).finally(()=>window.clearTimeout(r)),()=>{l=!0,i.abort(),window.clearTimeout(r)}},[t,a]),!a&&s?.token===t?s:null}function zr(t,a){if(!t.length||!Number.isFinite(a))return null;let s=0,n=1/0;for(let l=0;l<t.length;l++){const i=Math.abs(t[l]-a);i<n&&(n=i,s=l)}return s}function Hr(t,a,s){return!(a.width>0)||!Number.isFinite(t)?null:(t-a.left)/a.width*s}const Yr=new Set(["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Home","End","Escape"]);function rs(t,a){const[s,n]=j.useState(null),[l,i]=j.useState(null),r=j.useRef(t);r.current=t;const o=j.useRef(a);o.current=a;const c=j.useCallback((h,x="pointer")=>{n(h),i(h===null?null:x)},[]),d=j.useCallback(()=>c(null),[c]),p=j.useCallback(h=>{const x=h.currentTarget.getBoundingClientRect(),f=Hr(h.clientX,x,o.current);if(f===null)return;const b=zr(r.current,f);b!==null&&c(b,"pointer")},[c]),u=j.useCallback(h=>{const x=r.current.length;if(!x||!Yr.has(h.key))return;if(h.preventDefault(),h.key==="Escape"){c(null);return}const f=s!==null&&s<x?s:null,b=f??x-1,y=h.key==="Home"?0:h.key==="End"?x-1:h.key==="ArrowLeft"||h.key==="ArrowUp"?Math.max(0,b-1):f===null?b:Math.min(x-1,b+1);c(y,"keyboard")},[s,c]);return{active:s!==null&&s<t.length?s:null,source:l,set:c,clear:d,surface:{onPointerMove:p,onPointerDown:p,onPointerLeave:d,onPointerCancel:d},keyboard:{tabIndex:t.length?0:-1,onKeyDown:u,onBlur:d}}}function ls({x:t,y1:a,y2:s,markY:n,markRadius:l=5.5,color:i="var(--public-chart-mark-strong, var(--public-highlight-ink))",testId:r="chart-crosshair"}){return e.jsxs("g",{"data-testid":r,className:"print-hide","aria-hidden":"true",style:{pointerEvents:"none"},children:[e.jsx("line",{x1:t,x2:t,y1:a,y2:s,stroke:"var(--public-hairline-strong)",strokeWidth:"1",strokeDasharray:"3 3"}),typeof n=="number"&&e.jsxs(e.Fragment,{children:[e.jsx("circle",{cx:t,cy:n,r:l+3,fill:"none",stroke:"var(--public-ground)",strokeWidth:"3"}),e.jsx("circle",{"data-testid":`${r}-mark`,cx:t,cy:n,r:l+3,fill:"none",stroke:i,strokeWidth:"1.5"})]})]})}function Gr(t,a,s){const n=Math.max(0,Math.min(100,t)),l=Math.max(0,Math.min(100,a)),r=l<45?"calc(0% + 12px)":"calc(-100% - 12px)";if(s&&s.cardWidth>0&&s.boxWidth>0){const c=n/100*s.boxWidth,d=n<20?c:n>80?c-s.cardWidth:c-s.cardWidth/2;return{left:`${Math.max(0,Math.min(Math.max(0,s.boxWidth-s.cardWidth),d)).toFixed(2)}px`,top:`${l.toFixed(3)}%`,transform:`translate(0, ${r})`}}const o=n<20?"0%":n>80?"-100%":"-50%";return{left:`${n.toFixed(3)}%`,top:`${l.toFixed(3)}%`,transform:`translate(${o}, ${r})`}}function os({xPct:t,yPct:a,title:s,rows:n,footer:l,testId:i="chart-tooltip"}){const r=j.useRef(null),[o,c]=j.useState(null);return j.useLayoutEffect(()=>{const d=r.current,p=d?.offsetParent,u=d&&p&&d.offsetWidth>0&&p.clientWidth>0?{cardWidth:d.offsetWidth,boxWidth:p.clientWidth}:null;c(h=>h?.cardWidth===u?.cardWidth&&h?.boxWidth===u?.boxWidth?h:u)}),e.jsxs("div",{ref:r,"data-testid":i,role:"tooltip",className:"print-hide absolute z-10 pointer-events-none rounded-md px-2.5 py-1.5 shadow-sm max-w-full",style:{...Gr(t,a,o),background:"var(--public-ground)",border:"1px solid var(--public-hairline-strong)",minWidth:"96px"},children:[e.jsx("div",{className:"text-[11.5px] leading-tight whitespace-nowrap",style:{color:"var(--public-ink-3)"},children:s}),e.jsx("ul",{className:"m-0 mt-1 p-0 list-none flex flex-col gap-0.5",children:n.map((d,p)=>e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[d.color&&e.jsx("span",{"aria-hidden":"true",className:"inline-block shrink-0 rounded-sm",style:{width:"12px",height:"2px",background:d.color,transform:"translateY(-3px)"}}),e.jsx("span",{className:"text-[13px] font-semibold tabular-nums whitespace-nowrap",style:{color:"var(--public-ink)"},children:d.value}),e.jsx("span",{className:"text-[11.5px]",style:{color:"var(--public-ink-2)"},children:d.label})]},d.key??`${d.label}-${p}`))}),l&&e.jsx("div",{className:"mt-1 text-[11.5px] leading-tight",style:{color:"var(--public-ink-2)"},children:l})]})}function cs({text:t,testId:a="chart-announcer"}){return e.jsx("span",{"data-testid":a,className:"sr-only",role:"status","aria-live":"polite",children:t})}const Vr={30:"30 days",90:"90 days",all:"All"},Kr=[30,90],Qr=864e5,Sa=t=>new Date(t).getTime();function Xr(t,a){return a==="all"?-1/0:t-a*Qr}function ds(t,a,s){if(s==="all"||!t.length)return[...t];const n=t.map(i=>Sa(a(i))).filter(i=>Number.isFinite(i));if(!n.length)return[...t];const l=Xr(Math.max(...n),s);return t.filter(i=>{const r=Sa(a(i));return!Number.isFinite(r)||r>=l})}function Jr(t,a){return[...Kr.filter(n=>{const l=ds(t,a,n).length;return l>=2&&l<t.length}),"all"]}function Zr({options:t,value:a,onChange:s,label:n="Time range",testId:l="chart-range"}){return t.length<2?null:e.jsx("span",{"data-testid":l,role:"group","aria-label":n,className:"print-hide inline-flex items-center gap-1",children:t.map(i=>{const r=i===a;return e.jsx("button",{type:"button","data-testid":"chart-range-option","data-range":String(i),"aria-pressed":r,onClick:()=>s(i),className:"text-[11.5px] leading-none rounded-[calc(var(--public-radius-control)-3px)] px-2 py-1 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",style:{color:r?"var(--public-ink)":"var(--public-ink-2)",background:r?"var(--public-paper)":"transparent",border:`1px solid ${r?"var(--public-hairline-strong)":"transparent"}`,outlineColor:"var(--public-ink)"}
20,children:Vr[String(i)]??String(i)},String(i))})})}const At="text-[11.5px] tabular-nums",St="var(--public-ink-2)",mt=(t,a)=>`${(t/a*100).toFixed(3)}%`,el={start:"none",middle:"translateX(-50%)",end:"translateX(-100%)"};function tl({id:t,geometry:a,ariaLabel:s,guides:n=[],baselineY:l,ticks:i=[],xLabels:r=[],xLabelTestId:o,surface:c,overlay:d,empty:p,emptyTestId:u,children:h}){const{width:x,height:f,padL:b,padR:y}=a,{className:m,...w}=c??{};return p?e.jsx("p",{"data-testid":u??`${t}-empty`,className:"text-[13px] leading-relaxed max-w-[70ch] mt-1",style:{color:"var(--public-ink-2)"},children:p}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative mt-1",children:[e.jsxs("svg",{"data-testid":`${t}-chart`,viewBox:`0 0 ${x} ${f}`,className:m?`w-full h-auto block ${m}`:"w-full h-auto block",role:"img","aria-label":s,...w,children:[n.map(g=>e.jsx("g",{"data-testid":`${t}-guide-${g.key}`,children:e.jsx("line",{x1:b,x2:x-y,y1:g.y,y2:g.y,stroke:"var(--public-hairline)",strokeDasharray:"3 4"})},g.key)),typeof l=="number"&&e.jsx("line",{x1:b,x2:x-y,y1:l,y2:l,stroke:"var(--public-hairline-strong)"}),typeof l=="number"&&i.map(g=>e.jsx("line",{"data-testid":`${t}-tick`,x1:g.x,x2:g.x,y1:l,y2:l+5,stroke:"var(--public-hairline-strong)",strokeWidth:"1"},g.key)),h]}),n.map(g=>g.label&&e.jsx("span",{"data-testid":`${t}-guide-label-${g.key}`,"aria-hidden":"true",className:`absolute left-0 text-right leading-none ${At}`,style:{width:mt(b-6,x),top:mt(g.y,f),transform:"translateY(-50%)",color:St},children:g.label},g.key)),d]}),r.length>0&&e.jsx("div",{className:`relative h-[16px] mt-1 leading-[16px] ${At}`,style:{color:St},"aria-hidden":"true",children:r.map(g=>e.jsx("span",{"data-testid":o??`${t}-x-label`,className:"absolute top-0 whitespace-nowrap",style:{left:mt(g.x,x),transform:el[g.align??"middle"]},children:g.text},g.key))})]})}function al({caption:t,columns:a,rows:s}){return e.jsx("div",{className:"sr-only",children:e.jsxs("table",{children:[e.jsx("caption",{children:t}),e.jsx("thead",{children:e.jsx("tr",{children:a.map(n=>e.jsx("th",{children:n},n))})}),e.jsx("tbody",{children:s.map(n=>e.jsx("tr",{children:n.cells.map((l,i)=>e.jsx("td",{children:l===null?"â":l},i))},n.key))})]})})}const ge=t=>es(t.total),fe=[["retrievability","Retrievability"],["parseability","Parseability"],["answerability","Answerability"],["entity","Entity and trust"],["agent","Agent readiness"]],sl=Bt.find(([,t])=>t==="B"),us=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],le="var(--public-chart-mark-strong, var(--public-highlight-ink))",ps="rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",ms={outlineColor:"var(--public-ink)"},te=t=>{const a=new Date(t);return Number.isNaN(a.getTime())?t.slice(0,10):`${a.getUTCDate()} ${us[a.getUTCMonth()]} ${a.getUTCFullYear()}`},nl=t=>{const a=new Date(t);return Number.isNaN(a.getTime())?t.slice(5,10):`${a.getUTCDate()} ${us[a.getUTCMonth()]}`},Ct=t=>t>0?`+${t}`:t<0?`â${-t}`:"±0",hs=t=>`${t} measurement${t===1?"":"s"}`;function xs(t){if(t.length<2)return"First measurement. The trend appears after the next one.";const a=t[0],s=t[t.length-1];let n=null;for(const[i,r]of fe){const o=a.pillars[i],c=s.pillars[i];typeof o!="number"||typeof c!="number"||(!n||Math.abs(c-o)>Math.abs(n[1]))&&(n=[r,c-o])}const l=n?n[1]===0?"; no pillar moved.":`; biggest move ${n[0]} ${Ct(n[1])}.`:".";return`Since ${te(a.auditedAt)}: ${Ct(s.total-a.total)} points${l}`}const rt=t=>Math.max(0,Math.min(100,t));function Ca(t){if(!t.length)return[0,100];const a=Math.min(...t.map(rt)),s=Math.max(...t.map(rt));let n=Math.max(0,Math.floor(a/10)*10-10),l=Math.min(100,Math.ceil(s/10)*10+10);for(;l-n<30;)if(n>0)n-=10;else if(l<100)l+=10;else break;return[n,l]}const gs=(t,[a,s])=>1-(rt(t)-a)/(s-a);function il(t,a,s=5){const n=ar(t[0],t[1]);if(n.length<=s)return n;const l=i=>Math.min(...a.map(r=>Math.abs(rt(r)-i)));return n.map((i,r)=>({g:i,i:r,d:l(i[0])})).sort((i,r)=>i.d-r.d||i.i-r.i).slice(0,s).sort((i,r)=>r.g[0]-i.g[0]).map(({g:i})=>i)}function rl(t,a=70){const s=t.length;if(s<=1)return s?[0]:[];const n=s-1;if(s>6)return[0,n];const l=[0];for(let i=1;i<n;i++)t[i]-t[l[l.length-1]]>=a&&t[n]-t[i]>=a&&l.push(i);return l.push(n),l}function ll(t,a){return t.some(s=>s.cx+s.r>=a.x0&&s.cx-s.r<=a.x1&&s.cy+s.r>=a.y0&&s.cy-s.r<=a.y1)}function ol({label:t,values:a,count:s,testId:n,dom:l,guideLabel:i,hintId:r}){const p=N=>s===1?60:4+N/(s-1)*112,u=N=>4+gs(N,l)*26,h=a.length,x=a[h-1],f=h>1?x.v-a[0].v:0,[b,y]=sl,m=b>=l[0]&&b<=l[1],w=u(b),g=a.map((N,k)=>({cx:p(N.i),cy:u(N.v),r:k===h-1?3:1.75})),C=rs(g.map(N=>N.cx),120),$=C.active!==null?a[C.active]:null,T=i&&m&&!ll(g,{x0:109,x1:117,y0:w-9.5,y1:w-1}),E=h===0?`${t}: not measured`:h===1?`${t}, 1 measurement: ${x.v}`:`${t} over ${hs(h)}: ${a[0].v} â ${x.v}`;
20return e.jsxs("div",{"data-testid":"trend-spark","data-pillar":n,"data-domain":`${l[0]}-${l[1]}`,className:"min-w-0",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[e.jsx("span",{className:"text-[12.5px] font-medium truncate",style:{color:"var(--public-ink)"},children:t}),e.jsx("span",{"data-testid":`trend-spark-${n}`,className:"text-[12.5px] tabular-nums whitespace-nowrap",style:{color:"var(--public-ink-2)"},children:h===0?"â":e.jsxs(e.Fragment,{children:[x.v,h>1&&e.jsxs(e.Fragment,{children:[" · ",e.jsx("span",{"data-testid":"trend-spark-delta",style:{color:qa(f)},children:Ct(f)})]})]})})]}),e.jsxs("div",{className:"relative mt-1",children:[e.jsxs("svg",{viewBox:"0 0 120 34",className:`w-full h-auto block ${ps}`,style:ms,role:"img","aria-label":E,"aria-describedby":r,...C.surface,...C.keyboard,children:[m&&e.jsx("g",{"data-testid":"trend-spark-guide","data-guide":b,children:e.jsx("line",{x1:4,x2:116,y1:w,y2:w,stroke:"var(--public-hairline-strong)",strokeDasharray:"2 3"})}),h>1&&e.jsx("polyline",{fill:"none",stroke:"var(--public-ink-2)",strokeWidth:"1.5",strokeLinejoin:"round",strokeLinecap:"round",points:a.map(N=>`${p(N.i).toFixed(1)},${u(N.v).toFixed(1)}`).join(" ")}),a.map((N,k)=>e.jsxs("g",{"data-testid":"trend-spark-point",children:[e.jsx("title",{children:`${te(N.at)} · ${t} ${N.v}`}),e.jsx("circle",{cx:g[k].cx,cy:g[k].cy,r:g[k].r,fill:k===h-1?le:"var(--public-ink-2)"})]},N.at)),$&&C.active!==null&&e.jsx(ls,{testId:"trend-spark-crosshair",x:g[C.active].cx,y1:4,y2:30,markY:g[C.active].cy,markRadius:g[C.active].r,color:le})]}),T&&e.jsx("span",{"data-testid":"trend-spark-guide-label","aria-hidden":"true",className:`absolute right-0 leading-none ${At}`,style:{top:`${w/34*100}%`,transform:"translateY(calc(-100% - 1px))",color:St},children:y}),$&&C.active!==null&&e.jsx(os,{testId:"trend-spark-tooltip",title:te($.at),rows:[{value:String($.v),label:t,color:le}],xPct:g[C.active].cx/120*100,yPct:g[C.active].cy/34*100})]}),e.jsx(cs,{testId:"trend-spark-announcer",text:$?`${t}, ${te($.at)}: ${$.v}`:""})]})}function cl({point:t}){return e.jsxs("div",{"data-testid":"score-trend","data-compact":"true",className:"flex flex-col gap-3",children:[e.jsxs("div",{"data-testid":"trend-compact",className:"flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1",children:[e.jsxs("span",{className:"flex items-baseline gap-2",children:[e.jsx("span",{className:"text-[12.5px]",style:{color:"var(--public-ink-2)"},children:"Total score, 0â100"}),e.jsxs("span",{"data-testid":"trend-latest",className:"text-[15px] font-semibold tabular-nums whitespace-nowrap",style:{color:"var(--public-ink)"},children:[e.jsx("span",{className:"sr-only",children:"Latest "}),W(ge(t),t.total)]})]}),e.jsx("span",{"data-testid":"trend-date",className:"text-[12.5px] tabular-nums whitespace-nowrap",style:{color:"var(--public-ink-2)"},children:te(t.auditedAt)})]}),e.jsx("ul",{"data-testid":"trend-compact-pillars",className:"m-0 p-0 list-none flex flex-wrap gap-x-5 gap-y-1 text-[12.5px]","aria-label":"Pillar scores, out of 100",children:fe.map(([a,s])=>{const n=t.pillars[a];return e.jsxs("li",{"data-pillar":a,className:"flex items-baseline gap-1.5 whitespace-nowrap",children:[e.jsx("span",{style:{color:"var(--public-ink-2)"},children:s})," ",e.jsx("span",{"data-testid":`trend-spark-${a}`,className:"font-medium tabular-nums",style:{color:"var(--public-ink)"},children:typeof n=="number"?n:e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":"true",children:"â"}),e.jsx("span",{className:"sr-only",children:"not measured"})]})})]},a)})}),e.jsx("p",{"data-testid":"trend-insight",className:"text-[13px] leading-relaxed max-w-[70ch]",style:{color:"var(--public-ink-2)"},children:xs([t])}),e.jsx(fs,{points:[t]})]})}function fs({points:t}){return e.jsx(al,{caption:"Score out of 100 by measurement",columns:["Date","Total","Grade",...fe.map(([,a])=>a)],rows:t.map(a=>({key:a.auditId,cells:[te(a.auditedAt),a.total,ge(a),...fe.map(([s])=>typeof a.pillars[s]=="number"?a.pillars[s]:null)]}))})}function dl({points:t}){const a=Jr(t,v=>v.auditedAt),[s,n]=j.useState("all"),i=Va()||!a.includes(s)?"all":s,r=ds(t,v=>v.auditedAt,i),o=640,c=200,d=40,p=20,u=14,h=10,x=r.map(v=>new Date(v.auditedAt).getTime()),f=Math.min(...x),b=Math.max(...x),y=v=>{const M=o-d-p;return b===f?d+v/(r.length-1)*M:d+(x[v]-f)/(b-f)*M},m=Ca(r.map(v=>v.total)),w=v=>u+gs(v,m)*(c-u-h),g=r.length-1,C=r.map((v,M)=>y(M)),$=w(m[0]),T=rl(C),E=r.length>6,N=il(m,r.map(v=>v.total)),k=rs(C,o),D=j.useId(),P=k.active!==null?r[k.active]:null,q=P?`${te(P.auditedAt)} · ${W(ge(P),P.total,{outOf:!0})}`:"",H=Ca(r.flatMap(v=>fe.map(([M])=>
20v.pillars[M]).filter(M=>typeof M=="number"))),K=e.jsx("span",{className:"text-[12.5px]",style:{color:"var(--public-ink-2)"},children:"Total score, 0â100"}),z=T.map(v=>({key:r[v].auditId,x:C[v],text:v===0||v===g?te(r[v].auditedAt):nl(r[v].auditedAt),align:v===0?"start":v===g?"end":"middle"}));return e.jsxs("div",{"data-testid":"score-trend",className:"flex flex-col gap-5",children:[e.jsx("span",{id:D,"data-testid":"trend-keys",className:"sr-only",children:"Use the left and right arrow keys to step through the measurements; Home and End jump to the first and last."}),e.jsxs("figure",{className:"m-0 min-w-0",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[a.length>1?e.jsxs("span",{className:"flex items-baseline gap-3",children:[K,e.jsx(Zr,{testId:"trend-range",options:a,value:i,onChange:n,label:"Score history range"})]}):K,e.jsxs("span",{"data-testid":"trend-latest",className:"text-[15px] font-semibold tabular-nums whitespace-nowrap",style:{color:"var(--public-ink)"},children:[e.jsx("span",{className:"sr-only",children:"Latest "}),W(ge(r[g]),r[g].total)]})]}),e.jsxs(tl,{id:"trend",geometry:{width:o,height:c,padL:d,padR:p},ariaLabel:`Total score over ${hs(r.length)}, latest ${W(ge(r[g]),r[g].total,{outOf:!0})}`,guides:N.map(([v,M])=>({key:M,y:w(v),label:M})),baselineY:$,ticks:E?r.map((v,M)=>({key:v.auditId,x:C[M]})):[],xLabels:z,xLabelTestId:"trend-date",surface:{...k.surface,...k.keyboard,className:ps,style:ms,"aria-describedby":D},overlay:P&&k.active!==null&&e.jsx(os,{testId:"trend-tooltip",title:te(P.auditedAt),rows:[{value:`${P.total}/100`,label:"Total score",color:le},{value:ge(P),label:"Grade"}],xPct:C[k.active]/o*100,yPct:w(P.total)/c*100}),children:[r.length>1&&e.jsx("polyline",{fill:"none",stroke:le,strokeWidth:"2",strokeLinejoin:"round",strokeLinecap:"round",points:r.map((v,M)=>`${C[M].toFixed(1)},${w(v.total).toFixed(1)}`).join(" ")}),r.map((v,M)=>e.jsxs("g",{"data-testid":"trend-point",style:{cursor:"default"},children:[e.jsx("title",{children:`${te(v.auditedAt)} · ${W(ge(v),v.total,{outOf:!0})}`}),e.jsx("circle",{cx:C[M],cy:w(v.total),r:M===g?12:7,fill:"transparent"}),e.jsx("circle",{cx:C[M],cy:w(v.total),r:M===g?5.5:3.5,fill:M===g?le:"var(--public-ground)",stroke:le,strokeWidth:"2"})]},v.auditId)),P&&k.active!==null&&e.jsx(ls,{testId:"trend-crosshair",x:C[k.active],y1:u,y2:$,markY:w(P.total),markRadius:k.active===g?5.5:3.5,color:le})]}),e.jsx(cs,{testId:"trend-announcer",text:q})]}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-x-6 gap-y-4",children:fe.map(([v,M],L)=>e.jsx(ol,{label:M,testId:v,dom:H,count:r.length,guideLabel:L===fe.length-1,hintId:D,values:r.flatMap((O,Y)=>typeof O.pillars[v]=="number"?[{at:O.auditedAt,v:O.pillars[v],i:Y}]:[])},v))}),e.jsx("p",{"data-testid":"trend-insight",className:"text-[13px] leading-relaxed max-w-[70ch]",style:{color:"var(--public-ink-2)"},children:xs(r)}),e.jsx(fs,{points:r})]})}function ul({points:t}){return t.length?t.length<2?e.jsx(cl,{point:t[0]}):e.jsx(dl,{points:t}):null}const pl=[{hex:"#DE1B9D",name:"magenta",shape:"circle"},{hex:"#456FED",name:"blue",shape:"square"},{hex:"#018872",name:"teal",shape:"triangle"},{hex:"#C829D6",name:"orchid",shape:"diamond"},{hex:"#36891A",name:"green",shape:"cross"},{hex:"#0281AC",name:"cyan",shape:"hexagon"},{hex:"#237A5B",name:"forest green",shape:"circle"},{hex:"#A9543D",name:"terracotta",shape:"square"},{hex:"#51856A",name:"sage green",shape:"triangle"}],ml={chatgpt:0,claude:1,"meta-ai":2,perplexity:3,"ai-overviews":4,grok:5,"deepseek-proxy":6,"qwen-proxy":7,"glm-proxy":8},hl="var(--public-chart-neutral, var(--public-ink-3))",xl="grey",qt=t=>pl[ml[t]];function gl(t){return qt(t)?.hex??hl}function fl(t){return qt(t)?.name??xl}function bl(t){return qt(t)?.shape??"circle"}const Ta="var(--public-ink-2)",vl="var(--public-hairline)",bs="var(--public-hairline-strong)";function Ae(t,a,s,n){const l=i=>`M${i.map(([r,o])=>`${r.toFixed(2)},${o.toFixed(2)}`).join("L")}Z`;switch(t){case"square":{const i=n*.88;return l([[a-i,s-i],[a+i,s-i],[a+i,s+i],[a-i,s+i]])}case"triangle":{const i=n*1.2;return l([[a,s-i],[a+i*.92,s+i*.66],[a-i*.92,s+i*.66]])}case"diamond":{const i=n*1.25;return l([[a,s-i],[a+i,s],[a,s+i],[a-i,s]])}case"cross":{const i=n*1.25,r=n*.42;return l([[a-r,s-i],[a+r,s-i],[a+r,s-r],[a+i,s-r],[a+i,s+r],[a+r,s+r],[a+r,s+i],[a-r,s+i],[a-r,s+r],[a-i,s+r],[a-i,s-r],[a-r,s-r]])}case"hexagon":{const i=n*1.15;return l([0,1,2,3,4,5].map(r=>{const o=Math.PI/3*r-Math.PI/2;return[a+i*Math.cos(o),s+i*Math.sin(o)]}))}default:return`M${a-n},${s}a${n},${n} 0 1,0 ${n*2},0a${n},${n} 0 1,0 ${-n*2},0Z`}}function vs({shape:t,color:a,size:s=14,muted:n=!1}){return e.jsxs("svg",{"aria-hidden":"true",width:s,height:s,viewBox:"0 0 14 14",className:"inline-block shrink-0 align-middle",style:{opacity:n?.4:1},children:[e.jsx("line",{x1:"0.5",y1:"7",x2:"13.5",y2:"7",stroke:a,strokeWidth:"2",strokeLinecap:"round"}),e.jsx("path",{d:Ae(t,7,7,3.4),fill:a,stroke:"var(--public-ground)",strokeWidth:"1.4"})]})}
20function zt(t,a,s="Chart"){const[n,l]=j.useState(null),i=j.useRef(null),r=j.useCallback(d=>{const p=i.current?.getBoundingClientRect();if(!p||!p.width||t.length===0)return null;const u=(d-p.left)/p.width*a;let h=0;for(let x=1;x<t.length;x++)Math.abs(t[x]-u)<Math.abs(t[h]-u)&&(h=x);return h},[t,a]),o=j.useCallback(d=>{l(p=>{if(t.length===0)return null;const u=p===null?d>0?0:t.length-1:p+d;return Math.max(0,Math.min(t.length-1,u))})},[t.length]),c={tabIndex:0,role:"application","aria-label":`${s}. Use the left and right arrow keys to read each date; the table below carries the same numbers.`,onPointerMove:d=>l(r(d.clientX)),onPointerLeave:()=>l(null),onFocus:()=>l(d=>d===null&&t.length?t.length-1:d),onBlur:()=>l(null),onKeyDown:d=>{d.key==="ArrowRight"?(d.preventDefault(),o(1)):d.key==="ArrowLeft"?(d.preventDefault(),o(-1)):d.key==="Home"?(d.preventDefault(),l(t.length?0:null)):d.key==="End"?(d.preventDefault(),l(t.length?t.length-1:null)):d.key==="Escape"&&l(null)}};return{index:n,setIndex:l,svgRef:i,handlers:c}}function Ht({x:t,y0:a,y1:s}){return e.jsx("line",{"data-testid":"chart-crosshair",x1:t,x2:t,y1:a,y2:s,stroke:bs,strokeWidth:"1",strokeDasharray:"3 3",pointerEvents:"none"})}function Yt({xPct:t,title:a,rows:s,testId:n="chart-tooltip"}){const l=t<28?{left:`${t}%`,transform:"translateX(-6px)"}:t>72?{left:`${t}%`,transform:"translateX(calc(-100% + 6px))"}:{left:`${t}%`,transform:"translateX(-50%)"};return e.jsxs("div",{"data-testid":n,role:"status","aria-live":"polite",className:"pointer-events-none absolute top-0 z-10 min-w-[132px] max-w-[240px] rounded-xl px-3 py-2",style:{...l,background:"var(--public-ground)",border:"1px solid var(--public-hairline-strong)",boxShadow:"var(--public-shadow-lift)"},children:[e.jsx("div",{className:"text-[11.5px] tabular-nums whitespace-nowrap",style:{color:"var(--public-ink-3)"},children:a}),e.jsx("ul",{className:"m-0 mt-1 p-0 list-none flex flex-col gap-1",children:s.map(i=>e.jsxs("li",{"data-testid":"chart-tooltip-row",className:"flex items-baseline justify-between gap-3 whitespace-nowrap",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[12px] min-w-0",style:{color:"var(--public-ink-2)"},children:[i.color&&e.jsx(vs,{shape:i.shape??"circle",color:i.color,size:12}),e.jsx("span",{className:"truncate",children:i.label})]}),e.jsx("span",{className:"text-[12.5px] font-semibold tabular-nums",style:{color:"var(--public-ink)"},children:i.value})]},i.key))})]})}function ys({items:t,hidden:a,onToggle:s,label:n="Series"}){const l=t.filter(i=>!a.has(i.key)).length;return e.jsx("ul",{"data-testid":"chart-legend","aria-label":n,className:"m-0 p-0 list-none flex flex-wrap items-center gap-x-1.5 gap-y-1",children:t.map(i=>{const r=a.has(i.key),o=!r&&l===1;return e.jsx("li",{children:e.jsxs("button",{type:"button","data-testid":"chart-legend-item","data-series":i.key,"data-hidden":r?"true":"false","aria-pressed":!r,disabled:o,onClick:()=>s(i.key),title:o?"The last visible series stays on":r?`Show ${i.label}`:`Hide ${i.label}`,className:"inline-flex items-center gap-1.5 rounded-[var(--public-radius-control)] px-2 py-1 text-[12px] outline-none focus-visible:[box-shadow:var(--public-focus-ring)] disabled:cursor-default",style:{color:r?"var(--public-ink-3)":"var(--public-ink-2)",textDecoration:r?"line-through":"none"},children:[e.jsx(vs,{shape:i.shape,color:i.color,muted:r}),e.jsx("span",{children:i.label}),i.note&&e.jsx("span",{className:"tabular-nums",style:{color:"var(--public-ink-3)"},children:i.note})]})},i.key)})})}function ws({options:t,value:a,onChange:s,label:n="Date range"}){const l=j.useRef(null);if(t.length<2)return null;const i=t.findIndex(d=>d.key===a),r=i===-1?0:i,o=d=>{const p=Math.max(0,Math.min(t.length-1,d));s(t[p].key),l.current?.children[p]?.focus()},c=d=>{switch(d.key){case"ArrowRight":case"ArrowDown":o(r+1);break;case"ArrowLeft":case"ArrowUp":o(r-1);break;case"Home":o(0);break;case"End":o(t.length-1);break;default:return}d.preventDefault()};return e.jsx("div",{ref:l,"data-testid":"chart-range",role:"radiogroup","aria-label":n,onKeyDown:c,className:"inline-flex items-center gap-px rounded-full p-px",style:{background:"var(--public-hairline)"},children:t.map((d,p)=>{const u=d.key===a;return e.jsx("button",{type:"button",role:"radio","aria-checked":u,tabIndex:p===r?0:-1,"data-testid":"chart-range-option","data-range":d.key,"data-selected":u?"true":"false",onClick:()=>s(d.key),className:"rounded-[calc(var(--public-radius-control)-3px)] px-3 py-1 text-[12px] font-medium outline-none focus-visible:[box-shadow:var(--public-focus-ring)]",style:{background:u?"var(--public-ground)":"transparent",color:u?"var(--public-ink)":"var(--public-ink-2)"},children:d.label},d.key)})})}function Gt({width:t,height:a,padL:s,padR:n,padT:l,padB:i,guides:r,dates:o,ariaLabel:c,empty:d,table:p,overlay:u,children:h,hover:x,testId:f="chart-plot"}){if(d)return e.jsxs("div",{"data-testid":f,"data-state":"empty",children:[e.jsx("p",{"data-testid":"chart-empty",className:"text-[13.5px] leading-relaxed max-w-[68ch]",style:{color:"var(--public-ink-2)"},children:d}),e.jsxs("details",{"data-testid":"chart-data-disclosure",className:"mt-4 text-[13px] print:hidden",children:[e.jsx("summary",{className:"cursor-pointer py-2 font-medium",style:{color:"var(--public-ink-2)"},children:"View data table"}),e.jsx("div",{className:"overflow-x-auto py-2",children:p})]}
20),e.jsx("div",{className:"hidden print:block chart-data-print","aria-hidden":"true",children:p})]});const b=(m,w)=>`${(m/w*100).toFixed(3)}%`,y=m=>m;return e.jsxs("figure",{"data-testid":f,"data-state":"ready",className:"m-0 min-w-0",children:[e.jsxs("div",{className:"relative",children:[e.jsxs("svg",{ref:x?.svgRef,...x?.handlers??{},"data-testid":`${f}-svg`,viewBox:`0 0 ${t} ${a}`,className:"w-full h-auto block touch-pan-y outline-none focus-visible:[box-shadow:var(--public-focus-ring)] rounded-lg","aria-label":x?void 0:c,role:x?void 0:"img",children:[r.map(m=>e.jsx("line",{"data-testid":"chart-guide",x1:s,x2:t-n,y1:y(m.v),y2:y(m.v),stroke:vl,strokeDasharray:"3 4"},m.label)),e.jsx("line",{x1:s,x2:t-n,y1:a-i,y2:a-i,stroke:bs}),h]}),r.map(m=>e.jsx("span",{"data-testid":"chart-guide-label","aria-hidden":"true",className:"absolute left-0 text-right leading-none text-[11.5px] tabular-nums",style:{width:b(s-6,t),top:b(m.v,a),transform:"translateY(-50%)",color:Ta},children:m.label},m.label)),u]}),e.jsx("div",{className:"relative h-[16px] mt-1 leading-[16px] text-[11.5px] tabular-nums",style:{color:Ta,paddingTop:0},"aria-hidden":"true",children:o.map(m=>e.jsx("span",{"data-testid":"chart-date",className:"absolute top-0 whitespace-nowrap",style:{left:b(m.x,t),transform:m.x<=s+1?"none":m.x>=t-n-1?"translateX(-100%)":"translateX(-50%)"},children:m.label},`${m.i}:${m.label}`))}),e.jsxs("details",{"data-testid":"chart-data-disclosure",className:"mt-4 text-[13px] print:hidden",children:[e.jsx("summary",{className:"cursor-pointer py-2 font-medium",style:{color:"var(--public-ink-2)"},children:"View data table"}),e.jsx("div",{className:"overflow-x-auto py-2",children:p})]}),e.jsx("div",{className:"hidden print:block chart-data-print","aria-hidden":"true",children:p})]})}function js(t,a=74){const s=t.length;if(s<=1)return s?[0]:[];const n=s-1,l=[0];for(let i=1;i<n;i++)t[i]-t[l[l.length-1]]>=a&&t[n]-t[i]>=a&&l.push(i);return l.push(n),l}function yl(t,a={}){const s=a.engine?[[a.engine,t.byEngine.find(n=>n.id===a.engine)?.asked??null]]:t.byEngine.map(n=>[n.id,n.asked]).sort((n,l)=>String(n[0]).localeCompare(String(l[0])));return JSON.stringify([t.source,t.cell,t.questionsAsked,a.engine?null:t.enginesMeasured,a.engine?null:t.answersUsed,s,a.peers?t.competitors.filter(n=>n.share!==null).map(n=>n.domain).sort():null])}function De(t,a,s={}){const n=[];let l=[],i;return t.forEach((r,o)=>{const c=a(r,o),d=yl(r,s);(c===null||!Number.isFinite(c)||d!==i)&&(l.length&&n.push(l),l=[]),c!==null&&Number.isFinite(c)&&l.push({i:o,v:c}),i=d}),l.length&&n.push(l),n}const wl=new Set(["series","single","none","unavailable"]),jl=new Set(["chatgpt","claude","meta-ai","perplexity","ai-overviews","grok"]),re=t=>t&&typeof t=="object"&&!Array.isArray(t)?t:null,Ye=t=>Array.isArray(t)?t:[];function Ee(t){return typeof t=="number"&&Number.isFinite(t)?Math.max(0,Math.min(100,t)):null}const me=t=>typeof t=="number"&&Number.isFinite(t)?Math.max(0,Math.round(t)):null;function Ma(t){if(typeof t!="string"||!t)return null;const a=new Date(t).getTime();return Number.isNaN(a)?null:t}const ks=864e5;function kl(t){const a=re(t);if(!a)return null;const s=Ye(a.voice).flatMap(d=>{const p=re(d);if(!p)return[];const u=Ma(p.capturedAt??p.at??p.date);return u?[{capturedAt:u,day:typeof p.day=="string"&&p.day?p.day:null,source:typeof p.source=="string"?p.source:null,cell:typeof p.cell=="string"&&p.cell?p.cell:null,overallShare:Ee(p.overallShare),citedShare:Ee(p.citedShare),firstMentionShare:Ee(p.firstMentionShare),answersUsed:me(p.answersUsed),questionsAsked:me(p.questionsAsked),enginesMeasured:me(p.enginesMeasured),byEngine:Ye(p.byEngine).flatMap(h=>{const x=re(h),f=typeof x?.id=="string"&&jl.has(x.id)?x.id:null;return f?[{id:f,share:Ee(x.share),asked:me(x.asked),mentioned:me(x.mentioned),cited:me(x.cited),firstPlace:me(x.firstPlace)}]:[]}),competitors:Ye(p.competitors).flatMap(h=>{const x=re(h);return typeof x?.domain=="string"&&x.domain?[{domain:x.domain,share:Ee(x.share)}]:[]})}]:[]}).sort((d,p)=>new Date(d.capturedAt).getTime()-new Date(p.capturedAt).getTime()),n=Ye(a.score).flatMap(d=>{const p=re(d),u=Ma(p?.auditedAt??p?.at);if(!p||!u||typeof p.total!="number")return[];const h={},x=re(p.pillars)??{};for(const[f,b]of Object.entries(x))typeof b=="number"&&Number.isFinite(b)&&(h[f]=b);return[{auditedAt:u,total:p.total,grade:typeof p.grade=="string"?p.grade:"",pillars:h,rubricVersion:typeof p.rubricVersion=="str
20ing"?p.rubricVersion:null}]}).sort((d,p)=>new Date(d.auditedAt).getTime()-new Date(p.auditedAt).getTime()),l=re(a.coverage),i=re(l?.voice),r=[...s.map(d=>d.capturedAt),...n.map(d=>d.auditedAt)].map(d=>new Date(d).getTime()),o=r.length?new Date(Math.min(...r)).toISOString():null,c=r.length?new Date(Math.max(...r)).toISOString():null;return{domain:typeof a.domain=="string"&&a.domain?a.domain:null,score:n,voice:s,coverage:{scorePoints:n.length,voicePoints:s.length,firstAt:o,lastAt:c,spanDays:o&&c?Math.max(0,Math.round((new Date(c).getTime()-new Date(o).getTime())/ks)):null,voiceState:typeof i?.state=="string"&&wl.has(i.state)?i.state:null,voiceNote:typeof i?.note=="string"&&i.note?i.note:null}}}const Nl={"30d":30,"90d":90,all:null};function Vt(t,a,s){const n=Nl[s];if(n===null||t.length===0)return t;const i=Math.max(...t.map(r=>new Date(a(r)).getTime()))-n*ks;return t.filter(r=>new Date(a(r)).getTime()>=i)}const Ns=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ee=t=>{const a=new Date(t);return Number.isNaN(a.getTime())?t.slice(0,10):`${a.getUTCDate()} ${Ns[a.getUTCMonth()]} ${a.getUTCFullYear()}`},$s=t=>{const a=new Date(t);return Number.isNaN(a.getTime())?t.slice(5,10):`${a.getUTCDate()} ${Ns[a.getUTCMonth()]}`},de=t=>t===null?"Not measured":`${Math.round(t)}%`;function $l(t){const a=t.filter(l=>Number.isFinite(l)).map(l=>Math.max(0,Math.min(100,l)));if(!a.length)return[0,100];let s=Math.max(0,Math.floor(Math.min(...a)/10)*10-10),n=Math.min(100,Math.ceil(Math.max(...a)/10)*10+10);for(;n-s<20;)if(s>0)s-=10;else if(n<100)n+=10;else break;return[s,n]}function As([t,a]){const s=a-t,n=Math.max(1,Math.ceil(s/10/4)),l=[];for(let i=t;i<=a+.001;i+=n*10)l.push(Math.round(i));return l}function Ss(t,a){return["30d","90d","all"].filter(n=>n==="all"||Vt(t,a,n).length<t.length)}const Al={"30d":"30 days","90d":"90 days",all:"All"},Ge="var(--public-chart-mark-strong, var(--public-highlight-ink))",Ve="var(--public-chart-neutral, var(--public-ink-3))",Sl="var(--public-chart-wash, var(--public-highlight-wash))",be=560,Fe=190,Le=34,Kt=14,Se=12,We=22;function Cs(t,a){return j.useMemo(()=>{const s=t.map(d=>new Date(d.capturedAt).getTime()),n=Math.min(...s),l=Math.max(...s),i=be-Le-Kt,r=t.map((d,p)=>l===n?Le+(t.length===1?i/2:p/(t.length-1)*i):Le+(s[p]-n)/(l-n)*i),o=$l(a);return{xs:r,dom:o,y:d=>Se+(1-(Math.max(0,Math.min(100,d))-o[0])/(o[1]-o[0]))*(Fe-Se-We)}},[t,a])}const Ts=(t,a)=>js(a).map(s=>({i:s,x:a[s],label:s===0||s===t.length-1?ee(t[s].capturedAt):$s(t[s].capturedAt)})),Tt=(t,a,s)=>t.map((n,l)=>`${l===0?"M":"L"}${a[n.i].toFixed(1)},${s(n.v).toFixed(1)}`).join("");function Cl({points:t,engines:a}){const s=j.useMemo(()=>a.map(m=>({id:m.id,label:m.label,color:gl(m.id),shape:bl(m.id),name:fl(m.id)})),[a]),n=j.useMemo(()=>s.filter(m=>t.some(w=>w.byEngine.some(g=>g.id===m.id&&g.share!==null))),[s,t]),[l,i]=j.useState(new Set),r=n.filter(m=>!l.has(m.id)),o=(m,w)=>m.byEngine.find(g=>g.id===w)?.share??null,c=r.flatMap(m=>t.map(w=>o(w,m.id)).filter(w=>w!==null)),{xs:d,dom:p,y:u}=Cs(t,c),h=zt(d,be,"Share of voice by engine"),x=h.index,f=e.jsxs("table",{children:[e.jsx("caption",{children:"Share of voice by engine and date, percent of sampled answers naming the brand"}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Date"}),s.map(m=>e.jsxs("th",{children:[m.label," (",m.name,")"]},m.id))]})}),e.jsx("tbody",{children:t.map(m=>e.jsxs("tr",{children:[e.jsx("td",{children:ee(m.capturedAt)}),s.map(w=>e.jsx("td",{children:de(o(m,w.id))},w.id))]},m.capturedAt))})]});if(!n.length)return e.jsxs("div",{"data-testid":"voice-timeline-engines",children:[e.jsx(I,{as:"h3",title:"By engine"}),e.jsx("p",{"data-testid":"chart-empty",className:"text-[13.5px] leading-relaxed max-w-[68ch]",style:{color:"var(--public-ink-2)"},children:"No engine has a dated share yet. Each engine gets a line once its answers have been sampled twice."}),e.jsx("div",{className:"sr-only",children:f})]});const b=n.map(m=>({key:m.id,label:m.label,color:m.color,shape:m.shape})),y=x===null?[]:r.map(m=>({key:m.id,label:m.label,value:de(o(t[x],m.id)),color:m.color,shape:m.shape}));return e.jsxs("div",{"data-testid":"voice-timeline-engines",className:"min-w-0",children:[e.jsx(I,{as:"h3",title:"By engine",meta:e.jsxs("span",{className:"whitespace-normal text-right",children:[r.length," of ",n.length," shown"]})}),e.jsxs(Gt,{testId:"engines-plot",width:be,height:Fe,padL:Le,padR:Kt,padT:Se,padB:We,guides:As(
20p).map(m=>({v:u(m),label:`${m}%`})),dates:Ts(t,d),hover:h,table:f,ariaLabel:`Share of voice by engine across ${t.length} snapshots`,overlay:x===null?null:e.jsx(Yt,{xPct:(d[x]-0)/be*100,title:ee(t[x].capturedAt),rows:y}),children:[x!==null&&e.jsx(Ht,{x:d[x],y0:Se,y1:Fe-We}),r.map(m=>{const w=De(t,g=>o(g,m.id),{engine:m.id});return e.jsxs("g",{"data-testid":"engine-series","data-engine":m.id,"data-color":m.name,children:[w.map((g,C)=>g.length>1?e.jsx("path",{d:Tt(g,d,u),fill:"none",stroke:m.color,strokeWidth:"2",strokeLinejoin:"round",strokeLinecap:"round"},C):null),w.flat().map(g=>e.jsx("path",{"data-testid":"engine-mark",d:Ae(m.shape,d[g.i],u(g.v),x===g.i?4.4:3.2),fill:m.color,stroke:"var(--public-ground)",strokeWidth:"1.5"},g.i))]},m.id)})]}),e.jsx("div",{className:"mt-2",children:e.jsx(ys,{items:b,hidden:l,label:"Engines",onToggle:m=>i(w=>{const g=new Set(w);return g.has(m)?g.delete(m):g.add(m),g})})})]})}function Tl(t){for(let a=t.length-1;a>=0;a--){const s=t[a];if(s.overallShare!==null&&s.citedShare!==null)return{at:s.capturedAt,named:s.overallShare,cited:s.citedShare,gap:Math.round(s.overallShare-s.citedShare)}}return null}function Ml({points:t,brand:a}){const s=t.some(m=>m.citedShare!==null),[n,l]=j.useState(new Set),i=!n.has("named"),r=!n.has("cited"),o=t.flatMap(m=>[i?m.overallShare:null,r?m.citedShare:null].filter(w=>w!==null)),{xs:c,dom:d,y:p}=Cs(t,o),u=zt(c,be,"Named against cited"),h=u.index,x=Tl(t),f=e.jsxs("table",{children:[e.jsx("caption",{children:"Named against cited by date, percent of sampled answers"}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Date"}),e.jsxs("th",{children:["Named (",a,")"]}),e.jsx("th",{children:"Cited"}),e.jsx("th",{children:"Gap"})]})}),e.jsx("tbody",{children:t.map(m=>e.jsxs("tr",{children:[e.jsx("td",{children:ee(m.capturedAt)}),e.jsx("td",{children:de(m.overallShare)}),e.jsx("td",{children:de(m.citedShare)}),e.jsx("td",{children:m.overallShare!==null&&m.citedShare!==null?`${Math.round(m.overallShare-m.citedShare)} points`:"Not measured"})]},m.capturedAt))})]}),b=i&&r?De(t,m=>m.overallShare!==null&&m.citedShare!==null?m.overallShare:null):[],y=h===null?[]:[...i?[{key:"named",label:"Named",value:de(t[h].overallShare),color:Ge,shape:"circle"}]:[],...r?[{key:"cited",label:"Cited",value:de(t[h].citedShare),color:Ve,shape:"diamond"}]:[],...i&&r?[{key:"gap",label:"Gap",value:t[h].overallShare!==null&&t[h].citedShare!==null?`${Math.round(t[h].overallShare-t[h].citedShare)} pts`:"â"}]:[]];return e.jsxs("div",{"data-testid":"voice-timeline-gap",className:"min-w-0",children:[e.jsx(I,{as:"h3",title:"Named against cited",meta:e.jsx("span",{className:"whitespace-normal text-right",children:s?"grounded answers only":"citations not measured"})}),e.jsxs(Gt,{testId:"gap-plot",width:be,height:Fe,padL:Le,padR:Kt,padT:Se,padB:We,guides:As(d).map(m=>({v:p(m),label:`${m}%`})),dates:Ts(t,c),hover:u,table:f,ariaLabel:`Named against cited across ${t.length}
20 snapshots`,overlay:h===null?null:e.jsx(Yt,{xPct:c[h]/be*100,title:ee(t[h].capturedAt),rows:y}),children:[b.map((m,w)=>m.length>1?e.jsx("path",{"data-testid":"gap-band",fill:Sl,stroke:"none",d:`${m.map((g,C)=>`${C===0?"M":"L"}${c[g.i].toFixed(1)},${p(g.v).toFixed(1)}`).join("")}${[...m].reverse().map(g=>`L${c[g.i].toFixed(1)},${p(t[g.i].citedShare).toFixed(1)}`).join("")}Z`},`b${w}`):null),h!==null&&e.jsx(Ht,{x:c[h],y0:Se,y1:Fe-We}),(r?De(t,m=>m.citedShare):[]).map((m,w)=>e.jsxs("g",{"data-testid":"gap-series","data-series":"cited",children:[m.length>1&&e.jsx("path",{d:Tt(m,c,p),fill:"none",stroke:Ve,strokeWidth:"2",strokeDasharray:"5 4",strokeLinejoin:"round",strokeLinecap:"round"}),m.map(g=>e.jsx("path",{d:Ae("diamond",c[g.i],p(g.v),h===g.i?4.4:3.2),fill:Ve,stroke:"var(--public-ground)",strokeWidth:"1.5"},g.i))]},`c${w}`)),(i?De(t,m=>m.overallShare):[]).map((m,w)=>e.jsxs("g",{"data-testid":"gap-series","data-series":"named",children:[m.length>1&&e.jsx("path",{d:Tt(m,c,p),fill:"none",stroke:Ge,strokeWidth:"2",strokeLinejoin:"round",strokeLinecap:"round"}),m.map(g=>e.jsx("path",{d:Ae("circle",c[g.i],p(g.v),h===g.i?4.4:3.2),fill:Ge,stroke:"var(--public-ground)",strokeWidth:"1.5"},g.i))]},`n${w}`))]}),e.jsx("div",{className:"mt-2 flex flex-wrap items-center gap-x-4 gap-y-1",children:e.jsx(ys,{items:[{key:"named",label:"Named",color:Ge,shape:"circle"},{key:"cited",label:"Cited",color:Ve,shape:"diamond"}],hidden:n,label:"Named and cited",onToggle:m=>l(w=>{const g=new Set(w);return g.has(m)?g.delete(m):g.add(m),g})})}),e.jsx("p",{"data-testid":"gap-note",className:"mt-1 text-[12.5px] leading-relaxed max-w-[70ch]",style:{color:"var(--public-ink-2)"},children:s?x?`On ${ee(x.at)}, ${Math.round(x.named)}% of answers named you and ${Math.round(x.cited)}% linked to you â a gap of ${x.gap} points. The gap is what a citation-worthy page closes.`:"No snapshot has both a mention rate and a citation rate yet.":"Citations are counted only on grounded engines. None of these snapshots has a grounded answer, so the cited line is not drawn â it is unmeasured, not zero."})]})}function El({points:t,engines:a,brand:s}){const[n,l]=j.useState("all"),i=Ss(t,d=>d.capturedAt),r=Vt(t,d=>d.capturedAt,n),o=d=>e.jsx(I,{eyebrow:"Over time",title:"AI visibility over time",lede:"Dated measurements show how often sampled AI answers name and cite your business.",meta:d}),c=e.jsxs("span",{className:"flex flex-wrap items-center justify-end gap-3",children:[e.jsx(ws,{value:n,onChange:d=>l(d),options:i.map(d=>({key:d,label:Al[d]}))}),e.jsxs("span",{"data-testid":"voice-timeline-count",className:"tabular-nums",children:[r.length," snapshot",r.length===1?"":"s"]})]});return r.length<2?e.jsxs("div",{"data-testid":"voice-timeline","data-state":"single",children:[o(t.length?c:void 0),e.jsx("p",{"data-testid":"voice-timeline-note",className:"text-[13.5px] leading-relaxed max-w-[70ch]",style:{color:"var(--public-ink-2)"},children:r.length===0?"No dated snapshot of your share of voice yet. The first is
20written at the next refresh, and the lines begin once there are two.":`One snapshot in this range, from ${ee(r[0].capturedAt)}. A single point is a measurement, not a trend; the lines begin once there are two.`})]}):e.jsxs("div",{"data-testid":"voice-timeline","data-state":"ready",children:[o(c),e.jsx("p",{className:"mb-5 text-[12.5px] leading-relaxed",style:{color:"var(--public-ink-2)"},children:"Lines break when recorded coverage changes. Questions and engines can vary between snapshots; compare the dated samples in context."}),e.jsxs("div",{className:"grid gap-8 lg:grid-cols-2 lg:gap-10",children:[e.jsx(Cl,{points:r,engines:a}),e.jsx(Ml,{points:r,brand:s})]})]})}const Rl={"30d":"30 days","90d":"90 days",all:"All"},Ke=560,ht=200,Qe=30,Ea=16,Xe=14,xt=22,Pl=6,Ra=["diamond","square","triangle","cross","hexagon"];function Il(t){const a=t.filter(r=>r.share!==null&&Number.isFinite(r.share)&&r.share>=0&&r.share<=100).sort((r,o)=>o.share-r.share),s=new Map;let n=0,l=0,i=null;for(const r of a)l+=1,(i===null||r.share!==i)&&(n=l,i=r.share),s.set(r.domain,n);return s}function Dl(t,a,s){const n=new Map;for(const o of t)for(const c of o.competitors)c.share!==null&&c.domain!==s&&n.set(c.domain,(n.get(c.domain)??0)+1);const l=[...n.entries()].sort((o,c)=>c[1]-o[1]||(o[0]<c[0]?-1:1)).map(([o])=>o),i=a.length?a:[{domain:s,isYou:!0},...l.map(o=>({domain:o,isYou:!1}))],r=(o,c,d)=>{const p=_t({domain:o,isYou:c,setIndex:i.find(u=>u.domain===o)?.setIndex??null},i);return{domain:o,isYou:c,color:p.color,colorName:p.colorName,ink:p.ink,shape:d}};return[r(s,!0,"circle"),...l.slice(0,Pl-1).map((o,c)=>r(o,!1,Ra[c%Ra.length]))]}function Ll({points:t,rows:a,youDomain:s}){const[n,l]=j.useState("all"),[i,r]=j.useState(null),o=Ss(t,v=>v.capturedAt),c=Vt(t,v=>v.capturedAt,n),d=j.useMemo(()=>Dl(c,a,s),[c,a,s]),p=d.filter(v=>!v.isYou),u=d.find(v=>v.domain===i),h=u?[...d.filter(v=>v.domain!==u.domain),u]:d,x=j.useMemo(()=>c.map(v=>Il([{domain:s,share:v.overallShare},...v.competitors.filter(M=>M.domain!==s)])),[c,s]),f=v=>e.jsx(I,{as:"h3",title:"Position in the answers, over time",lede:"Rank by the share of sampled answers naming each site. Lines break when recorded coverage or the peer group changes.",meta:v}),b=c.length>=2&&p.length>0,y=Math.max(1,...x.flatMap(v=>d.flatMap(M=>{const L=v.get(M.domain);return typeof L=="number"?[L]:[]}))),m=c.map(v=>new Date(v.capturedAt).getTime()),w=Math.min(...m),g=Math.max(...m),C=Ke-Qe-Ea,$=c.map((v,M)=>g===w?Qe+M/Math.max(1,c.length-1)*C:Qe+(m[M]-w)/(g-w)*C),T=v=>Xe+(v-1)/Math.max(1,y-1)*(ht-Xe-xt),E=zt($,Ke,"Position in the answers"),N=E.index,k=x.some(v=>new Set(v.values()).size<v.size),D=new Set([s,...c.flatMap(v=>v.competitors.filter(M=>M.share!==null).map(M=>M.domain))]).size,P=e.jsxs("table",{children:[e.jsx("caption",{children:"Rank by share of voice, by date. Rank 1 is the site named in the most answers."}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Date"}),d.map(v=>e.jsxs("th",{children:[v.domain,v.isYou?" (you)":""," (",v.colorName,")"]},v.domain))]})}),e.jsx("tbody",{children:c.map((v,M)=>e.jsxs("tr",{children:[e.jsx("td",{children:ee(v.capturedAt)}),d.map(L=>{const O=x[M].get(L.domain),Y=L.isYou?v.overallShare:v.competitors.find(ae=>ae.domain===L.domain)?.share??null;return e.jsx("td",{children:O?`${O} (${de(Y)})`:"Not measured"},L.domain)})]},v.capturedAt))})]});if(!b)return e.jsxs("div",{"data-testid":"competitor-timeline","data-state":"single",children:[f(c.length?`${c.length} snapshot${c.length===1?"":"s"}`:void 0),e.jsx("p",{"data-testid":"competitor-timeline-note",className:"text-[13.5px] leading-relaxed max-w-[70ch]",style:{color:"var(--public-ink-2)"},children:p.length===0?"No rival has a dated share of voice yet, so there is no order to plot. Rivals appear here once the answers that name them have been sampled.":c.length===0?"No dated snapshot yet. The first is
20written at the next refresh, and the chart begins once there are two.":`One snapshot so far, from ${ee(c[0].capturedAt)}. A single position is not a movement; the chart begins at the next refresh.`}),e.jsx("div",{className:"sr-only",children:P})]});const q=v=>[...d].filter(M=>x[v].has(M.domain)).sort((M,L)=>x[v].get(M.domain)-x[v].get(L.domain)).map(M=>{const L=M.isYou?c[v].overallShare:c[v].competitors.find(O=>O.domain===M.domain)?.share??null;return{key:M.domain,label:M.isYou?`${M.domain} (you)`:M.domain,color:M.color,shape:M.shape,value:`#${x[v].get(M.domain)} · ${de(L)}`}}),H=Math.max(1,Math.ceil(y/8)),K=Array.from({length:y},(v,M)=>M+1).filter(v=>(v-1)%H===0||v===y).map(v=>({v:T(v),label:`#${v}`})),z=js($).map(v=>({i:v,x:$[v],label:v===0||v===c.length-1?ee(c[v].capturedAt):$s(c[v].capturedAt)}));return e.jsxs("div",{"data-testid":"competitor-timeline","data-state":"ready",children:[f(e.jsxs("span",{className:"flex flex-wrap items-center justify-end gap-3",children:[e.jsx(ws,{value:n,onChange:v=>l(v),options:o.map(v=>({key:v,label:Rl[v]}))}),e.jsxs("span",{className:"tabular-nums",children:[c.length," snapshots"]})]})),e.jsxs(Gt,{testId:"bump-plot",width:Ke,height:ht,padL:Qe,padR:Ea,padT:Xe,padB:xt,guides:K,dates:z,hover:E,table:P,ariaLabel:`Rank by share of voice across ${c.length} snapshots`,overlay:N===null?null:e.jsx(Yt,{xPct:$[N]/Ke*100,title:ee(c[N].capturedAt),rows:q(N)}),children:[N!==null&&e.jsx(Ht,{x:$[N],y0:Xe,y1:ht-xt}),h.map(v=>{const M=c.map((O,Y)=>x[Y].get(v.domain)??null),L=De(c,(O,Y)=>M[Y],{peers:!0});return e.jsxs("g",{"data-testid":"bump-series","data-domain":v.domain,"data-you":v.isYou?"true":"false","data-color":v.colorName,opacity:u&&u.domain!==v.domain?.2:1,children:[L.map((O,Y)=>O.length>1?e.jsx("path",{d:O.map((ae,ve)=>`${ve===0?"M":"L"}${$[ae.i].toFixed(1)},${T(ae.v).toFixed(1)}`).join(""),fill:"none",stroke:v.color,strokeWidth:v.isYou?2.5:2,strokeLinejoin:"round",strokeLinecap:"round"},Y):null),L.flat().map(O=>e.jsx("path",{"data-testid":"bump-mark",d:Ae(v.shape,$[O.i],T(O.v),(v.isYou?4.6:3.6)+(N===O.i?1.2:0)),fill:v.color,stroke:"var(--public-ground)",strokeWidth:"2"},O.i))]},v.domain)})]}),e.jsx("div",{"data-testid":"bump-legend",className:"mt-3 flex flex-wrap items-center gap-x-5 gap-y-2 text-[12.5px]",style:{color:"var(--public-ink-2)"},"aria-label":"Legend",children:d.map(v=>e.jsxs("button",{type:"button","data-testid":"bump-legend-item","data-domain":v.domain,"data-you":v.isYou?"true":"false","aria-pressed":u?.domain===v.domain,"aria-label":`Highlight ${v.domain}${v.isYou?" (you)":""}`,onClick:()=>r(u?.domain===v.domain?null:v.domain),className:"inline-flex min-h-11 items-center gap-2 min-w-0 rounded-lg px-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",style:{background:u?.domain===v.domain?"var(--public-chart-wash, var(--public-highlight-wash))":"transparent"},children:[e.jsx(Ot,{domain:v.domain,color:v.color,ink:v.ink,size:22}),e.jsx("svg",{"aria-hidden":"true",width:"14",height:"14",viewBox:"0 0 14 14",className:"inline-block shrink-0",children:e.jsx("path",{d:Ae(v.shape,7,7,v.isYou?4.6:3.6),fill:v.color,stroke:"var(--public-ground)",strokeWidth:"2"})}),e.jsx("span",{className:"min-w-0 break-all text-[13.5px]",style:{color:v.isYou?"var(--public-ink)":"var(--public-ink-2)",fontWeight:v.isYou?at.you:at.other},children:v.domain}),v.isYou&&e.jsx(ce,{label:"you",fg:"var(--public-chart-ink, var(--public-highlight-ink))",bg:"var(--public-chart-wash, var(--public-highlight-wash))",edge:"var(--public-chart-edge, var(--public-highlight-edge))",className:"shrink-0"})]},v.domain))}),e.jsxs("p",{"data-testid":"bump-reading-note",className:"mt-2 text-[12px] leading-relaxed",style:{color:"var(--public-ink-2)"},children:["Select a site to highlight its line.",k?" Equal shares have the same rank and can overlap.":"",D>d.length?` Showing ${d.length} of ${D} sites with the most dated observations; ranks include the full measured set.`:""]})]})}const Ms="/login?redirect=%2Fai-visibility",Pa=Z(Pt({variant:"outline",size:"sm"}),"max-w-full font-medium");function Ia({children:t,className:a}){return e.jsx("span",{"data-testid":"watch-hint",className:Z("block text-[12.5px] leading-snug",a),style:{color:"var(--public-ink-2)"},children:t})}function _l({url:t,signedIn:a,className:s,layout:n="stack",controlClassName:l,hintClassName:i}){const[r,o]=j.useState(null),[c,d]=j.useState(!1),[p,u]=j.useState(null),h=Oa(t)??t,x=Z(n==="inline"?"contents":"flex flex-col gap-1 min-w-0",s);j.useEffect(()=>{if(!a)return;let y=!1;return V(`/api/aeo/watch?url=${encodeURIComponent(t)}`).then(m=>m.ok?m.json():null).then(m=>{!y&&m&&o(m)}).catch(()=>{}),()=>{y=!0}},[t,a]);const f=j.useCallback(async()=>
20{if(!r||c)return;const y=!r.watching;d(!0),u(null);try{const m=await V("/api/aeo/watch",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:t,enabled:y})});if(!m.ok)throw new Error("Could not update notifications");const w=await m.json();o(w),ne(w.watching?"aeo_watch_enabled":"aeo_watch_disabled","ai_visibility",h)}catch{u("Could not update score emails. Your setting is unchanged. Try again.")}finally{d(!1)}},[r,c,t,h]);if(!a)return e.jsxs("div",{"data-testid":"watch-control",className:x,children:[e.jsxs(Rt,{href:Ms,"data-testid":"watch-login",className:Z(Pa,"whitespace-nowrap",l),children:["Watch ",h]}),e.jsx(Ia,{className:i,children:"Sign in for weekly score updates."})]});if(!r)return null;const b=r.watching;return e.jsxs("div",{"data-testid":"watch-control",className:x,children:[e.jsxs("button",{type:"button",role:"switch","aria-checked":b,"aria-busy":c||void 0,onClick:f,"data-testid":"watch-toggle",className:Z(Pa,"gap-2.5 text-left justify-start",l),style:{background:b?"var(--public-second-wash)":void 0,borderColor:b?"var(--public-second-edge)":void 0,color:"var(--public-ink)",opacity:c?.7:1},children:[e.jsx("span",{"aria-hidden":"true",className:"relative inline-block w-[28px] h-[16px] rounded-full shrink-0 transition-colors",style:{background:b?"var(--public-second)":"var(--public-hairline-strong)"},children:e.jsx("span",{className:"absolute top-[2px] w-[12px] h-[12px] rounded-full transition-[left]",style:{left:b?14:2,background:"var(--public-ground)"}})}),e.jsxs("span",{className:"min-w-0 inline-flex items-baseline gap-1",children:[e.jsxs("span",{className:"whitespace-nowrap",children:[b?"Watching":"Watch"," ",h]}),b&&r.email&&e.jsxs("span",{"data-testid":"watch-email",className:"truncate",style:{color:"var(--public-ink-2)"},children:["· ",r.email]})]})]}),!b&&e.jsx(Ia,{className:i,children:"Emails you when the weekly score changes."}),p&&e.jsx("span",{role:"alert",className:Z("text-[12.5px]",i),style:{color:"var(--public-danger)"},children:p})]})}const Da={domain:"",lines:0,parsed:0,unrecognised:0,days:0,agents:[]},Pe=[["retrieval","Retrieval","var(--public-chart-mark)"],["training","Training","var(--public-ink-2)"],["search","Search","var(--public-second)"],["other","Other","var(--public-chart-neutral)"]],Mt=Object.fromEntries(Pe.map(([t,,a])=>[t,a])),ue=(t,a,s=`${a}s`)=>`${t} ${t===1?a:s}`,Es="The report shows what crawlers may fetch. Your server logs show what they did fetch.";function Ol(t){const a=r=>t.filter(o=>o.kind===r).reduce((o,c)=>o+c.hits,0),s=a("retrieval"),n=a("training"),l=t.reduce((r,o)=>r+o.blocked,0),i=l?`; ${l} request${l===1?" was":"s were"} blocked`:"";return s===0&&n===0?`No retrieval or training crawler visited in this window${i}.`:s>=n?`Retrieval crawlers (the ones that fetch for answers) made ${ue(s,"visit")}; training crawlers ${n}${i}.`:`Training crawlers made ${ue(n,"visit")}; retrieval crawlers ${s}. Models learn from you more than they fetch you${i}.`}function Fl(t){const a=new Date;return a.setUTCHours(0,0,0,0),Array.from({length:t},(s,n)=>new Date(a.getTime()-(t-1-n)*864e5).toISOString().slice(0,10))}function Wl({series:t,days:a}){const s=Fl(a),n=new Map;for(const b of t){const y=n.get(b.day)??{retrieval:{hits:0,blocked:0},training:{hits:0,blocked:0},search:{hits:0,blocked:0},other:{hits:0,blocked:0}},m=y[b.kind]??y.other;m.hits+=b.hits,m.blocked+=b.blocked,n.set(b.day,y)}const l=b=>{const y=n.get(b);return y?Pe.reduce((m,[w])=>m+y[w].hits,0):0},i=Math.max(1,...s.map(l)),r=640,o=180,c=34,d=8,p=8,u=22,h=(r-c-d)/s.length,x=h*.68,f=b=>p+(1-b/i)*(o-p-u);return e.jsxs("figure",{className:"m-0 min-w-0",children:[e.jsxs("svg",{"data-testid":"visits-chart",viewBox:`0 0 ${r} ${o}`,className:"w-full h-auto",role:"img","aria-label":`Crawler visits per day over ${a} days; peak ${ue(i,"hit")} in one day`,children:[e.jsx("line",{x1:c,x2:r-d,y1:f(0),y2:f(0),stroke:"var(--public-hairline-strong)"}),e.jsx("text",{x:c-6,y:f(i)+4,fontSize:"11",textAnchor:"end",fill:"var(--public-ink-2)",children:i}),e.jsx("text",{x:c-6,y:f(0),fontSize:"11",textAnchor:"end",fill:"var(--public-ink-2)",children:"0"}),e.jsx("text",{x:c,y:o-6,fontSize:"11",fill:"var(--public-ink-2)",children:Q(s[0])}),e.jsx("text",{x:r-d,y:o-6,fontSize:"11",textAnchor:"end",fill:"var(--public-ink-2)",children:Q(s[s.length-1])}),s.map((b,y)=>{const m=n.get(b);if(!m)return null;let w=0;const g=c+y*h+(h-x)/2;return Pe.map(([C])=>{const $=m[C];if(!$.hits)return null;const T=f(w+$.hits),E=f(w);return w+=$.hits,e.jsxs("g",{"data-testid":"visit-bar",children:[e.jsx("title",{children:`${b} · ${C}: ${ue($.hits,"hit")}${$.blocked?`, ${$.blocked} blocked`:""}`}),e.jsx("rect",{x:g,y:T,width:x,height:Math.max(1,E-T),fill:Mt[C],stroke:"var(--public-ground)",strokeWidth:"1"})]},`${b}-${C}`)})})]}),e.jsx("figcaption",{className:"mt-2 flex flex-wrap gap-4 text-[11.5px]",style:{color:"var(--public-ink-2)"},"aria-label":"Legend",children:Pe.map(([b,y,m])=>e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx("i",{className:"inline-block w-[10px] h-[10px] rounded-sm",style:{background:m}}),y]},b))}),e.jsx("div",{className:"sr-only",children:e.jsxs("table",{children:[e.jsx("caption",{children:"Crawler hits per day and kind"}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Day"}),e.jsx("th",{children:"Kind"}),e.jsx("th",{children:"Hits"}),e.jsx("th",{children:"Blocked"})]})}),e.jsx("tbody",{children:s.flatMap(b=>{const y=n.get(b);return y?Pe.filter(([m])=>y[m].hits>0).map(([m,w])=>e.jsxs("tr",{children:[e.jsx("td",{children:b}),e.jsx("td",{children:w}),e.jsx("td",{children:y[m].hits}),e.jsx("td",{children:y[m].blocked})]},`${b}-${m}`)):[]})})]})})]})}function Ul({totals:t}){const a=[...t].sort((s,n)=>n.hits-s.hits);return e.jsx("div",{className:"flex flex-col",children:a.map(s=>e.jsxs("div",{"data-testid":"visit-agent",className:"flex flex-wrap items-baseline gap-x-3 gap-y-1 py-2",style:{borderBottom:"1px solid var(--public-hairline)"},children:[e.jsxs("span",{className:"inline-flex items-center gap-2 min-w-0 flex-grow",children:[e.jsx("i",{className:"inline-block w-[8px] h-[8px] rounded-sm shrink-0",style:{background:Mt[s.kind]??Mt.other}}
20),e.jsx("span",{className:"text-[13px] font-medium truncate",style:{color:"var(--public-ink)"},children:s.agent}),e.jsx("span",{className:"text-[11.5px]",style:{color:"var(--public-ink-2)"},children:s.kind})]}),e.jsxs("span",{"data-testid":"visit-agent-value",className:"text-[12.5px] tabular-nums whitespace-nowrap",style:{color:"var(--public-ink-2)"},children:[ue(s.hits,"hit")," · ",e.jsxs("span",{style:{color:s.blocked?"var(--public-danger)":"inherit"},children:[s.blocked," blocked"]})," · last seen ",Q(s.lastSeen)||s.lastSeen]})]},`${s.agent}-${s.kind}`))})}function Bl({url:t,domain:a,signedIn:s,onUploaded:n}){const[l,i]=j.useState(""),[r,o]=j.useState(!1),[c,d]=j.useState(!1),u=`curl -sS -X POST -H 'Content-Type: text/plain' -b 'connect.sid=<your session cookie>' --data-binary @access.log '${typeof window<"u"?window.location.origin:""}/api/aeo/crawler-logs?url=${a}'`,h=j.useCallback(async()=>{if(!(!l.trim()||r)){o(!0);try{const x=await V("/api/aeo/crawler-logs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:t,logs:l})}),f=await x.json().catch(()=>({}));if(x.ok){ne("aeo_crawler_logs_uploaded","ai_visibility",a,f.parsed),n(f),i("");return}n({...Da,domain:a,error:f.error==="audit_required"?"audit_required":void 0})}catch{n({...Da,domain:a})}finally{o(!1)}}},[l,r,t,a,n]);return e.jsxs("div",{"data-testid":"crawler-logs-card",className:"rounded-2xl px-5 py-5 sm:px-6 md:px-8 md:py-7 flex flex-col gap-4",style:{background:"var(--public-paper)",border:"1px solid var(--public-hairline)"},children:[e.jsx("div",{className:"[&>div]:mb-0",children:e.jsx(I,{as:"h3",eyebrow:"What crawlers fetched",title:"Add your server logs",lede:Es})}),s?e.jsxs(e.Fragment,{children:[e.jsxs("label",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"sr-only",children:"Access log lines"}),e.jsx("textarea",{value:l,onChange:x=>i(x.target.value),rows:4,spellCheck:!1,placeholder:'66.249.66.1 - - [03/Sep/2026:10:12:01 +0000] "GET /pricing HTTP/1.1" 200 8712 "-" "Mozilla/5.0 (compatible; GPTBot/1.2)"',className:"w-full rounded-[var(--public-radius-control)] px-3 py-2.5 font-mono text-[12px] leading-relaxed outline-none focus-visible:[box-shadow:var(--public-focus-ring)]",style:{background:"var(--public-ground)",border:"1px solid var(--public-hairline-strong)",color:"var(--public-ink)"}})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx(G,{size:"sm",onClick:h,disabled:r||!l.trim(),children:"Upload"}),e.jsx("span",{className:"text-[12.5px]",style:{color:"var(--public-ink-2)"},children:"Paste raw access-log lines, any common format; up to 100,000 lines."})]}),e.jsxs("div",{className:"flex items-start gap-2 min-w-0",children:[e.jsx("code",{"data-testid":"crawler-logs-curl",className:"flex-grow min-w-0 font-mono text-[11px] leading-relaxed rounded-[var(--public-radius-control)] px-3 py-2 overflow-x-auto whitespace-nowrap",style:{background:"var(--public-ground)",border:"1px solid var(--public-hairline)",color:"var(--public-ink-2)"},children:u}),e.jsx("button",{type:"button","aria-label":"Copy curl command",className:Z(Pt({variant:"outline",size:"sm"}),"shrink-0 font-medium"),onClick:()=>{navigator.clipboard?.writeText(u),d(!0),setTimeout(()=>d(!1),1600)},children:c?"Copied":"Copy"})]})]}):e.jsx(Rt,{href:Ms,"data-testid":"crawler-logs-login",className:`${Ya} w-fit inline-flex items-center min-h-[40px]`,style:{color:"var(--public-second)"},children:"Sign in to upload your logs"})]})}function ql({url:t,signedIn:a}){const[s,n]=j.useState(null),[l,i]=j.useState(!1),[r,o]=j.useState(null),[c,d]=j.useState(0),p=Oa(t)??t;j.useEffect(()=>{if(!a)return;let x=!1;return V(`/api/aeo/crawler-logs?url=${encodeURIComponent(t)}&days=30`).then(f=>f.ok?f.json():null).then(f=>{x||(f?n(f):i(!0))}).catch(()=>{x||i(!0)}),()=>{x=!0}},[t,a,c]);const u=j.useCallback(x=>{o(x),x.parsed>0&&d(f=>f+1)},[]);if(a&&(l||!s))return null;const h=r&&e.jsx("p",{"data-testid":"crawler-logs-result",className:"text-[13px]",style:{color:"var(--public-ink-2)"},children:r.error==="audit_required"?`Run an audit of ${p} first;
20 logs attach to a stored report.`:r.lines===0?"Nothing recognised in that paste â upload a raw access log.":`${r.parsed} of ${ue(r.lines,"line")} recognised across ${ue(r.days,"day")} · ${ue(r.agents.length,"agent")}.`});return e.jsx("section",{className:"pt-2 pb-8","data-testid":"crawler-visits",children:s?.hasData?e.jsxs(e.Fragment,{children:[e.jsx(I,{as:"h3",title:"What crawlers fetched",lede:Es,meta:`Last ${s.days} days · from your logs`}),h,e.jsxs("div",{className:"grid gap-8 lg:grid-cols-[minmax(0,3fr)_minmax(0,2fr)] mt-2",children:[e.jsx(Wl,{series:s.series,days:s.days}),e.jsx(Ul,{totals:s.totals})]}),e.jsx("p",{"data-testid":"visits-insight",className:"mt-4 text-[13px] leading-relaxed max-w-[70ch]",style:{color:"var(--public-ink-2)"},children:Ol(s.totals)})]}):e.jsxs("div",{className:"flex flex-col gap-3 print-hide",children:[e.jsx(Bl,{url:t,domain:p,signedIn:a,onUploaded:u}),h]})})}const zl=t=>{try{return new URL(t).hostname.replace(/^www\./,"")}catch{return t}},Hl={present:"Present",absent:"Absent","not-measured":"Not measured"},Et=({sample:t,token:a})=>!t&&!!a;function Yl({status:t}){const a=t!=="not-measured";return e.jsx("span",{"data-testid":`offsite-status-${t}`,className:"font-mono text-[11px] font-medium uppercase tracking-[0.08em] rounded-[calc(var(--public-radius-control)/2)] px-2 py-1 h-fit whitespace-nowrap",style:{background:a?"var(--public-paper)":"transparent",color:a?"var(--public-ink-2)":"var(--public-ink-3)",border:`1px solid ${a?"var(--public-hairline-strong)":"var(--public-hairline)"}`},children:Hl[t]})}function Gl({row:t}){return e.jsxs("li",{"data-testid":"offsite-row",className:"grid gap-x-4 gap-y-1 py-3.5 items-baseline",style:{gridTemplateColumns:"minmax(0,1fr) auto",borderTop:"1px solid var(--public-hairline)"},children:[e.jsxs("div",{className:"min-w-0 max-w-[68ch]",children:[e.jsxs("span",{className:"block text-[13.5px] font-semibold tracking-[-0.01em]",style:{color:"var(--public-ink)"},children:[t.label,t.value&&e.jsx("span",{"data-testid":"offsite-value",className:"ml-2 font-mono text-[12.5px] font-normal tabular-nums",style:{color:"var(--public-ink-2)"},children:t.value})]}),e.jsx("span",{className:"block mt-1 text-[13px] leading-[1.5]",style:{color:"var(--public-ink-2)",overflowWrap:"anywhere"},children:t.evidence}),e.jsxs("span",{"data-testid":"offsite-method",className:"block mt-1.5 text-[12px] leading-[1.45]",style:{color:"var(--public-ink-3)",overflowWrap:"anywhere"},children:[t.method,t.measuredAt&&` Measured ${Q(t.measuredAt)}.`,t.sourceUrl&&e.jsxs(e.Fragment,{children:[" ",e.jsx("a",{href:t.sourceUrl,target:"_blank",rel:"noreferrer noopener",className:"underline underline-offset-2",style:{color:"var(--public-second)"},children:zl(t.sourceUrl)})]})]})]}),e.jsx(Yl,{status:t.status})]})}function Vl(t){const{token:a}=t,[s,n]=j.useState(null),[l,i]=j.useState(!1);if(j.useEffect(()=>{if(!Et(t)||!a)return;const c=new AbortController;return V(`/api/aeo/report/${encodeURIComponent(a)}`,{signal:c.signal}).then(d=>d.ok?d.json():null).then(d=>{n(d?.observations?.offsiteSignals??null),i(!0)}).catch(()=>{c.signal.aborted||i(!0)}),()=>c.abort()},[a,t.sample]),!Et(t))return null;const r=s?.signals??[],o=r.filter(c=>c.status!=="not-measured").length;return e.jsxs("div",{"data-testid":"offsite-signals",className:"print-hide",children:[e.jsx("style",{children:"@media print { #offsite { display: none !important; } }"}),e.jsx(I,{eyebrow:"Off-site",title:"What the rest of the web says about you",lede:"Review independent information about your business alongside the findings from your own website.",summary:o?`${o} of ${r.length} external signals have been measured. Check that the recorded information accurately represents your business, and investigate missing or inconsistent details. These observations are separate from the website readiness grade.`:"No external signals have been measured in this report. Review this section after a new audit to assess the available independent information about your business.",meta:r.length?`${o} of ${r.length} measured`:void 0}),r.length>0?e.jsx("ul",{"data-testid":"offsite-rows",className:"m-0 p-0 list-none",children:r.map(c=>e.jsx(Gl,{row:c},c.id))}):e.jsx("p",{"data-testid":"offsite-empty",className:"text-[13.5px] leading-[1.5] max-w-[65ch]",style:{color:"var(--public-ink-2)"},children:l?"This report has no recorded external signals. Run a new audit to check the available information.":"Reading the off-site signals stored with this report."})]})}const Kl={id:"offsite",label:"Off-site",shows:Et,Component:Vl},Ql={title:"In the title",heading:"In the h1",description:"In the description",navigation:"In the navigation","opening text":"In the opening text"},Xl=(t,a,s=`${a}s`)=>`${t} ${t===1?a:s}`,Jl="Question coverage is separate from your readiness score.",Zl="These are suggested research questions, not measured search or prompt volumes.",eo="Use relevant questions to guide useful content. Add a heading only when the page provides a substantive answer.";function to(t){return t?"Review the quoted passages in context. A missing match may mean the answer appears elsewhere on the website.":"No page text was recorded for this audit, so content coverage has not been assessed."}function ao({tone:t}){return e.jsx("span",{"aria-hidden":"true",className:"inline-block w-[12px] text-[12px] leading-none text-center shrink-0",style:{color:t==="good"?"var(--public-assurance)":"var(--public-ink-3)"},children:t==="good"?"â":"â"})}function so({q:t,read:a}){return e.jsxs("li",{"data-testid":"coverage-question",className:"py-3",style:{borderTop:"1px solid var(--public-hairline)"},children:[e.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-2 gap-y-1",children:[e.jsx("span",{className:"text-[13.5px] leading-snug font-medium",style:{color:"var(--public-ink)"},children:t.text}),t.region!=="global"&&e.jsx("span",{"data-testid":"coverage-region",className:"font-mono text-[11px] uppercase tracking-[0.08em] rounded-[calc(var(--public-radius-control)/2)] px-1.5 py-[1px] whitespace-nowrap",style:{color:"var(--public-ink-3)",border:"1px solid var(--public-hairline-strong)"}
20,children:t.regionLabel})]}),t.match?e.jsxs("p",{"data-testid":"coverage-match",className:"mt-1 text-[12.5px] leading-snug",style:{color:"var(--public-ink-2)"},children:[Ql[t.match.field],": ",e.jsxs("span",{style:{color:"var(--public-ink)"},children:["â",t.match.quote,"â"]})]}):e.jsx("p",{"data-testid":a?"coverage-miss":"coverage-unmeasured",className:"mt-1 text-[12.5px] leading-snug",style:{color:"var(--public-ink-2)"},children:a?"No matching passage was found in the reviewed content.":"Not measured: this audit stored no page text."}),t.engines.length>0?e.jsx("ul",{"data-testid":"coverage-engines",className:"mt-1.5 flex flex-wrap gap-x-3 gap-y-1",children:t.engines.map(s=>e.jsxs("li",{"data-testid":"coverage-engine",className:"flex items-center gap-1.5 text-[12.5px] leading-snug",style:{color:s.named?"var(--public-ink)":"var(--public-ink-2)"},children:[e.jsx(ao,{tone:s.named?"good":"none"}),e.jsxs("span",{children:[s.label," ",s.named?s.cited?"named and cited you":"named you":"did not name you"]})]},s.engine))}):e.jsx("p",{"data-testid":"coverage-unasked",className:"mt-1.5 text-[12.5px] leading-snug",style:{color:"var(--public-ink-3)"},children:"No engine has been asked this yet."})]})}function no({token:t,sample:a}){const[s,n]=j.useState(null);if(j.useEffect(()=>{if(a||!t)return;let r=!1;return V(`/api/aeo/coverage/${encodeURIComponent(t)}`).then(async o=>{if(r||!o.ok)return;const c=await o.json();c&&Array.isArray(c.questions)&&c.scored===!1&&n(c)}).catch(()=>{}),()=>{r=!0}},[t,a]),a||!t||!s||!s.questions.length)return null;const{counts:l}=s,i=new Set(s.questions.flatMap(r=>r.engines.map(o=>o.engine))).size;return e.jsxs("div",{"data-testid":"question-coverage",className:"flex flex-col gap-5 print-hide",children:[e.jsx("style",{children:"@media print { #coverage { display: none !important; } }"}),e.jsx(I,{eyebrow:"Question coverage",title:"Questions relevant to your buyers",lede:`Review questions relevant to ${s.verticalLabel.toLowerCase()} and the website passages that may answer them.`,summary:`${l.questions} suggested questions are available for review${l.matched!==null?`, with potential content matches for ${l.matched}`:""}. Use these as a starting point for content planning, then confirm relevance with customer conversations and your own search data.`,meta:i?`asked of ${Xl(i,"engine")}`:"not yet asked"}),e.jsx("ul",{className:"flex flex-col",children:s.questions.map(r=>e.jsx(so,{q:r,read:s.read},r.id))}),e.jsxs("div",{className:"flex flex-col gap-2 max-w-[70ch]",children:[e.jsx("p",{"data-testid":"coverage-method",className:"text-[12.5px] leading-relaxed",style:{color:"var(--public-ink-2)"},children:to(s.read)}),e.jsxs("p",{"data-testid":"coverage-not-scored",className:"text-[12.5px] leading-relaxed",style:{color:"var(--public-ink-2)"},children:[Jl," ",Zl]}),e.jsx("p",{"data-testid":"coverage-warning",className:"text-[12.5px] leading-relaxed",style:{color:"var(--public-ink-2)"},children:eo})]})]})}
20const io={id:"coverage",shows:({sample:t,token:a})=>!t&&!!a,label:"Question coverage",Component:no},X={scrollMarginTop:"var(--report-nav-offset, 160px)",breakInside:"auto"},ro=[Kl,io,Gs];function lo(t,a){if(_e(a.checks??[]))return[];const s=t[t.length-1];if(!s||!a.fetchedAt)return t;const n=new Date(s.auditedAt).getTime(),l=new Date(a.fetchedAt).getTime();if(!(n<l))return t;const i=Object.fromEntries(a.score.pillars.map(r=>[r.pillar,r.score]));return[...t,{auditId:a.shareToken??"current",auditedAt:a.fetchedAt,total:a.score.total,grade:a.score.grade,pillars:i}]}function oo({value:t,color:a}){return e.jsx("div",{className:"h-[5px] rounded-full overflow-hidden",style:{background:"var(--public-hairline)"},children:e.jsx("div",{className:"h-[5px] rounded-full",style:{width:`${Math.max(0,Math.min(100,t))}%`,background:a??ts(t)}})})}function co({severity:t}){const a={critical:["Critical","danger"],important:["Important","highlight"],minor:["Minor","neutral"]},[s,n]=a[t]??a.minor;return e.jsx(It,{variant:n,size:"sm",className:"h-fit self-start",children:s})}function uo({benchmark:t,canEdit:a,onEdit:s,editRef:n}){const l=t.kind==="set",i=l?(t.rows??[]).filter(u=>u.score!==null).length:t.sampleSize??0,r=(t.rows??[]).find(u=>u.isYou&&typeof u.score=="number"),o=(t.rows??[]).filter(u=>!u.isYou&&typeof u.score=="number").sort((u,h)=>h.score-u.score),c=o[0],d=c&&r?c.score-r.score:null,p=c&&r&&d!==null?d>0?`${c.domain} leads your site by ${d} points (${c.score}/100 versus ${r.score}/100).`:d===0?`Your site shares the highest measured score with ${c.domain} at ${r.score}/100.`:`Your site leads the measured peers by ${Math.abs(d)} points, ahead of ${c.domain} (${c.score}/100).`:"A leader comparison needs a measured score for your site and at least one peer.";return e.jsxs(e.Fragment,{children:[e.jsx(I,{eyebrow:"Competition",title:l?"How you rank against your competitors and peers":"How you compare with measured websites",lede:"See where your website stands, then compare the areas that account for the difference.",summary:l?`${p} This comparison includes ${o.length} measured ${o.length===1?"peer":"peers"}. Review the selected websites for relevance, then use the category gaps below to prioritise improvements.`:i===0?"No compatible comparison measurements are available. Your own recorded readiness score remains available; a median and score difference are not established.":`${i} measured sites form this aggregate benchmark${typeof t.medianScore=="number"?`, with a median score of ${t.medianScore}/100`:""}. It covers the available site sample rather than a verified competitive market; choose relevant competitors for a direct comparison.`,meta:e.jsx("button",{ref:n,type:"button",onClick:s,className:"min-h-11 sm:min-h-10 px-2 -mx-2 -my-[11px] inline-flex items-center text-[12.5px] font-semibold rounded-[var(--public-radius-control)] outline-none focus-visible:[box-shadow:var(--public-focus-ring)]",style:{color:"var(--public-second)"},children:a?"Edit competitors":"Add competitors"})}),e.jsxs("div",{className:"grid gap-10 lg:gap-12 grid-cols-1 lg:grid-cols-[minmax(0,7fr)_minmax(0,5fr)]",children:[e.jsxs("div",{className:"flex flex-col gap-4 min-w-0",children:[e.jsx(I,{as:"h3",title:l?"Ranked by total score":"Your position",meta:`${i} site${i===1?"":"s"}`}),l?e.jsx("div",{"data-testid":"competition-card",className:Z(Ws.card,"p-3 sm:p-4"),children:e.jsx(ii,{rows:t.rows??[],rank:t.rank,of:t.of})}):e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("div",{className:"flex items-baseline gap-3 flex-wrap",children:[e.jsx("span",{className:"text-[32px] font-semibold tracking-[-0.03em] tabular-nums",style:{color:"var(--public-ink)"},children:t.percentile===null||t.percentile===void 0?"-":`${t.percentile}%`}),e.jsx("span",{className:"text-[13px]",style:{color:"var(--public-ink-2)"},children:t.percentile===null||t.percentile===void 0?`Not enough measurements yet to place you (${t.sampleSize??0} so far).`:`of measured sites score below you. Median is ${t.medianScore}/100 across ${t.sampleSize} sites.`})]}),typeof t.percentile=="number"&&e.jsx(oo,{value:t.percentile})]})]}),e.jsxs("div",{className:"flex flex-col gap-4 min-w-0",children:[e.jsx(I,{as:"h3",title:"Compare readiness by pillar"}),l&&(t.rows??[]).some(u=>u.pillars)?e.jsx(li,{rows:t.rows??[],biggestGap:t.biggestGap?.pillar??null}):e.jsx(Nn,{pillars:t.pillars,otherLabel:l?"Peer median":"Median site",biggestGap:t.biggestGap?.pillar??null}),t.biggestGap&&e.jsxs("p",{className:"text-[12.5px] leading-relaxed",style:{color:"var(--public-ink-2)"},children:[t.biggestGap.label," is your widest gap to the ",l?"peer":"website"," median: ",Math.abs(t.biggestGap.delta)," points."]})]})]})]})}function xc(){return e.jsxs(Fs,{children:[e.jsx(po,{}),e.jsx("div",{className:"print-hide","data-testid":"aeo-page-footer",children:e.jsx(Os,{})})]})}function po(){const[,t]=Jt("/ai-visibility/r/:token"),[a]=Jt("/ai-visibility/sample"),[,s]=_a(),{user:n,isAuthenticated:l}=_s(),[i,r]=j.useState(()=>a?J.report:null),[o,c]=j.useState(()=>a?J.benchmark:null),[d,p]=j.useState(0),[u,h]=j.useState(()=>a?[{auditId:"sample",auditedAt:String(J.auditedAt),total:J.report.score.total,grade:J.report.score.grade,pillars:Object.fromEntries(J.report.score.pillars.map(A=>[A.pillar,A.score]))}]:[]),[x,f]=j.useState(null),[b,y]=j.useState(null),[m,w]=j.useState(!1),[g,C]=j.useState(!1),$=j.useRef(null),T=t?.token,E=Mi(!a&&i?T:void 0),N=j.useMemo(()=>a?Ka():void 0,[a]),k=a?N:E.data,D=k?.corpus.status==="ready"?[k.corpus.sampledAt,k.corpus.questions,k.voice?.answers,...k.engines.map(A=>A.cites.n)].join("|"):null,P=qr(T,a);j.useEffect(()=>{const A=document.title;document.title="AI Visibility Report | Prompeteer";const R=document.createElement("meta");return R.name="robots",R.content="noindex, follow",document.head.appendChild(R),()=>{document.head.removeChild(R),document.title=A}},[]),j.useEffect(()=>
20{if(a){r(J.report),c(J.benchmark),ne("aeo_sample_viewed","ai_visibility");return}if(!T)return;let A=!1;const R=new AbortController,U=window.setTimeout(()=>R.abort(),2e4);return y(null),w(!1),r(null),c(null),h([]),p(0),f(null),(async()=>{try{const pe=await V(`/api/aeo/report/${encodeURIComponent(T)}`,{signal:R.signal});if(pe.status===401)throw A||w(!0),new Error("Sign in to view this private report.");if(!pe.ok)throw new Error(pe.status===404||pe.status===403?"This report is unavailable to this account.":"Could not load this report.");const Be=await pe.json();if(A)return;r(tn(Be)),ne("aeo_report_viewed","ai_visibility",Be.url,Be.score?.total);const Qt=await V(`/api/aeo/competitors?url=${encodeURIComponent(Be.url)}`).then(Xt=>Xt.ok?Xt.json():null).catch(()=>null);!A&&Qt&&c(Qt)}catch(pe){A||y(R.signal.aborted?"The report took too long to load. Reload this page to try again.":pe.message)}})(),()=>{A=!0,R.abort(),window.clearTimeout(U)}},[T,a]),j.useEffect(()=>{if(!i)return;if(_e(i.checks)){h([]);return}if(a){const R=Object.fromEntries(i.score.pillars.map(U=>[U.pillar,U.score]));h([{auditId:"sample",auditedAt:String(J.auditedAt),total:i.score.total,grade:i.score.grade,pillars:R}]);return}let A=!1;return V(`/api/aeo/history?url=${encodeURIComponent(i.url)}`).then(R=>R.ok?R.json():null).then(R=>{!A&&Array.isArray(R?.points)&&(h(lo(R.points,i)),p(Array.isArray(R.omitted)?R.omitted.filter(U=>U?.status==="unmeasured").length:0))}).catch(()=>{}),()=>{A=!0}},[i,a]),j.useEffect(()=>{if(!i||a)return;let A=!1;const R=new AbortController;return V(`/api/aeo/timeline?url=${encodeURIComponent(i.url)}`,{signal:R.signal}).then(U=>U.ok?U.json():null).then(U=>{A||f(kl(U))}).catch(()=>{}),()=>{A=!0,R.abort()}},[i,a,D]);const q=j.useCallback(()=>{if(!i)return;if(ne("aeo_aem_cta_clicked","conversion",i.url,i.score.total),a){if(l){s("/ai-visibility");return}s(`/login?redirect=${encodeURIComponent("/ai-visibility")}`);return}const A=`/ai-visibility/r/${T}/campaign`;s(l?A:`/login?redirect=${encodeURIComponent(A)}`)},[i,T,l,s,a]),H=!!(i?.plan&&i.plan.items.length>0),K=j.useMemo(()=>o?.kind==="set"?(o.rows??[]).filter(A=>!A.isYou).map(A=>{const R=_t(A,o.rows??[]);return{domain:A.domain,color:R.color,ink:R.ink}}):[],[o]),z=j.useMemo(()=>({token:T??null,url:i?.url??"",sample:a,signedIn:l}),[T,i?.url,a,l]),v=j.useMemo(()=>ro.filter(A=>A.shows(z)),[z]),M=j.useMemo(()=>ns.map(A=>({...A})),[]);if(j.useEffect(()=>{if(!i)return;const A=()=>{const R=document.getElementById(window.location.hash.slice(1));if(!R)return;let U=R;for(;U;)U instanceof HTMLDetailsElement&&(U.open=!0),U=U.parentElement;requestAnimationFrame(()=>R.scrollIntoView({block:"start"}))};return window.location.hash&&A(),window.addEventListener("hashchange",A),()=>window.removeEventListener("hashchange",A)},[i]),b)return e.jsxs("div",{className:"max-w-2xl mx-auto px-5 py-24",children:[e.jsx("h1",{className:"text-2xl font-semibold",style:{color:"var(--public-ink)"},children:b}),e.jsx("p",{className:"mt-3 text-[15px]",style:{color:"var(--public-ink-2)"},children:"This private report requires an authorized account. Return to your company workspace to open an available report."}),e.jsx(G,{className:"mt-6",onClick:()=>s(m?`/login?redirect=${encodeURIComponent(`/ai-visibility/r/${T}`)}`:"/ai-visibility"),children:m?"Sign in":"Back to AI visibility"})]});if(!i)return e.jsx("div",{className:"max-w-[1440px] mx-auto px-5 md:px-10 py-16",children:e.jsxs("div",{className:"animate-pulse flex flex-col gap-6",role:"status","aria-busy":"true",children:[e.jsx("span",{className:"sr-only",children:"Loading reportâ¦"}),e.jsx("div",{className:"h-[193px] w-[228px] rounded-[var(--public-radius-surface)]",style:{background:"var(--public-paper)"}}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-4",children:[0,1,2,3,4].map(A=>e.jsx("div",{className:"h-20 rounded-[var(--public-radius-surface)]",style:{background:"var(--public-paper)"}},A))})]})});const L=_e(i.checks),O=i.checks.filter(A=>A.status==="fail"&&A.severity==="critical"),Y=i.checks.filter(A=>A.status==="fail"&&A.severity==="important"),ae=[...O,...Y].slice(0,6),ve=Q(i.fetchedAt),Rs=[ve?`Measured ${ve}`:"Measurement date unavailable",i.freshness&&i.freshness!=="fresh"?i.freshness==="stale-revalidate"?"stored run, refreshing":"stored run":null].filter(
20Boolean).join(" · ");return e.jsxs("div",{className:"report-root aeo-theme bg-[var(--public-ground)] text-[var(--public-ink)]",style:{background:"var(--public-ground)",color:"var(--public-ink)"},children:[e.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-10",children:[e.jsx("style",{children:zs}),e.jsx(Bs,{url:i.url,auditedAt:i.fetchedAt,sample:a}),a&&e.jsxs("div",{"data-testid":"sample-banner",className:"print-hide mt-5 rounded-[var(--public-radius-surface)] px-5 py-4 flex flex-col sm:flex-row sm:items-center gap-3 justify-between",style:{background:"var(--public-accent-wash)",border:"1px solid var(--public-accent-edge)"},children:[e.jsxs("div",{children:[e.jsx(lt,{children:"Sample report"}),e.jsxs("div",{className:"mt-1 text-[15px] font-semibold",style:{color:"var(--public-ink)"},children:["prompeteer.ai, measured ",Q(String(J.auditedAt)),"."]}),e.jsx("div",{className:"mt-1 text-[13px]",style:{color:"var(--public-ink-2)"},children:"Review this sample, then audit your own website."})]}),e.jsx(G,{size:"sm",className:"shrink-0",onClick:q,"data-testid":"sample-cta",children:"Start website audit"})]}),e.jsxs("header",{className:"flex flex-col lg:flex-row lg:flex-wrap lg:items-end lg:justify-between gap-6 pt-8 md:pt-10 pb-6",children:[e.jsxs("div",{className:"min-w-0 flex flex-wrap items-center gap-3",children:[e.jsx("p",{"data-testid":"report-meta",className:"print-hide m-0 font-mono text-[11.5px] font-medium uppercase leading-none tracking-[0.14em]",style:{color:"var(--public-ink-3)"},children:Rs}),a&&e.jsx(It,{job:"status",emphasis:"strong",size:"sm",className:"print-hide",children:"Sample"})]}),e.jsxs("div",{"data-testid":"report-actions",className:"print-hide grid grid-cols-1 gap-2 w-full sm:flex sm:flex-wrap sm:items-start lg:w-auto",children:[!a&&T?e.jsxs(e.Fragment,{children:[e.jsx(G,{asChild:!0,variant:"outline",size:"sm",children:e.jsx("a",{href:gt(`/api/aeo/report/${encodeURIComponent(T)}/document/pdf`),download:!0,children:"Decision PDF"})}),e.jsx(G,{asChild:!0,variant:"outline",size:"sm",children:e.jsx("a",{href:gt(`/api/aeo/report/${encodeURIComponent(T)}/document/pdf?evidence=full`),download:!0,children:"Full evidence PDF"})})]}):e.jsx(G,{variant:"outline",size:"sm",className:"min-w-0",onClick:()=>{window.print(),ne("aeo_report_downloaded","ai_visibility","print")},children:a?"Print sample":"Print this view"}),!a&&e.jsx(Hs,{token:T,kind:"aeo"}),!a&&e.jsx(Ys,{token:T,kind:"aeo",defaultEmail:n?.email??""}),!a&&e.jsx(_l,{url:i.url,signedIn:l,layout:"inline",controlClassName:"col-span-1 sm:col-auto",hintClassName:"col-span-1 sm:basis-full sm:order-last"}),!a&&e.jsx(G,{size:"sm",onClick:q,className:"col-span-1 sm:col-auto sm:w-auto",children:"Create action plan"})]})]}),e.jsx(Lr,{sections:M,onCta:q,ctaLabel:a?"Start website audit":"Create action plan",meta:L?"Website readiness: N
20ot measured":`${i.score.grade} · ${i.score.total}/100${ve?` · measured ${ve}`:""}`}),e.jsxs("section",{id:"summary",className:"py-8",style:X,"aria-label":"Overview",children:[e.jsx(Wr,{sections:M,children:e.jsx(Rr,{report:i,benchmark:o,engines:k,advisor:P,afterIdentity:e.jsx(Br,{fetchedAt:i.fetchedAt,engines:k,sample:a})})}),e.jsx(Pr,{engines:k})]}),!a&&e.jsxs("div",{className:"print-hide flex flex-wrap items-center gap-3 pb-4","data-testid":"report-evidence-refresh",children:[e.jsx(G,{variant:"outline",size:"sm",disabled:E.loading,onClick:E.retry,children:E.loading?"Checking evidenceâ¦":E.phase==="error"||E.phase==="timed-out"?"Try checking again":"Check latest AI evidence"}),e.jsx("span",{role:E.phase==="error"?"alert":"status","aria-live":"polite",className:"text-[12.5px]",style:{color:E.phase==="error"?"var(--public-danger)":"var(--public-ink-2)"},children:Ei(E.phase,k?.corpus.status==="ready")})]}),e.jsxs("section",{id:"engines",className:"aeo-chapter",style:X,"aria-label":"AI visibility",children:[e.jsx("div",{id:"search-presence",style:X,children:e.jsx(ga,{engines:k,sample:a})}),k?.engines.some(A=>A.measurementLayer==="model-memory"||A.method==="memory")&&e.jsxs("details",{className:"aeo-evidence-disclosure",children:[e.jsx("summary",{children:"Model-memory answers"}),e.jsx("div",{children:e.jsx(ga,{engines:k,sample:a,layer:"model-memory"})})]}),e.jsx(ct,{engines:k,view:"citations"}),e.jsx(ct,{engines:k,view:"portrayal"}),e.jsxs("details",{className:"aeo-evidence-disclosure",children:[e.jsx("summary",{children:"Engine coverage and crawler access"}),e.jsx("div",{children:a?e.jsx(ua,{sample:!0,initial:k??null}):k?e.jsx(ua,{token:T,initial:k}):e.jsx("p",{className:"aeo-evidence-empty",children:"Engine coverage is not available yet. Your website audit remains available."})})]}),e.jsxs("details",{className:"aeo-evidence-disclosure",children:[e.jsx("summary",{children:"Answer metrics and question coverage"}),e.jsx("div",{id:"voice",style:X,children:e.jsx(zi,{engines:k,competitors:K})})]}),v.filter(A=>A.id==="offsite"||A.id==="coverage"&&!L).map(({id:A,label:R,Component:U})=>e.jsxs("details",{className:"aeo-evidence-disclosure",children:[e.jsx("summary",{children:R}),e.jsx("div",{id:A,style:X,children:e.jsx(U,{...z})})]},A))]}),e.jsxs("section",{id:"competition",className:"aeo-chapter",style:X,"aria-label":"Competitors",children:[e.jsx(ct,{engines:k,view:"competition"}),L?e.jsx(I,{eyebrow:"Website comparison",title:"Readiness comparison is not measured",summary:`${L} A readable page is required before comparing website readiness. Saved AI answer comparisons above remain separate evidence.`}):o?e.jsx(uo,{benchmark:o,canEdit:!!i.canEditCompetitors,editRef:$,onEdit:()=>{C(!0),ne("aeo_competitors_opened","conversion",i.url)}}):e.jsx(I,{eyebrow:"Competitors",title:"Compare your business with relevant peers",lede:"Compare measured websites to understand which readiness gaps deserve attention.",summary:"No competitor measurements are available in this report. Your site's readiness score stands on its own; a competitor position will appear after comparable sites have been measured."})]}),e.jsxs("section",{id:"plan",className:"aeo-chapter",style:X,"aria-label":"Action plan",children:[L?e.jsx("div",{className:"py-8","data-testid":"website-access-plan",children:e.jsx(I,{eyebrow:"Action plan",title:"Restore access and verify the page",summary:Fa,lede:Wa})}):H?e.jsx(Un,{plan:i.plan,url:i.url}):e.jsxs("div",{className:"py-8",children:[e.jsx(I,{eyebrow:"Action plan",title:"What needs attention",summary:`${O.length+Y.length} critical or important checks failed. Review the evidence for each finding below, apply the relevant change and rerun the audit to verify it; only the first ${ae.length} are shown here.`,lede:"These findings identify website changes to investigate when a detailed action plan is unavailable.",meta:`${ae.length} of ${O.length+Y.length} failing checks shown`}),e.jsxs("div",{className:"flex flex-col",children:[ae.map(A=>e.jsxs("div",{className:"grid gap-4 py-3.5",style:{gridTemplateColumns:"84px minmax(0,1fr)",borderBottom:"1px solid var(--public-hairline)"},children:[e.jsx(co,{severity:A.severity}),e.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[e.jsx("span",{className:"text-[14px] font-semibold",children:A.title}),e.jsx("span",{className:"text-[12.5px] leading-relaxed",style:{color:"var(--public-ink-2)"},children:A.evidence}),A.fix&&e.jsx("code",{className:"mt-1 font-mono text-[11.5px] leading-relaxed rounded-[var(--public-radius-control)] px-3 py-2 overflow-x-auto",style:{background:"var(--public-paper)",border:"1px solid var(--public-hairline)",color:"var(--public-ink-2)"},children:A.fix})]})]},A.id)),ae.length===0&&e.jsxs("p",{className:"text-[14px] py-4",style:{color:"var(--public-ink-2)"},children:["No critical or important failures. ",i.score.passCount," of ",i.checks.length," checks passed."]})]})]}),e.jsxs("div",{id:"next",className:"print-hide my-10 rounded-[var(--public-radius-surface)] px-6 py-7 md:px-8 grid gap-6 lg:grid-cols-[minmax(0,1.2fr)_minmax(0,1fr)] items-center",style:{...X,background:"var(--public-paper)",border:"1px solid var(--public-hairline)"},children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-[24px] md:text-[28px] font-semibold tracking-[-0.025em] leading-[1.2]",style:{color:"var(--public-ink)"},children:a?"Measure your website":"Create an AEM action plan"}),e.jsx("p",{className:"mt-3 text-[14px] leading-relaxed max-w-[52ch]",style:{color:"var(--public-ink-2)"},children:a?"Review crawler access, content structure and the fixes your website needs.":"Turn the findings into prioritised work, research questions and a 30-day plan."}),e.jsx(G,{size:"lg",onClick:q,className:"mt-5",children:a?"Start website audit":"Create action plan"})]}),!a&&e.jsx("dl",{className:"grid gap-4 text-[13px] m-0",children:[["Prioritised fixes","What to change, who should own it, and how to check the result."],["Research questions","Questions from the sampled category, with evidence gaps identified."],["Monthly review","Revisit the company context and compare subsequent measurements."]].map(([A,R])=>e.jsxs("div",{"data-testid":"next-step-item",children:[e.jsx("dt",{className:"font-semibold",style:{color:"var(--public-ink)"},children:A}),e.jsx("dd",{className:"m-0 mt-1 leading-relaxed",style:{color:"var(--public-ink-2)"},children:R})]},A))})]}),e.jsxs("details",{className:"aeo-evidence-disclosure",children:[e.jsx("summary",{children:"Technical findings and supporting evidence"}),e.jsxs("div",{id:"evidence",style:X,children:[e.jsx(ai,{checks:i.checks,observations:i.observations,interactive:!a}),e.jsx(ql,{url:i.url,signedIn:!a&&l})]})]})]}),e.jsxs("section",{id:"trend",className:"aeo-chapter","data-testid":"score-trend-section",style:X,"aria-label":"Progress",children:[e.jsx(I,{eyebrow:"Progress",title:"What changed over time",lede:"Compare dated readiness, visibility and business outcomes after your changes.",summary:L?"Website readiness is not measured in this report. Restore page access before establishing a comparable readiness baseline; saved AI answer trends remain separate.":u.length>1?`Across ${u.length} recorded audits, readiness changed from ${u[0].total}/100 to ${u[u.length-1].total}/100. Compare visibility and the dates of your website changes before attributing an improvement to a particular action.`:"This report establishes a baseline. A trend needs at least two comparable measurements; later audits and answer samples will show what changed.",meta:`${u.length} ${u.length===1?"audit":"audits"}${d?` · ${d} unreadable-page ${d===1?"audit excluded":"audits excluded"}`:""}`}),!L&&(u.length>0?e.jsx(ul,{points:u}):e.jsx("p",{className:"aeo-evidence-empty",children:"No dated readiness history is available yet."})),!a&&!L&&e.jsx("div",{className:"mt-10",children:e.jsx(Ps,{})}),!a&&e.jsx("div",{className:"mt-10",children:e.jsx(El,{points:x?.voice??[],engines:k?.engines??[],brand:k?.brand??i.url})}),!a&&o&&e.jsx("div",{className:"mt-10",children:e.jsx(Ll,{points:x?.voice??[],rows:o.rows??[],youDomain:(o.rows??[]).find(A=>A.isYou)?.domain??k?.domain??i.url})}),v.filter(A=>A.id==="outcomes").map(({id:A,label:R,Component:U})=>e.jsxs("details",{className:"aeo-evidence-disclosure",children:[e.jsx("summary",{children:R}),e.jsx("div",{id:A,style:X,children:e.jsx(U,{...z})})]},A))]})]}),g&&e.jsx(mo,{canEdit:!!i.canEditCompetitors,plan:n?.isPaidUser?"pro":"free",url:i.url,initialDomains:(o?.rows??[]).filter(A=>!A.isYou).map(A=>A.domain),returnFocusTo:$,onClose:()=>C(!1),onSaved:A=>{c(A),C(!1),E.retry()}})]})}function mo({canEdit:t,url:a,onClose:s,onSaved:n,returnFocusTo:l,initialDomains:i}){const[r,o]=j.useState(()=>i.join(` 21`)),[c,d]=j.useState(!1),[p,u]=j.useState(null),[,h]=_a(),x=j.useRef(null),f=j.useRef(null),b=j.useRef(null);j.useEffect(()=>{const w=g=>{g.key==="Escape"&&s()};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[s]),j.useEffect(()=>{const w=l?.current??document.activeElement;return(x.current??f.current)?.focus(),()=>{w?.focus?.()}},[l]);const y=w=>{if(w.key!=="Tab"||!b.current)return;const g=Array.from(b.current.querySelectorAll('button, textarea, input, a[href], [tabindex]:not
21([tabindex="-1"])')).filter(T=>!T.hasAttribute("disabled"));if(!g.length)return;const C=g[0],$=g[g.length-1];w.shiftKey&&document.activeElement===C?(w.preventDefault(),$.focus()):!w.shiftKey&&document.activeElement===$&&(w.preventDefault(),C.focus())},m=async()=>{d(!0),u(null);try{const w=Is(r,a,10),g=await Ds(a,w);n(g)}catch(w){u(w.message)}finally{d(!1)}};return e.jsx("div",{className:Z("fixed inset-0 z-50 flex items-center justify-center p-5",Us),role:"dialog","aria-modal":"true","aria-labelledby":"competitor-set-title",onClick:s,onKeyDown:y,children:e.jsxs("div",{ref:b,className:"w-full max-w-[560px] rounded-[var(--public-radius-surface)] overflow-hidden",onClick:w=>w.stopPropagation(),style:{background:"var(--public-ground)",border:"1px solid var(--public-hairline-strong)",boxShadow:"var(--public-shadow-overlay)"},children:[e.jsxs("div",{className:"px-6 py-5",style:{borderBottom:"1px solid var(--public-hairline)"},children:[e.jsx("h2",{id:"competitor-set-title",className:"text-[16px] font-semibold",children:"Your competitors and peers"}),e.jsx("p",{className:"text-[13px] mt-1",style:{color:"var(--public-ink-2)"},children:t?"Add up to ten websites that serve similar customers or solve similar problems.":"Your current benchmark includes all measured websites."})]}),e.jsx("div",{className:"px-6 py-5 flex flex-col gap-4",children:t?e.jsxs(e.Fragment,{children:[e.jsxs("label",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[13px] font-medium",children:"Competitor domains"}),e.jsx("textarea",{ref:x,value:r,onChange:w=>o(w.target.value),rows:4,placeholder:`promptlayer.com 22langfuse.com`,className:"rounded-[var(--public-radius-control)] px-3 py-2.5 font-mono text-[13.5px] outline-none focus-visible:[box-shadow:var(--public-focus-ring)]",style:{background:"var(--public-ground)",border:"1px solid var(--public-hairline-strong)",color:"var(--public-ink)"}}),e.jsx("span",{className:"text-[12px]",style:{color:"var(--public-ink-2)"},children:"One per line, or comma separated."})]}),p&&e.jsx("p",{role:"alert",className:"text-[13px]",style:{color:"var(--public-danger)"},children:p})]}):e.jsxs("div",{className:"rounded-[var(--public-radius-control)] px-4 py-4 flex flex-col gap-2",style:{background:"var(--public-chart-wash)",border:"1px solid var(--public-chart-edge)"},children:[e.jsx("span",{className:"text-[13.5px] font-semibold",style:{color:"var(--public-chart-ink)"},children:"Pro tracks the competitors you name"}),e.jsxs("ul",{className:"text-[12.5px] leading-relaxed list-disc pl-4",style:{color:"var(--public-chart-ink)"},children:[e.jsx("li",{children:"Name up to ten competitors, in any market"}),e.jsx("li",{children:"Compare website readiness across the same categories"}),e.jsx("li",{children:"Keep your selected competitors across future reports"})]})]})}),e.jsxs("div",{className:"px-6 py-4 flex items-center justify-between gap-4",style:{borderTop:"1px solid var(--public-hairline)",background:"var(--public-paper)"},children:[e.jsx("span",{className:"text-[12.5px]",style:{color:"var(--public-ink-2)"},children:t?"Applies to every future run.":"Your aggregate comparison stays free."}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(G,{ref:f,variant:"ghost",size:"sm",onClick:s,children:t?"Cancel":"Not now"}),t?e.jsx(G,{size:"sm",onClick:m,loading:c,children:"Save competitors"}):e.jsx(G,{size:"sm",onClick:()=>{ne("aeo_pro_cta_clicked","conversion",a),h("/pricing")},children:"Compare on Pro"})]})]})]})})}export{uo as CompetitionSection,mo as CompetitorModal,xc as default,lo as withCurrentAudit};
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.