kordoc 4.24.73 → 4.24.74
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/NOTICE +17 -0
- package/README.md +3 -3
- package/dist/{-CNXSUEGZ.js → -U7FV47XK.js} +25 -23
- package/dist/{chunk-S6K222FM.js → chunk-2HHE3D4S.js} +2 -2
- package/dist/{chunk-IV6UP7MO.js → chunk-2SMYX3L4.js} +2 -2
- package/dist/{chunk-X4HNVXJI.js → chunk-2ZZCE4EM.js} +2 -2
- package/dist/{chunk-GHHVT4Q5.js → chunk-3O3KTZ7H.js} +38 -7
- package/dist/chunk-3O3KTZ7H.js.map +1 -0
- package/dist/{chunk-TTIJTR5Z.js → chunk-3PTQBVDC.js} +6 -6
- package/dist/{chunk-QLUFTCAE.cjs → chunk-4TDUZ6UN.cjs} +126 -39
- package/dist/chunk-4TDUZ6UN.cjs.map +1 -0
- package/dist/{chunk-JY4YMR6F.js → chunk-4VOOFNBK.js} +122 -35
- package/dist/chunk-4VOOFNBK.js.map +1 -0
- package/dist/{chunk-ARVHYL3V.cjs → chunk-56KADCSC.cjs} +39 -8
- package/dist/chunk-56KADCSC.cjs.map +1 -0
- package/dist/{chunk-CGOCVSWC.js → chunk-5CGWJW3U.js} +3 -3
- package/dist/chunk-5IEMZTNA.js +107 -0
- package/dist/chunk-5IEMZTNA.js.map +1 -0
- package/dist/{chunk-VMM5PVOA.js → chunk-6OFHUEHR.js} +2 -2
- package/dist/{chunk-O4TKUBCF.cjs → chunk-7DB4UKU4.cjs} +3 -3
- package/dist/{chunk-O4TKUBCF.cjs.map → chunk-7DB4UKU4.cjs.map} +1 -1
- package/dist/{chunk-LUQH3SUU.cjs → chunk-A4GYP4G4.cjs} +62 -62
- package/dist/{chunk-LUQH3SUU.cjs.map → chunk-A4GYP4G4.cjs.map} +1 -1
- package/dist/{chunk-ABNK5QI2.js → chunk-AJYPIUQK.js} +2 -2
- package/dist/{chunk-UMVL776E.js → chunk-AYEDNFX7.js} +2 -2
- package/dist/chunk-CK7LADMK.js +232 -0
- package/dist/chunk-CK7LADMK.js.map +1 -0
- package/dist/{chunk-CBGH37CU.js → chunk-CRUAWSRK.js} +3 -3
- package/dist/{chunk-RJ26GRDB.js → chunk-DDWV6OTG.js} +8 -8
- package/dist/chunk-EFQPEQ43.js +45 -0
- package/dist/chunk-EFQPEQ43.js.map +1 -0
- package/dist/{chunk-2JA4FJJM.js → chunk-EYDAQBE7.js} +2 -2
- package/dist/{chunk-BK55EX56.js → chunk-FCAMCNBA.js} +4 -4
- package/dist/{chunk-5MBQW3KP.cjs → chunk-FE7463HF.cjs} +8 -8
- package/dist/{chunk-5MBQW3KP.cjs.map → chunk-FE7463HF.cjs.map} +1 -1
- package/dist/{chunk-VSWGRKTF.js → chunk-GJFS3GMY.js} +3 -3
- package/dist/{chunk-OOD35TZR.cjs → chunk-HFYDNNDB.cjs} +25 -25
- package/dist/{chunk-OOD35TZR.cjs.map → chunk-HFYDNNDB.cjs.map} +1 -1
- package/dist/chunk-HHLZQQNL.cjs +230 -0
- package/dist/chunk-HHLZQQNL.cjs.map +1 -0
- package/dist/{chunk-LMHDQWQM.js → chunk-HSDIWTFF.js} +2 -2
- package/dist/{chunk-B5F7B5NL.js → chunk-IOMH3NL4.js} +2 -2
- package/dist/{chunk-XSDVY4S6.js → chunk-KD6SFQFJ.js} +6 -6
- package/dist/{chunk-YLC25Z64.js → chunk-LGCD3V22.js} +3 -3
- package/dist/{chunk-E3G3JTXW.js → chunk-LUMA2HI3.js} +2 -2
- package/dist/{chunk-E3G3JTXW.js.map → chunk-LUMA2HI3.js.map} +1 -1
- package/dist/{chunk-BX23BOYN.js → chunk-N32TKLQ6.js} +5 -5
- package/dist/chunk-NOYOXAOE.js +230 -0
- package/dist/chunk-NOYOXAOE.js.map +1 -0
- package/dist/{chunk-A6YD5KUQ.js → chunk-NSGKHLS6.js} +104 -50
- package/dist/chunk-NSGKHLS6.js.map +1 -0
- package/dist/{chunk-MHLTXTP2.js → chunk-NT5EVBAI.js} +11 -11
- package/dist/{chunk-NQL7NCSE.js → chunk-PNAMF4RV.js} +2 -2
- package/dist/{chunk-G7QVY67O.js → chunk-PS7U47KE.js} +2 -2
- package/dist/{chunk-G7QVY67O.js.map → chunk-PS7U47KE.js.map} +1 -1
- package/dist/chunk-Q6U3VJIE.js +106 -0
- package/dist/chunk-Q6U3VJIE.js.map +1 -0
- package/dist/{chunk-S6H3ZPYQ.js → chunk-Q7CKFUYR.js} +38 -7
- package/dist/chunk-Q7CKFUYR.js.map +1 -0
- package/dist/{chunk-JDGPQVTX.js → chunk-R2EIJJ34.js} +2 -2
- package/dist/{chunk-ZH322FQG.js → chunk-RI5NWSUQ.js} +122 -35
- package/dist/chunk-RI5NWSUQ.js.map +1 -0
- package/dist/{chunk-HMHIF6QF.cjs → chunk-TOUR2SPI.cjs} +2 -2
- package/dist/{chunk-HMHIF6QF.cjs.map → chunk-TOUR2SPI.cjs.map} +1 -1
- package/dist/chunk-TV7B6DJQ.cjs +43 -0
- package/dist/chunk-TV7B6DJQ.cjs.map +1 -0
- package/dist/{chunk-AUGOG3KY.js → chunk-TXX5GDY3.js} +2 -2
- package/dist/{chunk-BUB3O7LS.js → chunk-UI4NGY4W.js} +4 -4
- package/dist/{chunk-32NWTEPA.js → chunk-UPBZ2BVU.js} +3 -3
- package/dist/{chunk-P4FHTYVX.js → chunk-VFSDX4GE.js} +2 -2
- package/dist/{chunk-376JPHHC.js → chunk-VOW7QLFA.js} +9 -9
- package/dist/{chunk-S366ICXS.js → chunk-VREPDKMC.js} +2 -2
- package/dist/chunk-VRUIVEGD.cjs +106 -0
- package/dist/chunk-VRUIVEGD.cjs.map +1 -0
- package/dist/{chunk-64QDDZO3.js → chunk-VZUIOYCU.js} +17 -14
- package/dist/chunk-VZUIOYCU.js.map +1 -0
- package/dist/{chunk-AAXWKG3C.js → chunk-WSNU2OAY.js} +2 -2
- package/dist/chunk-XJW45ICD.js +43 -0
- package/dist/chunk-XJW45ICD.js.map +1 -0
- package/dist/{chunk-ROYGVYLL.cjs → chunk-XKT4J6AG.cjs} +88 -88
- package/dist/{chunk-ROYGVYLL.cjs.map → chunk-XKT4J6AG.cjs.map} +1 -1
- package/dist/{chunk-M4QZCXT4.js → chunk-YGCR55V2.js} +8 -8
- package/dist/{chunk-MDDQRVA4.cjs → chunk-ZYSH465A.cjs} +104 -104
- package/dist/{chunk-MDDQRVA4.cjs.map → chunk-ZYSH465A.cjs.map} +1 -1
- package/dist/chunks-EVKTSUGA.js +11 -0
- package/dist/cli.js +50 -48
- package/dist/cli.js.map +1 -1
- package/dist/{detect-ALS4RBCY.js → detect-EBGOXZ66.js} +8 -4
- package/dist/{detect-LCFITDPT.js → detect-H2VUHKJS.js} +8 -4
- package/dist/detect-W6JF4PI4.cjs +31 -0
- package/dist/detect-W6JF4PI4.cjs.map +1 -0
- package/dist/{formula-AORKEC66.cjs → formula-CXRJQ5FS.cjs} +9 -9
- package/dist/{formula-AORKEC66.cjs.map → formula-CXRJQ5FS.cjs.map} +1 -1
- package/dist/{formula-IP2SLKUY.js → formula-JZZKJXHR.js} +3 -3
- package/dist/{formula-7Q6CKLK2.js → formula-TE5U7IPG.js} +4 -4
- package/dist/generator-CKTUVW7V.js +11 -0
- package/dist/generator-EVRLN745.cjs +12 -0
- package/dist/{generator-BPEAWT2P.cjs.map → generator-EVRLN745.cjs.map} +1 -1
- package/dist/generator-Q5M3CZPW.js +18 -0
- package/dist/{hancom-J2SWJYM6.cjs → hancom-GYOFLPQZ.cjs} +5 -5
- package/dist/{hancom-J2SWJYM6.cjs.map → hancom-GYOFLPQZ.cjs.map} +1 -1
- package/dist/{hancom-P34JL3HX.js → hancom-JHPB6VOJ.js} +2 -2
- package/dist/{hancom-DVWCKSEN.js → hancom-UFNCFHMZ.js} +2 -2
- package/dist/{image-ocr-7EOTOS42.js → image-ocr-CYVL5C2B.js} +96 -26
- package/dist/image-ocr-CYVL5C2B.js.map +1 -0
- package/dist/{image-ocr-5RBEPJPK.js → image-ocr-YPZTKLHR.js} +93 -23
- package/dist/image-ocr-YPZTKLHR.js.map +1 -0
- package/dist/image-ocr-YYC2JENT.cjs +284 -0
- package/dist/image-ocr-YYC2JENT.cjs.map +1 -0
- package/dist/index.cjs +1223 -1166
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +102 -45
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +43 -41
- package/dist/mcp.js.map +1 -1
- package/dist/memo-FOTH3KQZ.js +17 -0
- package/dist/{model-bundle-7YL3PW4N.js → model-bundle-PJXVN44L.js} +5 -5
- package/dist/{models-ZXDUWX64.js → models-GGI6Z7WG.js} +5 -5
- package/dist/{parse-worker-v2-SGBIWVYJ.js → parse-worker-v2-22KSHQGB.js} +26 -24
- package/dist/{parse-worker-v2-SGBIWVYJ.js.map → parse-worker-v2-22KSHQGB.js.map} +1 -1
- package/dist/{parser-HZANYZZA.js → parser-7WVQ4BOA.js} +20 -18
- package/dist/{parser-HZANYZZA.js.map → parser-7WVQ4BOA.js.map} +1 -1
- package/dist/{parser-RYPZ245J.js → parser-M3T5WYXG.js} +17 -15
- package/dist/{parser-RYPZ245J.js.map → parser-M3T5WYXG.js.map} +1 -1
- package/dist/{parser-6M4IIKSU.cjs → parser-YJYGGUJP.cjs} +172 -170
- package/dist/parser-YJYGGUJP.cjs.map +1 -0
- package/dist/{pdf-ocr-J5BIUOOQ.js → pdf-ocr-T7XAXRHM.js} +6 -6
- package/dist/pdf-ocr-TBGICSC2.cjs +43 -0
- package/dist/{pdf-ocr-26AWXUHX.cjs.map → pdf-ocr-TBGICSC2.cjs.map} +1 -1
- package/dist/{pdf-ocr-VMB4NOXR.js → pdf-ocr-ZS6UGPZE.js} +9 -9
- package/dist/{profile-io-F6WUV5PU.js → profile-io-BRKSGV5H.js} +3 -3
- package/dist/{rasterize-AFUYHCSP.js → rasterize-NE7ODEL3.js} +3 -3
- package/dist/{redact-doc-UKYOAVBS.js → redact-doc-QMKBSH77.js} +25 -23
- package/dist/{redact-doc-UKYOAVBS.js.map → redact-doc-QMKBSH77.js.map} +1 -1
- package/dist/{render-VRZS47LX.js → render-YUUT36B3.js} +14 -14
- package/dist/{rewrite-fallback-PNSM4XRC.js → rewrite-fallback-VMIWMLXI.js} +15 -15
- package/dist/seal-WH555ZEQ.js +16 -0
- package/dist/{setup-VV6ERJGY.js → setup-EINQOQZN.js} +3 -3
- package/dist/to-hwpx-4VONWOHX.js +21 -0
- package/dist/to-hwpx-FL6MGYNQ.cjs +16 -0
- package/dist/{to-hwpx-3OWX37Q4.cjs.map → to-hwpx-FL6MGYNQ.cjs.map} +1 -1
- package/dist/{to-hwpx-YYMXNCCW.js → to-hwpx-RGSKEFZO.js} +5 -5
- package/dist/visual-TROK2J5W.js +40 -0
- package/dist/{watch-BTAIN7LZ.js → watch-LNCWW6C5.js} +26 -24
- package/dist/{watch-BTAIN7LZ.js.map → watch-LNCWW6C5.js.map} +1 -1
- package/package.json +6 -1
- package/dist/chunk-64QDDZO3.js.map +0 -1
- package/dist/chunk-6NZ32OTX.cjs +0 -149
- package/dist/chunk-6NZ32OTX.cjs.map +0 -1
- package/dist/chunk-A6YD5KUQ.js.map +0 -1
- package/dist/chunk-ARVHYL3V.cjs.map +0 -1
- package/dist/chunk-FU6ZDWCI.js +0 -151
- package/dist/chunk-FU6ZDWCI.js.map +0 -1
- package/dist/chunk-GHHVT4Q5.js.map +0 -1
- package/dist/chunk-JY4YMR6F.js.map +0 -1
- package/dist/chunk-QLUFTCAE.cjs.map +0 -1
- package/dist/chunk-S6H3ZPYQ.js.map +0 -1
- package/dist/chunk-UJELMNOU.js +0 -149
- package/dist/chunk-UJELMNOU.js.map +0 -1
- package/dist/chunk-ZH322FQG.js.map +0 -1
- package/dist/chunks-7XYOWREB.js +0 -11
- package/dist/detect-V75ERMYL.cjs +0 -27
- package/dist/detect-V75ERMYL.cjs.map +0 -1
- package/dist/generator-BPEAWT2P.cjs +0 -12
- package/dist/generator-NLWOHWUW.js +0 -18
- package/dist/generator-VBJWJI3E.js +0 -11
- package/dist/image-ocr-3CJ4KVOT.cjs +0 -214
- package/dist/image-ocr-3CJ4KVOT.cjs.map +0 -1
- package/dist/image-ocr-5RBEPJPK.js.map +0 -1
- package/dist/image-ocr-7EOTOS42.js.map +0 -1
- package/dist/memo-ARHG3OC5.js +0 -17
- package/dist/parser-6M4IIKSU.cjs.map +0 -1
- package/dist/pdf-ocr-26AWXUHX.cjs +0 -43
- package/dist/seal-CJOUVTMN.js +0 -16
- package/dist/to-hwpx-3OWX37Q4.cjs +0 -16
- package/dist/to-hwpx-WBMWA54L.js +0 -21
- package/dist/visual-YY2BPPCJ.js +0 -38
- /package/dist/{-CNXSUEGZ.js.map → -U7FV47XK.js.map} +0 -0
- /package/dist/{chunk-S6K222FM.js.map → chunk-2HHE3D4S.js.map} +0 -0
- /package/dist/{chunk-IV6UP7MO.js.map → chunk-2SMYX3L4.js.map} +0 -0
- /package/dist/{chunk-X4HNVXJI.js.map → chunk-2ZZCE4EM.js.map} +0 -0
- /package/dist/{chunk-TTIJTR5Z.js.map → chunk-3PTQBVDC.js.map} +0 -0
- /package/dist/{chunk-CGOCVSWC.js.map → chunk-5CGWJW3U.js.map} +0 -0
- /package/dist/{chunk-VMM5PVOA.js.map → chunk-6OFHUEHR.js.map} +0 -0
- /package/dist/{chunk-ABNK5QI2.js.map → chunk-AJYPIUQK.js.map} +0 -0
- /package/dist/{chunk-UMVL776E.js.map → chunk-AYEDNFX7.js.map} +0 -0
- /package/dist/{chunk-CBGH37CU.js.map → chunk-CRUAWSRK.js.map} +0 -0
- /package/dist/{chunk-RJ26GRDB.js.map → chunk-DDWV6OTG.js.map} +0 -0
- /package/dist/{chunk-2JA4FJJM.js.map → chunk-EYDAQBE7.js.map} +0 -0
- /package/dist/{chunk-BK55EX56.js.map → chunk-FCAMCNBA.js.map} +0 -0
- /package/dist/{chunk-VSWGRKTF.js.map → chunk-GJFS3GMY.js.map} +0 -0
- /package/dist/{chunk-LMHDQWQM.js.map → chunk-HSDIWTFF.js.map} +0 -0
- /package/dist/{chunk-B5F7B5NL.js.map → chunk-IOMH3NL4.js.map} +0 -0
- /package/dist/{chunk-XSDVY4S6.js.map → chunk-KD6SFQFJ.js.map} +0 -0
- /package/dist/{chunk-YLC25Z64.js.map → chunk-LGCD3V22.js.map} +0 -0
- /package/dist/{chunk-BX23BOYN.js.map → chunk-N32TKLQ6.js.map} +0 -0
- /package/dist/{chunk-MHLTXTP2.js.map → chunk-NT5EVBAI.js.map} +0 -0
- /package/dist/{chunk-NQL7NCSE.js.map → chunk-PNAMF4RV.js.map} +0 -0
- /package/dist/{chunk-JDGPQVTX.js.map → chunk-R2EIJJ34.js.map} +0 -0
- /package/dist/{chunk-AUGOG3KY.js.map → chunk-TXX5GDY3.js.map} +0 -0
- /package/dist/{chunk-BUB3O7LS.js.map → chunk-UI4NGY4W.js.map} +0 -0
- /package/dist/{chunk-32NWTEPA.js.map → chunk-UPBZ2BVU.js.map} +0 -0
- /package/dist/{chunk-P4FHTYVX.js.map → chunk-VFSDX4GE.js.map} +0 -0
- /package/dist/{chunk-376JPHHC.js.map → chunk-VOW7QLFA.js.map} +0 -0
- /package/dist/{chunk-S366ICXS.js.map → chunk-VREPDKMC.js.map} +0 -0
- /package/dist/{chunk-AAXWKG3C.js.map → chunk-WSNU2OAY.js.map} +0 -0
- /package/dist/{chunk-M4QZCXT4.js.map → chunk-YGCR55V2.js.map} +0 -0
- /package/dist/{chunks-7XYOWREB.js.map → chunks-EVKTSUGA.js.map} +0 -0
- /package/dist/{detect-ALS4RBCY.js.map → detect-EBGOXZ66.js.map} +0 -0
- /package/dist/{detect-LCFITDPT.js.map → detect-H2VUHKJS.js.map} +0 -0
- /package/dist/{formula-IP2SLKUY.js.map → formula-JZZKJXHR.js.map} +0 -0
- /package/dist/{formula-7Q6CKLK2.js.map → formula-TE5U7IPG.js.map} +0 -0
- /package/dist/{generator-NLWOHWUW.js.map → generator-CKTUVW7V.js.map} +0 -0
- /package/dist/{generator-VBJWJI3E.js.map → generator-Q5M3CZPW.js.map} +0 -0
- /package/dist/{hancom-P34JL3HX.js.map → hancom-JHPB6VOJ.js.map} +0 -0
- /package/dist/{hancom-DVWCKSEN.js.map → hancom-UFNCFHMZ.js.map} +0 -0
- /package/dist/{memo-ARHG3OC5.js.map → memo-FOTH3KQZ.js.map} +0 -0
- /package/dist/{model-bundle-7YL3PW4N.js.map → model-bundle-PJXVN44L.js.map} +0 -0
- /package/dist/{models-ZXDUWX64.js.map → models-GGI6Z7WG.js.map} +0 -0
- /package/dist/{pdf-ocr-J5BIUOOQ.js.map → pdf-ocr-T7XAXRHM.js.map} +0 -0
- /package/dist/{pdf-ocr-VMB4NOXR.js.map → pdf-ocr-ZS6UGPZE.js.map} +0 -0
- /package/dist/{profile-io-F6WUV5PU.js.map → profile-io-BRKSGV5H.js.map} +0 -0
- /package/dist/{rasterize-AFUYHCSP.js.map → rasterize-NE7ODEL3.js.map} +0 -0
- /package/dist/{render-VRZS47LX.js.map → render-YUUT36B3.js.map} +0 -0
- /package/dist/{rewrite-fallback-PNSM4XRC.js.map → rewrite-fallback-VMIWMLXI.js.map} +0 -0
- /package/dist/{seal-CJOUVTMN.js.map → seal-WH555ZEQ.js.map} +0 -0
- /package/dist/{setup-VV6ERJGY.js.map → setup-EINQOQZN.js.map} +0 -0
- /package/dist/{to-hwpx-WBMWA54L.js.map → to-hwpx-4VONWOHX.js.map} +0 -0
- /package/dist/{to-hwpx-YYMXNCCW.js.map → to-hwpx-RGSKEFZO.js.map} +0 -0
- /package/dist/{visual-YY2BPPCJ.js.map → visual-TROK2J5W.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureModelsIn,
|
|
3
3
|
getModelsDir
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TXX5GDY3.js";
|
|
5
5
|
import {
|
|
6
6
|
CELL_EDGES,
|
|
7
7
|
HEADING_RATIO_H1,
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
HEADING_RATIO_H3,
|
|
10
10
|
tidyScriptTags,
|
|
11
11
|
toTex
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LUMA2HI3.js";
|
|
13
13
|
import {
|
|
14
14
|
safeMax,
|
|
15
15
|
safeMin
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-HSDIWTFF.js";
|
|
17
17
|
|
|
18
18
|
// src/ocr/models.ts
|
|
19
19
|
import { join } from "path";
|
|
@@ -11534,4 +11534,4 @@ export {
|
|
|
11534
11534
|
UNRULED_REGION_TABLES,
|
|
11535
11535
|
mergeOcrImageRegions
|
|
11536
11536
|
};
|
|
11537
|
-
//# sourceMappingURL=chunk-
|
|
11537
|
+
//# sourceMappingURL=chunk-UI4NGY4W.js.map
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
HEADING_RATIO_H3,
|
|
7
7
|
tidyScriptTags,
|
|
8
8
|
toTex
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PS7U47KE.js";
|
|
10
10
|
import {
|
|
11
11
|
safeMax,
|
|
12
12
|
safeMin
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-VREPDKMC.js";
|
|
14
14
|
|
|
15
15
|
// src/ocr/line-split.ts
|
|
16
16
|
function grayCrop(rgba, pageW, box) {
|
|
@@ -11381,4 +11381,4 @@ export {
|
|
|
11381
11381
|
UNRULED_REGION_TABLES,
|
|
11382
11382
|
mergeOcrImageRegions
|
|
11383
11383
|
};
|
|
11384
|
-
//# sourceMappingURL=chunk-
|
|
11384
|
+
//# sourceMappingURL=chunk-UPBZ2BVU.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
escapeHtml,
|
|
8
8
|
isGfmUrl,
|
|
9
9
|
sanitizeHref
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VREPDKMC.js";
|
|
11
11
|
|
|
12
12
|
// src/table/builder.ts
|
|
13
13
|
var MAX_COLS = 200;
|
|
@@ -703,4 +703,4 @@ export {
|
|
|
703
703
|
hasInlineCellBlocks,
|
|
704
704
|
cellToMarkdown
|
|
705
705
|
};
|
|
706
|
-
//# sourceMappingURL=chunk-
|
|
706
|
+
//# sourceMappingURL=chunk-VFSDX4GE.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
inlineImagesIntoMarkdown
|
|
3
|
-
} from "./chunk-UJELMNOU.js";
|
|
4
1
|
import {
|
|
5
2
|
parsePageRange
|
|
6
3
|
} from "./chunk-V4BH5SRQ.js";
|
|
4
|
+
import {
|
|
5
|
+
inlineImagesIntoMarkdown
|
|
6
|
+
} from "./chunk-NOYOXAOE.js";
|
|
7
7
|
import {
|
|
8
8
|
parseLenientCfb
|
|
9
9
|
} from "./chunk-PDI54TF2.js";
|
|
@@ -39,12 +39,12 @@ import {
|
|
|
39
39
|
sanitizeText,
|
|
40
40
|
tidyScriptTags,
|
|
41
41
|
unframeLayoutTables
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-LUMA2HI3.js";
|
|
43
43
|
import {
|
|
44
44
|
KordocError,
|
|
45
45
|
VERSION,
|
|
46
46
|
sanitizeHref
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-HSDIWTFF.js";
|
|
48
48
|
|
|
49
49
|
// src/hwp5/to-hwpx/index.ts
|
|
50
50
|
import JSZip from "jszip";
|
|
@@ -5335,13 +5335,13 @@ async function hwpToHwpx(input, options) {
|
|
|
5335
5335
|
async function convertToHwpx(input, options) {
|
|
5336
5336
|
const bytes = input instanceof ArrayBuffer ? new Uint8Array(input) : input;
|
|
5337
5337
|
const ab = bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength);
|
|
5338
|
-
const { detectFormat } = await import("./detect-
|
|
5338
|
+
const { detectFormat } = await import("./detect-EBGOXZ66.js");
|
|
5339
5339
|
const format = detectFormat(ab);
|
|
5340
5340
|
if (format === "hwpx") return { data: bytes, mode: "preserve", engine: "kordoc", warnings: ["\uC774\uBBF8 HWPX \uBB38\uC11C\uC785\uB2C8\uB2E4 \u2014 \uADF8\uB300\uB85C \uB461\uB2C8\uB2E4"] };
|
|
5341
5341
|
if (format !== "hwp" && format !== "hwp3" && format !== "hwpml") throw new KordocError(`HWP \uBB38\uC11C\uAC00 \uC544\uB2D9\uB2C8\uB2E4 (${format})`);
|
|
5342
5342
|
const engine = options?.engine ?? "kordoc";
|
|
5343
5343
|
if (engine !== "kordoc") {
|
|
5344
|
-
const { hancomAvailable, hwpToHwpxViaHancom } = await import("./hancom-
|
|
5344
|
+
const { hancomAvailable, hwpToHwpxViaHancom } = await import("./hancom-UFNCFHMZ.js");
|
|
5345
5345
|
if (engine === "hancom" || !options?.password && hancomAvailable()) {
|
|
5346
5346
|
if (options?.password) throw new KordocError('\uD55C/\uAE00 \uC800\uC7A5 \uBCC0\uD658\uC740 \uC5F4\uAE30 \uC554\uD638\uB97C \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 engine "kordoc" \uC73C\uB85C \uBC14\uAFB8\uC138\uC694');
|
|
5347
5347
|
return { data: hwpToHwpxViaHancom(bytes, format === "hwpml" ? "hml" : "hwp"), mode: "preserve", engine: "hancom", warnings: [] };
|
|
@@ -5349,7 +5349,7 @@ async function convertToHwpx(input, options) {
|
|
|
5349
5349
|
}
|
|
5350
5350
|
if (format === "hwp") return { data: await hwpToHwpx(bytes, options), mode: "preserve", engine: "kordoc", warnings: [] };
|
|
5351
5351
|
const { parse } = await import("./index.js");
|
|
5352
|
-
const { markdownToHwpx } = await import("./generator-
|
|
5352
|
+
const { markdownToHwpx } = await import("./generator-CKTUVW7V.js");
|
|
5353
5353
|
const parsed = await parse(ab, { password: options?.password });
|
|
5354
5354
|
if (!parsed.success) throw new KordocError(parsed.error ?? "\uBB38\uC11C\uB97C \uC77D\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4");
|
|
5355
5355
|
return {
|
|
@@ -5412,4 +5412,4 @@ export {
|
|
|
5412
5412
|
hwpToHwpx,
|
|
5413
5413
|
convertToHwpx
|
|
5414
5414
|
};
|
|
5415
|
-
//# sourceMappingURL=chunk-
|
|
5415
|
+
//# sourceMappingURL=chunk-VOW7QLFA.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// src/utils.ts
|
|
4
4
|
import { format } from "util";
|
|
5
|
-
var VERSION = true ? "4.24.
|
|
5
|
+
var VERSION = true ? "4.24.74" : "0.0.0-dev";
|
|
6
6
|
function toArrayBuffer(buf) {
|
|
7
7
|
if (buf.byteOffset === 0 && buf.byteLength === buf.buffer.byteLength) {
|
|
8
8
|
return buf.buffer;
|
|
@@ -197,4 +197,4 @@ export {
|
|
|
197
197
|
classifyError,
|
|
198
198
|
partExtension
|
|
199
199
|
};
|
|
200
|
-
//# sourceMappingURL=chunk-
|
|
200
|
+
//# sourceMappingURL=chunk-VREPDKMC.js.map
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
|
+
|
|
3
|
+
var _chunkHHLZQQNLcjs = require('./chunk-HHLZQQNL.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkTOUR2SPIcjs = require('./chunk-TOUR2SPI.cjs');
|
|
7
|
+
|
|
8
|
+
// src/image/heic.ts
|
|
9
|
+
var MAX_HEIC_PIXELS = 16383 * 16383;
|
|
10
|
+
var loading;
|
|
11
|
+
function loadLibheif() {
|
|
12
|
+
return loading ??= Promise.resolve().then(() => _interopRequireWildcard(require("libheif-js/libheif-wasm/libheif-bundle.js"))).then(
|
|
13
|
+
(mod) => _nullishCoalesce(mod.default, () => ( mod)),
|
|
14
|
+
(e) => {
|
|
15
|
+
loading = void 0;
|
|
16
|
+
throw new (0, _chunkTOUR2SPIcjs.KordocError)(`HEIC\xB7HEIF \uC774\uBBF8\uC9C0\uB97C \uC77D\uC73C\uB824\uBA74 optional dependency 'libheif-js' \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. \`npm install libheif-js\` \uD6C4 \uB2E4\uC2DC \uC2E4\uD589\uD558\uC138\uC694. \uC6D0\uC778: ${e.message}`);
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
var hasLibheif = () => loadLibheif().then(() => true, () => false);
|
|
21
|
+
async function heicToRgba(bytes, maxPixels = MAX_HEIC_PIXELS) {
|
|
22
|
+
const libheif = (await loadLibheif())();
|
|
23
|
+
const log = console.log;
|
|
24
|
+
console.log = () => {
|
|
25
|
+
};
|
|
26
|
+
let images = [];
|
|
27
|
+
try {
|
|
28
|
+
images = new libheif.HeifDecoder().decode(bytes);
|
|
29
|
+
const img = _nullishCoalesce(images.find((i) => i.is_primary()), () => ( images[0]));
|
|
30
|
+
if (!img) throw new (0, _chunkTOUR2SPIcjs.KordocError)("HEIC\xB7HEIF \uB514\uCF54\uB529 \uC2E4\uD328: \uC774\uBBF8\uC9C0\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4");
|
|
31
|
+
const width = img.get_width(), height = img.get_height();
|
|
32
|
+
if (width * height > maxPixels) throw new (0, _chunkTOUR2SPIcjs.KordocError)(`HEIC\xB7HEIF \uC774\uBBF8\uC9C0\uAC00 \uB108\uBB34 \uD07D\uB2C8\uB2E4 (${width}\xD7${height})`);
|
|
33
|
+
const data = new Uint8ClampedArray(width * height * 4);
|
|
34
|
+
await new Promise((resolve, reject) => img.display({ data, width, height }, (out) => out ? resolve() : reject(new (0, _chunkTOUR2SPIcjs.KordocError)("HEIC\xB7HEIF \uB514\uCF54\uB529 \uC2E4\uD328"))));
|
|
35
|
+
return { data: new Uint8Array(data.buffer), width, height };
|
|
36
|
+
} finally {
|
|
37
|
+
console.log = log;
|
|
38
|
+
for (const i of images) i.free();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// src/image/pcx.ts
|
|
43
|
+
function dcxPages(b) {
|
|
44
|
+
if (b.length < 8 || b[0] !== 177 || b[1] !== 104 || b[2] !== 222 || b[3] !== 58) return [];
|
|
45
|
+
const v = new DataView(b.buffer, b.byteOffset, b.byteLength), offs = [];
|
|
46
|
+
for (let o = 4; o + 4 <= b.length && offs.length < 1023; o += 4) {
|
|
47
|
+
const off = v.getUint32(o, true);
|
|
48
|
+
if (!off) break;
|
|
49
|
+
if (off >= b.length || offs.length && off <= offs[offs.length - 1]) return [];
|
|
50
|
+
offs.push(off);
|
|
51
|
+
}
|
|
52
|
+
return offs.map((off, i) => b.subarray(off, offs[i + 1] > off ? offs[i + 1] : b.length));
|
|
53
|
+
}
|
|
54
|
+
function pcxToRgba(b) {
|
|
55
|
+
if (b.length < 128 || b[0] !== 10 || b[2] !== 1) return null;
|
|
56
|
+
const v = new DataView(b.buffer, b.byteOffset, b.byteLength);
|
|
57
|
+
const bits = b[3], planes = b[65], line = v.getUint16(66, true);
|
|
58
|
+
const width = v.getUint16(8, true) - v.getUint16(4, true) + 1, height = v.getUint16(10, true) - v.getUint16(6, true) + 1;
|
|
59
|
+
const mono = bits === 1 && [1, 2, 4].includes(planes), gray = bits === 8 && planes === 1, rgb = bits === 8 && planes === 3;
|
|
60
|
+
if (!(mono || gray || rgb) || width <= 0 || height <= 0 || width * height > _chunkHHLZQQNLcjs.MAX_PIXELS || line * 8 < width * bits) return null;
|
|
61
|
+
const stride = line * planes;
|
|
62
|
+
if (stride * height > _chunkHHLZQQNLcjs.MAX_PIXELS * 4) return null;
|
|
63
|
+
const raw = new Uint8Array(stride * height);
|
|
64
|
+
let i = 128, o = 0;
|
|
65
|
+
while (o < raw.length) {
|
|
66
|
+
if (i >= b.length) return null;
|
|
67
|
+
const c = b[i++];
|
|
68
|
+
if (c < 192) {
|
|
69
|
+
raw[o++] = c;
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
if (i >= b.length) return null;
|
|
73
|
+
raw.fill(b[i++], o, Math.min(o + (c & 63), raw.length));
|
|
74
|
+
o += c & 63;
|
|
75
|
+
}
|
|
76
|
+
const tail = b.length - 769;
|
|
77
|
+
const pal = gray ? tail >= 128 && b[tail] === 12 ? b.subarray(tail + 1) : null : b.subarray(16, 64);
|
|
78
|
+
const rgba = new Uint8Array(width * height * 4);
|
|
79
|
+
for (let y = 0; y < height; y++) {
|
|
80
|
+
const row = y * stride;
|
|
81
|
+
for (let x = 0; x < width; x++) {
|
|
82
|
+
const d = (y * width + x) * 4;
|
|
83
|
+
if (rgb) rgba.set([raw[row + x], raw[row + line + x], raw[row + 2 * line + x], 255], d);
|
|
84
|
+
else {
|
|
85
|
+
let k = 0;
|
|
86
|
+
if (mono) for (let p = 0; p < planes; p++) k |= (raw[row + p * line + (x >> 3)] >> 7 - (x & 7) & 1) << p;
|
|
87
|
+
else k = raw[row + x];
|
|
88
|
+
if (mono && planes === 1) k *= 255;
|
|
89
|
+
else if (pal) {
|
|
90
|
+
rgba.set([pal[k * 3], pal[k * 3 + 1], pal[k * 3 + 2], 255], d);
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
rgba.set([k, k, k, 255], d);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return { data: rgba, width, height, dpi: v.getUint16(12, true) };
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
exports.hasLibheif = hasLibheif; exports.heicToRgba = heicToRgba; exports.dcxPages = dcxPages; exports.pcxToRgba = pcxToRgba;
|
|
106
|
+
//# sourceMappingURL=chunk-VRUIVEGD.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/Users/mong-e/workspace/kordoc/dist/chunk-VRUIVEGD.cjs","../src/image/heic.ts","../src/image/pcx.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACMA,IAAM,gBAAA,EAAkB,MAAA,EAAS,KAAA;AAYjC,IAAI,OAAA;AAEJ,SAAS,WAAA,CAAA,EAAuC;AAC9C,EAAA,OAAO,QAAA,IAAY,4DAAA,CAAO,2CAA2C,GAAA,CAAE,IAAA;AAAA,IACrE,CAAA,GAAA,EAAA,oBAAS,GAAA,CAAqC,OAAA,UAAW,KAAA;AAAA,IACzD,CAAA,CAAA,EAAA,GAAK;AACH,MAAA,QAAA,EAAU,KAAA,CAAA;AACV,MAAA,MAAM,IAAI,kCAAA,CAAY,CAAA,oOAAA,EAA6G,CAAA,CAAY,OAAO,CAAA,CAAA;AACxJ,IAAA;AACF,EAAA;AACF;AAG4F;AAGmD;AACvG,EAAA;AAElB,EAAA;AACA,EAAA;AAAC,EAAA;AACM,EAAA;AACvB,EAAA;AAC6C,IAAA;AACS,IAAA;AACK,IAAA;AACN,IAAA;AAC2C,IAAA;AAC7C,IAAA;AACkG,IAAA;AAC7F,IAAA;AAC1D,EAAA;AACc,IAAA;AACiB,IAAA;AACjC,EAAA;AACF;ADpB6Q;AACA;AEhCvN;AAC0C,EAAA;AACd,EAAA;AACf,EAAA;AAChC,IAAA;AACrB,IAAA;AAEoE,IAAA;AACjE,IAAA;AACf,EAAA;AACuF,EAAA;AACzF;AAEkH;AACtD,EAAA;AACC,EAAA;AACG,EAAA;AACyD,EAAA;AACE,EAAA;AACC,EAAA;AAEpG,EAAA;AACuB,EAAA;AAEH,EAAA;AACzB,EAAA;AACM,EAAA;AACK,IAAA;AACX,IAAA;AACD,IAAA;AAAa,MAAA;AAAG,MAAA;AAAS,IAAA;AACb,IAAA;AAC8B,IAAA;AAC/C,IAAA;AACX,EAAA;AAEwB,EAAA;AAC8E,EAAA;AACxD,EAAA;AACb,EAAA;AACf,IAAA;AACgB,IAAA;AACF,MAAA;AAC0D,MAAA;AACjF,MAAA;AACK,QAAA;AACmG,QAAA;AACvF,QAAA;AACW,QAAA;AACjB,QAAA;AAA+D,UAAA;AAAG,UAAA;AAAS,QAAA;AAC/D,QAAA;AAC5B,MAAA;AACF,IAAA;AACF,EAAA;AAC+D,EAAA;AACjE;AFmC6Q;AACA;AACA;AACA;AACA;AACA;AACA","file":"/Users/mong-e/workspace/kordoc/dist/chunk-VRUIVEGD.cjs","sourcesContent":[null,"/**\n * HEIC·HEIF(HEVC) 디코딩 — 아이폰 기본 사진 형식. sharp prebuilt 에는 HEVC 디코더가 없다(AV1 인 AVIF 만 읽는다).\n *\n * libheif-js(libheif + libde265 의 wasm 빌드, LGPL-3.0)가 설치돼 있을 때만 동적 import 한다. HEVC 는 특허가 걸린 코덱이라\n * kordoc 이 함께 설치하지 않는다 — 필요한 사용자가 `npm install libheif-js` 로 설치한다. 없으면 MISSING_DEPENDENCY.\n * `libheif-js/wasm` 은 wasm 파일을 현재 작업 폴더 기준으로 찾아 실패하므로, wasm 이 내장된 번들(libheif-bundle.js)을 쓴다.\n * 이미지마다 인스턴스를 새로 만든다(수 ms) — wasm 메모리는 줄어들지 않아, 인스턴스 하나를 계속 쓰면 가장 큰 사진만큼의 heap 이 프로세스 끝까지 남는다.\n */\n\nimport { KordocError } from \"../utils.js\"\n\n/** 기본 상한은 sharp 기본 limitInputPixels(16383²) — 이미지 파일 입력이 PNG·JPEG 와 같은 크기까지 받게(아이폰 48MP 사진 포함).\n * 문서 내 이미지 변환은 다른 포맷과 같은 MAX_PIXELS 를 넘긴다. 상한은 RGBA 버퍼를 할당하기 전에 헤더 크기로 확인한다 */\nconst MAX_HEIC_PIXELS = 0x3fff * 0x3fff\n\ninterface HeifImage {\n get_width(): number\n get_height(): number\n is_primary(): boolean\n display(target: { data: Uint8ClampedArray; width: number; height: number }, done: (out: unknown) => void): void\n free(): void\n}\ninterface Libheif { HeifDecoder: new () => { decode(bytes: Uint8Array): HeifImage[] } }\ntype LibheifFactory = () => Libheif\n\nlet loading: Promise<LibheifFactory> | undefined\n\nfunction loadLibheif(): Promise<LibheifFactory> {\n return loading ??= import(\"libheif-js/libheif-wasm/libheif-bundle.js\").then(\n mod => ((mod as { default?: LibheifFactory }).default ?? mod) as LibheifFactory,\n e => {\n loading = undefined\n throw new KordocError(`HEIC·HEIF 이미지를 읽으려면 optional dependency 'libheif-js' 가 필요합니다. \\`npm install libheif-js\\` 후 다시 실행하세요. 원인: ${(e as Error).message}`)\n },\n )\n}\n\n/** libheif-js 를 불러올 수 있는가 — 바꾸지 못한 HEIC 경고에 설치 안내를 붙일지 */\nexport const hasLibheif = (): Promise<boolean> => loadLibheif().then(() => true, () => false)\n\n/** HEIC·HEIF primary 이미지 → RGBA8. 회전(irot)·반전(imir)은 libheif 가 적용한다 */\nexport async function heicToRgba(bytes: Uint8Array, maxPixels = MAX_HEIC_PIXELS): Promise<{ data: Uint8Array; width: number; height: number }> {\n const libheif = (await loadLibheif())()\n // libheif-js 는 오류를 console.log 로 출력한다 — CLI stdout·MCP stdio 가 깨지지 않게 디코딩하는 동안 끈다\n const log = console.log\n console.log = () => {}\n let images: HeifImage[] = []\n try {\n images = new libheif.HeifDecoder().decode(bytes)\n const img = images.find(i => i.is_primary()) ?? images[0]\n if (!img) throw new KordocError(\"HEIC·HEIF 디코딩 실패: 이미지가 없습니다\")\n const width = img.get_width(), height = img.get_height()\n if (width * height > maxPixels) throw new KordocError(`HEIC·HEIF 이미지가 너무 큽니다 (${width}×${height})`)\n const data = new Uint8ClampedArray(width * height * 4)\n await new Promise<void>((resolve, reject) => img.display({ data, width, height }, out => out ? resolve() : reject(new KordocError(\"HEIC·HEIF 디코딩 실패\"))))\n return { data: new Uint8Array(data.buffer), width, height }\n } finally {\n console.log = log\n for (const i of images) i.free()\n }\n}\n","/**\n * PCX·DCX → 8bit RGBA (ZSoft PCX 공개 명세, Pillow PcxImagePlugin 과 같은 범위).\n * 지원: 1비트 1 plane(흑백)·2·4 plane(헤더 16색 팔레트), 8비트 1 plane(파일 끝 256색 팔레트, 없으면 그레이스케일), 8비트 3 plane(RGB).\n * DCX 는 팩스 소프트웨어가 PCX 여러 장을 묶은 포맷 — dcxPages 로 페이지를 분리한다. 그 외·잘린 파일·상한 초과는 null\n */\n\nimport { MAX_PIXELS } from \"./transcode.js\"\n\n/** DCX 페이지(PCX 바이트) 목록 — 헤더 뒤 오프셋 표(최대 1,023개, 0 으로 끝). DCX 가 아니면 빈 배열 */\nexport function dcxPages(b: Uint8Array): Uint8Array[] {\n if (b.length < 8 || b[0] !== 0xb1 || b[1] !== 0x68 || b[2] !== 0xde || b[3] !== 0x3a) return []\n const v = new DataView(b.buffer, b.byteOffset, b.byteLength), offs: number[] = []\n for (let o = 4; o + 4 <= b.length && offs.length < 1023; o += 4) {\n const off = v.getUint32(o, true)\n if (!off) break\n // 오프셋이 겹치면 같은 페이지를 여러 번 디코딩하게 된다 — 엄격히 증가하지 않으면 거부\n if (off >= b.length || (offs.length && off <= offs[offs.length - 1])) return []\n offs.push(off)\n }\n return offs.map((off, i) => b.subarray(off, offs[i + 1] > off ? offs[i + 1] : b.length))\n}\n\nexport function pcxToRgba(b: Uint8Array): { data: Uint8Array; width: number; height: number; dpi: number } | null {\n if (b.length < 128 || b[0] !== 0x0a || b[2] !== 1) return null\n const v = new DataView(b.buffer, b.byteOffset, b.byteLength)\n const bits = b[3], planes = b[65], line = v.getUint16(66, true)\n const width = v.getUint16(8, true) - v.getUint16(4, true) + 1, height = v.getUint16(10, true) - v.getUint16(6, true) + 1\n const mono = bits === 1 && [1, 2, 4].includes(planes), gray = bits === 8 && planes === 1, rgb = bits === 8 && planes === 3\n if (!(mono || gray || rgb) || width <= 0 || height <= 0 || width * height > MAX_PIXELS || line * 8 < width * bits) return null\n // 헤더의 BytesPerLine 이 너비보다 훨씬 커도 디코딩 버퍼는 RGBA 상한(MAX_PIXELS × 4) 안으로\n const stride = line * planes\n if (stride * height > MAX_PIXELS * 4) return null\n // RLE — 상위 두 비트가 11 인 바이트는 하위 6비트가 반복 횟수, 다음 바이트가 값\n const raw = new Uint8Array(stride * height)\n let i = 128, o = 0\n while (o < raw.length) {\n if (i >= b.length) return null // 잘린 파일\n const c = b[i++]\n if (c < 0xc0) { raw[o++] = c; continue }\n if (i >= b.length) return null\n raw.fill(b[i++], o, Math.min(o + (c & 0x3f), raw.length))\n o += c & 0x3f\n }\n // 8비트 팔레트는 파일 끝 0x0C + 768바이트, 1비트 multi-plane 은 헤더 16색\n const tail = b.length - 769\n const pal = gray ? (tail >= 128 && b[tail] === 0x0c ? b.subarray(tail + 1) : null) : b.subarray(16, 64)\n const rgba = new Uint8Array(width * height * 4)\n for (let y = 0; y < height; y++) {\n const row = y * stride\n for (let x = 0; x < width; x++) {\n const d = (y * width + x) * 4\n if (rgb) rgba.set([raw[row + x], raw[row + line + x], raw[row + 2 * line + x], 255], d)\n else {\n let k = 0\n if (mono) for (let p = 0; p < planes; p++) k |= ((raw[row + p * line + (x >> 3)] >> (7 - (x & 7))) & 1) << p\n else k = raw[row + x]\n if (mono && planes === 1) k *= 255\n else if (pal) { rgba.set([pal[k * 3], pal[k * 3 + 1], pal[k * 3 + 2], 255], d); continue }\n rgba.set([k, k, k, 255], d)\n }\n }\n }\n return { data: rgba, width, height, dpi: v.getUint16(12, true) }\n}\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
decryptHwpxInPlace,
|
|
4
4
|
lockedHwpxError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CRUAWSRK.js";
|
|
6
6
|
import {
|
|
7
7
|
AUTONUM_PREFIX_RE,
|
|
8
8
|
EMPH_BOLD,
|
|
@@ -62,15 +62,15 @@ import {
|
|
|
62
62
|
unescapeGfm,
|
|
63
63
|
unescapeGfmCell,
|
|
64
64
|
wordHunks
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-KD6SFQFJ.js";
|
|
66
66
|
import {
|
|
67
67
|
noteFormatFrom,
|
|
68
68
|
noteRefMark
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-WSNU2OAY.js";
|
|
70
70
|
import {
|
|
71
71
|
patchZipEntries,
|
|
72
72
|
readZipEntries
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-IOMH3NL4.js";
|
|
74
74
|
import {
|
|
75
75
|
allLinesegRemovalSplices,
|
|
76
76
|
applySplices,
|
|
@@ -99,7 +99,7 @@ import {
|
|
|
99
99
|
findChildByLocalName,
|
|
100
100
|
localName,
|
|
101
101
|
readZipEntry
|
|
102
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-AYEDNFX7.js";
|
|
103
103
|
import {
|
|
104
104
|
detectImageMime,
|
|
105
105
|
hasRealStrike,
|
|
@@ -108,7 +108,7 @@ import {
|
|
|
108
108
|
locateMemoBlocks,
|
|
109
109
|
parseHwp5Document,
|
|
110
110
|
unfilledClickHereGuide
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-DDWV6OTG.js";
|
|
112
112
|
import {
|
|
113
113
|
FLAG_COMPRESSED,
|
|
114
114
|
FLAG_DISTRIBUTION,
|
|
@@ -129,32 +129,32 @@ import {
|
|
|
129
129
|
isExtendedOnlyCtrlChar,
|
|
130
130
|
parseFileHeader,
|
|
131
131
|
readRecords
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-6OFHUEHR.js";
|
|
133
133
|
import {
|
|
134
134
|
parsePageRange
|
|
135
135
|
} from "./chunk-VQFA55IC.js";
|
|
136
136
|
import {
|
|
137
137
|
detectFormat
|
|
138
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-3O3KTZ7H.js";
|
|
139
139
|
import {
|
|
140
140
|
normalizedSimilarity
|
|
141
141
|
} from "./chunk-QLZHIJWJ.js";
|
|
142
142
|
import {
|
|
143
143
|
unframeLayoutTables
|
|
144
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-PS7U47KE.js";
|
|
145
145
|
import {
|
|
146
146
|
blocksToMarkdown,
|
|
147
147
|
escapeGfm,
|
|
148
148
|
hasInlineCellBlocks,
|
|
149
149
|
sanitizeText
|
|
150
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-VFSDX4GE.js";
|
|
151
151
|
import {
|
|
152
152
|
KordocError,
|
|
153
153
|
compareSectionPaths,
|
|
154
154
|
isPathTraversal,
|
|
155
155
|
precheckZipSize,
|
|
156
156
|
stripDtd
|
|
157
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-VREPDKMC.js";
|
|
158
158
|
|
|
159
159
|
// src/hwpx/parser.ts
|
|
160
160
|
import JSZip2 from "jszip";
|
|
@@ -1325,11 +1325,14 @@ function patchNestedTables(table, scanTable, oc, origTables, editedTables, ctx,
|
|
|
1325
1325
|
return applied;
|
|
1326
1326
|
}
|
|
1327
1327
|
function extractImgTags(inner) {
|
|
1328
|
-
return (inner.match(/<img\s(?:"[^"]*"|'[^']*'|[^>"'])*?>/gi) || []).join(" ");
|
|
1328
|
+
return sameImageNames((inner.match(/<img\s(?:"[^"]*"|'[^']*'|[^>"'])*?>/gi) || []).join(" "));
|
|
1329
1329
|
}
|
|
1330
1330
|
var CELL_TOKEN_RE = /!\[image\]\([^)]*\)|\[이미지: [^\]]*\]/g;
|
|
1331
1331
|
function extractCellTokens(text) {
|
|
1332
|
-
return (text.match(CELL_TOKEN_RE) || []).join(" ");
|
|
1332
|
+
return sameImageNames((text.match(CELL_TOKEN_RE) || []).join(" "));
|
|
1333
|
+
}
|
|
1334
|
+
function sameImageNames(tokens) {
|
|
1335
|
+
return tokens.replace(/(\.[A-Za-z0-9]{2,5})(?=\)|["'\s>])/g, "");
|
|
1333
1336
|
}
|
|
1334
1337
|
function stripCellTokens(text) {
|
|
1335
1338
|
return text.replace(CELL_TOKEN_RE, "");
|
|
@@ -4208,4 +4211,4 @@ export {
|
|
|
4208
4211
|
removeNoteMarks,
|
|
4209
4212
|
diffUnitLists
|
|
4210
4213
|
};
|
|
4211
|
-
//# sourceMappingURL=chunk-
|
|
4214
|
+
//# sourceMappingURL=chunk-VZUIOYCU.js.map
|