kordoc 4.24.37 → 4.24.39

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 (193) hide show
  1. package/README.md +4 -4
  2. package/dist/{-HX3RWDQF.js → -7VE547IT.js} +60 -60
  3. package/dist/{chunk-4MWGWS3B.js → chunk-2XXTL4S4.js} +2 -2
  4. package/dist/{chunk-J26TNCL7.js → chunk-346W5O2J.js} +2 -2
  5. package/dist/{chunk-LM7LYH54.js → chunk-3MHRL3OO.js} +2 -2
  6. package/dist/{chunk-TQBNSAAS.js → chunk-4FWLCWNU.js} +2 -2
  7. package/dist/{chunk-6QK6ZQTF.js → chunk-7AYP2XO6.js} +3 -3
  8. package/dist/{chunk-YNIZLSM4.js → chunk-7BQWFZJO.js} +8 -8
  9. package/dist/{chunk-OTB6UOIB.js → chunk-7ZRUR4TZ.js} +2 -2
  10. package/dist/{chunk-IWCWO3GP.js → chunk-BWBR5GWQ.js} +2 -2
  11. package/dist/{chunk-P3SZJJRK.js → chunk-COH7WXBK.js} +7 -7
  12. package/dist/{chunk-524MGRNW.js → chunk-CS76UPUC.js} +125 -21
  13. package/dist/chunk-CS76UPUC.js.map +1 -0
  14. package/dist/{chunk-LWSMZJLR.js → chunk-F2JYJ2SP.js} +2 -2
  15. package/dist/{chunk-MTSWWXSB.js → chunk-FRMJTW3C.js} +2 -2
  16. package/dist/{chunk-JRVZBYQ2.js → chunk-FZMZUX7B.js} +130 -21
  17. package/dist/chunk-FZMZUX7B.js.map +1 -0
  18. package/dist/{chunk-J42O5KBX.js → chunk-GXED6LJX.js} +2 -2
  19. package/dist/{chunk-E527FG6I.cjs → chunk-IM5SIGUN.cjs} +3 -3
  20. package/dist/{chunk-E527FG6I.cjs.map → chunk-IM5SIGUN.cjs.map} +1 -1
  21. package/dist/{chunk-RR2FKPFN.js → chunk-IZWZ3RQC.js} +2 -2
  22. package/dist/{chunk-RR2FKPFN.js.map → chunk-IZWZ3RQC.js.map} +1 -1
  23. package/dist/{chunk-BT5RPLV4.js → chunk-L23XOAKF.js} +19 -19
  24. package/dist/{chunk-WZUTLJP2.cjs → chunk-LE3733C2.cjs} +212 -108
  25. package/dist/chunk-LE3733C2.cjs.map +1 -0
  26. package/dist/{chunk-2LDFUVVF.js → chunk-LOJYJISM.js} +16 -7
  27. package/dist/chunk-LOJYJISM.js.map +1 -0
  28. package/dist/{chunk-KGX4TLBX.cjs → chunk-LU7X6LLW.cjs} +3 -3
  29. package/dist/{chunk-KGX4TLBX.cjs.map → chunk-LU7X6LLW.cjs.map} +1 -1
  30. package/dist/{chunk-DRDW5ULI.js → chunk-M2ZRTYQ5.js} +14 -14
  31. package/dist/{chunk-QWYIYVIZ.cjs → chunk-MANE7HAZ.cjs} +2 -2
  32. package/dist/{chunk-QWYIYVIZ.cjs.map → chunk-MANE7HAZ.cjs.map} +1 -1
  33. package/dist/{chunk-XCMDIXWE.js → chunk-NL5OTD2E.js} +32 -32
  34. package/dist/{chunk-ONCXLQV4.js → chunk-NQJL3664.js} +3 -3
  35. package/dist/{chunk-KFJKRST5.js → chunk-PFHMNNW7.js} +126 -17
  36. package/dist/chunk-PFHMNNW7.js.map +1 -0
  37. package/dist/{chunk-OHLJEWS6.js → chunk-PHVAJBHM.js} +2 -2
  38. package/dist/{chunk-7GN7O3K2.js → chunk-PQIIYKNL.js} +51 -51
  39. package/dist/{chunk-T7K3CLXM.js → chunk-QDPYTJ4Y.js} +2 -2
  40. package/dist/{chunk-7MGZWDO4.js → chunk-QDQPAC4L.js} +2 -2
  41. package/dist/{chunk-7MGZWDO4.js.map → chunk-QDQPAC4L.js.map} +1 -1
  42. package/dist/{chunk-LG4SU2D4.cjs → chunk-RJNHXCMP.cjs} +69 -60
  43. package/dist/chunk-RJNHXCMP.cjs.map +1 -0
  44. package/dist/{chunk-33BKUIIC.js → chunk-RPAEXGWZ.js} +2 -2
  45. package/dist/{chunk-VRCXXZHT.js → chunk-SFLHCRO6.js} +2 -2
  46. package/dist/{chunk-GCFG67SF.js → chunk-U5OV6D66.js} +50 -50
  47. package/dist/{chunk-RBCDHT55.cjs → chunk-UKTRLJII.cjs} +98 -98
  48. package/dist/{chunk-RBCDHT55.cjs.map → chunk-UKTRLJII.cjs.map} +1 -1
  49. package/dist/{chunk-BYOAA442.js → chunk-V2RIY72D.js} +2 -2
  50. package/dist/{chunk-EJKCEP3Q.cjs → chunk-V3IMDOZE.cjs} +6 -6
  51. package/dist/{chunk-EJKCEP3Q.cjs.map → chunk-V3IMDOZE.cjs.map} +1 -1
  52. package/dist/{chunk-4OWD6WRS.js → chunk-WPIG3KUV.js} +121 -17
  53. package/dist/chunk-WPIG3KUV.js.map +1 -0
  54. package/dist/{chunk-6XOJ6CEK.js → chunk-WVER4OWF.js} +3 -3
  55. package/dist/{chunk-IOABX3GR.cjs → chunk-XYVTCXAG.cjs} +265 -156
  56. package/dist/chunk-XYVTCXAG.cjs.map +1 -0
  57. package/dist/{chunk-6SVVVZLV.js → chunk-Y5O4DS56.js} +2 -2
  58. package/dist/{chunk-UMQADPM5.js → chunk-YXKU6UJD.js} +2 -2
  59. package/dist/{chunk-B2VRTOQZ.js → chunk-ZDMLZRS4.js} +18 -9
  60. package/dist/chunk-ZDMLZRS4.js.map +1 -0
  61. package/dist/{chunk-64MVXWS5.js → chunk-ZVAX6E63.js} +2 -2
  62. package/dist/chunks-WTYZ4KG2.js +11 -0
  63. package/dist/cli.js +61 -60
  64. package/dist/cli.js.map +1 -1
  65. package/dist/{formula-DLZUYM6F.js → formula-MMLDES2Z.js} +20 -17
  66. package/dist/{formula-DLZUYM6F.js.map → formula-MMLDES2Z.js.map} +1 -1
  67. package/dist/{formula-2MQWKUKR.js → formula-PFSZZNPP.js} +19 -16
  68. package/dist/{formula-2MQWKUKR.js.map → formula-PFSZZNPP.js.map} +1 -1
  69. package/dist/{formula-T2YY77JT.cjs → formula-UI2UR74M.cjs} +25 -22
  70. package/dist/formula-UI2UR74M.cjs.map +1 -0
  71. package/dist/generator-C3SCP3ZG.js +10 -0
  72. package/dist/generator-CHBOCLYX.cjs +11 -0
  73. package/dist/{generator-YBWCA6B5.cjs.map → generator-CHBOCLYX.cjs.map} +1 -1
  74. package/dist/generator-RTSNDZJB.js +17 -0
  75. package/dist/hancom-3V3USCW5.js +84 -0
  76. package/dist/hancom-3V3USCW5.js.map +1 -0
  77. package/dist/hancom-GV5TTF5H.cjs +85 -0
  78. package/dist/hancom-GV5TTF5H.cjs.map +1 -0
  79. package/dist/hancom-XO52GNC3.js +85 -0
  80. package/dist/hancom-XO52GNC3.js.map +1 -0
  81. package/dist/image-ocr-2WKCFABH.cjs +211 -0
  82. package/dist/image-ocr-2WKCFABH.cjs.map +1 -0
  83. package/dist/{image-ocr-3NF3QJM7.js → image-ocr-R2ASFKHX.js} +99 -15
  84. package/dist/image-ocr-R2ASFKHX.js.map +1 -0
  85. package/dist/{image-ocr-XRKFK7AA.js → image-ocr-SU4RPHBF.js} +94 -10
  86. package/dist/image-ocr-SU4RPHBF.js.map +1 -0
  87. package/dist/index.cjs +1110 -1110
  88. package/dist/index.cjs.map +1 -1
  89. package/dist/index.d.cts +7 -1
  90. package/dist/index.d.ts +7 -1
  91. package/dist/index.js +70 -70
  92. package/dist/mcp.js +57 -56
  93. package/dist/mcp.js.map +1 -1
  94. package/dist/memo-U4RZJRU2.js +17 -0
  95. package/dist/{model-bundle-MO5I26AO.js → model-bundle-JMSH2F4A.js} +5 -5
  96. package/dist/{models-IIP4GZ57.js → models-D5SATVOZ.js} +5 -5
  97. package/dist/{parse-worker-v2-GWOL3TTO.js → parse-worker-v2-WIIZQFRX.js} +28 -28
  98. package/dist/{parser-UCLUVQPA.js → parser-KCY43TBS.js} +16 -16
  99. package/dist/{parser-R6UJQ6CV.cjs → parser-MFBTEGJA.cjs} +162 -162
  100. package/dist/{parser-R6UJQ6CV.cjs.map → parser-MFBTEGJA.cjs.map} +1 -1
  101. package/dist/{parser-DJQFM6VE.js → parser-SBJKV5GS.js} +16 -16
  102. package/dist/{pdf-ocr-EWXGN4JB.js → pdf-ocr-I6GNQEFS.js} +8 -6
  103. package/dist/pdf-ocr-L2O4SQUK.cjs +40 -0
  104. package/dist/pdf-ocr-L2O4SQUK.cjs.map +1 -0
  105. package/dist/{pdf-ocr-7PSNKQOI.js → pdf-ocr-UU5PSZ7Z.js} +12 -10
  106. package/dist/{profile-io-NUU3VKNW.js → profile-io-HZK4ZZ2O.js} +3 -3
  107. package/dist/{rasterize-RARCMBJ3.js → rasterize-VNP4ULXM.js} +3 -3
  108. package/dist/{redact-doc-JKGDXGNJ.js → redact-doc-SPHSBCPN.js} +37 -37
  109. package/dist/{render-SGLKO3PG.js → render-CKTTIDU2.js} +14 -14
  110. package/dist/{rewrite-fallback-7YZXSR5K.js → rewrite-fallback-H2KMJV6G.js} +21 -21
  111. package/dist/seal-MSY5G3UR.js +16 -0
  112. package/dist/{setup-5IYW4FZ7.js → setup-GJVOXJN7.js} +3 -3
  113. package/dist/{to-hwpx-QMANIAWY.js → to-hwpx-5UIBNW3D.js} +9 -9
  114. package/dist/to-hwpx-6BQNMA6P.cjs +16 -0
  115. package/dist/{to-hwpx-DEBHREDM.cjs.map → to-hwpx-6BQNMA6P.cjs.map} +1 -1
  116. package/dist/{to-hwpx-4PM6XV2L.js → to-hwpx-JJHDCYER.js} +4 -4
  117. package/dist/visual-Q6PIMKSA.js +37 -0
  118. package/dist/{watch-YZS76EOS.js → watch-YZZES36Q.js} +27 -27
  119. package/package.json +1 -1
  120. package/dist/chunk-2LDFUVVF.js.map +0 -1
  121. package/dist/chunk-4OWD6WRS.js.map +0 -1
  122. package/dist/chunk-524MGRNW.js.map +0 -1
  123. package/dist/chunk-B2VRTOQZ.js.map +0 -1
  124. package/dist/chunk-IOABX3GR.cjs.map +0 -1
  125. package/dist/chunk-JRVZBYQ2.js.map +0 -1
  126. package/dist/chunk-KFJKRST5.js.map +0 -1
  127. package/dist/chunk-LG4SU2D4.cjs.map +0 -1
  128. package/dist/chunk-WZUTLJP2.cjs.map +0 -1
  129. package/dist/chunks-NRA4GFK2.js +0 -11
  130. package/dist/formula-T2YY77JT.cjs.map +0 -1
  131. package/dist/generator-2WFWLJFG.js +0 -10
  132. package/dist/generator-5NWKWLOO.js +0 -17
  133. package/dist/generator-YBWCA6B5.cjs +0 -11
  134. package/dist/image-ocr-3NF3QJM7.js.map +0 -1
  135. package/dist/image-ocr-N7UKGSRY.cjs +0 -127
  136. package/dist/image-ocr-N7UKGSRY.cjs.map +0 -1
  137. package/dist/image-ocr-XRKFK7AA.js.map +0 -1
  138. package/dist/memo-XJ4NBV4J.js +0 -17
  139. package/dist/pdf-ocr-HECUBUMU.cjs +0 -38
  140. package/dist/pdf-ocr-HECUBUMU.cjs.map +0 -1
  141. package/dist/seal-LSS7WY6Z.js +0 -16
  142. package/dist/to-hwpx-DEBHREDM.cjs +0 -16
  143. package/dist/visual-QXYBJJ5D.js +0 -37
  144. /package/dist/{-HX3RWDQF.js.map → -7VE547IT.js.map} +0 -0
  145. /package/dist/{chunk-4MWGWS3B.js.map → chunk-2XXTL4S4.js.map} +0 -0
  146. /package/dist/{chunk-J26TNCL7.js.map → chunk-346W5O2J.js.map} +0 -0
  147. /package/dist/{chunk-LM7LYH54.js.map → chunk-3MHRL3OO.js.map} +0 -0
  148. /package/dist/{chunk-TQBNSAAS.js.map → chunk-4FWLCWNU.js.map} +0 -0
  149. /package/dist/{chunk-6QK6ZQTF.js.map → chunk-7AYP2XO6.js.map} +0 -0
  150. /package/dist/{chunk-YNIZLSM4.js.map → chunk-7BQWFZJO.js.map} +0 -0
  151. /package/dist/{chunk-OTB6UOIB.js.map → chunk-7ZRUR4TZ.js.map} +0 -0
  152. /package/dist/{chunk-IWCWO3GP.js.map → chunk-BWBR5GWQ.js.map} +0 -0
  153. /package/dist/{chunk-P3SZJJRK.js.map → chunk-COH7WXBK.js.map} +0 -0
  154. /package/dist/{chunk-LWSMZJLR.js.map → chunk-F2JYJ2SP.js.map} +0 -0
  155. /package/dist/{chunk-MTSWWXSB.js.map → chunk-FRMJTW3C.js.map} +0 -0
  156. /package/dist/{chunk-J42O5KBX.js.map → chunk-GXED6LJX.js.map} +0 -0
  157. /package/dist/{chunk-BT5RPLV4.js.map → chunk-L23XOAKF.js.map} +0 -0
  158. /package/dist/{chunk-DRDW5ULI.js.map → chunk-M2ZRTYQ5.js.map} +0 -0
  159. /package/dist/{chunk-XCMDIXWE.js.map → chunk-NL5OTD2E.js.map} +0 -0
  160. /package/dist/{chunk-ONCXLQV4.js.map → chunk-NQJL3664.js.map} +0 -0
  161. /package/dist/{chunk-OHLJEWS6.js.map → chunk-PHVAJBHM.js.map} +0 -0
  162. /package/dist/{chunk-7GN7O3K2.js.map → chunk-PQIIYKNL.js.map} +0 -0
  163. /package/dist/{chunk-T7K3CLXM.js.map → chunk-QDPYTJ4Y.js.map} +0 -0
  164. /package/dist/{chunk-33BKUIIC.js.map → chunk-RPAEXGWZ.js.map} +0 -0
  165. /package/dist/{chunk-VRCXXZHT.js.map → chunk-SFLHCRO6.js.map} +0 -0
  166. /package/dist/{chunk-GCFG67SF.js.map → chunk-U5OV6D66.js.map} +0 -0
  167. /package/dist/{chunk-BYOAA442.js.map → chunk-V2RIY72D.js.map} +0 -0
  168. /package/dist/{chunk-6XOJ6CEK.js.map → chunk-WVER4OWF.js.map} +0 -0
  169. /package/dist/{chunk-6SVVVZLV.js.map → chunk-Y5O4DS56.js.map} +0 -0
  170. /package/dist/{chunk-UMQADPM5.js.map → chunk-YXKU6UJD.js.map} +0 -0
  171. /package/dist/{chunk-64MVXWS5.js.map → chunk-ZVAX6E63.js.map} +0 -0
  172. /package/dist/{chunks-NRA4GFK2.js.map → chunks-WTYZ4KG2.js.map} +0 -0
  173. /package/dist/{generator-2WFWLJFG.js.map → generator-C3SCP3ZG.js.map} +0 -0
  174. /package/dist/{generator-5NWKWLOO.js.map → generator-RTSNDZJB.js.map} +0 -0
  175. /package/dist/{memo-XJ4NBV4J.js.map → memo-U4RZJRU2.js.map} +0 -0
  176. /package/dist/{model-bundle-MO5I26AO.js.map → model-bundle-JMSH2F4A.js.map} +0 -0
  177. /package/dist/{models-IIP4GZ57.js.map → models-D5SATVOZ.js.map} +0 -0
  178. /package/dist/{parse-worker-v2-GWOL3TTO.js.map → parse-worker-v2-WIIZQFRX.js.map} +0 -0
  179. /package/dist/{parser-UCLUVQPA.js.map → parser-KCY43TBS.js.map} +0 -0
  180. /package/dist/{parser-DJQFM6VE.js.map → parser-SBJKV5GS.js.map} +0 -0
  181. /package/dist/{pdf-ocr-7PSNKQOI.js.map → pdf-ocr-I6GNQEFS.js.map} +0 -0
  182. /package/dist/{pdf-ocr-EWXGN4JB.js.map → pdf-ocr-UU5PSZ7Z.js.map} +0 -0
  183. /package/dist/{profile-io-NUU3VKNW.js.map → profile-io-HZK4ZZ2O.js.map} +0 -0
  184. /package/dist/{rasterize-RARCMBJ3.js.map → rasterize-VNP4ULXM.js.map} +0 -0
  185. /package/dist/{redact-doc-JKGDXGNJ.js.map → redact-doc-SPHSBCPN.js.map} +0 -0
  186. /package/dist/{render-SGLKO3PG.js.map → render-CKTTIDU2.js.map} +0 -0
  187. /package/dist/{rewrite-fallback-7YZXSR5K.js.map → rewrite-fallback-H2KMJV6G.js.map} +0 -0
  188. /package/dist/{seal-LSS7WY6Z.js.map → seal-MSY5G3UR.js.map} +0 -0
  189. /package/dist/{setup-5IYW4FZ7.js.map → setup-GJVOXJN7.js.map} +0 -0
  190. /package/dist/{to-hwpx-4PM6XV2L.js.map → to-hwpx-5UIBNW3D.js.map} +0 -0
  191. /package/dist/{to-hwpx-QMANIAWY.js.map → to-hwpx-JJHDCYER.js.map} +0 -0
  192. /package/dist/{visual-QXYBJJ5D.js.map → visual-Q6PIMKSA.js.map} +0 -0
  193. /package/dist/{watch-YZS76EOS.js.map → watch-YZZES36Q.js.map} +0 -0
