kordoc 4.21.20 → 4.21.21

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 (124) hide show
  1. package/README.md +6 -5
  2. package/dist/{-QHQ2QKM7.js → -ZYF6HX4M.js} +11 -11
  3. package/dist/{chunk-FU3SCGE7.js → chunk-2ZGP7A5T.js} +2 -2
  4. package/dist/{chunk-TYYKK5DX.js → chunk-3TCF5HPP.js} +2 -2
  5. package/dist/{chunk-WWMHVDRG.cjs → chunk-57VNFMMS.cjs} +3 -3
  6. package/dist/{chunk-WWMHVDRG.cjs.map → chunk-57VNFMMS.cjs.map} +1 -1
  7. package/dist/{chunk-75INFYVC.js → chunk-5HTFWUJE.js} +2 -2
  8. package/dist/{chunk-G6G25HUO.js → chunk-7YAJCXCD.js} +2 -2
  9. package/dist/{chunk-DBFAQJCX.js → chunk-BC54LBST.js} +3 -3
  10. package/dist/{chunk-PALYDA3M.js → chunk-BG6LUCQL.js} +2 -2
  11. package/dist/{chunk-42XYVZ2B.js → chunk-CY4QM2KQ.js} +2 -2
  12. package/dist/{chunk-2FALZL3E.cjs → chunk-DTZIZ5PP.cjs} +13 -13
  13. package/dist/{chunk-2FALZL3E.cjs.map → chunk-DTZIZ5PP.cjs.map} +1 -1
  14. package/dist/{chunk-AINZICPE.js → chunk-FBJVDBMO.js} +2 -2
  15. package/dist/{chunk-7ITWGPNB.js → chunk-FZMGF6XU.js} +2 -2
  16. package/dist/{chunk-CKEO54YN.cjs → chunk-H2MS4VG3.cjs} +3 -3
  17. package/dist/{chunk-CKEO54YN.cjs.map → chunk-H2MS4VG3.cjs.map} +1 -1
  18. package/dist/{chunk-KBL24ZCP.js → chunk-HWIW3WK2.js} +3 -3
  19. package/dist/{chunk-E5L6DUOE.js → chunk-J5PBI3ZC.js} +3 -3
  20. package/dist/{chunk-LY4ITNAL.js → chunk-KBV4WFZ6.js} +80 -5
  21. package/dist/chunk-KBV4WFZ6.js.map +1 -0
  22. package/dist/{chunk-JDVOYDIA.js → chunk-KTLHADU4.js} +2 -2
  23. package/dist/{chunk-M37GOXT5.cjs → chunk-MCUX2Y2C.cjs} +2 -2
  24. package/dist/{chunk-M37GOXT5.cjs.map → chunk-MCUX2Y2C.cjs.map} +1 -1
  25. package/dist/{chunk-ZMGWKGSC.js → chunk-PTF4NCFM.js} +2 -2
  26. package/dist/{chunk-N47I6OS7.js → chunk-QHNVH4TC.js} +6 -6
  27. package/dist/{chunk-LO5A36FU.js → chunk-RBRHO7WL.js} +2 -2
  28. package/dist/{chunk-6HIDMA5O.js → chunk-T3DTTK23.js} +2 -2
  29. package/dist/{chunk-KS2SASZH.cjs → chunk-T7PN5D4D.cjs} +6 -6
  30. package/dist/{chunk-KS2SASZH.cjs.map → chunk-T7PN5D4D.cjs.map} +1 -1
  31. package/dist/{chunk-MOT7WOP5.cjs → chunk-TMUUDMDH.cjs} +100 -25
  32. package/dist/chunk-TMUUDMDH.cjs.map +1 -0
  33. package/dist/{chunk-I4HF4UCA.js → chunk-TRO4CQHJ.js} +4 -4
  34. package/dist/{chunk-WINHSKFD.js → chunk-WGMYVRSA.js} +2 -2
  35. package/dist/{chunk-LQSF4JSV.js → chunk-YHPJTLCA.js} +2 -2
  36. package/dist/{chunk-BLKAJD2G.js → chunk-YM3K3LCD.js} +10 -10
  37. package/dist/{chunk-F5KWC7I3.js → chunk-YQZOPT3A.js} +81 -6
  38. package/dist/chunk-YQZOPT3A.js.map +1 -0
  39. package/dist/{chunk-F5PISJEI.js → chunk-ZZIQWSGC.js} +2 -2
  40. package/dist/chunks-MDMJRCJ7.js +10 -0
  41. package/dist/cli.js +30 -30
  42. package/dist/{formula-XAPMN6HX.js → formula-6XNIXZ5L.js} +3 -3
  43. package/dist/{formula-G5LTBMGC.cjs → formula-A3I5VAP7.cjs} +9 -9
  44. package/dist/{formula-G5LTBMGC.cjs.map → formula-A3I5VAP7.cjs.map} +1 -1
  45. package/dist/{formula-KHPAZKOK.js → formula-P7M7IH2L.js} +4 -4
  46. package/dist/{image-ocr-RNPHQ4C2.js → image-ocr-3C6W3KZO.js} +6 -6
  47. package/dist/{image-ocr-N5LAIHRV.js → image-ocr-ITNY454I.js} +9 -9
  48. package/dist/{image-ocr-MHPVAYOB.cjs → image-ocr-UJRSQ2T3.cjs} +15 -15
  49. package/dist/{image-ocr-MHPVAYOB.cjs.map → image-ocr-UJRSQ2T3.cjs.map} +1 -1
  50. package/dist/index.cjs +276 -276
  51. package/dist/index.js +5 -5
  52. package/dist/mcp.js +22 -22
  53. package/dist/{model-bundle-XP4AHFLT.js → model-bundle-LAWQH75O.js} +5 -5
  54. package/dist/{models-AD2KAUNC.js → models-6QTD2CFM.js} +5 -5
  55. package/dist/{parse-worker-v2-7UHOQ2TK.js → parse-worker-v2-FEPJG3ER.js} +12 -12
  56. package/dist/{parser-5WGRQKPI.js → parser-56I364YM.js} +16 -8
  57. package/dist/{parser-2RN5WNPJ.js.map → parser-56I364YM.js.map} +1 -1
  58. package/dist/{parser-2RN5WNPJ.js → parser-KFCY3NIN.js} +19 -11
  59. package/dist/{parser-5WGRQKPI.js.map → parser-KFCY3NIN.js.map} +1 -1
  60. package/dist/{parser-ZPCCXCVO.cjs → parser-VKWUMUML.cjs} +142 -134
  61. package/dist/parser-VKWUMUML.cjs.map +1 -0
  62. package/dist/pdf-ocr-MME37BL4.js +18 -0
  63. package/dist/pdf-ocr-OKAHNEJA.cjs +19 -0
  64. package/dist/{pdf-ocr-SFIWMJQL.cjs.map → pdf-ocr-OKAHNEJA.cjs.map} +1 -1
  65. package/dist/pdf-ocr-ZZ6AJL6Z.js +22 -0
  66. package/dist/{profile-io-UP7H2J6I.js → profile-io-OCITHUQF.js} +3 -3
  67. package/dist/{rasterize-XBCDG4MD.js → rasterize-SFCG4YOI.js} +3 -3
  68. package/dist/{redact-doc-CJ6W6YNR.js → redact-doc-5SMPXIGG.js} +11 -11
  69. package/dist/{render-K5UDHXRI.js → render-FGPG5A2N.js} +7 -7
  70. package/dist/seal-GA7NZDTG.js +10 -0
  71. package/dist/{setup-S66RLBBM.js → setup-JQVYZO7I.js} +3 -3
  72. package/dist/visual-YMG644YW.js +20 -0
  73. package/dist/{watch-PB7IOD73.js → watch-C77BUSP7.js} +12 -12
  74. package/package.json +1 -1
  75. package/dist/chunk-F5KWC7I3.js.map +0 -1
  76. package/dist/chunk-LY4ITNAL.js.map +0 -1
  77. package/dist/chunk-MOT7WOP5.cjs.map +0 -1
  78. package/dist/chunks-BJRBKGKZ.js +0 -10
  79. package/dist/parser-ZPCCXCVO.cjs.map +0 -1
  80. package/dist/pdf-ocr-KHY3P4EP.js +0 -18
  81. package/dist/pdf-ocr-LFDH6DFD.js +0 -22
  82. package/dist/pdf-ocr-SFIWMJQL.cjs +0 -19
  83. package/dist/seal-YCK6TM5I.js +0 -10
  84. package/dist/visual-S5ZNFWFH.js +0 -20
  85. /package/dist/{-QHQ2QKM7.js.map → -ZYF6HX4M.js.map} +0 -0
  86. /package/dist/{chunk-FU3SCGE7.js.map → chunk-2ZGP7A5T.js.map} +0 -0
  87. /package/dist/{chunk-TYYKK5DX.js.map → chunk-3TCF5HPP.js.map} +0 -0
  88. /package/dist/{chunk-75INFYVC.js.map → chunk-5HTFWUJE.js.map} +0 -0
  89. /package/dist/{chunk-G6G25HUO.js.map → chunk-7YAJCXCD.js.map} +0 -0
  90. /package/dist/{chunk-DBFAQJCX.js.map → chunk-BC54LBST.js.map} +0 -0
  91. /package/dist/{chunk-PALYDA3M.js.map → chunk-BG6LUCQL.js.map} +0 -0
  92. /package/dist/{chunk-42XYVZ2B.js.map → chunk-CY4QM2KQ.js.map} +0 -0
  93. /package/dist/{chunk-AINZICPE.js.map → chunk-FBJVDBMO.js.map} +0 -0
  94. /package/dist/{chunk-7ITWGPNB.js.map → chunk-FZMGF6XU.js.map} +0 -0
  95. /package/dist/{chunk-KBL24ZCP.js.map → chunk-HWIW3WK2.js.map} +0 -0
  96. /package/dist/{chunk-E5L6DUOE.js.map → chunk-J5PBI3ZC.js.map} +0 -0
  97. /package/dist/{chunk-JDVOYDIA.js.map → chunk-KTLHADU4.js.map} +0 -0
  98. /package/dist/{chunk-ZMGWKGSC.js.map → chunk-PTF4NCFM.js.map} +0 -0
  99. /package/dist/{chunk-N47I6OS7.js.map → chunk-QHNVH4TC.js.map} +0 -0
  100. /package/dist/{chunk-LO5A36FU.js.map → chunk-RBRHO7WL.js.map} +0 -0
  101. /package/dist/{chunk-6HIDMA5O.js.map → chunk-T3DTTK23.js.map} +0 -0
  102. /package/dist/{chunk-I4HF4UCA.js.map → chunk-TRO4CQHJ.js.map} +0 -0
  103. /package/dist/{chunk-WINHSKFD.js.map → chunk-WGMYVRSA.js.map} +0 -0
  104. /package/dist/{chunk-LQSF4JSV.js.map → chunk-YHPJTLCA.js.map} +0 -0
  105. /package/dist/{chunk-BLKAJD2G.js.map → chunk-YM3K3LCD.js.map} +0 -0
  106. /package/dist/{chunk-F5PISJEI.js.map → chunk-ZZIQWSGC.js.map} +0 -0
  107. /package/dist/{chunks-BJRBKGKZ.js.map → chunks-MDMJRCJ7.js.map} +0 -0
  108. /package/dist/{formula-XAPMN6HX.js.map → formula-6XNIXZ5L.js.map} +0 -0
  109. /package/dist/{formula-KHPAZKOK.js.map → formula-P7M7IH2L.js.map} +0 -0
  110. /package/dist/{image-ocr-RNPHQ4C2.js.map → image-ocr-3C6W3KZO.js.map} +0 -0
  111. /package/dist/{image-ocr-N5LAIHRV.js.map → image-ocr-ITNY454I.js.map} +0 -0
  112. /package/dist/{model-bundle-XP4AHFLT.js.map → model-bundle-LAWQH75O.js.map} +0 -0
  113. /package/dist/{models-AD2KAUNC.js.map → models-6QTD2CFM.js.map} +0 -0
  114. /package/dist/{parse-worker-v2-7UHOQ2TK.js.map → parse-worker-v2-FEPJG3ER.js.map} +0 -0
  115. /package/dist/{pdf-ocr-KHY3P4EP.js.map → pdf-ocr-MME37BL4.js.map} +0 -0
  116. /package/dist/{pdf-ocr-LFDH6DFD.js.map → pdf-ocr-ZZ6AJL6Z.js.map} +0 -0
  117. /package/dist/{profile-io-UP7H2J6I.js.map → profile-io-OCITHUQF.js.map} +0 -0
  118. /package/dist/{rasterize-XBCDG4MD.js.map → rasterize-SFCG4YOI.js.map} +0 -0
  119. /package/dist/{redact-doc-CJ6W6YNR.js.map → redact-doc-5SMPXIGG.js.map} +0 -0
  120. /package/dist/{render-K5UDHXRI.js.map → render-FGPG5A2N.js.map} +0 -0
  121. /package/dist/{seal-YCK6TM5I.js.map → seal-GA7NZDTG.js.map} +0 -0
  122. /package/dist/{setup-S66RLBBM.js.map → setup-JQVYZO7I.js.map} +0 -0
  123. /package/dist/{visual-S5ZNFWFH.js.map → visual-YMG644YW.js.map} +0 -0
  124. /package/dist/{watch-PB7IOD73.js.map → watch-C77BUSP7.js.map} +0 -0
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  blocksToPages,
3
3
  inlineImagesIntoMarkdown
