kordoc 4.24.0 → 4.24.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/README.md +26 -54
  2. package/dist/{-VEOO4BOM.js → -SRNEV7LS.js} +11 -11
  3. package/dist/{chunk-P35SCAJN.js → chunk-3HN65YAL.js} +2 -2
  4. package/dist/{chunk-H5PDQ66I.js → chunk-4745MFQU.js} +3 -3
  5. package/dist/{chunk-ENCAYXDI.js → chunk-4XC4O7FJ.js} +4 -4
  6. package/dist/{chunk-EN3PK6OT.js → chunk-7NTMM6PO.js} +2 -2
  7. package/dist/{chunk-GEY6ZMXH.js → chunk-C6ZVB547.js} +43 -23
  8. package/dist/{chunk-GEY6ZMXH.js.map → chunk-C6ZVB547.js.map} +1 -1
  9. package/dist/{chunk-CKCJU42Y.js → chunk-DHMBPMKC.js} +74 -30
  10. package/dist/chunk-DHMBPMKC.js.map +1 -0
  11. package/dist/{chunk-ZGNHJCDR.js → chunk-E6VBLBOO.js} +2 -2
  12. package/dist/{chunk-O2SLKE4L.js → chunk-E7B5CXYI.js} +2 -2
  13. package/dist/{chunk-DKWEZWCF.cjs → chunk-HLTPMSYW.cjs} +3 -3
  14. package/dist/{chunk-DKWEZWCF.cjs.map → chunk-HLTPMSYW.cjs.map} +1 -1
  15. package/dist/{chunk-DZT3CHNZ.cjs → chunk-IGG63DFK.cjs} +3 -3
  16. package/dist/{chunk-DZT3CHNZ.cjs.map → chunk-IGG63DFK.cjs.map} +1 -1
  17. package/dist/{chunk-IHNIPVPJ.cjs → chunk-JFUUFJZW.cjs} +6 -6
  18. package/dist/{chunk-IHNIPVPJ.cjs.map → chunk-JFUUFJZW.cjs.map} +1 -1
  19. package/dist/{chunk-PX6X4YOR.js → chunk-JMOAMKAR.js} +4 -4
  20. package/dist/{chunk-P6FNIU5P.js → chunk-KUC5I5MB.js} +2 -2
  21. package/dist/{chunk-Z5G6QNVH.js → chunk-LMEF7FN5.js} +2 -2
  22. package/dist/{chunk-OJISMR2Z.js → chunk-M46PB75E.js} +2 -2
  23. package/dist/{chunk-G4HWEM6Q.js → chunk-MHNJOJQV.js} +4 -4
  24. package/dist/{chunk-Z62PHCSU.js → chunk-NJ5RUDCW.js} +3 -3
  25. package/dist/{chunk-DM5YPONO.js → chunk-NMFFIUI6.js} +2 -2
  26. package/dist/{chunk-HOXHBG4C.cjs → chunk-PNSALBXH.cjs} +2 -2
  27. package/dist/{chunk-HOXHBG4C.cjs.map → chunk-PNSALBXH.cjs.map} +1 -1
  28. package/dist/{chunk-FHFPQ6MX.cjs → chunk-PNX5FYHC.cjs} +24 -24
  29. package/dist/{chunk-FHFPQ6MX.cjs.map → chunk-PNX5FYHC.cjs.map} +1 -1
  30. package/dist/{chunk-IZYYKE5F.js → chunk-R2GIGE5H.js} +2 -2
  31. package/dist/{chunk-55DOBEGD.js → chunk-RIRPLFPN.js} +2 -2
  32. package/dist/{chunk-3M2BIQLZ.js → chunk-TDMBTG7U.js} +2 -2
  33. package/dist/{chunk-6YDPTTIY.js → chunk-TW3V6FSH.js} +2 -2
  34. package/dist/{chunk-OHDGEGDJ.cjs → chunk-UNICY546.cjs} +23 -23
  35. package/dist/{chunk-OHDGEGDJ.cjs.map → chunk-UNICY546.cjs.map} +1 -1
  36. package/dist/{chunk-SRUBDR3Z.js → chunk-VPSF5LEM.js} +3 -3
  37. package/dist/{chunk-4VPN5MHS.js → chunk-W24TJJNN.js} +2 -2
  38. package/dist/{chunk-DBPDAG7N.js → chunk-WDSTW3BD.js} +2 -2
  39. package/dist/{chunk-XLY5ZJRP.js → chunk-WJAFE3Z6.js} +2 -2
  40. package/dist/chunks-AL4P5TO5.js +10 -0
  41. package/dist/cli.js +41 -30
  42. package/dist/cli.js.map +1 -1
  43. package/dist/{formula-4GRNVWIQ.js → formula-DSB574H7.js} +4 -4
  44. package/dist/{formula-R3OWFGCZ.cjs → formula-HK2MNZ3Q.cjs} +9 -9
  45. package/dist/{formula-R3OWFGCZ.cjs.map → formula-HK2MNZ3Q.cjs.map} +1 -1
  46. package/dist/{formula-6Y467S4R.js → formula-U2LZ67KI.js} +3 -3
  47. package/dist/{image-ocr-CGJJCD4E.js → image-ocr-3QB2HLSI.js} +9 -9
  48. package/dist/{image-ocr-ZLL66KNO.js → image-ocr-J54Q3YWP.js} +6 -6
  49. package/dist/{image-ocr-EBKG45KF.cjs → image-ocr-QNIMVE5A.cjs} +17 -17
  50. package/dist/{image-ocr-EBKG45KF.cjs.map → image-ocr-QNIMVE5A.cjs.map} +1 -1
  51. package/dist/index.cjs +683 -619
  52. package/dist/index.cjs.map +1 -1
  53. package/dist/index.d.cts +1 -1
  54. package/dist/index.d.ts +1 -1
  55. package/dist/index.js +106 -42
  56. package/dist/index.js.map +1 -1
  57. package/dist/mcp.js +36 -33
  58. package/dist/mcp.js.map +1 -1
  59. package/dist/{model-bundle-RD4KSNTB.js → model-bundle-CGWU4ALC.js} +5 -5
  60. package/dist/{models-OLGCZBXI.js → models-A3TF3BDV.js} +5 -5
  61. package/dist/{parse-worker-v2-YZY2GQY5.js → parse-worker-v2-MNUD4WAR.js} +20 -13
  62. package/dist/parse-worker-v2-MNUD4WAR.js.map +1 -0
  63. package/dist/{parser-IHCFHLHN.js → parser-C3ARF26I.js} +12 -12
  64. package/dist/{parser-J22QBXPP.js → parser-OBGWEWSU.js} +9 -9
  65. package/dist/{parser-DX4I3GT7.cjs → parser-RPAHN3OR.cjs} +157 -157
  66. package/dist/{parser-DX4I3GT7.cjs.map → parser-RPAHN3OR.cjs.map} +1 -1
  67. package/dist/{pdf-ocr-TYIH23RP.js → pdf-ocr-ENLVEEYL.js} +9 -9
  68. package/dist/pdf-ocr-GA5QJFNK.cjs +31 -0
  69. package/dist/{pdf-ocr-WU7SZHWM.cjs.map → pdf-ocr-GA5QJFNK.cjs.map} +1 -1
  70. package/dist/{pdf-ocr-H2247ZZH.js → pdf-ocr-K53REDNY.js} +6 -6
  71. package/dist/{profile-io-GH3TYTNJ.js → profile-io-ZGFEO7CB.js} +3 -3
  72. package/dist/{rasterize-7TFTVFMB.js → rasterize-QMC2SAUT.js} +3 -3
  73. package/dist/{redact-doc-DSSQOO3A.js → redact-doc-JH6RZZBE.js} +11 -11
  74. package/dist/{render-NKXZQINI.js → render-ZGKQLKPJ.js} +7 -7
  75. package/dist/seal-KMGYTJAV.js +10 -0
  76. package/dist/{setup-JVLMX2TH.js → setup-LAQGCYQ2.js} +3 -3
  77. package/dist/visual-4OYJFGXL.js +21 -0
  78. package/dist/{watch-5RZVHAKI.js → watch-7YPB4TKC.js} +12 -12
  79. package/package.json +1 -1
  80. package/dist/chunk-CKCJU42Y.js.map +0 -1
  81. package/dist/chunks-LV5EJBZ4.js +0 -10
  82. package/dist/parse-worker-v2-YZY2GQY5.js.map +0 -1
  83. package/dist/pdf-ocr-WU7SZHWM.cjs +0 -31
  84. package/dist/seal-JIVSSI3Z.js +0 -10
  85. package/dist/visual-BKVZN6HP.js +0 -21
  86. /package/dist/{-VEOO4BOM.js.map → -SRNEV7LS.js.map} +0 -0
  87. /package/dist/{chunk-P35SCAJN.js.map → chunk-3HN65YAL.js.map} +0 -0
  88. /package/dist/{chunk-H5PDQ66I.js.map → chunk-4745MFQU.js.map} +0 -0
  89. /package/dist/{chunk-ENCAYXDI.js.map → chunk-4XC4O7FJ.js.map} +0 -0
  90. /package/dist/{chunk-EN3PK6OT.js.map → chunk-7NTMM6PO.js.map} +0 -0
  91. /package/dist/{chunk-ZGNHJCDR.js.map → chunk-E6VBLBOO.js.map} +0 -0
  92. /package/dist/{chunk-O2SLKE4L.js.map → chunk-E7B5CXYI.js.map} +0 -0
  93. /package/dist/{chunk-PX6X4YOR.js.map → chunk-JMOAMKAR.js.map} +0 -0
  94. /package/dist/{chunk-P6FNIU5P.js.map → chunk-KUC5I5MB.js.map} +0 -0
  95. /package/dist/{chunk-Z5G6QNVH.js.map → chunk-LMEF7FN5.js.map} +0 -0
  96. /package/dist/{chunk-OJISMR2Z.js.map → chunk-M46PB75E.js.map} +0 -0
  97. /package/dist/{chunk-G4HWEM6Q.js.map → chunk-MHNJOJQV.js.map} +0 -0
  98. /package/dist/{chunk-Z62PHCSU.js.map → chunk-NJ5RUDCW.js.map} +0 -0
  99. /package/dist/{chunk-DM5YPONO.js.map → chunk-NMFFIUI6.js.map} +0 -0
  100. /package/dist/{chunk-IZYYKE5F.js.map → chunk-R2GIGE5H.js.map} +0 -0
  101. /package/dist/{chunk-55DOBEGD.js.map → chunk-RIRPLFPN.js.map} +0 -0
  102. /package/dist/{chunk-3M2BIQLZ.js.map → chunk-TDMBTG7U.js.map} +0 -0
  103. /package/dist/{chunk-6YDPTTIY.js.map → chunk-TW3V6FSH.js.map} +0 -0
  104. /package/dist/{chunk-SRUBDR3Z.js.map → chunk-VPSF5LEM.js.map} +0 -0
  105. /package/dist/{chunk-4VPN5MHS.js.map → chunk-W24TJJNN.js.map} +0 -0
  106. /package/dist/{chunk-DBPDAG7N.js.map → chunk-WDSTW3BD.js.map} +0 -0
  107. /package/dist/{chunk-XLY5ZJRP.js.map → chunk-WJAFE3Z6.js.map} +0 -0
  108. /package/dist/{chunks-LV5EJBZ4.js.map → chunks-AL4P5TO5.js.map} +0 -0
  109. /package/dist/{formula-4GRNVWIQ.js.map → formula-DSB574H7.js.map} +0 -0
  110. /package/dist/{formula-6Y467S4R.js.map → formula-U2LZ67KI.js.map} +0 -0
  111. /package/dist/{image-ocr-CGJJCD4E.js.map → image-ocr-3QB2HLSI.js.map} +0 -0
  112. /package/dist/{image-ocr-ZLL66KNO.js.map → image-ocr-J54Q3YWP.js.map} +0 -0
  113. /package/dist/{model-bundle-RD4KSNTB.js.map → model-bundle-CGWU4ALC.js.map} +0 -0
  114. /package/dist/{models-OLGCZBXI.js.map → models-A3TF3BDV.js.map} +0 -0
  115. /package/dist/{parser-IHCFHLHN.js.map → parser-C3ARF26I.js.map} +0 -0
  116. /package/dist/{parser-J22QBXPP.js.map → parser-OBGWEWSU.js.map} +0 -0
  117. /package/dist/{pdf-ocr-H2247ZZH.js.map → pdf-ocr-ENLVEEYL.js.map} +0 -0
  118. /package/dist/{pdf-ocr-TYIH23RP.js.map → pdf-ocr-K53REDNY.js.map} +0 -0
  119. /package/dist/{profile-io-GH3TYTNJ.js.map → profile-io-ZGFEO7CB.js.map} +0 -0
  120. /package/dist/{rasterize-7TFTVFMB.js.map → rasterize-QMC2SAUT.js.map} +0 -0
  121. /package/dist/{redact-doc-DSSQOO3A.js.map → redact-doc-JH6RZZBE.js.map} +0 -0
  122. /package/dist/{render-NKXZQINI.js.map → render-ZGKQLKPJ.js.map} +0 -0
  123. /package/dist/{seal-JIVSSI3Z.js.map → seal-KMGYTJAV.js.map} +0 -0
  124. /package/dist/{setup-JVLMX2TH.js.map → setup-LAQGCYQ2.js.map} +0 -0
  125. /package/dist/{visual-BKVZN6HP.js.map → visual-4OYJFGXL.js.map} +0 -0
  126. /package/dist/{watch-5RZVHAKI.js.map → watch-7YPB4TKC.js.map} +0 -0