package/dist/index.d.cts CHANGED
@@ -262,7 +262,8 @@ interface ParseOptions {
262
262
  /** 원본 파일 경로 (DRM COM fallback에 필요, 내부 전용) */
263
263
  filePath?: string;
264
264
  /**
265
- * PDF 수식 OCR 활성화 (기본 false).
265
+ * PDF·이미지 수식 OCR 활성화 (기본 false). 이미지 입력은 같은 모델로 래스터의 수식 영역을 찾아 그 자리 OCR 글상자를
266
+ * `$...$` 로 바꾼다(수식 구조가 있고 덮은 글이 한글 위주가 아닌 영역만 — src/ocr/image-formula.ts).
266
267
  *
267
268
  * 활성화 시 각 PDF 페이지를 이미지로 렌더링 → YOLOv8 기반 수식 영역 검출 →
268
269
  * TrOCR 기반 LaTeX 인식. 감지된 수식은 `$...$` (inline) / `$$...$$` (display) 로
@@ -1660,12 +1661,17 @@ declare function markdownToHwpx(markdown: string, options?: MarkdownToHwpxOption
1660
1661
  interface HwpToHwpxOptions {
1661
1662
  /** 암호 문서의 열기 암호 */
1662
1663
  password?: string;
1664
+ /** 변환 엔진 (convertToHwpx 만 본다). "kordoc"(기본): 자체 변환 — 어디서나. "hancom": 한/글 자체 저장(Windows + 한/글, 팝업 없이) —
1665
+ * HWP 3.x·HWPML 도 서식 그대로. "auto": 한/글이 있으면 hancom, 없으면 kordoc */
1666
+ engine?: "kordoc" | "hancom" | "auto";
1663
1667
  }