4
- } from "./chunk-6HIDMA5O.js";
4
+ } from "./chunk-T3DTTK23.js";
5
5
  import {
6
6
  parsePageRange
7
7
  } from "./chunk-V4BH5SRQ.js";
@@ -32,7 +32,7 @@ import {
32
32
  tidyScriptTags,
33
33
  unframeLayoutTables,
34
34
  wrapScript
35
- } from "./chunk-JDVOYDIA.js";
35
+ } from "./chunk-KTLHADU4.js";
36
36
  import {
37
37
  KordocError,
38
38
  OPTIONAL_DEP_INSTALL_HINT,
@@ -50,7 +50,7 @@ import {
50
50
  toArrayBuffer,
51
51
  unescapeHtml,
52
52
  unzipLimitBytes
53
- } from "./chunk-F5PISJEI.js";
53
+ } from "./chunk-ZZIQWSGC.js";
54
54
 
55
55
  // src/plain-markdown.ts
56
56
  function toPlainMarkdown(md2) {
@@ -42688,7 +42688,7 @@ function scriptsOff(r, off) {
42688
42688
  }
42689
42689
  async function parseImage(buffer, options) {
42690
42690
  try {
42691
- const { parseImageDocument } = await import("./image-ocr-RNPHQ4C2.js");
42691
+ const { parseImageDocument } = await import("./image-ocr-3C6W3KZO.js");
42692
42692
  const { blocks, warnings } = await parseImageDocument(buffer, options);
42693
42693
  stripScriptTags({ blocks });
42694
42694
  return {
@@ -42748,7 +42748,7 @@ async function parseHwp(buffer, options) {
42748
42748
  async function parsePdf(buffer, options) {
42749
42749
  let parsePdfDocument;
42750
42750
  try {
42751
- const mod = await import("./parser-5WGRQKPI.js");
42751
+ const mod = await import("./parser-56I364YM.js");
42752
42752
  parsePdfDocument = mod.parsePdfDocument;
42753
42753
  } catch {
42754
42754
  return {
package/dist/mcp.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  assertWithinRoot,
4
4
  getAccessRoot,
5
5
  isOfflineMode
6
- } from "./chunk-42XYVZ2B.js";
6
+ } from "./chunk-CY4QM2KQ.js";
7
7
  import {
8
8
  APPROVAL_MAX,
9
9
  BODY_FONTS,
@@ -45,25 +45,25 @@ import {
45
45
  resolveBuiltinTemplate,
46
46
  unknownFontWarnings,
47
47
  usesGaejosikMunche
48
- } from "./chunk-BLKAJD2G.js";
49
- import "./chunk-FU3SCGE7.js";
50
- import "./chunk-KBL24ZCP.js";
48
+ } from "./chunk-YM3K3LCD.js";
49
+ import "./chunk-2ZGP7A5T.js";
50
+ import "./chunk-HWIW3WK2.js";
51
51
  import "./chunk-3WSNLH4B.js";
52
- import "./chunk-G6G25HUO.js";
52
+ import "./chunk-7YAJCXCD.js";
53
53
  import {
54
54
  detectFormat,
55
55
  detectOle2Format,
56
56
  detectZipFormat,
57
57
  extractHwp5MetadataOnly
58
- } from "./chunk-N47I6OS7.js";
58
+ } from "./chunk-QHNVH4TC.js";
59
59
  import "./chunk-7FCNOKOR.js";
60
- import "./chunk-ZMGWKGSC.js";
60
+ import "./chunk-PTF4NCFM.js";
61
61
  import "./chunk-VQFA55IC.js";
62
- import "./chunk-PALYDA3M.js";
62
+ import "./chunk-BG6LUCQL.js";
63
63
  import {
64
64
  blocksToMarkdown
65
- } from "./chunk-LO5A36FU.js";
66
- import "./chunk-LQSF4JSV.js";
65
+ } from "./chunk-RBRHO7WL.js";
66
+ import "./chunk-YHPJTLCA.js";
67
67
  import {
68
68
  KordocError,
69
69
  VERSION,
@@ -71,7 +71,7 @@ import {
71
71
  routeConsoleToStderr,
72
72
  sanitizeError,
73
73
  toArrayBuffer
74
- } from "./chunk-7ITWGPNB.js";
74
+ } from "./chunk-FZMGF6XU.js";
75
75
 
76
76
  // src/mcp.ts
77
77
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
@@ -358,7 +358,7 @@ ${markdown}`);
358
358
  break;
359
359
  case "pdf":
360
360
  try {
361
- const { extractPdfMetadataOnly } = await import("./parser-2RN5WNPJ.js");
361
+ const { extractPdfMetadataOnly } = await import("./parser-KFCY3NIN.js");
362
362
  metadata = await extractPdfMetadataOnly(buffer);
363
363
  } catch {
364
364
  metadata = void 0;
@@ -535,7 +535,7 @@ ${tableMarkdown}` }]
535
535
  if (!parsed.success) {
536
536
  return { content: [{ type: "text", text: `\uD30C\uC2F1 \uC2E4\uD328: ${parsed.error}` }], isError: true };
537
537
  }
538
- const { blocksToChunks } = await import("./chunks-BJRBKGKZ.js");
538
+ const { blocksToChunks } = await import("./chunks-MDMJRCJ7.js");
539
539
  const chunks = blocksToChunks(parsed.blocks, { granularity, includeTableCells: include_table_cells });
540
540
  return { content: [{ type: "text", text: capResponseText(JSON.stringify(chunks, null, 2)) }] };
541
541
  } catch (err) {
@@ -805,7 +805,7 @@ ${previewMd}` }]
805
805
  }
806
806
  const image = new Uint8Array(await readFile2(imgResolved));
807
807
  const ext = extname2(imgResolved).slice(1).toLowerCase();
808
- const { placeSealHwpx } = await import("./seal-YCK6TM5I.js");
808
+ const { placeSealHwpx } = await import("./seal-GA7NZDTG.js");
809
809
  const result = await placeSealHwpx(buffer, [{
810
810
  anchor,
811
811
  occurrence,
@@ -922,7 +922,7 @@ ${previewMd}` }]
922
922
  if (outPath && await isSameFile(outPath, resolved)) {
923
923
  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 };