package/dist/mcp.js CHANGED
@@ -47,33 +47,33 @@ import {
47
47
  unknownFontWarnings,
48
48
  usesGaejosikMunche,
49
49
  usesLogicStructure
50
- } from "./chunk-GEY6ZMXH.js";
51
- import "./chunk-DM5YPONO.js";
50
+ } from "./chunk-C6ZVB547.js";
51
+ import "./chunk-NMFFIUI6.js";
52
52
  import {
53
53
  detectFormat,
54
54
  detectOle2Format,
55
55
  detectZipFormat,
56
56
  extractHwp5MetadataOnly
57
- } from "./chunk-CKCJU42Y.js";
58
- import "./chunk-ZGNHJCDR.js";
59
- import "./chunk-EN3PK6OT.js";
57
+ } from "./chunk-DHMBPMKC.js";
58
+ import "./chunk-E6VBLBOO.js";
59
+ import "./chunk-7NTMM6PO.js";
60
60
  import "./chunk-VKVDMH7X.js";
61
61
  import "./chunk-VQFA55IC.js";
62
62
  import "./chunk-BYMPPVT3.js";
63
- import "./chunk-P6FNIU5P.js";
63
+ import "./chunk-KUC5I5MB.js";
64
64
  import {
65
65
  blocksToMarkdown
66
- } from "./chunk-DBPDAG7N.js";
66
+ } from "./chunk-WDSTW3BD.js";
67
67
  import {
68
68
  assertWithinRoot,
69
69
  getAccessRoot,
70
70
  isOfflineMode
71
- } from "./chunk-3M2BIQLZ.js";
71
+ } from "./chunk-TDMBTG7U.js";
72
72
  import {
73
73
  extractFormFields,
74
74
  fillWithUniqueGuard
75
- } from "./chunk-Z62PHCSU.js";
76
- import "./chunk-55DOBEGD.js";
75
+ } from "./chunk-NJ5RUDCW.js";
76
+ import "./chunk-RIRPLFPN.js";
77
77
  import {
78
78
  KordocError,
79
79
  VERSION,
@@ -81,7 +81,7 @@ import {
81
81
  routeConsoleToStderr,
82
82
  sanitizeError,
83
83
  toArrayBuffer
84
- } from "./chunk-Z5G6QNVH.js";
84
+ } from "./chunk-LMEF7FN5.js";
85
85
  import "./chunk-3WSNLH4B.js";