1664
1668
  declare function hwpToHwpx(input: Uint8Array | ArrayBuffer, options?: HwpToHwpxOptions): Promise<Uint8Array>;
1665
1669
  interface ConvertToHwpxResult {
1666
1670
  data: Uint8Array;
1667
1671
  /** preserve: 서식 그대로(HWP 5.x), content: 글·표만 옮겨 kordoc 기본 서식으로(HWP 3.x 등) */
1668
1672
  mode: "preserve" | "content";
1673
+ /** 실제로 쓴 엔진 */
1674
+ engine: "kordoc" | "hancom";
1669
1675
  warnings: string[];
1670
1676
  }
1671
1677
  /**
package/dist/index.d.ts CHANGED
@@ -262,7 +262,8 @@ interface ParseOptions {
262
262
  /** 원본 파일 경로 (DRM COM fallback에 필요, 내부 전용) */
263
263
  filePath?: string;
264
264
  /**
265
- * PDF 수식 OCR 활성화 (기본 false).
265
+ * PDF·이미지 수식 OCR 활성화 (기본 false). 이미지 입력은 같은 모델로 래스터의 수식 영역을 찾아 그 자리 OCR 글상자를
266
+ * `$...$` 로 바꾼다(수식 구조가 있고 덮은 글이 한글 위주가 아닌 영역만 — src/ocr/image-formula.ts).
266
267
  *
267
268
  * 활성화 시 각 PDF 페이지를 이미지로 렌더링 → YOLOv8 기반 수식 영역 검출 →
268
269
  * TrOCR 기반 LaTeX 인식. 감지된 수식은 `$...$` (inline) / `$$...$$` (display) 로
@@ -1660,12 +1661,17 @@ declare function markdownToHwpx(markdown: string, options?: MarkdownToHwpxOption
1660
1661
  interface HwpToHwpxOptions {
1661
1662
  /** 암호 문서의 열기 암호 */
