six-degrees 0.4.10 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (414) 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 +9 -9
  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 +1 -1
  19. package/.next/standalone/.next/server/app/api/admin-delete/route.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/api/admin-update/route.js +1 -1
  21. package/.next/standalone/.next/server/app/api/admin-update/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/bridges/route.js +1 -1
  23. package/.next/standalone/.next/server/app/api/bridges/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/bulk-import/route.js +1 -1
  25. package/.next/standalone/.next/server/app/api/bulk-import/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/company-scores/legacy/route.js +1 -1
  27. package/.next/standalone/.next/server/app/api/company-scores/legacy/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/company-scores/route.js +1 -1
  29. package/.next/standalone/.next/server/app/api/company-scores/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/connections/route.js +1 -1
  31. package/.next/standalone/.next/server/app/api/connections/route.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/api/data/export/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/data/import/route.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/api/data/restart/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/data/reveal/route.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/api/data/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/delete-cluster/route.js +1 -1
  38. package/.next/standalone/.next/server/app/api/delete-cluster/route.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/api/ingest/route.js +1 -1
  40. package/.next/standalone/.next/server/app/api/ingest/route.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/api/network/route.js +1 -1
  42. package/.next/standalone/.next/server/app/api/network/route.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/api/notifications/route.js +1 -1
  44. package/.next/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
  45. package/.next/standalone/.next/server/app/api/outreach/route.js +1 -1
  46. package/.next/standalone/.next/server/app/api/outreach/route.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/api/queue/route.js +1 -1
  48. package/.next/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
  49. package/.next/standalone/.next/server/app/api/scraper/route.js +3 -2
  50. package/.next/standalone/.next/server/app/api/scraper/route.js.nft.json +1 -1
  51. package/.next/standalone/.next/server/app/api/settings/route.js +1 -1
  52. package/.next/standalone/.next/server/app/api/settings/route.js.nft.json +1 -1
  53. package/.next/standalone/.next/server/app/api/settings/sector-preview/route.js +1 -1
  54. package/.next/standalone/.next/server/app/api/settings/sector-preview/route.js.nft.json +1 -1
  55. package/.next/standalone/.next/server/app/api/settings/sector-suggestions/route.js +1 -1
  56. package/.next/standalone/.next/server/app/api/settings/sector-suggestions/route.js.nft.json +1 -1
  57. package/.next/standalone/.next/server/app/api/setup-profile/route.js +1 -1
  58. package/.next/standalone/.next/server/app/api/setup-profile/route.js.nft.json +1 -1
  59. package/.next/standalone/.next/server/app/api/social/crm/route/app-paths-manifest.json +3 -0
  60. package/.next/standalone/.next/server/app/api/social/crm/route/build-manifest.json +12 -0
  61. package/.next/standalone/.next/server/app/api/social/crm/route/server-reference-manifest.json +4 -0
  62. package/.next/standalone/.next/server/app/api/social/crm/route.js +10 -0
  63. package/.next/standalone/.next/server/app/api/social/crm/route.js.map +5 -0
  64. package/.next/standalone/.next/server/app/api/social/crm/route.js.nft.json +1 -0
  65. package/.next/standalone/.next/server/app/api/social/crm/route_client-reference-manifest.js +3 -0
  66. package/.next/standalone/.next/server/app/api/social/messages/route.js +4 -3
  67. package/.next/standalone/.next/server/app/api/social/messages/route.js.nft.json +1 -1
  68. package/.next/standalone/.next/server/app/api/social/route.js +4 -3
  69. package/.next/standalone/.next/server/app/api/social/route.js.nft.json +1 -1
  70. package/.next/standalone/.next/server/app/api/unlock/route.js +1 -1
  71. package/.next/standalone/.next/server/app/api/unlock/route.js.nft.json +1 -1
  72. package/.next/standalone/.next/server/app/api/update/route.js.nft.json +1 -1
  73. package/.next/standalone/.next/server/app/api/update-images/route.js +1 -1
  74. package/.next/standalone/.next/server/app/api/update-images/route.js.nft.json +1 -1
  75. package/.next/standalone/.next/server/app/api/users/route.js +1 -1
  76. package/.next/standalone/.next/server/app/api/users/route.js.nft.json +1 -1
  77. package/.next/standalone/.next/server/app/avatars/[file]/route.js.nft.json +1 -1
  78. package/.next/standalone/.next/server/app/import/page.js.nft.json +1 -1
  79. package/.next/standalone/.next/server/app/import/page_client-reference-manifest.js +1 -1
  80. package/.next/standalone/.next/server/app/import.html +1 -1
  81. package/.next/standalone/.next/server/app/import.rsc +15 -15
  82. package/.next/standalone/.next/server/app/import.segments/_full.segment.rsc +15 -15
  83. package/.next/standalone/.next/server/app/import.segments/_tree.segment.rsc +2 -2
  84. package/.next/standalone/.next/server/app/import.segments/import/__PAGE__.segment.rsc +14 -14
  85. package/.next/standalone/.next/server/app/index.html +1 -1
  86. package/.next/standalone/.next/server/app/index.rsc +15 -15
  87. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +14 -14
  88. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +15 -15
  89. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  90. package/.next/standalone/.next/server/app/launch/page.js.nft.json +1 -1
  91. package/.next/standalone/.next/server/app/launch/page_client-reference-manifest.js +1 -1
  92. package/.next/standalone/.next/server/app/launch.html +2 -2
  93. package/.next/standalone/.next/server/app/launch.rsc +15 -15
  94. package/.next/standalone/.next/server/app/launch.segments/_full.segment.rsc +15 -15
  95. package/.next/standalone/.next/server/app/launch.segments/_tree.segment.rsc +2 -2
  96. package/.next/standalone/.next/server/app/launch.segments/launch/__PAGE__.segment.rsc +14 -14
  97. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  98. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  99. package/.next/standalone/.next/server/app/paths/page.js.nft.json +1 -1
  100. package/.next/standalone/.next/server/app/paths/page_client-reference-manifest.js +1 -1
  101. package/.next/standalone/.next/server/app/paths.html +1 -1
  102. package/.next/standalone/.next/server/app/paths.rsc +15 -15
  103. package/.next/standalone/.next/server/app/paths.segments/_full.segment.rsc +15 -15
  104. package/.next/standalone/.next/server/app/paths.segments/_tree.segment.rsc +2 -2
  105. package/.next/standalone/.next/server/app/paths.segments/paths/__PAGE__.segment.rsc +14 -14
  106. package/.next/standalone/.next/server/app/profile/page.js.nft.json +1 -1
  107. package/.next/standalone/.next/server/app/profile/page_client-reference-manifest.js +1 -1
  108. package/.next/standalone/.next/server/app/profile.html +1 -1
  109. package/.next/standalone/.next/server/app/profile.rsc +15 -15
  110. package/.next/standalone/.next/server/app/profile.segments/_full.segment.rsc +15 -15
  111. package/.next/standalone/.next/server/app/profile.segments/_tree.segment.rsc +2 -2
  112. package/.next/standalone/.next/server/app/profile.segments/profile/__PAGE__.segment.rsc +14 -14
  113. package/.next/standalone/.next/server/app/queue/page.js.nft.json +1 -1
  114. package/.next/standalone/.next/server/app/queue/page_client-reference-manifest.js +1 -1
  115. package/.next/standalone/.next/server/app/queue.html +1 -1
  116. package/.next/standalone/.next/server/app/queue.rsc +15 -15
  117. package/.next/standalone/.next/server/app/queue.segments/_full.segment.rsc +15 -15
  118. package/.next/standalone/.next/server/app/queue.segments/_tree.segment.rsc +2 -2
  119. package/.next/standalone/.next/server/app/queue.segments/queue/__PAGE__.segment.rsc +14 -14
  120. package/.next/standalone/.next/server/app/scores/page.js.nft.json +1 -1
  121. package/.next/standalone/.next/server/app/scores/page_client-reference-manifest.js +1 -1
  122. package/.next/standalone/.next/server/app/scores.html +1 -1
  123. package/.next/standalone/.next/server/app/scores.rsc +15 -15
  124. package/.next/standalone/.next/server/app/scores.segments/_full.segment.rsc +15 -15
  125. package/.next/standalone/.next/server/app/scores.segments/_tree.segment.rsc +2 -2
  126. package/.next/standalone/.next/server/app/scores.segments/scores/__PAGE__.segment.rsc +14 -14
  127. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  128. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  129. package/.next/standalone/.next/server/app/settings.html +1 -1
  130. package/.next/standalone/.next/server/app/settings.rsc +15 -15
  131. package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +15 -15
  132. package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  133. package/.next/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +14 -14
  134. package/.next/standalone/.next/server/app/setup/page.js.nft.json +1 -1
  135. package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  136. package/.next/standalone/.next/server/app/setup.html +1 -1
  137. package/.next/standalone/.next/server/app/setup.rsc +15 -15
  138. package/.next/standalone/.next/server/app/setup.segments/_full.segment.rsc +15 -15
  139. package/.next/standalone/.next/server/app/setup.segments/_tree.segment.rsc +2 -2
  140. package/.next/standalone/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +14 -14
  141. package/.next/standalone/.next/server/app/social/page.js.nft.json +1 -1
  142. package/.next/standalone/.next/server/app/social/page_client-reference-manifest.js +1 -1
  143. package/.next/standalone/.next/server/app/social.html +1 -1
  144. package/.next/standalone/.next/server/app/social.rsc +15 -15
  145. package/.next/standalone/.next/server/app/social.segments/_full.segment.rsc +15 -15
  146. package/.next/standalone/.next/server/app/social.segments/_tree.segment.rsc +2 -2
  147. package/.next/standalone/.next/server/app/social.segments/social/__PAGE__.segment.rsc +14 -14
  148. package/.next/standalone/.next/server/app-paths-manifest.json +1 -0
  149. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0bat8nx._.js → [root-of-the-server]__05_3-22._.js} +2 -2
  150. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t3v1a1._.js +1 -1
  151. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__06mi9k2._.js → [root-of-the-server]__13dx4sd._.js} +7 -2
  152. package/.next/standalone/.next/server/chunks/[root-of-the-server]__15wc9e-._.js +3 -0
  153. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1kbl21f._.js +1 -1
  154. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1tir0vc._.js +8 -0
  155. package/.next/standalone/.next/server/chunks/[root-of-the-server]__20rwfdw._.js +8 -0
  156. package/.next/standalone/.next/server/chunks/_072jl0y._.js +1 -1
  157. package/.next/standalone/.next/server/chunks/_0ea9qwy._.js +1 -1
  158. package/.next/standalone/.next/server/chunks/_1_fynia._.js +7 -7
  159. package/.next/standalone/.next/server/chunks/_1itd1o_._.js +1 -1
  160. package/.next/standalone/.next/server/chunks/_1iwkh8t._.js +1 -1
  161. package/.next/standalone/.next/server/chunks/_1oqfuh8._.js +3 -0
  162. package/.next/standalone/.next/server/chunks/_1xh07bp._.js +1 -1
  163. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_social_crm_route_actions_0d1aflv.js +3 -0
  164. package/.next/standalone/.next/server/chunks/lib_0851sk0._.js +8 -0
  165. package/.next/standalone/.next/server/chunks/lib_1q7p2ro._.js +8 -0
  166. package/.next/standalone/.next/server/chunks/lib_1r6l86l._.js +8 -0
  167. package/.next/standalone/.next/server/chunks/lib_db-client_15le7cw.js +8 -8
  168. package/.next/standalone/.next/server/chunks/lib_linkedin-export_12imqxg.js +3 -0
  169. package/.next/standalone/.next/server/chunks/lib_rpc_04s8mzr.js +3 -0
  170. package/.next/standalone/.next/server/chunks/lib_rpc_053z7as.js +3 -0
  171. package/.next/standalone/.next/server/chunks/lib_rpc_0b_-2te.js +3 -0
  172. package/.next/standalone/.next/server/chunks/lib_rpc_0dhbxdm.js +3 -0
  173. package/.next/standalone/.next/server/chunks/lib_rpc_0dxlk31.js +3 -0
  174. package/.next/standalone/.next/server/chunks/lib_rpc_0f8b-qc.js +3 -0
  175. package/.next/standalone/.next/server/chunks/lib_rpc_0pzie7_.js +3 -0
  176. package/.next/standalone/.next/server/chunks/lib_rpc_0r76fq_.js +3 -0
  177. package/.next/standalone/.next/server/chunks/lib_rpc_0ut7pjp.js +3 -0
  178. package/.next/standalone/.next/server/chunks/lib_rpc_15zyqaz.js +3 -0
  179. package/.next/standalone/.next/server/chunks/lib_rpc_18zpjtq.js +3 -0
  180. package/.next/standalone/.next/server/chunks/lib_rpc_1a8xkiz.js +3 -0
  181. package/.next/standalone/.next/server/chunks/lib_rpc_1e_55xo.js +3 -0
  182. package/.next/standalone/.next/server/chunks/lib_rpc_1oxfd1_.js +3 -0
  183. package/.next/standalone/.next/server/chunks/lib_rpc_1s0lod0.js +3 -0
  184. package/.next/standalone/.next/server/chunks/lib_scoring_1-e4ur0.js +1 -1
  185. package/.next/standalone/.next/server/chunks/ssr/_01kacen._.js +3 -0
  186. package/.next/standalone/.next/server/chunks/ssr/_03l7vge._.js +3 -0
  187. package/.next/standalone/.next/server/chunks/ssr/{_1ap1tu_._.js → _0gtv9jb._.js} +2 -2
  188. package/.next/standalone/.next/server/chunks/ssr/_0jdkqgi._.js +3 -0
  189. package/.next/standalone/.next/server/chunks/ssr/_0xi-fbs._.js +3 -0
  190. package/.next/standalone/.next/server/chunks/ssr/_0xmwmfv._.js +3 -0
  191. package/.next/standalone/.next/server/chunks/ssr/_1-b9hj7._.js +9 -0
  192. package/.next/standalone/.next/server/chunks/ssr/_112ewem._.js +3 -0
  193. package/.next/standalone/.next/server/chunks/ssr/_16ab63q._.js +3 -0
  194. package/.next/standalone/.next/server/chunks/ssr/_1fxm0-s._.js +3 -0
  195. package/.next/standalone/.next/server/chunks/ssr/_1ra1d3r._.js +9 -0
  196. package/.next/standalone/.next/server/chunks/ssr/app_141w189._.js +3 -0
  197. package/.next/standalone/.next/server/chunks/ssr/app_page_1fazqbf.js +22 -10
  198. package/.next/standalone/.next/server/chunks/ssr/app_paths_page_1ol90m7.js +2 -2
  199. package/.next/standalone/.next/server/chunks/ssr/app_profile_page_0u3-l5y.js +1 -1
  200. package/.next/standalone/.next/server/chunks/ssr/app_queue_page_0c6znd6.js +6 -5
  201. package/.next/standalone/.next/server/chunks/ssr/app_settings_page_1f8mjj_.js +1 -1
  202. package/.next/standalone/.next/server/chunks/ssr/app_setup_page_1-282zx.js +19 -3
  203. package/.next/standalone/.next/server/chunks/ssr/app_social_page_0h7zxda.js +1 -1
  204. package/.next/standalone/.next/server/chunks/ssr/lib_0i8v-s3._.js +1 -1
  205. package/.next/standalone/.next/server/chunks/ssr/lib_13rapwj._.js +3 -0
  206. package/.next/standalone/.next/server/chunks/ssr/lib_galaxy-lab_108_lu-.js +3 -0
  207. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  208. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  209. package/.next/standalone/.next/server/pages/404.html +1 -1
  210. package/.next/standalone/.next/server/pages/500.html +1 -1
  211. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  212. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  213. package/.next/standalone/.next/static/chunks/03bziijw5srol.js +1 -0
  214. package/.next/standalone/.next/static/chunks/0bgq8wmopl_ig.js +7 -0
  215. package/.next/standalone/.next/static/chunks/0ezus6p2eb-vg.js +1 -0
  216. package/.next/standalone/.next/static/chunks/0g_fy2034bp0x.js +34 -0
  217. package/.next/standalone/.next/static/chunks/0q5dru4q6gxl5.js +22 -0
  218. package/.next/standalone/.next/static/chunks/0w-byiwb2zax8.js +2 -0
  219. package/.next/standalone/.next/static/chunks/1g7jcovdejc9-.js +1 -0
  220. package/.next/standalone/.next/static/chunks/1i51yylxdzht1.js +1 -0
  221. package/.next/{static/chunks/1xptlvtcz6654.css → standalone/.next/static/chunks/1x_ysly42-teq.css} +1 -1
  222. package/.next/standalone/.next/static/chunks/1zf8swaasjf1e.js +43 -0
  223. package/.next/standalone/.next/static/chunks/2rqtpccruavf2.js +1 -0
  224. package/.next/standalone/.next/static/chunks/2wgz9ietkqqe6.js +1 -0
  225. package/.next/standalone/.next/static/chunks/30x3oq_st7a5r.js +1 -0
  226. package/.next/standalone/.next/static/chunks/355ryio1b7sm1.js +1 -0
  227. package/.next/standalone/.next/static/chunks/3ap5hgma7n0o7.js +1 -0
  228. package/.next/standalone/.next/static/chunks/3fci6qi39-1n5.js +1 -0
  229. package/.next/standalone/.next/static/chunks/{24tvdun1cb3g1.js → 3sowbvbaj1s6n.js} +1 -1
  230. package/.next/standalone/CHANGELOG.md +235 -0
  231. package/.next/standalone/app/api/data/export/route.js +2 -1
  232. package/.next/standalone/app/api/ingest/route.js +40 -1
  233. package/.next/standalone/app/api/scraper/route.js +12 -2
  234. package/.next/standalone/app/api/settings/sector-preview/route.js +2 -1
  235. package/.next/standalone/app/api/social/crm/route.js +37 -0
  236. package/.next/standalone/app/api/social/messages/route.js +44 -8
  237. package/.next/standalone/app/api/social/route.js +80 -22
  238. package/.next/standalone/app/components/AppTabs.js +59 -0
  239. package/.next/standalone/app/components/ChainView.js +303 -89
  240. package/.next/standalone/app/components/CirclePanel.js +162 -0
  241. package/.next/standalone/app/components/CompanyScores.js +2 -2
  242. package/.next/standalone/app/components/FieldStep.js +4 -4
  243. package/.next/standalone/app/components/FilterPanel.js +121 -183
  244. package/.next/standalone/app/components/ForceGraph.js +41 -3
  245. package/.next/standalone/app/components/GalaxyLab.js +26 -31
  246. package/.next/standalone/app/components/LegacyScoresCard.js +2 -2
  247. package/.next/standalone/app/components/MapControls.js +154 -0
  248. package/.next/standalone/app/components/NoteDetail.js +118 -0
  249. package/.next/standalone/app/components/PathsAnalyzer.js +147 -110
  250. package/.next/standalone/app/components/PeopleMap.js +308 -0
  251. package/.next/standalone/app/components/ScanRadar.js +129 -0
  252. package/.next/standalone/app/components/ScanStatusBar.js +72 -27
  253. package/.next/standalone/app/components/SeparationView.js +626 -118
  254. package/.next/standalone/app/components/Sidebar.js +28 -2
  255. package/.next/standalone/app/components/settings/DataSection.js +12 -3
  256. package/.next/standalone/app/components/settings/NetworkHealthSection.js +1 -1
  257. package/.next/standalone/app/components/settings/SectorSection.js +2 -2
  258. package/.next/standalone/app/components/settings/TierSection.js +1 -1
  259. package/.next/standalone/app/components/settings/TitleSection.js +149 -0
  260. package/.next/standalone/app/components/views.js +15 -14
  261. package/.next/standalone/app/globals.css +11 -0
  262. package/.next/standalone/app/page.js +89 -156
  263. package/.next/standalone/app/paths/page.js +39 -27
  264. package/.next/standalone/app/profile/page.js +33 -5
  265. package/.next/standalone/app/queue/page.js +56 -34
  266. package/.next/standalone/app/scores/page.js +16 -66
  267. package/.next/standalone/app/settings/page.js +27 -13
  268. package/.next/standalone/app/setup/page.js +298 -205
  269. package/.next/standalone/app/social/Crm.js +683 -0
  270. package/.next/standalone/app/social/SocialHub.js +374 -0
  271. package/.next/standalone/app/social/Thread.js +90 -0
  272. package/.next/standalone/app/social/page.js +10 -351
  273. package/.next/standalone/lib/chain-layout.js +105 -35
  274. package/.next/standalone/lib/data-export.js +10 -4
  275. package/.next/standalone/lib/data-folder.js +9 -0
  276. package/.next/standalone/lib/data-import.js +13 -3
  277. package/.next/standalone/lib/degrees.js +0 -6
  278. package/.next/standalone/lib/dot-rings.js +25 -0
  279. package/.next/standalone/lib/galaxy-lab.js +65 -6
  280. package/.next/standalone/lib/ingest.js +2 -0
  281. package/.next/standalone/lib/island.js +40 -0
  282. package/.next/standalone/lib/linkedin-export.js +267 -46
  283. package/.next/standalone/lib/linkedin-limits.js +6 -2
  284. package/.next/standalone/lib/map-heat.js +20 -0
  285. package/.next/standalone/lib/network-health.js +1 -1
  286. package/.next/standalone/lib/notifications.js +121 -0
  287. package/.next/standalone/lib/people-map.js +82 -0
  288. package/.next/standalone/lib/rarity.js +45 -3
  289. package/.next/standalone/lib/reach.js +7 -6
  290. package/.next/standalone/lib/rpc.js +15 -4
  291. package/.next/standalone/lib/scan-pace.js +46 -0
  292. package/.next/standalone/lib/scoring.js +39 -8
  293. package/.next/standalone/lib/scraper-client.js +19 -6
  294. package/.next/standalone/lib/sector-focus.js +4 -4
  295. package/.next/standalone/lib/separation.js +137 -10
  296. package/.next/standalone/lib/settings-effects.js +20 -11
  297. package/.next/standalone/lib/settings.js +3 -0
  298. package/.next/standalone/lib/social-crm.js +415 -0
  299. package/.next/standalone/lib/social-store.js +13 -6
  300. package/.next/standalone/lib/tier-grid.js +99 -0
  301. package/.next/standalone/lib/title-ranking.js +83 -0
  302. package/.next/standalone/package-lock.json +2 -2
  303. package/.next/standalone/package.json +1 -1
  304. package/.next/standalone/scripts/scrape.py +177 -35
  305. package/.next/static/chunks/03bziijw5srol.js +1 -0
  306. package/.next/static/chunks/0bgq8wmopl_ig.js +7 -0
  307. package/.next/static/chunks/0ezus6p2eb-vg.js +1 -0
  308. package/.next/static/chunks/0g_fy2034bp0x.js +34 -0
  309. package/.next/static/chunks/0q5dru4q6gxl5.js +22 -0
  310. package/.next/static/chunks/0w-byiwb2zax8.js +2 -0
  311. package/.next/static/chunks/1g7jcovdejc9-.js +1 -0
  312. package/.next/static/chunks/1i51yylxdzht1.js +1 -0
  313. package/.next/{standalone/.next/static/chunks/1xptlvtcz6654.css → static/chunks/1x_ysly42-teq.css} +1 -1
  314. package/.next/static/chunks/1zf8swaasjf1e.js +43 -0
  315. package/.next/static/chunks/2rqtpccruavf2.js +1 -0
  316. package/.next/static/chunks/2wgz9ietkqqe6.js +1 -0
  317. package/.next/static/chunks/30x3oq_st7a5r.js +1 -0
  318. package/.next/static/chunks/355ryio1b7sm1.js +1 -0
  319. package/.next/static/chunks/3ap5hgma7n0o7.js +1 -0
  320. package/.next/static/chunks/3fci6qi39-1n5.js +1 -0
  321. package/.next/static/chunks/{24tvdun1cb3g1.js → 3sowbvbaj1s6n.js} +1 -1
  322. package/CHANGELOG.md +235 -0
  323. package/lib/chain-layout.js +105 -35
  324. package/lib/data-export.js +10 -4
  325. package/lib/data-folder.js +9 -0
  326. package/lib/data-import.js +13 -3
  327. package/lib/degrees.js +0 -6
  328. package/lib/dot-rings.js +25 -0
  329. package/lib/galaxy-lab.js +65 -6
  330. package/lib/ingest.js +2 -0
  331. package/lib/island.js +40 -0
  332. package/lib/linkedin-export.js +267 -46
  333. package/lib/linkedin-limits.js +6 -2
  334. package/lib/map-heat.js +20 -0
  335. package/lib/network-health.js +1 -1
  336. package/lib/notifications.js +121 -0
  337. package/lib/people-map.js +82 -0
  338. package/lib/rarity.js +45 -3
  339. package/lib/reach.js +7 -6
  340. package/lib/rpc.js +15 -4
  341. package/lib/scan-pace.js +46 -0
  342. package/lib/scoring.js +39 -8
  343. package/lib/scraper-client.js +19 -6
  344. package/lib/sector-focus.js +4 -4
  345. package/lib/separation.js +137 -10
  346. package/lib/settings-effects.js +20 -11
  347. package/lib/settings.js +3 -0
  348. package/lib/social-crm.js +415 -0
  349. package/lib/social-store.js +13 -6
  350. package/lib/tier-grid.js +99 -0
  351. package/lib/title-ranking.js +83 -0
  352. package/package.json +1 -1
  353. package/scripts/scrape.py +177 -35
  354. package/.next/standalone/.next/server/chunks/[root-of-the-server]__08f5awg._.js +0 -8
  355. package/.next/standalone/.next/server/chunks/[root-of-the-server]__17hjtzl._.js +0 -8
  356. package/.next/standalone/.next/server/chunks/[root-of-the-server]__20tmem7._.js +0 -3
  357. package/.next/standalone/.next/server/chunks/lib_18cr1gi._.js +0 -8
  358. package/.next/standalone/.next/server/chunks/lib_rpc_03i8xef.js +0 -3
  359. package/.next/standalone/.next/server/chunks/lib_rpc_08fc3rp.js +0 -3
  360. package/.next/standalone/.next/server/chunks/lib_rpc_08r2t_q.js +0 -3
  361. package/.next/standalone/.next/server/chunks/lib_rpc_0btpv1t.js +0 -3
  362. package/.next/standalone/.next/server/chunks/lib_rpc_0c9d9ti.js +0 -8
  363. package/.next/standalone/.next/server/chunks/lib_rpc_0cm2ev3.js +0 -3
  364. package/.next/standalone/.next/server/chunks/lib_rpc_0iovswz.js +0 -3
  365. package/.next/standalone/.next/server/chunks/lib_rpc_0is8flp.js +0 -3
  366. package/.next/standalone/.next/server/chunks/lib_rpc_0v8ajtd.js +0 -3
  367. package/.next/standalone/.next/server/chunks/lib_rpc_0xgmvvt.js +0 -3
  368. package/.next/standalone/.next/server/chunks/lib_rpc_144mzbf.js +0 -3
  369. package/.next/standalone/.next/server/chunks/lib_rpc_1bggi0n.js +0 -3
  370. package/.next/standalone/.next/server/chunks/lib_rpc_1dkcu9f.js +0 -3
  371. package/.next/standalone/.next/server/chunks/lib_rpc_1o0jb6w.js +0 -3
  372. package/.next/standalone/.next/server/chunks/ssr/_0c_y09g._.js +0 -3
  373. package/.next/standalone/.next/server/chunks/ssr/_0ezj4e0._.js +0 -3
  374. package/.next/standalone/.next/server/chunks/ssr/_0j4-lc3._.js +0 -3
  375. package/.next/standalone/.next/server/chunks/ssr/_0l8cxmo._.js +0 -3
  376. package/.next/standalone/.next/server/chunks/ssr/_0xkur4p._.js +0 -3
  377. package/.next/standalone/.next/server/chunks/ssr/_14iv_zy._.js +0 -3
  378. package/.next/standalone/.next/server/chunks/ssr/_15x6q32._.js +0 -3
  379. package/.next/standalone/.next/server/chunks/ssr/_1errbuf._.js +0 -3
  380. package/.next/standalone/.next/server/chunks/ssr/_212xw8q._.js +0 -3
  381. package/.next/standalone/.next/server/chunks/ssr/app_components_19c2d9c._.js +0 -3
  382. package/.next/standalone/.next/server/chunks/ssr/app_scores_page_09wepvv.js +0 -3
  383. package/.next/standalone/.next/static/chunks/07dyt47mp4s9-.js +0 -1
  384. package/.next/standalone/.next/static/chunks/0a5iadnmt9u9k.js +0 -1
  385. package/.next/standalone/.next/static/chunks/160wjb73ddwqd.js +0 -6
  386. package/.next/standalone/.next/static/chunks/1c_n0973t07l0.js +0 -2
  387. package/.next/standalone/.next/static/chunks/1e1n0kkz-psdb.js +0 -1
  388. package/.next/standalone/.next/static/chunks/206rm6j42gl_a.js +0 -1
  389. package/.next/standalone/.next/static/chunks/236f0jtp68j_h.js +0 -1
  390. package/.next/standalone/.next/static/chunks/2coxzjm_k6ilr.js +0 -1
  391. package/.next/standalone/.next/static/chunks/2kfhc58df2xyo.js +0 -1
  392. package/.next/standalone/.next/static/chunks/2pw6_osz1n_te.js +0 -1
  393. package/.next/standalone/.next/static/chunks/39hr8d-b2ibtw.js +0 -31
  394. package/.next/standalone/.next/static/chunks/3zw8bv7-mc4n6.js +0 -33
  395. package/.next/standalone/app/components/OrbitGraph.js +0 -737
  396. package/.next/standalone/app/social/Conversations.js +0 -246
  397. package/.next/static/chunks/07dyt47mp4s9-.js +0 -1
  398. package/.next/static/chunks/0a5iadnmt9u9k.js +0 -1
  399. package/.next/static/chunks/160wjb73ddwqd.js +0 -6
  400. package/.next/static/chunks/1c_n0973t07l0.js +0 -2
  401. package/.next/static/chunks/1e1n0kkz-psdb.js +0 -1
  402. package/.next/static/chunks/206rm6j42gl_a.js +0 -1
  403. package/.next/static/chunks/236f0jtp68j_h.js +0 -1
  404. package/.next/static/chunks/2coxzjm_k6ilr.js +0 -1
  405. package/.next/static/chunks/2kfhc58df2xyo.js +0 -1
  406. package/.next/static/chunks/2pw6_osz1n_te.js +0 -1
  407. package/.next/static/chunks/39hr8d-b2ibtw.js +0 -31
  408. package/.next/static/chunks/3zw8bv7-mc4n6.js +0 -33
  409. /package/.next/standalone/.next/static/{7zWJnSkfSoRhRsqY6ZKtD → I-cj79yE2IZ8taX2dZGp3}/_buildManifest.js +0 -0
  410. /package/.next/standalone/.next/static/{7zWJnSkfSoRhRsqY6ZKtD → I-cj79yE2IZ8taX2dZGp3}/_clientMiddlewareManifest.js +0 -0
  411. /package/.next/standalone/.next/static/{7zWJnSkfSoRhRsqY6ZKtD → I-cj79yE2IZ8taX2dZGp3}/_ssgManifest.js +0 -0
  412. /package/.next/static/{7zWJnSkfSoRhRsqY6ZKtD → I-cj79yE2IZ8taX2dZGp3}/_buildManifest.js +0 -0
  413. /package/.next/static/{7zWJnSkfSoRhRsqY6ZKtD → I-cj79yE2IZ8taX2dZGp3}/_clientMiddlewareManifest.js +0 -0
  414. /package/.next/static/{7zWJnSkfSoRhRsqY6ZKtD → I-cj79yE2IZ8taX2dZGp3}/_ssgManifest.js +0 -0
