PageSourceSearch

https://aliancapay.com.br/assets/onboarding-la-0MrVtvR7.js

js aliancapay.com.br collected 2026-10-02 01:18:27 UTC 40,231 bytes, 1 lines download raw bytes

1import{c as k,r as t,j as e,B as f,h as qe,s as y,t as g,d as T,e as M,u as Ms,U as Rs,I as Y,w as U,x as W,y as H,z as G,D as j,aj as ns,F as os,H as is,J as ls,K as cs,M as ds,N as ms,ak as $s,S as zs}from"./index-wU2wPbRc.js";import{A as Fe,C as Ve,S as Bs,b as qs,c as Fs,d as Vs,e as Us,f as Ws,g as Hs,h as Gs}from"./AdminLayout-hWrRWX7G.js";import{B as K}from"./badge-51cz6_CH.js";import{A as Ue,a as We,b as He,c as Ge,d as Je,e as Ke,f as Xe,g as Ze}from"./alert-dialog-BxA7QtcW.js";import{T as Js}from"./textarea-viE5bDMu.js";import{u as us}from"./use-current-user-DzBPrwsH.js";import{I as Qe}from"./ImageUploader-DivIeWRL.js";import{b as Ks,r as Xs}from"./welcome.functions-DLmTgQGr.js";import{C as xs}from"./circle-check-CB4Ye4v9.js";import{C as hs}from"./circle-x-CVui8gCu.js";import{L as F}from"./loader-circle-BvDJGTsg.js";import{T as ps}from"./triangle-alert-CdByzLgA.js";import{T as Zs}from"./trash-2-B8PIF7S4.js";import{M as Qs}from"./mail-BN7f4i-A.js";import{P as Ys,M as ea}from"./phone-BGcetW2X.js";import{D as Ye}from"./download-C2AnhiuH.js";import"./StationLogo-DVF4hRBT.js";import"./sparkles-BizJn-6h.js";const sa=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],aa=k("arrow-down",sa);const ta=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],ra=k("arrow-up-down",ta);const na=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],oa=k("arrow-up",na);const ia=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]],la=k("ban",ia);const ca=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],da=k("calendar",ca);const ma=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],ua=k("chevron-left",ma);const xa=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ha=k("chevron-right",xa);const pa=[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],fa=k("circle-play",pa);const ga=[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]],ja=k("image-off",ga);const ba=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],va=k("rotate-cw",ba);async function es(){const{data:s}=await y.auth.getSession();return s.session?.access_token??""}const ss=s=>s?new Date(s).toLocaleString("pt-BR",{timeZone:"America/Sao_Paulo"}):"—",Na={sent:"Enviado",failed:"Falha no envio",processing:"Enviando…"};function wa({requestId:s}){const{user:n}=us(),r=n?.roles.includes("administrador")??!1,[i,l]=t.useState(null),[x,c]=t.useState(!0),[d,m]=t.useState(!1),u=t.useCallback(async()=>{if(r)try{l(await Ks({data:{token:await es(),requestId:s}}))}catch{l(null)}finally{c(!1)}},[s,r]);if(t.useEffect(()=>{u()},[u]),!r)return e.jsx("p",{className:"text-sm text-muted-foreground",children:"Disponível apenas para administradores."});if(x)return e.jsx("p",{className:"text-sm text-muted-foreground",children:"Carregando…"});const b=async()=>{m(!0);try{const v=await Xs({data:{token:await es(),requestId:s}});v.ok?g.success("E-mail de boas-vindas enviado."):g.error(v.error??"Falha no envio.")}catch(v){g.error(v instanceof Error?v.message:"Falha no reenvio.")}finally{m(!1),await u()}};return i?e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:"Status:"}),e.jsx(K,{variant:i.status==="failed"?"destructive":"secondary",children:Na[i.status]})]}),e.jsxs("p",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Destinatário:"})," ",i.recipient]}),i.status==="sent"?e.jsxs("p",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Enviado em:"})," ",ss(i.sent_at)]}):e.jsxs("p",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Última tentativa:"})," ",ss(i.last_attempt_at)]}),e.jsxs("p",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Tentativas:"})," ",i.attempts]}),i.status==="failed"&&i.last_error&&e.jsxs("p",{className:"break-words text-destructive",children:["Erro: ",i.last_error]}),i.status==="failed"&&e.jsxs(f,{size:"sm",variant:"outline",onClick:b,disabled:d,children:[e.jsx(qe,{className:"h-4 w-4"})," Reenviar e-mail"]})]}):e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Nenhum envio registrado (e-mail automático desativado no momento da ativação)."}),e.jsxs(f,{size:"sm",variant:"outline",onClick:b,disabled:d,children:[e.jsx(qe,{className:"h-4 w-4"}
1)," Enviar e-mail"]})]})}const ya=T({method:"POST"}).handler(M("7ebf731f46b91dac990934f1eadd79464fd6a6abc23b5c8c8e3f14f14e223471")),as=T({method:"POST"}).handler(M("f0f31cbaf87ff0453a0cd081995e7bd34290e26693f54a1f25f0cdd0ef3bc757")),Sa=T({method:"POST"}).handler(M("ed114f2900c18dda28e0164970d5e5eeb9e46bf70c4a6109e5d6480db25855c4")),Ca=T({method:"POST"}).handler(M("84c3c11c3eb60c2418d23bdedd9fe9ac8ba82ca835852137cbf5d74370893734")),ka=T({method:"POST"}).handler(M("30fbeafcfae74d16c661d0a3aa3d1979b537397990809130de2e0aa0451a8882")),_a=T({method:"POST"}).handler(M("65536db3be82709fbae697ba216ea6f8f02926c85b11f2d436ebcb71f51fd567"));function ts(s){const n=s?.site_images??null,r=i=>{const l=n&&typeof n=="object"?n[i]:null;return typeof l=="string"&&l.trim()?l.trim():null};return{hero_image_url:r("hero_image_url"),ceo_image_url:r("ceo_image_url")}}const Ea=T({method:"POST"}).handler(M("e302797db3eda3f2462c897509111458c212762dbff0f1089fbfbd56f9c22eea")),be={pendente:"Pendente",aprovado:"Aprovado",em_provisionamento:"Provisionando",concluido:"Concluído",rejeitado:"Rejeitado",erro:"Erro",erro_provisionamento:"Erro (provisionamento)"};function fs(s){switch(s){case"pendente":return"bg-brand-glow/20 text-brand border-brand-glow/40";case"aprovado":return"bg-brand-mint/30 text-brand border-brand-mint/50";case"em_provisionamento":return"bg-brand-glow/25 text-brand border-brand-glow/50 animate-pulse";case"concluido":return"bg-brand-lime/30 text-brand border-brand-lime/50";case"rejeitado":return"bg-destructive/15 text-destructive border-destructive/30";case"erro":case"erro_provisionamento":return"bg-orange-500/15 text-orange-600 border-orange-500/30";default:return"bg-muted text-muted-foreground"}}function J(s){return s?new Date(s).toLocaleString("pt-BR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"}):"—"}function gs(s,n="?"){const r=(s??"").trim();return r?r.charAt(0).toUpperCase():n}const ee=20;function et(){const s=Ms(),{user:n}=us(),[r,i]=t.useState(!1),[l,x]=t.useState(!0),[c,d]=t.useState(null),[m,u]=t.useState(null),[b,v]=t.useState(""),[_,R]=t.useState(""),[S,ve]=t.useState("all"),[$,Ne]=t.useState("all"),[z,we]=t.useState("all"),[B,ye]=t.useState("all"),[q,Se]=t.useState("all"),[D,Ce]=t.useState(""),[L,ke]=t.useState(""),[O,ae]=t.useState(1),[N,bs]=t.useState("created_at"),[C,_e]=t.useState("desc"),[vs,te]=t.useState(!1),[Ns,Ee]=t.useState(!1),[h,re]=t.useState(null),[Ae,ne]=t.useState(null),[ws,De]=t.useState(!1),[ys,oe]=t.useState(null),[Ss,ie]=t.useState(!1),[le,Le]=t.useState(!1),[Cs,Oe]=t.useState(0),[ks,ce]=t.useState(null),[_s,X]=t.useState(!1),[Z,Ie]=t.useState(""),[de,Pe]=t.useState(""),[me,Te]=t.useState(!1),[Es,ue]=t.useState(!1),[xe,Me]=t.useState(!1),[Re,he]=t.useState(null),As=(n?.roles.includes("administrador")??!1)||(n?.roles.includes("ti")??!1),Ds=n?.roles.includes("administrador")??!1;t.useEffect(()=>{const a=setTimeout(()=>R(b),350);return()=>clearTimeout(a)},[b]),t.useEffect(()=>{ae(1)},[_,S,$,z,B,q,D,L,N,C]);const A=t.useCallback(async()=>{const{data:a}=await y.auth.getSession();if(!a.session){s({to:"/login"});return}x(!0),d(null);try{const o=await ya({data:{token:a.session.access_token,page:O,pageSize:ee,search:_||void 0,status:S,whiteLabelId:$,origem:z,cidade:B,images:q,from:D?new Date(D).toISOString():null,to:L?new Date(`${L}T23:59:59`).toISOString():null,sortField:N,sortDir:C}});u(o)}catch(o){const p=o instanceof Error?o.message:"Erro ao carregar solicitações";d(p),g.error(p)}finally{x(!1)}},[s,O,_,S,$,z,B,q,D,L,N,C]);t.useEffect(()=>{const{data:a}=y.auth.onAuthStateChange((o,p)=>{p||s({to:"/login"})});return y.auth.getSession().then(({data:o})=>{if(!o.session){s({to:"/login"});return}i(!0)}),()=>a.subscription.unsubscribe()},[s]),t.useEffect(()=>{r&&A()},[r,A]),t.useEffect(()=>{if(!r)return;const a=()=>{document.visibilityState==="visible"&&A()};return window.addEventListener("focus",a),document.addEventListener("visibilitychange",a),()=>{window.removeEventListener("focus",a),document.removeEventListener("visibilitychange",a)}},[r,A]);const Q=t.useCallback(async a=>{De(!0),oe(null);try{const{data:o}=await y.auth.getSession();if(!o.session)throw new Error("Sessão expirada");const p=await Sa({data:{token:o.session.access_token,requestId:a}});ne(p)}catch(o){const p=o instanceof Error?o.message:"Erro na pré-validação";oe(p),ne(null)}finally{De(!1)}},[]),$e=t.useCallback(async a=>{try{const{data:o}=await y.auth.getSession();if(!o.session)return;const p=await as({data:{token:o.session.access_token,id:a}});re(p)}catch{}},[]),ze=async a=>{te(!0),re(null),ne(null),oe(null),ce(null),Ee(!0);try{const{data:o}=await y.auth.getSession();if(!o.session)throw new Error("Sessão expirada");const p=await as({data:{token:o.session.access_token,id:a.id}});re(p),Q(a.id)}catch(o){const p=o instanceof Error?o.message:"Erro ao carregar detalhes";g.error(p),te(!1)}finally{Ee(!1)}};t.useEffect(()=>{if(!le)return;Oe(0);const a=setInterval(()=>Oe(o=>(o+1)%6),900);return()=>clearInterval(a)},[le]);const Ls=async()=>
1{if(h){ie(!1),Le(!0),ce(null);try{const{data:a}=await y.auth.getSession();if(!a.session)throw new Error("Sessão expirada");const o=await Ca({data:{token:a.session.access_token,requestId:h.id}});ce(o),o.error?g.error(`Provisionamento falhou: ${o.error.message}`):g.success("Licenciado provisionado com sucesso"),await Promise.all([$e(h.id),Q(h.id),A()])}catch(a){const o=a instanceof Error?a.message:"Erro ao aprovar";g.error(o)}finally{Le(!1)}}},Os=async()=>{if(!h)return;const a=Z.trim();if(!a){g.error("Motivo é obrigatório");return}Te(!0);try{const{data:o}=await y.auth.getSession();if(!o.session)throw new Error("Sessão expirada");await _a({data:{token:o.session.access_token,requestId:h.id,motivo:a,observacoes:de.trim()||null}}),g.success("Solicitação rejeitada"),X(!1),Ie(""),Pe(""),await Promise.all([$e(h.id),Q(h.id),A()])}catch(o){const p=o instanceof Error?o.message:"Erro ao rejeitar";g.error(p)}finally{Te(!1)}},Is=(a,o)=>{a.stopPropagation(),he(o),ue(!0)},Ps=async()=>{if(Re){Me(!0);try{const{data:a}=await y.auth.getSession();if(!a.session)throw new Error("Sessão expirada");await ka({data:{token:a.session.access_token,requestId:Re.id}}),g.success("Solicitação excluída"),ue(!1),he(null),await A()}catch(a){const o=a instanceof Error?a.message:"Não foi possível excluir a solicitação";g.error(o)}finally{Me(!1)}}},I=a=>{N===a?_e(o=>o==="asc"?"desc":"asc"):(bs(a),_e("asc"))},Ts=()=>{v(""),ve("all"),Ne("all"),we("all"),ye("all"),Se("all"),Ce(""),ke("")},Be=t.useMemo(()=>!!(b||S!=="all"||$!=="all"||z!=="all"||B!=="all"||q!=="all"||D||L),[b,S,$,z,B,q,D,L]);if(!r)return e.jsx("div",{className:"min-h-screen flex items-center justify-center text-muted-foreground",children:"Carregando..."});if(!As)return e.jsx(Fe,{title:"Acesso restrito",skipAuthGuard:!0,children:e.jsx("div",{className:"p-12 text-center text-muted-foreground",children:"Esta área é exclusiva para administradores."})});const pe=m?.rows??[],V=m?.total??0,fe=Math.max(1,Math.ceil(V/ee));return e.jsxs(Fe,{title:"Solicitações de Licenciados",breadcrumb:e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"Confrapag"}),e.jsx("span",{className:"h-1 w-1 rounded-full bg-muted-foreground/40"}),e.jsx("span",{className:"text-brand-glow",children:"Onboarding LA"})]}),description:m?`${V} solicitação${V===1?"":"ões"} no total`:"Carregando...",search:e.jsx(Hs,{value:b,onChange:v,placeholder:"Buscar por nome, e-mail ou telefone..."}),skipAuthGuard:!0,children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[e.jsx(se,{label:"Pendentes",value:m?.stats.pendente??0,icon:e.jsx(Ve,{className:"h-5 w-5"}),tone:"pendente"}),e.jsx(se,{label:"Concluídos",value:m?.stats.concluido??0,icon:e.jsx(xs,{className:"h-5 w-5"}),tone:"aprovado"}),e.jsx(se,{label:"Rejeitadas",value:m?.stats.rejeitado??0,icon:e.jsx(hs,{className:"h-5 w-5"}),tone:"rejeitado"}),e.jsx(se,{label:"Total",value:m?.stats.total??0,icon:e.jsx(Rs,{className:"h-5 w-5"}),tone:"total"})]}),e.jsx("div",{className:"rounded-lg border bg-card p-4 shadow-sm",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("div",{className:"relative min-w-[220px] flex-1 md:hidden",children:[e.jsx(Bs,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(Y,{placeholder:"Buscar por nome, e-mail ou telefone...",value:b,onChange:a=>v(a.target.value),className:"h-10 rounded-md border-border bg-card pl-10"})]}),e.jsxs(U,{value:S,onValueChange:ve,children:[e.jsx(W,{className:"h-10 w-44 rounded-md bg-card",children:e.jsx(H,{placeholder:"Status"})}),e.jsxs(G,{children:[e.jsx(j,{value:"all",children:"Todos os status"}),e.jsx(j,{value:"pendente",children:"Pendente"}),e.jsx(j,{value:"aprovado",children:"Aprovado"}),e.jsx(j,{value:"rejeitado",children:"Rejeitado"}),e.jsx(j,{value:"erro",children:"Erro"})]})]}),e.jsxs(U,{value:$,onValueChange:Ne,children:[e.jsx(W,{className:"h-10 w-64 rounded-md bg-card",children:e.jsx(H,{placeholder:"White Label"})}),e.jsxs(G,{children:[e.jsx(j,{value:"all",children:"Todos os White Labels"}),(m?.whiteLabels??[]).map(a=>e.jsx(j,{value:a.id,children:a.email??a.id.slice(0,8)},a.id))]})]}),e.jsxs(U,{value:z,onValueChange:we,children:[e.jsx(W,{className:"h-10 w-52 rounded-md bg-card",children:e.jsx(H,{placeholder:"Origem"})}),e.jsxs(G,{children:[e.jsx(j,{value:"all",children:"Todas as origens"}),(m?.origens??[]).map(a=>e.jsx(j,{value:a,children:a},a))]})]}),e.jsxs(U,{value:B,onValueChange:ye,children:[e.jsx(W,{className:"h-10 w-52 rounded-md bg-card",children:e.jsx(H,{placeholder:"Cidade"})}),e.jsxs(G,{children:[e.jsx(j,{value:"all",children:"Todas as cidades"}),(m?.cidades??[]).map(a=>e.jsx(j,{value:a,children:a},a))]})]}),e.jsxs(U,{value:q,onValueChange:Se,children:[e.jsx(W,{className:"h-10 w-60 rounded-md bg-card",children:e.jsx(H,{placeholder:"Imagens do site"})}),e.jsxs(G,{children:[e.jsx(j,{value:"all",children:"Todas as imagens"}),e.jsx(j,{value:"any",children:"Com imagem"}),e.jsx(j,{value:"none",children:"Sem imagem"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Y,{type:"date",value:D,onChange:a=>Ce(a.target.value),className:"h-10 w-40 rounded-md bg-card",title:"Período — de"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"até"}),e.jsx(Y,{type:"date",value:L,onChange:a=>ke(a.target.value),className:"h-10 w-40 rounded-md bg-card",title:"Período — até"})]}),Be&&e.jsx(f,{variant:"ghost",onClick:Ts,className:"h-10",children:"Limpar filtros"})]})}),e.jsxs("div",{className:"overflow-hidden rounded-lg border bg-card shadow-sm",children:[l?e.jsxs("div",{className:"p-12 text-center text-muted-foreground",children:[e.jsx(F,{className:"mx-auto h-6 w-6 animate-spin"}),e.jsx("p",{className:"mt-3",children:"Carregando solicitações..."})]}):c?e.jsxs("div",{className:"p-12 text-center",children:[e.jsx(ps,{className:"mx-auto h-10 w-10 text-destructive"}),e.jsx("p",{className:"mt-3 text-destructive",children:c}),e.jsx(f,{onClick:A,className:"mt-4",children:"Tentar novamente"})]}):pe.length===0?e.jsxs("div",{className:"p-12 text-center",children:[e.jsx(Ve,{className:"mx-auto h-10 w-10 text-muted-foreground"}),e.jsx("p",{className:"mt-3 text-muted-foreground",children:Be?"Nenhuma solicitação encontrada para os filtros aplicad
1os.":"Nenhuma solicitação recebida ainda."})]}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b text-left text-xs uppercase tracking-wider text-muted-foreground",children:[e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Foto"}),e.jsx(P,{label:"Nome",field:"nome",current:N,dir:C,onClick:I}),e.jsx(P,{label:"Email",field:"email",current:N,dir:C,onClick:I}),e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Telefone"}),e.jsx("th",{className:"px-6 py-4 font-semibold",children:"White Label"}),e.jsx(P,{label:"Origem",field:"origem",current:N,dir:C,onClick:I}),e.jsx(P,{label:"Cidade",field:"cidade",current:N,dir:C,onClick:I}),e.jsx(P,{label:"Estado",field:"estado",current:N,dir:C,onClick:I}),e.jsx(P,{label:"Status",field:"status",current:N,dir:C,onClick:I}),e.jsx(P,{label:"Recebida em",field:"created_at",current:N,dir:C,onClick:I}),e.jsx("th",{className:"px-6 py-4 text-right font-semibold",children:"Ações"})]})}),e.jsx("tbody",{children:pe.map(a=>e.jsxs("tr",{className:"cursor-pointer border-b transition-colors last:border-0 hover:bg-muted/40",onClick:()=>ze(a),children:[e.jsx("td",{className:"px-6 py-4",children:a.foto_url?e.jsx("img",{src:a.foto_url,alt:a.nome,className:"h-10 w-10 rounded-full object-cover"}):e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-[image:var(--gradient-brand)] text-xs font-semibold text-brand-foreground",children:gs(a.nome)})}),e.jsx("td",{className:"px-6 py-4 font-medium text-foreground",children:a.nome}),e.jsx("td",{className:"px-6 py-4 text-muted-foreground",children:a.email}),e.jsx("td",{className:"px-6 py-4 text-muted-foreground",children:a.telefone??"—"}),e.jsx("td",{className:"px-6 py-4",children:a.wl_email?e.jsxs(K,{variant:"outline",className:"gap-1 border-brand-glow/40 text-brand",children:[e.jsx(ns,{className:"h-3 w-3"}),a.wl_email]}):e.jsx("span",{className:"text-xs text-muted-foreground",children:a.white_label_id.slice(0,8)})}),e.jsx("td",{className:"px-6 py-4 text-muted-foreground",children:a.origem}),e.jsx("td",{className:"px-6 py-4 text-muted-foreground",children:a.cidade??"—"}),e.jsx("td",{className:"px-6 py-4 text-muted-foreground",children:a.estado??"—"}),e.jsx("td",{className:"px-6 py-4",children:e.jsx(K,{className:fs(a.status),children:be[a.status]??a.status})}),e.jsx("td",{className:"px-6 py-4 text-muted-foreground",children:J(a.created_at)}),e.jsx("td",{className:"px-6 py-4 text-right",children:e.jsxs("div",{className:"flex items-center justify-end gap-1",children:[e.jsx(f,{size:"sm",variant:"ghost",onClick:o=>{o.stopPropagation(),ze(a)},children:"Ver detalhes"}),Ds&&e.jsx(f,{size:"icon",variant:"ghost",className:"h-8 w-8 text-destructive hover:bg-destructive/10 hover:text-destructive",onClick:o=>Is(o,a),"aria-label":"Excluir solicitação",children:e.jsx(Zs,{className:"h-4 w-4"})})]})})]},a.id))})]})}),!l&&!c&&pe.length>0&&e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-t bg-muted/20 px-6 py-4 text-sm",children:[e.jsxs("p",{className:"text-muted-foreground",children:["Mostrando ",e.jsx("span",{className:"font-medium text-foreground",children:(O-1)*ee+1}),"–",e.jsx("span",{className:"font-medium text-foreground",children:Math.min(O*ee,V)})," ","de ",e.jsx("span",{className:"font-medium text-foreground",children:V})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(f,{variant:"outline",size:"sm",disabled:O<=1,onClick:()=>ae(a=>Math.max(1,a-1)),children:[e.jsx(ua,{className:"h-4 w-4"})," Anterior"]}),e.jsxs("span",{className:"text-muted-foreground",children:["Página ",e.jsx("span",{className:"font-medium text-foreground",children:O})," de"," ",e.jsx("span",{className:"font-medium text-foreground",children:fe})]}),e.jsxs(f,{variant:"outline",size:"sm",disabled:O>=fe,onClick:()=>ae(a=>Math.min(fe,a+1)),children:["Próxima ",e.jsx(ha,{className:"h-4 w-4"})]})]})]})]})]}),e.jsx(qs,{open:vs,onOpenChange:te,children:e.jsxs(Fs,{className:"w-full overflow-y-auto sm:max-w-xl",children:[e.jsxs(Vs,{children:[e.jsx(Us,{children:"Detalhes da s
1olicitação"}),e.jsx(Ws,{children:"Revise a solicitação, valide o provisionamento e execute a ação administrativa."})]}),Ns||!h?e.jsx("div",{className:"flex items-center justify-center py-16 text-muted-foreground",children:e.jsx(F,{className:"h-6 w-6 animate-spin"})}):e.jsx(Aa,{detail:h,inspection:Ae,inspectionLoading:ws,inspectionError:ys,onReinspect:()=>Q(h.id),onApprove:()=>ie(!0),onReject:()=>X(!0),provisioning:le,provisioningPhase:Cs,provisioningResult:ks})]})}),e.jsx(Ue,{open:Ss,onOpenChange:ie,children:e.jsxs(We,{children:[e.jsxs(He,{children:[e.jsx(Ge,{children:"Confirmar aprovação e provisionamento"}),e.jsx(Je,{asChild:!0,children:e.jsxs("div",{className:"space-y-3 text-sm",children:[e.jsx("p",{children:"Ao confirmar, o sistema irá aprovar a solicitação e criar automaticamente:"}),e.jsxs("ul",{className:"ml-5 list-disc space-y-1 text-foreground",children:[e.jsx("li",{children:"Usuário de autenticação"}),e.jsx("li",{children:"Papel LA"}),e.jsx("li",{children:"Vínculo com o White Label"}),e.jsx("li",{children:"Site inicial do Licenciado"}),e.jsx("li",{children:"Configuração inicial (blocos padrão)"})]}),Ae&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"Itens já existentes (usuário, papel, vínculo ou site) serão reutilizados — nada é duplicado."}),h&&e.jsxs("div",{className:"rounded-lg border bg-muted/30 p-3 text-xs",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-semibold",children:"LA:"})," ",h.nome," —"," ",h.email]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-semibold",children:"WL:"})," ",h.wl_email??h.white_label_id]})]})]})})]}),e.jsxs(Ke,{children:[e.jsx(Xe,{children:"Cancelar"}),e.jsx(Ze,{onClick:Ls,children:"Confirmar e provisionar"})]})]})}),e.jsx(os,{open:_s,onOpenChange:X,children:e.jsxs(is,{children:[e.jsxs(ls,{children:[e.jsx(cs,{children:"Rejeitar solicitação"}),e.jsx(ds,{children:"Informe o motivo da rejeição. Esta ação não pode ser desfeita."})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:["Motivo ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(Y,{value:Z,onChange:a=>Ie(a.target.value),maxLength:500,placeholder:"Ex.: Dados incompletos, WL não autorizou...",className:"mt-1"}),e.jsxs("p",{className:"mt-1 text-[11px] text-muted-foreground",children:[Z.length,"/500"]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Observações adicionais"}),e.jsx(Js,{value:de,onChange:a=>Pe(a.target.value),maxLength:2e3,rows:4,placeholder:"Detalhes internos, contexto, próximos passos...",className:"mt-1"}),e.jsxs("p",{className:"mt-1 text-[11px] text-muted-foreground",children:[de.length,"/2000"]})]})]}),e.jsxs(ms,{children:[e.jsx(f,{variant:"outline",onClick:()=>X(!1),disabled:me,children:"Cancelar"}),e.jsx(f,{variant:"destructive",onClick:Os,disabled:me||!Z.trim(),children:me?e.jsxs(e.Fragment,{children:[e.jsx(F,{className:"mr-2 h-4 w-4 animate-spin"})," Rejeitando..."]}):"Confirmar rejeição"})]})]})}),e.jsx(Ue,{open:Es,onOpenChange:ue,children:e.jsxs(We,{children:[e.jsxs(He,{children:[e.jsx(Ge,{children:"Excluir esta solicitação?"}),e.jsx(Je,{children:"Esta ação não poderá ser desfeita."})]}),e.jsxs(Ke,{children:[e.jsx(Xe,{onClick:()=>he(null),disabled:xe,children:"Cancelar"}),e.jsx(Ze,{onClick:Ps,disabled:xe,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:xe?e.jsxs(e.Fragment,{children:[e.jsx(F,{className:"mr-2 h-4 w-4 animate-spin"})," Excluindo..."]}):"Confirmar exclusão"})]})]})})]})}function se({label:s,value:n,icon:r,tone:i}){const l={pendente:"from-brand-glow/25 to-transparent text-brand",aprovado:"from-brand-lime/30 to-transparent text-brand",rejeitado:"from-destructive/15 to-transparent text-destructive",total:"from-brand-mint/30 to-transparent text-brand"};return e.jsxs("div",{className:`relative overflow-hidden rounded-lg border bg-gradient-to-br ${l[i]} bg-card p-5 shadow-sm`,children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.18em] text-muted-foreground",children:s}),e.jsx("div",{className:"rounded-xl bg-background/60 p-2",children:r})]}),e.jsx("p",{className:"mt-4 text-3xl font-extrabold tracking-tight text-foreground",children:n})]})}function P({label:s,field:n,current:r,dir:i,onClick:l}){const x=r===n,c=x?i==="asc"?oa:aa:ra;return e.jsx("th",{className:"px-6 py-4 font-semibold",children:e.jsxs("button",{type:"button",onClick:()=>l(n),className:`inline-flex items-center gap-1.5 hover:text-foreground ${x?"text-foreground":""}`,children:[s,e.jsx(c,{className:"h-3 w-3"})]})})}const rs=["Preparando...","Criando usuário...","Criando permissões...","Criando vínculo...","Criando site...","Finalizando..."];function Aa({detail:s,inspection:n,inspectionLoading:r,inspectionError:i,onReinspect:l,onApprove:x,onReject:c,provisioning:d,provisioningPhase:m,provisioningResult:u}){const b=s.metadata?._raw??{},v=new Set(["whiteLabelId","documento","nome","email","telefone","foto","instagram","cidade","estado","origem","metadata"]),_=Object.entries(b).filter(([R]
1)=>!v.has(R));return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsxs("div",{className:"flex items-start gap-4",children:[s.foto_url?e.jsx("img",{src:s.foto_url,alt:s.nome,className:"h-20 w-20 rounded-2xl object-cover"}):e.jsx("div",{className:"flex h-20 w-20 items-center justify-center rounded-2xl bg-[image:var(--gradient-brand)] text-xl font-bold text-brand-foreground",children:gs(s.nome)}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h3",{className:"text-lg font-bold text-foreground",children:s.nome}),e.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[e.jsx(K,{className:fs(s.status),children:be[s.status]??s.status}),e.jsxs(K,{variant:"outline",className:"text-muted-foreground",children:["Origem: ",s.origem]})]})]})]}),e.jsxs(E,{title:"Contato",children:[e.jsx(w,{icon:e.jsx(Qs,{className:"h-4 w-4"}),label:"E-mail",value:s.email}),e.jsx(w,{icon:e.jsx(Ys,{className:"h-4 w-4"}),label:"Telefone",value:s.telefone??"—"}),e.jsx(w,{label:"Instagram",value:s.instagram??"—"}),e.jsx(w,{icon:e.jsx(ea,{className:"h-4 w-4"}),label:"Localização",value:[s.cidade,s.estado].filter(Boolean).join(" — ")||"—"})]}),e.jsxs(E,{title:"White Label",children:[e.jsx(w,{icon:e.jsx(ns,{className:"h-4 w-4"}),label:"WL",value:s.wl_email??s.white_label_id}),e.jsx(w,{label:"ID",value:s.white_label_id,mono:!0})]}),e.jsxs(E,{title:"Datas",children:[e.jsx(w,{icon:e.jsx(da,{className:"h-4 w-4"}),label:"Recebida em",value:J(s.created_at)}),e.jsx(w,{label:"Última atualização",value:J(s.updated_at)}),s.aprovado_em&&e.jsx(w,{label:"Aprovada em",value:`${J(s.aprovado_em)}${s.aprovado_por_email?` por ${s.aprovado_por_email}`:""}`}),s.rejeitado_em&&e.jsx(w,{label:"Rejeitada em",value:J(s.rejeitado_em)})]}),s.observacoes_admin&&e.jsx(E,{title:"Observações administrativas",children:e.jsx("p",{className:"whitespace-pre-wrap text-sm text-muted-foreground",children:s.observacoes_admin})}),_.length>0&&e.jsx(ge,{title:"Campos adicionais",children:e.jsx("div",{className:"space-y-1",children:_.map(([R,S])=>e.jsx(w,{label:R,value:typeof S=="string"?S:JSON.stringify(S)},R))})}),s.status==="concluido"&&e.jsx(E,{title:"E-mail de boas-vindas",children:e.jsx(wa,{requestId:s.id})}),e.jsx(E,{title:"Imagens do site",children:e.jsx(Ta,{detail:s})}),e.jsx(E,{title:"Imagens recebidas",children:e.jsx(La,{detail:s})}),e.jsx(ge,{title:"Metadata",children:e.jsx("pre",{className:"max-h-64 overflow-auto rounded-xl bg-muted/40 p-3 text-xs text-foreground",children:JSON.stringify(s.metadata,null,2)})}),e.jsx(ge,{title:"Payload recebido",children:e.jsx("pre",{className:"max-h-64 overflow-auto rounded-xl bg-muted/40 p-3 text-xs text-foreground",children:JSON.stringify(s.metadata?._raw??{},null,2)})}),s.status!=="concluido"&&s.status!=="rejeitado"&&e.jsx(Oa,{inspection:n,loading:r,error:i,onReinspect:l}),e.jsx(Pa,{detail:s,inspection:n,provisioning:d,provisioningPhase:m,provisioningResult:u,onApprove:x,onReject:c})]})}const Da=/\.(png|jpe?g|webp|gif|avif|bmp|svg|heic|heif)(\?|#|$)/i;function js(s){if(typeof s!="string")return!1;const n=s.trim();if(!n)return!1;try{const r=new URL(n);return r.protocol!=="http:"&&r.protocol!=="https:"?!1:Da.test(r.pathname)||/image|foto|photo|picture|imagem|avatar|storage\/v1\/object/i.test(r.pathname+r.search)}catch{return!1}}function je(s,n=[],r=0){if(r>6||n.length>60)return n;if(js(s))return n.includes(s.trim())||n.push(s.trim()),n;if(Array.isArray(s)){for(const i of s)je(i,n,r+1);return n}if(s&&typeof s=="object")for(const i of Object.values(s))je(i,n,r+1);return n}function La({detail:s}){const n=t.useMemo(()=>{const c=[];return js(s.foto_url)&&c.push(String(s.foto_url).trim()),je(s.metadata,c)},[s]),[r,i]=t.useState(null),[l,x]=t.useState({});return n.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"Nenhuma imagem recebida"}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4",children:n.map((c,d)=>e.jsxs("div",{className:"overflow-hidden rounded-lg border bg-card shadow-sm",children:[e.jsx("button",{type:"button",onClick:()=>!l[c]&&i(c),className:"block w-full","aria-label":`Ampliar imagem ${d+1}`,children:l[c]?e.jsxs("div",{className:"flex h-28 w-full flex-col items-center justify-center gap-1 bg-muted/40 text-muted-foreground",children:[e.jsx(ja,{className:"h-5 w-5"}),e.jsx("span",{className:"text-[11px]",children:"Não foi possível carregar"})]}):e.jsx("img",{src:c,alt:`Imagem recebida ${d+1}`,loading:"lazy",onError:()=>x(m=>({...m,[c]:!0})),className:"h-28 w-full bg-muted/30 object-cover transition-transform duration-200 hover:scale-[1.03]"})}),e.jsxs("div",{className:"flex items-center justify-between gap-2 border-t px-2 py-1.5",children:[e.jsxs("span",{className:"truncate text-[11px] text-muted-foreground",children:["Imagem ",d+1]}),e.jsx(f,{asChild:!0,variant:"ghost",size:"sm",className:"h-7 px-2 text-xs",children:e.jsxs("a",{href:c,download:!0,target:"_blank",rel:"noreferrer",children:[e.jsx(Ye,{className:"mr-1 h-3.5 w-3.5"}),"Baixar"]})})]})]},c))}),e.jsx(os,{open:!!r,onOpenChange:c=>!c&&i(null),children:e.jsxs(is,{className:"max-w-3xl",children:[e.jsxs(ls,{children:[e.jsx(cs,{children:"Imagem recebida"}),e.jsx(ds,{className:"truncate",children:r})]}),r&&e.jsx("img",{src:r,alt:"Imagem recebida ampliada",className:"max-h-[70vh] w-full rounded-lg object-contain"}),e.jsx(ms,{children:e.jsx(f,{asChild:!0,variant:"outline",children:e.jsxs("a",{href:r??"#",download:!0,target:"_blank",rel:"noreferrer",children:[e.jsx(Ye,{className:"mr-2 h-4 w-4"}),"Baixar imagem"]})})})]})})]})}function Oa({inspection:s,loading:n,error:r,onReinspect:i}){return e.jsxs(E,{title:"Validação do Provisionamento",children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(zs,{className:"h-4 w-4"}),e.jsx("span",{children:"Verificações executadas em tempo real (somente leitura)"})]}),e.jsxs(f,{variant:"ghost",size:"sm",onClick:i,disabled:n,className:"h-7 gap-1 text-xs",children:[e.jsx(va,{className:`h-3 w-3 ${n?"animate-spin":""}`}),"Revalidar"]})]}),n&&!s&&e.jsxs("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:[e.jsx(F,{className:"mr-2 h-4 w-4 animate-spin"})," Validando..."]}),r&&e.jsx("div",{className:"rounded-lg border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:r}),s&&e.jsxs("div",{className:"space-y-1.5",children:[s.checks.map(l=>e.jsx(Ia,{check:l},l.key)),s.hasBlockingConflict&&e.jsxs("div",{className:"mt-3 rounded-lg border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:[e.jsx("p",{className:"font-semibold",children:"Provisionamento bloqueado"}),e.jsx("p",{className:"mt-1 text-xs",children:"Resolva os itens marcados com ✖ antes de aprovar. A confirmação está desabilitada."})]})]})]})}function Ia({check:s}){const n={ok:e.jsx(xs,{className:"h-4 w-4 text-brand-lime"}),warn:e.jsx(ps,{className:"h-4 w-4 text-orange-500"}),error:e.jsx(hs,{className:"h-4 w-4 text-destructive"})}
1,r={ok:"✓",warn:"⚠",error:"✖"};return e.jsxs("div",{className:"flex items-start gap-2 rounded-lg px-2 py-1.5 text-sm hover:bg-muted/40",children:[e.jsx("span",{"aria-hidden":!0,className:"mt-0.5",children:n[s.severity]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{"aria-hidden":!0,className:"text-xs opacity-70",children:r[s.severity]}),e.jsx("span",{className:"font-medium text-foreground",children:s.label})]}),e.jsx("p",{className:"mt-0.5 break-words text-xs text-muted-foreground",children:s.detail})]})]})}function Pa({detail:s,inspection:n,provisioning:r,provisioningPhase:i,provisioningResult:l,onApprove:x,onReject:c}){const d=s.status,m=d==="concluido"||d==="rejeitado",u=!!n?.canApprove&&!r&&!m,b=!r&&d!=="concluido"&&d!=="rejeitado"&&d!=="em_provisionamento";return e.jsxs(E,{title:"Ações administrativas",children:[r&&e.jsxs("div",{className:"mb-4 rounded-xl border bg-muted/30 p-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(F,{className:"h-5 w-5 animate-spin text-brand"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Provisionando Licenciado..."}),e.jsx("p",{className:"text-xs text-muted-foreground",children:rs[i]})]})]}),e.jsx("div",{className:"mt-3 grid grid-cols-6 gap-1",children:rs.map((v,_)=>e.jsx("div",{className:`h-1 rounded-full transition-colors ${_<=i?"bg-brand":"bg-muted"}`},_))})]}),l&&!r&&e.jsx("div",{className:`mb-4 rounded-xl border p-4 text-sm ${l.error?"border-destructive/40 bg-destructive/10 text-destructive":"border-brand-lime/50 bg-brand-lime/15 text-foreground"}`,children:l.error?e.jsxs("div",{children:[e.jsxs("p",{className:"font-semibold",children:["Falha no provisionamento (etapa: ",l.error.step,")"]}),e.jsx("p",{className:"mt-1 text-xs",children:l.error.message}),e.jsxs("p",{className:"mt-2 text-xs opacity-80",children:["A solicitação foi marcada como ",e.jsx("b",{children:"Erro (provisionamento)"})," e pode ser reprocessada."]})]}):e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold text-brand",children:"✓ Licenciado provisionado com sucesso"}),l.provisioning&&e.jsxs("ul",{className:"mt-2 space-y-0.5 text-xs",children:[e.jsxs("li",{children:["Usuário:"," ",e.jsx("b",{children:l.provisioning.reused.user?"reutilizado":"criado"})]}),e.jsxs("li",{children:["Papel LA:"," ",e.jsx("b",{children:l.provisioning.reused.role?"reutilizado":"criado"})]}),e.jsxs("li",{children:["Vínculo com WL:"," ",e.jsx("b",{children:l.provisioning.reused.link?"reutilizado":"criado"})]}),e.jsxs("li",{children:["Site LA:"," ",e.jsx("b",{children:l.provisioning.reused.site?"reutilizado":`criado (slug "${l.provisioning.laSiteSlug}")`})]}),e.jsxs("li",{className:"pt-1 text-muted-foreground",children:["Tentativas: ",l.provisioning.attempts," —"," ","Duração:"," ",l.provisioning.durationMs!=null?`${l.provisioning.durationMs}ms`:"—"]})]})]})}),m?e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Esta solicitação está em estado terminal (",e.jsx("b",{children:be[d]??d}),"). Nenhuma ação disponível."]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[e.jsxs(f,{variant:"destructive",onClick:c,disabled:!b,className:"flex-1",children:[e.jsx(la,{className:"mr-2 h-4 w-4"}),"Rejeitar"]}),e.jsxs(f,{onClick:x,disabled:!u,className:"flex-1 bg-brand text-brand-foreground hover:bg-brand/90",children:[e.jsx(fa,{className:"mr-2 h-4 w-4"}),d==="erro_provisionamento"||d==="erro"?"Reprocessar":d==="aprovado"?"Provisionar":"Aprovar & provisionar"]})]}),n&&!u&&!r&&e.jsxs("p",{className:"mt-2 text-[11px] text-muted-foreground",children:["Aprovação desabilitada:"," ",n.hasBlockingConflict?"existem conflitos bloqueantes.":"estado atual não permite provisionamento."]})]}),e.jsx(Gs,{className:"my-4"}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Toda a criação de usuário, papel, vínculo e site é executada exclusivamente pelo motor de provisionamento no servidor. A interface apenas controla o workflow."})]})}function Ta({detail:s}){const n=ts(s.metadata),[r,i]=t.useState(n.hero_image_url??""),[l,x]=t.useState(n.ceo_image_url??""),[c,d]=t.useState(!1);t.useEffect(()=>{const u=ts(s.metadata);i(u.hero_image_url??""),x(u.ceo_image_url??"")},[s.id]);const m=async()=>{d(!0);try{const{data:u}=await y.auth.getSession();if(!u.session)throw new Error("Sessão expirada");await Ea({data:{token:u.session.access_token,requestId:s.id,hero_image_url:r||null,ceo_image_url:l||null}}),g.success("Imagens salvas com sucesso.")}catch(u){g.error(u instanceof Error?u.message:"Erro ao salvar as imagens.")}finally{d(!1)}};return e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Estas imagens serão aplicadas automaticamente ao site do licenciado quando a solicitação for criada. Deixe em branco para manter o padrão."}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"Imagem do topo do site"}),e.jsx(Qe,{value:r,onChange:i,prefix:"onboarding-hero",previewClassName:"h-24 w-24 object-contain"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"Imagem do CEO"}
1),e.jsx(Qe,{value:l,onChange:x,prefix:"onboarding-ceo",previewClassName:"h-24 w-24 object-cover rounded"})]})]}),e.jsx(f,{size:"sm",onClick:m,disabled:c,children:c?"Salvando...":"Salvar imagens"})]})}function E({title:s,children:n}){return e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"text-xs font-bold uppercase tracking-[0.18em] text-muted-foreground",children:s}),e.jsx("div",{className:"rounded-2xl border bg-muted/20 p-4",children:n})]})}function ge({title:s,children:n,defaultOpen:r=!1}){const[i,l]=t.useState(r);return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("button",{type:"button",onClick:()=>l(x=>!x),"aria-expanded":i,className:"flex w-full items-center justify-between rounded-2xl border bg-muted/20 px-4 py-3 text-left transition-colors hover:bg-muted/40",children:[e.jsx("span",{className:"text-xs font-bold uppercase tracking-[0.18em] text-muted-foreground",children:s}),e.jsx($s,{className:`h-4 w-4 shrink-0 text-muted-foreground transition-transform ${i?"rotate-180":""}`})]}),i&&e.jsx("div",{className:"rounded-2xl border bg-muted/20 p-4",children:n})]})}function w({icon:s,label:n,value:r,mono:i}){return e.jsxs("div",{className:"flex items-start gap-2 py-1 text-sm",children:[s&&e.jsx("span",{className:"mt-0.5 text-muted-foreground",children:s}),e.jsx("span",{className:"min-w-[120px] text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:n}),e.jsx("span",{className:`flex-1 break-all text-foreground ${i?"font-mono text-xs":""}`,children:r})]})}export{et as component};

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.