kordoc 4.24.75 → 4.24.76

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 (182) hide show
  1. package/README.md +2 -2
  2. package/dist/{-IA5KLKYE.js → -2LCJEMU4.js} +22 -22
  3. package/dist/{chunk-7JMND4DW.cjs → chunk-2P3SFHOF.cjs} +88 -88
  4. package/dist/{chunk-7JMND4DW.cjs.map → chunk-2P3SFHOF.cjs.map} +1 -1
  5. package/dist/{chunk-UXWF3PM7.js → chunk-2P5GYSEI.js} +2 -2
  6. package/dist/{chunk-RYYDGS4R.js → chunk-2ZQUSUDC.js} +5 -5
  7. package/dist/{chunk-UNIYOWUQ.js → chunk-3X3ETOLW.js} +7 -7
  8. package/dist/{chunk-XNHDKTTV.cjs → chunk-43VUUMKV.cjs} +6 -6
  9. package/dist/{chunk-XNHDKTTV.cjs.map → chunk-43VUUMKV.cjs.map} +1 -1
  10. package/dist/{chunk-BX6TAXOM.js → chunk-45AT4XJD.js} +2 -2
  11. package/dist/{chunk-JQ6N26LA.js → chunk-4L3SF7EF.js} +2 -2
  12. package/dist/{chunk-RJBQXQAM.js → chunk-4RB5OPUZ.js} +2 -2
  13. package/dist/{chunk-HY3LV5HN.cjs → chunk-A7QRUXCJ.cjs} +3 -3
  14. package/dist/{chunk-HY3LV5HN.cjs.map → chunk-A7QRUXCJ.cjs.map} +1 -1
  15. package/dist/{chunk-V5XT2PRB.js → chunk-BUZLNJXB.js} +2 -2
  16. package/dist/{chunk-SODVNDR5.js → chunk-CWEB4XAH.js} +5 -5
  17. package/dist/{chunk-6F54BTUN.cjs → chunk-DIUYXWT2.cjs} +3 -3
  18. package/dist/{chunk-6F54BTUN.cjs.map → chunk-DIUYXWT2.cjs.map} +1 -1
  19. package/dist/{chunk-SEO3FQLR.cjs → chunk-DKRKNL2X.cjs} +58 -58
  20. package/dist/{chunk-SEO3FQLR.cjs.map → chunk-DKRKNL2X.cjs.map} +1 -1
  21. package/dist/{chunk-M33WZZPM.js → chunk-DTKVCSRC.js} +2 -2
  22. package/dist/{chunk-IITWVZF5.js → chunk-E2RQPNXX.js} +2 -2
  23. package/dist/{chunk-QQTMRZUG.cjs → chunk-HHRQX733.cjs} +203 -162
  24. package/dist/chunk-HHRQX733.cjs.map +1 -0
  25. package/dist/{chunk-RGSVM7RL.js → chunk-HQXVNLH2.js} +6 -6
  26. package/dist/{chunk-7USEKDFP.js → chunk-IRCO55NY.js} +2 -2
  27. package/dist/{chunk-TSACZSXD.js → chunk-J6RLB6KE.js} +2 -2
  28. package/dist/{chunk-WQQVAAPX.js → chunk-JT54JHR3.js} +2 -2
  29. package/dist/{chunk-GBOVNTH6.js → chunk-JYNG27VR.js} +54 -13
  30. package/dist/chunk-JYNG27VR.js.map +1 -0
  31. package/dist/{chunk-H7OEE7UV.js → chunk-LFXIZHPE.js} +16 -16
  32. package/dist/{chunk-N564V2TH.js → chunk-MHDVZBUV.js} +2 -2
  33. package/dist/{chunk-XV6A6WHZ.js → chunk-MQ44UJN6.js} +55 -14
  34. package/dist/chunk-MQ44UJN6.js.map +1 -0
  35. package/dist/{chunk-NNTUIJLC.js → chunk-MRHLGVK5.js} +2 -2
  36. package/dist/{chunk-SOW4ES4Y.js → chunk-ODJRLTXE.js} +2 -2
  37. package/dist/{chunk-DZPF2PWU.js → chunk-ODQJEBCB.js} +2 -2
  38. package/dist/{chunk-XJID65VS.js → chunk-PATC34WZ.js} +10 -10
  39. package/dist/{chunk-2RTRPVUB.js → chunk-PE3XRCTM.js} +4 -4
  40. package/dist/{chunk-XJNRTANY.js → chunk-PJ32UFPA.js} +2 -2
  41. package/dist/{chunk-QKOORIR2.cjs → chunk-QCH63KBP.cjs} +104 -104
  42. package/dist/{chunk-QKOORIR2.cjs.map → chunk-QCH63KBP.cjs.map} +1 -1
  43. package/dist/{chunk-SDQZSUFR.js → chunk-QDETIVPA.js} +6 -6
  44. package/dist/{chunk-NI3YCMGC.cjs → chunk-QIVOVMEC.cjs} +2 -2
  45. package/dist/{chunk-NI3YCMGC.cjs.map → chunk-QIVOVMEC.cjs.map} +1 -1
  46. package/dist/{chunk-YIW4AEC6.js → chunk-RNBBMRKF.js} +2 -2
  47. package/dist/{chunk-CXQXLQVT.js → chunk-RZXJFM3A.js} +2 -2
  48. package/dist/{chunk-ZOXPQZ4D.js → chunk-SABDVSQU.js} +11 -11
  49. package/dist/{chunk-S3RWTPEO.js → chunk-SQ7BI34M.js} +3 -3
  50. package/dist/{chunk-BIHQG2N7.js → chunk-T7YHAP4A.js} +3 -3
  51. package/dist/{chunk-SJG57YQQ.js → chunk-TGM5V7UD.js} +2 -2
  52. package/dist/{chunk-OQAE5NDF.js → chunk-U7EJ6QY7.js} +3 -3
  53. package/dist/{chunk-FZMAFLAY.js → chunk-V3MVGLWO.js} +5 -5
  54. package/dist/{chunk-CJYGYR2V.js → chunk-WTKISVEW.js} +2 -2
  55. package/dist/{chunk-MG2DFKP7.js → chunk-XIUXBJHE.js} +2 -2
  56. package/dist/{chunk-TOBOXNSE.cjs → chunk-XM4VBVYH.cjs} +8 -8
  57. package/dist/{chunk-TOBOXNSE.cjs.map → chunk-XM4VBVYH.cjs.map} +1 -1
  58. package/dist/{chunk-IPR3I6YO.js → chunk-XOC5PVAC.js} +2 -2
  59. package/dist/{chunk-FV57PXPQ.js → chunk-ZWA3MWAE.js} +3 -3
  60. package/dist/chunks-INR44FWQ.js +11 -0
  61. package/dist/cli.js +46 -46
  62. package/dist/{formula-XSFAUBCL.js → formula-3RUSZL2X.js} +4 -4
  63. package/dist/{formula-VPH2VTGN.cjs → formula-PNWIA2MN.cjs} +9 -9
  64. package/dist/{formula-VPH2VTGN.cjs.map → formula-PNWIA2MN.cjs.map} +1 -1
  65. package/dist/{formula-PMHBDDCI.js → formula-UJKRUT4H.js} +3 -3
  66. package/dist/generator-335G75L5.js +11 -0
  67. package/dist/generator-3S2MTXHO.cjs +12 -0
  68. package/dist/{generator-GFSOVACB.cjs.map → generator-3S2MTXHO.cjs.map} +1 -1
  69. package/dist/generator-R2CZZ2KU.js +18 -0
  70. package/dist/{hancom-UZAYAZLU.cjs → hancom-35Z4YAJB.cjs} +5 -5
  71. package/dist/{hancom-UZAYAZLU.cjs.map → hancom-35Z4YAJB.cjs.map} +1 -1
  72. package/dist/{hancom-Q2VC3YBY.js → hancom-4LFQU2RS.js} +2 -2
  73. package/dist/{hancom-MOQ5X7BT.js → hancom-VLS77NRS.js} +2 -2
  74. package/dist/{image-ocr-4RGMDWKZ.cjs → image-ocr-AGEB22EF.cjs} +36 -36
  75. package/dist/{image-ocr-4RGMDWKZ.cjs.map → image-ocr-AGEB22EF.cjs.map} +1 -1
  76. package/dist/{image-ocr-2Q2ZJYAJ.js → image-ocr-B7RRK43I.js} +8 -8
  77. package/dist/{image-ocr-KVV5JKY6.js → image-ocr-CCLUXSWY.js} +11 -11
  78. package/dist/index.cjs +1113 -1113
  79. package/dist/index.js +10 -10
  80. package/dist/mcp.js +37 -37
  81. package/dist/memo-SPNLGMIZ.js +17 -0
  82. package/dist/{model-bundle-SKRKICE4.js → model-bundle-KFPWVEFB.js} +5 -5
  83. package/dist/{models-QRQ4SU52.js → models-IOX5WK67.js} +5 -5
  84. package/dist/{parse-worker-v2-4BSQYNJ4.js → parse-worker-v2-IL6U65X3.js} +23 -23
  85. package/dist/{parser-B6YSYZTH.js → parser-ANWES7Z3.js} +12 -12
  86. package/dist/{parser-LVDXYJ2F.js → parser-ATU5CQZY.js} +9 -9
  87. package/dist/{parser-N5CJ252P.cjs → parser-NCSJG5KJ.cjs} +164 -164
  88. package/dist/{parser-N5CJ252P.cjs.map → parser-NCSJG5KJ.cjs.map} +1 -1
  89. package/dist/{pdf-ocr-5X2ZFG5O.js → pdf-ocr-7IH7FGKQ.js} +9 -9
  90. package/dist/pdf-ocr-F3ABLLXD.cjs +43 -0
  91. package/dist/{pdf-ocr-ZEP6O2UV.cjs.map → pdf-ocr-F3ABLLXD.cjs.map} +1 -1
  92. package/dist/{pdf-ocr-BJFC7NL3.js → pdf-ocr-ZUGHKM32.js} +6 -6
  93. package/dist/{profile-io-C55VLUZW.js → profile-io-BGUQJDGK.js} +3 -3
  94. package/dist/{rasterize-LCD3Q43I.js → rasterize-JOAG2QCQ.js} +3 -3
  95. package/dist/{redact-doc-BKNJOYE3.js → redact-doc-WL2GWBMN.js} +22 -22
  96. package/dist/{render-TWO5VQNJ.js → render-672D354C.js} +12 -12
  97. package/dist/{rewrite-fallback-AH3RNFIL.js → rewrite-fallback-2JAAIU6G.js} +13 -13
  98. package/dist/seal-XLDIGIIE.js +16 -0
  99. package/dist/{setup-VPGX6IJS.js → setup-L4PVFG65.js} +3 -3
  100. package/dist/{to-hwpx-JUWORW4M.js → to-hwpx-FR6GDNMY.js} +7 -7
  101. package/dist/{to-hwpx-TZFO5KL2.js → to-hwpx-OHZK2KBP.js} +4 -4
  102. package/dist/to-hwpx-VBVI5H4N.cjs +16 -0
  103. package/dist/{to-hwpx-LJQWVGOZ.cjs.map → to-hwpx-VBVI5H4N.cjs.map} +1 -1
  104. package/dist/visual-IXMRTYJK.js +40 -0
  105. package/dist/{watch-3J3O5GZN.js → watch-OH4BMY2N.js} +23 -23
  106. package/package.json +1 -1
  107. package/dist/chunk-GBOVNTH6.js.map +0 -1
  108. package/dist/chunk-QQTMRZUG.cjs.map +0 -1
  109. package/dist/chunk-XV6A6WHZ.js.map +0 -1
  110. package/dist/chunks-SC2MGE4B.js +0 -11
  111. package/dist/generator-4P5RXII7.js +0 -18
  112. package/dist/generator-GFSOVACB.cjs +0 -12
  113. package/dist/generator-NABTD6TU.js +0 -11
  114. package/dist/memo-K65K6E5J.js +0 -17
  115. package/dist/pdf-ocr-ZEP6O2UV.cjs +0 -43
  116. package/dist/seal-OCTCBT5O.js +0 -16
  117. package/dist/to-hwpx-LJQWVGOZ.cjs +0 -16
  118. package/dist/visual-SDJQ6EGR.js +0 -40
  119. /package/dist/{-IA5KLKYE.js.map → -2LCJEMU4.js.map} +0 -0
  120. /package/dist/{chunk-UXWF3PM7.js.map → chunk-2P5GYSEI.js.map} +0 -0
  121. /package/dist/{chunk-RYYDGS4R.js.map → chunk-2ZQUSUDC.js.map} +0 -0
  122. /package/dist/{chunk-UNIYOWUQ.js.map → chunk-3X3ETOLW.js.map} +0 -0
  123. /package/dist/{chunk-BX6TAXOM.js.map → chunk-45AT4XJD.js.map} +0 -0
  124. /package/dist/{chunk-JQ6N26LA.js.map → chunk-4L3SF7EF.js.map} +0 -0
  125. /package/dist/{chunk-RJBQXQAM.js.map → chunk-4RB5OPUZ.js.map} +0 -0
  126. /package/dist/{chunk-V5XT2PRB.js.map → chunk-BUZLNJXB.js.map} +0 -0
  127. /package/dist/{chunk-SODVNDR5.js.map → chunk-CWEB4XAH.js.map} +0 -0
  128. /package/dist/{chunk-M33WZZPM.js.map → chunk-DTKVCSRC.js.map} +0 -0
  129. /package/dist/{chunk-IITWVZF5.js.map → chunk-E2RQPNXX.js.map} +0 -0
  130. /package/dist/{chunk-RGSVM7RL.js.map → chunk-HQXVNLH2.js.map} +0 -0
  131. /package/dist/{chunk-7USEKDFP.js.map → chunk-IRCO55NY.js.map} +0 -0
  132. /package/dist/{chunk-TSACZSXD.js.map → chunk-J6RLB6KE.js.map} +0 -0
  133. /package/dist/{chunk-WQQVAAPX.js.map → chunk-JT54JHR3.js.map} +0 -0
  134. /package/dist/{chunk-H7OEE7UV.js.map → chunk-LFXIZHPE.js.map} +0 -0
  135. /package/dist/{chunk-N564V2TH.js.map → chunk-MHDVZBUV.js.map} +0 -0
  136. /package/dist/{chunk-NNTUIJLC.js.map → chunk-MRHLGVK5.js.map} +0 -0
  137. /package/dist/{chunk-SOW4ES4Y.js.map → chunk-ODJRLTXE.js.map} +0 -0
  138. /package/dist/{chunk-DZPF2PWU.js.map → chunk-ODQJEBCB.js.map} +0 -0
  139. /package/dist/{chunk-XJID65VS.js.map → chunk-PATC34WZ.js.map} +0 -0
  140. /package/dist/{chunk-2RTRPVUB.js.map → chunk-PE3XRCTM.js.map} +0 -0
  141. /package/dist/{chunk-XJNRTANY.js.map → chunk-PJ32UFPA.js.map} +0 -0
  142. /package/dist/{chunk-SDQZSUFR.js.map → chunk-QDETIVPA.js.map} +0 -0
  143. /package/dist/{chunk-YIW4AEC6.js.map → chunk-RNBBMRKF.js.map} +0 -0
  144. /package/dist/{chunk-CXQXLQVT.js.map → chunk-RZXJFM3A.js.map} +0 -0
  145. /package/dist/{chunk-ZOXPQZ4D.js.map → chunk-SABDVSQU.js.map} +0 -0
  146. /package/dist/{chunk-S3RWTPEO.js.map → chunk-SQ7BI34M.js.map} +0 -0
  147. /package/dist/{chunk-BIHQG2N7.js.map → chunk-T7YHAP4A.js.map} +0 -0
  148. /package/dist/{chunk-SJG57YQQ.js.map → chunk-TGM5V7UD.js.map} +0 -0
  149. /package/dist/{chunk-OQAE5NDF.js.map → chunk-U7EJ6QY7.js.map} +0 -0
  150. /package/dist/{chunk-FZMAFLAY.js.map → chunk-V3MVGLWO.js.map} +0 -0
  151. /package/dist/{chunk-CJYGYR2V.js.map → chunk-WTKISVEW.js.map} +0 -0
  152. /package/dist/{chunk-MG2DFKP7.js.map → chunk-XIUXBJHE.js.map} +0 -0
  153. /package/dist/{chunk-IPR3I6YO.js.map → chunk-XOC5PVAC.js.map} +0 -0
  154. /package/dist/{chunk-FV57PXPQ.js.map → chunk-ZWA3MWAE.js.map} +0 -0
  155. /package/dist/{chunks-SC2MGE4B.js.map → chunks-INR44FWQ.js.map} +0 -0
  156. /package/dist/{formula-XSFAUBCL.js.map → formula-3RUSZL2X.js.map} +0 -0
  157. /package/dist/{formula-PMHBDDCI.js.map → formula-UJKRUT4H.js.map} +0 -0
  158. /package/dist/{generator-4P5RXII7.js.map → generator-335G75L5.js.map} +0 -0
  159. /package/dist/{generator-NABTD6TU.js.map → generator-R2CZZ2KU.js.map} +0 -0
  160. /package/dist/{hancom-Q2VC3YBY.js.map → hancom-4LFQU2RS.js.map} +0 -0
  161. /package/dist/{hancom-MOQ5X7BT.js.map → hancom-VLS77NRS.js.map} +0 -0
  162. /package/dist/{image-ocr-2Q2ZJYAJ.js.map → image-ocr-B7RRK43I.js.map} +0 -0
  163. /package/dist/{image-ocr-KVV5JKY6.js.map → image-ocr-CCLUXSWY.js.map} +0 -0
  164. /package/dist/{memo-K65K6E5J.js.map → memo-SPNLGMIZ.js.map} +0 -0
  165. /package/dist/{model-bundle-SKRKICE4.js.map → model-bundle-KFPWVEFB.js.map} +0 -0
  166. /package/dist/{models-QRQ4SU52.js.map → models-IOX5WK67.js.map} +0 -0
  167. /package/dist/{parse-worker-v2-4BSQYNJ4.js.map → parse-worker-v2-IL6U65X3.js.map} +0 -0
  168. /package/dist/{parser-B6YSYZTH.js.map → parser-ANWES7Z3.js.map} +0 -0
  169. /package/dist/{parser-LVDXYJ2F.js.map → parser-ATU5CQZY.js.map} +0 -0
  170. /package/dist/{pdf-ocr-5X2ZFG5O.js.map → pdf-ocr-7IH7FGKQ.js.map} +0 -0
  171. /package/dist/{pdf-ocr-BJFC7NL3.js.map → pdf-ocr-ZUGHKM32.js.map} +0 -0
  172. /package/dist/{profile-io-C55VLUZW.js.map → profile-io-BGUQJDGK.js.map} +0 -0
  173. /package/dist/{rasterize-LCD3Q43I.js.map → rasterize-JOAG2QCQ.js.map} +0 -0
  174. /package/dist/{redact-doc-BKNJOYE3.js.map → redact-doc-WL2GWBMN.js.map} +0 -0
  175. /package/dist/{render-TWO5VQNJ.js.map → render-672D354C.js.map} +0 -0
  176. /package/dist/{rewrite-fallback-AH3RNFIL.js.map → rewrite-fallback-2JAAIU6G.js.map} +0 -0
  177. /package/dist/{seal-OCTCBT5O.js.map → seal-XLDIGIIE.js.map} +0 -0
  178. /package/dist/{setup-VPGX6IJS.js.map → setup-L4PVFG65.js.map} +0 -0
  179. /package/dist/{to-hwpx-JUWORW4M.js.map → to-hwpx-FR6GDNMY.js.map} +0 -0
  180. /package/dist/{to-hwpx-TZFO5KL2.js.map → to-hwpx-OHZK2KBP.js.map} +0 -0
  181. /package/dist/{visual-SDJQ6EGR.js.map → visual-IXMRTYJK.js.map} +0 -0
  182. /package/dist/{watch-3J3O5GZN.js.map → watch-OH4BMY2N.js.map} +0 -0
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  extractRenderedRegions,
4
4
  renderDocumentToScene
