kordoc 4.24.48 → 4.24.49
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.
- package/README.md +3 -3
- package/dist/{-3EMVBTE7.js → -22V6D2US.js} +42 -42
- package/dist/{chunk-TOOOWCKQ.cjs → chunk-2UWWWM4Q.cjs} +98 -98
- package/dist/{chunk-TOOOWCKQ.cjs.map → chunk-2UWWWM4Q.cjs.map} +1 -1
- package/dist/{chunk-MHAPDR6T.cjs → chunk-367WLMPO.cjs} +59 -67
- package/dist/chunk-367WLMPO.cjs.map +1 -0
- package/dist/{chunk-WVUR3HYW.js → chunk-4HJKBRZJ.js} +129 -40
- package/dist/chunk-4HJKBRZJ.js.map +1 -0
- package/dist/{chunk-7F5SKDUG.js → chunk-4MWUBTAE.js} +2 -2
- package/dist/{chunk-4N2ESXR2.js → chunk-67GSFYG7.js} +2 -2
- package/dist/{chunk-WICMTKWR.js → chunk-6BFWLS7E.js} +3 -3
- package/dist/{chunk-LBH4KAQM.cjs → chunk-6NZ32OTX.cjs} +8 -3
- package/dist/chunk-6NZ32OTX.cjs.map +1 -0
- package/dist/{chunk-JC2TMUU5.js → chunk-7KKL3PRK.js} +5 -13
- package/dist/chunk-7KKL3PRK.js.map +1 -0
- package/dist/{chunk-7EL6BCO5.js → chunk-AUAJVQQK.js} +2 -2
- package/dist/{chunk-QJBVP2BS.js → chunk-AXW2FMVR.js} +2 -2
- package/dist/{chunk-SUOJQHIN.js → chunk-CCQMSIZQ.js} +19 -19
- package/dist/{chunk-OUUI7I5V.js → chunk-DA5AXURC.js} +52 -4
- package/dist/chunk-DA5AXURC.js.map +1 -0
- package/dist/{chunk-3UY7ARXP.js → chunk-DAAJO62F.js} +2 -2
- package/dist/{chunk-QM65ELZE.js → chunk-EUJX7HTR.js} +32 -10
- package/dist/chunk-EUJX7HTR.js.map +1 -0
- package/dist/{chunk-E47LO7XG.js → chunk-EYSXMDA7.js} +17 -17
- package/dist/{chunk-TQ4QOCKT.js → chunk-FU6ZDWCI.js} +7 -2
- package/dist/chunk-FU6ZDWCI.js.map +1 -0
- package/dist/{chunk-MHLTZ3VI.js → chunk-HETGOJ6V.js} +2 -2
- package/dist/{chunk-OQPIN2OY.js → chunk-HW7WVYBF.js} +2 -2
- package/dist/{chunk-LHZL52HO.cjs → chunk-IRAZCKQ6.cjs} +3 -3
- package/dist/{chunk-LHZL52HO.cjs.map → chunk-IRAZCKQ6.cjs.map} +1 -1
- package/dist/{chunk-AC7FZDVP.js → chunk-KB4ORA7M.js} +2 -2
- package/dist/{chunk-SHYNOLL6.js → chunk-KXHUHGMC.js} +2 -2
- package/dist/{chunk-WO6PZMMB.js → chunk-L3JP55ZY.js} +2 -2
- package/dist/{chunk-OBNOOHAW.js → chunk-LCRSRVFJ.js} +2 -2
- package/dist/{chunk-OBNOOHAW.js.map → chunk-LCRSRVFJ.js.map} +1 -1
- package/dist/{chunk-OO4DHHTG.js → chunk-LFFARZYZ.js} +2 -2
- package/dist/{chunk-OO4DHHTG.js.map → chunk-LFFARZYZ.js.map} +1 -1
- package/dist/{chunk-NLPIXQOV.js → chunk-LOSCIAHY.js} +2 -2
- package/dist/{chunk-HW3DZ7TY.js → chunk-M5RQ2PNP.js} +6 -14
- package/dist/chunk-M5RQ2PNP.js.map +1 -0
- package/dist/{chunk-GFWCBYAI.js → chunk-MIJTZKWF.js} +2 -2
- package/dist/{chunk-PHU4VSNF.js → chunk-MLBX6KQM.js} +37 -3
- package/dist/chunk-MLBX6KQM.js.map +1 -0
- package/dist/{chunk-D4TKVZKB.js → chunk-OAETOHH3.js} +3 -3
- package/dist/{chunk-SI3GXM7Z.js → chunk-PMGJQWSW.js} +2 -2
- package/dist/{chunk-QOBWIFJA.cjs → chunk-PVV6OY4M.cjs} +135 -87
- package/dist/{chunk-QOBWIFJA.cjs.map → chunk-PVV6OY4M.cjs.map} +1 -1
- package/dist/{chunk-VXHZPUMS.cjs → chunk-PW7MQZI4.cjs} +2 -2
- package/dist/{chunk-VXHZPUMS.cjs.map → chunk-PW7MQZI4.cjs.map} +1 -1
- package/dist/{chunk-MYIRYP6D.js → chunk-Q7FDPJUS.js} +10 -10
- package/dist/{chunk-N6B5BINC.js → chunk-R2RLNUNK.js} +6 -6
- package/dist/{chunk-FQMPHPHE.js → chunk-RQLEGKEV.js} +2 -2
- package/dist/{chunk-KTGOULMH.js → chunk-S54DZB2Z.js} +51 -3
- package/dist/chunk-S54DZB2Z.js.map +1 -0
- package/dist/{chunk-D7SOY3VR.js → chunk-TAHS42ED.js} +33 -11
- package/dist/chunk-TAHS42ED.js.map +1 -0
- package/dist/{chunk-YFTD6WOP.cjs → chunk-TQOAPKLU.cjs} +6 -6
- package/dist/{chunk-YFTD6WOP.cjs.map → chunk-TQOAPKLU.cjs.map} +1 -1
- package/dist/{chunk-A6EOKPKG.cjs → chunk-UBY2PLKR.cjs} +54 -32
- package/dist/chunk-UBY2PLKR.cjs.map +1 -0
- package/dist/{chunk-UN2F6EKQ.js → chunk-UJELMNOU.js} +7 -2
- package/dist/chunk-UJELMNOU.js.map +1 -0
- package/dist/{chunk-REERG473.js → chunk-UU54HN5I.js} +6 -6
- package/dist/{chunk-E5RJLP2S.js → chunk-VMOUAWGD.js} +7 -7
- package/dist/{chunk-6YUMHSBG.js → chunk-WLFZOBZR.js} +3 -3
- package/dist/{chunk-SJXTCW7I.cjs → chunk-Y4MFHEK4.cjs} +40 -6
- package/dist/chunk-Y4MFHEK4.cjs.map +1 -0
- package/dist/{chunk-UJ3TZF4Y.js → chunk-Y6QW3FJQ.js} +2 -2
- package/dist/{chunk-GOYAJVR6.js → chunk-ZF24SO45.js} +37 -3
- package/dist/chunk-ZF24SO45.js.map +1 -0
- package/dist/chunks-Q7242OJE.js +11 -0
- package/dist/cli.js +73 -53
- package/dist/cli.js.map +1 -1
- package/dist/{formula-DUHNPES2.js → formula-BYEDWWZU.js} +4 -4
- package/dist/{formula-XNCKOV6K.js → formula-FQLMMBDP.js} +3 -3
- package/dist/{formula-7RJOEJHX.cjs → formula-QJEOIVKR.cjs} +9 -9
- package/dist/{formula-7RJOEJHX.cjs.map → formula-QJEOIVKR.cjs.map} +1 -1
- package/dist/generator-FTM6GOGB.cjs +11 -0
- package/dist/{generator-XXVCF6TG.cjs.map → generator-FTM6GOGB.cjs.map} +1 -1
- package/dist/generator-Q3L7RNUY.js +17 -0
- package/dist/generator-SU73HZHR.js +10 -0
- package/dist/{image-ocr-PYOXD5K4.js → image-ocr-7Y3FCGRR.js} +12 -10
- package/dist/image-ocr-7Y3FCGRR.js.map +1 -0
- package/dist/{image-ocr-NFCTNIL5.js → image-ocr-VIGZE4YL.js} +9 -7
- package/dist/image-ocr-VIGZE4YL.js.map +1 -0
- package/dist/{image-ocr-ZLAPJMES.cjs → image-ocr-WRILL3WO.cjs} +29 -27
- package/dist/image-ocr-WRILL3WO.cjs.map +1 -0
- package/dist/index.cjs +1250 -1161
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -5
- package/dist/index.d.ts +13 -5
- package/dist/index.js +207 -118
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +42 -43
- package/dist/mcp.js.map +1 -1
- package/dist/memo-T5ZQEXEA.js +17 -0
- package/dist/{model-bundle-TIHWFIN5.js → model-bundle-UJRQPYUU.js} +5 -5
- package/dist/{models-YBHBEM6J.js → models-64YLAWTI.js} +5 -5
- package/dist/{parse-worker-v2-Q7ST3SDO.js → parse-worker-v2-QWQZKFQO.js} +25 -24
- package/dist/parse-worker-v2-QWQZKFQO.js.map +1 -0
- package/dist/{parser-7JSQYNLS.js → parser-JPWANPLM.js} +77 -32
- package/dist/parser-JPWANPLM.js.map +1 -0
- package/dist/{parser-A76QS3VJ.cjs → parser-RB6CBNAM.cjs} +259 -214
- package/dist/parser-RB6CBNAM.cjs.map +1 -0
- package/dist/{parser-V25GYLBJ.js → parser-XFU3VRWM.js} +80 -35
- package/dist/parser-XFU3VRWM.js.map +1 -0
- package/dist/pdf-ocr-NOJHEH4M.cjs +42 -0
- package/dist/{pdf-ocr-5YCDSSLG.cjs.map → pdf-ocr-NOJHEH4M.cjs.map} +1 -1
- package/dist/{pdf-ocr-IJXT6ZJR.js → pdf-ocr-XTZZEYKJ.js} +6 -6
- package/dist/{pdf-ocr-GEAW23FB.js → pdf-ocr-ZV3KYIIE.js} +9 -9
- package/dist/{profile-io-Y7SMMS2R.js → profile-io-FAJORRD2.js} +3 -3
- package/dist/{rasterize-MLEHT6PU.js → rasterize-4ZJUA2DZ.js} +3 -3
- package/dist/{redact-doc-GPO2UTTJ.js → redact-doc-JPNROEH6.js} +30 -30
- package/dist/{render-TNWY53S4.js → render-D4WBOBKI.js} +13 -13
- package/dist/{rewrite-fallback-AHGTN757.js → rewrite-fallback-OF3QI6CX.js} +14 -14
- package/dist/seal-DQWEHIAM.js +16 -0
- package/dist/{setup-TJ57DQ6I.js → setup-YC25YCQB.js} +3 -3
- package/dist/to-hwpx-D7OMPDUQ.js +21 -0
- package/dist/to-hwpx-LUA6F5RR.cjs +16 -0
- package/dist/{to-hwpx-XLQUY2L2.cjs.map → to-hwpx-LUA6F5RR.cjs.map} +1 -1
- package/dist/{to-hwpx-DLVARUND.js → to-hwpx-ZWN64NCQ.js} +5 -5
- package/dist/visual-SW7NPY6K.js +37 -0
- package/dist/{watch-6CHDQ355.js → watch-ZU576VSR.js} +24 -24
- package/package.json +1 -1
- package/dist/chunk-A6EOKPKG.cjs.map +0 -1
- package/dist/chunk-D7SOY3VR.js.map +0 -1
- package/dist/chunk-GOYAJVR6.js.map +0 -1
- package/dist/chunk-HW3DZ7TY.js.map +0 -1
- package/dist/chunk-JC2TMUU5.js.map +0 -1
- package/dist/chunk-KTGOULMH.js.map +0 -1
- package/dist/chunk-LBH4KAQM.cjs.map +0 -1
- package/dist/chunk-MHAPDR6T.cjs.map +0 -1
- package/dist/chunk-OUUI7I5V.js.map +0 -1
- package/dist/chunk-PHU4VSNF.js.map +0 -1
- package/dist/chunk-QM65ELZE.js.map +0 -1
- package/dist/chunk-SJXTCW7I.cjs.map +0 -1
- package/dist/chunk-TQ4QOCKT.js.map +0 -1
- package/dist/chunk-UN2F6EKQ.js.map +0 -1
- package/dist/chunk-WVUR3HYW.js.map +0 -1
- package/dist/chunks-QTVEFJOS.js +0 -11
- package/dist/generator-6BFIABTF.js +0 -10
- package/dist/generator-XJLIBYDJ.js +0 -17
- package/dist/generator-XXVCF6TG.cjs +0 -11
- package/dist/hancom-7F53R77A.cjs +0 -85
- package/dist/hancom-7F53R77A.cjs.map +0 -1
- package/dist/hancom-D4E3WBPI.js +0 -84
- package/dist/hancom-D4E3WBPI.js.map +0 -1
- package/dist/hancom-IPF6HM5F.js +0 -85
- package/dist/hancom-IPF6HM5F.js.map +0 -1
- package/dist/image-ocr-NFCTNIL5.js.map +0 -1
- package/dist/image-ocr-PYOXD5K4.js.map +0 -1
- package/dist/image-ocr-ZLAPJMES.cjs.map +0 -1
- package/dist/memo-CNW6ZJFE.js +0 -17
- package/dist/parse-worker-v2-Q7ST3SDO.js.map +0 -1
- package/dist/parser-7JSQYNLS.js.map +0 -1
- package/dist/parser-A76QS3VJ.cjs.map +0 -1
- package/dist/parser-V25GYLBJ.js.map +0 -1
- package/dist/pdf-ocr-5YCDSSLG.cjs +0 -42
- package/dist/seal-7HBR3HBQ.js +0 -16
- package/dist/to-hwpx-6JF6Q2TZ.js +0 -21
- package/dist/to-hwpx-XLQUY2L2.cjs +0 -16
- package/dist/visual-VBDQUUKP.js +0 -37
- /package/dist/{-3EMVBTE7.js.map → -22V6D2US.js.map} +0 -0
- /package/dist/{chunk-7F5SKDUG.js.map → chunk-4MWUBTAE.js.map} +0 -0
- /package/dist/{chunk-4N2ESXR2.js.map → chunk-67GSFYG7.js.map} +0 -0
- /package/dist/{chunk-WICMTKWR.js.map → chunk-6BFWLS7E.js.map} +0 -0
- /package/dist/{chunk-7EL6BCO5.js.map → chunk-AUAJVQQK.js.map} +0 -0
- /package/dist/{chunk-QJBVP2BS.js.map → chunk-AXW2FMVR.js.map} +0 -0
- /package/dist/{chunk-SUOJQHIN.js.map → chunk-CCQMSIZQ.js.map} +0 -0
- /package/dist/{chunk-3UY7ARXP.js.map → chunk-DAAJO62F.js.map} +0 -0
- /package/dist/{chunk-E47LO7XG.js.map → chunk-EYSXMDA7.js.map} +0 -0
- /package/dist/{chunk-MHLTZ3VI.js.map → chunk-HETGOJ6V.js.map} +0 -0
- /package/dist/{chunk-OQPIN2OY.js.map → chunk-HW7WVYBF.js.map} +0 -0
- /package/dist/{chunk-AC7FZDVP.js.map → chunk-KB4ORA7M.js.map} +0 -0
- /package/dist/{chunk-SHYNOLL6.js.map → chunk-KXHUHGMC.js.map} +0 -0
- /package/dist/{chunk-WO6PZMMB.js.map → chunk-L3JP55ZY.js.map} +0 -0
- /package/dist/{chunk-NLPIXQOV.js.map → chunk-LOSCIAHY.js.map} +0 -0
- /package/dist/{chunk-GFWCBYAI.js.map → chunk-MIJTZKWF.js.map} +0 -0
- /package/dist/{chunk-D4TKVZKB.js.map → chunk-OAETOHH3.js.map} +0 -0
- /package/dist/{chunk-SI3GXM7Z.js.map → chunk-PMGJQWSW.js.map} +0 -0
- /package/dist/{chunk-MYIRYP6D.js.map → chunk-Q7FDPJUS.js.map} +0 -0
- /package/dist/{chunk-N6B5BINC.js.map → chunk-R2RLNUNK.js.map} +0 -0
- /package/dist/{chunk-FQMPHPHE.js.map → chunk-RQLEGKEV.js.map} +0 -0
- /package/dist/{chunk-REERG473.js.map → chunk-UU54HN5I.js.map} +0 -0
- /package/dist/{chunk-E5RJLP2S.js.map → chunk-VMOUAWGD.js.map} +0 -0
- /package/dist/{chunk-6YUMHSBG.js.map → chunk-WLFZOBZR.js.map} +0 -0
- /package/dist/{chunk-UJ3TZF4Y.js.map → chunk-Y6QW3FJQ.js.map} +0 -0
- /package/dist/{chunks-QTVEFJOS.js.map → chunks-Q7242OJE.js.map} +0 -0
- /package/dist/{formula-DUHNPES2.js.map → formula-BYEDWWZU.js.map} +0 -0
- /package/dist/{formula-XNCKOV6K.js.map → formula-FQLMMBDP.js.map} +0 -0
- /package/dist/{generator-6BFIABTF.js.map → generator-Q3L7RNUY.js.map} +0 -0
- /package/dist/{generator-XJLIBYDJ.js.map → generator-SU73HZHR.js.map} +0 -0
- /package/dist/{memo-CNW6ZJFE.js.map → memo-T5ZQEXEA.js.map} +0 -0
- /package/dist/{model-bundle-TIHWFIN5.js.map → model-bundle-UJRQPYUU.js.map} +0 -0
- /package/dist/{models-YBHBEM6J.js.map → models-64YLAWTI.js.map} +0 -0
- /package/dist/{pdf-ocr-GEAW23FB.js.map → pdf-ocr-XTZZEYKJ.js.map} +0 -0
- /package/dist/{pdf-ocr-IJXT6ZJR.js.map → pdf-ocr-ZV3KYIIE.js.map} +0 -0
- /package/dist/{profile-io-Y7SMMS2R.js.map → profile-io-FAJORRD2.js.map} +0 -0
- /package/dist/{rasterize-MLEHT6PU.js.map → rasterize-4ZJUA2DZ.js.map} +0 -0
- /package/dist/{redact-doc-GPO2UTTJ.js.map → redact-doc-JPNROEH6.js.map} +0 -0
- /package/dist/{render-TNWY53S4.js.map → render-D4WBOBKI.js.map} +0 -0
- /package/dist/{rewrite-fallback-AHGTN757.js.map → rewrite-fallback-OF3QI6CX.js.map} +0 -0
- /package/dist/{seal-7HBR3HBQ.js.map → seal-DQWEHIAM.js.map} +0 -0
- /package/dist/{setup-TJ57DQ6I.js.map → setup-YC25YCQB.js.map} +0 -0
- /package/dist/{to-hwpx-6JF6Q2TZ.js.map → to-hwpx-D7OMPDUQ.js.map} +0 -0
- /package/dist/{to-hwpx-DLVARUND.js.map → to-hwpx-ZWN64NCQ.js.map} +0 -0
- /package/dist/{visual-VBDQUUKP.js.map → visual-SW7NPY6K.js.map} +0 -0
- /package/dist/{watch-6CHDQ355.js.map → watch-ZU576VSR.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
ensureModelsIn,
|
|
4
4
|
getModelStatusIn,
|
|
5
5
|
getModelsDir
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HW7WVYBF.js";
|
|
7
7
|
|
|
8
8
|
// src/ocr/models.ts
|
|
9
9
|
import { join } from "path";
|
|
@@ -175,4 +175,4 @@ export {
|
|
|
175
175
|
parseCharacterDict,
|
|
176
176
|
ocrModelPath
|
|
177
177
|
};
|
|
178
|
-
//# sourceMappingURL=chunk-
|
|
178
|
+
//# sourceMappingURL=chunk-AUAJVQQK.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
KordocError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KXHUHGMC.js";
|
|
5
5
|
|
|
6
6
|
// src/shared/offline.ts
|
|
7
7
|
import { realpathSync } from "fs";
|
|
@@ -49,4 +49,4 @@ export {
|
|
|
49
49
|
getAccessRoot,
|
|
50
50
|
assertWithinRoot
|
|
51
51
|
};
|
|
52
|
-
//# sourceMappingURL=chunk-
|
|
52
|
+
//# sourceMappingURL=chunk-AXW2FMVR.js.map
|
|
@@ -1,18 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
SPACE_EM_FIXED,
|
|
4
|
-
charWidthEm1000,
|
|
5
|
-
faceClassForGen,
|
|
6
|
-
fitRatioForFewerLines,
|
|
7
|
-
measureTextWidth,
|
|
8
|
-
noteAttrsOf,
|
|
9
|
-
noteAutoNumOf,
|
|
10
|
-
noteRefMark,
|
|
11
|
-
prepareWrap,
|
|
12
|
-
readSectionNoteFormats,
|
|
13
|
-
resolveParaHeading,
|
|
14
|
-
simulateWrap
|
|
15
|
-
} from "./chunk-GFWCBYAI.js";
|
|
16
2
|
import {
|
|
17
3
|
applySplices,
|
|
18
4
|
buildMappedRangeSplices,
|
|
@@ -27,6 +13,20 @@ import {
|
|
|
27
13
|
puaShownMap,
|
|
28
14
|
scanSectionXml
|
|
29
15
|
} from "./chunk-3AHL6YEA.js";
|
|
16
|
+
import {
|
|
17
|
+
SPACE_EM_FIXED,
|
|
18
|
+
charWidthEm1000,
|
|
19
|
+
faceClassForGen,
|
|
20
|
+
fitRatioForFewerLines,
|
|
21
|
+
measureTextWidth,
|
|
22
|
+
noteAttrsOf,
|
|
23
|
+
noteAutoNumOf,
|
|
24
|
+
noteRefMark,
|
|
25
|
+
prepareWrap,
|
|
26
|
+
readSectionNoteFormats,
|
|
27
|
+
resolveParaHeading,
|
|
28
|
+
simulateWrap
|
|
29
|
+
} from "./chunk-MIJTZKWF.js";
|
|
30
30
|
import {
|
|
31
31
|
MAX_DECOMPRESS_SIZE,
|
|
32
32
|
MAX_XML_DEPTH,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
extractTextFromNode,
|
|
39
39
|
findChildByLocalName,
|
|
40
40
|
readZipEntry
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-KB4ORA7M.js";
|
|
42
42
|
import {
|
|
43
43
|
CONVERT_MAP,
|
|
44
44
|
MIDDLE_CONVERT_MAP,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
escapeLiteralTags,
|
|
58
58
|
tidyScriptTags,
|
|
59
59
|
wrapScript
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-LCRSRVFJ.js";
|
|
61
61
|
import {
|
|
62
62
|
MAX_COLS,
|
|
63
63
|
MAX_ROWS,
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
noteTableHtml,
|
|
75
75
|
sanitizeText,
|
|
76
76
|
visibleText
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-HETGOJ6V.js";
|
|
78
78
|
import {
|
|
79
79
|
circledHangul,
|
|
80
80
|
circledNumber,
|
|
@@ -92,7 +92,7 @@ import {
|
|
|
92
92
|
sanitizeHref,
|
|
93
93
|
stripDtd,
|
|
94
94
|
unescapeHtml
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-KXHUHGMC.js";
|
|
96
96
|
|
|
97
97
|
// src/hwpx/generator.ts
|
|
98
98
|
import JSZip2 from "jszip";
|
|
@@ -10921,4 +10921,4 @@ export {
|
|
|
10921
10921
|
markdownToHwpxFromTemplate,
|
|
10922
10922
|
markdownToHwpx
|
|
10923
10923
|
};
|
|
10924
|
-
//# sourceMappingURL=chunk-
|
|
10924
|
+
//# sourceMappingURL=chunk-CCQMSIZQ.js.map
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
stackedGlyphBands,
|
|
31
31
|
starRun,
|
|
32
32
|
tallInkCount
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-EUJX7HTR.js";
|
|
34
34
|
import {
|
|
35
35
|
validateOcrOptions
|
|
36
36
|
} from "./chunk-IIOBUTXH.js";
|
|
@@ -43,14 +43,14 @@ import {
|
|
|
43
43
|
ocrSourcePath,
|
|
44
44
|
parseCharacterDict,
|
|
45
45
|
resolveOcrModels
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-AUAJVQQK.js";
|
|
47
47
|
import {
|
|
48
48
|
disableOrtTelemetry
|
|
49
49
|
} from "./chunk-6H25SXDI.js";
|
|
50
50
|
import {
|
|
51
51
|
KordocError,
|
|
52
52
|
OPTIONAL_DEP_INSTALL_HINT
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-KXHUHGMC.js";
|
|
54
54
|
|
|
55
55
|
// src/ocr/ocr-stacked-rows.ts
|
|
56
56
|
var NUMERIC = /^[-+−△▲▽▼]?[\d.,]+[%p]?$|^[-–—·∼~]$|^\([-+−△▲▽▼]?[\d.,]+%?\)$/;
|
|
@@ -2463,6 +2463,52 @@ function splitOcrContactColumns(blocks) {
|
|
|
2463
2463
|
return blocks;
|
|
2464
2464
|
}
|
|
2465
2465
|
|
|
2466
|
+
// src/ocr/empty-cell-rescue.ts
|
|
2467
|
+
var MAX_CELLS = 60;
|
|
2468
|
+
var TOL = 3;
|
|
2469
|
+
var PAD = 16;
|
|
2470
|
+
async function rescueEmptyCells(engine, tuning, rgba, width, height, ruling, items) {
|
|
2471
|
+
const hs = ruling.horizontals, vs = ruling.verticals;
|
|
2472
|
+
if (hs.length < 2 || vs.length < 2) return [];
|
|
2473
|
+
const uniq = (vals) => {
|
|
2474
|
+
const out2 = [];
|
|
2475
|
+
for (const v of [...vals].sort((a, b) => a - b)) if (!out2.length || v - out2[out2.length - 1] > TOL) out2.push(v);
|
|
2476
|
+
return out2;
|
|
2477
|
+
};
|
|
2478
|
+
const ys = uniq(hs.map((h) => h.y1)), xs = uniq(vs.map((v) => v.x1));
|
|
2479
|
+
const hAt = (y, a, b) => hs.some((h) => Math.abs(h.y1 - y) <= TOL && Math.min(h.x1, h.x2) <= a + TOL && Math.max(h.x1, h.x2) >= b - TOL);
|
|
2480
|
+
const vAt = (x, a, b) => vs.some((v) => Math.abs(v.x1 - x) <= TOL && Math.min(v.y1, v.y2) <= a + TOL && Math.max(v.y1, v.y2) >= b - TOL);
|
|
2481
|
+
const cells = [];
|
|
2482
|
+
for (let j = 0; j + 1 < xs.length && cells.length < MAX_CELLS; j++) {
|
|
2483
|
+
for (let i = 0; i + 1 < ys.length && cells.length < MAX_CELLS; i++) {
|
|
2484
|
+
let k = i + 1;
|
|
2485
|
+
while (k + 1 < ys.length && !hAt(ys[k], xs[j], xs[j + 1])) k++;
|
|
2486
|
+
const [y1, y2, x1, x2] = [ys[i], ys[k], xs[j], xs[j + 1]];
|
|
2487
|
+
i = k - 1;
|
|
2488
|
+
if (y2 - y1 < 15 || x2 - x1 < 20 || (x2 - x1) * (y2 - y1) > width * height * 0.05) continue;
|
|
2489
|
+
if (!hAt(y1, x1, x2) || !hAt(y2, x1, x2) || !vAt(x1, y1, y2) || !vAt(x2, y1, y2)) continue;
|
|
2490
|
+
const bx = Math.ceil(x1 + 4), by = Math.ceil(y1 + 4), box = { x: bx, y: by, w: Math.floor(x2 - 4) - bx, h: Math.floor(y2 - 4) - by };
|
|
2491
|
+
if (box.w < 10 || box.h < 8) continue;
|
|
2492
|
+
if (items.some((it) => Math.min(it.x + it.w, box.x + box.w) > Math.max(it.x, box.x) && Math.min(it.y + it.h, box.y + box.h) > Math.max(it.y, box.y))) continue;
|
|
2493
|
+
let ink = 0;
|
|
2494
|
+
for (let y = box.y; y < box.y + box.h; y++) for (let x = box.x, p = (y * width + x) * 4; x < box.x + box.w; x++, p += 4) {
|
|
2495
|
+
if (rgba[p] * 77 + rgba[p + 1] * 150 + rgba[p + 2] * 29 < 128 * 256) ink++;
|
|
2496
|
+
}
|
|
2497
|
+
if (ink >= 40 && ink >= box.w * box.h * 0.01) cells.push(box);
|
|
2498
|
+
}
|
|
2499
|
+
}
|
|
2500
|
+
const out = [];
|
|
2501
|
+
for (const c of cells) {
|
|
2502
|
+
const w = c.w + PAD * 2, h = c.h + PAD * 2;
|
|
2503
|
+
const crop = new Uint8Array(w * h * 4).fill(255);
|
|
2504
|
+
for (let y = 0; y < c.h; y++) crop.set(rgba.subarray(((c.y + y) * width + c.x) * 4, ((c.y + y) * width + c.x + c.w) * 4), ((y + PAD) * w + PAD) * 4);
|
|
2505
|
+
const stats = { droppedLowConf: 0 };
|
|
2506
|
+
const found = await engine.recognizePage(crop, w, h, stats, { ...tuning, orientPage: false });
|
|
2507
|
+
for (const it of found) out.push({ ...it, x: it.x + c.x - PAD, y: it.y + c.y - PAD });
|
|
2508
|
+
}
|
|
2509
|
+
return out;
|
|
2510
|
+
}
|
|
2511
|
+
|
|
2466
2512
|
// src/ocr/pdf-ocr.ts
|
|
2467
2513
|
var OCR_RENDER_SCALE = 3;
|
|
2468
2514
|
var MAX_OCR_PIXELS = 24e6;
|
|
@@ -2616,6 +2662,7 @@ async function ocrOnePage(page, pageNo, mode, engine, warnings, detectTables, ve
|
|
|
2616
2662
|
cellEdgeHorizontals(ruling)
|
|
2617
2663
|
);
|
|
2618
2664
|
}
|
|
2665
|
+
if (ruling && !regions && !vectorOps && config.tuning.postprocess) items = [...items, ...await rescueEmptyCells(engine, tuning, upright, rw, rh, ruling, items)];
|
|
2619
2666
|
if (stats.droppedLowConf > 0) {
|
|
2620
2667
|
warnings.push({
|
|
2621
2668
|
page: pageNo,
|
|
@@ -2906,6 +2953,7 @@ function bgraToRgba(bgra) {
|
|
|
2906
2953
|
}
|
|
2907
2954
|
|
|
2908
2955
|
export {
|
|
2956
|
+
rescueEmptyCells,
|
|
2909
2957
|
getOcrEngine,
|
|
2910
2958
|
detectRulingLines,
|
|
2911
2959
|
rulingToPdfLines,
|
|
@@ -2927,4 +2975,4 @@ export {
|
|
|
2927
2975
|
ocrItemsToBlocks,
|
|
2928
2976
|
markOcrHeadings
|
|
2929
2977
|
};
|
|
2930
|
-
//# sourceMappingURL=chunk-
|
|
2978
|
+
//# sourceMappingURL=chunk-DA5AXURC.js.map
|