kordoc 4.24.78 → 4.24.80

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 (195) hide show
  1. package/README.md +4 -4
  2. package/dist/{-3INLR7KZ.js → -E4WGZQZR.js} +24 -22
  3. package/dist/{chunk-PNKLL5TE.js → chunk-3FXO2TVH.js} +2 -2
  4. package/dist/{chunk-5JKGN6YF.js → chunk-4GZJWSI4.js} +2 -2
  5. package/dist/{chunk-ELOZVH5S.cjs → chunk-4OA4D6TW.cjs} +8 -8
  6. package/dist/{chunk-ELOZVH5S.cjs.map → chunk-4OA4D6TW.cjs.map} +1 -1
  7. package/dist/{chunk-7RQDJ63R.js → chunk-4VGY5JDF.js} +11 -9
  8. package/dist/chunk-4VGY5JDF.js.map +1 -0
  9. package/dist/{chunk-36KS4PDO.js → chunk-4ZMHVX2V.js} +2 -2
  10. package/dist/{chunk-PLF5QVIR.cjs → chunk-5FYOSM43.cjs} +6 -6
  11. package/dist/{chunk-PLF5QVIR.cjs.map → chunk-5FYOSM43.cjs.map} +1 -1
  12. package/dist/{chunk-HBKSG62C.js → chunk-5GQREWXW.js} +2 -2
  13. package/dist/{chunk-PGTOBYRX.js → chunk-5MXMBV4W.js} +5 -5
  14. package/dist/{chunk-DJVCW5YA.js → chunk-6YJHMQPK.js} +12 -9
  15. package/dist/chunk-6YJHMQPK.js.map +1 -0
  16. package/dist/{chunk-EU7LGFMR.cjs → chunk-7WYZNELF.cjs} +97 -94
  17. package/dist/chunk-7WYZNELF.cjs.map +1 -0
  18. package/dist/{chunk-Q62ZOF73.js → chunk-ABOFK6HZ.js} +2 -2
  19. package/dist/{chunk-VZRUNNZ2.js → chunk-C33LHSPS.js} +2 -2
  20. package/dist/{chunk-LVRS6HPA.js → chunk-CJJLFK33.js} +6 -6
  21. package/dist/{chunk-AEQJOD3U.js → chunk-DBVH7R77.js} +2 -2
  22. package/dist/{chunk-FAJO643G.js → chunk-DDBVS2ZV.js} +5 -5
  23. package/dist/{chunk-EQO6PYJF.cjs → chunk-DFFUNHVL.cjs} +33 -31
  24. package/dist/chunk-DFFUNHVL.cjs.map +1 -0
  25. package/dist/{chunk-3JZINNV6.cjs → chunk-DXDR5FAQ.cjs} +104 -104
  26. package/dist/{chunk-3JZINNV6.cjs.map → chunk-DXDR5FAQ.cjs.map} +1 -1
  27. package/dist/{chunk-KM5P2HJ2.js → chunk-EM5OCOC6.js} +2 -2
  28. package/dist/{chunk-ENUL3MLZ.js → chunk-HDV2R6EA.js} +3 -3
  29. package/dist/{chunk-MQYI7KWD.js → chunk-HPOA47C4.js} +2 -2
  30. package/dist/{chunk-BXNK6DQL.js → chunk-HPUD7YTY.js} +2 -2
  31. package/dist/{chunk-7ASPTCTD.js → chunk-I56ES2MC.js} +2 -2
  32. package/dist/{chunk-YRYL75TY.js → chunk-IRANRVQC.js} +2 -2
  33. package/dist/{chunk-F5RCXSUO.js → chunk-IYJYGFOR.js} +2 -2
  34. package/dist/{chunk-YDONOMUK.js → chunk-LDLAHPQG.js} +2 -2
  35. package/dist/{chunk-VEIPW7QU.js → chunk-LGRQWTSU.js} +13 -10
  36. package/dist/chunk-LGRQWTSU.js.map +1 -0
  37. package/dist/{chunk-Z4RKJYK4.js → chunk-MAJRVJ2U.js} +10 -10
  38. package/dist/{chunk-QRNA3W7B.cjs → chunk-PBTLZYKW.cjs} +3 -3
  39. package/dist/{chunk-QRNA3W7B.cjs.map → chunk-PBTLZYKW.cjs.map} +1 -1
  40. package/dist/{chunk-TFKBIIDY.js → chunk-PG7TASMF.js} +67 -21
  41. package/dist/chunk-PG7TASMF.js.map +1 -0
  42. package/dist/{chunk-WENH6GSY.cjs → chunk-RKCEXNWT.cjs} +58 -58
  43. package/dist/{chunk-WENH6GSY.cjs.map → chunk-RKCEXNWT.cjs.map} +1 -1
  44. package/dist/{chunk-SJF2ZMOH.js → chunk-SN3TFJAE.js} +2 -2
  45. package/dist/{chunk-DSUKSIMD.js → chunk-T7CMM4FT.js} +6 -6
  46. package/dist/{chunk-PSWNPOWW.js → chunk-T7REBC3M.js} +2 -2
  47. package/dist/{chunk-NWAA7CP7.js → chunk-UCRDNRX2.js} +3 -3
  48. package/dist/{chunk-V5JHID6L.js → chunk-V5D7ZTXL.js} +3 -3
  49. package/dist/{chunk-Y2NIFMWC.js → chunk-VQFUQFK6.js} +7 -7
  50. package/dist/{chunk-7BAKREYA.cjs → chunk-VWW5C2PU.cjs} +3 -3
  51. package/dist/{chunk-7BAKREYA.cjs.map → chunk-VWW5C2PU.cjs.map} +1 -1
  52. package/dist/{chunk-M5VCRPXU.js → chunk-WC5XP6HM.js} +5 -5
  53. package/dist/{chunk-H6ZJK5KA.js → chunk-WETI4A4A.js} +2 -2
  54. package/dist/{chunk-6RJGAVYA.js → chunk-WFG6JYP7.js} +2 -2
  55. package/dist/{chunk-ZE4OZOSO.js → chunk-WXZFE5IB.js} +12 -10
  56. package/dist/chunk-WXZFE5IB.js.map +1 -0
  57. package/dist/{chunk-ZOOI4PGA.js → chunk-XLQ6LFEL.js} +2 -2
  58. package/dist/{chunk-QXAQIVOI.js → chunk-XZH7DOXJ.js} +2 -2
  59. package/dist/{chunk-XMNGFHK6.cjs → chunk-Y7LMYK5C.cjs} +2 -2
  60. package/dist/{chunk-XMNGFHK6.cjs.map → chunk-Y7LMYK5C.cjs.map} +1 -1
  61. package/dist/{chunk-KK77Q5NA.js → chunk-Z4LANE4Z.js} +2 -2
  62. package/dist/{chunk-7YAXU4XB.js → chunk-ZSQYW7N2.js} +11 -11
  63. package/dist/chunks-MNMVIRMB.js +11 -0
  64. package/dist/cli.js +61 -56
  65. package/dist/cli.js.map +1 -1
  66. package/dist/{formula-X4J6TPFE.cjs → formula-OOTFS5XV.cjs} +9 -9
  67. package/dist/{formula-X4J6TPFE.cjs.map → formula-OOTFS5XV.cjs.map} +1 -1
  68. package/dist/{formula-OYCTBHT6.js → formula-QVNBTQJF.js} +4 -4
  69. package/dist/{formula-OVW7R4O5.js → formula-YQWTOSSV.js} +3 -3
  70. package/dist/generator-DJCS2MTC.cjs +12 -0
  71. package/dist/{generator-BCGW5ITF.cjs.map → generator-DJCS2MTC.cjs.map} +1 -1
  72. package/dist/generator-SEJ54C76.js +11 -0
  73. package/dist/generator-V7ZB27P6.js +18 -0
  74. package/dist/{hancom-O4E5BLIX.js → hancom-OMBHPCJR.js} +2 -2
  75. package/dist/{hancom-KYUZYWLO.js → hancom-S6GK2PKJ.js} +2 -2
  76. package/dist/{hancom-WH7WXXZH.cjs → hancom-UJRXSASQ.cjs} +5 -5
  77. package/dist/{hancom-WH7WXXZH.cjs.map → hancom-UJRXSASQ.cjs.map} +1 -1
  78. package/dist/{image-ocr-GY4K5NOY.js → image-ocr-3RDTZPUH.js} +8 -8
  79. package/dist/{image-ocr-5ZFMCHZL.cjs → image-ocr-4FQ54QPG.cjs} +36 -36
  80. package/dist/{image-ocr-5ZFMCHZL.cjs.map → image-ocr-4FQ54QPG.cjs.map} +1 -1
  81. package/dist/{image-ocr-OPDOCCLA.js → image-ocr-FA2UAUB5.js} +11 -11
  82. package/dist/index.cjs +1484 -1438
  83. package/dist/index.cjs.map +1 -1
  84. package/dist/index.d.cts +11 -1
  85. package/dist/index.d.ts +11 -1
  86. package/dist/index.js +65 -19
  87. package/dist/index.js.map +1 -1
  88. package/dist/mcp.js +51 -46
  89. package/dist/mcp.js.map +1 -1
  90. package/dist/memo-6BS3C2QT.js +17 -0
  91. package/dist/{model-bundle-VGXIVXVT.js → model-bundle-KTKZK7ZX.js} +5 -5
  92. package/dist/{models-TUSHH7AR.js → models-VGSCY57U.js} +5 -5
  93. package/dist/{parse-worker-v2-Z3XGSG52.js → parse-worker-v2-LUABK53S.js} +23 -23
  94. package/dist/{parser-ZMBMSI3G.js → parser-FB6NSUTI.js} +18 -12
  95. package/dist/parser-FB6NSUTI.js.map +1 -0
  96. package/dist/{parser-EQTJOS7W.cjs → parser-J3V4ZY33.cjs} +173 -167
  97. package/dist/parser-J3V4ZY33.cjs.map +1 -0
  98. package/dist/{parser-OAQ2QNB6.js → parser-JEECXHUZ.js} +21 -15
  99. package/dist/parser-JEECXHUZ.js.map +1 -0
  100. package/dist/pdf-ocr-5WUIENJQ.cjs +43 -0
  101. package/dist/{pdf-ocr-YGAPGMHW.cjs.map → pdf-ocr-5WUIENJQ.cjs.map} +1 -1
  102. package/dist/{pdf-ocr-WRJDDC57.js → pdf-ocr-HUPMJSXZ.js} +9 -9
  103. package/dist/{pdf-ocr-3CUUB3YV.js → pdf-ocr-VTC73UOL.js} +6 -6
  104. package/dist/{profile-io-IOVBPV7R.js → profile-io-7VNJ26XG.js} +3 -3
  105. package/dist/{rasterize-ZJZKZF5R.js → rasterize-AFPV32K5.js} +3 -3
  106. package/dist/{redact-doc-NPMUDPQZ.js → redact-doc-O6NOJLUX.js} +22 -22
  107. package/dist/{render-F43PBJAG.js → render-6FEX4BYT.js} +12 -12
  108. package/dist/{rewrite-fallback-RITELBHU.js → rewrite-fallback-7QMVNVIF.js} +13 -13
  109. package/dist/seal-5BLP22A4.js +16 -0
  110. package/dist/{setup-J7I3KFRD.js → setup-727UTPWF.js} +3 -3
  111. package/dist/{to-hwpx-6JBBYURE.js → to-hwpx-4V6GIDFI.js} +7 -7
  112. package/dist/{to-hwpx-M7W7O47H.js → to-hwpx-QOAFYHV3.js} +4 -4
  113. package/dist/to-hwpx-TT3TRZOU.cjs +16 -0
  114. package/dist/{to-hwpx-ACL6I6I7.cjs.map → to-hwpx-TT3TRZOU.cjs.map} +1 -1
  115. package/dist/visual-XYHR33UB.js +40 -0
  116. package/dist/{watch-YILY6776.js → watch-DWX4RTYR.js} +23 -23
  117. package/package.json +6 -1
  118. package/dist/chunk-7RQDJ63R.js.map +0 -1
  119. package/dist/chunk-DJVCW5YA.js.map +0 -1
  120. package/dist/chunk-EQO6PYJF.cjs.map +0 -1
  121. package/dist/chunk-EU7LGFMR.cjs.map +0 -1
  122. package/dist/chunk-TFKBIIDY.js.map +0 -1
  123. package/dist/chunk-VEIPW7QU.js.map +0 -1
  124. package/dist/chunk-ZE4OZOSO.js.map +0 -1
  125. package/dist/chunks-QN3OZOZA.js +0 -11
  126. package/dist/generator-BCGW5ITF.cjs +0 -12
  127. package/dist/generator-GJJMS4RD.js +0 -11
  128. package/dist/generator-ZWGWYDPM.js +0 -18
  129. package/dist/memo-7BFDELVU.js +0 -17
  130. package/dist/parser-EQTJOS7W.cjs.map +0 -1
  131. package/dist/parser-OAQ2QNB6.js.map +0 -1
  132. package/dist/parser-ZMBMSI3G.js.map +0 -1
  133. package/dist/pdf-ocr-YGAPGMHW.cjs +0 -43
  134. package/dist/seal-BEVAF3RV.js +0 -16
  135. package/dist/to-hwpx-ACL6I6I7.cjs +0 -16
  136. package/dist/visual-EG4OBDUG.js +0 -40
  137. /package/dist/{-3INLR7KZ.js.map → -E4WGZQZR.js.map} +0 -0
  138. /package/dist/{chunk-PNKLL5TE.js.map → chunk-3FXO2TVH.js.map} +0 -0
  139. /package/dist/{chunk-5JKGN6YF.js.map → chunk-4GZJWSI4.js.map} +0 -0
  140. /package/dist/{chunk-36KS4PDO.js.map → chunk-4ZMHVX2V.js.map} +0 -0
  141. /package/dist/{chunk-HBKSG62C.js.map → chunk-5GQREWXW.js.map} +0 -0
  142. /package/dist/{chunk-PGTOBYRX.js.map → chunk-5MXMBV4W.js.map} +0 -0
  143. /package/dist/{chunk-Q62ZOF73.js.map → chunk-ABOFK6HZ.js.map} +0 -0
  144. /package/dist/{chunk-VZRUNNZ2.js.map → chunk-C33LHSPS.js.map} +0 -0
  145. /package/dist/{chunk-LVRS6HPA.js.map → chunk-CJJLFK33.js.map} +0 -0
  146. /package/dist/{chunk-AEQJOD3U.js.map → chunk-DBVH7R77.js.map} +0 -0
  147. /package/dist/{chunk-FAJO643G.js.map → chunk-DDBVS2ZV.js.map} +0 -0
  148. /package/dist/{chunk-KM5P2HJ2.js.map → chunk-EM5OCOC6.js.map} +0 -0
  149. /package/dist/{chunk-ENUL3MLZ.js.map → chunk-HDV2R6EA.js.map} +0 -0
  150. /package/dist/{chunk-MQYI7KWD.js.map → chunk-HPOA47C4.js.map} +0 -0
  151. /package/dist/{chunk-BXNK6DQL.js.map → chunk-HPUD7YTY.js.map} +0 -0
  152. /package/dist/{chunk-7ASPTCTD.js.map → chunk-I56ES2MC.js.map} +0 -0
  153. /package/dist/{chunk-YRYL75TY.js.map → chunk-IRANRVQC.js.map} +0 -0
  154. /package/dist/{chunk-F5RCXSUO.js.map → chunk-IYJYGFOR.js.map} +0 -0
  155. /package/dist/{chunk-YDONOMUK.js.map → chunk-LDLAHPQG.js.map} +0 -0
  156. /package/dist/{chunk-Z4RKJYK4.js.map → chunk-MAJRVJ2U.js.map} +0 -0
  157. /package/dist/{chunk-SJF2ZMOH.js.map → chunk-SN3TFJAE.js.map} +0 -0
  158. /package/dist/{chunk-DSUKSIMD.js.map → chunk-T7CMM4FT.js.map} +0 -0
  159. /package/dist/{chunk-PSWNPOWW.js.map → chunk-T7REBC3M.js.map} +0 -0
  160. /package/dist/{chunk-NWAA7CP7.js.map → chunk-UCRDNRX2.js.map} +0 -0
  161. /package/dist/{chunk-V5JHID6L.js.map → chunk-V5D7ZTXL.js.map} +0 -0
  162. /package/dist/{chunk-Y2NIFMWC.js.map → chunk-VQFUQFK6.js.map} +0 -0
  163. /package/dist/{chunk-M5VCRPXU.js.map → chunk-WC5XP6HM.js.map} +0 -0
  164. /package/dist/{chunk-H6ZJK5KA.js.map → chunk-WETI4A4A.js.map} +0 -0
  165. /package/dist/{chunk-6RJGAVYA.js.map → chunk-WFG6JYP7.js.map} +0 -0
  166. /package/dist/{chunk-ZOOI4PGA.js.map → chunk-XLQ6LFEL.js.map} +0 -0
  167. /package/dist/{chunk-QXAQIVOI.js.map → chunk-XZH7DOXJ.js.map} +0 -0
  168. /package/dist/{chunk-KK77Q5NA.js.map → chunk-Z4LANE4Z.js.map} +0 -0
  169. /package/dist/{chunk-7YAXU4XB.js.map → chunk-ZSQYW7N2.js.map} +0 -0
  170. /package/dist/{chunks-QN3OZOZA.js.map → chunks-MNMVIRMB.js.map} +0 -0
  171. /package/dist/{formula-OYCTBHT6.js.map → formula-QVNBTQJF.js.map} +0 -0
  172. /package/dist/{formula-OVW7R4O5.js.map → formula-YQWTOSSV.js.map} +0 -0
  173. /package/dist/{generator-GJJMS4RD.js.map → generator-SEJ54C76.js.map} +0 -0
  174. /package/dist/{generator-ZWGWYDPM.js.map → generator-V7ZB27P6.js.map} +0 -0
  175. /package/dist/{hancom-O4E5BLIX.js.map → hancom-OMBHPCJR.js.map} +0 -0
  176. /package/dist/{hancom-KYUZYWLO.js.map → hancom-S6GK2PKJ.js.map} +0 -0
  177. /package/dist/{image-ocr-GY4K5NOY.js.map → image-ocr-3RDTZPUH.js.map} +0 -0
  178. /package/dist/{image-ocr-OPDOCCLA.js.map → image-ocr-FA2UAUB5.js.map} +0 -0
  179. /package/dist/{memo-7BFDELVU.js.map → memo-6BS3C2QT.js.map} +0 -0
  180. /package/dist/{model-bundle-VGXIVXVT.js.map → model-bundle-KTKZK7ZX.js.map} +0 -0
  181. /package/dist/{models-TUSHH7AR.js.map → models-VGSCY57U.js.map} +0 -0
  182. /package/dist/{parse-worker-v2-Z3XGSG52.js.map → parse-worker-v2-LUABK53S.js.map} +0 -0
  183. /package/dist/{pdf-ocr-3CUUB3YV.js.map → pdf-ocr-HUPMJSXZ.js.map} +0 -0
  184. /package/dist/{pdf-ocr-WRJDDC57.js.map → pdf-ocr-VTC73UOL.js.map} +0 -0
  185. /package/dist/{profile-io-IOVBPV7R.js.map → profile-io-7VNJ26XG.js.map} +0 -0
  186. /package/dist/{rasterize-ZJZKZF5R.js.map → rasterize-AFPV32K5.js.map} +0 -0
  187. /package/dist/{redact-doc-NPMUDPQZ.js.map → redact-doc-O6NOJLUX.js.map} +0 -0
  188. /package/dist/{render-F43PBJAG.js.map → render-6FEX4BYT.js.map} +0 -0
  189. /package/dist/{rewrite-fallback-RITELBHU.js.map → rewrite-fallback-7QMVNVIF.js.map} +0 -0
  190. /package/dist/{seal-BEVAF3RV.js.map → seal-5BLP22A4.js.map} +0 -0
  191. /package/dist/{setup-J7I3KFRD.js.map → setup-727UTPWF.js.map} +0 -0
  192. /package/dist/{to-hwpx-6JBBYURE.js.map → to-hwpx-4V6GIDFI.js.map} +0 -0
  193. /package/dist/{to-hwpx-M7W7O47H.js.map → to-hwpx-QOAFYHV3.js.map} +0 -0
  194. /package/dist/{visual-EG4OBDUG.js.map → visual-XYHR33UB.js.map} +0 -0
  195. /package/dist/{watch-YILY6776.js.map → watch-DWX4RTYR.js.map} +0 -0
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkQRNA3W7Bcjs = require('./chunk-QRNA3W7B.cjs');
6
+ var _chunkPBTLZYKWcjs = require('./chunk-PBTLZYKW.cjs');
7
7
 