924
924
  }
925
- const { redactDocument } = await import("./redact-doc-CJ6W6YNR.js");
925
+ const { redactDocument } = await import("./redact-doc-5SMPXIGG.js");
926
926
  const r = await redactDocument(buffer, { rules, maskChar: mask_char, filePath: file_path, dryRun: dry_run });
927
927
  const MAX_LINES = 50;
928
928
  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}`);
@@ -996,7 +996,7 @@ function registerRenderTools(server2) {
996
996
  const { buffer, resolved } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
997
997
  const isHwp5 = resolved.toLowerCase().endsWith(".hwp");
998
998
  if (!isHwp5 && !pages && (format === "png" || format === "svg")) {
999
- const { renderHwpxToSvg } = await import("./render-K5UDHXRI.js");
999
+ const { renderHwpxToSvg } = await import("./render-FGPG5A2N.js");
1000
1000
  const result = await renderHwpxToSvg(buffer, { highlights, reflow: true, reflowMode: reflow_mode });
1001
1001
  const summary2 = [
1002
1002
  `\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})`,
@@ -1008,7 +1008,7 @@ function registerRenderTools(server2) {
1008
1008
  summary2.push(`\uC800\uC7A5: ${outPath}`);
1009
1009
  return { content: [{ type: "text", text: summary2.join("\n") }] };
1010
1010
  }
1011
- const { rasterizeSvg } = await import("./rasterize-XBCDG4MD.js");
1011
+ const { rasterizeSvg } = await import("./rasterize-SFCG4YOI.js");
1012
1012
  const raster = await rasterizeSvg(result.svg, result.width, result.height, max_width_px ? { maxWidthPx: max_width_px } : void 0);
1013
1013
  if (outPath) {
1014
1014
  await mkdir2(dirname3(outPath), { recursive: true });
@@ -1023,7 +1023,7 @@ function registerRenderTools(server2) {
1023
1023
  ]
1024
1024
  };
1025
1025
  }
1026
- const { renderDocument } = await import("./render-K5UDHXRI.js");
1026
+ const { renderDocument } = await import("./render-FGPG5A2N.js");
1027
1027
  const { scene, assets } = await renderDocument(buffer, { format, pages, highlights, reflow: true, reflowMode: reflow_mode, maxWidthPx: max_width_px });
1028
1028
  const summary = [
1029
1029
  `\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})`,
@@ -1073,7 +1073,7 @@ function registerRenderTools(server2) {
1073
1073
  try {
1074
1074
  const { buffer } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
1075
1075
  const dir = safeOutputPath(join2(output_dir, "regions.json"), /* @__PURE__ */ new Set([".json"])).replace(/[\\/]regions\.json$/, "");
1076
- const { extractRenderedRegions } = await import("./render-K5UDHXRI.js");
1076
+ const { extractRenderedRegions } = await import("./render-FGPG5A2N.js");
1077
1077
  const regions = await extractRenderedRegions(buffer, { types: target, format, pages, paddingPt: padding_pt, reflow: true });
1078
1078
  await mkdir2(dir, { recursive: true });
1079
1079
  const ext = format === "jpeg" ? "jpg" : "png";
@@ -1109,7 +1109,7 @@ function registerRenderTools(server2) {
1109
1109
  }
1110
1110
  const { buffer } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
1111
1111
  const dir = output_dir ? safeOutputPath(join2(output_dir, "tables.json"), /* @__PURE__ */ new Set([".json"])).replace(/[\\/]tables\.json$/, "") : void 0;
1112
- const { extractTables } = await import("./visual-S5ZNFWFH.js");
1112
+ const { extractTables } = await import("./visual-YMG644YW.js");
1113
1113
  const tables = await extractTables(buffer, { policy: visual, format, paddingPt: padding_pt });
1114
1114
  if (dir) await mkdir2(dir, { recursive: true });
1115
1115
  const ext = format === "jpeg" ? "jpg" : "png";
@@ -1166,7 +1166,7 @@ function registerGenerateTools(server2) {
1166
1166
  try {
1167
1167
  const out = safeOutputPath(output_path, PROFILE_EXTENSIONS);
1168
1168
  const { buffer } = await readValidatedFile(hwpx_path);
1169
- const { hwpxToProfile } = await import("./-QHQ2QKM7.js");
1169
+ const { hwpxToProfile } = await import("./-ZYF6HX4M.js");
1170
1170
  const profile = await hwpxToProfile(buffer);
1171
1171
  await mkdir3(dirname4(out), { recursive: true });
1172
1172
  await writeOutputFile(out, JSON.stringify(profile, null, 2));
@@ -1278,7 +1278,7 @@ function registerGenerateTools(server2) {
1278
1278
  }
1279
1279
  let profile;
1280
1280
  if (profile_path) {
1281
- const { parseFormatProfileJson } = await import("./profile-io-UP7H2J6I.js");
1281
+ const { parseFormatProfileJson } = await import("./profile-io-OCITHUQF.js");
1282
1282
  profile = parseFormatProfileJson(await readFile3(safePath(profile_path, PROFILE_EXTENSIONS), "utf-8"));
1283
1283
  }
1284
1284
  const out = safeOutputPath(output_path, /* @__PURE__ */ new Set([".hwpx"]));
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ALL_OCR_MODELS
4
- } from "./chunk-WINHSKFD.js";
4
+ } from "./chunk-WGMYVRSA.js";
5
5
  import {
6
6
  ALL_FORMULA_MODELS,
7
7
  getModelStatusIn,
8
8
  getModelsDir
9
- } from "./chunk-TYYKK5DX.js";
10
- import "./chunk-42XYVZ2B.js";
11
- import "./chunk-7ITWGPNB.js";
9
+ } from "./chunk-3TCF5HPP.js";
10
+ import "./chunk-CY4QM2KQ.js";
11
+ import "./chunk-FZMGF6XU.js";
12
12
 
13
13
  // src/shared/model-bundle.ts
14
14
  import { copyFile, mkdir } from "fs/promises";
@@ -101,4 +101,4 @@ export {
101
101
  importModels,
102
102
  modelCacheStatus
103
103
  };
104
- //# sourceMappingURL=model-bundle-XP4AHFLT.js.map
104
+ //# sourceMappingURL=model-bundle-LAWQH75O.js.map
@@ -10,10 +10,10 @@ import {
10
10
  ocrModelPath,
11
11
  ocrModelsCached,
12
12
  parseCharacterDict
13
- } from "./chunk-WINHSKFD.js";
14
- import "./chunk-TYYKK5DX.js";
15
- import "./chunk-42XYVZ2B.js";
16
- import "./chunk-7ITWGPNB.js";
13
+ } from "./chunk-WGMYVRSA.js";
14
+ import "./chunk-3TCF5HPP.js";
15
+ import "./chunk-CY4QM2KQ.js";
16
+ import "./chunk-FZMGF6XU.js";
17
17
  export {
18
18
  ALL_OCR_MODELS,
19
19
  OCR_DET_MODEL,
@@ -26,4 +26,4 @@ export {
26
26
  ocrModelsCached,
27
27
  parseCharacterDict
28
28
  };
29
- //# sourceMappingURL=models-AD2KAUNC.js.map
29
+ //# sourceMappingURL=models-6QTD2CFM.js.map
@@ -1,23 +1,23 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  parseWorkerFile
4
- } from "./chunk-DBFAQJCX.js";
5
- import "./chunk-BLKAJD2G.js";
6
- import "./chunk-FU3SCGE7.js";
7
- import "./chunk-KBL24ZCP.js";
4
+ } from "./chunk-BC54LBST.js";
5
+ import "./chunk-YM3K3LCD.js";
6
+ import "./chunk-2ZGP7A5T.js";
7
+ import "./chunk-HWIW3WK2.js";
8
8
  import "./chunk-3WSNLH4B.js";
9
- import "./chunk-G6G25HUO.js";
10
- import "./chunk-N47I6OS7.js";
9
+ import "./chunk-7YAJCXCD.js";
10
+ import "./chunk-QHNVH4TC.js";
11
11
  import "./chunk-7FCNOKOR.js";
12
- import "./chunk-ZMGWKGSC.js";
12
+ import "./chunk-PTF4NCFM.js";
13
13
  import "./chunk-VQFA55IC.js";
14
- import "./chunk-PALYDA3M.js";
15
- import "./chunk-LO5A36FU.js";
16
- import "./chunk-LQSF4JSV.js";
14
+ import "./chunk-BG6LUCQL.js";
15
+ import "./chunk-RBRHO7WL.js";
16
+ import "./chunk-YHPJTLCA.js";
17
17
  import {
18
18
  VERSION,
19
19
  sanitizeError
20
- } from "./chunk-7ITWGPNB.js";
20
+ } from "./chunk-FZMGF6XU.js";
21
21
 
22
22
  // src/cli/parse-worker-v2.ts
23
23
  import { createHash } from "crypto";
@@ -299,4 +299,4 @@ export {
299
299
  runParseWorkerV2,
300
300
  toParseOptions
301
301
  };
302
- //# sourceMappingURL=parse-worker-v2-7UHOQ2TK.js.map
302
+ //# sourceMappingURL=parse-worker-v2-FEPJG3ER.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  blocksToPages,
3
3
  encodePng
4
- } from "./chunk-6HIDMA5O.js";
4
+ } from "./chunk-T3DTTK23.js";
5
5
  import {
6
6
  hasRequestedPagesAfter,
7
7
  parsePageRange
@@ -53,11 +53,13 @@ import {
53
53
  removeHeaderFooterBlocks,
54
54
  removeSideTabs,
55
55
  restoreImageBullets,
56
+ runningLinePatterns,
56
57
  splitPageBreakWraps,
57
58
  startsNewItem,
59
+ stripAbsorbedRunningLines,
58
60
  trimTrailingEmptyTableCols,
59
61
  wrapJoiner
60
- } from "./chunk-F5KWC7I3.js";
62
+ } from "./chunk-YQZOPT3A.js";
61
63
  import {
62
64
  CELL_BASELINES,
63
65
  CELL_EDGES,
@@ -70,12 +72,12 @@ import {
70
72
  escapeLiteralTags,
71
73
  stripScriptTags,
72
74
  unframeLayoutTables
73
- } from "./chunk-JDVOYDIA.js";
74
- import "./chunk-AINZICPE.js";
75
+ } from "./chunk-KTLHADU4.js";
76
+ import "./chunk-FBJVDBMO.js";
75
77
  import {
76
78
  KordocError,
77
79
  sanitizeHref
78
- } from "./chunk-F5PISJEI.js";
80
+ } from "./chunk-ZZIQWSGC.js";
79
81
 
80
82
  // src/pdf/image-extract.ts
81
83
  import { createHash } from "crypto";
@@ -3212,7 +3214,7 @@ function mergeLinkRuns(markdown) {
3212
3214
 
3213
3215
  // src/pdf/formula-ocr.ts
3214
3216
  async function applyFormulaOcr(buffer, blocks, pageFilter, effectivePageCount, warnings, _onProgress) {
3215
- const formulaMod = await import("./formula-XAPMN6HX.js");
3217
+ const formulaMod = await import("./formula-6XNIXZ5L.js");
3216
3218
  const { FormulaPipeline, ensureFormulaModels } = formulaMod;
3217
3219
  await ensureFormulaModels((p) => {
3218
3220
  if (p.phase === "download" && p.total) {
@@ -3635,7 +3637,7 @@ async function parsePdfDocument(buffer, options) {
3635
3637
  }
3636
3638
  if (targets.size > 0) {
3637
3639
  try {
3638
- const { runPdfOcr } = await import("./pdf-ocr-KHY3P4EP.js");
3640
+ const { runPdfOcr } = await import("./pdf-ocr-MME37BL4.js");
3639
3641
  const mode = typeof options?.ocr === "function" ? options.ocr : "builtin";
3640
3642
  const regionPages = new Map([...ocrRegions].filter(([p]) => options?.ocr !== "force" && !isImageBased && !pageQuality.find((q) => q.page === p)?.needsOcr));
3641
3643
  const ocrPageBlocks = await runPdfOcr(ocrBuffer, targets, mode, warnings, options?.onProgress, options?.tables !== false, vectorPageOps, regionPages);
@@ -3704,9 +3706,15 @@ async function parsePdfDocument(buffer, options) {
3704
3706
  }
3705
3707
  if (options?.removeHeaderFooter !== false && (parsedPageCount >= 3 || headerContext.length)) {
3706
3708
  const removed = removeHeaderFooterBlocks(blocks, pageHeights, warnings, noteMarks, false, headerContext);
3709
+ const running = runningLinePatterns(removed.map((ri) => blocks[ri]), pageHeights);
3707
3710
  for (let ri = removed.length - 1; ri >= 0; ri--) {
3708
3711
  blocks.splice(removed[ri], 1);
3709
3712
  }
3713
+ const stripped = stripAbsorbedRunningLines(blocks, pageHeights, running);
3714
+ if (stripped !== blocks) {
3715
+ blocks.length = 0;
3716
+ blocks.push(...stripped);
3717
+ }
3710
3718
  const kept = removeSideTabs(blocks, pageWidths);
3711
3719
  if (kept !== blocks) {
3712
3720
  blocks.length = 0;
@@ -3875,4 +3883,4 @@ export {
3875
3883
  parsePdfDocument,
3876
3884
  removeHeaderFooterBlocks
3877
3885
  };
3878
- //# sourceMappingURL=parser-5WGRQKPI.js.map
3886
+ //# sourceMappingURL=parser-56I364YM.js.map