!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"d1c7ac46f068d62cb709fcb0a5f45d31b06ca6ae"};var o=(new e.Error).stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="5f7d77a4-0dce-46f9-8636-61fdb04fb271",e._sentryDebugIdIdentifier="sentry-dbid-5f7d77a4-0dce-46f9-8636-61fdb04fb271")}catch(e){}}(),(globalThis.webpackChunkcloud_frontend=globalThis.webpackChunkcloud_frontend||[]).push([[8723],{78723(e,o,t){t.r(o),t.d(o,{default:()=>u});t(98992),t(54520),t(81454),t(25509),t(65223),t(60321),t(41927),t(11632),t(64377),t(66771),t(12516),t(68931),t(52514),t(35694),t(52774),t(49536),t(21926),t(94483),t(16215);var l=t(96540),n=t(56327),s=t(85660),a=t(23226),d=t(11820),r=t(76815),i=t(65131),c=t(74848);const u=(0,l.memo)(e=>{let{topologyGraph:o,topologyActorRows:t,topologyMeta:u,topologyEvidence:f,topologyTables:g,topologyOverlays:y,presentation:p,filterKey:b}=e;const h=(0,l.useMemo)(()=>(0,i.yH)(u),[u])||p,k=(0,l.useMemo)(()=>(0,i.XG)(u?.portBulletsByActor),[u]),[x,m]=(0,l.useState)(null),[I,C]=(0,l.useState)(""),[v,w]=(0,l.useState)(""),[M,E]=(0,l.useState)(null),[,L]=(0,a.A)(),[T,{height:S}]=(0,s.A)(),A=Math.max(300,S-8),_=(0,l.useCallback)(e=>{C(e.id),w(""),m(e.id)},[]),j=(0,l.useCallback)(e=>{w(e.id),C("")},[]),N=(0,l.useCallback)(()=>m(null),[]),{nodes:B=[],links:D=[],aggregatedLinks:O}=o||{},R=(0,l.useMemo)(()=>(0,i.cl)({nodes:B,topologyTables:g,presentation:h}),[B,g,h]),F=(0,l.useMemo)(()=>new Set((t||[]).map(e=>e.id)),[t]),G=(0,l.useMemo)(()=>t?R.filter(e=>F.has(e.id)):R,[R,F,t]),K=(0,l.useMemo)(()=>t?D.filter(e=>F.has(e.source)&&F.has(e.target)):D,[D,F,t]),H=Boolean(x&&t&&!F.has(x)),X=Boolean(!G.length||H),Y=(0,l.useCallback)(e=>{E(e)},[]);return(0,l.useEffect)(()=>{x&&X&&(m(null),C(""),w(""))},[x,X]),(0,l.useEffect)(()=>{L(!!x&&!X)},[x,X,L]),G.length?(0,c.jsxs)(n.Flex,{ref:T,flex:!0,column:!0,overflow:"hidden",children:[(0,c.jsx)(d.Ay,{nodes:G,links:K,portStateLinks:D,selectedNodeId:I,selectedLinkId:v,height:A,filterKey:b,presentation:h,portInventoryOverride:k,onModalIndexesChange:Y,onNodeClick:_,onLinkClick:j}),!!x&&M&&(0,c.jsx)(r.A,{actorId:x,graphNodes:R,graphLinks:D,aggregatedLinks:O,modalIndexes:M,presentation:h,topologyEvidence:f,topologyTables:g,topologyOverlays:y,topologyMeta:u,selectedLinkId:v,onClose:N})]}):(0,c.jsx)(n.Flex,{flex:!0,alignItems:"center",justifyContent:"center",children:(0,c.jsx)(n.Text,{color:"textLite",children:"No topology data"})})})}}]);