8
8
 
9
9
 
@@ -71,11 +71,11 @@ var _chunkHHLZQQNLcjs = require('./chunk-HHLZQQNL.cjs');
71
71
 
72
72
 
73
73
 
74
- var _chunkEQO6PYJFcjs = require('./chunk-EQO6PYJF.cjs');
74
+ var _chunkDFFUNHVLcjs = require('./chunk-DFFUNHVL.cjs');
75
75
 
76
76
 
77
77
  var _chunkMMK32GPDcjs = require('./chunk-MMK32GPD.cjs');
78
- require('./chunk-7BAKREYA.cjs');
78
+ require('./chunk-VWW5C2PU.cjs');
79
79
 
80
80
 
81
81
 
@@ -92,11 +92,11 @@ require('./chunk-7BAKREYA.cjs');
92
92
 
93
93
 
94
94
 
95
- var _chunkELOZVH5Scjs = require('./chunk-ELOZVH5S.cjs');
95
+ var _chunk4OA4D6TWcjs = require('./chunk-4OA4D6TW.cjs');
96
96
 
97
97
 
98
98
 
99
- var _chunkXMNGFHK6cjs = require('./chunk-XMNGFHK6.cjs');
99
+ var _chunkY7LMYK5Ccjs = require('./chunk-Y7LMYK5C.cjs');
100
100
 
101
101
 
102
102
  var _chunkGS7T56RPcjs = require('./chunk-GS7T56RP.cjs');