86
86
 
87
87
  // src/mcp.ts
@@ -197,6 +197,15 @@ function capResponseText(text, maxChars = MAX_RESPONSE_CHARS) {
197
197
  \u2026 [\uC751\uB2F5\uC774 ${maxChars.toLocaleString()}\uC790 \uC0C1\uD55C\uC744 \uB118\uC5B4 \uC808\uB2E8\uB428 (\uC804\uCCB4 ${text.length.toLocaleString()}\uC790) \u2014 parse_pages\uB85C \uD398\uC774\uC9C0 \uBC94\uC704\uB97C \uB098\uB220 \uC77D\uC73C\uC138\uC694]`;
198
198
  }
199
199
  var MAX_METADATA_FILE_SIZE = 50 * 1024 * 1024;
200
+ async function isSameFile(a, b) {
201
+ if (a === b) return true;
202
+ try {
203
+ const [sa, sb] = await Promise.all([stat(a), stat(b)]);
204
+ return sa.ino === sb.ino && sa.dev === sb.dev;
205
+ } catch {
206
+ return false;
207
+ }
208
+ }
200
209
  async function readValidatedFile(filePath, maxSize = MAX_FILE_SIZE, allowedExts = ALLOWED_EXTENSIONS) {
201
210
  const resolved = safePath(filePath, allowedExts);
202
211
  let fileSize;
@@ -387,7 +396,7 @@ ${markdown}`);
387
396
  break;
