six-degrees 0.4.11 → 0.5.0
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 +9 -9
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- 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 +1 -1
- 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/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +12 -12
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +12 -12
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +11 -11
- 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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +3 -2
- package/.next/standalone/.next/server/app/api/scraper/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/settings/route.js +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 +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 +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 +1 -1
- package/.next/standalone/.next/server/app/api/setup-profile/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/social/crm/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/social/messages/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/social/route.js +3 -3
- package/.next/standalone/.next/server/app/api/social/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/unlock/route.js +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 +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 +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/import/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/import/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/import.html +1 -1
- package/.next/standalone/.next/server/app/import.rsc +14 -14
- package/.next/standalone/.next/server/app/import.segments/_full.segment.rsc +14 -14
- 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 +13 -13
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +14 -14
- 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/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/launch.html +2 -2
- package/.next/standalone/.next/server/app/launch.rsc +14 -14
- package/.next/standalone/.next/server/app/launch.segments/_full.segment.rsc +14 -14
- 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 +13 -13
- 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 +14 -14
- package/.next/standalone/.next/server/app/paths.segments/_full.segment.rsc +14 -14
- 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 +13 -13
- 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 +14 -14
- package/.next/standalone/.next/server/app/profile.segments/_full.segment.rsc +14 -14
- 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 +13 -13
- 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 +14 -14
- package/.next/standalone/.next/server/app/queue.segments/_full.segment.rsc +14 -14
- 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 +13 -13
- package/.next/standalone/.next/server/app/scores/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/scores/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/scores.html +1 -1
- package/.next/standalone/.next/server/app/scores.rsc +14 -14
- package/.next/standalone/.next/server/app/scores.segments/_full.segment.rsc +14 -14
- 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 +13 -13
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings.html +1 -1
- package/.next/standalone/.next/server/app/settings.rsc +14 -14
- package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +14 -14
- 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 +13 -13
- 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 +14 -14
- package/.next/standalone/.next/server/app/setup.segments/_full.segment.rsc +14 -14
- 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 +13 -13
- package/.next/standalone/.next/server/app/social/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/social/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/social.html +1 -1
- package/.next/standalone/.next/server/app/social.rsc +14 -14
- package/.next/standalone/.next/server/app/social.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/social.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/social.segments/social/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0bat8nx._.js → [root-of-the-server]__13dx4sd._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__15wc9e-._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1kbl21f._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__20rwfdw._.js +8 -0
- package/.next/standalone/.next/server/chunks/_072jl0y._.js +1 -1
- package/.next/standalone/.next/server/chunks/_1_fynia._.js +7 -7
- 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/lib_0851sk0._.js +8 -0
- package/.next/standalone/.next/server/chunks/lib_1q7p2ro._.js +8 -0
- package/.next/standalone/.next/server/chunks/lib_1r6l86l._.js +8 -0
- package/.next/standalone/.next/server/chunks/lib_db-client_15le7cw.js +8 -8
- package/.next/standalone/.next/server/chunks/lib_rpc_04s8mzr.js +3 -0
- package/.next/standalone/.next/server/chunks/lib_rpc_053z7as.js +3 -0
- package/.next/standalone/.next/server/chunks/lib_rpc_0b_-2te.js +3 -0
- package/.next/standalone/.next/server/chunks/lib_rpc_0dhbxdm.js +3 -0
- package/.next/standalone/.next/server/chunks/lib_rpc_0dxlk31.js +3 -0
- package/.next/standalone/.next/server/chunks/lib_rpc_0f8b-qc.js +3 -0
- package/.next/standalone/.next/server/chunks/lib_rpc_0pzie7_.js +3 -0
- package/.next/standalone/.next/server/chunks/lib_rpc_0r76fq_.js +3 -0
- package/.next/standalone/.next/server/chunks/lib_rpc_0ut7pjp.js +3 -0
- package/.next/standalone/.next/server/chunks/lib_rpc_15zyqaz.js +3 -0
- package/.next/standalone/.next/server/chunks/lib_rpc_18zpjtq.js +3 -0
- package/.next/standalone/.next/server/chunks/lib_rpc_1a8xkiz.js +3 -0
- package/.next/standalone/.next/server/chunks/lib_rpc_1e_55xo.js +3 -0
- package/.next/standalone/.next/server/chunks/lib_rpc_1oxfd1_.js +3 -0
- package/.next/standalone/.next/server/chunks/lib_rpc_1s0lod0.js +3 -0
- package/.next/standalone/.next/server/chunks/lib_scoring_1-e4ur0.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_01kacen._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_03l7vge._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_1ap1tu_._.js → _0gtv9jb._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0jdkqgi._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0xi-fbs._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0xmwmfv._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_1-b9hj7._.js +9 -0
- package/.next/standalone/.next/server/chunks/ssr/_112ewem._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_16ab63q._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_1fxm0-s._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_1ra1d3r._.js +9 -0
- package/.next/standalone/.next/server/chunks/ssr/app_141w189._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/app_components_ui_0pdmz2z.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/app_page_1fazqbf.js +22 -10
- package/.next/standalone/.next/server/chunks/ssr/app_paths_page_1ol90m7.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/app_profile_page_0u3-l5y.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_queue_page_0c6znd6.js +6 -5
- package/.next/standalone/.next/server/chunks/ssr/app_settings_page_1f8mjj_.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_setup_page_1-282zx.js +19 -3
- package/.next/standalone/.next/server/chunks/ssr/app_social_page_0h7zxda.js +1 -2
- package/.next/standalone/.next/server/chunks/ssr/lib_0i8v-s3._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/lib_13rapwj._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/lib_galaxy-lab_108_lu-.js +1 -1
- 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/03bziijw5srol.js +1 -0
- package/.next/standalone/.next/static/chunks/0bgq8wmopl_ig.js +7 -0
- package/.next/standalone/.next/static/chunks/0ezus6p2eb-vg.js +1 -0
- package/.next/standalone/.next/static/chunks/0g_fy2034bp0x.js +34 -0
- package/.next/standalone/.next/static/chunks/0q5dru4q6gxl5.js +22 -0
- package/.next/standalone/.next/static/chunks/0w-byiwb2zax8.js +2 -0
- package/.next/standalone/.next/static/chunks/1g7jcovdejc9-.js +1 -0
- package/.next/standalone/.next/static/chunks/1i51yylxdzht1.js +1 -0
- package/.next/standalone/.next/static/chunks/1zf8swaasjf1e.js +43 -0
- package/.next/standalone/.next/static/chunks/2rqtpccruavf2.js +1 -0
- package/.next/standalone/.next/static/chunks/2wgz9ietkqqe6.js +1 -0
- package/.next/standalone/.next/static/chunks/30x3oq_st7a5r.js +1 -0
- package/.next/standalone/.next/static/chunks/355ryio1b7sm1.js +1 -0
- package/.next/standalone/.next/static/chunks/3ap5hgma7n0o7.js +1 -0
- package/.next/standalone/.next/static/chunks/3fci6qi39-1n5.js +1 -0
- package/.next/standalone/.next/static/chunks/{24tvdun1cb3g1.js → 3sowbvbaj1s6n.js} +1 -1
- package/.next/standalone/CHANGELOG.md +187 -0
- package/.next/standalone/app/api/ingest/route.js +40 -1
- package/.next/standalone/app/api/scraper/route.js +7 -1
- package/.next/standalone/app/api/settings/sector-preview/route.js +2 -1
- package/.next/standalone/app/components/AppTabs.js +59 -0
- package/.next/standalone/app/components/ChainView.js +303 -89
- package/.next/standalone/app/components/CirclePanel.js +162 -0
- package/.next/standalone/app/components/CompanyScores.js +2 -2
- package/.next/standalone/app/components/FieldStep.js +4 -4
- package/.next/standalone/app/components/FilterPanel.js +121 -183
- package/.next/standalone/app/components/ForceGraph.js +41 -3
- package/.next/standalone/app/components/GalaxyLab.js +26 -31
- package/.next/standalone/app/components/LegacyScoresCard.js +2 -2
- package/.next/standalone/app/components/MapControls.js +154 -0
- package/.next/standalone/app/components/NoteDetail.js +118 -0
- package/.next/standalone/app/components/PathsAnalyzer.js +147 -110
- package/.next/standalone/app/components/PeopleMap.js +308 -0
- package/.next/standalone/app/components/ScanRadar.js +129 -0
- package/.next/standalone/app/components/ScanStatusBar.js +71 -27
- package/.next/standalone/app/components/SeparationView.js +626 -118
- package/.next/standalone/app/components/Sidebar.js +28 -2
- package/.next/standalone/app/components/settings/NetworkHealthSection.js +1 -1
- package/.next/standalone/app/components/settings/SectorSection.js +2 -2
- package/.next/standalone/app/components/settings/TierSection.js +1 -1
- package/.next/standalone/app/components/settings/TitleSection.js +149 -0
- package/.next/standalone/app/components/views.js +15 -14
- package/.next/standalone/app/page.js +89 -156
- package/.next/standalone/app/paths/page.js +39 -27
- package/.next/standalone/app/profile/page.js +33 -5
- package/.next/standalone/app/queue/page.js +56 -34
- package/.next/standalone/app/scores/page.js +16 -66
- package/.next/standalone/app/settings/page.js +27 -13
- package/.next/standalone/app/setup/page.js +298 -205
- package/.next/standalone/app/social/SocialHub.js +374 -0
- package/.next/standalone/app/social/page.js +10 -362
- package/.next/standalone/lib/chain-layout.js +105 -35
- package/.next/standalone/lib/degrees.js +0 -6
- package/.next/standalone/lib/dot-rings.js +25 -0
- package/.next/standalone/lib/galaxy-lab.js +65 -6
- package/.next/standalone/lib/ingest.js +2 -0
- package/.next/standalone/lib/island.js +40 -0
- package/.next/standalone/lib/linkedin-limits.js +6 -2
- package/.next/standalone/lib/map-heat.js +20 -0
- package/.next/standalone/lib/network-health.js +1 -1
- package/.next/standalone/lib/notifications.js +121 -0
- package/.next/standalone/lib/people-map.js +82 -0
- package/.next/standalone/lib/rarity.js +45 -3
- package/.next/standalone/lib/reach.js +7 -6
- package/.next/standalone/lib/rpc.js +15 -4
- package/.next/standalone/lib/scan-pace.js +46 -0
- package/.next/standalone/lib/scoring.js +39 -8
- package/.next/standalone/lib/scraper-client.js +19 -6
- package/.next/standalone/lib/sector-focus.js +4 -4
- package/.next/standalone/lib/separation.js +137 -10
- package/.next/standalone/lib/settings-effects.js +20 -11
- package/.next/standalone/lib/settings.js +3 -0
- package/.next/standalone/lib/tier-grid.js +99 -0
- package/.next/standalone/lib/title-ranking.js +83 -0
- package/.next/standalone/package-lock.json +2 -2
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/scripts/scrape.py +51 -13
- package/.next/static/chunks/03bziijw5srol.js +1 -0
- package/.next/static/chunks/0bgq8wmopl_ig.js +7 -0
- package/.next/static/chunks/0ezus6p2eb-vg.js +1 -0
- package/.next/static/chunks/0g_fy2034bp0x.js +34 -0
- package/.next/static/chunks/0q5dru4q6gxl5.js +22 -0
- package/.next/static/chunks/0w-byiwb2zax8.js +2 -0
- package/.next/static/chunks/1g7jcovdejc9-.js +1 -0
- package/.next/static/chunks/1i51yylxdzht1.js +1 -0
- package/.next/static/chunks/1zf8swaasjf1e.js +43 -0
- package/.next/static/chunks/2rqtpccruavf2.js +1 -0
- package/.next/static/chunks/2wgz9ietkqqe6.js +1 -0
- package/.next/static/chunks/30x3oq_st7a5r.js +1 -0
- package/.next/static/chunks/355ryio1b7sm1.js +1 -0
- package/.next/static/chunks/3ap5hgma7n0o7.js +1 -0
- package/.next/static/chunks/3fci6qi39-1n5.js +1 -0
- package/.next/static/chunks/{24tvdun1cb3g1.js → 3sowbvbaj1s6n.js} +1 -1
- package/CHANGELOG.md +187 -0
- package/lib/chain-layout.js +105 -35
- package/lib/degrees.js +0 -6
- package/lib/dot-rings.js +25 -0
- package/lib/galaxy-lab.js +65 -6
- package/lib/ingest.js +2 -0
- package/lib/island.js +40 -0
- package/lib/linkedin-limits.js +6 -2
- package/lib/map-heat.js +20 -0
- package/lib/network-health.js +1 -1
- package/lib/notifications.js +121 -0
- package/lib/people-map.js +82 -0
- package/lib/rarity.js +45 -3
- package/lib/reach.js +7 -6
- package/lib/rpc.js +15 -4
- package/lib/scan-pace.js +46 -0
- package/lib/scoring.js +39 -8
- package/lib/scraper-client.js +19 -6
- package/lib/sector-focus.js +4 -4
- package/lib/separation.js +137 -10
- package/lib/settings-effects.js +20 -11
- package/lib/settings.js +3 -0
- package/lib/tier-grid.js +99 -0
- package/lib/title-ranking.js +83 -0
- package/package.json +1 -1
- package/scripts/scrape.py +51 -13
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__17hjtzl._.js +0 -8
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__20tmem7._.js +0 -3
- package/.next/standalone/.next/server/chunks/lib_rpc_03i8xef.js +0 -3
- package/.next/standalone/.next/server/chunks/lib_rpc_05gt5ya.js +0 -3
- package/.next/standalone/.next/server/chunks/lib_rpc_08fc3rp.js +0 -3
- package/.next/standalone/.next/server/chunks/lib_rpc_08r2t_q.js +0 -3
- package/.next/standalone/.next/server/chunks/lib_rpc_0btpv1t.js +0 -3
- package/.next/standalone/.next/server/chunks/lib_rpc_0c9d9ti.js +0 -8
- package/.next/standalone/.next/server/chunks/lib_rpc_0cm2ev3.js +0 -3
- package/.next/standalone/.next/server/chunks/lib_rpc_0iovswz.js +0 -3
- package/.next/standalone/.next/server/chunks/lib_rpc_0is8flp.js +0 -3
- package/.next/standalone/.next/server/chunks/lib_rpc_0v8ajtd.js +0 -3
- package/.next/standalone/.next/server/chunks/lib_rpc_0xgmvvt.js +0 -3
- package/.next/standalone/.next/server/chunks/lib_rpc_144mzbf.js +0 -3
- package/.next/standalone/.next/server/chunks/lib_rpc_1bggi0n.js +0 -3
- package/.next/standalone/.next/server/chunks/lib_rpc_1dkcu9f.js +0 -3
- package/.next/standalone/.next/server/chunks/lib_rpc_1o0jb6w.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0-85h6g._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_08cfj2b._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0c_y09g._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0j4-lc3._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0l8cxmo._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0xkur4p._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_14iv_zy._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_15x6q32._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_212xw8q._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/app_components_19c2d9c._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/app_scores_page_09wepvv.js +0 -3
- package/.next/standalone/.next/static/chunks/0a5iadnmt9u9k.js +0 -1
- package/.next/standalone/.next/static/chunks/15sjx07xhpn6p.js +0 -1
- package/.next/standalone/.next/static/chunks/160wjb73ddwqd.js +0 -6
- package/.next/standalone/.next/static/chunks/1a74dky22dxd6.js +0 -1
- package/.next/standalone/.next/static/chunks/1c_n0973t07l0.js +0 -2
- package/.next/standalone/.next/static/chunks/1e1n0kkz-psdb.js +0 -1
- package/.next/standalone/.next/static/chunks/236f0jtp68j_h.js +0 -1
- package/.next/standalone/.next/static/chunks/297e1z34yi--z.js +0 -1
- package/.next/standalone/.next/static/chunks/2_ak6qjxb6oa5.js +0 -1
- package/.next/standalone/.next/static/chunks/2kfhc58df2xyo.js +0 -1
- package/.next/standalone/.next/static/chunks/39hr8d-b2ibtw.js +0 -31
- package/.next/standalone/.next/static/chunks/3ui4d-uqkqj5d.js +0 -2
- package/.next/standalone/.next/static/chunks/3zw8bv7-mc4n6.js +0 -33
- package/.next/standalone/app/components/OrbitGraph.js +0 -737
- package/.next/static/chunks/0a5iadnmt9u9k.js +0 -1
- package/.next/static/chunks/15sjx07xhpn6p.js +0 -1
- package/.next/static/chunks/160wjb73ddwqd.js +0 -6
- package/.next/static/chunks/1a74dky22dxd6.js +0 -1
- package/.next/static/chunks/1c_n0973t07l0.js +0 -2
- package/.next/static/chunks/1e1n0kkz-psdb.js +0 -1
- package/.next/static/chunks/236f0jtp68j_h.js +0 -1
- package/.next/static/chunks/297e1z34yi--z.js +0 -1
- package/.next/static/chunks/2_ak6qjxb6oa5.js +0 -1
- package/.next/static/chunks/2kfhc58df2xyo.js +0 -1
- package/.next/static/chunks/39hr8d-b2ibtw.js +0 -31
- package/.next/static/chunks/3ui4d-uqkqj5d.js +0 -2
- package/.next/static/chunks/3zw8bv7-mc4n6.js +0 -33
- /package/.next/standalone/.next/static/{jqE2D3zWqSGz5su948Azf → I-cj79yE2IZ8taX2dZGp3}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{jqE2D3zWqSGz5su948Azf → I-cj79yE2IZ8taX2dZGp3}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{jqE2D3zWqSGz5su948Azf → I-cj79yE2IZ8taX2dZGp3}/_ssgManifest.js +0 -0
- /package/.next/static/{jqE2D3zWqSGz5su948Azf → I-cj79yE2IZ8taX2dZGp3}/_buildManifest.js +0 -0
- /package/.next/static/{jqE2D3zWqSGz5su948Azf → I-cj79yE2IZ8taX2dZGp3}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{jqE2D3zWqSGz5su948Azf → I-cj79yE2IZ8taX2dZGp3}/_ssgManifest.js +0 -0
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
module.exports=[30100,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944),e=a.i(37732),f=a.i(61782),g=a.i(76892),h=a.i(24475),i=a.i(23310);a.i(75930);var j=a.i(71731),k=a.i(9782),l=a.i(14962),m=a.i(13956),m=m,n=a.i(89004),n=n,o=a.i(29873),o=o,p=n,q=a.i(53877),r=a.i(72243),s=a.i(11366),t=a.i(54433),u=a.i(64110),v=a.i(74365),w=a.i(7656)
|
|
2
|
-
.lab-focus .gn:not(.lit), .lab-focus .gl:not(.lit) { opacity: 0.06; }
|
|
3
|
-
.lab-focus .gl.lit { stroke-opacity: 0.7; }
|
|
4
|
-
.lab-focus .dot-rings, .lab-focus .catalyst-ring { opacity: 0.15; }
|
|
5
|
-
.lab-find .gn:not(.found), .lab-find .gl:not(.found) { opacity: 0.07; }
|
|
6
|
-
.lab-find .gn.found { stroke: #fff; stroke-width: 2px; }
|
|
7
|
-
`;async function S(a,b,c){var d;let e,f,g,h,i=await ((e=(d=Q.svg).cloneNode(!0)).setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("font-family",getComputedStyle(d).fontFamily||"system-ui, sans-serif"),(f=document.createElementNS("http://www.w3.org/2000/svg","style")).textContent=R,e.insertBefore(f,e.firstChild),g=new XMLSerializer().serializeToString(e),(h=new Image).src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(g)}`,h.decode().then(()=>h));a.fillStyle="#0a0a1a",a.fillRect(0,0,b,c),a.drawImage(i,0,0,b,c);let j=b/Q.svg.clientWidth;a.save(),a.scale(j,j);let k=b/j,l=c/j,m=Q.stamp();if(m){a.font="600 15px -apple-system, system-ui, sans-serif";let b=a.measureText(m).width;a.fillStyle="rgba(10,15,30,0.85)",a.beginPath(),a.roundRect?.(k/2-b/2-16,l-52,b+32,32,16),a.fill(),a.fillStyle="#e6edf5",a.textAlign="center",a.fillText(m,k/2,l-31)}a.textAlign="left",a.font="11px -apple-system, system-ui, sans-serif";let n=20;for(let[b,c]of Q.legend())a.fillStyle=c,a.beginPath(),a.arc(n+4,l-24,4,0,2*Math.PI),a.fill(),a.fillStyle="#9aa",a.fillText(b,n+12,l-20),n+=20+a.measureText(b).width;a.textAlign="right",a.fillStyle="rgba(255,255,255,0.35)",a.fillText("Six Degrees",k-16,24),a.restore()}function T(a,b){let c=URL.createObjectURL(a),d=document.createElement("a");d.href=c,d.download=b,d.style.position="fixed",d.style.left="-9999px",document.body.appendChild(d),d.click(),d.remove(),setTimeout(()=>URL.revokeObjectURL(c),6e4)}let U=()=>new Date().toISOString().slice(0,10);function V(a){let b=Math.round(Q.svg.clientWidth*a),c=Math.round(Q.svg.clientHeight*a),d=document.createElement("canvas");return d.width=b,d.height=c,{canvas:d,ctx:d.getContext("2d"),w:b,h:c}}async function W(){if(!Q)throw Error("Open the Galaxy first.");let{canvas:a,ctx:b,w:c,h:d}=V(2);await S(b,c,d),T(await new Promise(b=>a.toBlob(b,"image/png")),`six-degrees-galaxy-${U()}.png`)}let X=()=>!1;async function Y(){if(!Q)throw Error("Open the Galaxy first.");if(!X())throw Error("This window can’t record video.");let{canvas:a,ctx:b,w:c,h:d}=V(1),e=["video/mp4;codecs=avc1","video/webm;codecs=vp9","video/webm","video/mp4"].find(a=>MediaRecorder.isTypeSupported(a));if(!e)throw Error("This window can’t record video.");await S(b,c,d);let f=new MediaRecorder(a.captureStream(12),{mimeType:e,videoBitsPerSecond:6e6}),g=[];f.ondataavailable=a=>{a.data.size&&g.push(a.data)};let h=new Promise(a=>{f.onstop=a});f.start(250),(0,P.pause)(),(0,P.setClock)({at:(0,P.clockNow)().min}),(0,P.play)();let i=!1;await new Promise(a=>{let e=setInterval(async()=>{if(!i){i=!0;try{await S(b,c,d)}finally{i=!1}(0,P.clockNow)().playing||(clearInterval(e),setTimeout(a,600))}},1e3/12)}),await S(b,c,d),f.stop(),await h;let j=e.startsWith("video/mp4")?"mp4":"webm";T(new Blob(g,{type:e.split(";")[0]}),`six-degrees-replay-${U()}.${j}`)}function Z(a){return String(a??"").replace(/[&<>"']/g,a=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[a])}let $="__center__";function _(){return window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1}let aa=`
|
|
1
|
+
module.exports=[30100,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944),e=a.i(37732),f=a.i(61782),g=a.i(76892),h=a.i(24475),i=a.i(23310);a.i(75930);var j=a.i(71731),k=a.i(9782),l=a.i(14962),m=a.i(13956),m=m,n=a.i(89004),n=n,o=a.i(29873),o=o,p=n,q=a.i(53877),r=a.i(72243),s=a.i(11366),t=a.i(54433),u=a.i(64110),v=a.i(74365),w=a.i(7656),x=a.i(55379),y=a.i(92544),z=a.i(41063),A=a.i(20869);let B=a=>()=>a;function C(a,{sourceEvent:b,subject:c,target:d,identifier:e,active:f,x:g,y:h,dx:i,dy:j,dispatch:k}){Object.defineProperties(this,{type:{value:a,enumerable:!0,configurable:!0},sourceEvent:{value:b,enumerable:!0,configurable:!0},subject:{value:c,enumerable:!0,configurable:!0},target:{value:d,enumerable:!0,configurable:!0},identifier:{value:e,enumerable:!0,configurable:!0},active:{value:f,enumerable:!0,configurable:!0},x:{value:g,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:i,enumerable:!0,configurable:!0},dy:{value:j,enumerable:!0,configurable:!0},_:{value:k}})}function D(a){return!a.ctrlKey&&!a.button}function E(){return this.parentNode}function F(a,b){return null==b?{x:a.x,y:a.y}:b}function G(){return navigator.maxTouchPoints||"ontouchstart"in this}C.prototype.on=function(){var a=this._.on.apply(this._,arguments);return a===this._?this:a};var H=a.i(56377);function I({x:a,y:b,k:c},d,e){return{x:a+(e.width-d.width)/2,y:b+(e.height-d.height)/2,k:c}}var J=a.i(91443);let K="rgba(255,255,255,0.16)";var L=a.i(1328),M=a.i(25667);function N(a){return String(a??"").replace(/[&<>"']/g,a=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[a])}let O="__center__";function P(){return window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1}let Q=`
|
|
8
2
|
@keyframes galaxy-ring-pulse {
|
|
9
3
|
0%, 100% { opacity: 0.5; transform: scale(1); }
|
|
10
4
|
50% { opacity: 1; transform: scale(1.12); }
|
|
@@ -19,7 +13,7 @@ module.exports=[30100,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944
|
|
|
19
13
|
@media (prefers-reduced-motion: no-preference) { .lab-pop .gn, .lab-pop .gl { animation: lab-pop 0.5s ease-out; } }
|
|
20
14
|
@media (prefers-reduced-motion: reduce) {
|
|
21
15
|
.galaxy-ring-pulse { animation: none; opacity: 0.8; }
|
|
22
|
-
}`;function ab(a,b){let c=j.select(a);_()?c.interrupt("hover").attr("r",b):c.transition("hover").duration(150).ease(m.cubicOut).attr("r",b)}var o=o,n=n,p=n,ac=a.i(76939);function ad(a){return String(a??"").replace(/[&<>"']/g,a=>"&"===a?"&":"<"===a?"<":">"===a?">":'"'===a?""":"'")}let ae=(0,c.forwardRef)(function({connections:a=[],degree2:d=[],onSelect:e,userName:f="You",userImage:i=null,selectedId:k=null,mode:l="network"},m){let t=(0,c.useRef)(null),u=(0,c.useRef)(null),w=(0,c.useRef)(null),y=(0,c.useRef)(e),z=(0,c.useRef)(k),A=(0,c.useRef)(1),B=(0,c.useRef)(null),C=(0,c.useRef)(()=>{}),D=(0,c.useRef)(()=>{}),E=(0,c.useRef)(()=>{}),[F,G]=(0,c.useState)({w:0,h:0}),H=function(){let[a,b]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{let a=()=>b(window.innerWidth<768);return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),a}(),K=(0,c.useMemo)(()=>`${a.length}:${d.length}:${a.map(a=>a.id).join(",")}|${d.map(a=>a.id).join(",")}`,[a,d]),L=(0,c.useRef)({connections:a,degree2:d});(0,c.useImperativeHandle)(m,()=>({focusNode:a=>E.current(a)}),[]),(0,c.useEffect)(()=>{y.current=e},[e]),(0,c.useEffect)(()=>{L.current={connections:a,degree2:d}},[a,d]),(0,c.useEffect)(()=>{let a=t.current;if(!a)return;let b=()=>{let b=a.getBoundingClientRect();G(a=>{let c=Math.round(b.width),d=Math.round(b.height);return a.w===c&&a.h===d?a:{w:c,h:d}})};b();let c=new ResizeObserver(b);return c.observe(a),window.addEventListener("resize",b),()=>{c.disconnect(),window.removeEventListener("resize",b)}},[]),(0,c.useEffect)(()=>{z.current=k,C.current(k)},[k]);let M=(0,g.default)(),N=(0,c.useRef)(M);return(0,c.useEffect)(()=>{N.current=M,D.current(M)},[M]),(0,c.useEffect)(()=>{let a=u.current;if(!a||F.w<40||F.h<40)return;let b=F.w,c=F.h,{connections:d,degree2:e}=L.current,g="degrees"===l,k=new Set(e.map(a=>a.source_connection_id).filter(Boolean)),m=g?d.filter(a=>k.has(a.id)):d,G=new Map(m.map(a=>[a.id,a])),K=e.filter(a=>a.source_connection_id&&G.has(a.source_connection_id)),M=new Set(m.map(a=>a.tier).filter(Boolean)),O=new Set(e.map(a=>a.source_connection_id).filter(Boolean)),P=new Set(O.size?m.filter(a=>O.has(a.id)).map(a=>a.id):[...m].sort((a,b)=>(Number(b.power_score)||0)-(Number(a.power_score)||0)).slice(0,14).map(a=>a.id)),Q={id:"__user__",kind:"user",tier:null,r:26,targetRadius:0,connection:null,x:0,y:0,fx:0,fy:0},R={S:0,A:0,B:0,C:0,D:0},S=[],T=new Map,U=new Map;for(let a of m){let b=a.tier||"D",c=(R[b]=(R[b]||0)+1,(R[b]-1)*2.399963),d=ac.TIER_RING_RADIUS[b]||ac.TIER_RING_RADIUS.D,e=P.has(a.id),f={id:a.id,kind:"d1",hub:e,tier:b,r:e?7+1.1*Number(a.power_score||0):4.5,targetRadius:d,connection:a,x:Math.cos(c)*d,y:Math.sin(c)*d};S.push(f),T.set(a.id,f),U.set(a.id,c)}let V=new Map;for(let a of K){let b=a.source_connection_id,c=V.get(b);c?c.push(a):V.set(b,[a])}let W=[],X=[],Y=ac.TIER_RING_RADIUS.B+70;if(g){let a=new Map,b=new Set;for(let c of S){let d=c.connection?.unlocked_from_bridge_id;if(null==d||d===c.id||!T.has(d))continue;b.add(c.id);let e=a.get(d);e?e.push(c):a.set(d,[c])}let c=S.filter(a=>!b.has(a.id)),d=new Set,e=b=>{for(let c of a.get(b.id)||[])d.has(c.id)||(d.add(c.id),e(c))};for(let a of(c.forEach(e),S))b.has(a.id)&&!d.has(a.id)&&c.push(a);let f=new Map,g=(b,c=new Set)=>{if(f.has(b.id))return f.get(b.id);if(c.has(b.id))return 0;c.add(b.id);let d=V.get(b.id)?.length||0;for(let e of a.get(b.id)||[])d+=1+g(e,c);return c.delete(b.id),f.set(b.id,d),d},h=[...c].sort((a,b)=>g(b)-g(a)),i=Math.max(140,9*Math.max(1,h.length)),j=a=>Math.sqrt(g(a)+4),k=h.reduce((a,b)=>a+j(b),0)||1,l=(b,c,e,f,h)=>{let i=[...(V.get(b.id)||[]).map(a=>({c:a})),...(a.get(b.id)||[]).filter(a=>d.has(a.id)).map(a=>({added:a,c:a.connection}))].sort((a,b)=>(Number(b.c?.power_score)||0)-(Number(a.c?.power_score)||0)),j=h>2,k=j?8:9,m=[],n=0,o=f;for(;n<i.length;){let a=Math.max(1,Math.floor(o*e/k)),d=i.slice(n,n+a);d.forEach((a,f)=>{let i=c+(1===d.length?0:(f/(d.length-1)-.5)*e),k=Math.cos(i)*o,l=Math.sin(i)*o;if(a.added){let b=a.added;b.x=b.fx=k,b.y=b.fy=l,b.hub=!1,b.added=!0,b.r=5+Math.min(5,g(b)/60),m.push({d:b,a:i});return}let n={id:a.c.id,kind:"d2",depth:h,tier:a.c.tier||"D",r:(j?1.3:1.8)+Math.min(10,Number(a.c.power_score)||0)*(j?.24:.32),connection:a.c,x:k,y:l};n.fx=n.x,n.fy=n.y,W.push(n),b.added&&X.push({source:b,target:n,faint:!0})}),n+=d.length,o+=k}let p=o,q=m.filter(({d:a})=>h<6&&g(a)).sort((a,b)=>a.a-b.a);if(q.length){let a=o+24,b=10/a,d=q.map(({d:b})=>Math.max(.12,8*Math.min(g(b),60)/a)),f=d.reduce((a,b)=>a+b,0)+b*(q.length-1),i=f>e?e/f:1,j=c-f*i/2;q.forEach(({d:c},e)=>{let f=d[e]*i;p=Math.max(p,l(c,j+f/2,f,a,h+1)),j+=f+b*i})}return p},m=-Math.PI/2;h.forEach(a=>{let b=j(a)/k*Math.PI*2,c=m+b/2;m+=b;let d=Math.min(.88*b,1.6);a.x=a.fx=Math.cos(c)*i,a.y=a.fy=Math.sin(c)*i,a.hub=!0,a.r=9+Math.min(10,(V.get(a.id)?.length||0)/40),Y=Math.max(Y,l(a,c,d,i+a.r+16,2)+10)})}for(let[a,b]of g?[]:V){let c=T.get(a);if(!c)continue;let d=U.get(a)??0,e=c.targetRadius,f=Math.min(.15,1.5/Math.max(1,b.length));b.forEach((a,g)=>{let h=d+(g-(b.length-1)/2)*f,i=e+46+g%3*13,j={id:a.id,kind:"d2",tier:a.tier||"D",r:3.5,targetRadius:e+60,connection:a,x:Math.cos(h)*i,y:Math.sin(h)*i};W.push(j),X.push({source:j,target:c})})}let Z=[Q,...S,...W],$=[...W,...S,Q],_=(0,j.select)(a);_.selectAll("*").remove();let aa=_.append("defs"),ab=aa.append("radialGradient").attr("id","og-user-grad");ab.append("stop").attr("offset","0%").attr("stop-color","#f8fafc"),ab.append("stop").attr("offset","55%").attr("stop-color","#c7d2fe"),ab.append("stop").attr("offset","100%").attr("stop-color","#818cf8"),aa.append("filter").attr("id","og-blur").attr("x","-75%").attr("y","-75%").attr("width","250%").attr("height","250%").append("feGaussianBlur").attr("stdDeviation",6);let ae=_.append("g").attr("class","viewport"),af=ae.append("g"),ag=ae.append("g"),ah=ae.append("g"),ai=ae.append("g"),aj=S.filter(a=>a.hub),ak=ag.selectAll("line").data(aj,a=>a.id).join("line").attr("stroke",a=>ac.TIER_COLORS[a.tier]||ac.TIER_COLORS.D).attr("stroke-opacity",.09).attr("stroke-width",.5);if(g&&S.length){let a=Math.hypot(S[0].x,S[0].y);af.append("circle").attr("r",a).attr("fill","none").attr("stroke","#FF6B35").attr("stroke-opacity",.18).attr("stroke-width",1).attr("stroke-dasharray","3 7")}for(let a of g?[]:ac.TIER_ORDER)M.has(a)&&af.append("circle").attr("r",ac.TIER_RING_RADIUS[a]).attr("fill","none").attr("stroke",ac.TIER_COLORS[a]).attr("stroke-opacity",.14).attr("stroke-width",1).attr("stroke-dasharray","3 7");let al=ah.selectAll("line").data(X).join("line").attr("stroke",a=>a.faint?"rgba(0,255,136,0.12)":"rgba(255,255,255,0.08)").attr("stroke-width",a=>a.faint?.5:1),am=ai.selectAll("g").data($,a=>a.id).join("g").attr("cursor","pointer");am.each(function(a){let b=(0,j.select)(this);if("d2"===a.kind){b.attr("opacity",g?a.depth>2?.6:.85:.55),b.append("circle").attr("class","og-base").attr("r",a.r).attr("fill",ac.TIER_COLORS[a.tier]||ac.TIER_COLORS.D);return}let c="user"===a.kind,d=a.connection,e=c?"#818cf8":ac.TIER_COLORS[a.tier]||ac.TIER_COLORS.D;if(!c&&!a.hub){b.attr("opacity",a.added?1:.75),b.append("circle").attr("class","og-base").attr("r",a.r).attr("fill",e).attr("stroke",a.added?"#00ff88":"none").attr("stroke-width",1.5*!!a.added);return}(c||"S"===a.tier||"A"===a.tier)&&b.append("circle").attr("r",1.8*a.r).attr("fill",e).attr("opacity",.25).attr("filter","url(#og-blur)"),d&&d.is_catalyst&&(b.append("circle").attr("r",a.r+3).attr("fill","none").attr("stroke",ac.TIER_COLORS.S).attr("stroke-width",1).attr("stroke-opacity",.9),b.append("text").text("⚡").attr("x",.85*a.r).attr("y",-(.7*a.r)).attr("font-size",9).attr("text-anchor","middle").style("pointer-events","none")),b.append("circle").attr("class","og-base").attr("r",a.r).attr("fill",c?"url(#og-user-grad)":e);let h=c?f:d?.name??"";b.append("text").attr("class","og-initials").text((0,ac.initialsFor)(h)).attr("text-anchor","middle").attr("dy","0.35em").attr("font-size",.8*a.r).attr("font-weight",700).attr("fill","#0b0b16").style("pointer-events","none");let k=(0,J.localPhoto)(c?i:d?.profile_image_url);if(k){let c=`og-clip-${String(a.id).replace(/[^a-zA-Z0-9_-]/g,"_")}`;aa.append("clipPath").attr("id",c).append("circle").attr("r",a.r),b.append("image").attr("href",k).attr("x",-a.r).attr("y",-a.r).attr("width",2*a.r).attr("height",2*a.r).attr("clip-path",`url(#${c})`).attr("preserveAspectRatio","xMidYMid slice").on("error",function(){(0,j.select)(this).remove()})}b.append("circle").attr("class","og-sel").attr("r",a.r+5).attr("fill","none").attr("stroke","#ffffff").attr("stroke-width",1.5).style("opacity",0),c?b.append("text").text(f).attr("y",a.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"):b.append("text").attr("class","og-label").text(d?.name??"").attr("y",a.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 an=am.select("text.og-label"),ao=null,ap=()=>{an.style("opacity",a=>+(!0===a.hub||A.current>1.1||a.id===ao||a.id===z.current))};am.on("click",(a,b)=>{a.defaultPrevented||(a.stopPropagation(),y.current?.(b.connection))}),_.on("click",()=>y.current?.(null));let aq=w.current,ar=a=>{let b=t.current;if(!aq||!b)return;let c=b.getBoundingClientRect();aq.style.left=`${Math.min(a.clientX-c.left+14,c.width-190)}px`,aq.style.top=`${Math.max(a.clientY-c.top-8,8)}px`};H||am.on("mouseenter",(a,b)=>{ao=b.id,ap(),((a,b)=>{if(!aq||!b.connection)return;let c=b.connection,d=[c.role||c.headline,c.company].filter(Boolean).map(String);aq.innerHTML=`<div style="font-weight:600;color:#f1f5f9">${ad(c.name)}</div>`+(d.length?`<div style="color:#94a3b8;margin-top:1px">${ad(d.join(" · "))}</div>`:"")+`<div style="margin-top:3px;color:${ac.TIER_COLORS[c.tier]||ac.TIER_COLORS.D}">`+`${ad(c.tier||"?")} \xb7 power ${Number(c.power_score||0).toFixed(1)}`+`${c.is_catalyst?" · ⚡ catalyst":""}</div>`,aq.style.opacity="1",ar(a)})(a,b)}).on("mousemove",a=>ar(a)).on("mouseleave",()=>{ao=null,ap(),aq&&(aq.style.opacity="0")});let as=()=>{al.attr("x1",a=>a.source.x??0).attr("y1",a=>a.source.y??0).attr("x2",a=>a.target.x??0).attr("y2",a=>a.target.y??0),ak.attr("x1",0).attr("y1",0).attr("x2",a=>a.x??0).attr("y2",a=>a.y??0),am.attr("transform",a=>`translate(${a.x??0},${a.y??0})`)},at=null;if(H||g)as();else{let a=(0,q.forceSimulation)(Z).force("radial",x(a=>a.targetRadius,0,0).strength(a=>.9*("d1"===a.kind))).force("collide",(0,v.forceCollide)(a=>a.r+2.5)).force("charge",(0,s.forceManyBody)().strength(-18)).on("tick",as);X.length>0&&a.force("link",(0,r.forceLink)(X).distance(26).strength(.7)),at=a,as();let b=I().on("start",(b,c)=>{b.active||a.alphaTarget(.3).restart(),c.fx=c.x,c.fy=c.y}).on("drag",(a,b)=>{b.fx=a.x,b.fy=a.y}).on("end",(b,c)=>{b.active||a.alphaTarget(0),(c.connection?.circle_power===null||c.connection?.circle_power===void 0)&&(c.fx=null,c.fy=null)});am.filter(a=>"d1"===a.kind).call(b),am.on("dblclick",(b,c)=>{"d1"===c.kind&&(b.stopPropagation(),c.fx=null,c.fy=null,a.alphaTarget(.2).restart(),window.setTimeout(()=>a.alphaTarget(0),400))})}let au=(0,o.default)().scaleExtent([.15,3]).on("zoom",a=>{ae.attr("transform",a.transform.toString()),a.sourceEvent&&(B.current=a.transform),a.transform.k!==A.current&&(A.current=a.transform.k,ap())});_.call(au).on("dblclick.zoom",null);let av=Math.max(.15,Math.min(3,Math.min(b,c)/(2*Y))),aw=B.current??n.identity.translate(b/2,c/2).scale(av);_.call(au.transform,aw),C.current=a=>{ai.selectAll("circle.og-sel-temp").remove(),am.select("circle.og-sel").style("opacity",b=>+(b.id===a)),am.select("circle.og-base").attr("r",b=>b.id===a&&"user"!==b.kind?b.r+1.5:b.r),a&&am.filter(b=>b.id===a&&!b.hub&&"user"!==b.kind).append("circle").attr("class","og-sel-temp").attr("r",a=>a.r+3).attr("fill","none").attr("stroke","#ffffff").attr("stroke-width",1.2),ap()},C.current(z.current),D.current=a=>{ai.selectAll("circle.og-asked").remove(),am.filter(b=>"d2"===b.kind&&(0,h.hasRequest)(b.connection,a)).append("circle").attr("class","og-asked").attr("r",a=>a.r+2.2).attr("fill","none").attr("stroke","#FFD700").attr("stroke-width",1).attr("stroke-dasharray","2 1.6").style("pointer-events","none")},D.current(N.current);let ax=new Map($.map(a=>[a.id,a]));return E.current=d=>{let e=ax.get(d);if(!e)return;let f=e.x??0,g=e.y??0,h=(0,p.default)(a),i=n.identity.translate(b/2,c/2).scale(2.5).translate(-f,-g),j=performance.now(),k=a=>{let b=Math.min(1,(a-j)/650),c=1-Math.pow(1-b,3);au.transform(_,n.identity.translate(h.x+(i.x-h.x)*c,h.y+(i.y-h.y)*c).scale(h.k+(i.k-h.k)*c)),b<1&&requestAnimationFrame(k)};requestAnimationFrame(k),window.setTimeout(()=>au.transform(_,i),730),y.current?.(e.connection),z.current=d,C.current(d);let l=ai.append("circle").attr("cx",f).attr("cy",g).attr("r",e.r+2).attr("fill","none").attr("stroke","#ffffff").attr("stroke-width",2).attr("opacity",.9),m=performance.now(),o=a=>{let b=Math.min(1,(a-m)/700);l.attr("r",e.r+2+26*b).attr("opacity",.9*(1-b)),b<1?requestAnimationFrame(o):l.remove()};requestAnimationFrame(o),window.setTimeout(()=>l.remove(),800)},()=>{at?.stop(),C.current=()=>{},D.current=()=>{},E.current=()=>{},_.on(".zoom",null),_.on("click",null),_.selectAll("*").remove()}},[K,f,i,H,F,l]),(0,b.jsxs)("div",{ref:t,style:{position:"relative",flex:1,minHeight:0,width:"100%"},children:[(0,b.jsx)("svg",{ref:u,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,b.jsx)("div",{ref:w,"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 af=a.i(38246),ag=a.i(90231);let ah=a=>a?.unlock_status==="pending";function ai(a=[],b=[]){let c=new Map;for(let a of b||[]){let b=a?.source_connection_id;if(null==b)continue;let d=c.get(b);d||c.set(b,d=[]),d.push(a)}let d=new Map;for(let b of a||[]){let a=b?.unlocked_from_bridge_id;if(null==a||1!==b.degree)continue;let c=d.get(a);c||d.set(a,c=[]),c.push(b)}return{circles:c,introduced:d}}let aj={connected:0,requested:1},ak=(a,b)=>(aj[a.state]??2)-(aj[b.state]??2)||(0,ag.score1)(b.row)-(0,ag.score1)(a.row)||String(a.row.name||"").localeCompare(String(b.row.name||"")),al=(a,b,c)=>Math.min(c,Math.max(b,a)),am=2*Math.PI;function an(a,b,c){if(a<=0)return 1;let d=c*a;return Math.max(1,c>=am-1e-9?Math.floor(d/b):Math.floor(d/b)+1)}function ao(a,b,c,d){let e=[],f=0;for(let g=b;f<a;g+=c)e.push(g),f+=an(g,c,d);return e}let ap=(a,b,c,d)=>{let e=ao(a,b,c,d);return e[e.length-1]};function aq(a,{inner:b,outer:c,spacing:d,minSpacing:e=d/3,innerMin:f=b,start:g=-Math.PI/2,sweep:h=am}={}){let i=Math.max(0,Math.floor(a)||0);if(!i)return{spacing:d,inner:b,rings:[],points:[]};let j=d,k=b;if(ap(i,k,j,h)>c)if(ap(i,f,j,h)<=c){let a=f,d=b;for(let b=0;b<24;b++){let b=(a+d)/2;ap(i,b,j,h)<=c?a=b:d=b}k=a}else{let a=e,b=d;if(ap(i,k=f,a,h)<=c)for(let d=0;d<24;d++){let d=(a+b)/2;ap(i,k,d,h)<=c?a=d:b=d}j=a}let l=ao(i,k,j,h),m=l.map(a=>an(a,j,h)),n=m.reduce((a,b)=>a+b,0),o=m.map(a=>Math.min(a,Math.floor(i*a/n))),p=i-o.reduce((a,b)=>a+b,0);for(;p>0;){let a=-1;for(let b=0;b<m.length;b++)o[b]<m[b]&&(a<0||m[b]-o[b]>m[a]-o[a])&&(a=b);o[a]++,p--}let q=h>=am-1e-9,r=[],s=[];return l.forEach((a,b)=>{let c=o[b];if(!c)return;s.push({radius:a,count:c});let d=q?am/c:c>1?h/(c-1):0,e=q?g+(b%2?d/2:0):c>1?g:g+h/2,f=q?null:function(a){let b=Math.floor((a-1)/2),c=b+1,d=[b--];for(;d.length<a;)c<a&&d.push(c++),d.length<a&&b>=0&&d.push(b--);return d}(c);for(let b=0;b<c;b++){let c=e+(f?f[b]:b)*d;r.push({x:a*Math.cos(c),y:a*Math.sin(c),angle:c,ring:s.length-1})}}),{spacing:j,inner:k,rings:s,points:r}}function ar(a,b){return Math.max(1.4,Math.min(7,.42*a*("S"===b?1:"A"===b?.86:"B"===b?.72:.6)))}let as=["S","A","B","C","D"];var at=a.i(45889);let au={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},av={1:"#FFD700",2:"#FF6B35",3:"#3498DB",4:"#9B59B6",5:"#00ff88",6:"#ff5050"},aw={S:0,A:1,B:2,C:3,D:4},ax="#00ff88",ay="#5a5a66",az=(a,b)=>(aw[a.tier]??9)-(aw[b.tier]??9)||(0,ag.score)(b)-(0,ag.score)(a)||String(a.name||"").localeCompare(String(b.name||"")),aA=a=>String(a?.name||"").trim().split(/\s+/)[0]||"them",aB=a=>`/setup?scan=${encodeURIComponent(a.id)}`,aC=a=>`${a}${a%10==1&&11!==a?"st":a%10==2&&12!==a?"nd":a%10==3&&13!==a?"rd":"th"}`,aD=()=>{let a=(0,e.scannerNow)();return a.running&&(0,e.isCircleScan)(a)?a.target?.id??null:null},aE=()=>null,aF=()=>()=>{};function aG(a){return()=>void 0}let aH=()=>!1,aI=()=>!0;function aJ(a,b){let c=new Set([(0,ag.keyFor)(a)]),d=a=>{let b=[];for(let d of a||[]){let a=(0,ag.keyFor)(d);c.has(a)||(c.add(a),b.push(d))}return b.sort(az)};return[...d(b.introduced.get(a.id)),...d(b.circles.get(a.id))]}function aK(a,b){if(!a)return[];let c=b.find(b=>b.id===a);if(!c)return[];let d=c.unlocked_from_bridge_id;return null!=d&&b.some(a=>a.id===d)?[d,a]:[a]}function aL({bridge:a,members:c,reach:d,cx:e,cy:f,maxR:g,still:h,band:i}){let j=c.filter(a=>1===a.degree||"S"===a.tier||"A"===a.tier||"B"===a.tier),{inner:k,outer:l}=i,m=Math.min(.9*Math.PI,Math.max(.2*Math.PI,11*j.length/k)),n=aq(j.length,{inner:k,outer:l,spacing:11,minSpacing:3.5,start:a.angle-m/2,sweep:m});return(0,b.jsxs)("g",{children:[(0,b.jsx)("circle",{cx:e,cy:f,r:k,fill:"none",stroke:`${av[2]}06`,strokeWidth:1}),j.map((c,g)=>{let i=n.points[g],k=e+i.x,l=f+i.y,m=(0,L.reachState)(c,d),o=Math.min(ar(n.spacing,c.tier),5)*(m?1.3:1),p="hidden"===m?ay:au[c.tier]||"#555";return(0,b.jsxs)("g",{children:[(m||j.length<=40)&&(0,b.jsx)("line",{x1:a.x,y1:a.y,x2:k,y2:l,stroke:m?ax:p,strokeWidth:.5,strokeOpacity:m?.35:.15}),"ready"===m&&(0,b.jsx)(aM,{x:k,y:l,r:2.3*o,still:h}),(0,b.jsx)("circle",{cx:k,cy:l,r:o,fill:p,fillOpacity:m?.95:.45,stroke:m&&"hidden"!==m?ax:p,strokeWidth:m?1:.5,strokeOpacity:m?1:.25}),("S"===c.tier||m)&&j.length<=60&&(0,b.jsx)("text",{x:k,y:l+o+9,textAnchor:"middle",fill:m&&"hidden"!==m?ax:"#aaa",fontSize:7,children:aA(c)})]},"pv-"+c.id)})]})}function aM({x:a,y:c,r:d,still:e}){return(0,b.jsxs)("circle",{cx:a,cy:c,r:d,fill:ax,fillOpacity:.16,stroke:ax,strokeWidth:.8,strokeOpacity:.45,pointerEvents:"none",children:[!e&&(0,b.jsx)("animate",{attributeName:"fill-opacity",values:"0.06;0.24;0.06",dur:"2.8s",repeatCount:"indefinite"}),!e&&(0,b.jsx)("animate",{attributeName:"stroke-opacity",values:"0.25;0.7;0.25",dur:"2.8s",repeatCount:"indefinite"})]})}function aN({x:a,y:c,s:d}){return(0,b.jsxs)("g",{transform:`translate(${a} ${c}) scale(${d})`,pointerEvents:"none",children:[(0,b.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,b.jsx)("rect",{x:-2.6,y:-.7,width:5.2,height:3.9,rx:.8,fill:"#d6d6de"})]})}function aO({onIn:a,onReset:c,onOut:d}){let e=a=>({width:32,height:32,borderRadius:"50%",border:"none",cursor:"pointer",background:a?"rgba(255,255,255,0.06)":"rgba(255,255,255,0.1)",color:a?"#666":"#fff",fontSize:a?10:18,fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(8px)"});return(0,b.jsxs)("div",{style:{position:"absolute",bottom:64,right:20,zIndex:20,display:"flex",flexDirection:"column",gap:4},children:[(0,b.jsx)("button",{type:"button",onClick:a,"aria-label":"Zoom in",style:e(!1),children:"+"}),(0,b.jsx)("button",{type:"button",onClick:c,"aria-label":"Fit to the window",style:e(!0),children:"⊙"}),(0,b.jsx)("button",{type:"button",onClick:d,"aria-label":"Zoom out",style:e(!1),children:"−"})]})}function aP({trail:a,index:e,reach:f,dims:g,requests:i,scanningId:j,still:k,canScan:l,onOpen:m,onBack:n,onSelect:o}){var p,q,r,s,t;let u,v,w,x=a[a.length-1],y=a.length,z=(0,c.useMemo)(()=>aJ(x,e),[x,e]),[A,B]=(0,c.useState)(null),[C,D]=(0,c.useState)({k:1,x:0,y:0}),E=(0,c.useRef)(null),F=(0,c.useRef)(null),G=(0,d.useRouter)(),H=g.w/2,I=g.h/2,K=Math.min(H,I)-30,M=(0,c.useMemo)(()=>z.map(a=>1===a.degree?aJ(a,e):[]),[z,e]),N=M.some(a=>a.length>0),O=(0,c.useMemo)(()=>(function(a,{inner:b,outer:c,spacing:d,minSpacing:e=d/3,gap:f=d}){let g=as.map(a=>({tier:a,idx:[]}));a.forEach((a,b)=>{let c=as.indexOf(a?.tier);g[c<0?4:c].idx.push(b)});let h=g.filter(a=>a.idx.length),i=c=>{let e=Array(a.length),g=[],i=b;for(let a of h){let b=aq(a.idx.length,{inner:i,outer:1/0,spacing:c,minSpacing:c});a.idx.forEach((a,c)=>{let d=b.points[c];e[a]={x:d.x,y:d.y,angle:d.angle,slot:am/b.rings[d.ring].count}});let h=Math.max(i,...b.rings.map(a=>a.radius));g.push({tier:a.tier,inner:i,outer:h}),i=h+c/d*f}return{spacing:c,points:e,bands:g,edge:g.length?g[g.length-1].outer:b}},j=i(d);if(j.edge<=c)return j;let k=e,l=d;if((j=i(k)).edge>c)return j;for(let a=0;a<20;a++){let a=(k+l)/2,b=i(a);b.edge<=c?(k=a,j=b):l=a}return j})(z,{inner:Math.max(62,.3*K),outer:K*(N?.72:.94),spacing:Math.max(14,Math.min(24,.085*K)),minSpacing:4,gap:Math.max(10,.04*K)}),[z,K,N]),P=(0,c.useMemo)(()=>N?(function(a,{from:b,spacing:c=7,cap:d=40,total:e=1200}={}){let f=Math.max(6,Math.min(d,Math.floor(e/Math.max(1,a.filter(a=>a?.count>0).length))));return a.map(a=>{if(!(a?.count>0))return null;let d=Math.min(a.count,f),e=Math.min(Math.min(a.slot||am,am/6),Math.max(3*c/b,d*c/b));return{points:aq(d,{inner:b,outer:1/0,spacing:c,minSpacing:c,start:a.angle-e/2,sweep:e}).points.map(({x:a,y:b})=>({x:a,y:b})),more:a.count-d}})})(z.map((a,b)=>({angle:O.points[b].angle,slot:O.points[b].slot,count:M[b].length})),{from:O.edge+1.5*O.spacing}).map((a,b)=>a&&{...a,i:b,people:M[b].slice(0,a.points.length)}).filter(Boolean):[],[z,M,N,O]),Q=(0,c.useMemo)(()=>z.map(a=>{let b=(0,L.reachState)(a,f);return{reached:b,requested:!b&&2===a.degree&&(0,h.hasRequest)(a,i),own:1===a.degree?(e.circles.get(a.id)?.length||0)+(e.introduced.get(a.id)?.length||0):0}}),[z,f,i,e]),R=a=>l&&"ready"===Q[a].reached&&z[a].id!==j,S=C.k,T=(0,c.useMemo)(()=>{let a=z.length<=60,c=O.spacing*S>=26;return z.map((d,e)=>{let f=O.points[e],g=Q[e],h=ar(O.spacing,d.tier)*(g.reached?1.4:1),i="hidden"===g.reached?ay:au[d.tier]||"#555";return(0,b.jsxs)("g",{children:[(a||g.reached)&&(0,b.jsx)("line",{x1:0,y1:0,x2:f.x,y2:f.y,stroke:g.reached?ax:i,strokeWidth:.6/S,strokeOpacity:g.reached?.3:.12}),"ready"===g.reached&&(0,b.jsx)(aM,{x:f.x,y:f.y,r:2.3*h,still:k}),g.requested?(0,b.jsx)("circle",{cx:f.x,cy:f.y,r:1.2*h,fill:"none",stroke:i,strokeWidth:Math.max(.6,.45*h),strokeDasharray:`${Math.max(.8,.55*h)} ${Math.max(.6,.45*h)}`}):(0,b.jsx)("circle",{cx:f.x,cy:f.y,r:h,fill:i,fillOpacity:g.reached?1:.85,stroke:g.reached&&"hidden"!==g.reached?ax:"none",strokeWidth:g.reached?Math.max(.8,.3*h):0}),"hidden"===g.reached&&(0,b.jsx)(aN,{x:f.x,y:f.y-.1*h,s:h/4.2}),d.id===j&&(0,b.jsx)("circle",{cx:f.x,cy:f.y,r:2*h,fill:"none",stroke:av[3],strokeWidth:1/S,strokeDasharray:`${3/S} ${2/S}`}),(g.reached||c&&"S"===d.tier)&&(0,b.jsx)("text",{x:f.x,y:f.y+h+10/S,textAnchor:"middle",fontSize:8.5/S,fontWeight:g.reached?700:400,fill:"hidden"===g.reached?"#999":g.reached?ax:"#aaa",pointerEvents:"none",stroke:"#0a0a1a",strokeWidth:2.4/S,paintOrder:"stroke",children:aA(d)})]},d.id)})},[z,O,Q,S,k,j]),U=(a,b)=>{let c=F.current;if(!c)return null;let d=c.getBoundingClientRect(),e=(a-d.left-H-C.x)/S,f=(b-d.top-I-C.y)/S;if(30>=Math.hypot(e,f))return"center";let g=Math.max(.6*O.spacing,10/S),h=null,i=g;return O.points.forEach((a,b)=>{let c=Math.hypot(a.x-e,a.y-f);c<i&&(i=c,h=b)}),h},V=(a,b={x:0,y:0})=>D(c=>{let d=Math.max(.5,Math.min(6,c.k*a));return{k:d,x:b.x-(b.x-c.x)*d/c.k,y:b.y-(b.y-c.y)*d/c.k}}),W=Q.filter(a=>"ready"===a.reached).length,X=Q.filter(a=>"hidden"===a.reached).length,Y=Q.filter(a=>a.reached).length,Z=Q.filter(a=>a.requested).length,$=["S","A","B","C","D"].map(a=>[a,z.filter(b=>b.tier===a).length]).filter(([,a])=>a),_=null!=j&&j===x.id,aa="number"==typeof A?z[A]:null,ab="number"==typeof A?O.points[A]:null;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("svg",{ref:F,width:g.w,height:g.h,style:{display:"block",touchAction:"none",cursor:null!=A?"pointer":"grab"},onPointerDown:a=>{E.current={x:a.clientX,y:a.clientY,vx:C.x,vy:C.y,moved:!1},a.currentTarget.setPointerCapture?.(a.pointerId)},onPointerMove:a=>{let b=E.current;if(b){let c=a.clientX-b.x,d=a.clientY-b.y;if(!b.moved&&Math.hypot(c,d)>5&&(b.moved=!0),b.moved)return void D(a=>({...a,x:b.vx+c,y:b.vy+d}))}let c=U(a.clientX,a.clientY);B(a=>a===c?a:c)},onPointerUp:a=>{let b=E.current;if(E.current=null,!b||b.moved)return;let c=U(a.clientX,a.clientY);"center"===c?o?.(x):null!=c&&R(c)?G.push(aB(z[c])):null!=c&&m(z[c].id)},onPointerLeave:()=>{E.current||B(null)},onWheel:a=>{let b=F.current?.getBoundingClientRect();b&&V(Math.exp(-(.0015*a.deltaY)),{x:a.clientX-b.left-H,y:a.clientY-b.top-I})},role:"img","aria-label":`${x.name}’s circle: ${z.length} ${1===z.length?"person":"people"}`,children:[(0,b.jsx)("defs",{children:(0,b.jsxs)("filter",{id:"focusGlow",children:[(0,b.jsx)("feGaussianBlur",{stdDeviation:"4",result:"blur"}),(0,b.jsxs)("feMerge",{children:[(0,b.jsx)("feMergeNode",{in:"blur"}),(0,b.jsx)("feMergeNode",{in:"SourceGraphic"})]})]})}),(0,b.jsxs)("g",{transform:`translate(${H+C.x} ${I+C.y}) scale(${S})`,children:[O.bands.map(a=>(0,b.jsx)("circle",{r:(a.inner+a.outer)/2,fill:"none",stroke:au[a.tier]||"#555",strokeOpacity:.07,strokeWidth:Math.max(1/S,a.outer-a.inner+O.spacing),pointerEvents:"none"},a.tier)),P.map(a=>{let c=O.points[a.i],d=a.points[a.points.length-1];return(0,b.jsxs)("g",{pointerEvents:"none",children:[a.points.map((a,d)=>(0,b.jsx)("line",{x1:c.x,y1:c.y,x2:a.x,y2:a.y,stroke:ax,strokeOpacity:.12,strokeWidth:.5/S},"l"+d)),a.points.map((c,d)=>(0,b.jsx)("circle",{cx:c.x,cy:c.y,r:2.2,fill:au[a.people[d]?.tier]||"#555",fillOpacity:.75},"d"+d)),a.more>0&&d&&(0,b.jsxs)("text",{x:1.06*d.x,y:1.06*d.y,textAnchor:"middle",fontSize:8/S,fill:"#8b9a9a",stroke:"#0a0a1a",strokeWidth:2.4/S,paintOrder:"stroke",children:["+",a.more.toLocaleString()]})]},"fan-"+z[a.i].id)}),T,ab&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("line",{x1:0,y1:0,x2:ab.x,y2:ab.y,stroke:au[aa.tier]||"#888",strokeWidth:1.6/S,strokeOpacity:.8}),(0,b.jsx)("circle",{cx:ab.x,cy:ab.y,r:ar(O.spacing,aa.tier)*(Q[A].reached?1.4:1)+2/S,fill:"none",stroke:"#fff",strokeWidth:1.6/S})]}),"ready"===(0,L.reachState)(x,f)&&(0,b.jsx)(aM,{x:0,y:0,r:40,still:k}),(0,b.jsx)("circle",{r:28,fill:"#0a0a1a",stroke:au[x.tier]||"#888",strokeWidth:"center"===A?4:3,filter:"url(#focusGlow)"}),(0,J.localPhoto)(x.profile_image_url)?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("clipPath",{id:"focus-clip",children:(0,b.jsx)("circle",{r:24})}),(0,b.jsx)("image",{href:(0,J.localPhoto)(x.profile_image_url),x:-24,y:-24,width:48,height:48,clipPath:"url(#focus-clip)"})]}):(0,b.jsx)("text",{y:5,textAnchor:"middle",fill:au[x.tier]||"#888",fontSize:16,fontWeight:800,children:x.name?.charAt(0)}),(0,b.jsx)("text",{y:40,textAnchor:"middle",fill:"#fff",fontSize:11,fontWeight:700,pointerEvents:"none",children:x.name})]}),aa&&(0,b.jsx)(aQ,{x:H+C.x+ab.x*S,y:I+C.y+ab.y*S,w:g.w,lines:(p=aa,q=Q[A],r=j,s=y,t=R(A),u=aA(p),v=p.id===r?"Their circle is being scanned now":"ready"===q.reached?"You added them · their circle is ready to scan":"hidden"===q.reached?"You added them · their list is hidden":"scanned"===q.reached?`You added them \xb7 ${q.own.toLocaleString("en-US")} in their circle`:q.requested?"Request sent":"Not connected yet",w=t?`Click to scan ${u}’s circle on the Scan page`:q.own>0?`Click to open ${u}’s circle (${aC(s+2)} degree)`:`Click to open ${u}’s circle`,[p.name,`${p.tier}-tier \xb7 ${(0,ag.score)(p).toFixed(1)}`,v,w]),accent:Q[A].reached?ax:au[aa.tier]}),"center"===A&&(0,b.jsx)(aQ,{x:H+C.x,y:I+C.y-28*S,w:g.w,lines:[x.name,"Open their card"],accent:au[x.tier]})]}),(0,b.jsxs)("div",{style:{position:"absolute",top:14,left:64,right:64,pointerEvents:"none",display:"flex",flexDirection:"column",gap:8,alignItems:"flex-start"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap",pointerEvents:"auto"},children:[(0,b.jsxs)("button",{type:"button",onClick:()=>n(y-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===y?"All bridges":`${aA(a[y-2])}’s circle`]}),(0,b.jsxs)("nav",{"aria-label":"Trail",style:{fontSize:11,color:"#777",display:"flex",gap:6,flexWrap:"wrap",alignItems:"center"},children:[(0,b.jsx)("button",{type:"button",onClick:()=>n(0),style:aS,children:"All bridges"}),a.map((a,c)=>(0,b.jsxs)("span",{style:{display:"inline-flex",gap:6,alignItems:"center"},children:[(0,b.jsx)("span",{"aria-hidden":"true",children:"›"}),c===y-1?(0,b.jsx)("span",{style:{color:"#fff",fontWeight:700},children:a.name}):(0,b.jsx)("button",{type:"button",onClick:()=>n(c+1),style:aS,children:a.name})]},a.id))]})]}),(0,b.jsxs)("div",{style:{fontSize:11,color:"#999"},children:[aA(x),"’s circle · ",z.length.toLocaleString("en-US")," ",1===z.length?"person":"people"," · ",aC(y+1)," degree",y>1?", counted along this chain":""]}),_&&z.length>0&&(0,b.jsxs)("div",{role:"status",style:{...aT,borderColor:"rgba(52,152,219,0.4)",color:"#cfe6f7"},children:["Scanning ",aA(x),"’s circle now. More people appear here as it saves, every 10 pages."]})]}),0===z.length&&(0,b.jsx)(aR,{person:x,depth:y,reach:f,requests:i,scanning:_,canScan:l,onSelect:o,top:I+64}),z.length>0&&(0,b.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,b.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#666",letterSpacing:1,marginBottom:6},children:"IN THIS CIRCLE"}),$.map(([a,c])=>(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,b.jsx)("div",{style:{width:6,height:6,borderRadius:"50%",background:au[a]}}),(0,b.jsxs)("span",{style:{color:au[a],fontWeight:600,width:40},children:[a,"-Tier"]}),(0,b.jsx)("span",{children:c.toLocaleString("en-US")})]},a)),(Y>0||Z>0)&&(0,b.jsxs)("div",{style:{marginTop:6},children:[Y>0&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:ax},children:"● "}),"you added ",Y,W?`, ${W} ready to scan`:"",X?`, ${X} hidden`:""]}),Z>0&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:"#FFD700"},children:"◌ "}),Z," ",1===Z?"request":"requests"," out"]})]}),(0,b.jsxs)("div",{style:{marginTop:6,color:"#555"},children:["Click anyone for their circle",W>0&&l?", or someone ready to scan theirs":""," · drag to move · scroll to zoom"]})]}),(0,b.jsx)(aO,{onIn:()=>V(1.35),onReset:()=>D({k:1,x:0,y:0}),onOut:()=>V(1/1.35)})]})}function aQ({x:a,y:c,w:d,lines:e,accent:f}){let g=Math.max(150,Math.min(240,5.6*Math.max(...e.map(a=>String(a).length))+20)),h=12+12*e.length,i=Math.max(6,Math.min(d-g-6,a-g/2)),j=Math.max(6,c-h-12);return(0,b.jsxs)("g",{pointerEvents:"none",children:[(0,b.jsx)("rect",{x:i,y:j,width:g,height:h,rx:6,fill:"rgba(0,0,0,0.92)",stroke:f||"#555",strokeWidth:.6}),e.map((a,c)=>(0,b.jsx)("text",{x:i+g/2,y:j+16+12*c,textAnchor:"middle",fill:0===c?"#fff":2===c?f||"#aaa":"#999",fontSize:0===c?10.5:9,fontWeight:0===c?700:400,children:a},c))]})}function aR({person:a,depth:c,reach:d,requests:e,scanning:f,canScan:g,onSelect:i,top:j}){let k,l,m=aA(a),n=aC(c+1),o=1===a.degree,p=o?(0,L.circleState)(a,d):null,q=(0,L.circleScanCost)(),r=null;return f?(k=`Scanning ${m}’s circle now`,l="Their people appear here as the scan saves them, every 10 pages."):"hidden"===p?(k=`${m} keeps their connections hidden`,l="LinkedIn doesn’t show their list, so there is no circle to scan."):"scanned"===p?(k=`${m}’s list has been read`,l="Everyone on it was already one of your connections, so nobody new is here."):o?(k=`${m}’s circle isn’t scanned yet`,l=`${m} is your connection, so their circle can be scanned. That brings in the people they know: ${n} degree${c>1?", counted along this chain":""}.`,g&&(r=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(af.default,{href:aB(a),style:aU,children:["Scan ",m,"’s circle →"]}),(0,b.jsxs)("div",{style:{fontSize:10.5,color:"#888",marginTop:8},children:[q.profileViews," profile view, then one LinkedIn search per page of their list (up to ",q.searches,", about ",q.minutes," min). It starts only once you confirm it on the Scan page."]})]}))):(0,h.hasRequest)(a,e)?(k=`Request sent to ${m}`,l=`Once ${m} accepts, ↻ Check for new brings them into your connections. Then their circle can be scanned, and the people they know fill in here: ${n} degree.`):(k=`Nobody from ${m}’s circle yet`,l=`LinkedIn only shows the connections of people you’re connected to. Connect with ${m}; once they accept and their circle is scanned, the people they know fill in here: ${n} degree.`,r=(0,b.jsxs)("button",{type:"button",onClick:()=>i?.(a),style:aV,children:["Open ",m,"’s card"]})),(0,b.jsxs)("div",{role:"status",style:{position:"absolute",left:"50%",top:j,transform:"translateX(-50%)",width:"min(360px, calc(100% - 32px))",background:"rgba(10,10,26,0.94)",border:`1px solid ${"hidden"===p?"rgba(255,255,255,0.12)":"rgba(0,255,136,0.25)"}`,borderRadius:12,padding:"14px 16px",textAlign:"center"},children:[(0,b.jsxs)("div",{style:{fontSize:13,fontWeight:800,color:"hidden"===p?"#aaa":"#fff",marginBottom:6},children:["hidden"===p&&(0,b.jsx)("span",{"aria-hidden":"true",children:"🔒 "}),k]}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#9aa",lineHeight:1.55,marginBottom:12*!!r},children:l}),r]})}let aS={background:"none",border:"none",color:"#8fb8d6",fontSize:11,fontWeight:600,cursor:"pointer",padding:0},aT={fontSize:11,padding:"6px 10px",borderRadius:8,border:"1px solid",background:"rgba(0,0,0,0.6)",pointerEvents:"auto"},aU={display:"inline-block",padding:"9px 16px",borderRadius:8,textDecoration:"none",fontSize:12.5,fontWeight:800,color:"#0a0a1a",background:"linear-gradient(135deg, #00ff88, #3498DB)"},aV={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"},aW={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},aX=["S","A","B","C","D"],aY={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},aZ={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},a$=["S","A","B","C","D"],a_=[{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"}],a0=new Map(a_.map(a=>[a.key,a]));function a1(a){return a0.get(a)??null}function a2(a,b=1){let c,d=function(a,b=1){let c=Number(a?.mutual_count);return Number.isFinite(c)&&c>=1?{count:Math.floor(c),from:"linkedin"}:{count:Math.max(1,Math.floor(Number(b)||1)),from:"scans"}}(a,b);return{key:(c=Math.max(1,Math.floor(Number(d.count)||1)),a_.find(a=>c<=a.max).key),...d}}function a3({tier:a,rarity:b},{tiers:c=new Set,rarities:d=new Set}={}){return(!c.size||!!c.has(a))&&(!d.size||!!(b&&d.has(b)))}function a4(a,b){let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c}let a5={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"};function a6({person:a,size:c=32,tierColors:d=a5}){let e=d[a?.tier]||"#666",f=(0,J.localPhoto)(a?.profile_image_url);return(0,b.jsxs)("span",{style:{position:"relative",display:"inline-block",width:c,height:c,flexShrink:0,borderRadius:"50%",boxShadow:`0 0 0 ${c>=24?2:1}px ${e}`},children:[(0,b.jsx)("span",{style:{position:"absolute",inset:0,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",background:`${e}2e`,color:e,fontWeight:800,fontSize:Math.max(7,Math.round(.36*c)),lineHeight:1},children:(0,ac.initialsFor)(a?.name)}),f&&(0,b.jsx)("img",{src:f,alt:"",loading:"lazy",decoding:"async",onError:a=>{a.currentTarget.style.display="none"},style:{position:"absolute",inset:0,width:c,height:c,borderRadius:"50%",objectFit:"cover"}})]})}let a7="#FF6B35",a8={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},a9="a connection we can’t name",ba=a=>Number(a||0).toLocaleString("en-US"),bb=(a,b,c)=>`${ba(a)} ${1===a?b:c}`;function bc(a){return a.role&&a.company?`${a.role} @ ${a.company}`:a.headline||a.role||a.company||""}let bd=`
|
|
16
|
+
}`;function R(a,b){let c=j.select(a);P()?c.interrupt("hover").attr("r",b):c.transition("hover").duration(150).ease(m.cubicOut).attr("r",b)}var S=a.i(38246),T=a.i(90231);let U=a=>a?.unlock_status==="pending";function V(a=[],b=[]){let c=new Map;for(let a of b||[]){let b=a?.source_connection_id;if(null==b)continue;let d=c.get(b);d||c.set(b,d=[]),d.push(a)}let d=new Map;for(let b of a||[]){let a=b?.unlocked_from_bridge_id;if(null==a||1!==b.degree)continue;let c=d.get(a);c||d.set(a,c=[]),c.push(b)}return{circles:c,introduced:d}}let W={connected:0,requested:1},X=(a,b)=>(W[a.state]??2)-(W[b.state]??2)||(0,T.score1)(b.row)-(0,T.score1)(a.row)||String(a.row.name||"").localeCompare(String(b.row.name||"")),Y=(a,b,c)=>Math.min(c,Math.max(b,a)),Z=2*Math.PI;function $(a,b,c){if(a<=0)return 1;let d=c*a;return Math.max(1,c>=Z-1e-9?Math.floor(d/b):Math.floor(d/b)+1)}function _(a,b,c,d,e=c){let f=[],g=0;for(let h=b;g<a;h+=Math.max(c,e))f.push(h),g+=$(h,c,d);return f}let aa=(a,b,c,d,e)=>{let f=_(a,b,c,d,e);return f[f.length-1]};function ab(a,{inner:b,outer:c,spacing:d,minSpacing:e=d/3,innerMin:f=b,start:g=-Math.PI/2,sweep:h=Z,ringGap:i=0}={}){let j=Math.max(0,Math.floor(a)||0);if(!j)return{spacing:d,inner:b,rings:[],points:[]};let k=d,l=b;if(aa(j,l,k,h,i)>c)if(aa(j,f,k,h,i)<=c){let a=f,d=b;for(let b=0;b<24;b++){let b=(a+d)/2;aa(j,b,k,h,i)<=c?a=b:d=b}l=a}else{let a=e,b=d;if(aa(j,l=f,a,h,i)<=c)for(let d=0;d<24;d++){let d=(a+b)/2;aa(j,l,d,h,i)<=c?a=d:b=d}k=a}let m=_(j,l,k,h,i),n=m.map(a=>$(a,k,h)),o=n.reduce((a,b)=>a+b,0),p=n.map(a=>Math.min(a,Math.floor(j*a/o))),q=j-p.reduce((a,b)=>a+b,0);for(;q>0;){let a=-1;for(let b=0;b<n.length;b++)p[b]<n[b]&&(a<0||n[b]-p[b]>n[a]-p[a])&&(a=b);p[a]++,q--}let r=h>=Z-1e-9,s=[],t=[];return m.forEach((a,b)=>{let c=p[b];if(!c)return;t.push({radius:a,count:c});let d=r?Z/c:c>1?h/(c-1):0,e=r?g+(b%2?d/2:0):c>1?g:g+h/2,f=r?null:function(a){let b=Math.floor((a-1)/2),c=b+1,d=[b--];for(;d.length<a;)c<a&&d.push(c++),d.length<a&&b>=0&&d.push(b--);return d}(c);for(let b=0;b<c;b++){let c=e+(f?f[b]:b)*d;s.push({x:a*Math.cos(c),y:a*Math.sin(c),angle:c,ring:t.length-1})}}),{spacing:k,inner:l,rings:t,points:s}}function ac(a,b){return Math.max(1.4,Math.min(7,.42*a*("S"===b?1:"A"===b?.86:"B"===b?.72:.6)))}let ad=["S","A","B","C","D"];var ae=a.i(45889);let af={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},ag={1:"#FFD700",2:"#FF6B35",3:"#3498DB",4:"#9B59B6",5:"#00ff88",6:"#ff5050"},ah={S:0,A:1,B:2,C:3,D:4},ai="#00ff88",aj="#5a5a66",ak=(a,b)=>(ah[a.tier]??9)-(ah[b.tier]??9)||(0,T.score)(b)-(0,T.score)(a)||String(a.name||"").localeCompare(String(b.name||"")),al=a=>String(a?.name||"").trim().split(/\s+/)[0]||"them",am=a=>`/setup?scan=${encodeURIComponent(a.id)}`,an=a=>`${a}${a%10==1&&11!==a?"st":a%10==2&&12!==a?"nd":a%10==3&&13!==a?"rd":"th"}`,ao=()=>{let a=(0,e.scannerNow)();return a.running&&(0,e.isCircleScan)(a)?a.target?.id??null:null},ap=()=>null,aq=()=>()=>{};function ar(a){return()=>void 0}let as=()=>!1,at=()=>!0;function au(a,b){let c=new Set([(0,T.keyFor)(a)]),d=a=>{let b=[];for(let d of a||[]){let a=(0,T.keyFor)(d);c.has(a)||(c.add(a),b.push(d))}return b.sort(ak)};return[...d(b.introduced.get(a.id)),...d(b.circles.get(a.id))]}function av(a,b){if(!a)return[];let c=b.find(b=>b.id===a);if(!c)return[];let d=c.unlocked_from_bridge_id;return null!=d&&b.some(a=>a.id===d)?[d,a]:[a]}function aw({bridge:a,members:c,reach:d,cx:e,cy:f,maxR:g,still:h,band:i}){let j=c.filter(a=>1===a.degree||"S"===a.tier||"A"===a.tier||"B"===a.tier),{inner:k,outer:l}=i,m=Math.min(.9*Math.PI,Math.max(.2*Math.PI,11*j.length/k)),n=ab(j.length,{inner:k,outer:l,spacing:11,minSpacing:3.5,start:a.angle-m/2,sweep:m});return(0,b.jsxs)("g",{children:[(0,b.jsx)("circle",{cx:e,cy:f,r:k,fill:"none",stroke:`${ag[2]}06`,strokeWidth:1}),j.map((c,g)=>{let i=n.points[g],k=e+i.x,l=f+i.y,m=(0,J.reachState)(c,d),o=Math.min(ac(n.spacing,c.tier),5)*(m?1.3:1),p="hidden"===m?aj:af[c.tier]||"#555";return(0,b.jsxs)("g",{children:[(m||j.length<=40)&&(0,b.jsx)("line",{x1:a.x,y1:a.y,x2:k,y2:l,stroke:m?ai:p,strokeWidth:.5,strokeOpacity:m?.35:.15}),"ready"===m&&(0,b.jsx)(ax,{x:k,y:l,r:2.3*o,still:h}),(0,b.jsx)("circle",{cx:k,cy:l,r:o,fill:p,fillOpacity:m?.95:.45,stroke:m&&"hidden"!==m?ai:p,strokeWidth:m?1:.5,strokeOpacity:m?1:.25}),("S"===c.tier||m)&&j.length<=60&&(0,b.jsx)("text",{x:k,y:l+o+9,textAnchor:"middle",fill:m&&"hidden"!==m?ai:"#aaa",fontSize:7,children:al(c)})]},"pv-"+c.id)})]})}function ax({x:a,y:c,r:d,still:e}){return(0,b.jsxs)("circle",{cx:a,cy:c,r:d,fill:ai,fillOpacity:.16,stroke:ai,strokeWidth:.8,strokeOpacity:.45,pointerEvents:"none",children:[!e&&(0,b.jsx)("animate",{attributeName:"fill-opacity",values:"0.06;0.24;0.06",dur:"2.8s",repeatCount:"indefinite"}),!e&&(0,b.jsx)("animate",{attributeName:"stroke-opacity",values:"0.25;0.7;0.25",dur:"2.8s",repeatCount:"indefinite"})]})}function ay({x:a,y:c,s:d}){return(0,b.jsxs)("g",{transform:`translate(${a} ${c}) scale(${d})`,pointerEvents:"none",children:[(0,b.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,b.jsx)("rect",{x:-2.6,y:-.7,width:5.2,height:3.9,rx:.8,fill:"#d6d6de"})]})}function az({onIn:a,onReset:c,onOut:d}){let e=a=>({width:32,height:32,borderRadius:"50%",border:"none",cursor:"pointer",background:a?"rgba(255,255,255,0.06)":"rgba(255,255,255,0.1)",color:a?"#666":"#fff",fontSize:a?10:18,fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(8px)"});return(0,b.jsxs)("div",{style:{position:"absolute",bottom:64,right:20,zIndex:20,display:"flex",flexDirection:"column",gap:4},children:[(0,b.jsx)("button",{type:"button",onClick:a,"aria-label":"Zoom in",style:e(!1),children:"+"}),(0,b.jsx)("button",{type:"button",onClick:c,"aria-label":"Fit to the window",style:e(!0),children:"⊙"}),(0,b.jsx)("button",{type:"button",onClick:d,"aria-label":"Zoom out",style:e(!1),children:"−"})]})}function aA({trail:a,index:e,reach:f,dims:g,requests:i,scanningId:j,still:k,canScan:l,onOpen:m,onBack:n,onSelect:o}){var p,q,r,s,t;let u,v,w,x=a[a.length-1],y=a.length,z=(0,c.useMemo)(()=>au(x,e),[x,e]),A=a.map(a=>a.id).join(">"),B=(0,c.useMemo)(()=>(function(a,b,c=[],d=6){let e=[],f=new Set([a.id,...c]),g=a=>(b.circles.get(a.id)?.length||0)+(b.introduced.get(a.id)?.length||0),h=(a,c,i)=>{if(i>d)return;let j=(b.introduced.get(a.id)||[]).filter(a=>g(a)>0&&!f.has(a.id)).sort((a,b)=>g(b)-g(a)||String(a.name||"").localeCompare(String(b.name||"")));for(let a of(j.forEach(a=>f.add(a.id)),j))e.push({row:a,parent:c,step:i}),h(a,e.length-1,i+1)};return h(a,-1,1),e})(x,e,A.split(">"),Math.max(0,5-y)),[x,e,A,y]),[C,D]=(0,c.useState)(null),[E,F]=(0,c.useState)(null),G=(0,c.useRef)(null),I=(0,c.useRef)(null),K=(0,d.useRouter)(),L=g.w/2,M=g.h/2,N=Math.min(L,M)-30,O=g.w>=g.h?0:Math.PI/2,P=B.length>0,Q=(0,c.useMemo)(()=>(function(a,{inner:b,outer:c,spacing:d,minSpacing:e=d/3,gap:f=d,start:g=-Math.PI/2}){let h=ad.map(a=>({tier:a,idx:[]}));a.forEach((a,b)=>{let c=ad.indexOf(a?.tier);h[c<0?4:c].idx.push(b)});let i=h.filter(a=>a.idx.length),j=c=>{let e=Array(a.length),h=[],j=b;for(let a of i){let b=ab(a.idx.length,{inner:j,outer:1/0,spacing:c,minSpacing:c,start:g});a.idx.forEach((a,c)=>{let d=b.points[c];e[a]={x:d.x,y:d.y,angle:d.angle,slot:Z/b.rings[d.ring].count}});let i=Math.max(j,...b.rings.map(a=>a.radius));h.push({tier:a.tier,inner:j,outer:i}),j=i+c/d*f}return{spacing:c,points:e,bands:h,edge:h.length?h[h.length-1].outer:b}},k=j(d);if(k.edge<=c)return k;let l=e,m=d;if((k=j(l)).edge>c)return k;for(let a=0;a<20;a++){let a=(l+m)/2,b=j(a);b.edge<=c?(l=a,k=b):m=a}return k})(z,{inner:Math.max(62,.3*N),outer:N*(P?.72:.94),spacing:Math.max(14,Math.min(24,.085*N)),minSpacing:4,gap:Math.max(10,.04*N),start:P?O:-Math.PI/2}),[z,N,P,O]),R=(0,c.useMemo)(()=>B.map(({row:a})=>{let b=au(a,e),c=ab(Math.min(b.length,aB),aF);return{people:b,radius:(c.rings[c.rings.length-1]?.radius||aD)+6}}),[B,e]),S=(0,c.useMemo)(()=>{if(!B.length)return null;let a=Math.max(...R.map(a=>a.radius)),b=new Map(z.map((a,b)=>[a.id,b]));return function(a=[],{from:b=0,hop:c=60,spacing:d=46,toward:e=0,angles:f=[]}={}){let g=a.length,h=a.map((a,b)=>Number.isInteger(a)&&a>=0&&a<g&&a!==b?a:-1),i=Array(g).fill(0);for(let a=0;a<g;a++){let b=[],c=a;for(;c>=0&&!i[c]&&!b.includes(c);)b.push(c),c=h[c];c>=0&&!i[c]&&(h[b[b.length-1]]=-1,c=-1);let d=c>=0?i[c]+1:1;for(let a=b.length-1;a>=0;a--)i[b[a]]=d++}let j=Array(g),k=[];for(let a=1;a<=Math.max(0,...i);a++){let l=[];for(let b=0;b<g;b++)i[b]===a&&l.push(b);let m=b+(a-1)*c,n=function(a,b){let c=a.length;if(c<2)return a.slice();let d=a=>(a%Z+Z)%Z,e=a.map((a,b)=>b).sort((b,c)=>d(a[b])-d(a[c])||b-c),f=0,g=-1;e.forEach((b,h)=>{let i=d(d(a[e[(h+1)%c]])-d(a[b]))||(c>1&&h===c-1?Z:0);i>g&&(g=i,f=(h+1)%c)});let h=e.slice(f).concat(e.slice(0,f)),i=d(a[h[0]]),j=h.map(b=>i+d(d(a[b])-i)),k=[];j.forEach((a,c)=>{for(k.push({sum:a-c*b,count:1});k.length>1&&k[k.length-2].sum/k[k.length-2].count>k[k.length-1].sum/k[k.length-1].count;){let a=k.pop();k[k.length-1].sum+=a.sum,k[k.length-1].count+=a.count}});let l=k.flatMap(a=>Array(a.count).fill(a.sum/a.count)).map((a,c)=>a+c*b);if(l[c-1]-l[0]>Z-b){let a=(l[0]+l[c-1])/2;l=l.map((b,d)=>a+Z/c*(d-(c-1)/2))}let m=Array(c);return h.forEach((a,b)=>{m[a]=l[b]}),m}(l.map(a=>h[a]<0?Number.isFinite(f[a])?f[a]:e:j[h[a]].angle),Math.min(d/Math.max(1,m),Z/l.length));l.forEach((b,c)=>{let d=n[c];j[b]={x:m*Math.cos(d),y:m*Math.sin(d),angle:d,radius:m,depth:a,parent:h[b]}}),k.push({radius:m,count:l.length,depth:a})}return{rings:k,points:j}}(B.map(a=>a.parent),{from:Q.edge+Q.spacing+a+22,hop:2*a+46,spacing:2*a+26,toward:O,angles:B.map(a=>a.parent<0?Q.points[b.get(a.row.id)]?.angle:void 0)})},[B,R,z,Q,O]),U=(0,c.useMemo)(()=>R.map((a,b)=>({...a,points:ab(Math.min(a.people.length,aB),{...aF,start:S.points[b].angle}).points})),[R,S]),V=(0,c.useMemo)(()=>{let a=new Map(z.map((a,b)=>[a.id,b]));return B.map(b=>{if(b.parent<0){let c=Q.points[a.get(b.row.id)];return c?{x:c.x,y:c.y,r:1.4*ac(Q.spacing,b.row.tier),back:{x:0,y:0,r:30}}:{x:0,y:0,r:30,back:null}}let c=S.points[b.parent],d=U[b.parent].people.findIndex(a=>a.id===b.row.id),e=U[b.parent].points[d]||{x:0,y:0};return{x:c.x+e.x,y:c.y+e.y,r:aE,inCluster:!0,back:{x:c.x,y:c.y,r:aC}}})},[B,z,Q,S,U]),W=(0,c.useMemo)(()=>{if(!S)return{k:1,x:0,y:0};let a={l:-Q.edge,r:Q.edge,t:-Q.edge,b:Q.edge};S.points.forEach((b,c)=>{let d=U[c].radius;a.l=Math.min(a.l,b.x-d-30),a.r=Math.max(a.r,b.x+d+30),a.t=Math.min(a.t,b.y-d-8),a.b=Math.max(a.b,b.y+d+30)});let b=Math.max(.35,Math.min(1,(g.w-140)/(a.r-a.l),(g.h-96-30)/(a.b-a.t)));return{k:b,x:-(a.l+a.r)/2*b,y:-(a.t+a.b)/2*b+33}},[S,U,Q,g.w,g.h]),X=E??W,Y=a=>F(b=>"function"==typeof a?a(b??W):a),$=(0,c.useMemo)(()=>z.map(a=>{let b=(0,J.reachState)(a,f);return{reached:b,requested:!b&&2===a.degree&&(0,h.hasRequest)(a,i),own:1===a.degree?(e.circles.get(a.id)?.length||0)+(e.introduced.get(a.id)?.length||0):0}}),[z,f,i,e]),_=a=>l&&"ready"===$[a].reached&&z[a].id!==j,aa=X.k,ae=(0,c.useMemo)(()=>{let a=z.length<=60,c=Q.spacing*aa>=26,d=0;return z.map((e,f)=>{let g=Q.points[f],h=$[f],i=ac(Q.spacing,e.tier)*(h.reached?1.4:1),l="hidden"===h.reached?aj:af[e.tier]||"#555",m=!!h.reached&&d++%2==1;return(0,b.jsxs)("g",{children:[(a||h.reached)&&(0,b.jsx)("line",{x1:0,y1:0,x2:g.x,y2:g.y,stroke:h.reached?ai:l,strokeWidth:.6/aa,strokeOpacity:h.reached?.3:.12}),"ready"===h.reached&&(0,b.jsx)(ax,{x:g.x,y:g.y,r:2.3*i,still:k}),h.requested?(0,b.jsx)("circle",{cx:g.x,cy:g.y,r:1.2*i,fill:"none",stroke:l,strokeWidth:Math.max(.6,.45*i),strokeDasharray:`${Math.max(.8,.55*i)} ${Math.max(.6,.45*i)}`}):(0,b.jsx)("circle",{cx:g.x,cy:g.y,r:i,fill:l,fillOpacity:h.reached?1:.85,stroke:h.reached&&"hidden"!==h.reached?ai:"none",strokeWidth:h.reached?Math.max(.8,.3*i):0}),"hidden"===h.reached&&(0,b.jsx)(ay,{x:g.x,y:g.y-.1*i,s:i/4.2}),e.id===j&&(0,b.jsx)("circle",{cx:g.x,cy:g.y,r:2*i,fill:"none",stroke:ag[3],strokeWidth:1/aa,strokeDasharray:`${3/aa} ${2/aa}`}),(h.reached||c&&"S"===e.tier)&&(0,b.jsx)("text",{x:g.x,y:m?g.y-i-4/aa:g.y+i+10/aa,textAnchor:"middle",fontSize:8.5/aa,fontWeight:h.reached?700:400,fill:"hidden"===h.reached?"#999":h.reached?ai:"#aaa",pointerEvents:"none",stroke:"#0a0a1a",strokeWidth:2.4/aa,paintOrder:"stroke",children:al(e)})]},e.id)})},[z,Q,$,aa,k,j]),ah=(a,b)=>{let c=I.current;if(!c)return null;let d=c.getBoundingClientRect(),e=(a-d.left-L-X.x)/aa,f=(b-d.top-M-X.y)/aa;if(30>=Math.hypot(e,f))return"center";if(S){let a=S.points.findIndex((a,b)=>Math.hypot(a.x-e,a.y-f)<=Math.max(16,U[b].radius));if(a>=0)return"L"+a}let g=Math.max(.6*Q.spacing,10/aa),h=null,i=g;return Q.points.forEach((a,b)=>{let c=Math.hypot(a.x-e,a.y-f);c<i&&(i=c,h=b)}),h},ak=(a,b={x:0,y:0})=>Y(c=>{let d=Math.max(.5,Math.min(6,c.k*a));return{k:d,x:b.x-(b.x-c.x)*d/c.k,y:b.y-(b.y-c.y)*d/c.k}}),ao=a=>{let b=[];for(let c=a;c>=0;c=B[c].parent)b.unshift(B[c].row.id);return b},ap="string"==typeof C&&"L"===C[0]?Number(C.slice(1)):-1,aq=ap>=0?new Set(ao(ap)):null,ar=$.filter(a=>"ready"===a.reached).length,as=$.filter(a=>"hidden"===a.reached).length,at=$.filter(a=>a.reached).length,av=$.filter(a=>a.requested).length,aw=["S","A","B","C","D"].map(a=>[a,z.filter(b=>b.tier===a).length]).filter(([,a])=>a),aL=null!=j&&j===x.id,aM="number"==typeof C?z[C]:null,aN="number"==typeof C?Q.points[C]:null;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("svg",{ref:I,width:g.w,height:g.h,style:{display:"block",touchAction:"none",cursor:null!=C?"pointer":"grab"},onPointerDown:a=>{G.current={x:a.clientX,y:a.clientY,vx:X.x,vy:X.y,moved:!1},a.currentTarget.setPointerCapture?.(a.pointerId)},onPointerMove:a=>{let b=G.current;if(b){let c=a.clientX-b.x,d=a.clientY-b.y;if(!b.moved&&Math.hypot(c,d)>5&&(b.moved=!0),b.moved)return void Y(a=>({...a,x:b.vx+c,y:b.vy+d}))}let c=ah(a.clientX,a.clientY);D(a=>a===c?a:c)},onPointerUp:a=>{let b=G.current;if(G.current=null,!b||b.moved)return;let c=ah(a.clientX,a.clientY);"center"===c?o?.(x):"string"==typeof c?m(ao(Number(c.slice(1)))):null!=c&&_(c)?K.push(am(z[c])):null!=c&&m(z[c].id)},onPointerLeave:()=>{G.current||D(null)},onWheel:a=>{let b=I.current?.getBoundingClientRect();b&&ak(Math.exp(-(.0015*a.deltaY)),{x:a.clientX-b.left-L,y:a.clientY-b.top-M})},role:"img","aria-label":`${x.name}’s circle: ${z.length} ${1===z.length?"person":"people"}`,children:[(0,b.jsx)("defs",{children:(0,b.jsxs)("filter",{id:"focusGlow",children:[(0,b.jsx)("feGaussianBlur",{stdDeviation:"4",result:"blur"}),(0,b.jsxs)("feMerge",{children:[(0,b.jsx)("feMergeNode",{in:"blur"}),(0,b.jsx)("feMergeNode",{in:"SourceGraphic"})]})]})}),(0,b.jsxs)("g",{transform:`translate(${L+X.x} ${M+X.y}) scale(${aa})`,children:[Q.bands.map(a=>(0,b.jsx)("circle",{r:(a.inner+a.outer)/2,fill:"none",stroke:af[a.tier]||"#555",strokeOpacity:.07,strokeWidth:Math.max(1/aa,a.outer-a.inner+Q.spacing),pointerEvents:"none"},a.tier)),ae,S&&B.map((a,c)=>{let d=S.points[c],e=U[c],f=a.row,g=aq?.has(f.id),h=ag[y+a.step]||ag[6];return(0,b.jsxs)("g",{transform:`translate(${d.x} ${d.y})`,pointerEvents:"none",opacity:aq&&!g?.45:1,children:[(0,b.jsx)("circle",{r:e.radius,fill:"#0a0a1a",fillOpacity:.9,stroke:h,strokeOpacity:g?.7:.25,strokeWidth:1/aa}),aG(e).map(([a,{spokes:c}])=>(0,b.jsx)("path",{d:c,fill:"none",stroke:af[a]||"#555",strokeWidth:.7,strokeOpacity:g?.6:.38},"s"+a)),aG(e).map(([a,{dots:c}])=>(0,b.jsx)("path",{d:c,fill:af[a]||"#555",fillOpacity:g?1:.9},a)),(0,b.jsx)("circle",{r:aC,fill:h,stroke:ap===c?"#fff":"#0a0a1a",strokeWidth:1.5}),f.id===j&&(0,b.jsx)("circle",{r:e.radius+4,fill:"none",stroke:ag[3],strokeWidth:1/aa,strokeDasharray:`${3/aa} ${2/aa}`}),(0,b.jsxs)("text",{y:e.radius+12/aa,textAnchor:"middle",fill:"#fff",fontSize:10/aa,fontWeight:700,stroke:"#0a0a1a",strokeWidth:2.4/aa,paintOrder:"stroke",children:[al(f),"’s circle"]}),(0,b.jsxs)("text",{y:e.radius+23/aa,textAnchor:"middle",fill:h,fontSize:8/aa,stroke:"#0a0a1a",strokeWidth:2.4/aa,paintOrder:"stroke",children:[e.people.length.toLocaleString("en-US")," · ",an(y+a.step+1)," degree"]})]},"lk-"+f.id)}),S&&B.map((a,c)=>{let d=V[c],e=S.points[c],f=aq?.has(a.row.id),g=ag[y+a.step]||ag[6],h=(a,c,d,e,h)=>{let i=Math.hypot(d.x-a.x,d.y-a.y);if(i<=c+e)return null;let j=(d.x-a.x)/i,k=(d.y-a.y)/i;return(0,b.jsx)("line",{x1:a.x+j*c,y1:a.y+k*c,x2:d.x-j*e,y2:d.y-k*e,stroke:g,strokeLinecap:"round",strokeWidth:(f?2.6:1.8)/aa,strokeOpacity:aq&&!f?.3:f?1:.85},h)};return(0,b.jsxs)("g",{pointerEvents:"none",children:[d.back&&h(d.back,d.back.r,d,d.r+1,"a"),h(d,d.r+1,e,aC+1,"b"),d.inCluster&&(0,b.jsx)("circle",{cx:d.x,cy:d.y,r:d.r,fill:af[a.row.tier]||"#555",stroke:ai,strokeWidth:1.4})]},"ln-"+a.row.id)}),aN&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("line",{x1:0,y1:0,x2:aN.x,y2:aN.y,stroke:af[aM.tier]||"#888",strokeWidth:1.6/aa,strokeOpacity:.8}),(0,b.jsx)("circle",{cx:aN.x,cy:aN.y,r:ac(Q.spacing,aM.tier)*($[C].reached?1.4:1)+2/aa,fill:"none",stroke:"#fff",strokeWidth:1.6/aa})]}),"ready"===(0,J.reachState)(x,f)&&(0,b.jsx)(ax,{x:0,y:0,r:40,still:k}),(0,b.jsx)("circle",{r:28,fill:"#0a0a1a",stroke:af[x.tier]||"#888",strokeWidth:"center"===C?4:3,filter:"url(#focusGlow)"}),(0,H.localPhoto)(x.profile_image_url)?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("clipPath",{id:"focus-clip",children:(0,b.jsx)("circle",{r:24})}),(0,b.jsx)("image",{href:(0,H.localPhoto)(x.profile_image_url),x:-24,y:-24,width:48,height:48,clipPath:"url(#focus-clip)"})]}):(0,b.jsx)("text",{y:5,textAnchor:"middle",fill:af[x.tier]||"#888",fontSize:16,fontWeight:800,children:x.name?.charAt(0)}),(0,b.jsx)("text",{y:40,textAnchor:"middle",fill:"#fff",fontSize:11,fontWeight:700,pointerEvents:"none",children:x.name})]}),aM&&(0,b.jsx)(aH,{x:L+X.x+aN.x*aa,y:M+X.y+aN.y*aa,w:g.w,lines:(p=aM,q=$[C],r=j,s=y,t=_(C),u=al(p),v=p.id===r?"Their circle is being scanned now":"ready"===q.reached?"You added them · their circle is ready to scan":"hidden"===q.reached?"You added them · their list is hidden":"scanned"===q.reached?`You added them \xb7 ${q.own.toLocaleString("en-US")} in their circle`:q.requested?"Request sent":"Not connected yet",w=t?`Click to scan ${u}’s circle on the Scan page`:q.own>0?`Click to open ${u}’s circle (${an(s+2)} degree)`:`Click to open ${u}’s circle`,[p.name,`${p.tier}-tier \xb7 ${(0,T.score)(p).toFixed(1)}`,v,w]),accent:$[C].reached?ai:af[aM.tier]}),ap>=0&&(0,b.jsx)(aH,{x:L+X.x+S.points[ap].x*aa,y:M+X.y+(S.points[ap].y-U[ap].radius)*aa,w:g.w,lines:[`${B[ap].row.name}’s circle`,`${U[ap].people.length.toLocaleString("en-US")} people \xb7 ${an(y+B[ap].step+1)} degree`,`You met ${al(B[ap].row)} through ${al(B[ap].parent>=0?B[B[ap].parent].row:x)}’s circle, then scanned`,"Click to open it"],accent:ag[y+B[ap].step]||ag[6]}),"center"===C&&(0,b.jsx)(aH,{x:L+X.x,y:M+X.y-28*aa,w:g.w,lines:[x.name,"Open their card"],accent:af[x.tier]})]}),(0,b.jsxs)("div",{style:{position:"absolute",top:54,left:64,right:64,pointerEvents:"none",display:"flex",flexDirection:"column",gap:8,alignItems:"flex-start"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap",pointerEvents:"auto"},children:[(0,b.jsxs)("button",{type:"button",onClick:()=>n(y-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===y?"All bridges":`${al(a[y-2])}’s circle`]}),(0,b.jsxs)("nav",{"aria-label":"Trail",style:{fontSize:11,color:"#777",display:"flex",gap:6,flexWrap:"wrap",alignItems:"center"},children:[(0,b.jsx)("button",{type:"button",onClick:()=>n(0),style:aJ,children:"All bridges"}),a.map((a,c)=>(0,b.jsxs)("span",{style:{display:"inline-flex",gap:6,alignItems:"center"},children:[(0,b.jsx)("span",{"aria-hidden":"true",children:"›"}),c===y-1?(0,b.jsx)("span",{style:{color:"#fff",fontWeight:700},children:a.name}):(0,b.jsx)("button",{type:"button",onClick:()=>n(c+1),style:aJ,children:a.name})]},a.id))]})]}),(0,b.jsxs)("div",{style:{fontSize:11,color:"#999"},children:[al(x),"’s circle · ",z.length.toLocaleString("en-US")," ",1===z.length?"person":"people"," · ",an(y+1)," degree",y>1?", counted along this chain":""]}),aL&&z.length>0&&(0,b.jsxs)("div",{role:"status",style:{...aK,borderColor:"rgba(52,152,219,0.4)",color:"#cfe6f7"},children:["Scanning ",al(x),"’s circle now. More people appear here as it saves, every 10 pages."]})]}),0===z.length&&(0,b.jsx)(aI,{person:x,depth:y,reach:f,requests:i,scanning:aL,canScan:l,onSelect:o,top:M+64}),z.length>0&&(0,b.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,b.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#666",letterSpacing:1,marginBottom:6},children:"IN THIS CIRCLE"}),aw.map(([a,c])=>(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,b.jsx)("div",{style:{width:6,height:6,borderRadius:"50%",background:af[a]}}),(0,b.jsxs)("span",{style:{color:af[a],fontWeight:600,width:40},children:[a,"-Tier"]}),(0,b.jsx)("span",{children:c.toLocaleString("en-US")})]},a)),(at>0||av>0)&&(0,b.jsxs)("div",{style:{marginTop:6},children:[at>0&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:ai},children:"● "}),"you added ",at,ar?`, ${ar} ready to scan`:"",as?`, ${as} hidden`:""]}),av>0&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:"#FFD700"},children:"◌ "}),av," ",1===av?"request":"requests"," out"]})]}),(0,b.jsxs)("div",{style:{marginTop:6,color:"#555"},children:["Click anyone for their circle",ar>0&&l?", or someone ready to scan theirs":""," · drag to move · scroll to zoom"]})]}),(0,b.jsx)(az,{onIn:()=>ak(1.35),onReset:()=>F(null),onOut:()=>ak(1/1.35)})]})}let aB=290,aC=5,aD=15,aE=4.6,aF={inner:15,outer:1/0,spacing:7.5,minSpacing:7.5};function aG(a){let b={};return a.points.forEach((c,d)=>{let e=a.people[d]?.tier||"D",f="S"===e?3.1:"A"===e?2.8:2.5,g=Math.hypot(c.x,c.y)||1,h=b[e]||={dots:"",spokes:""};h.dots+=`M${(c.x-f).toFixed(1)},${c.y.toFixed(1)}a${f},${f} 0 1,0 ${2*f},0a${f},${f} 0 1,0 ${-2*f},0`,h.spokes+=`M${(c.x/g*aC).toFixed(1)},${(c.y/g*aC).toFixed(1)}L${c.x.toFixed(1)},${c.y.toFixed(1)}`}),Object.entries(b)}function aH({x:a,y:c,w:d,lines:e,accent:f}){let g=Math.max(150,Math.min(240,5.6*Math.max(...e.map(a=>String(a).length))+20)),h=12+12*e.length,i=Math.max(6,Math.min(d-g-6,a-g/2)),j=Math.max(6,c-h-12);return(0,b.jsxs)("g",{pointerEvents:"none",children:[(0,b.jsx)("rect",{x:i,y:j,width:g,height:h,rx:6,fill:"rgba(0,0,0,0.92)",stroke:f||"#555",strokeWidth:.6}),e.map((a,c)=>(0,b.jsx)("text",{x:i+g/2,y:j+16+12*c,textAnchor:"middle",fill:0===c?"#fff":2===c?f||"#aaa":"#999",fontSize:0===c?10.5:9,fontWeight:0===c?700:400,children:a},c))]})}function aI({person:a,depth:c,reach:d,requests:e,scanning:f,canScan:g,onSelect:i,top:j}){let k,l,m=al(a),n=an(c+1),o=1===a.degree,p=o?(0,J.circleState)(a,d):null,q=(0,J.circleScanCost)(),r=null;return f?(k=`Scanning ${m}’s circle now`,l="Their people appear here as the scan saves them, every 10 pages."):"hidden"===p?(k=`${m} keeps their connections hidden`,l="LinkedIn doesn’t show their list, so there is no circle to scan."):"scanned"===p?(k=`${m}’s list has been read`,l="Everyone on it was already one of your connections, so nobody new is here."):o?(k=`${m}’s circle isn’t scanned yet`,l=`${m} is your connection, so their circle can be scanned. That brings in the people they know: ${n} degree${c>1?", counted along this chain":""}.`,g&&(r=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(S.default,{href:am(a),style:aL,children:["Scan ",m,"’s circle →"]}),(0,b.jsxs)("div",{style:{fontSize:10.5,color:"#888",marginTop:8},children:[q.profileViews," profile view, then one LinkedIn search per page of their list (up to ",q.searches,", about ",q.minutes," min). It starts only once you confirm it on the Scan page."]})]}))):(0,h.hasRequest)(a,e)?(k=`Request sent to ${m}`,l=`Once ${m} accepts, ↻ Check for new brings them into your connections. Then their circle can be scanned, and the people they know fill in here: ${n} degree.`):(k=`Nobody from ${m}’s circle yet`,l=`LinkedIn only shows the connections of people you’re connected to. Connect with ${m}; once they accept and their circle is scanned, the people they know fill in here: ${n} degree.`,r=(0,b.jsxs)("button",{type:"button",onClick:()=>i?.(a),style:aM,children:["Open ",m,"’s card"]})),(0,b.jsxs)("div",{role:"status",style:{position:"absolute",left:"50%",top:j,transform:"translateX(-50%)",width:"min(360px, calc(100% - 32px))",background:"rgba(10,10,26,0.94)",border:`1px solid ${"hidden"===p?"rgba(255,255,255,0.12)":"rgba(0,255,136,0.25)"}`,borderRadius:12,padding:"14px 16px",textAlign:"center"},children:[(0,b.jsxs)("div",{style:{fontSize:13,fontWeight:800,color:"hidden"===p?"#aaa":"#fff",marginBottom:6},children:["hidden"===p&&(0,b.jsx)("span",{"aria-hidden":"true",children:"🔒 "}),k]}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#9aa",lineHeight:1.55,marginBottom:12*!!r},children:l}),r]})}let aJ={background:"none",border:"none",color:"#8fb8d6",fontSize:11,fontWeight:600,cursor:"pointer",padding:0},aK={fontSize:11,padding:"6px 10px",borderRadius:8,border:"1px solid",background:"rgba(0,0,0,0.6)",pointerEvents:"auto"},aL={display:"inline-block",padding:"9px 16px",borderRadius:8,textDecoration:"none",fontSize:12.5,fontWeight:800,color:"#0a0a1a",background:"linear-gradient(135deg, #00ff88, #3498DB)"},aM={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"},aN={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},aO=["S","A","B","C","D"],aP={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},aQ={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},aR=["S","A","B","C","D"];var aS=a.i(9282);let aT=[{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"}],aU=new Map(aT.map(a=>[a.key,a]));function aV(a){return aU.get(a)??null}function aW(a,b=1){let c,d=function(a,b=1){let c=Number(a?.mutual_count),d=Math.max(1,Math.floor(Number(b)||1));return Number.isFinite(c)&&c>=d?{count:Math.floor(c),from:"linkedin"}:{count:d,from:"scans"}}(a,b);return{key:(c=Math.max(1,Math.floor(Number(d.count)||1)),aT.find(a=>c<=a.max).key),...d}}function aX({tier:a,rarity:b},{tiers:c=new Set,rarities:d=new Set}={}){return(!c.size||!!c.has(a))&&(!d.size||!!(b&&d.has(b)))}function aY(a,b){let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c}function aZ(a){return Math.min(1,Math.log(Math.max(1,Math.floor(Number(a)||1)))/Math.log(31))}var a$=a.i(76939),a_=a.i(63033);let a0={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"};function a1({person:a,size:c=32,tierColors:d=a0}){let e=d[a?.tier]||"#666",f=(0,H.localPhoto)(a?.profile_image_url);return(0,b.jsxs)("span",{style:{position:"relative",display:"inline-block",width:c,height:c,flexShrink:0,borderRadius:"50%",boxShadow:`0 0 0 ${c>=24?2:1}px ${e}`},children:[(0,b.jsx)("span",{style:{position:"absolute",inset:0,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",background:`${e}2e`,color:e,fontWeight:800,fontSize:Math.max(7,Math.round(.36*c)),lineHeight:1},children:(0,a$.initialsFor)(a?.name)}),f&&(0,b.jsx)("img",{src:f,alt:"",loading:"lazy",decoding:"async",onError:a=>{a.currentTarget.style.display="none"},style:{position:"absolute",inset:0,width:c,height:c,borderRadius:"50%",objectFit:"cover"}})]})}let a2="#FF6B35",a3={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},a4="a connection we can’t name",a5="64px 36px minmax(0,1.3fr) minmax(0,1fr) 190px 132px",a6=a=>Number(a||0).toLocaleString("en-US"),a7=(a,b,c)=>`${a6(a)} ${1===a?b:c}`;function a8(a){return a.routes.map(a=>a.bridge?`${a.bridge.name} (${a.bridge.tier})`:a4).join("\n")}function a9(a){return a.role&&a.company?`${a.role} @ ${a.company}`:a.headline||a.role||a.company||""}let ba=".38s cubic-bezier(.2,.8,.2,1)",bb=`
|
|
23
17
|
.sepmap .sp { cursor: pointer; transition: opacity .12s; }
|
|
24
18
|
.sepmap .ppl:hover .sp { opacity: .28; }
|
|
25
19
|
.sepmap .ppl:hover .sp:hover, .sepmap .ppl:hover .sp.sel { opacity: 1; }
|
|
@@ -27,7 +21,25 @@ module.exports=[30100,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944
|
|
|
27
21
|
.sepmap .br { cursor: pointer; }
|
|
28
22
|
.sepmap .br:hover text { text-decoration: underline; }
|
|
29
23
|
.sepmap .rt { pointer-events: none; }
|
|
30
|
-
|
|
31
|
-
${a.routes.map(a=>a.bridge?`${a.bridge.name} (${a.bridge.tier})`:a9).join("\n")}`,style:{flexShrink:0,padding:"1px 6px",borderRadius:8,fontSize:10,fontWeight:800,color:a7,background:"rgba(255,107,53,0.15)"},children:["+",g]})]})}function bi({status:a,rarity:c}){let d=c?a1(c.key):null;return(0,b.jsxs)(b.Fragment,{children:["asked"===a&&(0,b.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"===a&&(0,b.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"}),d&&"connected"!==a&&(0,b.jsx)("span",{title:`${c.count} mutual connection${1===c.count?"":"s"}${"scans"===c.from?" (from your scans, so it can only go up)":""}. ${bj}`,style:{flexShrink:0,fontSize:9,fontWeight:700,color:d.color,border:`1px solid ${d.color}55`,borderRadius:4,padding:"0 4px"},children:d.label})]})}let bj="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.",bk=(0,c.memo)(function({p:a,top:c,height:d,isMobile:e,selected:f,tierColors:g,onPick:h,q:i,status:j,rarity:k}){let{person:l}=a,m=g[a.tier]||"#888",n=function(a,b){if(b){let c=a.routes.find(a=>a.bridge&&String(a.bridge.name||"").toLowerCase().includes(b));if(c)return c}return a.routes[0]||null}(a,i),o=a.rank<=3,p=f?"rgba(255,107,53,0.08)":o?`${m}08`:"transparent",q="LinkedIn Member"===l.name,r=`#${a.rank}${a.tied?"=":""}`,s=a.waysIn-1,t=n?.bridge?`via ${n.bridge.name}${s>0?` and ${s} other${s>1?"s":""}`:""}`:`via ${a9}${s>0?` and ${s} other${s>1?"s":""}`:""}`;return(0,b.jsxs)("div",{role:"button",tabIndex:0,"aria-label":`Rank ${a.rank}${a.tied?", tied":""}, ${l.name}, ${a.tier} tier, ${a.score.toFixed(1)}, ${a.waysIn} way${1===a.waysIn?"":"s"} in, ${t}`,"aria-pressed":f,onClick:()=>h(a),onKeyDown:b=>{("Enter"===b.key||" "===b.key)&&(b.preventDefault(),h(a))},onMouseEnter:a=>{f||(a.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:a=>{a.currentTarget.style.background=p},style:{position:"absolute",top:c,left:0,right:0,height:d,boxSizing:"border-box",display:"grid",alignItems:"center",gap:10,padding:"0 12px",gridTemplateColumns:e?"44px 36px 1fr 44px":"64px 36px minmax(0,1.4fr) minmax(0,1fr) 96px 44px",borderLeft:`3px solid ${f?a7:"transparent"}`,borderBottom:"1px solid rgba(255,255,255,0.04)",background:p,cursor:"pointer"},children:[(0,b.jsx)("span",{style:{fontSize:e?11:12,fontWeight:800,color:o?m:"#555",whiteSpace:"nowrap"},children:r}),(0,b.jsx)(a6,{person:l,size:32,tierColors:g}),e?(0,b.jsxs)("div",{style:{minWidth:0,display:"flex",flexDirection:"column",gap:2},children:[(0,b.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:4,minWidth:0},children:[(0,b.jsxs)("span",{style:{...bg,fontSize:13,fontWeight:600,color:q?"#888":"#fff",minWidth:0},children:[l.name,q&&(0,b.jsx)("span",{style:{fontSize:10,color:"#666",fontWeight:400},children:" · out of network"})]}),(0,b.jsx)(bi,{status:j,rarity:k})]}),(0,b.jsx)(bh,{p:a,route:n,tierColors:g,compact:!0}),(0,b.jsx)("span",{style:{...bg,fontSize:10,color:"#666"},children:bc(l)})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0},children:[(0,b.jsx)("span",{style:{...bg,fontSize:13,fontWeight:600,color:q?"#888":"#fff"},children:l.name}),(0,b.jsx)("span",{style:{flexShrink:0,fontSize:9,fontWeight:800,color:m,border:`1px solid ${m}55`,borderRadius:4,padding:"0 4px"},children:a.tier}),(0,b.jsx)(bi,{status:j,rarity:k}),q&&(0,b.jsx)("span",{style:{flexShrink:0,fontSize:10,color:"#666"},children:"out of network"})]}),(0,b.jsx)("div",{style:{...bg,fontSize:10,color:"#777",marginTop:2},children:bc(l)})]}),(0,b.jsx)(bh,{p:a,route:n,tierColors:g}),(0,b.jsx)("div",{style:{height:6,background:"rgba(255,255,255,0.06)",borderRadius:3},children:(0,b.jsx)("div",{style:{height:"100%",borderRadius:3,background:m,width:`${100*Math.max(0,Math.min(1,a.score/10))}%`}})})]}),(0,b.jsxs)("div",{style:{textAlign:"right"},children:[(0,b.jsx)("div",{style:{fontSize:13,fontWeight:800,color:m},children:a.score.toFixed(1)}),e&&(0,b.jsx)("div",{style:{fontSize:9,color:"#666",fontWeight:700},children:a.tier})]})]})}),bl={galaxy:{component:function({connections:a,onSelect:d,tierColors:e,focusNodeRef:f,userName:g,selectedId:h=null,scanNotes:i,fullDegree1:m,fullDegree2:w}){let y=(0,c.useMemo)(()=>{let b=(0,L.reachIndex)(m||a,w||[],i||{}),c=(0,L.readyByCircle)(b),d=new Map;for(let e of a){if(1!==(e.degree||1))continue;let a=(0,L.scanBars)(e,b),f=c.get(e.id)||0;(null!=a||f)&&d.set(e.id,{bars:a,ready:f})}return d},[a,m,w,i]),z=(0,c.useRef)(null),A=(0,c.useRef)(null),B=(0,c.useRef)(null),C=(0,c.useRef)({transform:null,size:null}),D=(0,c.useRef)(null),[E,F]=(0,c.useState)(null),G=(0,c.useRef)(null),H=(0,c.useSyncExternalStore)(P.watchLab,P.labNow,()=>P.LAB_DEFAULTS),R=(0,c.useRef)(H);(0,c.useEffect)(()=>{R.current=H,B.current?.setLab((0,P.effectiveLab)(H));let a=(0,P.clockNow)();B.current?.setFind(a.find,a.fly),H.on&&(0,P.loadSocial)()},[H]),(0,c.useEffect)(()=>(0,P.watchClock)(()=>{let a=(0,P.clockNow)();B.current?.setTime(a.at),B.current?.setFind(a.find,a.fly)}),[]),(0,c.useEffect)(()=>()=>(0,P.stopReplay)(),[]);let S=(0,c.useSyncExternalStore)(P.watchClock,()=>(0,P.clockNow)().social,()=>void 0),T=(0,P.effectiveLab)(H).colourBy,U=(0,c.useMemo)(()=>(0,P.colourScheme)(T,a,e,S),[T,a,e,S]),V=(0,c.useRef)(U);(0,c.useEffect)(()=>{V.current=U,B.current?.setColours(U)},[U]);let W=(0,c.useRef)(d);(0,c.useEffect)(()=>{W.current=d});let X=(0,c.useRef)(h);(0,c.useEffect)(()=>{let a=z.current?.parentElement;if(!a)return;let b=()=>{let b=Math.round(a.clientWidth),c=Math.round(a.clientHeight);D.current={width:b,height:c},F(a=>a&&a.width===b&&a.height===c?a:{width:b,height:c})};b();let c=new ResizeObserver(b);return c.observe(a),()=>c.disconnect()},[]),(0,c.useEffect)(()=>{X.current=h,B.current?.select(h)},[h]),(0,c.useEffect)(()=>{E&&B.current?.resize(E)},[E]);let Y=null!==E;return(0,c.useEffect)(()=>{var b;if(!Y||!z.current||!a.length)return;let c=j.select(z.current);c.selectAll("*").remove();let d=D.current,{transform:h,size:i}=C.current,m=h?K(h,i,d):null,w=function(a,b,c,d,e,f,g,h,i,k,l=new Map,m=P.LAB_DEFAULTS,w=null,y=null){var z,A,B;let C=y?.of??(a=>f[a.tier]||"#666"),D=[{id:$,name:k||"You",tier:"center",degree:0,power_score:10,fx:0,fy:0},...d.map(a=>({id:a.id,name:a.name,tier:a.tier,degree:a.degree||1,source_connection_id:a.source_connection_id,unlocked_from_bridge_id:a.unlocked_from_bridge_id,power_score:parseFloat(a.power_score)||1,company:a.company,role:a.role,headline:a.headline,profile_url:a.profile_url,profile_image_url:(0,J.localPhoto)(a.profile_image_url),connected_date:a.connected_date,seniority_score:a.seniority_score,company_prestige_score:a.company_prestige_score,influence_signals:a.influence_signals,is_catalyst:a.is_catalyst,catalyst_score:a.catalyst_score,circle_power:a.circle_power,circle_s_count:a.circle_s_count,circle_a_count:a.circle_a_count}))],E=new Map(D.map(a=>[a.id,a])),F=new Set(d.filter(a=>1===(a.degree||1)).map(a=>a.id)),G=d.some(a=>(a.degree||1)>1),H=new Map;for(let a of D){if(a.id===$)continue;let b=a.unlocked_from_bridge_id;1===a.degree&&G&&null!=b&&b!==a.id&&F.has(b)?H.set(a.id,b):2===a.degree&&F.has(a.source_connection_id)&&H.set(a.id,a.source_connection_id)}let L=new Map,Q=(a,b=new Set)=>{if(a.id===$)return 0;if(L.has(a.id))return L.get(a.id);let c=H.get(a.id),d=a.degree>=3?3:a.degree;return null==c||b.has(a.id)||(b.add(a.id),d=Q(E.get(c),b)+1),d=Math.min(d,6),L.set(a.id,d),d},R=d.map(a=>{let b=H.get(a.id)??$;return{source:b,target:a.id,near:b!==$}}),S=a=>{switch(a){case"S":return 150;case"A":return 250;case"B":return 350;case"C":return 450;default:return 520}},T=["S","A","B","C","D"],U=[[115,135,155,175,192],[265,300,335,370,398],[465,500,535,565,590],[660,690,720,745,765]],V=[...new Set(D.filter(a=>a.id!==$).map(a=>Q(a)))].sort((a,b)=>a-b),W=G&&V.length>1,X=a=>{if(!W)return S(a.tier);let b=Math.min(V.indexOf(Q(a)),U.length-1),c=T.indexOf(a.tier);return U[b][c<0?4:c]},Y=window.innerWidth<768,aa=Y?{...P.LAB_DEFAULTS,labels:m.labels}:m,ac=(0,P.reachCounts)(D,H),ad=a=>{if(a.id===$)return 18;if("reach"===aa.sizeBy)return Math.min(28,2.5+1.6*Math.sqrt(ac.get(a.id)||0))*aa.dotSize;let b=Math.max(3,Math.min(12,1.3*(a.power_score||1)));return(a.degree>1?Math.max(2.5,.75*b):b)*aa.dotSize},ae=a.append("g"),af=new Map,ag=null;if(!Y&&W){let a=ag=ae.append("g").attr("class","degree-guides").style("pointer-events","none"),b=["","1st","2nd","3rd","4th","5th","6th"];V.slice(0,U.length).forEach((c,d)=>{let e=U[d][2];a.append("circle").attr("r",e).attr("fill","none").attr("stroke","#8899aa").attr("stroke-opacity",.12).attr("stroke-width",1).attr("stroke-dasharray","2 4"),a.append("text").attr("x",0).attr("y",-U[d][4]-8).attr("text-anchor","middle").attr("font-size",10).attr("font-weight",700).attr("fill","#8899aa").attr("fill-opacity",.55).text(b[c]||`${c}th`)})}else if(!Y){let a=ag=ae.append("g").attr("class","tier-guides").style("pointer-events","none");for(let b of["S","A","B","C","D"]){let c=S(b),d=a.append("circle").attr("r",c).attr("fill","none").attr("stroke",f[b]||"#666").attr("stroke-opacity",.16).attr("stroke-width",1).attr("stroke-dasharray","2 4"),e=a.append("text").attr("x",0).attr("y",-c-4).attr("text-anchor","middle").attr("font-size",10).attr("font-weight",700).attr("fill",f[b]||"#666").attr("fill-opacity",.5).text(b);af.set(b,{ring:d,label:e})}}let ah=null,ai=o.default().scaleExtent([.3,4]).on("zoom",a=>{ae.attr("transform",a.transform),i.current={transform:ah??a.transform,size:c},am()});a.call(ai);let aj=(b,d)=>{if(_()){ah=null,a.interrupt().call(ai.transform,b);return}ah=b,i.current={transform:b,size:c},a.transition().duration(d).call(ai.transform,b).on("end interrupt cancel",()=>{ah===b&&(ah=null)})},ak=b.firstChild,al=null,am=()=>{if(!al)return;let c=p.default(a.node());b.style.transform=`translate(${c.applyX(al.x)}px, ${c.applyY(al.y)}px) scale(${c.k})`},an=a=>{if(al=null!=a&&a!==$?E.get(a)??null:null,b.style.display=al?"block":"none",!al)return;let c=ad(al)+8;ak.style.width=ak.style.height=`${2*c+2.5}px`,ak.style.margin=`${-(c+1.25)}px`,ak.style.borderColor=C(al)||"#FFD700",am()};if(h)a.call(ai.transform,n.identity.translate(h.x,h.y).scale(h.k));else{let b=Y&&c.width>0&&c.height>0?Math.min(c.width/1248,c.height/1248):1;a.call(ai.transform,n.identity.translate(c.width/2,c.height/2).scale(b))}if(g&&(g.current=a=>{let b=E.get(a);b&&(aj(n.identity.translate(c.width/2-2.5*b.x,c.height/2-2.5*b.y).scale(2.5),750),an(a))}),Y){let a={};D.forEach(b=>{let c=b.tier||"D";a[c]||(a[c]=[]),a[c].push(b)}),Object.entries(a).forEach(([a,b])=>{b.forEach((c,d)=>{if(c.id===$){c.x=0,c.y=0,c.fx=c.x,c.fy=c.y;return}let e=S(a),f=d/b.length*Math.PI*2-Math.PI/2;c.x=e*Math.cos(f),c.y=e*Math.sin(f),c.fx=c.x,c.fy=c.y})})}let ao=Y?0:W?.06:.1,ap=W?.45:.3,aq=a=>(a.near?Math.max(40,X(a.target)-X(a.source)):X(a.target))*aa.distance,ar=a=>(a.id===$?-20:-1)*aa.push,as=q.forceSimulation(D).force("link",r.forceLink(R).id(a=>a.id).distance(aq).strength(Math.min(1,ao*aa.pull))).force("charge",s.forceManyBody().strength(Y?0:ar)).force("center",Y?null:function(a,b){var c,d=1;function e(){var e,f,g=c.length,h=0,i=0;for(e=0;e<g;++e)h+=(f=c[e]).x,i+=f.y;for(h=(h/g-a)*d,i=(i/g-b)*d,e=0;e<g;++e)f=c[e],f.x-=h,f.y-=i}return null==a&&(a=0),null==b&&(b=0),e.initialize=function(a){c=a},e.x=function(b){return arguments.length?(a=+b,e):a},e.y=function(a){return arguments.length?(b=+a,e):b},e.strength=function(a){return arguments.length?(d=+a,e):d},e}(0,0)).force("gravityX",Y?null:t.forceX(0).strength(.15*aa.gravity)).force("gravityY",Y?null:u.forceY(0).strength(.15*aa.gravity)).force("collision",Y?null:v.forceCollide().radius(a=>ad(a)+2)).force("radial",Y?null:x(a=>a.id===$?0:X(a),0,0).strength(ap*aa.rings));ag?.attr("opacity",Math.min(1,aa.rings)),as.on("end.guides",()=>{for(let[a,{ring:b,label:c}]of af){let d=D.filter(b=>b.tier===a&&b.id!==$).map(a=>Math.hypot(a.x||0,a.y||0)).sort((a,b)=>a-b);if(!d.length){b.attr("opacity",0),c.attr("opacity",0);continue}let e=d[Math.floor(d.length/2)];b.attr("r",e).attr("opacity",1),c.attr("y",-e-4).attr("opacity",1)}});let at=ae.append("g").selectAll("line").data(R).join("line").attr("class","gl").attr("stroke",a=>C(a.target)||"#333").attr("stroke-opacity",.15).attr("stroke-width",.5*aa.lines),au=D.filter(a=>a.is_catalyst&&l.get(a.id)?.bars==null);if(au.length){let b=a.select("defs").size()?a.select("defs"):a.append("defs");if(!b.select("#catalyst-glow-nm").size()){let a=b.append("filter").attr("id","catalyst-glow-nm").attr("x","-60%").attr("y","-60%").attr("width","220%").attr("height","220%");a.append("feGaussianBlur").attr("stdDeviation","5").attr("result","blur"),a.append("feMerge").html('<feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/>')}ae.append("g").selectAll("circle").data(au).join("circle").attr("r",a=>ad(a)+6).attr("fill","none").attr("stroke","#00ff88").attr("stroke-width",2).attr("stroke-dasharray","3,3").attr("filter","url(#catalyst-glow-nm)").attr("cx",a=>a.x||0).attr("cy",a=>a.y||0).attr("class","catalyst-ring")}let av=D.filter(a=>l.has(a.id)),aw=ae.append("g").attr("class","dot-rings").style("pointer-events","none").selectAll("g").data(av).join("g").attr("transform",a=>`translate(${a.x||0},${a.y||0})`);function ax(a){let{bars:b,ready:c}=l.get(a.id),d=ad(a)+3.5,e=j.select(this);if(e.selectAll("*").remove(),null!=b)for(let a of M(d))e.append("path").attr("d",a.d).attr("fill","none").attr("stroke-linecap","round").attr("stroke-width",1.6).attr("stroke",a.i<b?N:O);if(c>0){let a=.72*d;e.append("circle").attr("cx",a).attr("cy",a).attr("r",5.5).attr("fill","#7F77DD"),e.append("text").attr("x",a).attr("y",a+2.5).attr("text-anchor","middle").attr("font-size",7).attr("font-weight",700).attr("fill","#fff").text(c>9?"9+":c)}}aw.each(ax);let ay=ae.append("g").selectAll("circle").data(D).join("circle").attr("class","gn").attr("r",ad).attr("fill",a=>a.id===$?"#fff":C(a)).attr("fill-opacity",a=>a.degree>=3?.55:2===a.degree?.75:1).attr("stroke",a=>a.id===$?"#FFD700":a.is_catalyst?"#00ff88":"none").attr("stroke-width",a=>a.id===$?3:2.5*!!a.is_catalyst).style("cursor","pointer").on("click",(a,b)=>{b.id!==$&&(an(b.id),e(b))}),az=j.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"),aA=j.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"),aB=new Map;for(let[a,b]of H)aB.has(b)||aB.set(b,[]),aB.get(b).push(a);ay.on("mouseover",function(a,b){if(ab(this,1.5*ad(b)),aa.on&&aa.branch&&b.id!==$&&(a=>{let b=new Set([$,a.id]),c=[a.id];for(;c.length;)for(let a of aB.get(c.pop())||[])b.has(a)||(b.add(a),c.push(a));for(let c=H.get(a.id),d=0;null!=c&&d<7;c=H.get(c),d++)b.add(c);ay.classed("lit",a=>b.has(a.id)),at.classed("lit",a=>b.has(a.source.id)&&b.has(a.target.id)),ae.classed("lab-focus",!0)})(b),b.profile_image_url&&b.id!==$){var c;let d,e=Math.max(48,5*ad(b));aA.style("opacity",1),c=f[b.tier]||"#555",aA.selectAll("*").remove(),(d=(0,J.localPhoto)(b.profile_image_url))?aA.append("img").attr("src",d).style("width",e+"px").style("height",e+"px").style("border-radius","50%").style("object-fit","cover").style("border",`2px solid ${c}`).style("display","block").on("error",function(){this.parentElement.style.display="none"}):aA.style("opacity",0),aA.style("left",a.clientX-e/2+"px").style("top",a.clientY-e-8+"px"),az.style("opacity",1).html(`<strong>${Z(b.name)}</strong>`).style("left",a.clientX-40+"px").style("top",a.clientY+12+"px").style("text-align","center").style("min-width","80px")}else az.style("opacity",1).html(`<strong>${Z(b.name)}</strong>${b.company?"<br/>"+Z(b.company):""}${b.tier?"<br/>Tier: "+Z(b.tier):""}`).style("left",a.clientX+12+"px").style("top",a.clientY-10+"px")}).on("mousemove",function(a,b){if(b.profile_image_url&&b.id!==$){let c=Math.max(48,5*ad(b));aA.style("left",a.clientX-c/2+"px").style("top",a.clientY-c-8+"px"),az.style("left",a.clientX-40+"px").style("top",a.clientY+12+"px")}else az.style("left",a.clientX+12+"px").style("top",a.clientY-10+"px")}).on("mouseout",function(a,b){ab(this,ad(b)),ae.classed("lab-focus",!1),az.style("opacity",0),aA.style("opacity",0)}),z=ay,A=as,B=$,z.call(I().on("start",(a,b)=>{a.active||A.alphaTarget(.3).restart(),b.fx=b.x,b.fy=b.y}).on("drag",(a,b)=>{b.fx=a.x,b.fy=a.y}).on("end",(a,b)=>{a.active||A.alphaTarget(0),b.id!==B&&(b.fx=null,b.fy=null)}));let aC=null,aD=a=>!!(aC&&aC.size<=40&&aC.has(a.id))||!!aa.labels&&(a.id===$||1===a.degree&&("all"===aa.names||"S"===a.tier||a.is_catalyst)),aE=ae.append("g"),aF=aE.selectAll("text"),aG=()=>{aF=aE.selectAll("text").data(D.filter(aD),a=>a.id).join("text").text(a=>a.is_catalyst&&"S"!==a.tier?a.name+" ⚡":a.name).attr("font-size",a=>a.id===$?14:10).attr("font-weight",a=>a.id===$?700:500).attr("fill",a=>a.id===$?"#fff":a.is_catalyst?"#00ff88":C(a)).attr("text-anchor","middle").attr("dy",a=>ad(a)+14).attr("x",a=>a.x||0).attr("y",a=>a.y||0).style("pointer-events","none")};aG();let aH=ae.selectAll(".catalyst-ring");as.on("tick",()=>{at.attr("x1",a=>a.source.x).attr("y1",a=>a.source.y).attr("x2",a=>a.target.x).attr("y2",a=>a.target.y),ay.attr("cx",a=>a.x).attr("cy",a=>a.y),aH.attr("cx",a=>a.x).attr("cy",a=>a.y),aw.attr("transform",a=>`translate(${a.x},${a.y})`),aF.attr("x",a=>a.x).attr("y",a=>a.y),am()}),ae.classed("lab-pop",aa.on&&D.length<5e3);let aI=(0,P.bornTimes)(D,H),aJ=new Map(D.map((a,b)=>[a.id,aI[b]])),aK=ay.nodes(),aL=at.nodes(),aM=new Map;aw.each(function(a){aM.set(a.id,[this])}),aH.each(function(a){aM.set(a.id,[...aM.get(a.id)||[],this])});let aN=new Uint8Array(D.length).fill(1),aO=D.filter(a=>1===a.degree),aP=aO.map(a=>aJ.get(a.id)).filter(Number.isFinite),aQ={min:aP.length?aP.reduce((a,b)=>Math.min(a,b)):null,max:aP.length?aP.reduce((a,b)=>Math.max(a,b)):null,of:aO.length},aR=null,aS=()=>aF.style("display",a=>null==aR||aJ.get(a.id)<=aR?null:"none"),aT="",aU=(0,P.clockNow)().fly;return{simulation:as,resize:b=>{let d=K(ah??p.default(a.node()),c,b);c=b,aj(n.identity.translate(d.x,d.y).scale(d.k),250)},select:an,setLab:a=>{if(Y){a.labels!==aa.labels&&(aa={...aa,labels:a.labels},aG(),aS());return}let b=aa;aa=a;let c=b.dotSize!==aa.dotSize||b.sizeBy!==aa.sizeBy;c&&(ay.attr("r",ad),aH.attr("r",a=>ad(a)+6),aw.each(ax),as.force("collision").radius(a=>ad(a)+2),al&&an(al.id)),b.lines!==aa.lines&&at.attr("stroke-width",.5*aa.lines),(c||b.names!==aa.names||b.labels!==aa.labels)&&(aG(),aS()),aa.on&&aa.branch||ae.classed("lab-focus",!1),ae.classed("lab-pop",aa.on&&D.length<5e3),(["gravity","rings","push","pull","distance"].some(a=>b[a]!==aa[a])||c)&&(as.force("link").distance(aq).strength(Math.min(1,ao*aa.pull)),as.force("charge").strength(ar),as.force("gravityX").strength(.15*aa.gravity),as.force("gravityY").strength(.15*aa.gravity),as.force("radial").strength(ap*aa.rings),ag?.attr("opacity",Math.min(1,aa.rings)),as.alpha(Math.max(as.alpha(),.5)).restart())},setTime:a=>{aa.on||(a=null),aR=a;let b=0;for(let c=1;c<D.length;c++){let d=+(null==a||aI[c]<=a);if(d&&1===D[c].degree&&b++,d===aN[c])continue;aN[c]=d;let e=d?"":"none";for(let a of(aK[c].style.display=e,aL[c-1]&&(aL[c-1].style.display=e),aM.get(D[c].id)||[]))a.style.display=e}if(aS(),w&&(w.style.display=null==a?"none":"block",null!=a)){let c=new Date(a).toLocaleDateString(void 0,{month:"short",year:"numeric"}),d=(0,P.chapterAt)((0,P.clockNow)().social,a);w.textContent=`${c} \xb7 ${b.toLocaleString()} of ${aQ.of.toLocaleString()} connections${d?` \xb7 at ${d.company}`:""}`}},setColours:a=>{C=a.of,ay.attr("fill",a=>a.id===$?"#fff":C(a)),at.attr("stroke",a=>C(a.target)||"#333"),aG(),aS(),al&&an(al.id)},setFind:(a,b)=>{let d=aa.on?String(a||""):"";if(d!==aT&&(aT=d,aC=(0,P.findMatches)(D.filter(a=>a.id!==$),d),ay.classed("found",a=>!!aC?.has(a.id)),at.classed("found",a=>!!aC?.has(a.target.id)),ae.classed("lab-find",!!aC),aG(),aS(),(0,P.setClock)({found:aC?aC.size:0})),b!==aU){aU=b;let a=aC&&D.filter(a=>aC.has(a.id)).sort((a,b)=>(b.power_score||0)-(a.power_score||0))[0];a&&(aj(n.identity.translate(c.width/2-2.5*a.x,c.height/2-2.5*a.y).scale(2.5),750),an(a.id),e(a))}},range:aQ}}(c,A.current,d,a,a=>W.current?.(a),e,f,m,C,g,y,(0,P.effectiveLab)(R.current),G.current,V.current);B.current=w,w.select(X.current),(0,P.setClock)({min:w.range.min,max:w.range.max,of:w.range.of}),w.setTime((0,P.clockNow)().at),w.setFind((0,P.clockNow)().find,(0,P.clockNow)().fly);let E=(Q=b={svg:z.current,stamp:()=>G.current?.style.display==="block"?G.current.textContent:null,legend:()=>V.current.legend},()=>{Q===b&&(Q=null)});return()=>{var a;w.simulation.stop(),E(),c.interrupt(),B.current=null,("string"==typeof(a=".graph-tooltip")?new l.Selection([document.querySelectorAll(a)],[document.documentElement]):new l.Selection([(0,k.default)(a)],l.root)).remove()}},[a,e,Y,y]),(0,b.jsxs)("div",{style:{flex:1,position:"relative",overflow:"hidden"},children:[(0,b.jsx)("style",{children:aa}),(0,b.jsx)("svg",{ref:z,width:E?.width??800,height:E?.height??600,style:{background:"#0a0a1a"}}),(0,b.jsx)("div",{ref:A,className:"galaxy-ring",style:{position:"absolute",left:0,top:0,display:"none",pointerEvents:"none",transformOrigin:"0 0"},children:(0,b.jsx)("div",{className:"galaxy-ring-pulse",style:{boxSizing:"border-box",border:"2.5px solid",borderRadius:"50%"}})}),(0,b.jsx)("div",{ref:G,style:{position:"absolute",bottom:56,left:"50%",transform:"translateX(-50%)",display:"none",padding:"6px 14px",borderRadius:16,background:"rgba(10,15,30,0.8)",border:"1px solid rgba(255,255,255,0.12)",color:"#e6edf5",fontSize:13,fontWeight:600,pointerEvents:"none",fontVariantNumeric:"tabular-nums"}}),(0,b.jsx)("div",{style:{position:"absolute",bottom:20,left:20,right:20,display:"flex",flexWrap:"wrap",gap:"4px 12px",fontSize:11,color:"#888",pointerEvents:"none"},children:U.legend.map(([a,c])=>(0,b.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:4,whiteSpace:"nowrap"},children:[(0,b.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",background:c,display:"inline-block"}}),a]},a))})]})},modes:["network"],label:"Galaxy",icon:"🌌",desc:"Force-directed layout"},orbit:{component:ae,modes:["degrees"],label:"Orbit",icon:"🪐",desc:"Tier orbits + circle dots; in Degrees, every mapped circle fanned out",allDegree2:!0},separation:{component:function({connections:a=[],degree2:d=[],fullDegree1:e=a,fullDegree2:f=d,onSelect:i,userName:j,selectedId:k,tierColors:l=a8,preset:m=null}){let n=function(){let[a,b]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{let a=()=>b(window.innerWidth<768);return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),a}(),o=n?68:56,p=n?5:10,q=n?8:16,[r,s]=(0,c.useState)(""),t=(0,c.useDeferredValue)(r.trim().toLowerCase()),[u,v]=(0,c.useState)("power"),[w,x]=(0,c.useState)("all"),[y,z]=(0,c.useState)(()=>new Set),[A,B]=(0,c.useState)(null);m&&m.id!==A&&(B(m.id),s(m.query||""),x(m.tier||"all"),z(new Set(m.rarity?[m.rarity]:[])));let C=(0,g.default)(),[D,E]=(0,c.useState)(0),[F,G]=(0,c.useState)({w:0,h:800}),[H,I]=(0,c.useState)(null),J=(0,c.useRef)(null),K=(0,c.useCallback)(a=>{J.current=a,I(a)},[]),L=(0,c.useRef)(null),M=(0,c.useMemo)(()=>(0,ag.separationPeople)(d,a),[d,a]),N=(0,c.useMemo)(()=>"ways"===u?[...M.people].sort(ag.compareWaysIn):M.people,[M,u]),O=(0,c.useMemo)(()=>(0,ag.routeIndex)(f),[f]),P=(0,c.useMemo)(()=>{let a=new Map;for(let b of M.people)a.set(b.key,a2(b.person,O.get(b.key)?.size||b.waysIn));return a},[M,O]),Q=(0,c.useMemo)(()=>{let a=Object.fromEntries(a_.map(a=>[a.key,0]));for(let b of P.values())a[b.key]++;return a},[P]),R=(0,c.useCallback)((a,b)=>("all"===w||a.tier===w)&&(!y.size||y.has(P.get(a.key)?.key))&&(!b||a.haystack.includes(b)),[w,y,P]),S=(0,c.useMemo)(()=>t||"all"!==w||y.size?N.filter(a=>R(a,t)):N,[N,t,w,y,R]),T=(0,c.useMemo)(()=>new Set(e.map(ag.keyFor)),[e]),U=(0,c.useCallback)(a=>T.has(a.key)?"connected":(0,h.hasRequest)(a.person,C)?"asked":null,[T,C]),V=(0,c.useMemo)(()=>S.filter(a=>!U(a)).slice(0,p),[S,p,U]),W=(0,c.useMemo)(()=>S.reduce((a,b)=>a+ +!!U(b),0),[S,U]),X=null!=k?M.rowToKey.get(k)??null:null,Y=(0,c.useRef)(i);(0,c.useEffect)(()=>{Y.current=i});let Z=(0,c.useCallback)(a=>Y.current?.(a.person),[]),$=(0,c.useCallback)(a=>{a&&Y.current?.(a)},[]);(0,c.useEffect)(()=>{if(!H)return;let a=new ResizeObserver(()=>{let a=Math.round(H.clientWidth),b=Math.round(H.clientHeight);G(c=>c.w===a&&c.h===b?c:{w:a,h:b})});return a.observe(H),()=>a.disconnect()},[H]);let _=Math.max(0,Math.min(980,F.w-2*q)),aa=(0,c.useMemo)(()=>(0,ag.summitLayout)(V,_||800,n),[V,_,n]),ab=n?58:40,ad=V.length?ab+aa.height+12:0,ae=ad+28,af=ae+S.length*o+72,ah=Math.max(0,Math.floor((D-ae)/o)-8),ai=Math.min(S.length,ah+Math.ceil(F.h/o)+16),aj=(0,c.useCallback)(a=>{let b=16*Math.floor(a.currentTarget.scrollTop/16);E(a=>a===b?a:b)},[]),ak=(0,c.useCallback)(()=>{J.current&&(J.current.scrollTop=0),E(0)},[]);(0,c.useEffect)(()=>{let a=a=>{if("/"!==a.key||a.metaKey||a.ctrlKey||a.altKey)return;let b=a.target;b&&("INPUT"===b.tagName||"TEXTAREA"===b.tagName||"SELECT"===b.tagName||b.isContentEditable)||(a.preventDefault(),L.current?.focus())};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[]);let al=a=>{s(a),ak()},{summary:am}=M,an=!!t||"all"!==w||y.size>0,ao=!j||/^you$/i.test(String(j).trim())?"You":(0,ac.initialsFor)(j),ap=S.slice(ah,ai);return(0,b.jsxs)("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",background:"#0a0a1a",color:"#fff",overflow:"hidden"},children:[(0,b.jsxs)("div",{style:{padding:"10px 56px 8px",flexShrink:0},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:[(0,b.jsx)("h2",{style:{margin:0,fontSize:18,fontWeight:800,background:"linear-gradient(135deg, #FFD700, #FF6B35)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Separation"}),(0,b.jsx)("span",{style:{fontSize:12,color:"#aaa"},children:n?`${bb(am.people,"person","people")} \xb7 ${ba(am.byTier.S)} S \xb7 ${ba(am.multi)} with 2+ ways`:`${bb(am.people,"person","people")} two steps away \xb7 ${ba(am.byTier.S)} S-tier \xb7 ${ba(am.multi)} reachable 2+ ways \xb7 through ${ba(am.bridges)} of your connections`})]}),(0,b.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:ag.TIERS.filter(a=>am.byTier[a]>0).map(a=>(0,b.jsx)("div",{style:{flex:am.byTier[a],background:l[a]||"#555"}},a))}),(0,b.jsx)("div",{style:{fontSize:11,color:"#777",lineHeight:1.4},children:n?"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."}),am.peopleOnlyUnresolved>0&&(0,b.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:[bb(am.peopleOnlyUnresolved,"of these people","of these people")," ","came only through ",bb(am.onlyUnresolvedVia,"connection record","connection records")," ","that ",1===am.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,b.jsxs)("div",{style:{padding:"0 56px 10px",flexShrink:0,display:"flex",gap:8,flexDirection:n?"column":"row",alignItems:n?"stretch":"center",flexWrap:n?"nowrap":"wrap",borderBottom:"1px solid rgba(255,255,255,0.06)"},children:[(0,b.jsx)("input",{ref:L,type:"search",value:r,onChange:a=>al(a.target.value),onKeyDown:a=>{if("Enter"===a.key){let a=r.trim().toLowerCase(),b=N.find(b=>R(b,a));b&&Z(b)}else"Escape"===a.key&&(r?al(""):a.currentTarget.blur())},placeholder:"Search people, companies, or who knows them","aria-label":"Search people, companies, or who knows them",style:{flex:n?"none":"1 1 260px",minWidth:0,height:n?44:34,boxSizing:"border-box",padding:"0 12px",borderRadius:8,outline:"none",color:"#fff",fontSize:n?16:13,border:"1px solid rgba(255,255,255,0.12)",background:"rgba(255,255,255,0.05)"}}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0,flexWrap:n?"nowrap":"wrap",overflowX:n?"auto":"visible",scrollbarWidth:"thin",flexShrink:+!n},children:[(0,b.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(([a,c])=>(0,b.jsx)("button",{type:"button","aria-pressed":u===a,onClick:()=>{v(a),ak()},style:{height:n?40:30,padding:"0 12px",border:"none",borderRadius:6,cursor:"pointer",fontSize:12,fontWeight:700,whiteSpace:"nowrap",background:u===a?"linear-gradient(135deg, #FFD700, #FF6B35)":"transparent",color:u===a?"#000":"#999"},children:c},a))}),(0,b.jsx)("span",{style:{fontSize:10,color:"#666",whiteSpace:"nowrap",flexShrink:0,textTransform:"uppercase",letterSpacing:.5},children:"Their tier"}),["all",...ag.TIERS].map(a=>{let c=w===a,d="all"===a?"#fff":l[a]||"#888",e="all"===a?am.people:am.byTier[a];return(0,b.jsxs)("button",{type:"button","aria-pressed":c,onClick:()=>{x(a),ak()},style:{height:n?40:30,padding:"0 10px",borderRadius:15,cursor:"pointer",flexShrink:0,fontSize:12,fontWeight:700,whiteSpace:"nowrap",border:`1px solid ${c?d:"rgba(255,255,255,0.1)"}`,background:c?`${"#fff"===d?"#ffffff":d}22`:"rgba(255,255,255,0.03)",color:c?d:"#999"},children:["all"===a?"All":a,(0,b.jsx)("span",{style:{marginLeft:5,fontWeight:500,color:c?d:"#666",opacity:.85},children:ba(e)})]},a)}),(0,b.jsx)("span",{title:bj,style:{fontSize:10,color:"#666",whiteSpace:"nowrap",flexShrink:0,textTransform:"uppercase",letterSpacing:.5,marginLeft:6,cursor:"help"},children:"Rarity"}),a_.map(a=>{let c=y.has(a.key);return(0,b.jsxs)("button",{type:"button","aria-pressed":c,onClick:()=>{var b;return b=a.key,void(z(a=>a4(a,b)),ak())},title:`${a.label}: ${a.range} mutual connection${"1"===a.range?"":"s"}. ${bj}`,style:{height:n?40:30,padding:"0 10px",borderRadius:15,cursor:"pointer",flexShrink:0,fontSize:12,fontWeight:700,whiteSpace:"nowrap",border:`1px solid ${c?a.color:"rgba(255,255,255,0.1)"}`,background:c?`${a.color}22`:"rgba(255,255,255,0.03)",color:c?a.color:"#999"},children:[a.label,(0,b.jsx)("span",{style:{marginLeft:5,fontWeight:500,color:c?a.color:"#666",opacity:.85},children:ba(Q[a.key])})]},a.key)})]})]}),(0,b.jsx)("div",{ref:K,onScroll:aj,style:{flex:1,minHeight:0,overflowY:"auto",overflowX:"hidden",position:"relative",padding:`0 ${q}px`},children:(0,b.jsxs)("div",{style:{position:"relative",maxWidth:980,margin:"0 auto",height:af},children:[V.length>0&&(0,b.jsxs)("div",{style:{height:ad,boxSizing:"border-box",paddingTop:10},children:[(0,b.jsxs)("div",{style:{height:ab-10,overflow:"hidden"},children:[(0,b.jsxs)("div",{style:{fontSize:12,fontWeight:700,color:"#ddd",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:["Top ",ba(V.length)," you haven’t asked, of ",ba(S.length),an?" shown":""," · every way in drawn"]}),(0,b.jsxs)("div",{style:{fontSize:10,color:"#777",marginTop:2,whiteSpace:n?"normal":"nowrap",overflow:"hidden",textOverflow:"ellipsis",lineHeight:1.35},children:[W>0&&(0,b.jsxs)("span",{style:{color:"#FFD700"},children:[ba(W)," asked or connected, so it moved on · "]}),(0,b.jsx)("span",{style:{color:a7},children:"solid orange"})," = top-scored bridge · dashed = other routes · dot size = ways in"]})]}),_>0&&(0,b.jsx)(bf,{layout:aa,selectedKey:X,tierColors:l,youLabel:ao,isMobile:n,onPick:Z,onPickBridge:$})]}),S.length>0&&(0,b.jsxs)("div",{style:{height:28,display:"grid",alignItems:"center",gap:10,padding:"0 12px 0 15px",gridTemplateColumns:n?"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,b.jsx)("span",{title:"Rank by score, then ways in. = means tied",children:"#"}),(0,b.jsx)("span",{}),n?(0,b.jsx)("span",{children:"Person · way in"}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"Person"}),(0,b.jsx)("span",{children:"Way in"}),(0,b.jsx)("span",{children:"Power"})]}),(0,b.jsx)("span",{style:{textAlign:"right"},children:n?"Score":""})]}),ap.map((a,c)=>(0,b.jsx)(bk,{p:a,top:ae+(ah+c)*o,height:o,isMobile:n,selected:a.key===X,tierColors:l,onPick:Z,q:t,status:U(a),rarity:P.get(a.key)},a.key)),0===S.length&&(0,b.jsxs)("div",{style:{position:"absolute",top:40,left:0,right:0,textAlign:"center",color:"#888",fontSize:13,padding:"0 16px"},children:[t?(0,b.jsxs)(b.Fragment,{children:["No one matches ‘",r.trim(),"’. Search covers names, headlines, companies and who knows them."]}):(0,b.jsx)(b.Fragment,{children:"No one here with those filters."}),(0,b.jsx)("div",{style:{marginTop:12},children:(0,b.jsx)("button",{type:"button",onClick:()=>{s(""),x("all"),z(new Set),ak()},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:a,degree2:d=[],onSelect:f,userName:h,fullDegree1:i,fullDegree2:j,scanNotes:k,canScan:l=!0,chainOpen:m=null,onChainOpened:n}){let o=(0,c.useRef)(null),[p,q]=(0,c.useState)(null),[r,s]=(0,c.useState)(1.3),[t,u]=(0,c.useState)({w:800,h:600}),v=i||a,w=j||d,[x,y]=(0,c.useState)(()=>aK(m,v)),[z,A]=(0,c.useState)(m);if(m&&m!==z){A(m);let a=aK(m,v);a.length&&y(a)}(0,c.useEffect)(()=>{m&&n?.()},[m,n]);let B=(0,c.useSyncExternalStore)(l?e.watchScanner:aF,aD,aE),C=(0,c.useSyncExternalStore)(aG,aH,aI),D=(0,g.default)();(0,c.useEffect)(()=>{let a=o.current;if(!a)return;let b=()=>{let b=Math.round(a.clientWidth),c=Math.round(a.clientHeight);u(a=>a.w===b&&a.h===c?a:{w:b,h:c})},c=new ResizeObserver(b);return c.observe(a),b(),()=>c.disconnect()},[]);let E=(0,c.useMemo)(()=>ai(v,w),[v,w]),F=(0,c.useMemo)(()=>(0,L.reachIndex)(v,w,k),[v,w,k]),G=(0,c.useMemo)(()=>(0,L.readyByCircle)(F),[F]),H=(0,c.useMemo)(()=>(0,at.redundancy)(j||d,i||a),[j,d,i,a]),I=(0,c.useMemo)(()=>{let a=new Map;for(let b of w)a.set(b.id,b);for(let b of v)a.set(b.id,b);return a},[v,w]),K=[];for(let a of x){let b=I.get(a);if(!b)break;K.push(b)}let P=K.length>0;(0,c.useEffect)(()=>{if(!P)return;let a=a=>{"Escape"!==a.key||/^(INPUT|TEXTAREA|SELECT)$/.test(a.target?.tagName||"")||document.querySelector('[role="dialog"][aria-modal="true"]')||y(a=>a.slice(0,-1))};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[P]);let Q={};d.forEach(a=>{a.source_connection_id&&(Q[a.source_connection_id]||(Q[a.source_connection_id]=[]),Q[a.source_connection_id].push(a))});let R=a.filter(a=>Q[a.id]&&Q[a.id].length>0).sort((a,b)=>(Q[b.id]?.length||0)-(Q[a.id]?.length||0)),S=t.w/2,T=t.h/2,U=Math.min(S,T)-30,V=aq(R.length,{inner:.55*U,innerMin:.4*U,outer:.62*U,spacing:46,minSpacing:20}),W=R.map((a,b)=>{let c=V.points[b];return{...a,x:S+c.x,y:T+c.y,angle:c.angle,clusterSize:(Q[a.id]||[]).length}}),X=(0,c.useRef)([]);(0,c.useEffect)(()=>{X.current=W.map(a=>({id:a.id,angle:a.angle}))});let Y=(0,c.useRef)(0);if((0,c.useEffect)(()=>{let a=o.current;if(!a||P)return;let b=(b,c)=>{let d=a.getBoundingClientRect(),e=b-d.left,f=Math.atan2(c-d.top-t.h/2,e-t.w/2),g=null,h=1/0;return X.current.forEach(a=>{let b=Math.abs(f-a.angle)%(2*Math.PI);b>Math.PI&&(b=2*Math.PI-b),b<h&&(h=b,g=a.id)}),g},c=a=>{if(a.touches[0]){let c=b(a.touches[0].clientX,a.touches[0].clientY);c&&q(c)}},d=a=>{a.preventDefault();let c=Date.now();if(!(c-Y.current<16)&&(Y.current=c,a.touches[0])){let c=b(a.touches[0].clientX,a.touches[0].clientY);c&&q(c)}};return a.addEventListener("touchstart",c,{passive:!1}),a.addEventListener("touchmove",d,{passive:!1}),()=>{a.removeEventListener("touchstart",c),a.removeEventListener("touchmove",d)}},[t,r,P]),P)return(0,b.jsx)("div",{ref:o,style:{flex:1,background:"#0a0a1a",position:"relative",overflow:"hidden"},children:(0,b.jsx)(aP,{trail:K,index:E,reach:F,dims:t,requests:D,scanningId:B,still:C,canScan:l,onOpen:a=>y(K.map(a=>a.id).concat(a)),onBack:a=>y(K.slice(0,a).map(a=>a.id)),onSelect:f},K.map(a=>a.id).join(">"))});let Z=d.length,$=d.filter(a=>"S"===a.tier).length,_=d.filter(a=>"A"===a.tier).length,aa=p?W.find(a=>a.id===p):null;return(0,b.jsxs)("div",{ref:o,style:{flex:1,background:"#0a0a1a",position:"relative",overflow:"hidden"},children:[(0,b.jsx)("svg",{width:t.w,height:t.h,children:(0,b.jsxs)("g",{transform:`translate(${S*(1-r)}, ${T*(1-r)}) scale(${r})`,children:[(0,b.jsx)("circle",{cx:S,cy:T,r:.55*U,fill:"none",stroke:`${av[1]}10`,strokeWidth:1}),aa&&(0,b.jsx)(aL,{bridge:aa,members:aJ(aa,E),reach:F,cx:S,cy:T,maxR:U,still:C,band:function(a,b=[],c=34){let d=Math.max(0,...b.map(a=>a.radius)),e=Math.max(.66*a,d?d+c:0);return{inner:e,outer:Math.max(.8*a,e+.14*a)}}(U,V.rings)}),W.map(a=>{let c,d=p===a.id,e=(Q[a.id]||[]).filter(a=>"S"===a.tier).length,f=(Q[a.id]||[]).filter(a=>"A"===a.tier).length,g=G.get(a.id)||0;return(0,b.jsxs)("g",{onClick:()=>{q(null),y([a.id])},onMouseEnter:()=>q(a.id),onMouseLeave:()=>q(null),style:{cursor:"pointer"},children:[(0,b.jsx)("circle",{cx:a.x,cy:a.y,r:d?20:16,fill:`${au[a.tier]}08`,stroke:`${au[a.tier]}${d?"60":"25"}`,strokeWidth:1}),null==(c=(0,L.scanBars)(a,F))?null:(0,b.jsxs)("g",{transform:`translate(${a.x} ${a.y})`,pointerEvents:"none",children:[M((d?20:16)+3.5).map(a=>(0,b.jsx)("path",{d:a.d,fill:"none",strokeLinecap:"round",strokeWidth:1.6,stroke:a.i<c?N:O},a.i)),(0,b.jsx)("title",{children:5===c?"Their whole list is scanned":`About ${20*c}% of their list is scanned`})]}),(0,b.jsx)("circle",{cx:a.x,cy:a.y,r:d?13:11,fill:(0,J.localPhoto)(a.profile_image_url)?"#1a1a2e":au[a.tier],stroke:d?"#fff":au[a.tier],strokeWidth:d?2.5:2}),(0,J.localPhoto)(a.profile_image_url)&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("clipPath",{id:"bc-"+a.id,children:(0,b.jsx)("circle",{cx:a.x,cy:a.y,r:d?11:9})}),(0,b.jsx)("image",{href:(0,J.localPhoto)(a.profile_image_url),x:a.x-(d?11:9),y:a.y-(d?11:9),width:d?22:18,height:d?22:18,clipPath:`url(#bc-${a.id})`})]}),!(0,J.localPhoto)(a.profile_image_url)&&(0,b.jsx)("text",{x:a.x,y:a.y+4,textAnchor:"middle",fill:"S"===a.tier?"#000":"#fff",fontSize:11,fontWeight:700,children:a.name?.charAt(0)}),g>0&&(0,b.jsxs)("g",{children:[(0,b.jsx)("title",{children:`${g} you reached through ${aA(a)}’s circle ${1===g?"is":"are"} ready for a scan`}),(0,b.jsx)("rect",{x:a.x+7,y:a.y-21,width:g>9?40:34,height:11,rx:5.5,fill:"rgba(0,255,136,0.16)",stroke:ax,strokeWidth:.6}),(0,b.jsxs)("text",{x:a.x+7+(g>9?20:17),y:a.y-13,textAnchor:"middle",fill:ax,fontSize:7,fontWeight:800,children:[g," ready"]})]}),(0,b.jsx)("text",{x:a.x,y:a.y+(d?24:22),textAnchor:"middle",fill:"#fff",fontSize:9,fontWeight:600,children:a.name?.split(" ")[0]}),(0,b.jsxs)("text",{x:a.x,y:a.y+(d?34:32),textAnchor:"middle",fill:"#888",fontSize:7,children:[a.clusterSize," · ",e>0?e+"S ":"",f>0?f+"A":""]})]},"b-"+a.id)}),(0,b.jsx)("circle",{cx:S,cy:T,r:22,fill:"#0a0a1a",stroke:"#FFD700",strokeWidth:3}),(0,b.jsx)("text",{x:S,y:T+4,textAnchor:"middle",fill:"#FFD700",fontSize:11,fontWeight:800,children:h?.split(" ")[0]||"YOU"})]})}),(0,b.jsx)(aO,{onIn:()=>s(a=>Math.min(3,a+.3)),onReset:()=>s(1.3),onOut:()=>s(a=>Math.max(.4,a-.3))}),(0,b.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,b.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#666",letterSpacing:1.5,marginBottom:8},children:"DEGREES OF SEPARATION"}),(0,b.jsx)("div",{style:{display:"flex",gap:8},children:[1,2,3,4,5,6].map(c=>(0,b.jsxs)("div",{style:{textAlign:"center"},children:[(0,b.jsxs)("div",{style:{width:28,height:28,borderRadius:"50%",fontSize:11,fontWeight:800,display:"flex",alignItems:"center",justifyContent:"center",background:c<=2?av[c]:"rgba(255,255,255,0.04)",color:c<=2?"#000":"#333",border:c<=2?"none":"1px solid rgba(255,255,255,0.08)",boxShadow:c<=2?`0 0 6px ${av[c]}30`:"none"},children:["D",c]}),(0,b.jsx)("div",{style:{fontSize:7,color:c<=2?"#aaa":"#333",marginTop:3},children:1===c?a.length:2===c?Z:"—"})]},c))}),(0,b.jsxs)("div",{style:{fontSize:9,color:"#555",marginTop:8},children:[R.length," bridges · ",$," S + ",_," A at 2nd degree"]}),H>0&&(0,b.jsxs)("div",{style:{fontSize:9,color:"#555",marginTop:4},title:"The share of everyone you reach through a circle that more than one of your connections reaches",children:[Math.round(100*H),"% of your 2nd degree you reach two or more ways"]}),(0,b.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:a,degree2:d=[],onSelect:e,mode:f}){let[g,h]=(0,c.useState)(null);if("degrees"===f&&d.length>0){let c={};d.forEach(a=>{a.source_connection_id&&(c[a.source_connection_id]||(c[a.source_connection_id]=[]),c[a.source_connection_id].push(a))});let f=Object.entries(c).map(([b,c])=>{let d=a.find(a=>a.id===b);if(!d)return null;let e=c.filter(a=>"S"===a.tier).length,f=c.filter(a=>"A"===a.tier).length;return{bridge:d,members:c,sCount:e,aCount:f,total:c.length,value:3*e+2*f+c.length}}).filter(Boolean).sort((a,b)=>b.value-a.value),i={S:36,A:28,B:22,C:16,D:12};return(0,b.jsx)("div",{style:{flex:1,overflow:"auto",background:"#0a0a1a",padding:"20px 10px"},children:(0,b.jsx)("div",{style:{maxWidth:1200,margin:"0 auto"},children:f.map((a,c)=>{let d={};return a$.forEach(a=>{d[a]=[]}),a.members.forEach(a=>{(d[a.tier]||d.D).push(a)}),a$.forEach(a=>{d[a].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0))}),(0,b.jsxs)("div",{style:{marginBottom:30},children:[(0,b.jsx)("div",{style:{textAlign:"center",marginBottom:12},children:(0,b.jsxs)("div",{onClick:()=>e&&e(a.bridge),onMouseEnter:()=>h(a.bridge.id),onMouseLeave:()=>h(null),style:{display:"inline-block",cursor:"pointer",position:"relative"},children:[(0,b.jsx)("div",{style:{width:56,height:56,borderRadius:"50%",margin:"0 auto",border:`3px solid ${aZ[a.bridge.tier]}`,overflow:"hidden",background:"#1a1a2e",boxShadow:g===a.bridge.id?`0 0 20px ${aZ[a.bridge.tier]}60`:`0 0 10px ${aZ[a.bridge.tier]}20`,transition:"box-shadow 0.2s"},children:(0,J.localPhoto)(a.bridge.profile_image_url)?(0,b.jsx)("img",{src:(0,J.localPhoto)(a.bridge.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"}}):(0,b.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:aZ[a.bridge.tier],color:"S"===a.bridge.tier?"#000":"#fff",fontSize:20,fontWeight:800},children:a.bridge.name?.charAt(0)})}),(0,b.jsx)("div",{style:{fontSize:12,fontWeight:700,color:"#fff",marginTop:4},children:a.bridge.name}),(0,b.jsxs)("div",{style:{fontSize:9,color:aZ[a.bridge.tier],fontWeight:600},children:[a.bridge.tier,"-Tier · ",a.total," connections · ",a.sCount>0?a.sCount+"S ":"",a.aCount>0?a.aCount+"A":""]})]})}),a$.map(a=>{let c=d[a];if(0===c.length)return null;let f=i[a],j="S"===a?10:"A"===a?6:4;return(0,b.jsxs)("div",{style:{marginBottom:6},children:[(0,b.jsx)("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:j},children:c.map(c=>{let d=g===c.id;return(0,b.jsxs)("div",{onClick:()=>e&&e(c),onMouseEnter:()=>h(c.id),onMouseLeave:()=>h(null),style:{position:"relative",cursor:"pointer"},children:[(0,b.jsx)("div",{style:{width:f,height:f,borderRadius:"50%",border:`2px solid ${aZ[a]}`,overflow:"hidden",background:(0,J.localPhoto)(c.profile_image_url)?"#111":aZ[a],transition:"transform 0.15s, box-shadow 0.15s",transform:d?"scale(1.3)":"scale(1)",boxShadow:d?`0 0 12px ${aZ[a]}60`:"none"},children:(0,J.localPhoto)(c.profile_image_url)?(0,b.jsx)("img",{src:(0,J.localPhoto)(c.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"},onError:b=>{b.target.style.display="none",b.target.parentElement.style.background=aZ[a]}}):(0,b.jsx)("span",{style:{display:"flex",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",fontSize:.4*f,fontWeight:700,color:"S"===a?"#000":"#fff"},children:c.name?.charAt(0)})}),("S"===a||d)&&(0,b.jsx)("div",{style:{position:"absolute",top:f+2,left:"50%",transform:"translateX(-50%)",whiteSpace:"nowrap",textAlign:"center",zIndex:20,pointerEvents:"none"},children:(0,b.jsxs)("div",{style:{fontSize:d?10:8,fontWeight:600,color:d?"#fff":"#aaa",background:d?"rgba(0,0,0,0.85)":"transparent",padding:d?"3px 8px":0,borderRadius:4},children:[c.name?.split(" ")[0],d&&(0,b.jsx)("span",{style:{color:aZ[a],marginLeft:4},children:parseFloat(c.power_score||0).toFixed(1)})]})})]},c.id)})}),(0,b.jsx)("div",{style:{height:1,margin:"6px auto 0",width:`${40+10*a$.indexOf(a)}%`,background:`linear-gradient(90deg, transparent, ${aZ[a]}20, transparent)`}})]},a)})]},a.bridge.id)})})})}let i={};a$.forEach(a=>{i[a]=[]}),a.forEach(a=>{let b=a.tier||"D";i[b]&&i[b].push(a)}),a$.forEach(a=>{i[a].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0))});let j={S:44,A:34,B:26,C:20,D:16};return(0,b.jsx)("div",{style:{flex:1,overflow:"auto",background:"#0a0a1a",padding:"20px 10px"},children:(0,b.jsx)("div",{style:{maxWidth:1200,margin:"0 auto"},children:a$.map((a,c)=>{let d=i[a];if(0===d.length)return null;let f=j[a],k="S"===a?12:"A"===a?8:"B"===a?6:4;return(0,b.jsxs)("div",{style:{marginBottom:"S"===a?20:"A"===a?16:10},children:[(0,b.jsxs)("div",{style:{textAlign:"center",marginBottom:8,fontSize:"S"===a?14:11,fontWeight:700,color:aZ[a],opacity:"S"===a?1:.7},children:["S"===a&&"👑 ",a,"-Tier (",d.length,")"]}),(0,b.jsx)("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:k,padding:"0 20px"},children:d.map(c=>{let d=g===c.id;return(0,b.jsxs)("div",{onClick:()=>e&&e(c),onMouseEnter:()=>h(c.id),onMouseLeave:()=>h(null),style:{position:"relative",cursor:"pointer"},children:[(0,b.jsx)("div",{style:{width:f,height:f,borderRadius:"50%",border:`2px solid ${aZ[a]}`,overflow:"hidden",background:(0,J.localPhoto)(c.profile_image_url)?"#111":aZ[a],display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.15s, box-shadow 0.15s",transform:d?"scale(1.3)":"scale(1)",boxShadow:d?`0 0 16px ${aZ[a]}60`:"none",zIndex:d?10:1,position:"relative"},children:(0,J.localPhoto)(c.profile_image_url)?(0,b.jsx)("img",{src:(0,J.localPhoto)(c.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"},onError:b=>{b.target.style.display="none",b.target.parentElement.style.background=aZ[a]}}):(0,b.jsx)("span",{style:{fontSize:.4*f,fontWeight:700,color:"S"===a?"#000":"#fff"},children:c.name?.charAt(0)})}),("S"===a||d)&&(0,b.jsxs)("div",{style:{position:"absolute",top:f+4,left:"50%",transform:"translateX(-50%)",whiteSpace:"nowrap",textAlign:"center",zIndex:20,pointerEvents:"none"},children:[(0,b.jsxs)("div",{style:{fontSize:"S"===a?9:10,fontWeight:600,color:d?"#fff":"#aaa",background:d?"rgba(0,0,0,0.85)":"transparent",padding:d?"3px 8px":0,borderRadius:4},children:[c.name?.split(" ")[0],d&&(0,b.jsx)("span",{style:{color:aZ[a],marginLeft:4,fontWeight:800},children:parseFloat(c.power_score||0).toFixed(1)})]}),d&&c.headline&&(0,b.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:c.headline.substring(0,40)})]})]},c.id)})}),c<a$.length-1&&(0,b.jsx)("div",{style:{height:1,margin:"12px auto 0",width:`${50+12*c}%`,background:`linear-gradient(90deg, transparent, ${aZ[a]}30, transparent)`}})]},a)})})})},modes:["network","degrees"],label:"Pyramid",icon:"🔺",desc:"Tier hierarchy"},list:{component:function({connections:a,degree2:c=[],onSelect:d,mode:e}){if("degrees"===e){let e={};c.forEach(a=>{a.source_connection_id&&(e[a.source_connection_id]||(e[a.source_connection_id]=[]),e[a.source_connection_id].push(a))});let f=Object.entries(e).map(([b,c])=>{let d=a.find(a=>a.id===b);if(!d)return null;let e=c.filter(a=>"S"===a.tier).length,f=c.filter(a=>"A"===a.tier).length,g=3*e+2*f+c.length;return{bridge:d,members:c,sCount:e,aCount:f,total:c.length,value:g}}).filter(Boolean).sort((a,b)=>b.value-a.value);return(0,b.jsx)("div",{style:{flex:1,overflow:"auto",padding:"16px 24px",background:"#0a0a1a"},children:(0,b.jsxs)("div",{style:{maxWidth:800,margin:"0 auto"},children:[(0,b.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,b.jsx)("span",{children:"#"}),(0,b.jsx)("span",{children:"Bridge"}),(0,b.jsx)("span",{children:"S"}),(0,b.jsx)("span",{children:"A"}),(0,b.jsx)("span",{children:"Total"}),(0,b.jsx)("span",{children:"Value"})]}),f.map((a,c)=>(0,b.jsxs)("div",{onClick:()=>d&&d(a.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:a=>a.currentTarget.style.background="rgba(255,255,255,0.04)",onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[(0,b.jsx)("span",{style:{fontSize:12,fontWeight:700,color:"#444"},children:c+1}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0},children:[(0,J.localPhoto)(a.bridge.profile_image_url)?(0,b.jsx)("img",{src:(0,J.localPhoto)(a.bridge.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`2px solid ${aY[a.bridge.tier]}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",flexShrink:0,fontSize:10,fontWeight:700,background:aY[a.bridge.tier],color:"#000",display:"flex",alignItems:"center",justifyContent:"center"},children:a.bridge.name?.charAt(0)}),(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:12,fontWeight:600,color:"#fff",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.bridge.name}),(0,b.jsxs)("div",{style:{fontSize:9,color:aY[a.bridge.tier],fontWeight:600},children:[a.bridge.tier,"-Tier"]})]})]}),(0,b.jsx)("span",{style:{fontSize:13,fontWeight:800,color:"#FFD700"},children:a.sCount}),(0,b.jsx)("span",{style:{fontSize:13,fontWeight:700,color:"#9B59B6"},children:a.aCount}),(0,b.jsx)("span",{style:{fontSize:12,color:"#888"},children:a.total}),(0,b.jsx)("div",{children:(0,b.jsx)("div",{style:{height:6,background:"rgba(255,255,255,0.06)",borderRadius:3},children:(0,b.jsx)("div",{style:{height:"100%",borderRadius:3,background:`linear-gradient(90deg, ${aY[a.bridge.tier]}, #FF6B35)`,width:`${Math.min(100,a.value/Math.max(f[0]?.value||1,1)*100)}%`}})})})]},a.bridge.id))]})})}let f=[...a].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0)),g=parseFloat(f[0]?.power_score)||10;return(0,b.jsx)("div",{style:{flex:1,overflow:"auto",padding:"16px 24px",background:"#0a0a1a"},children:(0,b.jsxs)("div",{style:{maxWidth:800,margin:"0 auto"},children:[(0,b.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,b.jsx)("span",{children:"#"}),(0,b.jsx)("span",{}),(0,b.jsx)("span",{children:"Name"}),(0,b.jsx)("span",{children:"Score"}),(0,b.jsx)("span",{children:"Power"})]}),f.map((a,c)=>(0,b.jsxs)("div",{onClick:()=>d&&d(a),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:c<3?`${aY[a.tier]}08`:"transparent",transition:"background 0.1s"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.04)",onMouseLeave:b=>b.currentTarget.style.background=c<3?`${aY[a.tier]}08`:"transparent",children:[(0,b.jsx)("span",{style:{fontSize:12,fontWeight:700,color:c<3?aY[a.tier]:"#444"},children:c+1}),(0,J.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,J.localPhoto)(a.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",border:`2px solid ${aY[a.tier]}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",fontSize:10,fontWeight:700,background:aY[a.tier],color:"S"===a.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:12,fontWeight:600,color:"#fff",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,45)})]}),(0,b.jsxs)("div",{style:{textAlign:"center"},children:[(0,b.jsx)("span",{style:{fontSize:13,fontWeight:800,color:aY[a.tier]},children:parseFloat(a.power_score||0).toFixed(1)}),(0,b.jsx)("div",{style:{fontSize:8,color:"#555"},children:a.tier})]}),(0,b.jsx)("div",{style:{height:6,background:"rgba(255,255,255,0.06)",borderRadius:3},children:(0,b.jsx)("div",{style:{height:"100%",borderRadius:3,background:aY[a.tier],width:`${parseFloat(a.power_score||0)/g*100}%`}})})]},a.id))]})})},modes:["network","degrees"],label:"List",icon:"☰",desc:"Ranked power list"},grid:{component:function({connections:a,degree2:c=[],onSelect:d,mode:e}){if("degrees"===e){let e={};c.forEach(a=>{a.source_connection_id&&(e[a.source_connection_id]||(e[a.source_connection_id]=[]),e[a.source_connection_id].push(a))});let f=Object.entries(e).map(([b,c])=>{let d=a.find(a=>a.id===b);if(!d)return null;let e=c.filter(a=>"S"===a.tier).length,f=c.filter(a=>"A"===a.tier).length;return{bridge:d,members:c,sCount:e,aCount:f,total:c.length}}).filter(Boolean).sort((a,b)=>3*b.sCount+2*b.aCount+b.total-(3*a.sCount+2*a.aCount+a.total));return(0,b.jsx)("div",{style:{flex:1,overflow:"auto",padding:20,background:"#0a0a1a"},children:(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))",gap:12,maxWidth:1200,margin:"0 auto"},children:f.map(a=>(0,b.jsxs)("div",{onClick:()=>d&&d(a.bridge),style:{padding:16,borderRadius:12,cursor:"pointer",background:"rgba(255,255,255,0.03)",border:`1px solid ${aW[a.bridge.tier]||"#333"}30`,borderLeft:`4px solid ${aW[a.bridge.tier]||"#555"}`,transition:"all 0.15s"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:a=>a.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,J.localPhoto)(a.bridge.profile_image_url)?(0,b.jsx)("img",{src:(0,J.localPhoto)(a.bridge.profile_image_url),alt:"",style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",border:`2px solid ${aW[a.bridge.tier]}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:40,height:40,borderRadius:"50%",fontSize:16,fontWeight:700,background:aW[a.bridge.tier],color:"#000",display:"flex",alignItems:"center",justifyContent:"center"},children:a.bridge.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:13,fontWeight:700,color:"#fff"},children:a.bridge.name}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.bridge.headline?.substring(0,40)})]}),(0,b.jsx)("span",{style:{fontSize:12,fontWeight:800,color:aW[a.bridge.tier]},children:a.bridge.tier})]}),(0,b.jsxs)("div",{style:{display:"flex",gap:6,fontSize:10},children:[a.sCount>0&&(0,b.jsxs)("span",{style:{color:"#FFD700",fontWeight:600},children:[a.sCount,"S"]}),a.aCount>0&&(0,b.jsxs)("span",{style:{color:"#9B59B6",fontWeight:600},children:[a.aCount,"A"]}),(0,b.jsxs)("span",{style:{color:"#666"},children:[a.total," total"]})]}),(0,b.jsxs)("div",{style:{display:"flex",marginTop:8},children:[a.members.slice(0,8).map((a,c)=>(0,b.jsx)("div",{style:{width:22,height:22,borderRadius:"50%",fontSize:8,fontWeight:700,background:(0,J.localPhoto)(a.profile_image_url)?"transparent":aW[a.tier]||"#333",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",border:"2px solid #0a0a1a",marginLeft:c>0?-6:0,position:"relative",zIndex:8-c,overflow:"hidden"},children:(0,J.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,J.localPhoto)(a.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"}}):a.name?.charAt(0)},a.id)),a.total>8&&(0,b.jsxs)("span",{style:{fontSize:9,color:"#555",marginLeft:4,alignSelf:"center"},children:["+",a.total-8]})]})]},a.bridge.id))})})}let f={};return aX.forEach(a=>{f[a]=[]}),a.forEach(a=>{let b=a.tier||"D";f[b]&&f[b].push(a)}),aX.forEach(a=>{f[a].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0))}),(0,b.jsx)("div",{style:{flex:1,overflow:"auto",padding:20,background:"#0a0a1a"},children:(0,b.jsx)("div",{style:{maxWidth:1200,margin:"0 auto"},children:aX.map(a=>{let c=f[a];return 0===c.length?null:(0,b.jsxs)("div",{style:{marginBottom:24},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 0 10px",borderBottom:`2px solid ${aW[a]}30`,marginBottom:10},children:[(0,b.jsx)("div",{style:{width:10,height:10,borderRadius:"50%",background:aW[a]}}),(0,b.jsxs)("span",{style:{fontSize:15,fontWeight:800,color:aW[a]},children:[a,"-Tier"]}),(0,b.jsx)("span",{style:{fontSize:12,color:"#555"},children:c.length})]}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(180px, 1fr))",gap:8},children:c.map(c=>(0,b.jsxs)("div",{onClick:()=>d&&d(c),style:{padding:10,borderRadius:8,cursor:"pointer",background:"rgba(255,255,255,0.03)",border:`1px solid ${aW[a]}20`,transition:"all 0.15s"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:a=>a.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,J.localPhoto)(c.profile_image_url)?(0,b.jsx)("img",{src:(0,J.localPhoto)(c.profile_image_url),alt:"",style:{width:32,height:32,borderRadius:"50%",objectFit:"cover",border:`2px solid ${aW[a]}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:32,height:32,borderRadius:"50%",fontSize:12,fontWeight:700,background:aW[a],color:"S"===a?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:c.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:11,fontWeight:600,color:"#fff",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c.name}),(0,b.jsx)("div",{style:{fontSize:8,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c.headline?.substring(0,30)})]})]}),(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginTop:6,alignItems:"center"},children:[(0,b.jsx)("span",{style:{fontSize:10,fontWeight:700,color:aW[a]},children:parseFloat(c.power_score||0).toFixed(1)}),(0,b.jsx)("div",{style:{flex:1,marginLeft:8,height:3,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,b.jsx)("div",{style:{height:"100%",borderRadius:2,background:aW[a],width:`${Math.min(100,10*(parseFloat(c.power_score)||0))}%`}})})]})]},c.id))})]},a)})})})},modes:["network","degrees"],label:"Grid",icon:"▦",desc:"Cards"}},bm=["galaxy","chain","separation","orbit","rings","list"];function bn(a){return bm.filter(b=>bl[b]?.modes.includes(a)).map(a=>({key:a,...bl[a]}))}var bo=a.i(7846);function bp({isMobile:a=!1}){let d=(0,c.useSyncExternalStore)(bo.watchAllDay,bo.allDayNow,()=>!1),[f,g]=(0,c.useState)(()=>(0,e.scannerNow)()),[h,i]=(0,c.useState)(!1);if((0,c.useEffect)(()=>(0,e.watchScanner)(()=>{g((0,e.scannerNow)()),i(!1)}),[]),!d)return null;let j=f?.running&&String(f.action||"").startsWith("auto-bridge"),k={padding:a?"8px 12px":"8px 16px",borderRadius:6,fontSize:13,fontWeight:600,textDecoration:"none",display:"flex",alignItems:"center",gap:6,whiteSpace:"nowrap"};if(j)return(0,b.jsxs)(af.default,{href:"/setup",title:"Auto scan is running: see it on the Scan page",style:{...k,background:"rgba(0,255,136,0.15)",color:"#00ff88",border:"1px solid rgba(0,255,136,0.45)"},children:[(0,b.jsx)("span",{style:{width:7,height:7,borderRadius:"50%",background:"#00ff88"}}),"Auto scan"]});let l=f?.running||h;return(0,b.jsxs)("button",{onClick:()=>{i(!0),(0,bo.startAutoScan)().catch(()=>i(!1))},disabled:l,title:l?"The scanner is busy: one scan at a time":"Start the all-day Auto-Bridge (experimental)",style:{...k,cursor:l?"default":"pointer",background:"rgba(255,255,255,0.04)",color:l?"#555":"#8b9a9a",border:"1px solid rgba(255,215,0,0.25)"},children:[(0,b.jsx)("span",{style:{width:7,height:7,borderRadius:"50%",background:"#556"}}),"Auto scan"]})}var bq=a.i(35112),br=a.i(30889);let bs=/\/10, (your|sample) score\)/,bt=/^(?:Former )?(?:Student · )?(.+?) \([\d.]+\) · (no company found|.+?) \(\d+(?:\.\d+)?\/10(?:[:,][^)]*)?\)/,bu={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},bv=["S","A","B","C","D"],bw="#00ff88";function bx({person:a,connections:d=[],degree2:e=[],tierColors:f=bu,onSelect:g,isRequested:h=ah,canScan:i=!0}){let j=(0,c.useMemo)(()=>ai(d,e),[d,e]),k=(0,c.useMemo)(()=>(0,ag.routeIndex)(e),[e]),{rings:l,totals:m}=(0,c.useMemo)(()=>(function(a,b,{maxDegree:c=6,isRequested:d=ah}={}){let e=[],f={people:0,connected:0,requested:0};if(!a||!b)return{rings:e,totals:f};let g=new Set([(0,ag.keyFor)(a)]),h=[a];for(let a=2;a<=c&&h.length;a++){let c=[],i=[];for(let a of h){let e=[];for(let c of b.introduced.get(a.id)||[]){let b=(0,ag.keyFor)(c);g.has(b)||(g.add(b),e.push({row:c,key:b,parentId:a.id,state:"connected"}),i.push(c))}for(let c of b.circles.get(a.id)||[]){let b=(0,ag.keyFor)(c);g.has(b)||(g.add(b),e.push({row:c,key:b,parentId:a.id,state:d(c)?"requested":null}))}e.sort(ak),c.push(...e)}if(!c.length)break;for(let a of c)f.people++,"connected"===a.state?f.connected++:"requested"===a.state&&f.requested++;e.push({degree:a,people:c}),h=i}return{rings:e,totals:f}})(a,j,{isRequested:h}),[a,j,h]),[n,o]=(0,c.useState)(()=>new Set),[p,q]=(0,c.useState)(()=>new Set),[r,s]=(0,c.useState)(!1),t=(0,c.useMemo)(()=>l.flatMap(a=>a.people.map(a=>{let b="connected"===a.state||1===a.row.degree?null:a2(a.row,k.get((0,ag.keyFor)(a.row))?.size||1);return{key:a.key,tier:a.row.tier,rarity:b?.key??null,mutuals:b}})),[l,k]),u=(0,c.useMemo)(()=>new Map(t.map(a=>[a.key,a])),[t]),v=(0,c.useMemo)(()=>({tiers:n,rarities:p}),[n,p]),w=(0,c.useMemo)(()=>t.filter(a=>a3(a,v)).length,[t,v]),x=(0,c.useMemo)(()=>d.filter(a=>j.circles.has(a.id)).length,[d,j]),y=t.some(a=>a.mutuals?.from==="linkedin"),z=(0,c.useMemo)(()=>(function(a){let b,c,d,e;if(!a)return null;if(null==a.power_score||""===a.power_score||!a.tier)return{title:!1,company:!1,never:!0,companyName:null,reason:"They haven’t been scored yet."};let f=String(a.score_why||"").match(bt);if(f)b=f[1],d=!(c="no company found"===f[2]?null:f[2])||!bs.test(a.score_why)&&!["known","data"].includes((0,br.companyScore)(c).source);else{let e=(0,br.scorePerson)(a);b=e.title.label,c=e.company||null,d=["none","default","network"].includes(e.companySource)}let g=b.startsWith("Audience of"),h="Title unclear"===b||b.includes("Works there");return(g&&(d=!1),h||d)?(e=h&&d?c?`Their headline doesn’t say their title, and the app doesn’t know ${c}.`:"Their headline names no title or company the app can read.":h?"Their headline doesn’t say their title.":c?`The app doesn’t know ${c}, so it counts as the middle of the scale.`:"The app couldn’t find where they work.",{title:h,company:d,never:!1,companyName:c,reason:e}):null})(a),[a]);if(!a)return null;if(!l.length){let c=a.name?.split(" ")[0]||"them";return(0,b.jsxs)("div",{style:z?{...bF,borderColor:"rgba(255,215,0,0.28)"}:bF,children:[(0,b.jsx)(bE,{children:"Their circle"}),z?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{style:{fontSize:11.5,color:"#d8ccb0",lineHeight:1.5,marginBottom:9*!!i},children:[(0,b.jsx)("b",{style:{color:"#FFD700"},children:"Their score is a guess."})," ",z.reason,i&&(0,b.jsxs)(b.Fragment,{children:[" Scanning ",c,"'s circle shows who you can reach through them, and a strong circle adds up to +2 to their score."]})]}),i&&(0,b.jsx)("button",{type:"button",onClick:bD,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 ↓"})]}):i?(0,b.jsxs)("div",{style:{fontSize:11,color:"#999",lineHeight:1.5},children:["Not scanned yet. Scan ",c,"'s circle below to see who they know, and everyone you reach through them after that."]}):(0,b.jsx)("div",{style:{fontSize:11,color:"#999",lineHeight:1.5},children:"Not scanned."})]})}let A=Object.fromEntries(bv.map(a=>[a,t.filter(b=>b.tier===a).length])),B=function(a=[]){let b=Object.fromEntries(a_.map(a=>[a.key,0]));for(let c of a)c?.rarity&&void 0!==b[c.rarity]&&b[c.rarity]++;return b}(t),C=n.size>0||p.size>0,D=(0,b.jsx)(bA,{tierColors:f,byTier:A,byRarity:B,tiers:n,rarities:p,onTier:a=>o(b=>a4(b,a)),onRarity:a=>q(b=>a4(b,a)),onClear:()=>{o(new Set),q(new Set)}}),E=(0,b.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."," ",y?"LinkedIn’s own count where a scan saved it; otherwise the ways in from your scans.":`Counted from the ${x} ${1===x?"circle":"circles"} you’ve scanned, so it can only go up as you scan more.`]});return(0,b.jsxs)("div",{style:bF,children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:8},children:[(0,b.jsx)(bE,{children:"Their circle"}),(0,b.jsx)("button",{type:"button",onClick:()=>s(!0),style:bH,"aria-label":"Open the large map",children:"Enlarge ⤢"})]}),(0,b.jsx)("button",{type:"button",onClick:()=>s(!0),"aria-label":`${a.name}'s circle: open the large map`,style:{display:"block",width:"100%",padding:0,border:"none",background:"none",cursor:"zoom-in"},children:(0,b.jsx)(by,{person:a,rings:l,facts:u,filter:v,tierColors:f,size:240})}),(0,b.jsx)(bz,{rings:l,totals:m,shown:C?w:null}),D,E,r&&(0,b.jsxs)(bC,{onClose:()=>s(!1),title:`${a.name}’s circle`,children:[(0,b.jsx)(by,{person:a,rings:l,facts:u,filter:v,tierColors:f,size:640,labels:!0,onPick:a=>{s(!1),g?.(a)}}),(0,b.jsx)(bz,{rings:l,totals:m,shown:C?w:null}),D,(0,b.jsx)(bB,{}),E]})]})}function by({person:a,rings:d,facts:e,filter:f,tierColors:g,size:h,labels:i=!1,onPick:j}){let k=(0,c.useMemo)(()=>(function(a=[],b=240){let c=b/2,d=a.length,e=a=>c*(1===d?.78:.4+a/(d-1)*.52),f=a.map(a=>{let b=new Map;for(let c of a.people)b.has(c.parentId)||b.set(c.parentId,[]),b.get(c.parentId).push(c);return b}),g=(a,b)=>f[a+1]?.get(b)||[],h=new Map;for(let b=d-1;b>=0;b--)for(let c of a[b].people){let a="connected"===c.state?g(b,c.row.id).reduce((a,b)=>a+h.get(b),0):0;h.set(c,Math.max(1,a))}let i=[],j=[],k=new Map,l=-Math.PI/2;for(let m=0;m<d;m++){let n=e(m);a[m].people;let o=Math.max(2.4,b/100),p=m===d-1&&d>1,q=(p?n-e(m-1):(m+1<d?e(m+1):.97*c)-n)*.45,r=Math.max(1,Math.floor(q/o)+1),s=r>1?(p?-1:1)*Math.min(1.2*o,q/(r-1)):0,t=(a,b)=>al(Math.ceil(a*o/Math.max(1e-9,n*b)),1,r),u=1,v=1/0,w=[];for(let[a,b]of f[m]){let[d,e]=0===m?[l,l+2*Math.PI]:k.get(a)||[l,l+2*Math.PI],f=b.reduce((a,b)=>a+h.get(b),0),g=t(b.length,e-d);u=Math.max(u,g),v=Math.min(v,n*(e-d)*g/Math.max(1,b.length));let i=0,j=d;for(let a of b){let b=(e-d)*h.get(a)/f,l=j+b/2,m=n+i++%g*s,o=c+m*Math.cos(l),p=c+m*Math.sin(l);w.push({...a,angle:l,x:o,y:p}),"connected"===a.state&&k.set(a.row.id,[j,j+b]),j+=b}}if(m+1<d){let a=e(m+1);for(let b of w){if("connected"!==b.state||!g(m,b.row.id).length)continue;let[d,e]=k.get(b.row.id),f=(d+e)/2;j.push({x1:b.x,y1:b.y,x2:c+a*Math.cos(f),y2:c+a*Math.sin(f)})}}let x=al(Math.min(.32*v,u>1?.42*Math.abs(s):1/0),.8,b/60);i.push({degree:a[m].degree,radius:n,dotR:x,rows:u,items:w})}return{size:b,center:{x:c,y:c},rings:i,spokes:j}})(d,h),[d,h]),l=k.center,m=h/240;return(0,b.jsxs)("svg",{viewBox:`0 0 ${h} ${h}`,width:"100%",style:{display:"block",maxWidth:h,margin:"0 auto"},role:"img","aria-label":`${a.name}'s circle, ${d.length} ${1===d.length?"ring":"rings"}`,children:[k.rings.map(a=>(0,b.jsxs)("g",{children:[(0,b.jsx)("circle",{cx:l.x,cy:l.y,r:a.radius,fill:"none",stroke:"rgba(255,255,255,0.07)",strokeWidth:.6*m}),(0,b.jsxs)("text",{x:l.x,y:l.y-a.radius-a.dotR-3*m,textAnchor:"middle",fontSize:6.5*m,fill:"#666",fontWeight:700,children:["D",a.degree]})]},a.degree)),k.spokes.map((a,c)=>(0,b.jsx)("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,stroke:"rgba(0,255,136,0.35)",strokeWidth:.7*m},c)),k.rings.map(a=>a.items.map(c=>{let d=e.get(c.key),h=a3(d,f),k=g[c.row.tier]||"#888",l="connected"===c.state?1.7*a.dotR:a.dotR,m=[`${c.row.name} \xb7 ${c.row.tier}-tier${null!=c.row.power_score?` \xb7 ${Number(c.row.power_score).toFixed(1)}`:""}`,"connected"===c.state?"You added them":"requested"===c.state?"Request sent":null,d?.mutuals?`${a1(d.rarity)?.label}: ${d.mutuals.count} mutual${1===d.mutuals.count?"":"s"}${"scans"===d.mutuals.from?" (from your scans)":""}`:null].filter(Boolean).join("\n");return(0,b.jsxs)("g",{opacity:h?1:.12,style:j?{cursor:"pointer"}:void 0,onClick:j?a=>{a.stopPropagation(),j(c.row)}:void 0,children:[(0,b.jsx)("title",{children:m}),"requested"===c.state?(0,b.jsx)("circle",{cx:c.x,cy:c.y,r:1.25*l,fill:"none",stroke:k,strokeWidth:Math.max(.5,.45*l),strokeDasharray:`${Math.max(.6,.55*l)} ${Math.max(.5,.45*l)}`}):(0,b.jsx)("circle",{cx:c.x,cy:c.y,r:l,fill:k,stroke:"connected"===c.state?bw:"none",strokeWidth:Math.max(.6,.3*l)}),i&&"connected"===c.state&&(0,b.jsx)("text",{x:c.x,y:c.y-l-3,textAnchor:"middle",fontSize:9,fill:bw,fontWeight:700,children:String(c.row.name||"").split(" ")[0]})]},c.key)})),(0,b.jsx)("circle",{cx:l.x,cy:l.y,r:7*m,fill:g[a.tier]||"#888",stroke:"#fff",strokeWidth:.8*m}),(0,b.jsx)("text",{x:l.x,y:l.y+2.4*m,textAnchor:"middle",fontSize:6.5*m,fontWeight:800,fill:"S"===a.tier?"#000":"#fff",children:String(a.name||"?").charAt(0)})]})}function bz({rings:a,totals:c,shown:d}){return(0,b.jsxs)("div",{style:{fontSize:10.5,color:"#aaa",marginTop:6,lineHeight:1.5},children:[a.map(a=>`D${a.degree} ${a.people.length.toLocaleString("en-US")}`).join(" · "),c.connected>0&&(0,b.jsxs)("span",{style:{color:bw},children:[" · you added ",c.connected]}),c.requested>0&&(0,b.jsxs)("span",{style:{color:"#FFD700"},children:[" · ",c.requested," ",1===c.requested?"request":"requests"," out"]}),null!=d&&(0,b.jsxs)("span",{style:{color:"#fff"},children:[" · ",d.toLocaleString("en-US")," shown"]})]})}function bA({tierColors:a,byTier:c,byRarity:d,tiers:e,rarities:f,onTier:g,onRarity:h,onClear:i}){let j=(a,b)=>({height:22,padding:"0 7px",borderRadius:11,cursor:"pointer",fontSize:10,fontWeight:700,whiteSpace:"nowrap",border:`1px solid ${a?b:"rgba(255,255,255,0.1)"}`,background:a?`${b}22`:"rgba(255,255,255,0.03)",color:a?b:"#999"});return(0,b.jsxs)("div",{style:{marginTop:8,display:"flex",flexDirection:"column",gap:5},children:[(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,alignItems:"center"},children:[(0,b.jsx)("span",{style:bG,children:"Tier"}),bv.map(d=>(0,b.jsxs)("button",{type:"button","aria-pressed":e.has(d),onClick:()=>g(d),style:j(e.has(d),a[d]||"#888"),children:[d," ",(0,b.jsx)("span",{style:{fontWeight:500,opacity:.8},children:c[d]})]},d))]}),(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,alignItems:"center"},children:[(0,b.jsx)("span",{style:bG,children:"Rarity"}),a_.map(a=>(0,b.jsxs)("button",{type:"button","aria-pressed":f.has(a.key),onClick:()=>h(a.key),title:`${a.label}: ${a.range} mutual connection${"1"===a.range?"":"s"}`,style:j(f.has(a.key),a.color),children:[a.label," ",(0,b.jsx)("span",{style:{fontWeight:500,opacity:.8},children:d[a.key]})]},a.key)),(e.size>0||f.size>0)&&(0,b.jsx)("button",{type:"button",onClick:i,style:bH,children:"Clear"})]})]})}function bB(){let a=(a,c)=>(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5,marginRight:12,whiteSpace:"nowrap"},children:[a,c]});return(0,b.jsxs)("div",{style:{fontSize:10.5,color:"#999",marginTop:8,lineHeight:1.8},children:[a((0,b.jsx)("svg",{width:"10",height:"10",children:(0,b.jsx)("circle",{cx:"5",cy:"5",r:"4",fill:"#FFD700"})}),"colour = tier"),a((0,b.jsx)("svg",{width:"12",height:"12",children:(0,b.jsx)("circle",{cx:"6",cy:"6",r:"4",fill:"#9B59B6",stroke:bw,strokeWidth:"1.5"})}),"you added them"),a((0,b.jsx)("svg",{width:"12",height:"12",children:(0,b.jsx)("circle",{cx:"6",cy:"6",r:"4.2",fill:"none",stroke:"#3498DB",strokeWidth:"1.4",strokeDasharray:"2 1.6"})}),"request sent")]})}function bC({title:a,onClose:d,children:e}){return(0,c.useEffect)(()=>{let a=a=>{"Escape"===a.key&&d()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[d]),(0,bq.createPortal)((0,b.jsx)("div",{role:"dialog","aria-modal":"true","aria-label":a,onClick:d,style:{position:"fixed",inset:0,zIndex:300,background:"rgba(0,0,0,0.78)",display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:(0,b.jsxs)("div",{onClick:a=>a.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,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[(0,b.jsx)("div",{style:{fontSize:14,fontWeight:800,color:"#fff"},children:a}),(0,b.jsx)("button",{type:"button",onClick:d,style:{...bH,fontSize:12},children:"Close ✕"})]}),(0,b.jsx)("div",{style:{fontSize:10.5,color:"#888",marginBottom:8},children:"Click a dot to open that person."}),e]})}),document.body)}function bD(){let a=document.getElementById("scan-box");a&&(a.scrollIntoView({behavior:"smooth",block:"center"}),a.animate?.([{boxShadow:"0 0 0 3px rgba(255,215,0,0.75)"},{boxShadow:"0 0 0 0 rgba(255,215,0,0)"}],{duration:1600}),a.querySelector("button:not([disabled])")?.focus({preventScroll:!0}))}function bE({children:a}){return(0,b.jsx)("div",{style:{fontSize:10,fontWeight:700,color:"#FF6B35",letterSpacing:1,textTransform:"uppercase",marginBottom:6},children:a})}let bF={background:"rgba(255,255,255,0.03)",border:"1px solid rgba(255,255,255,0.07)",borderRadius:10,padding:10,marginBottom:16},bG={fontSize:9,color:"#666",textTransform:"uppercase",letterSpacing:.5,width:38,flexShrink:0},bH={background:"none",border:"none",color:"#888",fontSize:10.5,fontWeight:600,cursor:"pointer",padding:0};var bI=a.i(75857);let bJ=["S","A","B","C","D"];function bK({selected:a,stats:d,tierColors:e,connections:f,degree2:i=[],mode:j,collapsed:k,filter:l,pending:m=[],onToggle:n,onSelect:o,onSwitchMode:p,onFocusNode:q,onMarkSent:r,onUndoPending:s,scanNotes:t,csvSource:u=null,onOpenCircle:v,onShowInSeparation:w}){let x,y,z="degrees"===j,A=!u,{userId:B,userProfile:C}=(0,bI.useUser)(),[D,E]=(0,c.useState)(""),F=(0,c.useMemo)(()=>{let a={};return i.forEach(b=>{b.source_connection_id&&(a[b.source_connection_id]||(a[b.source_connection_id]=[]),a[b.source_connection_id].push(b))}),a},[i]),G=(0,c.useMemo)(()=>(0,ag.routeIndex)(i),[i]),H=(0,c.useMemo)(()=>(0,at.exclusiveReach)(i,f),[i,f]),I=(0,c.useMemo)(()=>(0,at.bridgeOverlap)(i,f),[i,f]),K=(0,c.useMemo)(()=>(0,L.reachIndex)(f,i,t),[f,i,t]),[M,N]=(0,c.useState)(!1),O=(0,c.useMemo)(()=>new Map(f.map(a=>[a.id,a])),[f]),P=(0,g.default)(),Q=(0,c.useCallback)(a=>(0,h.hasRequest)(a,P),[P]);if(a){let c,d,g,j,l=1===a.degree&&F[a.id],m=F[a.id]||[],q=2===a.degree?(0,ag.routesFor)(a,G,O):[];return(0,b.jsxs)(bL,{collapsed:k,onToggle:n,children:[(0,b.jsxs)("button",{onClick:()=>o&&o(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,b.jsx)("span",{style:{fontSize:16},children:"←"})," Back to list"]}),(0,b.jsx)("div",{style:{fontSize:10,color:"#888",marginBottom:8,letterSpacing:1,textTransform:"uppercase"},children:2===a.degree?"Degree 2 Connection":"Degree 1 Connection"}),(0,b.jsxs)("div",{style:{display:"flex",gap:6,marginBottom:8,flexWrap:"wrap"},children:[(0,b.jsx)("div",{style:{background:2===a.degree?"#FF6B35":e[a.tier],color:"#000",display:"inline-block",padding:"2px 10px",borderRadius:12,fontSize:11,fontWeight:700},children:2===a.degree?`DEGREE 2 \xb7 TIER ${a.tier}`:`TIER ${a.tier}`}),a.unlocked_from_name&&(0,b.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===a.degree?"You met them through ":"Reachable through ",(0,b.jsx)("b",{style:{color:"#cfe6f7"},children:a.unlocked_from_name})]}),a.is_catalyst&&(0,b.jsx)("div",{style:{background:"#00ff88",color:"#000",display:"inline-block",padding:"2px 10px",borderRadius:12,fontSize:11,fontWeight:800,letterSpacing:.5},children:"CATALYST"})]}),(0,b.jsxs)("div",{style:{display:"flex",gap:12,alignItems:"center",marginBottom:16},children:[(0,J.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,J.localPhoto)(a.profile_image_url),alt:a.name,style:{width:52,height:52,borderRadius:"50%",objectFit:"cover",border:`2px solid ${e[a.tier]||"#555"}`,flexShrink:0},onError:a=>{a.target.style.display="none",a.target.nextSibling.style.display="flex"}}):null,(0,b.jsx)("div",{style:{width:52,height:52,borderRadius:"50%",flexShrink:0,background:e[a.tier]||"#555",display:(0,J.localPhoto)(a.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center",fontSize:20,fontWeight:700,color:"S"===a.tier?"#000":"#fff"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsx)("h2",{style:{fontSize:18,fontWeight:700,margin:0},children:a.name}),(0,b.jsx)("p",{style:{color:"#aaa",fontSize:11,margin:"3px 0 0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,60)}),a.profile_url&&(0,b.jsx)("a",{href:a.profile_url,target:"_blank",rel:"noopener noreferrer",style:{fontSize:10,color:"#0077B5",textDecoration:"none",fontWeight:600},children:"View on LinkedIn"})]})]}),1===a.degree&&(0,b.jsx)(bx,{person:a,connections:f,degree2:i,tierColors:e,onSelect:o,isRequested:Q,canScan:A}),2!==a.degree&&(()=>{let c,d,g=function(a,{degree2:b=[],exclusive:c,overlap:d,reach:e}={}){if(!a||2===a.degree)return null;let f=new Set,g={S:0,A:0,B:0,C:0,D:0},h=new Map;for(let c of b){if(c?.source_connection_id!==a.id)continue;let b=(0,ag.keyFor)(c);if(f.has(b))continue;f.add(b),g[bJ.includes(c.tier)?c.tier:"D"]+=1;let d=String(c.company||"").trim();d&&h.set(d,(h.get(d)||0)+1)}let i=[...h.entries()].filter(([,a])=>a>=2).sort((a,b)=>b[1]-a[1]||a[0].localeCompare(b[0])).slice(0,2).map(([a,b])=>({name:a,count:b})),j=f.size,k=c?.get(a.id)||{reach:0,only:0,total:0},l=d?.get(a.id),m=l&&l.share>=.15&&l.shared>=3?{id:l.with,share:l.share,shared:l.shared}:null,n=[...c?.entries()||[]].sort((a,b)=>b[1].reach-a[1].reach||String(a[0]).localeCompare(String(b[0]))),o=n.findIndex(([b])=>b===a.id);return{circle:j,only:k.only,onlyShare:j?k.only/j:0,twin:m,mix:g,bars:e?(0,L.scanBars)(a,e):null,rank:o>=0?o+1:null,of:n.length,companies:i}}(a,{degree2:i,exclusive:H,overlap:I,reach:K});if(!g)return null;let j=a.name?.split(" ")[0]||"them",k=g.twin&&f.find(a=>a.id===g.twin.id),l={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:10,padding:"7px 0",borderTop:"1px solid rgba(255,255,255,0.05)"},m={fontSize:10.5,color:"#8b9a9a",minWidth:92},n={background:"none",border:"none",padding:0,color:"#3498DB",cursor:"pointer",fontSize:11.5,whiteSpace:"nowrap"},p=null==g.bars?"Not scanned yet":5===g.bars?"Their whole list":`About ${20*g.bars}% of their list`;return(0,b.jsxs)("div",{style:{border:"1px solid rgba(52,152,219,0.25)",borderRadius:8,marginBottom:16,background:"rgba(52,152,219,0.04)"},children:[(0,b.jsxs)("button",{onClick:()=>N(a=>!a),"aria-expanded":M,style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",padding:"9px 12px",background:"none",border:"none",cursor:"pointer",color:"#cfe6f7"},children:[(0,b.jsx)("span",{style:{fontSize:11,fontWeight:700,letterSpacing:1},children:"INSIGHTS"}),(0,b.jsxs)("span",{style:{fontSize:11,color:"#8b9a9a"},children:[!M&&g.circle>0&&`${g.circle.toLocaleString()} in their circle${g.only?` \xb7 ${g.only.toLocaleString()} only through ${j}`:""} `,M?"▲":"▼"]})]}),M&&(0,b.jsxs)("div",{style:{padding:"0 12px 8px",fontSize:12,color:"#ccc"},children:[(0,b.jsxs)("div",{style:l,children:[(0,b.jsx)("span",{style:m,children:"Their circle"}),(0,b.jsx)("span",{style:{flex:1},children:g.circle?`${g.circle.toLocaleString()} people`:"None scanned yet"}),g.circle>0&&v&&(0,b.jsx)("button",{style:n,onClick:()=>v(a.id),children:"Explore →"})]}),(0,b.jsxs)("div",{style:l,children:[(0,b.jsxs)("span",{style:m,children:["Only through ",j]}),(0,b.jsx)("span",{style:{flex:1},children:g.circle?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("b",{style:{color:"#00ff88"},children:g.only.toLocaleString()})," (",Math.round(100*g.onlyShare),"%): none of your other connections reach them"]}):"—"}),g.only>0&&w&&(0,b.jsx)("button",{style:n,onClick:()=>w({query:a.name,rarity:"only"}),children:"Show them →"})]}),(0,b.jsxs)("div",{style:l,children:[(0,b.jsx)("span",{style:m,children:"Closest overlap"}),(0,b.jsx)("span",{style:{flex:1},children:k?(0,b.jsxs)(b.Fragment,{children:["Opens the same doors as ",(0,b.jsx)("b",{style:{color:"#fff"},children:k.name})," (",Math.round(100*g.twin.share),"%, ",g.twin.shared.toLocaleString()," people)"]}):"No one opens the same doors"}),k&&(0,b.jsx)("button",{style:n,onClick:()=>o?.(k),children:"Open →"})]}),(0,b.jsxs)("div",{style:l,children:[(0,b.jsx)("span",{style:m,children:"Tier mix"}),(0,b.jsx)("span",{style:{flex:1,display:"flex",height:8,borderRadius:4,overflow:"hidden",background:"rgba(255,255,255,0.05)",alignSelf:"center"},children:g.circle>0&&["S","A","B","C","D"].map(a=>g.mix[a]>0&&(0,b.jsx)("span",{title:`${a}: ${g.mix[a]}`,style:{width:`${100*g.mix[a]/g.circle}%`,background:e[a]}},a))}),(0,b.jsx)("span",{style:{fontSize:10.5,color:"#8b9a9a"},children:g.circle?`${g.mix.S} S \xb7 ${g.mix.A} A`:""}),g.mix.S>0&&w&&(0,b.jsx)("button",{style:n,onClick:()=>w({query:a.name,tier:"S"}),children:"S only →"})]}),g.companies.length>0&&(0,b.jsxs)("div",{style:l,children:[(0,b.jsx)("span",{style:m,children:"Where they work"}),(0,b.jsx)("span",{style:{flex:1},children:g.companies.map(a=>`${a.count} at ${a.name}`).join(" · ")})]}),(0,b.jsxs)("div",{style:l,children:[(0,b.jsx)("span",{style:m,children:"Scanned"}),(0,b.jsx)("span",{style:{flex:1},children:p}),5!==g.bars&&A&&(0,b.jsx)("a",{href:`/setup?scan=${encodeURIComponent(a.id)}`,style:n,children:null==g.bars?"Scan →":"Finish →"})]}),(c=a.connected_date?new Date(a.connected_date):null,d=(F[a.id]||[]).filter(a=>(0,h.hasRequest)(a,P)).length,c&&!Number.isNaN(c.getTime())||d?(0,b.jsxs)("div",{style:l,children:[(0,b.jsxs)("span",{style:m,children:["You and ",j]}),(0,b.jsxs)("span",{style:{flex:1},children:[c&&!Number.isNaN(c.getTime())?`Connected ${c.toLocaleDateString(void 0,{month:"short",year:"numeric"})}`:"",d?`${c?" · ":""}${d} request${1===d?"":"s"} out through them`:""]})]}):null),(0,b.jsxs)("div",{style:l,children:[(0,b.jsx)("span",{style:m,children:"Rank"}),(0,b.jsx)("span",{style:{flex:1},children:g.rank?`#${g.rank} of ${g.of} by who only they reach`:"Ranked once their circle is scanned"})]})]})]})})(),a.is_catalyst&&(0,b.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,b.jsx)("div",{style:{fontSize:10,color:"#00ff88",fontWeight:700,marginBottom:4,letterSpacing:1},children:"CATALYST NODE"}),(0,b.jsxs)("div",{style:{fontSize:12,color:"#ccc"},children:["This person's network power exceeds their own tier. They connect to"," ",(0,b.jsxs)("strong",{style:{color:"#00ff88"},children:[a.catalyst_score," S+A tier"]})," ","people — making them a high-value stepping stone to reach elite connections."]})]}),2===a.degree&&q.length>0&&(0,b.jsx)(bO,{routes:q,selected:a,tierColors:e,onSelect:o},a.id),(0,b.jsxs)("div",{style:{background:"rgba(255,255,255,0.04)",borderRadius:8,padding:12,marginBottom:16},children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",marginBottom:8},children:[(0,b.jsx)("span",{style:{fontSize:11,color:"#888",fontWeight:600,letterSpacing:1,textTransform:"uppercase"},children:"Score"}),(0,b.jsx)("span",{style:{fontSize:28,fontWeight:800,color:e[a.tier]||"#fff"},children:parseFloat(a.power_score).toFixed(1)})]}),a.score_why&&(0,b.jsx)("div",{style:{fontSize:11,color:"#aab7b7",lineHeight:1.5,marginBottom:10},children:a.score_why}),(0,b.jsxs)("div",{style:{marginBottom:6},children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:10,color:"#888",marginBottom:2},children:[(0,b.jsx)("span",{children:"Title"}),(0,b.jsxs)("span",{children:[a.seniority_score||0,"/10"]})]}),(0,b.jsx)("div",{style:{height:4,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,b.jsx)("div",{style:{height:"100%",width:`${10*(a.seniority_score||0)}%`,background:e[a.tier]||"#FFD700",borderRadius:2}})})]}),(0,b.jsxs)("div",{style:{marginBottom:6*(a.circle_power>0)},children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:10,color:"#888",marginBottom:2},children:[(0,b.jsx)("span",{children:"Company"}),(0,b.jsxs)("span",{children:[a.company_prestige_score||0,"/10"]})]}),(0,b.jsx)("div",{style:{height:4,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,b.jsx)("div",{style:{height:"100%",width:`${10*(a.company_prestige_score||0)}%`,background:"#3498DB",borderRadius:2}})})]}),a.circle_power>0&&(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:10,color:"#888",marginBottom:2},children:[(0,b.jsx)("span",{children:"Circle Power"}),(0,b.jsxs)("span",{style:{color:"#FF6B35"},children:[a.circle_s_count||0,"S · ",a.circle_a_count||0,"A"]})]}),(0,b.jsx)("div",{style:{height:4,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,b.jsx)("div",{style:{height:"100%",width:`${Math.min(parseFloat(a.circle_power)/70*100,100)}%`,background:"#FF6B35",borderRadius:2}})})]})]}),(0,b.jsxs)("div",{style:{marginBottom:16},children:[(0,b.jsx)("div",{style:{fontSize:10,fontWeight:700,color:"#FFD700",letterSpacing:1,marginBottom:6,textTransform:"uppercase"},children:"Why This Matters"}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:4,fontSize:11,color:"#ccc"},children:(function(a,b,c,d=[]){let e=[],f=(a.headline||"").toLowerCase(),g=(a.role||"").toLowerCase(),h=(a.company||"").toLowerCase(),i=b.sectors.map(a=>a.toLowerCase());g.match(/ceo|chief|founder|president|chairman/i)?e.push({icon:"👑",text:`${a.role} — C-suite executive, highest leverage contact`,color:"#FFD700"}):g.match(/vp|vice president|svp|evp|managing director/i)?e.push({icon:"⚡",text:`${a.role} — VP-level, strong decision-making authority`,color:"#FFD700"}):g.match(/director|head of|senior director/i)?e.push({icon:"🎯",text:`${a.role} — Senior leadership, controls team/budget`,color:"#FF6B35"}):g.match(/manager|lead|principal/i)&&e.push({icon:"📊",text:`${a.role} — Mid-senior, operational influence`,color:"#3498DB"});let{now:j,before:k}=(0,br.topCompanies)(a);j&&e.push({icon:"🏢",text:`At ${j.name} (${j.score}/10) — top-tier company network access`,color:"#9B59B6"}),k&&e.push({icon:"📜",text:`Former ${k.name} (${k.score}/10) — carries network from previous role`,color:"#95A5A6"});let l=i.filter(a=>f.includes(a)||h.includes(a));l.length>0&&e.push({icon:"🔗",text:`Shared sector: ${l.join(", ")} — direct industry relevance to you`,color:"#2ECC71"});let m=c.filter(b=>b.source_connection_id===a.id).length;if(m>0){let b=c.filter(b=>b.source_connection_id===a.id&&"S"===b.tier).length;e.push({icon:"🌐",text:`Gateway to ${m} degree-2 connections${b>0?` (${b} S-tier)`:""}`,color:"#FF6B35"})}if(a.is_catalyst&&e.push({icon:"⚡",text:"Catalyst — network power exceeds personal tier, high stepping-stone value",color:"#00ff88"}),2===a.degree&&d.length>0){let a=d.filter(a=>a.bridge);if(1===d.length)e.push(a.length?{icon:"🤝",text:`Reachable via ${a[0].bridge.name} (${a[0].bridge.tier}-tier)`,color:"#3498DB"}:{icon:"🤝",text:"Reachable through a connection we can’t name",color:"#888"});else{let b=a.slice(0,2).map(a=>`${String(a.bridge.name||"").trim().split(/\s+/)[0]} (${a.bridge.tier})`),c=d.length-b.length,f=0===b.length?"connections we can’t name":c>0?`${b.join(", ")} and ${c} more`:b.join(" and ");e.push({icon:"🤝",text:`Reachable ${d.length} ways — via ${f}`,color:"#3498DB"})}}return 0===e.length&&e.push({icon:"📌",text:`${a.tier}-tier connection with ${parseFloat(a.power_score).toFixed(1)} power score`,color:"#888"}),e.slice(0,5)})(a,C||{name:"User",sectors:[],goals:[]},i,q).map((a,c)=>(0,b.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"flex-start"},children:[(0,b.jsx)("span",{style:{color:a.color||"#888",fontSize:13,lineHeight:1},children:a.icon}),(0,b.jsx)("span",{children:a.text})]},c))})]}),a.company&&(0,b.jsxs)("div",{style:{marginBottom:8},children:[(0,b.jsx)("div",{style:{color:"#666",fontSize:10},children:"Company"}),(0,b.jsx)("div",{style:{fontWeight:600,fontSize:12},children:a.company})]}),a.role&&(0,b.jsxs)("div",{style:{marginBottom:12},children:[(0,b.jsx)("div",{style:{color:"#666",fontSize:10},children:"Role"}),(0,b.jsx)("div",{style:{fontSize:12},children:a.role})]}),l&&m.length>0&&(c=m.filter(a=>"S"===a.tier),d=m.filter(a=>"A"===a.tier),g=[...m].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0)).slice(0,8),(0,b.jsxs)("div",{style:{marginBottom:16},children:[(0,b.jsxs)("div",{style:{fontSize:10,fontWeight:700,color:"#FF6B35",letterSpacing:1,marginBottom:8,textTransform:"uppercase"},children:["Cluster Overview — ",m.length," connections"]}),(0,b.jsxs)("div",{style:{display:"flex",gap:6,marginBottom:8,fontSize:10},children:[c.length>0&&(0,b.jsxs)("span",{style:{color:"#FFD700",fontWeight:600},children:[c.length," S-tier"]}),d.length>0&&(0,b.jsxs)("span",{style:{color:"#9B59B6",fontWeight:600},children:[d.length," A-tier"]})]}),(0,b.jsxs)("a",{href:`/queue?bridge=${a.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 ",m.filter(a=>"S"===a.tier||"A"===a.tier||"B"===a.tier).length," People"]}),(0,b.jsx)("div",{style:{fontSize:10,color:"#888",marginBottom:8},children:"Most valuable in this cluster:"}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:g.map(a=>(0,b.jsxs)("div",{onClick:()=>o&&o(a),style:{display:"flex",alignItems:"center",gap:6,padding:"4px 6px",borderRadius:4,cursor:"pointer",borderLeft:`2px solid ${e[a.tier]||"#555"}`,background:"rgba(255,255,255,0.03)"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.08)",onMouseLeave:a=>a.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,J.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,J.localPhoto)(a.profile_image_url),alt:"",style:{width:22,height:22,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none",a.target.nextSibling.style.display="flex"}}):null,(0,b.jsx)("div",{style:{width:22,height:22,borderRadius:"50%",flexShrink:0,fontSize:9,fontWeight:700,background:e[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:(0,J.localPhoto)(a.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:10,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:8,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,40)})]}),(0,b.jsx)("span",{style:{fontSize:9,color:e[a.tier],fontWeight:600,flexShrink:0},children:parseFloat(a.power_score).toFixed(1)})]},a.id))})]})),l&&m.length>0&&(0,b.jsxs)("div",{style:{marginTop:16},children:[(0,b.jsxs)("div",{style:{fontSize:12,fontWeight:600,color:"#FF6B35",marginBottom:8},children:["Gateway to ",m.length," degree-2 connections:"]}),m.sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0)).slice(0,10).map(a=>(0,b.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,b.jsx)("div",{style:{fontWeight:600},children:a.name}),(0,b.jsxs)("div",{style:{color:"#888",fontSize:11},children:[a.role,a.company?` @ ${a.company}`:""]}),(0,b.jsxs)("div",{style:{color:"#FF6B35",fontSize:10},children:["Score: ",parseFloat(a.power_score).toFixed(1)]})]},a.id))]}),!z&&l&&m.length>0&&p&&(0,b.jsxs)("button",{onClick:()=>{p("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 → ",m.length," connections"]}),(2===a.degree||a.source_connection_id)&&1!==a.degree&&"unlocked"!==a.unlock_status&&(j=Q(a),(0,b.jsxs)("div",{style:{background:"rgba(255,215,0,0.06)",border:`1px ${j?"dashed":"solid"} rgba(255,215,0,${j?.45:.25})`,borderRadius:10,padding:16,marginTop:16,textAlign:"center"},children:[(0,b.jsx)("div",{style:{fontSize:10,color:"#FFD700",fontWeight:700,letterSpacing:1,marginBottom:6},children:j?"REQUEST SENT":"LOCKED PATH"}),(0,b.jsx)("div",{style:{fontSize:13,color:"#ccc",marginBottom:12},children:j?`Waiting for ${a.name} to accept. The next scan of your own connections notices when they do.`:`Connect with ${a.name} to unlock their network and extend your six degrees.`}),(0,b.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:j?"[ Cluster Pending... ]":"[ Hidden Network ]"}),j?(0,b.jsx)("button",{onClick:()=>{(0,h.undoRequest)(a).catch(()=>{})},style:{background:"none",border:"none",color:"#888",fontSize:11,fontWeight:600,cursor:"pointer"},children:"Didn't send it? Undo"}):(0,b.jsx)("a",{href:a.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,h.markRequested)(a,{bridgeId:a.source_connection_id}).catch(()=>{})},children:"Connect to Unlock Path"})]})),(1===a.degree||"accepted"===a.outreach_status)&&(A?(0,b.jsx)(bP,{selected:a,degree2:i},a.id):(0,b.jsx)(bQ,{csvSource:u,style:{marginTop:16}})),a.profile_url&&(0,b.jsx)("a",{href:a.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(z){let a,c,g,h;return(0,b.jsxs)(bL,{collapsed:k,onToggle:n,children:[(0,b.jsxs)("button",{onClick:n,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,b.jsx)("span",{style:{fontSize:16},children:"←"})," Close"]}),(0,b.jsx)("h3",{style:{fontSize:16,fontWeight:700,marginTop:0,color:"#FF6B35"},children:"Degrees"}),(0,b.jsx)("p",{style:{fontSize:12,color:"#888",marginBottom:12},children:"Your bridge connections and who they unlock."}),A?(0,b.jsx)(bU,{connections:f,degree2:i,scanNotes:t,tierColors:e}):(0,b.jsx)(bQ,{csvSource:u,style:{marginBottom:16}}),(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,marginBottom:12},children:[(0,b.jsx)(bM,{label:"Degree-2 Found",value:i.length}),(0,b.jsx)(bM,{label:"D2 S-Tier",value:d?.d2Tiers?.S||0}),(0,b.jsx)(bM,{label:"D2 A-Tier",value:d?.d2Tiers?.A||0}),(0,b.jsx)(bM,{label:"Bridges Used",value:Object.keys(F).length})]}),(0,b.jsxs)("div",{style:{position:"relative",marginBottom:16},children:[(0,b.jsx)("input",{type:"text",placeholder:"Search bridges or d2...",value:D,onChange:a=>E(a.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"}}),D.length>=2&&(a=D.toLowerCase(),c=f.filter(b=>i.some(a=>a.source_connection_id===b.id)&&b.name.toLowerCase().includes(a)).slice(0,5),g=i.filter(b=>b.name?.toLowerCase().includes(a)).slice(0,5),0===(h=[...c.map(a=>({...a,_matchType:"bridge"})),...g.map(a=>({...a,_matchType:"d2"}))]).length?null:(0,b.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:h.map(a=>(0,b.jsxs)("div",{onClick:()=>{o(a),E(""),q&&"bridge"===a._matchType&&q(a.id)},style:{padding:"8px 12px",cursor:"pointer",display:"flex",alignItems:"center",gap:8,borderBottom:"1px solid rgba(255,255,255,0.05)"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[(0,J.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,J.localPhoto)(a.profile_image_url),alt:"",style:{width:24,height:24,borderRadius:"50%",objectFit:"cover"}}):(0,b.jsx)("div",{style:{width:24,height:24,borderRadius:"50%",background:e[a.tier]||"#555",fontSize:9,fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:11,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:8,color:"#666"},children:"bridge"===a._matchType?"Bridge":"Degree-2"})]}),(0,b.jsx)("span",{style:{fontSize:9,fontWeight:700,color:e[a.tier]},children:a.tier})]},a.id))}))]}),"pending"===l&&m.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("h4",{style:{fontSize:13,fontWeight:600,color:"#FF6B35",marginBottom:8},children:["⏳ Pending Requests (",m.length,")"]}),(0,b.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,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:2},children:m.map(a=>{let c=2===a.degree?f.find(b=>b.id===a.source_connection_id):null;return(0,b.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,J.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,J.localPhoto)(a.profile_image_url),alt:"",style:{width:32,height:32,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`2px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:32,height:32,borderRadius:"50%",flexShrink:0,fontSize:12,fontWeight:700,background:e[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:11,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:8,color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,40)}),c&&(0,b.jsxs)("div",{style:{fontSize:8,color:"#FF6B35",marginTop:1},children:["via ",c.name?.split(" ")[0]]})]}),(0,b.jsxs)("div",{style:{textAlign:"center",flexShrink:0},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:800,color:e[a.tier]||"#888"},children:a.tier}),(0,b.jsx)("div",{style:{fontSize:8,color:"#666"},children:parseFloat(a.power_score||0).toFixed(1)})]}),(0,b.jsx)("button",{onClick:()=>s&&s(a),title:"Remove from pending",style:{background:"none",border:"none",color:"#555",cursor:"pointer",fontSize:12,padding:2,flexShrink:0},children:"✕"})]},a.id)})})]}),"pending"!==l&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h4",{style:{fontSize:13,fontWeight:600,color:"#FF6B35",marginBottom:8},children:"Most Valuable Clusters"}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:Object.entries(F).map(([a,b])=>{let c=f.find(b=>b.id===a);if(!c)return null;let d=b.length;if(0===d)return null;let e=b.filter(a=>"S"===a.tier),g=b.filter(a=>"A"===a.tier),h=b.filter(a=>"B"===a.tier),i=e.length,j=g.length,k=h.length,l=i>0?e.reduce((a,b)=>a+(parseFloat(b.power_score)||0),0)/i:0,m=j>0?g.reduce((a,b)=>a+(parseFloat(b.power_score)||0),0)/j:0,n=h.filter(a=>(parseFloat(a.power_score)||0)>=5).length,o=(i+j)/d,p=l/7*i*15+m/5.5*j*6+3*n+25*o+2*Math.log2(d+1)+10*!!c.is_catalyst,q=b.reduce((a,b)=>a+(parseFloat(b.power_score)||0),0)/d;return{bridge:c,members:d,sCount:i,aCount:j,bCount:k,risingCount:n,sAvgPower:l,avgPower:q,elitePct:o,clusterValue:p,sTier:e,aTier:g,topMembers:[...b].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0))}}).filter(Boolean).sort((a,b)=>b.clusterValue-a.clusterValue).map((a,c)=>(0,b.jsx)(bT,{cs:a,rank:c+1,tierColors:e,onSelect:o},a.bridge.id))})]})]})}let R=[...f||[]].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0)),S=D.length>=2?R.filter(a=>a.name.toLowerCase().includes(D.toLowerCase())).slice(0,8):[];return(0,b.jsxs)(bL,{collapsed:k,onToggle:n,children:[(0,b.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:12,fontWeight:600},children:[(0,b.jsx)("span",{style:{fontSize:16},children:"←"})," Close"]}),(0,b.jsx)("h3",{style:{fontSize:16,fontWeight:700,marginTop:0},children:"Network Circle"}),d&&(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,marginBottom:16},children:[(0,b.jsx)(bM,{label:"Total Connections",value:d.total}),(0,b.jsx)(bM,{label:"S-Tier",value:d.tiers?.S||0}),(0,b.jsx)(bM,{label:"A-Tier",value:d.tiers?.A||0}),(0,b.jsx)(bM,{label:"B-Tier",value:d.tiers?.B||0})]}),(0,b.jsxs)("div",{style:{position:"relative",marginBottom:12},children:[(0,b.jsx)("input",{type:"text",placeholder:"Search connections...",value:D,onChange:a=>E(a.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"}}),S.length>0&&(0,b.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:S.map(a=>(0,b.jsxs)("div",{onClick:()=>{o&&o(a),q&&q(a.id),E("")},style:{display:"flex",alignItems:"center",gap:8,padding:"8px 10px",cursor:"pointer",borderBottom:"1px solid rgba(255,255,255,0.04)"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.08)",onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[(0,J.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,J.localPhoto)(a.profile_image_url),alt:"",style:{width:24,height:24,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:24,height:24,borderRadius:"50%",flexShrink:0,fontSize:10,fontWeight:700,background:e[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:12,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666"},children:a.headline?.substring(0,35)})]}),(0,b.jsx)("span",{style:{fontSize:10,color:e[a.tier],fontWeight:700},children:a.tier})]},a.id))})]}),(0,b.jsxs)("h4",{style:{fontSize:13,fontWeight:600,color:"#FFD700",marginBottom:8},children:["Power Rankings (",R.length,")"]}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:(x={},y={},R.forEach(a=>{y[a.tier]=(y[a.tier]||0)+1}),R.map((a,c)=>{let d=c>0?R[c-1].tier:null,f=a.tier!==d;f&&(x[a.tier]=0),x[a.tier]=(x[a.tier]||0)+1;let g=x[a.tier];return(0,b.jsxs)("div",{children:[f&&(0,b.jsxs)("div",{style:{padding:"8px 10px",marginTop:8*(c>0),marginBottom:4,background:`${e[a.tier]||"#555"}15`,borderLeft:`3px solid ${e[a.tier]||"#555"}`,borderRadius:4,fontSize:11,fontWeight:700,color:e[a.tier]||"#888",display:"flex",justifyContent:"space-between"},children:[(0,b.jsx)("span",{children:{S:"S-Tier — Elite",A:"A-Tier — High Value",B:"B-Tier — Notable",C:"C-Tier — Standard",D:"D-Tier — Entry"}[a.tier]||a.tier}),(0,b.jsx)("span",{style:{fontWeight:400,opacity:.7},children:y[a.tier]||0})]}),(0,b.jsxs)("div",{onClick:()=>{o&&o(a),q&&q(a.id)},style:{padding:"6px 8px",background:"rgba(255,255,255,0.03)",borderRadius:6,borderLeft:`3px solid ${e[a.tier]||"#555"}`,cursor:"pointer",display:"flex",alignItems:"center",gap:8,transition:"background 0.15s"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.1)",onMouseLeave:a=>a.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,b.jsxs)("span",{style:{color:"#555",fontSize:10,fontWeight:600,minWidth:22,textAlign:"right"},children:["#",g]}),(0,J.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,J.localPhoto)(a.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none",a.target.nextSibling.style.display="flex"}}):null,(0,b.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",flexShrink:0,background:e[a.tier]||"#555",display:(0,J.localPhoto)(a.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center",fontSize:12,fontWeight:700,color:"S"===a.tier?"#000":"#fff"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,b.jsx)("div",{style:{fontWeight:600,fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,45)})]}),(0,b.jsxs)("div",{style:{textAlign:"right",flexShrink:0},children:[(0,b.jsx)("div",{style:{fontSize:10,fontWeight:700,color:e[a.tier]||"#555"},children:parseFloat(a.power_score).toFixed(1)}),(0,b.jsx)("div",{style:{fontSize:8,color:"#555"},children:a.tier})]})]})]},a.id)}))})]})}function bL({children:a,collapsed:d,onToggle:e}){let[f,g]=(0,c.useState)(!1);return((0,c.useEffect)(()=>{let a=()=>g(window.innerWidth<768);return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),d)?(0,b.jsxs)("div",{onClick:e,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:a=>{a.currentTarget.style.width="120px"},onMouseLeave:a=>{a.currentTarget.style.width="36px"},children:[(0,b.jsx)("span",{style:{fontSize:18,flexShrink:0,width:16,textAlign:"center"},children:"‹"}),(0,b.jsx)("span",{style:{fontSize:11,fontWeight:600,whiteSpace:"nowrap",marginRight:6,opacity:.9},children:"Details"})]}):(0,b.jsxs)("div",{style:f?{position:"fixed",top:0,right:0,bottom:0,zIndex:100,width:"100vw",pointerEvents:"auto"}:{flexShrink:0,height:"100%"},children:[f&&(0,b.jsx)("div",{onClick:e,style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.5)"}}),(0,b.jsx)("div",{style:{width:f?"80vw":320,minWidth:320*!f,maxWidth:f?300:320,height:"100%",borderLeft:"1px solid rgba(255,215,0,0.12)",padding:f?"12px 10px":"16px 16px",overflowY:"auto",overflowX:"hidden",background:f?"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:f?"auto":0},children:a})]})}function bM({label:a,value:c}){return(0,b.jsxs)("div",{style:{background:"rgba(255,255,255,0.05)",padding:"10px 12px",borderRadius:8},children:[(0,b.jsx)("div",{style:{fontSize:10,color:"#888",marginBottom:2},children:a}),(0,b.jsx)("div",{style:{fontSize:18,fontWeight:700},children:c})]})}function bN(){return(0,b.jsx)("span",{style:{color:"#555",fontSize:16},children:"→"})}function bO({routes:a,selected:d,tierColors:e,onSelect:f}){let[g,h]=(0,c.useState)(!1),i=a.length,j=g?a:a.slice(0,4),k={display:"flex",alignItems:"center",gap:6,fontSize:13,flexWrap:"wrap"};return(0,b.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,b.jsxs)("div",{style:{fontSize:10,color:"#FF6B35",fontWeight:600,marginBottom:8},children:["PATH TO THIS PERSON",i>1?` \xb7 ${i} WAYS IN`:""]}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:j.map((a,c)=>{if(!a.bridge)return(0,b.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:{...k,color:"#888",fontStyle:"italic"},children:[(0,b.jsx)("span",{style:{fontWeight:700,fontStyle:"normal",color:"#fff"},children:"You"}),(0,b.jsx)(bN,{}),(0,b.jsx)("span",{children:"a connection we can’t name"}),(0,b.jsx)(bN,{}),(0,b.jsx)("span",{children:"them"})]},`unnamed-${a.id}`);let g=a.bridge,h=e[g.tier]||"#ccc",j=[[g.role,g.company].filter(Boolean).join(" @ "),g.tier?`${g.tier}-tier`:""].filter(Boolean).join(" · ");return(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:k,children:[(0,b.jsx)("span",{style:{fontWeight:700},children:"You"}),(0,b.jsx)(bN,{}),(0,b.jsxs)("button",{onClick:()=>f&&f(g),title:`Open ${g.name}`,style:{display:"inline-flex",alignItems:"center",gap:6,padding:0,border:"none",background:"none",cursor:"pointer",color:h,fontWeight:600,fontSize:13,textAlign:"left"},children:[(0,b.jsx)(a6,{person:g,size:18,tierColors:e}),g.name]}),(0,b.jsx)(bN,{}),(0,b.jsx)("span",{style:{color:"#FF6B35",fontWeight:600},children:d.name}),0===c&&i>1&&(0,b.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"})]}),j&&(0,b.jsx)("div",{style:{fontSize:11,color:"#888",marginTop:3},children:j})]},a.id)})}),i>4&&(0,b.jsx)("button",{onClick:()=>h(a=>!a),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:g?"Show fewer":`Show all ${i}`})]})}function bP({selected:a,degree2:d}){let g=(0,f.default)(),[h,i]=(0,c.useState)(!1),[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)(void 0),n=d?.filter(b=>b.source_connection_id===a.id).length||0,o=n>0,p=g.running&&(0,e.scansCircleOf)(g,a),q=g.running&&!p?(0,e.busyReason)(g):null,r=g.finished.find(b=>(0,e.scansCircleOf)(b,a)),s=g.finished[0]?.startedAt??null;async function t(b){k(null),i(!0);let c=(0,e.notReadyMessage)(await (0,e.scraperStatus)().catch(()=>null));if(i(!1),c)return void k({text:c,offline:!0});try{await (0,e.beginScrape)(b,"resume"===b?{id:a.id}:{name:a.name,id:a.id})}catch(a){k({text:a.message||"Could not start the scan."})}}(0,c.useEffect)(()=>{let b=!0;return(0,e.resumePoint)(a.id).then(a=>{b&&m(a)},()=>{b&&m(null)}),()=>{b=!1}},[a.id,s]);let u=o||!!l,v=o?"#00ff88":"#9B59B6",w=!!q||h,x=a=>({flex:1,padding:"11px 8px",borderRadius:8,fontWeight:700,fontSize:a?13:12,cursor:w?"not-allowed":"pointer",opacity:w?.45:1,...a?{border:"none",background:"linear-gradient(135deg, #9B59B6, #3498DB)",color:"#fff"}:{border:`1px solid ${v}55`,background:`${v}14`,color:v}});return(0,b.jsxs)("div",{id:"scan-box",style:{background:o?"rgba(0,255,136,0.06)":"rgba(155,89,182,0.08)",border:`1px solid ${o?"rgba(0,255,136,0.2)":"rgba(155,89,182,0.3)"}`,borderRadius:10,padding:16,marginTop:16},children:[(0,b.jsx)("div",{style:{fontSize:10,color:v,fontWeight:700,letterSpacing:1,marginBottom:4,textAlign:"center"},children:o?"CLUSTER ACTIVE":"CREATE CLUSTER"}),(0,b.jsx)("div",{style:{fontSize:12,color:"#aaa",marginBottom:12,textAlign:"center"},children:o?`${n} connections mapped in Six Degrees`:(0,b.jsxs)(b.Fragment,{children:["Scan ",a.name,"'s connections to map their network"]})}),p?(0,b.jsx)(bR,{title:g.pending?"Starting…":`Scanning ${a.name}’s circle…`,log:g.log}):j?.offline?(0,b.jsxs)(b.Fragment,{children:[(0,b.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,b.jsxs)("div",{style:{fontSize:10,color:"#888",textAlign:"center",marginBottom:8},children:[j.text," Open the ",(0,b.jsx)("strong",{children:"Scan"})," page to finish setting the scanner up."]}),(0,b.jsx)("button",{onClick:()=>k(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,b.jsxs)(b.Fragment,{children:[r&&(0,b.jsx)(bS,{job:r}),(0,b.jsxs)("div",{style:{display:"flex",gap:8},children:[l&&(0,b.jsxs)("button",{onClick:()=>t("resume"),disabled:w,style:x(!0),children:["Resume from page ",l.nextPage]}),(0,b.jsx)("button",{onClick:()=>t("bridge"),disabled:w,style:x(!l&&!o),children:u?"Rescan from the start":(0,b.jsxs)(b.Fragment,{children:["Scan ",a.name,"'s Network"]})})]}),l&&(0,b.jsxs)("div",{style:{fontSize:10,color:"#888",marginTop:8,lineHeight:1.45,textAlign:"center"},children:["Read to page ",l.pagesRead," so far. Resume carries on from page ",l.nextPage,". LinkedIn lists their connections in its own order, not by date, so Rescan reads them all again from page 1."]}),o&&null===l&&(0,b.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."}),q&&(0,b.jsxs)("div",{style:{fontSize:10,color:"#bbb",marginTop:8,textAlign:"center"},children:[q,". One scan at a time: this one can start when it finishes."]}),j&&(0,b.jsx)("div",{style:{fontSize:11,color:"#ff8080",marginTop:8,textAlign:"center"},children:j.text})]})]})}function bQ({csvSource:a,style:c}){return(0,b.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)",...c},children:"sample"===a?"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 bR({title:a,log:c,small:d=!1}){return(0,b.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,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:4},children:[(0,b.jsx)("div",{style:{width:d?6:8,height:d?6:8,borderRadius:"50%",background:"#9B59B6",animation:"pulse 1s infinite"}}),(0,b.jsx)("span",{style:{fontSize:11,fontWeight:600,color:"#9B59B6"},children:a})]}),(0,b.jsx)("div",{style:{fontFamily:"monospace",fontSize:d?9:10,color:"#888",maxHeight:d?80:100,overflow:"auto"},children:c.slice(-40).map((a,c)=>(0,b.jsx)("div",{children:a},c))})]})}function bS({job:a,who:c=null}){let d=0===a.exitCode,e=!d&&Array.isArray(a.failure)&&a.failure.length?a.failure[a.failure.length-1]:null;return(0,b.jsx)("div",{style:{padding:"8px 10px",borderRadius:8,marginBottom:10,fontSize:11,textAlign:"center",lineHeight:1.4,background:d?"rgba(0,255,136,0.08)":"rgba(255,80,80,0.08)",border:`1px solid ${d?"rgba(0,255,136,0.25)":"rgba(255,80,80,0.25)"}`,color:d?"#00ff88":"#ff8080"},children:d?`${c?`${c}’s circle`:"The scan"} finished. What it found is on the map.`:`${c?`${c}’s scan`:"The scan"} stopped before the end${e?`: ${e}`:"."}`})}function bT({cs:a,rank:d,tierColors:e,onSelect:f}){let[g,h]=(0,c.useState)(!1);return(0,b.jsxs)("div",{style:{background:"rgba(255,255,255,0.05)",borderRadius:6,borderLeft:`3px solid ${e[a.bridge.tier]||"#FF6B35"}`,overflow:"hidden"},children:[(0,b.jsxs)("div",{style:{padding:"10px 10px"},children:[(0,b.jsxs)("div",{onClick:()=>f&&f(a.bridge),style:{cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,J.localPhoto)(a.bridge.profile_image_url)?(0,b.jsx)("img",{src:(0,J.localPhoto)(a.bridge.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${e[a.bridge.tier]||"#555"}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",flexShrink:0,fontSize:11,fontWeight:700,background:e[a.bridge.tier]||"#555",color:"S"===a.bridge.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:a.bridge.name?.charAt(0)}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{fontWeight:600,fontSize:12},children:[(0,b.jsxs)("span",{style:{color:"#555",marginRight:4},children:["#",d]}),a.bridge.name]}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666"},children:a.bridge.headline?.substring(0,40)})]})]}),(0,b.jsx)("span",{style:{fontSize:10,fontWeight:700,padding:"2px 6px",borderRadius:4,background:e[a.bridge.tier],color:"S"===a.bridge.tier?"#000":"#fff"},children:a.bridge.tier})]}),(0,b.jsxs)("div",{style:{display:"flex",gap:6,marginTop:6,fontSize:10},children:[a.sCount>0&&(0,b.jsxs)("span",{style:{color:"#FFD700",fontWeight:600},children:[a.sCount,"S",a.sAvgPower>0?` (${a.sAvgPower.toFixed(1)})`:""]}),a.aCount>0&&(0,b.jsxs)("span",{style:{color:"#9B59B6",fontWeight:600},children:[a.aCount,"A"]}),a.bCount>0&&(0,b.jsxs)("span",{style:{color:"#3498DB"},children:[a.bCount,"B"]}),a.risingCount>0&&(0,b.jsxs)("span",{style:{color:"#2ECC71"},children:[a.risingCount," rising"]}),(0,b.jsxs)("span",{style:{color:"#555"},children:[a.members," total"]})]}),(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:4,fontSize:10},children:[(0,b.jsxs)("span",{style:{color:"#666"},children:["Elite: ",(100*a.elitePct).toFixed(0),"% · Avg: ",a.avgPower.toFixed(1)]}),(0,b.jsx)("span",{style:{color:"#FF6B35",fontWeight:700},children:a.clusterValue.toFixed(1)})]}),(a.sTier.length>0||a.aTier.length>0)&&(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,marginTop:8},children:[[...a.sTier,...a.aTier].slice(0,4).map(a=>(0,J.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,J.localPhoto)(a.profile_image_url),alt:a.name,style:{width:22,height:22,borderRadius:"50%",objectFit:"cover",border:`1.5px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none"},title:a.name},a.id):(0,b.jsx)("div",{style:{width:22,height:22,borderRadius:"50%",fontSize:9,fontWeight:700,background:e[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},title:a.name,children:a.name?.charAt(0)},a.id)),a.sCount+a.aCount>4&&(0,b.jsxs)("span",{style:{fontSize:9,color:"#666"},children:["+",a.sCount+a.aCount-4," more"]})]}),(0,b.jsxs)("button",{onClick:()=>h(!g),style:{marginTop:6,background:"none",border:"none",color:"#888",fontSize:10,cursor:"pointer",padding:0,display:"flex",alignItems:"center",gap:4},children:[(0,b.jsx)("span",{style:{fontSize:12},children:g?"▾":"▸"}),g?"Hide members":`View all ${a.members} members`]})]}),g&&(0,b.jsx)("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)",padding:"6px 10px 10px",maxHeight:250,overflowY:"auto"},children:a.topMembers.map(a=>(0,b.jsxs)("div",{onClick:()=>f&&f(a),style:{display:"flex",alignItems:"center",gap:6,padding:"4px 2px",cursor:"pointer",borderRadius:4},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[(0,J.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,J.localPhoto)(a.profile_image_url),alt:"",style:{width:20,height:20,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none",a.target.nextSibling.style.display="flex"}}):null,(0,b.jsx)("div",{style:{width:20,height:20,borderRadius:"50%",flexShrink:0,fontSize:8,fontWeight:700,background:e[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:(0,J.localPhoto)(a.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsx)("div",{style:{minWidth:0,flex:1},children:(0,b.jsx)("div",{style:{fontSize:10,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name})}),(0,b.jsxs)("span",{style:{fontSize:9,color:e[a.tier]||"#555",fontWeight:600,flexShrink:0},children:[a.tier," ",parseFloat(a.power_score).toFixed(1)]})]},a.id))})]})}function bU({connections:a,degree2:d,scanNotes:g,tierColors:h}){let i=(0,f.default)(),[j,k]=(0,c.useState)(!1),l=(0,c.useMemo)(()=>(0,L.reachIndex)(a,d,g),[a,d,g]),m=(0,c.useMemo)(()=>(0,L.readyToScan)(a,l),[a,l]),n=(0,c.useMemo)(()=>a.filter(a=>"hidden"===(0,L.reachState)(a,l)),[a,l]),o=(0,c.useMemo)(()=>a.filter(a=>null===(0,L.reachState)(a,l)&&"todo"===(0,L.circleState)(a,l)).length,[a,l]),p=(0,c.useMemo)(()=>new Map(a.map(a=>[a.id,a])),[a]),q=(0,L.circleScanCost)(),r=i.running&&(0,e.isCircleScan)(i),s=i.running&&!r?(0,e.busyReason)(i):null,t=i.finished.find(e.isCircleScan),u=j?m:m.slice(0,5);return(0,b.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,b.jsxs)("div",{style:{fontSize:12,fontWeight:800,color:"#00ff88",marginBottom:4},children:["Ready to scan (",m.length,")"]}),(0,b.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."}),r?(0,b.jsx)("div",{style:{marginBottom:10},children:(0,b.jsx)(bR,{small:!0,title:i.pending?"Starting…":`Scanning ${i.target?.name||"a circle"}…`,log:i.log})}):t&&(0,b.jsx)(bS,{job:t,who:t.target?.name}),0===m.length?(0,b.jsxs)("div",{style:{fontSize:11,color:"#aaa",lineHeight:1.5},children:["Nobody yet. When someone you asked from a circle accepts, ↻ ",(0,b.jsx)("b",{children:"Check for new"})," brings them into your connections, and they show here."]}):(0,b.jsxs)("div",{role:"list",style:{display:"flex",flexDirection:"column",gap:6},children:[u.map(a=>{let c=r&&(0,e.scansCircleOf)(i,a),d=p.get(a.unlocked_from_bridge_id)?.name||a.unlocked_from_name;return(0,b.jsxs)(af.default,{role:"listitem",href:`/setup?scan=${encodeURIComponent(a.id)}`,"aria-label":`Scan ${a.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,b.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",flexShrink:0,background:h[a.tier]||"#888",boxShadow:"0 0 0 2px rgba(0,255,136,0.45)"}}),(0,b.jsxs)("span",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("span",{style:{fontSize:12,fontWeight:700},children:a.name}),(0,b.jsx)("span",{style:{fontSize:10,color:h[a.tier]||"#888",fontWeight:700,marginLeft:6},children:a.tier}),d&&(0,b.jsxs)("span",{style:{display:"block",fontSize:10,color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["was in ",String(d||"").trim().split(/\s+/)[0],"'s circle"]})]}),(0,b.jsx)("span",{style:{fontSize:10.5,fontWeight:700,color:"#00ff88",whiteSpace:"nowrap"},children:c?"Scanning…":"Scan… →"})]},a.id)}),m.length>5&&(0,b.jsx)("button",{type:"button",onClick:()=>k(a=>!a),style:{background:"none",border:"none",color:"#888",fontSize:10.5,fontWeight:600,cursor:"pointer",padding:"2px 0",textAlign:"left"},children:j?"Show fewer":`Show all ${m.length}`})]}),m.length>0&&(0,b.jsxs)("div",{style:{fontSize:10,color:"#888",lineHeight:1.5,marginTop:8},children:["Each scan: ",q.profileViews," profile view, then one LinkedIn search for every page of their list, up to ",q.searches," pages (about ",q.minutes," min for a whole list). Nothing starts until you confirm it on the Scan page."]}),n.length>0&&(0,b.jsxs)("div",{style:{marginTop:10,fontSize:10.5,color:"#777",lineHeight:1.6},children:[n.slice(0,3).map(a=>(0,b.jsxs)("div",{style:{opacity:.7},children:[(0,b.jsx)("span",{"aria-hidden":"true",children:"🔒"})," ",a.name," ",(0,b.jsx)("span",{style:{color:"#666"},children:"· their list is hidden"})]},a.id)),n.length>3&&(0,b.jsxs)("div",{style:{opacity:.7},children:["🔒 and ",n.length-3," more with hidden lists"]})]}),o>0&&(0,b.jsxs)("div",{style:{fontSize:10.5,color:"#888",lineHeight:1.5,marginTop:10},children:[o.toLocaleString("en-US")," of your other connections aren't scanned yet."," ",(0,b.jsx)(af.default,{href:"/setup",style:{color:"#3498DB",textDecoration:"none"},children:"Map them in batches on the Scan page →"})]}),s&&(0,b.jsxs)("div",{style:{fontSize:10,color:"#bbb",marginTop:8},children:[s,". One scan at a time."]})]})}var bV=a.i(63033);let bW=[],bX=[{key:"gravity",label:"Gravity",min:0,max:3,step:.01,fmt:a=>a.toFixed(2),hint:"Pulls every dot in towards you."},{key:"rings",label:"Rings",min:0,max:5,step:.05,fmt:a=>`${a.toFixed(2)}\xd7`,hint:"How hard each tier holds its ring. At 0 the Galaxy finds its own shape."},{key:"push",label:"Push",min:0,max:300,step:1,fmt:a=>String(a),hint:"How hard dots push each other apart."},{key:"pull",label:"Pull",min:0,max:15,step:.05,fmt:a=>`${a.toFixed(2)}\xd7`,hint:"How hard each person pulls the people who came through them."},{key:"distance",label:"Distance",min:.05,max:6,step:.05,fmt:a=>`${a.toFixed(2)}\xd7`,hint:"How far out those people sit."}],bY=[{key:"dotSize",label:"Dot size",min:.2,max:8,step:.05,fmt:a=>`${a.toFixed(2)}\xd7`},{key:"lines",label:"Lines",min:0,max:20,step:.1,fmt:a=>`${a.toFixed(1)}\xd7`}],bZ={fontSize:9,fontWeight:700,color:"#555",letterSpacing:1,margin:"12px 0 6px",textTransform:"uppercase"},b$={fontSize:10,color:"#667",lineHeight:1.4};function b_({spec:a,value:c}){return(0,b.jsxs)("label",{title:a.hint,style:{display:"block",marginBottom:7},children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:11,color:"#aab"},children:[(0,b.jsx)("span",{children:a.label}),(0,b.jsx)("span",{style:{color:c===P.LAB_DEFAULTS[a.key]?"#556":"#cfe6f7",fontVariantNumeric:"tabular-nums"},children:a.fmt(c)})]}),(0,b.jsx)("input",{type:"range",min:a.min,max:a.max,step:a.step,value:c,onChange:b=>(0,P.setLab)({[a.key]:Number(b.target.value)}),style:{width:"100%",accentColor:"#3498DB"}})]})}function b0({options:a,value:c,onPick:d}){return(0,b.jsx)("div",{style:{display:"flex",gap:4,marginBottom:8},children:a.map(([a,e])=>(0,b.jsx)("button",{onClick:()=>d(a),"aria-pressed":c===a,style:{flex:1,padding:"5px 4px",borderRadius:6,fontSize:10.5,fontWeight:600,cursor:"pointer",border:c===a?"1px solid rgba(52,152,219,0.6)":"1px solid rgba(255,255,255,0.08)",background:c===a?"rgba(52,152,219,0.18)":"rgba(255,255,255,0.03)",color:c===a?"#cfe6f7":"#888"},children:e},a))})}function b1(){let a=(0,c.useSyncExternalStore)(P.watchLab,P.labNow,()=>P.LAB_DEFAULTS);return(0,b.jsxs)("div",{style:{marginBottom:18},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#555",letterSpacing:1,marginBottom:8,textTransform:"uppercase"},children:"Names"}),(0,b.jsx)(b0,{value:a.labels,options:[[!0,"On"],[!1,"Off"]],onPick:a=>(0,P.setLab)({labels:a})})]})}let b2=a=>new Date(a).toLocaleDateString(void 0,{month:"short",year:"numeric"});function b3(){let a=(0,c.useSyncExternalStore)(P.watchLab,P.labNow,()=>P.LAB_DEFAULTS),d=(0,c.useSyncExternalStore)(P.watchClock,P.clockNow,P.clockNow),e=(0,c.useSyncExternalStore)(P.watchLayouts,P.layoutsNow,()=>bW),[f,g]=(0,c.useState)(""),[h,i]=(0,c.useState)(null),[j,k]=(0,c.useState)(null),l=(0,c.useSyncExternalStore)(()=>()=>{},X,()=>!1),m=null!=d.min&&d.max>d.min?(0,P.milestones)(d.social).filter(a=>a.t>=d.min&&a.t<=d.max):[],n=async(a,b)=>{i(a),k(null);let c="video"===a?(0,bV.showActivity)({id:"replay-video",label:"Recording the replay",detail:"The video saves when it ends"}):()=>{};try{await b()}catch(a){k(a.message||"That didn’t work.")}finally{i(null),c()}},o=null!=d.min&&null!=d.max&&d.max>d.min,p=bX.every(b=>a[b.key]===P.LAB_DEFAULTS[b.key])?"rings":Object.entries(P.CLUSTERS).every(([b,c])=>a[b]===c)?"clusters":null;return(0,b.jsxs)("div",{style:{marginBottom:18,padding:"10px 10px 8px",borderRadius:8,border:"1px solid rgba(212,175,55,0.25)",background:"rgba(212,175,55,0.04)"},children:[(0,b.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:8,cursor:"pointer"},children:[(0,b.jsx)("input",{type:"checkbox",checked:a.on,onChange:a=>{a.target.checked||((0,P.stopReplay)(),(0,P.setClock)({find:""})),(0,P.setLab)({on:a.target.checked})},style:{accentColor:"#D4AF37"}}),(0,b.jsx)("span",{style:{fontSize:11.5,fontWeight:700,color:"#e6d7a0"},children:"Physics lab"}),(0,b.jsx)("span",{style:{fontSize:9,fontWeight:700,color:"#D4AF37",border:"1px solid rgba(212,175,55,0.4)",borderRadius:4,padding:"0 4px"},children:"EXPERIMENTAL"})]}),!a.on&&(0,b.jsx)("div",{style:{...b$,marginTop:6},children:"Sliders for the forces that lay the Galaxy out, colours by company or warmth, find, a branch that lights up on hover, and a replay of your network growing that you can save as a video."}),a.on&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:bZ,children:"Find"}),(0,b.jsx)("input",{type:"search",value:d.find,placeholder:"A name, company or role",onChange:a=>(0,P.setClock)({find:a.target.value}),onKeyDown:a=>{"Enter"===a.key&&(0,P.setClock)({fly:d.fly+1})},style:{width:"100%",boxSizing:"border-box",padding:"6px 9px",borderRadius:6,fontSize:11.5,border:"1px solid rgba(255,255,255,0.12)",background:"rgba(0,0,0,0.25)",color:"#dde"}}),d.find.trim().length>=2&&(0,b.jsx)("div",{style:{...b$,marginTop:4},children:d.found?`${d.found.toLocaleString()} found \xb7 Enter flies to the best one`:"No one on screen matches."}),(0,b.jsx)("div",{style:bZ,children:"Layout"}),(0,b.jsx)(b0,{value:p,options:[["rings","Rings"],["clusters","Clusters"]],onPick:a=>(0,P.setLab)("rings"===a?{...Object.fromEntries(bX.map(a=>[a.key,P.LAB_DEFAULTS[a.key]])),sizeBy:"power"}:P.CLUSTERS)}),(0,b.jsx)("div",{style:{...b$,marginBottom:6},children:"clusters"===p?"No rings: each connection pulls their circle round them, and a dot grows with everyone behind it.":"Drag a dot to see what it pulls with it. Try Rings at 0 and Pull up."}),(0,b.jsx)("div",{style:bZ,children:"Forces"}),bX.map(c=>(0,b.jsx)(b_,{spec:c,value:a[c.key]},c.key)),(0,b.jsx)("div",{style:bZ,children:"Display"}),bY.map(c=>(0,b.jsx)(b_,{spec:c,value:a[c.key]},c.key)),(0,b.jsx)("div",{style:{fontSize:11,color:"#aab",marginBottom:4},children:"Size dots by"}),(0,b.jsx)(b0,{value:a.sizeBy,options:[["power","Power score"],["reach","Who hangs off them"]],onPick:a=>(0,P.setLab)({sizeBy:a})}),(0,b.jsx)("div",{style:{fontSize:11,color:"#aab",marginBottom:4},children:"Colour by"}),(0,b.jsx)(b0,{value:a.colourBy,options:[["tier","Tier"],["degree","Degree"],["company","Company"],["warmth","Warmth"]],onPick:a=>(0,P.setLab)({colourBy:a})}),"warmth"===a.colourBy&&null===d.social&&(0,b.jsx)("div",{style:{...b$,marginTop:-4,marginBottom:8},children:"Warmth comes from the Social tab: import your LinkedIn export there first. Until then it’s by tier."}),(0,b.jsxs)("div",{style:{fontSize:11,color:"#aab",marginBottom:4},children:["Which names",a.labels?"":" (Names is off)"]}),(0,b.jsx)(b0,{value:"all"===a.names?"all":"key",options:[["key","S + catalysts"],["all","All 1st"]],onPick:a=>(0,P.setLab)({names:a})}),(0,b.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:11,color:"#aab",cursor:"pointer"},children:[(0,b.jsx)("input",{type:"checkbox",checked:a.branch,onChange:a=>(0,P.setLab)({branch:a.target.checked}),style:{accentColor:"#3498DB"}}),"Light up a branch on hover"]}),(0,b.jsx)("div",{style:bZ,children:"Replay"}),o?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"center",marginBottom:6},children:[(0,b.jsx)("button",{onClick:()=>d.playing?(0,P.pause)():(0,P.play)(),style:{padding:"5px 12px",borderRadius:6,fontSize:11,fontWeight:700,cursor:"pointer",border:"1px solid rgba(52,152,219,0.6)",background:"rgba(52,152,219,0.18)",color:"#cfe6f7"},children:d.playing?"❚❚ Pause":"▶ Replay"}),null!=d.at&&(0,b.jsx)("button",{onClick:P.stopReplay,style:{padding:"5px 10px",borderRadius:6,fontSize:11,cursor:"pointer",border:"1px solid rgba(255,255,255,0.1)",background:"rgba(255,255,255,0.04)",color:"#aaa"},children:"Show all"}),(0,b.jsx)("span",{style:{marginLeft:"auto",fontSize:10.5,color:"#aab",fontVariantNumeric:"tabular-nums"},children:b2(d.at??d.max)})]}),(0,b.jsxs)("div",{style:{position:"relative"},children:[(0,b.jsx)("input",{type:"range",min:d.min,max:d.max,step:864e5,value:d.at??d.max,onChange:a=>{(0,P.pause)(),(0,P.setClock)({at:Number(a.target.value)})},style:{width:"100%",accentColor:"#3498DB"},"aria-label":"Time"}),(0,b.jsx)("div",{style:{position:"absolute",left:7,right:7,top:-3,height:6,pointerEvents:"none"},children:m.map(a=>(0,b.jsx)("span",{title:`${a.label} \xb7 ${b2(a.t)}`,style:{position:"absolute",left:`${(a.t-d.min)/(d.max-d.min)*100}%`,width:"job"===a.kind?3:2,height:"job"===a.kind?8:5,borderRadius:1,transform:"translateX(-50%)",background:"job"===a.kind?"#D4AF37":"#74B9FF",opacity:"job"===a.kind?.95:.7}},`${a.kind}-${a.t}`))})]}),(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",...b$},children:[(0,b.jsx)("span",{children:b2(d.min)}),(0,b.jsx)("span",{children:b2(d.max)})]}),(0,b.jsx)("div",{style:{fontSize:11,color:"#aab",margin:"8px 0 4px"},children:"Length"}),(0,b.jsx)(b0,{value:a.speed,options:[[5,"5 s"],[15,"15 s"],[30,"30 s"],[60,"1 min"]],onPick:a=>(0,P.setLab)({speed:a})}),(0,b.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:11,color:"#aab",cursor:"pointer"},children:[(0,b.jsx)("input",{type:"checkbox",checked:a.loop,onChange:a=>(0,P.setLab)({loop:a.target.checked}),style:{accentColor:"#3498DB"}}),"Loop"]}),(0,b.jsxs)("div",{style:{...b$,marginTop:4},children:["Your connections appear on the day you connected; their circles come with them.",m.length>0?" Gold marks are your job starts and blue ones your posts, from the Social tab.":""]}),l&&(0,b.jsx)("button",{disabled:!!h,onClick:()=>n("video",Y),style:{marginTop:8,width:"100%",padding:"6px 10px",borderRadius:6,fontSize:11,fontWeight:600,cursor:h?"default":"pointer",border:"1px solid rgba(231,76,60,0.5)",background:"rgba(231,76,60,0.12)",color:"#f5b7b1"},children:"video"===h?"● Recording…":"● Record the replay as a video"})]}):(0,b.jsx)("div",{style:b$,children:"Nothing to replay: the connections on screen have no “connected on” dates. A LinkedIn CSV or a network scan has them; the sample network doesn’t."}),(0,b.jsx)("div",{style:bZ,children:"Saved layouts"}),e.length>0&&(0,b.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginBottom:6},children:e.map(a=>(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",borderRadius:12,border:"1px solid rgba(52,152,219,0.4)",background:"rgba(52,152,219,0.1)"},children:[(0,b.jsx)("button",{onClick:()=>(0,P.applyLayout)(a.name),style:{padding:"3px 4px 3px 9px",border:"none",background:"none",color:"#cfe6f7",fontSize:10.5,cursor:"pointer"},children:a.name}),(0,b.jsx)("button",{onClick:()=>(0,P.forgetLayout)(a.name),"aria-label":`Forget ${a.name}`,title:"Forget this layout",style:{padding:"3px 8px 3px 3px",border:"none",background:"none",color:"#667",fontSize:11,cursor:"pointer"},children:"×"})]},a.name))}),(0,b.jsxs)("form",{onSubmit:a=>{a.preventDefault(),(0,P.saveLayout)(f),g("")},style:{display:"flex",gap:4},children:[(0,b.jsx)("input",{value:f,onChange:a=>g(a.target.value),placeholder:"Name this layout",maxLength:40,style:{flex:1,minWidth:0,padding:"5px 8px",borderRadius:6,fontSize:11,border:"1px solid rgba(255,255,255,0.12)",background:"rgba(0,0,0,0.25)",color:"#dde"}}),(0,b.jsx)("button",{type:"submit",disabled:!f.trim(),style:{padding:"5px 10px",borderRadius:6,fontSize:11,fontWeight:600,cursor:f.trim()?"pointer":"default",border:"1px solid rgba(52,152,219,0.6)",background:"rgba(52,152,219,0.18)",color:f.trim()?"#cfe6f7":"#667"},children:"Save"})]}),(0,b.jsx)("div",{style:bZ,children:"Share"}),(0,b.jsx)("button",{disabled:!!h,onClick:()=>n("picture",W),style:{width:"100%",padding:"6px 10px",borderRadius:6,fontSize:11,fontWeight:600,cursor:h?"default":"pointer",border:"1px solid rgba(52,152,219,0.6)",background:"rgba(52,152,219,0.18)",color:"#cfe6f7"},children:"picture"===h?"Saving…":"Save a picture of the Galaxy"}),(0,b.jsx)("div",{style:{...b$,marginTop:4},children:"A PNG of what’s on screen, at twice the size. It shows real names, so check it before you post it."}),j&&(0,b.jsx)("div",{style:{...b$,color:"#e67e73",marginTop:4},children:j}),(0,b.jsx)("button",{onClick:()=>{(0,P.stopReplay)(),(0,P.setClock)({find:""}),(0,P.setLab)(null)},style:{marginTop:10,width:"100%",padding:"6px 10px",borderRadius:6,fontSize:11,cursor:"pointer",border:"1px solid rgba(255,255,255,0.1)",background:"rgba(255,255,255,0.04)",color:"#aaa"},children:"Reset to today’s layout"})]})]})}let b4={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"};function b5({collapsed:a,onToggle:d,mode:e,filter:f,onFilterChange:g,visualMode:h,onVisualModeChange:i,tierCounts:j,bridgeTierCounts:k,degrees:l=[1],onDegreesChange:m,degreeCounts:n={},hiddenTiers:o=[],onHiddenTiersChange:p}){let q=function(){let[a,b]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{let a=()=>b(window.innerWidth<768);return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),a}(),r="degrees"===e,s=!r&&!!p,t=bn(r?"degrees":"network"),u=r?k||{}:j||{},v=r?Object.values(k||{}).reduce((a,b)=>a+b,0):Object.values(j||{}).reduce((a,b)=>a+b,0);return a?(0,b.jsxs)("div",{onClick:d,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:a=>{a.currentTarget.style.width="120px"},onMouseLeave:a=>{a.currentTarget.style.width="36px"},children:[(0,b.jsx)("span",{style:{fontSize:18,flexShrink:0,width:16,textAlign:"center"},children:"›"}),(0,b.jsx)("span",{style:{fontSize:11,fontWeight:600,whiteSpace:"nowrap",marginLeft:6,opacity:.9},children:"Filters"})]}):(0,b.jsxs)("div",{style:q?{position:"fixed",top:0,left:0,bottom:0,zIndex:100,width:"100vw",pointerEvents:"auto"}:{flexShrink:0,height:"100%"},children:[q&&(0,b.jsx)("div",{onClick:d,style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.5)"}}),(0,b.jsxs)("div",{style:{width:q?"80vw":320,minWidth:320*!q,maxWidth:q?300:320,height:"100%",borderRight:"1px solid rgba(52,152,219,0.15)",padding:q?"12px 10px":"16px 14px",overflowY:"auto",overflowX:"hidden",background:q?"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,b.jsxs)("button",{onClick:d,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,b.jsx)("span",{style:{fontSize:16},children:"›"})," Close"]}),(0,b.jsxs)("div",{style:{marginBottom:18},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#555",letterSpacing:1,marginBottom:8,textTransform:"uppercase"},children:"Visual"}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:t.map(a=>(0,b.jsxs)("button",{onClick:()=>i&&i(a.key),style:{display:"flex",alignItems:"center",gap:8,padding:"7px 10px",borderRadius:6,border:"none",cursor:"pointer",width:"100%",textAlign:"left",background:h===a.key?"rgba(52,152,219,0.15)":"rgba(255,255,255,0.03)",color:h===a.key?"#3498DB":"#888",transition:"all 0.15s"},children:[(0,b.jsx)("span",{style:{fontSize:14,width:20,textAlign:"center"},children:a.icon}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:{fontSize:11,fontWeight:600},children:a.label}),(0,b.jsx)("div",{style:{fontSize:8,color:"#555",marginTop:1},children:a.desc})]})]},a.key))})]}),!r&&m&&(0,b.jsxs)("div",{style:{marginBottom:18},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#555",letterSpacing:1,marginBottom:8,textTransform:"uppercase"},children:"Degree"}),(0,b.jsx)("div",{style:{display:"flex",gap:6},children:[[1,"1st","Your connections"],[2,"2nd","In a scanned circle"],[3,"3rd","Found by a company scan"]].map(([a,c,d])=>{let e=l.includes(a),f=n[a]||0,g=e&&1===l.length;return(0,b.jsxs)("button",{title:`${d}: ${f.toLocaleString()}${g?" (keep at least one)":""}`,"aria-pressed":e,disabled:g||!e&&!f,onClick:()=>m(e?l.filter(b=>b!==a):[...l,a].sort()),style:{flex:1,padding:"7px 4px",borderRadius:8,fontSize:11.5,fontWeight:700,cursor:!g&&(e||f)?"pointer":"default",border:e?"1px solid rgba(52,152,219,0.6)":"1px solid rgba(255,255,255,0.08)",background:e?"rgba(52,152,219,0.18)":"rgba(255,255,255,0.03)",color:e?"#cfe6f7":f?"#888":"#444"},children:[c,(0,b.jsx)("div",{style:{fontSize:9.5,fontWeight:500,opacity:.8,marginTop:2},children:f.toLocaleString()})]},a)})})]}),!r&&"galaxy"===h&&(0,b.jsx)(b1,{}),(0,b.jsxs)("div",{style:{marginBottom:18},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#555",letterSpacing:1,marginBottom:8,textTransform:"uppercase"},children:r?"Filter by bridge tier":"Filter"}),(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:[(0,b.jsxs)("button",{onClick:()=>s?p([]):g&&g("all"),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"7px 10px",borderRadius:6,border:"none",cursor:"pointer",width:"100%",background:(s?o.length:"all"!==f)?"rgba(255,255,255,0.03)":"rgba(255,255,255,0.12)",color:(s?o.length:"all"!==f)?"#888":"#fff"},children:[(0,b.jsx)("span",{style:{fontSize:11,fontWeight:600},children:"All"}),(0,b.jsx)("span",{style:{fontSize:10,color:"#555"},children:v})]}),s&&(0,b.jsx)("div",{style:{fontSize:10,color:"#667",margin:"2px 2px 4px"},children:"Click a tier to hide or show it"}),s&&["S","A","B","C","D"].map(a=>{let c=!o.includes(a),d=c&&o.length>=4;return(0,b.jsxs)("button",{"aria-pressed":c,title:d?"Keep at least one tier showing":c?`Hide ${a}-Tier`:`Show ${a}-Tier`,onClick:()=>!d&&p(c?[...o,a]:o.filter(b=>b!==a)),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"7px 10px",borderRadius:6,border:"none",cursor:d?"default":"pointer",width:"100%",background:c?`${b4[a]}14`:"rgba(255,255,255,0.02)",color:c?b4[a]:"#555",borderLeft:c?`3px solid ${b4[a]}`:"3px solid transparent"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,b.jsx)("div",{style:{width:8,height:8,borderRadius:"50%",background:b4[a],opacity:c?1:.2}}),(0,b.jsxs)("span",{style:{fontSize:11,fontWeight:600,textDecoration:c?"none":"line-through"},children:[a,"-Tier"]}),!c&&(0,b.jsx)("span",{style:{fontSize:9.5,color:"#667"},children:"hidden"})]}),(0,b.jsx)("span",{style:{fontSize:10,color:"#555"},children:u[a]||0})]},a)}),!s&&["S","A","B","C","D"].map(a=>(0,b.jsxs)("button",{onClick:()=>g&&g(a),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"7px 10px",borderRadius:6,border:"none",cursor:"pointer",width:"100%",background:f===a?`${b4[a]}20`:"rgba(255,255,255,0.03)",color:f===a?b4[a]:"#888",borderLeft:f===a?`3px solid ${b4[a]}`:"3px solid transparent"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,b.jsx)("div",{style:{width:8,height:8,borderRadius:"50%",background:b4[a],opacity:f===a?1:.4}}),(0,b.jsxs)("span",{style:{fontSize:11,fontWeight:600},children:[a,"-Tier"]})]}),(0,b.jsx)("span",{style:{fontSize:10,color:"#555"},children:u[a]||0})]},a))]})]}),!r&&"galaxy"===h&&!q&&(0,b.jsx)(b3,{}),(0,b.jsxs)("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)",paddingTop:12},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#555",letterSpacing:1,marginBottom:8,textTransform:"uppercase"},children:"Stats"}),(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:6},children:[Object.entries(u).filter(([a])=>["S","A","B"].includes(a)).map(([a,c])=>(0,b.jsxs)("div",{style:{padding:"6px 8px",borderRadius:6,background:`${b4[a]}10`,textAlign:"center"},children:[(0,b.jsx)("div",{style:{fontSize:16,fontWeight:800,color:b4[a]},children:c}),(0,b.jsxs)("div",{style:{fontSize:8,color:"#555"},children:[a,"-Tier"]})]},a)),(0,b.jsxs)("div",{style:{padding:"6px 8px",borderRadius:6,background:"rgba(255,255,255,0.04)",textAlign:"center"},children:[(0,b.jsx)("div",{style:{fontSize:16,fontWeight:800,color:"#fff"},children:v}),(0,b.jsx)("div",{style:{fontSize:8,color:"#555"},children:"Total"})]})]})]})]})]})}var b6=a.i(36839),b7=a.i(58834);function b8(){let[a,d]=(0,c.useState)(!1),[e,f]=(0,c.useState)("");async function g(){d(!0),f("");try{await (0,b7.loadSampleIntoSession)(),window.location.reload()}catch(a){f(a.message||"Could not load the sample network."),d(!1)}}return(0,b.jsx)("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",padding:24,overflowY:"auto"},children:(0,b.jsxs)("div",{style:{maxWidth:520,width:"100%",textAlign:"center"},children:[(0,b.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,b.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,b.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,b.jsx)(b9,{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,b.jsx)(b9,{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,b.jsx)(b9,{onClick:g,disabled:a,title:a?"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."}),e&&(0,b.jsx)("div",{style:{color:"#ff6b6b",fontSize:13,marginTop:18},children:e}),(0,b.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,b.jsx)("a",{href:"/settings#data",style:{color:"rgba(255,255,255,0.75)"},children:"Import your saved copy in Settings → Your data."})]})]})})}function b9({href:a,onClick:c,disabled:d,primary:e,badge:f,title:g,body:h}){let i={display:"block",width:"100%",boxSizing:"border-box",textAlign:"left",padding:"16px 18px",borderRadius:12,marginBottom:12,textDecoration:"none",cursor:d?"default":"pointer",font:"inherit",border:e?"1px solid rgba(255,215,0,0.45)":"1px solid rgba(255,255,255,0.12)",background:e?"linear-gradient(135deg, rgba(255,215,0,0.12), rgba(155,89,182,0.14))":"rgba(255,255,255,0.03)",color:"#fff"},j=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:5},children:[(0,b.jsx)("span",{style:{fontSize:15.5,fontWeight:750},children:g}),f&&(0,b.jsx)("span",{style:{fontSize:10.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",padding:"3px 8px",borderRadius:20,background:"#FFD700",color:"#0a0a1a"},children:f}),(0,b.jsx)("span",{style:{marginLeft:"auto",color:"rgba(255,255,255,0.4)"},children:"→"})]}),(0,b.jsx)("div",{style:{fontSize:13,color:"rgba(255,255,255,0.5)",lineHeight:1.6},children:h})]});return a?(0,b.jsx)("a",{href:a,style:i,children:j}):(0,b.jsx)("button",{onClick:c,disabled:d,style:i,children:j})}var ca=a.i(42510);let cb=[],cc=a=>!!a&&!["install","setup","login"].includes(a.action);function cd(a,b){let c={};a.forEach(a=>{c[a.tier]=(c[a.tier]||0)+1});let d={};return b.forEach(a=>{d[a.tier]=(d[a.tier]||0)+1}),{total:a.length,tiers:c,d2Total:b.length,d2Tiers:d}}let ce={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"};function cf(){let a,f,j,k,{userId:l,userName:m}=(0,bI.useUser)(),n=function(){let[a,b]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{let a=()=>b(window.innerWidth<768);return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),a}(),[o,p]=(0,c.useState)([]),[q,r]=(0,c.useState)([]),[s,t]=(0,c.useState)([]),[u,v]=(0,c.useState)([1]),[w,x]=(0,c.useState)([]),[y,z]=(0,c.useState)(null),A=(0,c.useRef)(null),[B,C]=(0,c.useState)("all"),D=(0,d.useSearchParams)().get("chain"),[E,F]=(0,c.useState)(D),[G,H]=(0,c.useState)(()=>E?"degrees":"network"),[I,J]=(0,c.useState)(!0),[K,L]=(0,c.useState)(null),[M,N]=(0,c.useState)(!0),[O,P]=(0,c.useState)(!0),[Q,R]=(0,c.useState)(()=>E?"chain":"galaxy"),[S,T]=(0,c.useState)([]),[U,V]=(0,c.useState)(!1),[W,X]=(0,c.useState)(!1),[Y,Z]=(0,c.useState)("csv"),[$,_]=(0,c.useState)(e.NO_SCAN_NOTES),aa=(0,c.useRef)(""),ab=(0,h.requestCount)((0,g.default)());(0,c.useEffect)(()=>{l&&(a(),b7.IS_DEMO||(0,ca.hasCsvNetwork)()||((0,e.loadScanNotes)().then(_),fetch(`/api/notifications?userId=${l}`).then(a=>a.json()).then(a=>T(a.notifications||[])).catch(()=>{})));async function a(){let a=(0,ca.hasCsvNetwork)()?(0,ca.loadCsvNetwork)():null;a&&(X(!0),Z(a.source||"csv"));let{degree1:b,degree2:c,degree3:d=[]}=b7.IS_DEMO?await (0,b7.loadDemoNetwork)():a||await (async()=>await (0,i.loadNetwork)(l))();p(b),r(c),t(d||[]),aa.current=cg(b,c),L(cd(b,c)),J(!1)}},[l]);let ac=(0,c.useCallback)(async()=>{if(!(b7.IS_DEMO||(0,ca.hasCsvNetwork)())&&l)try{let[{degree1:a,degree2:b,degree3:c=[]},d]=await Promise.all([(0,i.loadNetwork)(l),(0,e.loadScanNotes)()]);_(a=>JSON.stringify(a)===JSON.stringify(d)?a:d),t(a=>a.length===(c||[]).length?a:c||[]);let f=cg(a,b);if(f===aa.current)return;aa.current=f,p(a),r(b),L(cd(a,b))}catch{}},[l]),[ad,ae]=(0,c.useState)(null),ah=(0,c.useCallback)(a=>{ae({...a,id:`${a.query}|${a.tier||""}|${a.rarity||""}|${Math.random()}`}),H("degrees"),R("separation")},[]),ai=(0,c.useCallback)(a=>{F(a),H("degrees"),R("chain")},[]),aj=(0,c.useCallback)(()=>{F(null);try{window.history.replaceState(null,"",window.location.pathname)}catch{}},[]),ak="degrees"===G,al=(0,c.useMemo)(()=>(function(a=[],b=[],c=[]){let d=new Set,e=(a,b)=>{let c=[];for(let e of a||[]){let a=(0,ag.keyFor)(e);d.has(a)||(d.add(a),c.push(e.degree===b?e:{...e,degree:b}))}return c};return{1:e(a,1),2:e(b,2),3:e(c,3)}})(o,q,s),[o,q,s]),am=(0,c.useMemo)(()=>ak?o:u.flatMap(a=>al[a]||[]),[ak,o,u,al]),an=(0,c.useMemo)(()=>ak?"all"===B?am:am.filter(a=>a.tier===B):w.length?am.filter(a=>!w.includes(a.tier)):am,[ak,am,B,w]),ao=(0,c.useMemo)(()=>new Map(o.map(a=>[a.id,a])),[o]),ap=(0,c.useMemo)(()=>new Set(q.map(a=>a.source_connection_id).filter(Boolean)),[q]),aq=(0,c.useMemo)(()=>{let a={};return o.forEach(b=>{ap.has(b.id)&&(a[b.tier]=(a[b.tier]||0)+1)}),a},[o,ap]),ar=(0,c.useMemo)(()=>ak?"all"===B?q:q.filter(a=>ao.get(a.source_connection_id)?.tier===B):cb,[ak,B,ao,q]),as=(0,c.useCallback)(a=>{z(a),a&&N(!1)},[]);if(I)return(0,b.jsxs)("div",{style:{minHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:"#0a0a1a",color:"#fff"},children:[(0,b.jsx)("div",{style:{fontSize:24,fontWeight:700},children:"Loading Six Degrees…"}),(0,b.jsx)("div",{style:{fontSize:14,color:"#888",marginTop:8},children:"Mapping your LinkedIn network"})]});let at=(a=bl[Q])&&a.modes.includes(G)?{key:Q,...a}:bn(G)[0]??{key:"list",...bl.list},au=!b7.IS_DEMO&&!W;return(0,b.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,b.jsxs)("header",{style:{padding:n?"10px 12px":"20px 30px",borderBottom:"1px solid rgba(255,255,255,0.1)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:n?4:8,flexWrap:n?"wrap":"nowrap",gap:6*!!n},children:[(0,b.jsx)("h1",{style:{fontSize:n?16:28,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FFD700, #9B59B6, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Six Degrees"}),(0,b.jsxs)("div",{style:{display:"flex",gap:n?2:4,background:"rgba(255,255,255,0.08)",borderRadius:8,padding:n?2:3,flexWrap:n?"wrap":"nowrap"},children:[(0,b.jsx)("button",{onClick:()=>{H("network"),z(null),C("all"),R("galaxy")},style:{padding:n?"6px 10px":"8px 16px",borderRadius:6,border:"none",fontSize:n?11:13,fontWeight:600,cursor:"pointer",background:"network"===G?"#fff":"transparent",color:"network"===G?"#000":"#888"},children:n?"Circle":"Network Circle"}),(0,b.jsx)("button",{onClick:()=>{H("degrees"),z(null),C("all"),R("chain")},style:{padding:n?"6px 10px":"8px 16px",borderRadius:6,border:"none",fontSize:n?11:13,fontWeight:600,cursor:"pointer",background:"degrees"===G?"linear-gradient(135deg, #FFD700, #FF6B35)":"rgba(255,255,255,0.12)",color:"degrees"===G?"#000":"#fff"},children:"Degrees"}),W&&(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginLeft:n?4:10,padding:n?"4px 8px":"5px 10px",borderRadius:999,background:"rgba(255,255,255,0.05)",border:"1px solid rgba(255,255,255,0.12)"},children:[(0,b.jsx)("span",{style:{width:6,height:6,borderRadius:"50%",background:"sample"===Y?"#9B59B6":"#2ecc71"}}),(0,b.jsx)("span",{style:{fontSize:n?10:12,color:"rgba(255,255,255,0.65)",whiteSpace:"nowrap"},children:"sample"===Y?"Sample network":"Your CSV"}),(0,b.jsx)("button",{onClick:()=>{(0,ca.clearCsvNetwork)(),window.location.href="/"},title:"sample"===Y?"Leave the sample network":"Clear this import",style:{border:"none",background:"transparent",cursor:"pointer",color:"#888",fontSize:n?13:15,lineHeight:1,padding:"0 0 0 2px"},children:"×"})]}),!b7.IS_DEMO&&(0,b.jsx)(af.default,{href:"/paths",style:{padding:n?"6px 10px":"8px 16px",borderRadius:6,border:"none",fontSize:n?11:13,fontWeight:600,background:"rgba(255,255,255,0.06)",color:"#00ff88",textDecoration:"none",display:"flex",alignItems:"center",gap:4},children:"Paths"}),!b7.IS_DEMO&&(0,b.jsxs)(af.default,{href:"/social",title:"Experimental: what your own LinkedIn data says about your relationships",style:{padding:n?"6px 10px":"8px 16px",borderRadius:6,border:"none",fontSize:n?11:13,fontWeight:600,background:"rgba(255,255,255,0.06)",color:"#FFD700",textDecoration:"none",display:"flex",alignItems:"center",gap:4},children:["Social",(0,b.jsx)("span",{style:{fontSize:9,opacity:.7,marginLeft:2},children:"beta"})]}),!b7.IS_DEMO&&!W&&(0,b.jsx)(af.default,{href:"/scores",style:{padding:n?"6px 10px":"8px 16px",borderRadius:6,border:"none",fontSize:n?11:13,fontWeight:600,background:"rgba(255,255,255,0.06)",color:"#FFD700",textDecoration:"none",display:"flex",alignItems:"center",gap:4},children:"Scores"}),!b7.IS_DEMO&&!W&&(0,b.jsx)(af.default,{href:"/queue",style:{padding:n?"6px 10px":"8px 16px",borderRadius:6,border:"none",fontSize:n?11:13,fontWeight:600,background:"rgba(255,255,255,0.06)",color:"#FF6B35",textDecoration:"none",display:"flex",alignItems:"center",gap:4},children:"Outlink"}),!b7.IS_DEMO&&!W&&(0,b.jsx)(af.default,{href:"/setup",style:{padding:n?"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"}),!b7.IS_DEMO&&!W&&(0,b.jsx)(bp,{isMobile:n})]}),!b7.IS_DEMO&&(0,b.jsx)(af.default,{href:"/settings",title:"Settings","aria-label":"Settings",style:{width:n?28:32,height:n?28:32,borderRadius:"50%",flexShrink:0,background:"rgba(255,255,255,0.06)",color:"#888",fontSize:n?14:16,textDecoration:"none",display:"flex",alignItems:"center",justifyContent:"center",marginLeft:n?4:8},children:"⚙︎"}),!b7.IS_DEMO&&!W&&(0,b.jsxs)("div",{style:{position:"relative",marginLeft:n?4:8},children:[(0,b.jsxs)("button",{onClick:()=>V(!U),style:{width:n?28:32,height:n?28:32,borderRadius:"50%",border:"none",cursor:"pointer",background:"rgba(255,255,255,0.06)",color:"#888",fontSize:n?12:14,display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:["🔔",S.filter(a=>!a.seen).length>0&&(0,b.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:S.filter(a=>!a.seen).length})]}),U&&(0,b.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,b.jsxs)("div",{style:{padding:"12px 16px",borderBottom:"1px solid rgba(255,255,255,0.08)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,b.jsx)("span",{style:{fontWeight:700,fontSize:14},children:"Notifications"}),S.filter(a=>!a.seen).length>0&&(0,b.jsx)("button",{onClick:()=>{fetch("/api/notifications",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"mark-all-seen"})}),T(a=>a.map(a=>({...a,seen:!0})))},style:{background:"none",border:"none",color:"#3498DB",fontSize:11,cursor:"pointer",fontWeight:600},children:"Mark all read"})]}),(0,b.jsx)("div",{style:{overflowY:"auto",maxHeight:340},children:0===S.length?(0,b.jsx)("div",{style:{padding:20,textAlign:"center",color:"#555",fontSize:12},children:"No notifications yet"}):S.slice(0,20).map(a=>(0,b.jsx)("div",{style:{padding:"10px 16px",borderBottom:"1px solid rgba(255,255,255,0.04)",background:a.seen?"transparent":"rgba(255,215,0,0.04)"},children:(0,b.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"flex-start"},children:[(0,b.jsx)("span",{style:{fontSize:16},children:a.icon||"📌"}),(0,b.jsxs)("div",{style:{flex:1},children:[(0,b.jsx)("div",{style:{fontSize:12,fontWeight:600,color:a.seen?"#888":"#fff"},children:a.title}),a.message&&(0,b.jsx)("div",{style:{fontSize:10,color:"#666",marginTop:2},children:a.message}),(0,b.jsx)("div",{style:{fontSize:9,color:"#444",marginTop:3},children:new Date(a.created_at).toLocaleDateString()})]})]})},a.id))})]})]}),!b7.IS_DEMO&&!W&&(0,b.jsx)(ci,{isMobile:n}),(0,b.jsx)("a",{href:b7.IS_DEMO?"/launch":W?"/import":"/profile",style:{width:n?30:36,height:n?30:36,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",background:"linear-gradient(135deg, #FFD700, #FF6B35)",color:"#000",fontWeight:800,fontSize:n?11:14,textDecoration:"none",marginLeft:n?6:12,flexShrink:0},children:(f=o.filter(a=>"S"===a.tier).length,j=o.filter(a=>"A"===a.tier).length,k=o.filter(a=>"B"===a.tier).length,Math.floor(Math.sqrt((100*f+40*j+15*k+200*o.filter(a=>ap.has(a.id)).length+50*q.filter(a=>"S"===a.tier).length+o.length)/10)))})]}),ak&&!W&&ab>0&&(0,b.jsxs)(af.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,b.jsx)("span",{style:{fontSize:10},children:"⏳"}),ab," Pending"]})]}),(0,b.jsxs)("div",{style:{display:"flex",height:n?"calc(100vh - 70px)":"calc(100vh - 130px)",position:"relative"},children:[(0,b.jsx)(b5,{collapsed:O,onToggle:()=>P(!O),mode:G,filter:B,onFilterChange:C,visualMode:at.key,onVisualModeChange:R,tierCounts:ak?K?.tiers||{}:function(a=[]){let b={};for(let c of a)b[c.tier]=(b[c.tier]||0)+1;return b}(am),degrees:u,onDegreesChange:v,hiddenTiers:w,onHiddenTiersChange:x,degreeCounts:{1:al[1].length,2:al[2].length,3:al[3].length},bridgeTierCounts:aq}),(()=>{if(0===o.length)return(0,b.jsx)(b8,{});if(ak&&0===q.length)return(0,b.jsx)("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",padding:24,textAlign:"center"},children:(0,b.jsxs)("div",{style:{maxWidth:440},children:[(0,b.jsx)("div",{style:{fontSize:40,marginBottom:16,opacity:.5},children:"🔗"}),(0,b.jsx)("h2",{style:{fontSize:22,fontWeight:800,margin:"0 0 12px",color:"#fff"},children:"Degrees need 2nd-degree data"}),(0,b.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,b.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,b.jsxs)("p",{style:{color:"#666",fontSize:13,lineHeight:1.7,margin:0},children:["The local scanner maps those circles (and captures real photos)."," ",(0,b.jsx)(af.default,{href:"/setup",style:{color:"#3498DB",textDecoration:"none"},children:"Set up scanning →"})]})]})});let a=at.component,c={connections:an,degree2:at.allDegree2?q:ar,onSelect:as,mode:G,userName:m,userImage:null,selectedId:y?.id??null,tierColors:ce,focusNodeRef:A,fullDegree1:o,fullDegree2:q,scanNotes:$,canScan:au,chainOpen:E,onChainOpened:aj,preset:ad};return(0,b.jsx)(a,{...c})})(),(0,b.jsx)(bK,{selected:y,stats:K,tierColors:ce,connections:o,degree2:q,mode:G,collapsed:M,filter:B,onToggle:()=>N(!M),onSelect:a=>{z(a||null)},onSwitchMode:a=>{H(a),C("all")},onOpenCircle:ai,onShowInSeparation:ah,onFocusNode:a=>{A.current&&A.current(a)},csvSource:b7.IS_DEMO?"sample":W?Y:null,scanNotes:$,canScan:au}),au&&(0,b.jsx)(ch,{onChange:ac,live:"chain"===at.key}),ak&&"separation"!==at.key&&(0,b.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,b.jsxs)("span",{style:{fontSize:10,color:"#666"},children:[bl.orbit.icon," ",bl.orbit.label]}),(0,b.jsx)("div",{onClick:()=>R("orbit"===at.key?"chain":"orbit"),style:{width:32,height:18,borderRadius:9,cursor:"pointer",background:"orbit"===at.key?"#FF6B35":"rgba(255,255,255,0.15)",position:"relative",transition:"background 0.2s"},children:(0,b.jsx)("div",{style:{width:14,height:14,borderRadius:"50%",background:"#fff",position:"absolute",top:2,left:"orbit"===at.key?16:2,transition:"left 0.2s"}})})]})]})]})}function cg(a,b){let c=0x811c9dc5,d=a=>{for(let b=0;b<a.length;b++)c=Math.imul(c^a.charCodeAt(b),0x1000193)};for(let c of[...a,...b])d(`${c.id}|${c.degree}|${c.source_connection_id??""}|${c.unlocked_from_bridge_id??""}|${c.tier}|${c.power_score}|${c.unlock_status??""}|${c.profile_image_url??""};`);return`${a.length}:${b.length}:${c>>>0}`}function ch({onChange:a,live:b}){let d=(0,f.default)(),g=d.finished.find(cc)?.startedAt??null,h=b&&d.running&&(0,e.isCircleScan)(d);return(0,c.useEffect)(()=>{null!=g&&a()},[g,a]),(0,c.useEffect)(()=>{if(!h)return;let b=setInterval(a,2e4);return()=>clearInterval(b)},[h,a]),null}function ci({isMobile:a}){let c=(0,f.default)(),d=(0,e.busyReason)(c);return(0,b.jsx)("button",{onClick:async()=>{try{let a=(0,e.notReadyMessage)(await (0,e.scraperStatus)());if(a)return void alert(a);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,e.beginScrape)("refresh"),alert("Checking for new connections — watch it on the Scan page.")}catch(a){alert(a.message)}},disabled:!!d,title:d?`${d}. One scan at a time.`:"Check for new connections",style:{width:a?28:32,height:a?28:32,borderRadius:"50%",border:"none",cursor:d?"not-allowed":"pointer",opacity:d?.4:1,background:"rgba(255,255,255,0.06)",color:"#888",fontSize:a?12:14,display:a?"none":"flex",alignItems:"center",justifyContent:"center",marginLeft:8},children:"↻"})}a.s(["default",0,function(){return(0,b.jsx)(b6.default,{children:(0,b.jsx)(c.Suspense,{children:(0,b.jsx)(cf,{})})})}],30100)}];
|
|
24
|
+
/* Everything glides to its new place as the slider moves: dots and names by
|
|
25
|
+
their group's transform, lines by their path. Newcomers fade in. */
|
|
26
|
+
.sepmap .mv { transition: transform ${ba}; }
|
|
27
|
+
.sepmap .rt, .sepmap .spk { transition: d ${ba}, stroke-opacity .12s; }
|
|
28
|
+
.sepmap .in { animation: sepIn .3s ease-out both; }
|
|
29
|
+
@keyframes sepIn { from { opacity: 0; } to { opacity: 1; } }
|
|
30
|
+
@media (prefers-reduced-motion: reduce) {
|
|
31
|
+
.sepmap .mv, .sepmap .rt, .sepmap .spk { transition: none; }
|
|
32
|
+
.sepmap .in { animation: none; }
|
|
33
|
+
}
|
|
34
|
+
`,bc={paintOrder:"stroke",stroke:"#0a0a1a",strokeWidth:3,strokeLinejoin:"round"},bd=(a,b)=>({transform:`translate(${a}px, ${b}px)`}),be=(0,c.memo)(function({layout:a,selectedKey:d,tierColors:e,youLabel:f,isMobile:g,onPick:h,onPickBridge:i,mutualsBy:j,doors:k=!1,cards:l=!1}){let{width:m,height:n,you:o,people:p,bridges:q,links:r,spokes:s,ghosts:t=[],unscanned:u=0,ghostLabel:v=null,drawn:w=1}=a,x=(0,c.useMemo)(()=>{let a=new Map;for(let b of r)a.has(b.key)||a.set(b.key,[]),a.get(b.key).push(b);return a},[r]),y=g?36:26,z=g?12:11;return(0,b.jsxs)("svg",{className:"sepmap",width:m,height:n,"aria-hidden":"true",style:{display:"block",overflow:"visible"},children:[(0,b.jsx)("style",{children:bb}),(0,b.jsx)("defs",{children:(0,b.jsxs)("linearGradient",{id:"sepYouGrad",x1:"0",y1:"0",x2:"1",y2:"1",children:[(0,b.jsx)("stop",{offset:"0",stopColor:"#FFD700"}),(0,b.jsx)("stop",{offset:"1",stopColor:"#FF6B35"})]})}),(0,b.jsx)("defs",{children:(0,b.jsxs)("radialGradient",{id:"sepAimHalo",children:[(0,b.jsx)("stop",{offset:"0",stopColor:"#FFD700",stopOpacity:"0.2"}),(0,b.jsx)("stop",{offset:"1",stopColor:"#FFD700",stopOpacity:"0"})]})}),s.map(a=>(0,b.jsx)("path",{className:"spk in",d:`M${a.x1},${a.y1} L${l?a.x2-bf:a.x2},${a.y2}`,fill:"none",stroke:"#fff",strokeOpacity:.12,strokeWidth:1},`s-${a.id??"unresolved"}`)),l&&1===p.length&&p[0].big&&(0,b.jsx)("circle",{className:"mv",style:{...bd(p[0].x+Math.min(200,(m-p[0].x)/2),p[0].y),opacity:.3+.7*w},r:170,fill:"url(#sepAimHalo)"}),1===p.length&&p[0].big&&t.length>0&&(0,b.jsxs)("g",{className:"in",pointerEvents:"none",children:[t.map((a,c)=>{let d=p[0],e=l?d.x:d.x-d.r-2,f=(a.x+e)/2;return(0,b.jsx)("path",{d:`M${a.x},${a.y} C${f},${a.y} ${f},${d.y} ${e},${d.y}`,fill:"none",stroke:"#8a8fa8",strokeOpacity:.09,strokeWidth:.8},`gl-${c}`)}),t.map((a,c)=>(0,b.jsx)("circle",{cx:a.x,cy:a.y,r:3.3,fill:"#4a4f68",stroke:"#6b7090",strokeWidth:.6,strokeOpacity:.6},`gd-${c}`)),v&&(0,b.jsxs)("text",{x:v.x,y:v.y,fontSize:10.5,fontWeight:700,fill:"#8a8fa8",style:bc,children:[`+${a6(u)} more mutual${1===u?"":"s"}, in circles not scanned yet`,u>t.length?` (${a6(t.length)} shown)`:""]})]}),(0,b.jsx)("g",{className:"ppl",children:p.map(a=>{var c;let{p:f}=a,g=e[f.tier]||"#888",i=a.key===d,n=f.routes.map(a=>a.bridge?a.bridge.name:a4).join(", "),o=(c=j?.get(f.key),c?.from==="linkedin"&&c.count>f.waysIn?{text:`${a6(c.count)} mutuals \xb7 ${a6(f.waysIn)} mapped`,rare:!1,more:c.count}:1===f.waysIn?{text:"only way in",rare:!0,more:0}:{text:`${a6(f.waysIn)} ways in`,rare:!1,more:0}),p=a.r+14,q=Math.max(8,Math.floor((m-a.x-p)/6)),r=a=>String(a||"").length>q?`${String(a).slice(0,q-1)}…`:String(a||"");return(0,b.jsxs)("g",{className:i?"sp sel":"sp",onClick:()=>h(f),children:[(0,b.jsx)("title",{children:`${f.person.name} \xb7 #${f.rank}${f.tied?"=":""} \xb7 ${f.tier} \xb7 ${f.score.toFixed(1)} \xb7 ${o.text} \xb7 via ${n}`}),(x.get(a.key)||[]).map(c=>{let d=(c.x1+c.x2)/2,f=c.unresolved?"#777":c.primary?a2:a.big?"#FFD700":e[c.tier]||"#888";return(0,b.jsx)("path",{className:"rt in",d:l?`M${c.x1},${c.y1} C${d},${c.y1} ${d},${c.y2} ${c.x2},${c.y2}`:`M${c.x1+5},${c.y1} C${d},${c.y1} ${d},${c.y2} ${c.x2-a.r-2*!!a.big},${c.y2}`,fill:"none",stroke:f,strokeWidth:a.big?c.primary?2.2:1.4:c.primary?1.5:1,strokeOpacity:a.big?c.primary?.95:.6:c.primary?.8:.35,strokeDasharray:c.primary?void 0:a.big?"5 4":"3 3"},`${c.key}-${c.bridgeId??"u"}`)}),l&&(x.get(a.key)||[]).map(c=>{let d=c.unresolved?"#777":c.primary?a2:a.big?"#FFD700":e[c.tier]||"#888";return(0,b.jsxs)("g",{className:"in",pointerEvents:"none",children:[(0,b.jsx)("circle",{className:"mv",style:bd(c.x1,c.y1),r:2.6,fill:d}),(0,b.jsx)("circle",{className:"mv",style:bd(c.x2,c.y2),r:2.6,fill:d})]},`e-${c.bridgeId??"u"}`)}),(0,b.jsxs)("g",{className:"mv in",style:bd(a.x,a.y),children:[(a.rings||[]).map((a,c)=>(0,b.jsx)("circle",{r:a,fill:"none",stroke:g,strokeOpacity:.28-.08*c,strokeWidth:1,strokeDasharray:c?"2 5":void 0},a)),!l&&(0,b.jsx)("rect",{x:-12,y:-y/2,width:Math.max(0,m-a.x+12),height:y,fill:"transparent"}),l&&a.big?(0,b.jsx)(bk,{p:f,c:g,tag:o,width:Math.max(260,Math.min(400,m-a.x-4)),fs:z}):l?(0,b.jsx)(bj,{p:f,c:g,tag:o,width:Math.max(240,Math.min(340,m-a.x-4)),sel:i}):a.big?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("circle",{r:a.r,fill:"#0a0a1a",stroke:g,strokeWidth:3,strokeOpacity:.35+.65*w}),(0,b.jsx)("text",{dy:"0.35em",textAnchor:"middle",fontSize:11,fontWeight:800,fill:g,children:(0,a$.initialsFor)(f.person.name)}),(0,b.jsx)("text",{x:p,y:-20,fontSize:z+3,fontWeight:800,fill:"#fff",style:bc,children:r(f.person.name)}),(0,b.jsx)("text",{x:p,y:-4,fontSize:z,fill:"#aaa",style:bc,children:r(a9(f.person))}),(0,b.jsxs)("text",{x:p,y:13,fontSize:z,fontWeight:700,fill:g,style:bc,children:["#",f.rank,f.tied?"=":""," · ",f.tier,"-tier · ",f.score.toFixed(1)]}),(0,b.jsx)("text",{x:p,y:29,fontSize:z,fill:"#ccc",style:bc,children:r(o.more?`${a6(o.more)} mutual connections \xb7 ${a6(f.waysIn)} drawn here`:1===f.waysIn?"1 mutual connection: the only way in":`${a6(f.waysIn)} mutual connections, all drawn`)}),o.more>0&&(0,b.jsx)("text",{x:p,y:44,fontSize:z-1,fill:"#778",style:bc,children:r("The count is LinkedIn’s; the rest are in circles not scanned yet")})]}):(0,b.jsxs)(b.Fragment,{children:[i&&(0,b.jsx)("circle",{r:a.r+3.5,fill:"none",stroke:"#fff",strokeWidth:1.5}),(0,b.jsx)("circle",{r:a.r,fill:g}),(0,b.jsxs)("text",{x:14,dy:"0.35em",fontSize:z,fill:"#ddd",style:bc,children:[a.label,(0,b.jsx)("tspan",{dx:6,fill:g,fontWeight:700,children:f.score.toFixed(1)}),k&&(0,b.jsx)("tspan",{dx:8,fontSize:z-2,fontWeight:700,fill:o.rare?bs:"#778",children:o.text})]})]})]})]},a.key)})}),q.map(a=>{let c=a.unresolved?"#777":e[a.bridge.tier]||"#888";return(0,b.jsxs)("g",{className:a.unresolved?void 0:"br",onClick:a.unresolved?void 0:()=>i(a.bridge),children:[(0,b.jsx)("title",{children:a.unresolved?"Routes whose connection record doesn’t match anyone in your 1st-degree list, so who introduces you can’t be named":`${a.bridge.name} \xb7 ${a.bridge.tier}-tier${a.count>1?` \xb7 a way in to ${a.count} of these`:""} \xb7 click to open`}),(0,b.jsx)("g",{className:"mv in",style:bd(a.x,a.y),children:l?(0,b.jsx)(bi,{b:a,c:c,big:1===p.length&&p[0].big}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("circle",{r:a.r,fill:a.unresolved?"none":c,stroke:a.unresolved?"#777":"#0a0a1a",strokeWidth:a.unresolved?1:1.5,strokeDasharray:a.unresolved?"2 2":void 0}),(0,b.jsx)("text",{x:-9,dy:"0.35em",textAnchor:"end",fontSize:z-1,fill:c,fontStyle:a.unresolved?"italic":void 0,fontWeight:a.unresolved?400:a.primary?800:600,style:bc,children:a.label})]})})]},`b-${a.id??"unresolved"}`)}),(0,b.jsxs)("g",{className:"mv",style:bd(o.x,o.y),children:[(0,b.jsx)("circle",{r:o.r,fill:"url(#sepYouGrad)"}),(0,b.jsx)("text",{dy:"0.35em",textAnchor:"middle",fontSize:f.length>2?9:10,fontWeight:800,fill:"#000",children:f})]})]})}),bf=236,bg=(a,b)=>String(a||"").length>b?`${String(a).slice(0,Math.max(1,b-1))}…`:String(a||""),bh=(a,b=9.5)=>Math.round(String(a).length*b*.6+14);function bi({b:a,c,big:d}){if(a.unresolved)return(0,b.jsxs)("g",{children:[(0,b.jsx)("rect",{x:-bf,y:-14,width:bf,height:28,rx:14,fill:"#11132a",stroke:"#555",strokeDasharray:"3 3"}),(0,b.jsx)("text",{x:-bf+14,dy:"0.35em",fontSize:11.5,fontStyle:"italic",fill:"#888",children:bg(a.label,30)})]});let e=a.bridge.tier,f=d?a.primary?`${e} \xb7 best way in`:e:a.onlyFor?`${e} \xb7 only door${a.onlyFor>1?` \xd7${a.onlyFor}`:""}`:a.bestFor?`${e} \xb7 door for ${a.bestFor}`:e,g=d?a.primary:a.bestFor>0,h=bh(f);return(0,b.jsxs)("g",{children:[(0,b.jsx)("rect",{x:-bf,y:-14,width:bf,height:28,rx:14,fill:"#14172e",stroke:g?"rgba(255,215,0,0.55)":"rgba(255,255,255,0.09)",strokeWidth:g?1.3:1}),(0,b.jsx)("circle",{cx:-bf+15,r:10,fill:c}),(0,b.jsx)("text",{x:-bf+15,dy:"0.35em",textAnchor:"middle",fontSize:8,fontWeight:800,fill:"#000",children:(0,a$.initialsFor)(a.bridge.name)}),(0,b.jsx)("text",{x:-bf+31,dy:"0.35em",fontSize:12,fontWeight:600,fill:"#e8e8f0",children:bg(a.bridge.name,Math.max(6,Math.floor((bf-31-h-10)/6.4)))}),(0,b.jsx)("rect",{x:-h-7,y:-9,width:h,height:18,rx:9,fill:`${c}22`}),(0,b.jsx)("text",{x:-7-h/2,dy:"0.35em",textAnchor:"middle",fontSize:9.5,fontWeight:800,fill:c,children:f})]})}function bj({p:a,c,tag:d,width:e,sel:f}){let g=bh(d.text);return(0,b.jsxs)("g",{children:[(0,b.jsx)("rect",{x:0,y:-20,width:e,height:40,rx:10,fill:"#151830",stroke:f?"#fff":"rgba(255,255,255,0.09)",strokeWidth:f?1.5:1}),(0,b.jsxs)("text",{x:12,dy:"0.35em",fontSize:11,fontWeight:800,fill:"#FFD700",children:["#",a.rank,a.tied?"=":""]}),(0,b.jsx)("text",{x:60,y:-3,fontSize:13,fontWeight:700,fill:"#fff",children:bg(a.person.name,Math.floor((e-60-70)/7))}),(0,b.jsx)("text",{x:60,y:12,fontSize:10.5,fill:"#8a8fa8",children:bg(a9(a.person),Math.floor((e-60-g-20)/5.6))}),(0,b.jsx)("text",{x:e-12,y:-2,textAnchor:"end",fontSize:14,fontWeight:800,fill:c,children:a.score.toFixed(1)}),(0,b.jsx)("rect",{x:e-12-g,y:4,width:g,height:14,rx:7,fill:d.rare?"rgba(0,229,255,0.1)":"rgba(255,255,255,0.06)",stroke:d.rare?"rgba(0,229,255,0.35)":"rgba(255,255,255,0.14)"}),(0,b.jsx)("text",{x:e-12-g/2,y:11,dy:"0.35em",textAnchor:"middle",fontSize:9.5,fontWeight:800,fill:d.rare?bs:"#cfd3e6",children:d.text})]})}function bk({p:a,c,tag:d,width:e,fs:f}){let g=a.routes.filter(a=>a.bridge).length,h=d.more?`${a6(d.more)} mutual connections`:1===a.waysIn?"1 mutual connection":`${a6(a.waysIn)} mutual connections`,i=d.more?`${a6(a.waysIn)} drawn here`:1===a.waysIn?"the only way in":"all drawn here",j=bh(h,10.5),k=bh(i,10.5),l=Math.floor((e-96-14)/6.6);return(0,b.jsxs)("g",{children:[(0,b.jsx)("rect",{x:0,y:-76,width:e,height:152,rx:16,fill:"#151830",stroke:"rgba(255,215,0,0.45)"}),(0,b.jsx)("circle",{cx:48,r:32,fill:"#0a0a1a",stroke:c,strokeWidth:3}),(0,b.jsx)("text",{x:48,dy:"0.35em",textAnchor:"middle",fontSize:18,fontWeight:800,fill:c,children:(0,a$.initialsFor)(a.person.name)}),(0,b.jsxs)("text",{x:96,y:-40,fontSize:11,fontWeight:800,fill:"#FFD700",children:["#",a.rank,a.tied?"=":""," · ",a.tier,"-tier · ",a.score.toFixed(1)]}),(0,b.jsx)("text",{x:96,y:-17,fontSize:f+8,fontWeight:800,fill:"#fff",children:bg(a.person.name,Math.floor(.72*l))}),(0,b.jsx)("text",{x:96,y:1,fontSize:12,fill:"#8a8fa8",children:bg(a9(a.person),l)}),(0,b.jsx)("rect",{x:96,y:12,width:j,height:20,rx:10,fill:"rgba(255,112,67,0.12)",stroke:"rgba(255,112,67,0.4)"}),(0,b.jsx)("text",{x:96+j/2,y:22,dy:"0.35em",textAnchor:"middle",fontSize:10.5,fontWeight:800,fill:bt,children:h}),(0,b.jsx)("rect",{x:96+j+6,y:12,width:k,height:20,rx:10,fill:"rgba(255,255,255,0.06)",stroke:"rgba(255,255,255,0.14)"}),(0,b.jsx)("text",{x:96+j+6+k/2,y:22,dy:"0.35em",textAnchor:"middle",fontSize:10.5,fontWeight:800,fill:"#cfd3e6",children:i}),(0,b.jsx)("text",{x:96,y:50,fontSize:10.5,fill:"#6b7090",children:d.more?`The ${a6(d.more)} is LinkedIn’s count. The other ${a6(d.more-a.waysIn)}`:1===g?"Only one of your connections knows them.":`${a6(g)} of your connections know them.`}),d.more>0&&(0,b.jsx)("text",{x:96,y:64,fontSize:10.5,fill:"#6b7090",children:bg("are in circles not scanned yet: the grey dots.",Math.floor((e-96-14)/5.4))})]})}let bl={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function bm({p:a,route:c,tierColors:d,compact:e}){if(!e)return(0,b.jsx)(bn,{p:a,route:c,tierColors:d});if(!c?.bridge)return(0,b.jsxs)("span",{style:{...bl,color:"#777",fontStyle:"italic",fontSize:e?11:12},children:["via ",a4]});let f=c.bridge,g=a.waysIn-1;return(0,b.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:5,minWidth:0,fontSize:e?11:12},children:[(0,b.jsx)("span",{style:{color:"#666",flexShrink:0},children:"via"}),!e&&(0,b.jsx)(a1,{person:f,size:16,tierColors:d}),(0,b.jsx)("span",{style:{...bl,color:d[f.tier]||"#aaa",fontWeight:600,minWidth:0},children:e?(0,T.shortName)(f.name):f.name}),g>0&&(0,b.jsxs)("span",{title:`Every way in:
|
|
35
|
+
${a8(a)}`,style:{flexShrink:0,padding:"1px 6px",borderRadius:8,fontSize:10,fontWeight:800,color:a2,background:"rgba(255,107,53,0.15)"},children:["+",g]})]})}function bn({p:a,route:c,tierColors:d}){let e=c?.bridge,f=a.waysIn-1;return(0,b.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0},title:`Every way in:
|
|
36
|
+
${a8(a)}`,children:[e?(0,b.jsx)(a1,{person:e,size:26,tierColors:d}):(0,b.jsx)("span",{style:{width:26,height:26,borderRadius:"50%",border:"1px dashed #666",flexShrink:0}}),(0,b.jsxs)("span",{style:{minWidth:0,display:"flex",flexDirection:"column"},children:[(0,b.jsx)("span",{style:{...bl,fontSize:13,fontWeight:700,color:e?d[e.tier]||"#ddd":"#777",fontStyle:e?"normal":"italic"},children:e?e.name:a4}),(0,b.jsx)("span",{style:{...bl,fontSize:10.5,marginTop:1,color:f>0?"#99a":bs,fontWeight:f>0?500:700},children:f>0?`+${f} more way${f>1?"s":""} in`:"only way in"})]})]})}function bo({p:a,rarity:c}){let d=c?aV(c.key):null;if(!d)return(0,b.jsx)("span",{});let e=Math.max(.06,1-aZ(c.count)),f="linkedin"===c.from&&c.count>a.waysIn?`, ${a6(a.waysIn)} mapped`:"";return(0,b.jsxs)("span",{style:{display:"flex",flexDirection:"column",gap:5,minWidth:0},title:`${c.count} mutual connection${1===c.count?"":"s"}${"scans"===c.from?" (from your scans, so it can only go up)":" (LinkedIn’s count)"}. ${bv}`,children:[(0,b.jsx)("span",{style:{height:6,borderRadius:3,background:"rgba(255,255,255,0.07)",overflow:"hidden"},children:(0,b.jsx)("span",{style:{display:"block",height:"100%",width:`${100*e}%`,borderRadius:3,background:d.color}})}),(0,b.jsxs)("span",{style:{...bl,fontSize:10.5,fontWeight:700,color:d.color},children:[d.label," · ",a6(c.count)," mutual",1===c.count?"":"s",f]})]})}function bp({status:a,rarity:c}){let d=c?aV(c.key):null;return(0,b.jsxs)(b.Fragment,{children:["asked"===a&&(0,b.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"===a&&(0,b.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"}),d&&"connected"!==a&&(0,b.jsx)("span",{title:`${c.count} mutual connection${1===c.count?"":"s"}${"scans"===c.from?" (from your scans, so it can only go up)":""}. ${bv}`,style:{flexShrink:0,fontSize:9,fontWeight:700,color:d.color,border:`1px solid ${d.color}55`,borderRadius:4,padding:"0 4px"},children:d.label})]})}function bq({facets:a,text:c,onText:d,onPick:e,onClose:f,isMobile:g}){let h=c.trim().toLowerCase(),i=(a?.sectors||[]).filter(a=>!h||a.label.toLowerCase().includes(h)),j=(a?.companies||[]).filter(a=>!h||a.name.toLowerCase().includes(h)).slice(0,h?60:24),k={fontSize:9,fontWeight:700,color:"#667",letterSpacing:1,textTransform:"uppercase",margin:"10px 0 6px"};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{onClick:f,style:{position:"fixed",inset:0,zIndex:40}}),(0,b.jsxs)("div",{role:"dialog","aria-label":"Pick a sector or a company",style:{position:"absolute",zIndex:41,top:g?52:44,left:g?6:14,width:g?"calc(100% - 12px)":"min(560px, calc(100% - 28px))",maxHeight:340,overflowY:"auto",boxSizing:"border-box",padding:12,borderRadius:12,background:"#0c101e",border:`1px solid ${br}55`,boxShadow:"0 12px 40px rgba(0,0,0,0.6)"},children:[(0,b.jsx)("input",{autoFocus:!0,type:"search",value:c,onChange:a=>d(a.target.value),onKeyDown:a=>{"Escape"===a.key?(a.stopPropagation(),f()):"Enter"===a.key&&(1!==i.length||j.length?1!==j.length||i.length||e({kind:"company",key:j[0].name,label:j[0].name}):e({kind:"sector",key:i[0].key,label:i[0].label,color:i[0].color}))},placeholder:"Type a sector or a company","aria-label":"Type a sector or a company",style:{width:"100%",height:g?44:34,boxSizing:"border-box",padding:"0 12px",borderRadius:8,outline:"none",color:"#fff",fontSize:g?16:13,border:"1px solid rgba(255,255,255,0.14)",background:"rgba(255,255,255,0.06)"}}),i.length>0&&(0,b.jsx)("div",{style:k,children:"Sectors · inferred from company names and headlines"}),(0,b.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:i.map(a=>(0,b.jsxs)("button",{type:"button",onClick:()=>e({kind:"sector",key:a.key,label:a.label,color:a.color}),style:{height:28,padding:"0 10px",borderRadius:14,cursor:"pointer",fontSize:11.5,fontWeight:700,whiteSpace:"nowrap",border:`1px solid ${a.color}66`,background:`${a.color}14`,color:"#ddd",display:"inline-flex",alignItems:"center",gap:6},children:[(0,b.jsx)("span",{style:{width:7,height:7,borderRadius:"50%",background:a.color}}),a.label,(0,b.jsx)("span",{style:{fontWeight:500,color:"#889"},children:a6(a.count)})]},a.key))}),j.length>0&&(0,b.jsxs)("div",{style:k,children:["Companies",h?"":" · the biggest; type to find any"]}),(0,b.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:j.map(a=>(0,b.jsxs)("button",{type:"button",onClick:()=>e({kind:"company",key:a.name,label:a.name}),style:{height:28,padding:"0 10px",borderRadius:14,cursor:"pointer",fontSize:11.5,fontWeight:600,whiteSpace:"nowrap",border:"1px solid rgba(255,255,255,0.12)",background:"rgba(255,255,255,0.04)",color:"#ccc"},children:[a.name,(0,b.jsx)("span",{style:{marginLeft:6,fontWeight:500,color:"#889"},children:a6(a.count)})]},a.name))}),!i.length&&!j.length&&(0,b.jsx)("div",{style:{fontSize:12,color:"#888",padding:"12px 2px 4px"},children:a?`Nothing matches ‘${c.trim()}’.`:"Reading where everyone works…"})]})]})}let br="#00ff88",bs="#00E5FF",bt="#FF7043",bu=`
|
|
37
|
+
.sepslide { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 24px; margin: 4px 0 0; background: transparent; cursor: pointer; }
|
|
38
|
+
.sepslide::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, ${bs} 0%, #FFD700 50%, ${bt} 100%); }
|
|
39
|
+
.sepslide::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: #0a0a1a; border: 3px solid #fff; box-shadow: 0 0 10px rgba(255,255,255,0.45); }
|
|
40
|
+
.sepslide::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, ${bs} 0%, #FFD700 50%, ${bt} 100%); }
|
|
41
|
+
.sepslide::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #0a0a1a; border: 3px solid #fff; box-shadow: 0 0 10px rgba(255,255,255,0.45); }
|
|
42
|
+
.sepslide:focus-visible { outline: 2px solid rgba(255,255,255,0.7); outline-offset: 3px; border-radius: 6px; }
|
|
43
|
+
`,bv="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.",bw=(0,c.memo)(function({p:a,top:c,height:d,isMobile:e,selected:f,tierColors:g,onPick:h,q:i,status:j,rarity:k}){let{person:l}=a,m=g[a.tier]||"#888",n=function(a,b){if(b){let c=a.routes.find(a=>a.bridge&&String(a.bridge.name||"").toLowerCase().includes(b));if(c)return c}return a.routes[0]||null}(a,i),o=a.rank<=3,p=f?"rgba(255,107,53,0.08)":o?`${m}08`:"transparent",q="LinkedIn Member"===l.name,r=`#${a.rank}${a.tied?"=":""}`,s=a.waysIn-1,t=n?.bridge?`via ${n.bridge.name}${s>0?` and ${s} other${s>1?"s":""}`:""}`:`via ${a4}${s>0?` and ${s} other${s>1?"s":""}`:""}`;return(0,b.jsxs)("div",{role:"button",tabIndex:0,"aria-label":`Rank ${a.rank}${a.tied?", tied":""}, ${l.name}, ${a.tier} tier, ${a.score.toFixed(1)}, ${a.waysIn} way${1===a.waysIn?"":"s"} in, ${t}`,"aria-pressed":f,onClick:()=>h(a),onKeyDown:b=>{("Enter"===b.key||" "===b.key)&&(b.preventDefault(),h(a))},onMouseEnter:a=>{f||(a.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:a=>{a.currentTarget.style.background=p},style:{position:"absolute",top:c,left:0,right:0,height:d,boxSizing:"border-box",display:"grid",alignItems:"center",gap:10,padding:"0 12px",gridTemplateColumns:e?"44px 36px 1fr 44px":a5,borderLeft:`3px solid ${f?a2:"transparent"}`,borderBottom:"1px solid rgba(255,255,255,0.04)",background:p,cursor:"pointer"},children:[(0,b.jsx)("span",{style:{fontSize:e?11:12,fontWeight:800,color:o?m:"#555",whiteSpace:"nowrap"},children:r}),(0,b.jsx)(a1,{person:l,size:32,tierColors:g}),e?(0,b.jsxs)("div",{style:{minWidth:0,display:"flex",flexDirection:"column",gap:2},children:[(0,b.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:4,minWidth:0},children:[(0,b.jsxs)("span",{style:{...bl,fontSize:13,fontWeight:600,color:q?"#888":"#fff",minWidth:0},children:[l.name,q&&(0,b.jsx)("span",{style:{fontSize:10,color:"#666",fontWeight:400},children:" · out of network"})]}),(0,b.jsx)(bp,{status:j,rarity:k})]}),(0,b.jsx)(bm,{p:a,route:n,tierColors:g,compact:!0}),(0,b.jsx)("span",{style:{...bl,fontSize:10,color:"#666"},children:a9(l)})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0},children:[(0,b.jsx)("span",{style:{...bl,fontSize:13,fontWeight:600,color:q?"#888":"#fff"},children:l.name}),(0,b.jsx)("span",{style:{flexShrink:0,fontSize:9,fontWeight:800,color:m,border:`1px solid ${m}55`,borderRadius:4,padding:"0 4px"},children:a.tier}),(0,b.jsx)(bp,{status:j,rarity:null}),q&&(0,b.jsx)("span",{style:{flexShrink:0,fontSize:10,color:"#666"},children:"out of network"})]}),(0,b.jsx)("div",{style:{...bl,fontSize:10,color:"#777",marginTop:2},children:a9(l)})]}),(0,b.jsx)(bm,{p:a,route:n,tierColors:g}),(0,b.jsx)(bo,{p:a,rarity:k}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,b.jsx)("div",{style:{flex:1,height:6,background:"rgba(255,255,255,0.06)",borderRadius:3},children:(0,b.jsx)("div",{style:{height:"100%",borderRadius:3,background:m,width:`${100*Math.max(0,Math.min(1,a.score/10))}%`}})}),(0,b.jsx)("span",{style:{fontSize:15,fontWeight:800,color:m,width:30,textAlign:"right"},children:a.score.toFixed(1)})]})]}),e&&(0,b.jsxs)("div",{style:{textAlign:"right"},children:[(0,b.jsx)("div",{style:{fontSize:13,fontWeight:800,color:m},children:a.score.toFixed(1)}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666",fontWeight:700},children:a.tier})]})]})}),bx={galaxy:{component:function({connections:a,onSelect:d,tierColors:e,focusNodeRef:f,userName:g,selectedId:h=null,scanNotes:i,fullDegree1:m,fullDegree2:S}){let T=(0,c.useMemo)(()=>{let b=(0,J.reachIndex)(m||a,S||[],i||{}),c=(0,J.readyByCircle)(b),d=new Map;for(let e of a){if(1!==(e.degree||1))continue;let a=(0,J.scanBars)(e,b),f=c.get(e.id)||0;(null!=a||f)&&d.set(e.id,{bars:a,ready:f})}return d},[a,m,S,i]),U=(0,c.useRef)(null),V=(0,c.useRef)(null),W=(0,c.useRef)(null),X=(0,c.useRef)({transform:null,size:null}),Y=(0,c.useRef)(null),[Z,$]=(0,c.useState)(null),_=(0,c.useRef)(null),aa=(0,c.useSyncExternalStore)(L.watchLab,L.labNow,()=>L.LAB_DEFAULTS),ab=(0,c.useRef)(aa);(0,c.useEffect)(()=>{ab.current=aa,W.current?.setLab((0,L.effectiveLab)(aa));let a=(0,L.clockNow)();W.current?.setFind(a.find,a.fly),aa.on&&(0,L.loadSocial)()},[aa]),(0,c.useEffect)(()=>(0,L.watchClock)(()=>{let a=(0,L.clockNow)();W.current?.setTime(a.at),W.current?.setFind(a.find,a.fly)}),[]),(0,c.useEffect)(()=>()=>(0,L.stopReplay)(),[]);let ac=(0,c.useSyncExternalStore)(L.watchClock,()=>(0,L.clockNow)().social,()=>void 0),ad=(0,L.effectiveLab)(aa).colourBy,ae=(0,c.useMemo)(()=>(0,L.colourScheme)(ad,a,e,ac),[ad,a,e,ac]),af=(0,c.useRef)(ae);(0,c.useEffect)(()=>{af.current=ae,W.current?.setColours(ae)},[ae]);let ag=(0,c.useRef)(d);(0,c.useEffect)(()=>{ag.current=d});let ah=(0,c.useRef)(h);(0,c.useEffect)(()=>{let a=U.current?.parentElement;if(!a)return;let b=()=>{let b=Math.round(a.clientWidth),c=Math.round(a.clientHeight);Y.current={width:b,height:c},$(a=>a&&a.width===b&&a.height===c?a:{width:b,height:c})};b();let c=new ResizeObserver(b);return c.observe(a),()=>c.disconnect()},[]),(0,c.useEffect)(()=>{ah.current=h,W.current?.select(h)},[h]),(0,c.useEffect)(()=>{Z&&W.current?.resize(Z)},[Z]);let ai=null!==Z;return(0,c.useEffect)(()=>{if(!ai||!U.current||!a.length)return;let b=j.select(U.current);b.selectAll("*").remove();let c=Y.current,{transform:d,size:h}=X.current,i=d?I(d,h,c):null,m=function(a,b,c,d,e,f,g,h,i,k,l=new Map,m=L.LAB_DEFAULTS,J=null,M=null){var Q,S,T;let U=M?.of??(a=>f[a.tier]||"#666"),V=[{id:O,name:k||"You",tier:"center",degree:0,power_score:10,fx:0,fy:0},...d.map(a=>({id:a.id,name:a.name,tier:a.tier,degree:a.degree||1,source_connection_id:a.source_connection_id,unlocked_from_bridge_id:a.unlocked_from_bridge_id,power_score:parseFloat(a.power_score)||1,company:a.company,role:a.role,headline:a.headline,profile_url:a.profile_url,profile_image_url:(0,H.localPhoto)(a.profile_image_url),connected_date:a.connected_date,seniority_score:a.seniority_score,company_prestige_score:a.company_prestige_score,influence_signals:a.influence_signals,is_catalyst:a.is_catalyst,catalyst_score:a.catalyst_score,circle_power:a.circle_power,circle_s_count:a.circle_s_count,circle_a_count:a.circle_a_count}))],W=new Map(V.map(a=>[a.id,a])),X=new Set(d.filter(a=>1===(a.degree||1)).map(a=>a.id)),Y=d.some(a=>(a.degree||1)>1),Z=new Map;for(let a of V){if(a.id===O)continue;let b=a.unlocked_from_bridge_id;1===a.degree&&Y&&null!=b&&b!==a.id&&X.has(b)?Z.set(a.id,b):2===a.degree&&X.has(a.source_connection_id)&&Z.set(a.id,a.source_connection_id)}let $=new Map,_=(a,b=new Set)=>{if(a.id===O)return 0;if($.has(a.id))return $.get(a.id);let c=Z.get(a.id),d=a.degree>=3?3:a.degree;return null==c||b.has(a.id)||(b.add(a.id),d=_(W.get(c),b)+1),d=Math.min(d,6),$.set(a.id,d),d},aa=d.map(a=>{let b=Z.get(a.id)??O;return{source:b,target:a.id,near:b!==O}}),ab=a=>{switch(a){case"S":return 150;case"A":return 250;case"B":return 350;case"C":return 450;default:return 520}},ac=["S","A","B","C","D"],ad=[[115,135,155,175,192],[265,300,335,370,398],[465,500,535,565,590],[660,690,720,745,765]],ae=[...new Set(V.filter(a=>a.id!==O).map(a=>_(a)))].sort((a,b)=>a-b),af=Y&&ae.length>1,ag=a=>{if(!af)return ab(a.tier);let b=Math.min(ae.indexOf(_(a)),ad.length-1),c=ac.indexOf(a.tier);return ad[b][c<0?4:c]},ah=window.innerWidth<768,ai=ah?{...L.LAB_DEFAULTS,labels:m.labels}:m,aj=(0,L.reachCounts)(V,Z),ak=a=>{if(a.id===O)return 18;if("reach"===ai.sizeBy)return Math.min(28,2.5+1.6*Math.sqrt(aj.get(a.id)||0))*ai.dotSize;let b=Math.max(3,Math.min(12,1.3*(a.power_score||1)));return(a.degree>1?Math.max(2.5,.75*b):b)*ai.dotSize},al=a.append("g"),am=new Map,an=null;if(!ah&&af){let a=an=al.append("g").attr("class","degree-guides").style("pointer-events","none"),b=["","1st","2nd","3rd","4th","5th","6th"];ae.slice(0,ad.length).forEach((c,d)=>{let e=ad[d][2];a.append("circle").attr("r",e).attr("fill","none").attr("stroke","#8899aa").attr("stroke-opacity",.12).attr("stroke-width",1).attr("stroke-dasharray","2 4"),a.append("text").attr("x",0).attr("y",-ad[d][4]-8).attr("text-anchor","middle").attr("font-size",10).attr("font-weight",700).attr("fill","#8899aa").attr("fill-opacity",.55).text(b[c]||`${c}th`)})}else if(!ah){let a=an=al.append("g").attr("class","tier-guides").style("pointer-events","none");for(let b of["S","A","B","C","D"]){let c=ab(b),d=a.append("circle").attr("r",c).attr("fill","none").attr("stroke",f[b]||"#666").attr("stroke-opacity",.16).attr("stroke-width",1).attr("stroke-dasharray","2 4"),e=a.append("text").attr("x",0).attr("y",-c-4).attr("text-anchor","middle").attr("font-size",10).attr("font-weight",700).attr("fill",f[b]||"#666").attr("fill-opacity",.5).text(b);am.set(b,{ring:d,label:e})}}let ao=null,ap=o.default().scaleExtent([.3,4]).on("zoom",a=>{al.attr("transform",a.transform),i.current={transform:ao??a.transform,size:c},at()});a.call(ap);let aq=(b,d)=>{if(P()){ao=null,a.interrupt().call(ap.transform,b);return}ao=b,i.current={transform:b,size:c},a.transition().duration(d).call(ap.transform,b).on("end interrupt cancel",()=>{ao===b&&(ao=null)})},ar=b.firstChild,as=null,at=()=>{if(!as)return;let c=p.default(a.node());b.style.transform=`translate(${c.applyX(as.x)}px, ${c.applyY(as.y)}px) scale(${c.k})`},au=a=>{if(as=null!=a&&a!==O?W.get(a)??null:null,b.style.display=as?"block":"none",!as)return;let c=ak(as)+8;ar.style.width=ar.style.height=`${2*c+2.5}px`,ar.style.margin=`${-(c+1.25)}px`,ar.style.borderColor=U(as)||"#FFD700",at()};if(h)a.call(ap.transform,n.identity.translate(h.x,h.y).scale(h.k));else{let b=ah&&c.width>0&&c.height>0?Math.min(c.width/1248,c.height/1248):1;a.call(ap.transform,n.identity.translate(c.width/2,c.height/2).scale(b))}if(g&&(g.current=a=>{let b=W.get(a);b&&(aq(n.identity.translate(c.width/2-2.5*b.x,c.height/2-2.5*b.y).scale(2.5),750),au(a))}),ah){let a={};V.forEach(b=>{let c=b.tier||"D";a[c]||(a[c]=[]),a[c].push(b)}),Object.entries(a).forEach(([a,b])=>{b.forEach((c,d)=>{if(c.id===O){c.x=0,c.y=0,c.fx=c.x,c.fy=c.y;return}let e=ab(a),f=d/b.length*Math.PI*2-Math.PI/2;c.x=e*Math.cos(f),c.y=e*Math.sin(f),c.fx=c.x,c.fy=c.y})})}let av=ah?0:af?.06:.1,aw=af?.45:.3,ax=a=>(a.near?Math.max(40,ag(a.target)-ag(a.source)):ag(a.target))*ai.distance,ay=a=>(a.id===O?-20:-1)*ai.push,az=q.forceSimulation(V).force("link",r.forceLink(aa).id(a=>a.id).distance(ax).strength(Math.min(1,av*ai.pull))).force("charge",s.forceManyBody().strength(ah?0:ay)).force("center",ah?null:function(a,b){var c,d=1;function e(){var e,f,g=c.length,h=0,i=0;for(e=0;e<g;++e)h+=(f=c[e]).x,i+=f.y;for(h=(h/g-a)*d,i=(i/g-b)*d,e=0;e<g;++e)f=c[e],f.x-=h,f.y-=i}return null==a&&(a=0),null==b&&(b=0),e.initialize=function(a){c=a},e.x=function(b){return arguments.length?(a=+b,e):a},e.y=function(a){return arguments.length?(b=+a,e):b},e.strength=function(a){return arguments.length?(d=+a,e):d},e}(0,0)).force("gravityX",ah?null:t.forceX(0).strength(.15*ai.gravity)).force("gravityY",ah?null:u.forceY(0).strength(.15*ai.gravity)).force("collision",ah?null:v.forceCollide().radius(a=>ak(a)+2)).force("radial",ah?null:(function(a,b,c){var d,e,f,g=(0,w.default)(.1);function h(a){for(var g=0,h=d.length;g<h;++g){var i=d[g],j=i.x-b||1e-6,k=i.y-c||1e-6,l=Math.sqrt(j*j+k*k),m=(f[g]-l)*e[g]*a/l;i.vx+=j*m,i.vy+=k*m}}function i(){if(d){var b,c=d.length;for(e=Array(c),f=Array(c),b=0;b<c;++b)f[b]=+a(d[b],b,d),e[b]=isNaN(f[b])?0:+g(d[b],b,d)}}return"function"!=typeof a&&(a=(0,w.default)(+a)),null==b&&(b=0),null==c&&(c=0),h.initialize=function(a){d=a,i()},h.strength=function(a){return arguments.length?(g="function"==typeof a?a:(0,w.default)(+a),i(),h):g},h.radius=function(b){return arguments.length?(a="function"==typeof b?b:(0,w.default)(+b),i(),h):a},h.x=function(a){return arguments.length?(b=+a,h):b},h.y=function(a){return arguments.length?(c=+a,h):c},h})(a=>a.id===O?0:ag(a),0,0).strength(aw*ai.rings));an?.attr("opacity",Math.min(1,ai.rings)),az.on("end.guides",()=>{for(let[a,{ring:b,label:c}]of am){let d=V.filter(b=>b.tier===a&&b.id!==O).map(a=>Math.hypot(a.x||0,a.y||0)).sort((a,b)=>a-b);if(!d.length){b.attr("opacity",0),c.attr("opacity",0);continue}let e=d[Math.floor(d.length/2)];b.attr("r",e).attr("opacity",1),c.attr("y",-e-4).attr("opacity",1)}});let aA=M?.heat||null,aB=a.select("defs").size()?a.select("defs"):a.append("defs");for(let a=0;a<=5;a++){if(aB.select(`#heat-glow-${a}`).size())continue;let b=aB.append("radialGradient").attr("id",`heat-glow-${a}`);b.append("stop").attr("offset","0").attr("stop-color",(0,L.heatColour)(a/5)).attr("stop-opacity",.14+.06*a),b.append("stop").attr("offset","1").attr("stop-color",(0,L.heatColour)(a/5)).attr("stop-opacity",0)}let aC=al.append("g").attr("class","heat-glow").style("pointer-events","none").style("mix-blend-mode","screen"),aD=aC.selectAll("circle"),aE=()=>{let a=aA?V.filter(a=>a.id!==O&&aA(a)>=.5).sort((a,b)=>aA(b)-aA(a)).slice(0,700):[];aD=aC.selectAll("circle").data(a,a=>a.id).join("circle").attr("r",a=>2.5*ak(a)+12+30*aA(a)).attr("fill",a=>`url(#heat-glow-${Math.round(5*aA(a))})`).attr("cx",a=>a.x||0).attr("cy",a=>a.y||0).style("display",a=>null==a2||aW.get(a.id)<=a2?null:"none")},aF=al.append("g").selectAll("line").data(aa).join("line").attr("class","gl").attr("stroke",a=>U(a.target)||"#333").attr("stroke-opacity",.15).attr("stroke-width",.5*ai.lines),aG=V.filter(a=>a.is_catalyst&&l.get(a.id)?.bars==null);if(aG.length){let b=a.select("defs").size()?a.select("defs"):a.append("defs");if(!b.select("#catalyst-glow-nm").size()){let a=b.append("filter").attr("id","catalyst-glow-nm").attr("x","-60%").attr("y","-60%").attr("width","220%").attr("height","220%");a.append("feGaussianBlur").attr("stdDeviation","5").attr("result","blur"),a.append("feMerge").html('<feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/>')}al.append("g").selectAll("circle").data(aG).join("circle").attr("r",a=>ak(a)+6).attr("fill","none").attr("stroke","#00ff88").attr("stroke-width",2).attr("stroke-dasharray","3,3").attr("filter","url(#catalyst-glow-nm)").attr("cx",a=>a.x||0).attr("cy",a=>a.y||0).attr("class","catalyst-ring")}let aH=V.filter(a=>l.has(a.id)),aI=al.append("g").attr("class","dot-rings").style("pointer-events","none").selectAll("g").data(aH).join("g").attr("transform",a=>`translate(${a.x||0},${a.y||0})`);function aJ(a){let{bars:b,ready:c}=l.get(a.id),d=ak(a)+3.5,e=j.select(this);if(e.selectAll("*").remove(),null!=b){let a;for(let c of(a=(2*Math.PI-1.6)/5,Array.from({length:5},(b,c)=>{let e=-Math.PI/2+.16+c*(a+.32),f=a=>`${(d*Math.cos(a)).toFixed(2)} ${(d*Math.sin(a)).toFixed(2)}`;return{i:c,d:`M${f(e)} A${d} ${d} 0 0 1 ${f(e+a)}`}})))e.append("path").attr("d",c.d).attr("fill","none").attr("stroke-linecap","round").attr("stroke-width",1.6).attr("stroke",c.i<b?"#1abc9c":K)}if(c>0){let a=.72*d;e.append("circle").attr("cx",a).attr("cy",a).attr("r",5.5).attr("fill","#7F77DD"),e.append("text").attr("x",a).attr("y",a+2.5).attr("text-anchor","middle").attr("font-size",7).attr("font-weight",700).attr("fill","#fff").text(c>9?"9+":c)}}aI.each(aJ);let aK=al.append("g").selectAll("circle").data(V).join("circle").attr("class","gn").attr("r",ak).attr("fill",a=>a.id===O?"#fff":U(a)).attr("fill-opacity",a=>a.degree>=3?.55:2===a.degree?.75:1).attr("stroke",a=>a.id===O?"#FFD700":a.is_catalyst?"#00ff88":"none").attr("stroke-width",a=>a.id===O?3:2.5*!!a.is_catalyst).style("cursor","pointer").on("click",(a,b)=>{b.id!==O&&(au(b.id),e(b))}),aL=j.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"),aM=j.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"),aN=new Map;for(let[a,b]of Z)aN.has(b)||aN.set(b,[]),aN.get(b).push(a);let aO=null;aK.on("mouseover",function(a,b){if(R(this,1.5*ak(b)),clearTimeout(aO),ai.on&&ai.branch&&b.id!==O&&(a=>{let b=new Set([O,a.id]),c=[a.id];for(;c.length;)for(let a of aN.get(c.pop())||[])b.has(a)||(b.add(a),c.push(a));for(let c=Z.get(a.id),d=0;null!=c&&d<7;c=Z.get(c),d++)b.add(c);aK.classed("lit",a=>b.has(a.id)),aF.classed("lit",a=>b.has(a.source.id)&&b.has(a.target.id)),al.classed("lab-focus",!0)})(b),b.profile_image_url&&b.id!==O){var c;let d,e=Math.max(48,5*ak(b));aM.style("opacity",1),c=f[b.tier]||"#555",aM.selectAll("*").remove(),(d=(0,H.localPhoto)(b.profile_image_url))?aM.append("img").attr("src",d).style("width",e+"px").style("height",e+"px").style("border-radius","50%").style("object-fit","cover").style("border",`2px solid ${c}`).style("display","block").on("error",function(){this.parentElement.style.display="none"}):aM.style("opacity",0),aM.style("left",a.clientX-e/2+"px").style("top",a.clientY-e-8+"px"),aL.style("opacity",1).html(`<strong>${N(b.name)}</strong>`).style("left",a.clientX-40+"px").style("top",a.clientY+12+"px").style("text-align","center").style("min-width","80px")}else aL.style("opacity",1).html(`<strong>${N(b.name)}</strong>${b.company?"<br/>"+N(b.company):""}${b.tier?"<br/>Tier: "+N(b.tier):""}`).style("left",a.clientX+12+"px").style("top",a.clientY-10+"px")}).on("mousemove",function(a,b){if(b.profile_image_url&&b.id!==O){let c=Math.max(48,5*ak(b));aM.style("left",a.clientX-c/2+"px").style("top",a.clientY-c-8+"px"),aL.style("left",a.clientX-40+"px").style("top",a.clientY+12+"px")}else aL.style("left",a.clientX+12+"px").style("top",a.clientY-10+"px")}).on("mouseout",function(a,b){R(this,ak(b)),clearTimeout(aO),aO=setTimeout(()=>al.classed("lab-focus",!1),120),aL.style("opacity",0),aM.style("opacity",0)}),Q=aK,S=az,T=O,Q.call((function(){var a,b,c,d,e=D,f=E,g=F,h=G,i={},k=(0,x.dispatch)("start","drag","end"),l=0,m=0;function n(a){a.on("mousedown.drag",o).filter(h).on("touchstart.drag",r).on("touchmove.drag",s,A.nonpassive).on("touchend.drag touchcancel.drag",t).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function o(g,h){if(!d&&e.call(this,g,h)){var i=u(this,f.call(this,g,h),g,h,"mouse");i&&((0,j.select)(g.view).on("mousemove.drag",p,A.nonpassivecapture).on("mouseup.drag",q,A.nonpassivecapture),(0,z.default)(g.view),(0,A.nopropagation)(g),c=!1,a=g.clientX,b=g.clientY,i("start",g))}}function p(d){if((0,A.default)(d),!c){var e=d.clientX-a,f=d.clientY-b;c=e*e+f*f>m}i.mouse("drag",d)}function q(a){(0,j.select)(a.view).on("mousemove.drag mouseup.drag",null),(0,z.yesdrag)(a.view,c),(0,A.default)(a),i.mouse("end",a)}function r(a,b){if(e.call(this,a,b)){var c,d,g=a.changedTouches,h=f.call(this,a,b),i=g.length;for(c=0;c<i;++c)(d=u(this,h,a,b,g[c].identifier,g[c]))&&((0,A.nopropagation)(a),d("start",a,g[c]))}}function s(a){var b,c,d=a.changedTouches,e=d.length;for(b=0;b<e;++b)(c=i[d[b].identifier])&&((0,A.default)(a),c("drag",a,d[b]))}function t(a){var b,c,e=a.changedTouches,f=e.length;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),b=0;b<f;++b)(c=i[e[b].identifier])&&((0,A.nopropagation)(a),c("end",a,e[b]))}function u(a,b,c,d,e,f){var h,j,m,o=k.copy(),p=(0,y.pointer)(f||c,b);if(null!=(m=g.call(a,new C("beforestart",{sourceEvent:c,target:n,identifier:e,active:l,x:p[0],y:p[1],dx:0,dy:0,dispatch:o}),d)))return h=m.x-p[0]||0,j=m.y-p[1]||0,function c(f,g,k){var q,r=p;switch(f){case"start":i[e]=c,q=l++;break;case"end":delete i[e],--l;case"drag":p=(0,y.pointer)(k||g,b),q=l}o.call(f,a,new C(f,{sourceEvent:g,subject:m,target:n,identifier:e,active:q,x:p[0]+h,y:p[1]+j,dx:p[0]-r[0],dy:p[1]-r[1],dispatch:o}),d)}}return n.filter=function(a){return arguments.length?(e="function"==typeof a?a:B(!!a),n):e},n.container=function(a){return arguments.length?(f="function"==typeof a?a:B(a),n):f},n.subject=function(a){return arguments.length?(g="function"==typeof a?a:B(a),n):g},n.touchable=function(a){return arguments.length?(h="function"==typeof a?a:B(!!a),n):h},n.on=function(){var a=k.on.apply(k,arguments);return a===k?n:a},n.clickDistance=function(a){return arguments.length?(m=(a*=1)*a,n):Math.sqrt(m)},n})().on("start",(a,b)=>{a.active||S.alphaTarget(.3).restart(),b.fx=b.x,b.fy=b.y}).on("drag",(a,b)=>{b.fx=a.x,b.fy=a.y}).on("end",(a,b)=>{a.active||S.alphaTarget(0),b.id!==T&&(b.fx=null,b.fy=null)}));let aP=null,aQ=a=>!!(aP&&aP.size<=40&&aP.has(a.id))||!!ai.labels&&(a.id===O||1===a.degree&&("all"===ai.names||"S"===a.tier||a.is_catalyst)),aR=al.append("g"),aS=aR.selectAll("text"),aT=()=>{aS=aR.selectAll("text").data(V.filter(aQ),a=>a.id).join("text").text(a=>a.is_catalyst&&"S"!==a.tier?a.name+" ⚡":a.name).attr("font-size",a=>a.id===O?14:10).attr("font-weight",a=>a.id===O?700:500).attr("fill",a=>a.id===O?"#fff":a.is_catalyst?"#00ff88":U(a)).attr("text-anchor","middle").attr("dy",a=>ak(a)+14).attr("x",a=>a.x||0).attr("y",a=>a.y||0).style("pointer-events","none")};aT();let aU=al.selectAll(".catalyst-ring");az.on("tick",()=>{aF.attr("x1",a=>a.source.x).attr("y1",a=>a.source.y).attr("x2",a=>a.target.x).attr("y2",a=>a.target.y),aK.attr("cx",a=>a.x).attr("cy",a=>a.y),aU.attr("cx",a=>a.x).attr("cy",a=>a.y),aI.attr("transform",a=>`translate(${a.x},${a.y})`),aS.attr("x",a=>a.x).attr("y",a=>a.y),aA&&aD.attr("cx",a=>a.x).attr("cy",a=>a.y),at()}),al.classed("lab-pop",ai.on&&V.length<5e3);let aV=(0,L.bornTimes)(V,Z),aW=new Map(V.map((a,b)=>[a.id,aV[b]])),aX=aK.nodes(),aY=aF.nodes(),aZ=new Map;aI.each(function(a){aZ.set(a.id,[this])}),aU.each(function(a){aZ.set(a.id,[...aZ.get(a.id)||[],this])});let a$=new Uint8Array(V.length).fill(1),a_=V.filter(a=>1===a.degree),a0=a_.map(a=>aW.get(a.id)).filter(Number.isFinite),a1={min:a0.length?a0.reduce((a,b)=>Math.min(a,b)):null,max:a0.length?a0.reduce((a,b)=>Math.max(a,b)):null,of:a_.length},a2=null,a3=()=>{let a=a=>null==a2||aW.get(a.id)<=a2?null:"none";aS.style("display",a),aA&&aD.style("display",a)};aE();let a4="",a5=(0,L.clockNow)().fly;return{simulation:az,resize:b=>{let d=I(ao??p.default(a.node()),c,b);c=b,aq(n.identity.translate(d.x,d.y).scale(d.k),250)},select:au,setLab:a=>{if(ah){a.labels!==ai.labels&&(ai={...ai,labels:a.labels},aT(),a3());return}let b=ai;ai=a;let c=b.dotSize!==ai.dotSize||b.sizeBy!==ai.sizeBy;c&&(aK.attr("r",ak),aU.attr("r",a=>ak(a)+6),aI.each(aJ),az.force("collision").radius(a=>ak(a)+2),as&&au(as.id)),b.lines!==ai.lines&&aF.attr("stroke-width",.5*ai.lines),(c||b.names!==ai.names||b.labels!==ai.labels)&&(aT(),a3()),ai.on&&ai.branch||al.classed("lab-focus",!1),al.classed("lab-pop",ai.on&&V.length<5e3),(["gravity","rings","push","pull","distance"].some(a=>b[a]!==ai[a])||c)&&(az.force("link").distance(ax).strength(Math.min(1,av*ai.pull)),az.force("charge").strength(ay),az.force("gravityX").strength(.15*ai.gravity),az.force("gravityY").strength(.15*ai.gravity),az.force("radial").strength(aw*ai.rings),an?.attr("opacity",Math.min(1,ai.rings)),az.alpha(Math.max(az.alpha(),.5)).restart())},setTime:a=>{ai.on||(a=null),a2=a;let b=0;for(let c=1;c<V.length;c++){let d=+(null==a||aV[c]<=a);if(d&&1===V[c].degree&&b++,d===a$[c])continue;a$[c]=d;let e=d?"":"none";for(let a of(aX[c].style.display=e,aY[c-1]&&(aY[c-1].style.display=e),aZ.get(V[c].id)||[]))a.style.display=e}if(a3(),J&&(J.style.display=null==a?"none":"block",null!=a)){let c=new Date(a).toLocaleDateString(void 0,{month:"short",year:"numeric"}),d=(0,L.chapterAt)((0,L.clockNow)().social,a);J.textContent=`${c} \xb7 ${b.toLocaleString()} of ${a1.of.toLocaleString()} connections${d?` \xb7 at ${d.company}`:""}`}},setColours:a=>{U=a.of,aA=a.heat||null,aE(),aK.attr("fill",a=>a.id===O?"#fff":U(a)),aF.attr("stroke",a=>U(a.target)||"#333"),aT(),a3(),as&&au(as.id)},setFind:(a,b)=>{let d=ai.on?String(a||""):"";if(d!==a4&&(a4=d,aP=(0,L.findMatches)(V.filter(a=>a.id!==O),d),aK.classed("found",a=>!!aP?.has(a.id)),aF.classed("found",a=>!!aP?.has(a.target.id)),al.classed("lab-find",!!aP),aT(),a3(),(0,L.setClock)({found:aP?aP.size:0})),b!==a5){a5=b;let a=aP&&V.filter(a=>aP.has(a.id)).sort((a,b)=>(b.power_score||0)-(a.power_score||0))[0];a&&(aq(n.identity.translate(c.width/2-2.5*a.x,c.height/2-2.5*a.y).scale(2.5),750),au(a.id),e(a))}},range:a1}}(b,V.current,c,a,a=>ag.current?.(a),e,f,i,X,g,T,(0,L.effectiveLab)(ab.current),_.current,af.current);W.current=m,m.select(ah.current),(0,L.setClock)({min:m.range.min,max:m.range.max,of:m.range.of}),m.setTime((0,L.clockNow)().at),m.setFind((0,L.clockNow)().find,(0,L.clockNow)().fly);let J=(0,M.registerGalaxy)({svg:U.current,stamp:()=>_.current?.style.display==="block"?_.current.textContent:null,legend:()=>af.current.legend});return()=>{var a;m.simulation.stop(),J(),b.interrupt(),W.current=null,("string"==typeof(a=".graph-tooltip")?new l.Selection([document.querySelectorAll(a)],[document.documentElement]):new l.Selection([(0,k.default)(a)],l.root)).remove()}},[a,e,ai,T]),(0,b.jsxs)("div",{style:{flex:1,position:"relative",overflow:"hidden"},children:[(0,b.jsx)("style",{children:Q}),(0,b.jsx)("svg",{ref:U,width:Z?.width??800,height:Z?.height??600,style:{background:"#0a0a1a"}}),(0,b.jsx)("div",{ref:V,className:"galaxy-ring",style:{position:"absolute",left:0,top:0,display:"none",pointerEvents:"none",transformOrigin:"0 0"},children:(0,b.jsx)("div",{className:"galaxy-ring-pulse",style:{boxSizing:"border-box",border:"2.5px solid",borderRadius:"50%"}})}),(0,b.jsx)("div",{ref:_,style:{position:"absolute",bottom:56,left:"50%",transform:"translateX(-50%)",display:"none",padding:"6px 14px",borderRadius:16,background:"rgba(10,15,30,0.8)",border:"1px solid rgba(255,255,255,0.12)",color:"#e6edf5",fontSize:13,fontWeight:600,pointerEvents:"none",fontVariantNumeric:"tabular-nums"}}),(0,b.jsx)("div",{style:{position:"absolute",bottom:20,left:20,right:20,display:"flex",flexWrap:"wrap",gap:"4px 12px",fontSize:11,color:"#888",pointerEvents:"none"},children:ae.legend.map(([a,c])=>(0,b.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:4,whiteSpace:"nowrap"},children:[(0,b.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",background:c,display:"inline-block"}}),a]},a))})]})},modes:["network"],label:"Galaxy",icon:"🌌",desc:"Force-directed layout"},separation:{component:function({connections:a=[],degree2:d=[],fullDegree1:e=a,fullDegree2:f=d,onSelect:i,userName:j,selectedId:k,tierColors:l=a3,preset:m=null}){let n=function(){let[a,b]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{let a=()=>b(window.innerWidth<768);return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),a}(),o=(0,c.useSyncExternalStore)(a_.watchNotchShown,a_.notchShownNow,a_.noNotch),p=n?68:56,q=n?5:10,r=n?8:16,[s,t]=(0,c.useState)(""),u=(0,c.useDeferredValue)(s.trim().toLowerCase()),[v,w]=(0,c.useState)(50),x=(0,c.useDeferredValue)(v),[y,z]=(0,c.useState)("all"),[A,B]=(0,c.useState)(()=>new Set),[C,D]=(0,c.useState)(null),[E,F]=(0,c.useState)(!1),[G,H]=(0,c.useState)(""),[I,J]=(0,c.useState)(!1),[K,L]=(0,c.useState)(null);m&&m.id!==K&&(L(m.id),t(m.query||""),z(m.tier||"all"),B(new Set(m.rarity?[m.rarity]:[])));let M=(0,g.default)(),[N,O]=(0,c.useState)(0),[P,Q]=(0,c.useState)({w:0,h:800}),[R,S]=(0,c.useState)(null),U=(0,c.useRef)(null),V=(0,c.useCallback)(a=>{U.current=a,S(a)},[]),W=(0,c.useRef)(null),X=(0,c.useMemo)(()=>(0,T.separationPeople)(d,a),[d,a]),Y=(0,c.useMemo)(()=>(0,T.routeIndex)(f),[f]),Z=(0,c.useMemo)(()=>{let a=new Map;for(let b of X.people)a.set(b.key,aW(b.person,Y.get(b.key)?.size||b.waysIn));return a},[X,Y]),$=(0,c.useMemo)(()=>{if(50===x)return X.people;let a=new Map;for(let b of X.people)a.set(b.key,function(a,b,c=50){let d=(Math.max(0,Math.min(100,Number(c)||0))-50)/50;if(!d)return a;let e=aZ(b),f=Math.abs(d);return a*(1-f+f*(d<0?1-e:e))}(b.score,Z.get(b.key)?.count||b.waysIn,x));return[...X.people].sort((b,c)=>a.get(c.key)-a.get(b.key)||(0,T.comparePower)(b,c))},[X,Z,x]),_=(0,c.useMemo)(()=>{let a=Object.fromEntries(aT.map(a=>[a.key,0]));for(let b of Z.values())a[b.key]++;return a},[Z]),aa=(0,c.useMemo)(()=>{if(!I)return null;let a=new Map,b=new Map,c=new Map;for(let d of X.people){let e=(0,aS.companyOf)(d.person)||null,f=(0,aS.industryOf)(e,d.person.headline).key;a.set(d.key,{company:e,sector:f}),b.set(f,(b.get(f)||0)+1),e&&c.set(e,(c.get(e)||0)+1)}return{by:a,sectors:aS.INDUSTRIES.map(a=>({...a,count:b.get(a.key)||0})).filter(a=>a.count>0).sort((a,b)=>b.count-a.count),companies:[...c].map(([a,b])=>({name:a,count:b})).sort((a,b)=>b.count-a.count||a.name.localeCompare(b.name))}},[X,I]),ab=(0,c.useCallback)(a=>{if(!C||!aa)return!0;let b=aa.by.get(a.key);return"sector"===C.kind?b?.sector===C.key:b?.company===C.key},[C,aa]),ac=(0,c.useCallback)((a,b)=>("all"===y||a.tier===y)&&(!A.size||A.has(Z.get(a.key)?.key))&&ab(a)&&(!b||a.haystack.includes(b)),[y,A,Z,ab]),ad=(0,c.useMemo)(()=>u||"all"!==y||A.size||C?$.filter(a=>ac(a,u)):$,[$,u,y,A,C,ac]),ae=(0,c.useMemo)(()=>new Set(e.map(T.keyFor)),[e]),af=(0,c.useCallback)(a=>ae.has(a.key)?"connected":(0,h.hasRequest)(a.person,M)?"asked":null,[ae,M]),ag=(0,T.mapCount)(x,q),ah=(0,c.useMemo)(()=>ad.filter(a=>!af(a)).slice(0,q+1),[ad,q,af]),ai=(0,c.useMemo)(()=>ah.slice(0,ag),[ah,ag]),aj=(0,c.useMemo)(()=>ad.reduce((a,b)=>a+ +!!af(b),0),[ad,af]),ak=null!=k?X.rowToKey.get(k)??null:null,al=1===ag,am=(0,c.useMemo)(()=>al?(0,T.mostMutuals)(ad.filter(a=>!af(a)),a=>Z.get(a.key)?.count||0,(n?3:6)+1):[],[al,ad,af,Z,n]),an=(0,c.useMemo)(()=>al&&(ak&&ad.find(a=>a.key===ak)||am[0])||null,[al,ak,ad,am]),ao=(0,c.useMemo)(()=>al&&an?am.filter(a=>a.key!==an.key).slice(0,n?3:6):[],[al,an,am,n]),ap=(0,c.useRef)(i);(0,c.useEffect)(()=>{ap.current=i});let aq=(0,c.useCallback)(a=>ap.current?.(a.person),[]),ar=(0,c.useCallback)(a=>{a&&ap.current?.(a)},[]);(0,c.useEffect)(()=>{if(!R)return;let a=new ResizeObserver(()=>{let a=Math.round(R.clientWidth),b=Math.round(R.clientHeight);Q(c=>c.w===a&&c.h===b?c:{w:a,h:b})});return a.observe(R),()=>a.disconnect()},[R]);let as=Math.max(0,Math.min(980,P.w-2*r)),at=!n&&as>=760,au=(0,c.useMemo)(()=>al?(0,T.convergeLayout)(an,as||800,n,{cards:at,mutuals:an&&Z.get(an.key)?.count||0}):(0,T.summitLayout)(ai,as||800,n,{cards:at}),[al,an,ai,as,n,at,Z]),av=n?58:40,aw=38*!!ao.length,ax=al?an?au.height+aw:0:au.height,ay=ax?av+ax+12:0,az=ay+44*!n+28,aA=az+ad.length*p+72,aB=Math.max(0,Math.floor((N-az)/p)-8),aC=Math.min(ad.length,aB+Math.ceil(P.h/p)+16),aD=(0,c.useCallback)(a=>{let b=16*Math.floor(a.currentTarget.scrollTop/16);O(a=>a===b?a:b)},[]),aE=(0,c.useCallback)(()=>{U.current&&(U.current.scrollTop=0),O(0)},[]);(0,c.useEffect)(()=>{let a=a=>{if("/"!==a.key||a.metaKey||a.ctrlKey||a.altKey)return;let b=a.target;b&&("INPUT"===b.tagName||"TEXTAREA"===b.tagName||"SELECT"===b.tagName||b.isContentEditable)||(a.preventDefault(),W.current?.focus())};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[]);let aF=a=>{t(a),aE()},aG=a=>{D(a),F(!1),aE()},aH=a=>{w(Math.max(0,Math.min(100,Math.round(Number(a)||0)))),aE()},{summary:aI}=X,aJ=!!u||"all"!==y||A.size>0||!!C,aK=function(a=50){let b=Math.max(0,Math.min(100,Math.round(Number(a)||0)));return b<=10?{name:"Rarest first",detail:"Strong people with one way in: the connection who knows them is the only door you have."}:b<45?{name:"Leaning rare",detail:"Strong people with few mutual connections move up; the ones everybody knows move down."}:b<=55?{name:"By power",detail:"Each person’s own score alone. How many of your connections know them doesn’t change the order."}:b<90?{name:"Leaning easy",detail:"Strong people you share more mutual connections with move up: more people who could introduce you."}:{name:"Easiest first",detail:"Strong people you share the most mutual connections with: the warmest introductions. All the way right, the map aims at whoever you share the most with, with the ones in circles you haven’t scanned yet as grey dots."}}(v),aL=v<45?bs:v>55?bt:"#FFD700",aM=!j||/^you$/i.test(String(j).trim())?"You":(0,a$.initialsFor)(j),aN=ad.slice(aB,aC);return(0,b.jsxs)("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",background:"#0a0a1a",color:"#fff",overflow:"hidden"},children:[(0,b.jsxs)("div",{style:{padding:`${o?48:14}px 56px 8px`,flexShrink:0},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:[(0,b.jsx)("h2",{style:{margin:0,fontSize:18,fontWeight:800,background:"linear-gradient(135deg, #FFD700, #FF6B35)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Separation"}),(0,b.jsx)("span",{style:{fontSize:12,color:"#aaa"},children:n?`${a7(aI.people,"person","people")} \xb7 ${a6(aI.byTier.S)} S \xb7 ${a6(aI.multi)} with 2+ ways`:`${a7(aI.people,"person","people")} two steps away \xb7 ${a6(aI.byTier.S)} S-tier \xb7 ${a6(aI.multi)} reachable 2+ ways \xb7 through ${a6(aI.bridges)} of your connections`})]}),(0,b.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:T.TIERS.filter(a=>aI.byTier[a]>0).map(a=>(0,b.jsx)("div",{style:{flex:aI.byTier[a],background:l[a]||"#555"}},a))}),(0,b.jsx)("div",{style:{fontSize:11,color:"#777",lineHeight:1.4},children:n?"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."}),aI.peopleOnlyUnresolved>0&&(0,b.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:[a7(aI.peopleOnlyUnresolved,"of these people","of these people")," ","came only through ",a7(aI.onlyUnresolvedVia,"connection record","connection records")," ","that ",1===aI.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,b.jsxs)("div",{style:{padding:"0 56px 10px",flexShrink:0,borderBottom:"1px solid rgba(255,255,255,0.06)"},children:[(0,b.jsx)("style",{children:bu}),(0,b.jsx)("input",{ref:W,type:"search",value:s,onChange:a=>aF(a.target.value),onKeyDown:a=>{if("Enter"===a.key){let a=s.trim().toLowerCase(),b=$.find(b=>ac(b,a));b&&aq(b)}else"Escape"===a.key&&(s?aF(""):a.currentTarget.blur())},placeholder:"Search people, companies, or who knows them","aria-label":"Search people, companies, or who knows them",style:{width:"100%",minWidth:0,height:n?44:34,boxSizing:"border-box",padding:"0 12px",borderRadius:8,outline:"none",color:"#fff",fontSize:n?16:13,border:"1px solid rgba(255,255,255,0.12)",background:"rgba(255,255,255,0.05)"}}),(0,b.jsxs)("div",{style:{marginTop:8,padding:n?"8px 10px":"8px 14px",borderRadius:12,position:"relative",border:"1px solid rgba(255,255,255,0.08)",background:"rgba(255,255,255,0.025)"},children:[E&&(0,b.jsx)(bq,{facets:aa,text:G,onText:H,isMobile:n,onPick:aG,onClose:()=>F(!1)}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:n?"nowrap":"wrap",minWidth:0,overflowX:n?"auto":"visible",scrollbarWidth:"thin"},children:[(0,b.jsx)("span",{style:{fontSize:10,color:"#666",whiteSpace:"nowrap",flexShrink:0,textTransform:"uppercase",letterSpacing:.5},children:"Their tier"}),["all",...T.TIERS].map(a=>{let c=y===a,d="all"===a?"#fff":l[a]||"#888",e="all"===a?aI.people:aI.byTier[a];return(0,b.jsxs)("button",{type:"button","aria-pressed":c,onClick:()=>{z(a),aE()},style:{height:n?40:30,padding:"0 10px",borderRadius:15,cursor:"pointer",flexShrink:0,fontSize:12,fontWeight:700,whiteSpace:"nowrap",border:`1px solid ${c?d:"rgba(255,255,255,0.1)"}`,background:c?`${"#fff"===d?"#ffffff":d}22`:"rgba(255,255,255,0.03)",color:c?d:"#999"},children:["all"===a?"All":a,(0,b.jsx)("span",{style:{marginLeft:5,fontWeight:500,color:c?d:"#666",opacity:.85},children:a6(e)})]},a)}),(0,b.jsxs)("span",{style:{display:"inline-flex",flexShrink:0,height:n?40:30,borderRadius:15,overflow:"hidden",border:`1px solid ${C?br:"rgba(0,255,136,0.35)"}`,background:C?"rgba(0,255,136,0.12)":"rgba(0,255,136,0.04)"},children:[(0,b.jsx)("button",{type:"button","aria-haspopup":"dialog","aria-expanded":E,onClick:()=>E?F(!1):void(J(!0),H(""),F(!0)),title:"Narrow everyone to one sector or one company",style:{padding:C?"0 6px 0 12px":"0 12px",border:"none",background:"none",cursor:"pointer",fontSize:12,fontWeight:700,whiteSpace:"nowrap",color:br,maxWidth:n?200:300,overflow:"hidden",textOverflow:"ellipsis"},children:C?(0,b.jsxs)(b.Fragment,{children:["Path",(0,b.jsxs)("span",{style:{fontWeight:500,color:"#cfe"},children:[" · ",C.label]})]}):"Path ▾"}),C&&(0,b.jsx)("button",{type:"button","aria-label":`Clear the path: ${C.label}`,onClick:()=>aG(null),style:{padding:"0 10px 0 4px",border:"none",background:"none",cursor:"pointer",fontSize:14,color:br},children:"×"})]}),(0,b.jsxs)("span",{"aria-live":"polite",style:{marginLeft:"auto",flexShrink:0,height:n?40:30,padding:"0 12px",borderRadius:15,boxSizing:"border-box",display:"inline-flex",alignItems:"center",gap:7,fontSize:12,fontWeight:700,whiteSpace:"nowrap",border:`1px solid ${aL}66`,background:`${aL}14`,color:aL},children:[(0,b.jsx)("span",{style:{width:7,height:7,borderRadius:"50%",background:aL}}),(0,b.jsx)("span",{style:{fontVariantNumeric:"tabular-nums"},children:v}),aK.name]})]}),(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",marginTop:8,fontSize:10.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase"},children:[(0,b.jsxs)("span",{style:{color:bs},children:["Rare",n?"":" · one way in"]}),(0,b.jsx)("span",{style:{color:"#FFD700"},children:"Power"}),(0,b.jsxs)("span",{style:{color:bt},children:["Easy",n?"":" · many mutual connections"]})]}),(0,b.jsx)("input",{className:"sepslide",type:"range",min:0,max:100,step:1,value:v,onChange:a=>aH(a.target.value),onDoubleClick:()=>aH(50),"aria-label":"Order: the rarest ways in, to the easiest","aria-valuetext":`${v}: ${aK.name}`,title:"Drag to reorder everyone. Double-click to go back to the middle."}),(0,b.jsx)("div",{style:{display:"flex",justifyContent:"space-between",marginTop:-2},children:[[0,"Rarest"],[25,""],[50,"By power"],[75,""],[100,"Easiest"]].map(([a,c])=>(0,b.jsxs)("button",{type:"button",onClick:()=>aH(a),"aria-label":`Set the slider to ${a}${c?`: ${c}`:""}`,style:{padding:"2px 4px",border:"none",background:"none",cursor:"pointer",fontSize:10,color:v===a?"#fff":"#667",fontWeight:v===a?700:500,fontVariantNumeric:"tabular-nums"},children:[a,c&&!n?` \xb7 ${c}`:""]},a))}),(0,b.jsxs)("div",{style:{marginTop:4,fontSize:11.5,lineHeight:1.45,color:"#bbb"},children:[(0,b.jsxs)("span",{style:{color:aL,fontWeight:700},children:[aK.name,"."]})," ",aK.detail,!n&&(0,b.jsxs)("span",{style:{color:"#667"},children:[" ","It only reorders: scores, tiers and ranks stay as they are."]})]}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginTop:8,minWidth:0,flexWrap:n?"nowrap":"wrap",overflowX:n?"auto":"visible",scrollbarWidth:"thin"},children:[(0,b.jsx)("span",{title:bv,style:{fontSize:10,color:"#666",whiteSpace:"nowrap",flexShrink:0,textTransform:"uppercase",letterSpacing:.5,cursor:"help"},children:"Only show"}),aT.map(a=>{let c=A.has(a.key);return(0,b.jsxs)("button",{type:"button","aria-pressed":c,onClick:()=>{var b;return b=a.key,void(B(a=>aY(a,b)),aE())},title:`${a.label}: ${a.range} mutual connection${"1"===a.range?"":"s"}. ${bv}`,style:{height:n?40:28,padding:"0 10px",borderRadius:14,cursor:"pointer",flexShrink:0,fontSize:11.5,fontWeight:700,whiteSpace:"nowrap",border:`1px solid ${c?a.color:"rgba(255,255,255,0.1)"}`,background:c?`${a.color}22`:"rgba(255,255,255,0.03)",color:c?a.color:"#999"},children:[a.label,(0,b.jsx)("span",{style:{marginLeft:5,fontWeight:500,color:c?a.color:"#666",opacity:.85},children:a6(_[a.key])})]},a.key)})]})]})]}),(0,b.jsx)("div",{ref:V,onScroll:aD,style:{flex:1,minHeight:0,overflowY:"auto",overflowX:"hidden",position:"relative",padding:`0 ${r}px`},children:(0,b.jsxs)("div",{style:{position:"relative",maxWidth:980,margin:"0 auto",height:aA},children:[ay>0&&(0,b.jsxs)("div",{style:{height:ay,boxSizing:"border-box",paddingTop:10},children:[(0,b.jsxs)("div",{style:{height:av-10,overflow:"hidden"},children:[(0,b.jsx)("div",{style:{fontSize:12,fontWeight:700,color:"#ddd",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:al?(0,b.jsxs)(b.Fragment,{children:["Aiming at ",an.person.name," · ",au.unscanned?`${a6(an.waysIn+au.unscanned)} mutual connections: ${a6(an.waysIn)} drawn, ${a6(au.unscanned)} in circles not scanned yet`:1===an.waysIn?"the one connection of yours who leads to them":`all ${a6(an.waysIn)} connections of yours who lead to them`]}):(0,b.jsxs)(b.Fragment,{children:["Top ",a6(ai.length)," you haven’t asked, of ",a6(ad.length),aJ?" shown":"",50!==v?` \xb7 ${aK.name.toLowerCase()}`:""," · every way in drawn"]})}),(0,b.jsxs)("div",{style:{fontSize:10,color:"#777",marginTop:2,whiteSpace:n?"normal":"nowrap",overflow:"hidden",textOverflow:"ellipsis",lineHeight:1.35},children:[!al&&aj>0&&(0,b.jsxs)("span",{style:{color:"#FFD700"},children:[a6(aj)," asked or connected, so it moved on · "]}),(0,b.jsx)("span",{style:{color:a2},children:"solid orange"})," = top-scored bridge · dashed = other routes",al?" · pick anyone in the list to aim at them instead":at?" · a lit pill is someone’s best way in":" · dot size = ways in"]})]}),as>0&&(0,b.jsx)(be,{layout:au,selectedKey:ak,tierColors:l,youLabel:aM,isMobile:n,onPick:aq,onPickBridge:ar,mutualsBy:Z,doors:!n&&as>=640,cards:at}),as>0&&al&&(0,b.jsx)(b.Fragment,{children:ao.length>0&&(0,b.jsxs)("div",{style:{height:aw,display:"flex",alignItems:"center",gap:6,overflow:"hidden"},children:[(0,b.jsx)("span",{style:{fontSize:10,color:"#666",textTransform:"uppercase",letterSpacing:.5,flexShrink:0},children:"Next"}),ao.map(a=>{let c;return(0,b.jsxs)("button",{type:"button",onClick:()=>aq(a),title:`Aim at ${a.person.name}`,style:{height:26,padding:"0 10px",borderRadius:13,cursor:"pointer",flexShrink:1,minWidth:0,fontSize:11,fontWeight:600,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",border:`1px solid ${l[a.tier]||"#888"}55`,background:"rgba(255,255,255,0.03)",color:"#ccc"},children:[(0,T.shortName)(a.person.name),(0,b.jsx)("span",{style:{marginLeft:5,color:l[a.tier]||"#888",fontWeight:700},children:a.score.toFixed(1)}),(0,b.jsx)("span",{style:{marginLeft:5,color:"#667",fontWeight:500},children:1===(c=Math.max(Z.get(a.key)?.count||0,a.waysIn))?"1 mutual":`${a6(c)} mutuals`})]},a.key)})]})})]}),ad.length>0&&!n&&(0,b.jsxs)("div",{style:{height:44,display:"flex",alignItems:"center",gap:10,padding:"0 12px 0 15px",boxSizing:"border-box",borderTop:"1px solid rgba(255,255,255,0.06)"},children:[(0,b.jsx)("span",{style:{fontSize:15,fontWeight:800},children:"Ranked by reach"}),(0,b.jsxs)("span",{style:{fontSize:11,fontWeight:800,color:"#000",background:"#FFD700",borderRadius:10,padding:"2px 8px"},children:[a6(ad.length),aJ?` of ${a6(aI.people)}`:""]}),(0,b.jsxs)("span",{style:{marginLeft:"auto",fontSize:11,color:"#777"},children:["order follows the slider · ",(0,b.jsx)("span",{style:{color:aL},children:aK.name.toLowerCase()})]})]}),ad.length>0&&(0,b.jsxs)("div",{style:{height:28,display:"grid",alignItems:"center",gap:10,padding:"0 12px 0 15px",gridTemplateColumns:n?"44px 36px 1fr 44px":a5,fontSize:9,fontWeight:700,color:"#555",textTransform:"uppercase",letterSpacing:.5,borderBottom:"1px solid rgba(255,255,255,0.08)",boxSizing:"border-box"},children:[(0,b.jsx)("span",{title:"Rank by score, then ways in. = means tied",children:"#"}),(0,b.jsx)("span",{}),n?(0,b.jsx)("span",{children:"Person · way in"}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"Person"}),(0,b.jsx)("span",{children:"Way in"}),(0,b.jsx)("span",{title:bv,children:"How rare the way in"}),(0,b.jsx)("span",{style:{textAlign:"right"},children:"Power"})]}),n&&(0,b.jsx)("span",{style:{textAlign:"right"},children:"Score"})]}),aN.map((a,c)=>(0,b.jsx)(bw,{p:a,top:az+(aB+c)*p,height:p,isMobile:n,selected:a.key===ak,tierColors:l,onPick:aq,q:u,status:af(a),rarity:Z.get(a.key)},a.key)),0===ad.length&&(0,b.jsxs)("div",{style:{position:"absolute",top:40,left:0,right:0,textAlign:"center",color:"#888",fontSize:13,padding:"0 16px"},children:[u?(0,b.jsxs)(b.Fragment,{children:["No one matches ‘",s.trim(),"’. Search covers names, headlines, companies and who knows them."]}):(0,b.jsx)(b.Fragment,{children:"No one here with those filters."}),(0,b.jsx)("div",{style:{marginTop:12},children:(0,b.jsx)("button",{type:"button",onClick:()=>{t(""),z("all"),B(new Set),D(null),aE()},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:["separation"],label:"Separation",icon:"🏆",desc:"Every 2nd degree, ranked · every way in"},chain:{component:function({connections:a,degree2:d=[],onSelect:f,userName:h,fullDegree1:i,fullDegree2:j,scanNotes:k,canScan:l=!0,chainOpen:m=null,onChainOpened:n,onCircle:o}){let p=(0,c.useRef)(null),[q,r]=(0,c.useState)(null),[s,t]=(0,c.useState)(null),[u,v]=(0,c.useState)({w:800,h:600}),w=i||a,x=j||d,[y,z]=(0,c.useState)(()=>av(m,w)),[A,B]=(0,c.useState)(m);if(m&&m!==A){B(m);let a=av(m,w);a.length&&z(a)}(0,c.useEffect)(()=>{m&&n?.()},[m,n]);let C=(0,c.useSyncExternalStore)(l?e.watchScanner:aq,ao,ap),D=(0,c.useSyncExternalStore)(ar,as,at),E=(0,g.default)();(0,c.useEffect)(()=>{let a=p.current;if(!a)return;let b=()=>{let b=Math.round(a.clientWidth),c=Math.round(a.clientHeight);v(a=>a.w===b&&a.h===c?a:{w:b,h:c})},c=new ResizeObserver(b);return c.observe(a),b(),()=>c.disconnect()},[]);let F=(0,c.useMemo)(()=>V(w,x),[w,x]),G=(0,c.useMemo)(()=>(0,J.reachIndex)(w,x,k),[w,x,k]),I=(0,c.useMemo)(()=>(0,J.readyByCircle)(G),[G]),L=(0,c.useMemo)(()=>(0,ae.redundancy)(j||d,i||a),[j,d,i,a]),M=(0,c.useMemo)(()=>{let a=new Map;for(let b of x)a.set(b.id,b);for(let b of w)a.set(b.id,b);return a},[w,x]),N=[];for(let a of y){let b=M.get(a);if(!b)break;N.push(b)}let O=N.length>0,P=N.length?N[N.length-1]:null;(0,c.useEffect)(()=>{o?.(P)},[P,o]),(0,c.useEffect)(()=>()=>o?.(null),[o]),(0,c.useEffect)(()=>{if(!O)return;let a=a=>{"Escape"!==a.key||/^(INPUT|TEXTAREA|SELECT)$/.test(a.target?.tagName||"")||document.querySelector('[role="dialog"][aria-modal="true"]')||z(a=>a.slice(0,-1))};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[O]);let Q={};d.forEach(a=>{a.source_connection_id&&(Q[a.source_connection_id]||(Q[a.source_connection_id]=[]),Q[a.source_connection_id].push(a))});let R=a.filter(a=>Q[a.id]&&Q[a.id].length>0).sort((a,b)=>(Q[b.id]?.length||0)-(Q[a.id]?.length||0)),S=u.w/2,T=u.h/2,U=Math.min(S,T)-30,W=new Set(R.map(a=>a.id)),X=new Map;for(let a of R)W.has(a.unlocked_from_bridge_id)&&X.set(a.unlocked_from_bridge_id,(X.get(a.unlocked_from_bridge_id)||0)+1);let Y=new Map(R.map(a=>[a.id,a])),Z=R.filter(a=>!(a=>{let b=new Set([a.id]);for(let c=a.unlocked_from_bridge_id;W.has(c);c=Y.get(c).unlocked_from_bridge_id){if(b.has(c))return!1;b.add(c)}return W.has(a.unlocked_from_bridge_id)})(a)),$=ab(Z.length,{inner:.55*U,innerMin:.4*U,outer:.62*U,spacing:46,minSpacing:20,ringGap:62}),_=Z.map((a,b)=>{let c=$.points[b];return{...a,x:S+c.x,y:T+c.y,angle:c.angle,clusterSize:(Q[a.id]||[]).length,chains:X.get(a.id)||0}}),aa=$.rings.length>1,ac=function(a,b=[],c=34){let d=Math.max(0,...b.map(a=>a.radius)),e=Math.max(.66*a,d?d+c:0);return{inner:e,outer:Math.max(.8*a,e+.14*a)}}(U,$.rings),ad=Math.max(.6,Math.min(1.3,Math.min(S,T)/(ac.outer+8))),ah=s??ad,aj=(0,c.useRef)([]);(0,c.useEffect)(()=>{aj.current=_.map(a=>({id:a.id,angle:a.angle}))});let ak=(0,c.useRef)(0);if((0,c.useEffect)(()=>{let a=p.current;if(!a||O)return;let b=(b,c)=>{let d=a.getBoundingClientRect(),e=b-d.left,f=Math.atan2(c-d.top-u.h/2,e-u.w/2),g=null,h=1/0;return aj.current.forEach(a=>{let b=Math.abs(f-a.angle)%(2*Math.PI);b>Math.PI&&(b=2*Math.PI-b),b<h&&(h=b,g=a.id)}),g},c=a=>{if(a.touches[0]){let c=b(a.touches[0].clientX,a.touches[0].clientY);c&&r(c)}},d=a=>{a.preventDefault();let c=Date.now();if(!(c-ak.current<16)&&(ak.current=c,a.touches[0])){let c=b(a.touches[0].clientX,a.touches[0].clientY);c&&r(c)}};return a.addEventListener("touchstart",c,{passive:!1}),a.addEventListener("touchmove",d,{passive:!1}),()=>{a.removeEventListener("touchstart",c),a.removeEventListener("touchmove",d)}},[u,ah,O]),O)return(0,b.jsx)("div",{ref:p,style:{flex:1,background:"#0a0a1a",position:"relative",overflow:"hidden"},children:(0,b.jsx)(aA,{trail:N,index:F,reach:G,dims:u,requests:E,scanningId:C,still:D,canScan:l,onOpen:a=>z(N.map(a=>a.id).concat(a)),onBack:a=>z(N.slice(0,a).map(a=>a.id)),onSelect:f},N.map(a=>a.id).join(">"))});let am=d.length,an=d.filter(a=>"S"===a.tier).length,ax=d.filter(a=>"A"===a.tier).length,ay=q?_.find(a=>a.id===q):null;return(0,b.jsxs)("div",{ref:p,style:{flex:1,background:"#0a0a1a",position:"relative",overflow:"hidden"},children:[(0,b.jsx)("svg",{width:u.w,height:u.h,children:(0,b.jsxs)("g",{transform:`translate(${S*(1-ah)}, ${T*(1-ah)}) scale(${ah})`,children:[$.rings.map(a=>(0,b.jsx)("circle",{cx:S,cy:T,r:a.radius,fill:"none",stroke:`${ag[1]}10`,strokeWidth:1},"ring-"+a.radius)),ay&&(0,b.jsx)(aw,{bridge:ay,members:au(ay,F),reach:G,cx:S,cy:T,maxR:U,still:D,band:ac}),_.map(a=>{var c,d,e;let f,g=q===a.id,h=(Q[a.id]||[]).filter(a=>"S"===a.tier).length,i=(Q[a.id]||[]).filter(a=>"A"===a.tier).length,j=I.get(a.id)||0;return(0,b.jsxs)("g",{onClick:()=>{r(null),z([a.id])},onMouseEnter:()=>r(a.id),onMouseLeave:()=>r(null),style:{cursor:"pointer"},children:[(0,b.jsx)("title",{children:(c=a,d=j,e=(0,J.scanBars)(a,G),f=[],d&&f.push(`${d} in ${al(c)}’s circle ${1===d?"is":"are"} ready for a scan`),c.chains&&f.push(`${c.chains} scanned since, with ${1===c.chains?"a cluster":"clusters"} of their own`),null!=e&&f.push(5===e?"their whole list is scanned":`about ${20*e}% of their list is scanned`),f.length?f.join(" · "):`${al(c)}’s circle`)}),(0,b.jsx)("circle",{cx:a.x,cy:a.y,r:g?21:18,fill:`${af[a.tier]}${g?"14":"08"}`}),(0,b.jsxs)("g",{transform:`translate(${a.x} ${a.y})`,pointerEvents:"none",children:[a.chains+j===0&&(0,b.jsx)("circle",{r:(g?13:11)+3.6,fill:"none",stroke:K,strokeWidth:1}),(function(a,{formed:b=0,ready:c=0}={},d=12){let e=Math.max(0,b)+Math.max(0,c);if(!e)return[];let f=Math.min(e,d),g=b>0?Math.max(1,Math.round(f*b/e)):0;c>0&&g>=f&&(g=f-1);let h=1===f?.5:Math.min(.32,2*Math.PI/f*.35),i=2*Math.PI/f-h,j=b=>`${(a*Math.cos(b)).toFixed(2)} ${(a*Math.sin(b)).toFixed(2)}`;return Array.from({length:f},(b,c)=>{let d=-Math.PI/2+h/2+c*(i+h);return{kind:c<g?"formed":"ready",d:`M${j(d)} A${a} ${a} 0 ${+(i>Math.PI)} 1 ${j(d+i)}`}})})((g?13:11)+3.6,{formed:a.chains,ready:j}).map((a,c)=>(0,b.jsx)("path",{d:a.d,fill:"none",strokeLinecap:"round",strokeWidth:2,stroke:"ready"===a.kind?ai:ag[2]},c))]}),(0,b.jsx)("circle",{cx:a.x,cy:a.y,r:g?13:11,fill:(0,H.localPhoto)(a.profile_image_url)?"#1a1a2e":af[a.tier],stroke:g?"#fff":af[a.tier],strokeWidth:g?2.5:2}),(0,H.localPhoto)(a.profile_image_url)&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("clipPath",{id:"bc-"+a.id,children:(0,b.jsx)("circle",{cx:a.x,cy:a.y,r:g?11:9})}),(0,b.jsx)("image",{href:(0,H.localPhoto)(a.profile_image_url),x:a.x-(g?11:9),y:a.y-(g?11:9),width:g?22:18,height:g?22:18,clipPath:`url(#bc-${a.id})`})]}),!(0,H.localPhoto)(a.profile_image_url)&&(0,b.jsx)("text",{x:a.x,y:a.y+4,textAnchor:"middle",fill:"S"===a.tier?"#000":"#fff",fontSize:11,fontWeight:700,children:a.name?.charAt(0)}),j>0&&(0,b.jsxs)("g",{pointerEvents:"none",children:[(0,b.jsx)("circle",{cx:a.x+14,cy:a.y-14,r:6,fill:"#0a0a1a",stroke:ai,strokeWidth:1.2}),(0,b.jsx)("text",{x:a.x+14,y:a.y-11.4,textAnchor:"middle",fill:ai,fontSize:j>9?6:7,fontWeight:800,children:j>99?"99+":j})]}),(0,b.jsx)("text",{x:a.x,y:a.y+(g?24:22),textAnchor:"middle",fill:"#fff",fontSize:9,fontWeight:600,children:a.name?.split(" ")[0]}),(!aa||g)&&(0,b.jsxs)("text",{x:a.x,y:a.y+(g?34:32),textAnchor:"middle",fill:g?"#bbb":"#888",fontSize:7,children:[a.clusterSize," · ",h>0?h+"S ":"",i>0?i+"A":""]})]},"b-"+a.id)}),(0,b.jsx)("circle",{cx:S,cy:T,r:22,fill:"#0a0a1a",stroke:"#FFD700",strokeWidth:3}),(0,b.jsx)("text",{x:S,y:T+4,textAnchor:"middle",fill:"#FFD700",fontSize:11,fontWeight:800,children:h?.split(" ")[0]||"YOU"})]})}),(0,b.jsx)(az,{onIn:()=>t(a=>Math.min(3,(a??ad)+.3)),onReset:()=>t(null),onOut:()=>t(a=>Math.max(.4,(a??ad)-.3))}),(0,b.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,b.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#666",letterSpacing:1.5,marginBottom:8},children:"DEGREES OF SEPARATION"}),(0,b.jsx)("div",{style:{display:"flex",gap:8},children:[1,2,3,4,5,6].map(c=>(0,b.jsxs)("div",{style:{textAlign:"center"},children:[(0,b.jsxs)("div",{style:{width:28,height:28,borderRadius:"50%",fontSize:11,fontWeight:800,display:"flex",alignItems:"center",justifyContent:"center",background:c<=2?ag[c]:"rgba(255,255,255,0.04)",color:c<=2?"#000":"#333",border:c<=2?"none":"1px solid rgba(255,255,255,0.08)",boxShadow:c<=2?`0 0 6px ${ag[c]}30`:"none"},children:["D",c]}),(0,b.jsx)("div",{style:{fontSize:7,color:c<=2?"#aaa":"#333",marginTop:3},children:1===c?a.length:2===c?am:"—"})]},c))}),(0,b.jsxs)("div",{style:{fontSize:9,color:"#555",marginTop:8},children:[Z.length," bridges",R.length>Z.length?` + ${R.length-Z.length} along their chains`:""," · ",an," S + ",ax," A at 2nd degree"]}),L>0&&(0,b.jsxs)("div",{style:{fontSize:9,color:"#555",marginTop:4},title:"The share of everyone you reach through a circle that more than one of your connections reaches",children:[Math.round(100*L),"% of your 2nd degree you reach two or more ways"]}),(0,b.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:"Your bridges, and the chains that lead on from them"},rings:{component:function({connections:a,degree2:d=[],onSelect:e,mode:f}){let[g,h]=(0,c.useState)(null);if("degrees"===f&&d.length>0){let c={};d.forEach(a=>{a.source_connection_id&&(c[a.source_connection_id]||(c[a.source_connection_id]=[]),c[a.source_connection_id].push(a))});let f=Object.entries(c).map(([b,c])=>{let d=a.find(a=>a.id===b);if(!d)return null;let e=c.filter(a=>"S"===a.tier).length,f=c.filter(a=>"A"===a.tier).length;return{bridge:d,members:c,sCount:e,aCount:f,total:c.length,value:3*e+2*f+c.length}}).filter(Boolean).sort((a,b)=>b.value-a.value),i={S:36,A:28,B:22,C:16,D:12};return(0,b.jsx)("div",{style:{flex:1,overflow:"auto",background:"#0a0a1a",padding:"20px 10px"},children:(0,b.jsx)("div",{style:{maxWidth:1200,margin:"0 auto"},children:f.map((a,c)=>{let d={};return aR.forEach(a=>{d[a]=[]}),a.members.forEach(a=>{(d[a.tier]||d.D).push(a)}),aR.forEach(a=>{d[a].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0))}),(0,b.jsxs)("div",{style:{marginBottom:30},children:[(0,b.jsx)("div",{style:{textAlign:"center",marginBottom:12},children:(0,b.jsxs)("div",{onClick:()=>e&&e(a.bridge),onMouseEnter:()=>h(a.bridge.id),onMouseLeave:()=>h(null),style:{display:"inline-block",cursor:"pointer",position:"relative"},children:[(0,b.jsx)("div",{style:{width:56,height:56,borderRadius:"50%",margin:"0 auto",border:`3px solid ${aQ[a.bridge.tier]}`,overflow:"hidden",background:"#1a1a2e",boxShadow:g===a.bridge.id?`0 0 20px ${aQ[a.bridge.tier]}60`:`0 0 10px ${aQ[a.bridge.tier]}20`,transition:"box-shadow 0.2s"},children:(0,H.localPhoto)(a.bridge.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.bridge.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"}}):(0,b.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:aQ[a.bridge.tier],color:"S"===a.bridge.tier?"#000":"#fff",fontSize:20,fontWeight:800},children:a.bridge.name?.charAt(0)})}),(0,b.jsx)("div",{style:{fontSize:12,fontWeight:700,color:"#fff",marginTop:4},children:a.bridge.name}),(0,b.jsxs)("div",{style:{fontSize:9,color:aQ[a.bridge.tier],fontWeight:600},children:[a.bridge.tier,"-Tier · ",a.total," connections · ",a.sCount>0?a.sCount+"S ":"",a.aCount>0?a.aCount+"A":""]})]})}),aR.map(a=>{let c=d[a];if(0===c.length)return null;let f=i[a],j="S"===a?10:"A"===a?6:4;return(0,b.jsxs)("div",{style:{marginBottom:6},children:[(0,b.jsx)("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:j},children:c.map(c=>{let d=g===c.id;return(0,b.jsxs)("div",{onClick:()=>e&&e(c),onMouseEnter:()=>h(c.id),onMouseLeave:()=>h(null),style:{position:"relative",cursor:"pointer"},children:[(0,b.jsx)("div",{style:{width:f,height:f,borderRadius:"50%",border:`2px solid ${aQ[a]}`,overflow:"hidden",background:(0,H.localPhoto)(c.profile_image_url)?"#111":aQ[a],transition:"transform 0.15s, box-shadow 0.15s",transform:d?"scale(1.3)":"scale(1)",boxShadow:d?`0 0 12px ${aQ[a]}60`:"none"},children:(0,H.localPhoto)(c.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(c.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"},onError:b=>{b.target.style.display="none",b.target.parentElement.style.background=aQ[a]}}):(0,b.jsx)("span",{style:{display:"flex",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",fontSize:.4*f,fontWeight:700,color:"S"===a?"#000":"#fff"},children:c.name?.charAt(0)})}),("S"===a||d)&&(0,b.jsx)("div",{style:{position:"absolute",top:f+2,left:"50%",transform:"translateX(-50%)",whiteSpace:"nowrap",textAlign:"center",zIndex:20,pointerEvents:"none"},children:(0,b.jsxs)("div",{style:{fontSize:d?10:8,fontWeight:600,color:d?"#fff":"#aaa",background:d?"rgba(0,0,0,0.85)":"transparent",padding:d?"3px 8px":0,borderRadius:4},children:[c.name?.split(" ")[0],d&&(0,b.jsx)("span",{style:{color:aQ[a],marginLeft:4},children:parseFloat(c.power_score||0).toFixed(1)})]})})]},c.id)})}),(0,b.jsx)("div",{style:{height:1,margin:"6px auto 0",width:`${40+10*aR.indexOf(a)}%`,background:`linear-gradient(90deg, transparent, ${aQ[a]}20, transparent)`}})]},a)})]},a.bridge.id)})})})}let i={};aR.forEach(a=>{i[a]=[]}),a.forEach(a=>{let b=a.tier||"D";i[b]&&i[b].push(a)}),aR.forEach(a=>{i[a].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0))});let j={S:44,A:34,B:26,C:20,D:16};return(0,b.jsx)("div",{style:{flex:1,overflow:"auto",background:"#0a0a1a",padding:"20px 10px"},children:(0,b.jsx)("div",{style:{maxWidth:1200,margin:"0 auto"},children:aR.map((a,c)=>{let d=i[a];if(0===d.length)return null;let f=j[a],k="S"===a?12:"A"===a?8:"B"===a?6:4;return(0,b.jsxs)("div",{style:{marginBottom:"S"===a?20:"A"===a?16:10},children:[(0,b.jsxs)("div",{style:{textAlign:"center",marginBottom:8,fontSize:"S"===a?14:11,fontWeight:700,color:aQ[a],opacity:"S"===a?1:.7},children:["S"===a&&"👑 ",a,"-Tier (",d.length,")"]}),(0,b.jsx)("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:k,padding:"0 20px"},children:d.map(c=>{let d=g===c.id;return(0,b.jsxs)("div",{onClick:()=>e&&e(c),onMouseEnter:()=>h(c.id),onMouseLeave:()=>h(null),style:{position:"relative",cursor:"pointer"},children:[(0,b.jsx)("div",{style:{width:f,height:f,borderRadius:"50%",border:`2px solid ${aQ[a]}`,overflow:"hidden",background:(0,H.localPhoto)(c.profile_image_url)?"#111":aQ[a],display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.15s, box-shadow 0.15s",transform:d?"scale(1.3)":"scale(1)",boxShadow:d?`0 0 16px ${aQ[a]}60`:"none",zIndex:d?10:1,position:"relative"},children:(0,H.localPhoto)(c.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(c.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"},onError:b=>{b.target.style.display="none",b.target.parentElement.style.background=aQ[a]}}):(0,b.jsx)("span",{style:{fontSize:.4*f,fontWeight:700,color:"S"===a?"#000":"#fff"},children:c.name?.charAt(0)})}),("S"===a||d)&&(0,b.jsxs)("div",{style:{position:"absolute",top:f+4,left:"50%",transform:"translateX(-50%)",whiteSpace:"nowrap",textAlign:"center",zIndex:20,pointerEvents:"none"},children:[(0,b.jsxs)("div",{style:{fontSize:"S"===a?9:10,fontWeight:600,color:d?"#fff":"#aaa",background:d?"rgba(0,0,0,0.85)":"transparent",padding:d?"3px 8px":0,borderRadius:4},children:[c.name?.split(" ")[0],d&&(0,b.jsx)("span",{style:{color:aQ[a],marginLeft:4,fontWeight:800},children:parseFloat(c.power_score||0).toFixed(1)})]}),d&&c.headline&&(0,b.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:c.headline.substring(0,40)})]})]},c.id)})}),c<aR.length-1&&(0,b.jsx)("div",{style:{height:1,margin:"12px auto 0",width:`${50+12*c}%`,background:`linear-gradient(90deg, transparent, ${aQ[a]}30, transparent)`}})]},a)})})})},modes:["degrees"],label:"Pyramid",icon:"🔺",desc:"Tier hierarchy"},list:{component:function({connections:a,degree2:c=[],onSelect:d,mode:e}){if("degrees"===e){let e={};c.forEach(a=>{a.source_connection_id&&(e[a.source_connection_id]||(e[a.source_connection_id]=[]),e[a.source_connection_id].push(a))});let f=Object.entries(e).map(([b,c])=>{let d=a.find(a=>a.id===b);if(!d)return null;let e=c.filter(a=>"S"===a.tier).length,f=c.filter(a=>"A"===a.tier).length,g=3*e+2*f+c.length;return{bridge:d,members:c,sCount:e,aCount:f,total:c.length,value:g}}).filter(Boolean).sort((a,b)=>b.value-a.value);return(0,b.jsx)("div",{style:{flex:1,overflow:"auto",padding:"16px 24px",background:"#0a0a1a"},children:(0,b.jsxs)("div",{style:{maxWidth:800,margin:"0 auto"},children:[(0,b.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,b.jsx)("span",{children:"#"}),(0,b.jsx)("span",{children:"Bridge"}),(0,b.jsx)("span",{children:"S"}),(0,b.jsx)("span",{children:"A"}),(0,b.jsx)("span",{children:"Total"}),(0,b.jsx)("span",{children:"Value"})]}),f.map((a,c)=>(0,b.jsxs)("div",{onClick:()=>d&&d(a.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:a=>a.currentTarget.style.background="rgba(255,255,255,0.04)",onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[(0,b.jsx)("span",{style:{fontSize:12,fontWeight:700,color:"#444"},children:c+1}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0},children:[(0,H.localPhoto)(a.bridge.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.bridge.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`2px solid ${aP[a.bridge.tier]}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",flexShrink:0,fontSize:10,fontWeight:700,background:aP[a.bridge.tier],color:"#000",display:"flex",alignItems:"center",justifyContent:"center"},children:a.bridge.name?.charAt(0)}),(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:12,fontWeight:600,color:"#fff",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.bridge.name}),(0,b.jsxs)("div",{style:{fontSize:9,color:aP[a.bridge.tier],fontWeight:600},children:[a.bridge.tier,"-Tier"]})]})]}),(0,b.jsx)("span",{style:{fontSize:13,fontWeight:800,color:"#FFD700"},children:a.sCount}),(0,b.jsx)("span",{style:{fontSize:13,fontWeight:700,color:"#9B59B6"},children:a.aCount}),(0,b.jsx)("span",{style:{fontSize:12,color:"#888"},children:a.total}),(0,b.jsx)("div",{children:(0,b.jsx)("div",{style:{height:6,background:"rgba(255,255,255,0.06)",borderRadius:3},children:(0,b.jsx)("div",{style:{height:"100%",borderRadius:3,background:`linear-gradient(90deg, ${aP[a.bridge.tier]}, #FF6B35)`,width:`${Math.min(100,a.value/Math.max(f[0]?.value||1,1)*100)}%`}})})})]},a.bridge.id))]})})}let f=[...a].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0)),g=parseFloat(f[0]?.power_score)||10;return(0,b.jsx)("div",{style:{flex:1,overflow:"auto",padding:"16px 24px",background:"#0a0a1a"},children:(0,b.jsxs)("div",{style:{maxWidth:800,margin:"0 auto"},children:[(0,b.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,b.jsx)("span",{children:"#"}),(0,b.jsx)("span",{}),(0,b.jsx)("span",{children:"Name"}),(0,b.jsx)("span",{children:"Score"}),(0,b.jsx)("span",{children:"Power"})]}),f.map((a,c)=>(0,b.jsxs)("div",{onClick:()=>d&&d(a),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:c<3?`${aP[a.tier]}08`:"transparent",transition:"background 0.1s"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.04)",onMouseLeave:b=>b.currentTarget.style.background=c<3?`${aP[a.tier]}08`:"transparent",children:[(0,b.jsx)("span",{style:{fontSize:12,fontWeight:700,color:c<3?aP[a.tier]:"#444"},children:c+1}),(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",border:`2px solid ${aP[a.tier]}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",fontSize:10,fontWeight:700,background:aP[a.tier],color:"S"===a.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:12,fontWeight:600,color:"#fff",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,45)})]}),(0,b.jsxs)("div",{style:{textAlign:"center"},children:[(0,b.jsx)("span",{style:{fontSize:13,fontWeight:800,color:aP[a.tier]},children:parseFloat(a.power_score||0).toFixed(1)}),(0,b.jsx)("div",{style:{fontSize:8,color:"#555"},children:a.tier})]}),(0,b.jsx)("div",{style:{height:6,background:"rgba(255,255,255,0.06)",borderRadius:3},children:(0,b.jsx)("div",{style:{height:"100%",borderRadius:3,background:aP[a.tier],width:`${parseFloat(a.power_score||0)/g*100}%`}})})]},a.id))]})})},modes:["degrees"],label:"List",icon:"☰",desc:"Ranked power list"},grid:{component:function({connections:a,degree2:c=[],onSelect:d,mode:e}){if("degrees"===e){let e={};c.forEach(a=>{a.source_connection_id&&(e[a.source_connection_id]||(e[a.source_connection_id]=[]),e[a.source_connection_id].push(a))});let f=Object.entries(e).map(([b,c])=>{let d=a.find(a=>a.id===b);if(!d)return null;let e=c.filter(a=>"S"===a.tier).length,f=c.filter(a=>"A"===a.tier).length;return{bridge:d,members:c,sCount:e,aCount:f,total:c.length}}).filter(Boolean).sort((a,b)=>3*b.sCount+2*b.aCount+b.total-(3*a.sCount+2*a.aCount+a.total));return(0,b.jsx)("div",{style:{flex:1,overflow:"auto",padding:20,background:"#0a0a1a"},children:(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))",gap:12,maxWidth:1200,margin:"0 auto"},children:f.map(a=>(0,b.jsxs)("div",{onClick:()=>d&&d(a.bridge),style:{padding:16,borderRadius:12,cursor:"pointer",background:"rgba(255,255,255,0.03)",border:`1px solid ${aN[a.bridge.tier]||"#333"}30`,borderLeft:`4px solid ${aN[a.bridge.tier]||"#555"}`,transition:"all 0.15s"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:a=>a.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,H.localPhoto)(a.bridge.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.bridge.profile_image_url),alt:"",style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",border:`2px solid ${aN[a.bridge.tier]}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:40,height:40,borderRadius:"50%",fontSize:16,fontWeight:700,background:aN[a.bridge.tier],color:"#000",display:"flex",alignItems:"center",justifyContent:"center"},children:a.bridge.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:13,fontWeight:700,color:"#fff"},children:a.bridge.name}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.bridge.headline?.substring(0,40)})]}),(0,b.jsx)("span",{style:{fontSize:12,fontWeight:800,color:aN[a.bridge.tier]},children:a.bridge.tier})]}),(0,b.jsxs)("div",{style:{display:"flex",gap:6,fontSize:10},children:[a.sCount>0&&(0,b.jsxs)("span",{style:{color:"#FFD700",fontWeight:600},children:[a.sCount,"S"]}),a.aCount>0&&(0,b.jsxs)("span",{style:{color:"#9B59B6",fontWeight:600},children:[a.aCount,"A"]}),(0,b.jsxs)("span",{style:{color:"#666"},children:[a.total," total"]})]}),(0,b.jsxs)("div",{style:{display:"flex",marginTop:8},children:[a.members.slice(0,8).map((a,c)=>(0,b.jsx)("div",{style:{width:22,height:22,borderRadius:"50%",fontSize:8,fontWeight:700,background:(0,H.localPhoto)(a.profile_image_url)?"transparent":aN[a.tier]||"#333",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",border:"2px solid #0a0a1a",marginLeft:c>0?-6:0,position:"relative",zIndex:8-c,overflow:"hidden"},children:(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"}}):a.name?.charAt(0)},a.id)),a.total>8&&(0,b.jsxs)("span",{style:{fontSize:9,color:"#555",marginLeft:4,alignSelf:"center"},children:["+",a.total-8]})]})]},a.bridge.id))})})}let f={};return aO.forEach(a=>{f[a]=[]}),a.forEach(a=>{let b=a.tier||"D";f[b]&&f[b].push(a)}),aO.forEach(a=>{f[a].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0))}),(0,b.jsx)("div",{style:{flex:1,overflow:"auto",padding:20,background:"#0a0a1a"},children:(0,b.jsx)("div",{style:{maxWidth:1200,margin:"0 auto"},children:aO.map(a=>{let c=f[a];return 0===c.length?null:(0,b.jsxs)("div",{style:{marginBottom:24},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 0 10px",borderBottom:`2px solid ${aN[a]}30`,marginBottom:10},children:[(0,b.jsx)("div",{style:{width:10,height:10,borderRadius:"50%",background:aN[a]}}),(0,b.jsxs)("span",{style:{fontSize:15,fontWeight:800,color:aN[a]},children:[a,"-Tier"]}),(0,b.jsx)("span",{style:{fontSize:12,color:"#555"},children:c.length})]}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(180px, 1fr))",gap:8},children:c.map(c=>(0,b.jsxs)("div",{onClick:()=>d&&d(c),style:{padding:10,borderRadius:8,cursor:"pointer",background:"rgba(255,255,255,0.03)",border:`1px solid ${aN[a]}20`,transition:"all 0.15s"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:a=>a.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,H.localPhoto)(c.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(c.profile_image_url),alt:"",style:{width:32,height:32,borderRadius:"50%",objectFit:"cover",border:`2px solid ${aN[a]}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:32,height:32,borderRadius:"50%",fontSize:12,fontWeight:700,background:aN[a],color:"S"===a?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:c.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:11,fontWeight:600,color:"#fff",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c.name}),(0,b.jsx)("div",{style:{fontSize:8,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c.headline?.substring(0,30)})]})]}),(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginTop:6,alignItems:"center"},children:[(0,b.jsx)("span",{style:{fontSize:10,fontWeight:700,color:aN[a]},children:parseFloat(c.power_score||0).toFixed(1)}),(0,b.jsx)("div",{style:{flex:1,marginLeft:8,height:3,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,b.jsx)("div",{style:{height:"100%",borderRadius:2,background:aN[a],width:`${Math.min(100,10*(parseFloat(c.power_score)||0))}%`}})})]})]},c.id))})]},a)})})})},modes:["network","degrees"],label:"Grid",icon:"▦",desc:"Cards"}},by=["galaxy","chain","separation","rings","list"];function bz(a){return by.filter(b=>bx[b]?.modes.includes(a)).map(a=>({key:a,...bx[a]}))}var bA=a.i(7846);function bB({isMobile:a=!1}){let d=(0,c.useSyncExternalStore)(bA.watchAllDay,bA.allDayNow,()=>!1),[f,g]=(0,c.useState)(()=>(0,e.scannerNow)()),[h,i]=(0,c.useState)(!1);if((0,c.useEffect)(()=>(0,e.watchScanner)(()=>{g((0,e.scannerNow)()),i(!1)}),[]),!d)return null;let j=f?.running&&String(f.action||"").startsWith("auto-bridge"),k={padding:a?"8px 12px":"8px 16px",borderRadius:6,fontSize:13,fontWeight:600,textDecoration:"none",display:"flex",alignItems:"center",gap:6,whiteSpace:"nowrap"};if(j)return(0,b.jsxs)(S.default,{href:"/setup",title:"Auto scan is running: see it on the Scan page",style:{...k,background:"rgba(0,255,136,0.15)",color:"#00ff88",border:"1px solid rgba(0,255,136,0.45)"},children:[(0,b.jsx)("span",{style:{width:7,height:7,borderRadius:"50%",background:"#00ff88"}}),"Auto scan"]});let l=f?.running||h;return(0,b.jsxs)("button",{onClick:()=>{i(!0),(0,bA.startAutoScan)().catch(()=>i(!1))},disabled:l,title:l?"The scanner is busy: one scan at a time":"Start the all-day Auto-Bridge (experimental)",style:{...k,cursor:l?"default":"pointer",background:"rgba(255,255,255,0.04)",color:l?"#555":"#8b9a9a",border:"1px solid rgba(255,215,0,0.25)"},children:[(0,b.jsx)("span",{style:{width:7,height:7,borderRadius:"50%",background:"#556"}}),"Auto scan"]})}var bC=a.i(74994),bD=a.i(35112),bE=a.i(30889);let bF=/\/10, (your|sample) score\)/,bG=/^(?:Former )?(?:Student · )?(.+?) \([\d.]+\) · (no company found|.+?) \(\d+(?:\.\d+)?\/10(?:[:,][^)]*)?\)/,bH={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},bI=["S","A","B","C","D"],bJ="#00ff88";function bK({person:a,connections:d=[],degree2:e=[],tierColors:f=bH,onSelect:g,isRequested:h=U,canScan:i=!0}){let j=(0,c.useMemo)(()=>V(d,e),[d,e]),k=(0,c.useMemo)(()=>(0,T.routeIndex)(e),[e]),{rings:l,totals:m}=(0,c.useMemo)(()=>(function(a,b,{maxDegree:c=6,isRequested:d=U}={}){let e=[],f={people:0,connected:0,requested:0};if(!a||!b)return{rings:e,totals:f};let g=new Set([(0,T.keyFor)(a)]),h=[a];for(let a=2;a<=c&&h.length;a++){let c=[],i=[];for(let a of h){let e=[];for(let c of b.introduced.get(a.id)||[]){let b=(0,T.keyFor)(c);g.has(b)||(g.add(b),e.push({row:c,key:b,parentId:a.id,state:"connected"}),i.push(c))}for(let c of b.circles.get(a.id)||[]){let b=(0,T.keyFor)(c);g.has(b)||(g.add(b),e.push({row:c,key:b,parentId:a.id,state:d(c)?"requested":null}))}e.sort(X),c.push(...e)}if(!c.length)break;for(let a of c)f.people++,"connected"===a.state?f.connected++:"requested"===a.state&&f.requested++;e.push({degree:a,people:c}),h=i}return{rings:e,totals:f}})(a,j,{isRequested:h}),[a,j,h]),[n,o]=(0,c.useState)(()=>new Set),[p,q]=(0,c.useState)(()=>new Set),[r,s]=(0,c.useState)(!1),t=(0,c.useMemo)(()=>l.flatMap(a=>a.people.map(a=>{let b="connected"===a.state||1===a.row.degree?null:aW(a.row,k.get((0,T.keyFor)(a.row))?.size||1);return{key:a.key,tier:a.row.tier,rarity:b?.key??null,mutuals:b}})),[l,k]),u=(0,c.useMemo)(()=>new Map(t.map(a=>[a.key,a])),[t]),v=(0,c.useMemo)(()=>({tiers:n,rarities:p}),[n,p]),w=(0,c.useMemo)(()=>t.filter(a=>aX(a,v)).length,[t,v]),x=(0,c.useMemo)(()=>d.filter(a=>j.circles.has(a.id)).length,[d,j]),y=t.some(a=>a.mutuals?.from==="linkedin"),z=(0,c.useMemo)(()=>(function(a){let b,c,d,e;if(!a)return null;if(null==a.power_score||""===a.power_score||!a.tier)return{title:!1,company:!1,never:!0,companyName:null,reason:"They haven’t been scored yet."};let f=String(a.score_why||"").match(bG);if(f)b=f[1],d=!(c="no company found"===f[2]?null:f[2])||!bF.test(a.score_why)&&!["known","data"].includes((0,bE.companyScore)(c).source);else{let e=(0,bE.scorePerson)(a);b=e.title.label,c=e.company||null,d=["none","default","network"].includes(e.companySource)}let g=b.startsWith("Audience of"),h="Title unclear"===b||b.includes("Works there");return(g&&(d=!1),h||d)?(e=h&&d?c?`Their headline doesn’t say their title, and the app doesn’t know ${c}.`:"Their headline names no title or company the app can read.":h?"Their headline doesn’t say their title.":c?`The app doesn’t know ${c}, so it counts as the middle of the scale.`:"The app couldn’t find where they work.",{title:h,company:d,never:!1,companyName:c,reason:e}):null})(a),[a]);if(!a)return null;if(!l.length){let c=a.name?.split(" ")[0]||"them";return(0,b.jsxs)("div",{style:z?{...bS,borderColor:"rgba(255,215,0,0.28)"}:bS,children:[(0,b.jsx)(bR,{children:"Their circle"}),z?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{style:{fontSize:11.5,color:"#d8ccb0",lineHeight:1.5,marginBottom:9*!!i},children:[(0,b.jsx)("b",{style:{color:"#FFD700"},children:"Their score is a guess."})," ",z.reason,i&&(0,b.jsxs)(b.Fragment,{children:[" Scanning ",c,"'s circle shows who you can reach through them, and a strong circle adds up to +2 to their score."]})]}),i&&(0,b.jsx)("button",{type:"button",onClick:bQ,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 ↓"})]}):i?(0,b.jsxs)("div",{style:{fontSize:11,color:"#999",lineHeight:1.5},children:["Not scanned yet. Scan ",c,"'s circle below to see who they know, and everyone you reach through them after that."]}):(0,b.jsx)("div",{style:{fontSize:11,color:"#999",lineHeight:1.5},children:"Not scanned."})]})}let A=Object.fromEntries(bI.map(a=>[a,t.filter(b=>b.tier===a).length])),B=function(a=[]){let b=Object.fromEntries(aT.map(a=>[a.key,0]));for(let c of a)c?.rarity&&void 0!==b[c.rarity]&&b[c.rarity]++;return b}(t),C=n.size>0||p.size>0,D=(0,b.jsx)(bN,{tierColors:f,byTier:A,byRarity:B,tiers:n,rarities:p,onTier:a=>o(b=>aY(b,a)),onRarity:a=>q(b=>aY(b,a)),onClear:()=>{o(new Set),q(new Set)}}),E=(0,b.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."," ",y?"LinkedIn’s own count where a scan saved it; otherwise the ways in from your scans.":`Counted from the ${x} ${1===x?"circle":"circles"} you’ve scanned, so it can only go up as you scan more.`]});return(0,b.jsxs)("div",{style:bS,children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:8},children:[(0,b.jsx)(bR,{children:"Their circle"}),(0,b.jsx)("button",{type:"button",onClick:()=>s(!0),style:bU,"aria-label":"Open the large map",children:"Enlarge ⤢"})]}),(0,b.jsx)("button",{type:"button",onClick:()=>s(!0),"aria-label":`${a.name}'s circle: open the large map`,style:{display:"block",width:"100%",padding:0,border:"none",background:"none",cursor:"zoom-in"},children:(0,b.jsx)(bL,{person:a,rings:l,facts:u,filter:v,tierColors:f,size:240})}),(0,b.jsx)(bM,{rings:l,totals:m,shown:C?w:null}),D,E,r&&(0,b.jsxs)(bP,{onClose:()=>s(!1),title:`${a.name}’s circle`,children:[(0,b.jsx)(bL,{person:a,rings:l,facts:u,filter:v,tierColors:f,size:640,labels:!0,onPick:a=>{s(!1),g?.(a)}}),(0,b.jsx)(bM,{rings:l,totals:m,shown:C?w:null}),D,(0,b.jsx)(bO,{}),E]})]})}function bL({person:a,rings:d,facts:e,filter:f,tierColors:g,size:h,labels:i=!1,onPick:j}){let k=(0,c.useMemo)(()=>(function(a=[],b=240){let c=b/2,d=a.length,e=a=>c*(1===d?.78:.4+a/(d-1)*.52),f=a.map(a=>{let b=new Map;for(let c of a.people)b.has(c.parentId)||b.set(c.parentId,[]),b.get(c.parentId).push(c);return b}),g=(a,b)=>f[a+1]?.get(b)||[],h=new Map;for(let b=d-1;b>=0;b--)for(let c of a[b].people){let a="connected"===c.state?g(b,c.row.id).reduce((a,b)=>a+h.get(b),0):0;h.set(c,Math.max(1,a))}let i=[],j=[],k=new Map,l=-Math.PI/2;for(let m=0;m<d;m++){let n=e(m);a[m].people;let o=Math.max(2.4,b/100),p=m===d-1&&d>1,q=(p?n-e(m-1):(m+1<d?e(m+1):.97*c)-n)*.45,r=Math.max(1,Math.floor(q/o)+1),s=r>1?(p?-1:1)*Math.min(1.2*o,q/(r-1)):0,t=(a,b)=>Y(Math.ceil(a*o/Math.max(1e-9,n*b)),1,r),u=1,v=1/0,w=[];for(let[a,b]of f[m]){let[d,e]=0===m?[l,l+2*Math.PI]:k.get(a)||[l,l+2*Math.PI],f=b.reduce((a,b)=>a+h.get(b),0),g=t(b.length,e-d);u=Math.max(u,g),v=Math.min(v,n*(e-d)*g/Math.max(1,b.length));let i=0,j=d;for(let a of b){let b=(e-d)*h.get(a)/f,l=j+b/2,m=n+i++%g*s,o=c+m*Math.cos(l),p=c+m*Math.sin(l);w.push({...a,angle:l,x:o,y:p}),"connected"===a.state&&k.set(a.row.id,[j,j+b]),j+=b}}if(m+1<d){let a=e(m+1);for(let b of w){if("connected"!==b.state||!g(m,b.row.id).length)continue;let[d,e]=k.get(b.row.id),f=(d+e)/2;j.push({x1:b.x,y1:b.y,x2:c+a*Math.cos(f),y2:c+a*Math.sin(f)})}}let x=Y(Math.min(.32*v,u>1?.42*Math.abs(s):1/0),.8,b/60);i.push({degree:a[m].degree,radius:n,dotR:x,rows:u,items:w})}return{size:b,center:{x:c,y:c},rings:i,spokes:j}})(d,h),[d,h]),l=k.center,m=h/240;return(0,b.jsxs)("svg",{viewBox:`0 0 ${h} ${h}`,width:"100%",style:{display:"block",maxWidth:h,margin:"0 auto"},role:"img","aria-label":`${a.name}'s circle, ${d.length} ${1===d.length?"ring":"rings"}`,children:[k.rings.map(a=>(0,b.jsxs)("g",{children:[(0,b.jsx)("circle",{cx:l.x,cy:l.y,r:a.radius,fill:"none",stroke:"rgba(255,255,255,0.07)",strokeWidth:.6*m}),(0,b.jsxs)("text",{x:l.x,y:l.y-a.radius-a.dotR-3*m,textAnchor:"middle",fontSize:6.5*m,fill:"#666",fontWeight:700,children:["D",a.degree]})]},a.degree)),k.spokes.map((a,c)=>(0,b.jsx)("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,stroke:"rgba(0,255,136,0.35)",strokeWidth:.7*m},c)),k.rings.map(a=>a.items.map(c=>{let d=e.get(c.key),h=aX(d,f),k=g[c.row.tier]||"#888",l="connected"===c.state?1.7*a.dotR:a.dotR,m=[`${c.row.name} \xb7 ${c.row.tier}-tier${null!=c.row.power_score?` \xb7 ${Number(c.row.power_score).toFixed(1)}`:""}`,"connected"===c.state?"You added them":"requested"===c.state?"Request sent":null,d?.mutuals?`${aV(d.rarity)?.label}: ${d.mutuals.count} mutual${1===d.mutuals.count?"":"s"}${"scans"===d.mutuals.from?" (from your scans)":""}`:null].filter(Boolean).join("\n");return(0,b.jsxs)("g",{opacity:h?1:.12,style:j?{cursor:"pointer"}:void 0,onClick:j?a=>{a.stopPropagation(),j(c.row)}:void 0,children:[(0,b.jsx)("title",{children:m}),"requested"===c.state?(0,b.jsx)("circle",{cx:c.x,cy:c.y,r:1.25*l,fill:"none",stroke:k,strokeWidth:Math.max(.5,.45*l),strokeDasharray:`${Math.max(.6,.55*l)} ${Math.max(.5,.45*l)}`}):(0,b.jsx)("circle",{cx:c.x,cy:c.y,r:l,fill:k,stroke:"connected"===c.state?bJ:"none",strokeWidth:Math.max(.6,.3*l)}),i&&"connected"===c.state&&(0,b.jsx)("text",{x:c.x,y:c.y-l-3,textAnchor:"middle",fontSize:9,fill:bJ,fontWeight:700,children:String(c.row.name||"").split(" ")[0]})]},c.key)})),(0,b.jsx)("circle",{cx:l.x,cy:l.y,r:7*m,fill:g[a.tier]||"#888",stroke:"#fff",strokeWidth:.8*m}),(0,b.jsx)("text",{x:l.x,y:l.y+2.4*m,textAnchor:"middle",fontSize:6.5*m,fontWeight:800,fill:"S"===a.tier?"#000":"#fff",children:String(a.name||"?").charAt(0)})]})}function bM({rings:a,totals:c,shown:d}){return(0,b.jsxs)("div",{style:{fontSize:10.5,color:"#aaa",marginTop:6,lineHeight:1.5},children:[a.map(a=>`D${a.degree} ${a.people.length.toLocaleString("en-US")}`).join(" · "),c.connected>0&&(0,b.jsxs)("span",{style:{color:bJ},children:[" · you added ",c.connected]}),c.requested>0&&(0,b.jsxs)("span",{style:{color:"#FFD700"},children:[" · ",c.requested," ",1===c.requested?"request":"requests"," out"]}),null!=d&&(0,b.jsxs)("span",{style:{color:"#fff"},children:[" · ",d.toLocaleString("en-US")," shown"]})]})}function bN({tierColors:a,byTier:c,byRarity:d,tiers:e,rarities:f,onTier:g,onRarity:h,onClear:i}){let j=(a,b)=>({height:22,padding:"0 7px",borderRadius:11,cursor:"pointer",fontSize:10,fontWeight:700,whiteSpace:"nowrap",border:`1px solid ${a?b:"rgba(255,255,255,0.1)"}`,background:a?`${b}22`:"rgba(255,255,255,0.03)",color:a?b:"#999"});return(0,b.jsxs)("div",{style:{marginTop:8,display:"flex",flexDirection:"column",gap:5},children:[(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,alignItems:"center"},children:[(0,b.jsx)("span",{style:bT,children:"Tier"}),bI.map(d=>(0,b.jsxs)("button",{type:"button","aria-pressed":e.has(d),onClick:()=>g(d),style:j(e.has(d),a[d]||"#888"),children:[d," ",(0,b.jsx)("span",{style:{fontWeight:500,opacity:.8},children:c[d]})]},d))]}),(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,alignItems:"center"},children:[(0,b.jsx)("span",{style:bT,children:"Rarity"}),aT.map(a=>(0,b.jsxs)("button",{type:"button","aria-pressed":f.has(a.key),onClick:()=>h(a.key),title:`${a.label}: ${a.range} mutual connection${"1"===a.range?"":"s"}`,style:j(f.has(a.key),a.color),children:[a.label," ",(0,b.jsx)("span",{style:{fontWeight:500,opacity:.8},children:d[a.key]})]},a.key)),(e.size>0||f.size>0)&&(0,b.jsx)("button",{type:"button",onClick:i,style:bU,children:"Clear"})]})]})}function bO(){let a=(a,c)=>(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5,marginRight:12,whiteSpace:"nowrap"},children:[a,c]});return(0,b.jsxs)("div",{style:{fontSize:10.5,color:"#999",marginTop:8,lineHeight:1.8},children:[a((0,b.jsx)("svg",{width:"10",height:"10",children:(0,b.jsx)("circle",{cx:"5",cy:"5",r:"4",fill:"#FFD700"})}),"colour = tier"),a((0,b.jsx)("svg",{width:"12",height:"12",children:(0,b.jsx)("circle",{cx:"6",cy:"6",r:"4",fill:"#9B59B6",stroke:bJ,strokeWidth:"1.5"})}),"you added them"),a((0,b.jsx)("svg",{width:"12",height:"12",children:(0,b.jsx)("circle",{cx:"6",cy:"6",r:"4.2",fill:"none",stroke:"#3498DB",strokeWidth:"1.4",strokeDasharray:"2 1.6"})}),"request sent")]})}function bP({title:a,onClose:d,children:e}){return(0,c.useEffect)(()=>{let a=a=>{"Escape"===a.key&&d()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[d]),(0,bD.createPortal)((0,b.jsx)("div",{role:"dialog","aria-modal":"true","aria-label":a,onClick:d,style:{position:"fixed",inset:0,zIndex:300,background:"rgba(0,0,0,0.78)",display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:(0,b.jsxs)("div",{onClick:a=>a.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,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[(0,b.jsx)("div",{style:{fontSize:14,fontWeight:800,color:"#fff"},children:a}),(0,b.jsx)("button",{type:"button",onClick:d,style:{...bU,fontSize:12},children:"Close ✕"})]}),(0,b.jsx)("div",{style:{fontSize:10.5,color:"#888",marginBottom:8},children:"Click a dot to open that person."}),e]})}),document.body)}function bQ(){let a=document.getElementById("scan-box");a&&(a.scrollIntoView({behavior:"smooth",block:"center"}),a.animate?.([{boxShadow:"0 0 0 3px rgba(255,215,0,0.75)"},{boxShadow:"0 0 0 0 rgba(255,215,0,0)"}],{duration:1600}),a.querySelector("button:not([disabled])")?.focus({preventScroll:!0}))}function bR({children:a}){return(0,b.jsx)("div",{style:{fontSize:10,fontWeight:700,color:"#FF6B35",letterSpacing:1,textTransform:"uppercase",marginBottom:6},children:a})}let bS={background:"rgba(255,255,255,0.03)",border:"1px solid rgba(255,255,255,0.07)",borderRadius:10,padding:10,marginBottom:16},bT={fontSize:9,color:"#666",textTransform:"uppercase",letterSpacing:.5,width:38,flexShrink:0},bU={background:"none",border:"none",color:"#888",fontSize:10.5,fontWeight:600,cursor:"pointer",padding:0};var bV=a.i(75857);let bW=["S","A","B","C","D"],bX=[[/^(.+?) accepted!/,1],[/^High-value connection: (.+)$/,1],[/^Catalyst discovered: (.+)$/,1],[/^(.+?) added you back/,1]],bY={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},bZ={S:"S-tier: one of the most valuable people in your network to know.",A:"A-tier: a strong person to know."},b$={padding:"8px 12px",borderRadius:8,fontSize:12,fontWeight:700,cursor:"pointer",textAlign:"left",border:"1px solid rgba(255,255,255,0.12)",background:"rgba(255,255,255,0.05)",color:"#ddd"};function b_({note:a,connections:c=[],degree2:d=[],onBack:e,onSelect:f,onOpenCircle:g,onShowInSeparation:h}){let{person:i,via:j,people:k}=function(a,b=[],c=[]){let d=[...b||[],...c||[]],e=new Map(d.map(a=>[a.id,a])),f="string"==typeof a?.data?function(a){try{return JSON.parse(a)}catch{return{}}}(a.data):a?.data||{},g=null!=f.personId?e.get(f.personId):null;if(!g&&f.profileUrl&&(g=d.find(a=>a.profile_url===f.profileUrl)||null),!g)for(let[d,e]of bX){let f=String(a?.title||"").match(d);if(!f)continue;let h=f[e].trim().toLowerCase();if(g=(b||[]).find(a=>String(a.name||"").toLowerCase()===h)||(c||[]).find(a=>String(a.name||"").toLowerCase()===h)||null)break}let h=f.viaId??g?.unlocked_from_bridge_id??(g?.degree===2?g.source_connection_id:null);return{person:g||null,via:null!=h&&e.get(h)||null,people:(f.personIds||[]).map(a=>e.get(a)).filter(Boolean),data:f}}(a,c,d),l=i?.tier,m=Number.parseFloat(i?.power_score),n=Number(i?.company_prestige_score),o=["added_back","request_accepted","connection_accepted"].includes(a?.type),p=i&&d.some(a=>a.source_connection_id===i.id);return(0,b.jsxs)("div",{children:[(0,b.jsx)("button",{type:"button",onClick:e,style:{background:"none",border:"none",color:"#aaa",cursor:"pointer",fontSize:12,padding:0,marginBottom:12},children:"← Back"}),(0,b.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"flex-start"},children:[(0,b.jsx)("span",{style:{fontSize:22},children:a?.icon||"📌"}),(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:15,fontWeight:800,color:"#fff",lineHeight:1.35},children:a?.title}),(0,b.jsx)("div",{style:{fontSize:11,color:"#777",marginTop:3},children:(a=>{let b=new Date(String(a||"").replace(" ","T")+(String(a||"").includes("Z")?"":"Z")).getTime();if(!Number.isFinite(b))return"";let c=Math.round((Date.now()-b)/6e4);if(c<1)return"just now";if(c<60)return`${c} min ago`;let d=Math.round(c/60);return d<24?`${d} h ago`:new Date(b).toLocaleDateString()})(a?.created_at)})]})]}),i&&(0,b.jsxs)("div",{style:{marginTop:16,padding:14,borderRadius:12,border:`1px solid ${bY[l]||"#555"}55`,background:`${bY[l]||"#555"}10`},children:[(0,b.jsxs)("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[(0,b.jsx)(a1,{person:i,size:44}),(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:15,fontWeight:800},children:i.name}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#aab",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i.headline||i.company||""}),(0,b.jsxs)("div",{style:{fontSize:11.5,fontWeight:800,color:bY[l]||"#aaa",marginTop:2},children:[l?`${l}-tier`:"Not scored yet",Number.isFinite(m)?` \xb7 ${m.toFixed(1)}`:""]})]})]}),o&&(0,b.jsxs)("div",{style:{marginTop:12,fontSize:12.5,color:"#ddd",lineHeight:1.5},children:[(0,b.jsx)("b",{children:i.name.split(" ")[0]})," added you back",j?(0,b.jsxs)(b.Fragment,{children:[". You met through ",(0,b.jsx)("b",{style:{color:bY[j.tier]||"#fff"},children:j.name}),"."]}):"."]}),!o&&j&&(0,b.jsxs)("div",{style:{marginTop:12,fontSize:12.5,color:"#ddd"},children:[2===i.degree?"In the circle of ":"You met through ",(0,b.jsx)("b",{children:j.name}),"."]}),bZ[l]&&(0,b.jsx)("div",{style:{marginTop:8,fontSize:12.5,fontWeight:700,color:bY[l]},children:bZ[l]}),n>=8&&(0,b.jsxs)("div",{style:{marginTop:6,fontSize:12,color:"#cfd3e6"},children:["Works at a top company",i.company?`, ${i.company}`:""," (its score: ",n,")."]}),(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:6,marginTop:14},children:[(0,b.jsxs)("button",{type:"button",style:b$,onClick:()=>f?.(i),children:["Open ",i.name.split(" ")[0],"’s card →"]}),(p||1===i.degree)&&g&&(0,b.jsx)("button",{type:"button",style:b$,onClick:()=>g(i.id),children:p?`Open ${i.name.split(" ")[0]}’s circle in Bridge Chains →`:`${i.name.split(" ")[0]}’s circle: not scanned yet`}),2===i.degree&&h&&(0,b.jsx)("button",{type:"button",style:b$,onClick:()=>h({query:i.name}),children:"Show in Separation →"})]})]}),k.length>1&&(0,b.jsxs)("div",{style:{marginTop:16},children:[(0,b.jsx)("div",{style:{fontSize:10,fontWeight:800,letterSpacing:1,color:"#6b7090",textTransform:"uppercase",marginBottom:8},children:"Who"}),k.slice(0,12).map(a=>(0,b.jsxs)("button",{type:"button",onClick:()=>f?.(a),style:{...b$,display:"flex",gap:10,alignItems:"center",width:"100%",marginBottom:6,fontWeight:600},children:[(0,b.jsx)(a1,{person:a,size:26}),(0,b.jsxs)("span",{style:{minWidth:0,flex:1},children:[(0,b.jsx)("span",{style:{display:"block",color:"#fff"},children:a.name}),(0,b.jsx)("span",{style:{display:"block",fontSize:10.5,color:"#8a8fa8",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.company||a.headline||""})]}),(0,b.jsx)("span",{style:{fontSize:11,fontWeight:800,color:bY[a.tier]||"#aaa"},children:a.tier})]},a.id))]}),a?.message&&(0,b.jsx)("div",{style:{marginTop:14,fontSize:12,color:"#999",lineHeight:1.55},children:a.message}),!i&&!k.length&&(0,b.jsx)("div",{style:{marginTop:10,fontSize:11.5,color:"#667"},children:"Nothing more on file about this one."})]})}let b0=(a,b)=>a$.TIER_ORDER.indexOf(a.tier)-a$.TIER_ORDER.indexOf(b.tier)||(0,T.score1)(b)-(0,T.score1)(a)||String(a.name||"").localeCompare(String(b.name||"")),b1=a=>String(a||"").trim().split(/\s+/)[0]||"Their",b2={display:"flex",alignItems:"center",gap:9,width:"100%",padding:"7px 8px",borderRadius:8,boxSizing:"border-box",background:"rgba(255,255,255,0.03)",border:"1px solid rgba(255,255,255,0.06)",color:"#fff",cursor:"pointer",textAlign:"left",font:"inherit",textDecoration:"none"};function b3({person:a,tierColors:c,note:d,noteColor:e,onSelect:f,href:g,label:h}){let i=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(a1,{person:a,size:26,tierColors:c}),(0,b.jsxs)("span",{style:{flex:1,minWidth:0},children:[(0,b.jsxs)("span",{style:{display:"block",fontSize:12,fontWeight:700,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[a.name,(0,b.jsx)("span",{style:{fontSize:10,color:c[a.tier]||"#888",fontWeight:800,marginLeft:6},children:a.tier})]}),(0,b.jsx)("span",{style:{display:"block",fontSize:10.5,color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[a.title,a.company].filter(Boolean).join(" · ")||" "})]}),d&&(0,b.jsx)("span",{style:{fontSize:10,fontWeight:700,color:e||"#888",whiteSpace:"nowrap"},children:d})]});return g?(0,b.jsx)(S.default,{href:g,"aria-label":h,style:{...b2,borderColor:"rgba(0,255,136,0.2)"},children:i}):(0,b.jsx)("button",{type:"button",onClick:()=>f?.(a),style:b2,children:i})}function b4({person:a,connections:d=[],degree2:e=[],scanNotes:f,tierColors:g,onSelect:h,onToggle:i,canScan:j=!0}){let[k,l]=(0,c.useState)(null),[m,n]=(0,c.useState)(""),[o,p]=(0,c.useState)(60),q=(0,c.useMemo)(()=>V(d,e),[d,e]),r=(0,c.useMemo)(()=>(0,J.reachIndex)(d,e,f),[d,e,f]),s=(0,c.useMemo)(()=>[...q.circles.get(a.id)||[]].sort(b0),[q,a.id]),t=(0,c.useMemo)(()=>[...q.introduced.get(a.id)||[]].sort(b0),[q,a.id]),u=(0,c.useMemo)(()=>{let a=Object.fromEntries(a$.TIER_ORDER.map(a=>[a,0]));for(let b of s)null!=a[b.tier]&&(a[b.tier]+=1);return a},[s]),v=m.trim().toLowerCase(),w=s.filter(a=>(!k||a.tier===k)&&(v.length<2||[a.name,a.title,a.company].some(a=>String(a||"").toLowerCase().includes(v)))),x=g[a.tier]||"#888";return(0,b.jsxs)("div",{children:[(0,b.jsxs)("button",{onClick:i,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,b.jsx)("span",{style:{fontSize:16},children:"←"})," Close"]}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:4},children:[(0,b.jsx)(a1,{person:a,size:38,tierColors:g}),(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:10,fontWeight:700,letterSpacing:1,color:"#888",textTransform:"uppercase"},children:"You’re in"}),(0,b.jsxs)("h3",{style:{fontSize:16,fontWeight:800,margin:0,color:x},children:[b1(a.name),"’s circle"]})]})]}),(0,b.jsxs)("div",{style:{fontSize:11.5,color:"#999",marginBottom:12},children:[[a.title,a.company].filter(Boolean).join(" · "),(0,b.jsxs)("button",{type:"button",onClick:()=>h?.(a),style:{display:"block",marginTop:6,padding:0,background:"none",border:"none",color:"#74B9FF",fontSize:11,fontWeight:700,cursor:"pointer"},children:["Open ",b1(a.name),"’s card →"]})]}),(0,b.jsx)("div",{style:{fontSize:22,fontWeight:800,lineHeight:1},children:(s.length+t.length).toLocaleString("en-US")}),(0,b.jsxs)("div",{style:{fontSize:11,color:"#888",marginBottom:10},children:[s.length+t.length===1?"person":"people"," in their circle",t.length?` \xb7 you added ${t.length} of them`:""]}),(0,b.jsx)("div",{style:{display:"flex",gap:5,flexWrap:"wrap",marginBottom:10},children:a$.TIER_ORDER.map(a=>(0,b.jsxs)("button",{type:"button","aria-pressed":k===a,disabled:!u[a],onClick:()=>{l(k===a?null:a),p(60)},style:{padding:"4px 9px",borderRadius:12,fontSize:11,fontWeight:700,cursor:u[a]?"pointer":"default",border:`1px solid ${k===a?g[a]:"rgba(255,255,255,0.1)"}`,background:k===a?`${g[a]}26`:"rgba(255,255,255,0.03)",color:u[a]?g[a]:"#444"},children:[a," ",(0,b.jsx)("span",{style:{color:"#aaa",fontWeight:600},children:u[a]})]},a))}),(0,b.jsx)("input",{type:"search",value:m,placeholder:`Search ${b1(a.name)}’s circle`,onChange:a=>{n(a.target.value),p(60)},style:{width:"100%",padding:"8px 12px",borderRadius:8,fontSize:12,marginBottom:14,boxSizing:"border-box",border:"1px solid rgba(255,255,255,0.1)",background:"rgba(255,255,255,0.05)",color:"#fff",outline:"none"}}),t.length>0&&!k&&v.length<2&&(0,b.jsxs)("div",{style:{marginBottom:14},children:[(0,b.jsxs)("div",{style:{fontSize:10,fontWeight:700,color:"#00ff88",letterSpacing:1,marginBottom:6,textTransform:"uppercase"},children:["You added from here (",t.length,")"]}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:5},children:t.map(a=>{let c,[d,e]="ready"===(c=(0,J.reachState)(a,r))?["ready to scan","#00ff88"]:"scanned"===c?["circle scanned","#74B9FF"]:"hidden"===c?["list hidden","#888"]:[null];return"ready to scan"===d&&j?(0,b.jsx)(b3,{person:a,tierColors:g,note:"Scan… →",noteColor:"#00ff88",href:`/setup?scan=${encodeURIComponent(a.id)}`,label:`Scan ${a.name}’s circle: opens the Scan page to confirm`},a.id):(0,b.jsx)(b3,{person:a,tierColors:g,note:d,noteColor:e,onSelect:h},a.id)})})]}),(0,b.jsxs)("div",{style:{fontSize:10,fontWeight:700,color:"#888",letterSpacing:1,marginBottom:6,textTransform:"uppercase"},children:[k?`${k} tier in their circle`:t.length?"Everyone else in their circle":"Everyone in their circle"," (",w.length.toLocaleString("en-US"),")"]}),0===w.length?(0,b.jsx)("div",{style:{fontSize:11.5,color:"#888",lineHeight:1.5},children:0===s.length?"Their circle isn’t scanned yet.":"No one here matches."}):(0,b.jsxs)("div",{role:"list",style:{display:"flex",flexDirection:"column",gap:5},children:[w.slice(0,o).map(a=>(0,b.jsx)(b3,{person:a,tierColors:g,onSelect:h},a.id)),w.length>o&&(0,b.jsxs)("button",{type:"button",onClick:()=>p(a=>a+180),style:{background:"none",border:"none",color:"#888",fontSize:11,fontWeight:600,cursor:"pointer",padding:"6px 0",textAlign:"left"},children:["Show more (",(w.length-o).toLocaleString("en-US")," left)"]})]})]})}function b5({selected:a,stats:d,tierColors:e,connections:f,degree2:i=[],mode:j,collapsed:k,filter:l,pending:m=[],onToggle:n,onSelect:o,onSwitchMode:p,onFocusNode:q,onMarkSent:r,onUndoPending:s,scanNotes:t,csvSource:u=null,onOpenCircle:v,onShowInSeparation:w,note:x=null,onCloseNote:y,circle:z=null}){let A,B,C="degrees"===j,D=!u,{userId:E,userProfile:F}=(0,bV.useUser)(),[G,I]=(0,c.useState)(""),K=(0,c.useMemo)(()=>{let a={};return i.forEach(b=>{b.source_connection_id&&(a[b.source_connection_id]||(a[b.source_connection_id]=[]),a[b.source_connection_id].push(b))}),a},[i]),L=(0,c.useMemo)(()=>(0,T.routeIndex)(i),[i]),M=(0,c.useMemo)(()=>(0,ae.exclusiveReach)(i,f),[i,f]),N=(0,c.useMemo)(()=>(0,ae.bridgeOverlap)(i,f),[i,f]),O=(0,c.useMemo)(()=>(0,J.reachIndex)(f,i,t),[f,i,t]),[P,Q]=(0,c.useState)(!1),R=(0,c.useMemo)(()=>new Map(f.map(a=>[a.id,a])),[f]),S=(0,g.default)(),U=(0,c.useCallback)(a=>(0,h.hasRequest)(a,S),[S]);if(x)return(0,b.jsx)(b6,{collapsed:k,onToggle:n,children:(0,b.jsx)(b_,{note:x,connections:f,degree2:i,onBack:y,onSelect:a=>{y?.(),o?.(a)},onOpenCircle:v?a=>{y?.(),v(a)}:void 0,onShowInSeparation:w?a=>{y?.(),w(a)}:void 0})});if(a){let c,d,g,j,l=1===a.degree&&K[a.id],m=K[a.id]||[],q=2===a.degree?(0,T.routesFor)(a,L,R):[];return(0,b.jsxs)(b6,{collapsed:k,onToggle:n,children:[(0,b.jsxs)("button",{onClick:()=>o&&o(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,b.jsx)("span",{style:{fontSize:16},children:"←"})," Back to list"]}),(0,b.jsx)("div",{style:{fontSize:10,color:"#888",marginBottom:8,letterSpacing:1,textTransform:"uppercase"},children:2===a.degree?"Degree 2 Connection":"Degree 1 Connection"}),(0,b.jsxs)("div",{style:{display:"flex",gap:6,marginBottom:8,flexWrap:"wrap"},children:[(0,b.jsx)("div",{style:{background:2===a.degree?"#FF6B35":e[a.tier],color:"#000",display:"inline-block",padding:"2px 10px",borderRadius:12,fontSize:11,fontWeight:700},children:2===a.degree?`DEGREE 2 \xb7 TIER ${a.tier}`:`TIER ${a.tier}`}),a.unlocked_from_name&&(0,b.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===a.degree?"You met them through ":"Reachable through ",(0,b.jsx)("b",{style:{color:"#cfe6f7"},children:a.unlocked_from_name})]}),a.is_catalyst&&(0,b.jsx)("div",{style:{background:"#00ff88",color:"#000",display:"inline-block",padding:"2px 10px",borderRadius:12,fontSize:11,fontWeight:800,letterSpacing:.5},children:"CATALYST"})]}),(0,b.jsxs)("div",{style:{display:"flex",gap:12,alignItems:"center",marginBottom:16},children:[(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:a.name,style:{width:52,height:52,borderRadius:"50%",objectFit:"cover",border:`2px solid ${e[a.tier]||"#555"}`,flexShrink:0},onError:a=>{a.target.style.display="none",a.target.nextSibling.style.display="flex"}}):null,(0,b.jsx)("div",{style:{width:52,height:52,borderRadius:"50%",flexShrink:0,background:e[a.tier]||"#555",display:(0,H.localPhoto)(a.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center",fontSize:20,fontWeight:700,color:"S"===a.tier?"#000":"#fff"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsx)("h2",{style:{fontSize:18,fontWeight:700,margin:0},children:a.name}),(0,b.jsx)("p",{style:{color:"#aaa",fontSize:11,margin:"3px 0 0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,60)}),a.profile_url&&(0,b.jsx)("a",{href:a.profile_url,target:"_blank",rel:"noopener noreferrer",style:{fontSize:10,color:"#0077B5",textDecoration:"none",fontWeight:600},children:"View on LinkedIn"})]})]}),1===a.degree&&(0,b.jsx)(bK,{person:a,connections:f,degree2:i,tierColors:e,onSelect:o,isRequested:U,canScan:D}),2!==a.degree&&(()=>{let c,d,g=function(a,{degree2:b=[],exclusive:c,overlap:d,reach:e}={}){if(!a||2===a.degree)return null;let f=new Set,g={S:0,A:0,B:0,C:0,D:0},h=new Map;for(let c of b){if(c?.source_connection_id!==a.id)continue;let b=(0,T.keyFor)(c);if(f.has(b))continue;f.add(b),g[bW.includes(c.tier)?c.tier:"D"]+=1;let d=String(c.company||"").trim();d&&h.set(d,(h.get(d)||0)+1)}let i=[...h.entries()].filter(([,a])=>a>=2).sort((a,b)=>b[1]-a[1]||a[0].localeCompare(b[0])).slice(0,2).map(([a,b])=>({name:a,count:b})),j=f.size,k=c?.get(a.id)||{reach:0,only:0,total:0},l=d?.get(a.id),m=l&&l.share>=.15&&l.shared>=3?{id:l.with,share:l.share,shared:l.shared}:null,n=[...c?.entries()||[]].sort((a,b)=>b[1].reach-a[1].reach||String(a[0]).localeCompare(String(b[0]))),o=n.findIndex(([b])=>b===a.id);return{circle:j,only:k.only,onlyShare:j?k.only/j:0,twin:m,mix:g,bars:e?(0,J.scanBars)(a,e):null,rank:o>=0?o+1:null,of:n.length,companies:i}}(a,{degree2:i,exclusive:M,overlap:N,reach:O});if(!g)return null;let j=a.name?.split(" ")[0]||"them",k=g.twin&&f.find(a=>a.id===g.twin.id),l={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:10,padding:"7px 0",borderTop:"1px solid rgba(255,255,255,0.05)"},m={fontSize:10.5,color:"#8b9a9a",minWidth:92},n={background:"none",border:"none",padding:0,color:"#3498DB",cursor:"pointer",fontSize:11.5,whiteSpace:"nowrap"},p=null==g.bars?"Not scanned yet":5===g.bars?"Their whole list":`About ${20*g.bars}% of their list`;return(0,b.jsxs)("div",{style:{border:"1px solid rgba(52,152,219,0.25)",borderRadius:8,marginBottom:16,background:"rgba(52,152,219,0.04)"},children:[(0,b.jsxs)("button",{onClick:()=>Q(a=>!a),"aria-expanded":P,style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",padding:"9px 12px",background:"none",border:"none",cursor:"pointer",color:"#cfe6f7"},children:[(0,b.jsx)("span",{style:{fontSize:11,fontWeight:700,letterSpacing:1},children:"INSIGHTS"}),(0,b.jsxs)("span",{style:{fontSize:11,color:"#8b9a9a"},children:[!P&&g.circle>0&&`${g.circle.toLocaleString()} in their circle${g.only?` \xb7 ${g.only.toLocaleString()} only through ${j}`:""} `,P?"▲":"▼"]})]}),P&&(0,b.jsxs)("div",{style:{padding:"0 12px 8px",fontSize:12,color:"#ccc"},children:[(0,b.jsxs)("div",{style:l,children:[(0,b.jsx)("span",{style:m,children:"Their circle"}),(0,b.jsx)("span",{style:{flex:1},children:g.circle?`${g.circle.toLocaleString()} people`:"None scanned yet"}),g.circle>0&&v&&(0,b.jsx)("button",{style:n,onClick:()=>v(a.id),children:"Explore →"})]}),(0,b.jsxs)("div",{style:l,children:[(0,b.jsxs)("span",{style:m,children:["Only through ",j]}),(0,b.jsx)("span",{style:{flex:1},children:g.circle?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("b",{style:{color:"#00ff88"},children:g.only.toLocaleString()})," (",Math.round(100*g.onlyShare),"%): none of your other connections reach them"]}):"—"}),g.only>0&&w&&(0,b.jsx)("button",{style:n,onClick:()=>w({query:a.name,rarity:"only"}),children:"Show them →"})]}),(0,b.jsxs)("div",{style:l,children:[(0,b.jsx)("span",{style:m,children:"Closest overlap"}),(0,b.jsx)("span",{style:{flex:1},children:k?(0,b.jsxs)(b.Fragment,{children:["Opens the same doors as ",(0,b.jsx)("b",{style:{color:"#fff"},children:k.name})," (",Math.round(100*g.twin.share),"%, ",g.twin.shared.toLocaleString()," people)"]}):"No one opens the same doors"}),k&&(0,b.jsx)("button",{style:n,onClick:()=>o?.(k),children:"Open →"})]}),(0,b.jsxs)("div",{style:l,children:[(0,b.jsx)("span",{style:m,children:"Tier mix"}),(0,b.jsx)("span",{style:{flex:1,display:"flex",height:8,borderRadius:4,overflow:"hidden",background:"rgba(255,255,255,0.05)",alignSelf:"center"},children:g.circle>0&&["S","A","B","C","D"].map(a=>g.mix[a]>0&&(0,b.jsx)("span",{title:`${a}: ${g.mix[a]}`,style:{width:`${100*g.mix[a]/g.circle}%`,background:e[a]}},a))}),(0,b.jsx)("span",{style:{fontSize:10.5,color:"#8b9a9a"},children:g.circle?`${g.mix.S} S \xb7 ${g.mix.A} A`:""}),g.mix.S>0&&w&&(0,b.jsx)("button",{style:n,onClick:()=>w({query:a.name,tier:"S"}),children:"S only →"})]}),g.companies.length>0&&(0,b.jsxs)("div",{style:l,children:[(0,b.jsx)("span",{style:m,children:"Where they work"}),(0,b.jsx)("span",{style:{flex:1},children:g.companies.map(a=>`${a.count} at ${a.name}`).join(" · ")})]}),(0,b.jsxs)("div",{style:l,children:[(0,b.jsx)("span",{style:m,children:"Scanned"}),(0,b.jsx)("span",{style:{flex:1},children:p}),5!==g.bars&&D&&(0,b.jsx)("a",{href:`/setup?scan=${encodeURIComponent(a.id)}`,style:n,children:null==g.bars?"Scan →":"Finish →"})]}),(c=a.connected_date?new Date(a.connected_date):null,d=(K[a.id]||[]).filter(a=>(0,h.hasRequest)(a,S)).length,c&&!Number.isNaN(c.getTime())||d?(0,b.jsxs)("div",{style:l,children:[(0,b.jsxs)("span",{style:m,children:["You and ",j]}),(0,b.jsxs)("span",{style:{flex:1},children:[c&&!Number.isNaN(c.getTime())?`Connected ${c.toLocaleDateString(void 0,{month:"short",year:"numeric"})}`:"",d?`${c?" · ":""}${d} request${1===d?"":"s"} out through them`:""]})]}):null),(0,b.jsxs)("div",{style:l,children:[(0,b.jsx)("span",{style:m,children:"Rank"}),(0,b.jsx)("span",{style:{flex:1},children:g.rank?`#${g.rank} of ${g.of} by who only they reach`:"Ranked once their circle is scanned"})]})]})]})})(),a.is_catalyst&&(0,b.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,b.jsx)("div",{style:{fontSize:10,color:"#00ff88",fontWeight:700,marginBottom:4,letterSpacing:1},children:"CATALYST NODE"}),(0,b.jsxs)("div",{style:{fontSize:12,color:"#ccc"},children:["This person's network power exceeds their own tier. They connect to"," ",(0,b.jsxs)("strong",{style:{color:"#00ff88"},children:[a.catalyst_score," S+A tier"]})," ","people — making them a high-value stepping stone to reach elite connections."]})]}),2===a.degree&&q.length>0&&(0,b.jsx)(b9,{routes:q,selected:a,tierColors:e,onSelect:o},a.id),(0,b.jsxs)("div",{style:{background:"rgba(255,255,255,0.04)",borderRadius:8,padding:12,marginBottom:16},children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",marginBottom:8},children:[(0,b.jsx)("span",{style:{fontSize:11,color:"#888",fontWeight:600,letterSpacing:1,textTransform:"uppercase"},children:"Score"}),(0,b.jsx)("span",{style:{fontSize:28,fontWeight:800,color:e[a.tier]||"#fff"},children:parseFloat(a.power_score).toFixed(1)})]}),a.score_why&&(0,b.jsx)("div",{style:{fontSize:11,color:"#aab7b7",lineHeight:1.5,marginBottom:10},children:a.score_why}),(0,b.jsxs)("div",{style:{marginBottom:6},children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:10,color:"#888",marginBottom:2},children:[(0,b.jsx)("span",{children:"Title"}),(0,b.jsxs)("span",{children:[a.seniority_score||0,"/10"]})]}),(0,b.jsx)("div",{style:{height:4,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,b.jsx)("div",{style:{height:"100%",width:`${10*(a.seniority_score||0)}%`,background:e[a.tier]||"#FFD700",borderRadius:2}})})]}),(0,b.jsxs)("div",{style:{marginBottom:6*(a.circle_power>0)},children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:10,color:"#888",marginBottom:2},children:[(0,b.jsx)("span",{children:"Company"}),(0,b.jsxs)("span",{children:[a.company_prestige_score||0,"/10"]})]}),(0,b.jsx)("div",{style:{height:4,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,b.jsx)("div",{style:{height:"100%",width:`${10*(a.company_prestige_score||0)}%`,background:"#3498DB",borderRadius:2}})})]}),a.circle_power>0&&(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:10,color:"#888",marginBottom:2},children:[(0,b.jsx)("span",{children:"Circle Power"}),(0,b.jsxs)("span",{style:{color:"#FF6B35"},children:[a.circle_s_count||0,"S · ",a.circle_a_count||0,"A"]})]}),(0,b.jsx)("div",{style:{height:4,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,b.jsx)("div",{style:{height:"100%",width:`${Math.min(parseFloat(a.circle_power)/70*100,100)}%`,background:"#FF6B35",borderRadius:2}})})]})]}),(0,b.jsxs)("div",{style:{marginBottom:16},children:[(0,b.jsx)("div",{style:{fontSize:10,fontWeight:700,color:"#FFD700",letterSpacing:1,marginBottom:6,textTransform:"uppercase"},children:"Why This Matters"}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:4,fontSize:11,color:"#ccc"},children:(function(a,b,c,d=[]){let e=[],f=(a.headline||"").toLowerCase(),g=(a.role||"").toLowerCase(),h=(a.company||"").toLowerCase(),i=b.sectors.map(a=>a.toLowerCase());g.match(/ceo|chief|founder|president|chairman/i)?e.push({icon:"👑",text:`${a.role} — C-suite executive, highest leverage contact`,color:"#FFD700"}):g.match(/vp|vice president|svp|evp|managing director/i)?e.push({icon:"⚡",text:`${a.role} — VP-level, strong decision-making authority`,color:"#FFD700"}):g.match(/director|head of|senior director/i)?e.push({icon:"🎯",text:`${a.role} — Senior leadership, controls team/budget`,color:"#FF6B35"}):g.match(/manager|lead|principal/i)&&e.push({icon:"📊",text:`${a.role} — Mid-senior, operational influence`,color:"#3498DB"});let{now:j,before:k}=(0,bE.topCompanies)(a);j&&e.push({icon:"🏢",text:`At ${j.name} (${j.score}/10) — top-tier company network access`,color:"#9B59B6"}),k&&e.push({icon:"📜",text:`Former ${k.name} (${k.score}/10) — carries network from previous role`,color:"#95A5A6"});let l=i.filter(a=>f.includes(a)||h.includes(a));l.length>0&&e.push({icon:"🔗",text:`Shared sector: ${l.join(", ")} — direct industry relevance to you`,color:"#2ECC71"});let m=c.filter(b=>b.source_connection_id===a.id).length;if(m>0){let b=c.filter(b=>b.source_connection_id===a.id&&"S"===b.tier).length;e.push({icon:"🌐",text:`Gateway to ${m} degree-2 connections${b>0?` (${b} S-tier)`:""}`,color:"#FF6B35"})}if(a.is_catalyst&&e.push({icon:"⚡",text:"Catalyst — network power exceeds personal tier, high stepping-stone value",color:"#00ff88"}),2===a.degree&&d.length>0){let a=d.filter(a=>a.bridge);if(1===d.length)e.push(a.length?{icon:"🤝",text:`Reachable via ${a[0].bridge.name} (${a[0].bridge.tier}-tier)`,color:"#3498DB"}:{icon:"🤝",text:"Reachable through a connection we can’t name",color:"#888"});else{let b=a.slice(0,2).map(a=>`${String(a.bridge.name||"").trim().split(/\s+/)[0]} (${a.bridge.tier})`),c=d.length-b.length,f=0===b.length?"connections we can’t name":c>0?`${b.join(", ")} and ${c} more`:b.join(" and ");e.push({icon:"🤝",text:`Reachable ${d.length} ways — via ${f}`,color:"#3498DB"})}}return 0===e.length&&e.push({icon:"📌",text:`${a.tier}-tier connection with ${parseFloat(a.power_score).toFixed(1)} power score`,color:"#888"}),e.slice(0,5)})(a,F||{name:"User",sectors:[],goals:[]},i,q).map((a,c)=>(0,b.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"flex-start"},children:[(0,b.jsx)("span",{style:{color:a.color||"#888",fontSize:13,lineHeight:1},children:a.icon}),(0,b.jsx)("span",{children:a.text})]},c))})]}),a.company&&(0,b.jsxs)("div",{style:{marginBottom:8},children:[(0,b.jsx)("div",{style:{color:"#666",fontSize:10},children:"Company"}),(0,b.jsx)("div",{style:{fontWeight:600,fontSize:12},children:a.company})]}),a.role&&(0,b.jsxs)("div",{style:{marginBottom:12},children:[(0,b.jsx)("div",{style:{color:"#666",fontSize:10},children:"Role"}),(0,b.jsx)("div",{style:{fontSize:12},children:a.role})]}),l&&m.length>0&&(c=m.filter(a=>"S"===a.tier),d=m.filter(a=>"A"===a.tier),g=[...m].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0)).slice(0,8),(0,b.jsxs)("div",{style:{marginBottom:16},children:[(0,b.jsxs)("div",{style:{fontSize:10,fontWeight:700,color:"#FF6B35",letterSpacing:1,marginBottom:8,textTransform:"uppercase"},children:["Cluster Overview — ",m.length," connections"]}),(0,b.jsxs)("div",{style:{display:"flex",gap:6,marginBottom:8,fontSize:10},children:[c.length>0&&(0,b.jsxs)("span",{style:{color:"#FFD700",fontWeight:600},children:[c.length," S-tier"]}),d.length>0&&(0,b.jsxs)("span",{style:{color:"#9B59B6",fontWeight:600},children:[d.length," A-tier"]})]}),(0,b.jsxs)("a",{href:`/queue?bridge=${a.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 ",m.filter(a=>"S"===a.tier||"A"===a.tier||"B"===a.tier).length," People"]}),(0,b.jsx)("div",{style:{fontSize:10,color:"#888",marginBottom:8},children:"Most valuable in this cluster:"}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:g.map(a=>(0,b.jsxs)("div",{onClick:()=>o&&o(a),style:{display:"flex",alignItems:"center",gap:6,padding:"4px 6px",borderRadius:4,cursor:"pointer",borderLeft:`2px solid ${e[a.tier]||"#555"}`,background:"rgba(255,255,255,0.03)"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.08)",onMouseLeave:a=>a.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:22,height:22,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none",a.target.nextSibling.style.display="flex"}}):null,(0,b.jsx)("div",{style:{width:22,height:22,borderRadius:"50%",flexShrink:0,fontSize:9,fontWeight:700,background:e[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:(0,H.localPhoto)(a.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:10,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:8,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,40)})]}),(0,b.jsx)("span",{style:{fontSize:9,color:e[a.tier],fontWeight:600,flexShrink:0},children:parseFloat(a.power_score).toFixed(1)})]},a.id))})]})),l&&m.length>0&&(0,b.jsxs)("div",{style:{marginTop:16},children:[(0,b.jsxs)("div",{style:{fontSize:12,fontWeight:600,color:"#FF6B35",marginBottom:8},children:["Gateway to ",m.length," degree-2 connections:"]}),m.sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0)).slice(0,10).map(a=>(0,b.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,b.jsx)("div",{style:{fontWeight:600},children:a.name}),(0,b.jsxs)("div",{style:{color:"#888",fontSize:11},children:[a.role,a.company?` @ ${a.company}`:""]}),(0,b.jsxs)("div",{style:{color:"#FF6B35",fontSize:10},children:["Score: ",parseFloat(a.power_score).toFixed(1)]})]},a.id))]}),!C&&l&&m.length>0&&p&&(0,b.jsxs)("button",{onClick:()=>{p("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 → ",m.length," connections"]}),(2===a.degree||a.source_connection_id)&&1!==a.degree&&"unlocked"!==a.unlock_status&&(j=U(a),(0,b.jsxs)("div",{style:{background:"rgba(255,215,0,0.06)",border:`1px ${j?"dashed":"solid"} rgba(255,215,0,${j?.45:.25})`,borderRadius:10,padding:16,marginTop:16,textAlign:"center"},children:[(0,b.jsx)("div",{style:{fontSize:10,color:"#FFD700",fontWeight:700,letterSpacing:1,marginBottom:6},children:j?"REQUEST SENT":"LOCKED PATH"}),(0,b.jsx)("div",{style:{fontSize:13,color:"#ccc",marginBottom:12},children:j?`Waiting for ${a.name} to accept. The next scan of your own connections notices when they do.`:`Connect with ${a.name} to unlock their network and extend your six degrees.`}),(0,b.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:j?"[ Cluster Pending... ]":"[ Hidden Network ]"}),j?(0,b.jsx)("button",{onClick:()=>{(0,h.undoRequest)(a).catch(()=>{})},style:{background:"none",border:"none",color:"#888",fontSize:11,fontWeight:600,cursor:"pointer"},children:"Didn't send it? Undo"}):(0,b.jsx)("a",{href:a.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,h.markRequested)(a,{bridgeId:a.source_connection_id}).catch(()=>{})},children:"Connect to Unlock Path"})]})),(1===a.degree||"accepted"===a.outreach_status)&&(D?(0,b.jsx)(ca,{selected:a,degree2:i},a.id):(0,b.jsx)(cb,{csvSource:u,style:{marginTop:16}})),a.profile_url&&(0,b.jsx)("a",{href:a.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(C&&z)return(0,b.jsx)(b6,{collapsed:k,onToggle:n,children:(0,b.jsx)(b4,{person:z,connections:f,degree2:i,scanNotes:t,tierColors:e,onSelect:o,onToggle:n,canScan:D},z.id)});if(C){let a,c,g,h;return(0,b.jsxs)(b6,{collapsed:k,onToggle:n,children:[(0,b.jsxs)("button",{onClick:n,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,b.jsx)("span",{style:{fontSize:16},children:"←"})," Close"]}),(0,b.jsx)("h3",{style:{fontSize:16,fontWeight:700,marginTop:0,color:"#FF6B35"},children:"Degrees"}),(0,b.jsx)("p",{style:{fontSize:12,color:"#888",marginBottom:12},children:"Your bridge connections and who they unlock."}),D?(0,b.jsx)(cf,{connections:f,degree2:i,scanNotes:t,tierColors:e}):(0,b.jsx)(cb,{csvSource:u,style:{marginBottom:16}}),(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,marginBottom:12},children:[(0,b.jsx)(b7,{label:"Degree-2 Found",value:i.length}),(0,b.jsx)(b7,{label:"D2 S-Tier",value:d?.d2Tiers?.S||0}),(0,b.jsx)(b7,{label:"D2 A-Tier",value:d?.d2Tiers?.A||0}),(0,b.jsx)(b7,{label:"Bridges Used",value:Object.keys(K).length})]}),(0,b.jsxs)("div",{style:{position:"relative",marginBottom:16},children:[(0,b.jsx)("input",{type:"text",placeholder:"Search bridges or d2...",value:G,onChange:a=>I(a.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"}}),G.length>=2&&(a=G.toLowerCase(),c=f.filter(b=>i.some(a=>a.source_connection_id===b.id)&&b.name.toLowerCase().includes(a)).slice(0,5),g=i.filter(b=>b.name?.toLowerCase().includes(a)).slice(0,5),0===(h=[...c.map(a=>({...a,_matchType:"bridge"})),...g.map(a=>({...a,_matchType:"d2"}))]).length?null:(0,b.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:h.map(a=>(0,b.jsxs)("div",{onClick:()=>{o(a),I(""),q&&"bridge"===a._matchType&&q(a.id)},style:{padding:"8px 12px",cursor:"pointer",display:"flex",alignItems:"center",gap:8,borderBottom:"1px solid rgba(255,255,255,0.05)"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:24,height:24,borderRadius:"50%",objectFit:"cover"}}):(0,b.jsx)("div",{style:{width:24,height:24,borderRadius:"50%",background:e[a.tier]||"#555",fontSize:9,fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:11,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:8,color:"#666"},children:"bridge"===a._matchType?"Bridge":"Degree-2"})]}),(0,b.jsx)("span",{style:{fontSize:9,fontWeight:700,color:e[a.tier]},children:a.tier})]},a.id))}))]}),"pending"===l&&m.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("h4",{style:{fontSize:13,fontWeight:600,color:"#FF6B35",marginBottom:8},children:["⏳ Pending Requests (",m.length,")"]}),(0,b.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,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:2},children:m.map(a=>{let c=2===a.degree?f.find(b=>b.id===a.source_connection_id):null;return(0,b.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,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:32,height:32,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`2px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:32,height:32,borderRadius:"50%",flexShrink:0,fontSize:12,fontWeight:700,background:e[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:11,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:8,color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,40)}),c&&(0,b.jsxs)("div",{style:{fontSize:8,color:"#FF6B35",marginTop:1},children:["via ",c.name?.split(" ")[0]]})]}),(0,b.jsxs)("div",{style:{textAlign:"center",flexShrink:0},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:800,color:e[a.tier]||"#888"},children:a.tier}),(0,b.jsx)("div",{style:{fontSize:8,color:"#666"},children:parseFloat(a.power_score||0).toFixed(1)})]}),(0,b.jsx)("button",{onClick:()=>s&&s(a),title:"Remove from pending",style:{background:"none",border:"none",color:"#555",cursor:"pointer",fontSize:12,padding:2,flexShrink:0},children:"✕"})]},a.id)})})]}),"pending"!==l&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h4",{style:{fontSize:13,fontWeight:600,color:"#FF6B35",marginBottom:8},children:"Most Valuable Clusters"}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:Object.entries(K).map(([a,b])=>{let c=f.find(b=>b.id===a);if(!c)return null;let d=b.length;if(0===d)return null;let e=b.filter(a=>"S"===a.tier),g=b.filter(a=>"A"===a.tier),h=b.filter(a=>"B"===a.tier),i=e.length,j=g.length,k=h.length,l=i>0?e.reduce((a,b)=>a+(parseFloat(b.power_score)||0),0)/i:0,m=j>0?g.reduce((a,b)=>a+(parseFloat(b.power_score)||0),0)/j:0,n=h.filter(a=>(parseFloat(a.power_score)||0)>=5).length,o=(i+j)/d,p=l/7*i*15+m/5.5*j*6+3*n+25*o+2*Math.log2(d+1)+10*!!c.is_catalyst,q=b.reduce((a,b)=>a+(parseFloat(b.power_score)||0),0)/d;return{bridge:c,members:d,sCount:i,aCount:j,bCount:k,risingCount:n,sAvgPower:l,avgPower:q,elitePct:o,clusterValue:p,sTier:e,aTier:g,topMembers:[...b].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0))}}).filter(Boolean).sort((a,b)=>b.clusterValue-a.clusterValue).map((a,c)=>(0,b.jsx)(ce,{cs:a,rank:c+1,tierColors:e,onSelect:o},a.bridge.id))})]})]})}let V=[...f||[]].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0)),W=G.length>=2?V.filter(a=>a.name.toLowerCase().includes(G.toLowerCase())).slice(0,8):[];return(0,b.jsxs)(b6,{collapsed:k,onToggle:n,children:[(0,b.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:12,fontWeight:600},children:[(0,b.jsx)("span",{style:{fontSize:16},children:"←"})," Close"]}),(0,b.jsx)("h3",{style:{fontSize:16,fontWeight:700,marginTop:0},children:"Network Circle"}),d&&(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,marginBottom:16},children:[(0,b.jsx)(b7,{label:"Total Connections",value:d.total}),(0,b.jsx)(b7,{label:"S-Tier",value:d.tiers?.S||0}),(0,b.jsx)(b7,{label:"A-Tier",value:d.tiers?.A||0}),(0,b.jsx)(b7,{label:"B-Tier",value:d.tiers?.B||0})]}),(0,b.jsxs)("div",{style:{position:"relative",marginBottom:12},children:[(0,b.jsx)("input",{type:"text",placeholder:"Search connections...",value:G,onChange:a=>I(a.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"}}),W.length>0&&(0,b.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:W.map(a=>(0,b.jsxs)("div",{onClick:()=>{o&&o(a),q&&q(a.id),I("")},style:{display:"flex",alignItems:"center",gap:8,padding:"8px 10px",cursor:"pointer",borderBottom:"1px solid rgba(255,255,255,0.04)"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.08)",onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:24,height:24,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:24,height:24,borderRadius:"50%",flexShrink:0,fontSize:10,fontWeight:700,background:e[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:12,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666"},children:a.headline?.substring(0,35)})]}),(0,b.jsx)("span",{style:{fontSize:10,color:e[a.tier],fontWeight:700},children:a.tier})]},a.id))})]}),(0,b.jsxs)("h4",{style:{fontSize:13,fontWeight:600,color:"#FFD700",marginBottom:8},children:["Power Rankings (",V.length,")"]}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:(A={},B={},V.forEach(a=>{B[a.tier]=(B[a.tier]||0)+1}),V.map((a,c)=>{let d=c>0?V[c-1].tier:null,f=a.tier!==d;f&&(A[a.tier]=0),A[a.tier]=(A[a.tier]||0)+1;let g=A[a.tier];return(0,b.jsxs)("div",{children:[f&&(0,b.jsxs)("div",{style:{padding:"8px 10px",marginTop:8*(c>0),marginBottom:4,background:`${e[a.tier]||"#555"}15`,borderLeft:`3px solid ${e[a.tier]||"#555"}`,borderRadius:4,fontSize:11,fontWeight:700,color:e[a.tier]||"#888",display:"flex",justifyContent:"space-between"},children:[(0,b.jsx)("span",{children:{S:"S-Tier — Elite",A:"A-Tier — High Value",B:"B-Tier — Notable",C:"C-Tier — Standard",D:"D-Tier — Entry"}[a.tier]||a.tier}),(0,b.jsx)("span",{style:{fontWeight:400,opacity:.7},children:B[a.tier]||0})]}),(0,b.jsxs)("div",{onClick:()=>{o&&o(a),q&&q(a.id)},style:{padding:"6px 8px",background:"rgba(255,255,255,0.03)",borderRadius:6,borderLeft:`3px solid ${e[a.tier]||"#555"}`,cursor:"pointer",display:"flex",alignItems:"center",gap:8,transition:"background 0.15s"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.1)",onMouseLeave:a=>a.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,b.jsxs)("span",{style:{color:"#555",fontSize:10,fontWeight:600,minWidth:22,textAlign:"right"},children:["#",g]}),(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none",a.target.nextSibling.style.display="flex"}}):null,(0,b.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",flexShrink:0,background:e[a.tier]||"#555",display:(0,H.localPhoto)(a.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center",fontSize:12,fontWeight:700,color:"S"===a.tier?"#000":"#fff"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,b.jsx)("div",{style:{fontWeight:600,fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,45)})]}),(0,b.jsxs)("div",{style:{textAlign:"right",flexShrink:0},children:[(0,b.jsx)("div",{style:{fontSize:10,fontWeight:700,color:e[a.tier]||"#555"},children:parseFloat(a.power_score).toFixed(1)}),(0,b.jsx)("div",{style:{fontSize:8,color:"#555"},children:a.tier})]})]})]},a.id)}))})]})}function b6({children:a,collapsed:d,onToggle:e}){let[f,g]=(0,c.useState)(!1);return((0,c.useEffect)(()=>{let a=()=>g(window.innerWidth<768);return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),d)?(0,b.jsxs)("div",{onClick:e,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:a=>{a.currentTarget.style.width="120px"},onMouseLeave:a=>{a.currentTarget.style.width="36px"},children:[(0,b.jsx)("span",{style:{fontSize:18,flexShrink:0,width:16,textAlign:"center"},children:"‹"}),(0,b.jsx)("span",{style:{fontSize:11,fontWeight:600,whiteSpace:"nowrap",marginRight:6,opacity:.9},children:"Details"})]}):(0,b.jsxs)("div",{style:f?{position:"fixed",top:0,right:0,bottom:0,zIndex:100,width:"100vw",pointerEvents:"auto"}:{flexShrink:0,height:"100%"},children:[f&&(0,b.jsx)("div",{onClick:e,style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.5)"}}),(0,b.jsx)("div",{style:{width:f?"80vw":320,minWidth:320*!f,maxWidth:f?300:320,height:"100%",borderLeft:"1px solid rgba(255,215,0,0.12)",padding:f?"12px 10px":"16px 16px",overflowY:"auto",overflowX:"hidden",background:f?"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:f?"auto":0},children:a})]})}function b7({label:a,value:c}){return(0,b.jsxs)("div",{style:{background:"rgba(255,255,255,0.05)",padding:"10px 12px",borderRadius:8},children:[(0,b.jsx)("div",{style:{fontSize:10,color:"#888",marginBottom:2},children:a}),(0,b.jsx)("div",{style:{fontSize:18,fontWeight:700},children:c})]})}function b8(){return(0,b.jsx)("span",{style:{color:"#555",fontSize:16},children:"→"})}function b9({routes:a,selected:d,tierColors:e,onSelect:f}){let[g,h]=(0,c.useState)(!1),i=a.length,j=g?a:a.slice(0,4),k={display:"flex",alignItems:"center",gap:6,fontSize:13,flexWrap:"wrap"};return(0,b.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,b.jsxs)("div",{style:{fontSize:10,color:"#FF6B35",fontWeight:600,marginBottom:8},children:["PATH TO THIS PERSON",i>1?` \xb7 ${i} WAYS IN`:""]}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:j.map((a,c)=>{if(!a.bridge)return(0,b.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:{...k,color:"#888",fontStyle:"italic"},children:[(0,b.jsx)("span",{style:{fontWeight:700,fontStyle:"normal",color:"#fff"},children:"You"}),(0,b.jsx)(b8,{}),(0,b.jsx)("span",{children:"a connection we can’t name"}),(0,b.jsx)(b8,{}),(0,b.jsx)("span",{children:"them"})]},`unnamed-${a.id}`);let g=a.bridge,h=e[g.tier]||"#ccc",j=[[g.role,g.company].filter(Boolean).join(" @ "),g.tier?`${g.tier}-tier`:""].filter(Boolean).join(" · ");return(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:k,children:[(0,b.jsx)("span",{style:{fontWeight:700},children:"You"}),(0,b.jsx)(b8,{}),(0,b.jsxs)("button",{onClick:()=>f&&f(g),title:`Open ${g.name}`,style:{display:"inline-flex",alignItems:"center",gap:6,padding:0,border:"none",background:"none",cursor:"pointer",color:h,fontWeight:600,fontSize:13,textAlign:"left"},children:[(0,b.jsx)(a1,{person:g,size:18,tierColors:e}),g.name]}),(0,b.jsx)(b8,{}),(0,b.jsx)("span",{style:{color:"#FF6B35",fontWeight:600},children:d.name}),0===c&&i>1&&(0,b.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"})]}),j&&(0,b.jsx)("div",{style:{fontSize:11,color:"#888",marginTop:3},children:j})]},a.id)})}),i>4&&(0,b.jsx)("button",{onClick:()=>h(a=>!a),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:g?"Show fewer":`Show all ${i}`})]})}function ca({selected:a,degree2:d}){let g=(0,f.default)(),[h,i]=(0,c.useState)(!1),[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)(void 0),n=d?.filter(b=>b.source_connection_id===a.id).length||0,o=n>0,p=g.running&&(0,e.scansCircleOf)(g,a),q=g.running&&!p?(0,e.busyReason)(g):null,r=g.finished.find(b=>(0,e.scansCircleOf)(b,a)),s=g.finished[0]?.startedAt??null;async function t(b){k(null),i(!0);let c=(0,e.notReadyMessage)(await (0,e.scraperStatus)().catch(()=>null));if(i(!1),c)return void k({text:c,offline:!0});try{await (0,e.beginScrape)(b,"resume"===b?{id:a.id}:{name:a.name,id:a.id})}catch(a){k({text:a.message||"Could not start the scan."})}}(0,c.useEffect)(()=>{let b=!0;return(0,e.resumePoint)(a.id).then(a=>{b&&m(a)},()=>{b&&m(null)}),()=>{b=!1}},[a.id,s]);let u=o||!!l,v=o?"#00ff88":"#9B59B6",w=!!q||h,x=a=>({flex:1,padding:"11px 8px",borderRadius:8,fontWeight:700,fontSize:a?13:12,cursor:w?"not-allowed":"pointer",opacity:w?.45:1,...a?{border:"none",background:"linear-gradient(135deg, #9B59B6, #3498DB)",color:"#fff"}:{border:`1px solid ${v}55`,background:`${v}14`,color:v}});return(0,b.jsxs)("div",{id:"scan-box",style:{background:o?"rgba(0,255,136,0.06)":"rgba(155,89,182,0.08)",border:`1px solid ${o?"rgba(0,255,136,0.2)":"rgba(155,89,182,0.3)"}`,borderRadius:10,padding:16,marginTop:16},children:[(0,b.jsx)("div",{style:{fontSize:10,color:v,fontWeight:700,letterSpacing:1,marginBottom:4,textAlign:"center"},children:o?"CLUSTER ACTIVE":"CREATE CLUSTER"}),(0,b.jsx)("div",{style:{fontSize:12,color:"#aaa",marginBottom:12,textAlign:"center"},children:o?`${n} connections mapped in Six Degrees`:(0,b.jsxs)(b.Fragment,{children:["Scan ",a.name,"'s connections to map their network"]})}),p?(0,b.jsx)(cc,{title:g.pending?"Starting…":`Scanning ${a.name}’s circle…`,log:g.log}):j?.offline?(0,b.jsxs)(b.Fragment,{children:[(0,b.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,b.jsxs)("div",{style:{fontSize:10,color:"#888",textAlign:"center",marginBottom:8},children:[j.text," Open the ",(0,b.jsx)("strong",{children:"Scan"})," page to finish setting the scanner up."]}),(0,b.jsx)("button",{onClick:()=>k(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,b.jsxs)(b.Fragment,{children:[r&&(0,b.jsx)(cd,{job:r}),(0,b.jsxs)("div",{style:{display:"flex",gap:8},children:[l&&(0,b.jsxs)("button",{onClick:()=>t("resume"),disabled:w,style:x(!0),children:["Resume from page ",l.nextPage]}),(0,b.jsx)("button",{onClick:()=>t("bridge"),disabled:w,style:x(!l&&!o),children:u?"Rescan from the start":(0,b.jsxs)(b.Fragment,{children:["Scan ",a.name,"'s Network"]})})]}),l&&(0,b.jsxs)("div",{style:{fontSize:10,color:"#888",marginTop:8,lineHeight:1.45,textAlign:"center"},children:["Read to page ",l.pagesRead," so far. Resume carries on from page ",l.nextPage,". LinkedIn lists their connections in its own order, not by date, so Rescan reads them all again from page 1."]}),o&&null===l&&(0,b.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."}),q&&(0,b.jsxs)("div",{style:{fontSize:10,color:"#bbb",marginTop:8,textAlign:"center"},children:[q,". One scan at a time: this one can start when it finishes."]}),j&&(0,b.jsx)("div",{style:{fontSize:11,color:"#ff8080",marginTop:8,textAlign:"center"},children:j.text})]})]})}function cb({csvSource:a,style:c}){return(0,b.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)",...c},children:"sample"===a?"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 cc({title:a,log:c,small:d=!1}){return(0,b.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,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:4},children:[(0,b.jsx)("style",{children:"@keyframes scanlogPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } } @media (prefers-reduced-motion: reduce) { .scanlog-dot { animation: none !important; } }"}),(0,b.jsx)("div",{className:"scanlog-dot",style:{width:d?6:8,height:d?6:8,borderRadius:"50%",background:"#9B59B6",animation:"scanlogPulse 1s ease-in-out infinite"}}),(0,b.jsx)("span",{style:{fontSize:11,fontWeight:600,color:"#9B59B6"},children:a})]}),(0,b.jsx)("div",{style:{fontFamily:"monospace",fontSize:d?9:10,color:"#888",maxHeight:d?80:100,overflow:"auto"},children:c.slice(-40).map((a,c)=>(0,b.jsx)("div",{children:a},c))})]})}function cd({job:a,who:c=null}){let d=0===a.exitCode,e=!d&&Array.isArray(a.failure)&&a.failure.length?a.failure[a.failure.length-1]:null;return(0,b.jsx)("div",{style:{padding:"8px 10px",borderRadius:8,marginBottom:10,fontSize:11,textAlign:"center",lineHeight:1.4,background:d?"rgba(0,255,136,0.08)":"rgba(255,80,80,0.08)",border:`1px solid ${d?"rgba(0,255,136,0.25)":"rgba(255,80,80,0.25)"}`,color:d?"#00ff88":"#ff8080"},children:d?`${c?`${c}’s circle`:"The scan"} finished. What it found is on the map.`:`${c?`${c}’s scan`:"The scan"} stopped before the end${e?`: ${e}`:"."}`})}function ce({cs:a,rank:d,tierColors:e,onSelect:f}){let[g,h]=(0,c.useState)(!1);return(0,b.jsxs)("div",{style:{background:"rgba(255,255,255,0.05)",borderRadius:6,borderLeft:`3px solid ${e[a.bridge.tier]||"#FF6B35"}`,overflow:"hidden"},children:[(0,b.jsxs)("div",{style:{padding:"10px 10px"},children:[(0,b.jsxs)("div",{onClick:()=>f&&f(a.bridge),style:{cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,H.localPhoto)(a.bridge.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.bridge.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${e[a.bridge.tier]||"#555"}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",flexShrink:0,fontSize:11,fontWeight:700,background:e[a.bridge.tier]||"#555",color:"S"===a.bridge.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:a.bridge.name?.charAt(0)}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{fontWeight:600,fontSize:12},children:[(0,b.jsxs)("span",{style:{color:"#555",marginRight:4},children:["#",d]}),a.bridge.name]}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666"},children:a.bridge.headline?.substring(0,40)})]})]}),(0,b.jsx)("span",{style:{fontSize:10,fontWeight:700,padding:"2px 6px",borderRadius:4,background:e[a.bridge.tier],color:"S"===a.bridge.tier?"#000":"#fff"},children:a.bridge.tier})]}),(0,b.jsxs)("div",{style:{display:"flex",gap:6,marginTop:6,fontSize:10},children:[a.sCount>0&&(0,b.jsxs)("span",{style:{color:"#FFD700",fontWeight:600},children:[a.sCount,"S",a.sAvgPower>0?` (${a.sAvgPower.toFixed(1)})`:""]}),a.aCount>0&&(0,b.jsxs)("span",{style:{color:"#9B59B6",fontWeight:600},children:[a.aCount,"A"]}),a.bCount>0&&(0,b.jsxs)("span",{style:{color:"#3498DB"},children:[a.bCount,"B"]}),a.risingCount>0&&(0,b.jsxs)("span",{style:{color:"#2ECC71"},children:[a.risingCount," rising"]}),(0,b.jsxs)("span",{style:{color:"#555"},children:[a.members," total"]})]}),(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:4,fontSize:10},children:[(0,b.jsxs)("span",{style:{color:"#666"},children:["Elite: ",(100*a.elitePct).toFixed(0),"% · Avg: ",a.avgPower.toFixed(1)]}),(0,b.jsx)("span",{style:{color:"#FF6B35",fontWeight:700},children:a.clusterValue.toFixed(1)})]}),(a.sTier.length>0||a.aTier.length>0)&&(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,marginTop:8},children:[[...a.sTier,...a.aTier].slice(0,4).map(a=>(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:a.name,style:{width:22,height:22,borderRadius:"50%",objectFit:"cover",border:`1.5px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none"},title:a.name},a.id):(0,b.jsx)("div",{style:{width:22,height:22,borderRadius:"50%",fontSize:9,fontWeight:700,background:e[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},title:a.name,children:a.name?.charAt(0)},a.id)),a.sCount+a.aCount>4&&(0,b.jsxs)("span",{style:{fontSize:9,color:"#666"},children:["+",a.sCount+a.aCount-4," more"]})]}),(0,b.jsxs)("button",{onClick:()=>h(!g),style:{marginTop:6,background:"none",border:"none",color:"#888",fontSize:10,cursor:"pointer",padding:0,display:"flex",alignItems:"center",gap:4},children:[(0,b.jsx)("span",{style:{fontSize:12},children:g?"▾":"▸"}),g?"Hide members":`View all ${a.members} members`]})]}),g&&(0,b.jsx)("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)",padding:"6px 10px 10px",maxHeight:250,overflowY:"auto"},children:a.topMembers.map(a=>(0,b.jsxs)("div",{onClick:()=>f&&f(a),style:{display:"flex",alignItems:"center",gap:6,padding:"4px 2px",cursor:"pointer",borderRadius:4},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:20,height:20,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none",a.target.nextSibling.style.display="flex"}}):null,(0,b.jsx)("div",{style:{width:20,height:20,borderRadius:"50%",flexShrink:0,fontSize:8,fontWeight:700,background:e[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:(0,H.localPhoto)(a.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsx)("div",{style:{minWidth:0,flex:1},children:(0,b.jsx)("div",{style:{fontSize:10,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name})}),(0,b.jsxs)("span",{style:{fontSize:9,color:e[a.tier]||"#555",fontWeight:600,flexShrink:0},children:[a.tier," ",parseFloat(a.power_score).toFixed(1)]})]},a.id))})]})}function cf({connections:a,degree2:d,scanNotes:g,tierColors:h}){let i=(0,f.default)(),[j,k]=(0,c.useState)(!1),l=(0,c.useMemo)(()=>(0,J.reachIndex)(a,d,g),[a,d,g]),m=(0,c.useMemo)(()=>(0,J.readyToScan)(a,l),[a,l]),n=(0,c.useMemo)(()=>a.filter(a=>"hidden"===(0,J.reachState)(a,l)),[a,l]),o=(0,c.useMemo)(()=>a.filter(a=>null===(0,J.reachState)(a,l)&&"todo"===(0,J.circleState)(a,l)).length,[a,l]),p=(0,c.useMemo)(()=>new Map(a.map(a=>[a.id,a])),[a]),q=(0,J.circleScanCost)(),r=i.running&&(0,e.isCircleScan)(i),s=i.running&&!r?(0,e.busyReason)(i):null,t=i.finished.find(e.isCircleScan),u=j?m:m.slice(0,5);return(0,b.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,b.jsxs)("div",{style:{fontSize:12,fontWeight:800,color:"#00ff88",marginBottom:4},children:["Ready to scan (",m.length,")"]}),(0,b.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."}),r?(0,b.jsx)("div",{style:{marginBottom:10},children:(0,b.jsx)(cc,{small:!0,title:i.pending?"Starting…":`Scanning ${i.target?.name||"a circle"}…`,log:i.log})}):t&&(0,b.jsx)(cd,{job:t,who:t.target?.name}),0===m.length?(0,b.jsxs)("div",{style:{fontSize:11,color:"#aaa",lineHeight:1.5},children:["Nobody yet. When someone you asked from a circle accepts, ↻ ",(0,b.jsx)("b",{children:"Check for new"})," brings them into your connections, and they show here."]}):(0,b.jsxs)("div",{role:"list",style:{display:"flex",flexDirection:"column",gap:6},children:[u.map(a=>{let c=r&&(0,e.scansCircleOf)(i,a),d=p.get(a.unlocked_from_bridge_id)?.name||a.unlocked_from_name;return(0,b.jsxs)(S.default,{role:"listitem",href:`/setup?scan=${encodeURIComponent(a.id)}`,"aria-label":`Scan ${a.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,b.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",flexShrink:0,background:h[a.tier]||"#888",boxShadow:"0 0 0 2px rgba(0,255,136,0.45)"}}),(0,b.jsxs)("span",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("span",{style:{fontSize:12,fontWeight:700},children:a.name}),(0,b.jsx)("span",{style:{fontSize:10,color:h[a.tier]||"#888",fontWeight:700,marginLeft:6},children:a.tier}),d&&(0,b.jsxs)("span",{style:{display:"block",fontSize:10,color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["was in ",String(d||"").trim().split(/\s+/)[0],"'s circle"]})]}),(0,b.jsx)("span",{style:{fontSize:10.5,fontWeight:700,color:"#00ff88",whiteSpace:"nowrap"},children:c?"Scanning…":"Scan… →"})]},a.id)}),m.length>5&&(0,b.jsx)("button",{type:"button",onClick:()=>k(a=>!a),style:{background:"none",border:"none",color:"#888",fontSize:10.5,fontWeight:600,cursor:"pointer",padding:"2px 0",textAlign:"left"},children:j?"Show fewer":`Show all ${m.length}`})]}),m.length>0&&(0,b.jsxs)("div",{style:{fontSize:10,color:"#888",lineHeight:1.5,marginTop:8},children:["Each scan: ",q.profileViews," profile view, then one LinkedIn search for every page of their list, up to ",q.searches," pages (about ",q.minutes," min for a whole list). Nothing starts until you confirm it on the Scan page."]}),n.length>0&&(0,b.jsxs)("div",{style:{marginTop:10,fontSize:10.5,color:"#777",lineHeight:1.6},children:[n.slice(0,3).map(a=>(0,b.jsxs)("div",{style:{opacity:.7},children:[(0,b.jsx)("span",{"aria-hidden":"true",children:"🔒"})," ",a.name," ",(0,b.jsx)("span",{style:{color:"#666"},children:"· their list is hidden"})]},a.id)),n.length>3&&(0,b.jsxs)("div",{style:{opacity:.7},children:["🔒 and ",n.length-3," more with hidden lists"]})]}),o>0&&(0,b.jsxs)("div",{style:{fontSize:10.5,color:"#888",lineHeight:1.5,marginTop:10},children:[o.toLocaleString("en-US")," of your other connections aren't scanned yet."," ",(0,b.jsx)(S.default,{href:"/setup",style:{color:"#3498DB",textDecoration:"none"},children:"Map them in batches on the Scan page →"})]}),s&&(0,b.jsxs)("div",{style:{fontSize:10,color:"#bbb",marginTop:8},children:[s,". One scan at a time."]})]})}var cg=a.i(80306),ch=a.i(36839),ci=a.i(58834);function cj(){let[a,d]=(0,c.useState)(!1),[e,f]=(0,c.useState)("");async function g(){d(!0),f("");try{await (0,ci.loadSampleIntoSession)(),window.location.reload()}catch(a){f(a.message||"Could not load the sample network."),d(!1)}}return(0,b.jsx)("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",padding:24,overflowY:"auto"},children:(0,b.jsxs)("div",{style:{maxWidth:520,width:"100%",textAlign:"center"},children:[(0,b.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,b.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,b.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,b.jsx)(ck,{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,b.jsx)(ck,{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,b.jsx)(ck,{onClick:g,disabled:a,title:a?"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."}),e&&(0,b.jsx)("div",{style:{color:"#ff6b6b",fontSize:13,marginTop:18},children:e}),(0,b.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,b.jsx)("a",{href:"/settings#data",style:{color:"rgba(255,255,255,0.75)"},children:"Import your saved copy in Settings → Your data."})]})]})})}function ck({href:a,onClick:c,disabled:d,primary:e,badge:f,title:g,body:h}){let i={display:"block",width:"100%",boxSizing:"border-box",textAlign:"left",padding:"16px 18px",borderRadius:12,marginBottom:12,textDecoration:"none",cursor:d?"default":"pointer",font:"inherit",border:e?"1px solid rgba(255,215,0,0.45)":"1px solid rgba(255,255,255,0.12)",background:e?"linear-gradient(135deg, rgba(255,215,0,0.12), rgba(155,89,182,0.14))":"rgba(255,255,255,0.03)",color:"#fff"},j=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:5},children:[(0,b.jsx)("span",{style:{fontSize:15.5,fontWeight:750},children:g}),f&&(0,b.jsx)("span",{style:{fontSize:10.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",padding:"3px 8px",borderRadius:20,background:"#FFD700",color:"#0a0a1a"},children:f}),(0,b.jsx)("span",{style:{marginLeft:"auto",color:"rgba(255,255,255,0.4)"},children:"→"})]}),(0,b.jsx)("div",{style:{fontSize:13,color:"rgba(255,255,255,0.5)",lineHeight:1.6},children:h})]});return a?(0,b.jsx)("a",{href:a,style:i,children:j}):(0,b.jsx)("button",{onClick:c,disabled:d,style:i,children:j})}var cl=a.i(42510),cm=a.i(41798);let cn=[],co=a=>!!a&&!["install","setup","login"].includes(a.action);function cp(a,b){let c={};a.forEach(a=>{c[a.tier]=(c[a.tier]||0)+1});let d={};return b.forEach(a=>{d[a.tier]=(d[a.tier]||0)+1}),{total:a.length,tiers:c,d2Total:b.length,d2Tiers:d}}let cq={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"};function cr(){let a,f,j,k,{userId:l,userName:m}=(0,bV.useUser)(),n=function(){let[a,b]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{let a=()=>b(window.innerWidth<768);return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),a}(),[o,p]=(0,c.useState)([]),[q,r]=(0,c.useState)([]),[s,t]=(0,c.useState)([]),[u,v]=(0,c.useState)({network:bC.NETWORK_GRID,degrees:bC.DEGREES_GRID}),[w,x]=(0,c.useState)(null),y=(0,c.useRef)(null),z=(0,d.useSearchParams)(),A=z.get("chain"),B=["network","degrees","separation"].includes(z.get("mode"))?z.get("mode"):null,[C,D]=(0,c.useState)(A),[E,F]=(0,c.useState)(null),[G,H]=(0,c.useState)(()=>C?"degrees":B||"network"),[I,J]=(0,c.useState)(!0),[K,L]=(0,c.useState)(null),[M,N]=(0,c.useState)(!0),[O,P]=(0,c.useState)(!0),[Q,R]=(0,c.useState)(()=>C||"degrees"===B?"chain":"separation"===B?"separation":"galaxy"),[U,V]=(0,c.useState)([]),[W,X]=(0,c.useState)(!1),[Y,Z]=(0,c.useState)(null),[$,_]=(0,c.useState)(!1),[aa,ab]=(0,c.useState)("csv"),[ac,ad]=(0,c.useState)(e.NO_SCAN_NOTES),ae=(0,c.useRef)(""),af=(0,h.requestCount)((0,g.default)());(0,c.useEffect)(()=>{l&&(a(),ci.IS_DEMO||(0,cl.hasCsvNetwork)()||((0,e.loadScanNotes)().then(ad),fetch(`/api/notifications?userId=${l}`).then(a=>a.json()).then(a=>V(a.notifications||[])).catch(()=>{})));async function a(){let a=(0,cl.hasCsvNetwork)()?(0,cl.loadCsvNetwork)():null;a&&(_(!0),ab(a.source||"csv"));let{degree1:b,degree2:c,degree3:d=[]}=ci.IS_DEMO?await (0,ci.loadDemoNetwork)():a||await (async()=>await (0,i.loadNetwork)(l))();p(b),r(c),t(d||[]),ae.current=cs(b,c),L(cp(b,c)),J(!1)}},[l]);let ag=(0,c.useCallback)(async()=>{if(!(ci.IS_DEMO||(0,cl.hasCsvNetwork)())&&l)try{let[{degree1:a,degree2:b,degree3:c=[]},d]=await Promise.all([(0,i.loadNetwork)(l),(0,e.loadScanNotes)()]);ad(a=>JSON.stringify(a)===JSON.stringify(d)?a:d),t(a=>a.length===(c||[]).length?a:c||[]);let f=cs(a,b);if(f===ae.current)return;ae.current=f,p(a),r(b),L(cp(a,b))}catch{}},[l]),[ah,ai]=(0,c.useState)(null),aj=(0,c.useCallback)(a=>{ai({...a,id:`${a.query}|${a.tier||""}|${a.rarity||""}|${Math.random()}`}),H("separation"),R("separation")},[]),ak=(0,c.useCallback)(a=>{D(a),H("degrees"),R("chain")},[]),al=(0,c.useCallback)(()=>{D(null);try{window.history.replaceState(null,"",window.location.pathname)}catch{}},[]),am="degrees"===G||"separation"===G,an=(0,c.useMemo)(()=>(function(a=[],b=[],c=[]){let d=new Set,e=(a,b)=>{let c=[];for(let e of a||[]){let a=(0,T.keyFor)(e);d.has(a)||(d.add(a),c.push(e.degree===b?e:{...e,degree:b}))}return c};return{1:e(a,1),2:e(b,2),3:e(c,3)}})(o,q,s),[o,q,s]),ao=am?u.degrees:u.network,ap=(0,c.useMemo)(()=>am?o.filter(a=>(0,bC.shows)(ao,a.tier,1)):[1,2,3].flatMap(a=>(an[a]||[]).filter(b=>(0,bC.shows)(ao,b.tier,a))),[am,o,an,ao]),aq=(0,c.useMemo)(()=>new Map(o.map(a=>[a.id,a])),[o]),ar=(0,c.useMemo)(()=>new Set(q.map(a=>a.source_connection_id).filter(Boolean)),[q]),as=(0,c.useMemo)(()=>am?q.filter(a=>(0,bC.shows)(ao,a.tier,2)&&(0,bC.shows)(ao,aq.get(a.source_connection_id)?.tier,1)):cn,[am,ao,aq,q]),at=(0,c.useMemo)(()=>(0,bC.gridCounts)(am?{1:o.filter(a=>ar.has(a.id)),2:an[2]}:an),[am,o,ar,an]),au=(0,c.useCallback)(a=>{x(a),a&&(N(!1),Z(null))},[]),av=(a=bx[Q])&&a.modes.includes(G)?{key:Q,...a}:bz(G)[0]??{key:"list",...bx.list},aw=o.length>0;if((0,c.useEffect)(()=>{if(aw)return(0,a_.setNotchTabs)({items:bz(G).map(a=>({key:a.key,label:a.label,icon:a.icon,title:a.desc})),current:av.key,onPick:R}),()=>(0,a_.setNotchTabs)(null)},[G,av.key,aw]),I)return(0,b.jsxs)("div",{style:{minHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:"#0a0a1a",color:"#fff"},children:[(0,b.jsx)("div",{style:{fontSize:24,fontWeight:700},children:"Loading Six Degrees…"}),(0,b.jsx)("div",{style:{fontSize:14,color:"#888",marginTop:8},children:"Mapping your LinkedIn network"})]});let ax=!ci.IS_DEMO&&!$;return(0,b.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,b.jsxs)("header",{style:{padding:n?"10px 12px":"20px 30px",borderBottom:"1px solid rgba(255,255,255,0.1)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:n?4:8,flexWrap:n?"wrap":"nowrap",gap:6*!!n},children:[(0,b.jsx)("h1",{style:{fontSize:n?16:28,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FFD700, #9B59B6, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Six Degrees"}),(0,b.jsx)(cm.default,{active:G,isMobile:n,csvMode:$,onMode:a=>{H(a),x(null),R("network"===a?"galaxy":"degrees"===a?"chain":"separation")},after:ci.IS_DEMO||$?null:(0,b.jsx)(bB,{isMobile:n}),children:$&&(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginLeft:n?4:10,padding:n?"4px 8px":"5px 10px",borderRadius:999,background:"rgba(255,255,255,0.05)",border:"1px solid rgba(255,255,255,0.12)"},children:[(0,b.jsx)("span",{style:{width:6,height:6,borderRadius:"50%",background:"sample"===aa?"#9B59B6":"#2ecc71"}}),(0,b.jsx)("span",{style:{fontSize:n?10:12,color:"rgba(255,255,255,0.65)",whiteSpace:"nowrap"},children:"sample"===aa?"Sample network":"Your CSV"}),(0,b.jsx)("button",{onClick:()=>{(0,cl.clearCsvNetwork)(),window.location.href="/"},title:"sample"===aa?"Leave the sample network":"Clear this import",style:{border:"none",background:"transparent",cursor:"pointer",color:"#888",fontSize:n?13:15,lineHeight:1,padding:"0 0 0 2px"},children:"×"})]})}),!ci.IS_DEMO&&(0,b.jsx)(S.default,{href:"/settings",title:"Settings","aria-label":"Settings",style:{width:n?28:32,height:n?28:32,borderRadius:"50%",flexShrink:0,background:"rgba(255,255,255,0.06)",color:"#888",fontSize:n?14:16,textDecoration:"none",display:"flex",alignItems:"center",justifyContent:"center",marginLeft:n?4:8},children:"⚙︎"}),!ci.IS_DEMO&&!$&&(0,b.jsxs)("div",{style:{position:"relative",marginLeft:n?4:8},children:[(0,b.jsxs)("button",{onClick:()=>X(!W),style:{width:n?28:32,height:n?28:32,borderRadius:"50%",border:"none",cursor:"pointer",background:"rgba(255,255,255,0.06)",color:"#888",fontSize:n?12:14,display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:["🔔",U.filter(a=>!a.seen).length>0&&(0,b.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:U.filter(a=>!a.seen).length})]}),W&&(0,b.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,b.jsxs)("div",{style:{padding:"12px 16px",borderBottom:"1px solid rgba(255,255,255,0.08)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,b.jsx)("span",{style:{fontWeight:700,fontSize:14},children:"Notifications"}),U.filter(a=>!a.seen).length>0&&(0,b.jsx)("button",{onClick:()=>{fetch("/api/notifications",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"mark-all-seen"})}),V(a=>a.map(a=>({...a,seen:!0})))},style:{background:"none",border:"none",color:"#3498DB",fontSize:11,cursor:"pointer",fontWeight:600},children:"Mark all read"})]}),(0,b.jsx)("div",{style:{overflowY:"auto",maxHeight:340},children:0===U.length?(0,b.jsx)("div",{style:{padding:20,textAlign:"center",color:"#555",fontSize:12},children:"No notifications yet"}):U.slice(0,20).map(a=>(0,b.jsx)("div",{role:"button",tabIndex:0,onClick:()=>{a.seen||(fetch("/api/notifications",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"mark-seen",id:a.id})}).catch(()=>{}),V(b=>b.map(b=>b.id===a.id?{...b,seen:!0}:b))),Z(a),X(!1),N(!1)},onKeyDown:a=>{"Enter"===a.key&&a.currentTarget.click()},onMouseEnter:a=>{a.currentTarget.style.background="rgba(255,255,255,0.06)"},onMouseLeave:b=>{b.currentTarget.style.background=a.seen?"transparent":"rgba(255,215,0,0.04)"},style:{padding:"10px 16px",borderBottom:"1px solid rgba(255,255,255,0.04)",cursor:"pointer",background:a.seen?"transparent":"rgba(255,215,0,0.04)"},children:(0,b.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"flex-start"},children:[(0,b.jsx)("span",{style:{fontSize:16},children:a.icon||"📌"}),(0,b.jsxs)("div",{style:{flex:1},children:[(0,b.jsxs)("div",{style:{fontSize:12,fontWeight:600,color:a.seen?"#888":"#fff"},children:[a.title,(0,b.jsx)("span",{style:{color:"#556",marginLeft:6},children:"›"})]}),a.message&&(0,b.jsx)("div",{style:{fontSize:10,color:"#666",marginTop:2},children:a.message}),(0,b.jsx)("div",{style:{fontSize:9,color:"#444",marginTop:3},children:new Date(a.created_at).toLocaleDateString()})]})]})},a.id))})]})]}),!ci.IS_DEMO&&!$&&(0,b.jsx)(cu,{isMobile:n}),(0,b.jsx)("a",{href:ci.IS_DEMO?"/launch":$?"/import":"/profile",style:{width:n?30:36,height:n?30:36,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",background:"linear-gradient(135deg, #FFD700, #FF6B35)",color:"#000",fontWeight:800,fontSize:n?11:14,textDecoration:"none",marginLeft:n?6:12,flexShrink:0},children:(f=o.filter(a=>"S"===a.tier).length,j=o.filter(a=>"A"===a.tier).length,k=o.filter(a=>"B"===a.tier).length,Math.floor(Math.sqrt((100*f+40*j+15*k+200*o.filter(a=>ar.has(a.id)).length+50*q.filter(a=>"S"===a.tier).length+o.length)/10)))})]}),am&&!$&&af>0&&(0,b.jsxs)(S.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,b.jsx)("span",{style:{fontSize:10},children:"⏳"}),af," Pending"]})]}),(0,b.jsxs)("div",{style:{display:"flex",height:n?"calc(100vh - 70px)":"calc(100vh - 130px)",position:"relative"},children:[(0,b.jsx)(cg.default,{collapsed:O,onToggle:()=>P(!O),mode:am?"degrees":"network",visualMode:av.key,grid:ao,gridCounts:at,onGridChange:a=>v(b=>({...b,[am?"degrees":"network"]:a}))}),(()=>{if(0===o.length)return(0,b.jsx)(cj,{});if(am&&0===q.length)return(0,b.jsx)("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",padding:24,textAlign:"center"},children:(0,b.jsxs)("div",{style:{maxWidth:440},children:[(0,b.jsx)("div",{style:{fontSize:40,marginBottom:16,opacity:.5},children:"🔗"}),(0,b.jsx)("h2",{style:{fontSize:22,fontWeight:800,margin:"0 0 12px",color:"#fff"},children:"Degrees need 2nd-degree data"}),(0,b.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,b.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,b.jsxs)("p",{style:{color:"#666",fontSize:13,lineHeight:1.7,margin:0},children:["The local scanner maps those circles (and captures real photos)."," ",(0,b.jsx)(S.default,{href:"/setup",style:{color:"#3498DB",textDecoration:"none"},children:"Set up scanning →"})]})]})});let a=av.component,c={connections:ap,degree2:av.allDegree2?q:as,onSelect:au,mode:G,userName:m,userImage:null,selectedId:w?.id??null,tierColors:cq,focusNodeRef:y,fullDegree1:o,fullDegree2:q,scanNotes:ac,canScan:ax,chainOpen:C,onChainOpened:al,onCircle:F,preset:ah};return(0,b.jsx)(a,{...c})})(),(0,b.jsx)(b5,{selected:w,stats:K,tierColors:cq,connections:o,degree2:q,mode:am?"degrees":"network",collapsed:M,onToggle:()=>N(!M),onSelect:a=>{x(a||null)},onSwitchMode:a=>{H(a)},note:Y,onCloseNote:()=>Z(null),circle:"chain"===av.key?E:null,onOpenCircle:ak,onShowInSeparation:aj,onFocusNode:a=>{y.current&&y.current(a)},csvSource:ci.IS_DEMO?"sample":$?aa:null,scanNotes:ac,canScan:ax}),ax&&(0,b.jsx)(ct,{onChange:ag,live:"chain"===av.key})]})]})}function cs(a,b){let c=0x811c9dc5,d=a=>{for(let b=0;b<a.length;b++)c=Math.imul(c^a.charCodeAt(b),0x1000193)};for(let c of[...a,...b])d(`${c.id}|${c.degree}|${c.source_connection_id??""}|${c.unlocked_from_bridge_id??""}|${c.tier}|${c.power_score}|${c.unlock_status??""}|${c.profile_image_url??""};`);return`${a.length}:${b.length}:${c>>>0}`}function ct({onChange:a,live:b}){let d=(0,f.default)(),g=d.finished.find(co)?.startedAt??null,h=b&&d.running&&(0,e.isCircleScan)(d);return(0,c.useEffect)(()=>{null!=g&&a()},[g,a]),(0,c.useEffect)(()=>{if(!h)return;let b=setInterval(a,2e4);return()=>clearInterval(b)},[h,a]),null}function cu({isMobile:a}){let c=(0,f.default)(),d=(0,e.busyReason)(c);return(0,b.jsx)("button",{onClick:async()=>{try{let a=(0,e.notReadyMessage)(await (0,e.scraperStatus)());if(a)return void alert(a);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,e.beginScrape)("refresh"),alert("Checking for new connections — watch it on the Scan page.")}catch(a){alert(a.message)}},disabled:!!d,title:d?`${d}. One scan at a time.`:"Check for new connections",style:{width:a?28:32,height:a?28:32,borderRadius:"50%",border:"none",cursor:d?"not-allowed":"pointer",opacity:d?.4:1,background:"rgba(255,255,255,0.06)",color:"#888",fontSize:a?12:14,display:a?"none":"flex",alignItems:"center",justifyContent:"center",marginLeft:8},children:"↻"})}a.s(["default",0,function(){return(0,b.jsx)(ch.default,{children:(0,b.jsx)(c.Suspense,{children:(0,b.jsx)(cr,{})})})}],30100)}];
|
|
32
44
|
|
|
33
45
|
//# sourceMappingURL=app_page_1fazqbf.js.map
|