six-degrees 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +3 -3
  3. package/.next/standalone/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  5. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  10. package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  12. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  14. package/.next/standalone/.next/server/app/api/admin-delete/route.js.nft.json +1 -1
  15. package/.next/standalone/.next/server/app/api/admin-update/route.js.nft.json +1 -1
  16. package/.next/standalone/.next/server/app/api/bridges/route.js.nft.json +1 -1
  17. package/.next/standalone/.next/server/app/api/bulk-import/route.js.nft.json +1 -1
  18. package/.next/standalone/.next/server/app/api/company-scores/legacy/route.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/api/company-scores/route.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/api/connections/route.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/api/data/export/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/data/import/route.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/api/data/restart/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/data/reveal/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/data/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/delete-cluster/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/ingest/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/network/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/outreach/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/api/scraper/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/settings/route.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/api/settings/sector-preview/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/settings/sector-suggestions/route.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/api/setup-profile/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/unlock/route.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/api/update/route.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/api/update-images/route.js.nft.json +1 -1
  40. package/.next/standalone/.next/server/app/api/users/route.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/avatars/[file]/route.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/import.html +1 -1
  43. package/.next/standalone/.next/server/app/import.rsc +1 -1
  44. package/.next/standalone/.next/server/app/import.segments/_full.segment.rsc +1 -1
  45. package/.next/standalone/.next/server/app/import.segments/_tree.segment.rsc +1 -1
  46. package/.next/standalone/.next/server/app/import.segments/import/__PAGE__.segment.rsc +1 -1
  47. package/.next/standalone/.next/server/app/index.html +1 -1
  48. package/.next/standalone/.next/server/app/index.rsc +2 -2
  49. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  50. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +2 -2
  51. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  52. package/.next/standalone/.next/server/app/launch.html +1 -1
  53. package/.next/standalone/.next/server/app/launch.rsc +1 -1
  54. package/.next/standalone/.next/server/app/launch.segments/_full.segment.rsc +1 -1
  55. package/.next/standalone/.next/server/app/launch.segments/_tree.segment.rsc +1 -1
  56. package/.next/standalone/.next/server/app/launch.segments/launch/__PAGE__.segment.rsc +1 -1
  57. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  58. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  59. package/.next/standalone/.next/server/app/paths.html +1 -1
  60. package/.next/standalone/.next/server/app/paths.rsc +1 -1
  61. package/.next/standalone/.next/server/app/paths.segments/_full.segment.rsc +1 -1
  62. package/.next/standalone/.next/server/app/paths.segments/_tree.segment.rsc +1 -1
  63. package/.next/standalone/.next/server/app/paths.segments/paths/__PAGE__.segment.rsc +1 -1
  64. package/.next/standalone/.next/server/app/profile/page.js.nft.json +1 -1
  65. package/.next/standalone/.next/server/app/profile/page_client-reference-manifest.js +1 -1
  66. package/.next/standalone/.next/server/app/profile.html +1 -1
  67. package/.next/standalone/.next/server/app/profile.rsc +2 -2
  68. package/.next/standalone/.next/server/app/profile.segments/_full.segment.rsc +2 -2
  69. package/.next/standalone/.next/server/app/profile.segments/_tree.segment.rsc +1 -1
  70. package/.next/standalone/.next/server/app/profile.segments/profile/__PAGE__.segment.rsc +2 -2
  71. package/.next/standalone/.next/server/app/queue/page.js.nft.json +1 -1
  72. package/.next/standalone/.next/server/app/queue/page_client-reference-manifest.js +1 -1
  73. package/.next/standalone/.next/server/app/queue.html +1 -1
  74. package/.next/standalone/.next/server/app/queue.rsc +2 -2
  75. package/.next/standalone/.next/server/app/queue.segments/_full.segment.rsc +2 -2
  76. package/.next/standalone/.next/server/app/queue.segments/_tree.segment.rsc +1 -1
  77. package/.next/standalone/.next/server/app/queue.segments/queue/__PAGE__.segment.rsc +2 -2
  78. package/.next/standalone/.next/server/app/scores.html +1 -1
  79. package/.next/standalone/.next/server/app/scores.rsc +1 -1
  80. package/.next/standalone/.next/server/app/scores.segments/_full.segment.rsc +1 -1
  81. package/.next/standalone/.next/server/app/scores.segments/_tree.segment.rsc +1 -1
  82. package/.next/standalone/.next/server/app/scores.segments/scores/__PAGE__.segment.rsc +1 -1
  83. package/.next/standalone/.next/server/app/settings.html +1 -1
  84. package/.next/standalone/.next/server/app/settings.rsc +1 -1
  85. package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +1 -1
  86. package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
  87. package/.next/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
  88. package/.next/standalone/.next/server/app/setup/page.js.nft.json +1 -1
  89. package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  90. package/.next/standalone/.next/server/app/setup.html +1 -1
  91. package/.next/standalone/.next/server/app/setup.rsc +2 -2
  92. package/.next/standalone/.next/server/app/setup.segments/_full.segment.rsc +2 -2
  93. package/.next/standalone/.next/server/app/setup.segments/_tree.segment.rsc +1 -1
  94. package/.next/standalone/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +2 -2
  95. package/.next/standalone/.next/server/chunks/_1_fynia._.js +6 -6
  96. package/.next/standalone/.next/server/chunks/_1itd1o_._.js +1 -1
  97. package/.next/standalone/.next/server/chunks/lib_db-client_15le7cw.js +1 -1
  98. package/.next/standalone/.next/server/chunks/ssr/_15xuwkv._.js +1 -1
  99. package/.next/standalone/.next/server/chunks/ssr/_1hgd5dp._.js +1 -1
  100. package/.next/standalone/.next/server/chunks/ssr/_20w06i-._.js +1 -1
  101. package/.next/standalone/.next/server/chunks/ssr/app_page_1fazqbf.js +4 -4
  102. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  103. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  104. package/.next/standalone/.next/server/pages/404.html +1 -1
  105. package/.next/standalone/.next/server/pages/500.html +1 -1
  106. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  107. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  108. package/.next/standalone/.next/static/chunks/{3e8zg6ctvvb8p.js → 049vavjsmqgmn.js} +3 -3
  109. package/.next/standalone/.next/static/chunks/0ljxa-wk_iu__.js +18 -0
  110. package/.next/{static/chunks/3ol1xux1-ofm4.js → standalone/.next/static/chunks/0mp9b72fm-jp6.js} +2 -2
  111. package/.next/standalone/.next/static/chunks/1pre1cotntk6-.js +1 -0
  112. package/.next/standalone/.next/static/chunks/{18xu0fbgo_qz-.js → 22x2_r768-u5i.js} +1 -1
  113. package/.next/standalone/CHANGELOG.md +27 -0
  114. package/.next/standalone/app/api/scraper/route.js +10 -2
  115. package/.next/standalone/app/components/ChainView.js +17 -10
  116. package/.next/standalone/app/components/ForceGraph.js +106 -13
  117. package/.next/standalone/app/components/OrbitGraph.js +92 -30
  118. package/.next/standalone/lib/dot-rings.js +21 -0
  119. package/.next/standalone/lib/reach.js +22 -1
  120. package/.next/standalone/package-lock.json +2 -2
  121. package/.next/standalone/package.json +1 -1
  122. package/.next/standalone/scripts/scrape.py +10 -0
  123. package/.next/static/chunks/{3e8zg6ctvvb8p.js → 049vavjsmqgmn.js} +3 -3
  124. package/.next/static/chunks/0ljxa-wk_iu__.js +18 -0
  125. package/.next/{standalone/.next/static/chunks/3ol1xux1-ofm4.js → static/chunks/0mp9b72fm-jp6.js} +2 -2
  126. package/.next/static/chunks/1pre1cotntk6-.js +1 -0
  127. package/.next/static/chunks/{18xu0fbgo_qz-.js → 22x2_r768-u5i.js} +1 -1
  128. package/CHANGELOG.md +27 -0
  129. package/lib/dot-rings.js +21 -0
  130. package/lib/reach.js +22 -1
  131. package/package.json +1 -1
  132. package/scripts/scrape.py +10 -0
  133. package/.next/standalone/.next/static/chunks/10784r7w7t5gw.js +0 -18
  134. package/.next/standalone/.next/static/chunks/2pnbm1z6j7xab.js +0 -1
  135. package/.next/static/chunks/10784r7w7t5gw.js +0 -18
  136. package/.next/static/chunks/2pnbm1z6j7xab.js +0 -1
  137. /package/.next/standalone/.next/static/{LlDgA9g8ToBkDLlo9Qtov → wGVrXBkFLmEB4snfhtOcO}/_buildManifest.js +0 -0
  138. /package/.next/standalone/.next/static/{LlDgA9g8ToBkDLlo9Qtov → wGVrXBkFLmEB4snfhtOcO}/_clientMiddlewareManifest.js +0 -0
  139. /package/.next/standalone/.next/static/{LlDgA9g8ToBkDLlo9Qtov → wGVrXBkFLmEB4snfhtOcO}/_ssgManifest.js +0 -0
  140. /package/.next/static/{LlDgA9g8ToBkDLlo9Qtov → wGVrXBkFLmEB4snfhtOcO}/_buildManifest.js +0 -0
  141. /package/.next/static/{LlDgA9g8ToBkDLlo9Qtov → wGVrXBkFLmEB4snfhtOcO}/_clientMiddlewareManifest.js +0 -0
  142. /package/.next/static/{LlDgA9g8ToBkDLlo9Qtov → wGVrXBkFLmEB4snfhtOcO}/_ssgManifest.js +0 -0
