import{c as G,r as h,R as Z,j as e,b as ee,T as C,C as Y,S as v}from"./index-XAQEFxR0.js";import se from"./ThreatHuntingDashboard-DtDniBrw.js";import{S as te}from"./search-BAkj-wLk.js";import{L as T}from"./loader-circle-Dgmm4WPV.js";import{E as ae}from"./eye-DfpkT4YW.js";import{T as re}from"./terminal-quH4CBjU.js";import{X as le}from"./x-BjlbuifP.js";import{C as R}from"./circle-check-big-CKA5EG0X.js";import{C as q,H as ie,a as ne}from"./hash-BTvn9URF.js";import{F as H}from"./file-text-YXpqYYkL.js";import{M as ce}from"./mail-C4YbZpAk.js";import{G as V}from"./globe-ggO-5B8t.js";import{C as oe}from"./chevron-down-Aw6gVMVv.js";import{C as J}from"./chevron-right-3LV85XzN.js";import{C as de}from"./chevron-left-AiuWqI8X.js";import{S as xe}from"./send-gqAzuMSb.js";/**
 * @license lucide-react v0.561.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const pe=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],me=G("eye-off",pe);/**
 * @license lucide-react v0.561.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ge=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],ue=G("link",ge),be=({artifact:a,onCheck:D,isChecked:o=!1})=>{var $,b,A;const[l,j]=h.useState(o),[n,_]=h.useState(!1),[u,w]=h.useState(!1);Z.useEffect(()=>{o&&!l&&j(!0)},[o]);const p=()=>{if(o){j(!l);return}_(!0),setTimeout(()=>{_(!1),j(!0),D(a.id)},800)},F=()=>{var L;const c="w-5 h-5 transition-transform duration-300 group-hover:scale-110";switch((L=a.type)==null?void 0:L.toLowerCase()){case"ip":return e.jsx(V,{className:c});case"hash":return e.jsx(ie,{className:c});case"domain":return e.jsx(V,{className:c});case"url":return e.jsx(ue,{className:c});case"email":return e.jsx(ce,{className:c});case"filename":return e.jsx(H,{className:c});case"username":return e.jsx(v,{className:c});case"command":return e.jsx(H,{className:c});default:return e.jsx(v,{className:c})}},d=(()=>{var c;switch((c=a.type)==null?void 0:c.toLowerCase()){case"ip":return{bg:"bg-cyan-500/10",border:"border-cyan-500/30",text:"text-cyan-400",valueBg:"bg-cyan-500/5",badge:"IP Address"};case"hash":return{bg:"bg-orange-500/10",border:"border-orange-500/30",text:"text-orange-400",valueBg:"bg-orange-500/5",badge:"File Hash"};case"domain":return{bg:"bg-blue-500/10",border:"border-blue-500/30",text:"text-blue-400",valueBg:"bg-blue-500/5",badge:"Domain"};case"url":return{bg:"bg-pink-500/10",border:"border-pink-500/30",text:"text-pink-400",valueBg:"bg-pink-500/5",badge:"URL"};case"email":return{bg:"bg-yellow-500/10",border:"border-yellow-500/30",text:"text-yellow-400",valueBg:"bg-yellow-500/5",badge:"Email"};case"command":return{bg:"bg-purple-500/10",border:"border-purple-500/30",text:"text-purple-400",valueBg:"bg-purple-500/5",badge:"Command"};default:return{bg:"bg-gray-500/10",border:"border-gray-500/30",text:"text-gray-400",valueBg:"bg-gray-500/5",badge:a.type||"Unknown"}}})(),k=c=>{switch(c==null?void 0:c.toLowerCase()){case"malicious":return{bg:"bg-red-500/5",border:"border-red-500/20",text:"text-red-400",accent:"bg-red-500",icon:e.jsx(q,{className:"w-5 h-5"})};case"suspicious":return{bg:"bg-yellow-500/5",border:"border-yellow-500/20",text:"text-yellow-400",accent:"bg-yellow-500",icon:e.jsx(C,{className:"w-5 h-5"})};case"clean":case"internal":return{bg:"bg-green-500/5",border:"border-green-500/20",text:"text-green-400",accent:"bg-green-500",icon:e.jsx(R,{className:"w-5 h-5"})};default:return{bg:"bg-gray-500/5",border:"border-gray-500/20",text:"text-gray-400",accent:"bg-gray-500",icon:e.jsx(v,{className:"w-5 h-5"})}}},f=a.osint_result||{},x=k(f.verdict);return e.jsxs("div",{className:`
            group relative rounded-2xl border transition-all duration-500 
            ${o?"border-purple-500/30 bg-[#16171b] shadow-[0_8px_30px_rgb(0,0,0,0.12)]":"border-gray-800/50 bg-[#0e0f12] hover:border-gray-700"}
            ${a.is_critical?"ring-1 ring-purple-500/20 shadow-[0_0_20px_rgba(168,85,247,0.05)]":""}
        `,children:[e.jsx("div",{className:`absolute top-0 left-0 w-1 h-full rounded-l-2xl transition-all duration-300 ${o?"bg-purple-500 opacity-100":"bg-gray-700 opacity-20 group-hover:opacity-40"}`}),a.is_critical&&e.jsx("div",{className:"absolute top-0 right-8",children:e.jsxs("div",{className:"bg-purple-600/90 backdrop-blur-sm text-white text-[9px] uppercase tracking-tighter font-black px-4 py-1 rounded-b-lg shadow-[0_2px_10px_rgba(147,51,234,0.3)] flex items-center gap-1.5 border-x border-b border-purple-400/20",children:[e.jsx(C,{className:"w-3 h-3"}),"Critical Indicator"]})}),e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4 md:gap-6",children:[e.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0 w-full",children:[e.jsx("div",{className:`
                            w-12 h-12 rounded-xl flex items-center justify-center transition-all duration-300 shrink-0 border
                            ${o?`${d.bg} ${d.text} ${d.border}`:"bg-gray-800/50 text-gray-500 border-gray-700/50 group-hover:bg-gray-800 group-hover:text-gray-400"}
                        `,children:F()}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[e.jsx("span",{className:`text-[10px] font-black uppercase tracking-widest px-2 py-0.5 rounded border ${o?`${d.text} ${d.bg} ${d.border}`:"text-gray-600 bg-gray-800/50 border-gray-700/50"}`,children:d.badge}),o&&e.jsxs("span",{className:"flex items-center gap-1 px-1.5 py-0.5 rounded bg-green-500/10 text-green-400 text-[9px] font-bold border border-green-500/20",children:[e.jsx(Y,{className:"w-2.5 h-2.5"})," CHECKED"]})]}),e.jsx("div",{className:`font-mono text-sm sm:text-base break-all leading-tight cursor-copy px-2 py-1 rounded ${o?`${d.valueBg} ${d.text} border ${d.border}`:"text-white group-hover:text-purple-50 hover:underline"}`,children:typeof a.value=="object"?(($=a.value)==null?void 0:$.name)||JSON.stringify(a.value):a.value})]})]}),e.jsxs("div",{className:"flex gap-3 w-full md:w-auto",children:[e.jsxs("button",{onClick:()=>w(!0),className:"relative h-11 px-4 rounded-xl font-bold text-sm bg-[#121316] hover:bg-[#1a1c20] text-blue-400 border border-blue-500/30 transition-all flex items-center justify-center gap-2 flex-1 md:flex-none",title:"Hunt this indicator in SIEM",children:[e.jsx(te,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Hunt"})]}),e.jsx("button",{onClick:p,disabled:n,className:`
                                relative h-11 flex-1 md:flex-none md:w-auto px-6 rounded-xl font-bold text-sm overflow-hidden transition-all duration-300
                                ${n?"bg-purple-500/50 cursor-wait":""}
                                ${o?"bg-gray-800 hover:bg-gray-700 text-gray-300 border border-gray-700":"bg-gradient-to-r from-blue-600 to-purple-600 hover:scale-105 active:scale-95 text-white shadow-lg shadow-purple-600/20"}
                            `,children:e.jsx("div",{className:"flex items-center justify-center gap-2",children:n?e.jsxs(e.Fragment,{children:[e.jsx(T,{className:"w-4 h-4 animate-spin"}),e.jsx("span",{children:"Scanning..."})]}):o?e.jsxs(e.Fragment,{children:[l?e.jsx(me,{className:"w-4 h-4"}):e.jsx(ae,{className:"w-4 h-4"}),e.jsx("span",{className:"whitespace-nowrap",children:l?"Hide Details":"View Report"})]}):e.jsxs(e.Fragment,{children:[e.jsx(v,{className:"w-4 h-4"}),e.jsx("span",{className:"whitespace-nowrap",children:"Run OSINT"})]})})})]})]}),e.jsx("div",{className:`
                    grid transition-all duration-500 ease-in-out
                    ${l?"max-h-[500px] opacity-100 mt-6":"max-h-0 opacity-0"}
                `,children:e.jsxs("div",{className:`
                        p-5 rounded-2xl border bg-black/20 backdrop-blur-sm
                        ${x.border}
                    `,children:[e.jsxs("div",{className:"flex items-center justify-between mb-4 pb-3 border-b border-gray-800/50",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:`w-2 h-2 rounded-full animate-pulse ${x.accent}`}),e.jsxs("span",{className:"text-[11px] font-bold uppercase tracking-widest text-gray-400 grayscale group-hover:grayscale-0 transition-all",children:["Source: ",e.jsx("span",{className:"text-white",children:f.source||"Intelligence Feed"})]})]}),e.jsxs("div",{className:`flex items-center gap-2 px-3 py-1 rounded-lg ${x.bg} ${x.text} border ${x.border}`,children:[x.icon,e.jsx("span",{className:"font-black uppercase text-xs tracking-wider",children:f.verdict})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("h5",{className:"text-[10px] uppercase font-bold text-gray-500 mb-1.5 flex items-center gap-1.5",children:[e.jsx(v,{className:"w-3 h-3"})," Intelligence Summary"]}),e.jsx("p",{className:"text-gray-300 text-sm leading-relaxed font-medium bg-gray-900/40 p-3 rounded-lg border border-gray-800/30",children:f.details})]}),f.confidence&&e.jsxs("div",{className:"pt-2",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-[10px] uppercase font-bold text-gray-500",children:"Scan Confidence"}),e.jsxs("span",{className:`text-xs font-black ${x.text}`,children:[f.confidence,"%"]})]}),e.jsx("div",{className:"h-1.5 bg-gray-800 rounded-full overflow-hidden p-[1px]",children:e.jsx("div",{className:`h-full rounded-full transition-all duration-1000 ease-out shadow-[0_0_10px_rgba(255,255,255,0.1)] ${x.accent}`,style:{width:`${f.confidence}%`}})})]})]})]})})]}),u&&typeof document<"u"&&ee.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[99999] flex items-center justify-center p-4 sm:p-6 lg:p-8 animate-fadeIn",children:[e.jsx("div",{className:"absolute inset-0 bg-black/80 backdrop-blur-sm",onClick:()=>w(!1)}),e.jsxs("div",{className:"relative w-full max-w-7xl h-[90vh] bg-[#0A0A0B] border border-blue-500/30 rounded-2xl shadow-[0_0_50px_rgba(59,130,246,0.15)] flex flex-col overflow-hidden animate-slideUp",children:[e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 bg-[#141517] border-b border-gray-800 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-blue-500/10 flex items-center justify-center border border-blue-500/20",children:e.jsx(re,{className:"text-blue-400 w-4 h-4"})}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-white font-bold tracking-wide flex items-center gap-2",children:["SECURE TERMINAL ",e.jsx("span",{className:"text-gray-500 font-mono text-xs",children:"v2.4"})]}),e.jsxs("p",{className:"text-xs text-blue-400/70 font-mono uppercase tracking-widest hidden sm:flex sm:items-center",children:["Active Investigation: ",e.jsx("span",{className:"text-white ml-1 truncate max-w-[200px] md:max-w-md lg:max-w-2xl",title:typeof a.value=="object"?JSON.stringify(a.value):a.value,children:typeof a.value=="object"?((b=a.value)==null?void 0:b.name)||JSON.stringify(a.value):a.value})]})]})]}),e.jsx("button",{onClick:()=>w(!1),className:"p-2 text-gray-500 hover:text-white hover:bg-white/10 rounded-xl transition-colors shrink-0",children:e.jsx(le,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto w-full custom-scrollbar",children:e.jsx(se,{isPopup:!0,initialQuery:typeof a.value=="object"?((A=a.value)==null?void 0:A.name)||JSON.stringify(a.value):a.value})})]})]}),document.body)]})},Re=({alert:a,onSubmit:D,isSubmitting:o=!1})=>{var z;const[l,j]=h.useState(0),[n,_]=h.useState([]),[u,w]=h.useState([]),[p,F]=h.useState(null),[S,d]=h.useState(""),[k,f]=h.useState(!1),[x,$]=h.useState(!1);h.useEffect(()=>{var s;if(l===3&&!S){const r=new Date().toLocaleString(),t=((s=O.find(g=>g.id===p))==null?void 0:s.label)||"UNDETERMINED",N=M.filter(g=>u.includes(g.id)).map(g=>`- ${g.label}`),I=m.filter(g=>n.includes(g.id)).map(g=>`- [${g.type.toUpperCase()}] ${g.value}`),U=a.title||`Alert #${a.id}`,i=a.is_operation_alert?` [OP: ${a.operation_title}]`:"",y=`INVESTIGATION EXECUTIVE SUMMARY
===============================
DATE: ${r}
ALERT: ${U}${i}
VERDICT: ${t.toUpperCase()}

KEY FINDINGS (${I.length})
----------------
${I.length>0?I.join(`
`):"(No artifacts flagged)"}

CONTAINMENT PROTOCOLS DEPLOYED (${N.length})
------------------------------
${N.length>0?N.join(`
`):"(No active containment measures)"}

ANALYSIS
--------
Investigation concluded based on verified telemetry and playbook protocols. All identified threats have been neutralized or escalated as per standard operating procedure.

SIGNED: Analyst (Auto-Generated)`;d(y)}},[l]);let b=(a==null?void 0:a.playbook_solution)||{};if(typeof b=="string")try{b=JSON.parse(b),typeof b=="string"&&(b=JSON.parse(b))}catch{b={}}const A=s=>{const r=[];let t={};try{t=typeof s=="string"?JSON.parse(s):s||{},typeof t=="string"&&(t=JSON.parse(t))}catch{return[]}if(["src_ip","dst_ip","ip","source_ip","destination_ip","internal_ip","external_ip","c2_ip","attacker_ip"].forEach(i=>{t[i]&&!r.some(y=>y.value===t[i])&&r.push({id:`ip-${t[i]}`,type:"ip",value:t[i],is_critical:!0})}),["file_hash","hash","sha256","md5","sha1"].forEach(i=>{t[i]&&!r.some(y=>y.value===t[i])&&r.push({id:`hash-${t[i].slice(0,8)}`,type:"hash",value:t[i],is_critical:!0})}),t.command_line||t.cmd||t.command){const i=t.command_line||t.cmd||t.command;r.push({id:"cmd-1",type:"command",value:i,is_critical:!0})}return["url","domain","c2_server","c2_domain","malicious_url"].forEach(i=>{t[i]&&!r.some(y=>y.value===t[i])&&r.push({id:`domain-${t[i].slice(0,12)}`,type:"domain",value:t[i],is_critical:!0})}),t.process_tree&&Array.isArray(t.process_tree)&&t.process_tree.forEach((i,y)=>{i.cmd&&i.highlight&&!r.some(g=>g.type==="command")&&r.push({id:`proc-cmd-${y}`,type:"command",value:i.cmd,is_critical:!0})}),r},c=b.artifacts||[],P=A(a==null?void 0:a.raw_log).map(s=>{const r=c.find(t=>t.value===s.value);return r&&r.osint_result?{...s,osint_result:r.osint_result,is_critical:r.is_critical??s.is_critical}:s}),m=[...P,...c.filter(s=>!P.some(r=>r.value===s.value))],X=async()=>{const s=m.filter(r=>!n.includes(r.id));if(s.length!==0){f(!0);for(const r of s)_(t=>[...t,r.id]),await new Promise(t=>setTimeout(t,800));f(!1)}},M=[{id:"isolate_host",label:"Isolate Host",description:"Immediate network quarantine of affected assets"},{id:"block_ip",label:"Block IP/Domain",description:"Update perimeter firewall & DNS blocklists"},{id:"block_hash",label:"Block File Hash",description:"Deploy hash-based blocklist to all EDR nodes"},{id:"reset_credentials",label:"Reset Credentials",description:"Invalidate sessions & force IAM password reset"},{id:"collect_forensics",label:"Collect Forensics",description:"Trigger remote memory and disk image capture"},{id:"escalate",label:"Escalate to Tier 3",description:"Transition case to Incident Response Team"},{id:"close_alert",label:"Close (No Action)",description:"Mark as False Positive or Benign activity"}],O=[{id:"true_positive",label:"True Positive",description:"Confirmed threat detected",color:"red",icon:e.jsx(q,{className:"w-8 h-8"})},{id:"false_positive",label:"False Positive",description:"Misidentified benign activity",color:"yellow",icon:e.jsx(C,{className:"w-8 h-8"})},{id:"benign",label:"Benign",description:"Authorized/Expected activity",color:"green",icon:e.jsx(R,{className:"w-8 h-8"})}],E=[{id:"artifacts",label:"Investigate",description:"Verify artifact reputations"},{id:"actions",label:"Actions",description:"Configure response strategy"},{id:"verdict",label:"Verdict",description:"Classify investigation results"},{id:"conclusion",label:"Summary",description:"Final report & signatures"}],K=s=>{n.includes(s)||_([...n,s])},Q=s=>{u.includes(s)?w(u.filter(r=>r!==s)):w([...u,s])},B=()=>{switch(l){case 0:return m.filter(t=>t.is_critical).every(t=>n.includes(t.id))||(m.length>0?n.length>=1:!0);case 1:return!0;case 2:return p!==null;case 3:return!0;default:return!0}},W=()=>{D({checkedArtifacts:n,selectedActions:u,verdict:p,conclusion:S})};return e.jsxs("div",{className:"bg-[#0a0b0d]/95 backdrop-blur-2xl rounded-3xl border border-gray-800/20 shadow-[0_20px_50px_rgba(0,0,0,0.5)] overflow-hidden",children:[e.jsxs("div",{className:"relative px-8 pt-8 pb-6 border-b border-gray-800/30 overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 right-0 p-8 opacity-5",children:e.jsx(v,{className:"w-32 h-32"})}),e.jsxs("div",{className:"relative z-10 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-500 animate-pulse"}),e.jsx("span",{className:"text-[10px] font-black uppercase tracking-[0.2em] text-blue-400",children:"Tactical Playbook v2.4"})]}),e.jsx("h2",{className:"text-2xl font-black text-white tracking-tight",children:"Investigation Terminal"}),e.jsx("div",{className:"flex items-center gap-4 mt-1",children:e.jsxs("p",{className:"text-gray-400 text-sm font-medium",children:["Phase 0",l+1,": ",e.jsx("span",{className:"text-gray-200",children:E[l].description})]})})]}),a.is_operation_alert&&e.jsx("div",{className:"flex flex-col items-end gap-2",children:e.jsxs("div",{className:"flex items-center gap-2 px-3 py-1 bg-purple-500/10 border border-purple-500/20 rounded-full",children:[e.jsx("span",{className:"text-[9px] font-black uppercase tracking-widest text-purple-400",children:a.operation_title||"Active OP"}),e.jsx("div",{className:"w-1 h-3 border-r border-purple-500/30"}),e.jsxs("span",{className:"text-white text-xs font-bold",children:[a.operation_sequence," / ",a.operation_total_alerts]})]})})]}),e.jsxs("div",{className:"mt-8 relative max-w-4xl mx-auto",children:[e.jsx("div",{className:"absolute top-[1.15rem] left-0 w-full h-[2px] bg-gray-800 rounded-full"}),e.jsx("div",{className:"absolute top-[1.15rem] left-0 h-[3px] bg-gradient-to-r from-blue-600 via-purple-600 to-fuchsia-500 shadow-[0_0_15px_rgba(147,51,234,0.4)] rounded-full transition-all duration-700 ease-in-out",style:{width:`${l/(E.length-1)*100}%`}}),e.jsx("div",{className:"relative flex justify-between",children:E.map((s,r)=>{const t=r<l,N=r===l;return e.jsxs("button",{onClick:()=>r<=l&&j(r),disabled:r>l,className:"flex flex-col items-center group cursor-pointer disabled:cursor-not-allowed",children:[e.jsx("div",{className:`
                                        w-10 h-10 rounded-2xl flex items-center justify-center border-2 z-10 
                                        transition-all duration-500 transform
                                        ${N?"bg-[#1a1b1e] border-blue-500 text-blue-400 shadow-[0_0_20px_rgba(59,130,246,0.3)] scale-110":t?"bg-blue-600 border-blue-600 text-white shadow-lg":"bg-[#121316] border-gray-800 text-gray-600 group-hover:border-gray-700"}
                                    `,children:t?e.jsx(R,{className:"w-5 h-5"}):e.jsx("span",{className:"font-black italic",children:r+1})}),e.jsx("span",{className:`
                                        mt-3 text-[10px] uppercase font-black tracking-[0.15em]
                                        ${N?"text-blue-400":t?"text-gray-300":"text-gray-600"}
                                    `,children:s.label})]},s.id)})})]})]}),e.jsxs("div",{className:"p-8 min-h-[450px] bg-[#0c0d0f]",children:[l===0&&e.jsxs("div",{className:"space-y-8 animate-fadeIn",children:[e.jsxs("div",{className:"group relative bg-[#13141a] border border-blue-500/10 rounded-2xl p-6 transition-all hover:bg-[#161720]",children:[e.jsx("div",{className:"absolute top-0 right-0 p-4",children:e.jsx(T,{className:"w-8 h-8 text-blue-500/10"})}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"p-3 bg-blue-500/10 border border-blue-500/20 rounded-xl h-fit",children:e.jsx(v,{className:"w-6 h-6 text-blue-400"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("h4",{className:"text-blue-400 font-black uppercase tracking-widest text-xs",children:"Tactical Analyst Briefing"}),e.jsxs("p",{className:"text-gray-400 text-sm leading-relaxed font-medium",children:["Prioritize ",e.jsx("span",{className:"text-purple-400 font-black underline decoration-purple-500/40 underline-offset-4",children:"Critical Artifacts"}),". These represent confirmed IoCs that require immediate reputation checks to determine the scope of compromise."]})]})]})]}),e.jsxs("div",{className:"flex flex-col md:flex-row md:items-end justify-between border-b border-gray-800 pb-4 md:pb-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-[10px] font-black uppercase tracking-[0.3em] text-gray-500 mb-2",children:"Target Evidence List"}),e.jsxs("div",{className:"text-xl font-black text-white flex items-center gap-3",children:["Evidence Collection (",m.length,")",e.jsxs("span",{className:"px-2 py-0.5 rounded bg-gray-800 text-xs font-bold text-gray-400",children:[n.length," Analyzed"]})]})]}),e.jsx("button",{onClick:X,disabled:k||n.length===m.length,className:`
                                    group relative h-10 w-full md:w-auto px-6 rounded-xl font-black text-[10px] uppercase tracking-widest transition-all
                                    ${k?"bg-gray-800 text-gray-500 cursor-wait":n.length===m.length?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-purple-600 hover:bg-purple-500 text-white shadow-[0_5px_15px_rgba(147,51,234,0.3)]"}
                                `,children:e.jsxs("span",{className:"flex items-center justify-center gap-2",children:[k?e.jsx(T,{className:"w-3.5 h-3.5 animate-spin"}):n.length===m.length?e.jsx(R,{className:"w-3.5 h-3.5"}):e.jsx(v,{className:"w-3.5 h-3.5 group-hover:rotate-12 transition-transform"}),k?"Processing...":n.length===m.length?"Analysis Finalized":"Execute Rapid Scan"]})})]}),e.jsx("div",{className:"grid gap-4",children:m.map(s=>e.jsx(be,{artifact:s,isChecked:n.includes(s.id),onCheck:K},s.id))}),m.length===0&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-20 text-gray-600",children:[e.jsx(C,{className:"w-12 h-12 mb-4 opacity-20"}),e.jsx("p",{className:"font-black uppercase tracking-widest text-xs",children:"No Artifacts Extracted From Logs"})]})]}),l===1&&e.jsxs("div",{className:"space-y-6 animate-fadeIn",children:[e.jsxs("div",{className:"rounded-2xl bg-[#13141a] border border-gray-800/50 overflow-hidden",children:[e.jsxs("button",{onClick:()=>$(!x),className:"w-full p-5 flex items-center justify-between hover:bg-gray-800/20 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("h4",{className:"text-[10px] font-black uppercase tracking-[0.2em] text-gray-500",children:["Confirmed Evidence (",n.length,")"]}),e.jsx("div",{className:"text-[10px] font-black uppercase tracking-widest text-blue-500/60",children:"Analysis Locked"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-gray-500",children:[e.jsx("span",{className:"text-[10px] font-bold uppercase",children:x?"Expand":"Collapse"}),x?e.jsx(oe,{className:"w-4 h-4"}):e.jsx(ne,{className:"w-4 h-4"})]})]}),e.jsx("div",{className:`transition-all duration-300 ease-in-out overflow-hidden ${x?"max-h-0 opacity-0":"max-h-[500px] opacity-100"}`,children:e.jsx("div",{className:"px-5 pb-5 flex flex-wrap gap-2",children:m.filter(s=>n.includes(s.id)).map(s=>{var r;return e.jsxs("div",{className:`
                                                    flex items-center gap-2 px-3 py-2 rounded-lg border text-xs font-mono font-bold
                                                    ${s.is_critical?"bg-red-500/10 border-red-500/20 text-red-400":"bg-gray-800/50 border-gray-700 text-gray-400"}
                                                `,children:[s.is_critical?e.jsx(C,{className:"w-3 h-3"}):e.jsx(v,{className:"w-3 h-3"}),typeof s.value=="object"?((r=s.value)==null?void 0:r.name)||JSON.stringify(s.value):s.value]},s.id)})})})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h3",{className:"text-[10px] font-black uppercase tracking-[0.3em] text-gray-500 mb-2",children:"Remediation Engine"}),e.jsx("h2",{className:"text-2xl font-black text-white italic",children:"Deploy Containment Protocol"}),e.jsx("p",{className:"text-gray-500 text-xs mt-2 font-medium",children:"Select applicable response actions. If this alert is benign or a false positive, you may proceed without selecting any actions."})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3 max-w-4xl",children:M.map(s=>e.jsx("button",{onClick:()=>Q(s.id),className:`
                                        group relative p-4 rounded-2xl border text-left transition-all duration-300
                                        ${u.includes(s.id)?"border-blue-500/40 bg-blue-500/5 shadow-[0_5px_20px_rgba(59,130,246,0.1)]":"border-gray-800/50 bg-[#121316] hover:border-gray-700"}
                                    `,children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:`
                                            w-10 h-10 rounded-xl flex items-center justify-center transition-all border
                                            ${u.includes(s.id)?"bg-blue-500 text-white border-blue-400":"bg-gray-800 text-gray-600 border-gray-700 group-hover:text-gray-400"}
                                        `,children:u.includes(s.id)?e.jsx(Y,{className:"w-5 h-5"}):e.jsx(J,{className:"w-4 h-4"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-black text-white text-sm uppercase tracking-wide",children:s.label}),e.jsx("div",{className:"text-xs text-gray-500 font-medium group-hover:text-gray-400 transition-colors uppercase tracking-tight",children:s.description})]})]})},s.id))})]}),l===2&&e.jsxs("div",{className:"space-y-8 animate-fadeIn flex flex-col items-center justify-center text-center",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("h3",{className:"text-[10px] font-black uppercase tracking-[0.3em] text-gray-500 mb-2 text-center",children:"Final Adjudication"}),e.jsx("h2",{className:"text-3xl font-black text-white italic tracking-tighter",children:"Submit Investigation Conclusion"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 w-full max-w-4xl",children:O.map(s=>e.jsxs("button",{onClick:()=>F(s.id),className:`
                                        group relative p-8 rounded-[2.5rem] border-2 transition-all duration-500 flex flex-col items-center
                                        ${p===s.id?s.color==="red"?"border-red-500 bg-red-500/5 shadow-[0_20px_60px_rgba(239,68,68,0.15)] scale-105":s.color==="yellow"?"border-yellow-500 bg-yellow-500/5 shadow-[0_20px_60px_rgba(234,179,8,0.15)] scale-105":"border-green-500 bg-green-500/5 shadow-[0_20px_60px_rgba(34,197,94,0.15)] scale-105":"border-gray-800/50 bg-[#121316] opacity-60 hover:opacity-100 hover:border-gray-700"}
                                    `,children:[e.jsx("div",{className:`
                                        w-20 h-20 mb-6 rounded-3xl flex items-center justify-center transition-all duration-500
                                        ${s.color==="red"?"bg-red-500/20 text-red-500":s.color==="yellow"?"bg-yellow-500/20 text-yellow-500":"bg-green-500/20 text-green-500"}
                                        ${p===s.id?"rotate-[360deg] scale-110 shadow-lg":""}
                                    `,children:s.icon}),e.jsx("div",{className:"font-black text-xl text-white uppercase tracking-tighter mb-2 italic",children:s.label}),e.jsx("div",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest",children:s.description})]},s.id))})]}),l===3&&e.jsxs("div",{className:"space-y-6 animate-fadeIn",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h3",{className:"text-[10px] font-black uppercase tracking-[0.3em] text-gray-500 mb-2",children:"After Action Report"}),e.jsx("h2",{className:"text-2xl font-black text-white italic",children:"Executive Summary"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("textarea",{value:S,onChange:s=>d(s.target.value),placeholder:"PROVIDE ANALYST SIGNATURE & FINDINGS...",className:"w-full h-48 px-6 py-5 bg-[#0e0f12] border-2 border-gray-800 focus:border-blue-500/50 rounded-3xl text-white placeholder-gray-700 font-mono text-sm resize-none transition-all outline-none"}),e.jsxs("div",{className:"absolute bottom-4 right-4 text-[10px] font-black uppercase tracking-widest text-gray-700",children:[S.length," BYTES RECORDED"]})]}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-4 pt-4",children:[e.jsxs("div",{className:"p-5 bg-gray-900/40 rounded-2xl border border-gray-800/50",children:[e.jsx("div",{className:"text-[9px] font-black uppercase text-gray-600 mb-2 tracking-widest leading-none",children:"Evidence Status"}),e.jsxs("div",{className:"text-2xl font-black text-white",children:[n.length," ",e.jsx("span",{className:"text-xs text-gray-500 italic",children:"Analyzed"})]})]}),e.jsxs("div",{className:"p-5 bg-gray-900/40 rounded-2xl border border-gray-800/50",children:[e.jsx("div",{className:"text-[9px] font-black uppercase text-gray-600 mb-2 tracking-widest leading-none",children:"Containment"}),e.jsxs("div",{className:"text-2xl font-black text-white",children:[u.length," ",e.jsx("span",{className:"text-xs text-gray-500 italic",children:"Active"})]})]}),e.jsxs("div",{className:"p-5 bg-gray-900/40 rounded-2xl border border-gray-800/50",children:[e.jsx("div",{className:"text-[9px] font-black uppercase text-gray-600 mb-2 tracking-widest leading-none",children:"Verdict Mode"}),e.jsx("div",{className:`text-xl font-black uppercase italic ${p==="true_positive"?"text-red-500":p==="false_positive"?"text-yellow-500":"text-green-500"}`,children:((z=O.find(s=>s.id===p))==null?void 0:z.label)||"UNDETERMINED"})]})]})]})]}),e.jsxs("div",{className:"px-8 py-6 bg-[#08090b] border-t border-gray-800/20 flex items-center justify-between",children:[e.jsxs("button",{onClick:()=>j(Math.max(0,l-1)),disabled:l===0,className:"flex items-center gap-2 group disabled:opacity-30 disabled:cursor-not-allowed",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-gray-800 flex items-center justify-center group-hover:bg-gray-700 transition-all",children:e.jsx(de,{className:"w-4 h-4 text-white"})}),e.jsx("span",{className:"text-[10px] font-black uppercase tracking-widest text-gray-500 group-hover:text-gray-300 transition-colors",children:"Abort Phase"})]}),e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 bg-black/40 border border-gray-800 rounded-full shadow-inner",children:[e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]"}),e.jsx("span",{className:"text-[9px] font-black uppercase tracking-[0.2em] text-gray-400",children:"Live Telemetry Synchronized"})]}),l<E.length-1?e.jsxs("button",{onClick:()=>j(l+1),disabled:!B(),className:`
                            h-12 px-8 rounded-2xl font-black text-[11px] uppercase tracking-[0.2em] transition-all 
                            flex items-center gap-3
                            ${B()?"bg-gradient-to-r from-blue-600 to-indigo-600 text-white shadow-[0_8px_25px_rgba(37,99,235,0.25)] hover:scale-105 hover:-translate-y-0.5 active:scale-95":"bg-gray-800/50 text-gray-600 cursor-not-allowed border border-gray-700/30"}
                        `,children:["Advance Protocol",e.jsx(J,{className:"w-4 h-4"})]}):e.jsx("button",{onClick:W,disabled:o||!p,className:`
                            h-12 px-10 rounded-2xl font-black text-[11px] uppercase tracking-[0.2em] transition-all
                            flex items-center gap-3
                            ${!p||o?"bg-gray-800 text-gray-600 cursor-not-allowed":"bg-gradient-to-r from-green-600 to-emerald-600 text-white shadow-[0_8px_25px_rgba(16,185,129,0.25)] hover:scale-105 hover:-translate-y-0.5 active:scale-95"}
                        `,children:o?e.jsx(T,{className:"w-5 h-5 animate-spin"}):e.jsxs(e.Fragment,{children:["Upload Signed Report",e.jsx(xe,{className:"w-4 h-4"})]})})]})]})};export{me as E,Re as I};