1662
1663
  password?: string;
1664
+ /** 변환 엔진 (convertToHwpx 만 본다). "kordoc"(기본): 자체 변환 — 어디서나. "hancom": 한/글 자체 저장(Windows + 한/글, 팝업 없이) —
1665
+ * HWP 3.x·HWPML 도 서식 그대로. "auto": 한/글이 있으면 hancom, 없으면 kordoc */
1666
+ engine?: "kordoc" | "hancom" | "auto";
1663
1667
  }
1664
1668
  declare function hwpToHwpx(input: Uint8Array | ArrayBuffer, options?: HwpToHwpxOptions): Promise<Uint8Array>;
1665
1669
  interface ConvertToHwpxResult {
1666
1670
  data: Uint8Array;
1667
1671
  /** preserve: 서식 그대로(HWP 5.x), content: 글·표만 옮겨 kordoc 기본 서식으로(HWP 3.x 등) */
1668
1672
  mode: "preserve" | "content";
1673
+ /** 실제로 쓴 엔진 */
1674
+ engine: "kordoc" | "hancom";
1669
1675
  warnings: string[];
1670
1676
  }
1671
1677
  /**
package/dist/index.js CHANGED
@@ -1,6 +1,65 @@
1
+ import {
2
+ FLAG_COMPRESSED,
3
+ FLAG_DISTRIBUTION,
4
+ FLAG_DRM,
5
+ FLAG_ENCRYPTED,
6
+ FLAG_TRACK_CHANGES,
7
+ INLINE_TABLE_MARK,
8
+ TAG_CHAR_SHAPE,
9
+ TAG_CTRL_HEADER,
10
+ TAG_DOC_CHAR_SHAPE,
11
+ TAG_DOC_PARA_SHAPE,
12
+ TAG_FACE_NAME,
13
+ TAG_ID_MAPPINGS,
14
+ TAG_LIST_HEADER,
15
+ TAG_PARA_HEADER,
16
+ TAG_PARA_LINE_SEG,
17
+ TAG_PARA_TEXT,
18
+ TAG_SHAPE_COMPONENT,
19
+ TAG_SHAPE_COMPONENT_PICTURE,
20
+ TAG_TABLE,
21
+ appendParaText,
22
+ blocksPlainText,
23
+ buildAddressedTable,
24
+ cellTextFromBlocks,
25
+ convertToHwpx,
26
+ createParaTextState,
27
+ decompressStream,
28
+ detectImageMime,
29
+ emitParagraphBlocks,
30
+ fileTimeText,
31
+ formatNumber,
32
+ hasRealStrike,
33
+ hasRealUnderline,
34
+ hwpEquationToLatex,
35
+ hwpToHwpx,
36
+ indexHwp5Tables,
37
+ isClickHereGuideText,
38
+ isExtendedOnlyCtrlChar,
39
+ locateMemoBlocks,
40
+ memosMarkdown,
41
+ openHwp5Container,
42
+ parseDocInfo,
43
+ parseFileHeader,
44
+ parseHwp5Document,
45
+ readHwp5BinData,
46
+ readHwp5DocInfoRecords,
47
+ readHwp5SectionRecords,
48
+ readHwp5SectionStreams,
49
+ readRecords,
50
+ resolveImageBlocks,
51
+ unfilledClickHereGuide
52
+ } from "./chunk-LOJYJISM.js";
1
53
  import {
2
54
  blocksToPages
3
- } from "./chunk-IWCWO3GP.js";
55
+ } from "./chunk-BWBR5GWQ.js";
56
+ import {
57
+ bmpToPng,
58
+ inlineImagesIntoMarkdown
59
+ } from "./chunk-U556XJW6.js";
60
+ import {
61
+ parsePageRange
62
+ } from "./chunk-V4BH5SRQ.js";
4
63
  import {
5
64
  detectFormat,
6
65
  detectOle2Format,
@@ -10,6 +69,9 @@ import {
10
69
  isPdfFile,
11
70
  isZipFile
12
71
  } from "./chunk-S6H3ZPYQ.js";
72
+ import {
73
+ parseLenientCfb
74
+ } from "./chunk-PDI54TF2.js";
13
75
  import {
14
76
  validateOcrOptions
15
77
  } from "./chunk-IFWGHRCQ.js";
@@ -167,69 +229,7 @@ import {
167
229
  unescapeGfm,
168
230
  unescapeGfmCell,
169
231
  wordHunks
170
- } from "./chunk-6QK6ZQTF.js";
171
- import {
172
- FLAG_COMPRESSED,
173
- FLAG_DISTRIBUTION,
174
- FLAG_DRM,
175
- FLAG_ENCRYPTED,
176
- FLAG_TRACK_CHANGES,
177
- INLINE_TABLE_MARK,
178
- TAG_CHAR_SHAPE,
179
- TAG_CTRL_HEADER,
180
- TAG_DOC_CHAR_SHAPE,
181
- TAG_DOC_PARA_SHAPE,
182
- TAG_FACE_NAME,
183
- TAG_ID_MAPPINGS,
184
- TAG_LIST_HEADER,
185
- TAG_PARA_HEADER,
186
- TAG_PARA_LINE_SEG,
187
- TAG_PARA_TEXT,
188
- TAG_SHAPE_COMPONENT,
189
- TAG_SHAPE_COMPONENT_PICTURE,
190
- TAG_TABLE,
191
- appendParaText,
192
- blocksPlainText,
193
- buildAddressedTable,
194
- cellTextFromBlocks,
195
- convertToHwpx,
196
- createParaTextState,
197
- decompressStream,
198
- detectImageMime,
199
- emitParagraphBlocks,
200
- fileTimeText,
201
- formatNumber,
202
- hasRealStrike,
203
- hasRealUnderline,
204
- hwpEquationToLatex,
205
- hwpToHwpx,
206
- indexHwp5Tables,
207
- isClickHereGuideText,
208
- isExtendedOnlyCtrlChar,
209
- locateMemoBlocks,
210
- memosMarkdown,
211
- openHwp5Container,
212
- parseDocInfo,
213
- parseFileHeader,
214
- parseHwp5Document,
215
- readHwp5BinData,
216
- readHwp5DocInfoRecords,
217
- readHwp5SectionRecords,
218
- readHwp5SectionStreams,
219
- readRecords,
220
- resolveImageBlocks,
221
- unfilledClickHereGuide
222
- } from "./chunk-2LDFUVVF.js";
223
- import {
224
- bmpToPng,
225
- inlineImagesIntoMarkdown
226
- } from "./chunk-U556XJW6.js";
227
- import {
228
- parsePageRange
229
- } from "./chunk-V4BH5SRQ.js";
230
- import {
231
- parseLenientCfb
232
- } from "./chunk-PDI54TF2.js";
232
+ } from "./chunk-7AYP2XO6.js";
233
233
  import "./chunk-LT4QALSF.js";
234
234
  import {
235
235
  MAX_COLS,
@@ -252,7 +252,7 @@ import {
252
252
  tidyScriptTags,
253
253
  unframeLayoutTables,
254
254
  wrapScript
255
- } from "./chunk-RR2FKPFN.js";
255
+ } from "./chunk-IZWZ3RQC.js";
256
256
  import {
257
257
  KordocError,
258
258
  OPTIONAL_DEP_INSTALL_HINT,
@@ -268,7 +268,7 @@ import {
268
268
  stripDtd,
269
269
  toArrayBuffer,
270
270
  unzipLimitBytes
271
- } from "./chunk-64MVXWS5.js";
271
+ } from "./chunk-ZVAX6E63.js";
272
272
 
273
273
  // src/plain-markdown.ts
274
274
  function toPlainMarkdown(md2) {
@@ -17785,7 +17785,7 @@ var MIN_SIDE = 24;
17785
17785
  async function ocrEmbeddedImages(blocks, options, warnings) {
17786
17786
  const ocr = options?.ocr;
17787
17787
  if (ocr !== true && ocr !== "force" && typeof ocr !== "function") return false;
17788
- const { parseImageDocument } = await import("./image-ocr-XRKFK7AA.js");
17788
+ const { parseImageDocument } = await import("./image-ocr-SU4RPHBF.js");
17789
17789
  let inserted = false, unreadable = 0;
17790
17790
  let failed = null;
17791
17791
  const walk = async (list, depth) => {
@@ -33826,7 +33826,7 @@ function scriptsOff(r, off) {
33826
33826
  }
33827
33827
  async function parseImage(buffer, options) {
33828
33828
  try {
33829
- const { parseImageDocument } = await import("./image-ocr-XRKFK7AA.js");
33829
+ const { parseImageDocument } = await import("./image-ocr-SU4RPHBF.js");
33830
33830
  const { blocks, warnings, lines } = await parseImageDocument(buffer, options);
33831
33831
  stripScriptTags({ blocks });
33832
33832
  return {
@@ -33892,7 +33892,7 @@ async function parseHwp(buffer, options) {
33892
33892
  async function parsePdf(buffer, options) {
33893
33893
  let parsePdfDocument;
33894
33894
  try {
33895
- const mod = await import("./parser-UCLUVQPA.js");
33895
+ const mod = await import("./parser-KCY43TBS.js");
33896
33896
  parsePdfDocument = mod.parsePdfDocument;
33897
33897
  } catch {
33898
33898
  return {
@@ -33968,7 +33968,7 @@ async function fillForm(input, values, outputFormat = "markdown") {
33968
33968
  throw new Error(`hwpx-preserve \uD3EC\uB9F7\uC740 HWPX\xB7HWP 5.x \uC785\uB825\uB9CC \uC9C0\uC6D0\uD569\uB2C8\uB2E4 (\uAC10\uC9C0\uB41C \uD3EC\uB9F7: ${zipFormat})`);
33969
33969
  }
33970
33970
  } else if (format2 === "hwp" && detectOle2Format(buffer) === "hwp") {
33971
- const { hwpToHwpx: hwpToHwpx2 } = await import("./to-hwpx-4PM6XV2L.js");
33971
+ const { hwpToHwpx: hwpToHwpx2 } = await import("./to-hwpx-JJHDCYER.js");
33972
33972
  const hwpx = await hwpToHwpx2(new Uint8Array(buffer));
33973
33973
  buffer = hwpx.buffer.slice(hwpx.byteOffset, hwpx.byteOffset + hwpx.byteLength);
33974
33974
  } else {
package/dist/mcp.js CHANGED
@@ -45,30 +45,45 @@ import {
45
45
  unknownFontWarnings,
46
46
  usesGaejosikMunche,
47
47
  usesLogicStructure
48
- } from "./chunk-GCFG67SF.js";
49
- import "./chunk-J26TNCL7.js";
48
+ } from "./chunk-U5OV6D66.js";
49
+ import "./chunk-NL5OTD2E.js";
50
+ import "./chunk-346W5O2J.js";
50
51
  import {
51
52
  extractHwpxMetadataOnly,
52
53
  patchHwp,
53
54
  patchHwpx
54
- } from "./chunk-7GN7O3K2.js";
55
- import "./chunk-YNIZLSM4.js";
56
- import "./chunk-P3SZJJRK.js";
57
- import "./chunk-VRCXXZHT.js";
55
+ } from "./chunk-PQIIYKNL.js";
56
+ import "./chunk-NQJL3664.js";
57
+ import {
58
+ AGENCY_COMMON_NAME,
59
+ PRESET_ALIAS,
60
+ agencyNames,
61
+ incompatibleGongmunWarnings,
62
+ markdownToHwpx
63
+ } from "./chunk-L23XOAKF.js";
64
+ import "./chunk-F2JYJ2SP.js";
65
+ import "./chunk-7BQWFZJO.js";
66
+ import "./chunk-COH7WXBK.js";
67
+ import "./chunk-QDPYTJ4Y.js";
68
+ import "./chunk-SFLHCRO6.js";
69
+ import {
70
+ extractFormFields,
71
+ fillWithUniqueGuard
72
+ } from "./chunk-3AHL6YEA.js";
73
+ import "./chunk-4FWLCWNU.js";
58
74
  import {
59
75
  hwpToHwpx
60
- } from "./chunk-B2VRTOQZ.js";
61
- import "./chunk-3WSNLH4B.js";
62
- import "./chunk-MTSWWXSB.js";
63
- import "./chunk-XCMDIXWE.js";
64
- import "./chunk-ONCXLQV4.js";
65
- import "./chunk-T7K3CLXM.js";
76
+ } from "./chunk-ZDMLZRS4.js";
66
77
  import {
67
78
  extractHwp5MetadataOnly
68
- } from "./chunk-DRDW5ULI.js";
79
+ } from "./chunk-M2ZRTYQ5.js";
69
80
  import "./chunk-VKVDMH7X.js";
70
- import "./chunk-LM7LYH54.js";
71
- import "./chunk-J42O5KBX.js";
81
+ import "./chunk-OFVHQ2TZ.js";
82
+ import "./chunk-3MHRL3OO.js";
83
+ import "./chunk-WFKFG2RT.js";
84
+ import "./chunk-3WSNLH4B.js";
85
+ import "./chunk-FRMJTW3C.js";
86
+ import "./chunk-GXED6LJX.js";
72
87
  import "./chunk-VQFA55IC.js";
73
88
  import {
74
89
  detectFormat,
@@ -77,31 +92,16 @@ import {
77
92
  } from "./chunk-GHHVT4Q5.js";
78
93
  import "./chunk-H7K5YHWQ.js";
79
94
  import "./chunk-JIMG76FW.js";
95
+ import "./chunk-QDQPAC4L.js";
96
+ import {
97
+ blocksToMarkdown
98
+ } from "./chunk-RPAEXGWZ.js";
99
+ import "./chunk-KFF47XZ7.js";
80
100
  import {
81
101
  assertWithinRoot,
82
102
  getAccessRoot,
83
103
  isOfflineMode
84
- } from "./chunk-OTB6UOIB.js";
85
- import {
86
- AGENCY_COMMON_NAME,
87
- PRESET_ALIAS,
88
- agencyNames,
89
- incompatibleGongmunWarnings,
90
- markdownToHwpx
91
- } from "./chunk-BT5RPLV4.js";
92
- import {
93
- extractFormFields,
94
- fillWithUniqueGuard
95
- } from "./chunk-3AHL6YEA.js";
96
- import "./chunk-LWSMZJLR.js";
97
- import "./chunk-TQBNSAAS.js";
98
- import "./chunk-OFVHQ2TZ.js";
99
- import "./chunk-WFKFG2RT.js";
100
- import "./chunk-7MGZWDO4.js";
101
- import {
102
- blocksToMarkdown
103
- } from "./chunk-33BKUIIC.js";
104
- import "./chunk-KFF47XZ7.js";
104
+ } from "./chunk-7ZRUR4TZ.js";
105
105
  import {
106
106
  KordocError,
107
107
  VERSION,
@@ -109,7 +109,7 @@ import {
109
109
  routeConsoleToStderr,
110
110
  sanitizeError,
111
111
  toArrayBuffer
112
- } from "./chunk-BYOAA442.js";
112
+ } from "./chunk-V2RIY72D.js";
113
113
 
114
114
  // src/mcp.ts
115
115
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
@@ -426,7 +426,7 @@ ${markdown}`);
426
426
  break;
427
427
  case "pdf":
428
428
  try {
429
- const { extractPdfMetadataOnly } = await import("./parser-DJQFM6VE.js");
429
+ const { extractPdfMetadataOnly } = await import("./parser-SBJKV5GS.js");
430
430
  metadata = await extractPdfMetadataOnly(buffer);
431
431
  } catch {
432
432
  metadata = void 0;
@@ -603,7 +603,7 @@ ${tableMarkdown}` }]
603
603
  if (!parsed.success) {
604
604
  return { content: [{ type: "text", text: `\uD30C\uC2F1 \uC2E4\uD328: ${parsed.error}` }], isError: true };
605
605
  }
606
- const { blocksToChunks } = await import("./chunks-NRA4GFK2.js");
606
+ const { blocksToChunks } = await import("./chunks-WTYZ4KG2.js");
607
607
  const chunks = blocksToChunks(parsed.blocks, { granularity, includeTableCells: include_table_cells });
608
608
  return { content: [{ type: "text", text: capResponseText(JSON.stringify(chunks, null, 2)) }] };
609
609
  } catch (err) {
@@ -883,7 +883,7 @@ ${previewMd}` }]
883
883
  }
884
884
  const image = new Uint8Array(await readFile2(imgResolved));
885
885
  const ext = extname2(imgResolved).slice(1).toLowerCase();
886
- const { placeSealHwpx } = await import("./seal-LSS7WY6Z.js");
886
+ const { placeSealHwpx } = await import("./seal-MSY5G3UR.js");
887
887
  const result = await placeSealHwpx(buffer, [{
888
888
  anchor,
889
889
  occurrence,
@@ -939,7 +939,7 @@ ${previewMd}` }]
939
939
  if (format !== "hwpx") {
940
940
  return { content: [{ type: "text", text: `add_memo \uB294 HWPX\xB7HWP 5.x \uD30C\uC77C\uB9CC \uC9C0\uC6D0\uD569\uB2C8\uB2E4 (\uAC10\uC9C0\uB41C \uD3EC\uB9F7: ${format}).` }], isError: true };
941
941
  }
942
- const { addMemoHwpx } = await import("./memo-XJ4NBV4J.js");
942
+ const { addMemoHwpx } = await import("./memo-U4RZJRU2.js");
943
943
  const result = await addMemoHwpx(buffer, [{ anchor, text, author, occurrence }]);
944
944
  await mkdir(dirname2(outPath), { recursive: true });
945
945
  await writeOutputFile(outPath, Buffer.from(result.buffer));
@@ -981,7 +981,7 @@ ${previewMd}` }]
981
981
  }
982
982
  const original = new Uint8Array(buffer);
983
983
  const result = isHwpx ? await patchHwpx(original, edited_markdown, structure === false ? { structure: false } : void 0) : await patchHwp(original, edited_markdown);
984
- const { needsRewrite, rewriteEdited, rewritePath } = await import("./rewrite-fallback-7YZXSR5K.js");
984
+ const { needsRewrite, rewriteEdited, rewritePath } = await import("./rewrite-fallback-H2KMJV6G.js");
985
985
  const rewrite = needsRewrite(result) ? await rewriteEdited(original, isHwpx, edited_markdown, result.success) : null;
986
986
  const rwOut = rewrite ? safeOutputPath(rewritePath(out), /* @__PURE__ */ new Set([".hwpx"])) : void 0;
