1import{r,j as e}from"./react-vendor-pafHdoJx.js";import{d as j}from"./index-Db0fDLGN.js";import{ad as M,c8 as J,b5 as ee,L as m,an as w,aE as q,ae as k,U as se,as as X,aY as te,l as I,o as ae,aq as re,B as le}from"./ui-vendor-DLXJn6s3.js";import"./map-vendor-Dr8zbd0c.js";import"./firebase-vendor-D3UzkAhn.js";const O={approved:"bg-emerald-500/15 text-emerald-300 border-emerald-500/30",pending_org_approval:"bg-amber-500/15 text-amber-300 border-amber-500/30",rejected:"bg-red-500/15 text-red-300 border-red-500/30",revoked_by_driver:"bg-slate-500/15 text-slate-300 border-slate-500/30",removed_by_org:"bg-slate-500/15 text-slate-300 border-slate-500/30"},K={approved:"Aprovado",pending_org_approval:"Aguardando aprovação",rejected:"Rejeitado",revoked_by_driver:"Revogado pelo motorista",removed_by_org:"Removido pela frota"};function H(t){if(!t)return"â";try{return new Date(t).toLocaleString("pt-BR",{dateStyle:"short",timeStyle:"short"})}catch{return t}}function xe(){const[t,g]=r.useState(""),[l,i]=r.useState(""),[o,d]=r.useState(!1),[N,U]=r.useState(!1),[C,x]=r.useState(null),[_,c]=r.useState(null),[S,v]=r.useState(null),[D,Q]=r.useState([]),[L,R]=r.useState(!1),[p,G]=r.useState(""),[h,E]=r.useState(""),[u,f]=r.useState(!1),[A,$]=r.useState([]),[T,P]=r.useState("recent"),[n,B]=r.useState(null),b=r.useCallback(async()=>{f(!0);try{const s=await j.adminListAuthUsers(50);$(s.users||[]),B({totalInAuth:s.totalInAuth,duplicateCount:s.duplicateCount,hasDuplicates:s.hasDuplicates}),P("recent")}catch{}finally{f(!1)}},[]);async function V(){const s=h.trim();if(!s){b();return}f(!0);try{const a=await j.adminSearchAuthUsers(s);$(a.users||[]),B({hasDuplicates:a.hasDuplicates}),P("search")}catch{}finally{f(!1)}}function Y(s){s.email&&i(s.email),typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"})}const y=r.useCallback(async()=>{R(!0);try{const s=await j.adminRecentDriverLinks({limit:50,...p?{status:p}:{}});Q(s.links||[])}catch{}finally{R(!1)}},[p]);r.useEffect(()=>{y()},[y]),r.useEffect(()=>{b()},[b]);async function z(){if(!t.trim()||!l.trim()){c("Preencha código + e-mail antes de diagnosticar.");return}c(null),v(null),x(null),d(!0);try{const s=await j.adminDriverLink({inviteCode:t.trim().toUpperCase(),driverEmail:l.trim().toLowerCase(),mode:"diagnose"});x(s.diagnostic)}catch(s){const a=s==null?void 0:s.body;a!=null&&a.diagnostic&&x(a.diagnostic),c((a==null?void 0:a.error)||(s==null?void 0:s.message)||"Falha no diagnóstico")}finally{d(!1)}}async function W(){if(!t.trim()||!l.trim()){c("Preencha código + e-mail antes de vincular.");return}c(null),v(null),U(!0);try{const s=await j.adminDriverLink({inviteCode:t.trim().toUpperCase(),driverEmail:l.trim().toLowerCase(),mode:"link"});x(s.diagnostic),s.success&&s.linkId&&(v({linkId:s.linkId,orgName:s.orgName||null}),await y())}catch(s){const a=s==null?void 0:s.body;a!=null&&a.diagnostic&&x(a.diagnostic),c((a==null?void 0:a.message)||(a==null?void 0:a.error)||(s==null?void 0:s.message)||"Falha no vÃnculo")}finally{U(!1)}}function Z(){g(""),i(""),x(null),c(null),v(null)}return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("header",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center",style:{background:"rgba(99,102,241,0.12)"},children:e.jsx(M,{className:"w-5 h-5",style:{color:"#6366F1"}})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-bold",style:{color:"var(--page-text)"},children:"VÃnculo manual de motorista"}),e.jsxs("p",{className:"text-xs",style:{color:"var(--page-text-muted)"},children:["Use quando o app dá ",e.jsx("code",{className:"text-amber-300",children:"permission-denied"})," ou cliente está sem acesso ao Stripe/GitHub. Bypassa firestore.rules via Admin SDK."]})]})]}),e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 mb-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-slate-700 mb-1",children:"Código de convite"}),e.jsxs("div",{className:"flex items-center rounded-lg bg-slate-900 border border-slate-700 focus-within:border-indigo-500",children:[e.jsx(J,{className:"w-4 h-4 text-slate-400 ml-3"}),e.jsx("input",{type:"text",value:t,onChange:s=>g(s.target.value.toUpperCase()),placeholder:"S365-XXXXXX",className:"flex-1 bg-transparent px-3 py-2.5 text-sm text-white placeholder:text-slate-500 outline-none font-mono",autoComplete:"off",spellCheck:!1})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-slate-700 mb-1",children:"E-mail do motorista (Firebase Auth)"}),e.jsxs("div",{className:"flex items-center rounded-lg bg-slate-900 border border-slate-700 focus-within:border-indigo-500",children:[e.jsx(ee,{className:"w-4 h-4 text-slate-400 ml-3"}
1),e.jsx("input",{type:"email",value:l,onChange:s=>i(s.target.value.toLowerCase()),placeholder:"[email protected]",className:"flex-1 bg-transparent px-3 py-2.5 text-sm text-white placeholder:text-slate-500 outline-none",autoComplete:"off"})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs("button",{type:"button",onClick:z,disabled:o||N||!t||!l,className:"inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-semibold bg-slate-700 hover:bg-slate-600 text-white disabled:opacity-50 disabled:cursor-not-allowed",children:[o?e.jsx(m,{className:"w-4 h-4 animate-spin"}):e.jsx(w,{className:"w-4 h-4"}),"Diagnosticar"]}),e.jsxs("button",{type:"button",onClick:W,disabled:o||N||!t||!l,className:"inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-semibold bg-emerald-600 hover:bg-emerald-500 text-white disabled:opacity-50 disabled:cursor-not-allowed",children:[N?e.jsx(m,{className:"w-4 h-4 animate-spin"}):e.jsx(M,{className:"w-4 h-4"}),"Vincular (efetiva)"]}),e.jsx("button",{type:"button",onClick:Z,disabled:o||N,className:"ml-auto inline-flex items-center gap-1 px-3 py-2 rounded-lg text-xs font-medium text-slate-400 hover:text-slate-200 disabled:opacity-50",children:"Limpar"})]}),_&&e.jsxs("div",{className:"mt-4 flex items-start gap-2 p-3 rounded-lg bg-red-500/10 border border-red-500/30",children:[e.jsx(q,{className:"w-4 h-4 text-red-400 shrink-0 mt-0.5"}),e.jsx("p",{className:"text-xs text-red-300",children:_})]}),S&&e.jsxs("div",{className:"mt-4 flex items-start gap-2 p-3 rounded-lg bg-emerald-500/10 border border-emerald-500/30",children:[e.jsx(k,{className:"w-4 h-4 text-emerald-400 shrink-0 mt-0.5"}),e.jsxs("div",{className:"text-xs text-emerald-200",children:[e.jsx("p",{className:"font-semibold",children:"VÃnculo criado com sucesso"}),e.jsxs("p",{className:"text-emerald-300/80 mt-0.5",children:[l," â ",e.jsx("strong",{children:S.orgName||"(sem nome)"})," · linkId ",e.jsx("code",{className:"font-mono",children:S.linkId})]}),e.jsx("p",{className:"mt-1 text-[11px] text-emerald-300/60",children:"Motorista precisa reabrir o app pra ver o vÃnculo aprovado."})]})]})]}),C&&e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(w,{className:"w-4 h-4 text-indigo-400"}),e.jsxs("h3",{className:"text-sm font-semibold text-white",children:["Diagnóstico (",C.mode,")"]})]}),e.jsx("div",{className:"space-y-2",children:C.steps.map((s,a)=>e.jsx(ie,{step:s},a))})]}),e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3 flex-wrap gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(se,{className:"w-4 h-4 text-slate-400"}),e.jsxs("h3",{className:"text-sm font-semibold text-white",children:["Motoristas cadastrados ",T==="search"?`(busca: "${h}")`:"(50 mais recentes)"]}),(n==null?void 0:n.hasDuplicates)&&e.jsxs("span",{className:"text-[10px] font-bold uppercase tracking-wide px-2 py-0.5 rounded-full bg-red-500/15 text-red-300 border border-red-500/30",children:["â ",n.duplicateCount||""," duplicado",(n.duplicateCount||0)>1?"s":""]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex items-center rounded-lg bg-slate-900 border border-slate-700 focus-within:border-indigo-500",children:[e.jsx(w,{className:"w-4 h-4 text-slate-400 ml-2"}),e.jsx("input",{type:"text",value:h,onChange:s=>E(s.target.value),onKeyDown:s=>{s.key==="Enter"&&V()},placeholder:"email, nome ou telefoneâ¦",className:"w-56 bg-transparent px-2 py-1.5 text-xs text-white placeholder:text-slate-500 outline-none"}),h&&e.jsx("button",{type:"button",onClick:()=>{E(""),b()},className:"px-2 text-slate-500 hover:text-slate-300",children:e.jsx(q,{className:"w-3.5 h-3.5"})})]}),e.jsxs("button",{type:"button",onClick:V,disabled:u,className:"inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-xs font-semibold bg-indigo-600 hover:bg-indigo-500 text-white disabled:opacity-50",children:[u?e.jsx(m,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(w,{className:"w-3.5 h-3.5"}),"Buscar"]}),e.jsx("button",{type:"button",onClick:b,disabled:u,className:"p-1.5 rounded-md text-slate-400 hover:text-white hover:bg-slate-800 disabled:opacity-50",title:"Recarregar lista de recentes",children:u?e.jsx(m,{className:"w-4 h-4 animate-spin"}):e.jsx(X,{className:"w-4 h-4"})})]})]}),u&&A.length===0?e.jsxs("div",{className:"text-center py-8 text-sm text-slate-500",children:[e.jsx(m,{className:"w-5 h-5 animate-spin mx-auto mb-2"}),"Carregandoâ¦"]}):A.length===0?e.jsx("div",{className:"text-center py-8 text-sm text-slate-500",children:T==="search"?`Nenhum usuário encontrado pra "${h}".`:"Nenhum usuário no Firebase Auth."}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-left text-slate-500 border-b border-slate-700/50",children:[e.jsx("th",{className:"font-medium pb-2 pr-3",children:"Email / Nome"}),e.jsx("th",{className:"font-medium pb-2 pr-3",children:"UID"}),e.jsx("th",{className:"font-medium pb-2 pr-3",children:"Provider"}),e.jsx("th",{className:"font-medium pb-2 pr-3",children:"VÃnculos"}),e.jsx("th",{className:"font-medium pb-2 pr-3",children:"Cadastro"}),e.jsx("th",{className:"font-medium pb-2"})]})}),e.jsx("tbody",{children:A.map(s=>e.jsxs("tr",{className:`border-b border-slate-800/50 hover:bg-slate-800/30 ${s.isDuplicate?"bg-red-500/5":""}`,children:[e.jsxs("td",{className:"py-2 pr-3",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("p",{className:"text-slate-200 font-medium",children:s.email||"â"}),s.isDuplicate&&e.jsx("span",{title:"Múltiplos UIDs com este email â bug do dual-SDK do driver-app antigo. Considere arquivar o duplicado.",className:"text-[9px] font-bold uppercase px-1.5 py-0.5 rounded bg-red-500/20 text-red-300",children:"DUP"}),s.disabled&&e.jsx("span",{className:"text-[9px] font-bold uppercase px-1.5 py-0.5 rounded bg-slate-700 text-slate-400",children:"DISABLED"})]}),e.jsx("p",{className:"text-slate-500 text-[10px]",children:s.displayName||s.phoneNumber||"(sem nome)"})]}),e.jsx("td",{className:"py-2 pr-3",children:e.jsxs("button",{type:"button",onClick:()=>{var a;(a=navigator.clipboard)==null||a.writeText(s.uid).catch(()=>{})},className:"font-mono text-[10px] text-slate-400 hover:text-slate-200 inline-flex items-center gap-1",title:"Clicar pra copiar UID",children:[s.uid.slice(0,16),"â¦",e.jsx(te,{className:"w-3 h-3 opacity-50"})]})}),e.jsx("td",{className:"py-2 pr-3 text-slate-500 text-[10px]",children:s.providers.join(", ")||"â"}),e.jsx("td",{className:"py-2 pr-3",children:s.links.length===0?e.jsx("span",{className:"text-amber-400 text-[10px]",children:"â Sem vÃnculo"}):e.jsx("div",{className:"space-y-0.5",children:s.links.map(a=>{var F;return e.jsxs("p",{className:"text-[10px]",children:[e.jsx("span",{className:"text-slate-400",children:a.orgName||a.orgId})," · ",e.jsx("span",{className:((F=O[a.status])==null?void 0:F.split(" ")[1])||"text-slate-500",children:K[a.status]||a.status})]},a.linkId)})})}),e.jsx("td",{className:"py-2 pr-3 text-slate-500 text-[10px]",children:H(s.createdAt)}),e.jsx("td",{className:"py-2 text-right",children:e.jsx("button",{type:"button",onClick:()=>Y(s),disabled:!s.email,className:"px-2.5 py-1 rounded-md text-[10px] font-semibold bg-indigo-600/80 hover:bg-indigo-500 text-white disabled:opacity-30 disabled:cursor-not-allowed",title:"Preencher email no formulário acima",children:"Usar"})})]},s.uid))})]})}),(n==null?void 0:n.hasDuplicates)&&e.jsxs("div",{className:"mt-3 flex items-start gap-2 p-3 rounded-lg bg-amber-500/5 border border-amber-500/20",children:[e.jsx(I,{className:"w-4 h-4 text-amber-400 shrink-0 mt-0.5"}),e.jsxs("div",{className:"text-[11px] text-amber-200",children:[e.jsx("p",{className:"font-semibold",children:"Usuários duplicados detectados (mesmo email, UIDs diferentes)"}),e.jsx("p",{className:"text-amber-300/80 mt-0.5",children:"Causa: bug histórico do app DriverCopilot (Promise.all dual-SDK). Fix do app foi aplicad
1o, mas usuários criados antes podem ter 2 UIDs. Pra resolver: identifique qual UID o motorista está usando agora (último login mais recente) e arquive o outro."})]})]})]}),e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3 flex-wrap gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ae,{className:"w-4 h-4 text-slate-400"}),e.jsx("h3",{className:"text-sm font-semibold text-white",children:"VÃnculos recentes (50 últimos)"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("select",{value:p,onChange:s=>G(s.target.value),className:"px-3 py-1.5 rounded-md text-xs bg-slate-900 border border-slate-700 text-slate-200",children:[e.jsx("option",{value:"",children:"Todos os status"}),e.jsx("option",{value:"approved",children:"Aprovado"}),e.jsx("option",{value:"pending_org_approval",children:"Aguardando"}),e.jsx("option",{value:"rejected",children:"Rejeitado"}),e.jsx("option",{value:"revoked_by_driver",children:"Revogado driver"}),e.jsx("option",{value:"removed_by_org",children:"Removido org"})]}),e.jsx("button",{type:"button",onClick:y,disabled:L,className:"p-1.5 rounded-md text-slate-400 hover:text-white hover:bg-slate-800 disabled:opacity-50",title:"Recarregar",children:L?e.jsx(m,{className:"w-4 h-4 animate-spin"}):e.jsx(X,{className:"w-4 h-4"})})]})]}),L&&D.length===0?e.jsxs("div",{className:"text-center py-8 text-sm text-slate-500",children:[e.jsx(m,{className:"w-5 h-5 animate-spin mx-auto mb-2"}),"Carregandoâ¦"]}):D.length===0?e.jsxs("div",{className:"text-center py-8 text-sm text-slate-500",children:["Nenhum vÃnculo encontrado",p?` com status "${p}"`:"","."]}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-left text-slate-500 border-b border-slate-700/50",children:[e.jsx("th",{className:"font-medium pb-2 pr-3",children:"Motorista"}),e.jsx("th",{className:"font-medium pb-2 pr-3",children:"Org"}),e.jsx("th",{className:"font-medium pb-2 pr-3",children:"Status"}),e.jsx("th",{className:"font-medium pb-2 pr-3",children:"Código"}),e.jsx("th",{className:"font-medium pb-2 pr-3",children:"Criado em"}),e.jsx("th",{className:"font-medium pb-2",children:"Manual?"})]})}),e.jsx("tbody",{children:D.map(s=>e.jsxs("tr",{className:"border-b border-slate-800/50 hover:bg-slate-800/30",children:[e.jsxs("td",{className:"py-2 pr-3",children:[e.jsx("p",{className:"text-slate-200 font-medium",children:s.driverName||"â"}),e.jsx("p",{className:"text-slate-500 text-[10px]",children:s.driverEmail||"â"})]}),e.jsx("td",{className:"py-2 pr-3 text-slate-300",children:s.orgName||s.orgId}),e.jsx("td",{className:"py-2 pr-3",children:e.jsx("span",{className:`px-2 py-0.5 rounded-full text-[10px] font-bold uppercase tracking-wide border ${O[s.status]||"bg-slate-700/40 text-slate-400 border-slate-700"}`,children:K[s.status]||s.status})}),e.jsx("td",{className:"py-2 pr-3 font-mono text-slate-400",children:s.inviteCode||"â"}),e.jsx("td",{className:"py-2 pr-3 text-slate-500",children:H(s.createdAt)}),e.jsx("td",{className:"py-2 text-slate-500",children:s.manuallyLinkedBy?e.jsx("span",{className:"text-indigo-400",title:`Por ${s.manuallyLinkedBy}`,children:"â Manual"}):"â"})]},s.linkId))})]})})]})]})}function ie({step:t}){var o;const g=t.ok?k:I,l=t.ok?"text-emerald-400":"text-amber-400",i=t.ok?"bg-emerald-500/5 border-emerald-500/20":"bg-amber-500/5 border-amber-500/20";return t.step==="invite_code"?e.jsxs("div",{className:`rounded-lg p-3 border ${i}`,children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[e.jsx(J,{className:`w-4 h-4 ${l}`}),e.jsx("p",{className:"text-sm font-semibold text-white",children:"Código de convite"}),t.ok&&e.jsx("span",{className:`ml-auto px-2 py-0.5 rounded-full text-[10px] font-bold uppercase ${t.valid?"bg-emerald-500/20 text-emerald-300":"bg-red-500/20 text-red-300"}`,children:t.valid?"Válido":"Inválido"})]}),t.ok?e.jsxs("div",{className:"text-[11px] text-slate-300 space-y-0.5",children:[e.jsxs("p",{children:["Org: ",e.jsx("strong",{children:t.orgName||t.orgId})]}),e.jsxs("p",{children:["Usos: ",t.usedCount,"/",t.maxUses," · Ativo: ",t.active?"sim"
1:"â ï¸ não"]}),e.jsxs("p",{children:["Expira: ",t.expiresAt?new Date(t.expiresAt).toLocaleString("pt-BR"):"â"]}),t.preApproved&&e.jsx("p",{className:"text-emerald-300",children:"â Pre-approved (auto-aprova ao vincular)"}),t.tipo&&e.jsxs("p",{children:["Tipo motorista: ",e.jsx("strong",{children:t.tipo})]}),t.terceiroId&&e.jsxs("p",{className:"text-[10px] text-slate-500",children:["Cross-link Terceiro: ",t.terceiroId]})]}):e.jsx("p",{className:"text-[11px] text-red-300",children:t.error})]}):t.step==="driver_auth"?e.jsxs("div",{className:`rounded-lg p-3 border ${i}`,children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[e.jsx(re,{className:`w-4 h-4 ${l}`}),e.jsx("p",{className:"text-sm font-semibold text-white",children:"Driver Firebase Auth"})]}),t.ok?e.jsxs("div",{className:"text-[11px] text-slate-300 space-y-0.5",children:[e.jsxs("p",{children:["UID: ",e.jsx("code",{className:"font-mono text-slate-400",children:t.uid})]}),e.jsxs("p",{children:["Nome: ",e.jsx("strong",{children:t.displayName||"(sem nome)"})]}),e.jsxs("p",{children:["Phone: ",t.phoneNumber||"â"," · Email verificado: ",t.emailVerified?"sim":"não"]}),e.jsxs("p",{children:["Providers: ",((o=t.providers)==null?void 0:o.join(", "))||"â"]}),t.disabled&&e.jsx("p",{className:"text-red-300 font-semibold",children:"â Conta desabilitada"})]}):e.jsx("p",{className:"text-[11px] text-red-300",children:t.error})]}):t.step==="existing_links"?e.jsxs("div",{className:`rounded-lg p-3 border ${i}`,children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[e.jsx(le,{className:`w-4 h-4 ${l}`}),e.jsx("p",{className:"text-sm font-semibold text-white",children:"VÃnculos prévios"}),t.hasActive&&e.jsx("span",{className:"ml-auto px-2 py-0.5 rounded-full text-[10px] font-bold uppercase bg-amber-500/20 text-amber-300",children:"Já vinculado"})]}),t.count===0?e.jsx("p",{className:"text-[11px] text-slate-400",children:"Nenhum vÃnculo anterior â pode criar novo."}):e.jsx("div",{className:"space-y-1",children:t.links.map(d=>e.jsxs("p",{className:"text-[11px] text-slate-400",children:[e.jsxs("span",{className:"text-slate-500",children:[d.linkId,":"]})," ",d.status," · ",d.createdAt?new Date(d.createdAt).toLocaleString("pt-BR"):"â"]},d.linkId))})]}):t.step==="summary"?e.jsxs("div",{className:`rounded-lg p-3 border ${t.readyToLink?"bg-emerald-500/10 border-emerald-500/30":"bg-amber-500/10 border-amber-500/30"}`,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[t.readyToLink?e.jsx(k,{className:"w-4 h-4 text-emerald-400"}):e.jsx(I,{className:"w-4 h-4 text-amber-400"}),e.jsx("p",{className:"text-sm font-semibold text-white",children:t.readyToLink?"Pronto pra vincular":`Não está pronto (${t.reason})`})]}),t.readyToLink&&e.jsx("p",{className:"text-[11px] text-emerald-200/80 mt-1",children:'Pode clicar em "Vincular (efetiva)" pra criar o vÃnculo.'})]}):t.step==="link_created"?e.jsxs("div",{className:"rounded-lg p-3 border bg-emerald-500/10 border-emerald-500/30",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(k,{className:"w-4 h-4 text-emerald-400"}),e.jsxs("p",{className:"text-sm font-semibold text-emerald-300",children:["VÃnculo ",t.reused?"reativado":"criado"]})]}),e.jsxs("p",{className:"text-[11px] text-emerald-200/80",children:["linkId: ",e.jsx("code",{className:"font-mono",children:t.linkId}),e.jsx("br",{}),"sharingId: ",e.jsx("code",{className:"font-mono",children:t.sharingId})]})]}):e.jsxs("div",{className:`rounded-lg p-3 border ${i}`,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(g,{className:`w-4 h-4 ${l}`}),e.jsx("p",{className:"text-sm font-semibold text-white",children:t.step})]}),e.jsx("pre",{className:"text-[10px] text-slate-500 mt-1 overflow-x-auto",children:JSON.stringify(t,null,2)})]})}export{xe 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.