six-degrees 0.4.9 → 0.4.11

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 (242) 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 +4 -4
  5. package/.next/standalone/.next/routes-manifest.json +6 -0
  6. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  12. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  13. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  14. package/.next/standalone/.next/server/app/_not-found.rsc +13 -13
  15. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +13 -13
  16. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +12 -12
  17. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  18. package/.next/standalone/.next/server/app/api/admin-delete/route.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/api/admin-update/route.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/api/bridges/route.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/api/bulk-import/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/company-scores/legacy/route.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/api/company-scores/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/connections/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/data/export/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/data/import/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/data/restart/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/data/reveal/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/data/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/delete-cluster/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/ingest/route.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/api/network/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/api/outreach/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/api/scraper/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/settings/route.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/api/settings/sector-preview/route.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/api/settings/sector-suggestions/route.js.nft.json +1 -1
  40. package/.next/standalone/.next/server/app/api/setup-profile/route.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/api/social/crm/route/app-paths-manifest.json +3 -0
  42. package/.next/standalone/.next/server/app/api/social/crm/route/build-manifest.json +12 -0
  43. package/.next/standalone/.next/server/app/api/social/crm/route/server-reference-manifest.json +4 -0
  44. package/.next/standalone/.next/server/app/api/social/crm/route.js +10 -0
  45. package/.next/standalone/.next/server/app/api/social/crm/route.js.map +5 -0
  46. package/.next/standalone/.next/server/app/api/social/crm/route.js.nft.json +1 -0
  47. package/.next/standalone/.next/server/app/api/social/crm/route_client-reference-manifest.js +3 -0
  48. package/.next/standalone/.next/server/app/api/social/messages/route.js +4 -3
  49. package/.next/standalone/.next/server/app/api/social/messages/route.js.nft.json +1 -1
  50. package/.next/standalone/.next/server/app/api/social/route.js +4 -3
  51. package/.next/standalone/.next/server/app/api/social/route.js.nft.json +1 -1
  52. package/.next/standalone/.next/server/app/api/unlock/route.js.nft.json +1 -1
  53. package/.next/standalone/.next/server/app/api/update/route.js.nft.json +1 -1
  54. package/.next/standalone/.next/server/app/api/update-images/route.js.nft.json +1 -1
  55. package/.next/standalone/.next/server/app/api/users/route.js.nft.json +1 -1
  56. package/.next/standalone/.next/server/app/avatars/[file]/route.js.nft.json +1 -1
  57. package/.next/standalone/.next/server/app/import/page.js.nft.json +1 -1
  58. package/.next/standalone/.next/server/app/import/page_client-reference-manifest.js +1 -1
  59. package/.next/standalone/.next/server/app/import.html +1 -1
  60. package/.next/standalone/.next/server/app/import.rsc +15 -15
  61. package/.next/standalone/.next/server/app/import.segments/_full.segment.rsc +15 -15
  62. package/.next/standalone/.next/server/app/import.segments/_tree.segment.rsc +2 -2
  63. package/.next/standalone/.next/server/app/import.segments/import/__PAGE__.segment.rsc +14 -14
  64. package/.next/standalone/.next/server/app/index.html +1 -1
  65. package/.next/standalone/.next/server/app/index.rsc +15 -15
  66. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +14 -14
  67. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +15 -15
  68. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  69. package/.next/standalone/.next/server/app/launch/page.js.nft.json +1 -1
  70. package/.next/standalone/.next/server/app/launch/page_client-reference-manifest.js +1 -1
  71. package/.next/standalone/.next/server/app/launch.html +2 -2
  72. package/.next/standalone/.next/server/app/launch.rsc +15 -15
  73. package/.next/standalone/.next/server/app/launch.segments/_full.segment.rsc +15 -15
  74. package/.next/standalone/.next/server/app/launch.segments/_tree.segment.rsc +2 -2
  75. package/.next/standalone/.next/server/app/launch.segments/launch/__PAGE__.segment.rsc +14 -14
  76. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  77. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  78. package/.next/standalone/.next/server/app/paths/page.js.nft.json +1 -1
  79. package/.next/standalone/.next/server/app/paths/page_client-reference-manifest.js +1 -1
  80. package/.next/standalone/.next/server/app/paths.html +1 -1
  81. package/.next/standalone/.next/server/app/paths.rsc +15 -15
  82. package/.next/standalone/.next/server/app/paths.segments/_full.segment.rsc +15 -15
  83. package/.next/standalone/.next/server/app/paths.segments/_tree.segment.rsc +2 -2
  84. package/.next/standalone/.next/server/app/paths.segments/paths/__PAGE__.segment.rsc +14 -14
  85. package/.next/standalone/.next/server/app/profile/page.js.nft.json +1 -1
  86. package/.next/standalone/.next/server/app/profile/page_client-reference-manifest.js +1 -1
  87. package/.next/standalone/.next/server/app/profile.html +1 -1
  88. package/.next/standalone/.next/server/app/profile.rsc +15 -15
  89. package/.next/standalone/.next/server/app/profile.segments/_full.segment.rsc +15 -15
  90. package/.next/standalone/.next/server/app/profile.segments/_tree.segment.rsc +2 -2
  91. package/.next/standalone/.next/server/app/profile.segments/profile/__PAGE__.segment.rsc +14 -14
  92. package/.next/standalone/.next/server/app/queue/page.js.nft.json +1 -1
  93. package/.next/standalone/.next/server/app/queue/page_client-reference-manifest.js +1 -1
  94. package/.next/standalone/.next/server/app/queue.html +1 -1
  95. package/.next/standalone/.next/server/app/queue.rsc +15 -15
  96. package/.next/standalone/.next/server/app/queue.segments/_full.segment.rsc +15 -15
  97. package/.next/standalone/.next/server/app/queue.segments/_tree.segment.rsc +2 -2
  98. package/.next/standalone/.next/server/app/queue.segments/queue/__PAGE__.segment.rsc +14 -14
  99. package/.next/standalone/.next/server/app/scores/page.js.nft.json +1 -1
  100. package/.next/standalone/.next/server/app/scores/page_client-reference-manifest.js +1 -1
  101. package/.next/standalone/.next/server/app/scores.html +1 -1
  102. package/.next/standalone/.next/server/app/scores.rsc +15 -15
  103. package/.next/standalone/.next/server/app/scores.segments/_full.segment.rsc +15 -15
  104. package/.next/standalone/.next/server/app/scores.segments/_tree.segment.rsc +2 -2
  105. package/.next/standalone/.next/server/app/scores.segments/scores/__PAGE__.segment.rsc +14 -14
  106. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  107. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  108. package/.next/standalone/.next/server/app/settings.html +1 -1
  109. package/.next/standalone/.next/server/app/settings.rsc +15 -15
  110. package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +15 -15
  111. package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  112. package/.next/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +14 -14
  113. package/.next/standalone/.next/server/app/setup/page.js.nft.json +1 -1
  114. package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  115. package/.next/standalone/.next/server/app/setup.html +1 -1
  116. package/.next/standalone/.next/server/app/setup.rsc +15 -15
  117. package/.next/standalone/.next/server/app/setup.segments/_full.segment.rsc +15 -15
  118. package/.next/standalone/.next/server/app/setup.segments/_tree.segment.rsc +2 -2
  119. package/.next/standalone/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +14 -14
  120. package/.next/standalone/.next/server/app/social/page.js.nft.json +1 -1
  121. package/.next/standalone/.next/server/app/social/page_client-reference-manifest.js +1 -1
  122. package/.next/standalone/.next/server/app/social.html +1 -1
  123. package/.next/standalone/.next/server/app/social.rsc +15 -15
  124. package/.next/standalone/.next/server/app/social.segments/_full.segment.rsc +15 -15
  125. package/.next/standalone/.next/server/app/social.segments/_tree.segment.rsc +2 -2
  126. package/.next/standalone/.next/server/app/social.segments/social/__PAGE__.segment.rsc +14 -14
  127. package/.next/standalone/.next/server/app-paths-manifest.json +1 -0
  128. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__06mi9k2._.js → [root-of-the-server]__05_3-22._.js} +7 -2
  129. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t3v1a1._.js +1 -1
  130. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1tir0vc._.js +8 -0
  131. package/.next/standalone/.next/server/chunks/_0ea9qwy._.js +1 -1
  132. package/.next/standalone/.next/server/chunks/_1_fynia._.js +4 -4
  133. package/.next/standalone/.next/server/chunks/_1itd1o_._.js +1 -1
  134. package/.next/standalone/.next/server/chunks/_1oqfuh8._.js +3 -0
  135. package/.next/standalone/.next/server/chunks/_1xh07bp._.js +1 -1
  136. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_social_crm_route_actions_0d1aflv.js +3 -0
  137. package/.next/standalone/.next/server/chunks/lib_db-client_15le7cw.js +7 -7
  138. package/.next/standalone/.next/server/chunks/lib_linkedin-export_12imqxg.js +3 -0
  139. package/.next/standalone/.next/server/chunks/lib_rpc_05gt5ya.js +3 -0
  140. package/.next/standalone/.next/server/chunks/ssr/_0-85h6g._.js +3 -0
  141. package/.next/standalone/.next/server/chunks/ssr/_08cfj2b._.js +3 -0
  142. package/.next/standalone/.next/server/chunks/ssr/_0c_y09g._.js +1 -1
  143. package/.next/standalone/.next/server/chunks/ssr/app_page_1fazqbf.js +1 -1
  144. package/.next/standalone/.next/server/chunks/ssr/app_paths_page_1ol90m7.js +1 -1
  145. package/.next/standalone/.next/server/chunks/ssr/app_profile_page_0u3-l5y.js +1 -1
  146. package/.next/standalone/.next/server/chunks/ssr/app_queue_page_0c6znd6.js +1 -1
  147. package/.next/standalone/.next/server/chunks/ssr/app_scores_page_09wepvv.js +1 -1
  148. package/.next/standalone/.next/server/chunks/ssr/app_settings_page_1f8mjj_.js +1 -1
  149. package/.next/standalone/.next/server/chunks/ssr/app_setup_page_1-282zx.js +1 -1
  150. package/.next/standalone/.next/server/chunks/ssr/app_social_page_0h7zxda.js +2 -1
  151. package/.next/standalone/.next/server/chunks/ssr/lib_galaxy-lab_108_lu-.js +3 -0
  152. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  153. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  154. package/.next/standalone/.next/server/pages/404.html +1 -1
  155. package/.next/standalone/.next/server/pages/500.html +1 -1
  156. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  157. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  158. package/.next/standalone/.next/static/chunks/0a5iadnmt9u9k.js +1 -0
  159. package/.next/standalone/.next/static/chunks/15sjx07xhpn6p.js +1 -0
  160. package/.next/standalone/.next/static/chunks/{054zdthcnyd2h.js → 160wjb73ddwqd.js} +1 -1
  161. package/.next/standalone/.next/static/chunks/1a74dky22dxd6.js +1 -0
  162. package/.next/standalone/.next/static/chunks/{04bbi55urkrd6.js → 1c_n0973t07l0.js} +1 -1
  163. package/.next/standalone/.next/static/chunks/{0bo1dxn5gwzpk.css → 1x_ysly42-teq.css} +1 -1
  164. package/.next/standalone/.next/static/chunks/{1_mohm2643nxp.js → 236f0jtp68j_h.js} +1 -1
  165. package/.next/standalone/.next/static/chunks/297e1z34yi--z.js +1 -0
  166. package/.next/standalone/.next/static/chunks/2_ak6qjxb6oa5.js +1 -0
  167. package/.next/standalone/.next/static/chunks/{38wwtni5e1ec1.js → 39hr8d-b2ibtw.js} +1 -1
  168. package/.next/standalone/.next/static/chunks/3ui4d-uqkqj5d.js +2 -0
  169. package/.next/{static/chunks/1z_rt4jteewqp.js → standalone/.next/static/chunks/3zw8bv7-mc4n6.js} +1 -1
  170. package/.next/standalone/CHANGELOG.md +57 -0
  171. package/.next/standalone/app/api/data/export/route.js +2 -1
  172. package/.next/standalone/app/api/scraper/route.js +5 -1
  173. package/.next/standalone/app/api/social/crm/route.js +37 -0
  174. package/.next/standalone/app/api/social/messages/route.js +44 -8
  175. package/.next/standalone/app/api/social/route.js +80 -22
  176. package/.next/standalone/app/components/GalaxyLab.js +4 -1
  177. package/.next/standalone/app/components/ScanStatusBar.js +97 -71
  178. package/.next/standalone/app/components/settings/DataSection.js +12 -3
  179. package/.next/standalone/app/globals.css +15 -0
  180. package/.next/standalone/app/paths/page.js +0 -2
  181. package/.next/standalone/app/profile/page.js +0 -2
  182. package/.next/standalone/app/queue/page.js +0 -2
  183. package/.next/standalone/app/scores/page.js +0 -2
  184. package/.next/standalone/app/settings/page.js +0 -2
  185. package/.next/standalone/app/setup/page.js +0 -2
  186. package/.next/standalone/app/social/Crm.js +683 -0
  187. package/.next/standalone/app/social/Thread.js +90 -0
  188. package/.next/standalone/app/social/page.js +71 -62
  189. package/.next/standalone/lib/data-export.js +10 -4
  190. package/.next/standalone/lib/data-folder.js +9 -0
  191. package/.next/standalone/lib/data-import.js +13 -3
  192. package/.next/standalone/lib/island.js +36 -0
  193. package/.next/standalone/lib/linkedin-export.js +267 -46
  194. package/.next/standalone/lib/social-crm.js +415 -0
  195. package/.next/standalone/lib/social-store.js +13 -6
  196. package/.next/standalone/package-lock.json +2 -2
  197. package/.next/standalone/package.json +1 -1
  198. package/.next/standalone/scripts/scrape.py +126 -22
  199. package/.next/static/chunks/0a5iadnmt9u9k.js +1 -0
  200. package/.next/static/chunks/15sjx07xhpn6p.js +1 -0
  201. package/.next/static/chunks/{054zdthcnyd2h.js → 160wjb73ddwqd.js} +1 -1
  202. package/.next/static/chunks/1a74dky22dxd6.js +1 -0
  203. package/.next/static/chunks/{04bbi55urkrd6.js → 1c_n0973t07l0.js} +1 -1
  204. package/.next/static/chunks/{0bo1dxn5gwzpk.css → 1x_ysly42-teq.css} +1 -1
  205. package/.next/static/chunks/{1_mohm2643nxp.js → 236f0jtp68j_h.js} +1 -1
  206. package/.next/static/chunks/297e1z34yi--z.js +1 -0
  207. package/.next/static/chunks/2_ak6qjxb6oa5.js +1 -0
  208. package/.next/static/chunks/{38wwtni5e1ec1.js → 39hr8d-b2ibtw.js} +1 -1
  209. package/.next/static/chunks/3ui4d-uqkqj5d.js +2 -0
  210. package/.next/{standalone/.next/static/chunks/1z_rt4jteewqp.js → static/chunks/3zw8bv7-mc4n6.js} +1 -1
  211. package/CHANGELOG.md +57 -0
  212. package/lib/data-export.js +10 -4
  213. package/lib/data-folder.js +9 -0
  214. package/lib/data-import.js +13 -3
  215. package/lib/island.js +36 -0
  216. package/lib/linkedin-export.js +267 -46
  217. package/lib/social-crm.js +415 -0
  218. package/lib/social-store.js +13 -6
  219. package/package.json +1 -1
  220. package/scripts/scrape.py +126 -22
  221. package/.next/standalone/.next/server/chunks/[root-of-the-server]__08f5awg._.js +0 -8
  222. package/.next/standalone/.next/server/chunks/lib_18cr1gi._.js +0 -8
  223. package/.next/standalone/.next/server/chunks/ssr/_0ezj4e0._.js +0 -3
  224. package/.next/standalone/.next/server/chunks/ssr/_1errbuf._.js +0 -3
  225. package/.next/standalone/.next/server/chunks/ssr/app_components_ui_0pdmz2z.js +0 -3
  226. package/.next/standalone/.next/static/chunks/2bftn9gubwf0w.js +0 -1
  227. package/.next/standalone/.next/static/chunks/2pw6_osz1n_te.js +0 -1
  228. package/.next/standalone/.next/static/chunks/39csdcx7yv227.js +0 -1
  229. package/.next/standalone/.next/static/chunks/3yzlf70j5t0-o.js +0 -1
  230. package/.next/standalone/.next/static/chunks/3z-swu5pet507.js +0 -1
  231. package/.next/standalone/app/social/Conversations.js +0 -246
  232. package/.next/static/chunks/2bftn9gubwf0w.js +0 -1
  233. package/.next/static/chunks/2pw6_osz1n_te.js +0 -1
  234. package/.next/static/chunks/39csdcx7yv227.js +0 -1
  235. package/.next/static/chunks/3yzlf70j5t0-o.js +0 -1
  236. package/.next/static/chunks/3z-swu5pet507.js +0 -1
  237. /package/.next/standalone/.next/static/{yPlsfKhdS8MMtyXF7twSZ → jqE2D3zWqSGz5su948Azf}/_buildManifest.js +0 -0
  238. /package/.next/standalone/.next/static/{yPlsfKhdS8MMtyXF7twSZ → jqE2D3zWqSGz5su948Azf}/_clientMiddlewareManifest.js +0 -0
  239. /package/.next/standalone/.next/static/{yPlsfKhdS8MMtyXF7twSZ → jqE2D3zWqSGz5su948Azf}/_ssgManifest.js +0 -0
  240. /package/.next/static/{yPlsfKhdS8MMtyXF7twSZ → jqE2D3zWqSGz5su948Azf}/_buildManifest.js +0 -0
  241. /package/.next/static/{yPlsfKhdS8MMtyXF7twSZ → jqE2D3zWqSGz5su948Azf}/_clientMiddlewareManifest.js +0 -0
  242. /package/.next/static/{yPlsfKhdS8MMtyXF7twSZ → jqE2D3zWqSGz5su948Azf}/_ssgManifest.js +0 -0
