six-degrees 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +14 -14
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +2 -2
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/api/admin-delete/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/admin-update/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/bridges/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/bulk-import/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/company-scores/legacy/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/company-scores/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/connections/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/data/export/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/data/import/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/data/restart/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/data/reveal/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/data/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/delete-cluster/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ingest/route.js +1 -1
- package/.next/standalone/.next/server/app/api/ingest/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/outreach/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/scraper/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/settings/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/settings/sector-preview/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/settings/sector-suggestions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/setup-profile/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/unlock/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/update/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/update-images/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/users/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/avatars/[file]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/favicon.ico.body +0 -0
- package/.next/standalone/.next/server/app/import/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/import.html +1 -1
- package/.next/standalone/.next/server/app/import.rsc +2 -2
- package/.next/standalone/.next/server/app/import.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/import.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/import.segments/import/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +3 -3
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/launch/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/launch.html +2 -2
- package/.next/standalone/.next/server/app/launch.rsc +2 -2
- package/.next/standalone/.next/server/app/launch.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/launch.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/launch.segments/launch/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/paths/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/paths/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/paths.html +1 -1
- package/.next/standalone/.next/server/app/paths.rsc +3 -3
- package/.next/standalone/.next/server/app/paths.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/paths.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/paths.segments/paths/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/profile/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/profile/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/profile.html +1 -1
- package/.next/standalone/.next/server/app/profile.rsc +3 -3
- package/.next/standalone/.next/server/app/profile.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/profile.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/profile.segments/profile/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/queue/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/queue/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/queue.html +1 -1
- package/.next/standalone/.next/server/app/queue.rsc +3 -3
- package/.next/standalone/.next/server/app/queue.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/queue.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/queue.segments/queue/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/scores/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/scores.html +1 -1
- package/.next/standalone/.next/server/app/scores.rsc +2 -2
- package/.next/standalone/.next/server/app/scores.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/scores.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/scores.segments/scores/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings.html +1 -1
- package/.next/standalone/.next/server/app/settings.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/setup/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/setup.html +1 -1
- package/.next/standalone/.next/server/app/setup.rsc +3 -3
- package/.next/standalone/.next/server/app/setup.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/setup.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0e0fei3._.js +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__03ydxxh._.js → [root-of-the-server]__20tmem7._.js} +1 -1
- package/.next/standalone/.next/server/chunks/_1_fynia._.js +6 -6
- package/.next/standalone/.next/server/chunks/_1itd1o_._.js +1 -1
- package/.next/standalone/.next/server/chunks/_1iwkh8t._.js +1 -1
- package/.next/standalone/.next/server/chunks/_1mxn_lb._.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_db-client_15le7cw.js +21 -7
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__00d8snt._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__00g61b8._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08lf3gy._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0hg5gib._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ho-u0w._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ze473p._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1194jps._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1cnxxc9._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1ll97ry._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1m0255u._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1w9z0zv._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_15xuwkv._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1hgd5dp._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_20w06i-._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_page_1fazqbf.js +4 -4
- package/.next/standalone/.next/server/chunks/ssr/app_paths_page_1ol90m7.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_setup_page_1-282zx.js +6 -2
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/middleware-manifest.json +5 -5
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/{3e8zg6ctvvb8p.js → 049vavjsmqgmn.js} +3 -3
- package/.next/standalone/.next/static/chunks/0ljxa-wk_iu__.js +18 -0
- package/.next/standalone/.next/static/chunks/0mp9b72fm-jp6.js +6 -0
- package/.next/standalone/.next/static/chunks/1pre1cotntk6-.js +1 -0
- package/.next/standalone/.next/static/chunks/{18xu0fbgo_qz-.js → 22x2_r768-u5i.js} +1 -1
- package/.next/standalone/.next/static/chunks/2p5yt1o9tnxjn.js +2 -0
- package/.next/standalone/.next/static/chunks/3zs_6-nn0dapb.js +1 -0
- package/.next/standalone/.next/static/media/favicon.0zdzw5kurn8m-.ico +0 -0
- package/.next/standalone/CHANGELOG.md +86 -0
- package/.next/standalone/app/api/admin-delete/route.js +3 -0
- package/.next/standalone/app/api/ingest/route.js +13 -0
- package/.next/standalone/app/api/scraper/route.js +10 -2
- package/.next/standalone/app/components/ChainView.js +76 -15
- package/.next/standalone/app/components/FilterPanel.js +37 -1
- package/.next/standalone/app/components/ForceGraph.js +144 -12
- package/.next/standalone/app/components/LinkedInLimits.js +20 -3
- package/.next/standalone/app/components/OrbitGraph.js +92 -30
- package/.next/standalone/app/components/Sidebar.js +37 -0
- package/.next/standalone/app/components/views.js +7 -5
- package/.next/standalone/app/favicon.ico +0 -0
- package/.next/standalone/app/page.js +24 -7
- package/.next/standalone/app/paths/page.js +8 -1
- package/.next/standalone/db/schema.js +14 -0
- package/.next/standalone/lib/brokerage.js +94 -0
- package/.next/standalone/lib/chain-layout.js +89 -0
- package/.next/standalone/lib/circle.js +23 -4
- package/.next/standalone/lib/degrees.js +30 -0
- package/.next/standalone/lib/dot-rings.js +21 -0
- package/.next/standalone/lib/ingest.js +3 -3
- package/.next/standalone/lib/linkedin-limits.js +9 -4
- package/.next/standalone/lib/reach.js +22 -1
- package/.next/standalone/lib/search-risk.js +38 -0
- package/.next/standalone/lib/ties.js +23 -0
- package/.next/standalone/package-lock.json +2 -2
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/scripts/scrape.py +50 -12
- package/.next/static/chunks/{3e8zg6ctvvb8p.js → 049vavjsmqgmn.js} +3 -3
- package/.next/static/chunks/0ljxa-wk_iu__.js +18 -0
- package/.next/static/chunks/0mp9b72fm-jp6.js +6 -0
- package/.next/static/chunks/1pre1cotntk6-.js +1 -0
- package/.next/static/chunks/{18xu0fbgo_qz-.js → 22x2_r768-u5i.js} +1 -1
- package/.next/static/chunks/2p5yt1o9tnxjn.js +2 -0
- package/.next/static/chunks/3zs_6-nn0dapb.js +1 -0
- package/.next/static/media/favicon.0zdzw5kurn8m-.ico +0 -0
- package/CHANGELOG.md +86 -0
- package/db/schema.js +14 -0
- package/lib/brokerage.js +94 -0
- package/lib/chain-layout.js +89 -0
- package/lib/circle.js +23 -4
- package/lib/degrees.js +30 -0
- package/lib/dot-rings.js +21 -0
- package/lib/ingest.js +3 -3
- package/lib/linkedin-limits.js +9 -4
- package/lib/reach.js +22 -1
- package/lib/search-risk.js +38 -0
- package/lib/ties.js +23 -0
- package/package.json +1 -1
- package/scripts/scrape.py +50 -12
- package/.next/standalone/.next/static/chunks/0w76iraw7ij3k.js +0 -18
- package/.next/standalone/.next/static/chunks/135n87ydxjrra.js +0 -2
- package/.next/standalone/.next/static/chunks/2pnbm1z6j7xab.js +0 -1
- package/.next/standalone/.next/static/chunks/3qh78g2aqhprd.js +0 -2
- package/.next/standalone/.next/static/media/favicon.2vob68tjqpejf.ico +0 -0
- package/.next/static/chunks/0w76iraw7ij3k.js +0 -18
- package/.next/static/chunks/135n87ydxjrra.js +0 -2
- package/.next/static/chunks/2pnbm1z6j7xab.js +0 -1
- package/.next/static/chunks/3qh78g2aqhprd.js +0 -2
- package/.next/static/media/favicon.2vob68tjqpejf.ico +0 -0
- /package/.next/standalone/.next/static/{WseE_5HuU-1q0ywC9CP3U → wGVrXBkFLmEB4snfhtOcO}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{WseE_5HuU-1q0ywC9CP3U → wGVrXBkFLmEB4snfhtOcO}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{WseE_5HuU-1q0ywC9CP3U → wGVrXBkFLmEB4snfhtOcO}/_ssgManifest.js +0 -0
- /package/.next/static/{WseE_5HuU-1q0ywC9CP3U → wGVrXBkFLmEB4snfhtOcO}/_buildManifest.js +0 -0
- /package/.next/static/{WseE_5HuU-1q0ywC9CP3U → wGVrXBkFLmEB4snfhtOcO}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{WseE_5HuU-1q0ywC9CP3U → wGVrXBkFLmEB4snfhtOcO}/_ssgManifest.js +0 -0
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81694,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(18566),i=e.i(40996),o=e.i(30215),l=e.i(28867),s=e.i(86106),a=e.i(19821);e.i(47716);var d=e.i(23685),c=e.i(57161),h=e.i(48708),p=e.i(21972),p=p,g=e.i(36755),g=g,u=e.i(7394),u=u,f=u,x=e.i(43079),y=e.i(77899),m=e.i(17983),b=e.i(36534),j=e.i(23731);function v(e,t,r){var n,i,o,l=(0,j.default)(.1);function s(e){for(var l=0,s=n.length;l<s;++l){var a=n[l],d=a.x-t||1e-6,c=a.y-r||1e-6,h=Math.sqrt(d*d+c*c),p=(o[l]-h)*i[l]*e/h;a.vx+=d*p,a.vy+=c*p}}function a(){if(n){var t,r=n.length;for(i=Array(r),o=Array(r),t=0;t<r;++t)o[t]=+e(n[t],t,n),i[t]=isNaN(o[t])?0:+l(n[t],t,n)}}return"function"!=typeof e&&(e=(0,j.default)(+e)),null==t&&(t=0),null==r&&(r=0),s.initialize=function(e){n=e,a()},s.strength=function(e){return arguments.length?(l="function"==typeof e?e:(0,j.default)(+e),a(),s):l},s.radius=function(t){return arguments.length?(e="function"==typeof t?t:(0,j.default)(+t),a(),s):e},s.x=function(e){return arguments.length?(t=+e,s):t},s.y=function(e){return arguments.length?(r=+e,s):r},s}var w=e.i(91889),S=e.i(561),k=e.i(90273),z=e.i(36377);let _=e=>()=>e;function C(e,{sourceEvent:t,subject:r,target:n,identifier:i,active:o,x:l,y:s,dx:a,dy:d,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:c}})}function F(e){return!e.ctrlKey&&!e.button}function W(){return this.parentNode}function R(e,t){return null==t?{x:e.x,y:e.y}:t}function $(){return navigator.maxTouchPoints||"ontouchstart"in this}function B(){var e,t,r,n,i=F,o=W,l=R,s=$,a={},c=(0,w.dispatch)("start","drag","end"),h=0,p=0;function g(e){e.on("mousedown.drag",u).filter(s).on("touchstart.drag",y).on("touchmove.drag",m,z.nonpassive).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function u(l,s){if(!n&&i.call(this,l,s)){var a=j(this,o.call(this,l,s),l,s,"mouse");a&&((0,d.select)(l.view).on("mousemove.drag",f,z.nonpassivecapture).on("mouseup.drag",x,z.nonpassivecapture),(0,k.default)(l.view),(0,z.nopropagation)(l),r=!1,e=l.clientX,t=l.clientY,a("start",l))}}function f(n){if((0,z.default)(n),!r){var i=n.clientX-e,o=n.clientY-t;r=i*i+o*o>p}a.mouse("drag",n)}function x(e){(0,d.select)(e.view).on("mousemove.drag mouseup.drag",null),(0,k.yesdrag)(e.view,r),(0,z.default)(e),a.mouse("end",e)}function y(e,t){if(i.call(this,e,t)){var r,n,l=e.changedTouches,s=o.call(this,e,t),a=l.length;for(r=0;r<a;++r)(n=j(this,s,e,t,l[r].identifier,l[r]))&&((0,z.nopropagation)(e),n("start",e,l[r]))}}function m(e){var t,r,n=e.changedTouches,i=n.length;for(t=0;t<i;++t)(r=a[n[t].identifier])&&((0,z.default)(e),r("drag",e,n[t]))}function b(e){var t,r,i=e.changedTouches,o=i.length;for(n&&clearTimeout(n),n=setTimeout(function(){n=null},500),t=0;t<o;++t)(r=a[i[t].identifier])&&((0,z.nopropagation)(e),r("end",e,i[t]))}function j(e,t,r,n,i,o){var s,d,p,u=c.copy(),f=(0,S.pointer)(o||r,t);if(null!=(p=l.call(e,new C("beforestart",{sourceEvent:r,target:g,identifier:i,active:h,x:f[0],y:f[1],dx:0,dy:0,dispatch:u}),n)))return s=p.x-f[0]||0,d=p.y-f[1]||0,function r(o,l,c){var x,y=f;switch(o){case"start":a[i]=r,x=h++;break;case"end":delete a[i],--h;case"drag":f=(0,S.pointer)(c||l,t),x=h}u.call(o,e,new C(o,{sourceEvent:l,subject:p,target:g,identifier:i,active:x,x:f[0]+s,y:f[1]+d,dx:f[0]-y[0],dy:f[1]-y[1],dispatch:u}),n)}}return g.filter=function(e){return arguments.length?(i="function"==typeof e?e:_(!!e),g):i},g.container=function(e){return arguments.length?(o="function"==typeof e?e:_(e),g):o},g.subject=function(e){return arguments.length?(l="function"==typeof e?e:_(e),g):l},g.touchable=function(e){return arguments.length?(s="function"==typeof e?e:_(!!e),g):s},g.on=function(){var e=c.on.apply(c,arguments);return e===c?g:e},g.clickDistance=function(e){return arguments.length?(p=(e*=1)*e,g):Math.sqrt(p)},g}C.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var M=e.i(36774);function T({x:e,y:t,k:r},n,i){return{x:e+(i.width-n.width)/2,y:t+(i.height-n.height)/2,k:r}}function I(e){return String(e??"").replace(/[&<>"']/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[e])}let E="__center__";function D(){return window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1}let A=`
|
|
2
|
-
@keyframes galaxy-ring-pulse {
|
|
3
|
-
0%, 100% { opacity: 0.5; transform: scale(1); }
|
|
4
|
-
50% { opacity: 1; transform: scale(1.12); }
|
|
5
|
-
}
|
|
6
|
-
.galaxy-ring-pulse { animation: galaxy-ring-pulse 1.8s ease-in-out infinite; }
|
|
7
|
-
@media (prefers-reduced-motion: reduce) {
|
|
8
|
-
.galaxy-ring-pulse { animation: none; opacity: 0.8; }
|
|
9
|
-
}`;function L(e,t){let r=d.select(e);D()?r.interrupt("hover").attr("r",t):r.transition("hover").duration(150).ease(p.cubicOut).attr("r",t)}var g=g,f=u,u=u,O=e.i(5258);function P(e){return String(e??"").replace(/[&<>"']/g,e=>"&"===e?"&":"<"===e?"<":">"===e?">":'"'===e?""":"'")}let N=(0,r.forwardRef)(function({connections:e=[],degree2:n=[],onSelect:i,userName:o="You",userImage:a=null,selectedId:c=null,mode:h="network"},p){let j=(0,r.useRef)(null),w=(0,r.useRef)(null),S=(0,r.useRef)(null),k=(0,r.useRef)(i),z=(0,r.useRef)(c),_=(0,r.useRef)(1),C=(0,r.useRef)(null),F=(0,r.useRef)(()=>{}),W=(0,r.useRef)(()=>{}),R=(0,r.useRef)(()=>{}),[$,T]=(0,r.useState)({w:0,h:0}),I=function(){let[e,t]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=()=>t(window.innerWidth<768);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}(),E=(0,r.useMemo)(()=>`${e.length}:${n.length}:${e.map(e=>e.id).join(",")}|${n.map(e=>e.id).join(",")}`,[e,n]),D=(0,r.useRef)({connections:e,degree2:n});(0,r.useImperativeHandle)(p,()=>({focusNode:e=>R.current(e)}),[]),(0,r.useEffect)(()=>{k.current=i},[i]),(0,r.useEffect)(()=>{D.current={connections:e,degree2:n}},[e,n]),(0,r.useEffect)(()=>{let e=j.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect();T(e=>{let r=Math.round(t.width),n=Math.round(t.height);return e.w===r&&e.h===n?e:{w:r,h:n}})};t();let r=new ResizeObserver(t);return r.observe(e),window.addEventListener("resize",t),()=>{r.disconnect(),window.removeEventListener("resize",t)}},[]),(0,r.useEffect)(()=>{z.current=c,F.current(c)},[c]);let A=(0,l.default)(),L=(0,r.useRef)(A);return(0,r.useEffect)(()=>{L.current=A,W.current(A)},[A]),(0,r.useEffect)(()=>{let e=w.current;if(!e||$.w<40||$.h<40)return;let t=$.w,r=$.h,{connections:n,degree2:i}=D.current,l="degrees"===h,c=new Set(i.map(e=>e.source_connection_id).filter(Boolean)),p=l?n.filter(e=>c.has(e.id)):n,T=new Map(p.map(e=>[e.id,e])),E=i.filter(e=>e.source_connection_id&&T.has(e.source_connection_id)),A=new Set(p.map(e=>e.tier).filter(Boolean)),N=new Set(i.map(e=>e.source_connection_id).filter(Boolean)),q=new Set(N.size?p.filter(e=>N.has(e.id)).map(e=>e.id):[...p].sort((e,t)=>(Number(t.power_score)||0)-(Number(e.power_score)||0)).slice(0,14).map(e=>e.id)),H={id:"__user__",kind:"user",tier:null,r:26,targetRadius:0,connection:null,x:0,y:0,fx:0,fy:0},Y={S:0,A:0,B:0,C:0,D:0},U=[],V=new Map,X=new Map;for(let e of p){let t=e.tier||"D",r=(Y[t]=(Y[t]||0)+1,(Y[t]-1)*2.399963),n=O.TIER_RING_RADIUS[t]||O.TIER_RING_RADIUS.D,i=q.has(e.id),o={id:e.id,kind:"d1",hub:i,tier:t,r:i?7+1.1*Number(e.power_score||0):4.5,targetRadius:n,connection:e,x:Math.cos(r)*n,y:Math.sin(r)*n};U.push(o),V.set(e.id,o),X.set(e.id,r)}let G=new Map;for(let e of E){let t=e.source_connection_id,r=G.get(t);r?r.push(e):G.set(t,[e])}let K=[],J=[],Z=O.TIER_RING_RADIUS.B+70;if(l){let e=[...U].sort((e,t)=>(G.get(t.id)?.length||0)-(G.get(e.id)?.length||0)),t=Math.max(140,9*Math.max(1,e.length)),r=e=>Math.sqrt((G.get(e.id)?.length||0)+4),n=e.reduce((e,t)=>e+r(t),0)||1,i=-Math.PI/2;e.forEach(e=>{let o=r(e)/n*Math.PI*2,l=i+o/2;i+=o;let s=Math.min(.88*o,1.6);e.x=e.fx=Math.cos(l)*t,e.y=e.fy=Math.sin(l)*t,e.hub=!0,e.r=9+Math.min(10,(G.get(e.id)?.length||0)/40);let a=[...G.get(e.id)||[]].sort((e,t)=>(Number(t.power_score)||0)-(Number(e.power_score)||0)),d=0,c=t+e.r+16;for(;d<a.length;){let e=Math.max(1,Math.floor(c*s/9)),t=a.slice(d,d+e);t.forEach((e,r)=>{let n=l+(1===t.length?0:(r/(t.length-1)-.5)*s),i={id:e.id,kind:"d2",tier:e.tier||"D",r:1.8+.32*Math.min(10,Number(e.power_score)||0),connection:e,x:Math.cos(n)*c,y:Math.sin(n)*c};i.fx=i.x,i.fy=i.y,K.push(i)}),d+=t.length,c+=9}Z=Math.max(Z,c+10)})}for(let[e,t]of l?[]:G){let r=V.get(e);if(!r)continue;let n=X.get(e)??0,i=r.targetRadius,o=Math.min(.15,1.5/Math.max(1,t.length));t.forEach((e,l)=>{let s=n+(l-(t.length-1)/2)*o,a=i+46+l%3*13,d={id:e.id,kind:"d2",tier:e.tier||"D",r:3.5,targetRadius:i+60,connection:e,x:Math.cos(s)*a,y:Math.sin(s)*a};K.push(d),J.push({source:d,target:r})})}let Q=[H,...U,...K],ee=[...K,...U,H],et=(0,d.select)(e);et.selectAll("*").remove();let er=et.append("defs"),en=er.append("radialGradient").attr("id","og-user-grad");en.append("stop").attr("offset","0%").attr("stop-color","#f8fafc"),en.append("stop").attr("offset","55%").attr("stop-color","#c7d2fe"),en.append("stop").attr("offset","100%").attr("stop-color","#818cf8"),er.append("filter").attr("id","og-blur").attr("x","-75%").attr("y","-75%").attr("width","250%").attr("height","250%").append("feGaussianBlur").attr("stdDeviation",6);let ei=et.append("g").attr("class","viewport"),eo=ei.append("g"),el=ei.append("g"),es=ei.append("g"),ea=ei.append("g"),ed=U.filter(e=>e.hub),ec=el.selectAll("line").data(ed,e=>e.id).join("line").attr("stroke",e=>O.TIER_COLORS[e.tier]||O.TIER_COLORS.D).attr("stroke-opacity",.09).attr("stroke-width",.5);if(l&&U.length){let e=Math.hypot(U[0].x,U[0].y);eo.append("circle").attr("r",e).attr("fill","none").attr("stroke","#FF6B35").attr("stroke-opacity",.18).attr("stroke-width",1).attr("stroke-dasharray","3 7")}for(let e of l?[]:O.TIER_ORDER)A.has(e)&&eo.append("circle").attr("r",O.TIER_RING_RADIUS[e]).attr("fill","none").attr("stroke",O.TIER_COLORS[e]).attr("stroke-opacity",.14).attr("stroke-width",1).attr("stroke-dasharray","3 7");let eh=es.selectAll("line").data(J).join("line").attr("stroke","rgba(255,255,255,0.08)").attr("stroke-width",1),ep=ea.selectAll("g").data(ee,e=>e.id).join("g").attr("cursor","pointer");ep.each(function(e){let t=(0,d.select)(this);if("d2"===e.kind){t.attr("opacity",l?.85:.55),t.append("circle").attr("class","og-base").attr("r",e.r).attr("fill",O.TIER_COLORS[e.tier]||O.TIER_COLORS.D);return}let r="user"===e.kind,n=e.connection,i=r?"#818cf8":O.TIER_COLORS[e.tier]||O.TIER_COLORS.D;if(!r&&!e.hub){t.attr("opacity",.75),t.append("circle").attr("class","og-base").attr("r",e.r).attr("fill",i);return}(r||"S"===e.tier||"A"===e.tier)&&t.append("circle").attr("r",1.8*e.r).attr("fill",i).attr("opacity",.25).attr("filter","url(#og-blur)"),n&&n.is_catalyst&&(t.append("circle").attr("r",e.r+3).attr("fill","none").attr("stroke",O.TIER_COLORS.S).attr("stroke-width",1).attr("stroke-opacity",.9),t.append("text").text("⚡").attr("x",.85*e.r).attr("y",-(.7*e.r)).attr("font-size",9).attr("text-anchor","middle").style("pointer-events","none")),t.append("circle").attr("class","og-base").attr("r",e.r).attr("fill",r?"url(#og-user-grad)":i);let s=r?o:n?.name??"";t.append("text").attr("class","og-initials").text((0,O.initialsFor)(s)).attr("text-anchor","middle").attr("dy","0.35em").attr("font-size",.8*e.r).attr("font-weight",700).attr("fill","#0b0b16").style("pointer-events","none");let c=(0,M.localPhoto)(r?a:n?.profile_image_url);if(c){let r=`og-clip-${String(e.id).replace(/[^a-zA-Z0-9_-]/g,"_")}`;er.append("clipPath").attr("id",r).append("circle").attr("r",e.r),t.append("image").attr("href",c).attr("x",-e.r).attr("y",-e.r).attr("width",2*e.r).attr("height",2*e.r).attr("clip-path",`url(#${r})`).attr("preserveAspectRatio","xMidYMid slice").on("error",function(){(0,d.select)(this).remove()})}t.append("circle").attr("class","og-sel").attr("r",e.r+5).attr("fill","none").attr("stroke","#ffffff").attr("stroke-width",1.5).style("opacity",0),r?t.append("text").text(o).attr("y",e.r+18).attr("text-anchor","middle").attr("font-size",12).attr("font-weight",600).attr("fill","#e2e8f0").attr("paint-order","stroke").attr("stroke","rgba(5,5,16,0.85)").attr("stroke-width",3).style("pointer-events","none"):t.append("text").attr("class","og-label").text(n?.name??"").attr("y",e.r+13).attr("text-anchor","middle").attr("font-size",10).attr("fill","#cbd5e1").attr("paint-order","stroke").attr("stroke","rgba(5,5,16,0.8)").attr("stroke-width",3).style("pointer-events","none").style("opacity",0).style("transition","opacity 160ms ease")});let eg=ep.select("text.og-label"),eu=null,ef=()=>{eg.style("opacity",e=>+(!0===e.hub||_.current>1.1||e.id===eu||e.id===z.current))};ep.on("click",(e,t)=>{e.defaultPrevented||(e.stopPropagation(),k.current?.(t.connection))}),et.on("click",()=>k.current?.(null));let ex=S.current,ey=e=>{let t=j.current;if(!ex||!t)return;let r=t.getBoundingClientRect();ex.style.left=`${Math.min(e.clientX-r.left+14,r.width-190)}px`,ex.style.top=`${Math.max(e.clientY-r.top-8,8)}px`};I||ep.on("mouseenter",(e,t)=>{eu=t.id,ef(),((e,t)=>{if(!ex||!t.connection)return;let r=t.connection,n=[r.role||r.headline,r.company].filter(Boolean).map(String);ex.innerHTML=`<div style="font-weight:600;color:#f1f5f9">${P(r.name)}</div>`+(n.length?`<div style="color:#94a3b8;margin-top:1px">${P(n.join(" · "))}</div>`:"")+`<div style="margin-top:3px;color:${O.TIER_COLORS[r.tier]||O.TIER_COLORS.D}">`+`${P(r.tier||"?")} \xb7 power ${Number(r.power_score||0).toFixed(1)}`+`${r.is_catalyst?" · ⚡ catalyst":""}</div>`,ex.style.opacity="1",ey(e)})(e,t)}).on("mousemove",e=>ey(e)).on("mouseleave",()=>{eu=null,ef(),ex&&(ex.style.opacity="0")});let em=()=>{eh.attr("x1",e=>e.source.x??0).attr("y1",e=>e.source.y??0).attr("x2",e=>e.target.x??0).attr("y2",e=>e.target.y??0),ec.attr("x1",0).attr("y1",0).attr("x2",e=>e.x??0).attr("y2",e=>e.y??0),ep.attr("transform",e=>`translate(${e.x??0},${e.y??0})`)},eb=null;if(I||l)em();else{let e=(0,x.forceSimulation)(Q).force("radial",v(e=>e.targetRadius,0,0).strength(e=>.9*("d1"===e.kind))).force("collide",(0,b.forceCollide)(e=>e.r+2.5)).force("charge",(0,m.forceManyBody)().strength(-18)).on("tick",em);J.length>0&&e.force("link",(0,y.forceLink)(J).distance(26).strength(.7)),eb=e,em();let t=B().on("start",(t,r)=>{t.active||e.alphaTarget(.3).restart(),r.fx=r.x,r.fy=r.y}).on("drag",(e,t)=>{t.fx=e.x,t.fy=e.y}).on("end",(t,r)=>{t.active||e.alphaTarget(0),(r.connection?.circle_power===null||r.connection?.circle_power===void 0)&&(r.fx=null,r.fy=null)});ep.filter(e=>"d1"===e.kind).call(t),ep.on("dblclick",(t,r)=>{"d1"===r.kind&&(t.stopPropagation(),r.fx=null,r.fy=null,e.alphaTarget(.2).restart(),window.setTimeout(()=>e.alphaTarget(0),400))})}let ej=(0,g.default)().scaleExtent([.15,3]).on("zoom",e=>{ei.attr("transform",e.transform.toString()),e.sourceEvent&&(C.current=e.transform),e.transform.k!==_.current&&(_.current=e.transform.k,ef())});et.call(ej).on("dblclick.zoom",null);let ev=Math.max(.15,Math.min(3,Math.min(t,r)/(2*Z))),ew=C.current??f.identity.translate(t/2,r/2).scale(ev);et.call(ej.transform,ew),F.current=e=>{ea.selectAll("circle.og-sel-temp").remove(),ep.select("circle.og-sel").style("opacity",t=>+(t.id===e)),ep.select("circle.og-base").attr("r",t=>t.id===e&&"user"!==t.kind?t.r+1.5:t.r),e&&ep.filter(t=>t.id===e&&!t.hub&&"user"!==t.kind).append("circle").attr("class","og-sel-temp").attr("r",e=>e.r+3).attr("fill","none").attr("stroke","#ffffff").attr("stroke-width",1.2),ef()},F.current(z.current),W.current=e=>{ea.selectAll("circle.og-asked").remove(),ep.filter(t=>"d2"===t.kind&&(0,s.hasRequest)(t.connection,e)).append("circle").attr("class","og-asked").attr("r",e=>e.r+2.2).attr("fill","none").attr("stroke","#FFD700").attr("stroke-width",1).attr("stroke-dasharray","2 1.6").style("pointer-events","none")},W.current(L.current);let eS=new Map(ee.map(e=>[e.id,e]));return R.current=n=>{let i=eS.get(n);if(!i)return;let o=i.x??0,l=i.y??0,s=(0,u.default)(e),a=f.identity.translate(t/2,r/2).scale(2.5).translate(-o,-l),d=performance.now(),c=e=>{let t=Math.min(1,(e-d)/650),r=1-Math.pow(1-t,3);ej.transform(et,f.identity.translate(s.x+(a.x-s.x)*r,s.y+(a.y-s.y)*r).scale(s.k+(a.k-s.k)*r)),t<1&&requestAnimationFrame(c)};requestAnimationFrame(c),window.setTimeout(()=>ej.transform(et,a),730),k.current?.(i.connection),z.current=n,F.current(n);let h=ea.append("circle").attr("cx",o).attr("cy",l).attr("r",i.r+2).attr("fill","none").attr("stroke","#ffffff").attr("stroke-width",2).attr("opacity",.9),p=performance.now(),g=e=>{let t=Math.min(1,(e-p)/700);h.attr("r",i.r+2+26*t).attr("opacity",.9*(1-t)),t<1?requestAnimationFrame(g):h.remove()};requestAnimationFrame(g),window.setTimeout(()=>h.remove(),800)},()=>{eb?.stop(),F.current=()=>{},W.current=()=>{},R.current=()=>{},et.on(".zoom",null),et.on("click",null),et.selectAll("*").remove()}},[E,o,a,I,$,h]),(0,t.jsxs)("div",{ref:j,style:{position:"relative",flex:1,minHeight:0,width:"100%"},children:[(0,t.jsx)("svg",{ref:w,style:{display:"block",height:"100%",width:"100%",touchAction:"none",userSelect:"none"},role:"img","aria-label":"Your network as an orbital galaxy — closer orbits are higher-leverage tiers"}),(0,t.jsx)("div",{ref:S,"aria-hidden":!0,style:{position:"absolute",zIndex:20,maxWidth:190,pointerEvents:"none",padding:"6px 10px",fontSize:11.5,lineHeight:1.45,borderRadius:8,background:"rgba(10,10,26,0.92)",border:"1px solid rgba(255,255,255,0.12)",backdropFilter:"blur(8px)",opacity:0,transition:"opacity 150ms ease",left:0,top:0}})]})});var q=e.i(22016),H=e.i(7214);let Y=e=>e?.unlock_status==="pending";function U(e=[],t=[]){let r=new Map;for(let e of t||[]){let t=e?.source_connection_id;if(null==t)continue;let n=r.get(t);n||r.set(t,n=[]),n.push(e)}let n=new Map;for(let t of e||[]){let e=t?.unlocked_from_bridge_id;if(null==e||1!==t.degree)continue;let r=n.get(e);r||n.set(e,r=[]),r.push(t)}return{circles:r,introduced:n}}let V={connected:0,requested:1},X=(e,t)=>(V[e.state]??2)-(V[t.state]??2)||(0,H.score1)(t.row)-(0,H.score1)(e.row)||String(e.row.name||"").localeCompare(String(t.row.name||"")),G=(e,t,r)=>Math.min(r,Math.max(t,e));var K=e.i(48235);let J=2*Math.PI;function Z(e,t,r){if(e<=0)return 1;let n=r*e;return Math.max(1,r>=J-1e-9?Math.floor(n/t):Math.floor(n/t)+1)}function Q(e,t,r,n){let i=[],o=0;for(let l=t;o<e;l+=r)i.push(l),o+=Z(l,r,n);return i}let ee=(e,t,r,n)=>{let i=Q(e,t,r,n);return i[i.length-1]};function et(e,{inner:t,outer:r,spacing:n,minSpacing:i=n/3,innerMin:o=t,start:l=-Math.PI/2,sweep:s=J}={}){let a=Math.max(0,Math.floor(e)||0);if(!a)return{spacing:n,inner:t,rings:[],points:[]};let d=n,c=t;if(ee(a,c,d,s)>r)if(ee(a,o,d,s)<=r){let e=o,n=t;for(let t=0;t<24;t++){let t=(e+n)/2;ee(a,t,d,s)<=r?e=t:n=t}c=e}else{let e=i,t=n;if(ee(a,c=o,e,s)<=r)for(let n=0;n<24;n++){let n=(e+t)/2;ee(a,c,n,s)<=r?e=n:t=n}d=e}let h=Q(a,c,d,s),p=h.map(e=>Z(e,d,s)),g=p.reduce((e,t)=>e+t,0),u=p.map(e=>Math.min(e,Math.floor(a*e/g))),f=a-u.reduce((e,t)=>e+t,0);for(;f>0;){let e=-1;for(let t=0;t<p.length;t++)u[t]<p[t]&&(e<0||p[t]-u[t]>p[e]-u[e])&&(e=t);u[e]++,f--}let x=s>=J-1e-9,y=[],m=[];return h.forEach((e,t)=>{let r=u[t];if(!r)return;m.push({radius:e,count:r});let n=x?J/r:r>1?s/(r-1):0,i=x?l+(t%2?n/2:0):r>1?l:l+s/2,o=x?null:function(e){let t=Math.floor((e-1)/2),r=t+1,n=[t--];for(;n.length<e;)r<e&&n.push(r++),n.length<e&&t>=0&&n.push(t--);return n}(r);for(let t=0;t<r;t++){let r=i+(o?o[t]:t)*n;y.push({x:e*Math.cos(r),y:e*Math.sin(r),angle:r,ring:m.length-1})}}),{spacing:d,inner:c,rings:m,points:y}}function er(e,t){return Math.max(1.4,Math.min(7,.42*e*("S"===t?1:"A"===t?.86:"B"===t?.72:.6)))}let en={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},ei={1:"#FFD700",2:"#FF6B35",3:"#3498DB",4:"#9B59B6",5:"#00ff88",6:"#ff5050"},eo={S:0,A:1,B:2,C:3,D:4},el="#00ff88",es="#5a5a66",ea=(e,t)=>(eo[e.tier]??9)-(eo[t.tier]??9)||(0,H.score)(t)-(0,H.score)(e)||String(e.name||"").localeCompare(String(t.name||"")),ed=e=>String(e?.name||"").trim().split(/\s+/)[0]||"them",ec=e=>`/setup?scan=${encodeURIComponent(e.id)}`,eh=e=>`${e}${e%10==1&&11!==e?"st":e%10==2&&12!==e?"nd":e%10==3&&13!==e?"rd":"th"}`,ep=()=>{let e=(0,i.scannerNow)();return e.running&&(0,i.isCircleScan)(e)?e.target?.id??null:null},eg=()=>null,eu=()=>()=>{},ef="(prefers-reduced-motion: reduce)";function ex(e){let t=window.matchMedia?window.matchMedia(ef):null;return t?.addEventListener?.("change",e),()=>t?.removeEventListener?.("change",e)}let ey=()=>!!window.matchMedia?.(ef).matches,em=()=>!0;function eb(e,t){let r=new Set([(0,H.keyFor)(e)]),n=e=>{let t=[];for(let n of e||[]){let e=(0,H.keyFor)(n);r.has(e)||(r.add(e),t.push(n))}return t.sort(ea)};return[...n(t.introduced.get(e.id)),...n(t.circles.get(e.id))]}function ej({bridge:e,members:r,reach:n,cx:i,cy:o,maxR:l,still:s}){let a=r.filter(e=>1===e.degree||"S"===e.tier||"A"===e.tier||"B"===e.tier),d=.66*l,c=Math.min(.9*Math.PI,Math.max(.2*Math.PI,11*a.length/(.75*l))),h=et(a.length,{inner:d,outer:.8*l,spacing:11,minSpacing:3.5,start:e.angle-c/2,sweep:c});return(0,t.jsxs)("g",{children:[(0,t.jsx)("circle",{cx:i,cy:o,r:d,fill:"none",stroke:`${ei[2]}06`,strokeWidth:1}),a.map((r,l)=>{let d=h.points[l],c=i+d.x,p=o+d.y,g=(0,K.reachState)(r,n),u=Math.min(er(h.spacing,r.tier),5)*(g?1.3:1),f="hidden"===g?es:en[r.tier]||"#555";return(0,t.jsxs)("g",{children:[(g||a.length<=40)&&(0,t.jsx)("line",{x1:e.x,y1:e.y,x2:c,y2:p,stroke:g?el:f,strokeWidth:.5,strokeOpacity:g?.35:.15}),"ready"===g&&(0,t.jsx)(ev,{x:c,y:p,r:2.3*u,still:s}),(0,t.jsx)("circle",{cx:c,cy:p,r:u,fill:f,fillOpacity:g?.95:.45,stroke:g&&"hidden"!==g?el:f,strokeWidth:g?1:.5,strokeOpacity:g?1:.25}),("S"===r.tier||g)&&a.length<=60&&(0,t.jsx)("text",{x:c,y:p+u+9,textAnchor:"middle",fill:g&&"hidden"!==g?el:"#aaa",fontSize:7,children:ed(r)})]},"pv-"+r.id)})]})}function ev({x:e,y:r,r:n,still:i}){return(0,t.jsxs)("circle",{cx:e,cy:r,r:n,fill:el,fillOpacity:.16,stroke:el,strokeWidth:.8,strokeOpacity:.45,pointerEvents:"none",children:[!i&&(0,t.jsx)("animate",{attributeName:"fill-opacity",values:"0.06;0.24;0.06",dur:"2.8s",repeatCount:"indefinite"}),!i&&(0,t.jsx)("animate",{attributeName:"stroke-opacity",values:"0.25;0.7;0.25",dur:"2.8s",repeatCount:"indefinite"})]})}function ew({x:e,y:r,s:n}){return(0,t.jsxs)("g",{transform:`translate(${e} ${r}) scale(${n})`,pointerEvents:"none",children:[(0,t.jsx)("path",{d:"M-1.9 -0.6 V-1.8 A1.9 1.9 0 0 1 1.9 -1.8 V-0.6",fill:"none",stroke:"#d6d6de",strokeWidth:.9}),(0,t.jsx)("rect",{x:-2.6,y:-.7,width:5.2,height:3.9,rx:.8,fill:"#d6d6de"})]})}function eS({onIn:e,onReset:r,onOut:n}){let i=e=>({width:32,height:32,borderRadius:"50%",border:"none",cursor:"pointer",background:e?"rgba(255,255,255,0.06)":"rgba(255,255,255,0.1)",color:e?"#666":"#fff",fontSize:e?10:18,fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(8px)"});return(0,t.jsxs)("div",{style:{position:"absolute",bottom:64,right:20,zIndex:20,display:"flex",flexDirection:"column",gap:4},children:[(0,t.jsx)("button",{type:"button",onClick:e,"aria-label":"Zoom in",style:i(!1),children:"+"}),(0,t.jsx)("button",{type:"button",onClick:r,"aria-label":"Fit to the window",style:i(!0),children:"⊙"}),(0,t.jsx)("button",{type:"button",onClick:n,"aria-label":"Zoom out",style:i(!1),children:"−"})]})}function ek({trail:e,index:i,reach:o,dims:l,requests:a,scanningId:d,still:c,canScan:h,onOpen:p,onBack:g,onSelect:u}){var f,x,y,m,b;let j,v,w,S=e[e.length-1],k=e.length,z=(0,r.useMemo)(()=>eb(S,i),[S,i]),[_,C]=(0,r.useState)(null),[F,W]=(0,r.useState)({k:1,x:0,y:0}),R=(0,r.useRef)(null),$=(0,r.useRef)(null),B=(0,n.useRouter)(),T=l.w/2,I=l.h/2,E=Math.min(T,I)-30,D=(0,r.useMemo)(()=>et(z.length,{inner:.55*E,innerMin:62,outer:.94*E,spacing:Math.max(14,Math.min(24,.085*E)),minSpacing:4}),[z.length,E]),A=(0,r.useMemo)(()=>z.map(e=>{let t=(0,K.reachState)(e,o);return{reached:t,requested:!t&&2===e.degree&&(0,s.hasRequest)(e,a),own:1===e.degree?(i.circles.get(e.id)?.length||0)+(i.introduced.get(e.id)?.length||0):0}}),[z,o,a,i]),L=e=>h&&"ready"===A[e].reached&&z[e].id!==d,O=F.k,P=(0,r.useMemo)(()=>{let e=z.length<=60,r=D.spacing*O>=26;return z.map((n,i)=>{let o=D.points[i],l=A[i],s=er(D.spacing,n.tier)*(l.reached?1.4:1),a="hidden"===l.reached?es:en[n.tier]||"#555";return(0,t.jsxs)("g",{children:[(e||l.reached)&&(0,t.jsx)("line",{x1:0,y1:0,x2:o.x,y2:o.y,stroke:l.reached?el:a,strokeWidth:.6/O,strokeOpacity:l.reached?.3:.12}),"ready"===l.reached&&(0,t.jsx)(ev,{x:o.x,y:o.y,r:2.3*s,still:c}),l.requested?(0,t.jsx)("circle",{cx:o.x,cy:o.y,r:1.2*s,fill:"none",stroke:a,strokeWidth:Math.max(.6,.45*s),strokeDasharray:`${Math.max(.8,.55*s)} ${Math.max(.6,.45*s)}`}):(0,t.jsx)("circle",{cx:o.x,cy:o.y,r:s,fill:a,fillOpacity:l.reached?1:.85,stroke:l.reached&&"hidden"!==l.reached?el:"none",strokeWidth:l.reached?Math.max(.8,.3*s):0}),"hidden"===l.reached&&(0,t.jsx)(ew,{x:o.x,y:o.y-.1*s,s:s/4.2}),n.id===d&&(0,t.jsx)("circle",{cx:o.x,cy:o.y,r:2*s,fill:"none",stroke:ei[3],strokeWidth:1/O,strokeDasharray:`${3/O} ${2/O}`}),(l.reached||r&&"S"===n.tier)&&(0,t.jsx)("text",{x:o.x,y:o.y+s+10/O,textAnchor:"middle",fontSize:8.5/O,fontWeight:l.reached?700:400,fill:"hidden"===l.reached?"#999":l.reached?el:"#aaa",pointerEvents:"none",stroke:"#0a0a1a",strokeWidth:2.4/O,paintOrder:"stroke",children:ed(n)})]},n.id)})},[z,D,A,O,c,d]),N=(e,t)=>{let r=$.current;if(!r)return null;let n=r.getBoundingClientRect(),i=(e-n.left-T-F.x)/O,o=(t-n.top-I-F.y)/O;if(30>=Math.hypot(i,o))return"center";let l=Math.max(.6*D.spacing,10/O),s=null,a=l;return D.points.forEach((e,t)=>{let r=Math.hypot(e.x-i,e.y-o);r<a&&(a=r,s=t)}),s},q=(e,t={x:0,y:0})=>W(r=>{let n=Math.max(.5,Math.min(6,r.k*e));return{k:n,x:t.x-(t.x-r.x)*n/r.k,y:t.y-(t.y-r.y)*n/r.k}}),Y=A.filter(e=>"ready"===e.reached).length,U=A.filter(e=>"hidden"===e.reached).length,V=A.filter(e=>e.reached).length,X=A.filter(e=>e.requested).length,G=["S","A","B","C","D"].map(e=>[e,z.filter(t=>t.tier===e).length]).filter(([,e])=>e),J=null!=d&&d===S.id,Z="number"==typeof _?z[_]:null,Q="number"==typeof _?D.points[_]:null;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("svg",{ref:$,width:l.w,height:l.h,style:{display:"block",touchAction:"none",cursor:null!=_?"pointer":"grab"},onPointerDown:e=>{R.current={x:e.clientX,y:e.clientY,vx:F.x,vy:F.y,moved:!1},e.currentTarget.setPointerCapture?.(e.pointerId)},onPointerMove:e=>{let t=R.current;if(t){let r=e.clientX-t.x,n=e.clientY-t.y;if(!t.moved&&Math.hypot(r,n)>5&&(t.moved=!0),t.moved)return void W(e=>({...e,x:t.vx+r,y:t.vy+n}))}let r=N(e.clientX,e.clientY);C(e=>e===r?e:r)},onPointerUp:e=>{let t=R.current;if(R.current=null,!t||t.moved)return;let r=N(e.clientX,e.clientY);"center"===r?u?.(S):null!=r&&L(r)?B.push(ec(z[r])):null!=r&&p(z[r].id)},onPointerLeave:()=>{R.current||C(null)},onWheel:e=>{let t=$.current?.getBoundingClientRect();t&&q(Math.exp(-(.0015*e.deltaY)),{x:e.clientX-t.left-T,y:e.clientY-t.top-I})},role:"img","aria-label":`${S.name}’s circle: ${z.length} ${1===z.length?"person":"people"}`,children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("filter",{id:"focusGlow",children:[(0,t.jsx)("feGaussianBlur",{stdDeviation:"4",result:"blur"}),(0,t.jsxs)("feMerge",{children:[(0,t.jsx)("feMergeNode",{in:"blur"}),(0,t.jsx)("feMergeNode",{in:"SourceGraphic"})]})]})}),(0,t.jsxs)("g",{transform:`translate(${T+F.x} ${I+F.y}) scale(${O})`,children:[D.rings.map(e=>(0,t.jsx)("circle",{r:e.radius,fill:"none",stroke:`${ei[2]}10`,strokeWidth:1/O},e.radius)),P,Q&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("line",{x1:0,y1:0,x2:Q.x,y2:Q.y,stroke:en[Z.tier]||"#888",strokeWidth:1.6/O,strokeOpacity:.8}),(0,t.jsx)("circle",{cx:Q.x,cy:Q.y,r:er(D.spacing,Z.tier)*(A[_].reached?1.4:1)+2/O,fill:"none",stroke:"#fff",strokeWidth:1.6/O})]}),"ready"===(0,K.reachState)(S,o)&&(0,t.jsx)(ev,{x:0,y:0,r:40,still:c}),(0,t.jsx)("circle",{r:28,fill:"#0a0a1a",stroke:en[S.tier]||"#888",strokeWidth:"center"===_?4:3,filter:"url(#focusGlow)"}),(0,M.localPhoto)(S.profile_image_url)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("clipPath",{id:"focus-clip",children:(0,t.jsx)("circle",{r:24})}),(0,t.jsx)("image",{href:(0,M.localPhoto)(S.profile_image_url),x:-24,y:-24,width:48,height:48,clipPath:"url(#focus-clip)"})]}):(0,t.jsx)("text",{y:5,textAnchor:"middle",fill:en[S.tier]||"#888",fontSize:16,fontWeight:800,children:S.name?.charAt(0)}),(0,t.jsx)("text",{y:40,textAnchor:"middle",fill:"#fff",fontSize:11,fontWeight:700,pointerEvents:"none",children:S.name})]}),Z&&(0,t.jsx)(ez,{x:T+F.x+Q.x*O,y:I+F.y+Q.y*O,w:l.w,lines:(f=Z,x=A[_],y=d,m=k,b=L(_),j=ed(f),v=f.id===y?"Their circle is being scanned now":"ready"===x.reached?"You added them · their circle is ready to scan":"hidden"===x.reached?"You added them · their list is hidden":"scanned"===x.reached?`You added them \xb7 ${x.own.toLocaleString("en-US")} in their circle`:x.requested?"Request sent":"Not connected yet",w=b?`Click to scan ${j}’s circle on the Scan page`:x.own>0?`Click to open ${j}’s circle (${eh(m+2)} degree)`:`Click to open ${j}’s circle`,[f.name,`${f.tier}-tier \xb7 ${(0,H.score)(f).toFixed(1)}`,v,w]),accent:A[_].reached?el:en[Z.tier]}),"center"===_&&(0,t.jsx)(ez,{x:T+F.x,y:I+F.y-28*O,w:l.w,lines:[S.name,"Open their card"],accent:en[S.tier]})]}),(0,t.jsxs)("div",{style:{position:"absolute",top:14,left:64,right:64,pointerEvents:"none",display:"flex",flexDirection:"column",gap:8,alignItems:"flex-start"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap",pointerEvents:"auto"},children:[(0,t.jsxs)("button",{type:"button",onClick:()=>g(k-1),style:{padding:"8px 16px",borderRadius:8,border:"none",cursor:"pointer",background:"rgba(255,255,255,0.1)",color:"#ddd",fontSize:12,fontWeight:700},children:["← ",1===k?"All bridges":`${ed(e[k-2])}’s circle`]}),(0,t.jsxs)("nav",{"aria-label":"Trail",style:{fontSize:11,color:"#777",display:"flex",gap:6,flexWrap:"wrap",alignItems:"center"},children:[(0,t.jsx)("button",{type:"button",onClick:()=>g(0),style:eC,children:"All bridges"}),e.map((e,r)=>(0,t.jsxs)("span",{style:{display:"inline-flex",gap:6,alignItems:"center"},children:[(0,t.jsx)("span",{"aria-hidden":"true",children:"›"}),r===k-1?(0,t.jsx)("span",{style:{color:"#fff",fontWeight:700},children:e.name}):(0,t.jsx)("button",{type:"button",onClick:()=>g(r+1),style:eC,children:e.name})]},e.id))]})]}),(0,t.jsxs)("div",{style:{fontSize:11,color:"#999"},children:[ed(S),"’s circle · ",z.length.toLocaleString("en-US")," ",1===z.length?"person":"people"," · ",eh(k+1)," degree",k>1?", counted along this chain":""]}),J&&z.length>0&&(0,t.jsxs)("div",{role:"status",style:{...eF,borderColor:"rgba(52,152,219,0.4)",color:"#cfe6f7"},children:["Scanning ",ed(S),"’s circle now. More people appear here as it saves, every 10 pages."]})]}),0===z.length&&(0,t.jsx)(e_,{person:S,depth:k,reach:o,requests:a,scanning:J,canScan:h,onSelect:u,top:I+64}),z.length>0&&(0,t.jsxs)("div",{style:{position:"absolute",bottom:20,left:20,maxWidth:"calc(100% - 110px)",background:"rgba(0,0,0,0.75)",borderRadius:10,padding:"10px 14px",backdropFilter:"blur(8px)",fontSize:10,color:"#888",lineHeight:1.6},children:[(0,t.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#666",letterSpacing:1,marginBottom:6},children:"IN THIS CIRCLE"}),G.map(([e,r])=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,t.jsx)("div",{style:{width:6,height:6,borderRadius:"50%",background:en[e]}}),(0,t.jsxs)("span",{style:{color:en[e],fontWeight:600,width:40},children:[e,"-Tier"]}),(0,t.jsx)("span",{children:r.toLocaleString("en-US")})]},e)),(V>0||X>0)&&(0,t.jsxs)("div",{style:{marginTop:6},children:[V>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:el},children:"● "}),"you added ",V,Y?`, ${Y} ready to scan`:"",U?`, ${U} hidden`:""]}),X>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#FFD700"},children:"◌ "}),X," ",1===X?"request":"requests"," out"]})]}),(0,t.jsxs)("div",{style:{marginTop:6,color:"#555"},children:["Click anyone for their circle",Y>0&&h?", or someone ready to scan theirs":""," · drag to move · scroll to zoom"]})]}),(0,t.jsx)(eS,{onIn:()=>q(1.35),onReset:()=>W({k:1,x:0,y:0}),onOut:()=>q(1/1.35)})]})}function ez({x:e,y:r,w:n,lines:i,accent:o}){let l=Math.max(150,Math.min(240,5.6*Math.max(...i.map(e=>String(e).length))+20)),s=12+12*i.length,a=Math.max(6,Math.min(n-l-6,e-l/2)),d=Math.max(6,r-s-12);return(0,t.jsxs)("g",{pointerEvents:"none",children:[(0,t.jsx)("rect",{x:a,y:d,width:l,height:s,rx:6,fill:"rgba(0,0,0,0.92)",stroke:o||"#555",strokeWidth:.6}),i.map((e,r)=>(0,t.jsx)("text",{x:a+l/2,y:d+16+12*r,textAnchor:"middle",fill:0===r?"#fff":2===r?o||"#aaa":"#999",fontSize:0===r?10.5:9,fontWeight:0===r?700:400,children:e},r))]})}function e_({person:e,depth:r,reach:n,requests:i,scanning:o,canScan:l,onSelect:a,top:d}){let c,h,p=ed(e),g=eh(r+1),u=1===e.degree,f=u?(0,K.circleState)(e,n):null,x=(0,K.circleScanCost)(),y=null;return o?(c=`Scanning ${p}’s circle now`,h="Their people appear here as the scan saves them, every 10 pages."):"hidden"===f?(c=`${p} keeps their connections hidden`,h="LinkedIn doesn’t show their list, so there is no circle to scan."):"scanned"===f?(c=`${p}’s list has been read`,h="Everyone on it was already one of your connections, so nobody new is here."):u?(c=`${p}’s circle isn’t scanned yet`,h=`${p} is your connection, so their circle can be scanned. That brings in the people they know: ${g} degree${r>1?", counted along this chain":""}.`,l&&(y=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(q.default,{href:ec(e),style:eW,children:["Scan ",p,"’s circle →"]}),(0,t.jsxs)("div",{style:{fontSize:10.5,color:"#888",marginTop:8},children:[x.profileViews," profile view, then one LinkedIn search per page of their list (up to ",x.searches,", about ",x.minutes," min). It starts only once you confirm it on the Scan page."]})]}))):(0,s.hasRequest)(e,i)?(c=`Request sent to ${p}`,h=`Once ${p} accepts, ↻ Check for new brings them into your connections. Then their circle can be scanned, and the people they know fill in here: ${g} degree.`):(c=`Nobody from ${p}’s circle yet`,h=`LinkedIn only shows the connections of people you’re connected to. Connect with ${p}; once they accept and their circle is scanned, the people they know fill in here: ${g} degree.`,y=(0,t.jsxs)("button",{type:"button",onClick:()=>a?.(e),style:eR,children:["Open ",p,"’s card"]})),(0,t.jsxs)("div",{role:"status",style:{position:"absolute",left:"50%",top:d,transform:"translateX(-50%)",width:"min(360px, calc(100% - 32px))",background:"rgba(10,10,26,0.94)",border:`1px solid ${"hidden"===f?"rgba(255,255,255,0.12)":"rgba(0,255,136,0.25)"}`,borderRadius:12,padding:"14px 16px",textAlign:"center"},children:[(0,t.jsxs)("div",{style:{fontSize:13,fontWeight:800,color:"hidden"===f?"#aaa":"#fff",marginBottom:6},children:["hidden"===f&&(0,t.jsx)("span",{"aria-hidden":"true",children:"🔒 "}),c]}),(0,t.jsx)("div",{style:{fontSize:11.5,color:"#9aa",lineHeight:1.55,marginBottom:12*!!y},children:h}),y]})}let eC={background:"none",border:"none",color:"#8fb8d6",fontSize:11,fontWeight:600,cursor:"pointer",padding:0},eF={fontSize:11,padding:"6px 10px",borderRadius:8,border:"1px solid",background:"rgba(0,0,0,0.6)",pointerEvents:"auto"},eW={display:"inline-block",padding:"9px 16px",borderRadius:8,textDecoration:"none",fontSize:12.5,fontWeight:800,color:"#0a0a1a",background:"linear-gradient(135deg, #00ff88, #3498DB)"},eR={padding:"8px 14px",borderRadius:8,cursor:"pointer",fontSize:12,fontWeight:700,border:"1px solid rgba(255,255,255,0.18)",background:"rgba(255,255,255,0.06)",color:"#ddd"},e$={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},eB=["S","A","B","C","D"],eM={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},eT={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},eI=["S","A","B","C","D"],eE=[{key:"only",label:"Only way in",range:"1",max:1,color:"#00E5FF"},{key:"rare",label:"Rare",range:"2–3",max:3,color:"#4FC3F7"},{key:"uncommon",label:"Uncommon",range:"4–10",max:10,color:"#B0BEC5"},{key:"common",label:"Common",range:"11–30",max:30,color:"#FFB74D"},{key:"warm",label:"Warm",range:"31+",max:1/0,color:"#FF7043"}],eD=new Map(eE.map(e=>[e.key,e]));function eA(e){return eD.get(e)??null}function eL(e,t=1){let r,n=function(e,t=1){let r=Number(e?.mutual_count);return Number.isFinite(r)&&r>=1?{count:Math.floor(r),from:"linkedin"}:{count:Math.max(1,Math.floor(Number(t)||1)),from:"scans"}}(e,t);return{key:(r=Math.max(1,Math.floor(Number(n.count)||1)),eE.find(e=>r<=e.max).key),...n}}function eO({tier:e,rarity:t},{tiers:r=new Set,rarities:n=new Set}={}){return(!r.size||!!r.has(e))&&(!n.size||!!(t&&n.has(t)))}function eP(e,t){let r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r}let eN={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"};function eq({person:e,size:r=32,tierColors:n=eN}){let i=n[e?.tier]||"#666",o=(0,M.localPhoto)(e?.profile_image_url);return(0,t.jsxs)("span",{style:{position:"relative",display:"inline-block",width:r,height:r,flexShrink:0,borderRadius:"50%",boxShadow:`0 0 0 ${r>=24?2:1}px ${i}`},children:[(0,t.jsx)("span",{style:{position:"absolute",inset:0,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",background:`${i}2e`,color:i,fontWeight:800,fontSize:Math.max(7,Math.round(.36*r)),lineHeight:1},children:(0,O.initialsFor)(e?.name)}),o&&(0,t.jsx)("img",{src:o,alt:"",loading:"lazy",decoding:"async",onError:e=>{e.currentTarget.style.display="none"},style:{position:"absolute",inset:0,width:r,height:r,borderRadius:"50%",objectFit:"cover"}})]})}let eH="#FF6B35",eY={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},eU="a connection we can’t name",eV=e=>Number(e||0).toLocaleString("en-US"),eX=(e,t,r)=>`${eV(e)} ${1===e?t:r}`;function eG(e){return e.role&&e.company?`${e.role} @ ${e.company}`:e.headline||e.role||e.company||""}let eK=`
|
|
10
|
-
.sepmap .sp { cursor: pointer; transition: opacity .12s; }
|
|
11
|
-
.sepmap .ppl:hover .sp { opacity: .28; }
|
|
12
|
-
.sepmap .ppl:hover .sp:hover, .sepmap .ppl:hover .sp.sel { opacity: 1; }
|
|
13
|
-
.sepmap .sp:hover .rt, .sepmap .sp.sel .rt { stroke-opacity: 1; stroke-width: 2px; }
|
|
14
|
-
.sepmap .br { cursor: pointer; }
|
|
15
|
-
.sepmap .br:hover text { text-decoration: underline; }
|
|
16
|
-
.sepmap .rt { pointer-events: none; }
|
|
17
|
-
`,eJ={paintOrder:"stroke",stroke:"#0a0a1a",strokeWidth:3,strokeLinejoin:"round"},eZ=(0,r.memo)(function({layout:e,selectedKey:n,tierColors:i,youLabel:o,isMobile:l,onPick:s,onPickBridge:a}){let{width:d,height:c,you:h,people:p,bridges:g,links:u,spokes:f}=e,x=(0,r.useMemo)(()=>{let e=new Map;for(let t of u)e.has(t.key)||e.set(t.key,[]),e.get(t.key).push(t);return e},[u]),y=l?36:26,m=l?12:11;return(0,t.jsxs)("svg",{className:"sepmap",width:d,height:c,"aria-hidden":"true",style:{display:"block",overflow:"visible"},children:[(0,t.jsx)("style",{children:eK}),(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:"sepYouGrad",x1:"0",y1:"0",x2:"1",y2:"1",children:[(0,t.jsx)("stop",{offset:"0",stopColor:"#FFD700"}),(0,t.jsx)("stop",{offset:"1",stopColor:"#FF6B35"})]})}),f.map(e=>(0,t.jsx)("line",{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,stroke:"#fff",strokeOpacity:.12,strokeWidth:1},`s-${e.id??"unresolved"}`)),(0,t.jsx)("g",{className:"ppl",children:p.map(e=>{let{p:r}=e,o=i[r.tier]||"#888",l=e.key===n,a=r.routes.map(e=>e.bridge?e.bridge.name:eU).join(", ");return(0,t.jsxs)("g",{className:l?"sp sel":"sp",onClick:()=>s(r),children:[(0,t.jsx)("title",{children:`${r.person.name} \xb7 #${r.rank}${r.tied?"=":""} \xb7 ${r.tier} \xb7 ${r.score.toFixed(1)} \xb7 via ${a}`}),(x.get(e.key)||[]).map(r=>{let n=(r.x1+r.x2)/2,o=r.unresolved?"#777":r.primary?eH:i[r.tier]||"#888";return(0,t.jsx)("path",{className:"rt",d:`M${r.x1+5},${r.y1} C${n},${r.y1} ${n},${r.y2} ${r.x2-e.r},${r.y2}`,fill:"none",stroke:o,strokeWidth:r.primary?1.5:1,strokeOpacity:r.primary?.8:.35,strokeDasharray:r.primary?void 0:"3 3"},`${r.key}-${r.bridgeId??"u"}`)}),(0,t.jsx)("rect",{x:e.x-12,y:e.y-y/2,width:Math.max(0,d-e.x+12),height:y,fill:"transparent"}),l&&(0,t.jsx)("circle",{cx:e.x,cy:e.y,r:e.r+3.5,fill:"none",stroke:"#fff",strokeWidth:1.5}),(0,t.jsx)("circle",{cx:e.x,cy:e.y,r:e.r,fill:o}),(0,t.jsxs)("text",{x:e.x+14,y:e.y,dy:"0.35em",fontSize:m,fill:"#ddd",style:eJ,children:[e.label,(0,t.jsx)("tspan",{dx:6,fill:o,fontWeight:700,children:r.score.toFixed(1)})]})]},e.key)})}),g.map(e=>{let r=e.unresolved?"#777":i[e.bridge.tier]||"#888";return(0,t.jsxs)("g",{className:e.unresolved?void 0:"br",onClick:e.unresolved?void 0:()=>a(e.bridge),children:[(0,t.jsx)("title",{children:e.unresolved?"Routes whose connection record doesn’t match anyone in your 1st-degree list, so who introduces you can’t be named":`${e.bridge.name} \xb7 ${e.bridge.tier}-tier \xb7 a way in to ${e.count} of these \xb7 click to open`}),(0,t.jsx)("circle",{cx:e.x,cy:e.y,r:e.r,fill:e.unresolved?"none":r,stroke:e.unresolved?"#777":"#0a0a1a",strokeWidth:e.unresolved?1:1.5,strokeDasharray:e.unresolved?"2 2":void 0}),(0,t.jsx)("text",{x:e.x-9,y:e.y,dy:"0.35em",textAnchor:"end",fontSize:m-1,fill:r,fontStyle:e.unresolved?"italic":void 0,fontWeight:e.unresolved?400:600,style:eJ,children:e.label})]},`b-${e.id??"unresolved"}`)}),(0,t.jsxs)("g",{children:[(0,t.jsx)("circle",{cx:h.x,cy:h.y,r:h.r,fill:"url(#sepYouGrad)"}),(0,t.jsx)("text",{x:h.x,y:h.y,dy:"0.35em",textAnchor:"middle",fontSize:o.length>2?9:10,fontWeight:800,fill:"#000",children:o})]})]})}),eQ={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function e0({p:e,route:r,tierColors:n,compact:i}){if(!r?.bridge)return(0,t.jsxs)("span",{style:{...eQ,color:"#777",fontStyle:"italic",fontSize:i?11:12},children:["via ",eU]});let o=r.bridge,l=e.waysIn-1;return(0,t.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:5,minWidth:0,fontSize:i?11:12},children:[(0,t.jsx)("span",{style:{color:"#666",flexShrink:0},children:"via"}),!i&&(0,t.jsx)(eq,{person:o,size:16,tierColors:n}),(0,t.jsx)("span",{style:{...eQ,color:n[o.tier]||"#aaa",fontWeight:600,minWidth:0},children:i?(0,H.shortName)(o.name):o.name}),l>0&&(0,t.jsxs)("span",{title:`Every way in:
|
|
18
|
-
${e.routes.map(e=>e.bridge?`${e.bridge.name} (${e.bridge.tier})`:eU).join("\n")}`,style:{flexShrink:0,padding:"1px 6px",borderRadius:8,fontSize:10,fontWeight:800,color:eH,background:"rgba(255,107,53,0.15)"},children:["+",l]})]})}function e1({status:e,rarity:r}){let n=r?eA(r.key):null;return(0,t.jsxs)(t.Fragment,{children:["asked"===e&&(0,t.jsx)("span",{title:"You sent a request. It shows everywhere in the app.",style:{flexShrink:0,fontSize:9,fontWeight:800,color:"#FFD700",border:"1px dashed rgba(255,215,0,0.6)",borderRadius:4,padding:"0 4px"},children:"Request sent"}),"connected"===e&&(0,t.jsx)("span",{title:"Already one of your connections",style:{flexShrink:0,fontSize:9,fontWeight:800,color:"#00ff88",border:"1px solid rgba(0,255,136,0.5)",borderRadius:4,padding:"0 4px"},children:"Connected"}),n&&"connected"!==e&&(0,t.jsx)("span",{title:`${r.count} mutual connection${1===r.count?"":"s"}${"scans"===r.from?" (from your scans, so it can only go up)":""}. ${e5}`,style:{flexShrink:0,fontSize:9,fontWeight:700,color:n.color,border:`1px solid ${n.color}55`,borderRadius:4,padding:"0 4px"},children:n.label})]})}let e5="Rarity is how many mutual connections lead to them: few is a rare way in, many is warm (likely to accept). It never changes a score or a tier.",e2=(0,r.memo)(function({p:e,top:r,height:n,isMobile:i,selected:o,tierColors:l,onPick:s,q:a,status:d,rarity:c}){let{person:h}=e,p=l[e.tier]||"#888",g=function(e,t){if(t){let r=e.routes.find(e=>e.bridge&&String(e.bridge.name||"").toLowerCase().includes(t));if(r)return r}return e.routes[0]||null}(e,a),u=e.rank<=3,f=o?"rgba(255,107,53,0.08)":u?`${p}08`:"transparent",x="LinkedIn Member"===h.name,y=`#${e.rank}${e.tied?"=":""}`,m=e.waysIn-1,b=g?.bridge?`via ${g.bridge.name}${m>0?` and ${m} other${m>1?"s":""}`:""}`:`via ${eU}${m>0?` and ${m} other${m>1?"s":""}`:""}`;return(0,t.jsxs)("div",{role:"button",tabIndex:0,"aria-label":`Rank ${e.rank}${e.tied?", tied":""}, ${h.name}, ${e.tier} tier, ${e.score.toFixed(1)}, ${e.waysIn} way${1===e.waysIn?"":"s"} in, ${b}`,"aria-pressed":o,onClick:()=>s(e),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),s(e))},onMouseEnter:e=>{o||(e.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:e=>{e.currentTarget.style.background=f},style:{position:"absolute",top:r,left:0,right:0,height:n,boxSizing:"border-box",display:"grid",alignItems:"center",gap:10,padding:"0 12px",gridTemplateColumns:i?"44px 36px 1fr 44px":"64px 36px minmax(0,1.4fr) minmax(0,1fr) 96px 44px",borderLeft:`3px solid ${o?eH:"transparent"}`,borderBottom:"1px solid rgba(255,255,255,0.04)",background:f,cursor:"pointer"},children:[(0,t.jsx)("span",{style:{fontSize:i?11:12,fontWeight:800,color:u?p:"#555",whiteSpace:"nowrap"},children:y}),(0,t.jsx)(eq,{person:h,size:32,tierColors:l}),i?(0,t.jsxs)("div",{style:{minWidth:0,display:"flex",flexDirection:"column",gap:2},children:[(0,t.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:4,minWidth:0},children:[(0,t.jsxs)("span",{style:{...eQ,fontSize:13,fontWeight:600,color:x?"#888":"#fff",minWidth:0},children:[h.name,x&&(0,t.jsx)("span",{style:{fontSize:10,color:"#666",fontWeight:400},children:" · out of network"})]}),(0,t.jsx)(e1,{status:d,rarity:c})]}),(0,t.jsx)(e0,{p:e,route:g,tierColors:l,compact:!0}),(0,t.jsx)("span",{style:{...eQ,fontSize:10,color:"#666"},children:eG(h)})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{style:{minWidth:0},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0},children:[(0,t.jsx)("span",{style:{...eQ,fontSize:13,fontWeight:600,color:x?"#888":"#fff"},children:h.name}),(0,t.jsx)("span",{style:{flexShrink:0,fontSize:9,fontWeight:800,color:p,border:`1px solid ${p}55`,borderRadius:4,padding:"0 4px"},children:e.tier}),(0,t.jsx)(e1,{status:d,rarity:c}),x&&(0,t.jsx)("span",{style:{flexShrink:0,fontSize:10,color:"#666"},children:"out of network"})]}),(0,t.jsx)("div",{style:{...eQ,fontSize:10,color:"#777",marginTop:2},children:eG(h)})]}),(0,t.jsx)(e0,{p:e,route:g,tierColors:l}),(0,t.jsx)("div",{style:{height:6,background:"rgba(255,255,255,0.06)",borderRadius:3},children:(0,t.jsx)("div",{style:{height:"100%",borderRadius:3,background:p,width:`${100*Math.max(0,Math.min(1,e.score/10))}%`}})})]}),(0,t.jsxs)("div",{style:{textAlign:"right"},children:[(0,t.jsx)("div",{style:{fontSize:13,fontWeight:800,color:p},children:e.score.toFixed(1)}),i&&(0,t.jsx)("div",{style:{fontSize:9,color:"#666",fontWeight:700},children:e.tier})]})]})}),e8={galaxy:{component:function({connections:e,onSelect:n,tierColors:i,focusNodeRef:o,userName:l,selectedId:s=null}){let a=(0,r.useRef)(null),p=(0,r.useRef)(null),j=(0,r.useRef)(null),w=(0,r.useRef)({transform:null,size:null}),S=(0,r.useRef)(null),[k,z]=(0,r.useState)(null),_=(0,r.useRef)(n);(0,r.useEffect)(()=>{_.current=n});let C=(0,r.useRef)(s);(0,r.useEffect)(()=>{let e=a.current?.parentElement;if(!e)return;let t=()=>{let t=Math.round(e.clientWidth),r=Math.round(e.clientHeight);S.current={width:t,height:r},z(e=>e&&e.width===t&&e.height===r?e:{width:t,height:r})};t();let r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[]),(0,r.useEffect)(()=>{C.current=s,j.current?.select(s)},[s]),(0,r.useEffect)(()=>{k&&j.current?.resize(k)},[k]);let F=null!==k;return(0,r.useEffect)(()=>{if(!F||!a.current||!e.length)return;let t=d.select(a.current);t.selectAll("*").remove();let r=S.current,{transform:n,size:s}=w.current,k=n?T(n,s,r):null,z=function(e,t,r,n,i,o,l,s,a,c){var h,p,j;let w=[{id:E,name:c||"You",tier:"center",degree:0,power_score:10,fx:0,fy:0},...n.map(e=>({id:e.id,name:e.name,tier:e.tier,degree:1,power_score:parseFloat(e.power_score)||1,company:e.company,role:e.role,headline:e.headline,profile_url:e.profile_url,profile_image_url:(0,M.localPhoto)(e.profile_image_url),connected_date:e.connected_date,seniority_score:e.seniority_score,company_prestige_score:e.company_prestige_score,influence_signals:e.influence_signals,is_catalyst:e.is_catalyst,catalyst_score:e.catalyst_score,circle_power:e.circle_power,circle_s_count:e.circle_s_count,circle_a_count:e.circle_a_count}))],S=new Map(w.map(e=>[e.id,e])),k=n.map(e=>({source:E,target:e.id})),z=e=>{switch(e){case"S":return 150;case"A":return 250;case"B":return 350;case"C":return 450;default:return 520}},_=e=>e.id===E?18:Math.max(3,Math.min(12,1.3*(e.power_score||1))),C=window.innerWidth<768,F=e.append("g"),W=null,R=g.default().scaleExtent([.3,4]).on("zoom",e=>{F.attr("transform",e.transform),a.current={transform:W??e.transform,size:r},P()});e.call(R);let $=(t,n)=>{if(D()){W=null,e.interrupt().call(R.transform,t);return}W=t,a.current={transform:t,size:r},e.transition().duration(n).call(R.transform,t).on("end interrupt cancel",()=>{W===t&&(W=null)})},A=t.firstChild,O=null,P=()=>{if(!O)return;let r=u.default(e.node());t.style.transform=`translate(${r.applyX(O.x)}px, ${r.applyY(O.y)}px) scale(${r.k})`},N=e=>{if(O=null!=e&&e!==E?S.get(e)??null:null,t.style.display=O?"block":"none",!O)return;let r=_(O)+8;A.style.width=A.style.height=`${2*r+2.5}px`,A.style.margin=`${-(r+1.25)}px`,A.style.borderColor=o[O.tier]||"#FFD700",P()};if(s)e.call(R.transform,f.identity.translate(s.x,s.y).scale(s.k));else{let t=C&&r.width>0&&r.height>0?Math.min(r.width/1248,r.height/1248):1;e.call(R.transform,f.identity.translate(r.width/2,r.height/2).scale(t))}if(l&&(l.current=e=>{let t=S.get(e);t&&($(f.identity.translate(r.width/2-2.5*t.x,r.height/2-2.5*t.y).scale(2.5),750),N(e))}),C){let e={};w.forEach(t=>{let r=t.tier||"D";e[r]||(e[r]=[]),e[r].push(t)}),Object.entries(e).forEach(([e,t])=>{t.forEach((r,n)=>{if(r.id===E){r.x=0,r.y=0,r.fx=r.x,r.fy=r.y;return}let i=z(e),o=n/t.length*Math.PI*2-Math.PI/2;r.x=i*Math.cos(o),r.y=i*Math.sin(o),r.fx=r.x,r.fy=r.y})})}let q=x.forceSimulation(w).force("link",y.forceLink(k).id(e=>e.id).distance(e=>z(e.target.tier||"D")).strength(.1*!C)).force("charge",m.forceManyBody().strength(C?0:e=>e.id===E?-300:-15)).force("center",C?null:function(e,t){var r,n=1;function i(){var i,o,l=r.length,s=0,a=0;for(i=0;i<l;++i)s+=(o=r[i]).x,a+=o.y;for(s=(s/l-e)*n,a=(a/l-t)*n,i=0;i<l;++i)o=r[i],o.x-=s,o.y-=a}return null==e&&(e=0),null==t&&(t=0),i.initialize=function(e){r=e},i.x=function(t){return arguments.length?(e=+t,i):e},i.y=function(e){return arguments.length?(t=+e,i):t},i.strength=function(e){return arguments.length?(n=+e,i):n},i}(0,0)).force("collision",C?null:b.forceCollide().radius(e=>_(e)+2)).force("radial",C?null:v(e=>e.id===E?0:z(e.tier),0,0).strength(.3)),H=F.append("g").selectAll("line").data(k).join("line").attr("stroke",e=>o[e.target.tier]||"#333").attr("stroke-opacity",.15).attr("stroke-width",.5),Y=w.filter(e=>e.is_catalyst);if(Y.length){let t=e.select("defs").size()?e.select("defs"):e.append("defs");if(!t.select("#catalyst-glow-nm").size()){let e=t.append("filter").attr("id","catalyst-glow-nm").attr("x","-60%").attr("y","-60%").attr("width","220%").attr("height","220%");e.append("feGaussianBlur").attr("stdDeviation","5").attr("result","blur"),e.append("feMerge").html('<feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/>')}F.append("g").selectAll("circle").data(Y).join("circle").attr("r",e=>_(e)+6).attr("fill","none").attr("stroke","#00ff88").attr("stroke-width",2).attr("stroke-dasharray","3,3").attr("filter","url(#catalyst-glow-nm)").attr("cx",e=>e.x||0).attr("cy",e=>e.y||0).attr("class","catalyst-ring")}let U=F.append("g").selectAll("circle").data(w).join("circle").attr("r",_).attr("fill",e=>e.id===E?"#fff":o[e.tier]||"#666").attr("stroke",e=>e.id===E?"#FFD700":e.is_catalyst?"#00ff88":"none").attr("stroke-width",e=>e.id===E?3:2.5*!!e.is_catalyst).style("cursor","pointer").on("click",(e,t)=>{t.id!==E&&(N(t.id),i(t))}),V=d.select("body").append("div").attr("class","graph-tooltip").style("position","fixed").style("top","0px").style("left","0px").style("background","rgba(0,0,0,0.92)").style("color","#fff").style("padding","8px 12px").style("border-radius","6px").style("font-size","12px").style("pointer-events","none").style("opacity",0).style("z-index",1e3).style("border","1px solid rgba(255,255,255,0.2)").style("max-width","280px"),X=d.select("body").append("div").attr("class","graph-tooltip").style("position","fixed").style("top","0px").style("left","0px").style("pointer-events","none").style("opacity",0).style("z-index",1001).style("transition","opacity 0.15s");U.on("mouseover",function(e,t){if(L(this,1.5*_(t)),t.profile_image_url&&t.id!==E){var r;let n,i=Math.max(48,5*_(t));X.style("opacity",1),r=o[t.tier]||"#555",X.selectAll("*").remove(),(n=(0,M.localPhoto)(t.profile_image_url))?X.append("img").attr("src",n).style("width",i+"px").style("height",i+"px").style("border-radius","50%").style("object-fit","cover").style("border",`2px solid ${r}`).style("display","block").on("error",function(){this.parentElement.style.display="none"}):X.style("opacity",0),X.style("left",e.clientX-i/2+"px").style("top",e.clientY-i-8+"px"),V.style("opacity",1).html(`<strong>${I(t.name)}</strong>`).style("left",e.clientX-40+"px").style("top",e.clientY+12+"px").style("text-align","center").style("min-width","80px")}else V.style("opacity",1).html(`<strong>${I(t.name)}</strong>${t.company?"<br/>"+I(t.company):""}${t.tier?"<br/>Tier: "+I(t.tier):""}`).style("left",e.clientX+12+"px").style("top",e.clientY-10+"px")}).on("mousemove",function(e,t){if(t.profile_image_url&&t.id!==E){let r=Math.max(48,5*_(t));X.style("left",e.clientX-r/2+"px").style("top",e.clientY-r-8+"px"),V.style("left",e.clientX-40+"px").style("top",e.clientY+12+"px")}else V.style("left",e.clientX+12+"px").style("top",e.clientY-10+"px")}).on("mouseout",function(e,t){L(this,_(t)),V.style("opacity",0),X.style("opacity",0)}),h=U,p=q,j=E,h.call(B().on("start",(e,t)=>{e.active||p.alphaTarget(.3).restart(),t.fx=t.x,t.fy=t.y}).on("drag",(e,t)=>{t.fx=e.x,t.fy=e.y}).on("end",(e,t)=>{e.active||p.alphaTarget(0),t.id!==j&&(t.fx=null,t.fy=null)}));let G=F.append("g").selectAll("text").data(w.filter(e=>e.id===E||"S"===e.tier||e.is_catalyst)).join("text").text(e=>e.is_catalyst&&"S"!==e.tier?e.name+" ⚡":e.name).attr("font-size",e=>e.id===E?14:10).attr("font-weight",e=>e.id===E?700:500).attr("fill",e=>e.id===E?"#fff":e.is_catalyst?"#00ff88":o[e.tier]).attr("text-anchor","middle").attr("dy",e=>_(e)+14).style("pointer-events","none"),K=F.selectAll(".catalyst-ring");return q.on("tick",()=>{H.attr("x1",e=>e.source.x).attr("y1",e=>e.source.y).attr("x2",e=>e.target.x).attr("y2",e=>e.target.y),U.attr("cx",e=>e.x).attr("cy",e=>e.y),K.attr("cx",e=>e.x).attr("cy",e=>e.y),G.attr("x",e=>e.x).attr("y",e=>e.y),P()}),{simulation:q,resize:t=>{let n=T(W??u.default(e.node()),r,t);r=t,$(f.identity.translate(n.x,n.y).scale(n.k),250)},select:N}}(t,p.current,r,e,e=>_.current?.(e),i,o,k,w,l);return j.current=z,z.select(C.current),()=>{var e;z.simulation.stop(),t.interrupt(),j.current=null,("string"==typeof(e=".graph-tooltip")?new h.Selection([document.querySelectorAll(e)],[document.documentElement]):new h.Selection([(0,c.default)(e)],h.root)).remove()}},[e,i,F]),(0,t.jsxs)("div",{style:{flex:1,position:"relative",overflow:"hidden"},children:[(0,t.jsx)("style",{children:A}),(0,t.jsx)("svg",{ref:a,width:k?.width??800,height:k?.height??600,style:{background:"#0a0a1a"}}),(0,t.jsx)("div",{ref:p,className:"galaxy-ring",style:{position:"absolute",left:0,top:0,display:"none",pointerEvents:"none",transformOrigin:"0 0"},children:(0,t.jsx)("div",{className:"galaxy-ring-pulse",style:{boxSizing:"border-box",border:"2.5px solid",borderRadius:"50%"}})}),(0,t.jsx)("div",{style:{position:"absolute",bottom:20,left:20,display:"flex",gap:12,fontSize:11,color:"#888"},children:Object.entries(i).map(([e,r])=>(0,t.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,t.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",background:r,display:"inline-block"}}),e]},e))})]})},modes:["network"],label:"Galaxy",icon:"🌌",desc:"Force-directed layout"},orbit:{component:N,modes:["network","degrees"],label:"Orbit",icon:"🪐",desc:"Tier orbits + circle dots; in Degrees, every mapped circle fanned out",allDegree2:!0},separation:{component:function({connections:e=[],degree2:n=[],fullDegree1:i=e,fullDegree2:o=n,onSelect:a,userName:d,selectedId:c,tierColors:h=eY}){let p=function(){let[e,t]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=()=>t(window.innerWidth<768);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}(),g=p?68:56,u=p?5:10,f=p?8:16,[x,y]=(0,r.useState)(""),m=(0,r.useDeferredValue)(x.trim().toLowerCase()),[b,j]=(0,r.useState)("power"),[v,w]=(0,r.useState)("all"),[S,k]=(0,r.useState)(()=>new Set),z=(0,l.default)(),[_,C]=(0,r.useState)(0),[F,W]=(0,r.useState)({w:0,h:800}),[R,$]=(0,r.useState)(null),B=(0,r.useRef)(null),M=(0,r.useCallback)(e=>{B.current=e,$(e)},[]),T=(0,r.useRef)(null),I=(0,r.useMemo)(()=>(0,H.separationPeople)(n,e),[n,e]),E=(0,r.useMemo)(()=>"ways"===b?[...I.people].sort(H.compareWaysIn):I.people,[I,b]),D=(0,r.useMemo)(()=>(0,H.routeIndex)(o),[o]),A=(0,r.useMemo)(()=>{let e=new Map;for(let t of I.people)e.set(t.key,eL(t.person,D.get(t.key)?.size||t.waysIn));return e},[I,D]),L=(0,r.useMemo)(()=>{let e=Object.fromEntries(eE.map(e=>[e.key,0]));for(let t of A.values())e[t.key]++;return e},[A]),P=(0,r.useCallback)((e,t)=>("all"===v||e.tier===v)&&(!S.size||S.has(A.get(e.key)?.key))&&(!t||e.haystack.includes(t)),[v,S,A]),N=(0,r.useMemo)(()=>m||"all"!==v||S.size?E.filter(e=>P(e,m)):E,[E,m,v,S,P]),q=(0,r.useMemo)(()=>new Set(i.map(H.keyFor)),[i]),Y=(0,r.useCallback)(e=>q.has(e.key)?"connected":(0,s.hasRequest)(e.person,z)?"asked":null,[q,z]),U=(0,r.useMemo)(()=>N.filter(e=>!Y(e)).slice(0,u),[N,u,Y]),V=(0,r.useMemo)(()=>N.reduce((e,t)=>e+ +!!Y(t),0),[N,Y]),X=null!=c?I.rowToKey.get(c)??null:null,G=(0,r.useRef)(a);(0,r.useEffect)(()=>{G.current=a});let K=(0,r.useCallback)(e=>G.current?.(e.person),[]),J=(0,r.useCallback)(e=>{e&&G.current?.(e)},[]);(0,r.useEffect)(()=>{if(!R)return;let e=new ResizeObserver(()=>{let e=Math.round(R.clientWidth),t=Math.round(R.clientHeight);W(r=>r.w===e&&r.h===t?r:{w:e,h:t})});return e.observe(R),()=>e.disconnect()},[R]);let Z=Math.max(0,Math.min(980,F.w-2*f)),Q=(0,r.useMemo)(()=>(0,H.summitLayout)(U,Z||800,p),[U,Z,p]),ee=p?58:40,et=U.length?ee+Q.height+12:0,er=et+28,en=er+N.length*g+72,ei=Math.max(0,Math.floor((_-er)/g)-8),eo=Math.min(N.length,ei+Math.ceil(F.h/g)+16),el=(0,r.useCallback)(e=>{let t=16*Math.floor(e.currentTarget.scrollTop/16);C(e=>e===t?e:t)},[]),es=(0,r.useCallback)(()=>{B.current&&(B.current.scrollTop=0),C(0)},[]);(0,r.useEffect)(()=>{let e=e=>{if("/"!==e.key||e.metaKey||e.ctrlKey||e.altKey)return;let t=e.target;t&&("INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName||t.isContentEditable)||(e.preventDefault(),T.current?.focus())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]);let ea=e=>{y(e),es()},{summary:ed}=I,ec=!!m||"all"!==v||S.size>0,eh=!d||/^you$/i.test(String(d).trim())?"You":(0,O.initialsFor)(d),ep=N.slice(ei,eo);return(0,t.jsxs)("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",background:"#0a0a1a",color:"#fff",overflow:"hidden"},children:[(0,t.jsxs)("div",{style:{padding:"10px 56px 8px",flexShrink:0},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:[(0,t.jsx)("h2",{style:{margin:0,fontSize:18,fontWeight:800,background:"linear-gradient(135deg, #FFD700, #FF6B35)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Separation"}),(0,t.jsx)("span",{style:{fontSize:12,color:"#aaa"},children:p?`${eX(ed.people,"person","people")} \xb7 ${eV(ed.byTier.S)} S \xb7 ${eV(ed.multi)} with 2+ ways`:`${eX(ed.people,"person","people")} two steps away \xb7 ${eV(ed.byTier.S)} S-tier \xb7 ${eV(ed.multi)} reachable 2+ ways \xb7 through ${eV(ed.bridges)} of your connections`})]}),(0,t.jsx)("div",{"aria-hidden":"true",style:{display:"flex",gap:1,height:6,borderRadius:3,overflow:"hidden",margin:"8px 0 6px",background:"rgba(255,255,255,0.04)"},children:H.TIERS.filter(e=>ed.byTier[e]>0).map(e=>(0,t.jsx)("div",{style:{flex:ed.byTier[e],background:h[e]||"#555"}},e))}),(0,t.jsx)("div",{style:{fontSize:11,color:"#777",lineHeight:1.4},children:p?"Ranks reachability, not people · lists scanned so far":"Ranked by each person’s own score (title, company, headline). It ranks reachability, not people. From the lists scanned so far."}),ed.peopleOnlyUnresolved>0&&(0,t.jsxs)("div",{style:{marginTop:8,padding:"8px 10px",borderRadius:8,fontSize:11.5,lineHeight:1.5,color:"#e8d9a0",background:"rgba(255,215,0,0.06)",border:"1px solid rgba(255,215,0,0.25)"},children:[eX(ed.peopleOnlyUnresolved,"of these people","of these people")," ","came only through ",eX(ed.onlyUnresolvedVia,"connection record","connection records")," ","that ",1===ed.onlyUnresolvedVia?"doesn’t":"don’t"," match anyone in your 1st-degree list, so who introduces you can’t be named. They’re still ranked."]})]}),(0,t.jsxs)("div",{style:{padding:"0 56px 10px",flexShrink:0,display:"flex",gap:8,flexDirection:p?"column":"row",alignItems:p?"stretch":"center",flexWrap:p?"nowrap":"wrap",borderBottom:"1px solid rgba(255,255,255,0.06)"},children:[(0,t.jsx)("input",{ref:T,type:"search",value:x,onChange:e=>ea(e.target.value),onKeyDown:e=>{if("Enter"===e.key){let e=x.trim().toLowerCase(),t=E.find(t=>P(t,e));t&&K(t)}else"Escape"===e.key&&(x?ea(""):e.currentTarget.blur())},placeholder:"Search people, companies, or who knows them","aria-label":"Search people, companies, or who knows them",style:{flex:p?"none":"1 1 260px",minWidth:0,height:p?44:34,boxSizing:"border-box",padding:"0 12px",borderRadius:8,outline:"none",color:"#fff",fontSize:p?16:13,border:"1px solid rgba(255,255,255,0.12)",background:"rgba(255,255,255,0.05)"}}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0,flexWrap:p?"nowrap":"wrap",overflowX:p?"auto":"visible",scrollbarWidth:"thin",flexShrink:+!p},children:[(0,t.jsx)("div",{role:"group","aria-label":"Order",style:{display:"flex",flexShrink:0,background:"rgba(255,255,255,0.06)",borderRadius:8,padding:2},children:[["power","Power"],["ways","Ways in"]].map(([e,r])=>(0,t.jsx)("button",{type:"button","aria-pressed":b===e,onClick:()=>{j(e),es()},style:{height:p?40:30,padding:"0 12px",border:"none",borderRadius:6,cursor:"pointer",fontSize:12,fontWeight:700,whiteSpace:"nowrap",background:b===e?"linear-gradient(135deg, #FFD700, #FF6B35)":"transparent",color:b===e?"#000":"#999"},children:r},e))}),(0,t.jsx)("span",{style:{fontSize:10,color:"#666",whiteSpace:"nowrap",flexShrink:0,textTransform:"uppercase",letterSpacing:.5},children:"Their tier"}),["all",...H.TIERS].map(e=>{let r=v===e,n="all"===e?"#fff":h[e]||"#888",i="all"===e?ed.people:ed.byTier[e];return(0,t.jsxs)("button",{type:"button","aria-pressed":r,onClick:()=>{w(e),es()},style:{height:p?40:30,padding:"0 10px",borderRadius:15,cursor:"pointer",flexShrink:0,fontSize:12,fontWeight:700,whiteSpace:"nowrap",border:`1px solid ${r?n:"rgba(255,255,255,0.1)"}`,background:r?`${"#fff"===n?"#ffffff":n}22`:"rgba(255,255,255,0.03)",color:r?n:"#999"},children:["all"===e?"All":e,(0,t.jsx)("span",{style:{marginLeft:5,fontWeight:500,color:r?n:"#666",opacity:.85},children:eV(i)})]},e)}),(0,t.jsx)("span",{title:e5,style:{fontSize:10,color:"#666",whiteSpace:"nowrap",flexShrink:0,textTransform:"uppercase",letterSpacing:.5,marginLeft:6,cursor:"help"},children:"Rarity"}),eE.map(e=>{let r=S.has(e.key);return(0,t.jsxs)("button",{type:"button","aria-pressed":r,onClick:()=>{var t;return t=e.key,void(k(e=>eP(e,t)),es())},title:`${e.label}: ${e.range} mutual connection${"1"===e.range?"":"s"}. ${e5}`,style:{height:p?40:30,padding:"0 10px",borderRadius:15,cursor:"pointer",flexShrink:0,fontSize:12,fontWeight:700,whiteSpace:"nowrap",border:`1px solid ${r?e.color:"rgba(255,255,255,0.1)"}`,background:r?`${e.color}22`:"rgba(255,255,255,0.03)",color:r?e.color:"#999"},children:[e.label,(0,t.jsx)("span",{style:{marginLeft:5,fontWeight:500,color:r?e.color:"#666",opacity:.85},children:eV(L[e.key])})]},e.key)})]})]}),(0,t.jsx)("div",{ref:M,onScroll:el,style:{flex:1,minHeight:0,overflowY:"auto",overflowX:"hidden",position:"relative",padding:`0 ${f}px`},children:(0,t.jsxs)("div",{style:{position:"relative",maxWidth:980,margin:"0 auto",height:en},children:[U.length>0&&(0,t.jsxs)("div",{style:{height:et,boxSizing:"border-box",paddingTop:10},children:[(0,t.jsxs)("div",{style:{height:ee-10,overflow:"hidden"},children:[(0,t.jsxs)("div",{style:{fontSize:12,fontWeight:700,color:"#ddd",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:["Top ",eV(U.length)," you haven’t asked, of ",eV(N.length),ec?" shown":""," · every way in drawn"]}),(0,t.jsxs)("div",{style:{fontSize:10,color:"#777",marginTop:2,whiteSpace:p?"normal":"nowrap",overflow:"hidden",textOverflow:"ellipsis",lineHeight:1.35},children:[V>0&&(0,t.jsxs)("span",{style:{color:"#FFD700"},children:[eV(V)," asked or connected, so it moved on · "]}),(0,t.jsx)("span",{style:{color:eH},children:"solid orange"})," = top-scored bridge · dashed = other routes · dot size = ways in"]})]}),Z>0&&(0,t.jsx)(eZ,{layout:Q,selectedKey:X,tierColors:h,youLabel:eh,isMobile:p,onPick:K,onPickBridge:J})]}),N.length>0&&(0,t.jsxs)("div",{style:{height:28,display:"grid",alignItems:"center",gap:10,padding:"0 12px 0 15px",gridTemplateColumns:p?"44px 36px 1fr 44px":"64px 36px minmax(0,1.4fr) minmax(0,1fr) 96px 44px",fontSize:9,fontWeight:700,color:"#555",textTransform:"uppercase",letterSpacing:.5,borderBottom:"1px solid rgba(255,255,255,0.08)",boxSizing:"border-box"},children:[(0,t.jsx)("span",{title:"Rank by score, then ways in. = means tied",children:"#"}),(0,t.jsx)("span",{}),p?(0,t.jsx)("span",{children:"Person · way in"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"Person"}),(0,t.jsx)("span",{children:"Way in"}),(0,t.jsx)("span",{children:"Power"})]}),(0,t.jsx)("span",{style:{textAlign:"right"},children:p?"Score":""})]}),ep.map((e,r)=>(0,t.jsx)(e2,{p:e,top:er+(ei+r)*g,height:g,isMobile:p,selected:e.key===X,tierColors:h,onPick:K,q:m,status:Y(e),rarity:A.get(e.key)},e.key)),0===N.length&&(0,t.jsxs)("div",{style:{position:"absolute",top:40,left:0,right:0,textAlign:"center",color:"#888",fontSize:13,padding:"0 16px"},children:[m?(0,t.jsxs)(t.Fragment,{children:["No one matches ‘",x.trim(),"’. Search covers names, headlines, companies and who knows them."]}):(0,t.jsx)(t.Fragment,{children:"No one here with those filters."}),(0,t.jsx)("div",{style:{marginTop:12},children:(0,t.jsx)("button",{type:"button",onClick:()=>{y(""),w("all"),k(new Set),es()},style:{padding:"8px 16px",borderRadius:8,cursor:"pointer",fontSize:12,fontWeight:700,border:"1px solid rgba(255,255,255,0.15)",background:"rgba(255,255,255,0.06)",color:"#fff"},children:"Clear"})})]})]})})]})},modes:["degrees"],label:"Separation",icon:"🏆",desc:"Every 2nd degree, ranked · every way in"},chain:{component:function({connections:e,degree2:n=[],onSelect:o,userName:s,fullDegree1:a,fullDegree2:d,scanNotes:c,canScan:h=!0,chainOpen:p=null,onChainOpened:g}){let u=(0,r.useRef)(null),[f,x]=(0,r.useState)(null),[y,m]=(0,r.useState)(1.3),[b,j]=(0,r.useState)({w:800,h:600}),v=a||e,w=d||n,[S,k]=(0,r.useState)(()=>(function(e,t){if(!e)return[];let r=t.find(t=>t.id===e);if(!r)return[];let n=r.unlocked_from_bridge_id;return null!=n&&t.some(e=>e.id===n)?[n,e]:[e]})(p,v));(0,r.useEffect)(()=>{p&&g?.()},[p,g]);let z=(0,r.useSyncExternalStore)(h?i.watchScanner:eu,ep,eg),_=(0,r.useSyncExternalStore)(ex,ey,em),C=(0,l.default)();(0,r.useEffect)(()=>{let e=u.current;if(!e)return;let t=()=>{let t=Math.round(e.clientWidth),r=Math.round(e.clientHeight);j(e=>e.w===t&&e.h===r?e:{w:t,h:r})},r=new ResizeObserver(t);return r.observe(e),t(),()=>r.disconnect()},[]);let F=(0,r.useMemo)(()=>U(v,w),[v,w]),W=(0,r.useMemo)(()=>(0,K.reachIndex)(v,w,c),[v,w,c]),R=(0,r.useMemo)(()=>(0,K.readyByCircle)(W),[W]),$=(0,r.useMemo)(()=>{let e=new Map;for(let t of w)e.set(t.id,t);for(let t of v)e.set(t.id,t);return e},[v,w]),B=[];for(let e of S){let t=$.get(e);if(!t)break;B.push(t)}let T=B.length>0;(0,r.useEffect)(()=>{if(!T)return;let e=e=>{"Escape"!==e.key||/^(INPUT|TEXTAREA|SELECT)$/.test(e.target?.tagName||"")||document.querySelector('[role="dialog"][aria-modal="true"]')||k(e=>e.slice(0,-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[T]);let I={};n.forEach(e=>{e.source_connection_id&&(I[e.source_connection_id]||(I[e.source_connection_id]=[]),I[e.source_connection_id].push(e))});let E=e.filter(e=>I[e.id]&&I[e.id].length>0).sort((e,t)=>(I[t.id]?.length||0)-(I[e.id]?.length||0)),D=b.w/2,A=b.h/2,L=Math.min(D,A)-30,O=et(E.length,{inner:.55*L,innerMin:.4*L,outer:.62*L,spacing:46,minSpacing:20}),P=E.map((e,t)=>{let r=O.points[t];return{...e,x:D+r.x,y:A+r.y,angle:r.angle,clusterSize:(I[e.id]||[]).length}}),N=(0,r.useRef)([]);(0,r.useEffect)(()=>{N.current=P.map(e=>({id:e.id,angle:e.angle}))});let q=(0,r.useRef)(0);if((0,r.useEffect)(()=>{let e=u.current;if(!e||T)return;let t=(t,r)=>{let n=e.getBoundingClientRect(),i=t-n.left,o=Math.atan2(r-n.top-b.h/2,i-b.w/2),l=null,s=1/0;return N.current.forEach(e=>{let t=Math.abs(o-e.angle)%(2*Math.PI);t>Math.PI&&(t=2*Math.PI-t),t<s&&(s=t,l=e.id)}),l},r=e=>{if(e.touches[0]){let r=t(e.touches[0].clientX,e.touches[0].clientY);r&&x(r)}},n=e=>{e.preventDefault();let r=Date.now();if(!(r-q.current<16)&&(q.current=r,e.touches[0])){let r=t(e.touches[0].clientX,e.touches[0].clientY);r&&x(r)}};return e.addEventListener("touchstart",r,{passive:!1}),e.addEventListener("touchmove",n,{passive:!1}),()=>{e.removeEventListener("touchstart",r),e.removeEventListener("touchmove",n)}},[b,y,T]),T)return(0,t.jsx)("div",{ref:u,style:{flex:1,background:"#0a0a1a",position:"relative",overflow:"hidden"},children:(0,t.jsx)(ek,{trail:B,index:F,reach:W,dims:b,requests:C,scanningId:z,still:_,canScan:h,onOpen:e=>k(B.map(e=>e.id).concat(e)),onBack:e=>k(B.slice(0,e).map(e=>e.id)),onSelect:o},B.map(e=>e.id).join(">"))});let H=n.length,Y=n.filter(e=>"S"===e.tier).length,V=n.filter(e=>"A"===e.tier).length,X=f?P.find(e=>e.id===f):null;return(0,t.jsxs)("div",{ref:u,style:{flex:1,background:"#0a0a1a",position:"relative",overflow:"hidden"},children:[(0,t.jsx)("svg",{width:b.w,height:b.h,children:(0,t.jsxs)("g",{transform:`translate(${D*(1-y)}, ${A*(1-y)}) scale(${y})`,children:[(0,t.jsx)("circle",{cx:D,cy:A,r:.55*L,fill:"none",stroke:`${ei[1]}10`,strokeWidth:1}),X&&(0,t.jsx)(ej,{bridge:X,members:eb(X,F),reach:W,cx:D,cy:A,maxR:L,still:_}),P.map(e=>{let r=f===e.id,n=(I[e.id]||[]).filter(e=>"S"===e.tier).length,i=(I[e.id]||[]).filter(e=>"A"===e.tier).length,o=R.get(e.id)||0;return(0,t.jsxs)("g",{onClick:()=>{x(null),k([e.id])},onMouseEnter:()=>x(e.id),onMouseLeave:()=>x(null),style:{cursor:"pointer"},children:[(0,t.jsx)("circle",{cx:e.x,cy:e.y,r:r?20:16,fill:`${en[e.tier]}08`,stroke:`${en[e.tier]}${r?"60":"25"}`,strokeWidth:1}),(0,t.jsx)("circle",{cx:e.x,cy:e.y,r:r?13:11,fill:(0,M.localPhoto)(e.profile_image_url)?"#1a1a2e":en[e.tier],stroke:r?"#fff":en[e.tier],strokeWidth:r?2.5:2}),(0,M.localPhoto)(e.profile_image_url)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("clipPath",{id:"bc-"+e.id,children:(0,t.jsx)("circle",{cx:e.x,cy:e.y,r:r?11:9})}),(0,t.jsx)("image",{href:(0,M.localPhoto)(e.profile_image_url),x:e.x-(r?11:9),y:e.y-(r?11:9),width:r?22:18,height:r?22:18,clipPath:`url(#bc-${e.id})`})]}),!(0,M.localPhoto)(e.profile_image_url)&&(0,t.jsx)("text",{x:e.x,y:e.y+4,textAnchor:"middle",fill:"S"===e.tier?"#000":"#fff",fontSize:11,fontWeight:700,children:e.name?.charAt(0)}),o>0&&(0,t.jsxs)("g",{children:[(0,t.jsx)("title",{children:`${o} you reached through ${ed(e)}’s circle ${1===o?"is":"are"} ready for a scan`}),(0,t.jsx)("rect",{x:e.x+7,y:e.y-21,width:o>9?40:34,height:11,rx:5.5,fill:"rgba(0,255,136,0.16)",stroke:el,strokeWidth:.6}),(0,t.jsxs)("text",{x:e.x+7+(o>9?20:17),y:e.y-13,textAnchor:"middle",fill:el,fontSize:7,fontWeight:800,children:[o," ready"]})]}),(0,t.jsx)("text",{x:e.x,y:e.y+(r?24:22),textAnchor:"middle",fill:"#fff",fontSize:9,fontWeight:600,children:e.name?.split(" ")[0]}),(0,t.jsxs)("text",{x:e.x,y:e.y+(r?34:32),textAnchor:"middle",fill:"#888",fontSize:7,children:[e.clusterSize," · ",n>0?n+"S ":"",i>0?i+"A":""]})]},"b-"+e.id)}),(0,t.jsx)("circle",{cx:D,cy:A,r:22,fill:"#0a0a1a",stroke:"#FFD700",strokeWidth:3}),(0,t.jsx)("text",{x:D,y:A+4,textAnchor:"middle",fill:"#FFD700",fontSize:11,fontWeight:800,children:s?.split(" ")[0]||"YOU"})]})}),(0,t.jsx)(eS,{onIn:()=>m(e=>Math.min(3,e+.3)),onReset:()=>m(1.3),onOut:()=>m(e=>Math.max(.4,e-.3))}),(0,t.jsxs)("div",{style:{position:"absolute",bottom:16,left:12,background:"rgba(0,0,0,0.75)",borderRadius:10,padding:"10px 14px",backdropFilter:"blur(12px)",border:"1px solid rgba(255,255,255,0.06)",maxWidth:"calc(100vw - 80px)"},children:[(0,t.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#666",letterSpacing:1.5,marginBottom:8},children:"DEGREES OF SEPARATION"}),(0,t.jsx)("div",{style:{display:"flex",gap:8},children:[1,2,3,4,5,6].map(r=>(0,t.jsxs)("div",{style:{textAlign:"center"},children:[(0,t.jsxs)("div",{style:{width:28,height:28,borderRadius:"50%",fontSize:11,fontWeight:800,display:"flex",alignItems:"center",justifyContent:"center",background:r<=2?ei[r]:"rgba(255,255,255,0.04)",color:r<=2?"#000":"#333",border:r<=2?"none":"1px solid rgba(255,255,255,0.08)",boxShadow:r<=2?`0 0 6px ${ei[r]}30`:"none"},children:["D",r]}),(0,t.jsx)("div",{style:{fontSize:7,color:r<=2?"#aaa":"#333",marginTop:3},children:1===r?e.length:2===r?H:"—"})]},r))}),(0,t.jsxs)("div",{style:{fontSize:9,color:"#555",marginTop:8},children:[E.length," bridges · ",Y," S + ",V," A at 2nd degree"]}),(0,t.jsx)("div",{style:{fontSize:8,color:"#444",marginTop:4},children:"Click a bridge to open their circle, then anyone in it to open theirs"})]})]})},modes:["degrees"],label:"Bridge Chains",icon:"🔗",desc:"Degree paths"},rings:{component:function({connections:e,degree2:n=[],onSelect:i,mode:o}){let[l,s]=(0,r.useState)(null);if("degrees"===o&&n.length>0){let r={};n.forEach(e=>{e.source_connection_id&&(r[e.source_connection_id]||(r[e.source_connection_id]=[]),r[e.source_connection_id].push(e))});let o=Object.entries(r).map(([t,r])=>{let n=e.find(e=>e.id===t);if(!n)return null;let i=r.filter(e=>"S"===e.tier).length,o=r.filter(e=>"A"===e.tier).length;return{bridge:n,members:r,sCount:i,aCount:o,total:r.length,value:3*i+2*o+r.length}}).filter(Boolean).sort((e,t)=>t.value-e.value),a={S:36,A:28,B:22,C:16,D:12};return(0,t.jsx)("div",{style:{flex:1,overflow:"auto",background:"#0a0a1a",padding:"20px 10px"},children:(0,t.jsx)("div",{style:{maxWidth:1200,margin:"0 auto"},children:o.map((e,r)=>{let n={};return eI.forEach(e=>{n[e]=[]}),e.members.forEach(e=>{(n[e.tier]||n.D).push(e)}),eI.forEach(e=>{n[e].sort((e,t)=>(parseFloat(t.power_score)||0)-(parseFloat(e.power_score)||0))}),(0,t.jsxs)("div",{style:{marginBottom:30},children:[(0,t.jsx)("div",{style:{textAlign:"center",marginBottom:12},children:(0,t.jsxs)("div",{onClick:()=>i&&i(e.bridge),onMouseEnter:()=>s(e.bridge.id),onMouseLeave:()=>s(null),style:{display:"inline-block",cursor:"pointer",position:"relative"},children:[(0,t.jsx)("div",{style:{width:56,height:56,borderRadius:"50%",margin:"0 auto",border:`3px solid ${eT[e.bridge.tier]}`,overflow:"hidden",background:"#1a1a2e",boxShadow:l===e.bridge.id?`0 0 20px ${eT[e.bridge.tier]}60`:`0 0 10px ${eT[e.bridge.tier]}20`,transition:"box-shadow 0.2s"},children:(0,M.localPhoto)(e.bridge.profile_image_url)?(0,t.jsx)("img",{src:(0,M.localPhoto)(e.bridge.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"}}):(0,t.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:eT[e.bridge.tier],color:"S"===e.bridge.tier?"#000":"#fff",fontSize:20,fontWeight:800},children:e.bridge.name?.charAt(0)})}),(0,t.jsx)("div",{style:{fontSize:12,fontWeight:700,color:"#fff",marginTop:4},children:e.bridge.name}),(0,t.jsxs)("div",{style:{fontSize:9,color:eT[e.bridge.tier],fontWeight:600},children:[e.bridge.tier,"-Tier · ",e.total," connections · ",e.sCount>0?e.sCount+"S ":"",e.aCount>0?e.aCount+"A":""]})]})}),eI.map(e=>{let r=n[e];if(0===r.length)return null;let o=a[e],d="S"===e?10:"A"===e?6:4;return(0,t.jsxs)("div",{style:{marginBottom:6},children:[(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:d},children:r.map(r=>{let n=l===r.id;return(0,t.jsxs)("div",{onClick:()=>i&&i(r),onMouseEnter:()=>s(r.id),onMouseLeave:()=>s(null),style:{position:"relative",cursor:"pointer"},children:[(0,t.jsx)("div",{style:{width:o,height:o,borderRadius:"50%",border:`2px solid ${eT[e]}`,overflow:"hidden",background:(0,M.localPhoto)(r.profile_image_url)?"#111":eT[e],transition:"transform 0.15s, box-shadow 0.15s",transform:n?"scale(1.3)":"scale(1)",boxShadow:n?`0 0 12px ${eT[e]}60`:"none"},children:(0,M.localPhoto)(r.profile_image_url)?(0,t.jsx)("img",{src:(0,M.localPhoto)(r.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"},onError:t=>{t.target.style.display="none",t.target.parentElement.style.background=eT[e]}}):(0,t.jsx)("span",{style:{display:"flex",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",fontSize:.4*o,fontWeight:700,color:"S"===e?"#000":"#fff"},children:r.name?.charAt(0)})}),("S"===e||n)&&(0,t.jsx)("div",{style:{position:"absolute",top:o+2,left:"50%",transform:"translateX(-50%)",whiteSpace:"nowrap",textAlign:"center",zIndex:20,pointerEvents:"none"},children:(0,t.jsxs)("div",{style:{fontSize:n?10:8,fontWeight:600,color:n?"#fff":"#aaa",background:n?"rgba(0,0,0,0.85)":"transparent",padding:n?"3px 8px":0,borderRadius:4},children:[r.name?.split(" ")[0],n&&(0,t.jsx)("span",{style:{color:eT[e],marginLeft:4},children:parseFloat(r.power_score||0).toFixed(1)})]})})]},r.id)})}),(0,t.jsx)("div",{style:{height:1,margin:"6px auto 0",width:`${40+10*eI.indexOf(e)}%`,background:`linear-gradient(90deg, transparent, ${eT[e]}20, transparent)`}})]},e)})]},e.bridge.id)})})})}let a={};eI.forEach(e=>{a[e]=[]}),e.forEach(e=>{let t=e.tier||"D";a[t]&&a[t].push(e)}),eI.forEach(e=>{a[e].sort((e,t)=>(parseFloat(t.power_score)||0)-(parseFloat(e.power_score)||0))});let d={S:44,A:34,B:26,C:20,D:16};return(0,t.jsx)("div",{style:{flex:1,overflow:"auto",background:"#0a0a1a",padding:"20px 10px"},children:(0,t.jsx)("div",{style:{maxWidth:1200,margin:"0 auto"},children:eI.map((e,r)=>{let n=a[e];if(0===n.length)return null;let o=d[e],c="S"===e?12:"A"===e?8:"B"===e?6:4;return(0,t.jsxs)("div",{style:{marginBottom:"S"===e?20:"A"===e?16:10},children:[(0,t.jsxs)("div",{style:{textAlign:"center",marginBottom:8,fontSize:"S"===e?14:11,fontWeight:700,color:eT[e],opacity:"S"===e?1:.7},children:["S"===e&&"👑 ",e,"-Tier (",n.length,")"]}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:c,padding:"0 20px"},children:n.map(r=>{let n=l===r.id;return(0,t.jsxs)("div",{onClick:()=>i&&i(r),onMouseEnter:()=>s(r.id),onMouseLeave:()=>s(null),style:{position:"relative",cursor:"pointer"},children:[(0,t.jsx)("div",{style:{width:o,height:o,borderRadius:"50%",border:`2px solid ${eT[e]}`,overflow:"hidden",background:(0,M.localPhoto)(r.profile_image_url)?"#111":eT[e],display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.15s, box-shadow 0.15s",transform:n?"scale(1.3)":"scale(1)",boxShadow:n?`0 0 16px ${eT[e]}60`:"none",zIndex:n?10:1,position:"relative"},children:(0,M.localPhoto)(r.profile_image_url)?(0,t.jsx)("img",{src:(0,M.localPhoto)(r.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"},onError:t=>{t.target.style.display="none",t.target.parentElement.style.background=eT[e]}}):(0,t.jsx)("span",{style:{fontSize:.4*o,fontWeight:700,color:"S"===e?"#000":"#fff"},children:r.name?.charAt(0)})}),("S"===e||n)&&(0,t.jsxs)("div",{style:{position:"absolute",top:o+4,left:"50%",transform:"translateX(-50%)",whiteSpace:"nowrap",textAlign:"center",zIndex:20,pointerEvents:"none"},children:[(0,t.jsxs)("div",{style:{fontSize:"S"===e?9:10,fontWeight:600,color:n?"#fff":"#aaa",background:n?"rgba(0,0,0,0.85)":"transparent",padding:n?"3px 8px":0,borderRadius:4},children:[r.name?.split(" ")[0],n&&(0,t.jsx)("span",{style:{color:eT[e],marginLeft:4,fontWeight:800},children:parseFloat(r.power_score||0).toFixed(1)})]}),n&&r.headline&&(0,t.jsx)("div",{style:{fontSize:8,color:"#888",marginTop:2,background:"rgba(0,0,0,0.85)",padding:"2px 6px",borderRadius:3,maxWidth:160,overflow:"hidden",textOverflow:"ellipsis"},children:r.headline.substring(0,40)})]})]},r.id)})}),r<eI.length-1&&(0,t.jsx)("div",{style:{height:1,margin:"12px auto 0",width:`${50+12*r}%`,background:`linear-gradient(90deg, transparent, ${eT[e]}30, transparent)`}})]},e)})})})},modes:["network","degrees"],label:"Pyramid",icon:"🔺",desc:"Tier hierarchy"},list:{component:function({connections:e,degree2:r=[],onSelect:n,mode:i}){if("degrees"===i){let i={};r.forEach(e=>{e.source_connection_id&&(i[e.source_connection_id]||(i[e.source_connection_id]=[]),i[e.source_connection_id].push(e))});let o=Object.entries(i).map(([t,r])=>{let n=e.find(e=>e.id===t);if(!n)return null;let i=r.filter(e=>"S"===e.tier).length,o=r.filter(e=>"A"===e.tier).length,l=3*i+2*o+r.length;return{bridge:n,members:r,sCount:i,aCount:o,total:r.length,value:l}}).filter(Boolean).sort((e,t)=>t.value-e.value);return(0,t.jsx)("div",{style:{flex:1,overflow:"auto",padding:"16px 24px",background:"#0a0a1a"},children:(0,t.jsxs)("div",{style:{maxWidth:800,margin:"0 auto"},children:[(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"40px 1fr 50px 50px 50px 80px",gap:8,padding:"8px 12px",fontSize:9,fontWeight:700,color:"#555",borderBottom:"1px solid rgba(255,255,255,0.1)",textTransform:"uppercase",letterSpacing:.5},children:[(0,t.jsx)("span",{children:"#"}),(0,t.jsx)("span",{children:"Bridge"}),(0,t.jsx)("span",{children:"S"}),(0,t.jsx)("span",{children:"A"}),(0,t.jsx)("span",{children:"Total"}),(0,t.jsx)("span",{children:"Value"})]}),o.map((e,r)=>(0,t.jsxs)("div",{onClick:()=>n&&n(e.bridge),style:{display:"grid",gridTemplateColumns:"40px 1fr 50px 50px 50px 80px",gap:8,padding:"10px 12px",alignItems:"center",cursor:"pointer",borderBottom:"1px solid rgba(255,255,255,0.04)",transition:"background 0.1s"},onMouseEnter:e=>e.currentTarget.style.background="rgba(255,255,255,0.04)",onMouseLeave:e=>e.currentTarget.style.background="transparent",children:[(0,t.jsx)("span",{style:{fontSize:12,fontWeight:700,color:"#444"},children:r+1}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0},children:[(0,M.localPhoto)(e.bridge.profile_image_url)?(0,t.jsx)("img",{src:(0,M.localPhoto)(e.bridge.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`2px solid ${eM[e.bridge.tier]}`},onError:e=>{e.target.style.display="none"}}):(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",flexShrink:0,fontSize:10,fontWeight:700,background:eM[e.bridge.tier],color:"#000",display:"flex",alignItems:"center",justifyContent:"center"},children:e.bridge.name?.charAt(0)}),(0,t.jsxs)("div",{style:{minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:12,fontWeight:600,color:"#fff",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.bridge.name}),(0,t.jsxs)("div",{style:{fontSize:9,color:eM[e.bridge.tier],fontWeight:600},children:[e.bridge.tier,"-Tier"]})]})]}),(0,t.jsx)("span",{style:{fontSize:13,fontWeight:800,color:"#FFD700"},children:e.sCount}),(0,t.jsx)("span",{style:{fontSize:13,fontWeight:700,color:"#9B59B6"},children:e.aCount}),(0,t.jsx)("span",{style:{fontSize:12,color:"#888"},children:e.total}),(0,t.jsx)("div",{children:(0,t.jsx)("div",{style:{height:6,background:"rgba(255,255,255,0.06)",borderRadius:3},children:(0,t.jsx)("div",{style:{height:"100%",borderRadius:3,background:`linear-gradient(90deg, ${eM[e.bridge.tier]}, #FF6B35)`,width:`${Math.min(100,e.value/Math.max(o[0]?.value||1,1)*100)}%`}})})})]},e.bridge.id))]})})}let o=[...e].sort((e,t)=>(parseFloat(t.power_score)||0)-(parseFloat(e.power_score)||0)),l=parseFloat(o[0]?.power_score)||10;return(0,t.jsx)("div",{style:{flex:1,overflow:"auto",padding:"16px 24px",background:"#0a0a1a"},children:(0,t.jsxs)("div",{style:{maxWidth:800,margin:"0 auto"},children:[(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"40px 36px 1fr 60px 120px",gap:8,padding:"8px 12px",fontSize:9,fontWeight:700,color:"#555",borderBottom:"1px solid rgba(255,255,255,0.1)",textTransform:"uppercase",letterSpacing:.5},children:[(0,t.jsx)("span",{children:"#"}),(0,t.jsx)("span",{}),(0,t.jsx)("span",{children:"Name"}),(0,t.jsx)("span",{children:"Score"}),(0,t.jsx)("span",{children:"Power"})]}),o.map((e,r)=>(0,t.jsxs)("div",{onClick:()=>n&&n(e),style:{display:"grid",gridTemplateColumns:"40px 36px 1fr 60px 120px",gap:8,padding:"8px 12px",alignItems:"center",cursor:"pointer",borderBottom:"1px solid rgba(255,255,255,0.04)",background:r<3?`${eM[e.tier]}08`:"transparent",transition:"background 0.1s"},onMouseEnter:e=>e.currentTarget.style.background="rgba(255,255,255,0.04)",onMouseLeave:t=>t.currentTarget.style.background=r<3?`${eM[e.tier]}08`:"transparent",children:[(0,t.jsx)("span",{style:{fontSize:12,fontWeight:700,color:r<3?eM[e.tier]:"#444"},children:r+1}),(0,M.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,M.localPhoto)(e.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",border:`2px solid ${eM[e.tier]}`},onError:e=>{e.target.style.display="none"}}):(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",fontSize:10,fontWeight:700,background:eM[e.tier],color:"S"===e.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:12,fontWeight:600,color:"#fff",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,t.jsx)("div",{style:{fontSize:9,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.headline?.substring(0,45)})]}),(0,t.jsxs)("div",{style:{textAlign:"center"},children:[(0,t.jsx)("span",{style:{fontSize:13,fontWeight:800,color:eM[e.tier]},children:parseFloat(e.power_score||0).toFixed(1)}),(0,t.jsx)("div",{style:{fontSize:8,color:"#555"},children:e.tier})]}),(0,t.jsx)("div",{style:{height:6,background:"rgba(255,255,255,0.06)",borderRadius:3},children:(0,t.jsx)("div",{style:{height:"100%",borderRadius:3,background:eM[e.tier],width:`${parseFloat(e.power_score||0)/l*100}%`}})})]},e.id))]})})},modes:["network","degrees"],label:"List",icon:"☰",desc:"Ranked power list"},grid:{component:function({connections:e,degree2:r=[],onSelect:n,mode:i}){if("degrees"===i){let i={};r.forEach(e=>{e.source_connection_id&&(i[e.source_connection_id]||(i[e.source_connection_id]=[]),i[e.source_connection_id].push(e))});let o=Object.entries(i).map(([t,r])=>{let n=e.find(e=>e.id===t);if(!n)return null;let i=r.filter(e=>"S"===e.tier).length,o=r.filter(e=>"A"===e.tier).length;return{bridge:n,members:r,sCount:i,aCount:o,total:r.length}}).filter(Boolean).sort((e,t)=>3*t.sCount+2*t.aCount+t.total-(3*e.sCount+2*e.aCount+e.total));return(0,t.jsx)("div",{style:{flex:1,overflow:"auto",padding:20,background:"#0a0a1a"},children:(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))",gap:12,maxWidth:1200,margin:"0 auto"},children:o.map(e=>(0,t.jsxs)("div",{onClick:()=>n&&n(e.bridge),style:{padding:16,borderRadius:12,cursor:"pointer",background:"rgba(255,255,255,0.03)",border:`1px solid ${e$[e.bridge.tier]||"#333"}30`,borderLeft:`4px solid ${e$[e.bridge.tier]||"#555"}`,transition:"all 0.15s"},onMouseEnter:e=>e.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:e=>e.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,M.localPhoto)(e.bridge.profile_image_url)?(0,t.jsx)("img",{src:(0,M.localPhoto)(e.bridge.profile_image_url),alt:"",style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",border:`2px solid ${e$[e.bridge.tier]}`},onError:e=>{e.target.style.display="none"}}):(0,t.jsx)("div",{style:{width:40,height:40,borderRadius:"50%",fontSize:16,fontWeight:700,background:e$[e.bridge.tier],color:"#000",display:"flex",alignItems:"center",justifyContent:"center"},children:e.bridge.name?.charAt(0)}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:13,fontWeight:700,color:"#fff"},children:e.bridge.name}),(0,t.jsx)("div",{style:{fontSize:9,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.bridge.headline?.substring(0,40)})]}),(0,t.jsx)("span",{style:{fontSize:12,fontWeight:800,color:e$[e.bridge.tier]},children:e.bridge.tier})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:6,fontSize:10},children:[e.sCount>0&&(0,t.jsxs)("span",{style:{color:"#FFD700",fontWeight:600},children:[e.sCount,"S"]}),e.aCount>0&&(0,t.jsxs)("span",{style:{color:"#9B59B6",fontWeight:600},children:[e.aCount,"A"]}),(0,t.jsxs)("span",{style:{color:"#666"},children:[e.total," total"]})]}),(0,t.jsxs)("div",{style:{display:"flex",marginTop:8},children:[e.members.slice(0,8).map((e,r)=>(0,t.jsx)("div",{style:{width:22,height:22,borderRadius:"50%",fontSize:8,fontWeight:700,background:(0,M.localPhoto)(e.profile_image_url)?"transparent":e$[e.tier]||"#333",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",border:"2px solid #0a0a1a",marginLeft:r>0?-6:0,position:"relative",zIndex:8-r,overflow:"hidden"},children:(0,M.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,M.localPhoto)(e.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"}}):e.name?.charAt(0)},e.id)),e.total>8&&(0,t.jsxs)("span",{style:{fontSize:9,color:"#555",marginLeft:4,alignSelf:"center"},children:["+",e.total-8]})]})]},e.bridge.id))})})}let o={};return eB.forEach(e=>{o[e]=[]}),e.forEach(e=>{let t=e.tier||"D";o[t]&&o[t].push(e)}),eB.forEach(e=>{o[e].sort((e,t)=>(parseFloat(t.power_score)||0)-(parseFloat(e.power_score)||0))}),(0,t.jsx)("div",{style:{flex:1,overflow:"auto",padding:20,background:"#0a0a1a"},children:(0,t.jsx)("div",{style:{maxWidth:1200,margin:"0 auto"},children:eB.map(e=>{let r=o[e];return 0===r.length?null:(0,t.jsxs)("div",{style:{marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 0 10px",borderBottom:`2px solid ${e$[e]}30`,marginBottom:10},children:[(0,t.jsx)("div",{style:{width:10,height:10,borderRadius:"50%",background:e$[e]}}),(0,t.jsxs)("span",{style:{fontSize:15,fontWeight:800,color:e$[e]},children:[e,"-Tier"]}),(0,t.jsx)("span",{style:{fontSize:12,color:"#555"},children:r.length})]}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(180px, 1fr))",gap:8},children:r.map(r=>(0,t.jsxs)("div",{onClick:()=>n&&n(r),style:{padding:10,borderRadius:8,cursor:"pointer",background:"rgba(255,255,255,0.03)",border:`1px solid ${e$[e]}20`,transition:"all 0.15s"},onMouseEnter:e=>e.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:e=>e.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,M.localPhoto)(r.profile_image_url)?(0,t.jsx)("img",{src:(0,M.localPhoto)(r.profile_image_url),alt:"",style:{width:32,height:32,borderRadius:"50%",objectFit:"cover",border:`2px solid ${e$[e]}`},onError:e=>{e.target.style.display="none"}}):(0,t.jsx)("div",{style:{width:32,height:32,borderRadius:"50%",fontSize:12,fontWeight:700,background:e$[e],color:"S"===e?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:r.name?.charAt(0)}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:11,fontWeight:600,color:"#fff",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r.name}),(0,t.jsx)("div",{style:{fontSize:8,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r.headline?.substring(0,30)})]})]}),(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginTop:6,alignItems:"center"},children:[(0,t.jsx)("span",{style:{fontSize:10,fontWeight:700,color:e$[e]},children:parseFloat(r.power_score||0).toFixed(1)}),(0,t.jsx)("div",{style:{flex:1,marginLeft:8,height:3,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,t.jsx)("div",{style:{height:"100%",borderRadius:2,background:e$[e],width:`${Math.min(100,10*(parseFloat(r.power_score)||0))}%`}})})]})]},r.id))})]},e)})})})},modes:["network","degrees"],label:"Grid",icon:"▦",desc:"Cards"}},e6=["galaxy","orbit","separation","chain","rings","list"];function e3(e){return e6.filter(t=>e8[t]?.modes.includes(e)).map(e=>({key:e,...e8[e]}))}var e4=e.i(74080),e7=e.i(90179);let e9=/\/10, (your|sample) score\)/,te=/^(?:Former )?(?:Student · )?(.+?) \([\d.]+\) · (no company found|.+?) \(\d+(?:\.\d+)?\/10(?:[:,][^)]*)?\)/,tt={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},tr=["S","A","B","C","D"],tn="#00ff88";function ti({person:e,connections:n=[],degree2:i=[],tierColors:o=tt,onSelect:l,isRequested:s=Y,canScan:a=!0}){let d=(0,r.useMemo)(()=>U(n,i),[n,i]),c=(0,r.useMemo)(()=>(0,H.routeIndex)(i),[i]),{rings:h,totals:p}=(0,r.useMemo)(()=>(function(e,t,{maxDegree:r=6,isRequested:n=Y}={}){let i=[],o={people:0,connected:0,requested:0};if(!e||!t)return{rings:i,totals:o};let l=new Set([(0,H.keyFor)(e)]),s=[e];for(let e=2;e<=r&&s.length;e++){let r=[],a=[];for(let e of s){let i=[];for(let r of t.introduced.get(e.id)||[]){let t=(0,H.keyFor)(r);l.has(t)||(l.add(t),i.push({row:r,key:t,parentId:e.id,state:"connected"}),a.push(r))}for(let r of t.circles.get(e.id)||[]){let t=(0,H.keyFor)(r);l.has(t)||(l.add(t),i.push({row:r,key:t,parentId:e.id,state:n(r)?"requested":null}))}i.sort(X),r.push(...i)}if(!r.length)break;for(let e of r)o.people++,"connected"===e.state?o.connected++:"requested"===e.state&&o.requested++;i.push({degree:e,people:r}),s=a}return{rings:i,totals:o}})(e,d,{isRequested:s}),[e,d,s]),[g,u]=(0,r.useState)(()=>new Set),[f,x]=(0,r.useState)(()=>new Set),[y,m]=(0,r.useState)(!1),b=(0,r.useMemo)(()=>h.flatMap(e=>e.people.map(e=>{let t="connected"===e.state||1===e.row.degree?null:eL(e.row,c.get((0,H.keyFor)(e.row))?.size||1);return{key:e.key,tier:e.row.tier,rarity:t?.key??null,mutuals:t}})),[h,c]),j=(0,r.useMemo)(()=>new Map(b.map(e=>[e.key,e])),[b]),v=(0,r.useMemo)(()=>({tiers:g,rarities:f}),[g,f]),w=(0,r.useMemo)(()=>b.filter(e=>eO(e,v)).length,[b,v]),S=(0,r.useMemo)(()=>n.filter(e=>d.circles.has(e.id)).length,[n,d]),k=b.some(e=>e.mutuals?.from==="linkedin"),z=(0,r.useMemo)(()=>(function(e){let t,r,n,i;if(!e)return null;if(null==e.power_score||""===e.power_score||!e.tier)return{title:!1,company:!1,never:!0,companyName:null,reason:"They haven’t been scored yet."};let o=String(e.score_why||"").match(te);if(o)t=o[1],n=!(r="no company found"===o[2]?null:o[2])||!e9.test(e.score_why)&&!["known","data"].includes((0,e7.companyScore)(r).source);else{let i=(0,e7.scorePerson)(e);t=i.title.label,r=i.company||null,n=["none","default","network"].includes(i.companySource)}let l=t.startsWith("Audience of"),s="Title unclear"===t||t.includes("Works there");return(l&&(n=!1),s||n)?(i=s&&n?r?`Their headline doesn’t say their title, and the app doesn’t know ${r}.`:"Their headline names no title or company the app can read.":s?"Their headline doesn’t say their title.":r?`The app doesn’t know ${r}, so it counts as the middle of the scale.`:"The app couldn’t find where they work.",{title:s,company:n,never:!1,companyName:r,reason:i}):null})(e),[e]);if(!e)return null;if(!h.length){let r=e.name?.split(" ")[0]||"them";return(0,t.jsxs)("div",{style:z?{...tp,borderColor:"rgba(255,215,0,0.28)"}:tp,children:[(0,t.jsx)(th,{children:"Their circle"}),z?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{style:{fontSize:11.5,color:"#d8ccb0",lineHeight:1.5,marginBottom:9*!!a},children:[(0,t.jsx)("b",{style:{color:"#FFD700"},children:"Their score is a guess."})," ",z.reason,a&&(0,t.jsxs)(t.Fragment,{children:[" Scanning ",r,"'s circle shows who you can reach through them, and a strong circle adds up to +2 to their score."]})]}),a&&(0,t.jsx)("button",{type:"button",onClick:tc,style:{width:"100%",padding:"8px 10px",borderRadius:8,cursor:"pointer",fontSize:12,fontWeight:700,border:"1px solid rgba(255,215,0,0.4)",background:"rgba(255,215,0,0.08)",color:"#FFD700"},children:"Scan their circle ↓"})]}):a?(0,t.jsxs)("div",{style:{fontSize:11,color:"#999",lineHeight:1.5},children:["Not scanned yet. Scan ",r,"'s circle below to see who they know, and everyone you reach through them after that."]}):(0,t.jsx)("div",{style:{fontSize:11,color:"#999",lineHeight:1.5},children:"Not scanned."})]})}let _=Object.fromEntries(tr.map(e=>[e,b.filter(t=>t.tier===e).length])),C=function(e=[]){let t=Object.fromEntries(eE.map(e=>[e.key,0]));for(let r of e)r?.rarity&&void 0!==t[r.rarity]&&t[r.rarity]++;return t}(b),F=g.size>0||f.size>0,W=(0,t.jsx)(ts,{tierColors:o,byTier:_,byRarity:C,tiers:g,rarities:f,onTier:e=>u(t=>eP(t,e)),onRarity:e=>x(t=>eP(t,e)),onClear:()=>{u(new Set),x(new Set)}}),R=(0,t.jsxs)("div",{style:{fontSize:9.5,color:"#777",lineHeight:1.45,marginTop:6},children:["Rarity is how many mutual connections lead to someone. It never changes a score."," ",k?"LinkedIn’s own count where a scan saved it; otherwise the ways in from your scans.":`Counted from the ${S} ${1===S?"circle":"circles"} you’ve scanned, so it can only go up as you scan more.`]});return(0,t.jsxs)("div",{style:tp,children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:8},children:[(0,t.jsx)(th,{children:"Their circle"}),(0,t.jsx)("button",{type:"button",onClick:()=>m(!0),style:tu,"aria-label":"Open the large map",children:"Enlarge ⤢"})]}),(0,t.jsx)("button",{type:"button",onClick:()=>m(!0),"aria-label":`${e.name}'s circle: open the large map`,style:{display:"block",width:"100%",padding:0,border:"none",background:"none",cursor:"zoom-in"},children:(0,t.jsx)(to,{person:e,rings:h,facts:j,filter:v,tierColors:o,size:240})}),(0,t.jsx)(tl,{rings:h,totals:p,shown:F?w:null}),W,R,y&&(0,t.jsxs)(td,{onClose:()=>m(!1),title:`${e.name}’s circle`,children:[(0,t.jsx)(to,{person:e,rings:h,facts:j,filter:v,tierColors:o,size:640,labels:!0,onPick:e=>{m(!1),l?.(e)}}),(0,t.jsx)(tl,{rings:h,totals:p,shown:F?w:null}),W,(0,t.jsx)(ta,{}),R]})]})}function to({person:e,rings:n,facts:i,filter:o,tierColors:l,size:s,labels:a=!1,onPick:d}){let c=(0,r.useMemo)(()=>(function(e=[],t=240){let r=t/2,n=e.length,i=e=>r*(1===n?.78:.4+e/(n-1)*.52),o=e.map(e=>{let t=new Map;for(let r of e.people)t.has(r.parentId)||t.set(r.parentId,[]),t.get(r.parentId).push(r);return t}),l=(e,t)=>o[e+1]?.get(t)||[],s=new Map;for(let t=n-1;t>=0;t--)for(let r of e[t].people){let e="connected"===r.state?l(t,r.row.id).reduce((e,t)=>e+s.get(t),0):0;s.set(r,Math.max(1,e))}let a=[],d=[],c=new Map,h=-Math.PI/2;for(let p=0;p<n;p++){let g=i(p),u=G(2*Math.PI*g/Math.max(1,e[p].people.length)*.32,.8,t/60),f=[];for(let[e,t]of o[p]){let[n,i]=0===p?[h,h+2*Math.PI]:c.get(e)||[h,h+2*Math.PI],o=t.reduce((e,t)=>e+s.get(t),0),l=n;for(let e of t){let t=(i-n)*s.get(e)/o,a=l+t/2,d=r+g*Math.cos(a),h=r+g*Math.sin(a);f.push({...e,angle:a,x:d,y:h}),"connected"===e.state&&c.set(e.row.id,[l,l+t]),l+=t}}if(p+1<n){let e=i(p+1);for(let t of f){if("connected"!==t.state||!l(p,t.row.id).length)continue;let[n,i]=c.get(t.row.id),o=(n+i)/2;d.push({x1:t.x,y1:t.y,x2:r+e*Math.cos(o),y2:r+e*Math.sin(o)})}}a.push({degree:e[p].degree,radius:g,dotR:u,items:f})}return{size:t,center:{x:r,y:r},rings:a,spokes:d}})(n,s),[n,s]),h=c.center,p=s/240;return(0,t.jsxs)("svg",{viewBox:`0 0 ${s} ${s}`,width:"100%",style:{display:"block",maxWidth:s,margin:"0 auto"},role:"img","aria-label":`${e.name}'s circle, ${n.length} ${1===n.length?"ring":"rings"}`,children:[c.rings.map(e=>(0,t.jsxs)("g",{children:[(0,t.jsx)("circle",{cx:h.x,cy:h.y,r:e.radius,fill:"none",stroke:"rgba(255,255,255,0.07)",strokeWidth:.6*p}),(0,t.jsxs)("text",{x:h.x,y:h.y-e.radius-e.dotR-3*p,textAnchor:"middle",fontSize:6.5*p,fill:"#666",fontWeight:700,children:["D",e.degree]})]},e.degree)),c.spokes.map((e,r)=>(0,t.jsx)("line",{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,stroke:"rgba(0,255,136,0.35)",strokeWidth:.7*p},r)),c.rings.map(e=>e.items.map(r=>{let n=i.get(r.key),s=eO(n,o),c=l[r.row.tier]||"#888",h="connected"===r.state?1.7*e.dotR:e.dotR,p=[`${r.row.name} \xb7 ${r.row.tier}-tier${null!=r.row.power_score?` \xb7 ${Number(r.row.power_score).toFixed(1)}`:""}`,"connected"===r.state?"You added them":"requested"===r.state?"Request sent":null,n?.mutuals?`${eA(n.rarity)?.label}: ${n.mutuals.count} mutual${1===n.mutuals.count?"":"s"}${"scans"===n.mutuals.from?" (from your scans)":""}`:null].filter(Boolean).join("\n");return(0,t.jsxs)("g",{opacity:s?1:.12,style:d?{cursor:"pointer"}:void 0,onClick:d?e=>{e.stopPropagation(),d(r.row)}:void 0,children:[(0,t.jsx)("title",{children:p}),"requested"===r.state?(0,t.jsx)("circle",{cx:r.x,cy:r.y,r:1.25*h,fill:"none",stroke:c,strokeWidth:Math.max(.5,.45*h),strokeDasharray:`${Math.max(.6,.55*h)} ${Math.max(.5,.45*h)}`}):(0,t.jsx)("circle",{cx:r.x,cy:r.y,r:h,fill:c,stroke:"connected"===r.state?tn:"none",strokeWidth:Math.max(.6,.3*h)}),a&&"connected"===r.state&&(0,t.jsx)("text",{x:r.x,y:r.y-h-3,textAnchor:"middle",fontSize:9,fill:tn,fontWeight:700,children:String(r.row.name||"").split(" ")[0]})]},r.key)})),(0,t.jsx)("circle",{cx:h.x,cy:h.y,r:7*p,fill:l[e.tier]||"#888",stroke:"#fff",strokeWidth:.8*p}),(0,t.jsx)("text",{x:h.x,y:h.y+2.4*p,textAnchor:"middle",fontSize:6.5*p,fontWeight:800,fill:"S"===e.tier?"#000":"#fff",children:String(e.name||"?").charAt(0)})]})}function tl({rings:e,totals:r,shown:n}){return(0,t.jsxs)("div",{style:{fontSize:10.5,color:"#aaa",marginTop:6,lineHeight:1.5},children:[e.map(e=>`D${e.degree} ${e.people.length.toLocaleString("en-US")}`).join(" · "),r.connected>0&&(0,t.jsxs)("span",{style:{color:tn},children:[" · you added ",r.connected]}),r.requested>0&&(0,t.jsxs)("span",{style:{color:"#FFD700"},children:[" · ",r.requested," ",1===r.requested?"request":"requests"," out"]}),null!=n&&(0,t.jsxs)("span",{style:{color:"#fff"},children:[" · ",n.toLocaleString("en-US")," shown"]})]})}function ts({tierColors:e,byTier:r,byRarity:n,tiers:i,rarities:o,onTier:l,onRarity:s,onClear:a}){let d=(e,t)=>({height:22,padding:"0 7px",borderRadius:11,cursor:"pointer",fontSize:10,fontWeight:700,whiteSpace:"nowrap",border:`1px solid ${e?t:"rgba(255,255,255,0.1)"}`,background:e?`${t}22`:"rgba(255,255,255,0.03)",color:e?t:"#999"});return(0,t.jsxs)("div",{style:{marginTop:8,display:"flex",flexDirection:"column",gap:5},children:[(0,t.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,alignItems:"center"},children:[(0,t.jsx)("span",{style:tg,children:"Tier"}),tr.map(n=>(0,t.jsxs)("button",{type:"button","aria-pressed":i.has(n),onClick:()=>l(n),style:d(i.has(n),e[n]||"#888"),children:[n," ",(0,t.jsx)("span",{style:{fontWeight:500,opacity:.8},children:r[n]})]},n))]}),(0,t.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,alignItems:"center"},children:[(0,t.jsx)("span",{style:tg,children:"Rarity"}),eE.map(e=>(0,t.jsxs)("button",{type:"button","aria-pressed":o.has(e.key),onClick:()=>s(e.key),title:`${e.label}: ${e.range} mutual connection${"1"===e.range?"":"s"}`,style:d(o.has(e.key),e.color),children:[e.label," ",(0,t.jsx)("span",{style:{fontWeight:500,opacity:.8},children:n[e.key]})]},e.key)),(i.size>0||o.size>0)&&(0,t.jsx)("button",{type:"button",onClick:a,style:tu,children:"Clear"})]})]})}function ta(){let e=(e,r)=>(0,t.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5,marginRight:12,whiteSpace:"nowrap"},children:[e,r]});return(0,t.jsxs)("div",{style:{fontSize:10.5,color:"#999",marginTop:8,lineHeight:1.8},children:[e((0,t.jsx)("svg",{width:"10",height:"10",children:(0,t.jsx)("circle",{cx:"5",cy:"5",r:"4",fill:"#FFD700"})}),"colour = tier"),e((0,t.jsx)("svg",{width:"12",height:"12",children:(0,t.jsx)("circle",{cx:"6",cy:"6",r:"4",fill:"#9B59B6",stroke:tn,strokeWidth:"1.5"})}),"you added them"),e((0,t.jsx)("svg",{width:"12",height:"12",children:(0,t.jsx)("circle",{cx:"6",cy:"6",r:"4.2",fill:"none",stroke:"#3498DB",strokeWidth:"1.4",strokeDasharray:"2 1.6"})}),"request sent")]})}function td({title:e,onClose:n,children:i}){return(0,r.useEffect)(()=>{let e=e=>{"Escape"===e.key&&n()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[n]),(0,e4.createPortal)((0,t.jsx)("div",{role:"dialog","aria-modal":"true","aria-label":e,onClick:n,style:{position:"fixed",inset:0,zIndex:300,background:"rgba(0,0,0,0.78)",display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:(0,t.jsxs)("div",{onClick:e=>e.stopPropagation(),style:{width:"min(720px, 100%)",maxHeight:"100%",overflowY:"auto",boxSizing:"border-box",background:"#0f0c05",border:"1px solid rgba(255,215,0,0.18)",borderRadius:14,padding:16},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[(0,t.jsx)("div",{style:{fontSize:14,fontWeight:800,color:"#fff"},children:e}),(0,t.jsx)("button",{type:"button",onClick:n,style:{...tu,fontSize:12},children:"Close ✕"})]}),(0,t.jsx)("div",{style:{fontSize:10.5,color:"#888",marginBottom:8},children:"Click a dot to open that person."}),i]})}),document.body)}function tc(){let e=document.getElementById("scan-box");e&&(e.scrollIntoView({behavior:"smooth",block:"center"}),e.animate?.([{boxShadow:"0 0 0 3px rgba(255,215,0,0.75)"},{boxShadow:"0 0 0 0 rgba(255,215,0,0)"}],{duration:1600}),e.querySelector("button:not([disabled])")?.focus({preventScroll:!0}))}function th({children:e}){return(0,t.jsx)("div",{style:{fontSize:10,fontWeight:700,color:"#FF6B35",letterSpacing:1,textTransform:"uppercase",marginBottom:6},children:e})}let tp={background:"rgba(255,255,255,0.03)",border:"1px solid rgba(255,255,255,0.07)",borderRadius:10,padding:10,marginBottom:16},tg={fontSize:9,color:"#666",textTransform:"uppercase",letterSpacing:.5,width:38,flexShrink:0},tu={background:"none",border:"none",color:"#888",fontSize:10.5,fontWeight:600,cursor:"pointer",padding:0};var tf=e.i(15812);function tx({selected:e,stats:n,tierColors:i,connections:o,degree2:a=[],mode:d,collapsed:c,filter:h,pending:p=[],onToggle:g,onSelect:u,onSwitchMode:f,onFocusNode:x,onMarkSent:y,onUndoPending:m,scanNotes:b,csvSource:j=null}){let v,w,S="degrees"===d,k=!j,{userId:z,userProfile:_}=(0,tf.useUser)(),[C,F]=(0,r.useState)(""),W=(0,r.useMemo)(()=>{let e={};return a.forEach(t=>{t.source_connection_id&&(e[t.source_connection_id]||(e[t.source_connection_id]=[]),e[t.source_connection_id].push(t))}),e},[a]),R=(0,r.useMemo)(()=>(0,H.routeIndex)(a),[a]),$=(0,r.useMemo)(()=>new Map(o.map(e=>[e.id,e])),[o]),B=(0,l.default)(),T=(0,r.useCallback)(e=>(0,s.hasRequest)(e,B),[B]);if(e){let r,n,l,d,h=1===e.degree&&W[e.id],p=W[e.id]||[],x=2===e.degree?(0,H.routesFor)(e,R,$):[];return(0,t.jsxs)(ty,{collapsed:c,onToggle:g,children:[(0,t.jsxs)("button",{onClick:()=>u&&u(null),style:{display:"flex",alignItems:"center",gap:6,background:"none",border:"none",color:"#888",fontSize:12,cursor:"pointer",padding:"0 0 10px",fontWeight:600},children:[(0,t.jsx)("span",{style:{fontSize:16},children:"←"})," Back to list"]}),(0,t.jsx)("div",{style:{fontSize:10,color:"#888",marginBottom:8,letterSpacing:1,textTransform:"uppercase"},children:2===e.degree?"Degree 2 Connection":"Degree 1 Connection"}),(0,t.jsxs)("div",{style:{display:"flex",gap:6,marginBottom:8,flexWrap:"wrap"},children:[(0,t.jsx)("div",{style:{background:2===e.degree?"#FF6B35":i[e.tier],color:"#000",display:"inline-block",padding:"2px 10px",borderRadius:12,fontSize:11,fontWeight:700},children:2===e.degree?`DEGREE 2 \xb7 TIER ${e.tier}`:`TIER ${e.tier}`}),e.unlocked_from_name&&(0,t.jsxs)("div",{style:{background:"rgba(52,152,219,0.08)",border:"1px solid rgba(52,152,219,0.28)",borderRadius:8,padding:"9px 11px",marginBottom:10,fontSize:11.5,color:"#8fb8d6",lineHeight:1.5},children:[1===e.degree?"You met them through ":"Reachable through ",(0,t.jsx)("b",{style:{color:"#cfe6f7"},children:e.unlocked_from_name})]}),e.is_catalyst&&(0,t.jsx)("div",{style:{background:"#00ff88",color:"#000",display:"inline-block",padding:"2px 10px",borderRadius:12,fontSize:11,fontWeight:800,letterSpacing:.5},children:"CATALYST"})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:12,alignItems:"center",marginBottom:16},children:[(0,M.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,M.localPhoto)(e.profile_image_url),alt:e.name,style:{width:52,height:52,borderRadius:"50%",objectFit:"cover",border:`2px solid ${i[e.tier]||"#555"}`,flexShrink:0},onError:e=>{e.target.style.display="none",e.target.nextSibling.style.display="flex"}}):null,(0,t.jsx)("div",{style:{width:52,height:52,borderRadius:"50%",flexShrink:0,background:i[e.tier]||"#555",display:(0,M.localPhoto)(e.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center",fontSize:20,fontWeight:700,color:"S"===e.tier?"#000":"#fff"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{minWidth:0},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:700,margin:0},children:e.name}),(0,t.jsx)("p",{style:{color:"#aaa",fontSize:11,margin:"3px 0 0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.headline?.substring(0,60)}),e.profile_url&&(0,t.jsx)("a",{href:e.profile_url,target:"_blank",rel:"noopener noreferrer",style:{fontSize:10,color:"#0077B5",textDecoration:"none",fontWeight:600},children:"View on LinkedIn"})]})]}),1===e.degree&&(0,t.jsx)(ti,{person:e,connections:o,degree2:a,tierColors:i,onSelect:u,isRequested:T,canScan:k}),e.is_catalyst&&(0,t.jsxs)("div",{style:{background:"rgba(0,255,136,0.08)",border:"1px solid rgba(0,255,136,0.3)",borderRadius:8,padding:12,marginBottom:16},children:[(0,t.jsx)("div",{style:{fontSize:10,color:"#00ff88",fontWeight:700,marginBottom:4,letterSpacing:1},children:"CATALYST NODE"}),(0,t.jsxs)("div",{style:{fontSize:12,color:"#ccc"},children:["This person's network power exceeds their own tier. They connect to"," ",(0,t.jsxs)("strong",{style:{color:"#00ff88"},children:[e.catalyst_score," S+A tier"]})," ","people — making them a high-value stepping stone to reach elite connections."]})]}),2===e.degree&&x.length>0&&(0,t.jsx)(tj,{routes:x,selected:e,tierColors:i,onSelect:u},e.id),(0,t.jsxs)("div",{style:{background:"rgba(255,255,255,0.04)",borderRadius:8,padding:12,marginBottom:16},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",marginBottom:8},children:[(0,t.jsx)("span",{style:{fontSize:11,color:"#888",fontWeight:600,letterSpacing:1,textTransform:"uppercase"},children:"Score"}),(0,t.jsx)("span",{style:{fontSize:28,fontWeight:800,color:i[e.tier]||"#fff"},children:parseFloat(e.power_score).toFixed(1)})]}),e.score_why&&(0,t.jsx)("div",{style:{fontSize:11,color:"#aab7b7",lineHeight:1.5,marginBottom:10},children:e.score_why}),(0,t.jsxs)("div",{style:{marginBottom:6},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:10,color:"#888",marginBottom:2},children:[(0,t.jsx)("span",{children:"Title"}),(0,t.jsxs)("span",{children:[e.seniority_score||0,"/10"]})]}),(0,t.jsx)("div",{style:{height:4,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,t.jsx)("div",{style:{height:"100%",width:`${10*(e.seniority_score||0)}%`,background:i[e.tier]||"#FFD700",borderRadius:2}})})]}),(0,t.jsxs)("div",{style:{marginBottom:6*(e.circle_power>0)},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:10,color:"#888",marginBottom:2},children:[(0,t.jsx)("span",{children:"Company"}),(0,t.jsxs)("span",{children:[e.company_prestige_score||0,"/10"]})]}),(0,t.jsx)("div",{style:{height:4,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,t.jsx)("div",{style:{height:"100%",width:`${10*(e.company_prestige_score||0)}%`,background:"#3498DB",borderRadius:2}})})]}),e.circle_power>0&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:10,color:"#888",marginBottom:2},children:[(0,t.jsx)("span",{children:"Circle Power"}),(0,t.jsxs)("span",{style:{color:"#FF6B35"},children:[e.circle_s_count||0,"S · ",e.circle_a_count||0,"A"]})]}),(0,t.jsx)("div",{style:{height:4,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,t.jsx)("div",{style:{height:"100%",width:`${Math.min(parseFloat(e.circle_power)/70*100,100)}%`,background:"#FF6B35",borderRadius:2}})})]})]}),(0,t.jsxs)("div",{style:{marginBottom:16},children:[(0,t.jsx)("div",{style:{fontSize:10,fontWeight:700,color:"#FFD700",letterSpacing:1,marginBottom:6,textTransform:"uppercase"},children:"Why This Matters"}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:4,fontSize:11,color:"#ccc"},children:(function(e,t,r,n=[]){let i=[],o=(e.headline||"").toLowerCase(),l=(e.role||"").toLowerCase(),s=(e.company||"").toLowerCase(),a=t.sectors.map(e=>e.toLowerCase());l.match(/ceo|chief|founder|president|chairman/i)?i.push({icon:"👑",text:`${e.role} — C-suite executive, highest leverage contact`,color:"#FFD700"}):l.match(/vp|vice president|svp|evp|managing director/i)?i.push({icon:"⚡",text:`${e.role} — VP-level, strong decision-making authority`,color:"#FFD700"}):l.match(/director|head of|senior director/i)?i.push({icon:"🎯",text:`${e.role} — Senior leadership, controls team/budget`,color:"#FF6B35"}):l.match(/manager|lead|principal/i)&&i.push({icon:"📊",text:`${e.role} — Mid-senior, operational influence`,color:"#3498DB"});let{now:d,before:c}=(0,e7.topCompanies)(e);d&&i.push({icon:"🏢",text:`At ${d.name} (${d.score}/10) — top-tier company network access`,color:"#9B59B6"}),c&&i.push({icon:"📜",text:`Former ${c.name} (${c.score}/10) — carries network from previous role`,color:"#95A5A6"});let h=a.filter(e=>o.includes(e)||s.includes(e));h.length>0&&i.push({icon:"🔗",text:`Shared sector: ${h.join(", ")} — direct industry relevance to you`,color:"#2ECC71"});let p=r.filter(t=>t.source_connection_id===e.id).length;if(p>0){let t=r.filter(t=>t.source_connection_id===e.id&&"S"===t.tier).length;i.push({icon:"🌐",text:`Gateway to ${p} degree-2 connections${t>0?` (${t} S-tier)`:""}`,color:"#FF6B35"})}if(e.is_catalyst&&i.push({icon:"⚡",text:"Catalyst — network power exceeds personal tier, high stepping-stone value",color:"#00ff88"}),2===e.degree&&n.length>0){let e=n.filter(e=>e.bridge);if(1===n.length)i.push(e.length?{icon:"🤝",text:`Reachable via ${e[0].bridge.name} (${e[0].bridge.tier}-tier)`,color:"#3498DB"}:{icon:"🤝",text:"Reachable through a connection we can’t name",color:"#888"});else{let t=e.slice(0,2).map(e=>`${String(e.bridge.name||"").trim().split(/\s+/)[0]} (${e.bridge.tier})`),r=n.length-t.length,o=0===t.length?"connections we can’t name":r>0?`${t.join(", ")} and ${r} more`:t.join(" and ");i.push({icon:"🤝",text:`Reachable ${n.length} ways — via ${o}`,color:"#3498DB"})}}return 0===i.length&&i.push({icon:"📌",text:`${e.tier}-tier connection with ${parseFloat(e.power_score).toFixed(1)} power score`,color:"#888"}),i.slice(0,5)})(e,_||{name:"User",sectors:[],goals:[]},a,x).map((e,r)=>(0,t.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"flex-start"},children:[(0,t.jsx)("span",{style:{color:e.color||"#888",fontSize:13,lineHeight:1},children:e.icon}),(0,t.jsx)("span",{children:e.text})]},r))})]}),e.company&&(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsx)("div",{style:{color:"#666",fontSize:10},children:"Company"}),(0,t.jsx)("div",{style:{fontWeight:600,fontSize:12},children:e.company})]}),e.role&&(0,t.jsxs)("div",{style:{marginBottom:12},children:[(0,t.jsx)("div",{style:{color:"#666",fontSize:10},children:"Role"}),(0,t.jsx)("div",{style:{fontSize:12},children:e.role})]}),h&&p.length>0&&(r=p.filter(e=>"S"===e.tier),n=p.filter(e=>"A"===e.tier),l=[...p].sort((e,t)=>(parseFloat(t.power_score)||0)-(parseFloat(e.power_score)||0)).slice(0,8),(0,t.jsxs)("div",{style:{marginBottom:16},children:[(0,t.jsxs)("div",{style:{fontSize:10,fontWeight:700,color:"#FF6B35",letterSpacing:1,marginBottom:8,textTransform:"uppercase"},children:["Cluster Overview — ",p.length," connections"]}),(0,t.jsxs)("div",{style:{display:"flex",gap:6,marginBottom:8,fontSize:10},children:[r.length>0&&(0,t.jsxs)("span",{style:{color:"#FFD700",fontWeight:600},children:[r.length," S-tier"]}),n.length>0&&(0,t.jsxs)("span",{style:{color:"#9B59B6",fontWeight:600},children:[n.length," A-tier"]})]}),(0,t.jsxs)("a",{href:`/queue?bridge=${e.id}&groupBy=bridge`,style:{display:"block",textAlign:"center",padding:"8px 12px",marginBottom:10,background:"linear-gradient(135deg, #FF6B35, #FFD700)",color:"#000",borderRadius:6,textDecoration:"none",fontWeight:700,fontSize:11},children:["Outlink Bridge → Add ",p.filter(e=>"S"===e.tier||"A"===e.tier||"B"===e.tier).length," People"]}),(0,t.jsx)("div",{style:{fontSize:10,color:"#888",marginBottom:8},children:"Most valuable in this cluster:"}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:l.map(e=>(0,t.jsxs)("div",{onClick:()=>u&&u(e),style:{display:"flex",alignItems:"center",gap:6,padding:"4px 6px",borderRadius:4,cursor:"pointer",borderLeft:`2px solid ${i[e.tier]||"#555"}`,background:"rgba(255,255,255,0.03)"},onMouseEnter:e=>e.currentTarget.style.background="rgba(255,255,255,0.08)",onMouseLeave:e=>e.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,M.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,M.localPhoto)(e.profile_image_url),alt:"",style:{width:22,height:22,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1px solid ${i[e.tier]||"#555"}`},onError:e=>{e.target.style.display="none",e.target.nextSibling.style.display="flex"}}):null,(0,t.jsx)("div",{style:{width:22,height:22,borderRadius:"50%",flexShrink:0,fontSize:9,fontWeight:700,background:i[e.tier]||"#555",color:"S"===e.tier?"#000":"#fff",display:(0,M.localPhoto)(e.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:10,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,t.jsx)("div",{style:{fontSize:8,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.headline?.substring(0,40)})]}),(0,t.jsx)("span",{style:{fontSize:9,color:i[e.tier],fontWeight:600,flexShrink:0},children:parseFloat(e.power_score).toFixed(1)})]},e.id))})]})),h&&p.length>0&&(0,t.jsxs)("div",{style:{marginTop:16},children:[(0,t.jsxs)("div",{style:{fontSize:12,fontWeight:600,color:"#FF6B35",marginBottom:8},children:["Gateway to ",p.length," degree-2 connections:"]}),p.sort((e,t)=>(parseFloat(t.power_score)||0)-(parseFloat(e.power_score)||0)).slice(0,10).map(e=>(0,t.jsxs)("div",{style:{padding:"6px 8px",background:"rgba(255,107,53,0.08)",borderRadius:6,borderLeft:"3px solid #FF6B35",marginBottom:4,fontSize:12},children:[(0,t.jsx)("div",{style:{fontWeight:600},children:e.name}),(0,t.jsxs)("div",{style:{color:"#888",fontSize:11},children:[e.role,e.company?` @ ${e.company}`:""]}),(0,t.jsxs)("div",{style:{color:"#FF6B35",fontSize:10},children:["Score: ",parseFloat(e.power_score).toFixed(1)]})]},e.id))]}),!S&&h&&p.length>0&&f&&(0,t.jsxs)("button",{onClick:()=>{f("degrees")},style:{width:"100%",padding:"12px",borderRadius:8,border:"none",cursor:"pointer",background:"linear-gradient(135deg, #FF6B35, #FFD700)",color:"#000",fontWeight:700,fontSize:13,marginTop:12},children:["View Bridge → ",p.length," connections"]}),(2===e.degree||e.source_connection_id)&&1!==e.degree&&"unlocked"!==e.unlock_status&&(d=T(e),(0,t.jsxs)("div",{style:{background:"rgba(255,215,0,0.06)",border:`1px ${d?"dashed":"solid"} rgba(255,215,0,${d?.45:.25})`,borderRadius:10,padding:16,marginTop:16,textAlign:"center"},children:[(0,t.jsx)("div",{style:{fontSize:10,color:"#FFD700",fontWeight:700,letterSpacing:1,marginBottom:6},children:d?"REQUEST SENT":"LOCKED PATH"}),(0,t.jsx)("div",{style:{fontSize:13,color:"#ccc",marginBottom:12},children:d?`Waiting for ${e.name} to accept. The next scan of your own connections notices when they do.`:`Connect with ${e.name} to unlock their network and extend your six degrees.`}),(0,t.jsx)("div",{style:{width:"100%",height:60,background:"rgba(255,255,255,0.03)",borderRadius:8,border:"1px dashed rgba(255,255,255,0.1)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,color:"#444",marginBottom:12},children:d?"[ Cluster Pending... ]":"[ Hidden Network ]"}),d?(0,t.jsx)("button",{onClick:()=>{(0,s.undoRequest)(e).catch(()=>{})},style:{background:"none",border:"none",color:"#888",fontSize:11,fontWeight:600,cursor:"pointer"},children:"Didn't send it? Undo"}):(0,t.jsx)("a",{href:e.profile_url,target:"_blank",rel:"noopener noreferrer",style:{display:"block",padding:"10px 16px",background:"linear-gradient(135deg, #FFD700, #FF6B35)",color:"#000",borderRadius:8,textDecoration:"none",fontWeight:700,fontSize:13},onClick:()=>{(0,s.markRequested)(e,{bridgeId:e.source_connection_id}).catch(()=>{})},children:"Connect to Unlock Path"})]})),(1===e.degree||"accepted"===e.outreach_status)&&(k?(0,t.jsx)(tv,{selected:e,degree2:a},e.id):(0,t.jsx)(tw,{csvSource:j,style:{marginTop:16}})),e.profile_url&&(0,t.jsx)("a",{href:e.profile_url,target:"_blank",rel:"noopener noreferrer",style:{display:"block",textAlign:"center",padding:10,marginTop:16,background:"#0077B5",color:"#fff",borderRadius:8,textDecoration:"none",fontWeight:600,fontSize:13},children:"View LinkedIn Profile"})]})}if(S){let e,r,l,s;return(0,t.jsxs)(ty,{collapsed:c,onToggle:g,children:[(0,t.jsxs)("button",{onClick:g,style:{display:"flex",alignItems:"center",gap:6,background:"none",border:"none",color:"#888",fontSize:12,cursor:"pointer",padding:"0 0 10px",fontWeight:600},children:[(0,t.jsx)("span",{style:{fontSize:16},children:"←"})," Close"]}),(0,t.jsx)("h3",{style:{fontSize:16,fontWeight:700,marginTop:0,color:"#FF6B35"},children:"Degrees"}),(0,t.jsx)("p",{style:{fontSize:12,color:"#888",marginBottom:12},children:"Your bridge connections and who they unlock."}),k?(0,t.jsx)(t_,{connections:o,degree2:a,scanNotes:b,tierColors:i}):(0,t.jsx)(tw,{csvSource:j,style:{marginBottom:16}}),(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,marginBottom:12},children:[(0,t.jsx)(tm,{label:"Degree-2 Found",value:a.length}),(0,t.jsx)(tm,{label:"D2 S-Tier",value:n?.d2Tiers?.S||0}),(0,t.jsx)(tm,{label:"D2 A-Tier",value:n?.d2Tiers?.A||0}),(0,t.jsx)(tm,{label:"Bridges Used",value:Object.keys(W).length})]}),(0,t.jsxs)("div",{style:{position:"relative",marginBottom:16},children:[(0,t.jsx)("input",{type:"text",placeholder:"Search bridges or d2...",value:C,onChange:e=>F(e.target.value),style:{width:"100%",padding:"8px 12px",borderRadius:8,fontSize:12,border:"1px solid rgba(255,255,255,0.1)",background:"rgba(255,255,255,0.05)",color:"#fff",outline:"none",boxSizing:"border-box"}}),C.length>=2&&(e=C.toLowerCase(),r=o.filter(t=>a.some(e=>e.source_connection_id===t.id)&&t.name.toLowerCase().includes(e)).slice(0,5),l=a.filter(t=>t.name?.toLowerCase().includes(e)).slice(0,5),0===(s=[...r.map(e=>({...e,_matchType:"bridge"})),...l.map(e=>({...e,_matchType:"d2"}))]).length?null:(0,t.jsx)("div",{style:{position:"absolute",top:"100%",left:0,right:0,zIndex:50,background:"rgba(10,10,26,0.98)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:8,overflow:"hidden",maxHeight:200,overflowY:"auto",boxShadow:"0 8px 24px rgba(0,0,0,0.5)"},children:s.map(e=>(0,t.jsxs)("div",{onClick:()=>{u(e),F(""),x&&"bridge"===e._matchType&&x(e.id)},style:{padding:"8px 12px",cursor:"pointer",display:"flex",alignItems:"center",gap:8,borderBottom:"1px solid rgba(255,255,255,0.05)"},onMouseEnter:e=>e.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:e=>e.currentTarget.style.background="transparent",children:[(0,M.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,M.localPhoto)(e.profile_image_url),alt:"",style:{width:24,height:24,borderRadius:"50%",objectFit:"cover"}}):(0,t.jsx)("div",{style:{width:24,height:24,borderRadius:"50%",background:i[e.tier]||"#555",fontSize:9,fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:11,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,t.jsx)("div",{style:{fontSize:8,color:"#666"},children:"bridge"===e._matchType?"Bridge":"Degree-2"})]}),(0,t.jsx)("span",{style:{fontSize:9,fontWeight:700,color:i[e.tier]},children:e.tier})]},e.id))}))]}),"pending"===h&&p.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("h4",{style:{fontSize:13,fontWeight:600,color:"#FF6B35",marginBottom:8},children:["⏳ Pending Requests (",p.length,")"]}),(0,t.jsx)("p",{style:{fontSize:10,color:"#666",marginBottom:10,lineHeight:1.4},children:"Friend requests you've sent. When accepted, their cluster unlocks for bridging."}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:2},children:p.map(e=>{let r=2===e.degree?o.find(t=>t.id===e.source_connection_id):null;return(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 10px",background:"rgba(255,107,53,0.06)",borderRadius:8,border:"1px solid rgba(255,107,53,0.12)"},children:[(0,M.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,M.localPhoto)(e.profile_image_url),alt:"",style:{width:32,height:32,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`2px solid ${i[e.tier]||"#555"}`},onError:e=>{e.target.style.display="none"}}):(0,t.jsx)("div",{style:{width:32,height:32,borderRadius:"50%",flexShrink:0,fontSize:12,fontWeight:700,background:i[e.tier]||"#555",color:"S"===e.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:11,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,t.jsx)("div",{style:{fontSize:8,color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.headline?.substring(0,40)}),r&&(0,t.jsxs)("div",{style:{fontSize:8,color:"#FF6B35",marginTop:1},children:["via ",r.name?.split(" ")[0]]})]}),(0,t.jsxs)("div",{style:{textAlign:"center",flexShrink:0},children:[(0,t.jsx)("div",{style:{fontSize:9,fontWeight:800,color:i[e.tier]||"#888"},children:e.tier}),(0,t.jsx)("div",{style:{fontSize:8,color:"#666"},children:parseFloat(e.power_score||0).toFixed(1)})]}),(0,t.jsx)("button",{onClick:()=>m&&m(e),title:"Remove from pending",style:{background:"none",border:"none",color:"#555",cursor:"pointer",fontSize:12,padding:2,flexShrink:0},children:"✕"})]},e.id)})})]}),"pending"!==h&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h4",{style:{fontSize:13,fontWeight:600,color:"#FF6B35",marginBottom:8},children:"Most Valuable Clusters"}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:Object.entries(W).map(([e,t])=>{let r=o.find(t=>t.id===e);if(!r)return null;let n=t.length;if(0===n)return null;let i=t.filter(e=>"S"===e.tier),l=t.filter(e=>"A"===e.tier),s=t.filter(e=>"B"===e.tier),a=i.length,d=l.length,c=s.length,h=a>0?i.reduce((e,t)=>e+(parseFloat(t.power_score)||0),0)/a:0,p=d>0?l.reduce((e,t)=>e+(parseFloat(t.power_score)||0),0)/d:0,g=s.filter(e=>(parseFloat(e.power_score)||0)>=5).length,u=(a+d)/n,f=h/7*a*15+p/5.5*d*6+3*g+25*u+2*Math.log2(n+1)+10*!!r.is_catalyst,x=t.reduce((e,t)=>e+(parseFloat(t.power_score)||0),0)/n;return{bridge:r,members:n,sCount:a,aCount:d,bCount:c,risingCount:g,sAvgPower:h,avgPower:x,elitePct:u,clusterValue:f,sTier:i,aTier:l,topMembers:[...t].sort((e,t)=>(parseFloat(t.power_score)||0)-(parseFloat(e.power_score)||0))}}).filter(Boolean).sort((e,t)=>t.clusterValue-e.clusterValue).map((e,r)=>(0,t.jsx)(tz,{cs:e,rank:r+1,tierColors:i,onSelect:u},e.bridge.id))})]})]})}let I=[...o||[]].sort((e,t)=>(parseFloat(t.power_score)||0)-(parseFloat(e.power_score)||0)),E=C.length>=2?I.filter(e=>e.name.toLowerCase().includes(C.toLowerCase())).slice(0,8):[];return(0,t.jsxs)(ty,{collapsed:c,onToggle:g,children:[(0,t.jsxs)("button",{onClick:g,style:{display:"flex",alignItems:"center",gap:6,background:"rgba(255,255,255,0.06)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:6,color:"#aaa",fontSize:12,cursor:"pointer",padding:"6px 12px",marginBottom:12,fontWeight:600},children:[(0,t.jsx)("span",{style:{fontSize:16},children:"←"})," Close"]}),(0,t.jsx)("h3",{style:{fontSize:16,fontWeight:700,marginTop:0},children:"Network Circle"}),n&&(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,marginBottom:16},children:[(0,t.jsx)(tm,{label:"Total Connections",value:n.total}),(0,t.jsx)(tm,{label:"S-Tier",value:n.tiers?.S||0}),(0,t.jsx)(tm,{label:"A-Tier",value:n.tiers?.A||0}),(0,t.jsx)(tm,{label:"B-Tier",value:n.tiers?.B||0})]}),(0,t.jsxs)("div",{style:{position:"relative",marginBottom:12},children:[(0,t.jsx)("input",{type:"text",placeholder:"Search connections...",value:C,onChange:e=>F(e.target.value),style:{width:"100%",padding:"8px 12px",borderRadius:8,boxSizing:"border-box",border:"1px solid rgba(255,255,255,0.1)",background:"rgba(0,0,0,0.3)",color:"#fff",fontSize:12,outline:"none"}}),E.length>0&&(0,t.jsx)("div",{style:{position:"absolute",top:"100%",left:0,right:0,zIndex:10,background:"rgba(10,10,26,0.98)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:8,marginTop:4,overflow:"hidden",boxShadow:"0 8px 24px rgba(0,0,0,0.5)"},children:E.map(e=>(0,t.jsxs)("div",{onClick:()=>{u&&u(e),x&&x(e.id),F("")},style:{display:"flex",alignItems:"center",gap:8,padding:"8px 10px",cursor:"pointer",borderBottom:"1px solid rgba(255,255,255,0.04)"},onMouseEnter:e=>e.currentTarget.style.background="rgba(255,255,255,0.08)",onMouseLeave:e=>e.currentTarget.style.background="transparent",children:[(0,M.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,M.localPhoto)(e.profile_image_url),alt:"",style:{width:24,height:24,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${i[e.tier]||"#555"}`},onError:e=>{e.target.style.display="none"}}):(0,t.jsx)("div",{style:{width:24,height:24,borderRadius:"50%",flexShrink:0,fontSize:10,fontWeight:700,background:i[e.tier]||"#555",color:"S"===e.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:12,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,t.jsx)("div",{style:{fontSize:9,color:"#666"},children:e.headline?.substring(0,35)})]}),(0,t.jsx)("span",{style:{fontSize:10,color:i[e.tier],fontWeight:700},children:e.tier})]},e.id))})]}),(0,t.jsxs)("h4",{style:{fontSize:13,fontWeight:600,color:"#FFD700",marginBottom:8},children:["Power Rankings (",I.length,")"]}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:(v={},w={},I.forEach(e=>{w[e.tier]=(w[e.tier]||0)+1}),I.map((e,r)=>{let n=r>0?I[r-1].tier:null,o=e.tier!==n;o&&(v[e.tier]=0),v[e.tier]=(v[e.tier]||0)+1;let l=v[e.tier];return(0,t.jsxs)("div",{children:[o&&(0,t.jsxs)("div",{style:{padding:"8px 10px",marginTop:8*(r>0),marginBottom:4,background:`${i[e.tier]||"#555"}15`,borderLeft:`3px solid ${i[e.tier]||"#555"}`,borderRadius:4,fontSize:11,fontWeight:700,color:i[e.tier]||"#888",display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)("span",{children:{S:"S-Tier — Elite",A:"A-Tier — High Value",B:"B-Tier — Notable",C:"C-Tier — Standard",D:"D-Tier — Entry"}[e.tier]||e.tier}),(0,t.jsx)("span",{style:{fontWeight:400,opacity:.7},children:w[e.tier]||0})]}),(0,t.jsxs)("div",{onClick:()=>{u&&u(e),x&&x(e.id)},style:{padding:"6px 8px",background:"rgba(255,255,255,0.03)",borderRadius:6,borderLeft:`3px solid ${i[e.tier]||"#555"}`,cursor:"pointer",display:"flex",alignItems:"center",gap:8,transition:"background 0.15s"},onMouseEnter:e=>e.currentTarget.style.background="rgba(255,255,255,0.1)",onMouseLeave:e=>e.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,t.jsxs)("span",{style:{color:"#555",fontSize:10,fontWeight:600,minWidth:22,textAlign:"right"},children:["#",l]}),(0,M.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,M.localPhoto)(e.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${i[e.tier]||"#555"}`},onError:e=>{e.target.style.display="none",e.target.nextSibling.style.display="flex"}}):null,(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",flexShrink:0,background:i[e.tier]||"#555",display:(0,M.localPhoto)(e.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center",fontSize:12,fontWeight:700,color:"S"===e.tier?"#000":"#fff"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,t.jsx)("div",{style:{fontWeight:600,fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,t.jsx)("div",{style:{fontSize:9,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.headline?.substring(0,45)})]}),(0,t.jsxs)("div",{style:{textAlign:"right",flexShrink:0},children:[(0,t.jsx)("div",{style:{fontSize:10,fontWeight:700,color:i[e.tier]||"#555"},children:parseFloat(e.power_score).toFixed(1)}),(0,t.jsx)("div",{style:{fontSize:8,color:"#555"},children:e.tier})]})]})]},e.id)}))})]})}function ty({children:e,collapsed:n,onToggle:i}){let[o,l]=(0,r.useState)(!1);return((0,r.useEffect)(()=>{let e=()=>l(window.innerWidth<768);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),n)?(0,t.jsxs)("div",{onClick:i,style:{position:"fixed",right:16,top:140,zIndex:30,cursor:"pointer",display:"flex",alignItems:"center",flexDirection:"row-reverse",gap:0,height:36,borderRadius:18,background:"rgba(255,215,0,0.15)",border:"2px solid rgba(255,215,0,0.5)",color:"#FFD700",fontWeight:700,boxShadow:"0 0 12px rgba(255,215,0,0.3)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",overflow:"hidden",transition:"width 0.25s ease",width:36,padding:"0 10px"},onMouseEnter:e=>{e.currentTarget.style.width="120px"},onMouseLeave:e=>{e.currentTarget.style.width="36px"},children:[(0,t.jsx)("span",{style:{fontSize:18,flexShrink:0,width:16,textAlign:"center"},children:"‹"}),(0,t.jsx)("span",{style:{fontSize:11,fontWeight:600,whiteSpace:"nowrap",marginRight:6,opacity:.9},children:"Details"})]}):(0,t.jsxs)("div",{style:o?{position:"fixed",top:0,right:0,bottom:0,zIndex:100,width:"100vw",pointerEvents:"auto"}:{flexShrink:0,height:"100%"},children:[o&&(0,t.jsx)("div",{onClick:i,style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.5)"}}),(0,t.jsx)("div",{style:{width:o?"80vw":320,minWidth:320*!o,maxWidth:o?300:320,height:"100%",borderLeft:"1px solid rgba(255,215,0,0.12)",padding:o?"12px 10px":"16px 16px",overflowY:"auto",overflowX:"hidden",background:o?"rgba(15,12,5,0.98)":"rgba(15,12,5,0.65)",fontSize:13,backdropFilter:"blur(24px) saturate(1.4)",WebkitBackdropFilter:"blur(24px) saturate(1.4)",boxShadow:"inset 0 0 60px rgba(255,215,0,0.03), -4px 0 24px rgba(0,0,0,0.3)",marginLeft:o?"auto":0},children:e})]})}function tm({label:e,value:r}){return(0,t.jsxs)("div",{style:{background:"rgba(255,255,255,0.05)",padding:"10px 12px",borderRadius:8},children:[(0,t.jsx)("div",{style:{fontSize:10,color:"#888",marginBottom:2},children:e}),(0,t.jsx)("div",{style:{fontSize:18,fontWeight:700},children:r})]})}function tb(){return(0,t.jsx)("span",{style:{color:"#555",fontSize:16},children:"→"})}function tj({routes:e,selected:n,tierColors:i,onSelect:o}){let[l,s]=(0,r.useState)(!1),a=e.length,d=l?e:e.slice(0,4),c={display:"flex",alignItems:"center",gap:6,fontSize:13,flexWrap:"wrap"};return(0,t.jsxs)("div",{style:{background:"rgba(255,107,53,0.1)",border:"1px solid rgba(255,107,53,0.3)",borderRadius:8,padding:12,marginBottom:16},children:[(0,t.jsxs)("div",{style:{fontSize:10,color:"#FF6B35",fontWeight:600,marginBottom:8},children:["PATH TO THIS PERSON",a>1?` \xb7 ${a} WAYS IN`:""]}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:d.map((e,r)=>{if(!e.bridge)return(0,t.jsxs)("div",{title:"This route came from a scanned list whose connection record doesn’t match anyone in your 1st-degree list, so who introduces you can’t be named. The person is real, and still reachable.",style:{...c,color:"#888",fontStyle:"italic"},children:[(0,t.jsx)("span",{style:{fontWeight:700,fontStyle:"normal",color:"#fff"},children:"You"}),(0,t.jsx)(tb,{}),(0,t.jsx)("span",{children:"a connection we can’t name"}),(0,t.jsx)(tb,{}),(0,t.jsx)("span",{children:"them"})]},`unnamed-${e.id}`);let l=e.bridge,s=i[l.tier]||"#ccc",d=[[l.role,l.company].filter(Boolean).join(" @ "),l.tier?`${l.tier}-tier`:""].filter(Boolean).join(" · ");return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:c,children:[(0,t.jsx)("span",{style:{fontWeight:700},children:"You"}),(0,t.jsx)(tb,{}),(0,t.jsxs)("button",{onClick:()=>o&&o(l),title:`Open ${l.name}`,style:{display:"inline-flex",alignItems:"center",gap:6,padding:0,border:"none",background:"none",cursor:"pointer",color:s,fontWeight:600,fontSize:13,textAlign:"left"},children:[(0,t.jsx)(eq,{person:l,size:18,tierColors:i}),l.name]}),(0,t.jsx)(tb,{}),(0,t.jsx)("span",{style:{color:"#FF6B35",fontWeight:600},children:n.name}),0===r&&a>1&&(0,t.jsx)("span",{style:{fontSize:9,fontWeight:700,color:"#FF6B35",padding:"1px 6px",borderRadius:8,background:"rgba(255,107,53,0.15)",whiteSpace:"nowrap"},children:"top-scored bridge"})]}),d&&(0,t.jsx)("div",{style:{fontSize:11,color:"#888",marginTop:3},children:d})]},e.id)})}),a>4&&(0,t.jsx)("button",{onClick:()=>s(e=>!e),style:{marginTop:10,padding:"4px 10px",borderRadius:6,cursor:"pointer",fontSize:11,fontWeight:600,border:"1px solid rgba(255,107,53,0.35)",background:"transparent",color:"#FF6B35"},children:l?"Show fewer":`Show all ${a}`})]})}function tv({selected:e,degree2:n}){let l=(0,o.default)(),[s,a]=(0,r.useState)(!1),[d,c]=(0,r.useState)(null),[h,p]=(0,r.useState)(void 0),g=n?.filter(t=>t.source_connection_id===e.id).length||0,u=g>0,f=l.running&&(0,i.scansCircleOf)(l,e),x=l.running&&!f?(0,i.busyReason)(l):null,y=l.finished.find(t=>(0,i.scansCircleOf)(t,e)),m=l.finished[0]?.startedAt??null;async function b(t){c(null),a(!0);let r=(0,i.notReadyMessage)(await (0,i.scraperStatus)().catch(()=>null));if(a(!1),r)return void c({text:r,offline:!0});try{await (0,i.beginScrape)(t,"resume"===t?{id:e.id}:{name:e.name,id:e.id})}catch(e){c({text:e.message||"Could not start the scan."})}}(0,r.useEffect)(()=>{let t=!0;return(0,i.resumePoint)(e.id).then(e=>{t&&p(e)},()=>{t&&p(null)}),()=>{t=!1}},[e.id,m]);let j=u||!!h,v=u?"#00ff88":"#9B59B6",w=!!x||s,S=e=>({flex:1,padding:"11px 8px",borderRadius:8,fontWeight:700,fontSize:e?13:12,cursor:w?"not-allowed":"pointer",opacity:w?.45:1,...e?{border:"none",background:"linear-gradient(135deg, #9B59B6, #3498DB)",color:"#fff"}:{border:`1px solid ${v}55`,background:`${v}14`,color:v}});return(0,t.jsxs)("div",{id:"scan-box",style:{background:u?"rgba(0,255,136,0.06)":"rgba(155,89,182,0.08)",border:`1px solid ${u?"rgba(0,255,136,0.2)":"rgba(155,89,182,0.3)"}`,borderRadius:10,padding:16,marginTop:16},children:[(0,t.jsx)("div",{style:{fontSize:10,color:v,fontWeight:700,letterSpacing:1,marginBottom:4,textAlign:"center"},children:u?"CLUSTER ACTIVE":"CREATE CLUSTER"}),(0,t.jsx)("div",{style:{fontSize:12,color:"#aaa",marginBottom:12,textAlign:"center"},children:u?`${g} connections mapped in Six Degrees`:(0,t.jsxs)(t.Fragment,{children:["Scan ",e.name,"'s connections to map their network"]})}),f?(0,t.jsx)(tS,{title:l.pending?"Starting…":`Scanning ${e.name}’s circle…`,log:l.log}):d?.offline?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:{padding:"10px",borderRadius:8,background:"rgba(255,80,80,0.1)",border:"1px solid rgba(255,80,80,0.3)",color:"#ff5050",fontSize:12,marginBottom:8,textAlign:"center"},children:"Scanner offline"}),(0,t.jsxs)("div",{style:{fontSize:10,color:"#888",textAlign:"center",marginBottom:8},children:[d.text," Open the ",(0,t.jsx)("strong",{children:"Scan"})," page to finish setting the scanner up."]}),(0,t.jsx)("button",{onClick:()=>c(null),style:{width:"100%",padding:"10px",borderRadius:8,border:"none",cursor:"pointer",background:"rgba(255,255,255,0.1)",color:"#aaa",fontWeight:600,fontSize:12},children:"Retry"})]}):(0,t.jsxs)(t.Fragment,{children:[y&&(0,t.jsx)(tk,{job:y}),(0,t.jsxs)("div",{style:{display:"flex",gap:8},children:[h&&(0,t.jsxs)("button",{onClick:()=>b("resume"),disabled:w,style:S(!0),children:["Resume from page ",h.nextPage]}),(0,t.jsx)("button",{onClick:()=>b("bridge"),disabled:w,style:S(!h&&!u),children:j?"Rescan from the start":(0,t.jsxs)(t.Fragment,{children:["Scan ",e.name,"'s Network"]})})]}),h&&(0,t.jsxs)("div",{style:{fontSize:10,color:"#888",marginTop:8,lineHeight:1.45,textAlign:"center"},children:["Read to page ",h.pagesRead," so far. Resume carries on from page ",h.nextPage,". LinkedIn lists their connections in its own order, not by date, so Rescan reads them all again from page 1."]}),u&&null===h&&(0,t.jsx)("div",{style:{fontSize:10,color:"#888",marginTop:8,lineHeight:1.45,textAlign:"center"},children:"Their whole list has been read. LinkedIn doesn't date other people's connections, so a rescan reads it all again to find anyone new."}),x&&(0,t.jsxs)("div",{style:{fontSize:10,color:"#bbb",marginTop:8,textAlign:"center"},children:[x,". One scan at a time: this one can start when it finishes."]}),d&&(0,t.jsx)("div",{style:{fontSize:11,color:"#ff8080",marginTop:8,textAlign:"center"},children:d.text})]})]})}function tw({csvSource:e,style:r}){return(0,t.jsx)("div",{style:{padding:"10px 12px",borderRadius:8,fontSize:11,color:"#999",lineHeight:1.5,textAlign:"center",background:"rgba(255,255,255,0.03)",border:"1px solid rgba(255,255,255,0.08)",...r},children:"sample"===e?"Scanning needs your own network: everyone in the sample is invented.":"Scanning needs your own network: a CSV import lives only in this window. Close it (× at the top) and open Scan."})}function tS({title:e,log:r,small:n=!1}){return(0,t.jsxs)("div",{style:{padding:"10px",borderRadius:8,background:"rgba(155,89,182,0.1)",border:"1px solid rgba(155,89,182,0.3)"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:4},children:[(0,t.jsx)("div",{style:{width:n?6:8,height:n?6:8,borderRadius:"50%",background:"#9B59B6",animation:"pulse 1s infinite"}}),(0,t.jsx)("span",{style:{fontSize:11,fontWeight:600,color:"#9B59B6"},children:e})]}),(0,t.jsx)("div",{style:{fontFamily:"monospace",fontSize:n?9:10,color:"#888",maxHeight:n?80:100,overflow:"auto"},children:r.slice(-40).map((e,r)=>(0,t.jsx)("div",{children:e},r))})]})}function tk({job:e,who:r=null}){let n=0===e.exitCode,i=!n&&Array.isArray(e.failure)&&e.failure.length?e.failure[e.failure.length-1]:null;return(0,t.jsx)("div",{style:{padding:"8px 10px",borderRadius:8,marginBottom:10,fontSize:11,textAlign:"center",lineHeight:1.4,background:n?"rgba(0,255,136,0.08)":"rgba(255,80,80,0.08)",border:`1px solid ${n?"rgba(0,255,136,0.25)":"rgba(255,80,80,0.25)"}`,color:n?"#00ff88":"#ff8080"},children:n?`${r?`${r}’s circle`:"The scan"} finished. What it found is on the map.`:`${r?`${r}’s scan`:"The scan"} stopped before the end${i?`: ${i}`:"."}`})}function tz({cs:e,rank:n,tierColors:i,onSelect:o}){let[l,s]=(0,r.useState)(!1);return(0,t.jsxs)("div",{style:{background:"rgba(255,255,255,0.05)",borderRadius:6,borderLeft:`3px solid ${i[e.bridge.tier]||"#FF6B35"}`,overflow:"hidden"},children:[(0,t.jsxs)("div",{style:{padding:"10px 10px"},children:[(0,t.jsxs)("div",{onClick:()=>o&&o(e.bridge),style:{cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,M.localPhoto)(e.bridge.profile_image_url)?(0,t.jsx)("img",{src:(0,M.localPhoto)(e.bridge.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${i[e.bridge.tier]||"#555"}`},onError:e=>{e.target.style.display="none"}}):(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",flexShrink:0,fontSize:11,fontWeight:700,background:i[e.bridge.tier]||"#555",color:"S"===e.bridge.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:e.bridge.name?.charAt(0)}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{fontWeight:600,fontSize:12},children:[(0,t.jsxs)("span",{style:{color:"#555",marginRight:4},children:["#",n]}),e.bridge.name]}),(0,t.jsx)("div",{style:{fontSize:9,color:"#666"},children:e.bridge.headline?.substring(0,40)})]})]}),(0,t.jsx)("span",{style:{fontSize:10,fontWeight:700,padding:"2px 6px",borderRadius:4,background:i[e.bridge.tier],color:"S"===e.bridge.tier?"#000":"#fff"},children:e.bridge.tier})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:6,marginTop:6,fontSize:10},children:[e.sCount>0&&(0,t.jsxs)("span",{style:{color:"#FFD700",fontWeight:600},children:[e.sCount,"S",e.sAvgPower>0?` (${e.sAvgPower.toFixed(1)})`:""]}),e.aCount>0&&(0,t.jsxs)("span",{style:{color:"#9B59B6",fontWeight:600},children:[e.aCount,"A"]}),e.bCount>0&&(0,t.jsxs)("span",{style:{color:"#3498DB"},children:[e.bCount,"B"]}),e.risingCount>0&&(0,t.jsxs)("span",{style:{color:"#2ECC71"},children:[e.risingCount," rising"]}),(0,t.jsxs)("span",{style:{color:"#555"},children:[e.members," total"]})]}),(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:4,fontSize:10},children:[(0,t.jsxs)("span",{style:{color:"#666"},children:["Elite: ",(100*e.elitePct).toFixed(0),"% · Avg: ",e.avgPower.toFixed(1)]}),(0,t.jsx)("span",{style:{color:"#FF6B35",fontWeight:700},children:e.clusterValue.toFixed(1)})]}),(e.sTier.length>0||e.aTier.length>0)&&(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,marginTop:8},children:[[...e.sTier,...e.aTier].slice(0,4).map(e=>(0,M.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,M.localPhoto)(e.profile_image_url),alt:e.name,style:{width:22,height:22,borderRadius:"50%",objectFit:"cover",border:`1.5px solid ${i[e.tier]||"#555"}`},onError:e=>{e.target.style.display="none"},title:e.name},e.id):(0,t.jsx)("div",{style:{width:22,height:22,borderRadius:"50%",fontSize:9,fontWeight:700,background:i[e.tier]||"#555",color:"S"===e.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},title:e.name,children:e.name?.charAt(0)},e.id)),e.sCount+e.aCount>4&&(0,t.jsxs)("span",{style:{fontSize:9,color:"#666"},children:["+",e.sCount+e.aCount-4," more"]})]}),(0,t.jsxs)("button",{onClick:()=>s(!l),style:{marginTop:6,background:"none",border:"none",color:"#888",fontSize:10,cursor:"pointer",padding:0,display:"flex",alignItems:"center",gap:4},children:[(0,t.jsx)("span",{style:{fontSize:12},children:l?"▾":"▸"}),l?"Hide members":`View all ${e.members} members`]})]}),l&&(0,t.jsx)("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)",padding:"6px 10px 10px",maxHeight:250,overflowY:"auto"},children:e.topMembers.map(e=>(0,t.jsxs)("div",{onClick:()=>o&&o(e),style:{display:"flex",alignItems:"center",gap:6,padding:"4px 2px",cursor:"pointer",borderRadius:4},onMouseEnter:e=>e.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:e=>e.currentTarget.style.background="transparent",children:[(0,M.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,M.localPhoto)(e.profile_image_url),alt:"",style:{width:20,height:20,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1px solid ${i[e.tier]||"#555"}`},onError:e=>{e.target.style.display="none",e.target.nextSibling.style.display="flex"}}):null,(0,t.jsx)("div",{style:{width:20,height:20,borderRadius:"50%",flexShrink:0,fontSize:8,fontWeight:700,background:i[e.tier]||"#555",color:"S"===e.tier?"#000":"#fff",display:(0,M.localPhoto)(e.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center"},children:e.name?.charAt(0)}),(0,t.jsx)("div",{style:{minWidth:0,flex:1},children:(0,t.jsx)("div",{style:{fontSize:10,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name})}),(0,t.jsxs)("span",{style:{fontSize:9,color:i[e.tier]||"#555",fontWeight:600,flexShrink:0},children:[e.tier," ",parseFloat(e.power_score).toFixed(1)]})]},e.id))})]})}function t_({connections:e,degree2:n,scanNotes:l,tierColors:s}){let a=(0,o.default)(),[d,c]=(0,r.useState)(!1),h=(0,r.useMemo)(()=>(0,K.reachIndex)(e,n,l),[e,n,l]),p=(0,r.useMemo)(()=>(0,K.readyToScan)(e,h),[e,h]),g=(0,r.useMemo)(()=>e.filter(e=>"hidden"===(0,K.reachState)(e,h)),[e,h]),u=(0,r.useMemo)(()=>e.filter(e=>null===(0,K.reachState)(e,h)&&"todo"===(0,K.circleState)(e,h)).length,[e,h]),f=(0,r.useMemo)(()=>new Map(e.map(e=>[e.id,e])),[e]),x=(0,K.circleScanCost)(),y=a.running&&(0,i.isCircleScan)(a),m=a.running&&!y?(0,i.busyReason)(a):null,b=a.finished.find(i.isCircleScan),j=d?p:p.slice(0,5);return(0,t.jsxs)("div",{style:{background:"rgba(0,255,136,0.05)",border:"1px solid rgba(0,255,136,0.2)",borderRadius:10,padding:14,marginBottom:16},children:[(0,t.jsxs)("div",{style:{fontSize:12,fontWeight:800,color:"#00ff88",marginBottom:4},children:["Ready to scan (",p.length,")"]}),(0,t.jsx)("div",{style:{fontSize:10.5,color:"#999",lineHeight:1.5,marginBottom:10},children:"People you added through a circle whose own circle isn't scanned yet. Scanning one brings in who they know: 3rd degree, through the circle you found them in."}),y?(0,t.jsx)("div",{style:{marginBottom:10},children:(0,t.jsx)(tS,{small:!0,title:a.pending?"Starting…":`Scanning ${a.target?.name||"a circle"}…`,log:a.log})}):b&&(0,t.jsx)(tk,{job:b,who:b.target?.name}),0===p.length?(0,t.jsxs)("div",{style:{fontSize:11,color:"#aaa",lineHeight:1.5},children:["Nobody yet. When someone you asked from a circle accepts, ↻ ",(0,t.jsx)("b",{children:"Check for new"})," brings them into your connections, and they show here."]}):(0,t.jsxs)("div",{role:"list",style:{display:"flex",flexDirection:"column",gap:6},children:[j.map(e=>{let r=y&&(0,i.scansCircleOf)(a,e),n=f.get(e.unlocked_from_bridge_id)?.name||e.unlocked_from_name;return(0,t.jsxs)(q.default,{role:"listitem",href:`/setup?scan=${encodeURIComponent(e.id)}`,"aria-label":`Scan ${e.name}’s circle: opens the Scan page to confirm`,style:{display:"flex",alignItems:"center",gap:8,padding:"8px 10px",borderRadius:8,textDecoration:"none",color:"#fff",background:"rgba(255,255,255,0.04)",border:"1px solid rgba(0,255,136,0.18)"},children:[(0,t.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",flexShrink:0,background:s[e.tier]||"#888",boxShadow:"0 0 0 2px rgba(0,255,136,0.45)"}}),(0,t.jsxs)("span",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("span",{style:{fontSize:12,fontWeight:700},children:e.name}),(0,t.jsx)("span",{style:{fontSize:10,color:s[e.tier]||"#888",fontWeight:700,marginLeft:6},children:e.tier}),n&&(0,t.jsxs)("span",{style:{display:"block",fontSize:10,color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["was in ",String(n||"").trim().split(/\s+/)[0],"'s circle"]})]}),(0,t.jsx)("span",{style:{fontSize:10.5,fontWeight:700,color:"#00ff88",whiteSpace:"nowrap"},children:r?"Scanning…":"Scan… →"})]},e.id)}),p.length>5&&(0,t.jsx)("button",{type:"button",onClick:()=>c(e=>!e),style:{background:"none",border:"none",color:"#888",fontSize:10.5,fontWeight:600,cursor:"pointer",padding:"2px 0",textAlign:"left"},children:d?"Show fewer":`Show all ${p.length}`})]}),p.length>0&&(0,t.jsxs)("div",{style:{fontSize:10,color:"#888",lineHeight:1.5,marginTop:8},children:["Each scan: ",x.profileViews," profile view, then one LinkedIn search for every page of their list, up to ",x.searches," pages (about ",x.minutes," min for a whole list). Nothing starts until you confirm it on the Scan page."]}),g.length>0&&(0,t.jsxs)("div",{style:{marginTop:10,fontSize:10.5,color:"#777",lineHeight:1.6},children:[g.slice(0,3).map(e=>(0,t.jsxs)("div",{style:{opacity:.7},children:[(0,t.jsx)("span",{"aria-hidden":"true",children:"🔒"})," ",e.name," ",(0,t.jsx)("span",{style:{color:"#666"},children:"· their list is hidden"})]},e.id)),g.length>3&&(0,t.jsxs)("div",{style:{opacity:.7},children:["🔒 and ",g.length-3," more with hidden lists"]})]}),u>0&&(0,t.jsxs)("div",{style:{fontSize:10.5,color:"#888",lineHeight:1.5,marginTop:10},children:[u.toLocaleString("en-US")," of your other connections aren't scanned yet."," ",(0,t.jsx)(q.default,{href:"/setup",style:{color:"#3498DB",textDecoration:"none"},children:"Map them in batches on the Scan page →"})]}),m&&(0,t.jsxs)("div",{style:{fontSize:10,color:"#bbb",marginTop:8},children:[m,". One scan at a time."]})]})}let tC={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"};function tF({collapsed:e,onToggle:n,mode:i,filter:o,onFilterChange:l,visualMode:s,onVisualModeChange:a,tierCounts:d,bridgeTierCounts:c}){let h=function(){let[e,t]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=()=>t(window.innerWidth<768);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}(),p="degrees"===i,g=e3(p?"degrees":"network"),u=p?c||{}:d||{},f=p?Object.values(c||{}).reduce((e,t)=>e+t,0):Object.values(d||{}).reduce((e,t)=>e+t,0);return e?(0,t.jsxs)("div",{onClick:n,style:{position:"fixed",left:16,top:140,zIndex:30,cursor:"pointer",display:"flex",alignItems:"center",gap:0,height:36,borderRadius:18,background:"rgba(52,152,219,0.15)",border:"2px solid rgba(52,152,219,0.5)",color:"#3498DB",fontWeight:700,boxShadow:"0 0 12px rgba(52,152,219,0.3)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",overflow:"hidden",transition:"width 0.25s ease",width:36,padding:"0 10px"},onMouseEnter:e=>{e.currentTarget.style.width="120px"},onMouseLeave:e=>{e.currentTarget.style.width="36px"},children:[(0,t.jsx)("span",{style:{fontSize:18,flexShrink:0,width:16,textAlign:"center"},children:"›"}),(0,t.jsx)("span",{style:{fontSize:11,fontWeight:600,whiteSpace:"nowrap",marginLeft:6,opacity:.9},children:"Filters"})]}):(0,t.jsxs)("div",{style:h?{position:"fixed",top:0,left:0,bottom:0,zIndex:100,width:"100vw",pointerEvents:"auto"}:{flexShrink:0,height:"100%"},children:[h&&(0,t.jsx)("div",{onClick:n,style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.5)"}}),(0,t.jsxs)("div",{style:{width:h?"80vw":320,minWidth:320*!h,maxWidth:h?300:320,height:"100%",borderRight:"1px solid rgba(52,152,219,0.15)",padding:h?"12px 10px":"16px 14px",overflowY:"auto",overflowX:"hidden",background:h?"rgba(10,15,30,0.98)":"rgba(10,15,30,0.65)",fontSize:13,backdropFilter:"blur(24px) saturate(1.4)",WebkitBackdropFilter:"blur(24px) saturate(1.4)",boxShadow:"inset 0 0 60px rgba(52,152,219,0.04), 4px 0 24px rgba(0,0,0,0.3)"},children:[(0,t.jsxs)("button",{onClick:n,style:{display:"flex",alignItems:"center",gap:6,background:"rgba(255,255,255,0.06)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:6,color:"#aaa",fontSize:12,cursor:"pointer",padding:"6px 12px",marginBottom:14,fontWeight:600,width:"100%"},children:[(0,t.jsx)("span",{style:{fontSize:16},children:"›"})," Close"]}),(0,t.jsxs)("div",{style:{marginBottom:18},children:[(0,t.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#555",letterSpacing:1,marginBottom:8,textTransform:"uppercase"},children:"Visual"}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:g.map(e=>(0,t.jsxs)("button",{onClick:()=>a&&a(e.key),style:{display:"flex",alignItems:"center",gap:8,padding:"7px 10px",borderRadius:6,border:"none",cursor:"pointer",width:"100%",textAlign:"left",background:s===e.key?"rgba(52,152,219,0.15)":"rgba(255,255,255,0.03)",color:s===e.key?"#3498DB":"#888",transition:"all 0.15s"},children:[(0,t.jsx)("span",{style:{fontSize:14,width:20,textAlign:"center"},children:e.icon}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:11,fontWeight:600},children:e.label}),(0,t.jsx)("div",{style:{fontSize:8,color:"#555",marginTop:1},children:e.desc})]})]},e.key))})]}),(0,t.jsxs)("div",{style:{marginBottom:18},children:[(0,t.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#555",letterSpacing:1,marginBottom:8,textTransform:"uppercase"},children:p?"Filter by bridge tier":"Filter"}),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:[(0,t.jsxs)("button",{onClick:()=>l&&l("all"),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"7px 10px",borderRadius:6,border:"none",cursor:"pointer",width:"100%",background:"all"===o?"rgba(255,255,255,0.12)":"rgba(255,255,255,0.03)",color:"all"===o?"#fff":"#888"},children:[(0,t.jsx)("span",{style:{fontSize:11,fontWeight:600},children:"All"}),(0,t.jsx)("span",{style:{fontSize:10,color:"#555"},children:f})]}),["S","A","B","C","D"].map(e=>(0,t.jsxs)("button",{onClick:()=>l&&l(e),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"7px 10px",borderRadius:6,border:"none",cursor:"pointer",width:"100%",background:o===e?`${tC[e]}20`:"rgba(255,255,255,0.03)",color:o===e?tC[e]:"#888",borderLeft:o===e?`3px solid ${tC[e]}`:"3px solid transparent"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,t.jsx)("div",{style:{width:8,height:8,borderRadius:"50%",background:tC[e],opacity:o===e?1:.4}}),(0,t.jsxs)("span",{style:{fontSize:11,fontWeight:600},children:[e,"-Tier"]})]}),(0,t.jsx)("span",{style:{fontSize:10,color:"#555"},children:u[e]||0})]},e))]})]}),(0,t.jsxs)("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)",paddingTop:12},children:[(0,t.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#555",letterSpacing:1,marginBottom:8,textTransform:"uppercase"},children:"Stats"}),(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:6},children:[Object.entries(u).filter(([e])=>["S","A","B"].includes(e)).map(([e,r])=>(0,t.jsxs)("div",{style:{padding:"6px 8px",borderRadius:6,background:`${tC[e]}10`,textAlign:"center"},children:[(0,t.jsx)("div",{style:{fontSize:16,fontWeight:800,color:tC[e]},children:r}),(0,t.jsxs)("div",{style:{fontSize:8,color:"#555"},children:[e,"-Tier"]})]},e)),(0,t.jsxs)("div",{style:{padding:"6px 8px",borderRadius:6,background:"rgba(255,255,255,0.04)",textAlign:"center"},children:[(0,t.jsx)("div",{style:{fontSize:16,fontWeight:800,color:"#fff"},children:f}),(0,t.jsx)("div",{style:{fontSize:8,color:"#555"},children:"Total"})]})]})]})]})]})}var tW=e.i(2776),tR=e.i(64745);function t$(){let[e,n]=(0,r.useState)(!1),[i,o]=(0,r.useState)("");async function l(){n(!0),o("");try{await (0,tR.loadSampleIntoSession)(),window.location.reload()}catch(e){o(e.message||"Could not load the sample network."),n(!1)}}return(0,t.jsx)("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",padding:24,overflowY:"auto"},children:(0,t.jsxs)("div",{style:{maxWidth:520,width:"100%",textAlign:"center"},children:[(0,t.jsx)("div",{style:{width:68,height:68,borderRadius:"50%",margin:"0 auto 22px",border:"2px solid rgba(255,215,0,0.35)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:26},children:"✦"}),(0,t.jsx)("h2",{style:{fontSize:28,fontWeight:800,margin:"0 0 10px",background:"linear-gradient(135deg, #FFD700, #9B59B6, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Welcome to Six Degrees"}),(0,t.jsx)("p",{style:{color:"rgba(255,255,255,0.5)",fontSize:14.5,lineHeight:1.7,margin:"0 0 28px"},children:"Your network, drawn as a galaxy. Everything stays on this computer. Pick how to bring it in — you can switch later."}),(0,t.jsx)(tB,{href:"/setup",primary:!0,badge:"Recommended",title:"Scan my LinkedIn",body:"A few guided steps: set up the scanner, sign into LinkedIn yourself, and watch your galaxy fill in. The only way to see who your connections know."}),(0,t.jsx)(tB,{href:"/import",title:"Import my LinkedIn CSV",body:"LinkedIn’s official export, read in your browser. Takes about ten minutes to arrive by email. Shows the people you know, not who they know."}),(0,t.jsx)(tB,{onClick:l,disabled:e,title:e?"Loading…":"Explore a sample network",body:"150 invented connections and the 598 people they know. Every view except Outlink and Scan, which need your own scan. Nothing about you is used."}),i&&(0,t.jsx)("div",{style:{color:"#ff6b6b",fontSize:13,marginTop:18},children:i}),(0,t.jsxs)("p",{style:{color:"rgba(255,255,255,0.45)",fontSize:13,lineHeight:1.6,margin:"18px 0 0"},children:["Moving from another computer?"," ",(0,t.jsx)("a",{href:"/settings#data",style:{color:"rgba(255,255,255,0.75)"},children:"Import your saved copy in Settings → Your data."})]})]})})}function tB({href:e,onClick:r,disabled:n,primary:i,badge:o,title:l,body:s}){let a={display:"block",width:"100%",boxSizing:"border-box",textAlign:"left",padding:"16px 18px",borderRadius:12,marginBottom:12,textDecoration:"none",cursor:n?"default":"pointer",font:"inherit",border:i?"1px solid rgba(255,215,0,0.45)":"1px solid rgba(255,255,255,0.12)",background:i?"linear-gradient(135deg, rgba(255,215,0,0.12), rgba(155,89,182,0.14))":"rgba(255,255,255,0.03)",color:"#fff"},d=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:5},children:[(0,t.jsx)("span",{style:{fontSize:15.5,fontWeight:750},children:l}),o&&(0,t.jsx)("span",{style:{fontSize:10.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",padding:"3px 8px",borderRadius:20,background:"#FFD700",color:"#0a0a1a"},children:o}),(0,t.jsx)("span",{style:{marginLeft:"auto",color:"rgba(255,255,255,0.4)"},children:"→"})]}),(0,t.jsx)("div",{style:{fontSize:13,color:"rgba(255,255,255,0.5)",lineHeight:1.6},children:s})]});return e?(0,t.jsx)("a",{href:e,style:a,children:d}):(0,t.jsx)("button",{onClick:r,disabled:n,style:a,children:d})}var tM=e.i(7837);let tT=[],tI=e=>!!e&&!["install","setup","login"].includes(e.action);function tE(e,t){let r={};e.forEach(e=>{r[e.tier]=(r[e.tier]||0)+1});let n={};return t.forEach(e=>{n[e.tier]=(n[e.tier]||0)+1}),{total:e.length,tiers:r,d2Total:t.length,d2Tiers:n}}let tD={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"};function tA(){let e,o,d,c,{userId:h,userName:p}=(0,tf.useUser)(),g=function(){let[e,t]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=()=>t(window.innerWidth<768);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}(),[u,f]=(0,r.useState)([]),[x,y]=(0,r.useState)([]),[m,b]=(0,r.useState)(null),j=(0,r.useRef)(null),[v,w]=(0,r.useState)("all"),S=(0,n.useSearchParams)().get("chain"),[k,z]=(0,r.useState)(S),[_,C]=(0,r.useState)(()=>k?"degrees":"network"),[F,W]=(0,r.useState)(!0),[R,$]=(0,r.useState)(null),[B,M]=(0,r.useState)(!0),[T,I]=(0,r.useState)(!0),[E,D]=(0,r.useState)(()=>k?"chain":"galaxy"),[A,L]=(0,r.useState)([]),[O,P]=(0,r.useState)(!1),[N,H]=(0,r.useState)(!1),[Y,U]=(0,r.useState)("csv"),[V,X]=(0,r.useState)(i.NO_SCAN_NOTES),G=(0,r.useRef)(""),K=(0,s.requestCount)((0,l.default)());(0,r.useEffect)(()=>{h&&(e(),tR.IS_DEMO||(0,tM.hasCsvNetwork)()||((0,i.loadScanNotes)().then(X),fetch(`/api/notifications?userId=${h}`).then(e=>e.json()).then(e=>L(e.notifications||[])).catch(()=>{})));async function e(){let e=(0,tM.hasCsvNetwork)()?(0,tM.loadCsvNetwork)():null;e&&(H(!0),U(e.source||"csv"));let{degree1:t,degree2:r}=tR.IS_DEMO?await (0,tR.loadDemoNetwork)():e||await (async()=>await (0,a.loadNetwork)(h))();f(t),y(r),G.current=tL(t,r),$(tE(t,r)),W(!1)}},[h]);let J=(0,r.useCallback)(async()=>{if(!(tR.IS_DEMO||(0,tM.hasCsvNetwork)())&&h)try{let[{degree1:e,degree2:t},r]=await Promise.all([(0,a.loadNetwork)(h),(0,i.loadScanNotes)()]);X(e=>JSON.stringify(e)===JSON.stringify(r)?e:r);let n=tL(e,t);if(n===G.current)return;G.current=n,f(e),y(t),$(tE(e,t))}catch{}},[h]),Z=(0,r.useCallback)(()=>{z(null);try{window.history.replaceState(null,"",window.location.pathname)}catch{}},[]),Q="degrees"===_,ee=(0,r.useMemo)(()=>"all"===v?u:u.filter(e=>e.tier===v),[u,v]),et=(0,r.useMemo)(()=>new Map(u.map(e=>[e.id,e])),[u]),er=(0,r.useMemo)(()=>new Set(x.map(e=>e.source_connection_id).filter(Boolean)),[x]),en=(0,r.useMemo)(()=>{let e={};return u.forEach(t=>{er.has(t.id)&&(e[t.tier]=(e[t.tier]||0)+1)}),e},[u,er]),ei=(0,r.useMemo)(()=>Q?"all"===v?x:x.filter(e=>et.get(e.source_connection_id)?.tier===v):tT,[Q,v,et,x]),eo=(0,r.useCallback)(e=>{b(e),e&&M(!1)},[]);if(F)return(0,t.jsxs)("div",{style:{minHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:"#0a0a1a",color:"#fff"},children:[(0,t.jsx)("div",{style:{fontSize:24,fontWeight:700},children:"Loading Six Degrees…"}),(0,t.jsx)("div",{style:{fontSize:14,color:"#888",marginTop:8},children:"Mapping your LinkedIn network"})]});let el=(e=e8[E])&&e.modes.includes(_)?{key:E,...e}:e3(_)[0]??{key:"list",...e8.list},es=!tR.IS_DEMO&&!N;return(0,t.jsxs)("div",{"data-map":!0,style:{height:"100vh",overflow:"hidden",background:"#0a0a1a",color:"#fff",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},children:[(0,t.jsxs)("header",{style:{padding:g?"10px 12px":"20px 30px",borderBottom:"1px solid rgba(255,255,255,0.1)"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:g?4:8,flexWrap:g?"wrap":"nowrap",gap:6*!!g},children:[(0,t.jsx)("h1",{style:{fontSize:g?16:28,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FFD700, #9B59B6, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Six Degrees"}),(0,t.jsxs)("div",{style:{display:"flex",gap:g?2:4,background:"rgba(255,255,255,0.08)",borderRadius:8,padding:g?2:3,flexWrap:g?"wrap":"nowrap"},children:[(0,t.jsx)("button",{onClick:()=>{C("network"),b(null),w("all"),D("galaxy")},style:{padding:g?"6px 10px":"8px 16px",borderRadius:6,border:"none",fontSize:g?11:13,fontWeight:600,cursor:"pointer",background:"network"===_?"#fff":"transparent",color:"network"===_?"#000":"#888"},children:g?"Circle":"Network Circle"}),(0,t.jsx)("button",{onClick:()=>{C("degrees"),b(null),w("all"),D("separation")},style:{padding:g?"6px 10px":"8px 16px",borderRadius:6,border:"none",fontSize:g?11:13,fontWeight:600,cursor:"pointer",background:"degrees"===_?"linear-gradient(135deg, #FFD700, #FF6B35)":"rgba(255,255,255,0.12)",color:"degrees"===_?"#000":"#fff"},children:"Degrees"}),N&&(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginLeft:g?4:10,padding:g?"4px 8px":"5px 10px",borderRadius:999,background:"rgba(255,255,255,0.05)",border:"1px solid rgba(255,255,255,0.12)"},children:[(0,t.jsx)("span",{style:{width:6,height:6,borderRadius:"50%",background:"sample"===Y?"#9B59B6":"#2ecc71"}}),(0,t.jsx)("span",{style:{fontSize:g?10:12,color:"rgba(255,255,255,0.65)",whiteSpace:"nowrap"},children:"sample"===Y?"Sample network":"Your CSV"}),(0,t.jsx)("button",{onClick:()=>{(0,tM.clearCsvNetwork)(),window.location.href="/"},title:"sample"===Y?"Leave the sample network":"Clear this import",style:{border:"none",background:"transparent",cursor:"pointer",color:"#888",fontSize:g?13:15,lineHeight:1,padding:"0 0 0 2px"},children:"×"})]}),!tR.IS_DEMO&&(0,t.jsx)(q.default,{href:"/paths",style:{padding:g?"6px 10px":"8px 16px",borderRadius:6,border:"none",fontSize:g?11:13,fontWeight:600,background:"rgba(255,255,255,0.06)",color:"#00ff88",textDecoration:"none",display:"flex",alignItems:"center",gap:4},children:"Paths"}),!tR.IS_DEMO&&!N&&(0,t.jsx)(q.default,{href:"/scores",style:{padding:g?"6px 10px":"8px 16px",borderRadius:6,border:"none",fontSize:g?11:13,fontWeight:600,background:"rgba(255,255,255,0.06)",color:"#FFD700",textDecoration:"none",display:"flex",alignItems:"center",gap:4},children:"Scores"}),!tR.IS_DEMO&&!N&&(0,t.jsx)(q.default,{href:"/queue",style:{padding:g?"6px 10px":"8px 16px",borderRadius:6,border:"none",fontSize:g?11:13,fontWeight:600,background:"rgba(255,255,255,0.06)",color:"#FF6B35",textDecoration:"none",display:"flex",alignItems:"center",gap:4},children:"Outlink"}),!tR.IS_DEMO&&!N&&(0,t.jsx)(q.default,{href:"/setup",style:{padding:g?"8px 12px":"8px 16px",borderRadius:6,border:"none",fontSize:13,fontWeight:600,background:"rgba(255,255,255,0.06)",color:"#666",textDecoration:"none",display:"flex",alignItems:"center",gap:4},children:"Scan"})]}),!tR.IS_DEMO&&(0,t.jsx)(q.default,{href:"/settings",title:"Settings","aria-label":"Settings",style:{width:g?28:32,height:g?28:32,borderRadius:"50%",flexShrink:0,background:"rgba(255,255,255,0.06)",color:"#888",fontSize:g?14:16,textDecoration:"none",display:"flex",alignItems:"center",justifyContent:"center",marginLeft:g?4:8},children:"⚙︎"}),!tR.IS_DEMO&&!N&&(0,t.jsxs)("div",{style:{position:"relative",marginLeft:g?4:8},children:[(0,t.jsxs)("button",{onClick:()=>P(!O),style:{width:g?28:32,height:g?28:32,borderRadius:"50%",border:"none",cursor:"pointer",background:"rgba(255,255,255,0.06)",color:"#888",fontSize:g?12:14,display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:["🔔",A.filter(e=>!e.seen).length>0&&(0,t.jsx)("span",{style:{position:"absolute",top:-2,right:-2,width:16,height:16,borderRadius:"50%",background:"#ff5050",color:"#fff",fontSize:9,fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center"},children:A.filter(e=>!e.seen).length})]}),O&&(0,t.jsxs)("div",{style:{position:"absolute",top:40,right:0,width:320,maxHeight:400,background:"rgba(10,10,26,0.98)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:12,overflow:"hidden",zIndex:100,backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",boxShadow:"0 8px 32px rgba(0,0,0,0.5)"},children:[(0,t.jsxs)("div",{style:{padding:"12px 16px",borderBottom:"1px solid rgba(255,255,255,0.08)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsx)("span",{style:{fontWeight:700,fontSize:14},children:"Notifications"}),A.filter(e=>!e.seen).length>0&&(0,t.jsx)("button",{onClick:()=>{fetch("/api/notifications",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"mark-all-seen"})}),L(e=>e.map(e=>({...e,seen:!0})))},style:{background:"none",border:"none",color:"#3498DB",fontSize:11,cursor:"pointer",fontWeight:600},children:"Mark all read"})]}),(0,t.jsx)("div",{style:{overflowY:"auto",maxHeight:340},children:0===A.length?(0,t.jsx)("div",{style:{padding:20,textAlign:"center",color:"#555",fontSize:12},children:"No notifications yet"}):A.slice(0,20).map(e=>(0,t.jsx)("div",{style:{padding:"10px 16px",borderBottom:"1px solid rgba(255,255,255,0.04)",background:e.seen?"transparent":"rgba(255,215,0,0.04)"},children:(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"flex-start"},children:[(0,t.jsx)("span",{style:{fontSize:16},children:e.icon||"📌"}),(0,t.jsxs)("div",{style:{flex:1},children:[(0,t.jsx)("div",{style:{fontSize:12,fontWeight:600,color:e.seen?"#888":"#fff"},children:e.title}),e.message&&(0,t.jsx)("div",{style:{fontSize:10,color:"#666",marginTop:2},children:e.message}),(0,t.jsx)("div",{style:{fontSize:9,color:"#444",marginTop:3},children:new Date(e.created_at).toLocaleDateString()})]})]})},e.id))})]})]}),!tR.IS_DEMO&&!N&&(0,t.jsx)(tP,{isMobile:g}),(0,t.jsx)("a",{href:tR.IS_DEMO?"/launch":N?"/import":"/profile",style:{width:g?30:36,height:g?30:36,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",background:"linear-gradient(135deg, #FFD700, #FF6B35)",color:"#000",fontWeight:800,fontSize:g?11:14,textDecoration:"none",marginLeft:g?6:12,flexShrink:0},children:(o=u.filter(e=>"S"===e.tier).length,d=u.filter(e=>"A"===e.tier).length,c=u.filter(e=>"B"===e.tier).length,Math.floor(Math.sqrt((100*o+40*d+15*c+200*u.filter(e=>er.has(e.id)).length+50*x.filter(e=>"S"===e.tier).length+u.length)/10)))})]}),Q&&!N&&K>0&&(0,t.jsxs)(q.default,{href:"/queue",style:{padding:"5px 12px",borderRadius:16,fontSize:12,fontWeight:600,textDecoration:"none",background:"rgba(255,107,53,0.12)",color:"#FF6B35",border:"1px solid rgba(255,107,53,0.25)",display:"inline-flex",alignItems:"center",gap:5},children:[(0,t.jsx)("span",{style:{fontSize:10},children:"⏳"}),K," Pending"]})]}),(0,t.jsxs)("div",{style:{display:"flex",height:g?"calc(100vh - 70px)":"calc(100vh - 130px)",position:"relative"},children:[(0,t.jsx)(tF,{collapsed:T,onToggle:()=>I(!T),mode:_,filter:v,onFilterChange:w,visualMode:E,onVisualModeChange:D,tierCounts:R?.tiers||{},bridgeTierCounts:en}),(()=>{if(0===u.length)return(0,t.jsx)(t$,{});if(Q&&0===x.length)return(0,t.jsx)("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",padding:24,textAlign:"center"},children:(0,t.jsxs)("div",{style:{maxWidth:440},children:[(0,t.jsx)("div",{style:{fontSize:40,marginBottom:16,opacity:.5},children:"🔗"}),(0,t.jsx)("h2",{style:{fontSize:22,fontWeight:800,margin:"0 0 12px",color:"#fff"},children:"Degrees need 2nd-degree data"}),(0,t.jsxs)("p",{style:{color:"rgba(255,255,255,0.45)",fontSize:14,lineHeight:1.7,margin:"0 0 20px"},children:["This view maps who ",(0,t.jsx)("em",{children:"your connections"})," ","know — the people you haven’t met yet. LinkedIn’s CSV export only covers your own 1st-degree list, so there are no circles to open here."]}),(0,t.jsxs)("p",{style:{color:"#666",fontSize:13,lineHeight:1.7,margin:0},children:["The local scanner maps those circles (and captures real photos)."," ",(0,t.jsx)(q.default,{href:"/setup",style:{color:"#3498DB",textDecoration:"none"},children:"Set up scanning →"})]})]})});let e=el.component,r={connections:ee,degree2:el.allDegree2?x:ei,onSelect:eo,mode:_,userName:p,userImage:null,selectedId:m?.id??null,tierColors:tD,focusNodeRef:j,fullDegree1:u,fullDegree2:x,scanNotes:V,canScan:es,chainOpen:k,onChainOpened:Z};return(0,t.jsx)(e,{...r})})(),(0,t.jsx)(tx,{selected:m,stats:R,tierColors:tD,connections:u,degree2:x,mode:_,collapsed:B,filter:v,onToggle:()=>M(!B),onSelect:e=>{b(e||null)},onSwitchMode:e=>{C(e),w("all")},onFocusNode:e=>{j.current&&j.current(e)},csvSource:tR.IS_DEMO?"sample":N?Y:null,scanNotes:V,canScan:es}),es&&(0,t.jsx)(tO,{onChange:J,live:"chain"===el.key}),Q&&"separation"!==el.key&&(0,t.jsxs)("div",{style:{position:"absolute",bottom:20,right:20,zIndex:20,display:"flex",alignItems:"center",gap:8,background:"rgba(0,0,0,0.7)",borderRadius:20,padding:"6px 14px",backdropFilter:"blur(8px)",border:"1px solid rgba(255,255,255,0.08)"},children:[(0,t.jsxs)("span",{style:{fontSize:10,color:"#666"},children:[e8.orbit.icon," ",e8.orbit.label]}),(0,t.jsx)("div",{onClick:()=>D("orbit"===el.key?"chain":"orbit"),style:{width:32,height:18,borderRadius:9,cursor:"pointer",background:"orbit"===el.key?"#FF6B35":"rgba(255,255,255,0.15)",position:"relative",transition:"background 0.2s"},children:(0,t.jsx)("div",{style:{width:14,height:14,borderRadius:"50%",background:"#fff",position:"absolute",top:2,left:"orbit"===el.key?16:2,transition:"left 0.2s"}})})]})]})]})}function tL(e,t){let r=0x811c9dc5,n=e=>{for(let t=0;t<e.length;t++)r=Math.imul(r^e.charCodeAt(t),0x1000193)};for(let r of[...e,...t])n(`${r.id}|${r.degree}|${r.source_connection_id??""}|${r.unlocked_from_bridge_id??""}|${r.tier}|${r.power_score}|${r.unlock_status??""}|${r.profile_image_url??""};`);return`${e.length}:${t.length}:${r>>>0}`}function tO({onChange:e,live:t}){let n=(0,o.default)(),l=n.finished.find(tI)?.startedAt??null,s=t&&n.running&&(0,i.isCircleScan)(n);return(0,r.useEffect)(()=>{null!=l&&e()},[l,e]),(0,r.useEffect)(()=>{if(!s)return;let t=setInterval(e,2e4);return()=>clearInterval(t)},[s,e]),null}function tP({isMobile:e}){let r=(0,o.default)(),n=(0,i.busyReason)(r);return(0,t.jsx)("button",{onClick:async()=>{try{let e=(0,i.notReadyMessage)(await (0,i.scraperStatus)());if(e)return void alert(e);if(!window.confirm("Check for new connections?\n\nThis opens a Chrome window on your LinkedIn connections list and reads it from the newest, stopping once it reaches people already saved. It usually takes under a minute. It reads your own list, not a search, so it doesn’t use your search budget, but like any scan it is LinkedIn traffic from your account."))return;await (0,i.beginScrape)("refresh"),alert("Checking for new connections — watch it on the Scan page.")}catch(e){alert(e.message)}},disabled:!!n,title:n?`${n}. One scan at a time.`:"Check for new connections",style:{width:e?28:32,height:e?28:32,borderRadius:"50%",border:"none",cursor:n?"not-allowed":"pointer",opacity:n?.4:1,background:"rgba(255,255,255,0.06)",color:"#888",fontSize:e?12:14,display:e?"none":"flex",alignItems:"center",justifyContent:"center",marginLeft:8},children:"↻"})}e.s(["default",0,function(){return(0,t.jsx)(tW.default,{children:(0,t.jsx)(r.Suspense,{children:(0,t.jsx)(tA,{})})})}],81694)}]);
|