hunter-mate 0.1.36 → 0.1.37

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 (68) hide show
  1. package/dist/assets/extension/background/{service-worker.20261103192009.js → service-worker.20261107043433.js} +2 -2
  2. package/dist/assets/extension/background/service-worker.js +2 -2
  3. package/dist/assets/extension/build-info.json +1 -1
  4. package/dist/assets/extension/manifest.json +3 -3
  5. package/dist/assets/extension/sidepanel/index.html +1 -1
  6. package/dist/assets/extension/sidepanel/index.js +1 -1
  7. package/dist/assets/server/main.mjs +169 -150
  8. package/dist/index.js +97 -32
  9. package/dist/web/dist/404.html +1 -1
  10. package/dist/web/dist/_next/static/chunks/431-187a20ba9a18321e.js +1 -0
  11. package/dist/web/dist/_next/static/chunks/659-d79f05fe8494a4a3.js +1 -0
  12. package/dist/web/dist/_next/static/chunks/686-566781e8fdd620d5.js +1 -0
  13. package/dist/web/dist/_next/static/chunks/{987-d5135025f46d8a26.js → 987-4bd304cd48dc9e3c.js} +1 -1
  14. package/dist/web/dist/_next/static/chunks/app/admin/data/page-cfe12240271d0430.js +1 -0
  15. package/dist/web/dist/_next/static/chunks/app/company/admin/{page-940476e223ed5291.js → page-b14cac4a2b898625.js} +1 -1
  16. package/dist/web/dist/_next/static/chunks/app/jobs/page-72230dfd0d86fd69.js +1 -0
  17. package/dist/web/dist/_next/static/chunks/app/{layout-56e9f652ec460661.js → layout-19172f741a295f90.js} +1 -1
  18. package/dist/web/dist/_next/static/chunks/app/login/{page-11dbf5148d19a037.js → page-bbbb051e69009a06.js} +1 -1
  19. package/dist/web/dist/_next/static/chunks/{main-app-6971513122242cd6.js → main-app-e2b7b078a4e28e22.js} +1 -1
  20. package/dist/web/dist/_next/static/chunks/pages/{_app-1d7fd225cc89f0d5.js → _app-b75cc951fea59503.js} +2 -2
  21. package/dist/web/dist/_next/static/css/fe65ef3f12d9c55d.css +3 -0
  22. package/dist/web/dist/admin/data.html +1 -1
  23. package/dist/web/dist/admin/data.txt +3 -3
  24. package/dist/web/dist/auth/verify.html +1 -1
  25. package/dist/web/dist/auth/verify.txt +2 -2
  26. package/dist/web/dist/companies.html +1 -1
  27. package/dist/web/dist/companies.txt +3 -3
  28. package/dist/web/dist/company/admin.html +1 -1
  29. package/dist/web/dist/company/admin.txt +3 -3
  30. package/dist/web/dist/entity.html +1 -1
  31. package/dist/web/dist/entity.txt +2 -2
  32. package/dist/web/dist/index.html +1 -1
  33. package/dist/web/dist/index.txt +3 -3
  34. package/dist/web/dist/jobs.html +1 -1
  35. package/dist/web/dist/jobs.txt +3 -3
  36. package/dist/web/dist/login.html +2 -2
  37. package/dist/web/dist/login.txt +3 -3
  38. package/dist/web/dist/logs.html +1 -1
  39. package/dist/web/dist/logs.txt +2 -2
  40. package/dist/web/dist/matching/jobs/placeholder/talents.html +1 -1
  41. package/dist/web/dist/matching/jobs/placeholder/talents.txt +3 -3
  42. package/dist/web/dist/matching/portraits/placeholder/jobs.html +1 -1
  43. package/dist/web/dist/matching/portraits/placeholder/jobs.txt +3 -3
  44. package/dist/web/dist/memory.html +1 -1
  45. package/dist/web/dist/memory.txt +3 -3
  46. package/dist/web/dist/parselog.html +1 -1
  47. package/dist/web/dist/parselog.txt +3 -3
  48. package/dist/web/dist/recordings.html +1 -1
  49. package/dist/web/dist/recordings.txt +3 -3
  50. package/dist/web/dist/resource-usage.html +1 -1
  51. package/dist/web/dist/resource-usage.txt +3 -3
  52. package/dist/web/dist/shared/placeholder.html +1 -1
  53. package/dist/web/dist/shared/placeholder.txt +3 -3
  54. package/dist/web/dist/snapshots/placeholder/agent-prompt.html +1 -1
  55. package/dist/web/dist/snapshots/placeholder/agent-prompt.txt +3 -3
  56. package/dist/web/dist/talents.html +1 -1
  57. package/dist/web/dist/talents.txt +3 -3
  58. package/dist/web/dist/team/insights.html +1 -1
  59. package/dist/web/dist/team/insights.txt +3 -3
  60. package/package.json +1 -1
  61. package/dist/web/dist/_next/static/chunks/431-6c54d8d0cf2bf768.js +0 -1
  62. package/dist/web/dist/_next/static/chunks/659-bf056de14f6162b6.js +0 -1
  63. package/dist/web/dist/_next/static/chunks/686-332bfa3dbd6e0aac.js +0 -1
  64. package/dist/web/dist/_next/static/chunks/app/admin/data/page-31aa598c712a211d.js +0 -1
  65. package/dist/web/dist/_next/static/chunks/app/jobs/page-0a0ee2f8b389a147.js +0 -1
  66. package/dist/web/dist/_next/static/css/03e3fa723e374884.css +0 -3
  67. /package/dist/web/dist/_next/static/{JrLiYIK9zn4SBFFfOW1uK → wtzfFVjEfzUKkY3Epal_2}/_buildManifest.js +0 -0
  68. /package/dist/web/dist/_next/static/{JrLiYIK9zn4SBFFfOW1uK → wtzfFVjEfzUKkY3Epal_2}/_ssgManifest.js +0 -0
package/dist/index.js CHANGED
@@ -62671,6 +62671,7 @@ __export(config_exports, {
62671
62671
  ensureConfigDir: () => ensureConfigDir,
62672
62672
  loadConfig: () => loadConfig,
62673
62673
  normalizeConfig: () => normalizeConfig,
62674
+ normalizeSaasUrlOrigin: () => normalizeSaasUrlOrigin,
62674
62675
  normalizeUrlValue: () => normalizeUrlValue,
62675
62676
  resolveDataDir: () => resolveDataDir,
62676
62677
  saveConfig: () => saveConfig
@@ -62702,6 +62703,16 @@ function normalizeUrlValue(value) {
62702
62703
  });
62703
62704
  return out;
62704
62705
  }
62706
+ function normalizeSaasUrlOrigin(value) {
62707
+ try {
62708
+ const u = new URL(value);
62709
+ if (u.pathname && u.pathname !== "/") {
62710
+ return { to: u.origin, changed: true };
62711
+ }
62712
+ } catch {
62713
+ }
62714
+ return { to: value, changed: false };
62715
+ }
62705
62716
  function normalizeConfig(raw) {
62706
62717
  const migrated = [];
62707
62718
  const out = { ...raw };
@@ -62714,6 +62725,13 @@ function normalizeConfig(raw) {
62714
62725
  out[key] = normalized;
62715
62726
  }
62716
62727
  }
62728
+ if (key === "saasUrl" && typeof out[key] === "string") {
62729
+ const healed = normalizeSaasUrlOrigin(out[key]);
62730
+ if (healed.changed) {
62731
+ migrated.push({ key, from: out[key], to: healed.to });
62732
+ out[key] = healed.to;
62733
+ }
62734
+ }
62717
62735
  }
62718
62736
  return { config: out, changed: migrated.length > 0, migrated };
62719
62737
  }