@@ -429,7 +429,7 @@ async function extractPageImages(page, fnArray, argsArray, pageNumber, state, wa
429
429
  let pristine;
430
430
  let paintIndex = -1;
431
431
  const regions = state.placement ? /* @__PURE__ */ new Map() : void 0;
432
- if (regions) _chunkEQO6PYJFcjs.extractImageRegions.call(void 0, fnArray, argsArray, false, regions);
432
+ if (regions) _chunkDFFUNHVLcjs.extractImageRegions.call(void 0, fnArray, argsArray, false, regions);
433
433
  const placed = (block, i) => {
434
434
  const r = _optionalChain([regions, 'optionalAccess', _4 => _4.get, 'call', _5 => _5(i)]);
435
435
  if (r) block.bbox = { page: pageNumber, x: r.x1, y: r.y1, width: r.x2 - r.x1, height: r.y2 - r.y1 };
@@ -511,7 +511,7 @@ async function extractPageImages(page, fnArray, argsArray, pageNumber, state, wa
511
511
  if (state.seen.has(hash)) continue;
512
512
  const rgba = toRgba(imgData, withBytes || !!readQr || state.dropBlank);
513
513
  if (!rgba) continue;
514
- if (state.dropBlank && _chunkQRNA3W7Bcjs.isBlankRgba.call(void 0, rgba)) {
514
+ if (state.dropBlank && _chunkPBTLZYKWcjs.isBlankRgba.call(void 0, rgba)) {
515
515
  state.seen.set(hash, "");
516
516
  continue;
517
517
  }
@@ -611,7 +611,7 @@ async function extractPdfiumImage(image, pageNumber, state, warnings, withBytes,
611
611
  const hash = `${w}x${h}kPh${contentHash(rgba)}`;
612
612
  state.rawKeys.set(image.raw, hash);
613
613
  if (state.seen.has(hash)) return null;
614
- if (state.dropBlank && _chunkQRNA3W7Bcjs.isBlankRgba.call(void 0, rgba)) {
614
+ if (state.dropBlank && _chunkPBTLZYKWcjs.isBlankRgba.call(void 0, rgba)) {
615
615
  state.seen.set(hash, "");
616
616
  return null;
617
617
  }
@@ -1059,13 +1059,13 @@ function ocrVectorOps(opList, paths) {
1059
1059
 
1060
1060
  // src/pdf/split-row-pattern.ts
1061
1061
  var textOf = (cell) => cell.text.replace(/<\/?u>|~~/g, "").trim();
1062
- var plain = (cell) => !_optionalChain([cell, 'access', _31 => _31.blocks, 'optionalAccess', _32 => _32.length]) && !_chunkEQO6PYJFcjs.IMAGE_CELLS.has(cell);
1062
+ var plain = (cell) => !_optionalChain([cell, 'access', _31 => _31.blocks, 'optionalAccess', _32 => _32.length]) && !_chunkDFFUNHVLcjs.IMAGE_CELLS.has(cell);
1063
1063
  var labelsOf = (cell) => {
1064
1064
  const labels = textOf(cell).split("\n").map((s) => s.trim()).filter(Boolean);
1065
1065
  return labels.length && labels.every((s) => /^\p{L}[\p{L}\p{N} ]{0,15}[::]$/u.test(s)) ? labels.map((s) => s.replace(/\s+/g, "").replace(/:/g, ":")) : void 0;
1066
1066
  };
1067
1067
  var alignedLabels = (label, value, count) => {
1068
- const L = _chunkEQO6PYJFcjs.CELL_LINES.get(label), V = _chunkEQO6PYJFcjs.CELL_LINES.get(value);
1068
+ const L = _chunkDFFUNHVLcjs.CELL_LINES.get(label), V = _chunkDFFUNHVLcjs.CELL_LINES.get(value);
1069
1069
  let next = 0;
1070
1070
  return !!L && !!V && L.length === count && V.length >= count && Math.abs(L[0].y - V[0].y) <= 1 && L.every((l) => {
1071
1071
  while (next < V.length && Math.abs(l.y - V[next].y) > 1) next++;
@@ -1073,7 +1073,7 @@ var alignedLabels = (label, value, count) => {
1073
1073
  });
1074
1074
  };
1075
1075
  function partialAlignedLabelCells(table, owner, first) {
1076
- const pageOf = (a) => _nullishCoalesce(_chunkELOZVH5Scjs.CELL_PAGES.get(_nullishCoalesce(a.cell, () => ( table.cells[a.r][a.c]))), () => ( (a.r < first ? -1 : -2)));
1076
+ const pageOf = (a) => _nullishCoalesce(_chunk4OA4D6TWcjs.CELL_PAGES.get(_nullishCoalesce(a.cell, () => ( table.cells[a.r][a.c]))), () => ( (a.r < first ? -1 : -2)));
1077
1077
  const pairs = [];
1078
1078
  let carried = false;
1079
1079
  for (let c = 0; c < table.cols; ) {
@@ -1096,10 +1096,10 @@ function partialAlignedLabelCells(table, owner, first) {
1096
1096
  const keyed = pairs.filter((p) => labelsOf(p.upper) && labelsOf(p.lower));
1097
1097
  if (keyed.length !== 1) return;
1098
1098
  const label = keyed[0], value = pairs.find((p) => p.c === label.c + label.cs), context = pairs.find((p) => p.c + p.cs === label.c);
1099
- if (!value || !context || value === context || textOf(context.upper).replace(/\s+/g, "") === textOf(context.lower).replace(/\s+/g, "") || !_optionalChain([_chunkELOZVH5Scjs.CELL_EDGES, 'access', _43 => _43.get, 'call', _44 => _44(context.upper), 'optionalAccess', _45 => _45.b]) || !_optionalChain([_chunkELOZVH5Scjs.CELL_EDGES, 'access', _46 => _46.get, 'call', _47 => _47(context.lower), 'optionalAccess', _48 => _48.t])) return;
1099
+ if (!value || !context || value === context || textOf(context.upper).replace(/\s+/g, "") === textOf(context.lower).replace(/\s+/g, "") || !_optionalChain([_chunk4OA4D6TWcjs.CELL_EDGES, 'access', _43 => _43.get, 'call', _44 => _44(context.upper), 'optionalAccess', _45 => _45.b]) || !_optionalChain([_chunk4OA4D6TWcjs.CELL_EDGES, 'access', _46 => _46.get, 'call', _47 => _47(context.lower), 'optionalAccess', _48 => _48.t])) return;
1100
1100
  const U = labelsOf(label.upper), D = labelsOf(label.lower), sequence = [...U, ...D];
1101
1101
  if (D.length < 2 || sequence.length < 3 || new Set(sequence).size !== sequence.length || !alignedLabels(label.upper, value.upper, U.length)) return;
1102
- const L = _chunkEQO6PYJFcjs.CELL_LINES.get(label.lower), V = _chunkEQO6PYJFcjs.CELL_LINES.get(value.lower);
1102
+ const L = _chunkDFFUNHVLcjs.CELL_LINES.get(label.lower), V = _chunkDFFUNHVLcjs.CELL_LINES.get(value.lower);
1103
1103
  if (!L || !V || L.length !== D.length) return;
1104
1104
  let next = V.findIndex((v) => Math.abs(v.y - L[0].y) <= 1);
1105
1105
  if (next <= 0 || !V.slice(0, next).every((v) => v.y > L[0].y + 1) || !L.every((l) => {
@@ -1119,14 +1119,14 @@ function partialAlignedLabelCells(table, owner, first) {
1119
1119
  continue;
1120
1120
  }
1121
1121
  if (list.length < 3 || new Set(list).size !== list.length) continue;
1122
- const visible = _nullishCoalesce(_optionalChain([_chunkEQO6PYJFcjs.CELL_LINES, 'access', _53 => _53.get, 'call', _54 => _54(lc), 'optionalAccess', _55 => _55.length]), () => ( 0)), values = _chunkEQO6PYJFcjs.CELL_LINES.get(vc);
1122
+ const visible = _nullishCoalesce(_optionalChain([_chunkDFFUNHVLcjs.CELL_LINES, 'access', _53 => _53.get, 'call', _54 => _54(lc), 'optionalAccess', _55 => _55.length]), () => ( 0)), values = _chunkDFFUNHVLcjs.CELL_LINES.get(vc);
1123
1123
  if (visible < 3 || visible > list.length || !values || !alignedLabels(lc, vc, visible)) continue;
1124
1124
  const top = Math.max(...values.map((v2) => v2.y)), bottom = Math.min(...values.map((v2) => v2.y));
1125
1125
  const contexts = [];
1126
1126
  for (let rr = r; rr < r + l.rs && rr < table.rows; rr++) {
1127
1127
  const a = _optionalChain([owner, 'access', _56 => _56[rr], 'optionalAccess', _57 => _57[context.c]]), cell = a ? table.cells[a.r][a.c] : void 0;
1128
1128
  if (!a || a.r !== rr || a.c !== context.c || a.cs !== context.cs || a.rs !== 1 || !cell || !plain(cell) || !textOf(cell) || pageOf(a) !== pageOf(l)) break;
1129
- const lines = _chunkEQO6PYJFcjs.CELL_LINES.get(cell);
1129
+ const lines = _chunkDFFUNHVLcjs.CELL_LINES.get(cell);
1130
1130
  if (!_optionalChain([lines, 'optionalAccess', _58 => _58.length]) || lines.some((line) => line.y > top + 1 || line.y < bottom - 1)) break;
1131
1131
  contexts.push(textOf(cell).replace(/\s+/g, ""));
1132
1132
  }
@@ -1428,7 +1428,7 @@ function rowStarts(t) {
1428
1428
  }
1429
1429
  var covering = (t, r) => rowStarts(t).slice(0, r + 1).flatMap((starts, rr) => starts.filter((s) => rr + s.cell.rowSpan > r).map((s) => s.cell));
1430
1430
  function cellPage(cell) {
1431
- const p = _chunkELOZVH5Scjs.CELL_PAGES.get(cell);
1431
+ const p = _chunk4OA4D6TWcjs.CELL_PAGES.get(cell);
1432
1432
  if (p !== void 0 || !_optionalChain([cell, 'access', _125 => _125.blocks, 'optionalAccess', _126 => _126.length]) || cell.blocks.some((b) => b.pageNumber === void 0)) return p;
1433
1433
  return Math.min(...cell.blocks.map((b) => b.pageNumber));
1434
1434
  }
@@ -1457,7 +1457,7 @@ function markJoinedPages(table, prev, curr) {
1457
1457
  rows.forEach((starts, r) => {
1458
1458
  const page2 = r < pt.rows ? pp[r] : cp[r - off];
1459
1459
  for (const { cell } of starts) {
1460
- if (page2 !== void 0 && page2 !== prev.pageNumber) _chunkELOZVH5Scjs.CELL_PAGES.set(cell, page2);
1460
+ if (page2 !== void 0 && page2 !== prev.pageNumber) _chunk4OA4D6TWcjs.CELL_PAGES.set(cell, page2);
1461
1461
  const src = _optionalChain([(r < pt.rows ? ptRows[r] : ctRows[r - off]), 'optionalAccess', _129 => _129.find, 'call', _130 => _130((s) => s.cell !== cell && s.cell.text === cell.text && CELL_SPLITS.has(s.cell))]);
1462
1462
  if (src) setSplits(cell, relocate(src.cell, cell));
1463
1463
  }
@@ -1517,8 +1517,8 @@ function splitCrossPageRows(t, pageNumber) {
1517
1517
  if (!splits.length) continue;
1518
1518
  const clone = (cell, patch) => {
1519
1519
  const out = { ...cell, ...patch };
1520
- const p = _chunkELOZVH5Scjs.CELL_PAGES.get(cell);
1521
- if (p !== void 0) _chunkELOZVH5Scjs.CELL_PAGES.set(out, p);
1520
+ const p = _chunk4OA4D6TWcjs.CELL_PAGES.get(cell);
1521
+ if (p !== void 0) _chunk4OA4D6TWcjs.CELL_PAGES.set(out, p);
1522
1522
  if (!("text" in patch) && CELL_SPLITS.has(cell)) CELL_SPLITS.set(out, CELL_SPLITS.get(cell));
1523
1523
  return out;
1524
1524
  };
@@ -1529,7 +1529,7 @@ function splitCrossPageRows(t, pageNumber) {
1529
1529
  for (const { cell, c, split } of splits) {
1530
1530
  cells[r][c] = clone(cell, { ...split.head, rowSpan: cut - r });
1531
1531
  const tail = { ...cell, ...split.tail, rowSpan: r + cell.rowSpan - cut };
1532
- _chunkELOZVH5Scjs.CELL_PAGES.set(tail, split.page);
1532
+ _chunk4OA4D6TWcjs.CELL_PAGES.set(tail, split.page);
1533
1533
  setSplits(tail, split.rest);
1534
1534
  cells[cut][c] = tail;
1535
1535
  }
@@ -1539,7 +1539,7 @@ function splitCrossPageRows(t, pageNumber) {
1539
1539
  for (const { cell, c, split } of splits) {
1540
1540
  cells[r][c] = clone(cell, split.head);
1541
1541
  const tail = { ...cell, ...split.tail, rowSpan: 1 };
1542
- _chunkELOZVH5Scjs.CELL_PAGES.set(tail, split.page);
1542
+ _chunk4OA4D6TWcjs.CELL_PAGES.set(tail, split.page);
1543
1543
  setSplits(tail, split.rest);
1544
1544
  row[c] = tail;
1545
1545
  }
@@ -1630,7 +1630,7 @@ function joinSplitParts(prev, pcx, curr, ccx, dx = 0, prevBottom, lex) {
1630
1630
  if (cols < 1) return null;
1631
1631
  const pa = anchorsOf(prev), ca = anchorsOf(curr);
1632
1632
  const cutOpen = (() => {
1633
- const u = _chunkEQO6PYJFcjs.ROW_RULES.get(prev), d = _chunkEQO6PYJFcjs.ROW_RULES.get(curr);
1633
+ const u = _chunkDFFUNHVLcjs.ROW_RULES.get(prev), d = _chunkDFFUNHVLcjs.ROW_RULES.get(curr);
1634
1634
  return !!u && !!d && !u.bottom && !d.top;
1635
1635
  })();
1636
1636
  let skip = 0, head = 0;
@@ -1662,19 +1662,19 @@ function joinSplitParts(prev, pcx, curr, ccx, dx = 0, prevBottom, lex) {
1662
1662
  if (r + dr < rows) owner[r + dr][dc] = placed;
1663
1663
  }
1664
1664
  grid[r][c1] = { ...a.cell, colSpan: c2 - c1, rowSpan: a.rs };
1665
- const lines = _chunkEQO6PYJFcjs.CELL_LINES.get(a.cell);
1666
- if (lines) _chunkEQO6PYJFcjs.CELL_LINES.set(grid[r][c1], shift ? lines.map((l) => ({ ...l, l: l.l + shift, r: l.r + shift })) : lines);
1667
- if (_chunkEQO6PYJFcjs.IMAGE_CELLS.has(a.cell)) _chunkEQO6PYJFcjs.IMAGE_CELLS.add(grid[r][c1]);
1668
- const edges = _chunkELOZVH5Scjs.CELL_EDGES.get(a.cell);
1665
+ const lines = _chunkDFFUNHVLcjs.CELL_LINES.get(a.cell);
1666
+ if (lines) _chunkDFFUNHVLcjs.CELL_LINES.set(grid[r][c1], shift ? lines.map((l) => ({ ...l, l: l.l + shift, r: l.r + shift })) : lines);
1667
+ if (_chunkDFFUNHVLcjs.IMAGE_CELLS.has(a.cell)) _chunkDFFUNHVLcjs.IMAGE_CELLS.add(grid[r][c1]);
1668
+ const edges = _chunk4OA4D6TWcjs.CELL_EDGES.get(a.cell);
1669
1669
  if (edges) {
1670
- _chunkELOZVH5Scjs.CELL_EDGES.set(grid[r][c1], edges);
1670
+ _chunk4OA4D6TWcjs.CELL_EDGES.set(grid[r][c1], edges);
1671
1671
  edged = true;
1672
1672
  }
1673
1673
  return true;
1674
1674
  };
1675
- for (const a of pa) if (!_chunkEQO6PYJFcjs.FILLER_CELLS.has(a.cell) && !place(a, pcx, 0)) return null;
1675
+ for (const a of pa) if (!_chunkDFFUNHVLcjs.FILLER_CELLS.has(a.cell) && !place(a, pcx, 0)) return null;
1676
1676
  for (const a of ca) {
1677
- if (a.r < skip || _chunkEQO6PYJFcjs.FILLER_CELLS.has(a.cell)) continue;
1677
+ if (a.r < skip || _chunkDFFUNHVLcjs.FILLER_CELLS.has(a.cell)) continue;
1678
1678
  if (!place(a, cxU, prev.rows - skip, dx)) return null;
1679
1679
  }
1680
1680
  const first = prev.rows;
@@ -1698,9 +1698,9 @@ function joinSplitParts(prev, pcx, curr, ccx, dx = 0, prevBottom, lex) {
1698
1698
  const grown = { ...above, rs: newRs };
1699
1699
  for (let rr = above.r; rr < above.r + newRs; rr++) for (let dc = above.c; dc < above.c + above.cs; dc++) owner[rr][dc] = grown;
1700
1700
  }
1701
- for (let r = 0; r < rows; r++) for (let c = 0; c < cols; c++) if (owner[r][c] === null) _chunkEQO6PYJFcjs.FILLER_CELLS.add(grid[r][c]);
1701
+ for (let r = 0; r < rows; r++) for (let c = 0; c < cols; c++) if (owner[r][c] === null) _chunkDFFUNHVLcjs.FILLER_CELLS.add(grid[r][c]);
1702
1702
  if (edged) {
1703
- for (let r = 0; r < rows; r++) for (let c = 0; c < cols; c++) if (owner[r][c] === null) _chunkELOZVH5Scjs.CELL_EDGES.set(grid[r][c], _chunkEQO6PYJFcjs.NO_EDGES);
1703
+ for (let r = 0; r < rows; r++) for (let c = 0; c < cols; c++) if (owner[r][c] === null) _chunk4OA4D6TWcjs.CELL_EDGES.set(grid[r][c], _chunkDFFUNHVLcjs.NO_EDGES);
1704
1704
  }
1705
1705
  for (let c = 0; c < cols && U[c + 1] <= pcx[0] + PART_COL_TOL; c++) {
1706
1706
  let r = prev.rows;
@@ -1709,7 +1709,7 @@ function joinSplitParts(prev, pcx, curr, ccx, dx = 0, prevBottom, lex) {
1709
1709
  for (let rr = 0; rr < r; rr++) owner[rr][c] = through;
1710
1710
  }
1711
1711
  const table = { rows, cols, cells: grid, hasHeader: prev.hasHeader, ...prev.caption ? { caption: prev.caption } : {} };
1712
- const pr = _chunkEQO6PYJFcjs.ROW_RULES.get(prev), cr = _chunkEQO6PYJFcjs.ROW_RULES.get(curr);
1712
+ const pr = _chunkDFFUNHVLcjs.ROW_RULES.get(prev), cr = _chunkDFFUNHVLcjs.ROW_RULES.get(curr);
1713
1713
  const shifted = dx !== 0;
1714
1714
  const cut = {
1715
1715
  open: !!pr && !!cr && !pr.bottom && !cr.top && pr.innerOpen + cr.innerOpen === 0 && pr.innerRuled + cr.innerRuled > 0,
@@ -1717,13 +1717,13 @@ function joinSplitParts(prev, pcx, curr, ccx, dx = 0, prevBottom, lex) {
1717
1717
  list: !shifted ? "any" : skip > 0 && ca.filter((a) => a.r < skip && a.cell.text.trim()).length < 2 ? "none" : "multi"
1718
1718
  };
1719
1719
  let partial = !skip && cols === prev.cols && cols === curr.cols && cut.ruled && prevBottom !== void 0 ? partialAlignedLabelCells(table, owner, first) : void 0;
1720
- if (partial && (continuesAcross(partial.context.upper, partial.context.lower, U[partial.context.c], U[partial.context.c + partial.context.cs]) || clauseContinues(partial.context.upper, partial.context.lower) || quantityContinues(partial.context.upper, partial.context.lower) || !continuesAcross(partial.value.upper, partial.value.lower, U[partial.value.c], U[partial.value.c + partial.value.cs]) || _chunkEQO6PYJFcjs.startsNewItem.call(void 0, partial.value.upper.text, partial.value.lower.text))) partial = void 0;
1720
+ if (partial && (continuesAcross(partial.context.upper, partial.context.lower, U[partial.context.c], U[partial.context.c + partial.context.cs]) || clauseContinues(partial.context.upper, partial.context.lower) || quantityContinues(partial.context.upper, partial.context.lower) || !continuesAcross(partial.value.upper, partial.value.lower, U[partial.value.c], U[partial.value.c + partial.value.cs]) || _chunkDFFUNHVLcjs.startsNewItem.call(void 0, partial.value.upper.text, partial.value.lower.text))) partial = void 0;
1721
1721
  const selected = partial ? /* @__PURE__ */ new Set([partial.label.c, partial.value.c]) : void 0;
1722
1722
  let split = !selected && rows > prev.rows && mergeSplitRow(table, owner, prev.rows, U, false, cut);
1723
1723
  if (rows > prev.rows && !split && prevBottom !== void 0 && mergeStraddlingCells(table, owner, prev.rows, prevBottom, lex, U, selected) && !selected) split = mergeSplitRow(table, owner, prev.rows, U, true, { ...cut, open: false });
1724
1724
  if (pr && cr) {
1725
1725
  const cutRuled = pr.bottom || cr.top;
1726
- _chunkEQO6PYJFcjs.ROW_RULES.set(table, { top: pr.top, bottom: cr.bottom, innerRuled: pr.innerRuled + cr.innerRuled + (!split && cutRuled ? 1 : 0), innerOpen: pr.innerOpen + cr.innerOpen + (!split && !cutRuled ? 1 : 0) });
1726
+ _chunkDFFUNHVLcjs.ROW_RULES.set(table, { top: pr.top, bottom: cr.bottom, innerRuled: pr.innerRuled + cr.innerRuled + (!split && cutRuled ? 1 : 0), innerOpen: pr.innerOpen + cr.innerOpen + (!split && !cutRuled ? 1 : 0) });
1727
1727
  }
1728
1728
  return { table, colXs: U, split, header: ca.filter((a) => a.r < skip && a.cell.text.trim()).length >= 2 };
1729
1729
  }
@@ -1785,18 +1785,18 @@ function mergeStraddlingCells(table, owner, first, prevBottom, lex, colXs, selec
1785
1785
  if (!d || d === u || u.r + u.rs - 1 !== last || d.r !== first || d.c !== u.c || d.cs !== u.cs) continue;
1786
1786
  const a = table.cells[u.r][u.c], b = table.cells[first][d.c];
1787
1787
  if (selected && !selected.has(u.c)) continue;
1788
- const flowsOn = itemBreak && straddles && !!colXs && hasContent(a) && hasContent(b) && longLastLine(a) && !_chunkEQO6PYJFcjs.startsNewItem.call(void 0, a.text, b.text) && continuesAcross(a, b, colXs[u.c], colXs[u.c + u.cs]);
1789
- const openSeam = hasContent(a) && hasContent(b) && _chunkEQO6PYJFcjs.hasOpenCellSeam.call(void 0, a, b) && !owner.some((row, r) => {
1788
+ const flowsOn = itemBreak && straddles && !!colXs && hasContent(a) && hasContent(b) && longLastLine(a) && !_chunkDFFUNHVLcjs.startsNewItem.call(void 0, a.text, b.text) && continuesAcross(a, b, colXs[u.c], colXs[u.c + u.cs]);
1789
+ const openSeam = hasContent(a) && hasContent(b) && _chunkDFFUNHVLcjs.hasOpenCellSeam.call(void 0, a, b) && !owner.some((row, r) => {
1790
1790
  if (!r || r === first) return false;
1791
1791
  const up = owner[r - 1][u.c], down = row[u.c];
1792
1792
  if (!up || !down || up === down || up.c !== u.c || down.c !== u.c || up.cs !== u.cs || down.cs !== u.cs) return false;
1793
- const ue = _chunkELOZVH5Scjs.CELL_EDGES.get(table.cells[up.r][up.c]), de = _chunkELOZVH5Scjs.CELL_EDGES.get(table.cells[down.r][down.c]);
1793
+ const ue = _chunk4OA4D6TWcjs.CELL_EDGES.get(table.cells[up.r][up.c]), de = _chunk4OA4D6TWcjs.CELL_EDGES.get(table.cells[down.r][down.c]);
1794
1794
  return !!ue && !!de && !ue.b && !de.t;
1795
1795
  });
1796
1796
  if (!selected && !openSeam && !flowsOn && !crossed.has(shape(u, d)) && !(u.rs >= 2 && u.c + u.cs <= firstNew && hasContent(a) && !hasContent(b))) {
1797
1797
  if (!straddles && !midWord) continue;
1798
1798
  if (u.r >= last && d.rs < 2) continue;
1799
- const U = _chunkEQO6PYJFcjs.CELL_LINES.get(a);
1799
+ const U = _chunkDFFUNHVLcjs.CELL_LINES.get(a);
1800
1800
  if (!_optionalChain([U, 'optionalAccess', _156 => _156.length]) || !hasContent(b)) continue;
1801
1801
  if (!(straddles && filledToBottom(U, prevBottom) && clauseContinues(a, b))) {
1802
1802
  if (U.length > STRADDLE_MAX_LINES) continue;
@@ -1814,7 +1814,7 @@ function mergeStraddlingCells(table, owner, first, prevBottom, lex, colXs, selec
1814
1814
  return merged;
1815
1815
  }
1816
1816
  function longLastLine(c) {
1817
- const L = _chunkEQO6PYJFcjs.CELL_LINES.get(c), l = _optionalChain([L, 'optionalAccess', _157 => _157[L.length - 1]]);
1817
+ const L = _chunkDFFUNHVLcjs.CELL_LINES.get(c), l = _optionalChain([L, 'optionalAccess', _157 => _157[L.length - 1]]);
1818
1818
  return !!l && l.r - l.l >= 6 * (l.h || 10);
1819
1819
  }
1820
1820
  function filledToBottom(U, bottom) {
@@ -1847,7 +1847,7 @@ function nextItemHead(prev, next) {
1847
1847
  return false;
1848
1848
  }
1849
1849
  function continuesAcross(u, d, x1, x2) {
1850
- const U = _chunkEQO6PYJFcjs.CELL_LINES.get(u), D = _chunkEQO6PYJFcjs.CELL_LINES.get(d);
1850
+ const U = _chunkDFFUNHVLcjs.CELL_LINES.get(u), D = _chunkDFFUNHVLcjs.CELL_LINES.get(d);
1851
1851
  if (!_optionalChain([U, 'optionalAccess', _158 => _158.length]) || !_optionalChain([D, 'optionalAccess', _159 => _159.length])) return false;
1852
1852
  const last = U[U.length - 1];
1853
1853
  const fs = last.h || 10;
@@ -1865,7 +1865,7 @@ function continuesAcross(u, d, x1, x2) {
1865
1865
  if (U.length === 1 && x2 - last.r > Math.max(FULL_LINE_EDGE_MIN, SINGLE_LINE_WORD_GAP * fs)) return false;
1866
1866
  const indented = last.l - minL >= HANGING_MIN * fs;
1867
1867
  if (last.r - last.l < FULL_LINE_MIN_FRAC * (indented ? x2 - last.l : x2 - x1)) return false;
1868
- const newItem = _chunkEQO6PYJFcjs.startsNewItem.call(void 0, u.text, d.text);
1868
+ const newItem = _chunkDFFUNHVLcjs.startsNewItem.call(void 0, u.text, d.text);
1869
1869
  const all = D.length ? U.concat(D) : U;
1870
1870
  const leftAligned = (l) => maxR - l.r > SHORT_LINE_GAP * fs && (l.l - minL <= fs || !newItem && all.some((o) => o !== l && Math.abs(o.l - l.l) <= HANGING_TOL && Math.abs(o.r - l.r) >= HANGING_MIN * fs));
1871
1871
  const hanging = U.length >= 2 && U.every((l) => maxR - l.r <= FULL_LINE_TOL * fs) && indented && Math.abs(D[0].l - last.l) <= HANGING_TOL;
@@ -1882,10 +1882,10 @@ function outlineContinues(u, d) {
1882
1882
  return U.length >= 2 && D.length >= 1 && U.some((l) => OUTLINE_HEAD.test(l)) && OUTLINE_ITEM.test(D[0]);
1883
1883
  }
1884
1884
  function lineEnded(c, x1, x2, next) {
1885
- const L = _chunkEQO6PYJFcjs.CELL_LINES.get(c);
1885
+ const L = _chunkDFFUNHVLcjs.CELL_LINES.get(c);
1886
1886
  if (!L || L.length !== 1) return false;
1887
1887
  const l = L[0], h = l.h || 10;
1888
- const d0 = next ? _optionalChain([_chunkEQO6PYJFcjs.CELL_LINES, 'access', _160 => _160.get, 'call', _161 => _161(next), 'optionalAccess', _162 => _162[0]]) : void 0;
1888
+ const d0 = next ? _optionalChain([_chunkDFFUNHVLcjs.CELL_LINES, 'access', _160 => _160.get, 'call', _161 => _161(next), 'optionalAccess', _162 => _162[0]]) : void 0;
1889
1889
  if (d0 && d0.l - l.l >= HANGING_MIN * h) return false;
1890
1890
  return x2 - l.r - (l.l - x1) >= Math.max(LABEL_ROOM, firstWordUnits(_nullishCoalesce(_optionalChain([next, 'optionalAccess', _163 => _163.text]), () => ( "")))) * h;
1891
1891
  }
@@ -1896,15 +1896,15 @@ function firstWordUnits(text) {
1896
1896
  return units;
1897
1897
  }
1898
1898
  function appendCell(a, b) {
1899
- if (_chunkEQO6PYJFcjs.IMAGE_CELLS.has(b)) _chunkEQO6PYJFcjs.IMAGE_CELLS.add(a);
1899
+ if (_chunkDFFUNHVLcjs.IMAGE_CELLS.has(b)) _chunkDFFUNHVLcjs.IMAGE_CELLS.add(a);
1900
1900
  if (_optionalChain([a, 'access', _164 => _164.blocks, 'optionalAccess', _165 => _165.length]) || _optionalChain([b, 'access', _166 => _166.blocks, 'optionalAccess', _167 => _167.length])) {
1901
1901
  const asBlocks = (c) => _optionalChain([c, 'access', _168 => _168.blocks, 'optionalAccess', _169 => _169.length]) ? c.blocks : c.text.split("\n").map((l) => l.trim()).filter(Boolean).map((text) => ({ type: "paragraph", text }));
1902
1902
  a.blocks = [...asBlocks(a), ...asBlocks(b)];
1903
1903
  }
1904
1904
  if (b.text.trim()) a.text = a.text.trim() ? a.text + "\n" + b.text : b.text;
1905
- _chunkEQO6PYJFcjs.joinCellEdges.call(void 0, a, b);
1905
+ _chunkDFFUNHVLcjs.joinCellEdges.call(void 0, a, b);
1906
1906
  }
1907
- var hasContent = (cell) => !!cell.text.trim() || !!_optionalChain([cell, 'access', _170 => _170.blocks, 'optionalAccess', _171 => _171.length]) || _chunkEQO6PYJFcjs.IMAGE_CELLS.has(cell);
1907
+ var hasContent = (cell) => !!cell.text.trim() || !!_optionalChain([cell, 'access', _170 => _170.blocks, 'optionalAccess', _171 => _171.length]) || _chunkDFFUNHVLcjs.IMAGE_CELLS.has(cell);
1908
1908
  var CLAUSE_OPEN_ENDING = /(?:하는|되는|하고|하며|하여|되어|되고|되며|이며|으며|어야|아야|여야)$/;
1909
1909
  var batchim = (ch) => {
1910
1910
  const k = ch.charCodeAt(0) - 44032;
@@ -1912,7 +1912,7 @@ var batchim = (ch) => {
1912
1912
  };
1913
1913
  function clauseContinues(u, d) {
1914
1914
  const tail = _nullishCoalesce(flowText(u.text).trim().split(/\s+/).pop(), () => ( "")), head = flowText(d.text).trim();
1915
- if (!/^[가-힣]{2,}$/.test(tail) || !/^[가-힣]/.test(head) || _chunkEQO6PYJFcjs.startsNewItem.call(void 0, u.text, head)) return false;
1915
+ if (!/^[가-힣]{2,}$/.test(tail) || !/^[가-힣]/.test(head) || _chunkDFFUNHVLcjs.startsNewItem.call(void 0, u.text, head)) return false;
1916
1916
  const last = tail[tail.length - 1], before = tail[tail.length - 2];
1917
1917
  return last === "\uC744" && batchim(before) || last === "\uB97C" && !batchim(before) || CLAUSE_OPEN_ENDING.test(tail);
1918
1918
  }
@@ -1920,8 +1920,8 @@ function quantityContinues(u, d) {
1920
1920
  return /\d[\d,.]*\s*(?:%|[가-힣]{1,2})?$/.test(flowText(u.text).trim()) && /^(?:미만|이상|이하|초과)(?![가-힣])/.test(flowText(d.text).trim());
1921
1921
  }
1922
1922
  function wordOverflows(u, d, x1, x2) {
1923
- const U = _chunkEQO6PYJFcjs.CELL_LINES.get(u);
1924
- if (!_optionalChain([U, 'optionalAccess', _172 => _172.length]) || _chunkEQO6PYJFcjs.startsNewItem.call(void 0, u.text, d.text)) return false;
1923
+ const U = _chunkDFFUNHVLcjs.CELL_LINES.get(u);
1924
+ if (!_optionalChain([U, 'optionalAccess', _172 => _172.length]) || _chunkDFFUNHVLcjs.startsNewItem.call(void 0, u.text, d.text)) return false;
1925
1925
  const last = U[U.length - 1], units = firstWordUnits(d.text);
1926
1926
  return units > 0 && last.r - last.l + units * (last.h || 10) > x2 - x1;
1927
1927
  }
@@ -1989,9 +1989,10 @@ function mergeSplitRow(table, owner, first, colXs, textOnly = false, cut = NO_CU
1989
1989
  const carriedSplit = !textOnly && carried && !newCell && (contentPairs.length <= 1 || contentPairs.every(([, d]) => d.rs > 1) || !cut.ruled && contentPairs.some(([u, d]) => wordOverflows(cell(u), cell(d), colXs[u.c], colXs[u.c + u.cs])));
1990
1990
  if (!carriedSplit && !band) {
1991
1991
  const norm = (c) => flowText(c.text).replace(/\s+/g, "");
1992
- if (pairs.some(([u, d]) => hasContent(d.cell) && norm(cell(d)) !== norm(cell(u)) && lineEnded(cell(u), colXs[u.c], colXs[u.c + u.cs], cell(d)))) return false;
1993
- const oneLine = (c) => _optionalChain([_chunkEQO6PYJFcjs.CELL_LINES, 'access', _174 => _174.get, 'call', _175 => _175(c), 'optionalAccess', _176 => _176.length]) === 1;
1994
- if (pairs.some(([u, d]) => nextItemHead(cell(u).text, cell(d).text)) && pairs.some(([u, d]) => hasContent(u.cell) && hasContent(d.cell) && oneLine(cell(u)) && oneLine(cell(d)) && norm(cell(u)) !== norm(cell(d)))) return false;
1992
+ const openCut = cut.open && !newCell;
1993
+ if (!openCut && pairs.some(([u, d]) => hasContent(d.cell) && norm(cell(d)) !== norm(cell(u)) && lineEnded(cell(u), colXs[u.c], colXs[u.c + u.cs], cell(d)))) return false;
1994
+ const oneLine = (c) => _optionalChain([_chunkDFFUNHVLcjs.CELL_LINES, 'access', _174 => _174.get, 'call', _175 => _175(c), 'optionalAccess', _176 => _176.length]) === 1;
1995
+ if (!openCut && pairs.some(([u, d]) => nextItemHead(cell(u).text, cell(d).text)) && pairs.some(([u, d]) => hasContent(u.cell) && hasContent(d.cell) && oneLine(cell(u)) && oneLine(cell(d)) && norm(cell(u)) !== norm(cell(d)))) return false;
1995
1996
  if (cut.ruled && pairs.some(([u, d]) => u.rs >= 2 && hasContent(u.cell) && hasContent(d.cell) && oneLine(cell(u)) && oneLine(cell(d)) && norm(cell(u)) !== norm(cell(d)))) return false;
1996
1997
  const flows = ([u, d]) => continuesAcross(cell(u), cell(d), colXs[u.c], colXs[u.c + u.cs]) || clauseContinues(cell(u), cell(d)) || quantityContinues(cell(u), cell(d));
1997
1998
  if (!(cut.open && !newCell)) {
@@ -2083,19 +2084,19 @@ function mergeCrossPageTables(blocks, pageHeights, lex) {
2083
2084
  placeJoined(blocks, i, j, joined);
2084
2085
  continue;
2085
2086
  }
2086
- if (_chunkEQO6PYJFcjs.EMPTY_PARTS.has(curr.table)) {
2087
+ if (_chunkDFFUNHVLcjs.EMPTY_PARTS.has(curr.table)) {
2087
2088
  blocks.splice(j, 1);
2088
2089
  i++;
2089
2090
  continue;
2090
2091
  }
2091
2092
  if (joined === null) continue;
2092
- if (prev.table.cols !== curr.table.cols || prev.table.renderAsTable !== curr.table.renderAsTable || _chunkEQO6PYJFcjs.EMPTY_PARTS.has(prev.table)) continue;
2093
+ if (prev.table.cols !== curr.table.cols || prev.table.renderAsTable !== curr.table.renderAsTable || _chunkDFFUNHVLcjs.EMPTY_PARTS.has(prev.table)) continue;
2093
2094
  const width = Math.max(prev.bbox.width, curr.bbox.width, 1);
2094
2095
  const leftDiff = Math.abs(prev.bbox.x - curr.bbox.x);
2095
2096
  const rightDiff = Math.abs(prev.bbox.x + prev.bbox.width - (curr.bbox.x + curr.bbox.width));
2096
2097
  if (leftDiff > width * NEIGHBOR_TABLE_EPSILON || rightDiff > width * NEIGHBOR_TABLE_EPSILON) continue;
2097
- const px = _chunkEQO6PYJFcjs.TABLE_COLXS.get(prev.table), cx = _chunkEQO6PYJFcjs.TABLE_COLXS.get(curr.table);
2098
- if (px && cx && !shiftedSame(px, cx, !_chunkEQO6PYJFcjs.CLIP_TABLES.has(prev.table) && !_chunkEQO6PYJFcjs.CLIP_TABLES.has(curr.table))) continue;
2098
+ const px = _chunkDFFUNHVLcjs.TABLE_COLXS.get(prev.table), cx = _chunkDFFUNHVLcjs.TABLE_COLXS.get(curr.table);
2099
+ if (px && cx && !shiftedSame(px, cx, !_chunkDFFUNHVLcjs.CLIP_TABLES.has(prev.table) && !_chunkDFFUNHVLcjs.CLIP_TABLES.has(curr.table))) continue;
2099
2100
  if (!px !== !cx) continue;
2100
2101
  if (!rowTextsEqual(prev.table.cells[0], curr.table.cells[0]) && sameHeadShape(prev.table.cells[0], curr.table.cells[0])) continue;
2101
2102
  let currCells = curr.table.cells;
@@ -2107,16 +2108,16 @@ function mergeCrossPageTables(blocks, pageHeights, lex) {
2107
2108
  blocks.splice(j, 1);
2108
2109
  continue;
2109
2110
  }
2110
- if (px && cx && !_chunkEQO6PYJFcjs.CLIP_TABLES.has(prev.table) && !_chunkEQO6PYJFcjs.CLIP_TABLES.has(curr.table) && currCells.length < curr.table.cells.length && curr.table.cells[0].filter((c) => c.text.trim()).length >= 2 && prev.table.cells.at(-1).concat(currCells[0]).every((c) => c.rowSpan === 1 && c.colSpan === 1 && _chunkEQO6PYJFcjs.CELL_LINES.has(c))) {
2111
+ if (px && cx && !_chunkDFFUNHVLcjs.CLIP_TABLES.has(prev.table) && !_chunkDFFUNHVLcjs.CLIP_TABLES.has(curr.table) && currCells.length < curr.table.cells.length && curr.table.cells[0].filter((c) => c.text.trim()).length >= 2 && prev.table.cells.at(-1).concat(currCells[0]).every((c) => c.rowSpan === 1 && c.colSpan === 1 && _chunkDFFUNHVLcjs.CELL_LINES.has(c))) {
2111
2112
  const dx = px[0] - cx[0];
2112
2113
  const part = joinSplitParts(prev.table, px, curr.table, cx.map((x) => x + dx), dx, void 0, lex);
2113
2114
  if (_optionalChain([part, 'optionalAccess', _197 => _197.split]) && part.table.rows === prev.table.rows + currCells.length - 1) {
2114
2115
  const last = prev.table.rows - 1;
2115
2116
  for (let c = 0; c < part.table.cols; c++) {
2116
- const U = _chunkEQO6PYJFcjs.CELL_LINES.get(prev.table.cells[last][c]), D = _chunkEQO6PYJFcjs.CELL_LINES.get(currCells[0][c]);
2117
- _chunkEQO6PYJFcjs.CELL_LINES.set(part.table.cells[last][c], U.concat(D.map((l) => ({ ...l, l: l.l + dx, r: l.r + dx }))));
2117
+ const U = _chunkDFFUNHVLcjs.CELL_LINES.get(prev.table.cells[last][c]), D = _chunkDFFUNHVLcjs.CELL_LINES.get(currCells[0][c]);
2118
+ _chunkDFFUNHVLcjs.CELL_LINES.set(part.table.cells[last][c], U.concat(D.map((l) => ({ ...l, l: l.l + dx, r: l.r + dx }))));
2118
2119
  }
2119
- _chunkEQO6PYJFcjs.TABLE_COLXS.set(part.table, part.colXs);
2120
+ _chunkDFFUNHVLcjs.TABLE_COLXS.set(part.table, part.colXs);
2120
2121
  placeJoined(blocks, i, j, part.table);
2121
2122
  continue;
2122
2123
  }
@@ -2129,20 +2130,20 @@ function mergeCrossPageTables(blocks, pageHeights, lex) {
2129
2130
  caption: prev.table.caption,
2130
2131
  ...prev.table.renderAsTable ? { renderAsTable: true } : {}
2131
2132
  };
2132
- if (_nullishCoalesce(px, () => ( cx))) _chunkEQO6PYJFcjs.TABLE_COLXS.set(merged, _nullishCoalesce(px, () => ( cx)));
2133
- if (_chunkEQO6PYJFcjs.CLIP_TABLES.has(prev.table) || _chunkEQO6PYJFcjs.CLIP_TABLES.has(curr.table)) _chunkEQO6PYJFcjs.CLIP_TABLES.add(merged);
2133
+ if (_nullishCoalesce(px, () => ( cx))) _chunkDFFUNHVLcjs.TABLE_COLXS.set(merged, _nullishCoalesce(px, () => ( cx)));
2134
+ if (_chunkDFFUNHVLcjs.CLIP_TABLES.has(prev.table) || _chunkDFFUNHVLcjs.CLIP_TABLES.has(curr.table)) _chunkDFFUNHVLcjs.CLIP_TABLES.add(merged);
2134
2135
  placeJoined(blocks, i, j, merged);
2135
2136
  }
2136
2137
  for (let i = blocks.length - 1; i >= 0; i--) {
2137
2138
  const t = blocks[i].table;
2138
- if (blocks[i].type === "table" && t && _chunkEQO6PYJFcjs.EMPTY_PARTS.has(t)) blocks.splice(i, 1);
2139
+ if (blocks[i].type === "table" && t && _chunkDFFUNHVLcjs.EMPTY_PARTS.has(t)) blocks.splice(i, 1);
2139
2140
  }
2140
2141
  }
2141
2142
  function mergeColumnFlow(blocks, pageHeights, lex) {
2142
2143
  if (!pageHeights) return;
2143
2144
  for (let i = 0; i < blocks.length; i++) {
2144
2145
  const L = blocks[i];
2145
- if (L.type !== "table" || !L.table || !L.bbox || !L.pageNumber || !_chunkEQO6PYJFcjs.CLIP_TABLES.has(L.table) || _chunkEQO6PYJFcjs.EMPTY_PARTS.has(L.table)) continue;
2146
+ if (L.type !== "table" || !L.table || !L.bbox || !L.pageNumber || !_chunkDFFUNHVLcjs.CLIP_TABLES.has(L.table) || _chunkDFFUNHVLcjs.EMPTY_PARTS.has(L.table)) continue;
2146
2147
  const ph = pageHeights.get(L.pageNumber);
2147
2148
  if (!ph || L.bbox.y > ph * PAGE_EDGE_BAND) continue;
2148
2149
  let s0 = i, s1 = i;
@@ -2161,8 +2162,8 @@ function mergeColumnFlow(blocks, pageHeights, lex) {
2161
2162
  if (Math.abs(R.bbox.width - L.bbox.width) > Math.max(R.bbox.width, L.bbox.width) * NEIGHBOR_TABLE_EPSILON) continue;
2162
2163
  if (!looksContinued(L, R) || restartsTable(blocks, i, R.table, pageHeights)) continue;
2163
2164
  const rt = R.table;
2164
- if (rt.rows === 1 && rt.cols === 1 && !_chunkEQO6PYJFcjs.CLIP_TABLES.has(rt) && L.table.rows >= 2) {
2165
- const px = _chunkEQO6PYJFcjs.TABLE_COLXS.get(L.table), lb = L.bbox;
2165
+ if (rt.rows === 1 && rt.cols === 1 && !_chunkDFFUNHVLcjs.CLIP_TABLES.has(rt) && L.table.rows >= 2) {
2166
+ const px = _chunkDFFUNHVLcjs.TABLE_COLXS.get(L.table), lb = L.bbox;
2166
2167
  const dx = lb.x + lb.width - (R.bbox.x + R.bbox.width);
2167
2168
  const last = L.table.cells[L.table.rows - 1];
2168
2169
  let col = 0;
@@ -2191,8 +2192,8 @@ function mergeColumnFlow(blocks, pageHeights, lex) {
2191
2192
  }
2192
2193
  function joinClipParts(prev, curr, pageHeights, lex) {
2193
2194
  const pt = prev.table, ct = curr.table;
2194
- if (!_chunkEQO6PYJFcjs.CLIP_TABLES.has(pt) || !_chunkEQO6PYJFcjs.CLIP_TABLES.has(ct)) return null;
2195
- const px = _chunkEQO6PYJFcjs.TABLE_COLXS.get(pt), cx = _chunkEQO6PYJFcjs.TABLE_COLXS.get(ct);
2195
+ if (!_chunkDFFUNHVLcjs.CLIP_TABLES.has(pt) || !_chunkDFFUNHVLcjs.CLIP_TABLES.has(ct)) return null;
2196
+ const px = _chunkDFFUNHVLcjs.TABLE_COLXS.get(pt), cx = _chunkDFFUNHVLcjs.TABLE_COLXS.get(ct);
2196
2197
  if (!px || !cx) return null;
2197
2198
  let xs = cx, shifted = false, dx = 0, foreign = false, within = false;
2198
2199
  if (!shiftedSame(px, cx, false)) {
@@ -2208,15 +2209,15 @@ function joinClipParts(prev, curr, pageHeights, lex) {
2208
2209
  const inner = b.slice(1, -1).map((x) => x + dx);
2209
2210
  return inner.length > 0 && !inner.some((x) => px.some((p) => Math.abs(p - x) <= CONTINUATION_COL_TOL));
2210
2211
  };
2211
- foreign = unrelated(cx) && unrelated(_nullishCoalesce(_chunkEQO6PYJFcjs.PART_COLXS.get(ct), () => ( cx))) && (headingRow(_nullishCoalesce(ct.cells[0], () => ( []))) || px.length > FOREIGN_FIRST_ROW_CELLS && anchorsOf(ct).filter((a) => a.r === 0).length >= FOREIGN_FIRST_ROW_CELLS);
2212
+ foreign = unrelated(cx) && unrelated(_nullishCoalesce(_chunkDFFUNHVLcjs.PART_COLXS.get(ct), () => ( cx))) && (headingRow(_nullishCoalesce(ct.cells[0], () => ( []))) || px.length > FOREIGN_FIRST_ROW_CELLS && anchorsOf(ct).filter((a) => a.r === 0).length >= FOREIGN_FIRST_ROW_CELLS);
2212
2213
  }
2213
2214
  const res = joinSplitParts(pt, px, ct, xs, dx, _optionalChain([prev, 'access', _202 => _202.bbox, 'optionalAccess', _203 => _203.y]), lex);
2214
2215
  if (!res || (shifted || foreign || within) && !res.split && !res.header) return null;
2215
- _chunkEQO6PYJFcjs.TABLE_COLXS.set(res.table, res.colXs);
2216
- const ys = _chunkEQO6PYJFcjs.TABLE_ROWYS.get(pt);
2217
- if (ys) _chunkEQO6PYJFcjs.TABLE_ROWYS.set(res.table, ys);
2218
- _chunkEQO6PYJFcjs.PART_COLXS.set(res.table, _nullishCoalesce(_chunkEQO6PYJFcjs.PART_COLXS.get(pt), () => ( px)));
2219
- _chunkEQO6PYJFcjs.CLIP_TABLES.add(res.table);
2216
+ _chunkDFFUNHVLcjs.TABLE_COLXS.set(res.table, res.colXs);
2217
+ const ys = _chunkDFFUNHVLcjs.TABLE_ROWYS.get(pt);
2218
+ if (ys) _chunkDFFUNHVLcjs.TABLE_ROWYS.set(res.table, ys);
2219
+ _chunkDFFUNHVLcjs.PART_COLXS.set(res.table, _nullishCoalesce(_chunkDFFUNHVLcjs.PART_COLXS.get(pt), () => ( px)));
2220
+ _chunkDFFUNHVLcjs.CLIP_TABLES.add(res.table);
2220
2221
  return res.table;
2221
2222
  }
2222
2223
  function prevLacksLeftCols(prev, px, xs, pageHeights) {
@@ -2240,12 +2241,12 @@ function looksContinued(prev, curr, pageHeights) {
2240
2241
  return filled.length >= 2 && filled.every((t) => t === filled[0]);
2241
2242
  }
2242
2243
  function pushedLead(prev, curr) {
2243
- if (!_chunkEQO6PYJFcjs.CLIP_TABLES.has(prev.table) || !_chunkEQO6PYJFcjs.CLIP_TABLES.has(curr.table)) return false;
2244
+ if (!_chunkDFFUNHVLcjs.CLIP_TABLES.has(prev.table) || !_chunkDFFUNHVLcjs.CLIP_TABLES.has(curr.table)) return false;
2244
2245
  const lead = leadRows(curr.table);
2245
2246
  return lead.image && lead.height > prev.bbox.y;
2246
2247
  }
2247
2248
  function leadRows(t) {
2248
- const ys = _chunkEQO6PYJFcjs.TABLE_ROWYS.get(t);
2249
+ const ys = _chunkDFFUNHVLcjs.TABLE_ROWYS.get(t);
2249
2250
  if (!ys || ys.length < 2) return { height: 0, image: false };
2250
2251
  const anchors = anchorsOf(t);
2251
2252
  let end = 1, image = false;
@@ -2253,17 +2254,17 @@ function leadRows(t) {
2253
2254
  for (const a of anchors) {
2254
2255
  if (a.r !== r) continue;
2255
2256
  end = Math.max(end, r + a.rs);
2256
- if (_chunkEQO6PYJFcjs.IMAGE_CELLS.has(a.cell)) image = true;
2257
+ if (_chunkDFFUNHVLcjs.IMAGE_CELLS.has(a.cell)) image = true;
2257
2258
  }
2258
2259
  }
2259
2260
  return { height: ys[0] - ys[Math.min(end, ys.length - 1)], image };
2260
2261
  }
2261
2262
  function tailOf(b) {
2262
- const t = b.table && _chunkEQO6PYJFcjs.TABLE_TAIL.get(b.table);
2263
+ const t = b.table && _chunkDFFUNHVLcjs.TABLE_TAIL.get(b.table);
2263
2264
  return t && b.bbox ? { ...b, pageNumber: t.page, bbox: { ...b.bbox, page: t.page, y: t.y, height: t.height } } : b;
2264
2265
  }
2265
2266
  function firstRowSig(t) {
2266
- const x = _chunkEQO6PYJFcjs.TABLE_COLXS.get(t);
2267
+ const x = _chunkDFFUNHVLcjs.TABLE_COLXS.get(t);
2267
2268
  if (!x || x.length !== t.cols + 1) return null;
2268
2269
  return anchorsOf(t).filter((a) => a.r === 0).map((a) => ({ x1: x[a.c], x2: x[a.c + a.cs], t: flowText(a.cell.text).replace(/\s+/g, "") }));
2269
2270
  }
@@ -2316,7 +2317,7 @@ function chainHead(blocks, i, pageHeights) {
2316
2317
  if (pb.pageNumber !== (_nullishCoalesce(cur.pageNumber, () => ( 0))) - 1) break;
2317
2318
  if (!blocks.slice(p + 1, k).every((b) => besideOwn(b, pb, cur) || insideTable(b, pb) || pageNumberBetween(b, pb, cur, pageHeights))) break;
2318
2319
  if (!looksContinued(pb, cur, pageHeights)) break;
2319
- const px = _chunkEQO6PYJFcjs.TABLE_COLXS.get(pb.table), cx = _chunkEQO6PYJFcjs.TABLE_COLXS.get(cur.table);
2320
+ const px = _chunkDFFUNHVLcjs.TABLE_COLXS.get(pb.table), cx = _chunkDFFUNHVLcjs.TABLE_COLXS.get(cur.table);
2320
2321
  if (!px || !cx) break;
2321
2322
  const dx = px[px.length - 1] - cx[cx.length - 1];
2322
2323
  if (!shiftedSame(px, cx) && !px.some((x) => Math.abs(x - (cx[0] + dx)) <= CONTINUATION_COL_TOL) && !prevLacksLeftCols(pb, px, cx, pageHeights)) break;
@@ -2387,7 +2388,7 @@ var RESTART_LOOKBACK_PAGES = 5;
2387
2388
  var COL_MATCH_TOL = 0.5;
2388
2389
  var CONTINUED_TABLE_PAGE_BAND = 0.16;
2389
2390
  function lastRowCell(t, x1, x2) {
2390
- const xs = _chunkEQO6PYJFcjs.TABLE_COLXS.get(t);
2391
+ const xs = _chunkDFFUNHVLcjs.TABLE_COLXS.get(t);
2391
2392
  const covered = /* @__PURE__ */ new Set();
2392
2393
  for (let r = 0; r < t.rows; r++) {
2393
2394
  for (let c = 0; c < t.cols; c++) {
@@ -2405,7 +2406,7 @@ var cellBlocks = (cell, pageNumber) => _nullishCoalesce(cell.blocks, () => ( cel
2405
2406
  function mergeContinuedCells(blocks, pageHeights) {
2406
2407
  for (let j = blocks.length - 1; j > 0; j--) {
2407
2408
  const part = blocks[j];
2408
- const from = part.table ? _chunkEQO6PYJFcjs.CONT_PARTS.get(part.table) : void 0;
2409
+ const from = part.table ? _chunkDFFUNHVLcjs.CONT_PARTS.get(part.table) : void 0;
2409
2410
  if (!from || !part.table) {
2410
2411
  unwrapContinuedTable(blocks, j, pageHeights, true);
2411
2412
  continue;
@@ -2421,12 +2422,12 @@ function mergeContinuedCells(blocks, pageHeights) {
2421
2422
  if (cell.blocks || add.blocks) cell.blocks = [...cellBlocks(cell, prev.pageNumber), ...cellBlocks(add, part.pageNumber)];
2422
2423
  else if (part.pageNumber) markContinuedText(cell, add, part.pageNumber);
2423
2424
  cell.text = [cell.text, add.text].filter((s) => s.trim()).join("\n");
2424
- if (_chunkEQO6PYJFcjs.IMAGE_CELLS.has(add)) _chunkEQO6PYJFcjs.IMAGE_CELLS.add(cell);
2425
- _chunkEQO6PYJFcjs.joinCellEdges.call(void 0, cell, add);
2426
- const lines = _chunkEQO6PYJFcjs.CELL_LINES.get(add);
2427
- if (_optionalChain([lines, 'optionalAccess', _227 => _227.length])) _chunkEQO6PYJFcjs.CELL_LINES.set(cell, [..._nullishCoalesce(_chunkEQO6PYJFcjs.CELL_LINES.get(cell), () => ( [])), ...lines]);
2428
- if (part.pageNumber && part.bbox) _chunkEQO6PYJFcjs.TABLE_TAIL.set(prev.table, _nullishCoalesce(_chunkEQO6PYJFcjs.TABLE_TAIL.get(part.table), () => ( { page: part.pageNumber, y: part.bbox.y, height: part.bbox.height })));
2429
- if (cell.text.trim() || _optionalChain([cell, 'access', _228 => _228.blocks, 'optionalAccess', _229 => _229.length]) || _chunkEQO6PYJFcjs.IMAGE_CELLS.has(cell)) _chunkEQO6PYJFcjs.EMPTY_PARTS.delete(prev.table);
2425
+ if (_chunkDFFUNHVLcjs.IMAGE_CELLS.has(add)) _chunkDFFUNHVLcjs.IMAGE_CELLS.add(cell);
2426
+ _chunkDFFUNHVLcjs.joinCellEdges.call(void 0, cell, add);
2427
+ const lines = _chunkDFFUNHVLcjs.CELL_LINES.get(add);
2428
+ if (_optionalChain([lines, 'optionalAccess', _227 => _227.length])) _chunkDFFUNHVLcjs.CELL_LINES.set(cell, [..._nullishCoalesce(_chunkDFFUNHVLcjs.CELL_LINES.get(cell), () => ( [])), ...lines]);
2429
+ if (part.pageNumber && part.bbox) _chunkDFFUNHVLcjs.TABLE_TAIL.set(prev.table, _nullishCoalesce(_chunkDFFUNHVLcjs.TABLE_TAIL.get(part.table), () => ( { page: part.pageNumber, y: part.bbox.y, height: part.bbox.height })));
2430
+ if (cell.text.trim() || _optionalChain([cell, 'access', _228 => _228.blocks, 'optionalAccess', _229 => _229.length]) || _chunkDFFUNHVLcjs.IMAGE_CELLS.has(cell)) _chunkDFFUNHVLcjs.EMPTY_PARTS.delete(prev.table);
2430
2431
  blocks.splice(j, 1);
2431
2432
  if (cell.blocks && at > 0) {
2432
2433
  const nextAt = cell.blocks[at];
@@ -2438,11 +2439,11 @@ function mergeContinuedCells(blocks, pageHeights) {
2438
2439
  }
2439
2440
  function unwrapContinuedTable(blocks, at, pageHeights, splitOnly = false) {
2440
2441
  const prev = blocks[at - 1], frame = blocks[at];
2441
- if (!_optionalChain([prev, 'optionalAccess', _230 => _230.table]) || !_optionalChain([frame, 'optionalAccess', _231 => _231.table]) || frame.table.rows !== 1 || frame.table.cols !== 1 || !_chunkEQO6PYJFcjs.CLIP_TABLES.has(frame.table)) return;
2442
+ if (!_optionalChain([prev, 'optionalAccess', _230 => _230.table]) || !_optionalChain([frame, 'optionalAccess', _231 => _231.table]) || frame.table.rows !== 1 || frame.table.cols !== 1 || !_chunkDFFUNHVLcjs.CLIP_TABLES.has(frame.table)) return;
2442
2443
  const inner = _optionalChain([frame, 'access', _232 => _232.table, 'access', _233 => _233.cells, 'access', _234 => _234[0], 'optionalAccess', _235 => _235[0], 'optionalAccess', _236 => _236.blocks]);
2443
2444
  const next = _optionalChain([inner, 'optionalAccess', _237 => _237[0]]);
2444
- if (!inner || !_optionalChain([next, 'optionalAccess', _238 => _238.table]) || !prev.bbox || !next.bbox || !prev.pageNumber || next.pageNumber !== prev.pageNumber + 1 || !_chunkEQO6PYJFcjs.CLIP_TABLES.has(prev.table) || !_chunkEQO6PYJFcjs.CLIP_TABLES.has(next.table) || prev.table.cols !== next.table.cols) return;
2445
- const px = _chunkEQO6PYJFcjs.TABLE_COLXS.get(prev.table), nx = _chunkEQO6PYJFcjs.TABLE_COLXS.get(next.table);
2445
+ if (!inner || !_optionalChain([next, 'optionalAccess', _238 => _238.table]) || !prev.bbox || !next.bbox || !prev.pageNumber || next.pageNumber !== prev.pageNumber + 1 || !_chunkDFFUNHVLcjs.CLIP_TABLES.has(prev.table) || !_chunkDFFUNHVLcjs.CLIP_TABLES.has(next.table) || prev.table.cols !== next.table.cols) return;
2446
+ const px = _chunkDFFUNHVLcjs.TABLE_COLXS.get(prev.table), nx = _chunkDFFUNHVLcjs.TABLE_COLXS.get(next.table);
2446
2447
  if (!px || !nx || px.length !== nx.length || px.some((x, i) => Math.abs(x - nx[i]) > COL_MATCH_TOL)) return;
2447
2448
  const ph = _optionalChain([pageHeights, 'optionalAccess', _239 => _239.get, 'call', _240 => _240(prev.pageNumber)]), nh = _optionalChain([pageHeights, 'optionalAccess', _241 => _241.get, 'call', _242 => _242(next.pageNumber)]);
2448
2449
  if (!ph || !nh || prev.bbox.y > ph * CONTINUED_TABLE_PAGE_BAND || next.bbox.y + next.bbox.height < nh * (1 - CONTINUED_TABLE_PAGE_BAND)) return;
@@ -2452,15 +2453,15 @@ function unwrapContinuedTable(blocks, at, pageHeights, splitOnly = false) {
2452
2453
  function fillNestedContinuation(blocks, at) {
2453
2454
  const prev = blocks[at - 1], next = blocks[at];
2454
2455
  const t = _optionalChain([prev, 'optionalAccess', _245 => _245.table]), u = _optionalChain([next, 'optionalAccess', _246 => _246.table]);
2455
- if (!t || !u || u.rows !== 1 || u.cols !== 1 || !_chunkEQO6PYJFcjs.CLIP_TABLES.has(t) || !_chunkEQO6PYJFcjs.CLIP_TABLES.has(u) || next.pageNumber !== (_nullishCoalesce(prev.pageNumber, () => ( 0))) + 1) return;
2456
- const xs = _chunkEQO6PYJFcjs.TABLE_COLXS.get(u);
2456
+ if (!t || !u || u.rows !== 1 || u.cols !== 1 || !_chunkDFFUNHVLcjs.CLIP_TABLES.has(t) || !_chunkDFFUNHVLcjs.CLIP_TABLES.has(u) || next.pageNumber !== (_nullishCoalesce(prev.pageNumber, () => ( 0))) + 1) return;
2457
+ const xs = _chunkDFFUNHVLcjs.TABLE_COLXS.get(u);
2457
2458
  const cell = xs ? lastRowCell(t, xs[0], xs[xs.length - 1]) : void 0;
2458
2459
  const add = _optionalChain([u, 'access', _247 => _247.cells, 'access', _248 => _248[0], 'optionalAccess', _249 => _249[0]]);
2459
- if (!cell || !add || cell.text.trim() || _optionalChain([cell, 'access', _250 => _250.blocks, 'optionalAccess', _251 => _251.length]) || _chunkEQO6PYJFcjs.IMAGE_CELLS.has(cell)) return;
2460
+ if (!cell || !add || cell.text.trim() || _optionalChain([cell, 'access', _250 => _250.blocks, 'optionalAccess', _251 => _251.length]) || _chunkDFFUNHVLcjs.IMAGE_CELLS.has(cell)) return;
2460
2461
  cell.text = add.text;
2461
2462
  if (add.blocks) cell.blocks = add.blocks;
2462
- if (_chunkEQO6PYJFcjs.IMAGE_CELLS.has(add)) _chunkEQO6PYJFcjs.IMAGE_CELLS.add(cell);
2463
- _chunkEQO6PYJFcjs.joinCellEdges.call(void 0, cell, add);
2463
+ if (_chunkDFFUNHVLcjs.IMAGE_CELLS.has(add)) _chunkDFFUNHVLcjs.IMAGE_CELLS.add(cell);
2464
+ _chunkDFFUNHVLcjs.joinCellEdges.call(void 0, cell, add);
2464
2465
  blocks.splice(at, 1);
2465
2466
  }
2466
2467
 
@@ -3060,12 +3061,12 @@ function restoreUnmappedGlyphs(items, fnArray, argsArray, fontObj) {
3060
3061
  }
3061
3062
  }
3062
3063
  for (const q of queues.values()) for (let k = 0; k < q.length; k++) {
3063
- const pair = k + 1 < q.length ? _chunkELOZVH5Scjs.pairedNumber.call(void 0, q[k], q[k + 1]) : void 0;
3064
+ const pair = k + 1 < q.length ? _chunk4OA4D6TWcjs.pairedNumber.call(void 0, q[k], q[k + 1]) : void 0;
3064
3065
  if (pair !== void 0) {
3065
3066
  q[k] = pair;
3066
3067
  q[k + 1] = "";
3067
3068
  k++;
3068
- } else q[k] = _chunkELOZVH5Scjs.mapPuaText.call(void 0, q[k]);
3069
+ } else q[k] = _chunk4OA4D6TWcjs.mapPuaText.call(void 0, q[k]);
3069
3070
  }
3070
3071
  const byFont = /* @__PURE__ */ new Map();
3071
3072
  for (const it of items) {
@@ -3155,15 +3156,15 @@ function selectionContextPages(selected, pageCount) {
3155
3156
  function marginContextBlocks(raw, page, view) {
3156
3157
  const [x1, y1, x2, y2] = view;
3157
3158
  const width = x2 - x1, height = y2 - y1;
3158
- const items = _chunkEQO6PYJFcjs.filterHiddenText.call(void 0, _chunkEQO6PYJFcjs.normalizeItems.call(void 0, raw), width, height, x1, y1).visible;
3159
+ const items = _chunkDFFUNHVLcjs.filterHiddenText.call(void 0, _chunkDFFUNHVLcjs.normalizeItems.call(void 0, raw), width, height, x1, y1).visible;
3159
3160
  for (const item of items) {
3160
3161
  item.x -= x1;
3161
3162
  item.y -= y1;
3162
3163
  }
3163
- return _chunkEQO6PYJFcjs.groupByY.call(void 0, items).flatMap((line) => {
3164
- const bbox = _chunkEQO6PYJFcjs.computeBBox.call(void 0, line, page);
3164
+ return _chunkDFFUNHVLcjs.groupByY.call(void 0, items).flatMap((line) => {
3165
+ const bbox = _chunkDFFUNHVLcjs.computeBBox.call(void 0, line, page);
3165
3166
  if (bbox.y + bbox.height < height * 0.88 && bbox.y > height * 0.12) return [];
3166
- return [{ type: "paragraph", text: _chunkEQO6PYJFcjs.mergeLineSimple.call(void 0, line), pageNumber: page, bbox, style: _chunkEQO6PYJFcjs.dominantStyle.call(void 0, line) }];
3167
+ return [{ type: "paragraph", text: _chunkDFFUNHVLcjs.mergeLineSimple.call(void 0, line), pageNumber: page, bbox, style: _chunkDFFUNHVLcjs.dominantStyle.call(void 0, line) }];
3167
3168
  });
3168
3169
  }
3169
3170
 
@@ -3199,7 +3200,7 @@ var WINANSI_REVERSE = {
3199
3200
  };
3200
3201
  function symbolFontTable(fontName) {
3201
3202
  if (!fontName) return void 0;
3202
- if (/wingdings(?![\s-]*[23])/i.test(fontName)) return _chunkELOZVH5Scjs.WINGDINGS;
3203
+ if (/wingdings(?![\s-]*[23])/i.test(fontName)) return _chunk4OA4D6TWcjs.WINGDINGS;
3203
3204
  return void 0;
3204
3205
  }
3205
3206
  function remapSymbolText(text, table) {
@@ -3432,7 +3433,7 @@ function wrapEquationRuns(items, faceName) {
3432
3433
  for (const i of members) drop.add(i);
3433
3434
  const toks = cur.map((it) => {
3434
3435
  const bar2 = isBarItem(it);
3435
- const text = bar2 ? "" : plain2.has(items.indexOf(it)) ? _chunkELOZVH5Scjs.toTex.call(void 0, it.text) : FUNC_RE.test(it.text.trim()) ? it.text.trim() : [...it.text].map(decodeEq).join("");
3436
+ const text = bar2 ? "" : plain2.has(items.indexOf(it)) ? _chunk4OA4D6TWcjs.toTex.call(void 0, it.text) : FUNC_RE.test(it.text.trim()) ? it.text.trim() : [...it.text].map(decodeEq).join("");
3436
3437
  return { text, x: it.x, y: it.y, w: it.w, size: sizeOf(it), bar: bar2 };
3437
3438
  });
3438
3439
  const tex = layout(toks).replace(/\}\\text\{/g, "");
@@ -3960,8 +3961,9 @@ function joinLoneColumns(items) {
3960
3961
  // src/pdf/tracked-text.ts
3961
3962
 
3962
3963
  var TRACKED = /^(?:[^\s\u1100-\u11ff\u3130-\u318f\uac00-\ud7a3] ){3,}[^\s\u1100-\u11ff\u3130-\u318f\uac00-\ud7a3]$/;
3964
+ var SPACED_NUMBER = /^(?=[^\d]*\d)(?=\S* )[\d\s\-().·,☎]+$/;
3963
3965
  function restoreTrackedSpacing(items, fnArray, argsArray) {
3964
- if (!items.some((it) => TRACKED.test(_nullishCoalesce(it.str, () => ( ""))))) return 0;
3966
+ if (!items.some((it) => TRACKED.test(_nullishCoalesce(it.str, () => ( ""))) || SPACED_NUMBER.test((_nullishCoalesce(it.str, () => ( ""))).trim()))) return 0;
3965
3967
  const streams = /* @__PURE__ */ new Map();
3966
3968
  const saved = [];
3967
3969
  let font = "";
@@ -4007,6 +4009,10 @@ function restoreTrackedSpacing(items, fnArray, argsArray) {
4007
4009
  it.str = rebuilt;
4008
4010
  changed++;
4009
4011
  }
4012
+ } else if (SPACED_NUMBER.test(it.str.trim()) && /\S\s+\S/.test(text)) {
4013
+ it.str = text.replace(/\s+/g, " ").trim();
4014
+ it.glyphSpaced = true;
4015
+ changed++;
4010
4016
  }
4011
4017
  }
4012
4018
  return changed;
@@ -4343,7 +4349,7 @@ function mergeEnclosedDigits(items) {
4343
4349
  if (!/^\d\d?$/.test(digits)) continue;
4344
4350
  const mid = (inside2[0].x + inside2[inside2.length - 1].x + inside2[inside2.length - 1].w) / 2;
4345
4351
  if (Math.abs(mid - (s.x + s.w / 2)) > s.fontSize * 0.15) continue;
4346
- s.text = _chunkELOZVH5Scjs.enclosedNumber.call(void 0, Number(digits));
4352
+ s.text = _chunk4OA4D6TWcjs.enclosedNumber.call(void 0, Number(digits));
4347
4353
  for (const d of inside2) drop.add(d);
4348
4354
  }
4349
4355
  if (!drop.size) return;
@@ -4540,7 +4546,7 @@ function demoteNonHeadingRoles(blocks, pageHeights, faceNames) {
4540
4546
  if (block.type !== "heading" || !block.text) continue;
4541
4547
  const text = block.text.replace(/<[^>]+>/g, "").trim();
4542
4548
  const fsz = _nullishCoalesce(_optionalChain([block, 'access', _335 => _335.style, 'optionalAccess', _336 => _336.fontSize]), () => ( 0));
4543
- const tocEntry = i > 0 && _chunkEQO6PYJFcjs.TOC_BLOCKS.has(blocks[i - 1]) && _chunkEQO6PYJFcjs.TOC_BLOCKS.has(blocks[i + 1]);
4549
+ const tocEntry = i > 0 && _chunkDFFUNHVLcjs.TOC_BLOCKS.has(blocks[i - 1]) && _chunkDFFUNHVLcjs.TOC_BLOCKS.has(blocks[i + 1]);
4544
4550
  const page = _nullishCoalesce(byPage.get(_nullishCoalesce(block.pageNumber, () => ( 0))), () => ( []));
4545
4551
  const proseStyle = _optionalChain([block, 'access', _337 => _337.style, 'optionalAccess', _338 => _338.fontName]) && bodyStyle.get(_nullishCoalesce(block.pageNumber, () => ( 0))) === `${block.style.fontName}:${block.style.fontSize}` && text.length > 60;
4546
4552
  const next = blocks[i + 1];
@@ -4638,7 +4644,7 @@ function splitSingleCellTables(blocks) {
4638
4644
  const out = [];
4639
4645
  for (const b of blocks) {
4640
4646
  const t = b.type === "table" ? b.table : void 0;
4641
- const title = t && _chunkEQO6PYJFcjs.FRAME_TITLE_BLOCKS.get(t);
4647
+ const title = t && _chunkDFFUNHVLcjs.FRAME_TITLE_BLOCKS.get(t);
4642
4648
  if (title) {
4643
4649
  out.push({ ...title, text: `${t.cells[0][0].text.trim()} ${t.cells[0][2].text.trim()}` });
4644
4650
  continue;
@@ -4674,7 +4680,7 @@ function joinLatinCellWraps(blocks) {
4674
4680
  const lines = cell.text.split("\n");
4675
4681
  const out = [lines[0]];
4676
4682
  for (const line of lines.slice(1)) {
4677
- if (_chunkEQO6PYJFcjs.latinSoftWrap.call(void 0, out[out.length - 1], line)) out[out.length - 1] = out[out.length - 1].trimEnd() + " " + line.trim();
4683
+ if (_chunkDFFUNHVLcjs.latinSoftWrap.call(void 0, out[out.length - 1], line)) out[out.length - 1] = out[out.length - 1].trimEnd() + " " + line.trim();
4678
4684
  else out.push(line);
4679
4685
  }
4680
4686
  cell.text = out.join("\n");
@@ -4694,10 +4700,10 @@ function cleanPdfText(text, opts) {
4694
4700
  ).replace(/^(?!\| ---).*$/gm, (line) => {
4695
4701
  if (/^\s*\${1,2}.+\${1,2}\s*$/.test(line)) return line;
4696
4702
  if (line.startsWith("|")) {
4697
- return line.replace(/(?:\\.|[^|\\])+/g, (cell) => cell.split("<br>").map((seg) => seg.replace(/\S(?:.*\S)?/, (t) => _chunkEQO6PYJFcjs.collapseEvenSpacing.call(void 0, t, false))).join("<br>"));
4703
+ return line.replace(/(?:\\.|[^|\\])+/g, (cell) => cell.split("<br>").map((seg) => seg.replace(/\S(?:.*\S)?/, (t) => _chunkDFFUNHVLcjs.collapseEvenSpacing.call(void 0, t, false))).join("<br>"));
4698
4704
  }
4699
4705
  const mark = _nullishCoalesce(_optionalChain([/^(?:#{1,6}|-) /, 'access', _418 => _418.exec, 'call', _419 => _419(line), 'optionalAccess', _420 => _420[0]]), () => ( ""));
4700
- return mark + _chunkEQO6PYJFcjs.collapseEvenSpacing.call(void 0, line.slice(mark.length), false);
4706
+ return mark + _chunkDFFUNHVLcjs.collapseEvenSpacing.call(void 0, line.slice(mark.length), false);
4701
4707
  }).replace(/\\~\\~/g, "~~").replace(/~~~~/g, "").replace(/<u>\s*<\/u>/g, "").replace(/<(sup|sub)>\s*<\/\1>/g, "").replace(/\n{3,}/g, "\n\n").trim();
4702
4708
  }
4703
4709
  function startsWithMarker(line) {
@@ -4729,7 +4735,7 @@ function mergeKoreanLines(text) {
4729
4735
  continue;
4730
4736
  }
4731
4737
  if (/[가-힣·,\-]$/.test(prev) && /^[가-힣(]/.test(curr) && !startsWithMarker(curr) && !isStandaloneHeader(prev) && !startsWithMarker(prev)) {
4732
- result[result.length - 1] = prev + _chunkEQO6PYJFcjs.wrapJoiner.call(void 0, prev, curr) + curr;
4738
+ result[result.length - 1] = prev + _chunkDFFUNHVLcjs.wrapJoiner.call(void 0, prev, curr) + curr;
4733
4739
  } else {
4734
4740
  result.push(curr);
4735
4741
  }
@@ -4745,7 +4751,7 @@ function applyLinkAnnotations(items, annots) {
4745
4751
  const wrapped = /* @__PURE__ */ new Set();
4746
4752
  for (const a of annots) {
4747
4753
  if (a.subtype !== "Link" || !a.url || !a.rect || a.rect.length < 4) continue;
4748
- const url = _chunkXMNGFHK6cjs.sanitizeHref.call(void 0, a.url);
4754
+ const url = _chunkY7LMYK5Ccjs.sanitizeHref.call(void 0, a.url);
4749
4755
  if (!url) continue;
4750
4756
  const x1 = Math.min(a.rect[0], a.rect[2]), x2 = Math.max(a.rect[0], a.rect[2]);
4751
4757
  const y1 = Math.min(a.rect[1], a.rect[3]), y2 = Math.max(a.rect[1], a.rect[3]);
@@ -4797,7 +4803,7 @@ function mergeLinkRuns(markdown) {
4797
4803
 
4798
4804
  // src/pdf/formula-ocr.ts
4799
4805
  async function applyFormulaOcr(buffer, blocks, pageFilter, effectivePageCount, warnings, _onProgress) {
4800
- const formulaMod = await Promise.resolve().then(() => _interopRequireWildcard(require("./formula-X4J6TPFE.cjs")));
4806
+ const formulaMod = await Promise.resolve().then(() => _interopRequireWildcard(require("./formula-OOTFS5XV.cjs")));
4801
4807
  const { FormulaPipeline, ensureFormulaModels } = formulaMod;
4802
4808
  await ensureFormulaModels((p) => {
4803
4809
  if (p.phase === "download" && p.total) {
@@ -4988,13 +4994,13 @@ async function loadPdfWithTimeout(buffer, data) {
4988
4994
  try {
4989
4995
  return await Promise.race([
4990
4996
  loadingTask.promise.catch((e) => {
4991
- if (e instanceof Error && e.name === "PasswordException") throw new (0, _chunkXMNGFHK6cjs.KordocError)("\uC554\uD638\uB85C \uBCF4\uD638\uB41C PDF \uD30C\uC77C\uC785\uB2C8\uB2E4 (PDF \uC5F4\uAE30 \uC554\uD638\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4)");
4997
+ if (e instanceof Error && e.name === "PasswordException") throw new (0, _chunkY7LMYK5Ccjs.KordocError)("\uC554\uD638\uB85C \uBCF4\uD638\uB41C PDF \uD30C\uC77C\uC785\uB2C8\uB2E4 (PDF \uC5F4\uAE30 \uC554\uD638\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4)");
4992
4998
  throw e;
4993
4999
  }),
4994
5000
  new Promise((_, reject) => {
4995
5001
  timer = setTimeout(() => {
4996
5002
  loadingTask.destroy();
4997
- reject(new (0, _chunkXMNGFHK6cjs.KordocError)("PDF \uB85C\uB529 \uD0C0\uC784\uC544\uC6C3 (30\uCD08 \uCD08\uACFC)"));
5003
+ reject(new (0, _chunkY7LMYK5Ccjs.KordocError)("PDF \uB85C\uB529 \uD0C0\uC784\uC544\uC6C3 (30\uCD08 \uCD08\uACFC)"));
4998
5004
  }, PDF_LOAD_TIMEOUT_MS);
4999
5005
  })
5000
5006
  ]);
@@ -5005,8 +5011,8 @@ async function loadPdfWithTimeout(buffer, data) {
5005
5011
  async function parsePdfDocument(buffer, options) {
5006
5012
  const formulaBuffer = _optionalChain([options, 'optionalAccess', _421 => _421.formulaOcr]) ? buffer : null;
5007
5013
  const ocrOptionError = _chunkMMK32GPDcjs.validateOcrOptions.call(void 0, options);
5008
- if (ocrOptionError) throw new (0, _chunkXMNGFHK6cjs.KordocError)(ocrOptionError);
5009
- const autoOcr = _optionalChain([options, 'optionalAccess', _422 => _422.ocr]) === void 0 && await _chunkEQO6PYJFcjs.ocrModelsCached.call(void 0, _chunkEQO6PYJFcjs.resolveOcrModels.call(void 0, options)) && (_optionalChain([options, 'optionalAccess', _423 => _423.ocrRec]) !== "auto" || await _chunkEQO6PYJFcjs.ocrModelsCached.call(void 0, _chunkEQO6PYJFcjs.handwritingFallbackModels.call(void 0, _chunkEQO6PYJFcjs.resolveOcrModels.call(void 0, options))));
5014
+ if (ocrOptionError) throw new (0, _chunkY7LMYK5Ccjs.KordocError)(ocrOptionError);
5015
+ const autoOcr = _optionalChain([options, 'optionalAccess', _422 => _422.ocr]) === void 0 && await _chunkDFFUNHVLcjs.ocrModelsCached.call(void 0, _chunkDFFUNHVLcjs.resolveOcrModels.call(void 0, options)) && (_optionalChain([options, 'optionalAccess', _423 => _423.ocrRec]) !== "auto" || await _chunkDFFUNHVLcjs.ocrModelsCached.call(void 0, _chunkDFFUNHVLcjs.handwritingFallbackModels.call(void 0, _chunkDFFUNHVLcjs.resolveOcrModels.call(void 0, options))));
5010
5016
  const ocrBuffer = _optionalChain([options, 'optionalAccess', _424 => _424.ocr]) || autoOcr ? buffer : null;
5011
5017
  const pdfjsData = new Uint8Array(buffer.slice(0));
5012
5018
  const blanked = blankLargeImageStreams(pdfjsData);
@@ -5018,7 +5024,7 @@ async function parsePdfDocument(buffer, options) {
5018
5024
  let pristine;
5019
5025
  try {
5020
5026
  const pageCount = doc.numPages;
5021
- if (pageCount === 0) throw new (0, _chunkXMNGFHK6cjs.KordocError)("PDF\uC5D0 \uD398\uC774\uC9C0\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.");
5027
+ if (pageCount === 0) throw new (0, _chunkY7LMYK5Ccjs.KordocError)("PDF\uC5D0 \uD398\uC774\uC9C0\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.");
5022
5028
  const metadata = { pageCount, pageMode: "layout" };
5023
5029
  await extractPdfMetadata(doc, metadata);
5024
5030
  const blocks = [];
@@ -5044,8 +5050,8 @@ async function parsePdfDocument(buffer, options) {
5044
5050
  const encodeWebp = wantWebp ? await _chunkTV7B6DJQcjs.loadWebpEncoder.call(void 0, ) : null;
5045
5051
  if (wantWebp && !encodeWebp) warnings.push(_chunkTV7B6DJQcjs.WEBP_UNAVAILABLE);
5046
5052
  const imageState = createPdfImageState(pdfium ? { decoder: pdfium, sizes: blanked.sizes, pristine: () => pristine ??= loadPdfWithTimeout(buffer) } : void 0, _nullishCoalesce(encodeWebp, () => ( void 0)), _optionalChain([options, 'optionalAccess', _430 => _430.imagePlacement]) === "flow", !!_optionalChain([options, 'optionalAccess', _431 => _431.dropBlankImages]) && _optionalChain([options, 'optionalAccess', _432 => _432.images]) !== false);
5047
- const readQr = _optionalChain([options, 'optionalAccess', _433 => _433.qrCodes]) ? await _chunkQRNA3W7Bcjs.loadQrReader.call(void 0, ) : null;
5048
- if (_optionalChain([options, 'optionalAccess', _434 => _434.qrCodes]) && !readQr) warnings.push(_chunkQRNA3W7Bcjs.QR_UNAVAILABLE);
5053
+ const readQr = _optionalChain([options, 'optionalAccess', _433 => _433.qrCodes]) ? await _chunkPBTLZYKWcjs.loadQrReader.call(void 0, ) : null;
5054
+ if (_optionalChain([options, 'optionalAccess', _434 => _434.qrCodes]) && !readQr) warnings.push(_chunkPBTLZYKWcjs.QR_UNAVAILABLE);
5049
5055
  const imageBulletShapes = /* @__PURE__ */ new Map();
5050
5056
  const imageArrowDirections = /* @__PURE__ */ new Map();
5051
5057
  const extractedImages = [];
@@ -5054,7 +5060,7 @@ async function parsePdfDocument(buffer, options) {
5054
5060
  const hancomPdf = await isHancomPdf(doc);
5055
5061
  const preciseGaps = hancomPdf || await isPreciseGapProducer(doc);
5056
5062
  const vectorPageOps = /* @__PURE__ */ new Map();
5057
- const wrapLexicon = new (0, _chunkEQO6PYJFcjs.WrapLexicon)();
5063
+ const wrapLexicon = new (0, _chunkDFFUNHVLcjs.WrapLexicon)();
5058
5064
  const noteMarks = /* @__PURE__ */ new Map();
5059
5065
  const headerContext = [];
5060
5066
  if (pageFilter && _optionalChain([options, 'optionalAccess', _435 => _435.removeHeaderFooter]) !== false && pageFilter.size < effectivePageCount) {
@@ -5106,12 +5112,12 @@ async function parsePdfDocument(buffer, options) {
5106
5112
  if (hancomPdf) joinTrackedHangul(rawItems, rawOps.fnArray, rawOps.argsArray);
5107
5113
  restoreSoftHyphens();
5108
5114
  rawItems.push(...spaceMappedDots(rawOps.fnArray, rawOps.argsArray, (n) => fontObj(n)));
5109
- const items = _chunkEQO6PYJFcjs.normalizeItems.call(void 0, occluded.size ? rawItems.filter((it) => !occluded.has(it)) : rawItems);
5115
+ const items = _chunkDFFUNHVLcjs.normalizeItems.call(void 0, occluded.size ? rawItems.filter((it) => !occluded.has(it)) : rawItems);
5110
5116
  if (!preciseGaps) for (const it of items) {
5111
5117
  delete it.fx;
5112
5118
  delete it.fw;
5113
5119
  }
5114
- const filtered = _chunkEQO6PYJFcjs.filterHiddenText.call(void 0, items, pageW, pageH, viewX1, viewY1);
5120
+ const filtered = _chunkDFFUNHVLcjs.filterHiddenText.call(void 0, items, pageW, pageH, viewX1, viewY1);
5115
5121
  const joined = joinVerticalColumns(filtered.visible);
5116
5122
  const visible = dropTabLeaderDots(joined);
5117
5123
  const hiddenCount = filtered.hiddenCount + occluded.size;
@@ -5138,7 +5144,7 @@ async function parsePdfDocument(buffer, options) {
5138
5144
  } : rawOps;
5139
5145
  remapSymbolFontItems(visible, (loadedName) => _optionalChain([fontObj, 'call', _442 => _442(loadedName), 'optionalAccess', _443 => _443.name]));
5140
5146
  remapControlGlyphs(visible, differencesOf);
5141
- await _chunkEQO6PYJFcjs.restoreImageBullets.call(void 0, visible, page, opList.fnArray, opList.argsArray, imageBulletShapes);
5147
+ await _chunkDFFUNHVLcjs.restoreImageBullets.call(void 0, visible, page, opList.fnArray, opList.argsArray, imageBulletShapes);
5142
5148
  const faces = /* @__PURE__ */ new Map();
5143
5149
  for (const it of visible) {
5144
5150
  if (!it.fontName) continue;
@@ -5151,12 +5157,12 @@ async function parsePdfDocument(buffer, options) {
5151
5157
  it.fontName = face;
5152
5158
  if (!faceNames.has(face)) faceNames.set(face, (_nullishCoalesce(_optionalChain([fontObj, 'call', _445 => _445(face), 'optionalAccess', _446 => _446.name]), () => ( ""))).replace(/^[A-Z]{6}\+/, ""));
5153
5159
  }
5154
- for (const it of visible) if (it.text.includes("$")) it.text = _chunkELOZVH5Scjs.escapeLiteralDollar.call(void 0, it.text);
5155
- for (const it of visible) if (it.text.includes("<")) it.text = _chunkELOZVH5Scjs.escapeLiteralTags.call(void 0, it.text);
5160
+ for (const it of visible) if (it.text.includes("$")) it.text = _chunk4OA4D6TWcjs.escapeLiteralDollar.call(void 0, it.text);
5161
+ for (const it of visible) if (it.text.includes("<")) it.text = _chunk4OA4D6TWcjs.escapeLiteralTags.call(void 0, it.text);
5156
5162
  wrapEquationRuns(visible, (face) => faceNames.get(face));
5157
5163
  const pageArea = pageW * pageH;
5158
5164
  if (pageArea > 0) {
5159
- const imageRegions = _chunkEQO6PYJFcjs.extractImageRegions.call(void 0, opList.fnArray, opList.argsArray);
5165
+ const imageRegions = _chunkDFFUNHVLcjs.extractImageRegions.call(void 0, opList.fnArray, opList.argsArray);
5160
5166
  let uncovered = 0;
5161
5167
  for (const r of imageRegions) {
5162
5168
  const area = (r.x2 - r.x1) * (r.y2 - r.y1);
@@ -5183,11 +5189,11 @@ async function parsePdfDocument(buffer, options) {
5183
5189
  if (uncovered > 0) skippedImagePages.set(i, uncovered);
5184
5190
  }
5185
5191
  const marks = superscriptNoteMarks(visible);
5186
- if (marks.length) noteMarks.set(i, { marks, seps: footnoteSeparators(_chunkEQO6PYJFcjs.extractLines.call(void 0, opList.fnArray, opList.argsArray).horizontals, pageW, pageH) });
5192
+ if (marks.length) noteMarks.set(i, { marks, seps: footnoteSeparators(_chunkDFFUNHVLcjs.extractLines.call(void 0, opList.fnArray, opList.argsArray).horizontals, pageW, pageH) });
5187
5193
  const stamp = marginStamp(visible);
5188
5194
  const flow = stamp.length ? visible.filter((it) => !stamp.includes(it)) : visible;
5189
- const rightArrows = _optionalChain([options, 'optionalAccess', _447 => _447.tables]) !== false ? await _chunkEQO6PYJFcjs.detectRightArrowRegions.call(void 0, page, opList.fnArray, opList.argsArray, imageArrowDirections) : [];
5190
- const pageBlocks = orderTwoUpPage(_chunkEQO6PYJFcjs.extractPageBlocksWithLines.call(void 0, flow, i, opList, pageW, pageH, void 0, _optionalChain([options, 'optionalAccess', _448 => _448.tables]) !== false, carry, wrapLexicon, rightArrows), pageW, pageH);
5195
+ const rightArrows = _optionalChain([options, 'optionalAccess', _447 => _447.tables]) !== false ? await _chunkDFFUNHVLcjs.detectRightArrowRegions.call(void 0, page, opList.fnArray, opList.argsArray, imageArrowDirections) : [];
5196
+ const pageBlocks = orderTwoUpPage(_chunkDFFUNHVLcjs.extractPageBlocksWithLines.call(void 0, flow, i, opList, pageW, pageH, void 0, _optionalChain([options, 'optionalAccess', _448 => _448.tables]) !== false, carry, wrapLexicon, rightArrows), pageW, pageH);
5191
5197
  if (stamp.length) pageBlocks.unshift({ type: "paragraph", text: [...stamp].sort((a, b) => a.y - b.y).map((it) => it.text).join(" "), pageNumber: i });
5192
5198
  for (const b of pageBlocks) blocks.push(b);
5193
5199
  try {
@@ -5213,11 +5219,11 @@ async function parsePdfDocument(buffer, options) {
5213
5219
  if (_optionalChain([options, 'optionalAccess', _450 => _450.ocr]) && quality.ocrReason === "vector_text" && page.rotate % 360 === 0 && page.view[0] === 0 && page.view[1] === 0) {
5214
5220
  vectorPageOps.set(i, ocrVectorOps(opList, vector.paths));
5215
5221
  }
5216
- if (totalTextBytes > MAX_TOTAL_TEXT) throw new (0, _chunkXMNGFHK6cjs.KordocError)("\uD14D\uC2A4\uD2B8 \uCD94\uCD9C \uD06C\uAE30 \uCD08\uACFC");
5222
+ if (totalTextBytes > MAX_TOTAL_TEXT) throw new (0, _chunkY7LMYK5Ccjs.KordocError)("\uD14D\uC2A4\uD2B8 \uCD94\uCD9C \uD06C\uAE30 \uCD08\uACFC");
5217
5223
  parsedPages++;
5218
5224
  _optionalChain([options, 'optionalAccess', _451 => _451.onProgress, 'optionalCall', _452 => _452(parsedPages, totalTarget)]);
5219
5225
  } catch (pageErr) {
5220
- if (pageErr instanceof _chunkXMNGFHK6cjs.KordocError) throw pageErr;
5226
+ if (pageErr instanceof _chunkY7LMYK5Ccjs.KordocError) throw pageErr;
5221
5227
  warnings.push({ page: i, message: `\uD398\uC774\uC9C0 ${i} \uD30C\uC2F1 \uC2E4\uD328: ${pageErr instanceof Error ? pageErr.message : "\uC54C \uC218 \uC5C6\uB294 \uC624\uB958"}`, code: "PARTIAL_PARSE" });
5222
5228
  } finally {
5223
5229
  _optionalChain([loadedPage, 'optionalAccess', _453 => _453.cleanup, 'call', _454 => _454()]);
@@ -5248,12 +5254,12 @@ async function parsePdfDocument(buffer, options) {
5248
5254
  }
5249
5255
  if (targets.size > 0) {
5250
5256
  try {
5251
- const { runPdfOcr } = await Promise.resolve().then(() => _interopRequireWildcard(require("./pdf-ocr-YGAPGMHW.cjs")));
5257
+ const { runPdfOcr } = await Promise.resolve().then(() => _interopRequireWildcard(require("./pdf-ocr-5WUIENJQ.cjs")));
5252
5258
  const mode = typeof _optionalChain([options, 'optionalAccess', _459 => _459.ocr]) === "function" ? options.ocr : "builtin";
5253
5259
  const regionPages = new Map([...ocrRegions].filter(([p]) => _optionalChain([options, 'optionalAccess', _460 => _460.ocr]) !== "force" && !isImageBased && !_optionalChain([pageQuality, 'access', _461 => _461.find, 'call', _462 => _462((q) => q.page === p), 'optionalAccess', _463 => _463.needsOcr])));
5254
- const { builtinOcrConfig } = await Promise.resolve().then(() => _interopRequireWildcard(require("./pdf-ocr-YGAPGMHW.cjs")));
5260
+ const { builtinOcrConfig } = await Promise.resolve().then(() => _interopRequireWildcard(require("./pdf-ocr-5WUIENJQ.cjs")));
5255
5261
  const ocrPageBlocks = await runPdfOcr(ocrBuffer, targets, mode, warnings, _optionalChain([options, 'optionalAccess', _464 => _464.onProgress]), _optionalChain([options, 'optionalAccess', _465 => _465.tables]) !== false, vectorPageOps, regionPages, builtinOcrConfig(options), ocrLinesOut);
5256
- for (const obs of ocrPageBlocks.values()) _chunkELOZVH5Scjs.stripScriptTags.call(void 0, { blocks: obs });
5262
+ for (const obs of ocrPageBlocks.values()) _chunk4OA4D6TWcjs.stripScriptTags.call(void 0, { blocks: obs });
5257
5263
  if (ocrPageBlocks.size > 0) {
5258
5264
  const replacePages = /* @__PURE__ */ new Set();
5259
5265
  for (const [p, obs] of ocrPageBlocks) {
@@ -5264,7 +5270,7 @@ async function parsePdfDocument(buffer, options) {
5264
5270
  continue;
5265
5271
  }
5266
5272
  const regions = ocrRegions.get(p);
5267
- if (!regions || _chunkEQO6PYJFcjs.mergeOcrImageRegions.call(void 0, blocks, p, regions, obs) === 0) continue;
5273
+ if (!regions || _chunkDFFUNHVLcjs.mergeOcrImageRegions.call(void 0, blocks, p, regions, obs) === 0) continue;
5268
5274
  ocrDone.add(p);
5269
5275
  if (_optionalChain([pageImageBlocks, 'access', _470 => _470.get, 'call', _471 => _471(p), 'optionalAccess', _472 => _472.length]) === 1) pageImageBlocks.delete(p);
5270
5276
  }
@@ -5317,17 +5323,17 @@ async function parsePdfDocument(buffer, options) {
5317
5323
  }
5318
5324
  }
5319
5325
  if (_optionalChain([options, 'optionalAccess', _473 => _473.removeHeaderFooter]) !== false && (parsedPageCount >= 3 || headerContext.length)) {
5320
- const removed = _chunkEQO6PYJFcjs.removeHeaderFooterBlocks.call(void 0, blocks, pageHeights, warnings, noteMarks, false, headerContext);
5321
- const running = _chunkEQO6PYJFcjs.runningLinePatterns.call(void 0, removed.map((ri) => blocks[ri]), pageHeights);
5326
+ const removed = _chunkDFFUNHVLcjs.removeHeaderFooterBlocks.call(void 0, blocks, pageHeights, warnings, noteMarks, false, headerContext);
5327
+ const running = _chunkDFFUNHVLcjs.runningLinePatterns.call(void 0, removed.map((ri) => blocks[ri]), pageHeights);
5322
5328
  for (let ri = removed.length - 1; ri >= 0; ri--) {
5323
5329
  blocks.splice(removed[ri], 1);
5324
5330
  }
5325
- const stripped = _chunkEQO6PYJFcjs.stripAbsorbedRunningLines.call(void 0, blocks, pageHeights, running);
5331
+ const stripped = _chunkDFFUNHVLcjs.stripAbsorbedRunningLines.call(void 0, blocks, pageHeights, running);
5326
5332
  if (stripped !== blocks) {
5327
5333
  blocks.length = 0;
5328
5334
  blocks.push(...stripped);
5329
5335
  }
5330
- const kept = _chunkEQO6PYJFcjs.removeSideTabs.call(void 0, blocks, pageWidths);
5336
+ const kept = _chunkDFFUNHVLcjs.removeSideTabs.call(void 0, blocks, pageWidths);
5331
5337
  if (kept !== blocks) {
5332
5338
  blocks.length = 0;
5333
5339
  blocks.push(...kept);
@@ -5336,12 +5342,12 @@ async function parsePdfDocument(buffer, options) {
5336
5342
  mergeContinuedCells(blocks, pageHeights);
5337
5343
  mergeCrossPageTables(blocks, pageHeights, wrapLexicon);
5338
5344
  if (_optionalChain([options, 'optionalAccess', _474 => _474.removeHeaderFooter]) !== false && parsedPageCount >= 3) {
5339
- const boxes = _chunkEQO6PYJFcjs.removeHeaderFooterBlocks.call(void 0, blocks, pageHeights, warnings, noteMarks, true);
5345
+ const boxes = _chunkDFFUNHVLcjs.removeHeaderFooterBlocks.call(void 0, blocks, pageHeights, warnings, noteMarks, true);
5340
5346
  for (let ri = boxes.length - 1; ri >= 0; ri--) blocks.splice(boxes[ri], 1);
5341
5347
  }
5342
5348
  splitContactTables(blocks);
5343
- if (!_optionalChain([options, 'optionalAccess', _475 => _475.keepTrailingEmptyCols])) _chunkEQO6PYJFcjs.trimTrailingEmptyTableCols.call(void 0, blocks);
5344
- _chunkEQO6PYJFcjs.joinPageBreakWraps.call(void 0, blocks, wrapLexicon);
5349
+ if (!_optionalChain([options, 'optionalAccess', _475 => _475.keepTrailingEmptyCols])) _chunkDFFUNHVLcjs.trimTrailingEmptyTableCols.call(void 0, blocks);
5350
+ _chunkDFFUNHVLcjs.joinPageBreakWraps.call(void 0, blocks, wrapLexicon);
5345
5351
  await flushPdfImages(imageState, warnings, pageImageBlocks);
5346
5352
  injectPageImageBlocks(blocks, pageImageBlocks);
5347
5353
  if (_optionalChain([options, 'optionalAccess', _476 => _476.formulaOcr]) && formulaBuffer) {
@@ -5354,21 +5360,21 @@ async function parsePdfDocument(buffer, options) {
5354
5360
  });
5355
5361
  }
5356
5362
  }
5357
- const medianFontSize = _chunkEQO6PYJFcjs.computeMedianFontSizeFromFreq.call(void 0, fontSizeFreq);
5363
+ const medianFontSize = _chunkDFFUNHVLcjs.computeMedianFontSizeFromFreq.call(void 0, fontSizeFreq);
5358
5364
  if (medianFontSize > 0) {
5359
- _chunkEQO6PYJFcjs.detectHeadings.call(void 0, blocks, medianFontSize);
5360
- }
5361
- _chunkEQO6PYJFcjs.detectDocumentStyleHeadings.call(void 0, blocks);
5362
- _chunkEQO6PYJFcjs.detectTypographyHeadings.call(void 0, blocks);
5363
- _chunkEQO6PYJFcjs.detectSiblingStyleHeadings.call(void 0, blocks);
5364
- _chunkEQO6PYJFcjs.detectRepeatedPageLabels.call(void 0, blocks);
5365
- _chunkEQO6PYJFcjs.detectPageLeadHeadings.call(void 0, blocks);
5366
- _chunkEQO6PYJFcjs.mergeStackedHeadingLines.call(void 0, blocks, medianFontSize);
5367
- _chunkEQO6PYJFcjs.refineDocumentStyleHeadings.call(void 0, blocks);
5368
- _chunkEQO6PYJFcjs.detectMarkerHeadings.call(void 0, blocks);
5365
+ _chunkDFFUNHVLcjs.detectHeadings.call(void 0, blocks, medianFontSize);
5366
+ }
5367
+ _chunkDFFUNHVLcjs.detectDocumentStyleHeadings.call(void 0, blocks);
5368
+ _chunkDFFUNHVLcjs.detectTypographyHeadings.call(void 0, blocks);
5369
+ _chunkDFFUNHVLcjs.detectSiblingStyleHeadings.call(void 0, blocks);
5370
+ _chunkDFFUNHVLcjs.detectRepeatedPageLabels.call(void 0, blocks);
5371
+ _chunkDFFUNHVLcjs.detectPageLeadHeadings.call(void 0, blocks);
5372
+ _chunkDFFUNHVLcjs.mergeStackedHeadingLines.call(void 0, blocks, medianFontSize);
5373
+ _chunkDFFUNHVLcjs.refineDocumentStyleHeadings.call(void 0, blocks);
5374
+ _chunkDFFUNHVLcjs.detectMarkerHeadings.call(void 0, blocks);
5369
5375
  demoteNonHeadingRoles(blocks, pageHeights, faceNames);
5370
- _chunkEQO6PYJFcjs.detectTableCaptions.call(void 0, blocks);
5371
- _chunkEQO6PYJFcjs.detectKoreanListBlocks.call(void 0, blocks);
5376
+ _chunkDFFUNHVLcjs.detectTableCaptions.call(void 0, blocks);
5377
+ _chunkDFFUNHVLcjs.detectKoreanListBlocks.call(void 0, blocks);
5372
5378
  sanitizeBlockControlChars(blocks);
5373
5379
  if (_optionalChain([options, 'optionalAccess', _477 => _477.imagePlacement]) === "flow") moveImagesInFlow(blocks);
5374
5380
  let outBlocks = splitSingleCellTables(blocks);
@@ -5390,19 +5396,19 @@ async function parsePdfDocument(buffer, options) {
5390
5396
  const shown = /* @__PURE__ */ new Map();
5391
5397
  const markContent = (bs) => {
5392
5398
  for (const b of _nullishCoalesce(bs, () => ( []))) if (b.table) for (const row of b.table.cells) for (const c of row) {
5393
- if (_chunkEQO6PYJFcjs.IMAGE_CELLS.has(c)) _chunkELOZVH5Scjs.CONTENT_CELLS.add(c);
5394
- const lines = _chunkEQO6PYJFcjs.CELL_LINES.get(c);
5395
- if (lines) _chunkELOZVH5Scjs.CELL_BASELINES.set(c, lines.map((l) => l.y));
5399
+ if (_chunkDFFUNHVLcjs.IMAGE_CELLS.has(c)) _chunk4OA4D6TWcjs.CONTENT_CELLS.add(c);
5400
+ const lines = _chunkDFFUNHVLcjs.CELL_LINES.get(c);
5401
+ if (lines) _chunk4OA4D6TWcjs.CELL_BASELINES.set(c, lines.map((l) => l.y));
5396
5402
  markContent(c.blocks);
5397
5403
  }
5398
5404
  };
5399
5405
  const visual = (bs) => bs.flatMap((b) => {
5400
5406
  if (b.type !== "table") return [b];
5401
- if (!hancom && b.table && _chunkEQO6PYJFcjs.CLIP_TABLES.has(b.table)) return [b];
5407
+ if (!hancom && b.table && _chunkDFFUNHVLcjs.CLIP_TABLES.has(b.table)) return [b];
5402
5408
  let v = shown.get(b);
5403
5409
  if (!v) {
5404
5410
  markContent([b]);
5405
- shown.set(b, v = _chunkELOZVH5Scjs.unframeLayoutTables.call(void 0, [b], !!_optionalChain([options, 'optionalAccess', _481 => _481.keepTrailingEmptyCols])));
5411
+ shown.set(b, v = _chunk4OA4D6TWcjs.unframeLayoutTables.call(void 0, [b], !!_optionalChain([options, 'optionalAccess', _481 => _481.keepTrailingEmptyCols])));
5406
5412
  }
5407
5413
  return v;
5408
5414
  });
@@ -5411,13 +5417,13 @@ async function parsePdfDocument(buffer, options) {
5411
5417
  blocks.length = 0;
5412
5418
  for (const b of kept) blocks.push(b);
5413
5419
  }
5414
- const finishMarkdown = (bs) => mergeLinkRuns(cleanPdfText(_chunkELOZVH5Scjs.blocksToMarkdown.call(void 0, bs, { tableFormat: _optionalChain([options, 'optionalAccess', _482 => _482.tableFormat]) }), { keepLoneNumbers: true }));
5415
- if (_optionalChain([options, 'optionalAccess', _483 => _483.tableFormat]) === "gfm") _chunkELOZVH5Scjs.assignTableIds.call(void 0, blocks);
5420
+ const finishMarkdown = (bs) => mergeLinkRuns(cleanPdfText(_chunk4OA4D6TWcjs.blocksToMarkdown.call(void 0, bs, { tableFormat: _optionalChain([options, 'optionalAccess', _482 => _482.tableFormat]) }), { keepLoneNumbers: true }));
5421
+ if (_optionalChain([options, 'optionalAccess', _483 => _483.tableFormat]) === "gfm") _chunk4OA4D6TWcjs.assignTableIds.call(void 0, blocks);
5416
5422
  let markdown = finishMarkdown(outBlocks);
5417
5423
  const outline = collectPdfOutline(outBlocks);
5418
5424
  return {
5419
5425
  markdown,
5420
- pages: _chunkQRNA3W7Bcjs.blocksToPages.call(void 0, splitPageTables(_chunkEQO6PYJFcjs.splitPageBreakWraps.call(void 0, outBlocks)), finishMarkdown),
5426
+ pages: _chunkPBTLZYKWcjs.blocksToPages.call(void 0, splitPageTables(_chunkDFFUNHVLcjs.splitPageBreakWraps.call(void 0, outBlocks)), finishMarkdown),
5421
5427
  blocks,
5422
5428
  metadata,
5423
5429
  outline: outline.length > 0 ? outline : void 0,
@@ -5509,5 +5515,5 @@ function marginStamp(items) {
5509
5515
 
5510
5516
 
5511
5517
 
5512
- exports.PDFJS_DOCUMENT_OPTIONS = PDFJS_DOCUMENT_OPTIONS; exports.cleanPdfText = cleanPdfText; exports.detectKoreanListBlocks = _chunkEQO6PYJFcjs.detectKoreanListBlocks; exports.detectTableCaptions = _chunkEQO6PYJFcjs.detectTableCaptions; exports.extractPdfMetadataOnly = extractPdfMetadataOnly; exports.isPreciseGapProducer = isPreciseGapProducer; exports.mergeCrossPageTables = mergeCrossPageTables; exports.ocrImageRegions = ocrImageRegions; exports.parsePdfDocument = parsePdfDocument; exports.removeHeaderFooterBlocks = _chunkEQO6PYJFcjs.removeHeaderFooterBlocks;
5513
- //# sourceMappingURL=parser-EQTJOS7W.cjs.map
5518
+ exports.PDFJS_DOCUMENT_OPTIONS = PDFJS_DOCUMENT_OPTIONS; exports.cleanPdfText = cleanPdfText; exports.detectKoreanListBlocks = _chunkDFFUNHVLcjs.detectKoreanListBlocks; exports.detectTableCaptions = _chunkDFFUNHVLcjs.detectTableCaptions; exports.extractPdfMetadataOnly = extractPdfMetadataOnly; exports.isPreciseGapProducer = isPreciseGapProducer; exports.mergeCrossPageTables = mergeCrossPageTables; exports.ocrImageRegions = ocrImageRegions; exports.parsePdfDocument = parsePdfDocument; exports.removeHeaderFooterBlocks = _chunkDFFUNHVLcjs.removeHeaderFooterBlocks;
5519
+ //# sourceMappingURL=parser-J3V4ZY33.cjs.map