six-degrees 0.4.8 → 0.4.10

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.
Files changed (239) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +1 -0
  3. package/.next/standalone/.next/build-manifest.json +3 -3
  4. package/.next/standalone/.next/prerender-manifest.json +3 -3
  5. package/.next/standalone/.next/routes-manifest.json +6 -0
  6. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  12. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  13. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  14. package/.next/standalone/.next/server/app/_not-found.rsc +13 -13
  15. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +13 -13
  16. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +12 -12
  17. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  18. package/.next/standalone/.next/server/app/api/admin-delete/route.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/api/admin-update/route.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/api/bridges/route.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/api/bulk-import/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/company-scores/legacy/route.js +2 -1
  23. package/.next/standalone/.next/server/app/api/company-scores/legacy/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/company-scores/route.js +2 -1
  25. package/.next/standalone/.next/server/app/api/company-scores/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/connections/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/data/export/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/data/import/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/data/restart/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/data/reveal/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/data/route.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/api/delete-cluster/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/ingest/route.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/api/network/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/api/outreach/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/api/scraper/route.js +2 -2
  39. package/.next/standalone/.next/server/app/api/scraper/route.js.nft.json +1 -1
  40. package/.next/standalone/.next/server/app/api/settings/route.js +3 -2
  41. package/.next/standalone/.next/server/app/api/settings/route.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/api/settings/sector-preview/route.js +2 -1
  43. package/.next/standalone/.next/server/app/api/settings/sector-preview/route.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/api/settings/sector-suggestions/route.js +2 -1
  45. package/.next/standalone/.next/server/app/api/settings/sector-suggestions/route.js.nft.json +1 -1
  46. package/.next/standalone/.next/server/app/api/setup-profile/route.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/api/social/messages/route/app-paths-manifest.json +3 -0
  48. package/.next/standalone/.next/server/app/api/social/messages/route/build-manifest.json +12 -0
  49. package/.next/standalone/.next/server/app/api/social/messages/route/server-reference-manifest.json +4 -0
  50. package/.next/standalone/.next/server/app/api/social/messages/route.js +9 -0
  51. package/.next/standalone/.next/server/app/api/social/messages/route.js.map +5 -0
  52. package/.next/standalone/.next/server/app/api/social/messages/route.js.nft.json +1 -0
  53. package/.next/standalone/.next/server/app/api/social/messages/route_client-reference-manifest.js +3 -0
  54. package/.next/standalone/.next/server/app/api/social/route.js +4 -2
  55. package/.next/standalone/.next/server/app/api/social/route.js.nft.json +1 -1
  56. package/.next/standalone/.next/server/app/api/unlock/route.js.nft.json +1 -1
  57. package/.next/standalone/.next/server/app/api/update/route.js.nft.json +1 -1
  58. package/.next/standalone/.next/server/app/api/update-images/route.js.nft.json +1 -1
  59. package/.next/standalone/.next/server/app/api/users/route.js.nft.json +1 -1
  60. package/.next/standalone/.next/server/app/avatars/[file]/route.js.nft.json +1 -1
  61. package/.next/standalone/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  62. package/.next/standalone/.next/server/app/import/page.js.nft.json +1 -1
  63. package/.next/standalone/.next/server/app/import/page_client-reference-manifest.js +1 -1
  64. package/.next/standalone/.next/server/app/import.html +1 -1
  65. package/.next/standalone/.next/server/app/import.rsc +15 -15
  66. package/.next/standalone/.next/server/app/import.segments/_full.segment.rsc +15 -15
  67. package/.next/standalone/.next/server/app/import.segments/_tree.segment.rsc +2 -2
  68. package/.next/standalone/.next/server/app/import.segments/import/__PAGE__.segment.rsc +14 -14
  69. package/.next/standalone/.next/server/app/index.html +1 -1
  70. package/.next/standalone/.next/server/app/index.rsc +15 -15
  71. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +14 -14
  72. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +15 -15
  73. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  74. package/.next/standalone/.next/server/app/launch/page.js.nft.json +1 -1
  75. package/.next/standalone/.next/server/app/launch/page_client-reference-manifest.js +1 -1
  76. package/.next/standalone/.next/server/app/launch.html +2 -2
  77. package/.next/standalone/.next/server/app/launch.rsc +15 -15
  78. package/.next/standalone/.next/server/app/launch.segments/_full.segment.rsc +15 -15
  79. package/.next/standalone/.next/server/app/launch.segments/_tree.segment.rsc +2 -2
  80. package/.next/standalone/.next/server/app/launch.segments/launch/__PAGE__.segment.rsc +14 -14
  81. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  82. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  83. package/.next/standalone/.next/server/app/paths/page.js.nft.json +1 -1
  84. package/.next/standalone/.next/server/app/paths/page_client-reference-manifest.js +1 -1
  85. package/.next/standalone/.next/server/app/paths.html +1 -1
  86. package/.next/standalone/.next/server/app/paths.rsc +15 -15
  87. package/.next/standalone/.next/server/app/paths.segments/_full.segment.rsc +15 -15
  88. package/.next/standalone/.next/server/app/paths.segments/_tree.segment.rsc +2 -2
  89. package/.next/standalone/.next/server/app/paths.segments/paths/__PAGE__.segment.rsc +14 -14
  90. package/.next/standalone/.next/server/app/profile/page.js.nft.json +1 -1
  91. package/.next/standalone/.next/server/app/profile/page_client-reference-manifest.js +1 -1
  92. package/.next/standalone/.next/server/app/profile.html +1 -1
  93. package/.next/standalone/.next/server/app/profile.rsc +15 -15
  94. package/.next/standalone/.next/server/app/profile.segments/_full.segment.rsc +15 -15
  95. package/.next/standalone/.next/server/app/profile.segments/_tree.segment.rsc +2 -2
  96. package/.next/standalone/.next/server/app/profile.segments/profile/__PAGE__.segment.rsc +14 -14
  97. package/.next/standalone/.next/server/app/queue/page.js.nft.json +1 -1
  98. package/.next/standalone/.next/server/app/queue/page_client-reference-manifest.js +1 -1
  99. package/.next/standalone/.next/server/app/queue.html +1 -1
  100. package/.next/standalone/.next/server/app/queue.rsc +15 -15
  101. package/.next/standalone/.next/server/app/queue.segments/_full.segment.rsc +15 -15
  102. package/.next/standalone/.next/server/app/queue.segments/_tree.segment.rsc +2 -2
  103. package/.next/standalone/.next/server/app/queue.segments/queue/__PAGE__.segment.rsc +14 -14
  104. package/.next/standalone/.next/server/app/scores/page.js.nft.json +1 -1
  105. package/.next/standalone/.next/server/app/scores/page_client-reference-manifest.js +1 -1
  106. package/.next/standalone/.next/server/app/scores.html +1 -1
  107. package/.next/standalone/.next/server/app/scores.rsc +15 -15
  108. package/.next/standalone/.next/server/app/scores.segments/_full.segment.rsc +15 -15
  109. package/.next/standalone/.next/server/app/scores.segments/_tree.segment.rsc +2 -2
  110. package/.next/standalone/.next/server/app/scores.segments/scores/__PAGE__.segment.rsc +14 -14
  111. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  112. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  113. package/.next/standalone/.next/server/app/settings.html +1 -1
  114. package/.next/standalone/.next/server/app/settings.rsc +15 -15
  115. package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +15 -15
  116. package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  117. package/.next/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +14 -14
  118. package/.next/standalone/.next/server/app/setup/page.js.nft.json +1 -1
  119. package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  120. package/.next/standalone/.next/server/app/setup.html +1 -1
  121. package/.next/standalone/.next/server/app/setup.rsc +15 -15
  122. package/.next/standalone/.next/server/app/setup.segments/_full.segment.rsc +15 -15
  123. package/.next/standalone/.next/server/app/setup.segments/_tree.segment.rsc +2 -2
  124. package/.next/standalone/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +14 -14
  125. package/.next/standalone/.next/server/app/social/page.js.nft.json +1 -1
  126. package/.next/standalone/.next/server/app/social/page_client-reference-manifest.js +1 -1
  127. package/.next/standalone/.next/server/app/social.html +1 -1
  128. package/.next/standalone/.next/server/app/social.rsc +15 -15
  129. package/.next/standalone/.next/server/app/social.segments/_full.segment.rsc +15 -15
  130. package/.next/standalone/.next/server/app/social.segments/_tree.segment.rsc +2 -2
  131. package/.next/standalone/.next/server/app/social.segments/social/__PAGE__.segment.rsc +14 -14
  132. package/.next/standalone/.next/server/app-paths-manifest.json +1 -0
  133. package/.next/standalone/.next/server/chunks/[root-of-the-server]__06mi9k2._.js +3 -0
  134. package/.next/standalone/.next/server/chunks/[root-of-the-server]__08f5awg._.js +8 -0
  135. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0bat8nx._.js +1 -1
  136. package/.next/standalone/.next/server/chunks/[root-of-the-server]__17hjtzl._.js +8 -0
  137. package/.next/standalone/.next/server/chunks/[root-of-the-server]__20tmem7._.js +1 -1
  138. package/.next/standalone/.next/server/chunks/_0ea9qwy._.js +3 -0
  139. package/.next/standalone/.next/server/chunks/_1_fynia._.js +6 -6
  140. package/.next/standalone/.next/server/chunks/_1itd1o_._.js +1 -1
  141. package/.next/standalone/.next/server/chunks/_1xh07bp._.js +1 -1
  142. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_social_messages_route_actions_0skh09r.js +3 -0
  143. package/.next/standalone/.next/server/chunks/lib_18cr1gi._.js +8 -0
  144. package/.next/standalone/.next/server/chunks/lib_db-client_15le7cw.js +1 -1
  145. package/.next/standalone/.next/server/chunks/lib_rpc_03i8xef.js +1 -1
  146. package/.next/standalone/.next/server/chunks/lib_rpc_08fc3rp.js +1 -1
  147. package/.next/standalone/.next/server/chunks/lib_rpc_08r2t_q.js +1 -1
  148. package/.next/standalone/.next/server/chunks/lib_rpc_0btpv1t.js +1 -1
  149. package/.next/standalone/.next/server/chunks/lib_rpc_0c9d9ti.js +5 -5
  150. package/.next/standalone/.next/server/chunks/lib_rpc_0cm2ev3.js +1 -1
  151. package/.next/standalone/.next/server/chunks/lib_rpc_0iovswz.js +1 -1
  152. package/.next/standalone/.next/server/chunks/lib_rpc_0is8flp.js +1 -1
  153. package/.next/standalone/.next/server/chunks/lib_rpc_0v8ajtd.js +1 -1
  154. package/.next/standalone/.next/server/chunks/lib_rpc_0xgmvvt.js +1 -1
  155. package/.next/standalone/.next/server/chunks/lib_rpc_144mzbf.js +1 -1
  156. package/.next/standalone/.next/server/chunks/lib_rpc_1bggi0n.js +1 -1
  157. package/.next/standalone/.next/server/chunks/lib_rpc_1dkcu9f.js +1 -1
  158. package/.next/standalone/.next/server/chunks/lib_rpc_1o0jb6w.js +1 -1
  159. package/.next/standalone/.next/server/chunks/lib_scoring_1-e4ur0.js +3 -0
  160. package/.next/standalone/.next/server/chunks/node_modules_next_1zc5q0a._.js +1 -1
  161. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1feicqq._.js → [root-of-the-server]__0qdeuyo._.js} +1 -1
  162. package/.next/standalone/.next/server/chunks/ssr/_0c_y09g._.js +3 -0
  163. package/.next/standalone/.next/server/chunks/ssr/_0ezj4e0._.js +1 -1
  164. package/.next/standalone/.next/server/chunks/ssr/{_1mj739k._.js → _0l8cxmo._.js} +2 -2
  165. package/.next/standalone/.next/server/chunks/ssr/_1errbuf._.js +3 -0
  166. package/.next/standalone/.next/server/chunks/ssr/{_0wxbq78._.js → app_components_19c2d9c._.js} +2 -2
  167. package/.next/standalone/.next/server/chunks/ssr/app_components_ui_0pdmz2z.js +3 -0
  168. package/.next/standalone/.next/server/chunks/ssr/app_page_1fazqbf.js +1 -1
  169. package/.next/standalone/.next/server/chunks/ssr/app_settings_page_1f8mjj_.js +1 -1
  170. package/.next/standalone/.next/server/chunks/ssr/app_setup_page_1-282zx.js +1 -1
  171. package/.next/standalone/.next/server/chunks/ssr/app_social_page_0h7zxda.js +3 -0
  172. package/.next/standalone/.next/server/chunks/ssr/{node_modules_1wax83z._.js → node_modules_0h91jdk._.js} +2 -2
  173. package/.next/standalone/.next/server/chunks/ssr/{node_modules_1nkgb45._.js → node_modules_1f8t_rp._.js} +1 -1
  174. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  175. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  176. package/.next/standalone/.next/server/pages/404.html +1 -1
  177. package/.next/standalone/.next/server/pages/500.html +1 -1
  178. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  179. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  180. package/.next/standalone/.next/static/chunks/07dyt47mp4s9-.js +1 -0
  181. package/.next/standalone/.next/static/chunks/{3q3pmt5vv-4pi.js → 160wjb73ddwqd.js} +1 -1
  182. package/.next/standalone/.next/static/chunks/{1z-zp93cyoxvz.js → 1c_n0973t07l0.js} +1 -1
  183. package/.next/standalone/.next/static/chunks/{0bo1dxn5gwzpk.css → 1xptlvtcz6654.css} +1 -1
  184. package/.next/standalone/.next/static/chunks/{2_wcobfqry2uj.js → 206rm6j42gl_a.js} +1 -1
  185. package/.next/standalone/.next/static/chunks/2coxzjm_k6ilr.js +1 -0
  186. package/.next/{static/chunks/0g_p4p7oci18u.js → standalone/.next/static/chunks/2kfhc58df2xyo.js} +1 -1
  187. package/.next/standalone/.next/static/chunks/2pw6_osz1n_te.js +1 -0
  188. package/.next/standalone/.next/static/chunks/{38wwtni5e1ec1.js → 39hr8d-b2ibtw.js} +1 -1
  189. package/.next/standalone/CHANGELOG.md +48 -0
  190. package/.next/standalone/app/api/social/messages/route.js +130 -0
  191. package/.next/standalone/app/api/social/route.js +89 -47
  192. package/.next/standalone/app/components/GalaxyLab.js +4 -1
  193. package/.next/standalone/app/components/ScanStatusBar.js +112 -50
  194. package/.next/standalone/app/components/settings/DataSection.js +2 -1
  195. package/.next/standalone/app/globals.css +4 -0
  196. package/.next/standalone/app/setup/page.js +4 -3
  197. package/.next/standalone/app/social/Conversations.js +246 -0
  198. package/.next/standalone/app/social/page.js +88 -9
  199. package/.next/standalone/lib/galaxy-lab.js +6 -1
  200. package/.next/standalone/lib/island.js +36 -0
  201. package/.next/standalone/lib/linkedin-export.js +175 -5
  202. package/.next/standalone/lib/social-store.js +73 -0
  203. package/.next/standalone/package-lock.json +2 -2
  204. package/.next/standalone/package.json +1 -1
  205. package/.next/standalone/scripts/scrape.py +156 -23
  206. package/.next/static/chunks/07dyt47mp4s9-.js +1 -0
  207. package/.next/static/chunks/{3q3pmt5vv-4pi.js → 160wjb73ddwqd.js} +1 -1
  208. package/.next/static/chunks/{1z-zp93cyoxvz.js → 1c_n0973t07l0.js} +1 -1
  209. package/.next/static/chunks/{0bo1dxn5gwzpk.css → 1xptlvtcz6654.css} +1 -1
  210. package/.next/static/chunks/{2_wcobfqry2uj.js → 206rm6j42gl_a.js} +1 -1
  211. package/.next/static/chunks/2coxzjm_k6ilr.js +1 -0
  212. package/.next/{standalone/.next/static/chunks/0g_p4p7oci18u.js → static/chunks/2kfhc58df2xyo.js} +1 -1
  213. package/.next/static/chunks/2pw6_osz1n_te.js +1 -0
  214. package/.next/static/chunks/{38wwtni5e1ec1.js → 39hr8d-b2ibtw.js} +1 -1
  215. package/CHANGELOG.md +48 -0
  216. package/lib/galaxy-lab.js +6 -1
  217. package/lib/island.js +36 -0
  218. package/lib/linkedin-export.js +175 -5
  219. package/lib/social-store.js +73 -0
  220. package/package.json +1 -1
  221. package/scripts/scrape.py +156 -23
  222. package/.next/standalone/.next/server/chunks/[root-of-the-server]__17kn1mk._.js +0 -8
  223. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1dmc7-t._.js +0 -8
  224. package/.next/standalone/.next/server/chunks/ssr/_005q9n1._.js +0 -3
  225. package/.next/standalone/.next/server/chunks/ssr/_217nddo._.js +0 -3
  226. package/.next/standalone/.next/server/chunks/ssr/app_0i3fw_m._.js +0 -3
  227. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_server-async-storage_0t1dato.js +0 -3
  228. package/.next/standalone/.next/static/chunks/0y1yms5kez2f3.js +0 -1
  229. package/.next/standalone/.next/static/chunks/14m1zu-8warte.js +0 -1
  230. package/.next/standalone/.next/static/chunks/15qbli9udo0vh.js +0 -1
  231. package/.next/static/chunks/0y1yms5kez2f3.js +0 -1
  232. package/.next/static/chunks/14m1zu-8warte.js +0 -1
  233. package/.next/static/chunks/15qbli9udo0vh.js +0 -1
  234. /package/.next/standalone/.next/static/{T0eWMsKjgSiPnmx1E0q3G → 7zWJnSkfSoRhRsqY6ZKtD}/_buildManifest.js +0 -0
  235. /package/.next/standalone/.next/static/{T0eWMsKjgSiPnmx1E0q3G → 7zWJnSkfSoRhRsqY6ZKtD}/_clientMiddlewareManifest.js +0 -0
  236. /package/.next/standalone/.next/static/{T0eWMsKjgSiPnmx1E0q3G → 7zWJnSkfSoRhRsqY6ZKtD}/_ssgManifest.js +0 -0
  237. /package/.next/static/{T0eWMsKjgSiPnmx1E0q3G → 7zWJnSkfSoRhRsqY6ZKtD}/_buildManifest.js +0 -0
  238. /package/.next/static/{T0eWMsKjgSiPnmx1E0q3G → 7zWJnSkfSoRhRsqY6ZKtD}/_clientMiddlewareManifest.js +0 -0
  239. /package/.next/static/{T0eWMsKjgSiPnmx1E0q3G → 7zWJnSkfSoRhRsqY6ZKtD}/_ssgManifest.js +0 -0