@@ -1 +1 @@
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.jsx)("div",{id:"scan-bar-slot"}),(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()}])}]);
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()}])}]);
@@ -0,0 +1 @@
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),[I,D]=(0,n.useState)(null),[M,R]=(0,n.useState)(null),[$,F]=(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),D(null),R(null),F(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),D(null),R(null),F(void 0),E(0),N(!1);try{let{ok:e,d:t}=await l({action:"install-release"});t.job&&B(t.job),!e&&(D(t.error||"The update could not start."),R(t.refusal||null),"fallback"in t&&F(t.fallback))}catch(e){D(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"===M,K=void 0!==$?$:r?.fallback,_=r?.newer&&(!o||K)&&(!V||H||I||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."}),I&&(0,t.jsx)(s.Status,{tone:"bad",children:I}),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||I?"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 I({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 D(){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 M(){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,M]=(0,n.useState)(!0),[R,$]=(0,n.useState)(null),[F,z]=(0,n.useState)(!1),[E,L]=(0,n.useState)(!1),N=(0,n.useRef)(null),A=(0,n.useRef)(!1),O=(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 U(){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 W(){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 Y(){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,social:x})});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 P(){if(R){l("import"),y(null);try{let t={"Content-Type":"application/octet-stream","X-Six-Degrees-Size":String(R.size)};e.people>0&&(t["X-Six-Degrees-Replace"]=String(e.people)),await S(await fetch("/api/data/import",{method:"POST",headers:t,body:R}),"The file could not be imported."),$(null),z(!1),N.current&&(N.current.value=""),await O()}catch(e){e.data?.needsConfirm&&(z(!1),await O()),y({tone:"bad",text:e.message})}finally{l(null)}}}async function H(){l("cancel"),y(null);try{await S(await fetch("/api/data/import",{method:"DELETE"}),"The import could not be cancelled."),await O(),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 V(){l("restart"),y(null);try{await S(await fetch("/api/data/restart",{method:"POST"}),"Six Degrees could not restart."),L(!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)}L(!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)(()=>{O()},[O]),(0,n.useEffect)(()=>{e&&!A.current&&(A.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 G=e.pending,K=e.photosInCopy||e.photos,_=e.backups||[],q=_.reduce((e,t)=>e+(t.bytes||0),0),J=!!(R&&R.size>e.maxImportBytes),X=e.people>0,Q=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:U,children:"Copy the path"}),(0,t.jsx)(s.Btn,{onClick:W,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)(I,{label:"Your network",children:[j(e.people,"person","people")," · ",m(e.databaseBytes)]}),(0,t.jsx)(I,{label:"Profile photos",children:e.photos.count?`${b(e.photos.count)} \xb7 ${m(e.photos.bytes)}`:"none saved yet"}),(0,t.jsx)(I,{label:"Backups",children:_.length?`${j(_.length,"copy","copies")} \xb7 ${m(q)}`:"none yet"}),(0,t.jsx)(I,{label:"LinkedIn sign-in for scanning",children:e.linkedinSignIn?"kept here, never put in a copy":"not signed in on this computer"})]}),_.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:_.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",K.count?` (${b(K.count)}, ${m(K.bytes)})`:"",". They can’t be downloaded again without a new scan."]})]}),(0,t.jsxs)("label",{style:C,children:[(0,t.jsx)("input",{type:"checkbox",checked:x,onChange:e=>M(e.target.checked),style:{marginTop:3}}),(0,t.jsx)("span",{children:"Include the Social tab: its findings, your CRM notes, stages and follow-ups, and any messages you keep there."})]}),(0,t.jsxs)("div",{style:v,children:[(0,t.jsx)(s.Btn,{primary:!0,onClick:Y,disabled:!!r||E||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. With the Social tab included, the copy also holds your CRM notes and any messages you keep, so it’s as private as your inbox."}),(0,t.jsx)("h3",{style:T,children:"Bring in a network from another computer"}),G?(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",G.exportedAt?` saved ${w(G.exportedAt,!1)}`:""," ","(",j(G.people,"person","people"),G.photos?`, ${j(G.photos,"photo")}`:"",G.fromVersion?`, from Six Degrees ${G.fromVersion}`:"",")",G.replacedPeople>0?` replaces the ${j(G.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."]}),G.error&&(0,t.jsxs)("div",{style:{color:"#ff7676",marginTop:6},children:["The last try stopped: ",G.error.replace(/\.$/,""),". It tries again the next time Six Degrees starts."]}),E?(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:V,disabled:!!r,children:"restart"===r?"Restarting…":"Restart now"}),!G.started&&(0,t.jsx)(s.Btn,{onClick:H,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:N,type:"file",accept:".sixdegrees",onChange:function(e){y(null),z(!1),$(e.target.files?.[0]||null)},style:{display:"none"}}),(0,t.jsxs)("div",{style:v,children:[(0,t.jsx)(s.Btn,{onClick:()=>N.current?.click(),disabled:!!r,children:"Choose a file…"}),R&&(0,t.jsxs)("span",{style:{fontSize:13,color:"#c8d0d0",wordBreak:"break-all"},children:[R.name," · ",m(R.size)]})]}),J&&(0,t.jsxs)(s.Status,{tone:"bad",children:["That file is ",m(R.size),". This copy can import files up to ",m(e.maxImportBytes),"."]}),R&&X&&!J&&(0,t.jsxs)("label",{style:C,children:[(0,t.jsx)("input",{type:"checkbox",checked:F,onChange:e=>z(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:P,disabled:!R||J||X&&!F||!!r,children:"import"===r?"Checking the file…":"Import"})})]}),u&&(0,t.jsx)(s.Status,{tone:u.tone,children:u.text}),Q&&!G&&(e.importIsRecent?(0,t.jsxs)(s.Status,{tone:"ok",children:["Imported ",w(Q.appliedAt),": ",j(Q.people,"person","people"),Q.exportedAt?` from the copy saved ${w(Q.exportedAt,!1)}`:"",".",Q.keptDatabase&&(0,t.jsxs)(t.Fragment,{children:[" ","What was here before is kept in ",(0,t.jsx)(s.Mono,{children:Q.keptDatabase}),Q.keptFiles?", with its photos and files beside it":"",".",Q.keptAsIs&&" It couldn’t be read, so it was kept exactly as it was."," ","To go back to it, see ",(0,t.jsx)(D,{}),"."]})]}):(0,t.jsxs)(s.Body,{style:B,children:["Last import: ",w(Q.appliedAt)," (",j(Q.people,"person","people"),").",Q.keptDatabase&&(0,t.jsxs)(t.Fragment,{children:[" What was here before is kept in ",(0,t.jsx)(s.Mono,{children:Q.keptDatabase})," (",(0,t.jsx)(D,{}),")."]})]}))]})}var R=e.i(64745);let $={"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 F(){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))},[]),R.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)(M,{}),(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 ",$[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)(F,{})})}],5445)}]);
@@ -0,0 +1 @@
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:r,ready:l}=(0,n.useUser)();return l&&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:l?(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…"})})}])},28867,86106,e=>{"use strict";var t=e.i(71645),n=e.i(7214);let r=Object.freeze({known:!1,sent:new Set,mine:new Map,version:0}),l=new Set,o=r,i=null,a=new Map;function s(e=o.sent,t=o.known){for(let n of(o=Object.freeze({known:t,sent:e,mine:new Map(a),version:o.version+1}),[...l]))n()}function u(e){return l.add(e),i||o.known||(i=fetch("/api/outreach").then(e=>e.ok?e.json():null).then(e=>{e&&s(new Set((e.pending||[]).map(n.keyFor)),!0)}).catch(()=>{}).finally(()=>{i=null})),()=>l.delete(e)}function f(){return o}async function c(e){let t=await fetch("/api/outreach",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json().catch(()=>({}));if(!t.ok)throw Error(n.error||"Could not save that.");return n}async function d(e,{bridgeId:t}={}){let r=(0,n.keyFor)(e),l=a.has(r)?a.get(r):void 0;a.set(r,!0),s();try{return await c({action:"mark-sent",connectionId:e.id,profileUrl:e.profile_url,bridgeId:t})}catch(e){throw void 0===l?a.delete(r):a.set(r,l),s(),e}}async function m(e){let t=(0,n.keyFor)(e),r=a.has(t)?a.get(t):void 0;a.set(t,!1),s();try{return await c({action:"undo",connectionId:e.id,profileUrl:e.profile_url})}catch(e){throw void 0===r?a.delete(t):a.set(t,r),s(),e}}e.s(["REQUESTS_UNKNOWN",0,r,"hasRequest",0,function(e,t=o){if(!e)return!1;let r=(0,n.keyFor)(e);return t.mine.has(r)?t.mine.get(r):t.known?t.sent.has(r):"pending"===e.unlock_status||"sent"===e.outreach_status},"markRequested",0,d,"requestCount",0,function(e=o){let t=new Set(e.known?e.sent:[]);for(let[n,r]of e.mine)r?t.add(n):t.delete(n);return t.size},"requestsNow",0,f,"undoRequest",0,m,"watchRequests",0,u],86106),e.s(["default",0,function(){return(0,t.useSyncExternalStore)(u,f,()=>r)}],28867)},64666,e=>{"use strict";var t=e.i(7214);function n(e=[],r=[]){let l=new Set((r||[]).map(t.keyFor)),o=new Map;for(let n of e||[]){let e=n?.source_connection_id;if(null==e)continue;let r=(0,t.keyFor)(n);if(l.has(r))continue;let i=o.get(r);i||o.set(r,i=new Set),i.add(e)}let i=new Map;for(let e of o.values())for(let t of e){let n=i.get(t)||{reach:0,only:0,total:0};n.reach+=1/e.size,n.total+=1,1===e.size&&(n.only+=1),i.set(t,n)}return i}e.s(["bridgeOverlap",0,function(e=[],r=[]){let l=n(e,r),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 l=i.get(r);l||i.set(r,l=new Set),l.add(e)}let a=new Map;for(let e of i.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 s=new Map;for(let[e,t]of a){let[n,r]=e.split("|"),o=l.get(n).total+l.get(r).total-t,i=o?t/o:0;for(let[e,l]of[[n,r],[r,n]]){let n=s.get(e);(!n||i>n.share)&&s.set(e,{with:l,share:i,shared:t})}}return s},"exclusiveReach",0,n,"redundancy",0,function(e=[],t=[]){let r=n(e,t),l=0,o=0;for(let e of r.values())l+=e.reach,o+=e.only;return l?1-o/l:0}])},39160,84278,e=>{"use strict";var t=e.i(7214),n=e.i(7837);function r(e){let t=String(e||"").trim();if(!t)return null;let n=t.match(/^(\d{4})-(\d{2})-(\d{2})[ T](\d{2}):(\d{2})(?::(\d{2}))?(?:\s*UTC)?$/);if(n)return Date.UTC(+n[1],n[2]-1,+n[3],+n[4],+n[5],+(n[6]||0));if(n=t.match(/^(\d{1,2})\/(\d{1,2})\/(\d{2,4}),?\s+(\d{1,2}):(\d{2})\s*(AM|PM)?$/i)){let e=100>+n[3]?2e3+ +n[3]:+n[3],t=n[4]%12;return"PM"===(n[6]||"").toUpperCase()&&(t+=12),Date.UTC(e,n[1]-1,+n[2],t,+n[5])}if(n=t.match(/^([A-Za-z]{3,9})\s+(\d{4})$/)){let e=Date.parse(`1 ${n[1]} ${n[2]} UTC`);return Number.isNaN(e)?null:e}let r=Date.parse(/\d{4}$/.test(t)?`${t} UTC`:t);return Number.isNaN(r)?null:r}let l=e=>(0,t.keyFor)({profile_url:e});function o(e=[]){let t=new Map;for(let n of e){let e=l(n["sender profile url"]),r=n["conversation id"];r&&e&&(t.has(e)||t.set(e,new Set),t.get(e).add(r))}let n=null;for(let[e,r]of t)(!n||r.size>t.get(n).size)&&(n=e);return n}let i=e=>{let t=d(e);return t?`name:${t}`:null},a=/sponsored/i,s=/in\s?mail/i,u=/linkedin\.com\/(company|showcase|school)\//i,f=e=>/^(yes|true|1)$/i.test(String(e||"").trim());function c(e,t){if(!e||!e.total)return"never";let n=t-e.last;return n<=2592e6||e.recent>=3?"warm":n<=31536e6?"cool":"dormant"}let d=e=>String(e||"").split(",")[0].normalize("NFD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9 ]+/g," ").replace(/\s+/g," ").trim();e.s(["buildConversations",0,function(e=[],{keepText:t=!1}={}){let n=o(e),c=new Map;for(let t of e)n&&l(t["sender profile url"])===n&&t.from&&c.set(t.from,(c.get(t.from)||0)+1);let m=d([...c].sort((e,t)=>t[1]-e[1])[0]?.[0]||""),p=e=>!!e&&(e===n||!!m&&e===`name:${m}`),g={},h=new Map,y=0,w=0;for(let n of e){let e=n["conversation id"],o=r(n.date);if(!e||null==o){w+=1;continue}if(f(n["is message draft"])){y+=1;continue}let c=l(n["sender profile url"])||i(n.from);c&&n.from&&!g[c]&&(g[c]=String(n.from).trim());let d=String(n["recipient profile urls"]||"").split(/[,;\s]+/).filter(Boolean).map(l),m=String(n.to||"").split(",").map(e=>e.trim()).filter(Boolean),S=d.length?d:m.map(i).filter(Boolean);d.length&&d.length===m.length&&d.forEach((e,t)=>{g[e]||(g[e]=m[t])}),d.length||m.forEach(e=>{let t=i(e);t&&!g[t]&&(g[t]=e)}),h.has(e)||h.set(e,{id:e,title:"",everyone:new Set,messages:[],kind:null,folder:"",newest:-1/0});let b=h.get(e);c&&b.everyone.add(c),S.forEach(e=>b.everyone.add(e)),b.kind=b.kind||function(e){let t=String(e.folder||""),n=String(e["conversation title"]||"");return a.test(t)||a.test(n)||u.test(String(e["sender profile url"]||""))?"sponsored":s.test(t)||s.test(n)?"inmail":null}(n),o>=b.newest&&(b.newest=o,b.folder=String(n.folder||"").trim().toLowerCase().slice(0,30));let v={t:o,fromMe:p(c)};t&&(v.text=[n.subject,n.content].map(e=>String(e||"").trim()).filter(Boolean).join("\n\n"),!b.title&&n["conversation title"]&&(b.title=String(n["conversation title"]).trim())),b.messages.push(v)}let S=[];for(let e of h.values()){let n=[...e.everyone].filter(e=>e&&!p(e)).sort();e.messages.sort((e,t)=>e.t-t.t);let r={id:e.id,people:n,group:n.length>1,kind:e.kind,folder:e.folder,messages:e.messages};t&&(r.title=e.title),S.push(r)}for(let e of Object.keys(g))p(e)&&delete g[e];return{self:n,conversations:S,names:g,drafts:y,skipped:w}},"buildInvitations",0,function(e=[],{keepText:t=!1}={}){let n=[];for(let o of e){let e=String(o.direction||"").toUpperCase();if("INCOMING"!==e&&"OUTGOING"!==e)continue;let a="INCOMING"===e?"in":"out",s=String(("in"===a?o.from:o.to)||"").trim(),u=l("in"===a?o.inviterprofileurl:o.inviteeprofileurl),f=(u&&/\/in\//.test(u)?u:null)||i(s);if(!f)continue;let c=r(o["sent at"]),d={id:`${a}|${f}|${c??""}`,dir:a,key:f,name:s.slice(0,120),t:c};t&&String(o.message||"").trim()&&(d.note=String(o.message).trim().slice(0,2e3)),n.push(d)}return n.sort((e,t)=>(t.t||0)-(e.t||0))},"careerChapters",0,function(e=[],t=[],n=Date.now()){let o=e.map(e=>({company:e["company name"]||"",title:e.title||"",from:r(e["started on"]),to:r(e["finished on"])})).filter(e=>e.company&&null!=e.from).sort((e,t)=>e.from-t.from),i=t.map(e=>({url:l(e.url||e.profile_url),t:r(e["connected on"]||e.connected_on)})).filter(e=>null!=e.t);return o.map(e=>{let t=e.to??n,r=i.filter(n=>n.t>=e.from&&n.t<t);return{...e,to:e.to,made:r.length,people:r.map(e=>e.url)}})},"conversationSummary",0,function(e){let t=e.messages[e.messages.length-1];return{id:e.id,people:e.people,group:e.group,kind:e.kind||null,folder:e.folder||"",last:t?t.t:null,lastFromThem:t?!t.fromMe:null,count:e.messages.length,mine:e.messages.filter(e=>e.fromMe).length}},"invitationSplit",0,function(e=[]){let t=0,n=0;for(let r of e){let e=String(r.direction||"").toUpperCase();"INCOMING"===e?t+=1:"OUTGOING"===e&&(n+=1)}return{incoming:t,outgoing:n,total:t+n}},"messageStats",0,function(e=[]){let t=o(e),n=new Map;for(let t of e){let e=l(t["sender profile url"]),o=t["conversation id"];if(!o||!e)continue;let i=String(t["recipient profile urls"]||"").split(/[,;\s]+/).filter(Boolean).map(l),a=r(t.date);if(null==a)continue;n.has(o)||n.set(o,{people:new Set,msgs:[]});let s=n.get(o);s.people.add(e),i.forEach(e=>s.people.add(e)),s.msgs.push({from:e,t:a})}let i=0,a=new Map;for(let e of n.values()){let n=[...e.people].filter(e=>e!==t);if(1!==n.length||!e.people.has(t))continue;let r=n[0],l=a.get(r)||{last:0,lastFromThem:!1,total:0,times:[]};for(let n of e.msgs)l.total+=1,l.times.push(n.t),n.t>=l.last&&(l.last=n.t,l.lastFromThem=n.from!==t),n.t>i&&(i=n.t);a.set(r,l)}for(let e of a.values())e.recent=e.times.filter(e=>e>i-7776e6).length,delete e.times;return{self:t,asOf:i||null,people:a}},"nameKey",0,d,"postingEffect",0,function(e=[],t=[]){let n=e.map(e=>({t:r(e.date),link:e.sharelink||e["share link"]||""})).filter(e=>null!=e.t).sort((e,t)=>e.t-t.t),l=t.map(e=>r(e["connected on"]||e.connected_on)).filter(e=>null!=e).sort((e,t)=>e-t);if(!l.length)return{posts:[],usualWeek:0,afterPosts:0};let o=Math.max(6048e5,l[l.length-1]-l[0]),i=l.length/o*6048e5,a=n.map(e=>({...e,week:l.filter(t=>t>=e.t&&t<e.t+6048e5).length})),s=a.length?a.reduce((e,t)=>e+t.week,0)/a.length:0;return{posts:a,usualWeek:i,afterPosts:s}},"readTable",0,function(e,t){let r=(0,n.parseCsv)(String(e||"")),l=r.findIndex(e=>e.some(e=>e.trim().toLowerCase()===t.toLowerCase()));if(l<0)return[];let o=r[l].map(e=>e.trim().toLowerCase());return r.slice(l+1).filter(e=>e.some(e=>e.trim())).map(e=>Object.fromEntries(o.map((t,n)=>[t,(e[n]??"").trim()])))},"warmthOf",0,c],84278);let m="six-degrees-galaxy-lab",p="six-degrees-galaxy-layouts",g=Object.freeze({on:!1,gravity:0,rings:1,push:15,pull:1,distance:1,dotSize:1,lines:1,sizeBy:"power",names:"key",branch:!0,colourBy:"tier",speed:15,loop:!1,labels:!0}),h=["gravity","rings","push","pull","distance","dotSize","lines","sizeBy","names","branch","colourBy","speed","loop"],y=Object.freeze({gravity:.25,rings:0,push:25,pull:2.5,distance:.35,sizeBy:"reach"}),w=new Set,S=null;function b(){return S||(S=function(){try{let e=JSON.parse(localStorage.getItem(m)||"null");return e&&"object"==typeof e?{...g,...e}:g}catch{return g}}()),S}function v(e){S=null===e?{...g,on:b().on,labels:b().labels}:{...b(),...e};try{localStorage.setItem(m,JSON.stringify(S))}catch{}w.forEach(e=>e())}let k=null,M=new Set;function F(){if(!k){try{k=JSON.parse(localStorage.getItem(p)||"[]")}catch{k=[]}Array.isArray(k)||(k=[])}return k}function C(e){k=e;try{localStorage.setItem(p,JSON.stringify(e))}catch{}M.forEach(e=>e())}let _=new Set,x={at:null,playing:!1,min:null,max:null,of:0,find:"",fly:0,found:0,social:void 0},I=null;function N(e){let t={...x,...e};Object.keys(e).every(e=>Object.is(t[e],x[e]))||(x=t,_.forEach(e=>e()))}function O(){cancelAnimationFrame(I),I=null,N({playing:!1})}let B=null;function T(e){let n=new Map;for(let[r,l]of Object.entries(e?.people||{}))n.set((0,t.keyFor)({profile_url:r}),{...l});for(let[r,l]of Object.entries(e?.live||{})){let e=(0,t.keyFor)({profile_url:r}),o=n.get(e)||{total:0,recent:0};l.last&&(!o.last||l.last>o.last)&&(o.last=l.last,"boolean"==typeof l.lastFromThem&&(o.lastFromThem=l.lastFromThem)),o.unread=l.unread,o.total=Math.max(o.total||0,1),n.set(e,o)}let r=Math.max(e?.asOf||0,e?.liveAt&&Date.parse(e.liveAt)||0);for(let e of n.values())(e.last||0)>r&&(r=e.last);return{merged:n,asOf:r,chapters:e?.chapters||[],posts:e?.posts?.posts||[]}}let A={1:"#4FC3F7",2:"#BA68C8",3:"#FFB74D"},j=["#FF6B6B","#4ECDC4","#FFD93D","#A29BFE","#00B894","#FD79A8","#74B9FF","#E17055"],E={warm:"#FF7043",cool:"#4FC3F7",dormant:"#8D6E63",never:"#546E7A"},D="#4a5568",U=e=>String(e||"").trim().toLowerCase();e.s(["CLUSTERS",0,y,"LAB_DEFAULTS",0,g,"applyLayout",0,function(e){let t=F().find(t=>t.name===e);t&&v(Object.fromEntries(h.filter(e=>e in t.settings).map(e=>[e,t.settings[e]])))},"bornTimes",0,function(e,t){let n=new Map(e.map(e=>[e.id,e])),r=new Map,l=(e,o=0)=>{if(r.has(e.id))return r.get(e.id);let i=-1/0,a=t.get(e.id);if(1===e.degree||null==a||o>6){let t=e.connected_date?Date.parse(e.connected_date):NaN;i=Number.isNaN(t)?-1/0:t}return null!=a&&n.has(a)&&o<=6&&(i=Math.max(i,l(n.get(a),o+1))),r.set(e.id,i),i};return e.map(e=>l(e))},"chapterAt",0,function(e,t){let n=null;for(let r of e?.chapters||[])Number.isFinite(r.from)&&r.from<=t&&(!n||r.from>n.from)&&(n=r);return n&&(!Number.isFinite(n.to)||n.to>t)?n:null},"clockNow",0,()=>x,"colourScheme",0,function(e,n,r,l){if("degree"===e)return{of:e=>A[Math.min(e.degree||1,3)],legend:[["1st",A[1]],["2nd",A[2]],["3rd+",A[3]]]};if("company"===e){let e=new Map;for(let t of n){let n=U(t.company);if(!n)continue;let r=e.get(n)||{name:String(t.company).trim(),n:0};r.n+=1,e.set(n,r)}let t=[...e.entries()].filter(([,e])=>e.n>1).sort((e,t)=>t[1].n-e[1].n).slice(0,j.length),r=new Map(t.map(([e],t)=>[e,j[t]]));return{of:e=>r.get(U(e.company))||D,legend:[...t.map(([,e],t)=>[e.name,j[t]]),["Other",D]]}}return"warmth"===e&&l?{of:e=>1===(e.degree||1)?E[c(l.merged.get((0,t.keyFor)(e)),l.asOf)]:"#2d3748",legend:[["Warm",E.warm],["Cool",E.cool],["Dormant",E.dormant],["Never messaged",E.never]]}:{of:e=>r[e.tier]||"#666",legend:Object.entries(r)}},"effectiveLab",0,e=>e.on?e:e.labels===g.labels?g:{...g,labels:e.labels},"findMatches",0,function(e,t){let n=String(t||"").trim().toLowerCase();if(n.length<2)return null;let r=new Set;for(let t of e)[t.name,t.company,t.role,t.headline].some(e=>e&&String(e).toLowerCase().includes(n))&&r.add(t.id);return r},"forgetLayout",0,function(e){C(F().filter(t=>t.name!==e))},"labNow",0,b,"layoutsNow",0,F,"loadSocial",0,function(){return B||(B=fetch("/api/social").then(e=>e.ok?e.json():{}).then(e=>{N({social:e.social?T(e.social):null})}).catch(()=>N({social:null}))),B},"mergeSocial",0,T,"milestones",0,function(e){let t=[];for(let n of e?.chapters||[])Number.isFinite(n.from)&&t.push({t:n.from,kind:"job",label:n.company});for(let n of e?.posts||[])Number.isFinite(n.t)&&t.push({t:n.t,kind:"post",label:"You posted"});return t.sort((e,t)=>e.t-t.t)},"pause",0,O,"play",0,function e(){if(null==x.min||null==x.max||x.max<=x.min)return;let t=x.max-x.min,n=1e3*Math.max(1,Number(b().speed)||15),r=null==x.at||x.at>=x.max?x.min:x.at,l=performance.now()-(r-x.min)/t*n;N({at:r,playing:!0});let o=r=>{let i=Math.min(x.max,x.min+(r-l)/n*t);if(N({at:i}),i>=x.max){I=null,N({playing:!1}),b().loop&&setTimeout(()=>{I||x.at!==x.max||(N({at:x.min}),e())},1200);return}I=requestAnimationFrame(o)};cancelAnimationFrame(I),I=requestAnimationFrame(o)},"reachCounts",0,function(e,t){let n=new Map(e.map(e=>[e.id,0]));for(let r of e){let e=t.get(r.id);for(let r=0;null!=e&&r<7;r++)n.set(e,(n.get(e)||0)+1),e=t.get(e)}return n},"saveLayout",0,function(e){let t=String(e||"").trim().slice(0,40);if(!t)return;let n=b(),r=Object.fromEntries(h.map(e=>[e,n[e]]));C([...F().filter(e=>e.name!==t),{name:t,settings:r}])},"setClock",0,N,"setLab",0,v,"stopReplay",0,function(){O(),N({at:null})},"watchClock",0,function(e){return _.add(e),()=>_.delete(e)},"watchLab",0,function(e){w.add(e);let t=t=>{t.key===m&&(S=null,e())};return window.addEventListener("storage",t),()=>{w.delete(e),window.removeEventListener("storage",t)}},"watchLayouts",0,function(e){return M.add(e),()=>M.delete(e)}],39160)},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}])},48235,e=>{"use strict";var t=e.i(7214);function n(e,n){return e?n.scanned.has(e.id)||e.profile_url&&n.read?.has((0,t.keyFor)(e))?"scanned":e.profile_url&&n.hidden.has((0,t.keyFor)(e))?"hidden":"todo":"todo"}function r(e,t){if(!e||1!==e.degree||null==e.unlocked_from_bridge_id)return null;let r=n(e,t);return"todo"===r?"ready":r}e.s(["circleScanCost",0,function(e=100){let t=Math.max(1,Math.min(100,Math.round(e)||100));return{profileViews:1,searches:t,minutes:t>=100?55:Math.max(5,Math.round(.55*t))}},"circleState",0,n,"reachIndex",0,function(e=[],n=[],r={}){let l=new Set;for(let e of n||[])e?.source_connection_id!=null&&l.add(e.source_connection_id);let o=new Set;for(let e of r?.skips||[])e?.profileUrl&&o.add((0,t.keyFor)({profile_url:e.profileUrl}));let i=new Set;for(let e of r?.read||[])e&&i.add((0,t.keyFor)({profile_url:e}));let a=new Map;for(let[e,n]of Object.entries(r?.lists||{}))e&&n&&a.set((0,t.keyFor)({profile_url:e}),n);let s=new Map;for(let t of e||[]){let e=t?.unlocked_from_bridge_id;if(null==e||1!==t.degree)continue;let n=s.get(e);n||s.set(e,n=[]),n.push(t)}return{scanned:l,read:i,hidden:o,reachedFrom:s,lists:a}},"reachState",0,r,"readyByCircle",0,function(e){let t=new Map;for(let[n,l]of e.reachedFrom){let o=l.filter(t=>"ready"===r(t,e)).length;o&&t.set(n,o)}return t},"readyToScan",0,function(e,n){return(e||[]).filter(e=>"ready"===r(e,n)).sort(t.compareBridges)},"scanBars",0,function(e,r){let l=n(e,r),o=e?.profile_url?r.lists?.get((0,t.keyFor)(e)):null;return"hidden"===l?null:o?o.more?o.total?Math.max(1,Math.min(4,Math.round(5*Math.min(1,10*o.pages/o.total)))):2:5:"scanned"===l?2: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 l(e){return Math.round(10*r(e))/10}function o(e){return String(e?.profile_url||"").split(/[?#]/)[0].replace(/\/+$/,"")||`id:${e?.id}`}let i=(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||""))||i(e.id,t.id)}function s(e,t){return e.bridge&&t.bridge?a(e.bridge,t.bridge):e.bridge?-1:t.bridge?1:i(e.id,t.id)}function u(e,t){return t.score-e.score||t.waysIn-e.waysIn||s(e.routes[0]||f,t.routes[0]||f)||String(e.person.name||"").localeCompare(String(t.person.name||""))||(e.key<t.key?-1:+(e.key>t.key))}let f={id:null,bridge:null};function c(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 d(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||u(e,t)},"keyFor",0,o,"routeIndex",0,function(e=[]){let t=new Map;for(let n of e||[]){let e=o(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(o(e))??(null!=e.source_connection_id?new Set([e.source_connection_id]):new Set)].map(e=>({id:e,bridge:n?.get(e)??null})).sort(s):[]},"score",0,r,"score1",0,l,"separationPeople",0,function(e=[],n=[]){let r=new Map;for(let e of n||[])r.set(e.id,e);let a=new Map,f=new Map;for(let n of e||[]){let e=o(n);f.set(n.id,e);let r=a.get(e);r?function(e,n){let r=l(e)-l(n);if(r)return r>0;let o=!!(0,t.localPhoto)(e.profile_image_url);return!!(0,t.localPhoto)(n.profile_image_url)!==o?o:0>i(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 c={people:a.size,byTier:{S:0,A:0,B:0,C:0,D:0},multi:0,bridges:0,unresolvedIds:0,peopleOnlyUnresolved:0,onlyUnresolvedVia:0},d=new Set,m=new Set,p=new Set,g=[];for(let e of a.values()){let t=[...e.routeIds].map(e=>({id:e,bridge:r.get(e)??null}));t.sort(s);let n=t.filter(e=>e.bridge);for(let e of t)(e.bridge?d:m).add(e.id);if(!n.length)for(let e of(c.peopleOnlyUnresolved++,t))p.add(e.id);let{person:o}=e,i=o.tier;void 0!==c.byTier[i]&&c.byTier[i]++,t.length>1&&c.multi++,g.push({key:e.key,person:o,score:l(o),tier:i,routes:t,waysIn:t.length,rowIds:e.rowIds,haystack:[o.name,o.headline,o.company,o.role,...n.map(e=>e.bridge.name)].filter(Boolean).join("\n").toLowerCase(),rank:0,tied:!1})}return c.bridges=d.size,c.unresolvedIds=m.size,c.onlyUnresolvedVia=p.size,g.sort(u),function(e){for(let t=0;t<e.length;t++){let n=e[t],r=e[t-1],l=r&&r.score===n.score&&r.waysIn===n.waysIn;n.rank=l?r.rank:t+1,l&&(n.tied=!0,r.tied=!0)}}(g),{people:g,rowToKey:f,summary:c}},"shortName",0,c,"summitLayout",0,function(e=[],t=800,n=!1){let r=n?36:26,l=Math.round(.42*t),o=Math.round(.58*t),i=e.map((e,n)=>{var l;return{key:e.key,p:e,x:o,y:16+n*r,r:(l=e.waysIn)>=4?8.5:3===l?7:2===l?5.5:4,label:d(`#${e.rank}${e.tied?"=":""} ${e.person.name||""}`,Math.floor((t-o-60)/6.2))}}),s=new Map,u="\0unresolved";for(let e of i)for(let t of e.p.routes){let n=t.bridge?t.id:u,r=s.get(n);r||(r={id:t.bridge?t.id:null,bridge:t.bridge,unresolved:!t.bridge,ys:[],count:0},s.set(n,r)),r.count++,r.ys.push(e.y)}let f=[...s.values()].map(e=>({...e,bary:e.ys.reduce((e,t)=>e+t,0)/e.ys.length}));f.sort((e,t)=>e.bary-t.bary||e.unresolved-t.unresolved||(e.bridge&&t.bridge?a(e.bridge,t.bridge):0));let m=i.length?i[i.length-1].y:16,p=f.length>1?Math.max(18,(m-16)/(f.length-1)):0,g=Math.max(4,Math.floor((l-10-42)/6));f.forEach((e,t)=>{if(e.x=l,e.y=1===f.length?(16+m)/2:16+t*p,e.r=5,e.unresolved)e.label=d(`can't be named (${e.count})`,g);else{let t=e.bridge.name||"";e.label=t.length<=g?t:d(c(t),g)}delete e.ys});let h=new Map(f.map(e=>[e.unresolved?u:e.id,e])),y=[];for(let e of i){let t=new Set;e.p.routes.forEach((n,r)=>{let l=n.bridge?n.id:u;if(t.has(l))return;t.add(l);let o=h.get(l);y.push({key:e.key,bridgeId:o.id,primary:0===r&&!o.unresolved,unresolved:o.unresolved,tier:o.bridge?.tier??null,x1:o.x,y1:o.y,x2:e.x,y2:e.y})})}let w=Math.max(m,f.length?f[f.length-1].y:0),S=i.length?Math.ceil(w+16):0,b={x:20,y:i.length?(16+Math.max(m,w))/2:16,r:14},v=f.map(e=>({id:e.id,x1:b.x,y1:b.y,x2:e.x,y2:e.y}));return{width:t,height:S,you:b,people:i,bridges:f,links:y,spokes:v}}])},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()}])}]);