@@ -213,49 +213,108 @@ const OrbitGraph = forwardRef(function OrbitGraph(
213
213
  const links = [];
214
214
  let sceneRadius = TIER_RING_RADIUS.B + 70;
215
215
  if (degreesMode) {
216
- // One ring of the people you've mapped, biggest circle first, each given
217
- // an equal wedge. Their circle fans outward in arcs: the most powerful
218
- // closest to them, dot size and colour by their own power and tier.
219
- const ordered = [...d1Nodes].sort((a, b) =>
220
- (clusters.get(b.id)?.length || 0) - (clusters.get(a.id)?.length || 0));
216
+ // Someone you added through a circle, whose own circle is scanned, sits in
217
+ // the fan of the circle they came from, and their people fan out behind
218
+ // them a band further out, and theirs behind them, to 6th degree (Blake,
219
+ // 2026-09-29: Orbit stopped at each connection's 2nd degree).
220
+ const nestedIn = new Map();
221
+ const nested = new Set();
222
+ for (const d of d1Nodes) {
223
+ const from = d.connection?.unlocked_from_bridge_id;
224
+ if (from == null || from === d.id || !d1NodeById.has(from)) continue;
225
+ nested.add(d.id);
226
+ const list = nestedIn.get(from);
227
+ if (list) list.push(d); else nestedIn.set(from, [d]);
228
+ }
229
+ // Everyone reachable from someone on the ring is drawn in a fan; anyone
230
+ // else (a loop of introductions) goes on the ring.
231
+ const onRing = d1Nodes.filter((d) => !nested.has(d.id));
232
+ const inFans = new Set();
233
+ const walk = (d) => { for (const p of nestedIn.get(d.id) || []) if (!inFans.has(p.id)) { inFans.add(p.id); walk(p); } };
234
+ onRing.forEach(walk);
235
+ for (const d of d1Nodes) if (nested.has(d.id) && !inFans.has(d.id)) onRing.push(d);
236
+ const behind = new Map();
237
+ const reachOf = (d, stack = new Set()) => {
238
+ if (behind.has(d.id)) return behind.get(d.id);
239
+ if (stack.has(d.id)) return 0;
240
+ stack.add(d.id);
241
+ let count = clusters.get(d.id)?.length || 0;
242
+ for (const p of nestedIn.get(d.id) || []) count += 1 + reachOf(p, stack);
243
+ stack.delete(d.id);
244
+ behind.set(d.id, count);
245
+ return count;
246
+ };
247
+
248
+ // One ring of the people you've mapped, biggest reach first, each given
249
+ // a wedge; their circle fans outward in arcs, the most powerful closest.
250
+ const ordered = [...onRing].sort((a, b) => reachOf(b) - reachOf(a));
221
251
  const n = Math.max(1, ordered.length);
222
252
  const R = Math.max(140, n * 9);
223
253
  // Room in proportion to how many are behind each person (square-rooted,
224
254
  // so one huge circle can't take the whole ring): big circles spread into
225
255
  // fans instead of shooting out as thin spikes.
226
- const weight = (d) => Math.sqrt((clusters.get(d.id)?.length || 0) + 4);
256
+ const weight = (d) => Math.sqrt(reachOf(d) + 4);
227
257
  const total = ordered.reduce((sum, d) => sum + weight(d), 0) || 1;
228
- let cursor = -Math.PI / 2;
229
- ordered.forEach((b) => {
230
- const share = (weight(b) / total) * Math.PI * 2;
231
- const angle = cursor + share / 2;
232
- cursor += share;
233
- const wedge = Math.min(share * 0.88, 1.6);
234
- b.x = b.fx = Math.cos(angle) * R;
235
- b.y = b.fy = Math.sin(angle) * R;
236
- b.hub = true;
237
- b.r = 9 + Math.min(10, (clusters.get(b.id)?.length || 0) / 40);
238
- const people = [...(clusters.get(b.id) || [])]
239
- .sort((p, q) => (Number(q.power_score) || 0) - (Number(p.power_score) || 0));
258
+
259
+ // `owner`'s people in rows across `wedge`, from rStart out; someone they
260
+ // added gets their own narrower fan behind them. Returns the outer edge.
261
+ const placeFan = (owner, angle, wedge, rStart, depth) => {
262
+ const people = [
263
+ ...(clusters.get(owner.id) || []).map((c) => ({ c })),
264
+ ...(nestedIn.get(owner.id) || []).filter((p) => inFans.has(p.id)).map((p) => ({ added: p, c: p.connection })),
265
+ ].sort((p, q) => (Number(q.c?.power_score) || 0) - (Number(p.c?.power_score) || 0));
266
+ const far = depth > 2;
267
+ const step = far ? 8 : 9;
268
+ const subs = [];
240
269
  let placed = 0;
241
- let r = R + b.r + 16;
270
+ let r = rStart;
242
271
  while (placed < people.length) {
243
- const fit = Math.max(1, Math.floor((r * wedge) / 9));
272
+ const fit = Math.max(1, Math.floor((r * wedge) / step));
244
273
  const row = people.slice(placed, placed + fit);
245
- row.forEach((c, j) => {
274
+ row.forEach((p, j) => {
246
275
  const a = angle + (row.length === 1 ? 0 : (j / (row.length - 1) - 0.5) * wedge);
276
+ const x = Math.cos(a) * r;
277
+ const y = Math.sin(a) * r;
278
+ if (p.added) {
279
+ const d = p.added;
280
+ d.x = d.fx = x; d.y = d.fy = y;
281
+ d.hub = false; d.added = true;
282
+ d.r = 5 + Math.min(5, reachOf(d) / 60);
283
+ subs.push({ d, a });
284
+ return;
285
+ }
247
286
  const node = {
248
- id: c.id, kind: 'd2', tier: c.tier || 'D',
249
- r: 1.8 + Math.min(10, Number(c.power_score) || 0) * 0.32,
250
- connection: c, x: Math.cos(a) * r, y: Math.sin(a) * r,
287
+ id: p.c.id, kind: 'd2', depth, tier: p.c.tier || 'D',
288
+ r: (far ? 1.3 : 1.8) + Math.min(10, Number(p.c.power_score) || 0) * (far ? 0.24 : 0.32),
289
+ connection: p.c, x, y,
251
290
  };
252
291
  node.fx = node.x; node.fy = node.y;
253
292
  d2Nodes.push(node);
293
+ if (owner.added) links.push({ source: owner, target: node, faint: true });
254
294
  });
255
295
  placed += row.length;
256
- r += 9;
296
+ r += step;
257
297
  }
258
- sceneRadius = Math.max(sceneRadius, r + 10);
298
+ let edge = r;
299
+ for (const { d, a } of subs) {
300
+ if (depth >= 6 || !reachOf(d)) continue;
301
+ const sub = Math.min(wedge * 0.6, Math.max(0.12, (Math.min(reachOf(d), 60) * 8) / (r + 24)));
302
+ edge = Math.max(edge, placeFan(d, a, sub, r + 24, depth + 1));
303
+ }
304
+ return edge;
305
+ };
306
+
307
+ let cursor = -Math.PI / 2;
308
+ ordered.forEach((b) => {
309
+ const share = (weight(b) / total) * Math.PI * 2;
310
+ const angle = cursor + share / 2;
311
+ cursor += share;
312
+ const wedge = Math.min(share * 0.88, 1.6);
313
+ b.x = b.fx = Math.cos(angle) * R;
314
+ b.y = b.fy = Math.sin(angle) * R;
315
+ b.hub = true;
316
+ b.r = 9 + Math.min(10, (clusters.get(b.id)?.length || 0) / 40);
317
+ sceneRadius = Math.max(sceneRadius, placeFan(b, angle, wedge, R + b.r + 16, 2) + 10);
259
318
  });
260
319
  }
261
320
  for (const [bridgeId, cluster] of degreesMode ? [] : clusters) {
@@ -324,7 +383,8 @@ const OrbitGraph = forwardRef(function OrbitGraph(
324
383
  }
325
384
 
326
385
  const link = linksLayer.selectAll('line').data(links).join('line')
327
- .attr('stroke', 'rgba(255,255,255,0.08)').attr('stroke-width', 1);
386
+ .attr('stroke', (l) => (l.faint ? 'rgba(0,255,136,0.12)' : 'rgba(255,255,255,0.08)'))
387
+ .attr('stroke-width', (l) => (l.faint ? 0.5 : 1));
328
388
 
329
389
  const node = nodesLayer.selectAll('g').data(renderNodes, (d) => d.id).join('g')
330
390
  .attr('cursor', 'pointer');
@@ -333,7 +393,7 @@ const OrbitGraph = forwardRef(function OrbitGraph(
333
393
  const g = select(this);
334
394
 
335
395
  if (d.kind === 'd2') {
336
- g.attr('opacity', degreesMode ? 0.85 : 0.55);
396
+ g.attr('opacity', degreesMode ? (d.depth > 2 ? 0.6 : 0.85) : 0.55);
337
397
  g.append('circle').attr('class', 'og-base').attr('r', d.r)
338
398
  .attr('fill', TIER_COLORS[d.tier] || TIER_COLORS.D);
339
399
  return; // selection ring is created on demand, see applySelection
@@ -347,8 +407,10 @@ const OrbitGraph = forwardRef(function OrbitGraph(
347
407
  // selecting promotes it — the tooltip carries the detail, so nothing is
348
408
  // hidden, it is just not all shouted at once.
349
409
  if (!isUser && !d.hub) {
350
- g.attr('opacity', 0.75);
351
- g.append('circle').attr('class', 'og-base').attr('r', d.r).attr('fill', color);
410
+ g.attr('opacity', d.added ? 1 : 0.75);
411
+ // Someone you added through a circle: green-ringed, with their own fan behind them.
412
+ g.append('circle').attr('class', 'og-base').attr('r', d.r).attr('fill', color)
413
+ .attr('stroke', d.added ? '#00ff88' : 'none').attr('stroke-width', d.added ? 1.5 : 0);
352
414
  return; // selection ring is created on demand, see applySelection
353
415
  }
354
416
 
@@ -0,0 +1,21 @@
1
+ // The thin ring of five bars round a person's dot: how much of their circle is
2
+ // scanned (lib/reach.js scanBars). Blake's pick, design C: thin bars, a
3
+ // catalyst's green outline on the dot itself, a small count badge.
4
+ //
5
+ // Plain path strings, so the Galaxy (d3) and Bridge Chains (React) draw the
6
+ // same shape. Bars run clockwise from the top.
7
+
8
+ const GAP = 0.32; // radians between bars
9
+
10
+ /** Five arcs of radius r around (0, 0): [{ d, i }] */
11
+ export function ringSegments(r) {
12
+ const span = (2 * Math.PI - 5 * GAP) / 5;
13
+ return Array.from({ length: 5 }, (_, i) => {
14
+ const a0 = -Math.PI / 2 + GAP / 2 + i * (span + GAP);
15
+ const a1 = a0 + span;
16
+ const p = (a) => `${(r * Math.cos(a)).toFixed(2)} ${(r * Math.sin(a)).toFixed(2)}`;
17
+ return { i, d: `M${p(a0)} A${r} ${r} 0 0 1 ${p(a1)}` };
18
+ });
19
+ }
20
+
21
+ export const RING = { filled: '#1abc9c', empty: 'rgba(255,255,255,0.16)', badge: '#7F77DD' };
@@ -45,6 +45,10 @@ export function reachIndex(connections = [], degree2 = [], notes = {}) {
45
45
  for (const url of notes?.read || []) {
46
46
  if (url) read.add(keyFor({ profile_url: url }));
47
47
  }
48
+ const lists = new Map();
49
+ for (const [url, list] of Object.entries(notes?.lists || {})) {
50
+ if (url && list) lists.set(keyFor({ profile_url: url }), list);
51
+ }
48
52
  const reachedFrom = new Map();
49
53
  for (const row of connections || []) {
50
54
  const from = row?.unlocked_from_bridge_id;
@@ -53,7 +57,7 @@ export function reachIndex(connections = [], degree2 = [], notes = {}) {
53
57
  if (!list) reachedFrom.set(from, (list = []));
54
58
  list.push(row);
55
59
  }
56
- return { scanned, read, hidden, reachedFrom };
60
+ return { scanned, read, hidden, reachedFrom, lists };
57
61
  }
58
62
 
59
63
  /**
@@ -111,3 +115,20 @@ export function circleScanCost(pages = 100) {
111
115
  minutes: searches >= 100 ? 55 : Math.max(5, Math.round(searches * 0.55)),
112
116
  };
113
117
  }
118
+
119
+ /**
120
+ * How much of someone's circle is scanned, as 0–5 bars for the ring round
121
+ * their dot; null for no ring (not scanned, or their list is hidden).
122
+ * A list read to the end is 5. Part-read, it's the pages read against
123
+ * LinkedIn's own count of the list (about 10 a page), 1 to 4; with no count
124
+ * (read before the scanner kept one), 2.
125
+ */
126
+ export function scanBars(person, reach) {
127
+ const state = circleState(person, reach);
128
+ const list = person?.profile_url ? reach.lists?.get(keyFor(person)) : null;
129
+ if (state === 'hidden') return null;
130
+ if (!list) return state === 'scanned' ? 2 : null;
131
+ if (!list.more) return 5;
132
+ if (!list.total) return 2;
133
+ return Math.max(1, Math.min(4, Math.round((5 * Math.min(1, (list.pages * 10) / list.total)))));
134
+ }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "six-degrees",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "six-degrees",
9
- "version": "0.4.1",
9
+ "version": "0.4.2",
10
10
  "license": "MIT",
11
11
  "os": [
12
12
  "darwin",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "six-degrees",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Map your professional network as a galaxy — leverage tiers, bridges into new circles, and the shortest path to anyone. Runs locally on your own data.",
5
5
  "license": "MIT",
6
6
  "author": "Blake Burford",
@@ -1701,6 +1701,12 @@ def _change_progress(change):
1701
1701
  print(f" (could not note how far this read got: {exc})")
1702
1702
 
1703
1703
 
1704
+ # How long each list is, from LinkedIn's "About N results" line on the first
1705
+ # page read (RESULT_COUNT_JS), kept until the read's progress is written: the
1706
+ # app's rings round a dot show pages read against it. Approximate, like the line.
1707
+ _LIST_TOTALS = {}
1708
+
1709
+
1704
1710
  def record_bridge_progress(profile_url, name, pages, more, urn=None):
1705
1711
  """Note that someone's connections have been read through page `pages`.
1706
1712
 
@@ -1717,6 +1723,9 @@ def record_bridge_progress(profile_url, name, pages, more, urn=None):
1717
1723
  "at": datetime.now().isoformat(timespec="seconds")}
1718
1724
  if urn or old.get("urn"):
1719
1725
  entry["urn"] = urn or old.get("urn")
1726
+ total = _LIST_TOTALS.get(profile_url) or old.get("total")
1727
+ if total:
1728
+ entry["total"] = int(total)
1720
1729
  mine[profile_url] = entry
1721
1730
  _change_progress(change)
1722
1731
 
@@ -2478,6 +2487,7 @@ def _scrape_one_bridge(page, bridge_name, bridge_id, profile_url, max_pages=LINK
2478
2487
  except Exception:
2479
2488
  total = None
2480
2489
  if total:
2490
+ _LIST_TOTALS[profile_url] = int(total)
2481
2491
  pages = -(-total // 10)
2482
2492
  print(f" About {total:,} results in their list: {pages} pages"
2483
2493
  + (f", and LinkedIn shows the first {LINKEDIN_MAX_PAGES}." if pages > LINKEDIN_MAX_PAGES else "."))
@@ -1,4 +1,4 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,2776,e=>{"use strict";var t=e.i(43476),r=e.i(15812);e.s(["default",0,function({children:e}){let{userId:n,ready:i}=(0,r.useUser)();return i&&n?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…"})})}])},28867,86106,e=>{"use strict";var t=e.i(71645),r=e.i(7214);let n=Object.freeze({known:!1,sent:new Set,mine:new Map,version:0}),i=new Set,o=n,l=null,s=new Map;function a(e=o.sent,t=o.known){for(let r of(o=Object.freeze({known:t,sent:e,mine:new Map(s),version:o.version+1}),[...i]))r()}function d(e){return i.add(e),l||o.known||(l=fetch("/api/outreach").then(e=>e.ok?e.json():null).then(e=>{e&&a(new Set((e.pending||[]).map(r.keyFor)),!0)}).catch(()=>{}).finally(()=>{l=null})),()=>i.delete(e)}function c(){return o}async function u(e){let t=await fetch("/api/outreach",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),r=await t.json().catch(()=>({}));if(!t.ok)throw Error(r.error||"Could not save that.");return r}async function f(e,{bridgeId:t}={}){let n=(0,r.keyFor)(e),i=s.has(n)?s.get(n):void 0;s.set(n,!0),a();try{return await u({action:"mark-sent",connectionId:e.id,profileUrl:e.profile_url,bridgeId:t})}catch(e){throw void 0===i?s.delete(n):s.set(n,i),a(),e}}async function p(e){let t=(0,r.keyFor)(e),n=s.has(t)?s.get(t):void 0;s.set(t,!1),a();try{return await u({action:"undo",connectionId:e.id,profileUrl:e.profile_url})}catch(e){throw void 0===n?s.delete(t):s.set(t,n),a(),e}}e.s(["REQUESTS_UNKNOWN",0,n,"hasRequest",0,function(e,t=o){if(!e)return!1;let n=(0,r.keyFor)(e);return t.mine.has(n)?t.mine.get(n):t.known?t.sent.has(n):"pending"===e.unlock_status||"sent"===e.outreach_status},"markRequested",0,f,"requestCount",0,function(e=o){let t=new Set(e.known?e.sent:[]);for(let[r,n]of e.mine)n?t.add(r):t.delete(r);return t.size},"requestsNow",0,c,"undoRequest",0,p,"watchRequests",0,d],86106),e.s(["default",0,function(){return(0,t.useSyncExternalStore)(d,c,()=>n)}],28867)},77305,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(19821),i=e.i(64745),o=e.i(22016),l=e.i(48235);let s={S:25,A:15,B:10,C:5,D:2},a={S:100,A:60,B:35,C:15,D:5};var d=e.i(5258),c=e.i(36774);let u={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},f="1px solid rgba(255,255,255,0.1)";function p({person:e,size:r=36,ring:n}){let i=u[e?.tier]||"#667";return(0,t.jsxs)("div",{style:{position:"relative",width:r,height:r,flexShrink:0},children:[(0,t.jsx)("div",{style:{width:r,height:r,borderRadius:"50%",background:i,color:e?.tier==="S"?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:.34*r,fontWeight:800,border:`2px solid ${n||i}`},children:(0,d.initialsFor)(e?.name||"?")}),(0,c.localPhoto)(e?.profile_image_url)&&(0,t.jsx)("img",{src:(0,c.localPhoto)(e.profile_image_url),alt:"",onError:e=>{e.currentTarget.style.display="none"},style:{position:"absolute",inset:0,width:r,height:r,borderRadius:"50%",objectFit:"cover",border:`2px solid ${n||i}`}})]})}function g({progress:e,size:r=86,color:n="#FF6B35",children:i}){let o=r/2-5,l=2*Math.PI*o;return(0,t.jsxs)("div",{style:{position:"relative",width:r,height:r},children:[(0,t.jsxs)("svg",{width:r,height:r,style:{position:"absolute",inset:0,transform:"rotate(-90deg)"},children:[(0,t.jsx)("circle",{cx:r/2,cy:r/2,r:o,fill:"none",stroke:"rgba(255,255,255,0.08)",strokeWidth:5}),(0,t.jsx)("circle",{cx:r/2,cy:r/2,r:o,fill:"none",stroke:n,strokeWidth:5,strokeLinecap:"round",strokeDasharray:`${l*Math.min(1,e)} ${l}`,style:{transition:"stroke-dasharray 0.5s ease"}})]}),(0,t.jsx)("div",{style:{position:"absolute",inset:9,display:"flex",alignItems:"center",justifyContent:"center"},children:i})]})}function h({recs:e,sentIds:n,added:i,mappedIds:d,reach:c,onSend:y,onUndo:m}){let S=(0,r.useMemo)(()=>(function({recs:e=[],sentIds:t=new Set,added:r=[],mappedIds:n=new Set,reach:i=null}){var o;let d,c,u,f=new Map,p=new Set;for(let t of[...e].sort((e,t)=>(t.priority||0)-(e.priority||0))){if(!t.bridge)continue;let e=`${t.bridge.id}|${t.profile_url||t.id}`;if(p.has(e))continue;p.add(e);let r=f.get(t.bridge.id);r||(r={bridge:t.bridge,people:[]},f.set(t.bridge.id,r)),r.people.push(t)}let g=new Map;for(let e of r){let t=e.unlocked_from_bridge_id;t&&g.set(t,[...g.get(t)||[],e])}let h=[],b=0,x=0;for(let{bridge:e,people:r}of f.values()){let n=r.filter(e=>t.has(e.id)),i=g.get(e.id)||[];x+=n.length,b+=n.reduce((e,t)=>e+(s[t.tier]||2),0),b+=i.reduce((e,t)=>e+(a[t.tier]||5),0);let o=Math.ceil(r.length/5)||1,l=0;for(;l<o-1&&r.slice(5*l,(l+1)*5).every(e=>t.has(e.id));)l++;let d=r.slice(5*l,(l+1)*5),c=d.filter(e=>t.has(e.id)).length,u=c===d.length&&l===o-1;h.push({bridge:e,people:r,stage:l+1,stages:o,targets:d,done:c,progress:d.length?c/d.length:1,complete:u,sent:n.length,added:i,value:d.filter(e=>!t.has(e.id)).reduce((e,t)=>e+(t.priority||0),0),open:{S:d.filter(e=>"S"===e.tier&&!t.has(e.id)).length,A:d.filter(e=>"A"===e.tier&&!t.has(e.id)).length}})}h.sort((e,t)=>e.complete-t.complete||(t.progress>0&&t.progress<1)-(e.progress>0&&e.progress<1)||t.progress-e.progress||t.value-e.value);let y=h.filter(e=>!e.complete).flatMap(e=>e.targets.filter(e=>!t.has(e.id)).map(t=>({person:t,cluster:e,score:(t.priority||0)*(1+.6*e.progress)}))).sort((e,t)=>t.score-e.score),m=new Set,S=[];for(let e of y){let t=e.person.profile_url||e.person.id;if(!m.has(t)&&(m.add(t),S.push(e),3===S.length))break}let k=r.filter(e=>e.unlocked_from_bridge_id).length;return{clusters:h,nextMoves:S,points:b,level:(c=((d=Math.floor(Math.sqrt(Math.max(0,o=b)/40))+1)-1)**2*40,u=d**2*40,{level:d,floor:c,next:u,progress:(o-c)/(u-c)}),sentTotal:x,addedTotal:k,newDoors:r.filter(e=>e.unlocked_from_bridge_id&&"todo"===(0,l.circleState)(e,i||{scanned:n,hidden:new Set})),clearedStages:h.reduce((e,t)=>e+(t.stage-1)+ +!!t.complete,0)}})({recs:e,sentIds:n,added:i,mappedIds:d,reach:c}),[e,n,i,d,c]),[k,j]=(0,r.useState)(null),[v,w]=(0,r.useState)(null),{level:_}=S;async function C(e,t){await y(e);let r=t.done+1,n=String(t.bridge.name||"").split(/[\s,]+/)[0];w(r>=t.targets.length?`+${s[e.tier]||2} \xb7 Stage ${t.stage} of ${n}'s circle cleared — the next 5 are up`:`+${s[e.tier]||2} \xb7 ${n}'s circle ${r}/${t.targets.length}`),setTimeout(()=>w(null),3500)}let F=S.clusters.find(e=>e.bridge.id===k);return(0,t.jsxs)("div",{style:{maxWidth:1100,margin:"0 auto",padding:"16px 20px 60px"},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:16,alignItems:"center",flexWrap:"wrap",padding:16,borderRadius:12,border:f,background:"linear-gradient(135deg, rgba(255,107,53,0.10), rgba(155,89,182,0.08))"},children:[(0,t.jsxs)("div",{style:{width:64,height:64,borderRadius:16,background:"linear-gradient(135deg, #FFD700, #FF6B35)",color:"#000",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[(0,t.jsx)("div",{style:{fontSize:10,fontWeight:800},children:"LEVEL"}),(0,t.jsx)("div",{style:{fontSize:26,fontWeight:900,lineHeight:1},children:_.level})]}),(0,t.jsxs)("div",{style:{flex:1,minWidth:220},children:[(0,t.jsxs)("div",{style:{fontSize:13,color:"#dfe6e9"},children:[(0,t.jsx)("b",{children:S.points})," points · ",(0,t.jsx)("b",{children:_.next-S.points})," to level ",_.level+1]}),(0,t.jsx)("div",{style:{height:8,borderRadius:4,background:"rgba(255,255,255,0.08)",marginTop:6,overflow:"hidden"},children:(0,t.jsx)("div",{style:{height:"100%",width:`${Math.round(100*_.progress)}%`,background:"linear-gradient(90deg, #FFD700, #FF6B35)",transition:"width 0.5s"}})}),(0,t.jsx)("div",{style:{fontSize:11.5,color:"#8b9a9a",marginTop:6},children:"Points come from invites you send and people who accept — not from browsing."})]}),[[S.sentTotal,"invites sent"],[S.addedTotal,"people added"],[S.clearedStages,"stages cleared"]].map(([e,r])=>(0,t.jsxs)("div",{style:{textAlign:"center",minWidth:80},children:[(0,t.jsx)("div",{style:{fontSize:24,fontWeight:900},children:e}),(0,t.jsx)("div",{style:{fontSize:11,color:"#8b9a9a"},children:r})]},r))]}),S.newDoors.length>0&&(0,t.jsxs)("div",{style:{marginTop:12,padding:"10px 14px",borderRadius:10,border:"1px solid rgba(0,255,136,0.3)",background:"rgba(0,255,136,0.06)",fontSize:13},children:["🚪 ",(0,t.jsxs)("b",{children:[S.newDoors.length," new ",1===S.newDoors.length?"door":"doors",":"]})," people you added through a circle, whose own circle isn’t mapped yet. That’s the next degree. ",(0,t.jsx)(o.default,{href:"/setup",style:{color:"#00ff88"},children:"Map them on the Scan page →"})]}),S.nextMoves.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h3",{style:{margin:"22px 0 10px",fontSize:15},children:"Next best moves"}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(300px, 1fr))",gap:12},children:S.nextMoves.map(({person:e,cluster:r},n)=>(0,t.jsxs)("div",{style:{padding:14,borderRadius:12,border:`1px solid ${u[e.tier]}55`,background:"rgba(255,255,255,0.03)",position:"relative"},children:[(0,t.jsxs)("div",{style:{position:"absolute",top:10,right:12,fontSize:11,fontWeight:800,color:"#FF6B35"},children:["#",n+1]}),(0,t.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[(0,t.jsx)(p,{person:e,size:44}),(0,t.jsxs)("div",{style:{minWidth:0},children:[(0,t.jsx)("div",{style:{fontWeight:700,fontSize:14},children:e.name}),(0,t.jsx)("div",{style:{fontSize:11.5,color:"#8b9a9a",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:220},children:e.headline})]})]}),(0,t.jsxs)("div",{style:{fontSize:11.5,color:"#aab7b7",margin:"10px 0"},children:["via ",(0,t.jsx)("b",{style:{color:u[r.bridge.tier]},children:r.bridge.name})," · their circle ",r.done,"/",r.targets.length," this stage"]}),(0,t.jsxs)("div",{style:{display:"flex",gap:8},children:[e.profile_url&&(0,t.jsx)("a",{href:e.profile_url,target:"_blank",rel:"noopener noreferrer",style:x,children:"Open on LinkedIn"}),(0,t.jsxs)("button",{onClick:()=>C(e,r),style:b,children:["I sent an invite · +",s[e.tier]||2]})]})]},e.id))})]}),(0,t.jsx)("h3",{style:{margin:"26px 0 4px",fontSize:15},children:"Circles to work through"}),(0,t.jsxs)("div",{style:{fontSize:12,color:"#8b9a9a",marginBottom:12},children:["Each is one of your connections and the best people they know, ",5," at a time. Fill the ring to clear a stage."]}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(190px, 1fr))",gap:12},children:S.clusters.map(e=>{let r=k===e.bridge.id;return(0,t.jsxs)("button",{onClick:()=>j(r?null:e.bridge.id),style:{padding:12,borderRadius:12,cursor:"pointer",textAlign:"center",color:"#fff",border:r?"1px solid #FF6B35":f,background:e.complete?"rgba(0,255,136,0.06)":"rgba(255,255,255,0.03)",display:"flex",flexDirection:"column",alignItems:"center",gap:6},children:[(0,t.jsx)(g,{progress:e.progress,color:e.complete?"#00ff88":"#FF6B35",children:(0,t.jsx)(p,{person:e.bridge,size:60})}),(0,t.jsx)("div",{style:{fontWeight:700,fontSize:13,maxWidth:170,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.bridge.name}),(0,t.jsx)("div",{style:{fontSize:11,color:e.complete?"#00ff88":"#aab7b7"},children:e.complete?"Circle cleared":`Stage ${e.stage} of ${e.stages} \xb7 ${e.done}/${e.targets.length}`}),(0,t.jsx)("div",{style:{display:"flex",gap:4},children:e.targets.map(e=>(0,t.jsx)("span",{title:e.name,style:{width:12,height:12,borderRadius:"50%",border:`2px solid ${u[e.tier]||"#667"}`,background:n.has(e.id)?u[e.tier]||"#667":"transparent"}},e.id))}),(0,t.jsxs)("div",{style:{fontSize:10.5,color:"#778"},children:[e.open.S?`${e.open.S} S \xb7 `:"",e.open.A?`${e.open.A} A \xb7 `:"",e.people.length," worth adding",e.added.length?` \xb7 ★ ${e.added.length} added`:""]})]},e.bridge.id)})}),F&&(0,t.jsxs)("div",{style:{marginTop:14,padding:16,borderRadius:12,border:"1px solid rgba(255,107,53,0.4)",background:"rgba(255,107,53,0.05)"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,t.jsx)(p,{person:F.bridge,size:40}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{fontWeight:800},children:[F.bridge.name,"’s circle · stage ",F.stage," of ",F.stages]}),(0,t.jsxs)("div",{style:{fontSize:12,color:"#aab7b7"},children:["Ask ",F.bridge.name?.split(" ")[0]," for an intro, or invite them directly. Mark each one when it’s sent."]})]})]}),F.targets.map(e=>{let r=n.has(e.id);return(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"8px 0",borderTop:"1px solid rgba(255,255,255,0.05)"},children:[(0,t.jsx)(p,{person:e,size:34,ring:r?"#00ff88":void 0}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsxs)("div",{style:{fontWeight:600,fontSize:13},children:[e.name," ",(0,t.jsx)("span",{style:{color:u[e.tier],fontSize:11},children:e.tier})]}),(0,t.jsx)("div",{style:{fontSize:11.5,color:"#8b9a9a",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.headline})]}),e.profile_url&&(0,t.jsx)("a",{href:e.profile_url,target:"_blank",rel:"noopener noreferrer",style:x,children:"LinkedIn"}),r?(0,t.jsx)("button",{onClick:()=>m(e),style:{...x,color:"#00ff88"},children:"Sent ✓ (undo)"}):(0,t.jsxs)("button",{onClick:()=>C(e,F),style:b,children:["Sent · +",s[e.tier]||2]})]},e.id)}),F.added.length>0&&(0,t.jsxs)("div",{style:{marginTop:10,fontSize:12,color:"#00ff88"},children:["★ Added from this circle: ",F.added.map(e=>e.name).join(", ")]})]}),v&&(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, #FFD700, #FF6B35)",color:"#000",fontWeight:800,fontSize:13,boxShadow:"0 8px 30px rgba(0,0,0,0.5)",zIndex:50},children:v})]})}let b={padding:"7px 12px",borderRadius:8,border:"none",cursor:"pointer",fontWeight:800,fontSize:12,background:"linear-gradient(135deg, #FF6B35, #FFD700)",color:"#000"},x={padding:"7px 12px",borderRadius:8,border:f,cursor:"pointer",fontWeight:600,fontSize:12,background:"rgba(255,255,255,0.05)",color:"#dfe6e9",textDecoration:"none"};var y=e.i(2776),m=e.i(15812),S=e.i(90179),k=e.i(28867),j=e.i(86106),v=e.i(7214),w=e.i(40996);let _={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"};function C(){let{userId:e,userProfile:s}=(0,m.useUser)(),a=s?.sectors||[],[d,u]=(0,r.useState)([]),[f,p]=(0,r.useState)(!0),[g,b]=(0,r.useState)("all"),[x,y]=(0,r.useState)(new Set),C=(0,k.default)(),[F,z]=(0,r.useState)([]),[B,A]=(0,r.useState)({}),[R,I]=(0,r.useState)("quest"),[T,O]=(0,r.useState)([]),[$,P]=(0,r.useState)(()=>new Set),[W,E]=(0,r.useState)(null),[M,D]=(0,r.useState)(null),[N,L]=(0,r.useState)(()=>{{let e=new URLSearchParams(window.location.search);if(e.get("groupBy"))return e.get("groupBy")}return"bridge"});(0,r.useEffect)(()=>{{let e=new URLSearchParams(window.location.search).get("bridge");e&&D(e)}},[]),(0,r.useEffect)(()=>{!i.IS_DEMO&&e&&t();async function t(){let[t,r,i]=await Promise.all([(0,n.loadNetwork)(e),fetch(`/api/outreach?userId=${e}`).then(e=>e.json()).catch(()=>({pending:[]})),(0,w.loadScanNotes)()]),o=t.degree1,s=t.degree2;O(o.filter(e=>e.unlocked_from_bridge_id)),P(new Set(s.map(e=>e.source_connection_id).filter(Boolean))),E((0,l.reachIndex)(o,s,i));let d=new Set(o.map(e=>e.profile_url)),c={};o.forEach(e=>{c[e.id]=e}),z(r.pending||[]),A(c),u(s.filter(e=>("S"===e.tier||"A"===e.tier||"B"===e.tier)&&!d.has(e.profile_url)).map(e=>{let t,r,n=c[e.source_connection_id],i=(t=parseFloat(e.power_score)||0,r=(e.headline||"").toLowerCase(),(0,S.rowCompanyScore)(e)>=S.TOP_COMPANY&&(t+=1),(a||[]).forEach(e=>{r.includes(e.toLowerCase())&&(t+=.5)}),"S"===e.tier?t*=1.5:"A"===e.tier&&(t*=1.2),t),o="S"===e.tier?50:"A"===e.tier?25:10;return{...e,bridge:n,priority:i,xp:o}}).sort((e,t)=>t.priority-e.priority)),p(!1)}},[e]);let U=(0,r.useMemo)(()=>new Set([...F,...d].filter(e=>(0,j.hasRequest)(e,C)).map(e=>e.id)),[F,d,C]),q=(0,r.useMemo)(()=>{let e=new Set,t=[];for(let r of[...F,...d]){let n=(0,v.keyFor)(r);!e.has(n)&&(0,j.hasRequest)(r,C)&&(e.add(n),t.push({...r,bridge:B[r.source_connection_id]||r.bridge||null}))}return t},[F,d,C,B]);if(i.IS_DEMO)return(0,t.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"rgba(255,255,255,0.7)",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:10,textAlign:"center",padding:24},children:[(0,t.jsx)("h2",{style:{margin:0,fontSize:18,fontWeight:700,color:"#fff"},children:"Not part of the demo"}),(0,t.jsx)("div",{style:{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 K="all"===g?d:d.filter(e=>e.tier===g);M&&(K=K.filter(e=>e.bridge?.id===M));let J={S:0,A:0,B:0};d.forEach(e=>{void 0!==J[e.tier]&&J[e.tier]++});let V={};K.forEach(e=>{let t;V[t="bridge"===N?e.bridge?.id||"unknown":"company"===N?(e.company||"Unknown").trim()||"Unknown":e.tier]||(V[t]=[]),V[t].push(e)});let Y={S:0,A:1,B:2},H=Object.entries(V).sort((e,t)=>{if("tier"===N)return(Y[e[0]]||9)-(Y[t[0]]||9);if("bridge"===N){let r=e[1][0]?.bridge,n=t[1][0]?.bridge,i=Y[r?.tier]??9,o=Y[n?.tier]??9;if(i!==o)return i-o}return t[1].length-e[1].length});function X(e){y(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})}return f?(0,t.jsx)("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#0a0a1a",color:"#fff"},children:"Loading..."}):(0,t.jsxs)("div",{style:{height:"100vh",background:"#0a0a1a",color:"#fff",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,t.jsxs)("header",{style:{padding:"14px 24px",borderBottom:"1px solid rgba(255,255,255,0.1)",flexShrink:0},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:10},children:[(0,t.jsxs)(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:"1px solid rgba(255,255,255,0.1)"},children:[(0,t.jsx)("span",{style:{fontSize:16},children:"←"})," Map"]}),(0,t.jsx)("h1",{style:{fontSize:20,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FF6B35, #FFD700)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Outlink"}),(0,t.jsxs)("div",{style:{display:"flex",gap:2,background:"rgba(255,255,255,0.06)",borderRadius:6,padding:2},children:[(0,t.jsx)("button",{onClick:()=>I("quest"),style:{padding:"5px 12px",borderRadius:4,border:"none",fontSize:11,fontWeight:700,cursor:"pointer",background:"quest"===R?"linear-gradient(135deg, #FFD700, #FF6B35)":"transparent",color:"quest"===R?"#000":"#FFD700"},children:"Circles"}),(0,t.jsxs)("button",{onClick:()=>I("recs"),style:{padding:"5px 12px",borderRadius:4,border:"none",fontSize:11,fontWeight:600,cursor:"pointer",background:"recs"===R?"#fff":"transparent",color:"recs"===R?"#000":"#888"},children:["To Add (",d.length,")"]}),(0,t.jsxs)("button",{onClick:()=>I("pending"),style:{padding:"5px 12px",borderRadius:4,border:"none",fontSize:11,fontWeight:600,cursor:"pointer",background:"pending"===R?"linear-gradient(135deg, #FF6B35, #FFD700)":"transparent",color:"pending"===R?"#000":"#FF6B35"},children:["Pending (",q.length,")"]})]}),(0,t.jsx)("div",{style:{marginLeft:"auto",display:"flex",gap:6},children:"recs"===R&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>L("tier"),style:{padding:"4px 10px",borderRadius:4,border:"none",fontSize:10,fontWeight:600,cursor:"pointer",background:"tier"===N?"rgba(255,255,255,0.15)":"rgba(255,255,255,0.05)",color:"tier"===N?"#fff":"#666"},children:"By Tier"}),(0,t.jsx)("button",{onClick:()=>L("bridge"),style:{padding:"4px 10px",borderRadius:4,border:"none",fontSize:10,fontWeight:600,cursor:"pointer",background:"bridge"===N?"rgba(255,255,255,0.15)":"rgba(255,255,255,0.05)",color:"bridge"===N?"#fff":"#666"},children:"By Bridge"}),(0,t.jsx)("button",{onClick:()=>L("company"),style:{padding:"4px 10px",borderRadius:4,border:"none",fontSize:10,fontWeight:600,cursor:"pointer",background:"company"===N?"rgba(255,255,255,0.15)":"rgba(255,255,255,0.05)",color:"company"===N?"#fff":"#666"},children:"By Company"})]})})]}),(0,t.jsx)("div",{style:{display:"quest"===R?"none":"flex",gap:6},children:[{k:"all",l:`All (${d.length})`},{k:"S",l:`S (${J.S})`,c:_.S},{k:"A",l:`A (${J.A})`,c:_.A},{k:"B",l:`B (${J.B})`,c:_.B}].map(e=>(0,t.jsx)("button",{onClick:()=>b(e.k),style:{padding:"4px 12px",borderRadius:16,border:"none",fontSize:11,fontWeight:600,cursor:"pointer",background:g===e.k?e.c||"#fff":"rgba(255,255,255,0.06)",color:g===e.k?"#000":e.c||"#888"},children:e.l},e.k))})]}),"recs"===R&&x.size>0&&(0,t.jsxs)("div",{style:{padding:"10px 24px",background:"rgba(255,215,0,0.08)",borderBottom:"1px solid rgba(255,215,0,0.2)",display:"flex",alignItems:"center",gap:12,flexShrink:0},children:[(0,t.jsxs)("span",{style:{fontSize:12,color:"#FFD700",fontWeight:600},children:[x.size," selected"]}),(0,t.jsxs)("button",{onClick:function(){let e=K.filter(e=>x.has(e.id));if(0===e.length)return;if(1===e.length)return void window.open(e[0].profile_url,"_blank");let t=new Blob([`<!DOCTYPE html><html><head><title>Outlink — ${e.length} profiles</title>
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,2776,e=>{"use strict";var t=e.i(43476),r=e.i(15812);e.s(["default",0,function({children:e}){let{userId:n,ready:i}=(0,r.useUser)();return i&&n?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…"})})}])},28867,86106,e=>{"use strict";var t=e.i(71645),r=e.i(7214);let n=Object.freeze({known:!1,sent:new Set,mine:new Map,version:0}),i=new Set,o=n,l=null,s=new Map;function a(e=o.sent,t=o.known){for(let r of(o=Object.freeze({known:t,sent:e,mine:new Map(s),version:o.version+1}),[...i]))r()}function d(e){return i.add(e),l||o.known||(l=fetch("/api/outreach").then(e=>e.ok?e.json():null).then(e=>{e&&a(new Set((e.pending||[]).map(r.keyFor)),!0)}).catch(()=>{}).finally(()=>{l=null})),()=>i.delete(e)}function c(){return o}async function u(e){let t=await fetch("/api/outreach",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),r=await t.json().catch(()=>({}));if(!t.ok)throw Error(r.error||"Could not save that.");return r}async function f(e,{bridgeId:t}={}){let n=(0,r.keyFor)(e),i=s.has(n)?s.get(n):void 0;s.set(n,!0),a();try{return await u({action:"mark-sent",connectionId:e.id,profileUrl:e.profile_url,bridgeId:t})}catch(e){throw void 0===i?s.delete(n):s.set(n,i),a(),e}}async function p(e){let t=(0,r.keyFor)(e),n=s.has(t)?s.get(t):void 0;s.set(t,!1),a();try{return await u({action:"undo",connectionId:e.id,profileUrl:e.profile_url})}catch(e){throw void 0===n?s.delete(t):s.set(t,n),a(),e}}e.s(["REQUESTS_UNKNOWN",0,n,"hasRequest",0,function(e,t=o){if(!e)return!1;let n=(0,r.keyFor)(e);return t.mine.has(n)?t.mine.get(n):t.known?t.sent.has(n):"pending"===e.unlock_status||"sent"===e.outreach_status},"markRequested",0,f,"requestCount",0,function(e=o){let t=new Set(e.known?e.sent:[]);for(let[r,n]of e.mine)n?t.add(r):t.delete(r);return t.size},"requestsNow",0,c,"undoRequest",0,p,"watchRequests",0,d],86106),e.s(["default",0,function(){return(0,t.useSyncExternalStore)(d,c,()=>n)}],28867)},77305,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(19821),i=e.i(64745),o=e.i(22016),l=e.i(48235);let s={S:25,A:15,B:10,C:5,D:2},a={S:100,A:60,B:35,C:15,D:5};var d=e.i(5258),c=e.i(36774);let u={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},f="1px solid rgba(255,255,255,0.1)";function p({person:e,size:r=36,ring:n}){let i=u[e?.tier]||"#667";return(0,t.jsxs)("div",{style:{position:"relative",width:r,height:r,flexShrink:0},children:[(0,t.jsx)("div",{style:{width:r,height:r,borderRadius:"50%",background:i,color:e?.tier==="S"?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:.34*r,fontWeight:800,border:`2px solid ${n||i}`},children:(0,d.initialsFor)(e?.name||"?")}),(0,c.localPhoto)(e?.profile_image_url)&&(0,t.jsx)("img",{src:(0,c.localPhoto)(e.profile_image_url),alt:"",onError:e=>{e.currentTarget.style.display="none"},style:{position:"absolute",inset:0,width:r,height:r,borderRadius:"50%",objectFit:"cover",border:`2px solid ${n||i}`}})]})}function g({progress:e,size:r=86,color:n="#FF6B35",children:i}){let o=r/2-5,l=2*Math.PI*o;return(0,t.jsxs)("div",{style:{position:"relative",width:r,height:r},children:[(0,t.jsxs)("svg",{width:r,height:r,style:{position:"absolute",inset:0,transform:"rotate(-90deg)"},children:[(0,t.jsx)("circle",{cx:r/2,cy:r/2,r:o,fill:"none",stroke:"rgba(255,255,255,0.08)",strokeWidth:5}),(0,t.jsx)("circle",{cx:r/2,cy:r/2,r:o,fill:"none",stroke:n,strokeWidth:5,strokeLinecap:"round",strokeDasharray:`${l*Math.min(1,e)} ${l}`,style:{transition:"stroke-dasharray 0.5s ease"}})]}),(0,t.jsx)("div",{style:{position:"absolute",inset:9,display:"flex",alignItems:"center",justifyContent:"center"},children:i})]})}function h({recs:e,sentIds:n,added:i,mappedIds:d,reach:c,onSend:y,onUndo:m}){let S=(0,r.useMemo)(()=>(function({recs:e=[],sentIds:t=new Set,added:r=[],mappedIds:n=new Set,reach:i=null}){var o;let d,c,u,f=new Map,p=new Set;for(let t of[...e].sort((e,t)=>(t.priority||0)-(e.priority||0))){if(!t.bridge)continue;let e=`${t.bridge.id}|${t.profile_url||t.id}`;if(p.has(e))continue;p.add(e);let r=f.get(t.bridge.id);r||(r={bridge:t.bridge,people:[]},f.set(t.bridge.id,r)),r.people.push(t)}let g=new Map;for(let e of r){let t=e.unlocked_from_bridge_id;t&&g.set(t,[...g.get(t)||[],e])}let h=[],b=0,x=0;for(let{bridge:e,people:r}of f.values()){let n=r.filter(e=>t.has(e.id)),i=g.get(e.id)||[];x+=n.length,b+=n.reduce((e,t)=>e+(s[t.tier]||2),0),b+=i.reduce((e,t)=>e+(a[t.tier]||5),0);let o=Math.ceil(r.length/5)||1,l=0;for(;l<o-1&&r.slice(5*l,(l+1)*5).every(e=>t.has(e.id));)l++;let d=r.slice(5*l,(l+1)*5),c=d.filter(e=>t.has(e.id)).length,u=c===d.length&&l===o-1;h.push({bridge:e,people:r,stage:l+1,stages:o,targets:d,done:c,progress:d.length?c/d.length:1,complete:u,sent:n.length,added:i,value:d.filter(e=>!t.has(e.id)).reduce((e,t)=>e+(t.priority||0),0),open:{S:d.filter(e=>"S"===e.tier&&!t.has(e.id)).length,A:d.filter(e=>"A"===e.tier&&!t.has(e.id)).length}})}h.sort((e,t)=>e.complete-t.complete||(t.progress>0&&t.progress<1)-(e.progress>0&&e.progress<1)||t.progress-e.progress||t.value-e.value);let y=h.filter(e=>!e.complete).flatMap(e=>e.targets.filter(e=>!t.has(e.id)).map(t=>({person:t,cluster:e,score:(t.priority||0)*(1+.6*e.progress)}))).sort((e,t)=>t.score-e.score),m=new Set,S=[];for(let e of y){let t=e.person.profile_url||e.person.id;if(!m.has(t)&&(m.add(t),S.push(e),3===S.length))break}let k=r.filter(e=>e.unlocked_from_bridge_id).length;return{clusters:h,nextMoves:S,points:b,level:(c=((d=Math.floor(Math.sqrt(Math.max(0,o=b)/40))+1)-1)**2*40,u=d**2*40,{level:d,floor:c,next:u,progress:(o-c)/(u-c)}),sentTotal:x,addedTotal:k,newDoors:r.filter(e=>e.unlocked_from_bridge_id&&"todo"===(0,l.circleState)(e,i||{scanned:n,hidden:new Set})),clearedStages:h.reduce((e,t)=>e+(t.stage-1)+ +!!t.complete,0)}})({recs:e,sentIds:n,added:i,mappedIds:d,reach:c}),[e,n,i,d,c]),[k,j]=(0,r.useState)(null),[v,w]=(0,r.useState)(null),{level:_}=S;async function C(e,t){await y(e);let r=t.done+1,n=String(t.bridge.name||"").split(/[\s,]+/)[0];w(r>=t.targets.length?`+${s[e.tier]||2} \xb7 Stage ${t.stage} of ${n}'s circle cleared — the next 5 are up`:`+${s[e.tier]||2} \xb7 ${n}'s circle ${r}/${t.targets.length}`),setTimeout(()=>w(null),3500)}let F=S.clusters.find(e=>e.bridge.id===k);return(0,t.jsxs)("div",{style:{maxWidth:1100,margin:"0 auto",padding:"16px 20px 60px"},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:16,alignItems:"center",flexWrap:"wrap",padding:16,borderRadius:12,border:f,background:"linear-gradient(135deg, rgba(255,107,53,0.10), rgba(155,89,182,0.08))"},children:[(0,t.jsxs)("div",{style:{width:64,height:64,borderRadius:16,background:"linear-gradient(135deg, #FFD700, #FF6B35)",color:"#000",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[(0,t.jsx)("div",{style:{fontSize:10,fontWeight:800},children:"LEVEL"}),(0,t.jsx)("div",{style:{fontSize:26,fontWeight:900,lineHeight:1},children:_.level})]}),(0,t.jsxs)("div",{style:{flex:1,minWidth:220},children:[(0,t.jsxs)("div",{style:{fontSize:13,color:"#dfe6e9"},children:[(0,t.jsx)("b",{children:S.points})," points · ",(0,t.jsx)("b",{children:_.next-S.points})," to level ",_.level+1]}),(0,t.jsx)("div",{style:{height:8,borderRadius:4,background:"rgba(255,255,255,0.08)",marginTop:6,overflow:"hidden"},children:(0,t.jsx)("div",{style:{height:"100%",width:`${Math.round(100*_.progress)}%`,background:"linear-gradient(90deg, #FFD700, #FF6B35)",transition:"width 0.5s"}})}),(0,t.jsx)("div",{style:{fontSize:11.5,color:"#8b9a9a",marginTop:6},children:"Points come from invites you send and people who accept — not from browsing."})]}),[[S.sentTotal,"invites sent"],[S.addedTotal,"people added"],[S.clearedStages,"stages cleared"]].map(([e,r])=>(0,t.jsxs)("div",{style:{textAlign:"center",minWidth:80},children:[(0,t.jsx)("div",{style:{fontSize:24,fontWeight:900},children:e}),(0,t.jsx)("div",{style:{fontSize:11,color:"#8b9a9a"},children:r})]},r))]}),S.newDoors.length>0&&(0,t.jsxs)("div",{style:{marginTop:12,padding:"10px 14px",borderRadius:10,border:"1px solid rgba(0,255,136,0.3)",background:"rgba(0,255,136,0.06)",fontSize:13},children:["🚪 ",(0,t.jsxs)("b",{children:[S.newDoors.length," new ",1===S.newDoors.length?"door":"doors",":"]})," people you added through a circle, whose own circle isn’t mapped yet. That’s the next degree. ",(0,t.jsx)(o.default,{href:"/setup",style:{color:"#00ff88"},children:"Map them on the Scan page →"})]}),S.nextMoves.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h3",{style:{margin:"22px 0 10px",fontSize:15},children:"Next best moves"}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(300px, 1fr))",gap:12},children:S.nextMoves.map(({person:e,cluster:r},n)=>(0,t.jsxs)("div",{style:{padding:14,borderRadius:12,border:`1px solid ${u[e.tier]}55`,background:"rgba(255,255,255,0.03)",position:"relative"},children:[(0,t.jsxs)("div",{style:{position:"absolute",top:10,right:12,fontSize:11,fontWeight:800,color:"#FF6B35"},children:["#",n+1]}),(0,t.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[(0,t.jsx)(p,{person:e,size:44}),(0,t.jsxs)("div",{style:{minWidth:0},children:[(0,t.jsx)("div",{style:{fontWeight:700,fontSize:14},children:e.name}),(0,t.jsx)("div",{style:{fontSize:11.5,color:"#8b9a9a",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:220},children:e.headline})]})]}),(0,t.jsxs)("div",{style:{fontSize:11.5,color:"#aab7b7",margin:"10px 0"},children:["via ",(0,t.jsx)("b",{style:{color:u[r.bridge.tier]},children:r.bridge.name})," · their circle ",r.done,"/",r.targets.length," this stage"]}),(0,t.jsxs)("div",{style:{display:"flex",gap:8},children:[e.profile_url&&(0,t.jsx)("a",{href:e.profile_url,target:"_blank",rel:"noopener noreferrer",style:x,children:"Open on LinkedIn"}),(0,t.jsxs)("button",{onClick:()=>C(e,r),style:b,children:["I sent an invite · +",s[e.tier]||2]})]})]},e.id))})]}),(0,t.jsx)("h3",{style:{margin:"26px 0 4px",fontSize:15},children:"Circles to work through"}),(0,t.jsxs)("div",{style:{fontSize:12,color:"#8b9a9a",marginBottom:12},children:["Each is one of your connections and the best people they know, ",5," at a time. Fill the ring to clear a stage."]}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(190px, 1fr))",gap:12},children:S.clusters.map(e=>{let r=k===e.bridge.id;return(0,t.jsxs)("button",{onClick:()=>j(r?null:e.bridge.id),style:{padding:12,borderRadius:12,cursor:"pointer",textAlign:"center",color:"#fff",border:r?"1px solid #FF6B35":f,background:e.complete?"rgba(0,255,136,0.06)":"rgba(255,255,255,0.03)",display:"flex",flexDirection:"column",alignItems:"center",gap:6},children:[(0,t.jsx)(g,{progress:e.progress,color:e.complete?"#00ff88":"#FF6B35",children:(0,t.jsx)(p,{person:e.bridge,size:60})}),(0,t.jsx)("div",{style:{fontWeight:700,fontSize:13,maxWidth:170,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.bridge.name}),(0,t.jsx)("div",{style:{fontSize:11,color:e.complete?"#00ff88":"#aab7b7"},children:e.complete?"Circle cleared":`Stage ${e.stage} of ${e.stages} \xb7 ${e.done}/${e.targets.length}`}),(0,t.jsx)("div",{style:{display:"flex",gap:4},children:e.targets.map(e=>(0,t.jsx)("span",{title:e.name,style:{width:12,height:12,borderRadius:"50%",border:`2px solid ${u[e.tier]||"#667"}`,background:n.has(e.id)?u[e.tier]||"#667":"transparent"}},e.id))}),(0,t.jsxs)("div",{style:{fontSize:10.5,color:"#778"},children:[e.open.S?`${e.open.S} S \xb7 `:"",e.open.A?`${e.open.A} A \xb7 `:"",e.people.length," worth adding",e.added.length?` \xb7 ★ ${e.added.length} added`:""]})]},e.bridge.id)})}),F&&(0,t.jsxs)("div",{style:{marginTop:14,padding:16,borderRadius:12,border:"1px solid rgba(255,107,53,0.4)",background:"rgba(255,107,53,0.05)"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,t.jsx)(p,{person:F.bridge,size:40}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{fontWeight:800},children:[F.bridge.name,"’s circle · stage ",F.stage," of ",F.stages]}),(0,t.jsxs)("div",{style:{fontSize:12,color:"#aab7b7"},children:["Ask ",F.bridge.name?.split(" ")[0]," for an intro, or invite them directly. Mark each one when it’s sent."]})]})]}),F.targets.map(e=>{let r=n.has(e.id);return(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"8px 0",borderTop:"1px solid rgba(255,255,255,0.05)"},children:[(0,t.jsx)(p,{person:e,size:34,ring:r?"#00ff88":void 0}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsxs)("div",{style:{fontWeight:600,fontSize:13},children:[e.name," ",(0,t.jsx)("span",{style:{color:u[e.tier],fontSize:11},children:e.tier})]}),(0,t.jsx)("div",{style:{fontSize:11.5,color:"#8b9a9a",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.headline})]}),e.profile_url&&(0,t.jsx)("a",{href:e.profile_url,target:"_blank",rel:"noopener noreferrer",style:x,children:"LinkedIn"}),r?(0,t.jsx)("button",{onClick:()=>m(e),style:{...x,color:"#00ff88"},children:"Sent ✓ (undo)"}):(0,t.jsxs)("button",{onClick:()=>C(e,F),style:b,children:["Sent · +",s[e.tier]||2]})]},e.id)}),F.added.length>0&&(0,t.jsxs)("div",{style:{marginTop:10,fontSize:12,color:"#00ff88"},children:["★ Added from this circle: ",F.added.map(e=>e.name).join(", ")]})]}),v&&(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, #FFD700, #FF6B35)",color:"#000",fontWeight:800,fontSize:13,boxShadow:"0 8px 30px rgba(0,0,0,0.5)",zIndex:50},children:v})]})}let b={padding:"7px 12px",borderRadius:8,border:"none",cursor:"pointer",fontWeight:800,fontSize:12,background:"linear-gradient(135deg, #FF6B35, #FFD700)",color:"#000"},x={padding:"7px 12px",borderRadius:8,border:f,cursor:"pointer",fontWeight:600,fontSize:12,background:"rgba(255,255,255,0.05)",color:"#dfe6e9",textDecoration:"none"};var y=e.i(2776),m=e.i(15812),S=e.i(90179),k=e.i(28867),j=e.i(86106),v=e.i(7214),w=e.i(40996);let _={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"};function C(){let{userId:e,userProfile:s}=(0,m.useUser)(),a=s?.sectors||[],[d,u]=(0,r.useState)([]),[f,p]=(0,r.useState)(!0),[g,b]=(0,r.useState)("all"),[x,y]=(0,r.useState)(new Set),C=(0,k.default)(),[F,z]=(0,r.useState)([]),[B,A]=(0,r.useState)({}),[R,I]=(0,r.useState)("quest"),[T,O]=(0,r.useState)([]),[$,P]=(0,r.useState)(()=>new Set),[M,W]=(0,r.useState)(null),[E,D]=(0,r.useState)(null),[N,L]=(0,r.useState)(()=>{{let e=new URLSearchParams(window.location.search);if(e.get("groupBy"))return e.get("groupBy")}return"bridge"});(0,r.useEffect)(()=>{{let e=new URLSearchParams(window.location.search).get("bridge");e&&D(e)}},[]),(0,r.useEffect)(()=>{!i.IS_DEMO&&e&&t();async function t(){let[t,r,i]=await Promise.all([(0,n.loadNetwork)(e),fetch(`/api/outreach?userId=${e}`).then(e=>e.json()).catch(()=>({pending:[]})),(0,w.loadScanNotes)()]),o=t.degree1,s=t.degree2;O(o.filter(e=>e.unlocked_from_bridge_id)),P(new Set(s.map(e=>e.source_connection_id).filter(Boolean))),W((0,l.reachIndex)(o,s,i));let d=new Set(o.map(e=>e.profile_url)),c={};o.forEach(e=>{c[e.id]=e}),z(r.pending||[]),A(c),u(s.filter(e=>("S"===e.tier||"A"===e.tier||"B"===e.tier)&&!d.has(e.profile_url)).map(e=>{let t,r,n=c[e.source_connection_id],i=(t=parseFloat(e.power_score)||0,r=(e.headline||"").toLowerCase(),(0,S.rowCompanyScore)(e)>=S.TOP_COMPANY&&(t+=1),(a||[]).forEach(e=>{r.includes(e.toLowerCase())&&(t+=.5)}),"S"===e.tier?t*=1.5:"A"===e.tier&&(t*=1.2),t),o="S"===e.tier?50:"A"===e.tier?25:10;return{...e,bridge:n,priority:i,xp:o}}).sort((e,t)=>t.priority-e.priority)),p(!1)}},[e]);let U=(0,r.useMemo)(()=>new Set([...F,...d].filter(e=>(0,j.hasRequest)(e,C)).map(e=>e.id)),[F,d,C]),q=(0,r.useMemo)(()=>{let e=new Set,t=[];for(let r of[...F,...d]){let n=(0,v.keyFor)(r);!e.has(n)&&(0,j.hasRequest)(r,C)&&(e.add(n),t.push({...r,bridge:B[r.source_connection_id]||r.bridge||null}))}return t},[F,d,C,B]);if(i.IS_DEMO)return(0,t.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"rgba(255,255,255,0.7)",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:10,textAlign:"center",padding:24},children:[(0,t.jsx)("h2",{style:{margin:0,fontSize:18,fontWeight:700,color:"#fff"},children:"Not part of the demo"}),(0,t.jsx)("div",{style:{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 K="all"===g?d:d.filter(e=>e.tier===g);E&&(K=K.filter(e=>e.bridge?.id===E));let J={S:0,A:0,B:0};d.forEach(e=>{void 0!==J[e.tier]&&J[e.tier]++});let V={};K.forEach(e=>{let t;V[t="bridge"===N?e.bridge?.id||"unknown":"company"===N?(e.company||"Unknown").trim()||"Unknown":e.tier]||(V[t]=[]),V[t].push(e)});let Y={S:0,A:1,B:2},H=Object.entries(V).sort((e,t)=>{if("tier"===N)return(Y[e[0]]||9)-(Y[t[0]]||9);if("bridge"===N){let r=e[1][0]?.bridge,n=t[1][0]?.bridge,i=Y[r?.tier]??9,o=Y[n?.tier]??9;if(i!==o)return i-o}return t[1].length-e[1].length});function X(e){y(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})}return f?(0,t.jsx)("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#0a0a1a",color:"#fff"},children:"Loading..."}):(0,t.jsxs)("div",{style:{height:"100vh",background:"#0a0a1a",color:"#fff",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,t.jsxs)("header",{style:{padding:"14px 24px",borderBottom:"1px solid rgba(255,255,255,0.1)",flexShrink:0},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:10},children:[(0,t.jsxs)(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:"1px solid rgba(255,255,255,0.1)"},children:[(0,t.jsx)("span",{style:{fontSize:16},children:"←"})," Map"]}),(0,t.jsx)("h1",{style:{fontSize:20,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FF6B35, #FFD700)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Outlink"}),(0,t.jsxs)("div",{style:{display:"flex",gap:2,background:"rgba(255,255,255,0.06)",borderRadius:6,padding:2},children:[(0,t.jsx)("button",{onClick:()=>I("quest"),style:{padding:"5px 12px",borderRadius:4,border:"none",fontSize:11,fontWeight:700,cursor:"pointer",background:"quest"===R?"linear-gradient(135deg, #FFD700, #FF6B35)":"transparent",color:"quest"===R?"#000":"#FFD700"},children:"Circles"}),(0,t.jsxs)("button",{onClick:()=>I("recs"),style:{padding:"5px 12px",borderRadius:4,border:"none",fontSize:11,fontWeight:600,cursor:"pointer",background:"recs"===R?"#fff":"transparent",color:"recs"===R?"#000":"#888"},children:["To Add (",d.length,")"]}),(0,t.jsxs)("button",{onClick:()=>I("pending"),style:{padding:"5px 12px",borderRadius:4,border:"none",fontSize:11,fontWeight:600,cursor:"pointer",background:"pending"===R?"linear-gradient(135deg, #FF6B35, #FFD700)":"transparent",color:"pending"===R?"#000":"#FF6B35"},children:["Pending (",q.length,")"]})]}),(0,t.jsx)("div",{style:{marginLeft:"auto",display:"flex",gap:6},children:"recs"===R&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>L("tier"),style:{padding:"4px 10px",borderRadius:4,border:"none",fontSize:10,fontWeight:600,cursor:"pointer",background:"tier"===N?"rgba(255,255,255,0.15)":"rgba(255,255,255,0.05)",color:"tier"===N?"#fff":"#666"},children:"By Tier"}),(0,t.jsx)("button",{onClick:()=>L("bridge"),style:{padding:"4px 10px",borderRadius:4,border:"none",fontSize:10,fontWeight:600,cursor:"pointer",background:"bridge"===N?"rgba(255,255,255,0.15)":"rgba(255,255,255,0.05)",color:"bridge"===N?"#fff":"#666"},children:"By Bridge"}),(0,t.jsx)("button",{onClick:()=>L("company"),style:{padding:"4px 10px",borderRadius:4,border:"none",fontSize:10,fontWeight:600,cursor:"pointer",background:"company"===N?"rgba(255,255,255,0.15)":"rgba(255,255,255,0.05)",color:"company"===N?"#fff":"#666"},children:"By Company"})]})})]}),(0,t.jsx)("div",{style:{display:"quest"===R?"none":"flex",gap:6},children:[{k:"all",l:`All (${d.length})`},{k:"S",l:`S (${J.S})`,c:_.S},{k:"A",l:`A (${J.A})`,c:_.A},{k:"B",l:`B (${J.B})`,c:_.B}].map(e=>(0,t.jsx)("button",{onClick:()=>b(e.k),style:{padding:"4px 12px",borderRadius:16,border:"none",fontSize:11,fontWeight:600,cursor:"pointer",background:g===e.k?e.c||"#fff":"rgba(255,255,255,0.06)",color:g===e.k?"#000":e.c||"#888"},children:e.l},e.k))})]}),"recs"===R&&x.size>0&&(0,t.jsxs)("div",{style:{padding:"10px 24px",background:"rgba(255,215,0,0.08)",borderBottom:"1px solid rgba(255,215,0,0.2)",display:"flex",alignItems:"center",gap:12,flexShrink:0},children:[(0,t.jsxs)("span",{style:{fontSize:12,color:"#FFD700",fontWeight:600},children:[x.size," selected"]}),(0,t.jsxs)("button",{onClick:function(){let e=K.filter(e=>x.has(e.id));if(0===e.length)return;if(1===e.length)return void window.open(e[0].profile_url,"_blank");let t=new Blob([`<!DOCTYPE html><html><head><title>Outlink — ${e.length} profiles</title>
2
2
  <style>body{background:#0a0a1a;color:#fff;font-family:-apple-system,sans-serif;padding:24px;margin:0}
3
3
  h2{color:#FFD700;margin-bottom:4px}p{color:#888;font-size:13px;margin-bottom:16px}
4
4
  .btn{display:block;padding:12px 16px;margin-bottom:6px;background:rgba(255,255,255,0.06);
@@ -12,7 +12,7 @@
12
12
  <button class="open-all" onclick="document.querySelectorAll('.btn').forEach((a,i)=>setTimeout(()=>a.click(),i*300))">
13
13
  Open All (${e.length})</button>
14
14
  ${e.map(e=>{let t="S"===e.tier?"#FFD700":"A"===e.tier?"#9B59B6":"#3498DB";return'<a class="btn" href="'+e.profile_url+'" target="_blank"><span class="name">'+(e.name||"")+'</span><span class="tier" style="color:'+t+'">'+e.tier+" · "+parseFloat(e.power_score||0).toFixed(1)+'</span><br><span style="color:#666;font-size:11px">'+(e.headline||"").substring(0,60)+"</span></a>"}).join("")}
15
- </body></html>`],{type:"text/html"});window.open(URL.createObjectURL(t),"_blank")},style:{padding:"6px 16px",borderRadius:6,border:"none",cursor:"pointer",background:"#0077B5",color:"#fff",fontWeight:700,fontSize:12},children:["Open ",x.size," on LinkedIn"]}),(0,t.jsxs)("span",{style:{fontSize:10,color:"#888"},children:["+",K.filter(e=>x.has(e.id)).reduce((e,t)=>e+t.xp,0)," XP potential"]}),(0,t.jsx)("button",{onClick:()=>y(new Set),style:{marginLeft:"auto",background:"none",border:"none",color:"#888",cursor:"pointer",fontSize:11},children:"Clear"})]}),"quest"===R&&(0,t.jsx)("div",{style:{flex:1,overflow:"auto"},children:(0,t.jsx)(h,{recs:d,sentIds:U,added:T,mappedIds:$,reach:W,onSend:e=>(0,j.markRequested)(e,{bridgeId:e.source_connection_id}).catch(()=>{}),onUndo:e=>(0,j.undoRequest)(e).catch(()=>{})})}),"quest"!==R&&(0,t.jsx)("div",{style:{flex:1,overflow:"auto",padding:"12px 24px"},children:(0,t.jsxs)("div",{style:{maxWidth:700,margin:"0 auto"},children:["pending"===R&&(0,t.jsx)(t.Fragment,{children:0===q.length?(0,t.jsxs)("div",{style:{textAlign:"center",padding:40,color:"#555"},children:[(0,t.jsx)("div",{style:{fontSize:32,marginBottom:8},children:"⏳"}),(0,t.jsx)("div",{style:{fontSize:14,fontWeight:600},children:"No pending requests"}),(0,t.jsx)("div",{style:{fontSize:11,color:"#444",marginTop:4},children:'Click "Add" on someone to track your outreach'})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:{fontSize:10,color:"#666",marginBottom:12},children:"Waiting for response. When they accept, their cluster unlocks for bridging."}),q.map(e=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"10px 12px",marginBottom:4,background:"rgba(255,107,53,0.04)",borderRadius:8,border:"1px solid rgba(255,107,53,0.1)"},children:[(0,c.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,c.localPhoto)(e.profile_image_url),alt:"",style:{width:36,height:36,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`2px solid ${_[e.tier]||"#555"}`},onError:e=>{e.target.style.display="none"}}):(0,t.jsx)("div",{style:{width:36,height:36,borderRadius:"50%",flexShrink:0,fontSize:14,fontWeight:700,background:_[e.tier]||"#555",color:"S"===e.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:13,fontWeight:600},children:e.name}),(0,t.jsx)("div",{style:{fontSize:10,color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.headline?.substring(0,55)}),e.bridge&&(0,t.jsxs)("div",{style:{fontSize:9,color:"#FF6B35",marginTop:2},children:["via ",e.bridge.name?.split(" ")[0]," · unlocks bridge cluster"]})]}),(0,t.jsxs)("div",{style:{textAlign:"center",flexShrink:0},children:[(0,t.jsx)("div",{style:{fontSize:10,fontWeight:800,color:_[e.tier],padding:"2px 8px",borderRadius:4,background:`${_[e.tier]||"#555"}15`},children:e.tier}),(0,t.jsx)("div",{style:{fontSize:8,color:"#FF6B35",marginTop:2,fontWeight:600},children:"PENDING"})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:4,flexShrink:0},children:[(0,t.jsx)("a",{href:e.profile_url,target:"_blank",rel:"noopener noreferrer",style:{padding:"4px 8px",borderRadius:4,fontSize:9,fontWeight:700,background:"#0077B5",color:"#fff",textDecoration:"none"},children:"View"}),(0,t.jsx)("button",{onClick:()=>{(0,j.undoRequest)(e).catch(()=>{})},style:{padding:"4px 8px",borderRadius:4,fontSize:9,fontWeight:600,background:"rgba(255,255,255,0.06)",color:"#666",border:"none",cursor:"pointer"},children:"Undo"})]})]},e.id))]})}),"recs"===R&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[(0,t.jsx)("input",{type:"checkbox",checked:x.size===K.length&&K.length>0,onChange:function(){x.size===K.length?y(new Set):y(new Set(K.map(e=>e.id)))},style:{cursor:"pointer"}}),(0,t.jsxs)("span",{style:{fontSize:10,color:"#666"},children:["Select all (",K.length,")"]})]}),H.map(([e,r])=>(0,t.jsxs)("div",{style:{marginBottom:16},children:["bridge"===N?(()=>{let e=r[0]?.bridge;if(!e)return null;let n=r.filter(e=>"S"===e.tier).length,i=r.filter(e=>"A"===e.tier).length,o=r.filter(e=>"B"===e.tier).length,l=3*n+2*i+o;return(0,t.jsxs)("div",{style:{padding:"10px 12px",marginBottom:6,borderRadius:8,background:`${_[e.tier]||"#555"}08`,border:`1px solid ${_[e.tier]||"#555"}20`},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,c.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,c.localPhoto)(e.profile_image_url),alt:"",style:{width:36,height:36,borderRadius:"50%",objectFit:"cover",border:`2px solid ${_[e.tier]}`},onError:e=>{e.target.style.display="none"}}):(0,t.jsx)("div",{style:{width:36,height:36,borderRadius:"50%",fontSize:14,fontWeight:700,background:_[e.tier],color:"S"===e.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:13,fontWeight:700,color:"#fff"},children:e.name}),(0,t.jsx)("div",{style:{fontSize:9,color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.headline?.substring(0,50)})]}),(0,t.jsxs)("div",{style:{textAlign:"right",flexShrink:0},children:[(0,t.jsx)("div",{style:{fontSize:11,fontWeight:800,color:_[e.tier]},children:e.tier}),(0,t.jsxs)("div",{style:{fontSize:8,color:"#666"},children:[r.length," to add"]})]})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginTop:8},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:4,fontSize:9},children:[n>0&&(0,t.jsxs)("span",{style:{color:"#FFD700",fontWeight:700},children:[n,"S"]}),i>0&&(0,t.jsxs)("span",{style:{color:"#9B59B6",fontWeight:700},children:[i,"A"]}),o>0&&(0,t.jsxs)("span",{style:{color:"#3498DB",fontWeight:700},children:[o,"B"]})]}),(0,t.jsx)("div",{style:{flex:1,height:4,background:"rgba(255,255,255,0.06)",borderRadius:2},children:(0,t.jsx)("div",{style:{height:"100%",borderRadius:2,width:`${Math.min(100,l/30*100)}%`,background:`linear-gradient(90deg, ${_[e.tier]}, #FF6B35)`}})}),(0,t.jsxs)("button",{onClick:()=>{let e=r.map(e=>e.profile_url);if(1===e.length)return void window.open(e[0],"_blank");let t=`<!DOCTYPE html><html><head><title>Top ${Math.min(10,e.length)}</title>
15
+ </body></html>`],{type:"text/html"});window.open(URL.createObjectURL(t),"_blank")},style:{padding:"6px 16px",borderRadius:6,border:"none",cursor:"pointer",background:"#0077B5",color:"#fff",fontWeight:700,fontSize:12},children:["Open ",x.size," on LinkedIn"]}),(0,t.jsxs)("span",{style:{fontSize:10,color:"#888"},children:["+",K.filter(e=>x.has(e.id)).reduce((e,t)=>e+t.xp,0)," XP potential"]}),(0,t.jsx)("button",{onClick:()=>y(new Set),style:{marginLeft:"auto",background:"none",border:"none",color:"#888",cursor:"pointer",fontSize:11},children:"Clear"})]}),"quest"===R&&(0,t.jsx)("div",{style:{flex:1,overflow:"auto"},children:(0,t.jsx)(h,{recs:d,sentIds:U,added:T,mappedIds:$,reach:M,onSend:e=>(0,j.markRequested)(e,{bridgeId:e.source_connection_id}).catch(()=>{}),onUndo:e=>(0,j.undoRequest)(e).catch(()=>{})})}),"quest"!==R&&(0,t.jsx)("div",{style:{flex:1,overflow:"auto",padding:"12px 24px"},children:(0,t.jsxs)("div",{style:{maxWidth:700,margin:"0 auto"},children:["pending"===R&&(0,t.jsx)(t.Fragment,{children:0===q.length?(0,t.jsxs)("div",{style:{textAlign:"center",padding:40,color:"#555"},children:[(0,t.jsx)("div",{style:{fontSize:32,marginBottom:8},children:"⏳"}),(0,t.jsx)("div",{style:{fontSize:14,fontWeight:600},children:"No pending requests"}),(0,t.jsx)("div",{style:{fontSize:11,color:"#444",marginTop:4},children:'Click "Add" on someone to track your outreach'})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:{fontSize:10,color:"#666",marginBottom:12},children:"Waiting for response. When they accept, their cluster unlocks for bridging."}),q.map(e=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"10px 12px",marginBottom:4,background:"rgba(255,107,53,0.04)",borderRadius:8,border:"1px solid rgba(255,107,53,0.1)"},children:[(0,c.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,c.localPhoto)(e.profile_image_url),alt:"",style:{width:36,height:36,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`2px solid ${_[e.tier]||"#555"}`},onError:e=>{e.target.style.display="none"}}):(0,t.jsx)("div",{style:{width:36,height:36,borderRadius:"50%",flexShrink:0,fontSize:14,fontWeight:700,background:_[e.tier]||"#555",color:"S"===e.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:13,fontWeight:600},children:e.name}),(0,t.jsx)("div",{style:{fontSize:10,color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.headline?.substring(0,55)}),e.bridge&&(0,t.jsxs)("div",{style:{fontSize:9,color:"#FF6B35",marginTop:2},children:["via ",e.bridge.name?.split(" ")[0]," · unlocks bridge cluster"]})]}),(0,t.jsxs)("div",{style:{textAlign:"center",flexShrink:0},children:[(0,t.jsx)("div",{style:{fontSize:10,fontWeight:800,color:_[e.tier],padding:"2px 8px",borderRadius:4,background:`${_[e.tier]||"#555"}15`},children:e.tier}),(0,t.jsx)("div",{style:{fontSize:8,color:"#FF6B35",marginTop:2,fontWeight:600},children:"PENDING"})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:4,flexShrink:0},children:[(0,t.jsx)("a",{href:e.profile_url,target:"_blank",rel:"noopener noreferrer",style:{padding:"4px 8px",borderRadius:4,fontSize:9,fontWeight:700,background:"#0077B5",color:"#fff",textDecoration:"none"},children:"View"}),(0,t.jsx)("button",{onClick:()=>{(0,j.undoRequest)(e).catch(()=>{})},style:{padding:"4px 8px",borderRadius:4,fontSize:9,fontWeight:600,background:"rgba(255,255,255,0.06)",color:"#666",border:"none",cursor:"pointer"},children:"Undo"})]})]},e.id))]})}),"recs"===R&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[(0,t.jsx)("input",{type:"checkbox",checked:x.size===K.length&&K.length>0,onChange:function(){x.size===K.length?y(new Set):y(new Set(K.map(e=>e.id)))},style:{cursor:"pointer"}}),(0,t.jsxs)("span",{style:{fontSize:10,color:"#666"},children:["Select all (",K.length,")"]})]}),H.map(([e,r])=>(0,t.jsxs)("div",{style:{marginBottom:16},children:["bridge"===N?(()=>{let e=r[0]?.bridge;if(!e)return null;let n=r.filter(e=>"S"===e.tier).length,i=r.filter(e=>"A"===e.tier).length,o=r.filter(e=>"B"===e.tier).length,l=3*n+2*i+o;return(0,t.jsxs)("div",{style:{padding:"10px 12px",marginBottom:6,borderRadius:8,background:`${_[e.tier]||"#555"}08`,border:`1px solid ${_[e.tier]||"#555"}20`},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,c.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,c.localPhoto)(e.profile_image_url),alt:"",style:{width:36,height:36,borderRadius:"50%",objectFit:"cover",border:`2px solid ${_[e.tier]}`},onError:e=>{e.target.style.display="none"}}):(0,t.jsx)("div",{style:{width:36,height:36,borderRadius:"50%",fontSize:14,fontWeight:700,background:_[e.tier],color:"S"===e.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:13,fontWeight:700,color:"#fff"},children:e.name}),(0,t.jsx)("div",{style:{fontSize:9,color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.headline?.substring(0,50)})]}),(0,t.jsxs)("div",{style:{textAlign:"right",flexShrink:0},children:[(0,t.jsx)("div",{style:{fontSize:11,fontWeight:800,color:_[e.tier]},children:e.tier}),(0,t.jsxs)("div",{style:{fontSize:8,color:"#666"},children:[r.length," to add"]})]})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginTop:8},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:4,fontSize:9},children:[n>0&&(0,t.jsxs)("span",{style:{color:"#FFD700",fontWeight:700},children:[n,"S"]}),i>0&&(0,t.jsxs)("span",{style:{color:"#9B59B6",fontWeight:700},children:[i,"A"]}),o>0&&(0,t.jsxs)("span",{style:{color:"#3498DB",fontWeight:700},children:[o,"B"]})]}),(0,t.jsx)("div",{style:{flex:1,height:4,background:"rgba(255,255,255,0.06)",borderRadius:2},children:(0,t.jsx)("div",{style:{height:"100%",borderRadius:2,width:`${Math.min(100,l/30*100)}%`,background:`linear-gradient(90deg, ${_[e.tier]}, #FF6B35)`}})}),(0,t.jsxs)("button",{onClick:()=>{let e=r.map(e=>e.profile_url);if(1===e.length)return void window.open(e[0],"_blank");let t=`<!DOCTYPE html><html><head><title>Top ${Math.min(10,e.length)}</title>
16
16
  <style>body{background:#0a0a1a;color:#fff;font-family:-apple-system,sans-serif;padding:24px}
17
17
  .btn{display:block;padding:10px 14px;margin-bottom:4px;background:rgba(255,255,255,0.06);
18
18
  border:1px solid rgba(255,255,255,0.1);border-radius:6px;color:#fff;text-decoration:none;font-size:12px}
@@ -30,4 +30,4 @@
30
30
  font-weight:700;font-size:13px;cursor:pointer;border:none;margin-bottom:16px}</style></head>
31
31
  <body><h3 style="color:${_[e]}">${e}-Tier (${n.length})</h3>
32
32
  <button class="oa" onclick="document.querySelectorAll('.btn').forEach((a,i)=>setTimeout(()=>a.click(),i*300))">
33
- Open All</button>${n.map(e=>'<a class="btn" href="'+e.profile_url+'" target="_blank">'+e.name+" · "+parseFloat(e.power_score||0).toFixed(1)+"</a>").join("")}</body></html>`;window.open(URL.createObjectURL(new Blob([t],{type:"text/html"})),"_blank")},style:{marginLeft:"auto",padding:"2px 8px",borderRadius:3,border:"none",cursor:"pointer",background:"#0077B5",color:"#fff",fontSize:8,fontWeight:700},children:["Open All ",e]})]}),n.map(e=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"5px 8px 5px 16px",borderBottom:"1px solid rgba(255,255,255,0.02)",background:x.has(e.id)?"rgba(255,215,0,0.05)":"transparent",cursor:"pointer"},onMouseEnter:t=>{x.has(e.id)||(t.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:t=>{x.has(e.id)||(t.currentTarget.style.background="transparent")},children:[(0,t.jsx)("input",{type:"checkbox",checked:x.has(e.id),onChange:()=>X(e.id),onClick:e=>e.stopPropagation(),style:{cursor:"pointer",flexShrink:0}}),(0,c.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,c.localPhoto)(e.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${_[e.tier]||"#555"}`},onError:e=>{e.target.style.display="none"}}):(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",flexShrink:0,fontSize:10,fontWeight:700,background:_[e.tier]||"#555",color:"S"===e.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},onClick:()=>X(e.id),children:[(0,t.jsx)("div",{style:{fontSize:11,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,t.jsx)("div",{style:{fontSize:8,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.headline?.substring(0,45)})]}),(0,t.jsx)("span",{style:{fontSize:9,fontWeight:700,color:_[e.tier],flexShrink:0},children:parseFloat(e.power_score||0).toFixed(1)}),U.has(e.id)?(0,t.jsx)("span",{style:{padding:"3px 6px",borderRadius:3,fontSize:8,fontWeight:700,background:"rgba(255,107,53,0.15)",color:"#FF6B35",flexShrink:0},children:"Sent"}):(0,t.jsx)("a",{href:e.profile_url,target:"_blank",rel:"noopener noreferrer",onClick:t=>{t.stopPropagation(),(0,j.markRequested)(e,{bridgeId:e.source_connection_id}).catch(()=>{})},style:{padding:"3px 6px",borderRadius:3,fontSize:8,fontWeight:700,background:"#0077B5",color:"#fff",textDecoration:"none",flexShrink:0},children:"Add"})]},e.id))]},e)}):r.map(e=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 8px",borderBottom:"1px solid rgba(255,255,255,0.03)",background:x.has(e.id)?"rgba(255,215,0,0.05)":"transparent",cursor:"pointer"},onMouseEnter:t=>{x.has(e.id)||(t.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:t=>{x.has(e.id)||(t.currentTarget.style.background="transparent")},children:[(0,t.jsx)("input",{type:"checkbox",checked:x.has(e.id),onChange:()=>X(e.id),onClick:e=>e.stopPropagation(),style:{cursor:"pointer",flexShrink:0}}),(0,c.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,c.localPhoto)(e.profile_image_url),alt:"",style:{width:32,height:32,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${_[e.tier]||"#555"}`},onError:e=>{e.target.style.display="none",e.target.nextSibling.style.display="flex"}}):null,(0,t.jsx)("div",{style:{width:32,height:32,borderRadius:"50%",flexShrink:0,fontSize:12,fontWeight:700,background:_[e.tier]||"#555",color:"S"===e.tier?"#000":"#fff",display:(0,c.localPhoto)(e.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},onClick:()=>X(e.id),children:[(0,t.jsx)("div",{style:{fontSize:12,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,t.jsx)("div",{style:{fontSize:9,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.headline?.substring(0,50)})]}),e.bridge&&(0,t.jsxs)("span",{style:{fontSize:8,color:"#555",flexShrink:0,maxWidth:60,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["via ",e.bridge.name?.split(" ")[0]]}),(0,t.jsx)("div",{style:{textAlign:"right",flexShrink:0,minWidth:32},children:(0,t.jsx)("div",{style:{fontSize:10,fontWeight:700,color:_[e.tier]},children:parseFloat(e.power_score).toFixed(1)})}),U.has(e.id)?(0,t.jsx)("span",{style:{padding:"4px 8px",borderRadius:4,fontSize:9,fontWeight:700,background:"rgba(255,107,53,0.15)",color:"#FF6B35",flexShrink:0},children:"⏳ Sent"}):(0,t.jsx)("a",{href:e.profile_url,target:"_blank",rel:"noopener noreferrer",onClick:t=>{t.stopPropagation(),(0,j.markRequested)(e,{bridgeId:e.source_connection_id}).catch(()=>{})},style:{padding:"4px 8px",borderRadius:4,fontSize:9,fontWeight:700,background:"#0077B5",color:"#fff",textDecoration:"none",flexShrink:0},children:"Add"})]},e.id))]},e))]})]})})]})}e.s(["default",0,function(){return(0,t.jsx)(y.default,{children:(0,t.jsx)(C,{})})}],77305)},19821,e=>{"use strict";async function t(e){let t=e?`/api/network?userId=${encodeURIComponent(e)}`:"/api/network",r=await fetch(t);if(!r.ok)throw Error(`Failed to load network (${r.status})`);let n=await r.json();return{degree1:n.degree1||[],degree2:n.degree2||[],degree3:n.degree3||[]}}e.s(["loadNetwork",0,t])},36774,e=>{"use strict";let t=/^[A-Za-z0-9_-]+\.(webp|jpg|jpeg|png)$/,r="/avatars/";e.s(["localPhoto",0,function(e){return"string"==typeof e&&e.startsWith(r)&&t.test(e.slice(r.length))?e:null}])},48235,7214,e=>{"use strict";var t=e.i(36774);let r={S:0,A:1,B:2,C:3,D:4};function n(e){let t=parseFloat(e?.power_score);return Number.isFinite(t)?t:0}function i(e){return Math.round(10*n(e))/10}function o(e){return String(e?.profile_url||"").split(/[?#]/)[0].replace(/\/+$/,"")||`id:${e?.id}`}let l=(e,t)=>String(e??"").localeCompare(String(t??""),void 0,{numeric:!0});function s(e,t){return(r[e.tier]??9)-(r[t.tier]??9)||n(t)-n(e)||String(e.name||"").localeCompare(String(t.name||""))||l(e.id,t.id)}function a(e,t){return e.bridge&&t.bridge?s(e.bridge,t.bridge):e.bridge?-1:t.bridge?1:l(e.id,t.id)}function d(e,t){return t.score-e.score||t.waysIn-e.waysIn||a(e.routes[0]||c,t.routes[0]||c)||String(e.person.name||"").localeCompare(String(t.person.name||""))||(e.key<t.key?-1:+(e.key>t.key))}let c={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 f(e,t){let r=String(e||"");return t<=1?r?"…":"":r.length>t?`${r.slice(0,t-1)}…`:r}function p(e,t){return e?t.scanned.has(e.id)||e.profile_url&&t.read?.has(o(e))?"scanned":e.profile_url&&t.hidden.has(o(e))?"hidden":"todo":"todo"}function g(e,t){if(!e||1!==e.degree||null==e.unlocked_from_bridge_id)return null;let r=p(e,t);return"todo"===r?"ready":r}e.s(["TIERS",0,["S","A","B","C","D"],"compareBridges",0,s,"compareWaysIn",0,function(e,t){return t.waysIn-e.waysIn||d(e,t)},"keyFor",0,o,"routeIndex",0,function(e=[]){let t=new Map;for(let r of e||[]){let e=o(r),n=t.get(e);n||(n=new Set,t.set(e,n)),n.add(r.source_connection_id??null)}return t},"routesFor",0,function(e,t,r){return e?[...t?.get(o(e))??(null!=e.source_connection_id?new Set([e.source_connection_id]):new Set)].map(e=>({id:e,bridge:r?.get(e)??null})).sort(a):[]},"score",0,n,"score1",0,i,"separationPeople",0,function(e=[],r=[]){let n=new Map;for(let e of r||[])n.set(e.id,e);let s=new Map,c=new Map;for(let r of e||[]){let e=o(r);c.set(r.id,e);let n=s.get(e);n?function(e,r){let n=i(e)-i(r);if(n)return n>0;let o=!!(0,t.localPhoto)(e.profile_image_url);return!!(0,t.localPhoto)(r.profile_image_url)!==o?o:0>l(e.id,r.id)}(r,n.person)&&(n.person=r):(n={key:e,person:r,rowIds:[],routeIds:new Set},s.set(e,n)),n.rowIds.push(r.id),n.routeIds.add(r.source_connection_id??null)}let u={people:s.size,byTier:{S:0,A:0,B:0,C:0,D:0},multi:0,bridges:0,unresolvedIds:0,peopleOnlyUnresolved:0,onlyUnresolvedVia:0},f=new Set,p=new Set,g=new Set,h=[];for(let e of s.values()){let t=[...e.routeIds].map(e=>({id:e,bridge:n.get(e)??null}));t.sort(a);let r=t.filter(e=>e.bridge);for(let e of t)(e.bridge?f:p).add(e.id);if(!r.length)for(let e of(u.peopleOnlyUnresolved++,t))g.add(e.id);let{person:o}=e,l=o.tier;void 0!==u.byTier[l]&&u.byTier[l]++,t.length>1&&u.multi++,h.push({key:e.key,person:o,score:i(o),tier:l,routes:t,waysIn:t.length,rowIds:e.rowIds,haystack:[o.name,o.headline,o.company,o.role,...r.map(e=>e.bridge.name)].filter(Boolean).join("\n").toLowerCase(),rank:0,tied:!1})}return u.bridges=f.size,u.unresolvedIds=p.size,u.onlyUnresolvedVia=g.size,h.sort(d),function(e){for(let t=0;t<e.length;t++){let r=e[t],n=e[t-1],i=n&&n.score===r.score&&n.waysIn===r.waysIn;r.rank=i?n.rank:t+1,i&&(r.tied=!0,n.tied=!0)}}(h),{people:h,rowToKey:c,summary:u}},"shortName",0,u,"summitLayout",0,function(e=[],t=800,r=!1){let n=r?36:26,i=Math.round(.42*t),o=Math.round(.58*t),l=e.map((e,r)=>{var i;return{key:e.key,p:e,x:o,y:16+r*n,r:(i=e.waysIn)>=4?8.5:3===i?7:2===i?5.5:4,label:f(`#${e.rank}${e.tied?"=":""} ${e.person.name||""}`,Math.floor((t-o-60)/6.2))}}),a=new Map,d="\0unresolved";for(let e of l)for(let t of e.p.routes){let r=t.bridge?t.id:d,n=a.get(r);n||(n={id:t.bridge?t.id:null,bridge:t.bridge,unresolved:!t.bridge,ys:[],count:0},a.set(r,n)),n.count++,n.ys.push(e.y)}let c=[...a.values()].map(e=>({...e,bary:e.ys.reduce((e,t)=>e+t,0)/e.ys.length}));c.sort((e,t)=>e.bary-t.bary||e.unresolved-t.unresolved||(e.bridge&&t.bridge?s(e.bridge,t.bridge):0));let p=l.length?l[l.length-1].y:16,g=c.length>1?Math.max(18,(p-16)/(c.length-1)):0,h=Math.max(4,Math.floor((i-10-42)/6));c.forEach((e,t)=>{if(e.x=i,e.y=1===c.length?(16+p)/2:16+t*g,e.r=5,e.unresolved)e.label=f(`can't be named (${e.count})`,h);else{let t=e.bridge.name||"";e.label=t.length<=h?t:f(u(t),h)}delete e.ys});let b=new Map(c.map(e=>[e.unresolved?d:e.id,e])),x=[];for(let e of l){let t=new Set;e.p.routes.forEach((r,n)=>{let i=r.bridge?r.id:d;if(t.has(i))return;t.add(i);let o=b.get(i);x.push({key:e.key,bridgeId:o.id,primary:0===n&&!o.unresolved,unresolved:o.unresolved,tier:o.bridge?.tier??null,x1:o.x,y1:o.y,x2:e.x,y2:e.y})})}let y=Math.max(p,c.length?c[c.length-1].y:0),m=l.length?Math.ceil(y+16):0,S={x:20,y:l.length?(16+Math.max(p,y))/2:16,r:14},k=c.map(e=>({id:e.id,x1:S.x,y1:S.y,x2:e.x,y2:e.y}));return{width:t,height:m,you:S,people:l,bridges:c,links:x,spokes:k}}],7214),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,p,"reachIndex",0,function(e=[],t=[],r={}){let n=new Set;for(let e of t||[])e?.source_connection_id!=null&&n.add(e.source_connection_id);let i=new Set;for(let e of r?.skips||[])e?.profileUrl&&i.add(o({profile_url:e.profileUrl}));let l=new Set;for(let e of r?.read||[])e&&l.add(o({profile_url:e}));let s=new Map;for(let t of e||[]){let e=t?.unlocked_from_bridge_id;if(null==e||1!==t.degree)continue;let r=s.get(e);r||s.set(e,r=[]),r.push(t)}return{scanned:n,read:l,hidden:i,reachedFrom:s}},"reachState",0,g,"readyByCircle",0,function(e){let t=new Map;for(let[r,n]of e.reachedFrom){let i=n.filter(t=>"ready"===g(t,e)).length;i&&t.set(r,i)}return t},"readyToScan",0,function(e,t){return(e||[]).filter(e=>"ready"===g(e,t)).sort(s)}],48235)},40996,e=>{"use strict";async function t(){let e=await fetch("/api/scraper");if(!e.ok)throw Error("Could not reach the app.");return e.json()}async function r(e,t,n={}){let i=await fetch("/api/scraper",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,...t?{name:t}:{},...n})}),o=await i.json().catch(()=>({}));if(!i.ok)throw Error(o.error||"Could not start the scanner.");return o}async function n(e){let t=await fetch(`/api/scraper?resume=${encodeURIComponent(e)}`);return t.ok?(await t.json()).resume??null:null}Symbol.for("six-degrees.scan-state");let i=Object.freeze({skips:[],read:[]});async function o(){try{let e=await fetch("/api/scraper?reach=1");if(!e.ok)return i;let t=await e.json();return{skips:Array.isArray(t.skips)?t.skips:[],read:Array.isArray(t.read)?t.read:[]}}catch{return i}}async function l(e){let t=await fetch(`/api/scraper?person=${encodeURIComponent(e)}`);return t.ok?t.json():{person:null}}async function s(){await fetch("/api/scraper",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"cancel"})})}let a=Object.freeze({known:!1,running:!1,pending:!1,action:null,target:null,startedAt:null,progress:null,log:[],finished:[]}),d=new Set,c=a,u=JSON.stringify(c),f=null,p=null,g=0,h=!1,b=new Set;function x(e){let t=JSON.stringify(e);if(t!==u)for(let r of(u=t,c=Object.freeze(e),[...d]))r()}async function y(){(!("u">typeof document&&document.hidden)||c.running)&&await function(){if(p&&p.epoch===g)return p.promise;let e=g,t=fetch("/api/scraper?job=1").then(e=>e.ok?e.json():null).then(t=>{e===g&&function(e){if(!e||"object"!=typeof e)return;let t=!0===e.running;t&&null!=e.startedAt&&b.add(e.startedAt);let r=(Array.isArray(e.recent)?e.recent:[]).filter(e=>b.has(e.startedAt)).map(r=>({...r,log:!t&&r.startedAt===e.startedAt&&Array.isArray(e.log)?e.log:[]}));x({known:!0,running:t||h,pending:h&&!t,action:t?e.action??null:h?c.action:null,target:t?e.target??null:h?c.target:null,startedAt:t?e.startedAt??null:null,progress:t?e.progress??null:null,log:t&&Array.isArray(e.log)?e.log:[],finished:r})}(t)}).catch(()=>{}).finally(()=>{p?.promise===t&&(p=null)});return p={epoch:e,promise:t},t}(),clearTimeout(f),f=d.size?setTimeout(y,c.running?1500:5e3):null}function m(e){return d.add(e),1===d.size&&y(),()=>{d.delete(e),d.size||(clearTimeout(f),f=null)}}async function S(e,{name:t,id:n,onLog:i,...o}={}){let l;g++,h=!0,x({...c,known:!0,running:!0,pending:!0,action:e,target:t||n?{id:n??null,name:t??null}:null,startedAt:null,progress:null,log:[]});try{l=await r(e,t,{...n?{id:n}:{},...o})}catch(e){throw h=!1,g++,c.pending&&x({...c,running:!1,pending:!1,action:null,target:null,log:[]}),y(),e}h=!1,g++;let s=l?.startedAt??null;null!=s&&b.add(s);let a=new Promise(e=>{let t=m(()=>{c.running&&c.startedAt===s&&i?.(c.log);let r=null==s?c.running?null:{exitCode:null,failure:null,log:[]}:c.finished.find(e=>e.startedAt===s);r&&(t(),r.log.length&&i?.(r.log),e(r))});y()});return{startedAt:s,ended:a}}function k(e){return!!e?.target&&["bridge","rescrape","resume"].includes(e.action)}e.s(["NO_SCAN_NOTES",0,i,"SCANNER_UNKNOWN",0,a,"beginScrape",0,S,"busyReason",0,function(e=c){if(!e?.running)return null;let t=e.target?.name;switch(e.action){case"bridge":case"rescrape":case"resume":return t?`${t}’s circle is being scanned`:"A circle is being scanned";case"company":return t?`${t} is being scanned`:"A company is being scanned";case"auto-bridge":case"auto-bridge-retry":case"resume-all":return"Your bridges are being mapped, one by one";case"full":case"refresh":return"Your own connections are being scanned";default:switch(e.action){case"install":return"The scanner's packages are being installed";case"setup":return"The scanner is being set up";case"login":return"The LinkedIn sign-in window is open";case"photos":return"Profile photos are being saved";default:return"A scan is running"}}},"isCircleScan",0,k,"loadScanNotes",0,o,"notReadyMessage",0,function(e){if(!e)return"Could not reach the app.";let t=e.checks||{};return t.scriptsFound?t.dependencies?t.chrome?null:"Google Chrome is not installed.":t.python||t.download?"The scanner is not set up yet — open Scan to set it up.":"No Python 3.10 to 3.14 is installed on this machine.":"The scanner files are missing from this install."},"pickedPerson",0,l,"resumePoint",0,n,"runScrape",0,function(e,t={}){return S(e,t).then(e=>e.ended)},"scannerNow",0,function(){return c},"scansCircleOf",0,function(e,t){if(!k(e)||!t)return!1;let{id:r,name:n}=e.target;return r&&t.id?r===t.id:!!n&&n===t.name},"scraperStatus",0,t,"stopScrape",0,s,"watchScanner",0,m],40996)},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()}])},22016,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return x},useLinkStatus:function(){return m}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let o=e.r(90809),l=e.r(43476),s=o._(e.r(71645)),a=e.r(95057),d=e.r(8372),c=e.r(18581),u=e.r(18967),f=e.r(5550),p=e.r(88540),g=e.r(91949),h=e.r(73668),b=e.r(9396);function x(t){var r;let n,i,o,[x,m]=(0,s.useOptimistic)(g.IDLE_LINK_STATUS),S=(0,s.useRef)(null),{href:k,as:j,children:v,prefetch:w=null,passHref:_,replace:C,shallow:F,scroll:z,onClick:B,onMouseEnter:A,onTouchStart:R,legacyBehavior:I=!1,onNavigate:T,transitionTypes:O,ref:$,unstable_dynamicOnHover:P,...W}=t;n=v,I&&("string"==typeof n||"number"==typeof n)&&(n=(0,l.jsx)("a",{children:n}));let E=s.default.useContext(d.AppRouterContext),M=!1!==w,D=!1===w?"none":!0===w?"full":"auto",N="none"!==D?"auto"===D?b.FetchStrategy.PPR:b.FetchStrategy.Full:b.FetchStrategy.PPR,L="string"==typeof(r=j||k)?r:(0,a.formatUrl)(r);if(I){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});i=s.default.Children.only(n)}let U=I?i&&"object"==typeof i&&i.ref:$,q,K=s.default.useCallback(e=>(null!==E&&(S.current=(0,g.mountLinkInstance)(e,L,E,N,M,m,q)),()=>{S.current&&((0,g.unmountLinkForCurrentNavigation)(S.current),S.current=null),(0,g.unmountPrefetchableInstance)(e)}),[M,L,E,N,m,q]),J={ref:(0,c.useMergedRef)(K,U),onClick(t){I||"function"!=typeof B||B(t),I&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),!E||t.defaultPrevented||function(t,r,n,i,o,l,a,d="none"){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){i&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:f}=e.r(99781);s.default.startTransition(()=>{f(r,i?"replace":"push",!1===o?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,a,d)})}}(t,L,S,C,z,T,O,D)},onMouseEnter(e){I||"function"!=typeof A||A(e),I&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),E&&M&&(0,g.onNavigationIntent)(e.currentTarget,!0===P)},onTouchStart:function(e){I||"function"!=typeof R||R(e),I&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),E&&M&&(0,g.onNavigationIntent)(e.currentTarget,!0===P)}};return(0,u.isAbsoluteUrl)(L)?J.href=L:I&&!_&&("a"!==i.type||"href"in i.props)||(J.href=(0,f.addBasePath)(L)),o=I?s.default.cloneElement(i,J):(0,l.jsx)("a",{...W,...J,children:n}),(0,l.jsx)(y.Provider,{value:x,children:o})}let y=(0,s.createContext)(g.IDLE_LINK_STATUS),m=()=>(0,s.useContext)(y);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return i}});let n=e.r(71645);function i(e,t){let r=(0,n.useRef)(null),i=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(r.current=o(e,n)),t&&(i.current=o(t,n))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18967,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return x},MiddlewareNotFoundError:function(){return k},MissingStaticPage:function(){return S},NormalizeError:function(){return y},PageNotFoundError:function(){return m},SP:function(){return h},ST:function(){return b},WEB_VITALS:function(){return o},execOnce:function(){return l},getDisplayName:function(){return u},getLocationOrigin:function(){return d},getURL:function(){return c},isAbsoluteUrl:function(){return a},isResSent:function(){return f},loadGetInitialProps:function(){return g},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return j}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let o=["CLS","FCP","FID","INP","LCP","TTFB"];function l(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,a=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&s.test(e)};function d(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=d();return e.substring(t.length)}function u(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function g(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await g(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${u(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let h="u">typeof performance,b=h&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class x extends Error{}class y extends Error{}class m extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class S extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class k extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=e.r(18967),i=e.r(52817);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,i.hasBasePath)(r.pathname)}catch(e){return!1}}},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return a},searchParamsToUrlQuery:function(){return o},urlQueryToSearchParams:function(){return s}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});function o(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function l(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,l(e));else t.set(r,l(n));return t}function a(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},95057,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return d},urlObjectKeys:function(){return a}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let o=e.r(90809)._(e.r(98183)),l=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",i=e.pathname||"",s=e.hash||"",a=e.query||"",d=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?d=t+e.host:r&&(d=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(d+=":"+e.port)),a&&"object"==typeof a&&(a=String(o.urlQueryToSearchParams(a)));let c=e.search||a&&`?${a}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||l.test(n))&&!1!==d?(d="//"+(d||""),i&&"/"!==i[0]&&(i="/"+i)):d||(d=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),i=i.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${d}${i}${c}${s}`}let a=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function d(e){return s(e)}}]);
33
+ Open All</button>${n.map(e=>'<a class="btn" href="'+e.profile_url+'" target="_blank">'+e.name+" · "+parseFloat(e.power_score||0).toFixed(1)+"</a>").join("")}</body></html>`;window.open(URL.createObjectURL(new Blob([t],{type:"text/html"})),"_blank")},style:{marginLeft:"auto",padding:"2px 8px",borderRadius:3,border:"none",cursor:"pointer",background:"#0077B5",color:"#fff",fontSize:8,fontWeight:700},children:["Open All ",e]})]}),n.map(e=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"5px 8px 5px 16px",borderBottom:"1px solid rgba(255,255,255,0.02)",background:x.has(e.id)?"rgba(255,215,0,0.05)":"transparent",cursor:"pointer"},onMouseEnter:t=>{x.has(e.id)||(t.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:t=>{x.has(e.id)||(t.currentTarget.style.background="transparent")},children:[(0,t.jsx)("input",{type:"checkbox",checked:x.has(e.id),onChange:()=>X(e.id),onClick:e=>e.stopPropagation(),style:{cursor:"pointer",flexShrink:0}}),(0,c.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,c.localPhoto)(e.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${_[e.tier]||"#555"}`},onError:e=>{e.target.style.display="none"}}):(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",flexShrink:0,fontSize:10,fontWeight:700,background:_[e.tier]||"#555",color:"S"===e.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},onClick:()=>X(e.id),children:[(0,t.jsx)("div",{style:{fontSize:11,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,t.jsx)("div",{style:{fontSize:8,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.headline?.substring(0,45)})]}),(0,t.jsx)("span",{style:{fontSize:9,fontWeight:700,color:_[e.tier],flexShrink:0},children:parseFloat(e.power_score||0).toFixed(1)}),U.has(e.id)?(0,t.jsx)("span",{style:{padding:"3px 6px",borderRadius:3,fontSize:8,fontWeight:700,background:"rgba(255,107,53,0.15)",color:"#FF6B35",flexShrink:0},children:"Sent"}):(0,t.jsx)("a",{href:e.profile_url,target:"_blank",rel:"noopener noreferrer",onClick:t=>{t.stopPropagation(),(0,j.markRequested)(e,{bridgeId:e.source_connection_id}).catch(()=>{})},style:{padding:"3px 6px",borderRadius:3,fontSize:8,fontWeight:700,background:"#0077B5",color:"#fff",textDecoration:"none",flexShrink:0},children:"Add"})]},e.id))]},e)}):r.map(e=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 8px",borderBottom:"1px solid rgba(255,255,255,0.03)",background:x.has(e.id)?"rgba(255,215,0,0.05)":"transparent",cursor:"pointer"},onMouseEnter:t=>{x.has(e.id)||(t.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:t=>{x.has(e.id)||(t.currentTarget.style.background="transparent")},children:[(0,t.jsx)("input",{type:"checkbox",checked:x.has(e.id),onChange:()=>X(e.id),onClick:e=>e.stopPropagation(),style:{cursor:"pointer",flexShrink:0}}),(0,c.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,c.localPhoto)(e.profile_image_url),alt:"",style:{width:32,height:32,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${_[e.tier]||"#555"}`},onError:e=>{e.target.style.display="none",e.target.nextSibling.style.display="flex"}}):null,(0,t.jsx)("div",{style:{width:32,height:32,borderRadius:"50%",flexShrink:0,fontSize:12,fontWeight:700,background:_[e.tier]||"#555",color:"S"===e.tier?"#000":"#fff",display:(0,c.localPhoto)(e.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},onClick:()=>X(e.id),children:[(0,t.jsx)("div",{style:{fontSize:12,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,t.jsx)("div",{style:{fontSize:9,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.headline?.substring(0,50)})]}),e.bridge&&(0,t.jsxs)("span",{style:{fontSize:8,color:"#555",flexShrink:0,maxWidth:60,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["via ",e.bridge.name?.split(" ")[0]]}),(0,t.jsx)("div",{style:{textAlign:"right",flexShrink:0,minWidth:32},children:(0,t.jsx)("div",{style:{fontSize:10,fontWeight:700,color:_[e.tier]},children:parseFloat(e.power_score).toFixed(1)})}),U.has(e.id)?(0,t.jsx)("span",{style:{padding:"4px 8px",borderRadius:4,fontSize:9,fontWeight:700,background:"rgba(255,107,53,0.15)",color:"#FF6B35",flexShrink:0},children:"⏳ Sent"}):(0,t.jsx)("a",{href:e.profile_url,target:"_blank",rel:"noopener noreferrer",onClick:t=>{t.stopPropagation(),(0,j.markRequested)(e,{bridgeId:e.source_connection_id}).catch(()=>{})},style:{padding:"4px 8px",borderRadius:4,fontSize:9,fontWeight:700,background:"#0077B5",color:"#fff",textDecoration:"none",flexShrink:0},children:"Add"})]},e.id))]},e))]})]})})]})}e.s(["default",0,function(){return(0,t.jsx)(y.default,{children:(0,t.jsx)(C,{})})}],77305)},19821,e=>{"use strict";async function t(e){let t=e?`/api/network?userId=${encodeURIComponent(e)}`:"/api/network",r=await fetch(t);if(!r.ok)throw Error(`Failed to load network (${r.status})`);let n=await r.json();return{degree1:n.degree1||[],degree2:n.degree2||[],degree3:n.degree3||[]}}e.s(["loadNetwork",0,t])},36774,e=>{"use strict";let t=/^[A-Za-z0-9_-]+\.(webp|jpg|jpeg|png)$/,r="/avatars/";e.s(["localPhoto",0,function(e){return"string"==typeof e&&e.startsWith(r)&&t.test(e.slice(r.length))?e:null}])},48235,7214,e=>{"use strict";var t=e.i(36774);let r={S:0,A:1,B:2,C:3,D:4};function n(e){let t=parseFloat(e?.power_score);return Number.isFinite(t)?t:0}function i(e){return Math.round(10*n(e))/10}function o(e){return String(e?.profile_url||"").split(/[?#]/)[0].replace(/\/+$/,"")||`id:${e?.id}`}let l=(e,t)=>String(e??"").localeCompare(String(t??""),void 0,{numeric:!0});function s(e,t){return(r[e.tier]??9)-(r[t.tier]??9)||n(t)-n(e)||String(e.name||"").localeCompare(String(t.name||""))||l(e.id,t.id)}function a(e,t){return e.bridge&&t.bridge?s(e.bridge,t.bridge):e.bridge?-1:t.bridge?1:l(e.id,t.id)}function d(e,t){return t.score-e.score||t.waysIn-e.waysIn||a(e.routes[0]||c,t.routes[0]||c)||String(e.person.name||"").localeCompare(String(t.person.name||""))||(e.key<t.key?-1:+(e.key>t.key))}let c={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 f(e,t){let r=String(e||"");return t<=1?r?"…":"":r.length>t?`${r.slice(0,t-1)}…`:r}function p(e,t){return e?t.scanned.has(e.id)||e.profile_url&&t.read?.has(o(e))?"scanned":e.profile_url&&t.hidden.has(o(e))?"hidden":"todo":"todo"}function g(e,t){if(!e||1!==e.degree||null==e.unlocked_from_bridge_id)return null;let r=p(e,t);return"todo"===r?"ready":r}e.s(["TIERS",0,["S","A","B","C","D"],"compareBridges",0,s,"compareWaysIn",0,function(e,t){return t.waysIn-e.waysIn||d(e,t)},"keyFor",0,o,"routeIndex",0,function(e=[]){let t=new Map;for(let r of e||[]){let e=o(r),n=t.get(e);n||(n=new Set,t.set(e,n)),n.add(r.source_connection_id??null)}return t},"routesFor",0,function(e,t,r){return e?[...t?.get(o(e))??(null!=e.source_connection_id?new Set([e.source_connection_id]):new Set)].map(e=>({id:e,bridge:r?.get(e)??null})).sort(a):[]},"score",0,n,"score1",0,i,"separationPeople",0,function(e=[],r=[]){let n=new Map;for(let e of r||[])n.set(e.id,e);let s=new Map,c=new Map;for(let r of e||[]){let e=o(r);c.set(r.id,e);let n=s.get(e);n?function(e,r){let n=i(e)-i(r);if(n)return n>0;let o=!!(0,t.localPhoto)(e.profile_image_url);return!!(0,t.localPhoto)(r.profile_image_url)!==o?o:0>l(e.id,r.id)}(r,n.person)&&(n.person=r):(n={key:e,person:r,rowIds:[],routeIds:new Set},s.set(e,n)),n.rowIds.push(r.id),n.routeIds.add(r.source_connection_id??null)}let u={people:s.size,byTier:{S:0,A:0,B:0,C:0,D:0},multi:0,bridges:0,unresolvedIds:0,peopleOnlyUnresolved:0,onlyUnresolvedVia:0},f=new Set,p=new Set,g=new Set,h=[];for(let e of s.values()){let t=[...e.routeIds].map(e=>({id:e,bridge:n.get(e)??null}));t.sort(a);let r=t.filter(e=>e.bridge);for(let e of t)(e.bridge?f:p).add(e.id);if(!r.length)for(let e of(u.peopleOnlyUnresolved++,t))g.add(e.id);let{person:o}=e,l=o.tier;void 0!==u.byTier[l]&&u.byTier[l]++,t.length>1&&u.multi++,h.push({key:e.key,person:o,score:i(o),tier:l,routes:t,waysIn:t.length,rowIds:e.rowIds,haystack:[o.name,o.headline,o.company,o.role,...r.map(e=>e.bridge.name)].filter(Boolean).join("\n").toLowerCase(),rank:0,tied:!1})}return u.bridges=f.size,u.unresolvedIds=p.size,u.onlyUnresolvedVia=g.size,h.sort(d),function(e){for(let t=0;t<e.length;t++){let r=e[t],n=e[t-1],i=n&&n.score===r.score&&n.waysIn===r.waysIn;r.rank=i?n.rank:t+1,i&&(r.tied=!0,n.tied=!0)}}(h),{people:h,rowToKey:c,summary:u}},"shortName",0,u,"summitLayout",0,function(e=[],t=800,r=!1){let n=r?36:26,i=Math.round(.42*t),o=Math.round(.58*t),l=e.map((e,r)=>{var i;return{key:e.key,p:e,x:o,y:16+r*n,r:(i=e.waysIn)>=4?8.5:3===i?7:2===i?5.5:4,label:f(`#${e.rank}${e.tied?"=":""} ${e.person.name||""}`,Math.floor((t-o-60)/6.2))}}),a=new Map,d="\0unresolved";for(let e of l)for(let t of e.p.routes){let r=t.bridge?t.id:d,n=a.get(r);n||(n={id:t.bridge?t.id:null,bridge:t.bridge,unresolved:!t.bridge,ys:[],count:0},a.set(r,n)),n.count++,n.ys.push(e.y)}let c=[...a.values()].map(e=>({...e,bary:e.ys.reduce((e,t)=>e+t,0)/e.ys.length}));c.sort((e,t)=>e.bary-t.bary||e.unresolved-t.unresolved||(e.bridge&&t.bridge?s(e.bridge,t.bridge):0));let p=l.length?l[l.length-1].y:16,g=c.length>1?Math.max(18,(p-16)/(c.length-1)):0,h=Math.max(4,Math.floor((i-10-42)/6));c.forEach((e,t)=>{if(e.x=i,e.y=1===c.length?(16+p)/2:16+t*g,e.r=5,e.unresolved)e.label=f(`can't be named (${e.count})`,h);else{let t=e.bridge.name||"";e.label=t.length<=h?t:f(u(t),h)}delete e.ys});let b=new Map(c.map(e=>[e.unresolved?d:e.id,e])),x=[];for(let e of l){let t=new Set;e.p.routes.forEach((r,n)=>{let i=r.bridge?r.id:d;if(t.has(i))return;t.add(i);let o=b.get(i);x.push({key:e.key,bridgeId:o.id,primary:0===n&&!o.unresolved,unresolved:o.unresolved,tier:o.bridge?.tier??null,x1:o.x,y1:o.y,x2:e.x,y2:e.y})})}let y=Math.max(p,c.length?c[c.length-1].y:0),m=l.length?Math.ceil(y+16):0,S={x:20,y:l.length?(16+Math.max(p,y))/2:16,r:14},k=c.map(e=>({id:e.id,x1:S.x,y1:S.y,x2:e.x,y2:e.y}));return{width:t,height:m,you:S,people:l,bridges:c,links:x,spokes:k}}],7214),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,p,"reachIndex",0,function(e=[],t=[],r={}){let n=new Set;for(let e of t||[])e?.source_connection_id!=null&&n.add(e.source_connection_id);let i=new Set;for(let e of r?.skips||[])e?.profileUrl&&i.add(o({profile_url:e.profileUrl}));let l=new Set;for(let e of r?.read||[])e&&l.add(o({profile_url:e}));let s=new Map;for(let[e,t]of Object.entries(r?.lists||{}))e&&t&&s.set(o({profile_url:e}),t);let a=new Map;for(let t of e||[]){let e=t?.unlocked_from_bridge_id;if(null==e||1!==t.degree)continue;let r=a.get(e);r||a.set(e,r=[]),r.push(t)}return{scanned:n,read:l,hidden:i,reachedFrom:a,lists:s}},"reachState",0,g,"readyByCircle",0,function(e){let t=new Map;for(let[r,n]of e.reachedFrom){let i=n.filter(t=>"ready"===g(t,e)).length;i&&t.set(r,i)}return t},"readyToScan",0,function(e,t){return(e||[]).filter(e=>"ready"===g(e,t)).sort(s)},"scanBars",0,function(e,t){let r=p(e,t),n=e?.profile_url?t.lists?.get(o(e)):null;return"hidden"===r?null:n?n.more?n.total?Math.max(1,Math.min(4,Math.round(5*Math.min(1,10*n.pages/n.total)))):2:5:"scanned"===r?2:null}],48235)},40996,e=>{"use strict";async function t(){let e=await fetch("/api/scraper");if(!e.ok)throw Error("Could not reach the app.");return e.json()}async function r(e,t,n={}){let i=await fetch("/api/scraper",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,...t?{name:t}:{},...n})}),o=await i.json().catch(()=>({}));if(!i.ok)throw Error(o.error||"Could not start the scanner.");return o}async function n(e){let t=await fetch(`/api/scraper?resume=${encodeURIComponent(e)}`);return t.ok?(await t.json()).resume??null:null}Symbol.for("six-degrees.scan-state");let i=Object.freeze({skips:[],read:[]});async function o(){try{let e=await fetch("/api/scraper?reach=1");if(!e.ok)return i;let t=await e.json();return{skips:Array.isArray(t.skips)?t.skips:[],read:Array.isArray(t.read)?t.read:[]}}catch{return i}}async function l(e){let t=await fetch(`/api/scraper?person=${encodeURIComponent(e)}`);return t.ok?t.json():{person:null}}async function s(){await fetch("/api/scraper",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"cancel"})})}let a=Object.freeze({known:!1,running:!1,pending:!1,action:null,target:null,startedAt:null,progress:null,log:[],finished:[]}),d=new Set,c=a,u=JSON.stringify(c),f=null,p=null,g=0,h=!1,b=new Set;function x(e){let t=JSON.stringify(e);if(t!==u)for(let r of(u=t,c=Object.freeze(e),[...d]))r()}async function y(){(!("u">typeof document&&document.hidden)||c.running)&&await function(){if(p&&p.epoch===g)return p.promise;let e=g,t=fetch("/api/scraper?job=1").then(e=>e.ok?e.json():null).then(t=>{e===g&&function(e){if(!e||"object"!=typeof e)return;let t=!0===e.running;t&&null!=e.startedAt&&b.add(e.startedAt);let r=(Array.isArray(e.recent)?e.recent:[]).filter(e=>b.has(e.startedAt)).map(r=>({...r,log:!t&&r.startedAt===e.startedAt&&Array.isArray(e.log)?e.log:[]}));x({known:!0,running:t||h,pending:h&&!t,action:t?e.action??null:h?c.action:null,target:t?e.target??null:h?c.target:null,startedAt:t?e.startedAt??null:null,progress:t?e.progress??null:null,log:t&&Array.isArray(e.log)?e.log:[],finished:r})}(t)}).catch(()=>{}).finally(()=>{p?.promise===t&&(p=null)});return p={epoch:e,promise:t},t}(),clearTimeout(f),f=d.size?setTimeout(y,c.running?1500:5e3):null}function m(e){return d.add(e),1===d.size&&y(),()=>{d.delete(e),d.size||(clearTimeout(f),f=null)}}async function S(e,{name:t,id:n,onLog:i,...o}={}){let l;g++,h=!0,x({...c,known:!0,running:!0,pending:!0,action:e,target:t||n?{id:n??null,name:t??null}:null,startedAt:null,progress:null,log:[]});try{l=await r(e,t,{...n?{id:n}:{},...o})}catch(e){throw h=!1,g++,c.pending&&x({...c,running:!1,pending:!1,action:null,target:null,log:[]}),y(),e}h=!1,g++;let s=l?.startedAt??null;null!=s&&b.add(s);let a=new Promise(e=>{let t=m(()=>{c.running&&c.startedAt===s&&i?.(c.log);let r=null==s?c.running?null:{exitCode:null,failure:null,log:[]}:c.finished.find(e=>e.startedAt===s);r&&(t(),r.log.length&&i?.(r.log),e(r))});y()});return{startedAt:s,ended:a}}function k(e){return!!e?.target&&["bridge","rescrape","resume"].includes(e.action)}e.s(["NO_SCAN_NOTES",0,i,"SCANNER_UNKNOWN",0,a,"beginScrape",0,S,"busyReason",0,function(e=c){if(!e?.running)return null;let t=e.target?.name;switch(e.action){case"bridge":case"rescrape":case"resume":return t?`${t}’s circle is being scanned`:"A circle is being scanned";case"company":return t?`${t} is being scanned`:"A company is being scanned";case"auto-bridge":case"auto-bridge-retry":case"resume-all":return"Your bridges are being mapped, one by one";case"full":case"refresh":return"Your own connections are being scanned";default:switch(e.action){case"install":return"The scanner's packages are being installed";case"setup":return"The scanner is being set up";case"login":return"The LinkedIn sign-in window is open";case"photos":return"Profile photos are being saved";default:return"A scan is running"}}},"isCircleScan",0,k,"loadScanNotes",0,o,"notReadyMessage",0,function(e){if(!e)return"Could not reach the app.";let t=e.checks||{};return t.scriptsFound?t.dependencies?t.chrome?null:"Google Chrome is not installed.":t.python||t.download?"The scanner is not set up yet — open Scan to set it up.":"No Python 3.10 to 3.14 is installed on this machine.":"The scanner files are missing from this install."},"pickedPerson",0,l,"resumePoint",0,n,"runScrape",0,function(e,t={}){return S(e,t).then(e=>e.ended)},"scannerNow",0,function(){return c},"scansCircleOf",0,function(e,t){if(!k(e)||!t)return!1;let{id:r,name:n}=e.target;return r&&t.id?r===t.id:!!n&&n===t.name},"scraperStatus",0,t,"stopScrape",0,s,"watchScanner",0,m],40996)},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()}])},22016,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return x},useLinkStatus:function(){return m}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let o=e.r(90809),l=e.r(43476),s=o._(e.r(71645)),a=e.r(95057),d=e.r(8372),c=e.r(18581),u=e.r(18967),f=e.r(5550),p=e.r(88540),g=e.r(91949),h=e.r(73668),b=e.r(9396);function x(t){var r;let n,i,o,[x,m]=(0,s.useOptimistic)(g.IDLE_LINK_STATUS),S=(0,s.useRef)(null),{href:k,as:j,children:v,prefetch:w=null,passHref:_,replace:C,shallow:F,scroll:z,onClick:B,onMouseEnter:A,onTouchStart:R,legacyBehavior:I=!1,onNavigate:T,transitionTypes:O,ref:$,unstable_dynamicOnHover:P,...M}=t;n=v,I&&("string"==typeof n||"number"==typeof n)&&(n=(0,l.jsx)("a",{children:n}));let W=s.default.useContext(d.AppRouterContext),E=!1!==w,D=!1===w?"none":!0===w?"full":"auto",N="none"!==D?"auto"===D?b.FetchStrategy.PPR:b.FetchStrategy.Full:b.FetchStrategy.PPR,L="string"==typeof(r=j||k)?r:(0,a.formatUrl)(r);if(I){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});i=s.default.Children.only(n)}let U=I?i&&"object"==typeof i&&i.ref:$,q,K=s.default.useCallback(e=>(null!==W&&(S.current=(0,g.mountLinkInstance)(e,L,W,N,E,m,q)),()=>{S.current&&((0,g.unmountLinkForCurrentNavigation)(S.current),S.current=null),(0,g.unmountPrefetchableInstance)(e)}),[E,L,W,N,m,q]),J={ref:(0,c.useMergedRef)(K,U),onClick(t){I||"function"!=typeof B||B(t),I&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),!W||t.defaultPrevented||function(t,r,n,i,o,l,a,d="none"){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){i&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:f}=e.r(99781);s.default.startTransition(()=>{f(r,i?"replace":"push",!1===o?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,a,d)})}}(t,L,S,C,z,T,O,D)},onMouseEnter(e){I||"function"!=typeof A||A(e),I&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),W&&E&&(0,g.onNavigationIntent)(e.currentTarget,!0===P)},onTouchStart:function(e){I||"function"!=typeof R||R(e),I&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),W&&E&&(0,g.onNavigationIntent)(e.currentTarget,!0===P)}};return(0,u.isAbsoluteUrl)(L)?J.href=L:I&&!_&&("a"!==i.type||"href"in i.props)||(J.href=(0,f.addBasePath)(L)),o=I?s.default.cloneElement(i,J):(0,l.jsx)("a",{...M,...J,children:n}),(0,l.jsx)(y.Provider,{value:x,children:o})}let y=(0,s.createContext)(g.IDLE_LINK_STATUS),m=()=>(0,s.useContext)(y);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return i}});let n=e.r(71645);function i(e,t){let r=(0,n.useRef)(null),i=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(r.current=o(e,n)),t&&(i.current=o(t,n))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18967,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return x},MiddlewareNotFoundError:function(){return k},MissingStaticPage:function(){return S},NormalizeError:function(){return y},PageNotFoundError:function(){return m},SP:function(){return h},ST:function(){return b},WEB_VITALS:function(){return o},execOnce:function(){return l},getDisplayName:function(){return u},getLocationOrigin:function(){return d},getURL:function(){return c},isAbsoluteUrl:function(){return a},isResSent:function(){return f},loadGetInitialProps:function(){return g},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return j}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let o=["CLS","FCP","FID","INP","LCP","TTFB"];function l(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,a=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&s.test(e)};function d(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=d();return e.substring(t.length)}function u(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function g(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await g(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${u(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let h="u">typeof performance,b=h&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class x extends Error{}class y extends Error{}class m extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class S extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class k extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=e.r(18967),i=e.r(52817);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,i.hasBasePath)(r.pathname)}catch(e){return!1}}},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return a},searchParamsToUrlQuery:function(){return o},urlQueryToSearchParams:function(){return s}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});function o(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function l(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,l(e));else t.set(r,l(n));return t}function a(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},95057,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return d},urlObjectKeys:function(){return a}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let o=e.r(90809)._(e.r(98183)),l=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",i=e.pathname||"",s=e.hash||"",a=e.query||"",d=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?d=t+e.host:r&&(d=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(d+=":"+e.port)),a&&"object"==typeof a&&(a=String(o.urlQueryToSearchParams(a)));let c=e.search||a&&`?${a}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||l.test(n))&&!1!==d?(d="//"+(d||""),i&&"/"!==i[0]&&(i="/"+i)):d||(d=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),i=i.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${d}${i}${c}${s}`}let a=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function d(e){return s(e)}}]);