388
397
  case "pdf":
389
398
  try {
390
- const { extractPdfMetadataOnly } = await import("./parser-IHCFHLHN.js");
399
+ const { extractPdfMetadataOnly } = await import("./parser-C3ARF26I.js");
391
400
  metadata = await extractPdfMetadataOnly(buffer);
392
401
  } catch {
393
402
  metadata = void 0;
@@ -564,7 +573,7 @@ ${tableMarkdown}` }]
564
573
  if (!parsed.success) {
565
574
  return { content: [{ type: "text", text: `\uD30C\uC2F1 \uC2E4\uD328: ${parsed.error}` }], isError: true };
566
575
  }
567
- const { blocksToChunks } = await import("./chunks-LV5EJBZ4.js");
576
+ const { blocksToChunks } = await import("./chunks-AL4P5TO5.js");
568
577
  const chunks = blocksToChunks(parsed.blocks, { granularity, includeTableCells: include_table_cells });
569
578
  return { content: [{ type: "text", text: capResponseText(JSON.stringify(chunks, null, 2)) }] };
570
579
  } catch (err) {
@@ -602,15 +611,6 @@ async function readFieldsFile(path) {
602
611
  }
603
612
  return data;
604
613
  }
605
- async function isSameFile(a, b) {
606
- if (a === b) return true;
607
- try {
608
- const [sa, sb] = await Promise.all([stat2(a), stat2(b)]);
609
- return sa.ino === sb.ino && sa.dev === sb.dev;
610
- } catch {
611
- return false;
612
- }
613
- }
614
614
  function registerFormTools(server2) {
615
615
  server2.tool(
616
616
  "parse_form",
@@ -834,7 +834,7 @@ ${previewMd}` }]
834
834
  }