@@ -28,6 +28,6 @@ module.exports=[30100,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944
28
28
  .sepmap .br:hover text { text-decoration: underline; }
29
29
  .sepmap .rt { pointer-events: none; }
30
30
  `,be={paintOrder:"stroke",stroke:"#0a0a1a",strokeWidth:3,strokeLinejoin:"round"},bf=(0,c.memo)(function({layout:a,selectedKey:d,tierColors:e,youLabel:f,isMobile:g,onPick:h,onPickBridge:i}){let{width:j,height:k,you:l,people:m,bridges:n,links:o,spokes:p}=a,q=(0,c.useMemo)(()=>{let a=new Map;for(let b of o)a.has(b.key)||a.set(b.key,[]),a.get(b.key).push(b);return a},[o]),r=g?36:26,s=g?12:11;return(0,b.jsxs)("svg",{className:"sepmap",width:j,height:k,"aria-hidden":"true",style:{display:"block",overflow:"visible"},children:[(0,b.jsx)("style",{children:bd}),(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"})]})}),p.map(a=>(0,b.jsx)("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,stroke:"#fff",strokeOpacity:.12,strokeWidth:1},`s-${a.id??"unresolved"}`)),(0,b.jsx)("g",{className:"ppl",children:m.map(a=>{let{p:c}=a,f=e[c.tier]||"#888",g=a.key===d,i=c.routes.map(a=>a.bridge?a.bridge.name:a9).join(", ");return(0,b.jsxs)("g",{className:g?"sp sel":"sp",onClick:()=>h(c),children:[(0,b.jsx)("title",{children:`${c.person.name} \xb7 #${c.rank}${c.tied?"=":""} \xb7 ${c.tier} \xb7 ${c.score.toFixed(1)} \xb7 via ${i}`}),(q.get(a.key)||[]).map(c=>{let d=(c.x1+c.x2)/2,f=c.unresolved?"#777":c.primary?a7:e[c.tier]||"#888";return(0,b.jsx)("path",{className:"rt",d:`M${c.x1+5},${c.y1} C${d},${c.y1} ${d},${c.y2} ${c.x2-a.r},${c.y2}`,fill:"none",stroke:f,strokeWidth:c.primary?1.5:1,strokeOpacity:c.primary?.8:.35,strokeDasharray:c.primary?void 0:"3 3"},`${c.key}-${c.bridgeId??"u"}`)}),(0,b.jsx)("rect",{x:a.x-12,y:a.y-r/2,width:Math.max(0,j-a.x+12),height:r,fill:"transparent"}),g&&(0,b.jsx)("circle",{cx:a.x,cy:a.y,r:a.r+3.5,fill:"none",stroke:"#fff",strokeWidth:1.5}),(0,b.jsx)("circle",{cx:a.x,cy:a.y,r:a.r,fill:f}),(0,b.jsxs)("text",{x:a.x+14,y:a.y,dy:"0.35em",fontSize:s,fill:"#ddd",style:be,children:[a.label,(0,b.jsx)("tspan",{dx:6,fill:f,fontWeight:700,children:c.score.toFixed(1)})]})]},a.key)})}),n.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 \xb7 a way in to ${a.count} of these \xb7 click to open`}),(0,b.jsx)("circle",{cx:a.x,cy:a.y,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:a.x-9,y:a.y,dy:"0.35em",textAnchor:"end",fontSize:s-1,fill:c,fontStyle:a.unresolved?"italic":void 0,fontWeight:a.unresolved?400:600,style:be,children:a.label})]},`b-${a.id??"unresolved"}`)}),(0,b.jsxs)("g",{children:[(0,b.jsx)("circle",{cx:l.x,cy:l.y,r:l.r,fill:"url(#sepYouGrad)"}),(0,b.jsx)("text",{x:l.x,y:l.y,dy:"0.35em",textAnchor:"middle",fontSize:f.length>2?9:10,fontWeight:800,fill:"#000",children:f})]})]})}),bg={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function bh({p:a,route:c,tierColors:d,compact:e}){if(!c?.bridge)return(0,b.jsxs)("span",{style:{...bg,color:"#777",fontStyle:"italic",fontSize:e?11:12},children:["via ",a9]});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)(a6,{person:f,size:16,tierColors:d}),(0,b.jsx)("span",{style:{...bg,color:d[f.tier]||"#aaa",fontWeight:600,minWidth:0},children:e?(0,ag.shortName)(f.name):f.name}),g>0&&(0,b.jsxs)("span",{title:`Every way in:
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."]})]})}let bV=[],bW=[{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."}],bX=[{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`}],bY={fontSize:9,fontWeight:700,color:"#555",letterSpacing:1,margin:"12px 0 6px",textTransform:"uppercase"},bZ={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 b_({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 b0(){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)(b_,{value:a.labels,options:[[!0,"On"],[!1,"Off"]],onPick:a=>(0,P.setLab)({labels:a})})]})}let b1=a=>new Date(a).toLocaleDateString(void 0,{month:"short",year:"numeric"});function b2(){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,()=>bV),[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);try{await b()}catch(a){k(a.message||"That didn’t work.")}finally{i(null)}},o=null!=d.min&&null!=d.max&&d.max>d.min,p=bW.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:{...bZ,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:bY,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:{...bZ,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:bY,children:"Layout"}),(0,b.jsx)(b_,{value:p,options:[["rings","Rings"],["clusters","Clusters"]],onPick:a=>(0,P.setLab)("rings"===a?{...Object.fromEntries(bW.map(a=>[a.key,P.LAB_DEFAULTS[a.key]])),sizeBy:"power"}:P.CLUSTERS)}),(0,b.jsx)("div",{style:{...bZ,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:bY,children:"Forces"}),bW.map(c=>(0,b.jsx)(b$,{spec:c,value:a[c.key]},c.key)),(0,b.jsx)("div",{style:bY,children:"Display"}),bX.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)(b_,{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)(b_,{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:{...bZ,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)(b_,{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:bY,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:b1(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 ${b1(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",...bZ},children:[(0,b.jsx)("span",{children:b1(d.min)}),(0,b.jsx)("span",{children:b1(d.max)})]}),(0,b.jsx)("div",{style:{fontSize:11,color:"#aab",margin:"8px 0 4px"},children:"Length"}),(0,b.jsx)(b_,{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:{...bZ,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:bZ,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:bY,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:bY,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:{...bZ,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:{...bZ,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 b3={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"};function b4({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)(b0,{}),(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?`${b3[a]}14`:"rgba(255,255,255,0.02)",color:c?b3[a]:"#555",borderLeft:c?`3px solid ${b3[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:b3[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?`${b3[a]}20`:"rgba(255,255,255,0.03)",color:f===a?b3[a]:"#888",borderLeft:f===a?`3px solid ${b3[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:b3[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)(b2,{}),(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:`${b3[a]}10`,textAlign:"center"},children:[(0,b.jsx)("div",{style:{fontSize:16,fontWeight:800,color:b3[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 b5=a.i(36839),b6=a.i(58834);function b7(){let[a,d]=(0,c.useState)(!1),[e,f]=(0,c.useState)("");async function g(){d(!0),f("");try{await (0,b6.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)(b8,{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)(b8,{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)(b8,{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 b8({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 b9=a.i(42510);let ca=[],cb=a=>!!a&&!["install","setup","login"].includes(a.action);function cc(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 cd={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"};function ce(){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(),b6.IS_DEMO||(0,b9.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,b9.hasCsvNetwork)()?(0,b9.loadCsvNetwork)():null;a&&(X(!0),Z(a.source||"csv"));let{degree1:b,degree2:c,degree3:d=[]}=b6.IS_DEMO?await (0,b6.loadDemoNetwork)():a||await (async()=>await (0,i.loadNetwork)(l))();p(b),r(c),t(d||[]),aa.current=cf(b,c),L(cc(b,c)),J(!1)}},[l]);let ac=(0,c.useCallback)(async()=>{if(!(b6.IS_DEMO||(0,b9.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=cf(a,b);if(f===aa.current)return;aa.current=f,p(a),r(b),L(cc(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):ca,[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=!b6.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,b9.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:"×"})]}),!b6.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"}),!b6.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"})]}),!b6.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"}),!b6.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"}),!b6.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"}),!b6.IS_DEMO&&!W&&(0,b.jsx)(bp,{isMobile:n})]}),!b6.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:"⚙︎"}),!b6.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))})]})]}),!b6.IS_DEMO&&!W&&(0,b.jsx)(ch,{isMobile:n}),(0,b.jsx)("a",{href:b6.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)(b4,{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)(b7,{});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:cd,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:cd,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:b6.IS_DEMO?"sample":W?Y:null,scanNotes:$,canScan:au}),au&&(0,b.jsx)(cg,{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 cf(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 cg({onChange:a,live:b}){let d=(0,f.default)(),g=d.finished.find(cb)?.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 ch({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)(b5.default,{children:(0,b.jsx)(c.Suspense,{children:(0,b.jsx)(ce,{})})})}],30100)}];
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)}];
32
32
 
33
33
  //# sourceMappingURL=app_page_1fazqbf.js.map