@@ -69197,6 +69215,7 @@ var updater_exports = {};
69197
69215
  __export(updater_exports, {
69198
69216
  CDN_RELEASES_BASE: () => CDN_RELEASES_BASE,
69199
69217
  buildSanitizedNpmEnv: () => buildSanitizedNpmEnv,
69218
+ cleanStaleNpmStaging: () => cleanStaleNpmStaging,
69200
69219
  computeDevLinked: () => computeDevLinked,
69201
69220
  detectCliInstallLayout: () => detectCliInstallLayout,
69202
69221
  detectOrphanPrefixInstall: () => detectOrphanPrefixInstall,
@@ -69442,6 +69461,25 @@ async function cdnFallbackInstall(pkg, expectedVersion, layout, globalPrefix, pr
69442
69461
  msg: proxyNote + `\u4E03\u725B CDN \u56DE\u9000\u5B89\u88C5\u5B8C\u6210(${layout.mode}${prefix ? ` ${prefix}` : ""})${verifyNote}`
69443
69462
  };
69444
69463
  }
69464
+ function cleanStaleNpmStaging(pkg, nodeModulesDir) {
69465
+ const removed = [];
69466
+ let entries;
69467
+ try {
69468
+ entries = fs16.readdirSync(nodeModulesDir, { withFileTypes: true });
69469
+ } catch {
69470
+ return removed;
69471
+ }
69472
+ for (const e of entries) {
69473
+ if (!e.isDirectory()) continue;
69474
+ if (!e.name.startsWith(`.${pkg}-`)) continue;
69475
+ try {
69476
+ fs16.rmSync(path18.join(nodeModulesDir, e.name), { recursive: true, force: true });
69477
+ removed.push(e.name);
69478
+ } catch {
69479
+ }
69480
+ }
69481
+ return removed;
69482
+ }
69445
69483
  async function npmSelfUpdate(pkg = "hunter-mate", expectedVersion, opts) {
69446
69484
  const cliPkgRoot = opts?.pkgRoot ?? getCliPkgRoot();
69447
69485
  const pkgRoot = normPath(cliPkgRoot);
@@ -69461,7 +69499,13 @@ async function npmSelfUpdate(pkg = "hunter-mate", expectedVersion, opts) {
69461
69499
  fs16.mkdirSync(prefix, { recursive: true });
69462
69500
  args = ["install", `${pkg}@latest`, "--prefix", prefix];
69463
69501
  }
69464
- const r = spawnNpmSync(args, {
69502
+ const nodeModulesDir = prefix ? path18.join(prefix, "node_modules") : globalPrefix ? path18.join(globalPrefix, process.platform === "win32" ? "node_modules" : "lib/node_modules") : null;
69503
+ let stagingNote = "";
69504
+ if (nodeModulesDir) {
69505
+ const pre = cleanStaleNpmStaging(pkg, nodeModulesDir);
69506
+ if (pre.length) stagingNote = `(\u88C5\u524D\u5DF2\u6E05\u4E2D\u65AD\u6B8B\u7559: ${pre.join(", ")})`;
69507
+ }
69508
+ let r = spawnNpmSync(args, {
69465
69509
  stdio: "inherit",
69466
69510
  timeout: 12e4,
69467
69511
  env: prefix ? {
@@ -69470,6 +69514,17 @@ async function npmSelfUpdate(pkg = "hunter-mate", expectedVersion, opts) {
69470
69514
  npm_config_cache: path18.join(prefix, ".npm-cache")
69471
69515
  } : env
69472
69516
  });
69517
+ if (r.status !== 0 && nodeModulesDir) {
69518
+ const cleaned = cleanStaleNpmStaging(pkg, nodeModulesDir);
69519
+ if (cleaned.length) {
69520
+ stagingNote += `(\u5931\u8D25\u540E\u6E05\u6B8B\u7559\u91CD\u8BD5: ${cleaned.join(", ")})`;
69521
+ r = spawnNpmSync(args, {
69522
+ stdio: "inherit",
69523
+ timeout: 12e4,
69524
+ env: prefix ? { ...env, npm_config_cache: path18.join(prefix, ".npm-cache") } : env
69525
+ });
69526
+ }
69527
+ }
69473
69528
  if (r.status !== 0) {
69474
69529
  if (expectedVersion) {
69475
69530
  const cdn = await cdnFallbackInstall(pkg, expectedVersion, layout, globalPrefix, prefix, env, proxyNote);
@@ -69477,7 +69532,7 @@ async function npmSelfUpdate(pkg = "hunter-mate", expectedVersion, opts) {
69477
69532
  }
69478
69533
  return {
69479
69534
  ok: false,
69480
- msg: proxyNote + `npm install ${pkg}@latest(${layout.mode})\u5931\u8D25 (exit=${r.status}),\u53EF\u624B\u52A8\u6267\u884C`
69535
+ msg: proxyNote + stagingNote + `npm install ${pkg}@latest(${layout.mode})\u5931\u8D25 (exit=${r.status}),\u53EF\u624B\u52A8\u6267\u884C`
69481
69536
  };
69482
69537
  }
69483
69538
  let verified;
@@ -69490,7 +69545,7 @@ async function npmSelfUpdate(pkg = "hunter-mate", expectedVersion, opts) {
69490
69545
  return {
69491
69546
  ok: true,
69492
69547
  verified,
69493
- msg: proxyNote + `npm install ${pkg}@latest(${layout.mode}${prefix ? ` ${prefix}` : ""})\u5B8C\u6210,\u4E0B\u4E00\u6761\u547D\u4EE4\u8D77\u4F7F\u7528\u65B0\u7248\u672C${verifyNote}`
69548
+ msg: proxyNote + stagingNote + `npm install ${pkg}@latest(${layout.mode}${prefix ? ` ${prefix}` : ""})\u5B8C\u6210,\u4E0B\u4E00\u6761\u547D\u4EE4\u8D77\u4F7F\u7528\u65B0\u7248\u672C${verifyNote}`
69494
69549
  };
69495
69550
  }
69496
69551
  async function maybeCliSelfUpdate() {
@@ -70514,9 +70569,9 @@ async function maybeSyncHmhLocal() {
70514
70569
  report.checkedClients = (report.checkedClients ?? 0) + 1;
70515
70570
  const wantName = looseName(clientName);
70516
70571
  let customerId;
70517
- const stamped = Number(meta.customer_id);
70572
+ const stamped = cleanValue(meta.customer_id);
70518
70573
  const custGuardKey = `cust:${path30.basename(clientDir)}:${stamped}`;
70519
- const stampedCustomer = Number.isInteger(stamped) && stamped > 0 ? customerById.get(stamped) : void 0;
70574
+ const stampedCustomer = stamped ? customerById.get(stamped) : void 0;
70520
70575
  const nameMatches = (c) => !!c && (looseName(c.canonicalName) === wantName || (c.aliases ?? []).some((a) => looseName(a) === wantName));
70521
70576
  if (stampedCustomer && nameMatches(stampedCustomer)) {
70522
70577
  customerId = stampedCustomer.id;
@@ -70562,8 +70617,8 @@ async function maybeSyncHmhLocal() {
70562
70617
  const posMeta = parseFrontmatter2(fs28.readFileSync(posIndexFile, "utf8"));
70563
70618
  const posName = cleanValue(posMeta.position) || path30.basename(posDir);
70564
70619
  report.checkedPositions = (report.checkedPositions ?? 0) + 1;
70565
- const posCustomerStamped = Number(posMeta.customer_id);
70566
- if (Number.isInteger(posCustomerStamped) && posCustomerStamped > 0 && customerId && posCustomerStamped !== customerId) {
70620
+ const posCustomerStamped = cleanValue(posMeta.customer_id);
70621
+ if (posCustomerStamped && customerId && posCustomerStamped !== customerId) {
70567
70622
  updateIndexField(posIndexFile, "customer_id", String(customerId));
70568
70623
  report.changes.push({
70569
70624
  kind: "jobcase",
@@ -70885,7 +70940,7 @@ var tokenCommand = new Command("token").description("\u8F93\u51FA\u5F53\u524D\u7
70885
70940
  out = {
70886
70941
  token: String(data?.token ?? ""),
70887
70942
  email: String(data?.email ?? session.email ?? ""),
70888
- hmUserId: typeof data?.hmUserId === "number" ? data.hmUserId : null
70943
+ hmUserId: typeof data?.hmUserId === "string" ? data.hmUserId : null
70889
70944
  };
70890
70945
  if (!out.token) throw new Error("server \u8FD4\u56DE\u7A7A\u4EE4\u724C");
70891
70946
  } else if (session.info && session.info.issuer === "saas") {
@@ -71170,23 +71225,21 @@ async function runCustomerList(query) {
71170
71225
  }
71171
71226
  async function runCustomerRelated(id) {
71172
71227
  const config = loadConfig();
71173
- const res = await axios_default.get(`${config.serverUrl}/customers/${id}/related`, {
71228
+ const res = await axios_default.get(`${config.serverUrl}/customers/${encodeURIComponent(id)}/related`, {
71174
71229
  headers: await authedHeaders(),
71175
71230
  proxy: false
71176
71231
  });
71177
71232
  return res.data;
71178
71233
  }
71179
71234
  async function resolveCustomer(nameOrId) {
71180
- if (/^\d+$/.test(nameOrId.trim())) {
71181
- try {
71182
- return await runCustomerRelated(parseInt(nameOrId, 10));
71183
- } catch {
71184
- return null;
71185
- }
71235
+ const ref = nameOrId.trim();
71236
+ try {
71237
+ return await runCustomerRelated(ref);
71238
+ } catch {
71186
71239
  }
71187
- const hits = await runCustomerList(nameOrId);
71240
+ const hits = await runCustomerList(ref);
71188
71241
  if (!hits.length) return null;
71189
- return runCustomerRelated(hits[0].id);
71242
+ return runCustomerRelated(String(hits[0].id));
71190
71243
  }
71191
71244
  var customerCommand = new Command("customer").description(
71192
71245
  "\u5BA2\u6237(\u7528\u4EBA\u5355\u4F4D)\u5F52\u4E00\u5316\u5165\u5E93\u4E0E\u67E5\u8BE2 \u2014 \u63A8\u8350\u8BB0\u5FC6\u95ED\u73AF\u951A\u70B9"
@@ -71229,7 +71282,7 @@ customerCommand.command("list").option("--query <q>", "\u6309\u540D\u79F0/\u522B
71229
71282
  });
71230
71283
  customerCommand.command("show <id>").description("\u5BA2\u6237\u8BE6\u60C5(\u542B\u5173\u8054\u804C\u4F4D\u4E0E\u5907\u6CE8)").option("--json", "JSON \u8F93\u51FA").action(async (id, opts) => {
71231
71284
  try {
71232
- const data = await runCustomerRelated(parseInt(id, 10));
71285
+ const data = await runCustomerRelated(id);
71233
71286
  emit(opts.json, data, () => {
71234
71287
  const { customer, jobCases, remarks } = data;
71235
71288
  console.log(`[${customer.id}] ${customer.canonicalName}`);
@@ -71287,15 +71340,20 @@ function orderedFileKeys(rawFiles) {
71287
71340
  return [...preferred, ...rootMd.filter((k2) => !preferred.includes(k2)), ...md.filter((k2) => !rootMd.includes(k2))];
71288
71341
  }
71289
71342
  async function resolveCustomerId(customerRef) {
71290
- if (/^\d+$/.test(customerRef.trim())) return parseInt(customerRef.trim(), 10);
71291
- const hits = await runCustomerList(customerRef.trim());
71343
+ const ref = customerRef.trim();
71344
+ try {
71345
+ const related = await runCustomerRelated(ref);
71346
+ return String(related.customer.id);
71347
+ } catch {
71348
+ }
71349
+ const hits = await runCustomerList(ref);
71292
71350
  if (!hits.length) {
71293
71351
  throw new Error(`\u5BA2\u6237 "${customerRef}" \u672A\u5165\u5E93,\u8BF7\u5148: hunter-mate customer upsert --name "${customerRef}"`);
71294
71352
  }
71295
71353
  if (hits.length > 1) {
71296
71354
  console.error(`\u2139 \u5BA2\u6237 "${customerRef}" \u547D\u4E2D ${hits.length} \u6761,\u4F7F\u7528\u7B2C\u4E00\u4E2A: [${hits[0].id}] ${hits[0].canonicalName}`);
71297
71355
  }
71298
- return hits[0].id;
71356
+ return String(hits[0].id);
71299
71357
  }
71300
71358
  async function runJobCreate(folderPath, customerRef) {
71301
71359
  const config = loadConfig();
@@ -71547,6 +71605,13 @@ var updateCommand = new Command("update").description(i18n.t("update.description
71547
71605
  console.log(import_chalk3.default.yellow(`npm registry \u67E5\u8BE2 ${npmPackage} \u5931\u8D25(${detail})\uFF0C\u8DF3\u8FC7\u81EA\u66F4\u65B0`));
71548
71606
  } else if (latest === installed.cli) {
71549
71607
  console.log(import_chalk3.default.gray(`CLI \u5DF2\u662F\u6700\u65B0: ${installed.cli}`));
71608
+ const stagingRemoved = cleanStaleNpmStaging(
71609
+ npmPackage,
71610
+ path20.join(resolveDataDir(), "cli", "node_modules")
71611
+ );
71612
+ if (stagingRemoved.length) {
71613
+ console.log(import_chalk3.default.yellow(` \u53D1\u73B0 npm \u4E2D\u65AD\u6B8B\u7559(${stagingRemoved.join(", ")}),\u5DF2\u6E05\u7406;\u82E5 CLI \u884C\u4E3A\u5F02\u5E38\u8BF7\u91CD\u8DD1 hunter-mate update --apply \u91CD\u65B0\u5B89\u88C5`));
71614
+ }
71550
71615
  if (!reportNativeCheck("")) {
71551
71616
  console.log(import_chalk3.default.yellow(" \u7248\u672C\u867D\u6700\u65B0,\u4F46\u539F\u751F\u7ED1\u5B9A\u4E0D\u53EF\u7528 \u2014 \u8BF7\u6309\u4E0A\u65B9\u4FEE\u590D\u63D0\u793A\u5904\u7406,\u7136\u540E\u91CD\u8DD1 hunter-mate doctor \u590D\u6838"));
71552
71617
  }
@@ -71644,8 +71709,8 @@ async function runRecordTranscript(filePath, options) {
71644
71709
  externalId: v4_default(),
71645
71710
  type: options.type || "call",
71646
71711
  transcript,
71647
- personId: options.personId ? parseInt(options.personId, 10) : void 0,
71648
- jobCaseId: options.jobCaseId ? parseInt(options.jobCaseId, 10) : void 0
71712
+ personId: options.personId,
71713
+ jobCaseId: options.jobCaseId
71649
71714
  },
71650
71715
  { headers, proxy: false }
71651
71716
  );
@@ -73382,7 +73447,7 @@ preferenceCommand.command("set").requiredOption("--scope <scope>", `\u8303\u56F4
73382
73447
  `${config.serverUrl}/preferences`,
73383
73448
  {
73384
73449
  scope: opts.scope,
73385
- scopeId: parseInt(opts.id, 10),
73450
+ scopeId: opts.id,
73386
73451
  items: [{ dimension: opts.dimension, value, weight: opts.weight, evidence: opts.evidence }]
73387
73452
  },
73388
73453
  { headers: await authedHeaders3(), proxy: false }
@@ -73403,8 +73468,8 @@ preferenceCommand.command("get").requiredOption("--scope <scope>", `\u8303\u56F4
73403
73468
  const res = await axios_default.get(`${config.serverUrl}/preferences`, {
73404
73469
  params: {
73405
73470
  scope: opts.scope,
73406
- scopeId: parseInt(opts.id, 10),
73407
- ...opts.customerId ? { customerId: parseInt(opts.customerId, 10) } : {}
73471
+ scopeId: opts.id,
73472
+ ...opts.customerId ? { customerId: opts.customerId } : {}
73408
73473
  },
73409
73474
  headers: await authedHeaders3(),
73410
73475
  proxy: false
@@ -73529,7 +73594,7 @@ function parseFormPairs(pairs) {
73529
73594
  }
73530
73595
  return out;
73531
73596
  }
73532
- recommendCommand.command("list").description("\u6309\u804C\u4F4D\u67E5\u63A8\u8350\u8BB0\u5F55(--json \u8F93\u51FA\u5168\u91CF,\u542B snapshot,\u4F9B\u5BFB\u8BBF\u53BB\u91CD\u6838\u5BF9)").argument("<jobCaseId>", "\u804C\u4F4D case id(\u6570\u5B57)").option("--stage <stage>", "\u9636\u6BB5\u8FC7\u6EE4,\u5982 recommended;\u5408\u6CD5\u503C GET /recommendations/meta").option("--json", "JSON \u8F93\u51FA\u5168\u91CF", false).action(async (jobCaseId, opts) => {
73597
+ recommendCommand.command("list").description("\u6309\u804C\u4F4D\u67E5\u63A8\u8350\u8BB0\u5F55(--json \u8F93\u51FA\u5168\u91CF,\u542B snapshot,\u4F9B\u5BFB\u8BBF\u53BB\u91CD\u6838\u5BF9)").argument("<jobCaseId>", "\u804C\u4F4D case ID").option("--stage <stage>", "\u9636\u6BB5\u8FC7\u6EE4,\u5982 recommended;\u5408\u6CD5\u503C GET /recommendations/meta").option("--json", "JSON \u8F93\u51FA\u5168\u91CF", false).action(async (jobCaseId, opts) => {
73533
73598
  try {
73534
73599
  const config = loadConfig();
73535
73600
  const q = opts.stage ? `?stage=${encodeURIComponent(opts.stage)}` : "";
@@ -73560,11 +73625,11 @@ recommendCommand.command("list").description("\u6309\u804C\u4F4D\u67E5\u63A8\u83
73560
73625
  process.exit(1);
73561
73626
  }
73562
73627
  });
73563
- recommendCommand.command("add").description("\u63A8\u8350\u5EFA\u6863(\u5E42\u7B49):\u5BFB\u8BBF\u4EA4\u4ED8\u767B\u8BB0;--stage recommended \u8FDB\u63A8\u8350\u4EBA\u624D\u6C60").argument("<jobCaseId>", "\u804C\u4F4D case id(\u6570\u5B57)").option("--entity <id>", "\u4EBA\u624D\u5B9E\u4F53 id(talent_profiles)").option("--portrait <id>", "\u4EBA\u624D\u7EDF\u4E00\u6863\u6848 id(talent_portraits)").option("--stage <stage>", "\u76EE\u6807\u9636\u6BB5", "recommended").option("--note <text>", "\u5907\u6CE8(\u5982\u53BB\u91CD\u6821\u9A8C\u7ED3\u8BBA)").option("--form <k=v,k=v>", "\u9636\u6BB5\u8868\u5355\u952E\u503C\u5BF9(\u9017\u53F7\u5206\u9694,\u6A21\u677F\u89C1 GET /recommendations/meta)").option("--reason <text>", "\u63A8\u8350\u7406\u7531(AI \u7406\u7531,\u8FDB scores.aiReason;\u7528\u6237\u5BA1\u9605\u9875\u636E\u6B64\u5224\u65AD,\u5BFB\u8BBF\u4EA4\u4ED8\u5FC5\u586B)").option("--name <name>", "\u4EBA\u624D\u540D\u5FEB\u7167(\u8DE8\u7AEF\u53EF\u8BFB)").option("--headline <text>", "headline \u5FEB\u7167").option("--source <text>", "\u6765\u6E90\u5FEB\u7167(\u5982 linkedin/liepin)").option("--url <url>", "\u4E3B\u9875 URL:\u672A\u7ED9 --entity/--portrait \u65F6\u5148\u7ECF /ingest/talents \u5EFA\u6863\u4EBA\u624D\u5B9E\u4F53,\u518D\u6302\u63A8\u8350\u8BB0\u5F55").option("--json", "JSON \u8F93\u51FA\u5EFA\u6863\u7ED3\u679C", false).action(async (jobCaseId, opts) => {
73628
+ recommendCommand.command("add").description("\u63A8\u8350\u5EFA\u6863(\u5E42\u7B49):\u5BFB\u8BBF\u4EA4\u4ED8\u767B\u8BB0;--stage recommended \u8FDB\u63A8\u8350\u4EBA\u624D\u6C60").argument("<jobCaseId>", "\u804C\u4F4D case ID").option("--entity <id>", "\u4EBA\u624D\u5B9E\u4F53 id(talent_profiles)").option("--portrait <id>", "\u4EBA\u624D\u7EDF\u4E00\u6863\u6848 id(talent_portraits)").option("--stage <stage>", "\u76EE\u6807\u9636\u6BB5", "recommended").option("--note <text>", "\u5907\u6CE8(\u5982\u53BB\u91CD\u6821\u9A8C\u7ED3\u8BBA)").option("--form <k=v,k=v>", "\u9636\u6BB5\u8868\u5355\u952E\u503C\u5BF9(\u9017\u53F7\u5206\u9694,\u6A21\u677F\u89C1 GET /recommendations/meta)").option("--reason <text>", "\u63A8\u8350\u7406\u7531(AI \u7406\u7531,\u8FDB scores.aiReason;\u7528\u6237\u5BA1\u9605\u9875\u636E\u6B64\u5224\u65AD,\u5BFB\u8BBF\u4EA4\u4ED8\u5FC5\u586B)").option("--name <name>", "\u4EBA\u624D\u540D\u5FEB\u7167(\u8DE8\u7AEF\u53EF\u8BFB)").option("--headline <text>", "headline \u5FEB\u7167").option("--source <text>", "\u6765\u6E90\u5FEB\u7167(\u5982 linkedin/liepin)").option("--url <url>", "\u4E3B\u9875 URL:\u672A\u7ED9 --entity/--portrait \u65F6\u5148\u7ECF /ingest/talents \u5EFA\u6863\u4EBA\u624D\u5B9E\u4F53,\u518D\u6302\u63A8\u8350\u8BB0\u5F55").option("--json", "JSON \u8F93\u51FA\u5EFA\u6863\u7ED3\u679C", false).action(async (jobCaseId, opts) => {
73564
73629
  try {
73565
73630
  const config = loadConfig();
73566
73631
  const headers = await authedHeaders5();
73567
- let entityId = opts.entity ? Number(opts.entity) : void 0;
73632
+ let entityId = opts.entity ? String(opts.entity) : void 0;
73568
73633
  const portraitId = opts.portrait ? String(opts.portrait) : void 0;
73569
73634
  if (!entityId && !portraitId && opts.url) {
73570
73635
  const ingest = await axios_default.post(
@@ -73579,7 +73644,7 @@ recommendCommand.command("add").description("\u63A8\u8350\u5EFA\u6863(\u5E42\u7B
73579
73644
  if (!first?.id) {
73580
73645
  throw new Error(`\u4EBA\u624D\u5B9E\u4F53\u5EFA\u6863\u5931\u8D25: ${first?.error ?? JSON.stringify(ingest.data).slice(0, 200)}`);
73581
73646
  }
73582
- entityId = first.id;
73647
+ entityId = String(first.id);
73583
73648
  }
73584
73649
  if (!entityId && !portraitId) {
73585
73650
  throw new Error("\u5FC5\u987B\u6307\u5B9A --entity <id> / --portrait <id>,\u6216\u7ED9 --url \u7531 CLI \u81EA\u52A8\u5EFA\u6863\u4EBA\u624D\u5B9E\u4F53");
@@ -73593,7 +73658,7 @@ recommendCommand.command("add").description("\u63A8\u8350\u5EFA\u6863(\u5E42\u7B
73593
73658
  const res = await axios_default.post(
73594
73659
  `${config.serverUrl}/recommendations`,
73595
73660
  {
73596
- jobCaseId: Number(jobCaseId),
73661
+ jobCaseId,
73597
73662
  stage: opts.stage,
73598
73663
  entityId,
73599
73664
  portraitId,
@@ -73836,7 +73901,7 @@ function installLocalProxyBypass() {
73836
73901
  // package.json
73837
73902
  var package_default = {
73838
73903
  name: "hunter-mate",
73839
- version: "0.1.36",
73904
+ version: "0.1.37",
73840
73905
  type: "module",
73841
73906
  description: "HiredChina \u730E\u5934 Agent \u6570\u636E\u52A9\u624B CLI:\u4EBA\u624D\u5E93/\u5BA2\u6237/\u804C\u4F4D\u6570\u636E\u8BBF\u95EE,\u6D4F\u89C8\u5668\u5F55\u5236\u89E3\u6790\u7B80\u5386,server/\u6269\u5C55\u4E00\u81F4\u6027\u81EA\u6108",
73842
73907
  license: "MIT",
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/03e3fa723e374884.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-9cebd25e322e2cd7.js"/><script src="/_next/static/chunks/a7067448-3f2b194cfadb91fb.js" async=""></script><script src="/_next/static/chunks/935-79d8aba674c09f7b.js" async=""></script><script src="/_next/static/chunks/main-app-6971513122242cd6.js" async=""></script><script src="/_next/static/chunks/502-4776504e89a09b68.js" async=""></script><script src="/_next/static/chunks/589-5bb84ab8060e960b.js" async=""></script><script src="/_next/static/chunks/431-6c54d8d0cf2bf768.js" async=""></script><script src="/_next/static/chunks/app/layout-56e9f652ec460661.js" async=""></script><meta name="robots" content="noindex"/><title>HunterMate 采集仪表盘</title><meta name="description" content="HunterMate 采集/解析/入库仪表盘"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="flex h-screen overflow-hidden bg-gray-50 text-gray-900"><div class="flex h-screen w-screen flex-col items-center justify-center bg-gray-50"><span class="hm-spinner" aria-label="加载中"></span><div class="mt-4 text-sm text-gray-400">正在加载,请稍候…</div></div><script src="/_next/static/chunks/webpack-9cebd25e322e2cd7.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/03e3fa723e374884.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[76939,[],\"\"]\n4:I[74268,[],\"\"]\n5:I[81050,[],\"\"]\n6:I[75946,[\"502\",\"static/chunks/502-4776504e89a09b68.js\",\"589\",\"static/chunks/589-5bb84ab8060e960b.js\",\"431\",\"static/chunks/431-6c54d8d0cf2bf768.js\",\"185\",\"static/chunks/app/layout-56e9f652ec460661.js\"],\"GateByRoute\"]\nc:I[62319,[],\"\"]\n7:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"JrLiYIK9zn4SBFFfOW1uK\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/03e3fa723e374884.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"zh-CN\",\"children\":[\"$\",\"body\",null,{\"className\":\"flex h-screen overflow-hidden bg-gray-50 text-gray-900\",\"children\":[\"$\",\"$L6\",null,{\"children\":[\"$\",\"main\",null,{\"className\":\"flex-1 overflow-hidden\",\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"HunterMate 采集仪表盘\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"HunterMate 采集/解析/入库仪表盘\"}]]\n3:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/fe65ef3f12d9c55d.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-9cebd25e322e2cd7.js"/><script src="/_next/static/chunks/a7067448-3f2b194cfadb91fb.js" async=""></script><script src="/_next/static/chunks/935-79d8aba674c09f7b.js" async=""></script><script src="/_next/static/chunks/main-app-e2b7b078a4e28e22.js" async=""></script><script src="/_next/static/chunks/502-4776504e89a09b68.js" async=""></script><script src="/_next/static/chunks/589-5bb84ab8060e960b.js" async=""></script><script src="/_next/static/chunks/431-187a20ba9a18321e.js" async=""></script><script src="/_next/static/chunks/app/layout-19172f741a295f90.js" async=""></script><meta name="robots" content="noindex"/><title>HunterMate 采集仪表盘</title><meta name="description" content="HunterMate 采集/解析/入库仪表盘"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="flex h-screen overflow-hidden bg-gray-50 text-gray-900"><div class="flex h-screen w-screen flex-col items-center justify-center bg-gray-50"><span class="hm-spinner" aria-label="加载中"></span><div class="mt-4 text-sm text-gray-400">正在加载,请稍候…</div></div><script src="/_next/static/chunks/webpack-9cebd25e322e2cd7.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/fe65ef3f12d9c55d.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[76939,[],\"\"]\n4:I[74268,[],\"\"]\n5:I[81050,[],\"\"]\n6:I[75946,[\"502\",\"static/chunks/502-4776504e89a09b68.js\",\"589\",\"static/chunks/589-5bb84ab8060e960b.js\",\"431\",\"static/chunks/431-187a20ba9a18321e.js\",\"185\",\"static/chunks/app/layout-19172f741a295f90.js\"],\"GateByRoute\"]\nc:I[62319,[],\"\"]\n7:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"wtzfFVjEfzUKkY3Epal_2\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/fe65ef3f12d9c55d.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"zh-CN\",\"children\":[\"$\",\"body\",null,{\"className\":\"flex h-screen overflow-hidden bg-gray-50 text-gray-900\",\"children\":[\"$\",\"$L6\",null,{\"children\":[\"$\",\"main\",null,{\"className\":\"flex-1 overflow-hidden\",\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"HunterMate 采集仪表盘\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"HunterMate 采集/解析/入库仪表盘\"}]]\n3:null\n"])</script></body></html>
@@ -0,0 +1 @@
1
+ !function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="46ebebae-7e1b-4733-a867-da21876418a7",t._sentryDebugIdIdentifier="sentry-dbid-46ebebae-7e1b-4733-a867-da21876418a7")}catch(t){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[431],{21260:function(t,e,n){n.d(e,{OG:function(){return r},RB:function(){return m},VA:function(){return u},clearCloudToken:function(){return l},notifyCloudTokenChanged:function(){return i},xq:function(){return c}});let a="hm_jwt";function o(t){let e=t.split(".");if(3!==e.length)return null;try{return JSON.parse(atob(e[1].replace(/-/g,"+").replace(/_/g,"/")))}catch(t){return null}}function r(t){var e;let n=null===(e=o(t))||void 0===e?void 0:e.data;return{hmUserId:"string"==typeof(null==n?void 0:n._id)?n._id:null,email:"string"==typeof(null==n?void 0:n.email)?n.email:null}}function c(){try{let t=window.localStorage.getItem(a);if(!t)return null;let e=function(t){let e=o(t);return"number"==typeof(null==e?void 0:e.exp)?e.exp:null}(t);if(e&&1e3*e<=Date.now()+3e4)return window.localStorage.removeItem(a),null;return t}catch(t){return null}}function u(t){try{window.localStorage.setItem(a,t)}catch(t){}}function l(){try{window.localStorage.removeItem(a)}catch(t){}}let s=new Set;function i(){s.forEach(t=>t())}function m(t){return s.add(t),()=>{s.delete(t)}}},28431:function(t,e,n){n.d(e,{MA:function(){return i},YZ:function(){return s},bw:function(){return l},nZ:function(){return m}});let a="hm-cloud-active-tenant",o=null,r=null;function c(){try{return window.localStorage.getItem(a)||null}catch(t){return null}}function u(t){try{null===t?window.localStorage.removeItem(a):window.localStorage.setItem(a,t)}catch(t){}}function l(t){o=t,u(t)}function s(t){r=t,null===c()&&(o=t)}function i(){if(null!==o)return o;let t=c();return null!==t?o=t:r}function m(){o=null,r=null,u(null)}},26416:function(t,e,n){n.d(e,{_:function(){return r},e:function(){return a}});class a extends Error{constructor(t,e){super("云端模式暂不支持:".concat(t," ").concat(e,"(需本机 HunterMate)")),this.method=t,this.path=e,this.name="CloudUnsupportedError"}}let o=[{match:/^\/parse-log(\/|$)/,to:null},{match:/^\/api\/recordings(-view)?(\/|$)/,to:null},{match:/^\/job-case-postings(\/|$)/,to:null},{match:/^\/job-postings(\/|$)/,to:null},{match:/^\/job-cases\/[^/]+\/(applications|postings)(\/|$)/,to:null},{match:/^\/job-cases\/merge$/,methods:["POST"],to:null},{match:/^\/job-cases\/[^/]+\/criteria\/merge$/,methods:["POST"],to:null},{match:/^\/job-cases$/,methods:["DELETE"],to:null},{match:/-prompt$/,to:null},{match:/^\/customers\/merge$/,methods:["POST"],to:null},{match:/^\/customers$/,methods:["DELETE"],to:null},{match:/^\/entities\/talent\/merge$/,methods:["POST"],to:null},{match:/^\/entities\/talent\/[^/]+\/duplicates\/dismiss$/,methods:["POST"],to:null},{match:/^\/matching\/matches\/[^/]+\/feedback$/,methods:["POST"],to:null},{match:/^\/resource-usage(\/|$)/,to:null},{match:/^\/adapters(\/|$)/,to:null},{match:/^\/extract(\/|$)/,to:null},{match:/^\/market(\/|$)/,to:null},{match:/^\/resume-field-changes(\/|$)/,to:null},{match:/^\/api\/internal(\/|$)/,to:null},{match:/^\/datasync\/logout$/,to:null},{match:/^\/datasync\/state$/,methods:["GET"],to:"/hunter-mate/sync/state?heads=0"},{match:/^\/datasync\/active-tenant$/,methods:["POST"],to:"/hunter-mate/tenant/last-active"},{match:/^\/job-cases\/tenant-members$/,methods:["GET"],to:"/hunter-mate/hm-web/tenant-members"},{match:/^\/job-cases(\/|$)/,to:"/hunter-mate/collab/job-cases$1",stripParams:["channel"]},{match:/^\/recommendations\/meta$/,methods:["GET"],to:"/hunter-mate/hm-web/recommendations/meta"},{match:/^\/recommendations(\/|$)/,to:"/hunter-mate/collab/recommendations$1"},{match:/^\/searchlog(\/|$)/,to:"/hunter-mate/searchlog$1"},{match:/^\/shares(\/|$)/,to:"/hunter-mate/shares$1"},{match:/^\/shared\/([^/]+)\/data$/,methods:["GET"],to:"/hunter-mate/shares/$1/data"},{match:/^\/shared\/([^/]+)\/revoke$/,methods:["POST"],to:"/hunter-mate/shares/$1/revoke"},{match:/^\/team\/(members|insights)$/,to:"/hunter-mate/team/$1"},{match:/^\/company\/applications\/([^/]+)\/decide$/,methods:["POST"],to:"/hunter-mate/tenant/applications/$1/decide"},{match:/^\/company\/([^/]+)\/(apply|applications|members|admins|transfer-ownership)$/,to:"/hunter-mate/tenant/$1/$2"},{match:/^\/company$/,methods:["POST"],to:"/hunter-mate/tenant"},{match:/^\/admin\/(entities|purge)$/,to:"/hunter-mate/admin/$1"},{match:/^\/customers(\/|$)/,methods:["GET"],to:"/hunter-mate/hm-web/customers$1"},{match:/^\/entities(\/|$)/,methods:["GET"],to:"/hunter-mate/hm-web/entities$1"},{match:/^\/matching(\/|$)/,methods:["GET"],to:"/hunter-mate/hm-web/matching$1"},{match:/^\/talent-portraits(\/|$)/,methods:["GET"],to:"/hunter-mate/hm-web/talent-portraits$1"},{match:/^\/portraits(\/|$)/,methods:["GET"],to:"/hunter-mate/hm-web/portraits$1"},{match:/^\/parsed-resumes(\/|$)/,methods:["GET"],to:"/hunter-mate/hm-web/parsed-resumes$1"}];function r(t,e){let n=e.indexOf("?"),a=n>=0?e.slice(0,n):e,r=n>=0?e.slice(n+1):"",c=t.toUpperCase();for(let t of o){var u;if(t.methods&&!t.methods.includes(c)||!a.match(t.match))continue;if(null===t.to)return null;let e=a.replace(t.match,t.to);if(!r)return{path:e};let n=new URLSearchParams(r);for(let e of null!==(u=t.stripParams)&&void 0!==u?u:[])n.delete(e);let o=n.toString(),l=e.indexOf("?");if(l>=0){let t=e.slice(0,l),n=e.slice(l+1);return{path:o?"".concat(t,"?").concat(n,"&").concat(o):e}}return{path:o?"".concat(e,"?").concat(o):e}}return{path:e}}},74431:function(t,e,n){n.d(e,{Ox:function(){return s},requestJson:function(){return m}});var a=n(67002),o=n(33447),r=n(21260),c=n(26416),u=n(28431),l=n(60529);function s(){return l.env.HUNTER_MATE_SERVER_URL||""}class i extends Error{constructor(t,e,n){super(null!=n?n:"请求失败(".concat(t,")").concat(e?": ".concat(e):"")),this.status=t,this.path=e,this.name="HttpError"}}async function m(t,e){let n,l="".concat((0,o.XJ)()).concat(t);if((0,o.K5)()){var s,m;let n=(0,c._)(null!==(s=null==e?void 0:e.method)&&void 0!==s?s:"GET",t);if(null===n)throw new c.e(null!==(m=null==e?void 0:e.method)&&void 0!==m?m:"GET",t);l="".concat((0,o.XJ)()).concat(n.path)}try{n=await fetch(l,{cache:"no-store",...function(t){let e=(0,o.K5)()?(0,r.xq)():(0,a.Xc)(),n=(0,o.K5)()?(0,u.MA)():null;if(!e&&null===n)return t;let c=new Headers(null==t?void 0:t.headers);return e&&!c.has("Authorization")&&c.set("Authorization","".concat((0,o.K5)()?"HMJWT":"UTOKEN"," ").concat(e)),null===n||c.has("x-hm-active-tenant")||c.set("x-hm-active-tenant",String(n)),{...t,headers:c}}(e)})}catch(e){throw new i(0,t,e instanceof Error?e.message:"网络错误")}if(!n.ok){if(401===n.status&&(0,o.K5)()&&!t.startsWith("/hunter-mate/auth/")&&((0,r.clearCloudToken)(),!window.location.pathname.endsWith("/login"))){let t=encodeURIComponent(window.location.pathname+window.location.search);window.location.assign("".concat((0,o.Qv)(),"?next=").concat(t))}throw new i(n.status,t,"HTTP ".concat(n.status))}try{return await n.json()}catch(e){throw new i(n.status,t,e instanceof Error?"响应解析失败: ".concat(e.message):"响应解析失败")}}},33447:function(t,e,n){n.d(e,{K5:function(){return o},Qv:function(){return c},XJ:function(){return r}});var a=n(60529);function o(){return!1}function r(){return a.env.HUNTER_MATE_SERVER_URL||""}function c(){return"".concat("","/login")}},67002:function(t,e,n){n.d(e,{GK:function(){return c},Lc:function(){return u},Xc:function(){return r}});let a=null,o=new Set;function r(){return a}function c(t){t!==a&&(a=t,o.forEach(t=>t()))}function u(t){return o.add(t),()=>{o.delete(t)}}}}]);
@@ -0,0 +1 @@
1
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c455e192-dcee-4306-b471-71ad81db4d46",e._sentryDebugIdIdentifier="sentry-dbid-c455e192-dcee-4306-b471-71ad81db4d46")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[659],{59659:function(e,t,l){l.d(t,{EntityListPage:function(){return _}});var r=l(72835),a=l(60635),s=l(27473),n=l(74431),i=l(33447),d=l(37202),o=l(94518),c=l(63718),u=l(19036),x=l(78606),m=l(8448),h=l(86777);let b=["workExperiences","projects","education"],p={intent:["position","salary","city","industries"]},g={name:"姓名",headline:"头衔",currentPosition:"现职位",currentCompany:"现公司",city:"城市",degree:"学历",workYears:"工作年限",age:"年龄",gender:"性别",resId:"resId",statusTag:"状态标签",contactTime:"方便联系时间",phone:"电话",email:"邮箱",profileUrl:"主页 URL",sourceUrl:"来源 URL",selfEvaluation:"自我评价",statement:"平台声明","intent.position":"期望职位","intent.salary":"期望薪资","intent.city":"期望城市","intent.industries":"期望行业",updatedAt:"更新时间"},y={workExperiences:"工作经历",projects:"项目经历",education:"教育经历"},v={company:"公司",position:"职位",period:"时间段",start:"开始",end:"结束",department:"部门",location:"地点",reportsTo:"汇报对象",school:"学校",major:"专业",degree:"学历",name:"名称",role:"角色",description:"描述",duties:"职责",industry:"行业"};function f(e){return null==e||""===e?"—":Array.isArray(e)?e.length?e.map(e=>f(e)).filter(e=>"—"!==e).join("、"):"—":"object"==typeof e?JSON.stringify(e):"string"==typeof e&&/^\d{4}-\d{2}-\d{2}T/.test(e)?(0,m.d3)(e):String(e)}function j(e){var t;let{entity:l}=e,i=(0,s.useRouter)(),d=l.id,[o,c]=(0,a.useState)(null),[u,x]=(0,a.useState)(!1),[h,j]=(0,a.useState)({}),[N,w]=(0,a.useState)(null),[k,S]=(0,a.useState)(new Set),[C,U]=(0,a.useState)({}),[q,I]=(0,a.useState)({}),[E,T]=(0,a.useState)(!1),[A,O]=(0,a.useState)("");(0,a.useEffect)(()=>{let e=!0;return c(null),O(""),(async()=>{try{let t=await (0,n.requestJson)("/entities/talent/".concat(d,"/duplicates"));e&&c(t.candidates)}catch(t){e&&c([])}})(),()=>{e=!1}},[d]);let _=(0,a.useMemo)(()=>{var e;return null!==(e=l.extracted)&&void 0!==e?e:{}},[l.extracted]),J=async e=>{if(h[e])return h[e];try{let t=await (0,n.requestJson)("/entities/talent/".concat(e));if(!t.entity)return null;return j(l=>({...l,[e]:t.entity})),t.entity}catch(e){return null}},P=async()=>{var e,t,l,r,a,s,n;T(!0),O("");let i=[d,...(null!=o?o:[]).map(e=>e.talent.id)],c=await Promise.all(i.map(e=>J(e)));if(T(!1),c.some(e=>!e)){O("全量简历拉取失败,请重试");return}let u=c[0],m=null!==(t=u.extracted)&&void 0!==t?t:{},h={name:u.name,headline:u.headline},g={};for(let e of Object.keys(m))if(b.includes(e))g[e]=Array.isArray(m[e])?[...m[e]]:[];else if(p[e]){let t=null!==(r=m[e])&&void 0!==r?r:{};for(let l of p[e])h["".concat(e,".").concat(l)]=null!==(a=t[l])&&void 0!==a?a:"industries"===l?[]:""}else(null==(n=m[e])||["string","number","boolean"].includes(typeof n))&&!e.startsWith("_")&&(h[e]=null!==(l=m[e])&&void 0!==l?l:"");U(h),I(g),w(null!==(s=null==o?void 0:null===(e=o[0])||void 0===e?void 0:e.talent.id)&&void 0!==s?s:null),x(!0)},L=e=>{var t;let r=[],a=t=>{var l,r,a,s;if(t){if("name"===e)return t.name;if("headline"===e)return t.headline;if(e.startsWith("intent.")){let l=e.slice(7),s=null===(a=t.extracted)||void 0===a?void 0:null===(r=a.intent)||void 0===r?void 0:r[l];return"industries"===l?Array.isArray(s)?s:[]:null!=s?s:""}return null!==(s=null===(l=t.extracted)||void 0===l?void 0:l[e])&&void 0!==s?s:""}},s=a(null!==(t=h[d])&&void 0!==t?t:l);for(let e of(r.push({id:"self",label:"当前",value:s}),null!=o?o:[])){let t=h[e.talent.id];if(!t)continue;let l=a(t);void 0!==l&&"—"!==f(l)&&r.push({id:e.talent.id,label:"#".concat(e.talent.id),value:l})}return r},R=(e,t)=>U(l=>({...l,[e]:t})),M=async e=>{T(!0);try{await (0,n.requestJson)("/entities/talent/".concat(d,"/duplicates/dismiss"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({otherId:e})}),c(t=>(null!=t?t:[]).filter(t=>t.talent.id!==e)),N===e&&w(null)}catch(e){O("标注失败,请重试")}finally{T(!1)}},z=async()=>{var e,t,l,r;let a={..._};for(let[t,l]of Object.entries(C))if("name"!==t&&"headline"!==t){if(t.startsWith("intent.")){let r=t.slice(7);a.intent={...null!==(e=a.intent)&&void 0!==e?e:{},[r]:l}}else a[t]="number"!=typeof(r=_[t])||"string"!=typeof l||""===l.trim()||Number.isNaN(Number(l))?"boolean"==typeof r&&"string"==typeof l?"true"===l:l:Number(l)}for(let e of b)q[e]&&(a[e]=q[e]);let s=(null!=o?o:[]).filter(e=>!k.has(e.talent.id)).map(e=>e.talent.id);if(0===s.length){O("未勾选任何候选参与合并");return}T(!0);let c=!1;for(let e of s)try{await (0,n.requestJson)("/entities/talent/merge",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keepId:d,removeId:e,extracted:a,name:null!==(t=C.name)&&void 0!==t?t:null,headline:null!==(l=C.headline)&&void 0!==l?l:null})})}catch(e){c=!0;break}if(T(!1),c){O("合并失败,请重试");return}i.replace("/talents?id=".concat(d)),i.refresh(),window.location.reload()},W=async()=>{let e=(null!=o?o:[]).filter(e=>!k.has(e.talent.id)).map(e=>e.talent.id);if(0===e.length){O("未勾选任何候选参与合并");return}T(!0);let t=!0;for(let l of e)try{await (0,n.requestJson)("/entities/talent/merge",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keepId:d,removeId:l})})}catch(e){t=!1;break}if(T(!1),!t){O("合并失败,请重试");return}i.replace("/talents?id=".concat(d)),i.refresh(),window.location.reload()};if(null===o||0===o.length)return null;let F=null!==(t=o.find(e=>e.talent.id===N))&&void 0!==t?t:null,D=null!=N?h[N]:null,Y=e=>(0,r.jsx)("span",{className:"flex flex-wrap items-center gap-1",children:L(e).map(t=>(0,r.jsx)("button",{type:"button",title:"采纳:".concat(f(t.value)),onClick:()=>R(e,t.value),className:"rounded border border-gray-200 px-1.5 py-0.5 text-xs text-gray-500 hover:border-blue-400 hover:text-blue-600",children:t.label},t.id))});return(0,r.jsxs)("div",{className:"mb-4 rounded-lg border border-amber-300 bg-amber-50 p-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,r.jsxs)("span",{className:"text-sm font-medium text-amber-800",children:["发现 ",o.length," 条可能重复的人才记录"]}),(0,r.jsx)("button",{onClick:()=>void P(),disabled:E,className:"rounded bg-amber-600 px-3 py-1 text-sm text-white hover:bg-amber-700 disabled:opacity-50",children:"查看并处理"}),(0,r.jsx)("button",{onClick:()=>void M(o[0].talent.id),disabled:E,className:"rounded border border-amber-400 px-3 py-1 text-sm text-amber-700 hover:bg-amber-100 disabled:opacity-50",children:"与最高分条目非重复"}),A?(0,r.jsx)("span",{className:"text-sm text-red-600",children:A}):null]}),u?(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30 p-2 sm:p-4",onClick:()=>x(!1),children:(0,r.jsxs)("div",{className:"flex max-h-[92vh] w-full max-w-6xl flex-col overflow-hidden rounded-lg bg-white shadow-xl",onClick:e=>e.stopPropagation(),children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 border-b border-gray-200 px-4 py-3",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"重复简历合并工作区"}),(0,r.jsxs)("span",{className:"text-sm text-gray-500",children:["当前 #",d,l.name?" \xb7 ".concat(l.name):""," — ",o.length," 条候选"]}),(0,r.jsx)("button",{onClick:()=>x(!1),className:"ml-auto text-sm text-gray-500 hover:text-gray-700",children:"关闭"})]}),(0,r.jsxs)("div",{className:"grid flex-1 gap-0 overflow-hidden md:grid-cols-[250px,1fr]",children:[(0,r.jsxs)("div",{className:"overflow-y-auto border-b border-gray-200 p-3 md:border-b-0 md:border-r",children:[(0,r.jsx)("div",{className:"mb-2 text-xs font-medium text-gray-500",children:"候选简历(逐条处理)"}),(0,r.jsx)("div",{className:"space-y-2",children:o.map(e=>{var t;return(0,r.jsxs)("div",{className:"rounded-lg border p-2 ".concat(N===e.talent.id?"border-blue-400 bg-blue-50":"border-gray-200"),children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"checkbox",checked:!k.has(e.talent.id),disabled:E,onChange:t=>{S(l=>{let r=new Set(l);return t.target.checked?r.delete(e.talent.id):r.add(e.talent.id),r})},title:"勾选=同一人,参与本次合并"}),(0,r.jsx)("span",{className:"text-sm font-medium text-gray-900",children:null!==(t=e.talent.name)&&void 0!==t?t:"(未命名)"}),(0,r.jsxs)("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-xs text-gray-600",children:["相似度 ",e.score]})]}),(0,r.jsxs)("div",{className:"mt-0.5 truncate text-xs text-gray-500",title:e.talent.sourceUrl,children:[e.talent.source," \xb7 ",(0,m.d3)(e.talent.updatedAt)]}),(0,r.jsxs)("div",{className:"mt-1.5 flex gap-1.5",children:[(0,r.jsx)("button",{type:"button",onClick:()=>w(e.talent.id),className:"rounded border border-gray-300 px-2 py-0.5 text-xs text-gray-700 hover:bg-gray-50",children:"选中对比"}),(0,r.jsx)("button",{type:"button",disabled:E,onClick:()=>void M(e.talent.id),className:"rounded border border-gray-300 px-2 py-0.5 text-xs text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"非同一人"})]})]},e.talent.id)})})]}),(0,r.jsxs)("div",{className:"flex flex-col overflow-hidden",children:[(0,r.jsxs)("div",{className:"flex-1 space-y-4 overflow-y-auto p-4",children:[(0,r.jsxs)("section",{className:"rounded-lg border border-gray-200",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 border-b border-gray-100 px-3 py-2",children:[(0,r.jsx)("h4",{className:"text-sm font-semibold text-gray-900",children:"最终采用简历(可编辑)"}),(0,r.jsx)("button",{type:"button",onClick:()=>{P()},className:"rounded border border-gray-300 px-2 py-0.5 text-xs text-gray-600 hover:bg-gray-50",children:"重置为当前简历"})]}),(0,r.jsx)("div",{className:"divide-y divide-gray-100",children:Object.keys(C).map(e=>{var t,a;return(0,r.jsxs)("div",{className:"grid grid-cols-[90px,1fr,auto] items-center gap-2 px-3 py-1.5",children:[(0,r.jsx)("label",{className:"text-xs text-gray-500",children:null!==(t=g[e])&&void 0!==t?t:e}),"sourceUrl"===e?(0,r.jsx)("a",{href:String(null!==(a=C[e])&&void 0!==a?a:l.sourceUrl),target:"_blank",rel:"noreferrer",className:"truncate text-sm text-blue-600 hover:underline",children:"—"===f(C[e])?l.sourceUrl:f(C[e])}):"selfEvaluation"===e||"statement"===e?(0,r.jsx)("textarea",{value:"—"===f(C[e])?"":String(C[e]),onChange:t=>R(e,t.target.value),rows:2,className:"w-full rounded border border-gray-300 px-2 py-1 text-sm"}):(0,r.jsx)("input",{value:"—"===f(C[e])?"":String(C[e]),onChange:t=>R(e,t.target.value),className:"w-full rounded border border-gray-300 px-2 py-1 text-sm"}),Y(e)]},e)})})]}),b.map(e=>{var t,l,a;let s=null!==(t=q[e])&&void 0!==t?t:[],n=[];for(let t of null!=o?o:[]){let r=h[t.talent.id],a=null==r?void 0:null===(l=r.extracted)||void 0===l?void 0:l[e];Array.isArray(a)&&a.forEach(e=>n.push({id:t.talent.id,item:e}))}return(0,r.jsxs)("section",{className:"rounded-lg border border-gray-200",children:[(0,r.jsx)("div",{className:"flex items-center justify-between border-b border-gray-100 px-3 py-2",children:(0,r.jsxs)("h4",{className:"text-sm font-semibold text-gray-900",children:[null!==(a=y[e])&&void 0!==a?a:e,"(",s.length,")"]})}),0===s.length&&0===n.length?(0,r.jsx)("p",{className:"px-3 py-2 text-xs text-gray-400",children:"两侧均无数据"}):(0,r.jsxs)("div",{className:"space-y-2 p-3",children:[s.map((t,l)=>(0,r.jsxs)("div",{className:"rounded border border-gray-200 p-2",children:[(0,r.jsx)("div",{className:"grid grid-cols-2 gap-2 lg:grid-cols-4",children:Object.keys(null!=t?t:{}).filter(e=>!e.startsWith("_")).map(a=>{var n;return(0,r.jsxs)("label",{className:"block",children:[(0,r.jsx)("span",{className:"text-xs text-gray-400",children:null!==(n=v[a])&&void 0!==n?n:a}),"string"==typeof t[a]&&t[a].length>40?(0,r.jsx)("textarea",{value:t[a],rows:2,onChange:t=>{let r=[...s];r[l]={...r[l],[a]:t.target.value},I(t=>({...t,[e]:r}))},className:"w-full rounded border border-gray-300 px-2 py-1 text-xs"}):(0,r.jsx)("input",{value:"—"===f(t[a])?"":String(t[a]),onChange:t=>{let r=[...s];r[l]={...r[l],[a]:t.target.value},I(t=>({...t,[e]:r}))},className:"w-full rounded border border-gray-300 px-2 py-1 text-xs"})]},a)})}),(0,r.jsx)("div",{className:"mt-1.5 flex items-center gap-2",children:(0,r.jsx)("button",{type:"button",onClick:()=>I(t=>({...t,[e]:s.filter((e,t)=>t!==l)})),className:"rounded border border-red-200 px-2 py-0.5 text-xs text-red-600 hover:bg-red-50",children:"删除此条"})})]},l)),n.length?(0,r.jsxs)("div",{className:"rounded border border-dashed border-gray-300 p-2",children:[(0,r.jsx)("div",{className:"mb-1 text-xs text-gray-500",children:"候选条目(选择合入或更新)"}),(0,r.jsx)("div",{className:"space-y-1.5",children:n.map((t,l)=>{var a,n,i,d,o,c,u,x,m;let h=s.findIndex(e=>(function(e,t){let l=e=>{var t,l,r;return String(null!==(r=null!==(l=null!==(t=null==e?void 0:e.company)&&void 0!==t?t:null==e?void 0:e.school)&&void 0!==l?l:null==e?void 0:e.name)&&void 0!==r?r:"")},r=e=>{var t,l,r;return String(null!==(r=null==e?void 0:e.period)&&void 0!==r?r:"".concat(null!==(t=null==e?void 0:e.start)&&void 0!==t?t:"","-").concat(null!==(l=null==e?void 0:e.end)&&void 0!==l?l:""))},a=l(e),s=l(t),n=r(e),i=r(t);return!!a&&!!s&&a===s||!!n&&!!i&&n===i&&(!a||!s||a===s)})(e,t.item));return(0,r.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,r.jsxs)("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-gray-500",children:["#",t.id]}),(0,r.jsxs)("span",{className:"min-w-0 flex-1 truncate text-gray-700",children:[f(null!==(i=null!==(n=null!==(a=t.item.company)&&void 0!==a?a:t.item.school)&&void 0!==n?n:t.item.name)&&void 0!==i?i:"")," \xb7 ",f(null!==(c=null!==(o=null!==(d=t.item.position)&&void 0!==d?d:t.item.major)&&void 0!==o?o:t.item.role)&&void 0!==c?c:"")," \xb7 ",f(null!==(m=t.item.period)&&void 0!==m?m:"".concat(null!==(u=t.item.start)&&void 0!==u?u:"","-").concat(null!==(x=t.item.end)&&void 0!==x?x:""))]}),h>=0?(0,r.jsxs)("button",{type:"button",onClick:()=>{let l=[...s];l[h]={...t.item},I(t=>({...t,[e]:l}))},className:"shrink-0 rounded border border-blue-300 px-2 py-0.5 text-blue-600 hover:bg-blue-50",children:["更新条目",h+1]}):(0,r.jsx)("button",{type:"button",onClick:()=>I(l=>({...l,[e]:[...s,{...t.item}]})),className:"shrink-0 rounded border border-green-300 px-2 py-0.5 text-green-700 hover:bg-green-50",children:"合入"})]},l)})})]}):null]})]},e)}),F&&D?(0,r.jsxs)("section",{className:"rounded-lg border border-gray-200",children:[(0,r.jsx)("div",{className:"border-b border-gray-100 px-3 py-2",children:(0,r.jsxs)("h4",{className:"text-sm font-semibold text-gray-900",children:["与候选 #",F.talent.id," 对比",F.reasons.length?(0,r.jsx)("span",{className:"ml-2 space-x-1",children:F.reasons.map(e=>(0,r.jsx)("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-xs font-normal text-gray-600",children:e},e))}):null]})}),(0,r.jsxs)("table",{className:"w-full border-collapse text-sm",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"border-b border-gray-100 text-left text-xs text-gray-500",children:[(0,r.jsx)("th",{className:"py-1.5 pl-3 pr-2 font-medium",children:"字段"}),(0,r.jsxs)("th",{className:"py-1.5 pr-2 font-medium",children:["当前 #",d]}),(0,r.jsxs)("th",{className:"py-1.5 pr-3 font-medium",children:["候选 #",F.talent.id]})]})}),(0,r.jsx)("tbody",{children:Object.keys(C).map(e=>{var t,a,s,n;let i=f(null===(t=L(e)[0])||void 0===t?void 0:t.value),d=f((()=>{var t,l,r,a;let s=h[F.talent.id];if(s){if("name"===e)return s.name;if("headline"===e)return s.headline;if(e.startsWith("intent.")){let t=e.slice(7),a=null===(r=s.extracted)||void 0===r?void 0:null===(l=r.intent)||void 0===l?void 0:l[t];return"industries"===t?Array.isArray(a)?a:[]:null!=a?a:""}return null!==(a=null===(t=s.extracted)||void 0===t?void 0:t[e])&&void 0!==a?a:""}})()),o=i!==d&&"—"!==i&&"—"!==d;return(0,r.jsxs)("tr",{className:"border-b border-gray-50",children:[(0,r.jsx)("td",{className:"py-1 pl-3 pr-2 text-xs text-gray-500",children:null!==(s=g[e])&&void 0!==s?s:e}),(0,r.jsx)("td",{className:"py-1 pr-2 ".concat(o?"bg-amber-50":""),children:"sourceUrl"===e?(0,r.jsx)("a",{href:String(null!==(n=null===(a=L(e)[0])||void 0===a?void 0:a.value)&&void 0!==n?n:l.sourceUrl),target:"_blank",rel:"noreferrer",className:"break-all text-blue-600 hover:underline",children:i}):(0,r.jsx)("span",{className:"break-all",children:i})}),(0,r.jsx)("td",{className:"py-1 pr-3 ".concat(o?"bg-amber-50":""),children:"sourceUrl"===e?(0,r.jsx)("a",{href:String((()=>{var e;let t=h[F.talent.id];return null!==(e=null==t?void 0:t.sourceUrl)&&void 0!==e?e:""})()),target:"_blank",rel:"noreferrer",className:"break-all text-blue-600 hover:underline",children:d}):(0,r.jsx)("span",{className:"break-all",children:d})})]},e)})})]})]}):null]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-t border-gray-200 px-4 py-3",children:[(0,r.jsx)("button",{type:"button",onClick:()=>void z(),disabled:E,className:"rounded bg-blue-600 px-4 py-1.5 text-sm text-white hover:bg-blue-700 disabled:opacity-50",children:"提交合并(采用上方编辑值)"}),(0,r.jsx)("button",{type:"button",onClick:()=>void W(),disabled:E,title:"传统语义:保留字段更全的一侧,另一侧补空合并",className:"rounded border border-gray-300 px-4 py-1.5 text-sm text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"快捷:整行补空合并"}),(0,r.jsx)("span",{className:"text-xs text-gray-500",children:"被合并的候选会进入回收站(可恢复)"}),A?(0,r.jsx)("span",{className:"text-sm text-red-600",children:A}):null]})]})]})]})}):null]})}var N=l(12789),w=l(65777);function k(e){var t,l;let{entityId:s,name:i}=e,[d,o]=(0,a.useState)(!1),[c,u]=(0,a.useState)(null),[m,h]=(0,a.useState)([]),[b,p]=(0,a.useState)(""),[g,y]=(0,a.useState)("pending_invite"),[v,f]=(0,a.useState)(!1),[j,N]=(0,a.useState)(null),[k,S]=(0,a.useState)(null),{sync:C}=(0,w.nu)(),U=null!==(t=null==C?void 0:C.activeTenantId)&&void 0!==t?t:null;(0,a.useEffect)(()=>{d&&((async()=>{try{u(await (0,n.requestJson)("/recommendations/meta"))}catch(e){}})(),(async()=>{try{let e=await (0,n.requestJson)("/job-cases?limit=200");h(e.items)}catch(e){}})())},[d,U]);let q=async()=>{if(""!==b){f(!0),S(null);try{await (0,n.requestJson)("/recommendations",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jobCaseId:b,entityId:s,stage:g})}),N({jobCaseId:b})}catch(e){S("写入失败(服务未启动或无权限)")}finally{f(!1)}}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{onClick:()=>{o(!0),N(null),S(null)},className:"rounded bg-blue-600 px-3 py-1 text-sm text-white hover:bg-blue-700",children:"加入推荐流程"}),d?(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30",children:(0,r.jsx)("div",{className:"w-96 rounded-lg bg-white p-4 shadow-xl",children:j?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("p",{className:"mb-3 text-sm text-gray-800",children:["已把 ",(0,r.jsx)("span",{className:"font-medium",children:i})," 加入推荐流程。"]}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)("button",{onClick:()=>o(!1),className:"rounded border border-gray-300 px-3 py-1 text-xs text-gray-600",children:"关闭"}),(0,r.jsx)("a",{href:"/jobs?id=".concat(j.jobCaseId),className:"rounded bg-blue-600 px-3 py-1 text-xs text-white hover:bg-blue-700",children:"去职位推荐流程 →"})]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("h3",{className:"mb-3 text-sm font-semibold text-gray-900",children:["把 ",i," 加入推荐流程"]}),(0,r.jsxs)("label",{className:"mb-2 block text-xs text-gray-500",children:["目标职位",(0,r.jsx)(x.Z,{allowClear:!0,placeholder:"选择职位…",className:"mt-1",style:{width:"100%"},value:""===b?void 0:b,onChange:e=>p(null!=e?e:""),options:m.map(e=>({value:e.id,label:e.title||e.externalId}))})]}),(0,r.jsxs)("label",{className:"mb-3 block text-xs text-gray-500",children:["推荐阶段(默认待邀请)",(0,r.jsx)(x.Z,{placeholder:"推荐阶段(默认待邀请)",className:"mt-1",style:{width:"100%"},value:g,onChange:e=>y(e),options:(null!==(l=null==c?void 0:c.stages)&&void 0!==l?l:[{key:"pending_invite",label:"待邀请"}]).map(e=>({value:e.key,label:e.label}))})]}),k?(0,r.jsx)("p",{className:"mb-2 text-xs text-red-600",children:k}):null,(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)("button",{onClick:()=>o(!1),className:"rounded border border-gray-300 px-3 py-1 text-xs text-gray-600",children:"取消"}),(0,r.jsx)("button",{onClick:()=>void q(),disabled:""===b||v,className:"rounded bg-blue-600 px-3 py-1 text-xs text-white hover:bg-blue-700 disabled:opacity-40",children:v?"写入中…":"确认加入"})]})]})})}):null]})}var S=l(32587);let C={talent:"人才",job:"职位",company:"公司"},U={talent:"bg-blue-50 text-blue-700",job:"bg-yellow-50 text-yellow-700",company:"bg-green-50 text-green-700"};function q(e){var t,l,s,d,o,c;let{type:u,entity:b,sources:p}=e,[g,y]=(0,a.useState)(p.length?String(p[0].id):""),[v,f]=(0,a.useState)(!1),[w,q]=(0,a.useState)(null),[I,E]=(0,a.useState)(null),[T,A]=(0,a.useState)(null);async function O(){q(null);try{let e=await fetch("".concat((0,n.Ox)(),"/entities/").concat(u,"/").concat(b.id,"/repair-prompt"));if(!e.ok)throw Error("HTTP ".concat(e.status));let t=await e.json();await navigator.clipboard.writeText(t.prompt),f(!0),setTimeout(()=>f(!1),4e3)}catch(e){q(e.message)}}(0,a.useEffect)(()=>{if("talent"!==u)return;let e=!0;return(async()=>{try{var t,l;let r=await fetch("".concat((0,n.Ox)(),"/entities/talent/").concat(b.id,"/matches"));if(!r.ok)return;let a=await r.json();if(!e)return;E(null!==(t=null==a?void 0:a.portraitId)&&void 0!==t?t:null),A(null!==(l=null==a?void 0:a.matches)&&void 0!==l?l:[])}catch(e){}})(),()=>{e=!1}},[u,b.id]);let _="talent"===u?null!==(t=b.name)&&void 0!==t?t:"(未命名)":"job"===u?null!==(l=b.title)&&void 0!==l?l:"(未命名职位)":null!==(s=b.name)&&void 0!==s?s:"(未命名)",J="talent"===u?b.headline:"job"===u?b.company:"",P=p.find(e=>String(e.id)===g)||p[0];return(0,r.jsxs)("div",{className:"w-full",children:["talent"===u?(0,i.K5)()?(0,r.jsx)(N.X,{feature:"人才查重合并",localPath:"/entity/talent/".concat(b.id)}):(0,r.jsx)(j,{entity:b}):null,(0,r.jsxs)("header",{className:"mb-6",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,r.jsx)("h1",{className:"text-2xl font-bold text-gray-900",children:_}),(0,r.jsx)("span",{className:"rounded px-2 py-0.5 text-xs ".concat(null!==(d=U[u])&&void 0!==d?d:"bg-gray-100 text-gray-600"),children:null!==(o=C[u])&&void 0!==o?o:u}),(0,r.jsx)("span",{className:"rounded bg-gray-100 px-2 py-0.5 text-xs text-gray-600",children:b.source}),b.sourceUrl?(0,r.jsx)("a",{href:b.sourceUrl,target:"_blank",rel:"noreferrer",title:b.sourceUrl,className:"max-w-xl truncate text-sm text-blue-600 hover:underline",children:b.sourceUrl}):null]}),J?(0,r.jsx)("p",{className:"mt-1 text-gray-600",children:J}):null,b.sessionId?(0,r.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,r.jsx)("button",{onClick:O,className:"rounded bg-amber-600 px-3 py-1 text-sm text-white hover:bg-amber-700",children:v?"已复制 ✓ 请发给 agent":"解析有误让agent修复"}),(0,r.jsx)("span",{className:"text-xs text-gray-400",children:"按录制重解析、修解析 bug、提 issue"}),w?(0,r.jsx)("span",{className:"text-xs text-red-600",children:w}):null]}):null,"talent"===u?(0,r.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,r.jsx)(k,{entityId:b.id,name:_}),(0,r.jsx)("span",{className:"text-xs text-gray-400",children:"加入某职位推荐流水线,默认待邀请"})]}):null]}),"talent"===u?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(S.n,{entity:b}),(0,r.jsx)(S.z,{entity:b,portraitId:I,matches:T,sources:p.map(e=>({id:e.id,sourceUrl:e.sourceUrl,domain:e.domain,createdAt:e.createdAt}))})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,r.jsx)("h2",{className:"mb-3 text-lg font-semibold",children:"解析来源"}),P?(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-sm text-gray-500",children:"当前来源页面"}),(0,r.jsx)("a",{href:P.sourceUrl,target:"_blank",rel:"noreferrer",className:"break-all text-sm text-blue-600 hover:underline",children:P.sourceUrl}),P.hasSnapshot?(0,r.jsx)("span",{className:"ml-2 rounded bg-green-50 px-1.5 py-0.5 text-xs text-green-700",children:"有录制快照"}):null]}),p.length>1?(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,r.jsx)("label",{className:"text-sm text-gray-600",children:"历史来源:"}),(0,r.jsx)(x.Z,{size:"small",style:{minWidth:220},value:g,onChange:e=>y(e),options:p.map(e=>({value:String(e.id),label:"".concat(e.domain," \xb7 ").concat((0,m.d3)(e.createdAt))}))}),(0,r.jsx)("a",{href:P.sourceUrl,target:"_blank",rel:"noreferrer",className:"rounded bg-blue-600 px-3 py-1 text-sm text-white hover:bg-blue-700",children:"打开该来源页面"})]}):null]}):(0,r.jsx)("div",{className:"text-sm text-gray-500",children:"暂无解析来源记录"})]}),(0,r.jsxs)("section",{className:"mt-4 rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,r.jsx)("h2",{className:"mb-3 text-lg font-semibold",children:"原始数据"}),(0,r.jsx)(h.Y,{data:null!==(c=b.extracted)&&void 0!==c?c:b.raw})]})]})]})}var I=l(27828),E=l(26119),T=l(93464);function A(e){let t=new URLSearchParams;Object.entries(e).forEach(e=>{let[l,r]=e;r&&t.set(l,r)});let l=t.toString();return l?"?".concat(l):""}function O(e){var t,l;let{type:x,label:h,batchDelete:b}=e,p=(0,s.useRouter)(),g=(0,s.usePathname)(),y=(0,s.useSearchParams)(),v=y.get("id")||"",f=(0,a.useMemo)(()=>({q:y.get("q")||"",status:"",from:y.get("from")||"",to:y.get("to")||""}),[y]),[j,N]=(0,a.useState)(null),[k,S]=(0,a.useState)(!1),[C,U]=(0,a.useState)(!1),[O,_]=(0,a.useState)(0),J=(0,a.useCallback)(e=>{var t,l;let r=null!==(t=e.filters)&&void 0!==t?t:f,a=A({id:null!==(l=e.id)&&void 0!==l?l:v,q:r.q,from:r.from,to:r.to});p.replace("".concat(g).concat(a))},[f,v,g,p]),{session:P,sync:L}=(0,w.nu)(),R=null!==(t=null==L?void 0:L.activeTenantId)&&void 0!==t?t:null,M=(0,E.B)({deleteUrl:"/entities/".concat(x),label:h,onDeleted:()=>z.refresh(),currentUserId:null!==(l=null==P?void 0:P.hmUserId)&&void 0!==l?l:null}),z=(0,T.k)({fetchPage:(0,a.useCallback)(async(e,t)=>{let l=A({q:f.q,from:f.from,to:f.to}),r=await (0,n.requestJson)("/entities?type=".concat(x,"&limit=").concat(t,"&offset=").concat(e).concat(l.replace("?","&")));return{items:r.items,total:r.total,nextOffset:r.nextOffset}},[x,f.q,f.from,f.to,R]),pageSize:50,deps:[x,f.q,f.from,f.to,R]}),W=z.items;(0,a.useEffect)(()=>{M.prune(W.map(e=>String(e.id)))},[W,M]);let F=(0,a.useCallback)(()=>{if(W.length)return W[0].updatedAt},[W]);(0,a.useEffect)(()=>{if(!v){N(null),U(!1);return}S(!0),U(!1),Promise.all([(0,n.requestJson)("/entities/".concat(x,"/").concat(v)),(0,n.requestJson)("/entities/".concat(x,"/").concat(v,"/sources")).catch(()=>null)]).then(e=>{let[t,l]=e;N({entity:t.entity,sources:l?l.items:[]})}).catch(()=>{N(null),U(!0)}).finally(()=>{S(!1)})},[x,v,R,O]);let D=(0,a.useMemo)(()=>W.map(e=>{var t,l,a;let s=String(e.id),n="talent"===x?(0,r.jsx)(I.oj,{name:null!==(t=e.name)&&void 0!==t?t:"(未命名)",headline:e.headline,source:e.source,updatedAt:e.updatedAt}):"job"===x?(0,r.jsx)(I.rY,{title:null!==(l=e.title)&&void 0!==l?l:"(无标题)",source:e.source,company:e.company,sourceUrl:e.sourceUrl,updatedAt:e.updatedAt}):(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("div",{className:"font-medium text-gray-900",children:null!==(a=e.name)&&void 0!==a?a:"(未命名)"}),(0,r.jsxs)("div",{className:"mt-0.5 flex items-center gap-2 text-xs text-gray-400",children:[(0,r.jsx)("span",{children:e.source}),(0,r.jsx)("span",{children:"\xb7"}),(0,r.jsx)("span",{children:(0,m.d3)(e.updatedAt)})]})]});return{id:s,content:(0,r.jsxs)("div",{className:"flex items-start gap-2",children:[b&&!(0,i.K5)()&&M.checkbox(s),n]})}}),[W,x,b,M]),Y=v?k?(0,r.jsx)("div",{className:"flex h-full items-center justify-center text-gray-400",children:"加载中…"}):C?(0,r.jsxs)("div",{className:"flex h-full items-center justify-center gap-2 text-red-500",children:["加载失败",(0,r.jsx)("button",{type:"button",onClick:()=>_(e=>e+1),className:"text-blue-500 hover:underline",children:"重试"})]}):j?(0,r.jsx)(q,{type:x,entity:j.entity,sources:j.sources}):(0,r.jsxs)("div",{className:"flex h-full items-center justify-center text-red-500",children:["未找到该",h]}):(0,r.jsxs)("div",{className:"flex h-full items-center justify-center text-gray-400",children:["请在左侧选择一条",h,"查看详情"]});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.m,{filterBar:(0,r.jsxs)("div",{className:"border-b border-gray-200 bg-white",children:[(0,r.jsx)(d.f,{value:f,onChange:e=>J({filters:e})}),(0,r.jsx)(u.Y,{pollUrl:"/entities/count?type=".concat(x),getLatestTimestamp:F,onRefresh:()=>z.refresh(),label:h}),b&&!(0,i.K5)()&&M.bar(D)]}),listPanel:z.error?(0,r.jsxs)("div",{className:"flex-1 overflow-auto p-4 text-center text-sm",children:[(0,r.jsx)("span",{className:"text-red-500",children:"加载失败"}),(0,r.jsx)("button",{type:"button",onClick:()=>z.refresh(),className:"ml-2 text-blue-500 hover:underline",children:"重试"})]}):(0,r.jsx)(c.L,{items:D,selectedId:v,onSelect:e=>J({id:e}),loading:z.loading,emptyText:"暂无".concat(h,"数据"),onLoadMore:z.loadMore,loadingMore:z.loadingMore,exhausted:z.exhausted}),detailPanel:Y}),M.modal()]})}function _(e){return(0,r.jsx)(a.Suspense,{fallback:(0,r.jsx)("div",{className:"p-6 text-gray-500",children:"加载中…"}),children:(0,r.jsx)(O,{...e})})}},37202:function(e,t,l){l.d(t,{f:function(){return n}});var r=l(72835),a=l(60635),s=l(78606);function n(e){let{value:t,showStatus:l,statusOptions:n,onChange:i}=e,[d,o]=(0,a.useState)(t);return(0,a.useEffect)(()=>{o(t)},[t.q,t.status,t.from,t.to]),(0,a.useEffect)(()=>{let e=setTimeout(()=>{(d.q!==t.q||d.status!==t.status||d.from!==t.from||d.to!==t.to)&&i(d)},300);return()=>clearTimeout(e)},[d.q,d.status,d.from,d.to]),(0,r.jsxs)("div",{className:"space-y-2 border-b border-gray-200 bg-white p-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("div",{className:"relative flex-1",children:[(0,r.jsx)("input",{type:"text",value:d.q,onChange:e=>o(t=>({...t,q:e.target.value})),placeholder:"搜索关键词...",className:"w-full rounded border border-gray-300 px-2 py-1.5 pr-8 text-sm outline-none focus:border-blue-500"}),(0,r.jsx)("button",{type:"button",onClick:()=>i({q:"",status:"",from:"",to:""}),title:"重置筛选",className:"absolute right-1 top-1/2 -translate-y-1/2 rounded p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 disabled:opacity-30",disabled:!d.q&&!d.status&&!d.from&&!d.to,children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),l?(0,r.jsx)(s.Z,{size:"small",allowClear:!0,placeholder:"全部状态",style:{minWidth:130},value:d.status||void 0,onChange:e=>o(t=>({...t,status:null!=e?e:""})),options:(n||[]).map(e=>({value:e.value,label:e.label}))}):null]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"date",value:d.from,onChange:e=>o(t=>({...t,from:e.target.value})),className:"rounded border border-gray-300 px-2 py-1.5 text-sm outline-none focus:border-blue-500"}),(0,r.jsx)("span",{className:"text-sm text-gray-400",children:"-"}),(0,r.jsx)("input",{type:"date",value:d.to,onChange:e=>o(t=>({...t,to:e.target.value})),className:"rounded border border-gray-300 px-2 py-1.5 text-sm outline-none focus:border-blue-500"})]})]})}},19036:function(e,t,l){l.d(t,{Y:function(){return n}});var r=l(72835),a=l(60635),s=l(74431);function n(e){let{pollUrl:t,intervalMs:l=5e3,onRefresh:n,getLatestTimestamp:i,label:d="新数据"}=e,[o,c]=(0,a.useState)(0),[u,x]=(0,a.useState)(!1),m=(0,a.useRef)(void 0);return((0,a.useEffect)(()=>{let e=()=>x(document.hidden);return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,a.useEffect)(()=>{m.current=i(),c(0)},[i]),(0,a.useEffect)(()=>{if(u)return;let e=async()=>{let e=m.current;if(!e)return;let l=t.includes("?")?"&":"?",r=0;try{var a;let n=await (0,s.requestJson)("".concat(t).concat(l,"since=").concat(encodeURIComponent(e)));r=null!==(a=n.count)&&void 0!==a?a:0}catch(e){}c(e=>Math.max(e,r))};e();let r=setInterval(e,l);return()=>clearInterval(r)},[t,l,u]),o<=0)?null:(0,r.jsxs)("button",{type:"button",onClick:()=>{c(0),n()},className:"w-full bg-blue-50 px-3 py-2 text-center text-sm text-blue-700 hover:bg-blue-100 active:bg-blue-200",children:["有 ",o," 条",d,",点击刷新"]})}}}]);
@@ -0,0 +1 @@
1
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="65c227b7-957e-41f5-a5d0-1b021c930b71",e._sentryDebugIdIdentifier="sentry-dbid-65c227b7-957e-41f5-a5d0-1b021c930b71")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[686],{49616:function(e,t,a){a.d(t,{I:function(){return x},v:function(){return p}});var s=a(72835),n=a(60635),r=a(74431),o=a(84704);function l(e){let t=null!=e?e:"<职位管理页 tabId>";return["公共纪律(全文 SSOT: hunter-mate-harness .harness/workflows/subagent-job-platform-ops.md,先读再动手):",'0. 浏览器操作只走 hunter-mate extension *;控制命令 JSON 显式带 "__tab":"'.concat(t,'"(cp.tab.* 子命令用 "tab":"').concat(t,'");录制 title 带 job-ops- 前缀;执行环境带写护栏先切 SINGLE_REPO_DEV。'),"1. 风控红线:cp.eval 读 location.href/document.title 判页面存活;CAPTCHA/登录墙/空白杀 → 立即 halt 当日不重试;eval ≥2s、字段填写 ≥1.5s、切页 3-5s(human-paced,平台数值以 risk-profile 为准)。","2. 回写契约:结果必须调 hunter-mate API 落库并 GET 读回;只操作不落库=未完成。凭证零落地:平台账号密码不入库,note 只记别名。"].join("\n")}function d(e,t,a,s,n){return["[hunter-mate] ".concat(e),"","职位案件: #".concat(t," ").concat(a,"(平台槽位: ").concat(s,")"),"API 基址: http://127.0.0.1:34571",...n?["平台页 tab: ".concat(n,"(已开则定向复用;未开用 hunter-mate extension 后台新开,禁 CDP 附加导航)")]:[],""].join("\n")}function c(e){return[d("收简历:到平台收件箱收取本案职位简历,落人才库并回写简历流水。",e.jobCaseId,e.title,e.platform),l(),"","执行步骤:","1. 前置:GET /job-cases/".concat(e.jobCaseId,"/postings 确认 ").concat(e.platform," 槽位 status=published(未发布无收件箱)。"),"2. 打开收件箱(猎聘=职位详情页 /job/gethjobdetail?hjobId=<id> 内待处理简历区;入口结构按 flows/resume-collect.yaml,标 recon-pending 处先只读 recon 固化再提取)。","3. 逐份提取:候选人姓名/接收时间;详情走既有 talent adapter 落人才库,命中已有人才复用 talentEntityId(dedup 结论),不重复建档。","4. 回写:先 GET /job-cases/".concat(e.jobCaseId,"/applications 查重(同人同案跳过),再 POST /job-cases/").concat(e.jobCaseId,'/applications {name, platform:"').concat(e.platform,'", talentEntityId?, note};单平台单次 ≤20 份;回写后 GET 读回确认。'),"5. 只读平台:沟通/回复/下载等任何平台写操作不在范围。"].join("\n")}let i={draft:{label:"待发布",cls:"bg-gray-100 text-gray-500"},published:{label:"已发布",cls:"bg-emerald-100 text-emerald-700"},offline:{label:"已下线",cls:"bg-gray-200 text-gray-400"}},u=["job","job-list","job-detail"];function p(e){let{platform:t,sm:a}=e,n=(0,o.mS)(t);return(0,s.jsx)("span",{title:t,className:"inline-flex items-center justify-center rounded bg-[color:var(--brand-soft)] font-semibold ".concat(a?"h-3.5 w-3.5 text-[8px]":"h-4 w-4 text-[9px]"),style:{color:n.fg},children:n.label})}function b(e){let{text:t,label:a,primary:r}=e,[o,l]=(0,n.useState)(!1);return(0,s.jsx)("button",{type:"button",onClick:async()=>{try{await navigator.clipboard.writeText(t)}catch(a){let e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove()}l(!0),window.setTimeout(()=>l(!1),2e3)},className:r?"rounded bg-blue-600 px-2 py-1 text-xs text-white hover:bg-blue-700":"rounded border border-blue-300 px-1.5 py-0.5 text-xs text-blue-700 hover:bg-blue-50",children:o?"已复制 ✓":a})}function x(e){var t,a;let{jobCaseId:o,caseTitle:x,canOperate:m=!0}=e,g=/:(\d+)$/.exec(o),h=g?String(Number(g[1])):o,[y,f]=(0,n.useState)([]),[j,v]=(0,n.useState)([]),[N,C]=(0,n.useState)(new Set),[w,S]=(0,n.useState)(""),[k,I]=(0,n.useState)([]),[E,T]=(0,n.useState)(!1),[A,P]=(0,n.useState)(""),[_,J]=(0,n.useState)(null),[D,O]=(0,n.useState)(null),[q,G]=(0,n.useState)(""),[H,U]=(0,n.useState)([]),[L,R]=(0,n.useState)(!1),[M,K]=(0,n.useState)([]),[V,W]=(0,n.useState)(""),[$,z]=(0,n.useState)(""),[B,F]=(0,n.useState)(""),Q=(0,n.useCallback)(async()=>{try{f(await (0,r.requestJson)("/job-cases/".concat(h,"/postings")))}catch(e){}try{K(await (0,r.requestJson)("/job-cases/".concat(h,"/applications")))}catch(e){}},[o]);(0,n.useEffect)(()=>{Q(),(async()=>{try{I(await (0,r.requestJson)("/job-postings/sources"))}catch(e){}})(),(async()=>{try{let e=await (0,r.requestJson)("/adapters/capabilities");v(e.platforms)}catch(e){}})()},[Q]);let X=(0,n.useCallback)(e=>{let t=e.trim().toLowerCase();return j.find(e=>e.platform===t||t.includes(e.platform)||e.platform.includes(t))},[j]),Y=(0,n.useCallback)(async(e,t,a)=>{T(!0),P("");try{await (0,r.requestJson)(e,{method:t,headers:{"Content-Type":"application/json"},body:null!=a?JSON.stringify(a):void 0})}catch(e){return T(!1),P("操作失败(服务端拒绝或网络错误)"),!1}return T(!1),await Q(),!0},[Q]),Z=(0,n.useCallback)(async()=>{try{let e=await (0,r.requestJson)("/entities?type=job&limit=10&q=".concat(encodeURIComponent(q.trim())));U(e.items)}catch(e){U([]),P("搜索失败,请重试")}},[q]),ee=(0,n.useCallback)(async(e,t)=>{("new"===e?await Y("/job-cases/".concat(h,"/postings"),"POST",{platform:t.source,jobPostingId:t.id,status:"published"}):await Y("/job-case-postings/".concat(e),"PATCH",{jobPostingId:t.id,status:"published"}))&&(O(null),U([]),G(""))},[Y,o]),et=(0,n.useMemo)(()=>{let e=new Set;for(let t of y)e.add(t.platform);for(let t of M)t.platform&&e.add(t.platform);return Array.from(e).sort()},[y,M]),ea=et.includes(V)?V:null!==(t=et[0])&&void 0!==t?t:"",es=(0,n.useMemo)(()=>M.filter(e=>{var t;return(null!==(t=e.platform)&&void 0!==t?t:"")===ea}),[M,ea]),en=y.filter(e=>N.has(e.id)).map(e=>e.platform);return(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("div",{className:"flex items-center gap-2 text-xs text-gray-400",children:(0,s.jsx)("span",{children:"发布是 agent 平台适配能力:勾选平台后复制任务 prompt 给 agent 执行;手动操作收在「手动」里。"})}),A?(0,s.jsx)("div",{className:"text-xs text-red-500",children:A}):null,(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(b,{primary:!0,label:"让Agent同步检查".concat(en.length?"(".concat(en.join("、"),")"):""),text:[d("职位已发布同步检查:到平台职位管理页核对本案职位是否已发布,回写槽位状态。",(a={jobCaseId:h,title:x,platforms:en.length?en:["<勾选平台>"]}).jobCaseId,a.title,a.platforms.join("、"),a.tabId),l(a.tabId),"","执行步骤:","1. GET /job-cases/".concat(a.jobCaseId,"/postings 读目标平台槽位(须有 pid;无槽位先 POST 建 draft 槽位)。"),"2. 打开平台职位管理页(猎聘=https://h.liepin.com/job/showlistpage?jobStatus=11);解析优先走 adapter:录制该页 → recordings show <sid> --parse(jobs-list adapter);adapter 未就绪按 flows/job-sync.yaml recon 选择器只读提取(标 assumed)。","3. 标题归一化比对(去空白/全半角/大小写;企业名包装差异忽略):命中 → 取平台行 id+状态;同标题多行取最新,note 记全部候选。",'4. 回写:命中 → PATCH /job-case-postings/<pid> {status:"published", note:"synced <date> 平台行=<id> 平台状态=<status>"};未命中 → note 记"未找到发布 <date>",status 保持 draft。',"5. 平台有而本地 job_postings 无 → 触发 adapter parse 落库后再补链接;全部回写后 GET 读回确认。"].join("\n")}),(0,s.jsx)("span",{className:"text-xs text-gray-400",children:en.length?"把 prompt 贴给 agent,回写后刷新可见":"先勾选下方平台槽位"})]}),(0,s.jsx)("div",{className:"space-y-1.5",children:0===y.length?(0,s.jsx)("div",{className:"rounded border border-dashed border-gray-200 p-4 text-center text-xs text-gray-400",children:"还没有平台槽位,先在下方添加"}):y.map(e=>{var t,a;let n=X(e.platform),r=!!n&&n.rules>0,o=!!n&&n.pageClasses.some(e=>u.some(t=>e.startsWith(t)));return(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded border border-gray-200 px-2.5 py-1.5 text-sm",children:[(0,s.jsx)("input",{type:"checkbox",checked:N.has(e.id),onChange:t=>{let a=new Set(N);t.target.checked?a.add(e.id):a.delete(e.id),C(a)},title:"勾选后纳入同步检查"}),(0,s.jsx)(p,{platform:e.platform}),(0,s.jsx)("span",{className:"w-24 truncate font-medium text-gray-800",children:e.platform}),(0,s.jsx)("span",{className:"rounded px-1.5 py-0.5 text-[10px] ".concat(r?"bg-blue-50 text-blue-600":"bg-gray-100 text-gray-400"),title:n?"adapter rules=".concat(n.rules," pageClasses=").concat(n.pageClasses.join(",")):"adapter 未登记",children:r?o?"适配\xb7职位":"适配\xb7人才":"未适配"}),(0,s.jsx)("span",{className:"rounded px-1.5 py-0.5 text-xs ".concat(i[e.status].cls),children:i[e.status].label}),e.posting?(0,s.jsxs)("a",{href:e.posting.sourceUrl,target:"_blank",rel:"noreferrer",className:"min-w-0 flex-1 truncate text-xs text-blue-600 hover:underline",title:e.posting.sourceUrl,children:[null!==(t=e.posting.title)&&void 0!==t?t:"(无标题)",e.posting.company?" \xb7 ".concat(e.posting.company):""]}):(0,s.jsx)("span",{className:"flex-1 text-xs text-gray-300",children:"未链接发布"}),e.publishedAt?(0,s.jsx)("span",{className:"text-xs text-gray-400",children:e.publishedAt.slice(0,10)}):null,(0,s.jsxs)("span",{className:"flex items-center gap-1 text-xs",children:["published"!==e.status?(0,s.jsx)(b,{label:"让Agent发布",text:[d("发布职位(谨慎级写操作,费用敏感):代用户在平台发布本职位,查重前置(禁止重复发布)→资格前置→recon→填单→自检→提交→回写。",(a={jobCaseId:h,title:x,platform:e.platform}).jobCaseId,a.title,a.platform,a.tabId),l(a.tabId),"","执行步骤:","1. 资格硬闸门:读平台发布资格(猎聘=职位管理页顶《猎头诚信联盟承诺函》审核状态+账户资源配额);不足 → halt 报告,不绕过。",'2. 查重硬闸门(发布可能产生费用,禁止重复发布):先做同步检查同款列表核对(adapter parse 优先,标题归一化比对本案职位);命中已发布/审核中 → 立即 halt,回报用户裁定"再发重复 vs 旧职位修改再发",不得自行决定;未命中须把比对证据(行数+标题集合)写进汇报。',"2b. 费用意识:发布前 recon 平台收费规则(不可见标 assumed 并声明);同平台同职位只发一次,再发/多平台代发须用户逐个授权。","3. 表单 recon:打开发职位页(猎聘=职位管理「发职位」入口,禁直达表单 URL),按 flows/job-publish.yaml 字段清单逐项读控件;recon-pending 项首跑只 recon 不提交,补录 flow 后再执行。","4. 填单(JobCase #".concat(a.jobCaseId,"):").concat(a.jd?"JD 摘要:".concat(a.jd):"职位信息以 JobCase 详情为准",";每字段间隔 ≥2s,eval 间隔 ≥3s(表单页红线)。"),"5. 提交前自检:cp.eval 读表单全部已填值与期望逐字段比对;提交前状态录一次(录制最后一镜)。","6. 提交+读回:点击提交 → 等审核态/结果文案 → 读平台状态;提交步出现 CAPTCHA/二次验证 → 立即 halt 报告人工,绝不重试提交。",'7. 回写:PATCH /job-case-postings/<pid> {status:"published", note:"published <date> 平台状态=<审核中|已发布|失败原因原文> 查重证据=<行数+标题>"};失败完整回写原因;等平台列表可见后走同步检查补链接。'].join("\n")}):(0,s.jsx)(b,{label:"让Agent收简历",text:c({jobCaseId:h,title:x,platform:e.platform})}),m?(0,s.jsx)("button",{type:"button",onClick:()=>J(_===e.id?null:e.id),className:"rounded border border-gray-200 px-1.5 py-0.5 text-gray-400 hover:bg-gray-50",children:"手动"}):null]}),_===e.id&&m?(0,s.jsxs)("span",{className:"flex items-center gap-1 text-xs",children:["published"!==e.status?(0,s.jsx)("button",{type:"button",disabled:E,onClick:()=>void Y("/job-case-postings/".concat(e.id),"PATCH",{status:"published"}),className:"rounded border border-emerald-300 px-1.5 py-0.5 text-emerald-700 hover:bg-emerald-50",children:"标记已发布"}):(0,s.jsx)("button",{type:"button",disabled:E,onClick:()=>void Y("/job-case-postings/".concat(e.id),"PATCH",{status:"offline"}),className:"rounded border border-gray-300 px-1.5 py-0.5 text-gray-500 hover:bg-gray-50",children:"下线"}),(0,s.jsx)("button",{type:"button",disabled:E,onClick:()=>{O(D===e.id?null:e.id),G(""),U([])},className:"rounded border border-blue-300 px-1.5 py-0.5 text-blue-700 hover:bg-blue-50",children:e.posting?"换链接":"链接发布"}),(0,s.jsx)("button",{type:"button",disabled:E,onClick:()=>void Y("/job-case-postings/".concat(e.id),"DELETE"),className:"rounded border border-gray-200 px-1.5 py-0.5 text-gray-400 hover:bg-red-50 hover:text-red-500",children:"删除槽位"})]}):null]},e.id)})}),null!=D&&m?(0,s.jsxs)("div",{className:"rounded border border-blue-200 bg-blue-50/50 p-2",children:[(0,s.jsxs)("div",{className:"flex gap-1.5",children:[(0,s.jsx)("input",{type:"text",value:q,onChange:e=>G(e.target.value),onKeyDown:e=>"Enter"===e.key&&void Z(),placeholder:"按标题/公司搜索解析库里的职位发布…",className:"flex-1 rounded border border-gray-300 px-2 py-1 text-xs outline-none focus:border-blue-500"}),(0,s.jsx)("button",{type:"button",onClick:()=>void Z(),className:"rounded bg-blue-600 px-2 py-1 text-xs text-white hover:bg-blue-700",children:"搜索"})]}),(0,s.jsxs)("div",{className:"mt-1.5 space-y-1",children:[H.map(e=>{var t;return(0,s.jsxs)("button",{type:"button",onClick:()=>void ee(D,e),className:"block w-full truncate rounded bg-white px-2 py-1 text-left text-xs hover:bg-blue-100",title:e.sourceUrl,children:[(0,s.jsx)(p,{platform:e.source,sm:!0})," ",null!==(t=e.title)&&void 0!==t?t:"(无标题)",e.company?" \xb7 ".concat(e.company):""," ",(0,s.jsxs)("span",{className:"text-gray-400",children:["(",e.source,")"]})]},e.id)}),0===H.length&&q?(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"无匹配,换个关键词"}):null]})]}):null,m?(0,s.jsxs)("div",{className:"flex items-center gap-1.5 border-t border-gray-100 pt-2",children:[(0,s.jsx)("input",{type:"text",list:"hm-known-platforms",value:w,onChange:e=>S(e.target.value),placeholder:"平台名(如 liepin.com / 拉勾)",className:"w-56 rounded border border-gray-300 px-2 py-1 text-xs outline-none focus:border-blue-500"}),(0,s.jsx)("datalist",{id:"hm-known-platforms",children:k.map(e=>(0,s.jsx)("option",{value:e},e))}),(0,s.jsx)("button",{type:"button",disabled:E||!w.trim(),onClick:()=>void Y("/job-cases/".concat(h,"/postings"),"POST",{platform:w.trim()}).then(e=>e&&S("")),className:"rounded border border-gray-300 px-2 py-1 text-xs hover:bg-gray-50 disabled:opacity-40",children:"添加待发布"}),(0,s.jsx)("button",{type:"button",disabled:E||!w.trim(),onClick:()=>{O("new"),G(w.trim()),Z()},className:"rounded border border-blue-300 px-2 py-1 text-xs text-blue-700 hover:bg-blue-50 disabled:opacity-40",children:"添加并链接发布…"})]}):(0,s.jsx)("div",{className:"rounded border border-amber-100 bg-amber-50 px-2 py-1 text-xs text-amber-600",children:"仅该职位的 op/rs 可管理发布与简历,你可查看"}),(0,s.jsxs)("section",{className:"border-t border-gray-100 pt-3",children:[(0,s.jsxs)("div",{className:"mb-1.5 flex items-center justify-between",children:[(0,s.jsxs)("h3",{className:"text-sm font-medium text-gray-800",children:["收到的简历(",M.length,")"]}),ea?(0,s.jsx)(b,{label:"让Agent收简历",text:c({jobCaseId:h,title:x,platform:ea})}):null]}),et.length?(0,s.jsx)("div",{className:"mb-2 flex gap-1",children:et.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>W(e),className:"flex items-center gap-1 rounded px-2 py-1 text-xs ".concat(ea===e?"bg-[color:var(--brand-soft)] font-medium text-[color:var(--brand-strong)]":"text-gray-500 hover:bg-gray-100"),children:[(0,s.jsx)(p,{platform:e,sm:!0}),e,(0,s.jsxs)("span",{className:"text-gray-400",children:["(",M.filter(t=>{var a;return(null!==(a=t.platform)&&void 0!==a?a:"")===e}).length,")"]})]},e))}):(0,s.jsx)("div",{className:"rounded border border-dashed border-gray-200 p-3 text-center text-xs text-gray-400",children:"还没有平台槽位;添加平台并发布后,按平台收简历"}),ea?0===es.length?(0,s.jsxs)("div",{className:"rounded border border-dashed border-gray-200 p-3 text-center text-xs text-gray-400",children:[ea," 还没有收到简历"]}):(0,s.jsx)("div",{className:"space-y-1",children:es.map(e=>{var t,a;return(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded border border-gray-100 px-2 py-1 text-xs",children:[(0,s.jsx)("span",{className:"font-medium text-gray-800",children:e.name}),(null===(t=e.posting)||void 0===t?void 0:t.title)?(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate text-gray-400",children:e.posting.title}):(0,s.jsx)("span",{className:"flex-1"}),e.note?(0,s.jsx)("span",{className:"text-gray-400",children:e.note}):null,(0,s.jsx)("span",{className:"text-gray-400",children:null===(a=e.receivedAt)||void 0===a?void 0:a.slice(0,10)}),m?(0,s.jsx)("button",{type:"button",disabled:E,onClick:()=>void Y("/job-applications/".concat(e.id),"DELETE"),className:"text-gray-300 hover:text-red-500",children:"✕"}):null]},e.id)})}):null,m?(0,s.jsxs)("div",{className:"mt-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>R(!L),className:"text-xs text-gray-400 underline hover:text-gray-600",children:L?"收起手动录入":"手动录入简历(agent 不在场兜底)"}),L?(0,s.jsxs)("div",{className:"mt-1.5 flex items-center gap-1.5",children:[(0,s.jsx)("input",{type:"text",value:$,onChange:e=>z(e.target.value),placeholder:"候选人姓名",className:"w-36 rounded border border-gray-300 px-2 py-1 text-xs outline-none focus:border-blue-500"}),(0,s.jsxs)("span",{className:"text-xs text-gray-500",children:["平台=",(0,s.jsx)("b",{children:ea||"未选"})]}),(0,s.jsx)("input",{type:"text",value:B,onChange:e=>F(e.target.value),placeholder:"备注(可空)",className:"w-44 rounded border border-gray-300 px-2 py-1 text-xs outline-none focus:border-blue-500"}),(0,s.jsx)("button",{type:"button",disabled:E||!$.trim()||!ea,onClick:()=>void Y("/job-cases/".concat(h,"/applications"),"POST",{name:$.trim(),platform:ea,note:B.trim()||void 0}).then(e=>{e&&(z(""),F(""))}),className:"rounded border border-gray-300 px-2 py-1 text-xs hover:bg-gray-50 disabled:opacity-40",children:"录入"})]}):null]}):null]})]})}},88801:function(e,t,a){a.d(t,{hm:function(){return c},mJ:function(){return u},oU:function(){return i}});var s=a(60635);let n="hm-view-mode",r=new Set;function o(){return"bd"===window.localStorage.getItem(n)?"bd":"delivery"}function l(e){return r.add(e),()=>r.delete(e)}function d(e){"undefined"!=typeof document&&(document.documentElement.dataset.view=e)}function c(e){window.localStorage.setItem(n,e),d(e),r.forEach(e=>e())}function i(){d(o())}function u(e){let t=(0,s.useSyncExternalStore)(l,o,()=>"delivery");return null!=e?e:t}}}]);