5
- } from "./chunk-XJID65VS.js";
5
+ } from "./chunk-PATC34WZ.js";
6
6
  import {
7
7
  blocksToPages,
8
8
  dropBlankImages,
9
9
  readImageQrCodes,
10
10
  wmfBitmap
11
- } from "./chunk-SJG57YQQ.js";
11
+ } from "./chunk-TGM5V7UD.js";
12
12
  import {
13
13
  applyCellEdit,
14
14
  buildOrigUnits,
@@ -21,7 +21,7 @@ import {
21
21
  resolveParagraphMappings,
22
22
  resolveSectionEntryNames,
23
23
  stripCellTokens
24
- } from "./chunk-ZOXPQZ4D.js";
24
+ } from "./chunk-SABDVSQU.js";
25
25
  import {
26
26
  TOTAL_LABEL_RE,
27
27
  comResultToParseResult,
@@ -47,10 +47,10 @@ import {
47
47
  stripHeadMarker,
48
48
  summarize,
49
49
  topLevelParagraphs
50
- } from "./chunk-RGSVM7RL.js";
50
+ } from "./chunk-HQXVNLH2.js";
51
51
  import {
52
52
  patchZipEntries
53
- } from "./chunk-CXQXLQVT.js";
53
+ } from "./chunk-RZXJFM3A.js";
54
54
  import {
55
55
  ANNOTATION_BLANK_RE,
56
56
  ValueCursor,
@@ -89,7 +89,7 @@ import {
89
89
  rawTextContent,
90
90
  readZipEntry,
91
91
  warnInto
92
- } from "./chunk-YIW4AEC6.js";
92
+ } from "./chunk-RNBBMRKF.js";
93
93
  import {
94
94
  INLINE_TABLE_MARK,
95
95
  blocksPlainText,
@@ -101,7 +101,7 @@ import {
101
101
  memosMarkdown,
102
102
  parseHwp5Document,
103
103
  resolveImageBlocks
104
- } from "./chunk-FZMAFLAY.js";
104
+ } from "./chunk-V3MVGLWO.js";
105
105
  import {
106
106
  hwpEquationToLatex
107
107
  } from "./chunk-ZP2EW3YG.js";
