PageSourceSearch

https://cbnamazonia.com/assets/AdvertiserPortalPage-BS9yZ3oS.js

js cbnamazonia.com collected 2026-10-03 20:30:31 UTC 12,485 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-editor-BX0sR0z-.js";import{r as a,L as m}from"./vendor-react-BPk9u-w4.js";import{m as c,h as p}from"./index-s_BTi5XF.js";import{A as h,a as u}from"./AdvertiseFooter-DpdvnTzq.js";import{aI as b,u as g,z as k,ax as C,ao as S,ag as D,cZ as z,a2 as A,aU as I,bo as E}from"./vendor-icons-XRoHuOlC.js";import"./vendor-charts-Cf-ruFca.js";import"./vendor-ui-utils-Bbg69IUi.js";import"./vendor-graph-Df3mHyA7.js";import"./vendor-supabase-UBwEW4nm.js";import"./vendor-sonner-DPZ7yCFm.js";import"./vendor-helmet-C74EPpLp.js";import"./NetworkLink-N_B1MT9J.js";import"./useNetworkPath-B7HliJPy.js";import"./UserMenu-D0befgdV.js";import"./useViewAsClientMode-SSGRL7WM.js";import"./IconUser-Dpg6CyjH.js";import"./createReactComponent-LJ3Rzzl2.js";import"./IconShieldExclamation-DXDZ_TCn.js";import"./IconChevronDown-BcsKoyPw.js";import"./IconShield-CzEmsLwa.js";import"./IconLayoutDashboard-DFgVykjp.js";import"./IconSettings-NOvzA5lJ.js";import"./IconEyeOff-DvKSXi4x.js";import"./IconEye-CZTid05l.js";import"./IconBuilding-Dp4NXpvd.js";import"./IconBell-CKPOMiV8.js";import"./IconBookmark-mtkJPko5.js";import"./IconLogout-Cf7i78gj.js";import"./index-T0bE9RkD.js";import"./SocialLogos-BgxGK6Ep.js";const ne=()=>{const[l,f]=a.useState(""),[j,n]=a.useState(!1),[r,v]=a.useState([]),[o,d]=a.useState(!1),[x,i]=a.useState(null),w=async t=>{t.preventDefault(),d(!0),i(null);try{const{data:s,error:N}=await p.from("ad_accounts").select("*").eq("advertiser_id",l).single();if(N||!s){i("Código de acesso inválido. Entre em contato com seu consultor.");return}const{data:y}=await p.from("ad_campaigns").select("*").eq("advertiser_id",l);v(y||[]),n(!0)}catch{i("Ocorreu um erro ao validar seu acesso.")}finally{d(!1)}};return j?e.jsxs("div",{className:"min-h-screen bg-slate-50 flex flex-col",children:[e.jsx(h,{}),e.jsxs("main",{className:"flex-1 max-w-7xl mx-auto w-full p-6 md:p-12 mt-20 space-y-10",children:[e.jsxs("div",{className:"flex flex-col md:flex-row md:items-end justify-between gap-6",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"flex items-center gap-2 mb-4",children:e.jsxs("button",{onClick:()=>n(!1),className:"flex items-center gap-2 text-[10px] font-black text-slate-400 uppercase tracking-widest hover:text-slate-600",children:[e.jsx(k,{size:14})," Sair do Painel"]})}),e.jsx("h1",{className:"text-4xl font-black text-slate-900 tracking-tight",children:"Performance das Campanhas"}),e.jsx("p",{className:"text-slate-500 font-medium",children:"Dados atualizados em tempo real para sua tomada de decisão."})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("button",{className:"px-6 py-3 bg-white border border-slate-200 rounded-2xl text-[10px] font-black uppercase tracking-widest flex items-center gap-2 hover:bg-slate-50 transition-all",children:[e.jsx(C,{size:14})," Últimos 30 Dias"]}),e.jsxs("button",{className:"px-6 py-3 bg-blue-600 text-white rounded-2xl text-[10px] font-black uppercase tracking-widest flex items-center gap-2 hover:bg-blue-700 shadow-xl shadow-blue-100 transition-all",children:[e.jsx(S,{size:14})," Exportar PDF"]})]})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[{label:"Impressões Totais",value:"1.2M",icon:D,color:"blue"},{label:"Cliques Únicos",value:"45.8k",icon:z,color:"emerald"},{label:"CTR Médio",value:"3.82%",icon:b,color:"indigo"},{label:"Campanhas Ativas",value:r.length,icon:A,color:"purple"}].map((t,s)=>e.jsxs(c.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:s*.1},className:"bg-white p-8 rounded-[2.5rem] border border-slate-100 shadow-sm space-y-4",children:[e.jsx("div",{className:`w-12 h-12 rounded-2xl bg-${t.color}-50 flex items-center justify-center text-${t.color}-600`,children:e.jsx(t.icon,{size:24})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-black text-slate-400 uppercase tracking-widest",children:t.label}),e.jsx("p",{className:"text-3xl font-black text-slate-900",children:t.value})]})]},s))}),e.jsxs("div",{className:"bg-white p-10 rounded-[3rem] border border-slate-100 shadow-sm space-y-8",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-xl font-black text-slate-900 tracking-tight",children:"Evolução Semanal de Cliques"}),e.jsx("p",{className:"text-xs text-slate-400 font-bold uppercase tracking-widest mt-1",children:"Comparativo dos últimos 7 dias"})]}),e.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 bg-slate-50 rounded-xl border border-slate-100",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-600"}),e.jsx("span",{className:"text-[10px] font-black uppercase tracking-widest text-slate-600",children:"Performance Ativa"})]})]}),e.jsx("div",{className:"h-64 flex items-end justify-between gap-4 pt-4 border-b border-slate-100 pb-2",children:[{day:"Seg",val:40},{day:"Ter",val:65},{day:"Qua",val:45},{day:"Qui",val:90},{day:"Sex",val:75},{day:"Sáb",val:30},{day:"Dom",val:20}].map((t,s)=>e.jsxs("div",{className:"flex-1 flex flex-col items-center gap-4 group text-center",children:[e.jsx("div",{className:"w-full relative flex items-end justify-center h-full",children:e.jsx(c.div,{initial:{height:0},animate:{height:`${t.val}%`},className:"w-full max-w-[40px] bg-blue-600 rounded-t-xl group-hover:bg-indigo-600 transition-colors relative",children:e.jsx("div",{className:"absolute -top-10 left-1/2 -translate-x-1/2 opacity-0 group-hover:opacity-100 transition-all bg-slate-900 text-white text-[10px] font-black px-2 py-1 rounded-lg",children:t.val*123})})}),e.jsx("span",{className:"text-[10px] font-black text-slate-400 uppercase tracking-widest",children:t.day})]},s))})]}),e.jsxs("div",{className:"bg-white rounded-[3rem] border border-slate-100 shadow-sm overflow-hidden",children:[e.jsx("div",{className:"p-8 border-b border-slate-50 flex items-center justify-between",children:e.jsxs("h2",{className:"text-sm font-black text-slate-900 uppercase tracking-widest flex items-center gap-2",children:[e.jsx(I,{size:16,className:"text-blue-600"}),"Relatório Detalhado"]})}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-slate-50/50",children:[e.jsx("th",{className:"px-8 py-4 text-[10px] font-black text-slate-400 uppercase tracking-widest",children:"Campanha / Formato"}),e.jsx("th",{className:"px-8 py-4 text-[10px] font-black text-slate-400 uppercase tracking-widest text-center",children:"Início"}),e.jsx("th",{className:"px-8 py-4 text-[10px] font-black text-slate-400 uppercase tracking-widest text-center",children:"Fim"}),e.jsx("th",{className:"px-8 py-4 text-[10px] font-black text-slate-400 uppercase tracking-widest text-center",children:"Impressões"}),e.jsx("th",{className:"px-8 py-4 text-[10px] font-black text-slate-400 uppercase tracking-widest text-center",children:"Cliques"}),e.jsx("th",{className:"px-8 py-4 text-[10px] font-black text-slate-400 uppercase tracking-widest text-center",children:"CTR"}),e.jsx("th",{className:"px-8 py-4 text-[10px] font-black text-slate-400 uppercase tracking-widest text-center",children:"Status"})]})}),e.jsxs("tbody",{className:"divide-y divide-slate-50",children:[r.map((t,s)=>e.jsxs("tr",{className:"group hover:bg-slate-50/50 transition-colors",children:[e.jsxs("td",{className:"px-8 py-6",children:[e.jsx("div",{className:"font-bold text-slate-900 text-sm group-hover:text-blue-600 transition-colors",children:t.name}),e.jsx("div",{className:"text-[10px] text-slate-400 font-black uppercase tracking-widest mt-0.5",children:t.format_id||"Format Standard"})]}),e.jsx("td",{className:"px-8 py-6 text-center text-sm font-medium text-slate-600",children:new Date(t.start_date).toLocaleDateString()}),e.jsx("td",{className:"px-8 py-6 text-center text-sm font-medium text-slate-600",children:t.end_date?new Date(t.end_date).toLocaleDateString():"Indeterminado"}),e.jsx("td",{className:"px-8 py-6 text-center text-sm font-black text-slate-900",children:"452.190"}),e.jsx("td",{className:"px-8 py-6 text-center text-sm font-black text-slate-900",children:"12.043"}),e.jsx("td",{className:"px-8 py-6 text-center text-sm font-black text-blue-600",children:"2.66%"}),e.jsx("td",{className:"px-8 py-6 text-center",children:e.jsx("span",{className:`px-3 py-1 rounded-full text-[9px] font-black uppercase tracking-widest ${t.status==="active"?"bg-emerald-50 text-emerald-600":"bg-slate-100 text-slate-400"}`,children:t.status})})]},s)),r.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:"px-8 py-20 text-center",children:e.jsxs("div",{className:"max-w-xs mx-auto 
1space-y-3",children:[e.jsx("div",{className:"w-12 h-12 bg-slate-50 rounded-2xl flex items-center justify-center mx-auto text-slate-300",children:e.jsx(g,{size:24})}),e.jsx("p",{className:"text-xs font-black text-slate-400 uppercase tracking-widest",children:"Nenhuma campanha encontrada"})]})})})]})]})})]}),e.jsxs("div",{className:"bg-indigo-600 rounded-[3rem] p-12 text-white flex flex-col md:flex-row items-center justify-between gap-8 relative overflow-hidden shadow-2xl shadow-indigo-200",children:[e.jsx("div",{className:"absolute right-0 top-0 w-1/3 h-full bg-gradient-to-l from-white/10 to-transparent skew-x-12"}),e.jsxs("div",{className:"relative z-10 space-y-4 max-w-2xl",children:[e.jsx("h3",{className:"text-3xl font-black tracking-tight leading-tight",children:"Quer escalar seus resultados em Barueri?"}),e.jsx("p",{className:"text-indigo-100 font-medium",children:"Nossos estrategistas estão prontos para analisar seu funil e sugerir novas posições e formatos exclusivos para sua marca."}),e.jsxs("div",{className:"flex items-center gap-4 pt-4",children:[e.jsx("button",{className:"bg-white text-slate-900 px-8 py-4 rounded-2xl font-black text-xs uppercase tracking-widest hover:bg-blue-400 hover:text-white transition-all",children:"Conversar com Especialista"}),e.jsx(m,{to:"/anuncie/ajuda",className:"text-xs font-black uppercase tracking-widest hover:underline",children:"Ver especificações técnicas"})]})]}),e.jsx("div",{className:"shrink-0 relative z-10",children:e.jsx("div",{className:"p-8 bg-white/10 backdrop-blur-md rounded-[2.5rem] border border-white/20",children:e.jsx(E,{size:48,className:"text-white"})})})]})]}),e.jsx(u,{})]}):e.jsxs("div",{className:"min-h-screen bg-slate-50 flex flex-col",children:[e.jsx(h,{}),e.jsx("main",{className:"flex-1 flex items-center justify-center p-6 mt-20",children:e.jsxs(c.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"bg-white p-12 rounded-[3.5rem] shadow-2xl shadow-slate-200 border border-slate-100 max-w-md w-full text-center space-y-8",children:[e.jsx("div",{className:"w-20 h-20 bg-blue-600 rounded-[2rem] flex items-center justify-center mx-auto shadow-xl shadow-blue-100",children:e.jsx(b,{className:"text-white w-10 h-10"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-black text-slate-900 tracking-tight",children:"Portal do Anunciante"}),e.jsx("p",{className:"text-sm text-slate-500 font-medium",children:"Insira seu código de acesso para visualizar o desempenho de suas campanhas."})]}),e.jsxs("form",{onSubmit:w,className:"space-y-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx(g,{className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400 w-5 h-5"}),e.jsx("input",{type:"text",placeholder:"Código de Acesso (UUID)",className:"w-full pl-12 pr-4 py-4 bg-slate-50 border border-slate-200 rounded-2xl text-sm focus:outline-none focus:border-blue-500 focus:ring-4 focus:ring-blue-500/5 transition-all",value:l,onChange:t=>f(t.target.value)})]}),x&&e.jsx("p",{className:"text-rose-500 text-[10px] font-black uppercase tracking-widest",children:x}),e.jsx("button",{type:"submit",disabled:o,className:"w-full bg-slate-950 text-white py-4 rounded-2xl font-black text-xs uppercase tracking-widest hover:bg-blue-600 transition-all shadow-lg shadow-slate-200 disabled:opacity-50",children:o?"Validando...":"Acessar Relatórios"})]}),e.jsxs("div",{className:"pt-6 border-t border-slate-50",children:[e.jsx("p",{className:"text-[10px] text-slate-400 font-bold uppercase tracking-widest",children:"Esqueceu seu código?"}),e.jsx(m,{to:"/contato",className:"text-[10px] text-blue-600 font-black uppercase tracking-widest hover:underline mt-1 block",children:"Fale com o Suporte"})]})]})}),e.jsx(u,{})]})};export{ne as AdvertiserPortalPage};

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.