PageSourceSearch

https://platform.scrutex.ai/static/js/3106.df2e8b89.chunk.js

js scrutex.ai collected 2026-09-29 10:56:26 UTC 108,063 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkbrandsek=self.webpackChunkbrandsek||[]).push([[3106],{93106(e,s,a){a.r(s),a.d(s,{default:()=>le});var i=a(89379),t=a(5544),l=a(9950),r=a(98341),n=a(16673),o=a(93047),c=a(93151),d=a(47139),m=a(99415),h=a(27770),p=a(44414);const u={vip:{color:"#f5c451",label:"VIP"},email:{color:"#6ea8fe",label:"Email"},phone:{color:"#3fc9a3",label:"Phone"},account:{color:"#b794f6",label:"Account"},breach:{color:"#ff6b73",label:"Breach"},stealer_log:{color:"#e0457b",label:"Infostealer"},social_profile:{color:"#4cd4e0",label:"Social profile"},masked_phone:{color:"#f59f4c",label:"Recovery phone"},masked_email:{color:"#f5c451",label:"Recovery email"},pii:{color:"#ee6fd0",label:"PII"},web_mention:{color:"#7aa2f7",label:"Web mention"},location:{color:"#57d977",label:"Location"}},x=e=>(u[e]||{}).color||"#8b97ad",g=new Set(["domain"]),v=e=>g.has(e.type)||"account"===e.type&&"domain"===String(e.label||"").trim().toLowerCase(),f=e=>{const s=(null===e||void 0===e?void 0:e.nodes)||[],a=(null===e||void 0===e?void 0:e.edges)||[],i=new Set(s.filter(v).map(e=>e.id));return{nodes:s.filter(e=>!v(e)),edges:a.filter(e=>!i.has(e.source)&&!i.has(e.target))}};let j=null;function b(e){return"fcose"===e?{name:"fcose",quality:"proof",animate:!0,nodeRepulsion:9e3,idealEdgeLength:95,fit:!0}:"concentric"===e?{name:"concentric",animate:!0,fit:!0,concentric:e=>"vip"===e.data("ntype")?10:1,levelWidth:()=>3}:{name:e,animate:!0,fit:!0,spacingFactor:1.2}}const y=function(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).vipMemberId;const s=(0,n.useParams)().orgId,a=(0,r.useSelector)(e=>{var a,i,t,l,r;return s||((null===e||void 0===e||null===(a=e.summary)||void 0===a||null===(i=a.localClient)||void 0===i?void 0:i._id)||(null===e||void 0===e||null===(t=e.summary)||void 0===t||null===(l=t.clients)||void 0===l||null===(r=l[0])||void 0===r?void 0:r._id))}),i=(0,l.useState)([]),o=(0,t.A)(i,2),h=o[0],g=o[1],v=(0,l.useState)(""),y=(0,t.A)(v,2),N=y[0],w=y[1],k=e||N,A=(0,l.useState)(null),S=(0,t.A)(A,2),C=S[0],I=S[1],_=(0,l.useState)(!1),z=(0,t.A)(_,2),M=z[0],E=z[1],P=(0,l.useState)(null),F=(0,t.A)(P,2),B=F[0],D=F[1],L=(0,l.useState)("fcose"),V=(0,t.A)(L,2),W=V[0],U=V[1],T=(0,l.useRef)(null),R=(0,l.useRef)(null);(0,l.useEffect)(()=>{a&&!e&&(async()=>{try{var e;c.A.defaults.headers.common.Authorization="Bearer ".concat(localStorage.getItem("session"));const s=await c.A.get("".concat(d.H$,"/executive-monitoring/").concat(a,"/vip-members")),i=Array.isArray(null===(e=s.data)||void 0===e?void 0:e.data)?s.data.data:[];g(i),i.length&&!N&&w(i[0]._id)}catch(s){m.ih.error("Error","Could not load VIP members")}})()},[a]),(0,l.useEffect)(()=>{a&&k&&(async()=>{E(!0),I(null),D(null);try{var e,s;c.A.defaults.headers.common.Authorization="Bearer ".concat(localStorage.getItem("session"));const i=(null===(e=(await c.A.get("".concat(d.H$,"/executive-monitoring/").concat(a,"/vip-member/").concat(k,"/graphs"))).data)||void 0===e||null===(s=e.data)||void 0===s?void 0:s.graphs)||[];i.sort((e,s)=>new Date(s.updatedAt||s.createdAt||0)-new Date(e.updatedAt||e.createdAt||0)),I(i[0]||null)}catch(t){var i;404!==(null===t||void 0===t||null===(i=t.response)||void 0===i?void 0:i.status)&&m.ih.error("Error","Could not load graph"),I(null)}finally{E(!1)}})()},[a,k]);const H=(0,l.useCallback)(()=>{const e=f(null===C||void 0===C?void 0:C.graph),s=e.nodes,a=e.edges;R.current&&s.length&&function(){if(window.cytoscape)return Promise.resolve(window.cytoscape);if(j)return j;const e=e=>new Promise((s,a)=>{const i=document.createElement("script");i.src=e,i.async=!0,i.onload=s,i.onerror=()=>a(new Error("Failed to load "+e)),document.head.appendChild(i)});return j=e("https://cdn.jsdelivr.net/npm/[email protected]/dist/cytoscape.min.js").then(()=>e("https://cdn.jsdelivr.net/npm/[email protected]/layout-base.js")).then(()=>e("https://cdn.jsdelivr.net/npm/[email protected]/cose-base.js")).then(()=>e("https://cdn.jsdelivr.net/npm/[email protected]/cytoscape-fcose.js")).then(()=>window.cytoscape).catch(e=>{throw j=null,e}),j}().then(e=>{if(!R.current)return;T.current&&(T.current.destroy(),T.current=null);const i=[];
1s.forEach(e=>{return i.push({data:{id:e.id,label:e.label,ntype:e.type,sev:e.severity||"info",color:x(e.type),border:(s=e.severity,{high:"#ff5c66",medium:"#f59f4c",low:"#cdd861",info:"#39435a"}[s]||"#39435a"),props:e.props||{},size:"vip"===e.type?64:["breach","stealer_log"].includes(e.type)?42:34}});var s}),a.forEach(e=>i.push({data:{id:"".concat(e.source,"->").concat(e.target,":").concat(e.type),source:e.source,target:e.target,label:(e.type||"").replace(/_/g," ")}}));const t=e({container:R.current,elements:i,style:[{selector:"node",style:{"background-color":"data(color)",label:"data(label)",width:"data(size)",height:"data(size)","border-width":3,"border-color":"data(border)",color:"#e6edf3","font-size":11,"font-weight":600,"text-valign":"bottom","text-margin-y":5,"text-wrap":"wrap","text-max-width":120,"text-outline-color":"#0b0e14","text-outline-width":2.5}},{selector:'node[ntype = "vip"]',style:{"font-size":14,"border-width":5}},{selector:"edge",style:{width:1.4,"line-color":"#33405a","target-arrow-color":"#33405a","target-arrow-shape":"triangle","arrow-scale":.9,"curve-style":"bezier",label:"data(label)","font-size":8.5,color:"#6b788f","text-rotation":"autorotate","text-outline-color":"#0b0e14","text-outline-width":2}},{selector:"node:selected",style:{"border-color":"#ffffff","border-width":4}},{selector:".faded",style:{opacity:.12}}],layout:b(W)});t.on("tap","node",e=>{const s=e.target;t.elements().addClass("faded"),s.removeClass("faded"),s.neighborhood().removeClass("faded"),D(s.data())}),t.on("tap",e=>{e.target===t&&(t.elements().removeClass("faded"),D(null))}),T.current=t}).catch(()=>m.ih.error("Graph engine","Could not load the graph renderer (net
1work)."))},[C,W]);(0,l.useEffect)(()=>(H(),()=>{T.current&&(T.current.destroy(),T.current=null)}),[H]);const O=f(null===C||void 0===C?void 0:C.graph),$=O.nodes,G=O.edges,X={};$.forEach(e=>X[e.type]=(X[e.type]||0)+1);const q=(null===C||void 0===C?void 0:C.timeline)||[];h.find(e=>e._id===N);return(0,p.jsxs)("div",{className:"eig-wrap",children:[(0,p.jsxs)("div",{className:"eig-header",children:[(0,p.jsxs)("div",{children:[(0,p.jsx)("h2",{children:"Executive Intelligence Graph"}),(0,p.jsx)("div",{className:"eig-sub",children:"Identity, breaches, accounts & recovery exposure"})]}),(0,p.jsx)("div",{className:"eig-spacer"}),!e&&(0,p.jsxs)("select",{value:N,onChange:e=>w(e.target.value),children:[0===h.length&&(0,p.jsx)("option",{value:"",children:"No VIP members"}),h.map(e=>(0,p.jsx)("option",{value:e._id,children:e.name||(Array.isArray(e.email)?e.email[0]:e.email)||e._id},e._id))]}),(0,p.jsxs)("select",{value:W,onChange:e=>{return s=e.target.value,U(s),void(T.current&&T.current.layout(b(s)).run());var s},children:[(0,p.jsx)("option",{value:"fcose",children:"Force layout"}),(0,p.jsx)("option",{value:"concentric",children:"Concentric"}),(0,p.jsx)("option",{value:"breadthfirst",children:"Hierarchy"})]}),(0,p.jsx)("button",{onClick:()=>T.current&&T.current.fit(void 0,40),children:"Fit"})]}),(0,p.jsxs)("div",{className:"eig-main",children:[M?(0,p.jsx)("div",{className:"eig-loading",children:"Loading graph\u2026"}):0===$.length?(0,p.jsx)("div",{className:"eig-loading",children:"No graph yet for this VIP. Run a scan \u2014 graphs are built automatically when a scan completes."}):(0,p.jsx)("div",{className:"eig-cy",ref:R}),(0,p.jsx)("aside",{className:"eig-side",children:(0,p.jsxs)("div",{className:"eig-scroll",children:[(0,p.jsxs)("div",{className:"eig-card",children:[(0,p.jsx)("h3",{children:"Exposure summary"}),(0,p.jsxs)("div",{className:"eig-stat-grid",children:[(0,p.jsxs)("div",{className:"eig-stat",children:[(0,p.jsx)("div",{className:"n",children:$.length}),(0,p.jsx)("div",{className:"l",children:"Entities"})]}),(0,p.jsxs)("div",{className:"eig-stat",children:[(0,p.jsx)("div",{className:"n",children:G.length}),(0,p.jsx)("div",{className:"l",children:"Connections"})]}),(0,p.jsxs)("div",{className:"eig-stat",children:[(0,p.jsx)("div",{className:"n",style:{color:"#ff8089"},children:(X.breach||0)+(X.stealer_log||0)}),(0,p.jsx)("div",{className:"l",children:"Breaches"})]}),(0,p.jsxs)("div",{className:"eig-stat",children:[(0,p.jsx)("div",{className:"n",style:{color:"#b794f6"},children:X.account||0}),(0,p.jsx)("div",{className:"l",children:"Accounts"})]})]})]}),(0,p.jsxs)("div",{className:"eig-card",children:[(0,p.jsx)("h3",{children:"Selected entity"}),B?(0,p.jsxs)("div",{children:[(0,p.jsxs)("div",{className:"eig-kv",children:[(0,p.jsx)("span",{className:"k",children:"Type"}),(0,p.jsx)("span",{className:"v",children:(u[B.ntype]||{}).label||B.ntype})]}),(0,p.jsxs)("div",{className:"eig-kv",children:[(0,p.jsx)("span",{className:"k",children:"Value"}),(0,p.jsx)("span",{className:"v",children:B.label})]}),(0,p.jsxs)("div",{className:"eig-kv",children:[(0,p.jsx)("span",{className:"k",children:"Severity"}),(0,p.jsx)("span",{className:"v",children:(0,p.jsx)("span",{className:"eig-badge eig-sev-".concat(B.sev),children:B.sev})})]}),Object.entries(B.props||{}).filter(e=>{let s=(0,t.A)(e,2),a=s[0],i=s[1];return null!==i&&void 0!==i&&""!==i&&(!/score/i.test(a)||0!==Number(i))}).map(e=>{let s=(0,t.A)(e,2),a=s[0],i=s[1];return(0,p.jsxs)("div",{className:"eig-kv",children:[(0,p.jsx)("span",{className:"k",children:a}),(0,p.jsx)("span",{className:"v",children:String("object"===typeof i?JSON.stringify(i):i)})]},a)})]}):(0,p.jsx)("div",{className:"eig-empty",children:"Click any node to inspect it."})]}),(0,p.jsxs)("div",{className:"eig-card",children:[(0,p.jsx)("h3",{children:"Entity breakdown"}),Object.keys(u).filter(e=>X[e]).map(e=>(0,p.jsxs)("div",{className:"eig-row",children:[(0,p.jsx)("span",{className:"eig-dot",style:{background:u[e].color}}),u[e].label,(0,p.jsx)("span",{className:"count",children:X[e]})]},e)),0===$.length&&(0,p.jsx)("div",{className:"eig-empty",children:"\u2014"})]}),(0,p.jsxs)("div",{className:"eig-card",children:[(0,p.jsx)("h3",{children:"Timeline"}),0===q.length?(0,p.jsx)("div",{className:"eig-empty",children:"No dated events."}):[...q].sort((e,s)=>String(s.when).localeCompare(String(e.when))).map((e,s)=>(0,p.jsxs)("div",{className:"eig-ev",children:[(0,p.jsx)("span",{className:"eig-dot",style:{background:x(e.type),display:"inline-block",marginRight:6}}),e.label,(0,p.jsx)("div",{className:"t",children:String(e.when).slice(0,10)})]},s))]}),(0,p.jsxs)("div",{className:"eig-card",children:[(0,p.jsx)("h3",{children:"Legend"}
1),Object.values(u).map(e=>(0,p.jsxs)("div",{className:"eig-row",children:[(0,p.jsx)("span",{className:"eig-dot",style:{background:e.color}}),e.label]},e.label))]})]})})]})]})},N=e=>String(e||"").toLowerCase().replace(/[^a-z0-9]/g,""),w={};[["chess.com","Chess.com","https://cdn.simpleicons.org/chessdotcom"],["domain","Domain","https://cdn.jsdelivr.net/npm/lucide-static@latest/icons/globe.svg"],["dropbox","Dropbox","https://cdn.simpleicons.org/dropbox"],["duolingo.com","Duolingo","https://cdn.simpleicons.org/duolingo"],["fitbit","FitBit","https://companieslogo.com/img/orig/FIT.defunct-1627f32e.png?t=1720244491"],["fiton","FitOn","https://play-lh.googleusercontent.com/gXS_ETu-4xZf2v70NHYqJ_RNkBxcgtOVz5j0IDyH5UMMtQjmvJn4z-zDE-IvArkumw"],["fittr","Fittr","https://i.imgur.com/bOs2k6S.png"],["flickr","Flickr","https://cdn.simpleicons.org/flickr"],["gravatar","Gravatar","https://cdn.simpleicons.org/gravatar"],["imageshack.com","imageshack","https://cdn.simpleicons.org/dropbox"],["gitbucket","GitBucket","https://s3.amazonaws.com/cmscritic.mediasite.org/assets/products/bitbucket/logo-743959029541.png?v=1685911262448"],["github","GitHub","https://cdn.simpleicons.org/github"],["gitlab","GitLab","https://cdn.simpleicons.org/gitlab"],["google","Google","https://cdn.simpleicons.org/google"],["linkedin","LinkedIn","https://cdn.iconscout.com/icon/free/png-256/free-linkedin-logo-icon-svg-download-png-1581908.png?f=webp"],["notion","Notion","https://cdn.simpleicons.org/notion"],["offtop.com","offtop","https://cdn.simpleicons.org/offtop"],["protonmail","ProtonMail","https://cdn.simpleicons.org/protonmail"],["trello","Trello","https://cdn.simpleicons.org/trello"],["typeform","TypeForm","https://cdn.simpleicons.org/typeform"],["peloton","Peloton","https://cdn.simpleicons.org/peloton"],["plex","Plex","https://cdn.simpleicons.org/plex"],["picsart","Picsart","https://cdn.simpleicons.org/picsart"],["poshmark","Poshmark","https://companieslogo.com/img/orig/POSH-9b235e5b.png?t=1720244493"],["rumble","Rumble","https://cdn.simpleicons.org/rumble"],["siriusxm","SiriusXM","https://siriusxmdealer.com/wp-content/uploads/2023/12/SiriusXM-LOCK-UP-LOWER-BLUE-RGB.png"],["strava","Strava","https://cdn.simpleicons.org/strava"],["tiktok","TikTok","https://iconape.com/wp-content/files/fd/121669/svg/tiktok-logo-tik-tok-logo-icon-png-svg.png"],["adobe","Adobe","https://uxwing.com/wp-content/themes/uxwing/download/brands-and-social-media/adobe-icon.png"],["apple","Apple","https://cdn.simpleicons.org/apple"],["beatstars.com","beatstars.com","https://cdn.simpleicons.org/beatstars"],["bitmoji","Bitmoji","https://cdn.simpleicons.org/snapchat"],["untappd","Untappd","https://lawlessbeer.com/wp-content/uploads/tapped.png"],["vsco","VSCO","https://cdn.simpleicons.org/vsco"],["vivino","Vivino","https://cdn.simpleicons.org/vivino"],["bible.com","Bible.com","https://www.bible.com/_next/image?url=https%3A%2F%2Fweb-assets.youversion.com%2Fapp-icons%2Fen.png&w=96&q=75"],["people","People","https://api.iconify.design/lucide/user.svg"],["myfitnesspal","MyFitnessPal","https://play-lh.googleusercontent.com/iGPZDsKZoF58BABAEIebIQk_X1sdYHviEJAwUyoYyJO4L-bN8XA6yWiXuBJcVJwIEc4wHSvxWjbFU23Y7cn1sMo=w240-h480-rw"],["x.com","X","https://cdn.simpleicons.org/x"],["spotify.com","Spotify","https://cdn.simpleicons.org/spotify"],["lastpass.com","LastPass","https://cdn.simpleicons.org/lastpass"],["replit.com","Replit","https://cdn.simpleicons.org/replit"],["pinterest.com","Pinterest","https://cdn.simpleicons.org/pinterest"],["mozilla.org","Mozilla","https://cdn.simpleicons.org/mozilla"],["my.games","my.games","https://cdn.simpleicons.org/mygames"],["freelancer.com","Freelancer","https://cdn.simpleicons.org/freelancer"],["pornhub.com","PornHub","https://www.google.com/s2/favicons?domain=pornhub.com&sz=64"],["instagram","Instagram","https://cdn.simpleicons.org/instagram"],["xvideos.com","XVideos","https://www.google.com/s2/favicons?domain=xvideos.com&sz=64"],["xnxx.com","XNXX","https://www.google.com/s2/favicons?domain=xnxx.com&sz=64"],["pandora","Pandora","https://www.pandora.com/favicon.ico"],["mapmywalk","MapMyWalk","https://mapmy-static.mapmyfitness.com/asset/favicon.0e40a95f.ico?v=3"],["delectable","Delectable","https://delectable.com/images/favicon-2c864262.png"],["distiller","Distiller","https://distiller.com/favicon.ico"],["fishbrain","FishBrain","https://fishbrain.com/_next/static/media/logo_small.137gbffr_900_.svg"],["graana","Graana","https://www.graana.com/favicon.ico"],["fishangler","FishAngler","https://www.fishangler.com/favicon.ico"],["mindbody","MindBody","https://www.mindbodyonline.com/themes/mindbody/images/icons/favicons/mindbody-favicon.svg"],["garmin","Garmin","https://share-assets.fe.garmin.com/favicon.ico"],["hole19","Hole19","https://www.hole19golf.com/assets/favicon-22b155e1.ico"],["golfnow","GolfNow","https://gqp7knph.cdn.imgeng.in/favicon.ico"],["sololearn","SoloLearn","https://www.sololearn.com/Images/favicon.ico"],["thegrint","TheGrint","https://cdn.prod.website-files.com/65c14ebc4af79bb767e4facb/65c14ebc4af79bb767e4fb34_favicon.png"],["mapstr","Mapstr","https://cdn.prod.website-files.com/6488354fa807724b80ed3378/649a8a99d2627b9ae618d9c0_Favicon%20mapstr.svg"],["etsy","Etsy","https://cdn.simpleicons.org/etsy"],["samsclub","Sam's Club","https://cdn.simpleicons.org/samsclub"],["microsoft","Microsoft","https://cdn.pixabay.com/photo/2013/02/12/09/07/microsoft-80660_960_720.png"],["walmart","Walmart","https://upload.wikimedia.org/wikipedia/commons/thumb/6/60/Walmart_spark_%282025%29.svg/960px-Walmart_spark_%282025%29.svg.png?_=20250113193307"],["ebay","eBay","https://cdn.simpleicons.org/ebay"],["iclicker","iClicker","https://blogs.cornell.edu/pollinghelp/files/2014/02/iClickerAppIcon-r7ogek.png"],["atleto","Atleto","https://upload.wikimedia.org/wikipedia/commons/thumb/b/b8/Athletics_logo.svg/960px-Athletics_logo.svg.png"],["facebook","Facebook","https://images.icon-icons.com/2389/PNG/512/facebook_f_logo_
1icon_145290.png"],["geneanet","Geneanet","https://geneacdn.net/favicon.ico"],["uber","Uber","https://pngimg.com/uploads/uber/uber_PNG13.png"],["codecademy.com","CodeCademy","https://upload.wikimedia.org/wikipedia/commons/thumb/4/4b/Codecademy_icon.svg/960px-Codecademy_icon.svg.png"],["coroflot.com","Coroflot","https://www.coroflot.com/images/page_icons/favicon-32x32.png"],["hubspot.com","HubSpot","https://companieslogo.com/img/orig/HUBS-3bd277ce.png?t=1744165308"],["plurk.com","Plurk","https://images.icon-icons.com/2389/PNG/512/plurk_logo_icon_144973.png"],["doordash","DoorDash","https://companieslogo.com/img/orig/DASH-4b1e7048.png?t=1720244491"],["aliexpress","AliExpress","https://www.citypng.com/public/uploads/preview/square-aliexpress-app-icon-701751694975046e22jzgbgsm.png"],["telerik","Telerik","https://www.telerik.com/favicon.ico?v=rebv1"],["wix.com","Wix","https://companieslogo.com/img/orig/WIX-9f14d042.png?t=1720244494"],["wordpress.com","WordPress","https://images.seeklogo.com/logo-png/29/2/wordpress-icon-logo-png_seeklogo-299143.png"]].forEach(e=>{let s=(0,t.A)(e,3),a=s[0],i=s[1];const l={label:i,icon:s[2]};w[N(a)]=l,i&&(w[N(i)]=l)});const k=function(e){return e&&w[N(e)]||null},A=e=>{const s=(null==e?"":String(e)).trim();return s?/^https?:\/\//i.test(s)||s.startsWith("/")?s:/^[a-z][a-z0-9+.-]*:/i.test(s)?"":"https://".concat(s):""},S=e=>{const s=(null==e?"":String(e)).trim();return s?/^https?:\/\//i.test(s)?s:/^[a-z][a-z0-9+.-]*:/i.test(s)?"":"".concat(d.H$).concat(s.startsWith("/")?"":"/").concat(s):""};var C=a(28692);const I=e=>{if(!e)return"";const s=new Date(e);return isNaN(s)?String(e).slice(0,10):s.toISOString().slice(0,10)},_=e=>(e||"VIP").split(/\s+/).slice(0,2).map(e=>e[0]).join("").toUpperCase(),z=function(e){for(var s=arguments.length,a=new Array(s>1?s-1:0),i=1;i<s;i++)a[i-1]=arguments[i];for(const t of a){if(e&&null!=e[t]&&""!==e[t])return e[t];if(e&&e.data&&null!=e.data[t]&&""!==e.data[t])return e.data[t]}},M=e=>{const s=e.source;return s&&"object"===typeof s?s.name||s.title||s.database||"breach":s||z(e,"dbname","database","source")||"\u2014"},E=e=>{const s=e&&e.source;return s&&"object"===typeof s?s.name||s.title||s.database||"breach":s||""},P=e=>{const s=e.data||{},a=s.source&&"object"===typeof s.source?s.source.date:null;return e.occurredAt||a||s.pwned_at||s.breach_date||s.date||s.created||s.created_at||e.indexedAt||s.indexed_at||s.added||null},F=e=>{const s=e.data||{};return e.indexedAt||s.indexed_at||s.added||null},B=new Set(["gmail.com","googlemail.com","yahoo.com","yahoo.co.in","ymail.com","hotmail.com","outlook.com","live.com","msn.com","icloud.com","me.com","aol.com","proton.me","protonmail.com","rediffmail.com","zoho.com","gmx.com","mail.com"]),D=/forum|paste|dox|onion|breachforum|russianmarket|xss\.is|leak.?market|dark.?web|stealer.?market|telegram.?channel/i,L={leaked_credential:"Credentials",stealer_log:"Infostealer",pii:"Data Exposure",social_profile:"Impersonation",crawled_content:"Media & Mention",web_mention:"Media & Mention",account:"Digital Footprint",email_registration:"Digital Footprint",google_account_info:"Digital Footprint"},V={critical:"P1",high:"P2",medium:"P3",low:"P4",info:"P4"},W=e=>{const s=P(e)||e.scannedAt||e.createdAt,a=s?new Date(s).getFullYear():null;return a&&!isNaN(a)?a:""},U=e=>"leaked_credential"===e.type||"stealer_log"===e.type?"Force reset":"pii"===e.type?"Review":"Mark known",T={critical:"#dc2626",high:"#e0700a",medium:"#b08900",low:"#3f9153",info:"#6b7280"},R=e=>{if(!e)return"";try{return new URL(/^https?:\/\//i.test(e)?e:"https://".concat(e)).hostname.replace(/^www\./,"")}catch(s){return String(e).replace(/^https?:\/\//i,"").replace(/^www\./,"").split("/")[0]}},H=e=>"document"===z(e,"fileType")||/scribd|fliphtml5|slideshare|docs?\.google|\.pdf($|\?)/i.test(z(e,"url")||""),O=e=>z(e,"title")||(e=>{if(!e)return"";try{const s=new URL(/^https?:\/\//i.test(e)?e:"https://".concat(e)).pathname.split("/").filter(Boolean),a=s[s.length-1]||s[s.length-2]||"",i=decodeURIComponent(a).replace(/\.[a-z0-9]{2,5}$/i,"").replace(/[-_]+/g," ").trim();return i.length>3?i.replace(/\b\w/g,e=>e.toUpperCase()).slice(0,80):""}catch(s){return""}})(z(e,"url"))||R(z(e,"url"))||"Web mention",$={account:"#b794f6",email_registration:"#b794f6",google_account_info:"#b794f6",leaked_credential:"#ff8089",stealer_log:"#ee6fd0",pii:"#f59f4c",social_profile:"#4cd4e0",crawled_content:"#4cd4e0",web_mention:"#7aa2f7"},G=e=>{let s=e.f;const a=s.data&&s.data.profileData?s.data.profileData:null,i=function(){for(var e=arguments.length,i=new Array(e),t=0;t<e;t++)i[t]=arguments[t];for(const l of i){const e=z(s,l);if(null!=e&&""!==e)return e;if(a&&null!=a[l]&&""!==a[l])return a[l]}},t=e=>{const s=Number(e);
1return isNaN(s)?e:s.toLocaleString()},l=s.platform||i("platform")||"Profile",r=i("username","name"),n=s.profileUrl||i("profileUrl","url","link"),o=Number(i("score","risk_score")||0),c=(d=(s.severity||"").toLowerCase(),["critical","high"].includes(d)?"high":"medium"===d?"medium":"low");var d;const m=i("isVerified"),h=i("followers"),u=i("posts"),x=i("joinDate"),g=S(i("profilePic","profile_pic","avatar")),v=S(i("screenshot","screenshot_url")),f=i("summary","risk_analysis","riskAssessment","description"),j=i("threatType","threat_type"),b=i("threat_indicators","indicators"),y=Array.isArray(b)?b:[],N=(0,C.nN)(l,n);return(0,p.jsxs)("div",{className:"eim-c eim-social",children:[(0,p.jsxs)("div",{className:"eim-social-head",children:[(0,p.jsx)("div",{className:"eim-social-av",style:!g&&N?{background:N.color}:void 0,children:g?(0,p.jsx)("img",{src:g,alt:"",onError:e=>{e.target.style.display="none"}}):N?(0,p.jsx)("svg",{width:"26",height:"26",viewBox:"0 0 24 24",fill:"#fff","aria-hidden":"true",children:(0,p.jsx)("path",{d:N.path})}):(String(l)[0]||"?").toUpperCase()}),(0,p.jsxs)("div",{className:"eim-social-id",children:[(0,p.jsxs)("div",{className:"nm",style:{textTransform:"capitalize"},children:[l,m&&(0,p.jsx)("span",{className:"eim-verified",title:"Verified account",children:"\u2713"})]}),r&&(0,p.jsxs)("div",{className:"src",children:["@",String(r).replace(/^@/,"")]})]}),o>0&&(0,p.jsxs)("div",{className:"eim-score ".concat(c),title:"Risk score",children:[(0,p.jsx)("span",{className:"v",children:o}),(0,p.jsx)("span",{className:"l",children:"risk"})]})]}),null!=h&&""!==h||u&&"0"!==u||x?(0,p.jsxs)("div",{className:"eim-social-meta",children:[null!=h&&""!==h&&(0,p.jsxs)("span",{children:[(0,p.jsx)("b",{children:t(h)})," followers"]}),u&&"0"!==u&&(0,p.jsxs)("span",{children:[(0,p.jsx)("b",{children:t(u)})," posts"]}),x&&(0,p.jsxs)("span",{children:["Joined ",x]})]}):null,(f||j||y.length>0)&&(0,p.jsxs)("div",{className:"eim-social-ctx",children:[(0,p.jsxs)("div",{className:"eim-social-ctx-h",children:[(0,p.jsx)("span",{children:"Context"}),j&&(0,p.jsx)("span",{className:"eim-sev ".concat(c),children:j})]}),f&&(0,p.jsx)("p",{className:"eim-social-ctx-b",children:String(f)}),y.length>0&&(0,p.jsx)("div",{className:"eim-social-ind",children:y.slice(0,8).map((e,s)=>(0,p.jsx)("span",{className:"eim-ind",children:String(e)},s))})]}),v&&(0,p.jsx)("a",{className:"eim-social-shot",href:v,target:"_blank",rel:"noreferrer",title:"Open screenshot",children:(0,p.jsx)("img",{src:v,alt:"profile screenshot",onError:e=>{const s=e.target.closest("a");s&&(s.style.display="none")}})}),(0,p.jsxs)("div",{className:"eim-social-foot",children:[A(n)?(0,p.jsx)("a",{href:A(n),target:"_blank",rel:"noreferrer",children:"View profile \u2192"}):(0,p.jsx)("span",{className:"eim-social-src",children:E(s)}),s.scannedAt&&(0,p.jsx)("span",{className:"when",children:I(s.scannedAt)})]})]})},X=e=>{let s=e.events;return s&&0!==s.length?(0,p.jsx)("div",{className:"eim-tl",children:s.map((e,s)=>(0,p.jsxs)("div",{className:"eim-tlev",children:[(0,p.jsx)("span",{className:"d",style:{background:e.c}}),(0,p.jsx)("div",{className:"w",children:e.when}),(0,p.jsx)("div",{className:"t",children:e.label})]},s))}):(0,p.jsx)("div",{className:"eim-empty",children:"No dated events."})},q=function(){var e;let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=s.vipMemberId,i=s.orgId,h=s.onBack;const u=(0,n.useParams)().orgId,x=(0,r.useSelector)(e=>{var s,a,t,l,r;return i||u||(null===e||void 0===e||null===(s=e.summary)||void 0===s||null===(a=s.localClient)||void 0===a?void 0:a._id)||(null===e||void 0===e||null===(t=e.summary)||void 0===t||null===(l=t.clients)||void 0===l||null===(r=l[0])||void 0===r?void 0:r._id)}),g=!!a,v=(0,l.useState)([]),f=(0,t.A)(v,2),j=f[0],b=f[1],N=(0,l.useState)(""),w=(0,t.A)(N,2),S=w[0],q=w[1],J=a||S,Y=(0,l.useState)([]),Z=(0,t.A)(Y,2),K=Z[0],Q=Z[1],ee=(0,l.useState)(!1),se=(0,t.A)(ee,2),ae=se[0],ie=se[1],te=(0,l.useState)("overview"),le=(0,t.A)(te,2),re=le[0],ne=le[1],oe=(0,l.useState)(null),ce=(0,t.A)(oe,2),de=ce[0],me=ce[1],he=(0,l.useState)(0),pe=(0,t.A)(he,2),ue=pe[0],xe=pe[1],ge=(0,l.useState)(!1),ve=(0,t.A)(ge,2),fe=ve[0],je=ve[1],be=(0,l.useState)(""),ye=(0,t.A)(be,2),Ne=ye[0],we=ye[1],ke=(0,l.useState)(!0),Ae=(0,t.A)(ke,2),Se=Ae[0],Ce=Ae[1],Ie=(0,l.useState)(!1),_e=(0,t.A)(Ie,2),ze=_e[0],Me=_e[1];(0,l.useEffect)(()=>{x&&(async()=>{try{var e;c.A.defaults.headers.common.Authorization="Bearer ".concat(localStorage.getItem("session"));const s=await c.A.get("".concat(d.H$,"/executive-monitoring/").concat(x,"/vip-members")),a=Array.isArray(null===(e=s.data)||void 0===e?void 0:e.data)?s.data.data:[];b(a),a.length&&!S&&q(a[0]._id)}catch(s){m.ih.error("Error","Could not load VIP members")}})()},[x]),(0,l.useEffect)(()=>{x&&J&&(async()=>{ie(!0);try{var e,s;c.A.defaults.headers.common.Authorization="Bearer ".concat(localStorage.getItem("session"));const a=(null===(e=(await c.A.get("".concat(d.H$,"/executive-monitoring/").concat(x,"/vip-member/").concat(J,"/findings"))).data)||void 0===e||null===(s=e.data)||void 0===s?void 0:s.findings)||[];Q(Array.isArray(a)?a:[])}catch(a){m.ih.error("Error","Could not load dossier findings"),Q([])}finally{ie(!1)}})()},[x,J,ue]);const Ee=j.find(e=>e._id===J),Pe=(null===Ee||void 0===Ee?void 0:Ee.name)||(Array.isArray(null===Ee||void 0===Ee?void 0:Ee.email)?Ee.email[0]:null===Ee||void 0===Ee?void 0:Ee.email)||"VIP",Fe=(0,l.useMemo)(()=>{const e=null===Ee||void 0===Ee?void 0:Ee.email;return Array.isArray(e)?e:e?[e]:[]},[Ee]),Be=(0,l.useMemo)(()=>{const e=(null===Ee||void 0===Ee?void 0:Ee.phone)||(null===Ee||void 0===Ee?void 0:Ee.phoneNumbers);return Array.isArray(e)?e:e?[e]:[]},[Ee]),De=(0,l.useMemo)(()=>{const e={accounts:[],credentials:[],stealer:[],pii:[],social:[],mentions:[]};
1return K.forEach(s=>{switch(s.type){case"account":case"email_registration":case"google_account_info":e.accounts.push(s);break;case"leaked_credential":e.credentials.push(s);break;case"stealer_log":e.stealer.push(s);break;case"pii":e.pii.push(s);break;case"social_profile":e.social.push(s);break;case"crawled_content":case"web_mention":e.mentions.push(s)}}),e},[K]),Le=(0,l.useMemo)(()=>De.accounts.filter(e=>"domain"!==(e.platform||e.source||z(e,"domain","module","name","label")||"").toString().trim().toLowerCase()),[De.accounts]),Ve=(0,l.useMemo)(()=>De.social.filter(e=>!0!==e.isLegitimate),[De.social]),We=(0,l.useMemo)(()=>De.social.filter(e=>!0===e.isLegitimate),[De.social]),Ue=(0,l.useMemo)(()=>De.mentions.filter(e=>{const s=e.data||{};return D.test("".concat(z(e,"source")||""," ").concat(z(e,"url")||""," ").concat(z(e,"kind")||""," ").concat(s.source||""))}),[De.mentions]),Te=(0,l.useMemo)(()=>De.mentions.filter(e=>!Ue.includes(e)),[De.mentions,Ue]),Re={info:0,low:1,medium:2,high:3,critical:4},He=(0,l.useMemo)(()=>{const e=new Map,s=s=>{const a=s||"Other";return e.has(a)||e.set(a,{source:a,fields:[],password:null,date:null,severity:"low",record:null}),e.get(a)},a=(e,s)=>{(Re[s]||0)>(Re[e.severity]||0)&&(e.severity=s)};return De.pii.forEach(e=>{const i="\u2014"!==M(e)?M(e):e.platform||"Other",t=s(i),l=e.piiLabel||z(e,"field","label")||"PII",r=e.piiValue||z(e,"value")||"";r&&t.fields.push({label:l,value:r}),t.date=t.date||F(e),a(t,e.severity||"low")}),[...De.credentials,...De.stealer].forEach(e=>{const i="\u2014"!==M(e)?M(e):e.platform||"Other",t=s(i),l=z(e,"password","pass");l&&(t.password=String(l)),t.date=t.date||P(e)||F(e),!t.record&&e.data&&Object.keys(e.data||{}).length&&(t.record=e.data),a(t,e.severity||(l?"high":"low"))}),[...e.values()].filter(e=>e.fields.length||e.password).sort((e,s)=>Re[s.severity]-Re[e.severity]||s.fields.length-e.fields.length)},[De]),Oe=((0,l.useMemo)(()=>He.reduce((e,s)=>e+s.fields.length+(s.password?1:0),0),[He]),(0,l.useMemo)(()=>He.find(e=>e.source===de)||null,[He,de])),$e=(0,l.useMemo)(()=>{const e=1.2*De.stealer.length+1.4*De.credentials.length+.6*De.pii.length+.3*De.accounts.length+.4*De.mentions.length;return Math.min(10,Math.round(10*e)/10)},[De]),Ge=$e>=7?"high":$e>=4?"medium":$e>0?"low":"info",Xe={high:"#e23b46",medium:"#c9781f",low:"#6b7a1f",info:"#6b7280"}[Ge],qe=(0,l.useMemo)(()=>K.map(e=>({when:I(e.scannedAt||e.createdAt||e.updatedAt),type:e.type,label:"stealer_log"===e.type?"Infostealer \u2014 ".concat(E(e)||"log"):"leaked_credential"===e.type?"Leaked credential \u2014 ".concat(E(e)||"breach"):"account"===e.type||"email_registration"===e.type?"Account \u2014 ".concat(e.platform||E(e)):"pii"===e.type?"PII exposed \u2014 ".concat(e.piiLabel||E(e)):"social_profile"===e.type?"Social profile \u2014 ".concat(e.platform||""):E(e)||e.type,c:$[e.type]||"#8b97ad"})).filter(e=>e.when).sort((e,s)=>String(s.when).localeCompare(String(e.when))).slice(0,60),[K]),Je=[{n:Le.length,l:"Accounts found",c:"#b794f6"},{n:De.credentials.length,l:"Leaked credentials",c:"#ff8089"},{n:De.stealer.length,l:"Infostealer logs",c:"#ee6fd0"},{n:De.credentials.filter(e=>z(e,"password")).length,l:"Leaked passwords",c:"#ffc46b"},{n:De.pii.length,l:"Recovery / PII",c:"#e3d24a"},{n:Ve.length,l:"Impersonation",c:"#4cd4e0"}],Ye=[{k:"overview",label:"Overview"},{k:"accounts",label:"Accounts",cnt:Le.length},{k:"stealer",label:"Infostealer",cnt:De.stealer.length},{k:"pii",label:"Exposed Data & Breaches",cnt:He.length},{k:"social",label:"Impersonation",cnt:Ve.length},{k:"darkweb",label:"Dark Web",cnt:Ue.length},{k:"footprint",label:"Digital Footprint",cnt:We.length+Le.length},{k:"mentions",label:"Media Mentions",cnt:Te.length},{k:"timeline",label:"Timeline"},{k:"graph",label:"Graph"}],Ze=e=>{const s=e.platform||e.source||z(e,"domain","module","name")||"Account";return"string"===typeof s?s.replace(/^https?:\/\//,"").replace(/\/.*$/,""):"Account"},Ke=(0,l.useMemo)(()=>{const e=new Map,s=(s,a)=>{if(!s)return;const i=String(s).toLowerCase().trim();if(!i.includes("@"))return;const t=i.split("@")[1]||"",l=B.has(t),r=a&&!l?"Corporate":"Breach / public",n="Corporate"===r?"low":"high",o=e.get(i);(!o||"Corporate"===o.source&&"Corporate"!==r)&&e.set(i,{email:i,source:r,risk:n})},a=K.filter(e=>!("social_profile"===e.type&&!0!==e.isLegitimate));
1Fe.forEach(e=>s(e,!0)),a.forEach(e=>{const a=z(e,"email");a&&s(a,!1)});const i=new Set;a.forEach(e=>{const s=z(e,"username","user","login");s&&"string"===typeof s&&s.trim()&&!s.includes("@")&&i.add(s.trim())});const t=[...We,...Le].map(e=>({platform:(e.platform||Ze(e)||"Other").toString(),url:z(e,"profileUrl","url","profile")||"",own:!0===e.isLegitimate})),l={};t.forEach(e=>{const s=e.platform||"Other";l[s]=(l[s]||0)+1});const r=Object.entries(l).sort((e,s)=>s[1]-e[1]);return{emails:[...e.values()],usernames:[...i],profiles:t,platforms:r,platMax:Math.max(1,...r.map(e=>e[1])),mentions:De.mentions.length,piiFields:De.pii.length}},[Fe,K,De.social,De.mentions,De.pii,Le]),Qe=(0,l.useMemo)(()=>{const e=new Set,s=[];return Ke.profiles.forEach(a=>{if(!a.url)return;const i=(0,C.nN)(a.platform,a.url),t=i?i.key:(a.platform||a.url).toLowerCase();e.has(t)||(e.add(t),s.push({platform:a.platform,url:a.url,branded:!!i}))}),s.sort((e,s)=>(s.branded?1:0)-(e.branded?1:0)).slice(0,12)},[Ke]),es=(0,l.useMemo)(()=>{const e=[{label:"Credentials",n:De.credentials.length,col:"#dc2626"},{label:"Infostealer",n:De.stealer.length,col:"#7c2d12"},{label:"Impersonation",n:Ve.length,col:"#b3005f"},{label:"Dark Web",n:Ue.length,col:"#5b21b6"},{label:"PII",n:De.pii.length,col:"#b08900"},{label:"Mentions",n:Te.length,col:"#453acd"},{label:"Footprint",n:We.length+Le.length,col:"#3f9153"}].filter(e=>e.n>0);return{rows:e,total:e.reduce((e,s)=>e+s.n,0)}},[De,Ve,Ue,Te,We,Le]),ss=(0,l.useMemo)(()=>{const e={critical:0,high:0,medium:0,low:0};return K.forEach(s=>{const a=(s.severity||"low").toLowerCase();null!=e[a]&&e[a]++}),{d:e,max:Math.max(1,e.critical,e.high,e.medium,e.low)}},[K]),as=(0,l.useMemo)(()=>{const e=[];return De.credentials.length&&e.push({t:"".concat(De.credentials.length," leaked credential").concat(De.credentials.length>1?"s":""),l:"Exposed passwords enable account takeover and lateral movement.",sev:"high"}),Ve.length&&e.push({t:"Executive impersonation",l:"".concat(Ve.length," look-alike profile").concat(Ve.length>1?"s":""," risking brand abuse and fraud."),sev:"high"}),De.stealer.length&&e.push({t:"".concat(De.stealer.length," infostealer log").concat(De.stealer.length>1?"s":""),l:"Malware-captured sessions and credentials can bypass MFA.",sev:"high"}),Ue.length&&e.push({t:"".concat(Ue.length," dark-web hit").concat(Ue.length>1?"s":""),l:"Exposure on forums, paste sites and markets \u2014 highest-risk surface.",sev:"high"}),He.length&&e.push({t:"".concat(He.length," breach source").concat(He.length>1?"s":""),l:"Personal data aggregated across breaches fuels targeted phishing.",sev:"medium"}),De.pii.length&&e.push({t:"".concat(De.pii.length," PII element").concat(De.pii.length>1?"s":""," exposed"),l:"Identity attributes support social-engineering and impersonation.",sev:"medium"}),e.sort((e,s)=>(Re[s.sev]||0)-(Re[e.sev]||0))},[De,Ve,Ue,He]),is=(0,l.useMemo)(()=>[...De.credentials,...De.stealer,...De.pii].map(e=>({f:e,sev:(e.severity||"medium").toLowerCase(),src:"\u2014"!==M(e)?M(e):e.platform||"source"})).sort((e,s)=>(Re[s.sev]||0)-(Re[e.sev]||0)).slice(0,8),[De]),ts=(0,l.useMemo)(()=>[...K].sort((e,s)=>(Re[s.severity||"low"]||0)-(Re[e.severity||"low"]||0)).slice(0,60).map(e=>({f:e,title:"social_profile"===e.type?"Impersonation \u2014 ".concat(e.platform||"profile"):"crawled_content"===e.type||"web_mention"===e.type?O(e):"\u2014"!==M(e)?M(e):e.platform||L[e.type]||e.type})),[K]),ls=(null===(e=ts[0])||void 0===e?void 0:e.f)||null;return(0,p.jsxs)("div",{className:"container-fluid eim-dos",children:[(0,p.jsx)("div",{className:"block-header",children:(0,p.jsxs)("div",{className:"row clearfix",children:[(0,p.jsxs)("div",{className:"col-md-8 col-sm-12",children:[(0,p.jsx)("h1",{className:"welcome-text",children:"Identity Dossier"}),(0,p.jsx)("nav",{"aria-label":"breadcrumb",className:"mt-1",children:(0,p.jsxs)("ol",{className:"breadcrumb",children:[(0,p.jsx)("li",{className:"breadcrumb-item",children:(0,p.jsx)(o.N_,{to:"/",className:"welcome-textSmall",children:"Home"})}),(0,p.jsx)("li",{className:"breadcrumb-item active welcome-textSmall",children:"Executive Monitoring"}),(0,p.jsx)("li",{className:"breadcrumb-item active welcome-textSmall",children:"Dossier"})]})})]}),(0,p.jsx)("div",{className:"col-md-4 col-sm-12 text-right",children:g?(0,p.jsxs)("button",{className:"btn btn-secondary btn-sm",onClick:h,children:[(0,p.jsx)("i",{className:"fa fa-arrow-left mr-1"})," Back to VIP Members"]}):(0,p.jsxs)("select",{className:"form-control",style:{maxWidth:280,display:"inline-block"},value:S,onChange:e=>q(e.target.value),children:[0===j.length&&(0,p.jsx)("option",{value:"",children:"No VIP members"}),j.map(e=>(0,p.jsx)("option",{value:e._id,children:e.name||(Array.isArray(e.email)?e.email[0]:e.email)||e._id},e._id))]})})]})}),(0,p.jsxs)("div",{className:"eim-id",children:[(0,p.jsx)("div",{className:"eim-avatar",children:null!==Ee&&void 0!==Ee&&Ee.imageUrlSigned?(0,p.jsx)("img",{src:Ee.imageUrlSigned,alt:Pe,onError:e=>{e.target.onerror=null,e.target.replaceWith(Object.assign(document.createElement("span"),{textContent:_(Pe)}))}}):_(Pe)}),(0,p.jsxs)("div",{className:"meta",children:[(0,p.jsx)("h2",{children:Pe}),(0,p.jsxs)("div",{className:"role",children:[(null===Ee||void 0===Ee?void 0:Ee.designation)||(null===Ee||void 0===Ee?void 0:Ee.position)||(null===Ee||void 0===Ee?void 0:Ee.role)||"Executive",null!==Ee&&void 0!==Ee&&Ee.company?" \xb7 ".concat(Ee.company):""]}),(0,p.jsxs)("div",{className:"eim-chips",children:[Fe.map(e=>(0,p.jsxs)("span",{className:"eim-chip",children:["\u2709 ",e]},e)),Be.map(e=>(0,p.jsxs)("span",{className:"eim-chip",children:["\u260e ",e]},e))]}),Qe.length>0&&(0,p.jsxs)("div",{className:"eim-fp-strip",children:[(0,p.jsx)("div",{className:"eim-fp-strip-lbl",children:"Digital footprint discovered"}),(0,p.jsx)("div",{className:"eim-fp-row",children:Qe.map((e,s)=>(0,p.jsx)(C.$I,{platform:e.platform,url:e.url},s))})]})]}),(0,p.jsxs)("div",{className:"eim-risk",children:[(0,p.jsx)("div",{className:"score",style:{color:Xe},children:$e||"\u2014"}),(0,p.jsx)("div",{className:"lbl",children:"Risk score"}),(0,p.jsx)("div",{className:"tag",style:{color:Xe,background:Xe+"22",border:"1px solid ".concat(Xe,"55")},children:"info"===Ge?"NO EXPOSURE":Ge.toUpperCase()+" EXPOSURE"})]})]}),(0,p.jsx)("div",{className:"eim-stats",children:Je.map(e=>(0,p.jsxs)("div",{className:"eim-stat",children:[(0,p.jsx)("div",{className:"dot",style:{background:e.c+"22",color:e.c},children:"\u25cf"}),(0,p.jsx)("div",{className:"n",children:e.n}),(0,p.jsx)("div",{className:"l",children:e.l})]},e.l))}),(0,p.jsx)("div",{className:"eim-tabs",children:Ye.map(e=>(0,p.jsxs)("button",{className:"eim-tab ".concat(re===e.k?"active":""),onClick:()=>ne(e.k),children:[e.label,"number"===typeof e.cnt&&(0,p.jsx)("span",{className:"cnt",children:e.cnt})]},e.k))}),ae?(0,p.jsx)("div",{className:"eim-empty",children:"Loading dossier\u2026"}):(0,p.jsxs)(p.Fragment,{children:["overview"===re&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"eim-c",style:{marginBottom:14},children:[(0,p.jsxs)("h3",{className:"eim-sec",children:["Exposure analytics ",(0,p.jsx)("span",{style:{color:"var(--d-muted)",fontWeight:400,textTransform:"none",letterSpacing:0},children:"\xb7 distribution & severity"})]}),(0,p.jsxs)("div",{className:"eim-grid eim-g2",style:{alignItems:"start"},children:[(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:18,flexWrap:"wrap"},children:[es.total>0?(()=>{const e=2*Math.PI*44;let s=0;return(0,p.jsxs)("svg",{width:"128",height:"128",viewBox:"0 0 120 120",role:"img","aria-label":"Exposure distribution",children:[es.rows.map((a,i)=>{const t=a.n/es.total*e,l=(0,p.jsx)("circle",{cx:"60",cy:"60",r:"44",fill:"none",stroke:a.col,strokeWidth:"16",strokeDasharray:"".concat(t," ").concat(e-t),strokeDashoffset:-s,transform:"rotate(-90 60 60)"},i);return s+=t,l}),(0,p.jsx)("text",{x:"60",y:"57",textAnchor:"middle",fontSize:"20",fontWeight:"800",fill:"var(--d-text)",children:es.total}),(0,p.jsx)("text",{x:"60",y:"72",textAnchor:"middle",fontSize:"8",fontWeight:"700",fill:"var(--d-muted)",children:"FINDINGS"})]})})():(0,p.jsx)("div",{className:"eim-empty",children:"No findings."}),(0,p.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:7,minWidth:150},children:es.rows.map(e=>(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:12.5},children:[(0,p.jsx)("span",{style:{width:9,height:9,borderRadius:2,background:e.col,flex:"0 0 auto"}}),(0,p.jsx)("span",{style:{flex:1,color:"var(--d-muted)"},children:e.label}),(0,p.jsx)("b",{style:{color:"var(--d-text)"},children:e.n})]},e.label))})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)("div",{className:"eim-sec",style:{marginBottom:8},children:"Findings by severity"}),["critical","high","medium","low"].map(e=>(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"5px 0"},children:[(0,p.jsx)("span",{style:{flex:"0 0 64px",textTransform:"capitalize",fontSize:12.5,color:"var(--d-muted)"},children:e}),(0,p.jsx)("div",{style:{flex:1,height:8,background:"var(--d-surface)",borderRadius:6,overflow:"hidden"},children:(0,p.jsx)("div",{style:{height:"100%",width:"".concat(Math.round(ss.d[e]/ss.max*100),"%"),background:T[e]}})}),(0,p.jsx)("b",{style:{flex:"0 0 auto",fontSize:12.5},children:ss.d[e]})]},e))]})]})]}),as.length>0&&(0,p.jsxs)("div",{className:"eim-c",style:{marginBottom:14},children:[(0,p.jsx)("h3",{className:"eim-sec",children:"Why this executive is at risk"}),as.map((e,s)=>(0,p.jsxs)("div",{style:{display:"flex",gap:11,padding:"9px 0",borderTop:s?"1px solid var(--d-border)":"none"},children:[(0,p.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",marginTop:5,flex:"0 0 auto",background:T[e.sev]}}),(0,p.jsxs)("div",{style:{flex:1},children:[(0,p.jsx)("div",{style:{fontWeight:700,color:"var(--d-text)"},children:e.t}),(0,p.jsx)("div",{style:{fontSize:12.5,color:"var(--d-muted)",marginTop:2},children:e.l})]}),(0,p.jsx)("span",{className:"eim-sev ".concat(e.sev),style:{alignSelf:"flex-start"},children:e.sev})]},s))]}),is.length>0&&(0,p.jsxs)("div",{className:"eim-c",style:{marginBottom:14},children:[(0,p.jsxs)("h3",{className:"eim-sec",children:["Active remediation ",(0,p.jsx)("span",{style:{color:"var(--d-muted)",fontWeight:400,textTransform:"none",letterSpacing:0},children:"\xb7 credential & data-exposure threats"})]}),is.map((e,s)=>{let a=e.f,i=e.sev,t=e.src;return(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"9px 0",borderTop:s?"1px solid var(--d-border)":"none"},children:[(0,p.jsx)("span",{className:"eim-sev ".concat(i),children:i}),(0,p.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,p.jsx)("div",{style:{fontWeight:700,color:"var(--d-text)"},children:L[a.type]||"Exposure"}),(0,p.jsx)("div",{style:{fontSize:12,color:"var(--d-muted)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t})]}),(0,p.jsx)("span",{style:{fontSize:11,fontWeight:800,color:"var(--d-primary)",background:"var(--d-primary-soft)",borderRadius:6,padding:"2px 7px"},children:V[i]||"P4"}),(0,p.jsx)("span",{style:{fontSize:11.5,fontWeight:700,color:"var(--d-muted)"},children:"Open"})]},s)})]}),(0,p.jsxs)("div",{className:"eim-grid eim-g2",children:[(0,p.jsxs)("div",{className:"eim-c",children:[(0,p.jsxs)("h3",{className:"eim-sec",children:["Findings ",(0,p.jsx)("span",{style:{color:"var(--d-muted)",fontWeight:400,textTransform:"none",letterSpacing:0},children:"\xb7 all categories"})]}),0===ts.length?(0,p.jsx)("div",{className:"eim-empty",children:"No findings."}):ts.map((e,s)=>{let a=e.f,i=e.title;const t=(a.severity||"low").toLowerCase(),l="social_profile"===a.type||["account","email_registration","google_account_info"].includes(a.type),r=z(a,"profileUrl","url"),n="leaked_credential"===a.type||"stealer_log"===a.type?"".concat(a.email||a.username||"credential").concat(z(a,"password")?" \xb7 password exposed":""):"social_profile"===a.type?"@".concat(a.username||Pe):"pii"===a.type?"".concat(a.piiLabel||"PII",": ").concat(a.piiValue||""):"crawled_content"===a.type||"web_mention"===a.type?z(a,"url")||"":E(a)||"",o="crawled_content"===a.type||"web_mention"===a.type,c=o?R(z(a,"url"))||"web":"\u2014"!==M(a)?M(a):a.platform||"source";return(0,p.jsxs)("div",{style:{display:"flex",gap:11,alignItems:"flex-start",padding:"11px 0",borderTop:s?"1px solid var(--d-border)":"none"},children:[(0,p.jsx)("span",{style:{width:4,alignSelf:"stretch",borderRadius:4,background:T[t],flex:"0 0 auto"}}),l&&(0,p.jsx)(C.$I,{platform:a.platform,url:r,size:28}),(0,p.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,p.jsx)("div",{style:{fontWeight:700,color:"var(--d-text)"},children:i}),n&&(o?(0,p.jsx)("a",{href:A(n),target:"_blank",rel:"noreferrer",style:{display:"block",fontSize:12.5,color:"var(--d-primary)",marginTop:2,wordBreak:"break-all"},children:n}):(0,p.jsx)("div",{style:{fontSize:12.5,color:"var(--d-muted)",marginTop:2,wordBreak:"break-word"},children:n})),(0,p.jsxs)("div",{style:{fontSize:11.5,color:"var(--d-muted)",marginTop:3},children:[c,o&&H(a)?" \xb7 Document":" \xb7 ".concat(L[a.type]||"Finding"),W(a)?" \xb7 ".concat(W(a)):""]})]}),(0,p.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:6,flex:"0 0 auto"},children:[(0,p.jsx)("span",{className:"eim-sev ".concat(t),children:t}),(0,p.jsx)("button",{className:"eim-fbtn",children:U(a)})]})]},s)})]}),(0,p.jsxs)("div",{children:[(0,p.jsxs)("div",{className:"eim-c",style:{marginBottom:14},children:[(0,p.jsx)("h3",{className:"eim-sec",children:"Active threat centre"}),ls?(0,p.jsxs)("div",{children:[(0,p.jsx)("span",{className:"eim-sev ".concat((ls.severity||"medium").toLowerCase()),children:(ls.severity||"medium").toLowerCase()}),(0,p.jsx)("div",{style:{fontWeight:700,color:"var(--d-text)",marginTop:8},children:L[ls.type]||"Exposure"}),(0,p.jsx)("div",{style:{fontSize:13,color:"var(--d-text)",marginTop:3},children:"\u2014"!==M(ls)?M(ls):ls.platform||""}),(0,p.jsxs)("div",{style:{fontSize:12.5,color:"var(--d-muted)",marginTop:2,wordBreak:"break-word"},children:[ls.email||("social_profile"===ls.type?"@".concat(ls.username||Pe):""),z(ls,"password")?" \xb7 password exposed":""]})]}):(0,p.jsx)("div",{className:"eim-empty",children:"No active threats."})]}),(0,p.jsxs)("div",{className:"eim-c",children:[(0,p.jsx)("h3",{className:"eim-sec",children:"Digital footprint"}),0===Ke.profiles.filter(e=>e.url).length?(0,p.jsx)("div",{className:"eim-empty",children:"No linked profiles."}):Ke.profiles.filter(e=>e.url).slice(0,12).map((e,s)=>(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"9px 0",borderTop:s?"1px solid var(--d-border)":"none"},children:[(0,p.jsx)(C.$I,{platform:e.platform,url:e.url,size:30}),(0,p.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,p.jsxs)("div",{style:{fontWeight:700,color:"var(--d-text)",textTransform:"capitalize",display:"flex",gap:6,alignItems:"center"},children:[e.platform,e.own&&(0,p.jsx)("span",{className:"eim-sev low",style:{fontSize:9},children:"own"})]}),(0,p.jsx)("a",{href:A(e.url),target:"_blank",rel:"noreferrer",style:{fontSize:12,color:"var(--d-primary)",wordBreak:"break-all"},children:e.url})]})]},s))]})]})]}),(0,p.jsxs)("div",{className:"eim-c",style:{marginTop:14},children:[(0,p.jsx)("h3",{className:"eim-sec",children:"Recent activity"}),(0,p.jsx)(X,{events:qe.slice(0,8)})]})]}),"accounts"===re&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("h3",{className:"eim-sec",children:"Accounts & registrations"}),(0,p.jsx)("div",{className:"eim-empty",style:{padding:"0 0 12px",textAlign:"left",color:"var(--d-muted)"},children:"Online services where this person's email is registered or has an account."}),0===Le.length?(0,p.jsx)("div",{className:"eim-empty",children:"No accounts discovered."}):(0,p.jsx)("div",{className:"eim-grid eim-g3",children:Le.map((e,s)=>{const a=k(e.platform||E(e)),i=Ze(e),t=(null===a||void 0===a?void 0:a.label)||i,l=(null===a||void 0===a?void 0:a.icon)||("string"===typeof(r=i)&&/\.[a-z]{2,}$/i.test(r.trim())?"https://www.google.com/s2/favicons?domain=".concat(encodeURIComponent(i),"&sz=64"):null);var r;return(0,p.jsxs)("div",{className:"eim-c eim-acct",children:[(0,p.jsx)("div",{className:"eim-fav",children:l?(0,p.jsx)("img",{src:l,alt:"",onError:e=>{e.target.onerror=null,e.target.replaceWith(Object.assign(document.createElement("span"),{textContent:(t[0]||"?").toUpperCase()}
1))}}):(t[0]||"?").toUpperCase()}),(0,p.jsxs)("div",{children:[(0,p.jsx)("div",{className:"nm",children:t}),(0,p.jsx)("div",{className:"src",children:"google_account_info"===e.type?"GHunt enrichment":E(e)||"registration"})]}),(0,p.jsx)("span",{className:"ok",children:"FOUND"})]},s)})})]}),"stealer"===re&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("h3",{className:"eim-sec",children:"Infostealer logs"}),0===De.stealer.length?(0,p.jsx)("div",{className:"eim-empty",children:"No infostealer logs found."}):(0,p.jsx)("div",{className:"eim-c",style:{padding:0,overflowX:"auto"},children:(0,p.jsxs)("table",{className:"eim-table",children:[(0,p.jsx)("thead",{children:(0,p.jsxs)("tr",{children:[(0,p.jsx)("th",{children:"Source"}),(0,p.jsx)("th",{children:"Resource / URL"}),(0,p.jsx)("th",{children:"Username"}),(0,p.jsx)("th",{children:"Password"}),(0,p.jsx)("th",{children:"Compromised"})]})}),(0,p.jsx)("tbody",{children:De.stealer.map((e,s)=>{const a=z(e,"password","pass"),i=e.data||{},t=z(e,"url","resource","host")||(Array.isArray(i.subdomain)?i.subdomain[0]:i.subdomain)||(Array.isArray(i.domain)?i.domain[0]:i.domain)||"\u2014";return(0,p.jsxs)("tr",{children:[(0,p.jsx)("td",{children:"\u2014"!==M(e)?M(e):z(e,"malware")||"Stealer log"}),(0,p.jsx)("td",{className:"eim-mono",children:t}),(0,p.jsx)("td",{className:"eim-mono",children:z(e,"username","user","login")||e.email||"\u2014"}),(0,p.jsx)("td",{className:"eim-mono eim-pwd",children:a?String(a):"\u2014"}),(0,p.jsx)("td",{style:{color:"var(--d-muted)"},children:I(F(e))||"\u2014"})]},s)})})]})})]}),"pii"===re&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("h3",{className:"eim-sec",children:"Exposed data & breaches"}),(0,p.jsx)("div",{className:"eim-empty",style:{padding:"0 0 12px",textAlign:"left",color:"var(--d-muted)"},children:"Personal data exposed per breach / source \u2014 click a card for full breach details."}),0===He.length?(0,p.jsx)("div",{className:"eim-empty",children:"No exposed data found."}):(0,p.jsx)("div",{className:"eim-grid eim-g3",children:He.map((e,s)=>(0,p.jsxs)("div",{className:"eim-c eim-exp ".concat(e.severity),onClick:()=>me(e.source),title:"View breach details",children:[(0,p.jsxs)("div",{className:"eim-exp-head",children:[(0,p.jsx)("span",{className:"eim-exp-src",children:e.source}),(0,p.jsx)("span",{className:"eim-sev ".concat(e.severity||"low"),children:e.severity||"low"})]}),(0,p.jsxs)("div",{className:"eim-exp-fields",children:[e.password&&(0,p.jsxs)("div",{className:"eim-exp-row",children:[(0,p.jsx)("span",{className:"k",children:"Password"}),(0,p.jsx)("span",{className:"v eim-mono eim-pwd",children:e.password})]}),e.fields.slice(0,4).map((e,s)=>(0,p.jsxs)("div",{className:"eim-exp-row",children:[(0,p.jsx)("span",{className:"k",children:e.label}),(0,p.jsx)("span",{className:"v eim-mono",children:e.value})]},s)),e.fields.length>4&&(0,p.jsxs)("div",{className:"eim-exp-more",children:["+",e.fields.length-4," more field(s)"]})]}),(0,p.jsxs)("div",{className:"eim-exp-foot",children:[(0,p.jsx)("span",{children:I(e.date)||""}),(0,p.jsx)("span",{className:"eim-exp-link",children:"View details \u2192"})]})]},s))})]}),"social"===re&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("h3",{className:"eim-sec",children:"Impersonation profiles"}),(0,p.jsxs)("div",{className:"eim-empty",style:{padding:"0 0 12px",textAlign:"left",color:"var(--d-muted)"},children:["Social-media profiles that match this executive's name/identity but are ",(0,p.jsx)("b",{children:"not"})," their verified account \u2014 the impersonation / name-collision surface, scored by the BrandSecurity fake-profile scans. Approve a profile as legitimate to move it into the Digital Footprint."]}),0===Ve.length?(0,p.jsx)("div",{className:"eim-empty",children:"No impersonation profiles found."}):(0,p.jsx)("div",{className:"eim-social-grid",children:Ve.map((e,s)=>(0,p.jsx)(G,{f:e},s))})]}),"footprint"===re&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:10,flexWrap:"wrap"},children:[(0,p.jsx)("h3",{className:"eim-sec",style:{margin:0},children:"Digital footprint discovered"}),(0,p.jsxs)("button",{className:"btn btn-primary btn-sm",onClick:()=>je(!0),disabled:!J,children:[(0,p.jsx)("i",{className:"fa fa-upload mr-1"})," Upload footprint"]})]}),(0,p.jsxs)("div",{className:"eim-empty",style:{padding:"10px 0 12px",textAlign:"left",color:"var(--d-muted)"},children:["The executive's own online identity \u2014 the emails, usernames, social profiles and accounts that make up their public presence. This is ",(0,p.jsx)("b",{children:"what they have"}),", not a threat count; impersonation, dark-web and breach exposure are tracked in their own tabs."]}),(0,p.jsx)("div",{className:"eim-stat-row",style:{display:"grid",gridTemplateColumns:"repeat(5, 1fr)",gap:10,marginBottom:14},children:[{n:Ke.emails.length,l:"Emails"},{n:Ke.usernames.length,l:"Usernames"},{n:Ke.profiles.length,l:"Own profiles"},{n:Ke.mentions,l:"Mentions"}
1,{n:Ke.piiFields,l:"PII fields"}].map(e=>(0,p.jsxs)("div",{className:"eim-c",style:{textAlign:"center",padding:"12px 8px"},children:[(0,p.jsx)("div",{style:{fontSize:22,fontWeight:800},children:e.n}),(0,p.jsx)("div",{style:{fontSize:11,color:"var(--d-muted)"},children:e.l})]},e.l))}),Ke.emails.length+Ke.usernames.length+Ke.profiles.length===0?(0,p.jsxs)("div",{className:"eim-empty",children:["No footprint identity recorded yet. Use ",(0,p.jsx)("b",{children:"Upload footprint"})," to add the executive's own accounts."]}):(0,p.jsxs)(p.Fragment,{children:[Ke.emails.length>0&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("h3",{className:"eim-sec",style:{marginTop:4},children:"Email identities"}),(0,p.jsx)("div",{className:"eim-c",style:{padding:0,overflow:"hidden"},children:(0,p.jsxs)("table",{className:"table issues-table mb-0",style:{margin:0},children:[(0,p.jsx)("thead",{children:(0,p.jsxs)("tr",{children:[(0,p.jsx)("th",{children:"Email"}),(0,p.jsx)("th",{children:"Source"}),(0,p.jsx)("th",{style:{textAlign:"right"},children:"Risk"})]})}),(0,p.jsx)("tbody",{children:Ke.emails.map(e=>(0,p.jsxs)("tr",{children:[(0,p.jsx)("td",{style:{fontFamily:"ui-monospace, Menlo, monospace",fontSize:12.5},children:e.email}),(0,p.jsx)("td",{style:{color:"var(--d-muted)"},children:e.source}),(0,p.jsx)("td",{style:{textAlign:"right"},children:(0,p.jsx)("span",{className:"eim-sev ".concat(e.risk),children:e.risk})})]},e.email))})]})})]}),Ke.usernames.length>0&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("h3",{className:"eim-sec",children:["Usernames \xb7 ",Ke.usernames.length]}),(0,p.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginBottom:6},children:Ke.usernames.map(e=>(0,p.jsx)("span",{className:"eim-sev low",style:{fontFamily:"ui-monospace, Menlo, monospace",background:"var(--d-surface)",color:"var(--d-text)"},children:e},e))})]}),(0,p.jsxs)("div",{className:"eim-grid eim-g2",style:{marginTop:6},children:[(0,p.jsxs)("div",{children:[(0,p.jsxs)("h3",{className:"eim-sec",children:["Discovered profiles \xb7 ",Ke.profiles.length," links"]}),(0,p.jsx)("div",{className:"eim-c",style:{display:"flex",flexDirection:"column",gap:0,padding:0},children:0===Ke.profiles.length?(0,p.jsx)("div",{className:"eim-empty",style:{padding:16},children:"No profiles."}):Ke.profiles.map((e,s)=>(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"10px 14px",borderTop:s?"1px solid var(--d-border)":"none"},children:[(0,p.jsx)(C.$I,{platform:e.platform,url:e.url,size:30}),(0,p.jsx)("span",{style:{fontWeight:700,textTransform:"capitalize",flex:"0 0 96px"},children:e.platform}),e.url?(0,p.jsx)("a",{href:A(e.url),target:"_blank",rel:"noreferrer",style:{fontSize:12,color:"var(--d-primary)",wordBreak:"break-all",flex:1},children:e.url}):(0,p.jsx)("span",{style:{fontSize:12,color:"var(--d-muted)",flex:1},children:"No public link"}),e.own&&(0,p.jsx)("span",{className:"eim-sev low",style:{background:"#1f9d571e",color:"#1f9d57",border:"1px solid #1f9d5755"},children:"own"})]},s))})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)("h3",{className:"eim-sec",children:"Platform distribution"}),(0,p.jsx)("div",{className:"eim-c",children:0===Ke.platforms.length?(0,p.jsx)("div",{className:"eim-empty",style:{padding:8},children:"No platforms."}):Ke.platforms.map(e=>{let s=(0,t.A)(e,2),a=s[0],i=s[1];return(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"5px 0"},children:[(0,p.jsx)("span",{style:{flex:"0 0 100px",fontSize:12.5,fontWeight:600,textTransform:"capitalize",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a}),(0,p.jsx)("div",{style:{flex:1,height:8,background:"var(--d-primary-soft)",borderRadius:6,overflow:"hidden"},children:(0,p.jsx)("div",{style:{height:"100%",width:"".concat(Math.max(8,Math.round(i/Ke.platMax*100)),"%"),background:"var(--d-primary)"}})}),(0,p.jsx)("span",{style:{flex:"0 0 auto",fontSize:12,fontWeight:700},children:i})]},a)})})]})]})]})]}),"darkweb"===re&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("h3",{className:"eim-sec",children:"Dark web"}),(0,p.jsx)("div",{className:"eim-empty",style:{padding:"0 0 12px",textAlign:"left",color:"var(--d-muted)"},children:"Mentions of this executive on forums, paste sites, stealer markets, dox pages and onion sites \u2014 the highest-risk exposure surface."}),0===Ue.length?(0,p.jsx)("div",{className:"eim-empty",children:"No dark-web mentions foun
1d."}):(0,p.jsx)("div",{className:"eim-grid eim-g2",children:Ue.map((e,s)=>{const a=z(e,"url"),i=z(e,"snippet"),t=z(e,"published");return(0,p.jsxs)("div",{className:"eim-c eim-exp critical",children:[(0,p.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"center",marginBottom:4,flexWrap:"wrap"},children:[(0,p.jsx)("span",{className:"eim-sev critical",style:{textTransform:"uppercase"},children:"Dark web"}),(0,p.jsx)("span",{style:{fontWeight:600},children:z(e,"title")||E(e)||a})]}),i&&(0,p.jsx)("div",{style:{fontSize:12.5,color:"var(--d-muted)",margin:"2px 0 6px",lineHeight:1.5},children:String(i).slice(0,220)}),(0,p.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",gap:8,flexWrap:"wrap"},children:[A(a)&&(0,p.jsx)("a",{href:A(a),target:"_blank",rel:"noreferrer",style:{fontSize:12,color:"var(--d-primary)",wordBreak:"break-all"},children:(E(e)||String(a)).slice(0,60)}),(t||e.scannedAt)&&(0,p.jsx)("span",{style:{fontSize:11.5,color:"var(--d-muted)"},children:I(t||e.scannedAt)})]})]},s)})})]}),"mentions"===re&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("h3",{className:"eim-sec",children:"Media mentions"}),(0,p.jsx)("div",{className:"eim-empty",style:{padding:"0 0 12px",textAlign:"left",color:"var(--d-muted)"},children:"News articles and web pages that mention this executive."}),0===Te.length?(0,p.jsx)("div",{className:"eim-empty",children:"No media mentions found."}):(0,p.jsx)("div",{className:"eim-grid eim-g2",children:Te.map((e,s)=>{const a=z(e,"url"),i=z(e,"kind"),t=z(e,"snippet"),l=z(e,"published"),r=(z(e,"sentiment")||"").toLowerCase(),n="negative"===r?"#e23b46":"positive"===r?"#1f9d57":"#6b7280";return(0,p.jsxs)("div",{className:"eim-c",children:[(0,p.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"center",marginBottom:4,flexWrap:"wrap"},children:[(0,p.jsx)("span",{className:"eim-sev low",style:{textTransform:"uppercase"},children:H(e)?"Document":"news"===i?"News":"Web"}),r&&(0,p.jsx)("span",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",color:n,background:n+"1e",border:"1px solid ".concat(n,"55"),borderRadius:6,padding:"1px 6px"},children:r}),(0,p.jsx)("span",{style:{fontWeight:600},children:O(e)})]}),t&&(0,p.jsx)("div",{style:{fontSize:12.5,color:"var(--d-muted)",margin:"2px 0 6px",lineHeight:1.5},children:String(t).slice(0,220)}),(0,p.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",gap:8,flexWrap:"wrap"},children:[A(a)&&(0,p.jsx)("a",{href:A(a),target:"_blank",rel:"noreferrer",style:{fontSize:12,color:"var(--d-primary)",wordBreak:"break-all"},children:R(a)||String(a).slice(0,50)}),(l||e.scannedAt)&&(0,p.jsx)("span",{style:{fontSize:11.5,color:"var(--d-muted)"},children:I(l||e.scannedAt)})]})]},s)})})]}),"timeline"===re&&(0,p.jsxs)("div",{className:"eim-c",children:[(0,p.jsx)("h3",{className:"eim-sec",children:"Exposure timeline"}),(0,p.jsx)(X,{events:qe})]}),"graph"===re&&(0,p.jsx)(y,{vipMemberId:J})]}),Oe&&(0,p.jsx)("div",{className:"eim-modal-backdrop",onClick:()=>me(null),children:(0,p.jsxs)("div",{className:"eim-modal",onClick:e=>e.stopPropagation(),children:[(0,p.jsxs)("div",{className:"eim-modal-head",children:[(0,p.jsxs)("div",{children:[(0,p.jsx)("div",{className:"eim-modal-title",children:Oe.source}),(0,p.jsxs)("div",{className:"eim-modal-sub",children:[(0,p.jsx)("span",{className:"eim-sev ".concat(Oe.severity),children:Oe.severity}),I(Oe.date)&&(0,p.jsxs)("span",{style:{marginLeft:8},children:["Compromised: ",I(Oe.date)]})]})]}),(0,p.jsx)("button",{className:"eim-modal-x",onClick:()=>me(null),children:"\xd7"})]}),(0,p.jsxs)("div",{className:"eim-modal-body",children:[Oe.password&&(0,p.jsxs)("div",{className:"eim-modal-pw",children:[(0,p.jsx)("span",{className:"k",children:"Password"}),(0,p.jsx)("span",{className:"v eim-mono eim-pwd",children:Oe.password})]}),z(Oe.record||{},"email")&&(0,p.jsxs)("div",{className:"eim-exp-row",children:[(0,p.jsx)("span",{className:"k",children:"Email"}),(0,p.jsx)("span",{className:"v eim-mono",children:Oe.record.email})]}),0!==Oe.fields.length||Oe.password?(0,p.jsx)("div",{className:"eim-modal-grid",children:Oe.fields.map((e,s)=>(0,p.jsxs)("div",{className:"eim-exp-row",children:[(0,p.jsx)("span",{className:"k",children:e.label}),(0,p.jsx)("span",{className:"v eim-mono",children:e.value})]},s))}):(0,p.jsx)("div",{className:"eim-empty",children:"No additional fields."})]})]})}),fe&&(0,p.jsx)("div",{className:"eim-modal-backdrop",onClick:()=>je(!1),children:(0,p.jsxs)("div",{className:"eim-modal",onClick:e=>e.stopPropagation(),children:[(0,p.jsxs)("div",{className:"eim-modal-head",children:[(0,p.jsxs)("div",{children:[(0,p.jsx)("div",{className:"eim-modal-title",children:"Upload digital footprint"}),(0,p.jsxs)("div",{className:"eim-modal-sub",children:["Add ",Pe,"'s public accounts \u2014 one per line"]})]}),(0,p.jsx)("button",{className:"eim-modal-x",onClick:()=>je(!1),children:"\xd7"})]}),(0,p.jsxs)("div",{className:"eim-modal-body",children:[(0,p.jsxs)("div",{style:{fontSize:12.5,color:"var(--d-muted)",marginBottom:8},children:["Format: ",(0,p.jsx)("b",{children:"platform, url"})," per line. Recorded as the executive's footprint and shown here as Verified own / Discovered."]}),(0,p.jsx)("textarea",{rows:7,value:Ne,onChange:e=>we(e.target.value),placeholder:"linkedin, https://linkedin.com/in/...\ntwitter, https://x.com/...\ngithub, https://github.com/...",style:{width:"100%",background:"var(--d-card)",color:"var(--d-text)",border:"1px solid var(--d-border)",borderRadius:8,padding:"10px 12px",fontSize:13,fontFamily:"ui-monospace, Menlo, monospace"}}),(0,p.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:8,fontSize:13,marginTop:10,color:"var(--d-text)"},children:[(0,p.jsx)("input",{type:"checkbox",checked:Se,onChange:e=>Ce(e.target.checked)}),"These are the executive's own accounts (Verified own). Uncheck to log discovered accounts."]})]}),(0,p.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,padding:"12px 16px",borderTop:"1px solid var(--d-border)"},children:[(0,p.jsx)("button",{className:"btn btn-secondary btn-sm",onClick:()=>je(!1),children:"Cancel"}),(0,p.jsx)("button",{className:"btn btn-primary btn-sm",onClick:async()=>
1{if(!x||!J)return;const e=Ne.split(/\n/).map(e=>e.trim()).filter(Boolean).map(e=>{const s=e.indexOf(",");if(-1===s)return null;const a=e.slice(0,s).trim(),i=A(e.slice(s+1));return a&&i&&!i.startsWith("/")?{platform:a,url:i,legitimate:Se}:null}).filter(Boolean);const s=Ne.split(/\n/).filter(e=>e.trim()).length,a=Math.max(0,s-e.length);if(e.length){Me(!0);try{var i,t,l,r,n;c.A.defaults.headers.common.Authorization="Bearer ".concat(localStorage.getItem("session"));const s=await c.A.post("".concat(d.H$,"/executive-monitoring/").concat(x,"/vip-member/").concat(J,"/footprint"),{entries:e}),o=null!==(i=null===(t=s.data)||void 0===t||null===(l=t.data)||void 0===l?void 0:l.inserted)&&void 0!==i?i:e.length,h=((null===(r=s.data)||void 0===r||null===(n=r.data)||void 0===n?void 0:n.skipped)||0)+a;m.ih.success("Uploaded","".concat(o," footprint record").concat(1!==o?"s":""," added").concat(h?" \xb7 ".concat(h," skipped"):"")),we(""),je(!1),xe(e=>e+1)}catch(p){var o,h;m.ih.error("Error",(null===(o=p.response)||void 0===o||null===(h=o.data)||void 0===h?void 0:h.userMessage)||"Failed to upload footprint")}finally{Me(!1)}}else m.ih.warning("Nothing to upload",s?"No valid rows. Use: platform, url \u2014 the URL must be http(s).":"Add one account per line as: platform, url")},disabled:ze,children:ze?"Uploading\u2026":"Upload"})]})]})})]})},J=["critical","high","medium","low","info"],Y={critical:{title:"Critical Attention",color:"var(--v-crit)"},high:{title:"High Risk",color:"var(--v-high)"},medium:{title:"Medium Risk",color:"var(--v-med)"},low:{title:"Low Risk",color:"var(--v-low)"},info:{title:"Monitoring \u2014 no active exposure",color:"var(--v-faint)"}},Z=e=>J.includes(e.riskLevel)?e.riskLevel:"info",K=(e,s)=>e.findingCounts&&e.findingCounts[s]||0,Q=e=>({creds:K(e,"leaked_credential"),stealer:K(e,"stealer_log"),pii:K(e,"pii"),imp:K(e,"social_profile"),footprint:K(e,"account")+K(e,"email_registration")+K(e,"google_account_info"),mentions:K(e,"crawled_content")+K(e,"web_mention")}),ee={open:{cls:"open",label:"Needs attention"},review:{cls:"review",label:"Review"},healthy:{cls:"healthy",label:"Healthy"}},se=e=>{const s=Z(e);return"critical"===s||"high"===s?"open":"medium"===s?"review":"healthy"},ae=e=>{const s=Q(e),a=s.creds+s.stealer;return a>0?"".concat(a," leaked credential").concat(a>1?"s":""):s.pii>0?"".concat(s.pii," PII exposure").concat(s.pii>1?"s":""):s.imp>0?"".concat(s.imp," impersonation match").concat(s.imp>1?"es":""):s.mentions>0?"".concat(s.mentions," media mention").concat(s.mentions>1?"s":""):s.footprint>0?"".concat(s.footprint," footprint record").concat(s.footprint>1?"s":""):"No active exposure"},ie=e=>Array.isArray(e)?e[0]:"string"===typeof e?e.split(",")[0].trim():"",te=e=>{let s=e.src,a=e.name,i=e.cls;const r=(0,l.useState)(!1),n=(0,t.A)(r,2),o=n[0],c=n[1],d=(e=>(e||"?").trim().split(/\s+/).slice(0,2).map(e=>e[0]).join("").toUpperCase()||"?")(a);return(0,p.jsx)("div",{className:i,children:s&&!o?(0,p.jsx)("img",{src:s,alt:"",referrerPolicy:"no-referrer",onError:()=>c(!0)}):d})},le=()=>{const e=(0,n.useParams)().orgId,s=(0,n.useLocation)(),a=(0,r.useSelector)(s=>{var a,i,t,l,r;return e||((null===s||void 0===s||null===(a=s.summary)||void 0===a||null===(i=a.localClient)||void 0===i?void 0:i._id)||(null===s||void 0===s||null===(t=s.summary)||void 0===t||null===(l=t.clients)||void 0===l||null===(r=l[0])||void 0===r?void 0:r._id))}),u=(0,l.useState)([]),x=(0,t.A)(u,2),g=x[0],v=x[1],f=(0,l.useState)(!1),j=(0,t.A)(f,2),b=j[0],y=j[1],N=(0,l.useState)(""),w=(0,t.A)(N,2),k=w[0],A=w[1],S=(0,l.useState)(!1),I=(0,t.A)(S,2),_=I[0],z=I[1],M=(0,l.useState)(!1),E=(0,t.A)(M,2),P=E[0],F=E[1],B=(0,l.useState)(null),D=(0,t.A)(B,2),L=D[0],V=D[1],W=(0,l.useState)({name:"",email:"",position:"",department:"",isScanNeeded:!1}),U=(0,t.A)(W,2),T=U[0],R=U[1],H=(0,l.useState)({name:"",position:"",department:"",isScanNeeded:!1}),O=(0,t.A)(H,2),$=O[0],G=O[1],X=(0,l.useState)(""),K=(0,t.A)(X,2),le=K[0],re=K[1],ne=(0,l.useState)(""),oe=(0,t.A)(ne,2),ce=oe[0],de=oe[1],me=(0,l.useState)(""),he=(0,t.A)(me,2),pe=he[0],ue=he[1],xe=(0,l.useState)(""),ge=(0,t.A)(xe,2),ve=ge[0],fe=ge[1],je=(0,l.useState)(""),be=(0,t.A)(je,2),ye=be[0],Ne=be[1],we=(0,l.useState)(""),ke=(0,t.A)(we,2),Ae=ke[0],Se=ke[1],Ce=(0,l.useState)(!1),Ie=(0,t.A)(Ce,2),_e=Ie[0],ze=Ie[1],Me=(0,l.useState)(""),Ee=(0,t.A)(Me,2),Pe=Ee[0],Fe=Ee[1],Be=(0,l.useState)("card"),De=(0,t.A)(Be,2),Le=De[0],Ve=De[1],We=(0,l.useState)(""),Ue=(0,t.A)(We,2),Te=Ue[0],Re=Ue[1],He=(0,l.useState)("all"),Oe=(0,t.A)(He,2),$e=Oe[0],Ge=Oe[1],Xe=(0,l.useState)("all"),qe=(0,t.A)(Xe,2),Je=qe[0],Ye=qe[1],Ze=(0,l.useState)("risk"),Ke=(0,t.A)(Ze,2),Qe
1=Ke[0],es=Ke[1],ss=sessionStorage.getItem("vendorName"),as=sessionStorage.getItem("vendorId"),is=async e=>{if(!a||!e)return void m.ih.error("Error","Missing organisation or VIP member identifier");const s="".concat(d.H$,"/executive-monitoring/").concat(a,"/").concat(e,"/pdf");try{var i;const e=localStorage.getItem("session"),a=await c.A.get(s,{responseType:"arraybuffer",headers:{Authorization:"Bearer ".concat(e),Accept:"application/pdf"}}),t=(null===(i=a.headers)||void 0===i?void 0:i["content-type"])||"application/pdf",l=new Blob([a.data],{type:t}),r=window.URL.createObjectURL(l);window.open(r,"_blank","noopener,noreferrer");setTimeout(()=>window.URL.revokeObjectURL(r),3e4)}catch(n){var t,l,r;if(console.error("Error fetching PDF report:",n),null!==n&&void 0!==n&&null!==(t=n.response)&&void 0!==t&&t.data)try{const e=(new TextDecoder).decode(n.response.data);return void m.ih.error("Error",e||"Failed to open PDF report")}catch(o){}const e=(null===(l=n.response)||void 0===l||null===(r=l.data)||void 0===r?void 0:r.userMessage)||"Failed to open PDF report";m.ih.error("Error",e)}},ts=async()=>{if(a){y(!0),A("");try{var e;c.A.defaults.headers.common.Authorization="Bearer ".concat(localStorage.getItem("session"));const s="".concat(d.H$,"/executive-monitoring/").concat(a,"/vip-members"),i=await c.A.get(s);v(Array.isArray(null===(e=i.data)||void 0===e?void 0:e.data)?i.data.data:[])}catch(t){var s,i;console.error("Error fetching VIP members:",t),v([]),A((null===(s=t.response)||void 0===s||null===(i=s.data)||void 0===i?void 0:i.userMessage)||"Failed to load VIP members")}finally{y(!1)}}},ls=e=>e&&e.trim()?e.split(/[,\n]/).map(e=>e.trim()).filter(e=>e.length>0):[],rs=e=>e&&e.trim()?[...new Set(e.split(/[,\n]/).map(e=>e.trim()).filter(e=>e.length>0))]:[],ns=e=>{V(e),G({name:e.name||"",position:e.position||"",department:e.department||"",isScanNeeded:!!e.isScanNeeded});const s=(a=e.email)?Array.isArray(a)?a.filter(e=>e&&e.trim()):"string"===typeof a?a.includes(",")?a.split(",").map(e=>e.trim()).filter(e=>e):[a.trim()]:[]:[];var a,i;ue(s.join("\n")),Ne((i=e.phone,i?Array.isArray(i)?i.filter(e=>e&&String(e).trim()):"string"===typeof i?i.split(",").map(e=>e.trim()).filter(Boolean):[]:[]).join("\n")),Fe(e.imageUrlSigned||""),F(!0)},os=(e,s)=>{h.default.confirm({title:"Are you sure?",content:'Do you really want to delete VIP member "'.concat(s||"this member",'"? This action cannot be undone.'),type:"red",buttons:{ok:{text:"Delete",btnClass:"btn-danger",keys:["enter"],action:async function(){try{c.A.defaults.headers.common.Authorization="Bearer ".concat(localStorage.getItem("session"));const s=await c.A.delete("".concat(d.H$,"/executive-monitoring/").concat(a,"/vip-member/").concat(e));s.data&&(m.ih.success("Success",s.data.userMessage||"VIP member deleted successfully"),ts())}catch(t){var s,i;console.error("Error deleting VIP member:",t),m.ih.error("Error",(null===(s=t.response)||void 0===s||null===(i=s.data)||void 0===i?void 0:i.userMessage)||"Failed to delete VIP member")}}},cancel:function(){}}})};(0,l.useEffect)(()=>{a&&ts()},[a]),(0,l.useEffect)(()=>{const e=new URLSearchParams(s.search).get("vip");e&&Se(e)},[s.search]);const cs={critical:0,high:0,medium:0,low:0,info:0};g.forEach(e=>{cs[Z(e)]+=1});const ds=cs.critical+cs.high+cs.medium,ms=g.reduce((e,s)=>{const a=Q(s);return e+a.creds+a.stealer},0),hs=g.reduce((e,s)=>e+Q(s).pii,0),ps=e=>{const s=Q(e),a=[],i=s.creds+s.stealer;return i&&a.push((0,p.jsxs)("span",{className:"echip dgr",children:[(0,p.jsx)("b",{children:i})," credential",i>1?"s":""]},"c")),s.pii&&a.push((0,p.jsxs)("span",{className:"echip",children:[(0,p.jsx)("b",{children:s.pii})," PII"]},"p")),s.imp&&a.push((0,p.jsxs)("span",{className:"echip dgr",children:[(0,p.jsx)("b",{children:s.imp})," impersonation"]},"i")),s.mentions&&a.push((0,p.jsxs)("span",{className:"echip",children:[(0,p.jsx)("b",{children:s.mentions})," mention",s.mentions>1?"s":""]},"m")),s.footprint&&a.push((0,p.jsxs)("span",{className:"echip",children:[(0,p.jsx)("b",{children:s.footprint})," footprint"]},"s")),a.length||a.push((0,p.jsx)("span",{className:"echip ok",children:"No active threats"},"ok")),a},us=e=>{const s=Z(e),t="critical"===s||"high"===s,l=ee[se(e)],r=e._id||e.id;return(0,p.jsxs)("div",{className:"vcard",children:[(0,p.jsx)("div",{className:"topline ".concat(s)}),(0,p.jsxs)("div",{className:"bd",children:[(0,p.jsxs)("div",{className:"vhead",children:[(0,p.jsx)(te,{src:e.imageUrlSigned,name:e.name,cls:"pic"}),(0,p.jsxs)("div",{style:{minWidth:0},children:[(0,p.jsx)("div",{className:"nm",children:e.name||ie(e.email)||"Unnamed"}),(0,p.jsx)("div",{className:"ro",children:e.position||"\u2014"}),ie(e.email)&&(0,p.jsx)("div",{className:"em",children:ie(e.email)})]})]}),(0,p.jsxs)("div",{className:"vriskbox ".concat(s),children:[(0,p.jsxs)("div",{children:[(0,p.jsxs)("div",{className:"lab",children:["info"===s?"No active":s," risk"]}),(0,p.jsxs)("div",{className:"sc",children:[e.riskScore>0?e.riskScore:"\u2014",(0,p.jsx)("small",{children:" / 100"})]})]}),(0,p.jsx)("div",{className:"rt",children:(0,p.jsx)("span",{className:"vband ".concat(s),children:"info"===s?"monitoring":s})})]}),(0,p.jsxs)("div",{className:"vdriver",children:[(0,p.jsx)("b",{children:"Primary driver:"})," ",ae(e)]}),(0,p.jsx)("div",{className:"vexp",children:ps(e)}),Array.isArray(e.impersonationPlatforms)&&e.impersonationPlatforms.length>0&&(0,p.jsxs)("div",{className:"vimp",children:[(0,p.jsx)("span",{className:"vimp-lbl",children:"Impersonated on"}),(0,p.jsx)("div",{className:"vimp-logos",children:e.impersonationPlatforms.map((e,s)=>(0,p.jsx)(C.$I,{platform:e,size:22},"".concat(e,"-").concat(s)))})]}),(0,p.jsxs)("div",{className:"vmeta",children:[(0,p.jsx)("span",{className:"vstatus ".concat(l.cls),children:l.label}),(0,p.jsxs)("button",{type:"button",className:"vscan ".concat(e.isScanNeeded?"on":"off"),disabled:le===(e._id||e.id),onClick:s=>{s.stopPropagation(),(async e=>{const s=e._id||e.id;if(!a||!s)return;const t=!e.isScanNeeded;try{re(s),c.A.defaults.headers.common.Authorization="Bearer ".concat(localStorage.getItem("session")),await c.A.put("".concat(d.H$,"/executive-monitoring/").concat(a,"/vip-member/").concat(s),{isScanNeeded:t}),v(e=>e.map(e=>(e._id||e.id)===s?(0,i.A)((0,i.A)({},e),{},{isScanNeeded:t}):e)),m.ih.success("Success","Daily scan ".concat(t?"enabled":"disabled"," for ").concat(e.name||"member"))}catch(n){var l,r;console.error("Error toggling daily scan:",n),m.ih.error("Error",(null===(l=n.response)||void 0===l||null===(r=l.data)||void 0===r?void 0:r.userMessage)||"Failed to update daily scan setting")}finally{re("")}})(e)},title:e.isScanNeeded?"In the daily scan \u2014 click to pause":"Excluded from the daily scan \u2014 click to enable",children:[(0,p.jsx)("i",{className:"fa fa-".concat(le===(e._id||e.id)?"spinner fa-spin":e.isScanNeeded?"check-circle":"circle-o")}),e.isScanNeeded?"Daily scan":"Scan off"]}),(0,p.jsx)("span",{children:e.createdAt?"Added ".concat(new Date(e.createdAt).toLocaleDateString()):"\u2014"})]})]}),(0,p.jsxs)("div",{className:"vfoot",children:[(0,p.jsxs)("button",{className:"main ".concat(t?"danger":""),onClick:()=>Se(r),children:[t?"Investigate now":"View profile"," \u2192"]}),(0,p.jsx)("button",{className:"icn",title:"View report",onClick:()=>is(r),children:(0,p.jsx)("i",{className:"fa fa-file-pdf-o"})}),(0,p.jsx)("button",{className:"icn",title:"Edit member",onClick:()=>ns(e),children:(0,p.jsx)("i",{className:"fa fa-pencil"})}),(0,p.jsx)("button",{className:"icn",title:"Delete member",onClick:()=>
1os(r,e.name),children:(0,p.jsx)("i",{className:"fa fa-trash"})})]})]},r)};return Ae?(0,p.jsx)(q,{vipMemberId:Ae,orgId:a,onBack:()=>Se("")}):(0,p.jsxs)("div",{className:"container-fluid eim-vip",children:[(0,p.jsx)("div",{className:"block-header",children:(0,p.jsx)("div",{className:"row clearfix",children:(0,p.jsxs)("div",{className:"col-md-6 col-sm-12",children:[(0,p.jsx)("h1",{className:"welcome-text",children:"VIP Members"}),(0,p.jsxs)("nav",{"aria-label":"breadcrumb",className:"mt-1",children:[(0,p.jsxs)("ol",{className:"breadcrumb",children:[(0,p.jsx)("li",{className:"breadcrumb-item",children:as?(0,p.jsx)(o.N_,{to:"/vendor",onClick:()=>sessionStorage.clear(),children:"Forest View"}):(0,p.jsx)(o.N_,{to:"/",className:"welcome-textSmall",children:"Home"})}),ss&&(0,p.jsx)("li",{className:"breadcrumb-item active","aria-current":"page",style:{color:"white"},children:ss}),(0,p.jsx)("li",{className:"breadcrumb-item active","aria-current":"page",style:{color:"white"},children:"VIP Members"})]}),(0,p.jsx)("br",{})]})]})})}
1),(0,p.jsxs)("div",{className:"vip-pagehead",children:[(0,p.jsx)("div",{children:(0,p.jsxs)("p",{className:"sub",children:[g.length," executive",1!==g.length?"s":""," monitored. Ranked by the weighted exposure model (0\u2013100): credentials, PII, footprint and negative sentiment, computed live from breach records."]})}),(0,p.jsxs)("div",{className:"vip-actions",children:[(0,p.jsxs)("button",{className:"vbtn","data-testid":"em-vip-refresh",onClick:ts,disabled:b,children:[(0,p.jsx)("i",{className:"fa fa-refresh".concat(b?" fa-spin":"")})," Refresh"]}),(0,p.jsxs)("button",{className:"vbtn pri",onClick:()=>z(!0),children:[(0,p.jsx)("i",{className:"fa fa-plus"})," Add VIP Member"]})]})]}),(0,p.jsxs)("div",{className:"vip-kpis",children:[(0,p.jsxs)("div",{className:"vip-kpi t-crit",children:[(0,p.jsx)("div",{className:"ic",children:(0,p.jsx)("i",{className:"fa fa-exclamation-triangle",style:{color:"var(--v-crit)"}})}),(0,p.jsx)("div",{className:"n",children:ds}),(0,p.jsx)("div",{className:"lab",children:"Need review"}),(0,p.jsx)("div",{className:"note",children:"scored above Low"})]}),(0,p.jsxs)("div",{className:"vip-kpi t-high",children:[(0,p.jsx)("div",{className:"ic",children:(0,p.jsx)("i",{className:"fa fa-key",style:{color:"var(--v-high)"}})}),(0,p.jsx)("div",{className:"n",children:ms}),(0,p.jsx)("div",{className:"lab",children:"Leaked credentials"}),(0,p.jsx)("div",{className:"note",children:"across all VIPs"})]}),(0,p.jsxs)("div",{className:"vip-kpi t-ind",children:[(0,p.jsx)("div",{className:"ic",children:(0,p.jsx)("i",{className:"fa fa-id-card-o",style:{color:"var(--v-primary)"}})}),(0,p.jsx)("div",{className:"n",children:hs}),(0,p.jsx)("div",{className:"lab",children:"PII exposures"}),(0,p.jsx)("div",{className:"note",children:"phone, address, DOB"})]}),(0,p.jsxs)("div",{className:"vip-kpi t-low",children:[(0,p.jsx)("div",{className:"ic",children:(0,p.jsx)("i",{className:"fa fa-check-circle",style:{color:"var(--v-low)"}})}),(0,p.jsxs)("div",{className:"n",children:[g.length,(0,p.jsxs)("span",{className:"u",children:["/",g.length]})]}),(0,p.jsx)("div",{className:"lab",children:"VIPs scored"}),(0,p.jsx)("div",{className:"note",children:"live model"})]})]}),(0,p.jsxs)("div",{className:"vsum",children:[(0,p.jsxs)("div",{className:"tot",children:[(0,p.jsx)("div",{className:"v","data-testid":"em-vip-count-total",children:g.length}),(0,p.jsxs)("div",{className:"l",children:["Executives",(0,p.jsx)("br",{}),"monitored"]})]}),(0,p.jsx)("div",{className:"sep"}),(0,p.jsxs)("span",{className:"legpill",children:[(0,p.jsx)("i",{style:{background:"var(--v-crit)"}}),(0,p.jsx)("b",{children:cs.critical}),"\xa0Critical"]}),(0,p.jsxs)("span",{className:"legpill",children:[(0,p.jsx)("i",{style:{background:"var(--v-high)"}}),(0,p.jsx)("b",{children:cs.high}),"\xa0High"]}),(0,p.jsxs)("span",{className:"legpill",children:[(0,p.jsx)("i",{style:{background:"var(--v-med)"}}),(0,p.jsx)("b",{children:cs.medium}),"\xa0Medium"]}),(0,p.jsxs)("span",{className:"legpill",children:[(0,p.jsx)("i",{style:{background:"var(--v-low)"}}),(0,p.jsx)("b",{children:cs.low+cs.info}),"\xa0Low"]}),ds>0&&(0,p.jsxs)("span",{className:"alert",children:[(0,p.jsx)("i",{className:"fa fa-exclamation-triangle"}),ds," executive",1!==ds?"s":""," require review"]})]}),(0,p.jsxs)("div",{className:"vctrls",children:[(0,p.jsxs)("div",{className:"seg",children:[(0,p.jsxs)("button",{"data-testid":"em-vip-view-card",className:"card"===Le?"on":"",onClick:()=>Ve("card"),children:[(0,p.jsx)("i",{className:"fa fa-th-large"})," Card View"]}),(0,p.jsxs)("button",{"data-testid":"em-vip-view-table",className:"table"===Le?"on":"",onClick:()=>Ve("table"),children:[(0,p.jsx)("i",{className:"fa fa-list"})," Table View"]})]}),(0,p.jsxs)("div",{className:"vfilters",children:[(0,p.jsx)("input",{"data-testid":"em-vip-search",type:"text",placeholder:"Search executive\u2026",value:Te,onChange:e=>Re(e.target.value),style:{minWidth:170}}),(0,p.jsxs)("select",{"data-testid":"em-vip-filter-risk",value:$e,onChange:e=>Ge(e.target.value),children:[(0,p.jsx)("option",{value:"all",children:"All risk"}),(0,p.jsx)("option",{value:"critical",children:"Critical"}),(0,p.jsx)("option",{value:"high",children:"High"}),(0,p.jsx)("option",{value:"medium",children:"Medium"}),(0,p.jsx)("option",{value:"low",children:"Low"})]}),(0,p.jsxs)("select",{value:Je,onChange:e=>Ye(e.target.value),children:[(0,p.jsx)("option",{value:"all",children:"All status"}),(0,p.jsx)("option",{value:"open",children:"Needs attention"}),(0,p.jsx)("option",{value:"review",children:"Review"}),(0,p.jsx)("option",{value:"healthy",children:"Healthy"})]}
1),(0,p.jsxs)("select",{value:Qe,onChange:e=>es(e.target.value),children:[(0,p.jsx)("option",{value:"risk",children:"Sort: Highest risk"}),(0,p.jsx)("option",{value:"name",children:"Sort: Name A\u2013Z"})]})]})]}),b?(0,p.jsx)("div",{className:"vipgrid",children:[0,1,2,3,4,5].map(e=>(0,p.jsx)("div",{className:"vskel"},e))}):k&&0===g.length?(0,p.jsxs)("div",{className:"vip-empty",children:[(0,p.jsx)("i",{className:"fa fa-exclamation-circle",style:{color:"var(--v-crit)"}}),(0,p.jsx)("div",{style:{fontWeight:600,marginBottom:4},children:"Couldn\u2019t load VIP members"}),(0,p.jsx)("div",{children:k}),(0,p.jsx)("button",{className:"vbtn",style:{marginTop:12},onClick:ts,children:"Retry"})]}):0===g.length?(0,p.jsxs)("div",{className:"vip-empty",children:[(0,p.jsx)("i",{className:"fa fa-users"}),(0,p.jsx)("div",{style:{fontWeight:600,marginBottom:4},children:"No VIP members yet"}),(0,p.jsx)("div",{children:"Add an executive to start monitoring their exposure."})]}):(()=>{const e=(()=>{const e=Te.trim().toLowerCase();let s=g.filter(s=>{const a="".concat(s.name||""," ").concat(s.position||""," ").concat(ie(s.email)||"").toLowerCase(),i=Z(s),t=!e||a.includes(e),l="all"===$e||i===$e||"low"===$e&&"info"===i,r="all"===Je||se(s)===Je;return t&&l&&r});return s.sort((e,s)=>"name"===Qe?(e.name||"").localeCompare(s.name||""):(s.riskScore||0)-(e.riskScore||0)||(e.name||"").localeCompare(s.name||"")),s})();return e.length?"table"===Le?(0,p.jsx)("div",{className:"vtblwrap",children:(0,p.jsx)("div",{className:"table-responsive",children:(0,p.jsxs)("table",{className:"vtbl",children:[(0,p.jsx)("thead",{children:(0,p.jsxs)("tr",{children:[(0,p.jsx)("th",{children:"Executive"}),(0,p.jsx)("th",{children:"Risk score"}),(0,p.jsx)("th",{children:"Top exposure"}),(0,p.jsx)("th",{children:"Status"}),(0,p.jsx)("th",{children:"Added"}),(0,p.jsx)("th",{})]})}),(0,p.jsx)("tbody",{children:e.map(e=>{const s=Z(e),a=ee[se(e)],i=e._id||e.id;return(0,p.jsxs)("tr",{"data-testid":"em-vip-detail-row",className:"clickrow",onClick:()=>Se(i),children:[(0,p.jsx)("td",{children:(0,p.jsxs)("div",{className:"uname",children:[(0,p.jsx)(te,{src:e.imageUrlSigned,name:e.name,cls:"vtbl-pic"}),(0,p.jsxs)("div",{children:[(0,p.jsx)("div",{className:"nm",children:e.name||ie(e.email)||"Unnamed"}),(0,p.jsx)("div",{className:"em",children:e.position||ie(e.email)||"\u2014"})]})]})}),(0,p.jsx)("td",{children:(0,p.jsxs)("div",{className:"riskcell",children:[(0,p.jsx)("span",{className:"riskdot ".concat(s)}),(0,p.jsx)("span",{style:{fontWeight:800,color:Y[s].color},children:e.riskScore>0?e.riskScore:"\u2014"}),(0,p.jsx)("span",{className:"vband ".concat(s),children:"info"===s?"monitoring":s})]})}),(0,p.jsx)("td",{style:{fontSize:12.5,color:"var(--v-muted)"},children:ae(e)}),(0,p.jsx)("td",{children:(0,p.jsx)("span",{className:"vstatus ".concat(a.cls),children:a.label})}),(0,p.jsx)("td",{style:{fontSize:12,color:"var(--v-faint)"},children:e.createdAt?new Date(e.createdAt).toLocaleDateString():"\u2014"}),(0,p.jsx)("td",{onClick:e=>e.stopPropagation(),children:(0,p.jsxs)("div",{className:"tbl-actions",children:[(0,p.jsx)("button",{className:"tbl-ic",title:"View report",onClick:()=>is(i),children:(0,p.jsx)("i",{className:"fa fa-file-pdf-o"})}),(0,p.jsx)("button",{className:"tbl-ic",title:"Edit",onClick:()=>ns(e),children:(0,p.jsx)("i",{className:"fa fa-pencil"})}),(0,p.jsx)("button",{className:"tbl-ic danger",title:"Delete",onClick:()=>
1os(i,e.name),children:(0,p.jsx)("i",{className:"fa fa-trash"})})]})})]},i)})})]})})}):"risk"===Qe?J.map(s=>{const a=e.filter(e=>Z(e)===s);return a.length?(0,p.jsxs)("div",{children:[(0,p.jsxs)("div",{className:"vgrouphead",children:[(0,p.jsx)("i",{style:{background:Y[s].color}}),Y[s].title,(0,p.jsxs)("span",{className:"c",children:["\xb7 ",a.length]})]}),(0,p.jsx)("div",{className:"vipgrid",children:a.map(us)})]},s):null}):(0,p.jsx)("div",{className:"vipgrid",children:e.map(us)}):(0,p.jsxs)("div",{className:"vip-empty",children:[(0,p.jsx)("i",{className:"fa fa-search"}),"No executives match these filters."]})})(),(0,p.jsxs)("div",{className:"note-panel",children:[(0,p.jsx)("b",{children:"Scoring model."})," Each executive is scored out of 100 by the weighted exposure formula \u2014 Credentials (recency-weighted), PII exposure, social name-collisions and negative sentiment. Bands: Critical 75+, High 50\u201374, Medium 20\u201349, Low <20. Counts read directly from active breach, credential and footprint records, so the number always matches the underlying findings."]}),_&&(0,p.jsx)("div",{className:"modal fade show",style:{display:"block"},tabIndex:"-1",children:(0,p.jsx)("div",{className:"modal-dialog",children:(0,p.jsxs)("div",{className:"modal-content",children:[(0,p.jsxs)("div",{className:"modal-header",children:[(0,p.jsx)("h5",{className:"modal-title",children:"Add New VIP Member"}),(0,p.jsx)("button",{type:"button",className:"close",onClick:()=>{z(!1),R({name:"",email:"",position:"",department:"",isScanNeeded:!1}),de(""),fe("")},children:(0,p.jsx)("span",{children:"\xd7"})})]}),(0,p.jsxs)("div",{className:"modal-body",children:[(0,p.jsxs)("div",{className:"form-group",children:[(0,p.jsx)("label",{children:"Name *"}),(0,p.jsx)("input",{type:"text",className:"form-control",value:T.name,onChange:e=>R((0,i.A)((0,i.A)({},T),{},{name:e.target.value})),placeholder:"Enter name",required:!0})]}),(0,p.jsxs)("div",{className:"form-group",children:[(0,p.jsx)("label",{children:"Email(s) *"}),(0,p.jsx)("textarea",{className:"form-control",value:ce,onChange:e=>de(e.target.value),placeholder:"Enter email addresses (comma or newline separated)",rows:4,required:!0}),(0,p.jsx)("small",{className:"form-text text-muted",children:"Enter multiple emails separated by commas or new lines"})]}),(0,p.jsxs)("div",{className:"form-group",children:[(0,p.jsx)("label",{children:"Mobile number(s)"}),(0,p.jsx)("textarea",{className:"form-control",value:ve,onChange:e=>fe(e.target.value),placeholder:"Enter mobile numbers (comma or newline separated)",rows:2}),(0,p.jsx)("small",{className:"form-text text-muted",children:"Optional \u2014 used for cross-breach checks. Include country code (e.g. +91\u2026)."})]}),(0,p.jsxs)("div",{className:"form-group",children:[(0,p.jsx)("label",{children:"Position *"}),(0,p.jsx)("input",{type:"text",className:"form-control",value:T.position,onChange:e=>R((0,i.A)((0,i.A)({},T),{},{position:e.target.value})),placeholder:"Enter position",required:!0})]}),(0,p.jsxs)("div",{className:"form-group",children:[(0,p.jsx)("label",{children:"Department"}),(0,p.jsx)("input",{type:"text",className:"form-control",value:T.department,onChange:e=>R((0,i.A)((0,i.A)({},T),{},{department:e.target.value})),placeholder:"e.g. Finance & Treasury (optional)"}),(0,p.jsx)("small",{className:"form-text text-muted",children:"Optional \u2014 powers the Risk-by-department view on the Overview."})]}),(0,p.jsxs)("div",{className:"form-group",children:[(0,p.jsxs)("div",{className:"custom-control custom-checkbox",children:[(0,p.jsx)("input",{type:"checkbox",className:"custom-control-input",id:"create-scan-needed",checked:!!T.isScanNeeded,onChange:e=>R((0,i.A)((0,i.A)({},T),{},{isScanNeeded:e.target.checked}))}),(0,p.jsx)("label",{className:"custom-control-label",htmlFor:"create-scan-needed",children:"Include in daily scan"})]}),(0,p.jsx)("small",{className:"form-text text-muted",children:"When on, this member is scanned automatically every day."})]})]}),(0,p.jsxs)("div",{className:"modal-footer",children:[(0,p.jsx)("button",{type:"button",className:"btn btn-secondary",onClick:()=>{z(!1),R({name:"",email:"",position:"",department:"",isScanNeeded:!1}),de(""),fe("")},children:"Cancel"}),(0,p.jsx)("button",{type:"button",className:"btn btn-primary",onClick:async()=>{try{const e=ls(ce);if(0===e.length)return void m.ih.error("Error","Please enter at least one email address");c.A.defaults.headers.common.Authorization="Bearer ".concat(localStorage.getItem("session"));const s=(0,i.A)((0,i.A)({},T),{}
1,{email:e,phone:rs(ve)});(await c.A.post("".concat(d.H$,"/executive-monitoring/").concat(a,"/vip-member"),s)).data&&(z(!1),R({name:"",email:"",position:"",department:"",isScanNeeded:!1}),de(""),fe(""),ts(),m.ih.success("Success","VIP member created successfully"))}catch(t){var e,s;console.error("Error creating VIP member:",t),m.ih.error("Error",(null===(e=t.response)||void 0===e||null===(s=e.data)||void 0===s?void 0:s.userMessage)||"Failed to create VIP member")}},children:"Create"})]})]})})}),_&&(0,p.jsx)("div",{className:"modal-backdrop fade show",onClick:()=>{z(!1),R({name:"",email:"",position:"",department:"",isScanNeeded:!1}),de(""),fe("")}}),P&&L&&(0,p.jsx)("div",{className:"modal fade show",style:{display:"block"},tabIndex:"-1",children:(0,p.jsx)("div",{className:"modal-dialog",children:(0,p.jsxs)("div",{className:"modal-content",children:[(0,p.jsxs)("div",{className:"modal-header",children:[(0,p.jsx)("h5",{className:"modal-title",children:"Edit VIP Member"}),(0,p.jsx)("button",{type:"button",className:"close",onClick:()=>{F(!1),V(null),G({name:"",position:"",department:"",isScanNeeded:!1}),ue(""),Fe("")},children:(0,p.jsx)("span",{children:"\xd7"})})]}),(0,p.jsxs)("div",{className:"modal-body",children:[(0,p.jsxs)("div",{className:"form-group",children:[(0,p.jsx)("label",{children:"Profile Photo"}),(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(0,p.jsx)("div",{style:{width:"64px",height:"64px",borderRadius:"50%",backgroundColor:"var(--v-surface-2)",backgroundImage:Pe?"url(".concat(Pe,")"):"none",backgroundSize:"cover",backgroundPosition:"center",border:"1px solid #ddd",flexShrink:0}}),(0,p.jsxs)("div",{style:{flex:1},children:[(0,p.jsx)("input",{type:"file",accept:"image/jpeg,image/png,image/webp,image/gif",onChange:async e=>{const s=e.target.files&&e.target.files[0];if(!s||!L)return;const t=L._id||L.id;if(!t)return;if(s.size>5242880)return m.ih.error("Error","Image must be 5 MB or smaller"),void(e.target.value="");const l=new FormData;l.append("image",s);try{var r,n;ze(!0),c.A.defaults.headers.common.Authorization="Bearer ".concat(localStorage.getItem("session"));const e=await c.A.post("".concat(d.H$,"/executive-monitoring/").concat(a,"/vip-member/").concat(t,"/image"),l,{headers:{"Content-Type":"multipart/form-data"}}),s=null===e||void 0===e||null===(r=e.data)||void 0===r||null===(n=r.data)||void 0===n?void 0:n.signedUrl;s?(Fe(s),V((0,i.A)((0,i.A)({},L),{},{imageUrl:e.data.data.imageUrl,imageUrlSigned:s})),ts(),m.ih.success("Success","Profile photo updated")):m.ih.error("Error","Upload succeeded but no URL returned")}catch(p){var o,h;console.error("Error uploading VIP image:",p),m.ih.error("Error",(null===(o=p.response)||void 0===o||null===(h=o.data)||void 0===h?void 0:h.userMessage)||"Failed to upload image")}finally{ze(!1),e.target.value=""}},disabled:_e}),(0,p.jsx)("small",{className:"form-text text-muted",children:_e?"Uploading...":"JPG / PNG / WEBP / GIF, up to 5 MB."})]})]})]}),(0,p.jsxs)("div",{className:"form-group",children:[(0,p.jsx)("label",{children:"Name *"}),(0,p.jsx)("input",{type:"text",className:"form-control",value:$.name,onChange:e=>G((0,i.A)((0,i.A)({},$),{},{name:e.target.value})),placeholder:"Enter name",required:!0})]}),(0,p.jsxs)("div",{className:"form-group",children:[(0,p.jsx)("label",{children:"Email(s) *"}),(0,p.jsx)("textarea",{className:"form-control",value:pe,onChange:e=>ue(e.target.value),placeholder:"Enter email addresses (comma or newline separated)",rows:4,required:!0}),(0,p.jsx)("small",{className:"form-text text-muted",children:"Enter all email addresses separated by commas or new lines. You can edit existing emails or add new ones."})]}),(0,p.jsxs)("div",{className:"form-group",children:[(0,p.jsx)("label",{children:"Mobile number(s)"}),(0,p.jsx)("textarea",{className:"form-control",value:ye,onChange:e=>Ne(e.target.value),placeholder:"Enter mobile numbers (comma or newline separated)",rows:2}),(0,p.jsx)("small",{className:"form-text text-muted",children:"Optional \u2014 used for cross-breach checks. Include country code (e.g. +91\u2026)."})]}),(0,p.jsxs)("div",{className:"form-group",children:[(0,p.jsx)("label",{children:"Position *"}),(0,p.jsx)("input",{type:"text",className:"form-control",value:$.position,onChange:e=>G((0,i.A)((0,i.A)({},$),{},{position:e.target.value})),placeholder:"Enter position",required:!0})]}),(0,p.jsxs)("div",{className:"form-group",children:[(0,p.jsx)("label",{children:"Department"}),(0,p.jsx)("input",{type:"text",className:"form-control",value:$.department,onChange:e=>G((0,i.A)((0,i.A)({},$),{},{department:e.target.value})),placeholder:"e.g. Finance & Treasury (optional)"}),(0,p.jsx)("small",{className:"form-text text-muted",children:"Optional \u2014 powers the Risk-by-department view on the Overview."})]}),(0,p.jsxs)("div",{className:"form-group",children:[(0,p.jsxs)("div",{className:"custom-control custom-checkbox",children:[(0,p.jsx)("input",{type:"checkbox",className:"custom-control-input",id:"edit-scan-needed",checked:!!$.isScanNeeded,onChange:e=>G((0,i.A)((0,i.A)({},$),{},{isScanNeeded:e.target.checked}))}),(0,p.jsx)("label",{className:"custom-control-label",htmlFor:"edit-scan-needed",children:"Include in daily scan"})]}),(0,p.jsx)("small",{className:"form-text text-muted",children:"When on, this member is scanned automatically every day."})]})]}),(0,p.jsxs)("div",{className:"modal-footer",children:[(0,p.jsx)("button",{type:"button",className:"btn btn-secondary",onClick:()=>{F(!1),V(null),G({name:"",position:"",department:"",isScanNeeded:!1}),ue(""),Fe("")},children:"Cancel"}),(0,p.jsx)("button",{type:"button",className:"btn btn-primary",onClick:async()=>
1{if(L)try{const e=ls(pe);if(0===e.length)return void m.ih.error("Error","Please enter at least one email address");c.A.defaults.headers.common.Authorization="Bearer ".concat(localStorage.getItem("session"));const s=L._id||L.id,i={name:$.name,email:e,phone:rs(ye),position:$.position,department:$.department||"",isScanNeeded:!!$.isScanNeeded};(await c.A.put("".concat(d.H$,"/executive-monitoring/").concat(a,"/vip-member/").concat(s),i)).data&&(F(!1),V(null),G({name:"",position:"",department:"",isScanNeeded:!1}),ue(""),Ne(""),Fe(""),ts(),m.ih.success("Success","VIP member updated successfully"))}catch(i){var e,s;console.error("Error updating VIP member:",i),m.ih.error("Error",(null===(e=i.response)||void 0===e||null===(s=e.data)||void 0===s?void 0:s.userMessage)||"Failed to update VIP member")}},children:"Update"})]})]})})}),P&&(0,p.jsx)("div",{className:"modal-backdrop fade show",onClick:()=>{F(!1),V(null),G({name:"",position:"",department:"",isScanNeeded:!1}),ue(""),Fe("")}})]})}},28692(e,s,a){a.d(s,{$I:()=>r,nN:()=>l});a(9950);var i=a(44414);const t=[{key:"linkedin",color:"#0A66C2",match:/linkedin/i,path:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"},{key:"x",color:"#0f172a",match:/(^|[^a-z])(x|twitter)($|[^a-z])|twitter\.com|x\.com/i,path:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"},{key:"facebook",color:"#1877F2",match:/facebook|fb\.com/i,path:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"},{key:"instagram",color:"#E4405F",match:/instagram|instagr\.am/i,path:"M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z"},{key:"github",color:"#181717",match:/github/i,path:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"},{key:"youtube",color:"#FF0000",match:/youtube|youtu\.be/i,path:"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"},{key:"telegram",color:"#26A5E4",match:/telegram|t\.me/i,path:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.9
162 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"},{key:"reddit",color:"#FF4500",match:/reddit/i,path:"M24 11.779c0-1.459-1.192-2.645-2.657-2.645-.715 0-1.363.286-1.84.746-1.81-1.191-4.259-1.949-6.971-2.046l1.483-4.669 4.016.941-.006.058c0 1.193.975 2.163 2.174 2.163 1.198 0 2.172-.97 2.172-2.163s-.975-2.164-2.172-2.164c-.92 0-1.704.574-2.021 1.379l-4.329-1.015a.375.375 0 0 0-.444.24l-1.661 5.229c-2.755.074-5.245.833-7.075 2.03a2.638 2.638 0 0 0-1.839-.742C1.192 9.134 0 10.32 0 11.779c0 .967.526 1.811 1.305 2.269a4.11 4.11 0 0 0-.043.567c0 2.897 3.373 5.252 7.526 5.252s7.526-2.355 7.526-5.252c0-.192-.015-.381-.042-.567.779-.458 1.305-1.303 1.305-2.269zm-17.958 1.9a1.244 1.244 0 1 1 2.488 0 1.244 1.244 0 0 1-2.488 0zm7.011 3.68c-.766.765-2.008 1.157-3.687 1.157l-.014-.005-.017.005c-1.679 0-2.921-.392-3.687-1.157a.379.379 0 0 1 .535-.536c.622.622 1.688.938 3.152.938l.017.005.014-.005c1.464 0 2.53-.316 3.152-.938a.379.379 0 0 1 .535.536zm-.665-2.436a1.244 1.244 0 1 1 0-2.488 1.244 1.244 0 0 1 0 2.488z"},{key:"pinterest",color:"#BD081C",match:/pinterest|pin\.it/i,path:"M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.663.967-2.911 2.168-2.911 1.024 0 1.518.769 1.518 1.688 0 1.029-.653 2.567-.992 3.992-.285 1.193.6 2.165 1.775 2.165 2.128 0 3.768-2.245 3.768-5.487 0-2.861-2.063-4.869-5.008-4.869-3.41 0-5.409 2.562-5.409 5.199 0 1.033.394 2.143.889 2.741.099.12.112.225.085.345-.09.375-.293 1.199-.334 1.363-.053.225-.172.271-.402.165-1.495-.69-2.433-2.878-2.433-4.646 0-3.776 2.748-7.252 7.92-7.252 4.158 0 7.392 2.967 7.392 6.923 0 4.135-2.607 7.462-6.233 7.462-1.214 0-2.354-.629-2.758-1.379l-.749 2.848c-.269 1.045-1.004 2.352-1.498 3.146 1.123.345 2.306.535 3.55.535 6.607 0 11.985-5.365 11.985-11.987C24.003 5.367 18.635.001 12.014.001z"},{key:"whatsapp",color:"#25D366",match:/whatsapp|wa\.me/i,path:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"},{key:"tiktok",color:"#000000",match:/tiktok/i,path:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"},{key:"discord",color:"#5865F2",match:/discord/i,path:"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 
10 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"},{key:"slack",color:"#4A154B",match:/slack/i,path:"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"},{key:"teams",color:"#6264A7",match:/teams|microsoft.?teams/i,path:"M19.19 6.383a3.19 3.19 0 1 0-3.19-3.19 3.19 3.19 0 0 0 3.19 3.19zm-8.13.32a3.51 3.51 0 1 0-3.51-3.51 3.51 3.51 0 0 0 3.51 3.51zm12.31 2.86h-7.06v8.16a4.66 4.66 0 0 0 4.16 4.63 3.66 3.66 0 0 0 .4.02 4.66 4.66 0 0 0 4.66-4.66V10.6a1.04 1.04 0 0 0-1.04-1.04h-1.08zm-9.36 0H1.04A1.04 1.04 0 0 0 0 10.6v7.9a1.04 1.04 0 0 0 1.04 1.04h5.34a5.2 5.2 0 0 0 5.16 4.46 4.9 4.9 0 0 0 .8-.06V10.6a1.04 1.04 0 0 0-1.04-1.04h-.05zm-1.86 3.32H8.6v5.02H7.02v-5.02H5.13v-1.44h5.26z"},{key:"google",color:"#4285F4",match:/google/i,path:"M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z"},{key:"blog",color:"#F7A81B",match:/blog|wordpress|medium/i,path:"M19.199 24C19.199 13.467 10.533 4.8 0 4.8V0c13.165 0 24 10.835 24 24h-4.801zM3.291 17.415c1.814 0 3.293 1.479 3.293 3.295 0 1.813-1.485 3.29-3.301 3.29C1.469 24 0 22.526 0 20.71s1.475-3.294 3.291-3.295zM15.909 24h-4.665c0-6.169-5.075-11.245-11.244-11.245V8.09c8.727 0 15.909 7.184 15.909 15.91z"}],l=(e,s)=>{const a="".concat(e||""," ").concat(s||"");return t.find(e=>e.match.test(a))||null},r=e=>{let s=e.platform,a=e.url,t=e.size,r=void 0===t?34:t;const n=l(s,a),o=s?"".concat(s).concat(a?" \u2014 open profile":""):"Open profile",c=n?(0,i.jsx)("svg",{width:.44*r,height:.44*r,viewBox:"0 0 24 24",fill:n.color,"aria-hidden":"true",children:(0,i.jsx)("path",{d:n.path})}):(0,i.jsx)("span",{style:{fontWeight:800,fontSize:.4*r,color:"var(--d-muted, #6b7280)",textTransform:"uppercase"},children:(s||"?").trim().charAt(0)}),d=(0,i.jsx)("span",{className:"eim-fp-logo",title:o,"aria-label":o,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",flex:"none",width:r,height:r,borderRadius:9,background:n?"".concat(n.color,"14"):"var(--d-surface, #f4f5fa)",border:"1px solid ".concat(n?"".concat(n.color,"33"):"var(--d-border, #e6e8ef)")},children:c});return a?(0,i.jsx)("a",{href:/^https?:\/\//i.test(a)?a:"https://".concat(a),target:"_blank",rel:"noopener noreferrer",style:{display:"inline-flex",textDecoration:"none"},children:d}):d}}}]);

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.