@@ -113,7 +113,7 @@ import {
113
113
  hasLibheif,
114
114
  heicToRgba,
115
115
  pcxToRgba
116
- } from "./chunk-JQ6N26LA.js";
116
+ } from "./chunk-4L3SF7EF.js";
117
117
  import {
118
118
  WEBP_OPTIONS,
119
119
  flushHeifCache,
@@ -151,7 +151,7 @@ import {
151
151
  stripScriptTags,
152
152
  tidyScriptTags,
153
153
  wrapScript
154
- } from "./chunk-RJBQXQAM.js";
154
+ } from "./chunk-4RB5OPUZ.js";
155
155
  import {
156
156
  MAX_COLS,
157
157
  MAX_ROWS,
@@ -162,7 +162,7 @@ import {
162
162
  flattenLayoutTables,
163
163
  hasStructuredCellContent,
164
164
  sanitizeText
165
- } from "./chunk-7USEKDFP.js";
165
+ } from "./chunk-IRCO55NY.js";
166
166
  import {
167
167
  hangulAmount,
168
168
  mapPuaText
@@ -184,7 +184,7 @@ import {
184
184
  toArrayBuffer,
185
185
  unescapeHtml,
186
186
  unzipLimitBytes
187
- } from "./chunk-M33WZZPM.js";
187
+ } from "./chunk-DTKVCSRC.js";
188
188
 