@@ -1,2 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94657,e=>{"use strict";var t=e.i(43476),n=e.i(71645),o=e.i(7837);let r=e=>`${e.name} ${e.was} → ${e.estimated?"estimated":e.now}`,i=e=>({padding:"6px 12px",borderRadius:7,cursor:"pointer",fontSize:12,fontWeight:700,border:e?"none":"1px solid rgba(255,255,255,0.15)",background:e?"linear-gradient(135deg, #00ff88, #3498DB)":"transparent",color:e?"#000":"#cfd8d8"});function l({onAnswered:e}){var s;let a,d,[c,p]=(0,n.useState)(null),[h,u]=(0,n.useState)(!1),[g,f]=(0,n.useState)(()=>new Set),[y,x]=(0,n.useState)(!1),[m,b]=(0,n.useState)(null);if((0,n.useEffect)(()=>{if((0,o.csvNetworkSource)())return;let e=!1;return fetch("/api/company-scores/legacy").then(e=>e.json()).then(t=>{!e&&t.offer?.companies?.length&&(p(t.offer),f(new Set(t.offer.companies.map(e=>e.name))))}).catch(()=>{}),()=>{e=!0}},[]),!c)return null;let k=async t=>{x(!0),b(null);try{let n=await fetch("/api/company-scores/legacy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keep:t})}),o=await n.json();if(!n.ok&&!o.kept)throw Error(o.error||"Could not save your answer.");p(null),e?.({kept:o.kept||[],scored:o.scored||0,error:n.ok?null:o.error})}catch(e){b(e.message)}finally{x(!1)}};return(0,t.jsxs)("section",{"aria-label":"Built-in scores changed",style:{marginBottom:14,padding:14,borderRadius:10,border:"1px solid rgba(255,215,0,0.35)",background:"rgba(255,215,0,0.06)",fontSize:12.5,color:"#cfd8d8",lineHeight:1.6},children:[(0,t.jsx)("b",{style:{color:"#fff"},children:"Built-in scores changed in this version:"})," ",(a=(s=c.companies).slice(0,3).map(r).join(", "),(d=s.length-3)>0?`${a} and ${d} more`:a),"."," ","Keep any of the old ones as your own?",(0,t.jsx)("div",{style:{marginTop:4,color:"#8b9a9a"},children:"The built-in list now holds only companies most professionals would recognise, scored the same for everyone; anything else is estimated from your network. A score you keep is yours, like one you set below, and Auto hands it back."}),h&&(0,t.jsx)("ul",{style:{listStyle:"none",padding:0,margin:"10px 0 0",display:"grid",gap:4},children:c.companies.map(e=>(0,t.jsx)("li",{children:(0,t.jsxs)("label",{style:{display:"flex",gap:8,alignItems:"baseline",cursor:"pointer"},children:[(0,t.jsx)("input",{type:"checkbox",checked:g.has(e.name),disabled:y,onChange:()=>{let t;return t=e.name,f(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})}}),(0,t.jsxs)("span",{children:[(0,t.jsx)("b",{style:{color:"#fff"},children:e.name})," ",e.was," → ",e.estimated?`estimated (${e.now})`:e.now,(0,t.jsxs)("span",{style:{color:"#778"},children:[` \xb7 ${e.people} ${1===e.people?"person":"people"} there now`,e.names.length>1&&` \xb7 for ${e.names.join(", ")}`]})]})]})},e.name))}),(0,t.jsxs)("div",{style:{display:"flex",gap:8,marginTop:10,flexWrap:"wrap"},children:[h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{disabled:y||!g.size,onClick:()=>k([...g]),style:{...i(!0),opacity:y||!g.size?.5:1},children:["Keep ",g.size," ",1===g.size?"score":"scores"]}),(0,t.jsx)("button",{disabled:y,onClick:()=>u(!1),style:i(!1),children:"Back"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{disabled:y,onClick:()=>k(c.companies.map(e=>e.name)),style:i(!0),children:"Keep all"}),(0,t.jsx)("button",{disabled:y,onClick:()=>u(!0),style:i(!1),children:"Choose…"})]}),(0,t.jsx)("button",{disabled:y,onClick:()=>k([]),style:i(!1),children:"No thanks"})]}),m&&(0,t.jsx)("div",{role:"alert",style:{marginTop:8,color:"#e74c3c"},children:m})]})}let s="1px solid rgba(255,255,255,0.1)",a={yours:{label:"your score",color:"#00ff88"},known:{label:"known list",color:"#3498DB"},data:{label:"public data",color:"#1abc9c"},network:{label:"estimated: many of your people",color:"#FF6B35"},default:{label:"unknown company",color:"#778"}};async function d(){let e=await fetch("/api/company-scores"),t=await e.json();if(!e.ok)throw Error(t.error||"Could not load company scores");return t.companies}function c(){let[e,t]=(0,n.useState)(null),[o,r]=(0,n.useState)(null);return(0,n.useEffect)(()=>{let e=!1;return d().then(n=>{e||t(n)}).catch(t=>{e||r(t.message)}),()=>{e=!0}},[]),{companies:e,error:o,setScore:(0,n.useCallback)(async(e,n)=>{let o=await fetch("/api/company-scores",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,score:n})}),r=await o.json();if(!o.ok)throw Error(r.error||"Could not save");return t(await d()),r},[]),reload:(0,n.useCallback)(async()=>t(await d()),[])}}function p({company:e,onSet:o,compact:r}){let[i,l]=(0,n.useState)(!1),a=async t=>{l(!0);try{await o(e.name,"auto"===t?null:Number(t))}finally{l(!1)}};return(0,t.jsxs)("select",{disabled:i,value:"yours"===e.source?String(e.score):"auto",onChange:e=>a(e.target.value),title:"Set this company's score. Auto uses the known list or an estimate.",style:{padding:r?"2px 4px":"4px 6px",borderRadius:6,border:s,background:"#11131c",color:"#dfe6e9",fontSize:12},children:[(0,t.jsxs)("option",{value:"auto",children:["Auto (","yours"===e.source?e.suggested??"est.":e.score,")"]}),[10,9,8,7,6,5,4,3,2,1].map(e=>(0,t.jsx)("option",{value:e,children:e},e))]})}e.s(["ScorePicker",0,p,"default",0,function({onRescored:e,version:o=0}){let{companies:r,error:i,setScore:d,reload:h}=c();(0,n.useEffect)(()=>{o&&h().catch(()=>{})},[o,h]);let[u,g]=(0,n.useState)(""),[f,y]=(0,n.useState)("all"),[x,m]=(0,n.useState)(150),[b,k]=(0,n.useState)(null),w=e=>{k(e),setTimeout(()=>k(null),3500)},j=async(t,n)=>{let o=await d(t,n);w(`${t}: ${null==n?"back to auto":`set to ${n}`} \xb7 rescored ${o.scored} people`),e?.()},v=async({kept:t,scored:n,error:o})=>{if(!t.length)return w("Keeping the new built-in scores.");w(o||`Kept ${t.length} old ${1===t.length?"score":"scores"} as your own \xb7 rescored ${n} people`),await h().catch(()=>{}),e?.()},S=(0,n.useMemo)(()=>{if(!r)return[];let e=u.trim().toLowerCase();return r.filter(t=>(!e||t.name.toLowerCase().includes(e))&&("all"===f||t.source===f))},[r,u,f]);if(i)return(0,t.jsx)("div",{style:{padding:24,color:"#e74c3c"},children:i});if(!r)return(0,t.jsx)("div",{style:{padding:24,color:"#778"},children:"Loading companies…"});let C=e=>r.filter(t=>t.source===e).length;return(0,t.jsxs)("div",{style:{flex:1,overflow:"auto",padding:16},children:[(0,t.jsxs)("div",{style:{maxWidth:980,margin:"0 auto"},children:[(0,t.jsx)(l,{onAnswered:v}),(0,t.jsxs)("div",{style:{padding:14,borderRadius:10,border:s,background:"rgba(255,255,255,0.03)",fontSize:12.5,color:"#cfd8d8",lineHeight:1.6},children:[(0,t.jsx)("b",{style:{color:"#fff"},children:"How a power score works."})," power = ",(0,t.jsx)("b",{children:"title"})," × ",(0,t.jsx)("b",{children:"company weight"})," + bonus. The title (student 1 … founder or C-suite 10) comes from someone’s roles, with former roles at 70%; an audience of their own counts like a title (1M+ followers like a director). The company weight runs from 0.725 for a company we don’t know (or none found), the middle of the scale, to 1.0 (a company scored 10), so seniority counts for more at a bigger company. The bonus is at most +1.5, for investor, YC, an audience in the millions or the top award of any field, and counts half at an unknown company. A 1st-degree person whose circle is unusually strong gets up to +2 more: up to +1 for a high share of it at A or S, or +1 for every 25 people there. Tiers are graded on your network’s curve unless you choose the fixed scale (",(0,t.jsx)("a",{href:"#tiers",style:{color:"#3498DB"},children:"Tiers"}),", above): your top 3% are S, the next 12% A, the next 25% B (it only lifts, and never lifts anyone under 4 into S or A). On the fixed scale, S ≥ 7.5 · A ≥ 5.5 · B ≥ 4 · C ≥ 2.5.",(0,t.jsxs)("div",{style:{marginTop:6,color:"#8b9a9a"},children:["So a VP at a 10 scores 9.0, a founder at an unknown company 7.3, a director at an unknown company 5.4, and an intern at a 10 scores 2.0. Set a company’s score below and everyone there is rescored. Companies in the sectors you pick (",(0,t.jsx)("a",{href:"#sector",style:{color:"#3498DB"},children:"Your sector"}),", above) get +1 or +2; a score you set is never changed."]})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",margin:"14px 0 10px"},children:[(0,t.jsx)("input",{value:u,onChange:e=>g(e.target.value),placeholder:"Find a company",style:{padding:"6px 10px",borderRadius:7,border:s,background:"rgba(255,255,255,0.05)",color:"#fff",fontSize:13,minWidth:180}}),[["all",`All ${r.length}`],["known",`Known list ${C("known")}`],["data",`Public data ${C("data")}`],["yours",`Yours ${C("yours")}`],["network",`Estimated ${C("network")}`],["default",`Unknown ${C("default")}`]].map(([e,n])=>(0,t.jsx)("button",{onClick:()=>y(e),style:{padding:"5px 10px",borderRadius:7,border:s,cursor:"pointer",fontSize:11.5,fontWeight:600,background:f===e?"rgba(52,152,219,0.25)":"transparent",color:f===e?"#cfe6f7":"#8b9a9a"},children:n},e))]}),(0,t.jsxs)("div",{style:{borderRadius:10,border:s,overflow:"hidden"},children:[(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 70px 70px 70px 60px 180px 110px",gap:8,padding:"8px 12px",fontSize:10.5,letterSpacing:.6,color:"#8b9a9a",background:"rgba(255,255,255,0.04)"},children:[(0,t.jsx)("span",{children:"COMPANY"}),(0,t.jsx)("span",{style:{textAlign:"right"},children:"PEOPLE"}),(0,t.jsx)("span",{style:{textAlign:"right"},children:"YOU KNOW"}),(0,t.jsx)("span",{style:{textAlign:"right"},children:"DIRECTOR+"}),(0,t.jsx)("span",{style:{textAlign:"right"},children:"SCORE"}),(0,t.jsx)("span",{children:"SOURCE"}),(0,t.jsx)("span",{children:"SET"})]}),S.slice(0,x).map(e=>(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 70px 70px 70px 60px 180px 110px",gap:8,padding:"7px 12px",alignItems:"center",borderTop:"1px solid rgba(255,255,255,0.05)",fontSize:12.5},children:[(0,t.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0},children:[(0,t.jsx)("span",{title:`${e.industry.label} (inferred)`,style:{width:8,height:8,borderRadius:"50%",background:e.industry.color,flexShrink:0}}),(0,t.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name})]}),(0,t.jsx)("span",{style:{textAlign:"right"},children:e.people}),(0,t.jsx)("span",{style:{textAlign:"right",color:e.d1?"#00ff88":"#556"},children:e.d1}),(0,t.jsx)("span",{style:{textAlign:"right",color:e.senior?"#FFD700":"#556"},children:e.senior}),(0,t.jsx)("b",{style:{textAlign:"right",fontSize:15},children:e.score}),(0,t.jsxs)("span",{style:{fontSize:11,color:a[e.source]?.color},children:[a[e.source]?.label,e.sectorBonus>0&&(0,t.jsxs)("span",{style:{color:"#00ff88"},children:[" + ",e.sectorBonus," your sector"]})]}),(0,t.jsx)(p,{company:e,onSet:j,compact:!0})]},e.name))]}),S.length>x&&(0,t.jsxs)("button",{onClick:()=>m(e=>e+300),style:{marginTop:10,padding:"7px 14px",borderRadius:8,border:s,background:"rgba(255,255,255,0.05)",color:"#dfe6e9",cursor:"pointer",fontSize:12},children:["Show more (",S.length-x," left)"]})]}),b&&(0,t.jsx)("div",{role:"status",style:{position:"fixed",bottom:24,left:"50%",transform:"translateX(-50%)",padding:"10px 18px",borderRadius:24,background:"linear-gradient(135deg, #00ff88, #3498DB)",color:"#000",fontWeight:800,fontSize:13,zIndex:50},children:b})]})},"useCompanyScores",0,c],94657)},2776,e=>{"use strict";var t=e.i(43476),n=e.i(15812);e.s(["default",0,function({children:e}){let{userId:o,ready:r}=(0,n.useUser)();return r&&o?e:(0,t.jsx)("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#0a0a1a",color:"#fff",padding:24,textAlign:"center",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},children:r?(0,t.jsxs)("div",{style:{maxWidth:420},children:[(0,t.jsx)("div",{style:{fontSize:18,fontWeight:700,marginBottom:8},children:"Can’t reach Six Degrees’ local server"}),(0,t.jsx)("div",{style:{color:"#888",fontSize:14,lineHeight:1.6},children:"The page loaded but the app behind it is not answering. If you started it from a terminal, check that window for an error, then reload this page."})]}):(0,t.jsx)("div",{style:{fontSize:18,fontWeight:600},children:"Loading…"})})}])},85957,e=>{"use strict";var t=e.i(43476),n=e.i(71645),o=e.i(18566),r=e.i(40996),i=e.i(19821),l=e.i(64745),s=e.i(7837),a=e.i(2776);e.i(47716);var d=e.i(36534),c=e.i(77899),p=e.i(17983),h=e.i(43079),u=e.i(52048),g=e.i(47560),f=e.i(94657),y=e.i(89154);let x={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},m="1px solid rgba(255,255,255,0.1)",b=[...y.INDUSTRIES,y.UNKNOWN_INDUSTRY];function k(e){let t=0x811c9dc5;for(let n=0;n<e.length;n++)t=Math.imul(t^e.charCodeAt(n),0x1000193);return(t>>>0)%1e3/1e3}function w({value:e,onChange:n,options:o}){return(0,t.jsx)("div",{style:{display:"flex",borderRadius:7,overflow:"hidden",border:m},children:o.map(([o,r])=>(0,t.jsx)("button",{onClick:()=>n(o),style:{padding:"5px 10px",fontSize:11.5,fontWeight:600,border:"none",cursor:"pointer",background:e===o?"rgba(52,152,219,0.25)":"transparent",color:e===o?"#cfe6f7":"#8b9a9a"},children:r},o))})}function j(e,t){return("all"===t.degree||String(e.degree)===t.degree)&&("senior"!==t.seniority||!!(0,y.isSenior)(e.headline))&&("csuite"!==t.seniority||!((0,y.getSeniority)(e.headline).level<6))&&("SA"!==t.tier||"S"===e.tier||"A"===e.tier)}function v({d1:e=[],d2:o=[],d3:r=[],tab:i="map",onOpenCompany:l}){let[s,a]=(0,n.useState)({degree:"all",seniority:"all",tier:"all"}),[d,c]=(0,n.useState)(()=>new Set),[p,h]=(0,n.useState)(""),[u,g]=(0,n.useState)(null),f=(0,n.useMemo)(()=>[...e,...o,...r],[e,o,r]),x=(0,n.useMemo)(()=>(0,y.buildCompanyIndex)(f),[f]),m=(0,n.useMemo)(()=>(0,y.companyLinks)(e,o),[e,o]),k=(0,n.useMemo)(()=>{let e=p.trim().toLowerCase(),t=[];for(let n of x.values()){if(d.has(n.industry.key)||e&&!n.name.toLowerCase().includes(e))continue;let o=n.people.filter(e=>j(e,s));o.length&&t.push({...n,shown:o})}return t.sort((e,t)=>t.shown.length-e.shown.length)},[x,s,d,p]),w=(0,n.useMemo)(()=>{let e=new Map(b.map(e=>[e.key,{...e,people:[],companies:new Map}])),t=new Set;for(let n of f){let o=n.profile_url||`id:${n.id}`;if(t.has(o)||(t.add(o),!j(n,s)))continue;let r=(0,y.companyOf)(n),i=r?x.get(r)?.industry||(0,y.industryOf)(r,n.headline):(0,y.industryOf)(null,n.headline),l=e.get(i.key);l.people.push(n),r&&l.companies.set(r,(l.companies.get(r)||0)+1)}return[...e.values()].filter(e=>e.people.length).sort((e,t)=>t.people.length-e.people.length)},[f,x,s]),z=u?.kind==="company"?x.get(u.key):u?.kind==="industry"?w.find(e=>e.key===u.key):null;return(0,t.jsxs)("div",{style:{display:"flex",flex:1,minHeight:0},children:[(0,t.jsxs)("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column"},children:[(0,t.jsx)(S,{filters:s,setFilters:a,query:p,setQuery:h,industries:w,hidden:d,setHidden:c,onIndustry:e=>g({kind:"industry",key:e})}),"map"===i?(0,t.jsx)(C,{companies:k,links:m,focus:u,onCompany:e=>g({kind:"company",key:e}),onIndustry:e=>g({kind:"industry",key:e}),onClear:()=>g(null)}):(0,t.jsx)(M,{industries:w,index:x,d1:e,d2:o,onIndustry:e=>g({kind:"industry",key:e}),onCompany:e=>g({kind:"company",key:e})})]}),z&&(0,t.jsx)($,{focus:u,data:z,index:x,links:m,d1:e,d2:o,filters:s,onClose:()=>g(null),onCompany:e=>g({kind:"company",key:e}),onOpenCompany:l})]})}function S({filters:e,setFilters:n,query:o,setQuery:r,industries:i,hidden:l,setHidden:s,onIndustry:a}){let d=(e,t)=>n(n=>({...n,[e]:t}));return(0,t.jsxs)("div",{style:{padding:"10px 16px",borderBottom:m,display:"flex",flexDirection:"column",gap:8},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",alignItems:"center"},children:[(0,t.jsx)("input",{value:o,onChange:e=>r(e.target.value),placeholder:"Find a company",style:{padding:"6px 10px",borderRadius:7,border:m,background:"rgba(255,255,255,0.05)",color:"#fff",fontSize:13,minWidth:170}}),(0,t.jsx)(w,{value:e.degree,onChange:e=>d("degree",e),options:[["all","All degrees"],["1","1st"],["2","2nd"],["3","3rd"]]}),(0,t.jsx)(w,{value:e.seniority,onChange:e=>d("seniority",e),options:[["all","Any level"],["senior","Director+"],["csuite","C-suite"]]}),(0,t.jsx)(w,{value:e.tier,onChange:e=>d("tier",e),options:[["all","All tiers"],["SA","S & A only"]]})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[i.map(e=>{let n=l.has(e.key);return(0,t.jsxs)("span",{style:{display:"inline-flex",borderRadius:14,border:`1px solid ${e.color}55`,overflow:"hidden",opacity:n?.4:1},children:[(0,t.jsx)("button",{title:n?"Show on the map":"Hide from the map",onClick:()=>s(t=>{let n=new Set(t);return n.has(e.key)?n.delete(e.key):n.add(e.key),n}),style:{padding:"3px 7px",border:"none",background:`${e.color}22`,cursor:"pointer",color:e.color,fontSize:11},children:"●"}),(0,t.jsxs)("button",{onClick:()=>a(e.key),title:"Analyse this industry",style:{padding:"3px 9px 3px 5px",border:"none",background:"transparent",cursor:"pointer",color:"#cfd8d8",fontSize:11.5},children:[e.label," ",(0,t.jsx)("span",{style:{color:"#778"},children:e.people.length})]})]},e.key)}),(0,t.jsx)("span",{style:{fontSize:11,color:"#667",alignSelf:"center"},children:"industries inferred from companies and headlines"})]})]})}function C({companies:e,links:o,focus:r,onCompany:i,onIndustry:l,onClear:s}){let a=(0,n.useRef)(null),{w:f,h:m}=function(e){let[t,o]=(0,n.useState)({w:0,h:0});return(0,n.useEffect)(()=>{let t=e.current;if(!t)return;let n=()=>{let e=t.getBoundingClientRect();o(t=>t.w===Math.round(e.width)&&t.h===Math.round(e.height)?t:{w:Math.round(e.width),h:Math.round(e.height)})};n();let r=new ResizeObserver(n);return r.observe(t),()=>r.disconnect()},[e]),t}(a),[b,w]=(0,n.useState)(null),j=(0,n.useMemo)(()=>{let t=e.slice(0,140),n=new Set(t.map(e=>e.name)),r=[...new Set(t.map(e=>e.industry.key))],i=new Map(r.map((e,t)=>{let n=t/Math.max(1,r.length)*Math.PI*2-Math.PI/2;return[e,{x:260*Math.cos(n),y:260*Math.sin(n)}]})),l=t.map(e=>({id:e.name,co:e,r:4+3.4*Math.sqrt(e.shown.length),x:i.get(e.industry.key).x+(k(e.name)-.5)*40,y:i.get(e.industry.key).y+(k(e.name+"#")-.5)*40})),s=o.filter(e=>n.has(e.a)&&n.has(e.b)).map(e=>({source:e.a,target:e.b,weight:e.weight,via:e.via.size})),a=(0,h.forceSimulation)(l).force("x",(0,u.forceX)(e=>i.get(e.co.industry.key).x).strength(.12)).force("y",(0,g.forceY)(e=>i.get(e.co.industry.key).y).strength(.12)).force("collide",(0,d.forceCollide)(e=>e.r+3)).force("charge",(0,p.forceManyBody)().strength(-25)).force("link",(0,c.forceLink)(s).id(e=>e.id).strength(e=>Math.min(.25,.03*e.weight)).distance(60)).stop();for(let e=0;e<320;e++)a.tick();let f=l.flatMap(e=>[e.x-e.r,e.x+e.r]),x=l.flatMap(e=>[e.y-e.r,e.y+e.r]),m=l.length?{x:Math.min(...f)-60,y:Math.min(...x)-40,w:Math.max(...f)-Math.min(...f)+120,h:Math.max(...x)-Math.min(...x)+80}:{x:-300,y:-300,w:600,h:600},b=r.map(e=>{let t=l.filter(t=>t.co.industry.key===e),n=t.reduce((e,t)=>e+t.x,0)/t.length,o=t.reduce((e,t)=>e+t.y,0)/t.length,r=Math.hypot(n,o)||1,i=n/r,s=o/r,a=Math.max(...t.map(e=>(e.x-n)*i+(e.y-o)*s+e.r));return{key:e,x:n+i*(a+16),y:o+s*(a+16)+4,anchor:i>.35?"start":i<-.35?"end":"middle",ind:(0,y.industryByKey)(e)}});for(let e of b){let t=7.5*e.ind.label.length,n="start"===e.anchor?e.x:"end"===e.anchor?e.x-t:e.x-t/2,o=Math.max(m.x+m.w,n+t+10);m.x=Math.min(m.x,n-10),m.w=o-m.x;let r=Math.max(m.y+m.h,e.y+12);m.y=Math.min(m.y,e.y-18),m.h=r-m.y}return m.h+=Math.max(60,.1*m.h),{nodes:l,edges:s,box:m,labels:b,cut:Math.max(0,e.length-t.length)}},[e,o]),v=b||(r?.kind==="company"?r.key:null),S=r?.kind==="industry"?r.key:null,z=(0,n.useMemo)(()=>{if(!v)return null;let e=new Set([v]);for(let t of j.edges)t.source.id===v&&e.add(t.target.id),t.target.id===v&&e.add(t.source.id);return e},[v,j]),M=(0,n.useMemo)(()=>new Set(j.nodes.slice(0,28).map(e=>e.id)),[j]);return(0,t.jsxs)("div",{ref:a,style:{flex:1,minHeight:360,position:"relative"},onClick:s,children:[f>0&&(0,t.jsxs)("svg",{width:f,height:m,viewBox:`${j.box.x} ${j.box.y} ${j.box.w} ${j.box.h}`,style:{display:"block"},children:[(0,t.jsx)("g",{children:j.edges.map((e,n)=>{let o=v&&(e.source.id===v||e.target.id===v);return(0,t.jsx)("line",{x1:e.source.x,y1:e.source.y,x2:e.target.x,y2:e.target.y,stroke:o?"#FF6B35":"#8fa6c0",strokeOpacity:o?.8:v?.04:.14,strokeWidth:o?1+Math.log2(1+e.weight):.4+.5*Math.log2(1+e.weight)},n)})}),j.labels.map(e=>(0,t.jsx)("text",{x:e.x,y:e.y,textAnchor:e.anchor,fontSize:13,fontWeight:800,fill:e.ind.color,opacity:S&&S!==e.key?.25:.85,style:{cursor:"pointer"},onClick:t=>{t.stopPropagation(),l(e.key)},children:e.ind.label},e.key)),j.nodes.map(e=>{let n=z&&!z.has(e.id)||S&&e.co.industry.key!==S,o=r?.kind==="company"&&r.key===e.id;return(0,t.jsxs)("g",{transform:`translate(${e.x},${e.y})`,style:{cursor:"pointer"},opacity:n?.18:1,onMouseEnter:()=>w(e.id),onMouseLeave:()=>w(null),onClick:t=>{t.stopPropagation(),i(e.id)},children:[(0,t.jsx)("title",{children:`${e.co.name} \xb7 ${e.co.industry.label} (inferred)
2
- ${e.co.d1} you know \xb7 ${e.co.d2} reachable${e.co.d3?` \xb7 ${e.co.d3} further`:""}`}),(0,t.jsx)("circle",{r:e.r,fill:e.co.industry.color,fillOpacity:.75,stroke:o?"#fff":e.co.S?x.S:"rgba(0,0,0,0.35)",strokeWidth:o?2.5:e.co.S?1.5:.6}),e.co.d1>0&&(0,t.jsx)("circle",{r:e.r*Math.sqrt(e.co.d1/Math.max(1,e.co.people.length)),fill:"#fff",fillOpacity:.35}),(M.has(e.id)||e.id===v||o)&&(0,t.jsx)("text",{y:e.r+11,textAnchor:"middle",fontSize:10,fill:"#e6edf0",style:{pointerEvents:"none"},children:e.co.name})]},e.id)})]}),(0,t.jsxs)("div",{style:{position:"absolute",left:12,bottom:10,fontSize:11,color:"#778",lineHeight:1.6,pointerEvents:"none"},children:["Bubble = a company, sized by your people there; white centre = the share you already know; gold ring = an S-tier person inside.",(0,t.jsx)("br",{}),"A line = one of your connections at one company knows people at the other.",j.cut?` Showing the 140 largest; ${j.cut} smaller companies are in Industries.`:""]})]})}function z({parts:e,total:n}){return(0,t.jsx)("div",{style:{display:"flex",height:6,borderRadius:3,overflow:"hidden",background:"rgba(255,255,255,0.06)"},children:e.map(([e,o],r)=>(0,t.jsx)("div",{style:{width:`${e/Math.max(1,n)*100}%`,background:o}},r))})}function M({industries:e,index:o,d1:r,d2:i,onIndustry:l,onCompany:s}){let a=(0,n.useMemo)(()=>{let e=new Map(r.map(e=>[e.id,e])),t=new Map;for(let e of i){let n=(0,y.companyOf)(e),r=n?o.get(n)?.industry.key:(0,y.industryOf)(null,e.headline).key;if(!r)continue;let i=t.get(r)||new Map;i.set(e.source_connection_id,(i.get(e.source_connection_id)||0)+1),t.set(r,i)}let n=new Map;for(let[o,r]of t){let[t,i]=[...r.entries()].sort((e,t)=>t[1]-e[1])[0]||[];e.get(t)&&n.set(o,{bridge:e.get(t),n:i})}return n},[o,r,i]);return(0,t.jsx)("div",{style:{flex:1,overflow:"auto",padding:16},children:(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))",gap:12},children:e.map(e=>{let n=e.people.filter(e=>1===e.degree).length,o=e.people.filter(e=>2===e.degree).length,r=e.people.filter(e=>(0,y.isSenior)(e.headline)).length,i=e.people.filter(e=>"S"===e.tier).length,d=[...e.companies.entries()].sort((e,t)=>t[1]-e[1]).slice(0,3),c=a.get(e.key);return(0,t.jsxs)("div",{onClick:()=>l(e.key),style:{padding:14,borderRadius:10,border:m,borderTop:`3px solid ${e.color}`,background:"rgba(255,255,255,0.03)",cursor:"pointer"},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline"},children:[(0,t.jsx)("b",{style:{fontSize:14,color:e.color},children:e.label}),(0,t.jsx)("span",{style:{fontSize:20,fontWeight:800},children:e.people.length})]}),(0,t.jsxs)("div",{style:{fontSize:11.5,color:"#8b9a9a",margin:"4px 0 6px"},children:[n," you know · ",o," reachable · ",e.companies.size," companies · ",r," director+ · ",i," S-tier"]}),(0,t.jsx)(z,{total:e.people.length,parts:[[n,"#00ff88"],[o,"#FF6B35"]]}),d.length>0&&(0,t.jsx)("div",{style:{marginTop:8,display:"flex",gap:6,flexWrap:"wrap"},children:d.map(([e,n])=>(0,t.jsxs)("button",{onClick:t=>{t.stopPropagation(),s(e)},style:{padding:"2px 8px",borderRadius:10,border:m,background:"rgba(255,255,255,0.05)",color:"#dfe6e9",fontSize:11,cursor:"pointer"},children:[e," ",(0,t.jsx)("span",{style:{color:"#778"},children:n})]},e))}),c&&(0,t.jsxs)("div",{style:{marginTop:8,fontSize:11.5,color:"#aab7b7"},children:["Best way in: ",(0,t.jsx)("b",{style:{color:x[c.bridge.tier]||"#ccc"},children:c.bridge.name})," knows ",c.n," here"]})]},e.key)})})})}function B({p:e,note:n}){return(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"5px 0",fontSize:12.5},children:[(0,t.jsx)("span",{style:{width:7,height:7,borderRadius:"50%",background:x[e.tier]||"#667",flexShrink:0}}),(0,t.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,t.jsx)("div",{style:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,t.jsx)("div",{style:{fontSize:11,color:"#8b9a9a",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n||e.headline})]})]})}function $({focus:e,data:o,index:r,links:i,d1:l,d2:s,filters:a,onClose:d,onCompany:c,onOpenCompany:p}){let h,u,g,f="company"===e.kind,x=o.people.filter(e=>j(e,a)),b=(0,n.useMemo)(()=>{let e=new Map;for(let t of x){let n=(0,y.getSeniority)(t.headline);e.set(n.label,{n:(e.get(n.label)?.n||0)+1,level:n.level})}return[...e.entries()].sort((e,t)=>t[1].level-e[1].level)},[x]),k=(0,n.useMemo)(()=>f?(0,y.waysInto)(o.name,l,s):null,[f,o,l,s]),w=(0,n.useMemo)(()=>f?i.filter(e=>e.a===o.name||e.b===o.name).map(e=>({name:e.a===o.name?e.b:e.a,weight:e.weight})).sort((e,t)=>t.weight-e.weight).slice(0,8):[],[f,i,o]),v=[...x].sort((e,t)=>(Number(t.power_score)||0)-(Number(e.power_score)||0)).slice(0,6),S=f?o.industry:o,C=x.filter(e=>1===e.degree).length,M=x.filter(e=>2===e.degree).length,I=f?[]:[...o.companies.entries()].sort((e,t)=>t[1]-e[1]).slice(0,10);return(0,t.jsxs)("aside",{style:{width:360,flexShrink:0,borderLeft:m,overflow:"auto",padding:16,background:"rgba(255,255,255,0.02)"},children:[(0,t.jsx)("button",{onClick:d,style:{background:"none",border:"none",color:"#888",cursor:"pointer",fontSize:12,padding:0},children:"✕ Close"}),(0,t.jsxs)("div",{style:{fontSize:10,letterSpacing:1,color:"#8b9a9a",marginTop:8},children:[f?"COMPANY":"INDUSTRY"," ANALYZER"]}),(0,t.jsx)("h2",{style:{margin:"4px 0 6px",fontSize:20},children:f?o.name:o.label}),(0,t.jsxs)("span",{style:{fontSize:11,padding:"2px 8px",borderRadius:10,background:`${S.color}22`,color:S.color},children:[S.label,f?" · inferred":""]}),f&&(0,t.jsx)(R,{name:o.name}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:8,margin:"14px 0"},children:[[C,"you know","#00ff88"],[M,"reachable","#FF6B35"],[x.filter(e=>(0,y.isSenior)(e.headline)).length,"director+","#FFD700"]].map(([e,n,o])=>(0,t.jsxs)("div",{style:{padding:8,borderRadius:8,background:"rgba(255,255,255,0.04)",textAlign:"center"},children:[(0,t.jsx)("div",{style:{fontSize:20,fontWeight:800,color:o},children:e}),(0,t.jsx)("div",{style:{fontSize:10.5,color:"#8b9a9a"},children:n})]},n))}),(0,t.jsx)(F,{title:"By level",children:b.map(([e,{n}])=>(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"110px 1fr 28px",gap:8,alignItems:"center",fontSize:11.5,marginBottom:4},children:[(0,t.jsx)("span",{style:{color:"#aab7b7"},children:e}),(0,t.jsx)(z,{total:x.length,parts:[[n,"#3498DB"]]}),(0,t.jsx)("span",{style:{color:"#778",textAlign:"right"},children:n})]},e))}),f&&k&&(0,t.jsxs)(F,{title:"Ways in",children:[k.direct.length>0&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#00ff88",margin:"2px 0"},children:["You already know ",k.direct.length," here"]}),(h=new Map(k.bridges.map(({bridge:e,n:t})=>[e.id,t])),u=[...k.direct].sort((e,t)=>(h.get(t.id)||0)-(h.get(e.id)||0)).slice(0,4),g=new Set(k.direct.map(e=>e.id)),(0,t.jsxs)(t.Fragment,{children:[u.map(e=>(0,t.jsx)(B,{p:e,note:h.get(e.id)?`works here \xb7 knows ${h.get(e.id)} here`:`works here \xb7 ${e.headline||""}`},e.id)),k.bridges.filter(({bridge:e})=>!g.has(e.id)).slice(0,5).map(({bridge:e,n})=>(0,t.jsx)(B,{p:e,note:`knows ${n} ${1===n?"person":"people"} here`},e.id))]})),!k.direct.length&&!k.bridges.length&&(0,t.jsx)("div",{style:{fontSize:12,color:"#778"},children:"No one you know links here yet."})]}),(0,t.jsx)(F,{title:f?"Most powerful people here":"Most powerful people in this industry",children:v.map(e=>(0,t.jsx)(B,{p:e,note:`${1===e.degree?"you know them":2===e.degree?"2nd degree":"3rd+"} \xb7 ${e.headline||""}`},e.id))}),f&&w.length>0&&(0,t.jsx)(F,{title:"Connected companies",children:(0,t.jsx)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:w.map(e=>(0,t.jsxs)("button",{onClick:()=>c(e.name),style:{padding:"3px 9px",borderRadius:10,border:m,background:`${r.get(e.name)?.industry.color||"#666"}22`,color:"#dfe6e9",fontSize:11.5,cursor:"pointer"},children:[e.name," ",(0,t.jsx)("span",{style:{color:"#778"},children:e.weight})]},e.name))})}),!f&&(0,t.jsx)(F,{title:"Companies",children:I.map(([e,n])=>(0,t.jsxs)("div",{onClick:()=>c(e),style:{display:"grid",gridTemplateColumns:"1fr 60px 24px",gap:8,alignItems:"center",fontSize:12,padding:"3px 0",cursor:"pointer"},children:[(0,t.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),(0,t.jsx)(z,{total:I[0][1],parts:[[n,S.color]]}),(0,t.jsx)("span",{style:{color:"#778",textAlign:"right"},children:n})]},e))}),f&&p&&(0,t.jsxs)("button",{onClick:()=>p(o),style:{marginTop:14,width:"100%",padding:"10px",borderRadius:8,border:"none",cursor:"pointer",fontWeight:700,background:"linear-gradient(135deg, #00ff88, #3498DB)",color:"#000"},children:["Path to the top of ",o.name," →"]})]})}function F({title:e,children:n}){return(0,t.jsxs)("div",{style:{marginTop:14},children:[(0,t.jsx)("div",{style:{fontSize:10.5,letterSpacing:.8,color:"#8b9a9a",fontWeight:700,marginBottom:6},children:e.toUpperCase()}),n]})}function R({name:e}){let{companies:n,setScore:o}=(0,f.useCompanyScores)(),r=n?.find(t=>t.name===e);if(!r)return null;let i={yours:"your score",known:"known list",network:"estimated",default:"unknown company"}[r.source];return(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginTop:10,fontSize:12,color:"#aab7b7"},children:["Company score ",(0,t.jsx)("b",{style:{color:"#fff",fontSize:15},children:r.score}),"/10 · ",i,(0,t.jsx)("span",{style:{marginLeft:"auto"},children:(0,t.jsx)(f.ScorePicker,{company:r,onSet:o,compact:!0})})]})}var I=e.i(15812),A=e.i(30215),W=e.i(22016),T=e.i(36774);let D=[["map","Map"],["industries","Industries"],["companies","Companies"]];function O(){let{userId:e}=(0,I.useUser)(),[a,d]=(0,n.useState)([]),[c,p]=(0,n.useState)(null),[h,u]=(0,n.useState)([]),[g,f]=(0,n.useState)(!0),[x,m]=(0,n.useState)([]),[b,k]=(0,n.useState)([]),[w,j]=(0,n.useState)([]),S=(0,o.useSearchParams)().get("tab"),[C,z]=(0,n.useState)(()=>D.some(([e])=>e===S)?S:"map"),M=(0,o.useRouter)();(0,n.useEffect)(()=>{"scores"===S&&M.replace("/scores#companies")},[S,M]);let[B,$]=(0,n.useState)(0),[F,R]=(0,n.useState)(!1);(0,n.useEffect)(()=>{!l.IS_DEMO&&e&&t();async function t(){let t=(0,s.hasCsvNetwork)()?(0,s.loadCsvNetwork)():null;R(!!t);let n=[],o=[],r=[];if(t)n=t.degree1,o=t.degree2||[];else{let t=await (0,i.loadNetwork)(e);n=t.degree1,o=t.degree2,r=t.degree3}m(n),k(o),j(r||[]);let l={},a=new Set;[...n,...o,...r].forEach(e=>{if(a.has(e.profile_url))return;a.add(e.profile_url);let t=(0,y.companyOf)(e);t&&(l[t]||(l[t]={name:t,d1:0,d2:0,d3:0,sCount:0,aCount:0,people:[]}),1===e.degree?l[t].d1++:2===e.degree?l[t].d2++:l[t].d3++,"S"===e.tier&&l[t].sCount++,"A"===e.tier&&l[t].aCount++,l[t].people.push(e))}),d(Object.values(l).filter(e=>e.d1+e.d2+e.d3>=3).sort((e,t)=>3*t.sCount+2*t.aCount+t.d1+t.d2+t.d3-(3*e.sCount+2*e.aCount+e.d1+e.d2+e.d3))),f(!1)}},[e,B]);let[T,O]=(0,n.useState)(!1),[E,N]=(0,n.useState)([]),L=(0,A.default)(),U=!T&&L.running?(0,r.busyReason)(L):null;function P(e){let t=new Set(x.map(e=>e.profile_url)),n=new Set([...x,...b].map(e=>e.profile_url)),o=new Map,r=0;for(let n of e)t.has(n.profile_url||n.profileUrl)&&(r++,o.set(n.id,(o.get(n.id)||0)+1));return e.map(e=>({...e,connected:t.has(e.profile_url||e.profileUrl),known:n.has(e.profile_url||e.profileUrl),seniority:(0,y.getSeniority)(e.headline),mutualCount:r-(o.get(e.id)||0)}))}function H(e){p(e),u(P(e.people))}async function K(){if(l.IS_DEMO||F||!c)return;let e=!1;try{e="1"===localStorage.getItem("six-degrees-company-scan-ok")}catch{}if(!e){if(!window.confirm("Company scans are experimental: they have not been tested against live LinkedIn yet, so the results may be incomplete. Like any scan, it opens a Chrome window and counts toward the profile views LinkedIn watches.\n\nRun it anyway?"))return;try{localStorage.setItem("six-degrees-company-scan-ok","1")}catch{}}O(!0),N(["Checking the scanner..."]);let t=(0,r.notReadyMessage)(await (0,r.scraperStatus)().catch(()=>null));if(t){N([t]),O(!1);return}try{let e=await (0,r.runScrape)("company",{name:c.name,onLog:N});if(0===e.exitCode){N(e=>[...e,"Loading the new people..."]);let e=await fetch(`/api/connections?scanned_company=${encodeURIComponent(c.name)}&limit=500`),t=(await e.json()).connections||[];t.length?(u(P(t)),N(e=>[...e,`${t.length} people at ${c.name}.`])):N(e=>[...e,"Nothing new was found."])}}catch(e){N([e.message||"Failed to start the scan"])}finally{O(!1)}}let Y=new Map;for(let e of x)Y.has(e.id)||Y.set(e.id,e);let q=new Set(x.map(e=>e.profile_url)),X={},G=0;h.forEach(e=>{let t=e.seniority.key;X[t]||(X[t]={...e.seniority,people:[]}),e.connected&&G++;let n=Math.min(90,12*e.mutualCount);e.seniority.level<=1?n+=20:e.seniority.level<=2?n+=10:e.seniority.level>=5&&(n-=10),n=Math.max(5,Math.min(95,n)),e.connected&&(n=100);let o=null;if(2===e.degree&&e.source_connection_id){let t=Y.get(e.source_connection_id);t&&(o=t.name)}let r={0:5,1:10,2:20,3:35,4:50,5:75,6:100}[e.seniority.level]||10;X[t].people.push({...e,likelihood:n,bridgeName:o,xp:r})}),Object.values(X).forEach(e=>e.people.sort((e,t)=>t.likelihood-e.likelihood));let J=Object.values(X).sort((e,t)=>t.level-e.level);return l.IS_DEMO?(0,t.jsxs)("div",{style:{minHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,background:"#0a0a1a",color:"rgba(255,255,255,0.7)",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},children:[(0,t.jsx)("h1",{style:{fontSize:20,fontWeight:700,margin:0,color:"#fff"},children:"Not part of the demo"}),(0,t.jsx)("p",{style:{fontSize:13,margin:0},children:"The public demo includes the Network Circle and Degrees views only."}),(0,t.jsx)(W.default,{href:"/",style:{fontSize:13,color:"#888",textDecoration:"none"},children:"← Back to the network"})]}):g?(0,t.jsx)("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#0a0a1a",color:"#fff"},children:"Loading..."}):(0,t.jsxs)("div",{style:{height:"100vh",background:"#0a0a1a",color:"#fff",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,t.jsx)("header",{style:{padding:"14px 24px",borderBottom:"1px solid rgba(255,255,255,0.1)",flexShrink:0},children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12},children:[(0,t.jsxs)(W.default,{href:"/",style:{display:"flex",alignItems:"center",gap:6,color:"#888",textDecoration:"none",fontSize:13,fontWeight:600,padding:"6px 14px",borderRadius:6,background:"rgba(255,255,255,0.06)",border:"1px solid rgba(255,255,255,0.1)"},children:[(0,t.jsx)("span",{style:{fontSize:16},children:"←"})," Map"]}),(0,t.jsx)("h1",{style:{fontSize:20,fontWeight:700,margin:0,background:"linear-gradient(135deg, #00ff88, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Paths"}),!c&&(0,t.jsx)("div",{style:{display:"flex",gap:4,marginLeft:8,padding:3,borderRadius:8,background:"rgba(255,255,255,0.05)"},children:D.map(([e,n])=>(0,t.jsx)("button",{onClick:()=>z(e),style:{padding:"5px 12px",borderRadius:6,border:"none",cursor:"pointer",fontSize:12.5,fontWeight:700,background:C===e?"linear-gradient(135deg, #00ff88, #3498DB)":"transparent",color:C===e?"#000":"#aab"},children:n},e))}),c&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>{p(null),u([])},style:{background:"none",border:"none",color:"#888",cursor:"pointer",fontSize:12},children:"← Companies"}),(0,t.jsx)("span",{style:{fontSize:13,fontWeight:600},children:c.name}),(0,t.jsxs)("span",{style:{fontSize:11,color:"#888"},children:[G,"/",h.length," connected"]}),F?(0,t.jsx)("span",{style:{marginLeft:"auto",fontSize:11,color:"#888"},children:"Scanning needs your own network"}):(0,t.jsx)("button",{onClick:K,disabled:T||!!U,title:U?`${U}. One scan at a time.`:void 0,style:{marginLeft:"auto",padding:"5px 12px",borderRadius:6,border:"none",cursor:T||U?"not-allowed":"pointer",background:T||U?"#333":"rgba(0,255,136,0.15)",color:T||U?"#555":"#00ff88",fontSize:11,fontWeight:600},children:T?"Scanning...":U?"Scanner busy":"+ Scan Full Company"}),(0,t.jsx)("span",{title:"Not yet tested against live LinkedIn. Results may be incomplete.",style:{fontSize:9.5,fontWeight:800,letterSpacing:.6,padding:"3px 7px",borderRadius:20,border:"1px solid rgba(255,215,0,0.45)",color:"#FFD700"},children:"EXPERIMENTAL"})]})]})}),c||"companies"===C?(0,t.jsx)("div",{style:{flex:1,overflow:"auto",padding:"16px 24px"},children:(0,t.jsxs)("div",{style:{maxWidth:700,margin:"0 auto"},children:[!c&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{style:{fontSize:13,color:"#888",marginBottom:16},children:["Pick a company to see your path to the top. Based on ",x.length+b.length," people in your network."]}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10},children:a.slice(0,60).map(e=>(0,t.jsxs)("button",{onClick:()=>H(e),style:{padding:"14px",borderRadius:10,border:"none",cursor:"pointer",textAlign:"left",background:"rgba(255,255,255,0.04)",transition:"background 0.15s",borderLeft:`3px solid ${e.sCount>0?"#FFD700":e.aCount>0?"#9B59B6":"#3498DB"}`},onMouseEnter:e=>e.currentTarget.style.background="rgba(255,255,255,0.08)",onMouseLeave:e=>e.currentTarget.style.background="rgba(255,255,255,0.04)",children:[(0,t.jsx)("div",{style:{fontSize:14,fontWeight:700,color:"#fff",marginBottom:4},children:e.name}),(0,t.jsxs)("div",{style:{display:"flex",gap:8,fontSize:10,color:"#888"},children:[(0,t.jsxs)("span",{style:{color:"#00ff88"},children:[e.d1," connected"]}),(0,t.jsxs)("span",{children:[e.d2+e.d3," locked"]})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:6,marginTop:4,fontSize:9},children:[e.sCount>0&&(0,t.jsxs)("span",{style:{color:"#FFD700",fontWeight:600},children:[e.sCount,"S"]}),e.aCount>0&&(0,t.jsxs)("span",{style:{color:"#9B59B6",fontWeight:600},children:[e.aCount,"A"]}),(0,t.jsxs)("span",{style:{color:"#555"},children:[e.d1+e.d2," total"]})]}),(0,t.jsx)("div",{style:{height:3,background:"rgba(255,255,255,0.08)",borderRadius:2,marginTop:6},children:(0,t.jsx)("div",{style:{height:"100%",borderRadius:2,width:`${e.d1/Math.max(e.d1+e.d2+e.d3,1)*100}%`,background:e.sCount>0?"#FFD700":"#00ff88"}})})]},e.name))})]}),T&&(0,t.jsxs)("div",{style:{padding:"10px",borderRadius:8,background:"rgba(0,255,136,0.06)",border:"1px solid rgba(0,255,136,0.2)",marginBottom:12},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:4},children:[(0,t.jsx)("div",{style:{width:6,height:6,borderRadius:"50%",background:"#00ff88",animation:"pulse 1s infinite"}}),(0,t.jsx)("span",{style:{fontSize:10,fontWeight:600,color:"#00ff88"},children:"Scanning LinkedIn..."})]}),(0,t.jsx)("div",{style:{fontFamily:"monospace",fontSize:9,color:"#777",maxHeight:60,overflow:"auto"},children:E.map((e,n)=>(0,t.jsx)("div",{children:e},n))})]}),c&&J.map(e=>(0,t.jsxs)("div",{style:{marginBottom:16},children:[(0,t.jsxs)("div",{style:{padding:"8px 12px",borderRadius:6,marginBottom:4,background:e.level>=5?"rgba(255,215,0,0.08)":e.level>=3?"rgba(155,89,182,0.08)":"rgba(52,152,219,0.08)",borderLeft:`3px solid ${e.level>=5?"#FFD700":e.level>=3?"#9B59B6":"#3498DB"}`,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{fontSize:12,fontWeight:700,color:e.level>=5?"#FFD700":e.level>=3?"#9B59B6":"#3498DB"},children:e.label}),e.level>=5&&(0,t.jsx)("span",{style:{fontSize:9,color:"#FF6B35",marginLeft:8,fontWeight:700},children:"TARGET"})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,t.jsxs)("span",{style:{fontSize:9,color:"#FF6B35",fontWeight:600},children:["+",e.people.filter(e=>!e.connected).reduce((e,t)=>e+(t.xp||0),0)," XP"]}),(0,t.jsxs)("span",{style:{fontSize:10,color:"#666"},children:[e.people.filter(e=>e.connected).length,"/",e.people.length]})]})]}),e.people.map((n,o)=>(0,t.jsx)(_,{p:n,level:e,companyPeople:h,d1Urls:q,selectedCompany:c},n.id||o))]},e.key))]})}):(0,t.jsx)(v,{d1:x,d2:b,d3:w,tab:C,onOpenCompany:e=>H({...e,sCount:e.S,aCount:e.A})})]})}function _({p:e,level:o,companyPeople:r,d1Urls:i,selectedCompany:l}){let[s,a]=(0,n.useState)(!1),d=[];if(s&&!e.connected){let t=r.filter(t=>t.seniority.level>e.seniority.level&&!i.has(t.profile_url||t.profileUrl)),n=r.filter(t=>t.seniority.level===e.seniority.level&&t.id!==e.id),o=t.length;o>0&&d.push({icon:"⬆️",text:`Adding them gives you a mutual with ${o} people above in the hierarchy`,color:"#00ff88"});let l=n.filter(e=>i.has(e.profile_url||e.profileUrl)).length;l>0?d.push({icon:"🤝",text:`${l} people at their level already connected — high social proof`,color:"#FFD700"}):d.push({icon:"🎯",text:"First connection at this level — opens a new layer",color:"#3498DB"}),e.bridgeName&&d.push({icon:"🔗",text:`Reachable through ${e.bridgeName} — warm intro possible`,color:"#FF6B35"}),e.seniority.level>=5?d.push({icon:"👑",text:`${e.seniority.label} — decision maker, high strategic value but low accept rate`,color:"#FFD700"}):e.seniority.level>=3?d.push({icon:"📊",text:`${e.seniority.label} — middle management, good balance of access and accept rate`,color:"#9B59B6"}):d.push({icon:"✅",text:`${e.seniority.label} — highest accept rate, builds mutual foundation for people above`,color:"#00ff88"}),e.likelihood>=60?d.push({icon:"🔥",text:`${e.likelihood}% likely to accept — strong mutual overlap + approachable role`,color:"#00ff88"}):e.likelihood>=30?d.push({icon:"⚡",text:`${e.likelihood}% likely — moderate chance, add more people at their level first`,color:"#FFD700"}):d.push({icon:"🔒",text:`${e.likelihood}% likely — low chance right now, build more connections below them first`,color:"#ff5050"})}return(0,t.jsxs)("div",{style:{borderBottom:"1px solid rgba(255,255,255,0.03)"},children:[(0,t.jsxs)("div",{onClick:()=>a(!s),style:{display:"flex",alignItems:"center",gap:8,padding:"6px 8px",cursor:"pointer",opacity:e.connected?.7:1},onMouseEnter:e=>e.currentTarget.style.background="rgba(255,255,255,0.04)",onMouseLeave:e=>e.currentTarget.style.background="transparent",children:[(0,t.jsx)("span",{style:{fontSize:8,color:"#555",flexShrink:0,width:10},children:s?"▾":"▸"}),(0,t.jsx)("div",{style:{width:18,height:18,borderRadius:"50%",flexShrink:0,fontSize:8,display:"flex",alignItems:"center",justifyContent:"center",background:e.connected?"rgba(0,255,136,0.2)":"rgba(255,255,255,0.05)",color:e.connected?"#00ff88":"#555",border:`1px solid ${e.connected?"rgba(0,255,136,0.3)":"rgba(255,255,255,0.1)"}`},children:e.connected?"✓":"🔒"}),(0,T.localPhoto)(e.profile_image_url||e.imageUrl)?(0,t.jsx)("img",{src:(0,T.localPhoto)(e.profile_image_url||e.imageUrl),alt:"",style:{width:26,height:26,borderRadius:"50%",objectFit:"cover",flexShrink:0},onError:e=>e.target.style.display="none"}):(0,t.jsx)("div",{style:{width:26,height:26,borderRadius:"50%",flexShrink:0,fontSize:10,fontWeight:700,background:"#333",color:"#888",display:"flex",alignItems:"center",justifyContent:"center"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:11,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,t.jsx)("div",{style:{fontSize:8,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.headline?.substring(0,45)})]}),!e.connected&&e.bridgeName&&(0,t.jsxs)("span",{style:{fontSize:8,color:"#FF6B35",flexShrink:0,maxWidth:55,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["via ",e.bridgeName.split(" ")[0]]}),!e.connected&&(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,flexShrink:0},children:[(0,t.jsxs)("span",{style:{fontSize:8,fontWeight:700,color:"#FF6B35"},children:["+",e.xp]}),(0,t.jsxs)("div",{style:{fontSize:9,fontWeight:700,minWidth:30,textAlign:"right",color:e.likelihood>=60?"#00ff88":e.likelihood>=30?"#FFD700":"#ff5050"},children:[e.likelihood,"%"]})]}),!e.connected&&(0,t.jsx)("a",{href:e.profile_url||e.profileUrl,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),style:{padding:"3px 7px",borderRadius:4,fontSize:8,fontWeight:700,background:"#0077B5",color:"#fff",textDecoration:"none",flexShrink:0},children:"Add"})]}),s&&(0,t.jsxs)("div",{style:{padding:"8px 12px 10px 44px",background:"rgba(255,255,255,0.02)",borderTop:"1px solid rgba(255,255,255,0.04)"},children:[(0,t.jsx)("div",{style:{fontSize:11,color:"#aaa",marginBottom:8},children:e.headline||"No headline available"}),(0,t.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"center",marginBottom:8,flexWrap:"wrap"},children:[(0,t.jsxs)("div",{style:{display:"inline-block",padding:"2px 8px",borderRadius:4,fontSize:9,fontWeight:600,background:e.seniority.level>=5?"rgba(255,215,0,0.1)":e.seniority.level>=3?"rgba(155,89,182,0.1)":"rgba(52,152,219,0.1)",color:e.seniority.level>=5?"#FFD700":e.seniority.level>=3?"#9B59B6":"#3498DB",border:`1px solid ${e.seniority.level>=5?"rgba(255,215,0,0.2)":e.seniority.level>=3?"rgba(155,89,182,0.2)":"rgba(52,152,219,0.2)"}`},children:[e.seniority.label," · Level ",e.seniority.level]}),!e.connected&&(0,t.jsxs)("div",{style:{display:"inline-block",padding:"2px 8px",borderRadius:4,fontSize:9,fontWeight:700,background:"rgba(255,107,53,0.1)",color:"#FF6B35",border:"1px solid rgba(255,107,53,0.2)"},children:["+",e.xp," XP"]})]}),!e.connected&&d.length>0&&(0,t.jsxs)("div",{style:{marginTop:4},children:[(0,t.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#888",letterSpacing:.5,marginBottom:4},children:"STRATEGIC VALUE"}),d.map((e,n)=>(0,t.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"flex-start",padding:"2px 0",fontSize:10,color:"#bbb"},children:[(0,t.jsx)("span",{style:{fontSize:11,lineHeight:1},children:e.icon}),(0,t.jsx)("span",{style:{color:e.color},children:e.text})]},n))]}),e.connected&&(0,t.jsxs)("div",{style:{fontSize:10,color:"#00ff88",fontWeight:600},children:["✓ Already connected — contributes as mutual for others at ",l?.name]})]})]})}e.s(["default",0,function(){return(0,t.jsx)(a.default,{children:(0,t.jsx)(n.Suspense,{children:(0,t.jsx)(O,{})})})}],85957)},89154,e=>{"use strict";var t=e.i(90179);function n(e){let n=(0,t.readTitle)(e);return{key:n.key,label:n.label,level:n.level}}function o(e){return(0,t.currentCompany)(e)}let r=[{key:"defense",label:"Government, Defense & Aerospace",color:"#7f8c8d",words:/\b(government|federal|state of|county|city of|defen[cs]e|army|navy|air force|marine corps|military|dod|nasa|aerospace|lockheed|northrop|boeing|raytheon|l3harris|leidos|blue origin|spacex|public sector)\b/i},{key:"finance",label:"Finance & Investing",color:"#2ecc71",words:/\b(bank|banking|capital|ventures?|vc|investments?|investor|fund|private equity|growth equity|asset management|wealth|trading|trader|hedge|crypto|blockchain|web3|defi|fintech|stripe|coinbase|blackrock|robinhood|goldman|morgan stanley|jpmorgan|chase|bny|mellon|wells fargo|citi|citigroup|capital one|fidelity|vanguard|schwab|visa|mastercard|amex|american express|paypal|insurance|accounting|cpa|financial)\b/i},{key:"health",label:"Healthcare & Biotech",color:"#e74c3c",words:/\b(health|healthcare|medical|medicine|hospital|clinic|pharma|pharmaceutical|biotech|nurse|nursing|physician|doctor|dental|therapy|therapist|wellness)\b/i},{key:"education",label:"Education",color:"#f1c40f",words:/\b(university|college|school|education|student|professor|teacher|academy|phd|faculty|alumni)\b/i},{key:"media",label:"Marketing & Media",color:"#e67e22",words:/\b(marketing|brand|branding|advertising|agency|media|content|social media|creative|creator|influencer|pr|public relations|communications|tiktok|pinterest|youtube|growth marketing)\b/i},{key:"entertainment",label:"Entertainment & Gaming",color:"#9b59b6",words:/\b(entertainment|film|movie|music|records|gaming|games?|esports|studio|studios|netflix|disney|spotify|hollywood|theater|theatre|sports)\b/i},{key:"tech",label:"Tech, Software & AI",color:"#3498db",words:/\b(software|saas|engineer|engineering|developer|tech|technology|technologies|ai|artificial intelligence|machine learning|ml|data|cloud|cyber|security|devops|product manager|google|microsoft|apple|meta|amazon|nvidia|openai|anthropic|palantir|salesforce|oracle|ibm|intel|app|apps|startup|platform|labs?)\b/i},{key:"consulting",label:"Consulting, Legal & Services",color:"#1abc9c",words:/\b(consulting|consultant|consultancy|deloitte|accenture|mckinsey|kpmg|pwc|ey|bain|bcg|legal|law|lawyer|attorney|paralegal|recruiting|recruiter|staffing|talent)\b/i},{key:"realestate",label:"Real Estate & Construction",color:"#d35400",words:/\b(real estate|realtor|realty|property|properties|construction|architecture|architect|mortgage|homes|housing|builders?)\b/i},{key:"consumer",label:"Retail, Consumer & Hospitality",color:"#ff79c6",words:/\b(retail|e-?commerce|shopify|consumer|cpg|fashion|apparel|beauty|cosmetics|food|beverage|restaurant|hospitality|hotel|travel|tourism|coca-cola|nike|store|shop)\b/i},{key:"industry",label:"Manufacturing, Energy & Logistics",color:"#95a5a6",words:/\b(manufacturing|energy|oil|gas|solar|utilities|automotive|tesla|siemens|ge|general electric|honeywell|3m|logistics|supply chain|shipping|freight|fedex|ups|industrial|mining|chemicals?)\b/i},{key:"nonprofit",label:"Nonprofit & Community",color:"#bdc3c7",words:/\b(nonprofit|non-profit|foundation|charity|ngo|church|ministry|volunteer)\b/i}],i={key:"unknown",label:"Unclear",color:"#555c66"},l=Object.fromEntries([...r,i].map(e=>[e.key,e])),s=e=>l[e]||i;function a(e,t){for(let n of[e,t]){if(!n)continue;let e=r.find(e=>e.words.test(n));if(e)return e}return i}let d=(e,t)=>a(e,t).key,c=e=>n(e).level>=4;e.s(["INDUSTRIES",0,r,"UNKNOWN_INDUSTRY",0,i,"buildCompanyIndex",0,function(e=[]){let n=new Map,o=e=>(n.has(e)||n.set(e,(0,t.rolesWithCompanies)(e)),n.get(e)),{industries:r}=(0,t.networkCompanies)(e,{industryOf:d,rolesOf:o}),i=new Map;for(let t of e){let e=t.profile_url||`id:${t.id}`,n=i.get(e);(!n||(t.degree||9)<(n.degree||9))&&i.set(e,t)}let l=new Map;for(let e of i.values()){let t=o(e).find(e=>!e.former)?.company;if(!t)continue;let n=l.get(t);n||(n={name:t,people:[],d1:0,d2:0,d3:0,S:0,A:0,senior:0},l.set(t,n)),n.people.push(e),1===e.degree?n.d1++:2===e.degree?n.d2++:n.d3++,"S"===e.tier&&n.S++,"A"===e.tier&&n.A++,c(e.headline)&&n.senior++}for(let e of l.values())e.industry=s(r.get(e.name));return l},"companyLinks",0,function(e=[],t=[]){let n=new Map;for(let t of e){let e=o(t);e&&n.set(t.id,e)}let r=new Map;for(let e of t){let t=n.get(e.source_connection_id),i=o(e);if(!t||!i||t===i)continue;let[l,s]=t<i?[t,i]:[i,t],a=`${l}\u0000${s}`,d=r.get(a);d||(d={a:l,b:s,weight:0,via:new Set},r.set(a,d)),d.weight++,d.via.add(e.source_connection_id)}return[...r.values()]},"companyOf",0,o,"getSeniority",0,n,"industryByKey",0,s,"industryOf",0,a,"isSenior",0,c,"waysInto",0,function(e,t=[],n=[]){let r=t.filter(t=>o(t)===e),i=new Map;for(let t of n)o(t)===e&&i.set(t.source_connection_id,(i.get(t.source_connection_id)||0)+1);let l=new Map(t.map(e=>[e.id,e]));return{direct:r,bridges:[...i.entries()].map(([e,t])=>({bridge:l.get(e),n:t})).filter(e=>e.bridge).sort((e,t)=>t.n-e.n||(Number(t.bridge.power_score)||0)-(Number(e.bridge.power_score)||0))}}])},19821,e=>{"use strict";async function t(e){let t=e?`/api/network?userId=${encodeURIComponent(e)}`:"/api/network",n=await fetch(t);if(!n.ok)throw Error(`Failed to load network (${n.status})`);let o=await n.json();return{degree1:o.degree1||[],degree2:o.degree2||[],degree3:o.degree3||[],ties:Number(o.ties)||0}}e.s(["loadNetwork",0,t])},36774,e=>{"use strict";let t=/^[A-Za-z0-9_-]+\.(webp|jpg|jpeg|png)$/,n="/avatars/";e.s(["localPhoto",0,function(e){return"string"==typeof e&&e.startsWith(n)&&t.test(e.slice(n.length))?e:null}])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,30215,t=>{"use strict";var n=t.i(71645),e=t.i(40996);t.s(["default",0,function(){return(0,n.useSyncExternalStore)(e.watchScanner,e.scannerNow,()=>e.SCANNER_UNKNOWN)}])},36534,t=>{"use strict";var n=t.i(50768),e=t.i(23731),r=t.i(49260);function i(t){return t.x+t.vx}function o(t){return t.y+t.vy}t.s(["forceCollide",0,function(t){var a,u,s,l=1,f=1;function c(){for(var t,e,c,p,d,v,y,g=a.length,_=0;_<f;++_)for(e=(0,n.quadtree)(a,i,o).visitAfter(h),t=0;t<g;++t)y=(v=u[(c=a[t]).index])*v,p=c.x+c.vx,d=c.y+c.vy,e.visit(m);function m(t,n,e,i,o){var a=t.data,u=t.r,f=v+u;if(a){if(a.index>c.index){var h=p-a.x-a.vx,g=d-a.y-a.vy,_=h*h+g*g;_<f*f&&(0===h&&(_+=(h=(0,r.default)(s))*h),0===g&&(_+=(g=(0,r.default)(s))*g),_=(f-(_=Math.sqrt(_)))/_*l,c.vx+=(h*=_)*(f=(u*=u)/(y+u)),c.vy+=(g*=_)*f,a.vx-=h*(f=1-f),a.vy-=g*f)}return}return n>p+f||i<p-f||e>d+f||o<d-f}}function h(t){if(t.data)return t.r=u[t.data.index];for(var n=t.r=0;n<4;++n)t[n]&&t[n].r>t.r&&(t.r=t[n].r)}function p(){if(a){var n,e,r=a.length;for(u=Array(r),n=0;n<r;++n)u[(e=a[n]).index]=+t(e,n,a)}}return"function"!=typeof t&&(t=(0,e.default)(null==t?1:+t)),c.initialize=function(t,n){a=t,s=n,p()},c.iterations=function(t){return arguments.length?(f=+t,c):f},c.strength=function(t){return arguments.length?(l=+t,c):l},c.radius=function(n){return arguments.length?(t="function"==typeof n?n:(0,e.default)(+n),p(),c):t},c}],36534)},23731,49260,t=>{"use strict";t.s(["default",0,function(t){return function(){return t}}],23731),t.s(["default",0,function(t){return(t()-.5)*1e-6}],49260)},77899,t=>{"use strict";var n=t.i(23731),e=t.i(49260);function r(t){return t.index}function i(t,n){var e=t.get(n);if(!e)throw Error("node not found: "+n);return e}t.s(["forceLink",0,function(t){var o,a,u,s,l,f,c=r,h=function(t){return 1/Math.min(s[t.source.index],s[t.target.index])},p=(0,n.default)(30),d=1;function v(n){for(var r=0,i=t.length;r<d;++r)for(var u,s,c,h,p,v,y,g=0;g<i;++g)s=(u=t[g]).source,v=((v=Math.sqrt((h=(c=u.target).x+c.vx-s.x-s.vx||(0,e.default)(f))*h+(p=c.y+c.vy-s.y-s.vy||(0,e.default)(f))*p))-a[g])/v*n*o[g],h*=v,p*=v,c.vx-=h*(y=l[g]),c.vy-=p*y,s.vx+=h*(y=1-y),s.vy+=p*y}function y(){if(u){var n,e,r=u.length,f=t.length,h=new Map(u.map((t,n)=>[c(t,n,u),t]));for(n=0,s=Array(r);n<f;++n)(e=t[n]).index=n,"object"!=typeof e.source&&(e.source=i(h,e.source)),"object"!=typeof e.target&&(e.target=i(h,e.target)),s[e.source.index]=(s[e.source.index]||0)+1,s[e.target.index]=(s[e.target.index]||0)+1;for(n=0,l=Array(f);n<f;++n)e=t[n],l[n]=s[e.source.index]/(s[e.source.index]+s[e.target.index]);o=Array(f),g(),a=Array(f),_()}}function g(){if(u)for(var n=0,e=t.length;n<e;++n)o[n]=+h(t[n],n,t)}function _(){if(u)for(var n=0,e=t.length;n<e;++n)a[n]=+p(t[n],n,t)}return null==t&&(t=[]),v.initialize=function(t,n){u=t,f=n,y()},v.links=function(n){return arguments.length?(t=n,y(),v):t},v.id=function(t){return arguments.length?(c=t,v):c},v.iterations=function(t){return arguments.length?(d=+t,v):d},v.strength=function(t){return arguments.length?(h="function"==typeof t?t:(0,n.default)(+t),g(),v):h},v.distance=function(t){return arguments.length?(p="function"==typeof t?t:(0,n.default)(+t),_(),v):p},v}],77899)},17983,t=>{"use strict";var n=t.i(50768),e=t.i(23731),r=t.i(49260),i=t.i(909);t.s(["forceManyBody",0,function(){var t,o,a,u,s,l=(0,e.default)(-30),f=1,c=1/0,h=.81;function p(e){var r,a=t.length,s=(0,n.quadtree)(t,i.x,i.y).visitAfter(v);for(u=e,r=0;r<a;++r)o=t[r],s.visit(y)}function d(){if(t){var n,e,r=t.length;for(s=Array(r),n=0;n<r;++n)s[(e=t[n]).index]=+l(e,n,t)}}function v(t){var n,e,r,i,o,a=0,u=0;if(t.length){for(r=i=o=0;o<4;++o)(n=t[o])&&(e=Math.abs(n.value))&&(a+=n.value,u+=e,r+=e*n.x,i+=e*n.y);t.x=r/u,t.y=i/u}else{(n=t).x=n.data.x,n.y=n.data.y;do a+=s[n.data.index];while(n=n.next)}t.value=a}function y(t,n,e,i){if(!t.value)return!0;var l=t.x-o.x,p=t.y-o.y,d=i-n,v=l*l+p*p;if(d*d/h<v)return v<c&&(0===l&&(v+=(l=(0,r.default)(a))*l),0===p&&(v+=(p=(0,r.default)(a))*p),v<f&&(v=Math.sqrt(f*v)),o.vx+=l*t.value*u/v,o.vy+=p*t.value*u/v),!0;if(!t.length&&!(v>=c)){(t.data!==o||t.next)&&(0===l&&(v+=(l=(0,r.default)(a))*l),0===p&&(v+=(p=(0,r.default)(a))*p),v<f&&(v=Math.sqrt(f*v)));do t.data!==o&&(d=s[t.data.index]*u/v,o.vx+=l*d,o.vy+=p*d);while(t=t.next)}}return p.initialize=function(n,e){t=n,a=e,d()},p.strength=function(t){return arguments.length?(l="function"==typeof t?t:(0,e.default)(+t),d(),p):l},p.distanceMin=function(t){return arguments.length?(f=t*t,p):Math.sqrt(f)},p.distanceMax=function(t){return arguments.length?(c=t*t,p):Math.sqrt(c)},p.theta=function(t){return arguments.length?(h=t*t,p):Math.sqrt(h)},p}],17983)},909,t=>{"use strict";var n=t.i(91889),e=t.i(60208),r=Math.PI*(3-Math.sqrt(5));t.s(["default",0,function(t){let i;var o,a=1,u=.001,s=1-Math.pow(.001,1/300),l=0,f=.6,c=new Map,h=(0,e.timer)(v),p=(0,n.dispatch)("tick","end"),d=(i=1,()=>(i=(1664525*i+0x3c6ef35f)%0x100000000)/0x100000000);function v(){y(),p.call("tick",o),a<u&&(h.stop(),p.call("end",o))}function y(n){var e,r,i=t.length;void 0===n&&(n=1);for(var u=0;u<n;++u)for(a+=(l-a)*s,c.forEach(function(t){t(a)}),e=0;e<i;++e)null==(r=t[e]).fx?r.x+=r.vx*=f:(r.x=r.fx,r.vx=0),null==r.fy?r.y+=r.vy*=f:(r.y=r.fy,r.vy=0);return o}function g(){for(var n,e=0,i=t.length;e<i;++e){if((n=t[e]).index=e,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),isNaN(n.x)||isNaN(n.y)){var o=10*Math.sqrt(.5+e),a=e*r;n.x=o*Math.cos(a),n.y=o*Math.sin(a)}(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}}function _(n){return n.initialize&&n.initialize(t,d),n}return null==t&&(t=[]),g(),o={tick:y,restart:function(){return h.restart(v),o},stop:function(){return h.stop(),o},nodes:function(n){return arguments.length?(t=n,g(),c.forEach(_),o):t},alpha:function(t){return arguments.length?(a=+t,o):a},alphaMin:function(t){return arguments.length?(u=+t,o):u},alphaDecay:function(t){return arguments.length?(s=+t,o):+s},alphaTarget:function(t){return arguments.length?(l=+t,o):l},velocityDecay:function(t){return arguments.length?(f=1-t,o):1-f},randomSource:function(t){return arguments.length?(d=t,c.forEach(_),o):d},force:function(t,n){return arguments.length>1?(null==n?c.delete(t):c.set(t,_(n)),o):c.get(t)},find:function(n,e,r){var i,o,a,u,s,l=0,f=t.length;for(null==r?r=1/0:r*=r,l=0;l<f;++l)(a=(i=n-(u=t[l]).x)*i+(o=e-u.y)*o)<r&&(s=u,r=a);return s},on:function(t,n){return arguments.length>1?(p.on(t,n),o):p.on(t)}}},"x",0,function(t){return t.x},"y",0,function(t){return t.y}],909)},43079,t=>{"use strict";var n=t.i(909);t.s(["forceSimulation",()=>n.default])},52048,47560,t=>{"use strict";var n=t.i(23731);t.s(["forceX",0,function(t){var e,r,i,o=(0,n.default)(.1);function a(t){for(var n,o=0,a=e.length;o<a;++o)n=e[o],n.vx+=(i[o]-n.x)*r[o]*t}function u(){if(e){var n,a=e.length;for(r=Array(a),i=Array(a),n=0;n<a;++n)r[n]=isNaN(i[n]=+t(e[n],n,e))?0:+o(e[n],n,e)}}return"function"!=typeof t&&(t=(0,n.default)(null==t?0:+t)),a.initialize=function(t){e=t,u()},a.strength=function(t){return arguments.length?(o="function"==typeof t?t:(0,n.default)(+t),u(),a):o},a.x=function(e){return arguments.length?(t="function"==typeof e?e:(0,n.default)(+e),u(),a):t},a}],52048),t.s(["forceY",0,function(t){var e,r,i,o=(0,n.default)(.1);function a(t){for(var n,o=0,a=e.length;o<a;++o)n=e[o],n.vy+=(i[o]-n.y)*r[o]*t}function u(){if(e){var n,a=e.length;for(r=Array(a),i=Array(a),n=0;n<a;++n)r[n]=isNaN(i[n]=+t(e[n],n,e))?0:+o(e[n],n,e)}}return"function"!=typeof t&&(t=(0,n.default)(null==t?0:+t)),a.initialize=function(t){e=t,u()},a.strength=function(t){return arguments.length?(o="function"==typeof t?t:(0,n.default)(+t),u(),a):o},a.y=function(e){return arguments.length?(t="function"==typeof e?e:(0,n.default)(+e),u(),a):t},a}],47560)},50768,t=>{"use strict";function n(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var i,o,a,u,s,l,f,c,h,p=t._root,d={data:r},v=t._x0,y=t._y0,g=t._x1,_=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((l=n>=(o=(v+g)/2))?v=o:g=o,(f=e>=(a=(y+_)/2))?y=a:_=a,i=p,!(p=p[c=f<<1|l]))return i[c]=d,t;if(u=+t._x.call(null,p.data),s=+t._y.call(null,p.data),n===u&&e===s)return d.next=p,i?i[c]=d:t._root=d,t;do i=i?i[c]=[,,,,]:t._root=[,,,,],(l=n>=(o=(v+g)/2))?v=o:g=o,(f=e>=(a=(y+_)/2))?y=a:_=a;while((c=f<<1|l)==(h=(s>=a)<<1|u>=o))return i[h]=p,i[c]=d,t}function e(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i}function r(t){return t[0]}function i(t){return t[1]}function o(t,n,e){var o=new a(null==n?r:n,null==e?i:e,NaN,NaN,NaN,NaN);return null==t?o:o.addAll(t)}function a(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function u(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var s=o.prototype=a.prototype;s.copy=function(){var t,n,e=new a(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=u(r),e;for(t=[{source:r,target:e._root=[,,,,]}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=[,,,,]}):r.target[i]=u(n));return e},s.add=function(t){let e=+this._x.call(null,t),r=+this._y.call(null,t);return n(this.cover(e,r),e,r,t)},s.addAll=function(t){var e,r,i,o,a=t.length,u=Array(a),s=Array(a),l=1/0,f=1/0,c=-1/0,h=-1/0;for(r=0;r<a;++r)!(isNaN(i=+this._x.call(null,e=t[r]))||isNaN(o=+this._y.call(null,e)))&&(u[r]=i,s[r]=o,i<l&&(l=i),i>c&&(c=i),o<f&&(f=o),o>h&&(h=o));if(l>c||f>h)return this;for(this.cover(l,f).cover(c,h),r=0;r<a;++r)n(this,u[r],s[r],t[r]);return this},s.cover=function(t,n){if(isNaN(t*=1)||isNaN(n*=1))return this;var e=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(e))i=(e=Math.floor(t))+1,o=(r=Math.floor(n))+1;else{for(var a,u,s=i-e||1,l=this._root;e>t||t>=i||r>n||n>=o;)switch(u=(n<r)<<1|t<e,(a=[,,,,])[u]=l,l=a,s*=2,u){case 0:i=e+s,o=r+s;break;case 1:e=i-s,o=r+s;break;case 2:i=e+s,r=o-s;break;case 3:e=i-s,r=o-s}this._root&&this._root.length&&(this._root=l)}return this._x0=e,this._y0=r,this._x1=i,this._y1=o,this},s.data=function(){var t=[];return this.visit(function(n){if(!n.length)do t.push(n.data);while(n=n.next)}),t},s.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},s.find=function(t,n,r){var i,o,a,u,s,l,f,c=this._x0,h=this._y0,p=this._x1,d=this._y1,v=[],y=this._root;for(y&&v.push(new e(y,c,h,p,d)),null==r?r=1/0:(c=t-r,h=n-r,p=t+r,d=n+r,r*=r);l=v.pop();)if((y=l.node)&&!((o=l.x0)>p)&&!((a=l.y0)>d)&&!((u=l.x1)<c)&&!((s=l.y1)<h))if(y.length){var g=(o+u)/2,_=(a+s)/2;v.push(new e(y[3],g,_,u,s),new e(y[2],o,_,g,s),new e(y[1],g,a,u,_),new e(y[0],o,a,g,_)),(f=(n>=_)<<1|t>=g)&&(l=v[v.length-1],v[v.length-1]=v[v.length-1-f],v[v.length-1-f]=l)}else{var m=t-this._x.call(null,y.data),x=n-this._y.call(null,y.data),w=m*m+x*x;if(w<r){var b=Math.sqrt(r=w);c=t-b,h=n-b,p=t+b,d=n+b,i=y.data}}return i},s.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var n,e,r,i,o,a,u,s,l,f,c,h,p=this._root,d=this._x0,v=this._y0,y=this._x1,g=this._y1;if(!p)return this;if(p.length)for(;;){if((l=o>=(u=(d+y)/2))?d=u:y=u,(f=a>=(s=(v+g)/2))?v=s:g=s,n=p,!(p=p[c=f<<1|l]))return this;if(!p.length)break;(n[c+1&3]||n[c+2&3]||n[c+3&3])&&(e=n,h=c)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return((i=p.next)&&delete p.next,r)?i?r.next=i:delete r.next:n?(i?n[c]=i:delete n[c],(p=n[0]||n[1]||n[2]||n[3])&&p===(n[3]||n[2]||n[1]||n[0])&&!p.length&&(e?e[h]=p:this._root=p)):this._root=i,this},s.removeAll=function(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this},s.root=function(){return this._root},s.size=function(){var t=0;return this.visit(function(n){if(!n.length)do++t;while(n=n.next)}),t},s.visit=function(t){var n,r,i,o,a,u,s=[],l=this._root;for(l&&s.push(new e(l,this._x0,this._y0,this._x1,this._y1));n=s.pop();)if(!t(l=n.node,i=n.x0,o=n.y0,a=n.x1,u=n.y1)&&l.length){var f=(i+a)/2,c=(o+u)/2;(r=l[3])&&s.push(new e(r,f,c,a,u)),(r=l[2])&&s.push(new e(r,i,c,f,u)),(r=l[1])&&s.push(new e(r,f,o,a,c)),(r=l[0])&&s.push(new e(r,i,o,f,c))}return this},s.visitAfter=function(t){var n,r=[],i=[];for(this._root&&r.push(new e(this._root,this._x0,this._y0,this._x1,this._y1));n=r.pop();){var o=n.node;if(o.length){var a,u=n.x0,s=n.y0,l=n.x1,f=n.y1,c=(u+l)/2,h=(s+f)/2;(a=o[0])&&r.push(new e(a,u,s,c,h)),(a=o[1])&&r.push(new e(a,c,s,l,h)),(a=o[2])&&r.push(new e(a,u,h,c,f)),(a=o[3])&&r.push(new e(a,c,h,l,f))}i.push(n)}for(;n=i.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this},s.x=function(t){return arguments.length?(this._x=t,this):this._x},s.y=function(t){return arguments.length?(this._y=t,this):this._y},t.s(["quadtree",0,o],50768)},47716,91889,57161,48708,23685,36377,90273,561,60208,21972,7394,36755,t=>{"use strict";t.s(["Selection",()=>U,"default",()=>G,"root",()=>L],48708);var n,e={value:()=>{}};function r(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r||/[\s.]/.test(t))throw Error("illegal type: "+t);r[t]=[]}return new i(r)}function i(t){this._=t}function o(t,n,r){for(var i=0,o=t.length;i<o;++i)if(t[i].name===n){t[i]=e,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=r&&t.push({name:n,value:r}),t}function a(){}function u(t){return null==t?a:function(){return this.querySelector(t)}}function s(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function l(){return[]}function f(t){return null==t?l:function(){return this.querySelectorAll(t)}}function c(t){return function(){return this.matches(t)}}function h(t){return function(n){return n.matches(t)}}i.prototype=r.prototype={constructor:i,on:function(t,n){var e,r=this._,i=(t+"").trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");if(e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!r.hasOwnProperty(t))throw Error("unknown type: "+t);return{type:t,name:n}}),a=-1,u=i.length;if(arguments.length<2){for(;++a<u;)if((e=(t=i[a]).type)&&(e=function(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}(r[e],t.name)))return e;return}if(null!=n&&"function"!=typeof n)throw Error("invalid callback: "+n);for(;++a<u;)if(e=(t=i[a]).type)r[e]=o(r[e],t.name,n);else if(null==n)for(e in r)r[e]=o(r[e],t.name,null);return this},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new i(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(r=this._[t],o=0,e=r.length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}},t.s(["dispatch",0,r],91889),t.s(["default",0,s],57161);var p=Array.prototype.find;function d(){return this.firstElementChild}var v=Array.prototype.filter;function y(){return Array.from(this.children)}function g(t){return Array(t.length)}function _(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function m(t,n,e,r,i,o){for(var a,u=0,s=n.length,l=o.length;u<l;++u)(a=n[u])?(a.__data__=o[u],r[u]=a):e[u]=new _(t,o[u]);for(;u<s;++u)(a=n[u])&&(i[u]=a)}function x(t,n,e,r,i,o,a){var u,s,l,f=new Map,c=n.length,h=o.length,p=Array(c);for(u=0;u<c;++u)(s=n[u])&&(p[u]=l=a.call(s,s.__data__,u,n)+"",f.has(l)?i[u]=s:f.set(l,s));for(u=0;u<h;++u)l=a.call(t,o[u],u,o)+"",(s=f.get(l))?(r[u]=s,s.__data__=o[u],f.delete(l)):e[u]=new _(t,o[u]);for(u=0;u<c;++u)(s=n[u])&&f.get(p[u])===s&&(i[u]=s)}function w(t){return t.__data__}function b(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}_.prototype={constructor:_,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var N="http://www.w3.org/1999/xhtml";let M={svg:"http://www.w3.org/2000/svg",xhtml:N,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function k(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),M.hasOwnProperty(n)?{space:M[n],local:t}:t}function A(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function E(t,n){return t.style.getPropertyValue(n)||A(t).getComputedStyle(t,null).getPropertyValue(n)}function z(t){return t.trim().split(/^|\s+/)}function S(t){return t.classList||new $(t)}function $(t){this._node=t,this._names=z(t.getAttribute("class")||"")}function T(t,n){for(var e=S(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function q(t,n){for(var e=S(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function C(){this.textContent=""}function P(){this.innerHTML=""}function X(){this.nextSibling&&this.parentNode.appendChild(this)}function O(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function R(t){var n=k(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===N&&n.documentElement.namespaceURI===N?n.createElement(t):n.createElementNS(e,t)}})(n)}function Y(){return null}function I(){var t=this.parentNode;t&&t.removeChild(this)}function B(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function D(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function j(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)(e=n[r],t.type&&e.type!==t.type||e.name!==t.name)?n[++i]=e:this.removeEventListener(e.type,e.listener,e.options);++i?n.length=i:delete this.__on}}}function H(t,n,e){return function(){var r,i=this.__on,o=function(t){n.call(this,t,this.__data__)};if(i){for(var a=0,u=i.length;a<u;++a)if((r=i[a]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=e),r.value=n;return}}this.addEventListener(t.type,o,e),r={type:t.type,name:t.name,value:n,listener:o,options:e},i?i.push(r):this.__on=[r]}}function V(t,n,e){var r=A(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}$.prototype={add:function(t){0>this._names.indexOf(t)&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var L=[null];function U(t,n){this._groups=t,this._parents=n}function K(){return new U([[document.documentElement]],L)}U.prototype=K.prototype={constructor:U,select:function(t){"function"!=typeof t&&(t=u(t));for(var n=this._groups,e=n.length,r=Array(e),i=0;i<e;++i)for(var o,a,s=n[i],l=s.length,f=r[i]=Array(l),c=0;c<l;++c)(o=s[c])&&(a=t.call(o,o.__data__,c,s))&&("__data__"in o&&(a.__data__=o.__data__),f[c]=a);return new U(r,this._parents)},selectAll:function(t){if("function"==typeof t){var n;n=t,t=function(){return s(n.apply(this,arguments))}}else t=f(t);for(var e=this._groups,r=e.length,i=[],o=[],a=0;a<r;++a)for(var u,l=e[a],c=l.length,h=0;h<c;++h)(u=l[h])&&(i.push(t.call(u,u.__data__,h,l)),o.push(u));return new U(i,o)},selectChild:function(t){var n;return this.select(null==t?d:(n="function"==typeof t?t:h(t),function(){return p.call(this.children,n)}))},selectChildren:function(t){var n;return this.selectAll(null==t?y:(n="function"==typeof t?t:h(t),function(){return v.call(this.children,n)}))},filter:function(t){"function"!=typeof t&&(t=c(t));for(var n=this._groups,e=n.length,r=Array(e),i=0;i<e;++i)for(var o,a=n[i],u=a.length,s=r[i]=[],l=0;l<u;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&s.push(o);return new U(r,this._parents)},data:function(t,n){if(!arguments.length)return Array.from(this,w);var e=n?x:m,r=this._parents,i=this._groups;"function"!=typeof t&&(_=t,t=function(){return _});for(var o=i.length,a=Array(o),u=Array(o),s=Array(o),l=0;l<o;++l){var f=r[l],c=i[l],h=c.length,p="object"==typeof(g=t.call(f,f&&f.__data__,l,r))&&"length"in g?g:Array.from(g),d=p.length,v=u[l]=Array(d),y=a[l]=Array(d);e(f,c,v,y,s[l]=Array(h),p,n);for(var g,_,b,N,M=0,k=0;M<d;++M)if(b=v[M]){for(M>=k&&(k=M+1);!(N=y[k])&&++k<d;);b._next=N||null}}return(a=new U(a,r))._enter=u,a._exit=s,a},enter:function(){return new U(this._enter||this._groups.map(g),this._parents)},exit:function(){return new U(this._exit||this._groups.map(g),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=n&&(i=n(i))&&(i=i.selection()),null==e?o.remove():e(o),r&&i?r.merge(i).order():i},merge:function(t){for(var n=t.selection?t.selection():t,e=this._groups,r=n._groups,i=e.length,o=r.length,a=Math.min(i,o),u=Array(i),s=0;s<a;++s)for(var l,f=e[s],c=r[s],h=f.length,p=u[s]=Array(h),d=0;d<h;++d)(l=f[d]||c[d])&&(p[d]=l);for(;s<i;++s)u[s]=e[s];return new U(u,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=b);for(var e=this._groups,r=e.length,i=Array(r),o=0;o<r;++o){for(var a,u=e[o],s=u.length,l=i[o]=Array(s),f=0;f<s;++f)(a=u[f])&&(l[f]=a);l.sort(n)}return new U(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let t=0;for(let n of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],a=0,u=o.length;a<u;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,n){var e=k(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof n?e.local?function(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}:function(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}:e.local?function(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}:function(t,n){return function(){this.setAttribute(t,n)}})(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):E(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=z(t+"");if(arguments.length<2){for(var r=S(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?function(t,n){return function(){(n.apply(this,arguments)?T:q)(this,t)}}:n?function(t){return function(){T(this,t)}}:function(t){return function(){q(this,t)}})(e,n))},text:function(t){return arguments.length?this.each(null==t?C:("function"==typeof t?function(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?P:("function"==typeof t?function(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(X)},lower:function(){return this.each(O)},append:function(t){var n="function"==typeof t?t:R(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},insert:function(t,n){var e="function"==typeof t?t:R(t),r=null==n?Y:"function"==typeof n?n:u(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(I)},clone:function(t){return this.select(t?D:B)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=(t+"").trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}),a=o.length;if(arguments.length<2){var u=this.node().__on;if(u){for(var s,l=0,f=u.length;l<f;++l)for(r=0,s=u[l];r<a;++r)if((i=o[r]).type===s.type&&i.name===s.name)return s.value}return}for(u=n?H:j,r=0;r<a;++r)this.each(u(o[r],n,e));return this},dispatch:function(t,n){return this.each(("function"==typeof n?function(t,n){return function(){return V(this,t,n.apply(this,arguments))}}:function(t,n){return function(){return V(this,t,n)}})(t,n))},[Symbol.iterator]:function*(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r,i=t[n],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};let G=K;function W(t){return"string"==typeof t?new U([[document.querySelector(t)]],[document.documentElement]):new U([[t]],L)}t.s(["select",0,W],23685);let F={capture:!0,passive:!1};function Q(t){t.preventDefault(),t.stopImmediatePropagation()}function J(t){var n=t.document.documentElement,e=W(t).on("dragstart.drag",Q,F);"onselectstart"in n?e.on("selectstart.drag",Q,F):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function Z(t,n){var e=t.document.documentElement,r=W(t).on("dragstart.drag",null);n&&(r.on("click.drag",Q,F),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in e?r.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}function tt(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function tn(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function te(){}t.s(["default",0,Q,"nonpassive",0,{passive:!1},"nonpassivecapture",0,F,"nopropagation",0,function(t){t.stopImmediatePropagation()}],36377),t.s(["default",0,J,"yesdrag",0,Z],90273);var tr="\\s*([+-]?\\d+)\\s*",ti="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",to="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ta=/^#([0-9a-f]{3,8})$/,tu=RegExp(`^rgb\\(${tr},${tr},${tr}\\)$`),ts=RegExp(`^rgb\\(${to},${to},${to}\\)$`),tl=RegExp(`^rgba\\(${tr},${tr},${tr},${ti}\\)$`),tf=RegExp(`^rgba\\(${to},${to},${to},${ti}\\)$`),tc=RegExp(`^hsl\\(${ti},${to},${to}\\)$`),th=RegExp(`^hsla\\(${ti},${to},${to},${ti}\\)$`),tp={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function td(){return this.rgb().formatHex()}function tv(){return this.rgb().formatRgb()}function ty(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=ta.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?tg(n):3===e?new tx(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?t_(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?t_(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=tu.exec(t))?new tx(n[1],n[2],n[3],1):(n=ts.exec(t))?new tx(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=tl.exec(t))?t_(n[1],n[2],n[3],n[4]):(n=tf.exec(t))?t_(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=tc.exec(t))?tA(n[1],n[2]/100,n[3]/100,1):(n=th.exec(t))?tA(n[1],n[2]/100,n[3]/100,n[4]):tp.hasOwnProperty(t)?tg(tp[t]):"transparent"===t?new tx(NaN,NaN,NaN,0):null}function tg(t){return new tx(t>>16&255,t>>8&255,255&t,1)}function t_(t,n,e,r){return r<=0&&(t=n=e=NaN),new tx(t,n,e,r)}function tm(t,n,e,r){var i;return 1==arguments.length?((i=t)instanceof te||(i=ty(i)),i)?new tx((i=i.rgb()).r,i.g,i.b,i.opacity):new tx:new tx(t,n,e,null==r?1:r)}function tx(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function tw(){return`#${tk(this.r)}${tk(this.g)}${tk(this.b)}`}function tb(){let t=tN(this.opacity);return`${1===t?"rgb(":"rgba("}${tM(this.r)}, ${tM(this.g)}, ${tM(this.b)}${1===t?")":`, ${t})`}`}function tN(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function tM(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function tk(t){return((t=tM(t))<16?"0":"")+t.toString(16)}function tA(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new tz(t,n,e,r)}function tE(t){if(t instanceof tz)return new tz(t.h,t.s,t.l,t.opacity);if(t instanceof te||(t=ty(t)),!t)return new tz;if(t instanceof tz)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,s=(o+i)/2;return u?(a=n===o?(e-r)/u+(e<r)*6:e===o?(r-n)/u+2:(n-e)/u+4,u/=s<.5?o+i:2-o-i,a*=60):u=s>0&&s<1?0:a,new tz(a,u,s,t.opacity)}function tz(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function tS(t){return(t=(t||0)%360)<0?t+360:t}function t$(t){return Math.max(0,Math.min(1,t||0))}function tT(t,n,e){return(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)*255}function tq(t,n,e,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*n+(4-6*o+3*a)*e+(1+3*t+3*o-3*a)*r+a*i)/6}tt(te,ty,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:td,formatHex:td,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return tE(this).formatHsl()},formatRgb:tv,toString:tv}),tt(tx,tm,tn(te,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new tx(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new tx(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new tx(tM(this.r),tM(this.g),tM(this.b),tN(this.opacity))},displayable(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:tw,formatHex:tw,formatHex8:function(){return`#${tk(this.r)}${tk(this.g)}${tk(this.b)}${tk((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:tb,toString:tb})),tt(tz,function(t,n,e,r){return 1==arguments.length?tE(t):new tz(t,n,e,null==r?1:r)},tn(te,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new tz(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new tz(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new tx(tT(t>=240?t-240:t+120,i,r),tT(t,i,r),tT(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new tz(tS(this.h),t$(this.s),t$(this.l),tN(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=tN(this.opacity);return`${1===t?"hsl(":"hsla("}${tS(this.h)}, ${100*t$(this.s)}%, ${100*t$(this.l)}%${1===t?")":`, ${t})`}`}}));let tC=t=>()=>t;function tP(t,n){var e=n-t;return e?function(n){return t+n*e}:tC(isNaN(t)?n:t)}let tX=function t(n){var e,r=1==(e=+n)?tP:function(t,n){var r,i,o;return n-t?(r=t,i=n,r=Math.pow(r,o=e),i=Math.pow(i,o)-r,o=1/o,function(t){return Math.pow(r+t*i,o)}):tC(isNaN(t)?n:t)};function i(t,n){var e=r((t=tm(t)).r,(n=tm(n)).r),i=r(t.g,n.g),o=r(t.b,n.b),a=tP(t.opacity,n.opacity);return function(n){return t.r=e(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+""}}return i.gamma=t,i}(1);function tO(t){return function(n){var e,r,i=n.length,o=Array(i),a=Array(i),u=Array(i);for(e=0;e<i;++e)r=tm(n[e]),o[e]=r.r||0,a[e]=r.g||0,u[e]=r.b||0;return o=t(o),a=t(a),u=t(u),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=u(t),r+""}}}function tR(t,n){return t*=1,n*=1,function(e){return t*(1-e)+n*e}}tO(function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=r<n-1?t[r+2]:2*o-i;return tq((e-r/n)*n,a,i,o,u)}}),tO(function(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),i=t[(r+n-1)%n],o=t[r%n],a=t[(r+1)%n],u=t[(r+2)%n];return tq((e-r/n)*n,i,o,a,u)}});var tY=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tI=RegExp(tY.source,"g");function tB(t,n){if(t=function(t){let n;for(;n=t.sourceEvent;)t=n;return t}(t),void 0===n&&(n=t.currentTarget),n){var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(n.getScreenCTM().inverse())).x,r.y]}if(n.getBoundingClientRect){var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}}return[t.pageX,t.pageY]}t.s(["pointer",0,tB],561);var tD,tj,tH=0,tV=0,tL=0,tU=0,tK=0,tG=0,tW="object"==typeof performance&&performance.now?performance:Date,tF="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function tQ(){return tK||(tF(tJ),tK=tW.now()+tG)}function tJ(){tK=0}function tZ(){this._call=this._time=this._next=null}function t0(t,n,e){var r=new tZ;return r.restart(t,n,e),r}function t1(){tK=(tU=tW.now())+tG,tH=tV=0;try{tQ(),++tH;for(var t,n=tD;n;)(t=tK-n._time)>=0&&n._call.call(void 0,t),n=n._next;--tH}finally{tH=0,function(){for(var t,n,e=tD,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:tD=n);tj=t,t5(r)}(),tK=0}}function t2(){var t=tW.now(),n=t-tU;n>1e3&&(tG-=n,tU=t)}function t5(t){!tH&&(tV&&(tV=clearTimeout(tV)),t-tK>24?(t<1/0&&(tV=setTimeout(t1,t-tW.now()-tG)),tL&&(tL=clearInterval(tL))):(tL||(tU=tW.now(),tL=setInterval(t2,1e3)),tH=1,tF(t1)))}function t3(t,n,e){var r=new tZ;return n=null==n?0:+n,r.restart(e=>{r.stop(),t(e+n)},n,e),r}tZ.prototype=t0.prototype={constructor:tZ,restart:function(t,n,e){if("function"!=typeof t)throw TypeError("callback is not a function");e=(null==e?tQ():+e)+(null==n?0:+n),this._next||tj===this||(tj?tj._next=this:tD=this,tj=this),this._call=t,this._time=e,t5()},stop:function(){this._call&&(this._call=null,this._time=1/0,t5())}},t.s(["Timer",0,tZ,"now",0,tQ,"timer",0,t0],60208);var t8=r("start","end","cancel","interrupt"),t6=[];function t4(t,n,e,r,i,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(s){var l,f,c,h;if(1!==e.state)return u();for(l in i)if((h=i[l]).name===e.name){if(3===h.state)return t3(o);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[l]):+l<n&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[l])}if(t3(function(){3===e.state&&(e.state=4,e.timer.restart(a,e.delay,e.time),a(s))}),e.state=2,e.on.call("start",t,t.__data__,e.index,e.group),2===e.state){for(e.state=3,r=Array(c=e.tween.length),l=0,f=-1;l<c;++l)(h=e.tween[l].value.call(t,t.__data__,e.index,e.group))&&(r[++f]=h);r.length=f+1}}function a(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(u),e.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===e.state&&(e.on.call("end",t,t.__data__,e.index,e.group),u())}function u(){for(var r in e.state=6,e.timer.stop(),delete i[n],i)return;delete t.__transition}i[n]=e,e.timer=t0(function(t){e.state=1,e.timer.restart(o,e.delay,e.time),e.delay<=t&&o(t-e.delay)},0,e.time)}(t,e,{name:n,index:r,group:i,on:t8,tween:t6,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function t9(t,n){var e=nt(t,n);if(e.state>0)throw Error("too late; already scheduled");return e}function t7(t,n){var e=nt(t,n);if(e.state>3)throw Error("too late; already running");return e}function nt(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw Error("transition not found");return e}function nn(t,n){var e,r,i,o=t.__transition,a=!0;if(o){for(i in n=null==n?null:n+"",o){if((e=o[i]).name!==n){a=!1;continue}r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[i]}a&&delete t.__transition}}var ne=180/Math.PI,nr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ni(t,n,e,r,i,o){var a,u,s;return(a=Math.sqrt(t*t+n*n))&&(t/=a,n/=a),(s=t*e+n*r)&&(e-=t*s,r-=n*s),(u=Math.sqrt(e*e+r*r))&&(e/=u,r/=u,s/=u),t*r<n*e&&(t=-t,n=-n,s=-s,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*ne,skewX:Math.atan(s)*ne,scaleX:a,scaleY:u}}function no(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var u,s,l,f,c=[],h=[];return o=t(o),a=t(a),!function(t,r,i,o,a,u){if(t!==i||r!==o){var s=a.push("translate(",null,n,null,e);u.push({i:s-4,x:tR(t,i)},{i:s-2,x:tR(r,o)})}else(i||o)&&a.push("translate("+i+n+o+e)}(o.translateX,o.translateY,a.translateX,a.translateY,c,h),u=o.rotate,s=a.rotate,u!==s?(u-s>180?s+=360:s-u>180&&(u+=360),h.push({i:c.push(i(c)+"rotate(",null,r)-2,x:tR(u,s)})):s&&c.push(i(c)+"rotate("+s+r),l=o.skewX,f=a.skewX,l!==f?h.push({i:c.push(i(c)+"skewX(",null,r)-2,x:tR(l,f)}):f&&c.push(i(c)+"skewX("+f+r),!function(t,n,e,r,o,a){if(t!==e||n!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:tR(t,e)},{i:u-2,x:tR(n,r)})}else(1!==e||1!==r)&&o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,c,h),o=a=null,function(t){for(var n,e=-1,r=h.length;++e<r;)c[(n=h[e]).i]=n.x(t);return c.join("")}}}var na=no(function(t){let n=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return n.isIdentity?nr:ni(n.a,n.b,n.c,n.d,n.e,n.f)},"px, ","px)","deg)"),nu=no(function(t){return null==t?nr:(n||(n=document.createElementNS("http://www.w3.org/2000/svg","g")),n.setAttribute("transform",t),t=n.transform.baseVal.consolidate())?ni((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):nr},", ",")",")");function ns(t,n,e){var r=t._id;return t.each(function(){var t=t7(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)}),function(t){return nt(t,r).value[n]}}function nl(t,n){var e;return("number"==typeof n?tR:n instanceof ty?tX:(e=ty(n))?(n=e,tX):function(t,n){var e,r,i,o,a,u=tY.lastIndex=tI.lastIndex=0,s=-1,l=[],f=[];for(t+="",n+="";(i=tY.exec(t))&&(o=tI.exec(n));)(a=o.index)>u&&(a=n.slice(u,a),l[s]?l[s]+=a:l[++s]=a),(i=i[0])===(o=o[0])?l[s]?l[s]+=o:l[++s]=o:(l[++s]=null,f.push({i:s,x:tR(i,o)})),u=tI.lastIndex;return u<n.length&&(a=n.slice(u),l[s]?l[s]+=a:l[++s]=a),l.length<2?f[0]?(e=f[0].x,function(t){return e(t)+""}):(r=n,function(){return r}):(n=f.length,function(t){for(var e,r=0;r<n;++r)l[(e=f[r]).i]=e.x(t);return l.join("")})})(t,n)}var nf=G.prototype.constructor;function nc(t){return function(){this.style.removeProperty(t)}}var nh=0;function np(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}var nd=G.prototype;function nv(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}np.prototype=(function(t){return G().transition(t)}).prototype={constructor:np,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=u(t));for(var r=this._groups,i=r.length,o=Array(i),a=0;a<i;++a)for(var s,l,f=r[a],c=f.length,h=o[a]=Array(c),p=0;p<c;++p)(s=f[p])&&(l=t.call(s,s.__data__,p,f))&&("__data__"in s&&(l.__data__=s.__data__),h[p]=l,t4(h[p],n,e,p,h,nt(s,e)));return new np(o,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=f(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var s,l=r[u],c=l.length,h=0;h<c;++h)if(s=l[h]){for(var p,d=t.call(s,s.__data__,h,l),v=nt(s,e),y=0,g=d.length;y<g;++y)(p=d[y])&&t4(p,n,e,y,d,v);o.push(d),a.push(s)}return new np(o,a,n,e)},selectChild:nd.selectChild,selectChildren:nd.selectChildren,filter:function(t){"function"!=typeof t&&(t=c(t));for(var n=this._groups,e=n.length,r=Array(e),i=0;i<e;++i)for(var o,a=n[i],u=a.length,s=r[i]=[],l=0;l<u;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&s.push(o);return new np(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw Error();for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=Array(r),u=0;u<o;++u)for(var s,l=n[u],f=e[u],c=l.length,h=a[u]=Array(c),p=0;p<c;++p)(s=l[p]||f[p])&&(h[p]=s);for(;u<r;++u)a[u]=n[u];return new np(a,this._parents,this._name,this._id)},selection:function(){return new nf(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=++nh,r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],s=u.length,l=0;l<s;++l)if(a=u[l]){var f=nt(a,n);t4(a,t,e,l,u,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new np(r,this._parents,t,e)},call:nd.call,nodes:nd.nodes,node:nd.node,size:nd.size,empty:nd.empty,each:nd.each,on:function(t,n){var e,r,i,o,a,u,s=this._id;return arguments.length<2?nt(this.node(),s).on.on(t):this.each((e=s,r=t,i=n,u=(r+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t})?t9:t7,function(){var t=u(this,e),n=t.on;n!==o&&(a=(o=n).copy()).on(r,i),t.on=a}))},attr:function(t,n){var e=k(t),r="transform"===e?nu:nl;return this.attrTween(t,"function"==typeof n?(e.local?function(t,n,e){var r,i,o;return function(){var a,u,s=e(this);return null==s?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local))===(u=s+"")?null:a===r&&u===i?o:(i=u,o=n(r=a,s))}}:function(t,n,e){var r,i,o;return function(){var a,u,s=e(this);return null==s?void this.removeAttribute(t):(a=this.getAttribute(t))===(u=s+"")?null:a===r&&u===i?o:(i=u,o=n(r=a,s))}})(e,r,ns(this,"attr."+t,n)):null==n?(e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(e):(e.local?function(t,n,e){var r,i,o=e+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=n(r=a,e)}}:function(t,n,e){var r,i,o=e+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=n(r=a,e)}})(e,r,n))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw Error();var r=k(t);return this.tween(e,(r.local?function(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(n){this.setAttributeNS(t.space,t.local,i.call(this,n))}),e}return i._value=n,i}:function(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(n){this.setAttribute(t,i.call(this,n))}),e}return i._value=n,i})(r,n))},style:function(t,n,e){var r,i,o,a,u,s,l,f,c,h,p,d,v,y,g,_,m,x,w,b,N,M="transform"==(t+="")?na:nl;return null==n?this.styleTween(t,(r=t,function(){var t=E(this,r),n=(this.style.removeProperty(r),E(this,r));return t===n?null:t===i&&n===o?a:a=M(i=t,o=n)})).on("end.style."+t,nc(t)):"function"==typeof n?this.styleTween(t,(u=t,s=ns(this,"style."+t,n),function(){var t=E(this,u),n=s(this),e=n+"";return null==n&&(this.style.removeProperty(u),e=n=E(this,u)),t===e?null:t===l&&e===f?c:(f=e,c=M(l=t,n))})).each((h=this._id,m="end."+(_="style."+(p=t)),function(){var t=t7(this,h),n=t.on,e=null==t.value[_]?g||(g=nc(p)):void 0;(n!==d||y!==e)&&(v=(d=n).copy()).on(m,y=e),t.on=v})):this.styleTween(t,(x=t,N=n+"",function(){var t=E(this,x);return t===N?null:t===w?b:b=M(w=t,n)}),e).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw Error();return this.tween(r,function(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&function(n){this.style.setProperty(t,o.call(this,n),e)}),r}return o._value=n,o}(t,n,null==e?"":e))},text:function(t){var n,e;return this.tween("text","function"==typeof t?(n=ns(this,"text",t),function(){var t=n(this);this.textContent=null==t?"":t}):(e=null==t?"":t+"",function(){this.textContent=e}))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw Error();return this.tween(n,function(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&function(t){this.textContent=r.call(this,t)}),n}return r._value=t,r}(t))},remove:function(){var t;return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}))},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=nt(this.node(),e).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?function(t,n){var e,r;return function(){var i=t7(this,t),o=i.tween;if(o!==e){r=e=o;for(var a=0,u=r.length;a<u;++a)if(r[a].name===n){(r=r.slice()).splice(a,1);break}}i.tween=r}}:function(t,n,e){var r,i;if("function"!=typeof e)throw Error();return function(){var o=t7(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:n,value:e},s=0,l=i.length;s<l;++s)if(i[s].name===n){i[s]=u;break}s===l&&i.push(u)}o.tween=i}})(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?function(t,n){return function(){t9(this,t).delay=+n.apply(this,arguments)}}:function(t,n){return n*=1,function(){t9(this,t).delay=n}})(n,t)):nt(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?function(t,n){return function(){t7(this,t).duration=+n.apply(this,arguments)}}:function(t,n){return n*=1,function(){t7(this,t).duration=n}})(n,t)):nt(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(function(t,n){if("function"!=typeof n)throw Error();return function(){t7(this,t).ease=n}}(n,t)):nt(this.node(),n).ease},easeVarying:function(t){var n;if("function"!=typeof t)throw Error();return this.each((n=this._id,function(){var e=t.apply(this,arguments);if("function"!=typeof e)throw Error();t7(this,n).ease=e}))},end:function(){var t,n,e=this,r=e._id,i=e.size();return new Promise(function(o,a){var u={value:a},s={value:function(){0==--i&&o()}};e.each(function(){var e=t7(this,r),i=e.on;i!==t&&((n=(t=i).copy())._.cancel.push(u),n._.interrupt.push(u),n._.end.push(s)),e.on=n}),0===i&&o()})},[Symbol.iterator]:nd[Symbol.iterator]},t.s(["cubicInOut",0,nv,"cubicOut",0,function(t){return--t*t*t+1}],21972);var ny={time:null,delay:0,duration:250,ease:nv};G.prototype.interrupt=function(t){return this.each(function(){nn(this,t)})},G.prototype.transition=function(t){var n,e;t instanceof np?(n=t._id,t=t._name):(n=++nh,(e=ny).time=tQ(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],s=u.length,l=0;l<s;++l)(a=u[l])&&t4(a,t,n,l,u,e||function(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))throw Error(`transition ${n} not found`);return e}(a,n));return new np(r,this._parents,t,n)};let{abs:ng,max:n_,min:nm}=Math;function nx(t){return{type:t}}function nw(t){return((t=Math.exp(t))+1/t)/2}["w","e"].map(nx),["n","s"].map(nx),["n","w","e","s","nw","ne","sw","se"].map(nx);let nb=function t(n,e,r){function i(t,i){var o,a,u=t[0],s=t[1],l=t[2],f=i[0],c=i[1],h=i[2],p=f-u,d=c-s,v=p*p+d*d;if(v<1e-12)a=Math.log(h/l)/n,o=function(t){return[u+t*p,s+t*d,l*Math.exp(n*t*a)]};else{var y=Math.sqrt(v),g=(h*h-l*l+r*v)/(2*l*e*y),_=(h*h-l*l-r*v)/(2*h*e*y),m=Math.log(Math.sqrt(g*g+1)-g);a=(Math.log(Math.sqrt(_*_+1)-_)-m)/n,o=function(t){var r,i,o=t*a,f=nw(m),c=l/(e*y)*(f*(((r=Math.exp(2*(r=n*o+m)))-1)/(r+1))-((i=Math.exp(i=m))-1/i)/2);return[u+c*p,s+c*d,l*f/nw(n*o+m)]}}return o.duration=1e3*a*n/Math.SQRT2,o}return i.rho=function(n){var e=Math.max(.001,+n),r=e*e;return t(e,r,r*r)},i}(Math.SQRT2,2,4),nN=t=>()=>t;function nM(t,{sourceEvent:n,target:e,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function nk(t,n,e){this.k=t,this.x=n,this.y=e}nk.prototype={constructor:nk,scale:function(t){return 1===t?this:new nk(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new nk(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var nA=new nk(1,0,0);function nE(t){for(;!t.__zoom;)if(!(t=t.parentNode))return nA;return t.__zoom}function nz(t){t.stopImmediatePropagation()}function nS(t){t.preventDefault(),t.stopImmediatePropagation()}function n$(t){return(!t.ctrlKey||"wheel"===t.type)&&!t.button}function nT(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function nq(){return this.__zoom||nA}function nC(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function nP(){return navigator.maxTouchPoints||"ontouchstart"in this}function nX(t,n,e){var r=t.invertX(n[0][0])-e[0][0],i=t.invertX(n[1][0])-e[1][0],o=t.invertY(n[0][1])-e[0][1],a=t.invertY(n[1][1])-e[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}nE.prototype=nk.prototype,t.s(["Transform",0,nk,"default",0,nE,"identity",0,nA],7394),t.s(["default",0,function(){var t,n,e,i=n$,o=nT,a=nX,u=nC,s=nP,l=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],c=250,h=nb,p=r("start","zoom","end"),d=0,v=10;function y(t){t.property("__zoom",nq).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",k).filter(s).on("touchstart.zoom",A).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(t,n){return(n=Math.max(l[0],Math.min(l[1],n)))===t.k?t:new nk(n,t.x,t.y)}function _(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new nk(t.k,r,i)}function m(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function x(t,n,e,r){t.on("start.zoom",function(){w(this,arguments).event(r).start()}).on("interrupt.zoom end.zoom",function(){w(this,arguments).event(r).end()}).tween("zoom",function(){var t=arguments,i=w(this,t).event(r),a=o.apply(this,t),u=null==e?m(a):"function"==typeof e?e.apply(this,t):e,s=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),l=this.__zoom,f="function"==typeof n?n.apply(this,t):n,c=h(l.invert(u).concat(s/l.k),f.invert(u).concat(s/f.k));return function(t){if(1===t)t=f;else{var n=c(t),e=s/n[2];t=new nk(e,u[0]-n[0]*e,u[1]-n[1]*e)}i.zoom(null,t)}})}function w(t,n,e){return!e&&t.__zooming||new b(t,n)}function b(t,n){this.that=t,this.args=n,this.active=0,this.sourceEvent=null,this.extent=o.apply(t,n),this.taps=0}function N(t,...n){if(i.apply(this,arguments)){var e=w(this,n).event(t),r=this.__zoom,o=Math.max(l[0],Math.min(l[1],r.k*Math.pow(2,u.apply(this,arguments)))),s=tB(t);if(e.wheel)(e.mouse[0][0]!==s[0]||e.mouse[0][1]!==s[1])&&(e.mouse[1]=r.invert(e.mouse[0]=s)),clearTimeout(e.wheel);else{if(r.k===o)return;e.mouse=[s,r.invert(s)],nn(this),e.start()}nS(t),e.wheel=setTimeout(function(){e.wheel=null,e.end()},150),e.zoom("mouse",a(_(g(r,o),e.mouse[0],e.mouse[1]),e.extent,f))}}function M(t,...n){if(!e&&i.apply(this,arguments)){var r=t.currentTarget,o=w(this,n,!0).event(t),u=W(t.view).on("mousemove.zoom",function(t){if(nS(t),!o.moved){var n=t.clientX-l,e=t.clientY-c;o.moved=n*n+e*e>d}o.event(t).zoom("mouse",a(_(o.that.__zoom,o.mouse[0]=tB(t,r),o.mouse[1]),o.extent,f))},!0).on("mouseup.zoom",function(t){u.on("mousemove.zoom mouseup.zoom",null),Z(t.view,o.moved),nS(t),o.event(t).end()},!0),s=tB(t,r),l=t.clientX,c=t.clientY;J(t.view),nz(t),o.mouse=[s,this.__zoom.invert(s)],nn(this),o.start()}}function k(t,...n){if(i.apply(this,arguments)){var e=this.__zoom,r=tB(t.changedTouches?t.changedTouches[0]:t,this),u=e.invert(r),s=e.k*(t.shiftKey?.5:2),l=a(_(g(e,s),r,u),o.apply(this,n),f);nS(t),c>0?W(this).transition().duration(c).call(x,l,r,t):W(this).call(y.transform,l,r,t)}}function A(e,...r){if(i.apply(this,arguments)){var o,a,u,s,l=e.touches,f=l.length,c=w(this,r,e.changedTouches.length===f).event(e);for(nz(e),a=0;a<f;++a)s=[s=tB(u=l[a],this),this.__zoom.invert(s),u.identifier],c.touch0?c.touch1||c.touch0[2]===s[2]||(c.touch1=s,c.taps=0):(c.touch0=s,o=!0,c.taps=1+!!t);t&&(t=clearTimeout(t)),o&&(c.taps<2&&(n=s[0],t=setTimeout(function(){t=null},500)),nn(this),c.start())}}function E(t,...n){if(this.__zooming){var e,r,i,o,u=w(this,n).event(t),s=t.changedTouches,l=s.length;for(nS(t),e=0;e<l;++e)i=tB(r=s[e],this),u.touch0&&u.touch0[2]===r.identifier?u.touch0[0]=i:u.touch1&&u.touch1[2]===r.identifier&&(u.touch1[0]=i);if(r=u.that.__zoom,u.touch1){var c=u.touch0[0],h=u.touch0[1],p=u.touch1[0],d=u.touch1[1],v=(v=p[0]-c[0])*v+(v=p[1]-c[1])*v,y=(y=d[0]-h[0])*y+(y=d[1]-h[1])*y;r=g(r,Math.sqrt(v/y)),i=[(c[0]+p[0])/2,(c[1]+p[1])/2],o=[(h[0]+d[0])/2,(h[1]+d[1])/2]}else{if(!u.touch0)return;i=u.touch0[0],o=u.touch0[1]}u.zoom("touch",a(_(r,i,o),u.extent,f))}}function z(t,...r){if(this.__zooming){var i,o,a=w(this,r).event(t),u=t.changedTouches,s=u.length;for(nz(t),e&&clearTimeout(e),e=setTimeout(function(){e=null},500),i=0;i<s;++i)o=u[i],a.touch0&&a.touch0[2]===o.identifier?delete a.touch0:a.touch1&&a.touch1[2]===o.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(o=tB(o,this),Math.hypot(n[0]-o[0],n[1]-o[1])<v)){var l=W(this).on("dblclick.zoom");l&&l.apply(this,arguments)}}}return y.transform=function(t,n,e,r){var i=t.selection?t.selection():t;i.property("__zoom",nq),t!==i?x(t,n,e,r):i.interrupt().each(function(){w(this,arguments).event(r).start().zoom(null,"function"==typeof n?n.apply(this,arguments):n).end()})},y.scaleBy=function(t,n,e,r){y.scaleTo(t,function(){var t=this.__zoom.k,e="function"==typeof n?n.apply(this,arguments):n;return t*e},e,r)},y.scaleTo=function(t,n,e,r){y.transform(t,function(){var t=o.apply(this,arguments),r=this.__zoom,i=null==e?m(t):"function"==typeof e?e.apply(this,arguments):e,u=r.invert(i),s="function"==typeof n?n.apply(this,arguments):n;return a(_(g(r,s),i,u),t,f)},e,r)},y.translateBy=function(t,n,e,r){y.transform(t,function(){return a(this.__zoom.translate("function"==typeof n?n.apply(this,arguments):n,"function"==typeof e?e.apply(this,arguments):e),o.apply(this,arguments),f)},null,r)},y.translateTo=function(t,n,e,r,i){y.transform(t,function(){var t=o.apply(this,arguments),i=this.__zoom,u=null==r?m(t):"function"==typeof r?r.apply(this,arguments):r;return a(nA.translate(u[0],u[1]).scale(i.k).translate("function"==typeof n?-n.apply(this,arguments):-n,"function"==typeof e?-e.apply(this,arguments):-e),t,f)},r,i)},b.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,n){return this.mouse&&"mouse"!==t&&(this.mouse[1]=n.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=n.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=n.invert(this.touch1[0])),this.that.__zoom=n,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var n=W(this.that).datum();p.call(t,this.that,new nM(t,{sourceEvent:this.sourceEvent,target:y,type:t,transform:this.that.__zoom,dispatch:p}),n)}},y.wheelDelta=function(t){return arguments.length?(u="function"==typeof t?t:nN(+t),y):u},y.filter=function(t){return arguments.length?(i="function"==typeof t?t:nN(!!t),y):i},y.touchable=function(t){return arguments.length?(s="function"==typeof t?t:nN(!!t),y):s},y.extent=function(t){return arguments.length?(o="function"==typeof t?t:nN([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),y):o},y.scaleExtent=function(t){return arguments.length?(l[0]=+t[0],l[1]=+t[1],y):[l[0],l[1]]},y.translateExtent=function(t){return arguments.length?(f[0][0]=+t[0][0],f[1][0]=+t[1][0],f[0][1]=+t[0][1],f[1][1]=+t[1][1],y):[[f[0][0],f[0][1]],[f[1][0],f[1][1]]]},y.constrain=function(t){return arguments.length?(a=t,y):a},y.duration=function(t){return arguments.length?(c=+t,y):c},y.interpolate=function(t){return arguments.length?(h=t,y):h},y.on=function(){var t=p.on.apply(p,arguments);return t===p?y:t},y.clickDistance=function(t){return arguments.length?(d=(t*=1)*t,y):Math.sqrt(d)},y.tapDistance=function(t){return arguments.length?(v=+t,y):v},y}],36755),t.s([],47716)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,2776,e=>{"use strict";var t=e.i(43476),n=e.i(15812);e.s(["default",0,function({children:e}){let{userId:o,ready:i}=(0,n.useUser)();return i&&o?e:(0,t.jsx)("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#0a0a1a",color:"#fff",padding:24,textAlign:"center",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},children:i?(0,t.jsxs)("div",{style:{maxWidth:420},children:[(0,t.jsx)("div",{style:{fontSize:18,fontWeight:700,marginBottom:8},children:"Can’t reach Six Degrees’ local server"}),(0,t.jsx)("div",{style:{color:"#888",fontSize:14,lineHeight:1.6},children:"The page loaded but the app behind it is not answering. If you started it from a terminal, check that window for an error, then reload this page."})]}):(0,t.jsx)("div",{style:{fontSize:18,fontWeight:600},children:"Loading…"})})}])},8819,e=>{"use strict";var t=e.i(43476);let n="1px solid rgba(255,255,255,0.1)";function o({children:e,style:n}){return(0,t.jsx)("div",{style:{fontSize:13.5,color:"#8b9a9a",lineHeight:1.6,marginTop:4,...n},children:e})}e.s(["Body",0,o,"Btn",0,function({children:e,onClick:o,disabled:i,primary:a,tone:s,type:r="button"}){return(0,t.jsx)("button",{type:r,onClick:o,disabled:i,style:{padding:"9px 18px",borderRadius:7,fontSize:13.5,fontWeight:650,color:i?"#667":"#fff",border:n,background:i?"rgba(255,255,255,0.05)":"bad"===s?"rgba(255,80,80,0.15)":a?"linear-gradient(135deg, #9B59B6, #3498DB)":"rgba(255,255,255,0.08)",cursor:i?"not-allowed":"pointer"},children:e})},"FONT",0,'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',"LINE",0,n,"Mono",0,function({children:e}){return(0,t.jsx)("code",{style:{background:"rgba(255,255,255,0.08)",padding:"1px 5px",borderRadius:4,wordBreak:"break-all"},children:e})},"Section",0,function({id:e,title:i,intro:a,children:s}){return(0,t.jsxs)("section",{id:e,style:{padding:"24px 0",borderBottom:n,scrollMarginTop:16},children:[(0,t.jsx)("h2",{style:{fontSize:16,fontWeight:650,margin:"0 0 6px"},children:i}),a&&(0,t.jsx)(o,{style:{marginTop:0,marginBottom:12},children:a}),s]})},"Status",0,function({children:e,tone:n}){return(0,t.jsxs)("div",{role:"status",style:{marginTop:10,padding:"10px 14px",borderRadius:8,fontSize:13.5,lineHeight:1.6,color:"ok"===n?"#00ff88":"bad"===n?"#ff7676":"#e8e8ee",background:"ok"===n?"rgba(0,255,136,0.08)":"bad"===n?"rgba(255,80,80,0.08)":"rgba(255,255,255,0.05)",border:`1px solid ${"ok"===n?"rgba(0,255,136,0.3)":"bad"===n?"rgba(255,80,80,0.3)":"rgba(255,255,255,0.12)"}`},children:["ok"===n&&"✓ ",e]})}])},5445,e=>{"use strict";var t=e.i(43476),n=e.i(71645),o=e.i(22016),i=e.i(18566),a=e.i(2776),s=e.i(8819);function r(){let[e,o]=(0,n.useState)(null);return((0,n.useEffect)(()=>{fetch("/api/update").then(e=>e.json()).then(o).catch(()=>{})},[]),e)?e.installed?(0,t.jsx)(h,{local:e}):(0,t.jsx)(d,{local:e}):null}async function l(e){let t=await fetch("/api/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json().catch(()=>({}));return{ok:t.ok,d:n}}function d({local:e}){let[o,i]=(0,n.useState)(null),[a,r]=(0,n.useState)(null),[c,h]=(0,n.useState)(null),[p,u]=(0,n.useState)(null);async function y(e){r(e),h(null);try{let{ok:t,d:n}=await l({action:e});if(!t){h(n.error||"Something went wrong."),n.dirty&&i({dirty:n.dirty});return}"check"===e?i(n):(u(n),i(null))}catch(e){h(e.message)}finally{r(null)}}return(0,n.useEffect)(()=>{"updates"===new URLSearchParams(window.location.search).get("check")&&(document.getElementById("updates")?.scrollIntoView({block:"center"}),y("check"),window.history.replaceState(null,"",window.location.pathname))},[]),(0,t.jsxs)(s.Section,{id:"updates",title:"Updates",children:[p?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(s.Body,{children:["Updated to ",(0,t.jsx)(s.Mono,{children:p.sha})," — “",p.subject,"”."]}),(0,t.jsx)(s.Body,{style:{color:p.needsRestart?"#FFD700":void 0},children:p.needsRestart?"Stop the app in your terminal and start it again — this update changed how it starts.":"The page will pick up most changes on its own. Restart the app if anything looks odd."})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(s.Body,{children:["You are on ",(0,t.jsx)(s.Mono,{children:e.sha})," — “",e.subject,"”."]}),o&&0===o.behind&&(0,t.jsx)(s.Status,{tone:"ok",children:"You’re up to date."}),o&&o.behind>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(s.Body,{style:{color:"#00ff88"},children:[o.behind," update",1===o.behind?"":"s"," available."]}),(0,t.jsx)("pre",{style:x,children:o.commits.join("\n")})]}),o?.dirty?.length>0&&(0,t.jsxs)(s.Body,{children:["Changed files here:"," ",(0,t.jsx)(s.Mono,{children:o.dirty.join(", ")}),". Commit or discard them first — this will not throw away your work."]}),(0,t.jsxs)(f,{children:[(0,t.jsx)(s.Btn,{onClick:()=>y("check"),disabled:!!a,children:"check"===a?"Checking…":"Check for updates"}),o?.behind>0&&(0,t.jsx)(s.Btn,{onClick:()=>y("pull"),disabled:!!a,primary:!0,children:"pull"===a?"Updating…":`Install ${o.behind} update${1===o.behind?"":"s"}`})]})]}),c&&(0,t.jsx)(s.Body,{style:{color:"#ff7676"},children:c}),(0,t.jsxs)(s.Body,{style:{fontSize:12,color:"#667",marginTop:12},children:["Nothing is checked automatically and nothing about you is sent — this runs the same ",(0,t.jsx)(s.Mono,{children:"git fetch"})," and ",(0,t.jsx)(s.Mono,{children:"git pull"})," you would type yourself."]})]})}let c=["checking","downloading","verifying","preparing","restarting"];function h({local:e}){let o="mac-app"===e.kind,[i,a]=(0,n.useState)(!1),[r,d]=(0,n.useState)(null),[m,b]=(0,n.useState)(null),[j,w]=(0,n.useState)(!1),[k,S]=(0,n.useState)(null),[v,B]=(0,n.useState)(e.job||null),[T,C]=(0,n.useState)(!1),[D,I]=(0,n.useState)(null),[$,F]=(0,n.useState)(null),[M,R]=(0,n.useState)(void 0),[z,E]=(0,n.useState)(0),[L,N]=(0,n.useState)(!1),A=!!(v&&c.includes(v.phase)),O=A&&("restarting"===v.phase||z>0);async function U(){a(!0),d(null),b(null),I(null),F(null),R(void 0),B(e=>e&&c.includes(e.phase)?e:null);try{let{ok:e,d:t}=await l({action:"check-release"});e?(d(t),S(new Date)):b(t.error||"Could not check.")}catch(e){b(e.message)}finally{a(!1)}}async function W(){C(!0),I(null),F(null),R(void 0),E(0),N(!1);try{let{ok:e,d:t}=await l({action:"install-release"});t.job&&B(t.job),!e&&(I(t.error||"The update could not start."),F(t.refusal||null),"fallback"in t&&R(t.fallback))}catch(e){I(e.message)}finally{C(!1)}}async function Y(){try{let{d:e}=await l({action:"cancel-install"});e.job&&B(e.job)}catch{}}async function P(){try{await navigator.clipboard.writeText(e.command),w(!0),setTimeout(()=>w(!1),1600)}catch{b("Could not copy — select the line and copy it by hand.")}}(0,n.useEffect)(()=>{"#updates"===window.location.hash&&document.getElementById("updates")?.scrollIntoView({block:"start"}),"updates"!==new URLSearchParams(window.location.search).get("check")||(window.history.replaceState(null,"",window.location.pathname),e.job&&c.includes(e.job.phase)||(document.getElementById("updates")?.scrollIntoView({block:"center"}),U().then(()=>document.getElementById("updates")?.scrollIntoView({block:"end",behavior:"smooth"}))))},[e.job]),(0,n.useEffect)(()=>{if(!A)return;let e=!0,t=setTimeout(async()=>{try{if(O){let t=await fetch("/api/update",{cache:"no-store"}),n=await t.json();if(!e)return;if(!n.job||n.job.id!==v.id)return void window.location.reload();E(0),B(n.job)}else{let{ok:t,d:n}=await l({action:"update-status"});e&&t&&n.job&&B(n.job)}}catch{e&&E(e=>e+1)}},O?1500:600);return()=>{e=!1,clearTimeout(t)}},[v,z,A,O]),(0,n.useEffect)(()=>{if(!O)return;let e=setTimeout(()=>N(!0),6e4);return()=>clearTimeout(e)},[O]);let H=v?.phase==="failed",V=o&&r?.install?.possible,G=H&&"stale-check"===v.code||"not-checked"===$,K=void 0!==M?M:r?.fallback,_=r?.newer&&(!o||K)&&(!V||H||D||e.lastUpdate?.tone==="bad"),q=function({mac:e,kind:t,canInstall:n,fallback:o}){if(!e)return"source"===t?"A copy built from the source code updates by fetching the code and building it again, which it can't do while it runs. Stop it (Ctrl-C), then run this in the six-degrees folder. Your network stays where it is.":"This copy runs inside the terminal that started it, so it can't replace itself while it runs. Stop it first (Ctrl-C), then run this to start the newest version. Your network stays where it is.";if(!o)return null;let i=o.dataDir?` It opens the new version on the usual data folder, not on ${o.dataDir}: to use that one, quit it and open it again with --data-dir, as you opened this one.`:"";return"replace"===o.mode?`${n?"Or paste this into Terminal.":"Paste this into Terminal instead."} It closes this app, puts the new version in its place and opens it. Your network stays where it is.${i}`:`${n?"Or copy":"Copy"} this line, quit Six Degrees, then paste it into Terminal. It installs the new version at ${o.installsTo}, not where this copy is, and opens it: use that one from then on. Your network stays where it is.${i}`}({mac:o,kind:e.kind,canInstall:V,fallback:K});return(0,t.jsxs)(s.Section,{id:"updates",title:"Updates",children:[e.lastUpdate&&!A&&(0,t.jsx)(y,{report:e.lastUpdate}),(0,t.jsxs)(s.Body,{children:["You have version ",(0,t.jsx)(s.Mono,{children:e.version}),"."]}),A?(0,t.jsx)(u,{job:v,restarting:O,slow:L,onCancel:Y}):(0,t.jsxs)(t.Fragment,{children:[H&&(0,t.jsxs)(s.Status,{tone:"bad",children:[(0,t.jsx)("strong",{children:"The update didn’t finish."})," ",v.error," Nothing was changed."]}),v?.phase==="cancelled"&&(0,t.jsx)(s.Status,{children:"Cancelled. Nothing was changed."}),D&&(0,t.jsx)(s.Status,{tone:"bad",children:D}),r&&!r.latest&&(0,t.jsx)(s.Status,{children:"No release has been published yet."}),r?.latest&&!r.newer&&(0,t.jsxs)(s.Status,{tone:"ok",children:["You’re up to date: ",r.latest.version," is the newest version.",k&&(0,t.jsxs)("span",{style:{color:"#8b9a9a"},children:[" Checked at ",k.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"}),"."]})]}),r?.newer&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(s.Body,{style:{color:"#00ff88"},children:["Version ",r.latest.version," is available."]}),V&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(s.Body,{children:["It downloads ",r.install.size?`about ${p(r.install.size)} MB`:"the new version"," from GitHub, checks it, then closes, replaces itself and reopens. Your network isn’t touched, and a backup of it is made first."]}),(0,t.jsxs)(f,{children:[G?(0,t.jsx)(s.Btn,{onClick:U,disabled:i,primary:!0,children:i?"Checking…":"Check again"}):(0,t.jsx)(s.Btn,{onClick:W,disabled:T,primary:!0,children:T?"Starting…":H||D?"Try again":"Install and restart"}),(0,t.jsx)(g,{url:r.latest.url})]})]}),o&&!V&&r.install?.reason&&(0,t.jsx)(s.Body,{children:r.install.reason}),_&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.Body,{children:q}),e.testReleases?(0,t.jsx)("pre",{style:x,children:"Not shown in test mode: it would install the real release from GitHub into Applications."}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("pre",{style:x,children:e.command}),(0,t.jsxs)(f,{children:[(0,t.jsx)(s.Btn,{onClick:P,primary:!V,children:j?"Copied":"Copy"}),!V&&(0,t.jsx)(g,{url:r.latest.url})]})]})]}),!V&&!_&&(0,t.jsx)(f,{children:(0,t.jsx)(g,{url:r.latest.url})})]}),!r?.newer&&(0,t.jsx)(f,{children:(0,t.jsx)(s.Btn,{onClick:U,disabled:i,children:i?"Checking…":r?"Check again":"Check for updates"})})]}),m&&(0,t.jsx)(s.Body,{style:{color:"#ff7676"},children:m}),(0,t.jsxs)(s.Body,{style:{fontSize:12,color:"#667",marginTop:12},children:["Nothing is checked automatically. The button asks GitHub for the newest version number, and nothing about you is sent.",o&&" Only a second click, Install and restart, downloads the new version."]}),e.testReleases&&(0,t.jsxs)(s.Body,{style:{fontSize:12,color:"#FFD700",marginTop:6},children:["Test mode: releases are read from ",(0,t.jsx)(s.Mono,{children:e.testReleases})," on this computer, not from GitHub."]})]})}let p=e=>Math.max(1,Math.round(e/1e6));function u({job:e,restarting:n,slow:o,onCancel:i}){let a=e.total?Math.min(100,Math.round(e.received/e.total*100)):null,r=n?"Restarting… Six Degrees closes and opens again in a moment.":"checking"===e.phase?"Asking GitHub for the newest version…":"downloading"===e.phase?`Downloading ${e.version}…${null!==a?` ${a}% (${p(e.received)} of ${p(e.total)} MB)`:""}`:"verifying"===e.phase?"Checking the download…":"Preparing the new version…";return(0,t.jsxs)("div",{role:"status","aria-live":"polite",style:{marginTop:12},children:[(0,t.jsx)(s.Body,{style:{color:"#e8e8ee"},children:r}),"downloading"===e.phase&&null!==a&&(0,t.jsx)("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a,"aria-label":"Download",style:{height:6,borderRadius:3,background:"rgba(255,255,255,0.08)",marginTop:10,overflow:"hidden",maxWidth:420},children:(0,t.jsx)("div",{style:{width:`${a}%`,height:"100%",background:"linear-gradient(90deg, #9B59B6, #3498DB)",transition:"width 0.4s ease"}})}),o&&(0,t.jsx)(s.Body,{children:"This is taking longer than it should. If Six Degrees doesn’t open again by itself, open it from your Applications folder."}),!n&&(0,t.jsx)(f,{children:(0,t.jsx)(s.Btn,{onClick:i,children:"Cancel"})})]})}function y({report:e}){let n=new Date(e.at).toLocaleString([],{dateStyle:"medium",timeStyle:"short"});return(0,t.jsxs)(s.Status,{tone:"ok"===e.tone?"ok":"bad",children:[e.text," ",(0,t.jsxs)("span",{style:{color:"#8b9a9a"},children:["(",n,")"]}),"ok"===e.tone&&e.previous&&(0,t.jsxs)("span",{style:{display:"block",fontSize:12.5,color:"#8b9a9a",marginTop:4},children:["A copy of the version you had is kept in ",(0,t.jsx)(s.Mono,{children:e.previous})," until the next update. To go back to it, open that file and drag the app it gives you into your Applications folder."]})]})}function g({url:e}){return e?(0,t.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",style:{color:"#3498DB",fontSize:13.5},children:"What changed →"}):null}function f({children:e}){return(0,t.jsx)("div",{style:{display:"flex",gap:10,marginTop:12,flexWrap:"wrap",alignItems:"center"},children:e})}let x={background:"rgba(0,0,0,0.45)",border:s.LINE,borderRadius:8,padding:12,margin:"8px 0 0",fontSize:12,lineHeight:1.7,color:"#b9c6c6",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",whiteSpace:"pre-wrap",maxHeight:180,overflow:"auto"};function m(e){if(!e)return"0 KB";if(e<1048576)return`${Math.max(1,Math.round(e/1024))} KB`;let t=e/1048576;return`${t<10?t.toFixed(1):Math.round(t)} MB`}let b=e=>Number(e||0).toLocaleString("en-US"),j=(e,t,n=`${t}s`)=>`${b(e)} ${1===Number(e)?t:n}`;function w(e,t=!0){if(!e)return null;let n=new Date(e);return Number.isNaN(n.getTime())?null:n.toLocaleString(void 0,t?{dateStyle:"medium",timeStyle:"short"}:{dateStyle:"medium"})}let k={auto:"before a new version",import:"before an import",manual:"made by hand"};async function S(e,t){let n=await e.json().catch(()=>({}));if(!e.ok)throw Object.assign(Error(n.error||t),{data:n});return n}let v={display:"flex",gap:10,marginTop:12,flexWrap:"wrap",alignItems:"center"},B={fontSize:12,color:"#667",marginTop:10},T={fontSize:14,fontWeight:650,margin:"26px 0 4px",color:"#e8e8ee"},C={display:"flex",gap:8,alignItems:"flex-start",marginTop:12,fontSize:13,color:"#c8d0d0",lineHeight:1.5,cursor:"pointer"};function D({label:e,children:n}){return(0,t.jsxs)("div",{style:{display:"flex",gap:12,justifyContent:"space-between",padding:"7px 0",borderTop:s.LINE,fontSize:13.5},children:[(0,t.jsx)("span",{style:{color:"#8b9a9a"},children:e}),(0,t.jsx)("span",{style:{color:"#e8e8ee",textAlign:"right"},children:n})]})}function I(){return(0,t.jsx)("a",{href:"https://github.com/blakeb056/six-degrees#undo-an-import",target:"_blank",rel:"noreferrer",style:{color:"inherit",textDecoration:"underline"},children:"Undo an import"})}function $(){let[e,o]=(0,n.useState)(null),[i,a]=(0,n.useState)(null),[r,l]=(0,n.useState)(null),[d,c]=(0,n.useState)(null),[h,p]=(0,n.useState)(null),[u,y]=(0,n.useState)(null),[g,f]=(0,n.useState)(!0),[x,$]=(0,n.useState)(null),[F,M]=(0,n.useState)(!1),[R,z]=(0,n.useState)(!1),E=(0,n.useRef)(null),L=(0,n.useRef)(!1),N=(0,n.useCallback)(()=>fetch("/api/data",{cache:"no-store"}).then(e=>S(e,"The data folder could not be read.")).then(e=>{let t=Date.parse(e.lastImport?.appliedAt||"");o({...e,importIsRecent:Number.isFinite(t)&&Date.now()-t<864e5}),a(null)}).catch(e=>a(e.message)),[]);async function A(){c(null);try{await navigator.clipboard.writeText(e.dataDir),c({tone:"ok",text:"Copied the folder’s path."})}catch{c({tone:"bad",text:"This window can’t copy. Select the path above and copy it instead."})}}async function O(){l("reveal"),c(null);try{await S(await fetch("/api/data/reveal",{method:"POST"}),"The folder could not be opened."),c({tone:"ok",text:"darwin"===e.platform?"Opened in Finder.":"Opened in your file browser."})}catch(e){c({tone:"bad",text:e.message})}finally{l(null)}}async function U(){l("export"),p(null);try{let e,t=await fetch("/api/data/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({photos:g})});t.ok||await S(t,"The copy could not be made.");let n=await t.blob(),o=/filename="([^"]+)"/.exec(t.headers.get("content-disposition")||"")?.[1]||"Six Degrees backup.sixdegrees",i=URL.createObjectURL(n),a=document.createElement("a");a.href=i,a.download=o,a.style.position="fixed",a.style.left="-9999px",document.body.appendChild(a),a.click(),a.remove(),setTimeout(()=>URL.revokeObjectURL(i),6e4);let s=[(e=Number(t.headers.get("x-six-degrees-people")),j(e,"person","people"))];s.push(g?j(Number(t.headers.get("x-six-degrees-photos")),"photo"):"no photos"),p({tone:"ok",text:`Made “${o}” (${m(n.size)}: ${s.join(", ")}). Look for it in your Downloads folder, or wherever you chose to save it.`})}catch(e){p({tone:"bad",text:e.message})}finally{l(null)}}async function W(){if(x){l("import"),y(null);try{let t={"Content-Type":"application/octet-stream","X-Six-Degrees-Size":String(x.size)};e.people>0&&(t["X-Six-Degrees-Replace"]=String(e.people)),await S(await fetch("/api/data/import",{method:"POST",headers:t,body:x}),"The file could not be imported."),$(null),M(!1),E.current&&(E.current.value=""),await N()}catch(e){e.data?.needsConfirm&&(M(!1),await N()),y({tone:"bad",text:e.message})}finally{l(null)}}}async function Y(){l("cancel"),y(null);try{await S(await fetch("/api/data/import",{method:"DELETE"}),"The import could not be cancelled."),await N(),y({tone:"ok",text:"Cancelled. The network here stays as it is."})}catch(e){y({tone:"bad",text:e.message})}finally{l(null)}}async function P(){l("restart"),y(null);try{await S(await fetch("/api/data/restart",{method:"POST"}),"Six Degrees could not restart."),z(!0);let e=e=>new Promise(t=>setTimeout(t,e)),t=Date.now()+9e4;for(await e(2500);Date.now()<t;){try{if((await fetch("/api/data",{cache:"no-store"})).ok)return void window.location.reload()}catch{}await e(1e3)}z(!1),y({tone:"bad",text:"Six Degrees didn’t come back. Quit it and open it again: the import finishes as it starts."})}catch(e){y({tone:"bad",text:e.message})}finally{l(null)}}if((0,n.useEffect)(()=>{N()},[N]),(0,n.useEffect)(()=>{e&&!L.current&&(L.current=!0,"#data"===window.location.hash&&document.getElementById("data")?.scrollIntoView({block:"start"}))},[e]),!e)return(0,t.jsx)(s.Section,{id:"data",title:"Your data",children:i?(0,t.jsx)(s.Status,{tone:"bad",children:i}):(0,t.jsx)(s.Body,{children:"Loading…"})});let H=e.pending,V=e.photosInCopy||e.photos,G=e.backups||[],K=G.reduce((e,t)=>e+(t.bytes||0),0),_=!!(x&&x.size>e.maxImportBytes),q=e.people>0,J=e.lastImport;return(0,t.jsxs)(s.Section,{id:"data",title:"Your data",intro:"Everything Six Degrees knows about your network is in one folder on this computer.",children:[(0,t.jsx)(s.Body,{children:(0,t.jsx)(s.Mono,{children:e.dataDir})}),(0,t.jsxs)("div",{style:v,children:[(0,t.jsx)(s.Btn,{onClick:A,children:"Copy the path"}),(0,t.jsx)(s.Btn,{onClick:O,disabled:"reveal"===r,children:"reveal"===r?"Opening…":"darwin"===e.platform?"Show in Finder":"Open the folder"})]}),d&&(0,t.jsx)(s.Status,{tone:d.tone,children:d.text}),(0,t.jsxs)("div",{style:{marginTop:16,borderBottom:s.LINE},children:[(0,t.jsxs)(D,{label:"Your network",children:[j(e.people,"person","people")," · ",m(e.databaseBytes)]}),(0,t.jsx)(D,{label:"Profile photos",children:e.photos.count?`${b(e.photos.count)} \xb7 ${m(e.photos.bytes)}`:"none saved yet"}),(0,t.jsx)(D,{label:"Backups",children:G.length?`${j(G.length,"copy","copies")} \xb7 ${m(K)}`:"none yet"}),(0,t.jsx)(D,{label:"LinkedIn sign-in for scanning",children:e.linkedinSignIn?"kept here, never put in a copy":"not signed in on this computer"})]}),G.length>0&&(0,t.jsxs)("details",{style:{marginTop:10,fontSize:13,color:"#8b9a9a"},children:[(0,t.jsx)("summary",{style:{cursor:"pointer"},children:"The backups"}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr) auto auto",gap:"6px 14px",marginTop:8},children:G.map(e=>(0,t.jsxs)("div",{style:{display:"contents"},children:[(0,t.jsxs)("span",{style:{wordBreak:"break-all",color:"#c8d0d0"},children:[e.name,e.folder?"/":"",(0,t.jsxs)("span",{style:{color:"#667"},children:[" · ",e.folder?"its photos and files":k[e.kind]||e.kind]})]}),(0,t.jsx)("span",{children:w(e.modifiedAt)}),(0,t.jsx)("span",{style:{textAlign:"right"},children:m(e.bytes)})]},e.name))})]}),(0,t.jsx)(s.Body,{style:B,children:"Backups are copies of your network from before a new version or an import. The newest five from new versions are kept; copies from before an import stay until you delete them."}),(0,t.jsx)(s.Body,{style:B,children:"The folder can’t be moved from here. A database that a sync service (iCloud Drive, Dropbox) copies while it’s open can be damaged, and this folder also holds your LinkedIn sign-in, which should never be synced. To use your network on another computer, save a copy below and import it there."}),(0,t.jsx)("h3",{style:T,children:"Move your network to another computer"}),(0,t.jsx)(s.Body,{children:"Save a copy here, then on the new computer install Six Degrees, open Settings → Your data and import the copy. Sign in to LinkedIn again there before you scan: your sign-in never goes into a copy."}),(0,t.jsxs)("label",{style:C,children:[(0,t.jsx)("input",{type:"checkbox",checked:g,onChange:e=>f(e.target.checked),style:{marginTop:3}}),(0,t.jsxs)("span",{children:["Include profile photos",V.count?` (${b(V.count)}, ${m(V.bytes)})`:"",". They can’t be downloaded again without a new scan."]})]}),(0,t.jsxs)("div",{style:v,children:[(0,t.jsx)(s.Btn,{primary:!0,onClick:U,disabled:!!r||R||0===e.people,children:"export"===r?"Saving…":"Save a copy of my network"}),0===e.people&&(0,t.jsx)("span",{style:{fontSize:13,color:"#8b9a9a"},children:"There’s no network here to save yet."})]}),h&&(0,t.jsx)(s.Status,{tone:h.tone,children:h.text}),(0,t.jsx)(s.Body,{style:B,children:"The copy holds the names, headlines and photos of the people in your network. Keep it private: don’t post it or share it, and delete it once it has been imported. A network opened from a LinkedIn CSV lives only in its browser tab, so it isn’t in the copy; import the CSV again on the new computer. The Social tab’s findings, and any messages you keep there, stay on this computer and aren’t in the copy either."}),(0,t.jsx)("h3",{style:T,children:"Bring in a network from another computer"}),H?(0,t.jsxs)(s.Status,{children:[(0,t.jsx)("div",{style:{fontWeight:650},children:"An import is waiting to finish."}),(0,t.jsxs)("div",{children:["The network in the copy",H.exportedAt?` saved ${w(H.exportedAt,!1)}`:""," ","(",j(H.people,"person","people"),H.photos?`, ${j(H.photos,"photo")}`:"",H.fromVersion?`, from Six Degrees ${H.fromVersion}`:"",")",H.replacedPeople>0?` replaces the ${j(H.replacedPeople,"person","people")} here the next time Six Degrees starts. A copy of what’s here now is kept in backups first, so the import can be undone.`:" becomes the network here the next time Six Degrees starts."," ","Your LinkedIn search budget and any pause on scanning are kept."]}),H.error&&(0,t.jsxs)("div",{style:{color:"#ff7676",marginTop:6},children:["The last try stopped: ",H.error.replace(/\.$/,""),". It tries again the next time Six Degrees starts."]}),R?(0,t.jsx)("div",{style:{marginTop:8},children:"Restarting… this page comes back in a few seconds."}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:{marginTop:8},children:e.restart.how}),e.restart.command&&(0,t.jsx)("div",{style:{marginTop:6},children:(0,t.jsx)(s.Mono,{children:e.restart.command})}),(0,t.jsxs)("div",{style:v,children:[e.restart.canRestart&&(0,t.jsx)(s.Btn,{primary:!0,onClick:P,disabled:!!r,children:"restart"===r?"Restarting…":"Restart now"}),!H.started&&(0,t.jsx)(s.Btn,{onClick:Y,disabled:!!r,children:"cancel"===r?"Cancelling…":"Cancel the import"})]})]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.Body,{children:"Pick the copy you saved on the other computer (a .sixdegrees file). It replaces the network here; the two networks are never merged. Your LinkedIn search budget and any pause on scanning are kept, with the other computer’s searches added."}),(0,t.jsx)("input",{ref:E,type:"file",accept:".sixdegrees",onChange:function(e){y(null),M(!1),$(e.target.files?.[0]||null)},style:{display:"none"}}),(0,t.jsxs)("div",{style:v,children:[(0,t.jsx)(s.Btn,{onClick:()=>E.current?.click(),disabled:!!r,children:"Choose a file…"}),x&&(0,t.jsxs)("span",{style:{fontSize:13,color:"#c8d0d0",wordBreak:"break-all"},children:[x.name," · ",m(x.size)]})]}),_&&(0,t.jsxs)(s.Status,{tone:"bad",children:["That file is ",m(x.size),". This copy can import files up to ",m(e.maxImportBytes),"."]}),x&&q&&!_&&(0,t.jsxs)("label",{style:C,children:[(0,t.jsx)("input",{type:"checkbox",checked:F,onChange:e=>M(e.target.checked),style:{marginTop:3}}),(0,t.jsxs)("span",{children:["Replace the ",j(e.people,"person","people")," in this copy’s network with the network in this file. A copy of what’s here is kept in backups first. Your search budget and any pause on scanning are kept too."]})]}),(0,t.jsx)("div",{style:v,children:(0,t.jsx)(s.Btn,{primary:!0,onClick:W,disabled:!x||_||q&&!F||!!r,children:"import"===r?"Checking the file…":"Import"})})]}),u&&(0,t.jsx)(s.Status,{tone:u.tone,children:u.text}),J&&!H&&(e.importIsRecent?(0,t.jsxs)(s.Status,{tone:"ok",children:["Imported ",w(J.appliedAt),": ",j(J.people,"person","people"),J.exportedAt?` from the copy saved ${w(J.exportedAt,!1)}`:"",".",J.keptDatabase&&(0,t.jsxs)(t.Fragment,{children:[" ","What was here before is kept in ",(0,t.jsx)(s.Mono,{children:J.keptDatabase}),J.keptFiles?", with its photos and files beside it":"",".",J.keptAsIs&&" It couldn’t be read, so it was kept exactly as it was."," ","To go back to it, see ",(0,t.jsx)(I,{}),"."]})]}):(0,t.jsxs)(s.Body,{style:B,children:["Last import: ",w(J.appliedAt)," (",j(J.people,"person","people"),").",J.keptDatabase&&(0,t.jsxs)(t.Fragment,{children:[" What was here before is kept in ",(0,t.jsx)(s.Mono,{children:J.keptDatabase})," (",(0,t.jsx)(I,{}),")."]})]}))]})}var F=e.i(64745);let M={"mac-app":"the Mac app",npm:"the npm package (npx six-degrees)",source:"a copy built from the source code",git:"a git checkout of the source code"};function R(){let[e,a]=(0,n.useState)(null),[l,d]=(0,n.useState)(null),c=(0,i.useRouter)();if((0,n.useEffect)(()=>{let e=window.location.hash;("#sector"===e||"#tiers"===e)&&c.replace(`/scores${e}`)},[c]),(0,n.useEffect)(()=>{fetch("/api/settings").then(e=>e.json().then(t=>e.ok?t:Promise.reject(Error(t.error||"Could not load settings.")))).then(a).catch(e=>d(e.message))},[]),F.IS_DEMO)return(0,t.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"rgba(255,255,255,0.7)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,textAlign:"center",padding:24,fontFamily:s.FONT},children:[(0,t.jsx)("h2",{style:{margin:0,fontSize:20,fontWeight:700,color:"#fff"},children:"Not part of the demo"}),(0,t.jsx)("p",{style:{margin:0,fontSize:13},children:"The public demo includes the Network Circle and Degrees views only."}),(0,t.jsx)(o.default,{href:"/",style:{fontSize:12,color:"rgba(255,255,255,0.5)",textDecoration:"none"},children:"← Back to the network"})]});let h=e?.about;return(0,t.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"#fff",fontFamily:s.FONT},children:[(0,t.jsxs)("header",{style:{padding:"16px 24px",borderBottom:s.LINE,display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)(o.default,{href:"/",style:{display:"flex",alignItems:"center",gap:6,color:"#888",textDecoration:"none",fontSize:13,fontWeight:600,padding:"6px 14px",borderRadius:6,background:"rgba(255,255,255,0.06)",border:s.LINE},children:"← Back to Map"}),(0,t.jsx)("h1",{style:{fontSize:22,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FFD700, #9B59B6, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Settings"})]}),(0,t.jsxs)("main",{style:{maxWidth:720,margin:"0 auto",padding:"8px 24px 64px"},children:[l&&(0,t.jsx)(s.Body,{style:{color:"#ff7676",marginTop:16},children:l}),(0,t.jsx)(r,{}),(0,t.jsx)(s.Section,{id:"scoring",title:"Your field and tiers",children:(0,t.jsxs)(s.Body,{children:["They’re on the ",(0,t.jsx)(o.default,{href:"/scores",style:{color:"#3498DB"},children:"Scores"})," tab now, beside every company’s score: ",(0,t.jsx)(o.default,{href:"/scores#sector",style:{color:"#3498DB"},children:"your field"})," and"," ",(0,t.jsx)(o.default,{href:"/scores#tiers",style:{color:"#3498DB"},children:"how tiers are graded"}),"."]})}),(0,t.jsx)($,{}),(0,t.jsx)(s.Section,{id:"about",title:"About this copy",children:h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(s.Body,{children:["Version ",(0,t.jsx)(s.Mono,{children:h.version}),", running as ",M[h.kind]||h.kind,"."]}),(0,t.jsxs)(s.Body,{children:["Your network is kept in ",(0,t.jsx)(s.Mono,{children:h.dataDir}),h.customDataDir?" (a folder you chose).":".","mac-app"===h.kind&&" Help → Show the Data Folder opens it."]}),(0,t.jsx)(s.Body,{style:{fontSize:12,color:"#667",marginTop:10},children:"Settings are saved with your network, on this computer. Nothing here is sent anywhere."})]}):!l&&(0,t.jsx)(s.Body,{children:"Loading…"})})]})]})}e.s(["default",0,function(){return(0,t.jsx)(a.default,{children:(0,t.jsx)(R,{})})}],5445)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94657,e=>{"use strict";var t=e.i(43476),n=e.i(71645),r=e.i(7837);let o=e=>`${e.name} ${e.was} → ${e.estimated?"estimated":e.now}`,i=e=>({padding:"6px 12px",borderRadius:7,cursor:"pointer",fontSize:12,fontWeight:700,border:e?"none":"1px solid rgba(255,255,255,0.15)",background:e?"linear-gradient(135deg, #00ff88, #3498DB)":"transparent",color:e?"#000":"#cfd8d8"});function s({onAnswered:e}){var a;let l,c,[d,u]=(0,n.useState)(null),[p,h]=(0,n.useState)(!1),[g,f]=(0,n.useState)(()=>new Set),[y,m]=(0,n.useState)(!1),[b,x]=(0,n.useState)(null);if((0,n.useEffect)(()=>{if((0,r.csvNetworkSource)())return;let e=!1;return fetch("/api/company-scores/legacy").then(e=>e.json()).then(t=>{!e&&t.offer?.companies?.length&&(u(t.offer),f(new Set(t.offer.companies.map(e=>e.name))))}).catch(()=>{}),()=>{e=!0}},[]),!d)return null;let w=async t=>{m(!0),x(null);try{let n=await fetch("/api/company-scores/legacy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keep:t})}),r=await n.json();if(!n.ok&&!r.kept)throw Error(r.error||"Could not save your answer.");u(null),e?.({kept:r.kept||[],scored:r.scored||0,error:n.ok?null:r.error})}catch(e){x(e.message)}finally{m(!1)}};return(0,t.jsxs)("section",{"aria-label":"Built-in scores changed",style:{marginBottom:14,padding:14,borderRadius:10,border:"1px solid rgba(255,215,0,0.35)",background:"rgba(255,215,0,0.06)",fontSize:12.5,color:"#cfd8d8",lineHeight:1.6},children:[(0,t.jsx)("b",{style:{color:"#fff"},children:"Built-in scores changed in this version:"})," ",(l=(a=d.companies).slice(0,3).map(o).join(", "),(c=a.length-3)>0?`${l} and ${c} more`:l),"."," ","Keep any of the old ones as your own?",(0,t.jsx)("div",{style:{marginTop:4,color:"#8b9a9a"},children:"The built-in list now holds only companies most professionals would recognise, scored the same for everyone; anything else is estimated from your network. A score you keep is yours, like one you set below, and Auto hands it back."}),p&&(0,t.jsx)("ul",{style:{listStyle:"none",padding:0,margin:"10px 0 0",display:"grid",gap:4},children:d.companies.map(e=>(0,t.jsx)("li",{children:(0,t.jsxs)("label",{style:{display:"flex",gap:8,alignItems:"baseline",cursor:"pointer"},children:[(0,t.jsx)("input",{type:"checkbox",checked:g.has(e.name),disabled:y,onChange:()=>{let t;return t=e.name,f(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})}}),(0,t.jsxs)("span",{children:[(0,t.jsx)("b",{style:{color:"#fff"},children:e.name})," ",e.was," → ",e.estimated?`estimated (${e.now})`:e.now,(0,t.jsxs)("span",{style:{color:"#778"},children:[` \xb7 ${e.people} ${1===e.people?"person":"people"} there now`,e.names.length>1&&` \xb7 for ${e.names.join(", ")}`]})]})]})},e.name))}),(0,t.jsxs)("div",{style:{display:"flex",gap:8,marginTop:10,flexWrap:"wrap"},children:[p?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{disabled:y||!g.size,onClick:()=>w([...g]),style:{...i(!0),opacity:y||!g.size?.5:1},children:["Keep ",g.size," ",1===g.size?"score":"scores"]}),(0,t.jsx)("button",{disabled:y,onClick:()=>h(!1),style:i(!1),children:"Back"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{disabled:y,onClick:()=>w(d.companies.map(e=>e.name)),style:i(!0),children:"Keep all"}),(0,t.jsx)("button",{disabled:y,onClick:()=>h(!0),style:i(!1),children:"Choose…"})]}),(0,t.jsx)("button",{disabled:y,onClick:()=>w([]),style:i(!1),children:"No thanks"})]}),b&&(0,t.jsx)("div",{role:"alert",style:{marginTop:8,color:"#e74c3c"},children:b})]})}let a="1px solid rgba(255,255,255,0.1)",l={yours:{label:"your score",color:"#00ff88"},known:{label:"known list",color:"#3498DB"},data:{label:"public data",color:"#1abc9c"},network:{label:"estimated: many of your people",color:"#FF6B35"},default:{label:"unknown company",color:"#778"}};async function c(){let e=await fetch("/api/company-scores"),t=await e.json();if(!e.ok)throw Error(t.error||"Could not load company scores");return t.companies}function d(){let[e,t]=(0,n.useState)(null),[r,o]=(0,n.useState)(null);return(0,n.useEffect)(()=>{let e=!1;return c().then(n=>{e||t(n)}).catch(t=>{e||o(t.message)}),()=>{e=!0}},[]),{companies:e,error:r,setScore:(0,n.useCallback)(async(e,n)=>{let r=await fetch("/api/company-scores",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,score:n})}),o=await r.json();if(!r.ok)throw Error(o.error||"Could not save");return t(await c()),o},[]),reload:(0,n.useCallback)(async()=>t(await c()),[])}}function u({company:e,onSet:r,compact:o}){let[i,s]=(0,n.useState)(!1),l=async t=>{s(!0);try{await r(e.name,"auto"===t?null:Number(t))}finally{s(!1)}};return(0,t.jsxs)("select",{disabled:i,value:"yours"===e.source?String(e.score):"auto",onChange:e=>l(e.target.value),title:"Set this company's score. Auto uses the known list or an estimate.",style:{padding:o?"2px 4px":"4px 6px",borderRadius:6,border:a,background:"#11131c",color:"#dfe6e9",fontSize:12},children:[(0,t.jsxs)("option",{value:"auto",children:["Auto (","yours"===e.source?e.suggested??"est.":e.score,")"]}),[10,9,8,7,6,5,4,3,2,1].map(e=>(0,t.jsx)("option",{value:e,children:e},e))]})}e.s(["ScorePicker",0,u,"default",0,function({onRescored:e,version:r=0}){let{companies:o,error:i,setScore:c,reload:p}=d();(0,n.useEffect)(()=>{r&&p().catch(()=>{})},[r,p]);let[h,g]=(0,n.useState)(""),[f,y]=(0,n.useState)("all"),[m,b]=(0,n.useState)(150),[x,w]=(0,n.useState)(null),S=e=>{w(e),setTimeout(()=>w(null),3500)},k=async(t,n)=>{let r=await c(t,n);S(`${t}: ${null==n?"back to auto":`set to ${n}`} \xb7 rescored ${r.scored} people`),e?.()},v=async({kept:t,scored:n,error:r})=>{if(!t.length)return S("Keeping the new built-in scores.");S(r||`Kept ${t.length} old ${1===t.length?"score":"scores"} as your own \xb7 rescored ${n} people`),await p().catch(()=>{}),e?.()},j=(0,n.useMemo)(()=>{if(!o)return[];let e=h.trim().toLowerCase();return o.filter(t=>(!e||t.name.toLowerCase().includes(e))&&("all"===f||t.source===f))},[o,h,f]);if(i)return(0,t.jsx)("div",{style:{padding:24,color:"#e74c3c"},children:i});if(!o)return(0,t.jsx)("div",{style:{padding:24,color:"#778"},children:"Loading companies…"});let C=e=>o.filter(t=>t.source===e).length;return(0,t.jsxs)("div",{style:{flex:1,overflow:"auto",padding:16},children:[(0,t.jsxs)("div",{style:{maxWidth:980,margin:"0 auto"},children:[(0,t.jsx)(s,{onAnswered:v}),(0,t.jsxs)("div",{style:{padding:14,borderRadius:10,border:a,background:"rgba(255,255,255,0.03)",fontSize:12.5,color:"#cfd8d8",lineHeight:1.6},children:[(0,t.jsx)("b",{style:{color:"#fff"},children:"How a power score works."})," power = ",(0,t.jsx)("b",{children:"title"})," × ",(0,t.jsx)("b",{children:"company weight"})," + bonus. The title (student 1 … founder or C-suite 10) comes from someone’s roles, with former roles at 70%; an audience of their own counts like a title (1M+ followers like a director). The company weight runs from 0.725 for a company we don’t know (or none found), the middle of the scale, to 1.0 (a company scored 10), so seniority counts for more at a bigger company. The bonus is at most +1.5, for investor, YC, an audience in the millions or the top award of any field, and counts half at an unknown company. A 1st-degree person whose circle is unusually strong gets up to +2 more: up to +1 for a high share of it at A or S, or +1 for every 25 people there. Tiers are graded on your network’s curve unless you choose the fixed scale (",(0,t.jsx)("a",{href:"#tiers",style:{color:"#3498DB"},children:"Tiers"}),", above): your top 3% are S, the next 12% A, the next 25% B (it only lifts, and never lifts anyone under 4 into S or A). On the fixed scale, S ≥ 7.5 · A ≥ 5.5 · B ≥ 4 · C ≥ 2.5.",(0,t.jsxs)("div",{style:{marginTop:6,color:"#8b9a9a"},children:["So a VP at a 10 scores 9.0, a founder at an unknown company 7.3, a director at an unknown company 5.4, and an intern at a 10 scores 2.0. Set a company’s score below and everyone there is rescored. Companies in the sectors you pick (",(0,t.jsx)("a",{href:"#sector",style:{color:"#3498DB"},children:"Your sector"}),", above) get +1 or +2; a score you set is never changed."]})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",margin:"14px 0 10px"},children:[(0,t.jsx)("input",{value:h,onChange:e=>g(e.target.value),placeholder:"Find a company",style:{padding:"6px 10px",borderRadius:7,border:a,background:"rgba(255,255,255,0.05)",color:"#fff",fontSize:13,minWidth:180}}),[["all",`All ${o.length}`],["known",`Known list ${C("known")}`],["data",`Public data ${C("data")}`],["yours",`Yours ${C("yours")}`],["network",`Estimated ${C("network")}`],["default",`Unknown ${C("default")}`]].map(([e,n])=>(0,t.jsx)("button",{onClick:()=>y(e),style:{padding:"5px 10px",borderRadius:7,border:a,cursor:"pointer",fontSize:11.5,fontWeight:600,background:f===e?"rgba(52,152,219,0.25)":"transparent",color:f===e?"#cfe6f7":"#8b9a9a"},children:n},e))]}),(0,t.jsxs)("div",{style:{borderRadius:10,border:a,overflow:"hidden"},children:[(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 70px 70px 70px 60px 180px 110px",gap:8,padding:"8px 12px",fontSize:10.5,letterSpacing:.6,color:"#8b9a9a",background:"rgba(255,255,255,0.04)"},children:[(0,t.jsx)("span",{children:"COMPANY"}),(0,t.jsx)("span",{style:{textAlign:"right"},children:"PEOPLE"}),(0,t.jsx)("span",{style:{textAlign:"right"},children:"YOU KNOW"}),(0,t.jsx)("span",{style:{textAlign:"right"},children:"DIRECTOR+"}),(0,t.jsx)("span",{style:{textAlign:"right"},children:"SCORE"}),(0,t.jsx)("span",{children:"SOURCE"}),(0,t.jsx)("span",{children:"SET"})]}),j.slice(0,m).map(e=>(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 70px 70px 70px 60px 180px 110px",gap:8,padding:"7px 12px",alignItems:"center",borderTop:"1px solid rgba(255,255,255,0.05)",fontSize:12.5},children:[(0,t.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0},children:[(0,t.jsx)("span",{title:`${e.industry.label} (inferred)`,style:{width:8,height:8,borderRadius:"50%",background:e.industry.color,flexShrink:0}}),(0,t.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name})]}),(0,t.jsx)("span",{style:{textAlign:"right"},children:e.people}),(0,t.jsx)("span",{style:{textAlign:"right",color:e.d1?"#00ff88":"#556"},children:e.d1}),(0,t.jsx)("span",{style:{textAlign:"right",color:e.senior?"#FFD700":"#556"},children:e.senior}),(0,t.jsx)("b",{style:{textAlign:"right",fontSize:15},children:e.score}),(0,t.jsxs)("span",{style:{fontSize:11,color:l[e.source]?.color},children:[l[e.source]?.label,e.sectorBonus>0&&(0,t.jsxs)("span",{style:{color:"#00ff88"},children:[" + ",e.sectorBonus," your sector"]})]}),(0,t.jsx)(u,{company:e,onSet:k,compact:!0})]},e.name))]}),j.length>m&&(0,t.jsxs)("button",{onClick:()=>b(e=>e+300),style:{marginTop:10,padding:"7px 14px",borderRadius:8,border:a,background:"rgba(255,255,255,0.05)",color:"#dfe6e9",cursor:"pointer",fontSize:12},children:["Show more (",j.length-m," left)"]})]}),x&&(0,t.jsx)("div",{role:"status",style:{position:"fixed",bottom:24,left:"50%",transform:"translateX(-50%)",padding:"10px 18px",borderRadius:24,background:"linear-gradient(135deg, #00ff88, #3498DB)",color:"#000",fontWeight:800,fontSize:13,zIndex:50},children:x})]})},"useCompanyScores",0,d],94657)},2776,e=>{"use strict";var t=e.i(43476),n=e.i(15812);e.s(["default",0,function({children:e}){let{userId:r,ready:o}=(0,n.useUser)();return o&&r?e:(0,t.jsx)("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#0a0a1a",color:"#fff",padding:24,textAlign:"center",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},children:o?(0,t.jsxs)("div",{style:{maxWidth:420},children:[(0,t.jsx)("div",{style:{fontSize:18,fontWeight:700,marginBottom:8},children:"Can’t reach Six Degrees’ local server"}),(0,t.jsx)("div",{style:{color:"#888",fontSize:14,lineHeight:1.6},children:"The page loaded but the app behind it is not answering. If you started it from a terminal, check that window for an error, then reload this page."})]}):(0,t.jsx)("div",{style:{fontSize:18,fontWeight:600},children:"Loading…"})})}])},8819,e=>{"use strict";var t=e.i(43476);let n="1px solid rgba(255,255,255,0.1)";function r({children:e,style:n}){return(0,t.jsx)("div",{style:{fontSize:13.5,color:"#8b9a9a",lineHeight:1.6,marginTop:4,...n},children:e})}e.s(["Body",0,r,"Btn",0,function({children:e,onClick:r,disabled:o,primary:i,tone:s,type:a="button"}){return(0,t.jsx)("button",{type:a,onClick:r,disabled:o,style:{padding:"9px 18px",borderRadius:7,fontSize:13.5,fontWeight:650,color:o?"#667":"#fff",border:n,background:o?"rgba(255,255,255,0.05)":"bad"===s?"rgba(255,80,80,0.15)":i?"linear-gradient(135deg, #9B59B6, #3498DB)":"rgba(255,255,255,0.08)",cursor:o?"not-allowed":"pointer"},children:e})},"FONT",0,'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',"LINE",0,n,"Mono",0,function({children:e}){return(0,t.jsx)("code",{style:{background:"rgba(255,255,255,0.08)",padding:"1px 5px",borderRadius:4,wordBreak:"break-all"},children:e})},"Section",0,function({id:e,title:o,intro:i,children:s}){return(0,t.jsxs)("section",{id:e,style:{padding:"24px 0",borderBottom:n,scrollMarginTop:16},children:[(0,t.jsx)("h2",{style:{fontSize:16,fontWeight:650,margin:"0 0 6px"},children:o}),i&&(0,t.jsx)(r,{style:{marginTop:0,marginBottom:12},children:i}),s]})},"Status",0,function({children:e,tone:n}){return(0,t.jsxs)("div",{role:"status",style:{marginTop:10,padding:"10px 14px",borderRadius:8,fontSize:13.5,lineHeight:1.6,color:"ok"===n?"#00ff88":"bad"===n?"#ff7676":"#e8e8ee",background:"ok"===n?"rgba(0,255,136,0.08)":"bad"===n?"rgba(255,80,80,0.08)":"rgba(255,255,255,0.05)",border:`1px solid ${"ok"===n?"rgba(0,255,136,0.3)":"bad"===n?"rgba(255,80,80,0.3)":"rgba(255,255,255,0.12)"}`},children:["ok"===n&&"✓ ",e]})}])},98083,e=>{"use strict";var t=e.i(43476),n=e.i(71645),r=e.i(22016),o=e.i(2776),i=e.i(8819),s=e.i(98197),a=e.i(44944),l=e.i(77170),c=e.i(69083),d=e.i(90179),u=e.i(5258),p=e.i(7837),h=e.i(56899);let g={lean:"Lean",strong:"Strong"},f=["wheel","touchstart","keydown","pointerdown"],y={1:"1st",2:"2nd",3:"3rd"},m=(e,t,n=`${t}s`)=>`${e.toLocaleString()} ${1===e?t:n}`,b=l.DIRECTORY.filter(e=>"function"===e.kind).map(e=>e.label);function x(e,t,n){let[r,o]=n?["moved","moved"]:["moves","move"];if(!e&&!t)return n?"No one changed tier.":"No one changes tier.";let i=e=>1===e?r:o;return e&&t?`${m(e,"person","people")} ${i(e)} up a tier and ${t.toLocaleString()} ${i(t)} down.`:e?`${m(e,"person","people")} ${i(e)} up a tier.`:`${m(t,"person","people")} ${i(t)} down a tier.`}function w({onSaved:e}={}){let[r,o]=(0,n.useState)(null),[l,u]=(0,n.useState)(null),[y,k]=(0,n.useState)(null),[v,j]=(0,n.useState)(!1),[C,T]=(0,n.useState)(null),[B,I]=(0,n.useState)(null),[$,A]=(0,n.useState)({loading:!0}),[R]=(0,n.useState)(()=>(0,p.csvNetworkSource)()),E=(0,n.useRef)(null),z=(0,n.useRef)(0),F=(0,n.useRef)(!1);function N(e){u(e),T(null),clearTimeout(E.current);let t=++z.current;if((0,a.sameFocus)(e,r))return void k(null);let n=(0,a.focusFingerprint)(e);k({key:n,loading:!0}),E.current=setTimeout(async()=>{try{let r=await fetch("/api/settings/sector-preview",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sectorFocus:e})}),o=await r.json();if(t!==z.current)return;k(r.ok?{key:n,...o}:{key:n,error:o.error||"Could not work out what would change."})}catch{t===z.current&&k({key:n,error:"Could not reach the app to work out what would change."})}},250)}async function D(){var t,n;let r;j(!0),T(null),clearTimeout(E.current),z.current++;let i=await (0,h.saveSettings)({sectorFocus:l});(j(!1),i.settings&&(o(i.settings.sectorFocus),u(i.settings.sectorFocus),k(null)),i.error)?T({tone:"bad",text:i.error}):(T({tone:"ok",text:(t=i.settings.sectorFocus,n=i.effects?.sectorFocus,r=t.sectors.length?`Saved: ${t.sectors.map(e=>(0,c.sectorByKey)(e).label).join(" · ")} (${g[t.strength].toLowerCase()}).`:"Saved: no sector.",n?n.scored?`${r} Rescored your network (${m(n.people??n.scored,"person","people")}). ${x(n.up,n.down,!0)}`:`${r} There's no scanned network yet; it will apply when you scan.`:r)}),e?.())}(0,n.useEffect)(()=>{let e=!1;return fetch("/api/settings").then(e=>e.json().then(t=>e.ok?t:Promise.reject(Error(t.error||"Could not load your sector.")))).then(t=>{if(e)return;let n=t.settings?.sectorFocus||{sectors:[],strength:"lean"};o(n),u(n)}).catch(t=>{e||I(t.message)}),fetch("/api/settings/sector-suggestions").then(e=>e.json().then(t=>e.ok?t:Promise.reject(Error(t.error||"Could not load suggestions.")))).then(t=>{e||A({scored:t.scored,list:t.suggestions||[]})}).catch(t=>{e||A({error:t.message})}),()=>{e=!0,clearTimeout(E.current)}},[]),(0,n.useEffect)(()=>{if(F.current||!l&&!B)return;F.current=!0;let e=document.getElementById("sector");if("#sector"!==window.location.hash||!e)return;let t=()=>e.scrollIntoView({block:"start"});t();let n=new ResizeObserver(t);n.observe(document.body);let r=()=>{for(let e of(n.disconnect(),clearTimeout(o),f))window.removeEventListener(e,r,!0)},o=setTimeout(r,2e3);for(let e of f)window.addEventListener(e,r,{capture:!0,passive:!0});return r},[l,B]);let M=l&&r&&!(0,a.sameFocus)(l,r);return(0,t.jsxs)(i.Section,{id:"sector",title:"Your sector",intro:"Pick up to three sectors you work in. Companies in them count for more when your network is scored, so the people there rank higher.",children:[B&&(0,t.jsx)(i.Status,{tone:"bad",children:B}),!l&&!B&&(0,t.jsx)(i.Body,{children:"Loading…"}),l&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.default,{sectors:l.sectors,onChange:e=>N({...l,sectors:e}),disabled:v,suggest:$}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:8,marginTop:14},children:[(0,t.jsx)("span",{style:{fontSize:13,color:"#8b9a9a"},children:"How much:"}),Object.keys(d.SECTOR_BONUS).map(e=>(0,t.jsxs)("button",{type:"button","aria-pressed":l.strength===e,disabled:v,onClick:()=>N({...l,strength:e}),style:{padding:"5px 12px",borderRadius:7,fontSize:12.5,fontWeight:600,cursor:"pointer",color:l.strength===e?"#fff":"#8b9a9a",background:l.strength===e?"rgba(52,152,219,0.25)":"transparent",border:i.LINE},children:[g[e]," · +",d.SECTOR_BONUS[e]]},e))]}),(0,t.jsx)(i.Body,{style:{fontSize:12.5},children:"Each company in your sectors gets +1 (lean) or +2 (strong) on its score out of 10, never above 10. A company in more than one of your picks still gets it once."}),(0,t.jsx)(S,{preview:M?y:null,draft:l}),(0,t.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginTop:14},children:[(0,t.jsx)(i.Btn,{primary:!0,onClick:D,disabled:!M||v,children:v?"Saving and rescoring…":"Save"}),M&&!v&&(0,t.jsx)(i.Btn,{onClick:()=>N(r),children:"Cancel"}),!M&&l.sectors.length>0&&!v&&(0,t.jsx)(i.Btn,{onClick:()=>N({...l,sectors:[]}),children:"Turn off"})]}),C&&(0,t.jsx)(i.Status,{tone:C.tone,children:C.text}),(0,t.jsxs)("ul",{style:{margin:"16px 0 0",paddingLeft:18,fontSize:12.5,color:"#778",lineHeight:1.7},children:[(0,t.jsx)("li",{children:"Tiers rank how reachable someone is through your network, not the people themselves."}),(0,t.jsxs)("li",{children:["A company score you set on ",(0,t.jsx)("a",{href:"#companies",style:{color:"#3498DB"},children:"Company scores"}),", below, always wins. Your sector never changes it."]}),(0,t.jsx)("li",{children:"If you scan highest tier first, people in your sectors come up sooner. Scanning newest first, the default, doesn’t go by tier."}),(0,t.jsx)("li",{children:"An industry includes its sectors. It counts a company in any of its sectors (Healthcare & Biotech counts a practice that is only in Dental), and a company whose industry the app’s list of well-known companies or the company’s own name gives (Meridian Health). Not one known only from its people’s job titles: a recruiter at Acme Widgets doesn’t make Acme a consulting firm."}),(0,t.jsx)("li",{children:"A narrower sector counts a company when its name says so (Smith Family Dental), it’s a well-known company in that sector, or at least half of the people you know there say so in their headlines (dentist, DDS, orthodontist). The words are a fixed list that comes with the app, the same on every computer. Nothing is sent anywhere."}),(0,t.jsxs)("li",{children:["Some sectors are work every kind of company has: ",b.length>1?`${b.slice(0,-1).join(", ")} and ${b.at(-1)}`:b.join(""),". For those a job title doesn’t count, since a recruiter at Acme Widgets doesn’t make it a recruiting firm. The company’s name does (Acme Staffing, Smith CPA), and so does a kind of firm in a headline (staffing agency, law firm, SaaS)."]}),R&&(0,t.jsxs)("li",{style:{color:"#FFD700"},children:["sample"===R?"The sample network":"The CSV import"," open in this window isn’t changed by this, and isn’t counted in the suggestions. Your sector applies to networks you’ve scanned."]})]})]})]})}function S({preview:e,draft:n}){if(!e||e.key!==(0,a.focusFingerprint)(n))return null;let r={marginTop:12,padding:"10px 14px",borderRadius:8,fontSize:13,lineHeight:1.6,border:i.LINE,background:"rgba(255,255,255,0.03)",color:"#cfd8d8"};if(e.loading)return(0,t.jsx)("div",{style:r,"aria-live":"polite",children:"Working out what would change…"});if(e.error)return(0,t.jsx)(i.Status,{tone:"bad",children:e.error});if(!e.scored)return(0,t.jsx)("div",{style:r,"aria-live":"polite",children:"There’s no scanned network yet, so nothing changes now. Your choice applies once you scan."});let o=(e,t)=>`${m(e,"company","companies")} ${1===e?"scores":"score"} ${t}`,s=[e.companiesUp&&o(e.companiesUp,"higher"),e.companiesDown&&o(e.companiesDown,"lower")].filter(Boolean).join(" and ");return(0,t.jsxs)("div",{style:r,"aria-live":"polite",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("b",{style:{color:"#fff"},children:"If you save:"})," ",s?`${s}.`:"No company changes score."," ",x(e.up,e.down,!1)]}),e.examples?.length>0&&(0,t.jsx)("div",{style:{marginTop:6,display:"flex",flexWrap:"wrap",gap:"4px 12px",fontSize:12.5},children:e.examples.map((e,n)=>(0,t.jsxs)("span",{title:e.company||void 0,children:[e.name,e.degree?(0,t.jsxs)("span",{style:{color:"#667"},children:[" (",y[e.degree]||`${e.degree}th`,")"]}):null," ",(0,t.jsx)("b",{style:{color:u.TIER_COLORS_CLASSIC[e.from]||"#889"},children:e.from||"–"})," → ",(0,t.jsx)("b",{style:{color:u.TIER_COLORS_CLASSIC[e.to]||"#889"},children:e.to})]},n))}),e.companyExamples?.length>0&&(0,t.jsx)("div",{style:{marginTop:4,fontSize:12,color:"#8b9a9a"},children:e.companyExamples.slice(0,3).map(e=>`${e.name} ${e.from} → ${e.to}`).join(" · ")})]})}let k=e=>`${Math.round(100*e)}%`,[v,j,C]=d.CURVE.map(([,e])=>e),T=[{key:"curve",label:"On your network's curve",note:`Your top ${k(v)} are S, the next ${k(j-v)} A and the next ${k(C-j)} B, so any network has a top, even one full of companies the app doesn't know. It only lifts: nobody drops a tier because their network is strong, and nobody under ${d.CURVE_FLOOR} is lifted into S or A.`},{key:"fixed",label:"On the fixed scale",note:"The same lines for everyone: S from 7.5, A from 5.5, B from 4, C from 2.5. Easy to compare from one network to another, but a network outside well-known companies has almost nobody in S or A."}];function B({onSaved:e}={}){let[r,o]=(0,n.useState)(null),[s,a]=(0,n.useState)(!1),[l,c]=(0,n.useState)(null),[d,u]=(0,n.useState)(null),[g]=(0,n.useState)(()=>(0,p.csvNetworkSource)());async function f(t){if(s||t===r)return;a(!0),c(null);let{settings:n,effects:i,error:l}=await (0,h.saveSettings)({tierScale:t});if(n&&o(n.tierScale),l)c({tone:"bad",text:l});else{let t,n=i?.tierScale;c({tone:"ok",text:n?`Saved. ${t=n.moved,`${t.toLocaleString()} ${1===t?"person":"people"}`} changed tier.`:"Saved."}),e?.()}a(!1)}return(0,n.useEffect)(()=>{let e=!1;return fetch("/api/settings").then(e=>e.json().then(t=>e.ok?t:Promise.reject(Error(t.error||"Could not load how tiers are graded.")))).then(t=>{e||o(t.settings?.tierScale||"curve")}).catch(t=>{e||u(t.message)}),()=>{e=!0}},[]),(0,t.jsxs)(i.Section,{id:"tiers",title:"Tiers",intro:"How the S to D rings are drawn. A tier says where someone sits in your network, not what they're worth.",children:[d&&(0,t.jsx)(i.Status,{tone:"bad",children:d}),r&&(0,t.jsx)("div",{role:"radiogroup","aria-label":"How tiers are graded",style:{display:"grid",gap:8},children:T.map(e=>{let n=r===e.key;return(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":n,disabled:s,onClick:()=>f(e.key),style:{textAlign:"left",padding:"12px 14px",borderRadius:8,cursor:s?"wait":n?"default":"pointer",color:"#fff",background:n?"rgba(155,89,182,0.14)":"rgba(255,255,255,0.03)",border:n?"1px solid rgba(155,89,182,0.6)":i.LINE},children:[(0,t.jsxs)("div",{style:{fontSize:14,fontWeight:650},children:[n?"● ":"○ ",e.label,"curve"===e.key?" (recommended)":""]}),(0,t.jsx)(i.Body,{style:{marginTop:4},children:e.note})]},e.key)})}),g&&(0,t.jsxs)(i.Body,{style:{color:"#FFD700",marginTop:10},children:["sample"===g?"The sample network open in this window keeps its own tiers (they’re the same either way).":"The CSV import open in this window is always graded on its own curve."," ","This applies to networks you’ve scanned."]}),l&&(0,t.jsx)(i.Status,{tone:l.tone,children:l.text})]})}var I=e.i(15812),$=e.i(19821),A=e.i(64666);let R={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},E=e=>`${Math.round(100*e)}%`;function z(){let{userId:e}=(0,I.useUser)(),[o,s]=(0,n.useState)(null),[a,l]=(0,n.useState)(!1);(0,n.useEffect)(()=>{if(!e)return;let t=!0;return(0,$.loadNetwork)(e).then(e=>{t&&s(function({degree1:e=[],degree2:t=[],ties:n=0}={}){let r=new Map;for(let e of t)e?.source_connection_id!=null&&r.set(e.source_connection_id,(r.get(e.source_connection_id)||0)+1);let o=(0,A.exclusiveReach)(t,e),i=e.length,s=Math.max(0,Number(n)||0),a=i?i-2*s/i:0,l=new Map(e.map(e=>[e.id,e])),c=[...o.entries()].sort((e,t)=>t[1].reach-e[1].reach||String(e[0]).localeCompare(String(t[0]))).slice(0,5).map(([e,t])=>{let n=l.get(e)||{};return{id:e,name:n.name||"",company:n.company||"",tier:n.tier||"",circle:r.get(e)||0,only:t.only,share:t.total?t.only/t.total:0}});return{circles:r.size,early:r.size<5,twoWays:(0,A.redundancy)(t,e),effective:{n:i,ties:s,size:a,efficiency:i?a/i:0},top:c}}(e))}).catch(()=>{t&&l(!0)}),()=>{t=!1}},[e]);let c={padding:"12px 14px",borderRadius:8,border:i.LINE,background:"rgba(255,255,255,0.03)"};return(0,t.jsxs)("section",{id:"health",style:{marginTop:20},children:[(0,t.jsx)("h2",{style:{fontSize:16,margin:"0 0 6px"},children:"Network health"}),a&&(0,t.jsx)(i.Body,{children:"Couldn’t read your network just now."}),!a&&!o&&(0,t.jsx)(i.Body,{children:"Reading your network…"}),o&&0===o.circles&&(0,t.jsx)(i.Body,{children:"Scan a few of your connections’ circles (the Scan page, step 4) and this shows how your network holds together."}),o&&o.circles>0&&(0,t.jsxs)(t.Fragment,{children:[o.early&&(0,t.jsxs)("div",{style:{fontSize:12.5,color:"#FFD700",margin:"4px 0 10px"},children:["An early estimate: ",o.circles," ",1===o.circles?"circle":"circles"," scanned. These get sharper as you scan more."]}),(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:10},children:[(0,t.jsxs)("div",{style:c,children:[(0,t.jsx)("div",{style:{fontSize:22,fontWeight:700},children:E(o.twoWays)}),(0,t.jsx)("div",{style:{fontSize:12.5,color:"#b8c4c4"},children:"of your 2nd degree you reach two or more ways"}),(0,t.jsx)("div",{style:{fontSize:11.5,color:"#778",marginTop:4},children:"Higher is safer: lose one connection and they’re still reachable."})]}),(0,t.jsxs)("div",{style:c,children:[(0,t.jsx)("div",{style:{fontSize:22,fontWeight:700},children:Math.round(o.effective.size).toLocaleString()}),(0,t.jsxs)("div",{style:{fontSize:12.5,color:"#b8c4c4"},children:["effective reach of your ",o.effective.n.toLocaleString()," connections (",E(o.effective.efficiency)," non-overlapping)"]}),(0,t.jsxs)("div",{style:{fontSize:11.5,color:"#778",marginTop:4},children:["From ",o.effective.ties.toLocaleString()," ",1===o.effective.ties?"tie":"ties"," between your connections seen in circle scans so far, so it can only come down as you scan more."]})]})]}),o.top.length>0&&(0,t.jsxs)("div",{style:{...c,marginTop:10,padding:0},children:[(0,t.jsx)("div",{style:{padding:"10px 14px",fontSize:12.5,color:"#b8c4c4",borderBottom:i.LINE},children:"Your connections who reach the most people no one else does"}),o.top.map((e,n)=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"8px 14px",borderBottom:n<o.top.length-1?"1px solid rgba(255,255,255,0.04)":"none",fontSize:13},children:[(0,t.jsxs)("span",{style:{width:22,color:"#778"},children:["#",n+1]}),(0,t.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",background:R[e.tier]||"#667",flexShrink:0}}),(0,t.jsxs)("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[(0,t.jsx)("b",{children:e.name}),e.company?(0,t.jsxs)("span",{style:{color:"#8b9a9a"},children:[" · ",e.company]}):null]}),(0,t.jsxs)("span",{style:{color:"#b8c4c4",whiteSpace:"nowrap"},children:[e.circle.toLocaleString()," in circle"]}),(0,t.jsxs)("span",{style:{color:"#00ff88",whiteSpace:"nowrap"},children:[e.only.toLocaleString()," only them (",E(e.share),")"]}),(0,t.jsx)(r.default,{href:`/?chain=${encodeURIComponent(e.id)}`,style:{color:"#3498DB",textDecoration:"none",whiteSpace:"nowrap"},children:"Explore →"})]},e.id))]})]})]})}var F=e.i(94657),N=e.i(64745);let D={color:"#3498DB",textDecoration:"none",fontWeight:600};function M(){let[e,o]=(0,n.useState)(0),s=()=>o(e=>e+1);return N.IS_DEMO?(0,t.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"rgba(255,255,255,0.7)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,textAlign:"center",padding:24,fontFamily:i.FONT},children:[(0,t.jsx)("h2",{style:{margin:0,fontSize:20,fontWeight:700,color:"#fff"},children:"Not part of the demo"}),(0,t.jsx)("p",{style:{margin:0,fontSize:13},children:"The public demo includes the Network Circle and Degrees views only."}),(0,t.jsx)(r.default,{href:"/",style:{fontSize:12,color:"rgba(255,255,255,0.5)",textDecoration:"none"},children:"← Back to the network"})]}):(0,t.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"#fff",fontFamily:i.FONT},children:[(0,t.jsxs)("header",{style:{padding:"16px 24px",borderBottom:i.LINE,display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)(r.default,{href:"/",style:{display:"flex",alignItems:"center",gap:6,color:"#888",textDecoration:"none",fontSize:13,fontWeight:600,padding:"6px 14px",borderRadius:6,background:"rgba(255,255,255,0.06)",border:i.LINE},children:"← Back to Map"}),(0,t.jsx)("h1",{style:{fontSize:22,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FFD700, #9B59B6, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Scores"})]}),(0,t.jsxs)("main",{style:{maxWidth:980,margin:"0 auto",padding:"8px 24px 64px"},children:[(0,t.jsxs)(i.Body,{style:{marginTop:16},children:["How someone’s power score is worked out, and the three things you can change about it:"," ",(0,t.jsx)("a",{href:"#sector",style:D,children:"your field"}),", ",(0,t.jsx)("a",{href:"#tiers",style:D,children:"how tiers are graded"})," and"," ",(0,t.jsx)("a",{href:"#companies",style:D,children:"any company’s score"}),". A change here rescores everyone."," ","First, ",(0,t.jsx)("a",{href:"#health",style:D,children:"how your network holds together"}),"."]}),(0,t.jsx)(z,{}),(0,t.jsx)(w,{onSaved:s}),(0,t.jsx)(B,{onSaved:s}),(0,t.jsx)("div",{id:"companies",style:{marginTop:28},children:(0,t.jsx)(F.default,{version:e})})]})]})}e.s(["default",0,function(){return(0,t.jsx)(o.default,{children:(0,t.jsx)(M,{})})}],98083)},64666,e=>{"use strict";var t=e.i(7214);function n(e=[],r=[]){let o=new Set((r||[]).map(t.keyFor)),i=new Map;for(let n of e||[]){let e=n?.source_connection_id;if(null==e)continue;let r=(0,t.keyFor)(n);if(o.has(r))continue;let s=i.get(r);s||i.set(r,s=new Set),s.add(e)}let s=new Map;for(let e of i.values())for(let t of e){let n=s.get(t)||{reach:0,only:0,total:0};n.reach+=1/e.size,n.total+=1,1===e.size&&(n.only+=1),s.set(t,n)}return s}e.s(["bridgeOverlap",0,function(e=[],r=[]){let o=n(e,r),i=new Set((r||[]).map(t.keyFor)),s=new Map;for(let n of e||[]){let e=n?.source_connection_id;if(null==e)continue;let r=(0,t.keyFor)(n);if(i.has(r))continue;let o=s.get(r);o||s.set(r,o=new Set),o.add(e)}let a=new Map;for(let e of s.values()){if(e.size<2)continue;let t=[...e];for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++){let r=t[e]<t[n]?`${t[e]}|${t[n]}`:`${t[n]}|${t[e]}`;a.set(r,(a.get(r)||0)+1)}}let l=new Map;for(let[e,t]of a){let[n,r]=e.split("|"),i=o.get(n).total+o.get(r).total-t,s=i?t/i:0;for(let[e,o]of[[n,r],[r,n]]){let n=l.get(e);(!n||s>n.share)&&l.set(e,{with:o,share:s,shared:t})}}return l},"exclusiveReach",0,n,"redundancy",0,function(e=[],t=[]){let r=n(e,t),o=0,i=0;for(let e of r.values())o+=e.reach,i+=e.only;return o?1-i/o:0}])},89154,e=>{"use strict";var t=e.i(90179);function n(e){let n=(0,t.readTitle)(e);return{key:n.key,label:n.label,level:n.level}}function r(e){return(0,t.currentCompany)(e)}let o=[{key:"defense",label:"Government, Defense & Aerospace",color:"#7f8c8d",words:/\b(government|federal|state of|county|city of|defen[cs]e|army|navy|air force|marine corps|military|dod|nasa|aerospace|lockheed|northrop|boeing|raytheon|l3harris|leidos|blue origin|spacex|public sector)\b/i},{key:"finance",label:"Finance & Investing",color:"#2ecc71",words:/\b(bank|banking|capital|ventures?|vc|investments?|investor|fund|private equity|growth equity|asset management|wealth|trading|trader|hedge|crypto|blockchain|web3|defi|fintech|stripe|coinbase|blackrock|robinhood|goldman|morgan stanley|jpmorgan|chase|bny|mellon|wells fargo|citi|citigroup|capital one|fidelity|vanguard|schwab|visa|mastercard|amex|american express|paypal|insurance|accounting|cpa|financial)\b/i},{key:"health",label:"Healthcare & Biotech",color:"#e74c3c",words:/\b(health|healthcare|medical|medicine|hospital|clinic|pharma|pharmaceutical|biotech|nurse|nursing|physician|doctor|dental|therapy|therapist|wellness)\b/i},{key:"education",label:"Education",color:"#f1c40f",words:/\b(university|college|school|education|student|professor|teacher|academy|phd|faculty|alumni)\b/i},{key:"media",label:"Marketing & Media",color:"#e67e22",words:/\b(marketing|brand|branding|advertising|agency|media|content|social media|creative|creator|influencer|pr|public relations|communications|tiktok|pinterest|youtube|growth marketing)\b/i},{key:"entertainment",label:"Entertainment & Gaming",color:"#9b59b6",words:/\b(entertainment|film|movie|music|records|gaming|games?|esports|studio|studios|netflix|disney|spotify|hollywood|theater|theatre|sports)\b/i},{key:"tech",label:"Tech, Software & AI",color:"#3498db",words:/\b(software|saas|engineer|engineering|developer|tech|technology|technologies|ai|artificial intelligence|machine learning|ml|data|cloud|cyber|security|devops|product manager|google|microsoft|apple|meta|amazon|nvidia|openai|anthropic|palantir|salesforce|oracle|ibm|intel|app|apps|startup|platform|labs?)\b/i},{key:"consulting",label:"Consulting, Legal & Services",color:"#1abc9c",words:/\b(consulting|consultant|consultancy|deloitte|accenture|mckinsey|kpmg|pwc|ey|bain|bcg|legal|law|lawyer|attorney|paralegal|recruiting|recruiter|staffing|talent)\b/i},{key:"realestate",label:"Real Estate & Construction",color:"#d35400",words:/\b(real estate|realtor|realty|property|properties|construction|architecture|architect|mortgage|homes|housing|builders?)\b/i},{key:"consumer",label:"Retail, Consumer & Hospitality",color:"#ff79c6",words:/\b(retail|e-?commerce|shopify|consumer|cpg|fashion|apparel|beauty|cosmetics|food|beverage|restaurant|hospitality|hotel|travel|tourism|coca-cola|nike|store|shop)\b/i},{key:"industry",label:"Manufacturing, Energy & Logistics",color:"#95a5a6",words:/\b(manufacturing|energy|oil|gas|solar|utilities|automotive|tesla|siemens|ge|general electric|honeywell|3m|logistics|supply chain|shipping|freight|fedex|ups|industrial|mining|chemicals?)\b/i},{key:"nonprofit",label:"Nonprofit & Community",color:"#bdc3c7",words:/\b(nonprofit|non-profit|foundation|charity|ngo|church|ministry|volunteer)\b/i}],i={key:"unknown",label:"Unclear",color:"#555c66"},s=Object.fromEntries([...o,i].map(e=>[e.key,e])),a=e=>s[e]||i;function l(e,t){for(let n of[e,t]){if(!n)continue;let e=o.find(e=>e.words.test(n));if(e)return e}return i}let c=(e,t)=>l(e,t).key,d=e=>n(e).level>=4;e.s(["INDUSTRIES",0,o,"UNKNOWN_INDUSTRY",0,i,"buildCompanyIndex",0,function(e=[]){let n=new Map,r=e=>(n.has(e)||n.set(e,(0,t.rolesWithCompanies)(e)),n.get(e)),{industries:o}=(0,t.networkCompanies)(e,{industryOf:c,rolesOf:r}),i=new Map;for(let t of e){let e=t.profile_url||`id:${t.id}`,n=i.get(e);(!n||(t.degree||9)<(n.degree||9))&&i.set(e,t)}let s=new Map;for(let e of i.values()){let t=r(e).find(e=>!e.former)?.company;if(!t)continue;let n=s.get(t);n||(n={name:t,people:[],d1:0,d2:0,d3:0,S:0,A:0,senior:0},s.set(t,n)),n.people.push(e),1===e.degree?n.d1++:2===e.degree?n.d2++:n.d3++,"S"===e.tier&&n.S++,"A"===e.tier&&n.A++,d(e.headline)&&n.senior++}for(let e of s.values())e.industry=a(o.get(e.name));return s},"companyLinks",0,function(e=[],t=[]){let n=new Map;for(let t of e){let e=r(t);e&&n.set(t.id,e)}let o=new Map;for(let e of t){let t=n.get(e.source_connection_id),i=r(e);if(!t||!i||t===i)continue;let[s,a]=t<i?[t,i]:[i,t],l=`${s}\u0000${a}`,c=o.get(l);c||(c={a:s,b:a,weight:0,via:new Set},o.set(l,c)),c.weight++,c.via.add(e.source_connection_id)}return[...o.values()]},"companyOf",0,r,"getSeniority",0,n,"industryByKey",0,a,"industryOf",0,l,"isSenior",0,d,"waysInto",0,function(e,t=[],n=[]){let o=t.filter(t=>r(t)===e),i=new Map;for(let t of n)r(t)===e&&i.set(t.source_connection_id,(i.get(t.source_connection_id)||0)+1);let s=new Map(t.map(e=>[e.id,e]));return{direct:o,bridges:[...i.entries()].map(([e,t])=>({bridge:s.get(e),n:t})).filter(e=>e.bridge).sort((e,t)=>t.n-e.n||(Number(t.bridge.power_score)||0)-(Number(e.bridge.power_score)||0))}}])},19821,e=>{"use strict";async function t(e){let t=e?`/api/network?userId=${encodeURIComponent(e)}`:"/api/network",n=await fetch(t);if(!n.ok)throw Error(`Failed to load network (${n.status})`);let r=await n.json();return{degree1:r.degree1||[],degree2:r.degree2||[],degree3:r.degree3||[],ties:Number(r.ties)||0}}e.s(["loadNetwork",0,t])},36774,e=>{"use strict";let t=/^[A-Za-z0-9_-]+\.(webp|jpg|jpeg|png)$/,n="/avatars/";e.s(["localPhoto",0,function(e){return"string"==typeof e&&e.startsWith(n)&&t.test(e.slice(n.length))?e:null}])},69083,e=>{"use strict";var t=e.i(89154);let n=new Map(t.INDUSTRIES.map(e=>[e.key,e.color])),r=new Map([...t.INDUSTRIES.map(e=>[e.key,Object.freeze({key:e.key,label:e.label,color:e.color,group:e.key,kind:"industry"})]),...Object.entries({software:["Software & SaaS","tech","function"],"ai-data":["AI & Data","tech","function"],cybersecurity:["Cybersecurity","tech","function"],telecom:["Telecom","tech","industry"],fintech:["Fintech & Payments","finance","industry"],banking:["Banking & Lending","finance","industry"],"vc-pe":["Venture Capital & Private Equity","finance","industry"],wealth:["Wealth & Asset Management","finance","industry"],insurance:["Insurance","finance","industry"],accounting:["Accounting & Tax","finance","function"],crypto:["Crypto & Web3","finance","industry"],hospitals:["Hospitals & Clinics","health","industry"],dental:["Dental","health","industry"],"pharma-biotech":["Pharma & Biotech","health","industry"],"medical-devices":["Medical Devices","health","industry"],"mental-health":["Mental Health","health","industry"],"fitness-wellness":["Fitness & Wellness","health","industry"],veterinary:["Veterinary & Animal Care","health","industry"],k12:["K-12 Education","education","industry"],"higher-ed":["Higher Education","education","industry"],"marketing-advertising":["Marketing & Advertising","media","function"],"pr-comms":["PR & Communications","media","function"],"media-publishing":["Media & Publishing","media","industry"],"creator-economy":["Creator Economy","media","industry"],"film-tv-music":["Film, TV & Music","entertainment","industry"],"gaming-esports":["Gaming & Esports","entertainment","industry"],sports:["Sports","entertainment","industry"],"ecommerce-retail":["E-commerce & Retail","consumer","industry"],"consumer-goods":["Consumer Goods","consumer","industry"],restaurants:["Restaurants & Food Service","consumer","industry"],"hospitality-travel":["Hospitality & Travel","consumer","industry"],"beauty-personal-care":["Beauty & Personal Care","consumer","industry"],logistics:["Logistics & Supply Chain","industry","industry"],manufacturing:["Manufacturing","industry","industry"],energy:["Energy & Utilities","industry","industry"],automotive:["Automotive","industry","industry"],agriculture:["Agriculture & Farming","industry","industry"],"aerospace-defense":["Aerospace & Defense","defense","industry"],military:["Military","defense","industry"],government:["Government & Public Sector","defense","industry"],legal:["Legal","consulting","function"],"management-consulting":["Management Consulting","consulting","function"],"hr-recruiting":["HR & Recruiting","consulting","function"],"security-services":["Security Services","consulting","function"],"real-estate":["Real Estate","realestate","industry"],"construction-trades":["Construction & Trades","realestate","industry"],charities:["Nonprofits & Charities","nonprofit","industry"],"social-work":["Social Work & Human Services","nonprofit","industry"],faith:["Faith & Ministry","nonprofit","industry"]}).map(([e,[r,o,i]])=>[e,Object.freeze({key:e,label:r,color:n.get(o)||t.UNKNOWN_INDUSTRY.color,group:o,kind:i})])]);e.s(["sectorByKey",0,function(e){return r.get(e)||{key:e,label:t.UNKNOWN_INDUSTRY.label,color:t.UNKNOWN_INDUSTRY.color,group:null,kind:null}}])},7214,e=>{"use strict";var t=e.i(36774);let n={S:0,A:1,B:2,C:3,D:4};function r(e){let t=parseFloat(e?.power_score);return Number.isFinite(t)?t:0}function o(e){return Math.round(10*r(e))/10}function i(e){return String(e?.profile_url||"").split(/[?#]/)[0].replace(/\/+$/,"")||`id:${e?.id}`}let s=(e,t)=>String(e??"").localeCompare(String(t??""),void 0,{numeric:!0});function a(e,t){return(n[e.tier]??9)-(n[t.tier]??9)||r(t)-r(e)||String(e.name||"").localeCompare(String(t.name||""))||s(e.id,t.id)}function l(e,t){return e.bridge&&t.bridge?a(e.bridge,t.bridge):e.bridge?-1:t.bridge?1:s(e.id,t.id)}function c(e,t){return t.score-e.score||t.waysIn-e.waysIn||l(e.routes[0]||d,t.routes[0]||d)||String(e.person.name||"").localeCompare(String(t.person.name||""))||(e.key<t.key?-1:+(e.key>t.key))}let d={id:null,bridge:null};function u(e){let t=String(e||"").trim().split(/\s+/).filter(Boolean);return t.length<2?t[0]||"":`${t[0]} ${t[t.length-1].charAt(0)}.`}function p(e,t){let n=String(e||"");return t<=1?n?"…":"":n.length>t?`${n.slice(0,t-1)}…`:n}e.s(["TIERS",0,["S","A","B","C","D"],"compareBridges",0,a,"compareWaysIn",0,function(e,t){return t.waysIn-e.waysIn||c(e,t)},"keyFor",0,i,"routeIndex",0,function(e=[]){let t=new Map;for(let n of e||[]){let e=i(n),r=t.get(e);r||(r=new Set,t.set(e,r)),r.add(n.source_connection_id??null)}return t},"routesFor",0,function(e,t,n){return e?[...t?.get(i(e))??(null!=e.source_connection_id?new Set([e.source_connection_id]):new Set)].map(e=>({id:e,bridge:n?.get(e)??null})).sort(l):[]},"score",0,r,"score1",0,o,"separationPeople",0,function(e=[],n=[]){let r=new Map;for(let e of n||[])r.set(e.id,e);let a=new Map,d=new Map;for(let n of e||[]){let e=i(n);d.set(n.id,e);let r=a.get(e);r?function(e,n){let r=o(e)-o(n);if(r)return r>0;let i=!!(0,t.localPhoto)(e.profile_image_url);return!!(0,t.localPhoto)(n.profile_image_url)!==i?i:0>s(e.id,n.id)}(n,r.person)&&(r.person=n):(r={key:e,person:n,rowIds:[],routeIds:new Set},a.set(e,r)),r.rowIds.push(n.id),r.routeIds.add(n.source_connection_id??null)}let u={people:a.size,byTier:{S:0,A:0,B:0,C:0,D:0},multi:0,bridges:0,unresolvedIds:0,peopleOnlyUnresolved:0,onlyUnresolvedVia:0},p=new Set,h=new Set,g=new Set,f=[];for(let e of a.values()){let t=[...e.routeIds].map(e=>({id:e,bridge:r.get(e)??null}));t.sort(l);let n=t.filter(e=>e.bridge);for(let e of t)(e.bridge?p:h).add(e.id);if(!n.length)for(let e of(u.peopleOnlyUnresolved++,t))g.add(e.id);let{person:i}=e,s=i.tier;void 0!==u.byTier[s]&&u.byTier[s]++,t.length>1&&u.multi++,f.push({key:e.key,person:i,score:o(i),tier:s,routes:t,waysIn:t.length,rowIds:e.rowIds,haystack:[i.name,i.headline,i.company,i.role,...n.map(e=>e.bridge.name)].filter(Boolean).join("\n").toLowerCase(),rank:0,tied:!1})}return u.bridges=p.size,u.unresolvedIds=h.size,u.onlyUnresolvedVia=g.size,f.sort(c),function(e){for(let t=0;t<e.length;t++){let n=e[t],r=e[t-1],o=r&&r.score===n.score&&r.waysIn===n.waysIn;n.rank=o?r.rank:t+1,o&&(n.tied=!0,r.tied=!0)}}(f),{people:f,rowToKey:d,summary:u}},"shortName",0,u,"summitLayout",0,function(e=[],t=800,n=!1){let r=n?36:26,o=Math.round(.42*t),i=Math.round(.58*t),s=e.map((e,n)=>{var o;return{key:e.key,p:e,x:i,y:16+n*r,r:(o=e.waysIn)>=4?8.5:3===o?7:2===o?5.5:4,label:p(`#${e.rank}${e.tied?"=":""} ${e.person.name||""}`,Math.floor((t-i-60)/6.2))}}),l=new Map,c="\0unresolved";for(let e of s)for(let t of e.p.routes){let n=t.bridge?t.id:c,r=l.get(n);r||(r={id:t.bridge?t.id:null,bridge:t.bridge,unresolved:!t.bridge,ys:[],count:0},l.set(n,r)),r.count++,r.ys.push(e.y)}let d=[...l.values()].map(e=>({...e,bary:e.ys.reduce((e,t)=>e+t,0)/e.ys.length}));d.sort((e,t)=>e.bary-t.bary||e.unresolved-t.unresolved||(e.bridge&&t.bridge?a(e.bridge,t.bridge):0));let h=s.length?s[s.length-1].y:16,g=d.length>1?Math.max(18,(h-16)/(d.length-1)):0,f=Math.max(4,Math.floor((o-10-42)/6));d.forEach((e,t)=>{if(e.x=o,e.y=1===d.length?(16+h)/2:16+t*g,e.r=5,e.unresolved)e.label=p(`can't be named (${e.count})`,f);else{let t=e.bridge.name||"";e.label=t.length<=f?t:p(u(t),f)}delete e.ys});let y=new Map(d.map(e=>[e.unresolved?c:e.id,e])),m=[];for(let e of s){let t=new Set;e.p.routes.forEach((n,r)=>{let o=n.bridge?n.id:c;if(t.has(o))return;t.add(o);let i=y.get(o);m.push({key:e.key,bridgeId:i.id,primary:0===r&&!i.unresolved,unresolved:i.unresolved,tier:i.bridge?.tier??null,x1:i.x,y1:i.y,x2:e.x,y2:e.y})})}let b=Math.max(h,d.length?d[d.length-1].y:0),x=s.length?Math.ceil(b+16):0,w={x:20,y:s.length?(16+Math.max(h,b))/2:16,r:14},S=d.map(e=>({id:e.id,x1:w.x,y1:w.y,x2:e.x,y2:e.y}));return{width:t,height:x,you:w,people:s,bridges:d,links:m,spokes:S}}])},5258,e=>{"use strict";e.s(["TIER_COLORS",0,{S:"#f6c344",A:"#a78bfa",B:"#60a5fa",C:"#94a3b8",D:"#6b7280"},"TIER_COLORS_CLASSIC",0,{S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},"TIER_ORDER",0,["S","A","B","C","D"],"TIER_RING_RADIUS",0,{S:150,A:230,B:310,C:390,D:470},"initialsFor",0,function(e){let t=String(e||"").trim().split(/\s+/).filter(Boolean);return 0===t.length?"?":(t[0].charAt(0)+(t.length>1?t[t.length-1].charAt(0):"")).toUpperCase()}])}]);