835
835
  const image = new Uint8Array(await readFile2(imgResolved));
836
836
  const ext = extname2(imgResolved).slice(1).toLowerCase();
837
- const { placeSealHwpx } = await import("./seal-JIVSSI3Z.js");
837
+ const { placeSealHwpx } = await import("./seal-KMGYTJAV.js");
838
838
  const result = await placeSealHwpx(buffer, [{
839
839
  anchor,
840
840
  occurrence,
@@ -953,7 +953,7 @@ ${previewMd}` }]
953
953
  if (outPath && await isSameFile(outPath, resolved)) {
954
954
  return { content: [{ type: "text", text: "output_path\uAC00 \uC785\uB825 \uD30C\uC77C\uACFC \uAC19\uC2B5\uB2C8\uB2E4 \u2014 \uC6D0\uBCF8\uC744 \uB36E\uC5B4\uC4F0\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB2E4\uB978 \uACBD\uB85C\uB97C \uC9C0\uC815\uD558\uC138\uC694." }], isError: true };
955
955
  }
956
- const { redactDocument } = await import("./redact-doc-DSSQOO3A.js");
956
+ const { redactDocument } = await import("./redact-doc-JH6RZZBE.js");
957
957
  const r = await redactDocument(buffer, { rules, maskChar: mask_char, filePath: file_path, dryRun: dry_run });
958
958
  const MAX_LINES = 50;
959
959
  const listed = r.fileHits.length > 0 ? r.fileHits.map((h) => ` - [${h.rule}] ${h.masked} (${h.where} @ ${h.part})`) : r.markdownHits.map((h) => ` - [${h.rule}] ${h.masked}`);
@@ -1027,7 +1027,7 @@ function registerRenderTools(server2) {
1027
1027
  const { buffer, resolved } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
1028
1028
  const isHwp5 = resolved.toLowerCase().endsWith(".hwp");
1029
1029
  if (!isHwp5 && !pages && (format === "png" || format === "svg")) {
1030
- const { renderHwpxToSvg } = await import("./render-NKXZQINI.js");
1030
+ const { renderHwpxToSvg } = await import("./render-ZGKQLKPJ.js");
1031
1031
  const result = await renderHwpxToSvg(buffer, { highlights, reflow: true, reflowMode: reflow_mode });
1032
1032
  const summary2 = [
1033
1033
  `\uB80C\uB354 \uC644\uB8CC: ${result.pageCount}\uD398\uC774\uC9C0, ${Math.round(result.width)}x${Math.round(result.height)}pt (\uD14D\uC2A4\uD2B8 ${result.stats.texts}\xB7\uC774\uBBF8\uC9C0 ${result.stats.images}\xB7\uD45C ${result.stats.tables})`,
@@ -1039,7 +1039,7 @@ function registerRenderTools(server2) {
1039
1039
  summary2.push(`\uC800\uC7A5: ${outPath}`);
1040
1040
  return { content: [{ type: "text", text: summary2.join("\n") }] };
1041
1041
  }
1042
- const { rasterizeSvg } = await import("./rasterize-7TFTVFMB.js");
1042
+ const { rasterizeSvg } = await import("./rasterize-QMC2SAUT.js");
1043
1043
  const raster = await rasterizeSvg(result.svg, result.width, result.height, max_width_px ? { maxWidthPx: max_width_px } : void 0);
1044
1044
  if (outPath) {
1045
1045
  await mkdir2(dirname3(outPath), { recursive: true });
@@ -1054,7 +1054,7 @@ function registerRenderTools(server2) {
1054
1054
  ]
1055
1055
  };
1056
1056
  }
1057
- const { renderDocument } = await import("./render-NKXZQINI.js");
1057
+ const { renderDocument } = await import("./render-ZGKQLKPJ.js");
1058
1058
  const { scene, assets } = await renderDocument(buffer, { format, pages, highlights, reflow: true, reflowMode: reflow_mode, maxWidthPx: max_width_px });
1059
1059
  const summary = [
1060
1060
  `\uB80C\uB354 \uC644\uB8CC: \uBB38\uC11C ${scene.pages.length}\uD398\uC774\uC9C0 \uC911 ${assets.filter((a) => a.page !== void 0).length || 1}\uAC74 (\uD14D\uC2A4\uD2B8 ${scene.stats.texts}\xB7\uC774\uBBF8\uC9C0 ${scene.stats.images}\xB7\uD45C ${scene.stats.tables}\xB7\uB3C4\uD615 ${scene.stats.shapes})`,
@@ -1104,7 +1104,7 @@ function registerRenderTools(server2) {
1104
1104
  try {
1105
1105
  const { buffer } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
1106
1106
  const dir = safeOutputPath(join2(output_dir, "regions.json"), /* @__PURE__ */ new Set([".json"])).replace(/[\\/]regions\.json$/, "");
1107
- const { extractRenderedRegions } = await import("./render-NKXZQINI.js");
1107
+ const { extractRenderedRegions } = await import("./render-ZGKQLKPJ.js");
1108
1108
  const regions = await extractRenderedRegions(buffer, { types: target, format, pages, paddingPt: padding_pt, reflow: true });
1109
1109
  await mkdir2(dir, { recursive: true });
1110
1110
  const ext = format === "jpeg" ? "jpg" : "png";
@@ -1140,7 +1140,7 @@ function registerRenderTools(server2) {
1140
1140
  }
1141
1141
  const { buffer } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
1142
1142
  const dir = output_dir ? safeOutputPath(join2(output_dir, "tables.json"), /* @__PURE__ */ new Set([".json"])).replace(/[\\/]tables\.json$/, "") : void 0;
1143
- const { extractTables } = await import("./visual-BKVZN6HP.js");
1143
+ const { extractTables } = await import("./visual-4OYJFGXL.js");
1144
1144
  const tables = await extractTables(buffer, { policy: visual, format, paddingPt: padding_pt });
1145
1145
  if (dir) await mkdir2(dir, { recursive: true });
1146
1146
  const ext = format === "jpeg" ? "jpg" : "png";
@@ -1197,7 +1197,7 @@ function registerGenerateTools(server2) {
1197
1197
  try {
1198
1198
  const out = safeOutputPath(output_path, PROFILE_EXTENSIONS);
1199
1199
  const { buffer } = await readValidatedFile(hwpx_path);
1200
- const { hwpxToProfile } = await import("./-VEOO4BOM.js");
1200
+ const { hwpxToProfile } = await import("./-SRNEV7LS.js");
1201
1201
  const profile = await hwpxToProfile(buffer);
1202
1202
  await mkdir3(dirname4(out), { recursive: true });
1203
1203
  await writeOutputFile(out, JSON.stringify(profile, null, 2));
@@ -1289,7 +1289,10 @@ ${g.blocking.map((f) => `- ${formatGateFinding(f)}`).join("\n")}` }],
1289
1289
  };
