PageSourceSearch

https://ranktop.com.br/assets/AnaliseDetalhe-L603001S.js

js ranktop.com.br collected 2026-10-08 03:17:59 UTC 23,170 bytes, 8 lines download raw bytes

1import{j as t}from"./ui-DP3MGJ7H.js";import{f as ze,a as u,L as Q}from"./vendor-C9YJUoHc.js";import{H as ne,F as le}from"./Footer-CAqpfTjo.js";import{S as Pe}from"./SEOHead-DZVQE-ak.js";import{u as Le,a as P,t as x,B as f}from"./index-DtiPzfAm.js";import{C as m,d as h,a as v,b as F}from"./card-LxZ6mji4.js";import{B as G}from"./badge-CNTX1T8j.js";import{I as ie}from"./input-BLR1AQtN.js";import{L as ce}from"./label-nVUzcUau.js";import{D as Ae,a as De,b as Re,c as Ee,f as Oe,d as $e}from"./dialog-C9CFprcX.js";import{u as Ie,S as Be}from"./useSeoSubscription-BwkZYI-u.js";import{E as de}from"./jspdf.es.min-REbdFQqG.js";import{c as Ge,Q as He,n as Y,h as me,G as We,t as Ue,af as Me,au as he,a6 as xe,ab as ge,bc as Ke,a4 as Je,T as C,L as Ve,o as ee}from"./icons-BkqQ-mD_.js";import"./AdSlot-DH0pRZkq.js";import"./query-DEUgYzHT.js";import"./charts-OmThYDam.js";import"./supabase-C_AT-Fx3.js";import"./useComposition-BJVfCnNp.js";import"./animations-HcY6UNf9.js";async function pe(S){try{const g=await fetch(S);if(!g.ok)return null;const H=await g.blob();return await new Promise((W,s)=>{const N=new FileReader;N.onload=()=>W(N.result),N.onerror=s,N.readAsDataURL(H)})}catch{return null}}function gt(){const{id:S}=ze(),{user:g}=Le(),{subscription:H}=Ie(),W=H?.plan_type==="agency",[s,N]=u.useState(null),[ue,L]=u.useState(!0),[fe,je]=u.useState(!1),[U,te]=u.useState(!1),[we,A]=u.useState(!1),[D,be]=u.useState(""),[M,Ne]=u.useState(""),[K,se]=u.useState(!1);u.useEffect(()=>{S&&g?ye(S):g||L(!1)},[S,g]);async function ye(e){L(!0);try{const{data:c,error:l}=await P.from("seo_analyses").select("id, url, score, created_at, crawl_data, technical_checks, issues, recommendations, keywords").eq("id",e).maybeSingle();let o=c;if(!o&&!l){const i=`https://upmjyulgvnxqkbcvtsai.supabase.co/rest/v1/seo_analyses?id=eq.${e}&select=id,url,score,created_at,crawl_data,technical_checks,issues,recommendations,keywords`,a=await fetch(i,{headers:{apikey:"sb_publishable_ZceRWhZBUnJpoa6cIP6CPQ_yIKUk8h9",Authorization:`Bearer ${(await P.auth.getSession()).data.session?.access_token}`}});if(a.ok){const d=await a.json();d.length>0&&(o=d[0])}}if(l)throw l;if(!o){x.error("Análise não encontrada"),L(!1);return}N({...o,technical_checks:Array.isArray(o.technical_checks)?o.technical_checks:[],issues:Array.isArray(o.issues)?o.issues:[],recommendations:Array.isArray(o.recommendations)?o.recommendations:[],keywords:Array.isArray(o.keywords)?o.keywords:[],crawl_data:o.crawl_data||{}}),ve(e)}catch(c){console.error("Error loading analysis:",c),x.error("Erro ao carregar análise")}finally{L(!1)}}async function ve(e){try{const{data:c}=await P.storage.from("seo-snapshots").list(g.id,{search:e});c&&c.length>0&&je(!0)}catch{}}function Fe(){const e=window.location.href;navigator.clipboard.writeText(e).then(()=>x.success("Link copiado para a área de transferência!"),()=>x.error("Não foi possível copiar o link"))}async function Ce(){if(s){te(!0),x.info("Gerando PDF…");try{const e=new de({orientation:"portrait",unit:"mm",format:"a4"}),c=e.internal.pageSize.getWidth(),l=e.internal.pageSize.getHeight(),o=14,i=c-o*2;let a=0;const d=(r=12)=>{a+r>l-14&&(e.addPage(),a=o)};e.setFillColor(59,130,246),e.rect(0,0,c,18,"F");const R=await pe(`${window.location.origin}/logo-ranktop.png`);if(R){try{e.addImage(R,"PNG",o,3,22,12)}catch{}e.setFontSize(13),e.setFont("helvetica","bold"),e.setTextColor(255,255,255),e.text("RankTop SEO Inteligente",o+25,10),e.setFontSize(8),e.setFont("helvetica","normal"),e.text("ranktop.com.br",o+25,15)}else e.setFontSize(14),e.setFont("helvetica","bold"),e.setTextColor(255,255,255),e.text("RankTop SEO Inteligente",o,11),e.setFontSize(8),e.setFont("helvetica","normal"),e.text("ranktop.com.br",o,16);e.setFontSize(8),e.setFont("helvetica","normal"),e.setTextColor(210,230,255),e.text("Relatorio de Analise SEO",c-o,11,{align:"right"}),a=24,e.setFontSize(8),e.setFont("helvetica","normal"),e.setTextColor(107,114,128),e.text("URL Analisada:",o,a),e.setFontSize(9),e.setFont("helvetica","bold"),e.setTextColor(59,130,246);const E=e.splitTextToSize(s.url,i-28);e.text(E,o+27,a),a+=E.length*4+1,e.setFont("helvetica","normal"),e.setTextColor(107,114,128),e.setFontSize(7.5),e.text(`Gerado em ${new Date(s.created_at).toLocaleDateString("pt-BR",{day:"2-digit",month:"long",year:"numeric"})}`,o,a),a+=7,e.setDrawColor(229,231,235),e.setLineWidth(.3),e.line(o,a,c-o,a),a+=6;const J=s.technical_checks.filter(r=>r.passed).length,y=s.technical_checks.filter(r=>!r.passed).length,k=s.technical_checks.filter(r=>!r.passed&&(r.weight??0)>=8),T=s.technical_checks.filter(r=>!r.passed&&(r.weight??0)<8),O=s.score>=80?[34,197,94]:s.score>=50?[249,115,22]:[239,68,68];
1e.setFillColor(...O),e.roundedRect(o,a,34,22,3,3,"F"),e.setFontSize(24),e.setFont("helvetica","bold"),e.setTextColor(255,255,255),e.text(String(s.score),o+17,a+14,{align:"center"}),e.setFontSize(8),e.setFont("helvetica","normal"),e.text("/ 100",o+17,a+19,{align:"center"});const $=[{label:"Criticos",value:String(k.length),color:[239,68,68]},{label:"Melhorias",value:String(T.length),color:[249,115,22]},{label:"OK",value:String(J),color:[34,197,94]},{label:"Recomendacoes",value:String(s.recommendations.length),color:[59,130,246]}];let w=o+38;for(const r of $)e.setFillColor(r.color[0],r.color[1],r.color[2]),e.roundedRect(w,a,30,10,2,2,"F"),e.setFontSize(11),e.setFont("helvetica","bold"),e.setTextColor(255,255,255),e.text(r.value,w+15,a+6.5,{align:"center"}),e.setFontSize(6),e.setFont("helvetica","normal"),e.text(r.label,w+15,a+9.5,{align:"center"}),w+=33;const _=[s.crawl_data?.wordCount!=null&&`${s.crawl_data.wordCount} palavras`,s.crawl_data?.loadTimeMs!=null&&`${s.crawl_data.loadTimeMs}ms resposta`,s.crawl_data?.h1Count!=null&&`H1: ${s.crawl_data.h1Count}`,s.crawl_data?.totalLinks!=null&&`${s.crawl_data.totalLinks} links`,s.crawl_data?.totalImages!=null&&`${s.crawl_data.totalImages} imgs`].filter(Boolean);_.length&&(e.setFontSize(7.5),e.setFont("helvetica","normal"),e.setTextColor(107,114,128),e.text(_.join("   |   "),o+38,a+18)),a+=28,e.setDrawColor(229,231,235),e.line(o,a,c-o,a),a+=5;const b=(r,p,j,Z)=>{if(p.length){d(14),e.setFillColor(j[0],j[1],j[2]),e.roundedRect(o,a,i,7,1.5,1.5,"F"),e.setFontSize(8.5),e.setFont("helvetica","bold"),e.setTextColor(255,255,255),e.text(`${r} (${p.length})`,o+3,a+5),a+=10,e.setFontSize(8);for(const B of p){d(10),e.setFillColor(Z[0],Z[1],Z[2]),e.roundedRect(o,a-.5,7,5,1,1,"F"),e.setFont("helvetica","bold"),e.setTextColor(255,255,255),e.text(B.prefix,o+3.5,a+3.2,{align:"center"}),e.setFont("helvetica","normal"),e.setTextColor(31,41,55);const re=e.splitTextToSize(B.text,i-11);if(e.text(re,o+9,a+3),a+=re.length*4+1,B.detail){d(6),e.setFontSize(7),e.setTextColor(107,114,128);const oe=e.splitTextToSize(B.detail,i-11);e.text(oe,o+9,a),a+=oe.length*3.5+1,e.setFontSize(8)}}a+=3}},n=k.map(r=>({prefix:"X",text:r.label||r.name||"",detail:r.details||r.detail})),I=T.map(r=>({prefix:"!",text:r.label||r.name||"",detail:r.details||r.detail})),V=s.technical_checks.filter(r=>r.passed).map(r=>({prefix:"v",text:r.label||r.name||""}));b("CRITICO - Corrija primeiro",n,[220,38,38],[239,68,68]),b("PARA MELHORAR",I,[194,65,12],[249,115,22]),b("OK - Boas praticas confirmadas",V,[21,128,61],[34,197,94]);const q=s.issues.map(r=>({prefix:"X",text:typeof r=="string"?r:r.title||r.message||"",detail:typeof r=="object"?r.description:void 0})).filter(r=>r.text);b("PROBLEMAS ENCONTRADOS",q,[153,27,27],[239,68,68]);const X=s.recommendations.map((r,p)=>({prefix:String(p+1),text:typeof r=="string"?r:r.message||r.description||""})).filter(r=>r.text);if(b("RECOMENDACOES",X,[29,78,216],[59,130,246]),s.keywords.length>0){d(16),e.setFillColor(91,33,182),e.roundedRect(o,a,i,7,1.5,1.5,"F"),e.setFontSize(8.5),e.setFont("helvetica","bold"),e.setTextColor(255,255,255),e.text("PALAVRAS-CHAVE IDENTIFICADAS",o+3,a+5),a+=10;const r=s.keywords.map(j=>typeof j=="string"?j:j.keyword||j.term||"").filter(Boolean).join(", ");e.setFontSize(8),e.setFont("helvetica","normal"),e.setTextColor(31,41,55);const p=e.splitTextToSize(r,i);d(p.length*4+4),e.text(p,o,a+4),a+=p.length*4+8}const z=e.internal.getNumberOfPages();for(let r=1;r<=z;r++)e.setPage(r),e.setFillColor(248,250,252),e.rect(0,l-10,c,10,"F"),e.setDrawColor(226,232,240),e.setLineWidth(.2),e.line(0,l-10,c,l-10),e.setFontSize(7),e.setFont("helvetica","normal"),e.setTextColor(107,114,128),e.text("RankTop SEO Inteligente  |  ranktop.com.br",o,l-4),e.text(`Pagina ${r} de ${z}`,c-o,l-4,{align:"right"});const _e=s.url.replace(/https?:\/\//,"").replace(/[^a-z0-9]/gi,"-").substring(0,40);e.save(`relatorio-seo-${_e}.pdf`),x.success("PDF gerado com sucesso!")}catch(e){console.error("[PDF] error:",e),x.error("Erro ao gerar o PDF.")}finally{te(!1)}}}async function Se(){if(s)try{const{data:e}=await P.storage.from("seo-snapshots").list(g.id,{search:s.id});if(!e||e.length===0){x.error("Snapshot HTML não encontrado");return}const{data:c}=await P.storage.from("seo-snapshots").download(`${g.id}/${e[0].name}`);if(c){const l=URL.createObjectURL(c),o=document.createElement("a");o.href=l,o.download=`seo-snapshot-${s.url.replace(/[^a-z0-9]/gi,"-")}.html`,o.click(),URL.revokeObjectURL(l)}}catch{x.error("Erro ao baixar snapshot")}}
1async function ke(){if(s){se(!0);try{const e=new de({orientation:"portrait",unit:"mm",format:"a4"}),c=e.internal.pageSize.getWidth(),l=15,o=c-l*2;let i=l;const a=M.trim()!=="";if(a){const n=await pe(M.trim());if(n)try{e.addImage(n,"PNG",l,i,30,12)}catch{}}D.trim()&&(e.setFontSize(a?11:13),e.setTextColor(50,50,50),e.setFont("helvetica","bold"),e.text(D.trim(),a?l+33:l,i+7)),e.setDrawColor(59,130,246),e.setLineWidth(.8),e.line(l,i+14,c-l,i+14),i+=20,e.setFontSize(18),e.setFont("helvetica","bold"),e.setTextColor(30,30,30),e.text("Relatório SEO",l,i),i+=8,e.setFontSize(9),e.setFont("helvetica","normal"),e.setTextColor(100,100,100);const d=e.splitTextToSize(s.url,o);e.text(d,l,i),i+=d.length*4+2,e.setFontSize(8),e.text(`Gerado em ${new Date(s.created_at).toLocaleDateString("pt-BR",{day:"2-digit",month:"long",year:"numeric"})}`,l,i),i+=8;const R=s.score>=80?[34,197,94]:s.score>=50?[249,115,22]:[239,68,68];e.setFillColor(...R),e.roundedRect(l,i,40,20,3,3,"F"),e.setFontSize(22),e.setFont("helvetica","bold"),e.setTextColor(255,255,255),e.text(String(s.score),l+20,i+13,{align:"center"}),e.setFontSize(9),e.setFont("helvetica","normal"),e.setTextColor(80,80,80);const E=s.technical_checks.filter(n=>n.passed).length,J=s.technical_checks.filter(n=>!n.passed).length;e.text("Score SEO / 100",l+44,i+6),e.text(`${E} verificações OK  ·  ${J} problemas`,l+44,i+12),e.text(`${s.recommendations.length} recomendações`,l+44,i+18),i+=26;const y=(n,I,V,q)=>{if(I.length){i>260&&(e.addPage(),i=l),e.setFontSize(11),e.setFont("helvetica","bold"),e.setTextColor(...q),e.text(n,l,i),i+=5,e.setFontSize(8),e.setFont("helvetica","normal"),e.setTextColor(50,50,50);for(const X of I){i>272&&(e.addPage(),i=l+5);const z=e.splitTextToSize(`${V} ${X}`,o-4);e.text(z,l+2,i),i+=z.length*4+1}i+=4}},k=s.technical_checks.filter(n=>!n.passed&&(n.weight??0)>=8).map(n=>n.label||n.name),T=s.technical_checks.filter(n=>!n.passed&&(n.weight??0)<8).map(n=>n.label||n.name),O=s.technical_checks.filter(n=>n.passed).map(n=>n.label||n.name);y(`Crítico — Corrija primeiro (${k.length})`,k,"✗",[220,38,38]),y(`Para melhorar (${T.length})`,T,"△",[249,115,22]),y(`OK (${O.length})`,O,"✓",[22,163,74]);const $=s.issues.map(n=>typeof n=="string"?n:n.title||n.message||"").filter(Boolean);y(`Problemas Encontrados (${$.length})`,$,"•",[220,38,38]);const w=s.recommendations.map(n=>typeof n=="string"?n:n.message||n.description||"").filter(Boolean);y(`Recomendações (${w.length})`,w,"→",[59,130,246]);const _=e.internal.getNumberOfPages();for(let n=1;n<=_;n++)e.setPage(n),e.setFontSize(7),e.setFont("helvetica","normal"),e.setTextColor(150,150,150),e.text(`Página ${n} de ${_}`,c-l,287,{align:"right"}),e.text("Powered by RankTop SEO Inteligente · ranktop.com.br",l,287);const b=`relatorio-seo-${s.url.replace(/https?:\/\//,"").replace(/[^a-z0-9]/gi,"-").substring(0,40)}.pdf`;e.save(b),x.success("PDF white-label gerado com sucesso!"),A(!1)}catch(e){console.error("[WhitelabelPDF] error:",e),x.error("Erro ao gerar o PDF. Tente novamente.")}finally{se(!1)}}}if(!g)return t.jsxs(t.Fragment,{children:[t.jsx(ne,{}),t.jsx("main",{className:"min-h-screen bg-background flex items-center justify-center",children:t.jsx(m,{className:"max-w-md w-full mx-4",children:t.jsxs(h,{className:"pt-6 text-center space-y-4",children:[t.jsx(Ge,{className:"h-12 w-12 mx-auto text-muted-foreground"}),t.jsx("h2",{className:"text-xl font-bold",children:"Acesso Restrito"}),t.jsx("p",{className:"text-muted-foreground",children:"Faça login para visualizar esta análise."}),t.jsx(f,{asChild:!0,children:t.jsx(Q,{href:"/login",children:"Fazer Login"})})]})})}),t.jsx(le,{})]});const Te=s?.technical_checks?.filter(e=>e.passed).length??0,ae=s?.technical_checks?.filter(e=>!e.passed).length??0;return t.jsxs(t.Fragment,{children:[t.jsx("style",{children:`
2        @media print {
3          header, footer, nav { display: none !important; }
4          .print\\:hidden { display: none !important; }
5          body { background: white !important; }
6          .container { max-width: 100% !important; padding: 0 !important; }
7        }
8      `}),t.jsx(Pe,{title:`Análise SEO${s?` - ${s.url}`:""} | RankTop`,description:"Relatório completo de análise SEO."}),t.jsx(ne,{}),t.jsx("main",{className:"min-h-screen bg-background",children:t.jsxs("div",{className:"container max-w-4xl py-8 space-y-8",children:[t.jsx(f,{variant:"ghost",size:"sm",asChild:!0,className:"print:hidden",children:t.jsxs(Q,{href:"/dashboard-seo",children:[t.jsx(He,{className:"h-4 w-4 mr-1"}),"Voltar ao Dashboard"]})}),ue?t.jsx("div",{className:"flex justify-center py-24",children:t.jsx(Y,{className:"h-10 w-10 animate-spin text-primary"})}):s?t.jsxs(t.Fragment,{children:[t.jsx(m,{children:t.jsx(h,{className:"pt-6",children:t.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-6",children:[t.jsx(Be,{score:s.score,size:"lg"}),t.jsxs("div",{className:"space-y-2 text-center sm:text-left flex-1",children:[t.jsxs("div",{className:"flex items-center gap-2 flex-wrap justify-center sm:justify-start",children:[t.jsx(We,{className:"h-4 w-4 text-muted-foreground"}),t.jsx("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",className:"text-sm font-medium text-primary hover:underline break-all",children:s.url})]}),t.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground justify-center sm:justify-start",children:[t.jsx(Ue,{className:"h-3 w-3"}),new Date(s.created_at).toLocaleDateString("pt-BR",{day:"2-digit",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit"})]}),t.jsxs("div",{className:"flex gap-2 flex-wrap justify-center sm:justify-start",children:[t.jsxs(G,{variant:"secondary",children:[Te," verificações OK"]}),ae>0&&t.jsxs(G,{variant:"destructive",children:[ae," problemas"]}),s.recommendations.length>0&&t.jsxs(G,{variant:"outline",children:[s.recommendations.length," recomendações"]})]})]}),t.jsxs("div",{className:"flex gap-2 flex-wrap justify-center sm:justify-end print:hidden",children:[t.jsxs(f,{variant:"outline",size:"sm",onClick:Fe,children:[t.jsx(Me,{className:"h-4 w-4 mr-1"}),"Compartilhar"]}),t.jsxs(f,{variant:"outline",size:"sm",onClick:Ce,disabled:U,children:[U?t.jsx(Y,{className:"h-4 w-4 mr-1 animate-spin"}):t.jsx(he,{className:"h-4 w-4 mr-1"}),U?"Gerando...":"Exportar PDF"]}),W&&t.jsxs(f,{size:"sm",onClick:()=>A(!0),children:[t.jsx(xe,{className:"h-4 w-4 mr-1"}),"PDF White-label"]}),fe&&t.jsxs(f,{variant:"outline",size:"sm",onClick:Se,children:[t.jsx(he,{className:"h-4 w-4 mr-1"}),"HTML Original"]})]})]})})}
8),s.crawl_data&&Object.keys(s.crawl_data).length>0&&t.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:[s.crawl_data.wordCount!=null&&t.jsx(m,{children:t.jsxs(h,{className:"pt-4 pb-4 text-center",children:[t.jsx(ge,{className:"h-4 w-4 mx-auto text-muted-foreground mb-1"}),t.jsx("p",{className:"text-lg font-bold",children:s.crawl_data.wordCount}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Palavras"})]})}),s.crawl_data.loadTimeMs!=null&&t.jsx(m,{children:t.jsxs(h,{className:"pt-4 pb-4 text-center",children:[t.jsx(Ke,{className:"h-4 w-4 mx-auto text-muted-foreground mb-1"}),t.jsxs("p",{className:"text-lg font-bold",children:[s.crawl_data.loadTimeMs,"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Resposta"})]})}),s.crawl_data.totalImages!=null&&t.jsx(m,{children:t.jsxs(h,{className:"pt-4 pb-4 text-center",children:[t.jsx(Je,{className:"h-4 w-4 mx-auto text-muted-foreground mb-1"}),t.jsx("p",{className:"text-lg font-bold",children:s.crawl_data.totalImages}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Imagens"})]})}),s.crawl_data.imagesWithoutAlt!=null&&t.jsx(m,{children:t.jsxs(h,{className:"pt-4 pb-4 text-center",children:[t.jsx(C,{className:"h-4 w-4 mx-auto text-destructive mb-1"}),t.jsx("p",{className:"text-lg font-bold text-destructive",children:s.crawl_data.imagesWithoutAlt}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Sem Alt"})]})}),s.crawl_data.totalLinks!=null&&t.jsx(m,{children:t.jsxs(h,{className:"pt-4 pb-4 text-center",children:[t.jsx(Ve,{className:"h-4 w-4 mx-auto text-muted-foreground mb-1"}),t.jsx("p",{className:"text-lg font-bold",children:s.crawl_data.totalLinks}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Links"})]})}),s.crawl_data.h1Count!=null&&t.jsx(m,{children:t.jsxs(h,{className:"pt-4 pb-4 text-center",children:[t.jsx(ge,{className:"h-4 w-4 mx-auto text-muted-foreground mb-1"}),t.jsx("p",{className:"text-lg font-bold",children:s.crawl_data.h1Count}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Tags H1"})]})})]}),s.technical_checks.length>0&&(()=>{const e=s.technical_checks,c=e.filter(a=>!a.passed&&(a.weight??0)>=8),l=e.filter(a=>!a.passed&&(a.weight??0)<8),o=e.filter(a=>a.passed),i=({check:a})=>t.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg border bg-background",children:[a.passed?t.jsx(ee,{className:"h-4 w-4 text-green-500 shrink-0 mt-0.5"}):(a.weight??0)>=8?t.jsx(C,{className:"h-4 w-4 text-destructive shrink-0 mt-0.5"}):t.jsx(C,{className:"h-4 w-4 text-orange-400 shrink-0 mt-0.5"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("p",{className:"text-sm font-medium",children:a.label||a.name}),(a.details||a.detail)&&t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:a.details||a.detail})]})]});return t.jsxs("div",{className:"space-y-4",children:[c.length>0&&t.jsxs(m,{className:"border-destructive/40",children:[t.jsx(v,{className:"pb-2",children:t.jsxs(F,{className:"text-sm flex items-center gap-2 text-destructive",children:[t.jsx(C,{className:"h-4 w-4"}),"Crítico — Corrija primeiro (",c.length,")"]})}),t.jsx(h,{children:t.jsx("div",{className:"grid gap-2",children:c.map((a,d)=>t.jsx(i,{check:a},d))})})]}),l.length>0&&t.jsxs(m,{className:"border-orange-200",children:[t.jsx(v,{className:"pb-2",children:t.jsxs(F,{className:"text-sm flex items-center gap-2 text-orange-500",children:[t.jsx(C,{className:"h-4 w-4"}),"Para melhorar (",l.length,")"]})}),t.jsx(h,{children:t.jsx("div",{className:"grid gap-2",children:l.map((a,d)=>t.jsx(i,{check:a},d))})})]}),o.length>0&&t.jsxs(m,{className:"border-green-200",children:[t.jsx(v,{className:"pb-2",children:t.jsxs(F,{className:"text-sm flex items-center gap-2 text-green-600",children:[t.jsx(ee,{className:"h-4 w-4"}),"OK (",o.length,")"]})}),t.jsx(h,{children:t.jsx("div",{className:"grid gap-2",children:o.map((a,d)=>t.jsx(i,{check:a},d))})})]})]})})(),s.issues.length>0&&t.jsxs(m,{children:[t.jsx(v,{children:t.jsxs(F,{className:"text-base text-destructive",children:["Problemas Encontrados (",s.issues.length,")"]})}),t.jsx(h,{children:t.jsx("ul",{className:"space-y-2",children:s.issues.map((e,c)=>t.jsxs("li",{className:"flex items-start gap-2 text-sm p-3 rounded-lg bg-destructive/5 border border-destructive/10",children:[t.jsx(C,{className:"h-4 w-4 text-destructive shrink-0 mt-0.5"}),t.jsxs("div",{children:[t.jsx("p",{className:"font-medium",children:typeof e=="string"?e:e.title||e.message||""}),e.description&&t.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:e.description})]})]},c))})})]}),s.recommendations.length>0&&t.jsxs(m,{children:[t.jsx(v,{children:t.jsxs(F,{className:"text-base text-primary",children:["Recomendações (",s.recommendations.length,")"]})}),t.jsx(h,{children:t.jsx("ul",{className:"space-y-2",children:s.recommendations.map((e,c)=>t.jsxs("li",{className:"flex items-start gap-2 text-sm p-3 rounded-lg bg-primary/5 border border-primary/10",children:[t.jsx(ee,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),t.jsx("span",{children:typeof e=="string"?e:e.message||e.description||JSON.stringify(e)})]},c))})})]}),s.keywords.length>0&&t.jsxs(m,{children:[t.jsx(v,{children:t.jsx(F,{className:"text-base",children:"Palavras-chave Sugeridas"})}),t.jsx(h,{children:t.jsx("div",{className:"flex flex-wrap gap-2",children:s.keywords.map((e,c)=>t.jsx(G,{variant:"secondary",className:"text-sm",children:typeof e=="string"?e:e.keyword||e.term||JSON.stringify(e)},c))})})]})]}):t.jsx(m,{children:t.jsxs(h,{className:"pt-6 text-center py-16",children:[t.jsx(me,{className:"h-12 w-12 mx-auto text-muted-foreground
8/30 mb-4"}),t.jsx("h2",{className:"text-xl font-bold mb-2",children:"Análise não encontrada"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:"Este relatório pode ter sido removido ou você não tem permissão para visualizá-lo."}),t.jsx(f,{asChild:!0,children:t.jsx(Q,{href:"/dashboard-seo",children:"Voltar ao Dashboard"})})]})})]})}),t.jsx(le,{}),t.jsx(Ae,{open:we,onOpenChange:A,children:t.jsxs(De,{className:"max-w-md",children:[t.jsxs(Re,{children:[t.jsxs(Ee,{className:"flex items-center gap-2",children:[t.jsx(xe,{className:"h-5 w-5 text-primary"}),"Gerar PDF White-label"]}),t.jsx(Oe,{children:"Personalize o relatório com a identidade da sua agência. O logo e o nome aparecerão no cabeçalho do PDF."})]}),t.jsxs("div",{className:"space-y-4 py-2",children:[t.jsxs("div",{className:"space-y-2",children:[t.jsx(ce,{htmlFor:"agencyName",children:"Nome da Agência"}),t.jsx(ie,{id:"agencyName",placeholder:"Ex: Agência Digital XYZ",value:D,onChange:e=>be(e.target.value)})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx(ce,{htmlFor:"agencyLogo",children:"URL do Logo (opcional)"}),t.jsx(ie,{id:"agencyLogo",placeholder:"https://suaagencia.com.br/logo.png",value:M,onChange:e=>Ne(e.target.value)}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Use uma imagem PNG ou JPG com fundo transparente. O logo deve ser acessível publicamente."})]})]}),t.jsxs($e,{className:"gap-2",children:[t.jsx(f,{variant:"outline",onClick:()=>A(!1),disabled:K,children:"Cancelar"}),t.jsx(f,{onClick:ke,disabled:K||!D.trim(),children:K?t.jsxs(t.Fragment,{children:[t.jsx(Y,{className:"h-4 w-4 mr-2 animate-spin"})," Gerando..."]}):t.jsxs(t.Fragment,{children:[t.jsx(me,{className:"h-4 w-4 mr-2"})," Gerar PDF"]})})]})]})})]})}export{gt as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.