987
987
  if (rewrite && rwOut) {
@@ -1050,7 +1050,7 @@ ${rewriteLine}` }] };
1050
1050
  if (outPath && await isSameFile(outPath, resolved)) {
1051
1051
  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 };
1052
1052
  }
1053
- const { redactDocument } = await import("./redact-doc-JKGDXGNJ.js");
1053
+ const { redactDocument } = await import("./redact-doc-SPHSBCPN.js");
1054
1054
  const r = await redactDocument(buffer, { rules, maskChar: mask_char, filePath: file_path, dryRun: dry_run });
1055
1055
  const MAX_LINES = 50;
1056
1056
  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}`);
@@ -1125,7 +1125,7 @@ function registerRenderTools(server2) {
1125
1125
  const { buffer, resolved } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
1126
1126
  const isHwp5 = resolved.toLowerCase().endsWith(".hwp");
1127
1127
  if (!isHwp5 && !pages && (format === "png" || format === "svg")) {
1128
- const { renderHwpxToSvg } = await import("./render-SGLKO3PG.js");
1128
+ const { renderHwpxToSvg } = await import("./render-CKTTIDU2.js");
1129
1129
  const result = await renderHwpxToSvg(buffer, { highlights, reflow: true, reflowMode: reflow_mode, password });
1130
1130
  const summary2 = [
1131
1131
  `\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})`,
@@ -1137,7 +1137,7 @@ function registerRenderTools(server2) {
1137
1137
  summary2.push(`\uC800\uC7A5: ${outPath}`);
1138
1138
  return { content: [{ type: "text", text: summary2.join("\n") }] };
1139
1139
  }
1140
- const { rasterizeSvg } = await import("./rasterize-RARCMBJ3.js");
1140
+ const { rasterizeSvg } = await import("./rasterize-VNP4ULXM.js");
1141
1141
  const raster = await rasterizeSvg(result.svg, result.width, result.height, max_width_px ? { maxWidthPx: max_width_px } : void 0);
1142
1142
  if (outPath) {
1143
1143
  await mkdir2(dirname3(outPath), { recursive: true });
@@ -1152,7 +1152,7 @@ function registerRenderTools(server2) {
1152
1152
  ]
1153
1153
  };
1154
1154
  }
1155
- const { renderDocument } = await import("./render-SGLKO3PG.js");
1155
+ const { renderDocument } = await import("./render-CKTTIDU2.js");
1156
1156
  const { scene, assets } = await renderDocument(buffer, { format, pages, highlights, reflow: true, reflowMode: reflow_mode, maxWidthPx: max_width_px, password });
1157
1157
  const summary = [
1158
1158
  `\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})`,
@@ -1202,7 +1202,7 @@ function registerRenderTools(server2) {
1202
1202
  try {
1203
1203
  const { buffer } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
1204
1204
  const dir = safeOutputPath(join2(output_dir, "regions.json"), /* @__PURE__ */ new Set([".json"])).replace(/[\\/]regions\.json$/, "");
1205
- const { extractRenderedRegions } = await import("./render-SGLKO3PG.js");
1205
+ const { extractRenderedRegions } = await import("./render-CKTTIDU2.js");
1206
1206
  const regions = await extractRenderedRegions(buffer, { types: target, format, pages, paddingPt: padding_pt, reflow: true });
1207
1207
  await mkdir2(dir, { recursive: true });
1208
1208
  const ext = format === "jpeg" ? "jpg" : "png";
@@ -1238,7 +1238,7 @@ function registerRenderTools(server2) {
1238
1238
  }
1239
1239
  const { buffer } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
1240
1240
  const dir = output_dir ? safeOutputPath(join2(output_dir, "tables.json"), /* @__PURE__ */ new Set([".json"])).replace(/[\\/]tables\.json$/, "") : void 0;
1241
- const { extractTables } = await import("./visual-QXYBJJ5D.js");
1241
+ const { extractTables } = await import("./visual-Q6PIMKSA.js");
1242
1242
  const tables = await extractTables(buffer, { policy: visual, format, paddingPt: padding_pt });
1243
1243
  if (dir) await mkdir2(dir, { recursive: true });
1244
1244
  const ext = format === "jpeg" ? "jpg" : "png";
@@ -1295,7 +1295,7 @@ function registerGenerateTools(server2) {
1295
1295
  try {
1296
1296
  const out = safeOutputPath(output_path, PROFILE_EXTENSIONS);
1297
1297
  const { buffer } = await readValidatedFile(hwpx_path);
1298
- const { hwpxToProfile } = await import("./-HX3RWDQF.js");
1298
+ const { hwpxToProfile } = await import("./-7VE547IT.js");
1299
1299
  const profile = await hwpxToProfile(buffer);
1300
1300
  await mkdir3(dirname4(out), { recursive: true });
1301
1301
  await writeOutputFile(out, JSON.stringify(profile, null, 2));
@@ -1448,7 +1448,7 @@ ${g.blocking.map((f) => `- ${formatGateFinding(f)}`).join("\n")}` }],
1448
1448
  }
1449
1449
  let profile;
1450
1450
  if (profile_path) {
1451
- const { parseFormatProfileJson } = await import("./profile-io-NUU3VKNW.js");
1451
+ const { parseFormatProfileJson } = await import("./profile-io-HZK4ZZ2O.js");
1452
1452
  profile = parseFormatProfileJson(await readFile3(safePath(profile_path, PROFILE_EXTENSIONS), "utf-8"));
1453
1453
  }
1454
1454
  const out = safeOutputPath(output_path, /* @__PURE__ */ new Set([".hwpx"]));
@@ -1599,7 +1599,7 @@ function registerLintTools(server2) {
1599
1599
  let irBlocks;
1600
1600
  if (file_path !== void 0) {
1601
1601
  const { buffer, resolved } = await readValidatedFile(file_path, MAX_FILE_SIZE, ALLOWED_EXTENSIONS);
1602
- const { parse: parse2 } = await import("./-HX3RWDQF.js");
1602
+ const { parse: parse2 } = await import("./-7VE547IT.js");
1603
1603
  const parsed = await parse2(buffer, { filePath: resolved });
1604
1604
  if (!parsed.success) throw new KordocError(`\uBB38\uC11C\uB97C \uC77D\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4 \u2014 ${parsed.error}`);
1605
1605
  body = parsed.markdown;
@@ -1647,9 +1647,10 @@ function registerConvertTools(server2) {
1647
1647
  {
1648
1648
  file_path: z6.string().min(1).describe("\uBCC0\uD658\uD560 HWP \uD30C\uC77C\uC758 \uC808\uB300 \uACBD\uB85C"),
1649
1649
  output_path: z6.string().min(1).optional().describe("\uC800\uC7A5\uD560 .hwpx \uACBD\uB85C (\uAE30\uBCF8: \uC785\uB825\uACFC \uAC19\uC740 \uD3F4\uB354\xB7\uAC19\uC740 \uC774\uB984\uC758 .hwpx \u2014 \uADF8 \uD30C\uC77C\uC774 \uC774\uBBF8 \uC788\uC73C\uBA74 \uB36E\uC5B4\uC4F0\uC9C0 \uC54A\uACE0 \uC2E4\uD328\uD558\uB2C8 \uADF8\uB54C\uB294 \uACBD\uB85C\uB97C \uC9C0\uC815)"),
1650
- password: z6.string().optional().describe("\uC554\uD638\uB85C \uBCF4\uD638\uB41C HWP \uC758 \uC5F4\uAE30 \uC554\uD638")
1650
+ password: z6.string().optional().describe("\uC554\uD638\uB85C \uBCF4\uD638\uB41C HWP \uC758 \uC5F4\uAE30 \uC554\uD638"),
1651
+ engine: z6.enum(["kordoc", "hancom", "auto"]).optional().describe('\uBCC0\uD658 \uC5D4\uC9C4 \u2014 "kordoc"(\uAE30\uBCF8, \uC5B4\uB514\uC11C\uB098) | "hancom"(Windows \uD55C/\uAE00 \uC790\uCCB4 \uC800\uC7A5, \uD31D\uC5C5 \uC5C6\uC774 \u2014 HWP 3.x \uB3C4 \uC11C\uC2DD \uADF8\uB300\uB85C) | "auto"(\uD55C/\uAE00\uC774 \uC788\uC73C\uBA74 hancom)')
1651
1652
  },
1652
- async ({ file_path, output_path, password }) => {
1653
+ async ({ file_path, output_path, password, engine }) => {
1653
1654
  try {
1654
1655
  const { buffer, resolved } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwp", ".hml"]));
1655
1656
  const outPath = safeOutputPath(output_path ?? resolved.replace(/\.(hwp|hml)$/i, "") + ".hwpx", /* @__PURE__ */ new Set([".hwpx"]));
@@ -1657,13 +1658,13 @@ function registerConvertTools(server2) {
1657
1658
  if (!output_path && await access(outPath).then(() => true, () => false)) {
1658
1659
  throw new KordocError(`${outPath} \uC774(\uAC00) \uC774\uBBF8 \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uB36E\uC5B4\uC4F0\uB824\uBA74 output_path \uB85C \uACBD\uB85C\uB97C \uC9C1\uC811 \uC9C0\uC815\uD558\uC138\uC694`);
1659
1660
  }
1660
- const { convertToHwpx, validateHwpx } = await import("./-HX3RWDQF.js");
1661
- const result = await convertToHwpx(buffer, { password });
1661
+ const { convertToHwpx, validateHwpx } = await import("./-7VE547IT.js");
1662
+ const result = await convertToHwpx(buffer, { password, engine });
1662
1663
  const check = await validateHwpx(result.data);
1663
1664
  await mkdir4(dirname5(outPath), { recursive: true });
1664
1665
  await writeOutputFile(outPath, result.data);
1665
1666
  const lines = [
1666
- `${result.mode === "preserve" ? "\uC11C\uC2DD \uADF8\uB300\uB85C" : "\uAE00\xB7\uD45C\uB9CC"} HWPX \uB85C \uBCC0\uD658\uD588\uC2B5\uB2C8\uB2E4: ${outPath} (${result.data.length.toLocaleString()} \uBC14\uC774\uD2B8)`,
1667
+ `${result.mode === "preserve" ? "\uC11C\uC2DD \uADF8\uB300\uB85C" : "\uAE00\xB7\uD45C\uB9CC"} HWPX \uB85C \uBCC0\uD658\uD588\uC2B5\uB2C8\uB2E4${result.engine === "hancom" ? "(\uD55C/\uAE00 \uC800\uC7A5)" : ""}: ${outPath} (${result.data.length.toLocaleString()} \uBC14\uC774\uD2B8)`,
1667
1668
  ...result.warnings.map((w) => `\u26A0\uFE0F ${w}`),
1668
1669
  ...check.ok ? [] : check.issues.map((i) => `\u2717 \uAD6C\uC870 \uBB38\uC81C ${i.path ? `${i.path}: ` : ""}${i.message}`)
1669
1670
  ];