1290
1290
  }
1291
1291
  }
1292
- const { buffer: tpl } = await readValidatedFile(template_path, void 0, /* @__PURE__ */ new Set([".hwpx"]));
1292
+ const { buffer: tpl, resolved: tplPath } = await readValidatedFile(template_path, void 0, /* @__PURE__ */ new Set([".hwpx"]));
1293
+ if (await isSameFile(out2, tplPath)) {
1294
+ return { content: [{ type: "text", text: "output_path\uAC00 \uACAC\uBCF8(template_path)\uACFC \uAC19\uC2B5\uB2C8\uB2E4. \uACAC\uBCF8\uC744 \uB36E\uC5B4\uC4F0\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB2E4\uB978 \uACBD\uB85C\uB97C \uC9C0\uC815\uD558\uC138\uC694." }], isError: true };
1295
+ }
1293
1296
  const warnings = [];
1294
1297
  const buf2 = await markdownToHwpx(markdown, { template: tpl, warnings, ...total_row ? { totalRow: total_row } : {} });
1295
1298
  await mkdir3(dirname4(out2), { recursive: true });
@@ -1341,7 +1344,7 @@ ${g.blocking.map((f) => `- ${formatGateFinding(f)}`).join("\n")}` }],
1341
1344
  }
1342
1345
  let profile;
1343
1346
  if (profile_path) {
1344
- const { parseFormatProfileJson } = await import("./profile-io-GH3TYTNJ.js");
1347
+ const { parseFormatProfileJson } = await import("./profile-io-ZGFEO7CB.js");
1345
1348
  profile = parseFormatProfileJson(await readFile3(safePath(profile_path, PROFILE_EXTENSIONS), "utf-8"));
1346
1349
  }
1347
1350
  const out = safeOutputPath(output_path, /* @__PURE__ */ new Set([".hwpx"]));
@@ -1445,7 +1448,7 @@ function registerLintTools(server2) {
1445
1448
  let irBlocks;
1446
1449
  if (file_path !== void 0) {
1447
1450
  const { buffer, resolved } = await readValidatedFile(file_path, MAX_FILE_SIZE, ALLOWED_EXTENSIONS);
1448
- const { parse: parse2 } = await import("./-VEOO4BOM.js");
1451
+ const { parse: parse2 } = await import("./-SRNEV7LS.js");
1449
1452
  const parsed = await parse2(buffer, { filePath: resolved });
1450
1453
  if (!parsed.success) throw new KordocError(`\uBB38\uC11C\uB97C \uC77D\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4 \u2014 ${parsed.error}`);
1451
1454
  body = parsed.markdown;