189
189
  // src/table/visual.ts
190
190
  import { readFile as readFile2 } from "fs/promises";
@@ -16962,7 +16962,7 @@ var MIN_SIDE = 24;
16962
16962
  async function ocrEmbeddedImages(blocks, options, warnings) {
16963
16963
  const ocr = options?.ocr;
16964
16964
  if (ocr !== true && ocr !== "force" && typeof ocr !== "function") return false;
16965
- const { parseImageDocument } = await import("./image-ocr-KVV5JKY6.js");
16965
+ const { parseImageDocument } = await import("./image-ocr-CCLUXSWY.js");
16966
16966
  let inserted = false, unreadable = 0;
16967
16967
  let failed = null;
16968
16968
  const walk = async (list, depth) => {
@@ -20678,7 +20678,7 @@ var MAX_MULTIPAGE_PIXELS = 1e9;
20678
20678
  var MIN_PAGE_PIXELS = 1e6;
20679
20679
  async function parseImage(buffer, options) {
20680
20680
  try {
20681
- const { parseImageDocument, imagePageCount, imagePage, imagePagePixels } = await import("./image-ocr-KVV5JKY6.js");
20681
+ const { parseImageDocument, imagePageCount, imagePage, imagePagePixels } = await import("./image-ocr-CCLUXSWY.js");
20682
20682
  const pageCount = await imagePageCount(buffer);
20683
20683
  const wanted = pageCount > 1 && options?.pages ? parsePageRange(options.pages, pageCount) : null;
20684
20684
  const blocks = [], warnings = [], lines = [], images = [];
@@ -20775,7 +20775,7 @@ async function parseHwp(buffer, options) {
20775
20775
  async function parsePdf(buffer, options) {
20776
20776
  let parsePdfDocument;
20777
20777
  try {
20778
- const mod = await import("./parser-B6YSYZTH.js");
20778
+ const mod = await import("./parser-ANWES7Z3.js");
20779
20779
  parsePdfDocument = mod.parsePdfDocument;
20780
20780
  } catch {
20781
20781
  return {
@@ -20857,7 +20857,7 @@ async function fillForm(input, values, outputFormat = "markdown") {
20857
20857
  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})`);
20858
20858
  }
20859
20859
  } else if (format2 === "hwp" && detectOle2Format(buffer) === "hwp") {
20860
- const { hwpToHwpx: hwpToHwpx2 } = await import("./to-hwpx-JUWORW4M.js");
20860
+ const { hwpToHwpx: hwpToHwpx2 } = await import("./to-hwpx-FR6GDNMY.js");
20861
20861
  const hwpx = await hwpToHwpx2(new Uint8Array(buffer));
20862
20862
  buffer = hwpx.buffer.slice(hwpx.byteOffset, hwpx.byteOffset + hwpx.byteLength);
20863
20863
  } else {
@@ -21007,4 +21007,4 @@ export {
21007
21007
  parseHwpml,
21008
21008
  fillForm
21009
21009
  };
21010
- //# sourceMappingURL=chunk-H7OEE7UV.js.map
21010
+ //# sourceMappingURL=chunk-LFXIZHPE.js.map
@@ -3,7 +3,7 @@ import {
3
3
  ensureModelsIn,
4
4
  getModelStatusIn,
5
5
  getModelsDir
6
- } from "./chunk-SOW4ES4Y.js";
6
+ } from "./chunk-ODJRLTXE.js";
7
7
 
8
8
  // src/ocr/models.ts
9
9
  import { join } from "path";
@@ -175,4 +175,4 @@ export {
175
175
  parseCharacterDict,
176
176
  ocrModelPath
177
177
  };
178
- //# sourceMappingURL=chunk-N564V2TH.js.map
178
+ //# sourceMappingURL=chunk-MHDVZBUV.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ensureModelsIn,
3
3
  getModelsDir
4
- } from "./chunk-TSACZSXD.js";
4
+ } from "./chunk-J6RLB6KE.js";
5
5
  import {
6
6
  CELL_EDGES,
7
7
  HEADING_RATIO_H1,
@@ -9,11 +9,11 @@ import {
9
9
  HEADING_RATIO_H3,
10
10
  tidyScriptTags,
11
11
  toTex
12
- } from "./chunk-MG2DFKP7.js";
12
+ } from "./chunk-XIUXBJHE.js";
13
13
  import {
14
14
  safeMax,
15
15
  safeMin
16
- } from "./chunk-WQQVAAPX.js";
16
+ } from "./chunk-JT54JHR3.js";
17
17
 
18
18
  // src/ocr/models.ts
19
19
  import { join } from "path";
@@ -4211,7 +4211,8 @@ function mergeSuperscriptRows(lines) {
4211
4211
  const overlap2 = Math.min(a.top, b.top) - Math.max(a.bottom, b.bottom);
4212
4212
  const prevIsFrag = (isFrag(prev) || isAttachedScripts(prev, curr)) && a.height <= b.height * 0.8 && overlap2 >= a.height * 0.5;
4213
4213
  const currIsFrag = (isFrag(curr) || isAttachedScripts(curr, prev)) && b.height <= a.height * 0.8 && overlap2 >= b.height * 0.5;
4214
- const stacked = prev.some((o) => o.fontName === "ocr" && curr.some((it) => it.fontName === "ocr" && Math.min(it.x + it.w, o.x + o.w) - Math.max(it.x, o.x) > Math.min(it.w, o.w) * 0.5));
4214
+ const sameSize = (a2, b2) => Math.abs(a2.fontSize - b2.fontSize) <= Math.max(a2.fontSize, b2.fontSize) * 0.1;
4215
+ const stacked = prev.some((o) => curr.some((it) => (o.fontName === "ocr" ? it.fontName === "ocr" : it.fontName !== "ocr" && sameSize(o, it)) && Math.min(it.x + it.w, o.x + o.w) - Math.max(it.x, o.x) > Math.min(it.w, o.w) * 0.5));
4215
4216
  if ((prevIsFrag || currIsFrag) && !stacked) {
4216
4217
  result[result.length - 1] = [...prev, ...curr];
4217
4218
  } else {
@@ -4859,15 +4860,35 @@ function groupByY(items) {
4859
4860
  return lines;
4860
4861
  }
4861
4862
  var PREFIX_SCRIPT = /^[^A-Za-z+=×÷<>≤≥∫∑∏√∞^_{}\\/]+$/;
4863
+ function scriptRunFits(run, h) {
4864
+ const sizes = run.map((r) => r.fontSize ?? Infinity);
4865
+ return !/^[()[\]{}<>]*$/.test(h.text ?? "") && Math.max(...sizes) <= h.fontSize * 0.85 && Math.max(...sizes) <= Math.min(...sizes) * 1.15;
4866
+ }
4862
4867
  function isAttachedScripts(line, host) {
4863
- return line.length > 1 && line.length <= 16 && line.every((i) => {
4864
- const t = i.text.trim(), n = t.length;
4865
- if (n > 8 || !n) return false;
4866
- return host.some((h) => {
4867
- const after = i.x - (h.x + h.w), before = h.x - (i.x + i.w);
4868
- return n <= 3 && after <= h.fontSize * 0.35 && after >= -h.fontSize * 0.25 || PREFIX_SCRIPT.test(t) && before <= h.fontSize * 0.6 && before >= -h.fontSize * 0.25;
4869
- });
4868
+ if (line.length <= 1 || line.length > 16) return false;
4869
+ const short = (i) => {
4870
+ const n = i.text.trim().length;
4871
+ return n > 0 && n <= 8;
4872
+ };
4873
+ const prefixBefore = (i, smaller) => PREFIX_SCRIPT.test(i.text.trim()) && host.some((h) => {
4874
+ const before = h.x - (i.x + i.w);
4875
+ return before <= h.fontSize * 0.6 && before >= -h.fontSize * 0.25 && (!smaller || scriptRunFits(smaller, h));
4870
4876
  });
4877
+ const attached = (i) => short(i) && (prefixBefore(i) || host.some((h) => {
4878
+ const after = i.x - (h.x + h.w);
4879
+ return i.text.trim().length <= 3 && after <= h.fontSize * 0.35 && after >= -h.fontSize * 0.25;
4880
+ }));
4881
+ const sorted = [...line].sort((a, b) => a.x - b.x);
4882
+ let ok = 0;
4883
+ for (let k = 0, start = 0; k < sorted.length; k++) {
4884
+ const next = sorted[k + 1];
4885
+ if (next && next.x - (sorted[k].x + sorted[k].w) <= (sorted[k].fontSize ?? host[0]?.fontSize ?? 10) * 0.7) continue;
4886
+ const run = sorted.slice(start, k + 1);
4887
+ const runOk = run.length > 1 && run.every((i) => short(i) && PREFIX_SCRIPT.test(i.text.trim())) && prefixBefore(run[run.length - 1], run);
4888
+ for (const i of run) if (runOk || attached(i)) ok++;
4889
+ start = k + 1;
4890
+ }
4891
+ return ok === line.length;
4871
4892
  }
4872
4893
  function isFragmentLine(line) {
4873
4894
  let total = 0;
@@ -5288,7 +5309,7 @@ function detectClusterTables(items, pageNum, rejected, lex) {
5288
5309
  }
5289
5310
  return results.filter((r) => {
5290
5311
  const twoColumns = isTwoColumnProse(r);
5291
- const prose = twoColumns || isProseTable(r.table) || gaplessCjkLines(r) || [...r.usedItems].every((it) => it.fontName === "ocr") && isProseFragmentTable(r.table);
5312
+ const prose = twoColumns || isProseTable(r.table) || gaplessCjkLines(r) || isFootnoteList(r.table) || [...r.usedItems].every((it) => it.fontName === "ocr") && isProseFragmentTable(r.table);
5292
5313
  if (prose && rejected) rejected.prose++;
5293
5314
  if (twoColumns && rejected && [...r.usedItems].every((it) => it.fontName === "ocr")) {
5294
5315
  const used = [...r.usedItems].sort((a, b) => a.x - b.x);
@@ -5307,6 +5328,11 @@ function detectClusterTables(items, pageNum, rejected, lex) {
5307
5328
  return !prose;
5308
5329
  });
5309
5330
  }
5331
+ function isFootnoteList(table) {
5332
+ const filled = table.cells.map((row) => row.filter((cell) => cell.text.trim())).filter((row) => row.length);
5333
+ const marks = filled.map((row) => /^(\d{1,3})\)$/.exec(row[0].text.trim())).filter((m) => m !== null).map((m) => Number(m[1]));
5334
+ return marks.length >= 3 && marks.length >= filled.length - 1 && marks.every((v, i) => i === 0 || v === marks[i - 1] + 1);
5335
+ }
5310
5336
  function gaplessCjkLines(r) {
5311
5337
  let lines = 0, gapless = 0;
5312
5338
  for (const row of groupByBaseline([...r.usedItems].filter((i) => i.text.trim()))) {
@@ -5810,7 +5836,22 @@ function mergeOverlappingRows(rows) {
5810
5836
  }
5811
5837
  function isFragmentRow(row, host) {
5812
5838
  if (!row.items.every((i) => i.text.length <= 8)) return false;
5813
- return row.items.length <= 3 || row.items.length <= 16 && row.items.every((i) => PREFIX_SCRIPT.test(i.text.trim()) && host.items.some((h) => scriptAttached(i, h)));
5839
+ if (row.items.length <= 3) return true;
5840
+ if (row.items.length > 16 || !row.items.every((i) => PREFIX_SCRIPT.test(i.text.trim()))) return false;
5841
+ const sorted = [...row.items].sort((a, b) => a.x - b.x);
5842
+ for (let k = 0, start = 0; k < sorted.length; k++) {
5843
+ const next = sorted[k + 1];
5844
+ if (next && next.x - (sorted[k].x + sorted[k].w) <= sorted[k].fontSize * 0.7) continue;
5845
+ const run = sorted.slice(start, k + 1);
5846
+ const end = run[run.length - 1];
5847
+ const runOk = run.length > 1 && host.items.some((h) => {
5848
+ const before = h.x - (end.x + end.w);
5849
+ return before <= h.fontSize * 0.6 && before >= -h.fontSize * 0.1 && scriptRunFits(run, h);
5850
+ });
5851
+ if (!runOk && !run.every((i) => host.items.some((h) => scriptAttached(i, h)))) return false;
5852
+ start = k + 1;
5853
+ }
5854
+ return true;
5814
5855
  }
5815
5856
  function scriptAttached(i, h) {
5816
5857
  const after = i.x - (h.x + h.w), before = h.x - (i.x + i.w);
@@ -11542,4 +11583,4 @@ export {
11542
11583
  UNRULED_REGION_TABLES,
11543
11584
  mergeOcrImageRegions
11544
11585
  };
11545
- //# sourceMappingURL=chunk-XV6A6WHZ.js.map
11586
+ //# sourceMappingURL=chunk-MQ44UJN6.js.map