kordoc 4.24.69 → 4.24.70
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/{-KG4BXVPV.js → -JPBHAOIR.js} +21 -21
- package/dist/{chunk-4SKZG3K4.cjs → chunk-3EPX46NF.cjs} +2 -2
- package/dist/{chunk-4SKZG3K4.cjs.map → chunk-3EPX46NF.cjs.map} +1 -1
- package/dist/{chunk-KXVMRGSM.js → chunk-6PVJCEF7.js} +2 -2
- package/dist/{chunk-I776RNAM.js → chunk-6SQF5PAM.js} +2 -2
- package/dist/{chunk-FQHTZNNA.js → chunk-6T6VP4AQ.js} +6 -6
- package/dist/{chunk-6RAP7IYO.js → chunk-6UNCF3PJ.js} +2 -2
- package/dist/{chunk-3APUYEC6.js → chunk-7CLI2Y6A.js} +2 -2
- package/dist/{chunk-6T2QXCFD.cjs → chunk-7D6KEQNU.cjs} +60 -59
- package/dist/chunk-7D6KEQNU.cjs.map +1 -0
- package/dist/{chunk-AQSU4NAT.cjs → chunk-A5MTYCTO.cjs} +8 -8
- package/dist/{chunk-AQSU4NAT.cjs.map → chunk-A5MTYCTO.cjs.map} +1 -1
- package/dist/{chunk-ZPSCL2UV.js → chunk-CVH5PB65.js} +2 -2
- package/dist/{chunk-SQXRRR75.cjs → chunk-EESBEBUC.cjs} +190 -170
- package/dist/chunk-EESBEBUC.cjs.map +1 -0
- package/dist/{chunk-OWYYRDZR.js → chunk-FPGY6TH2.js} +2 -2
- package/dist/{chunk-YJA4HQUO.js → chunk-G3UCY3T7.js} +2 -2
- package/dist/{chunk-R32ERRRI.js → chunk-G5YCISXC.js} +28 -8
- package/dist/chunk-G5YCISXC.js.map +1 -0
- package/dist/{chunk-ONKURIVQ.js → chunk-HUKGGV5M.js} +2 -2
- package/dist/{chunk-JDHX44G4.js → chunk-ICK4R4HF.js} +2 -2
- package/dist/{chunk-OZWNUIUS.cjs → chunk-JLMNWMZJ.cjs} +88 -88
- package/dist/{chunk-OZWNUIUS.cjs.map → chunk-JLMNWMZJ.cjs.map} +1 -1
- package/dist/{chunk-QXZZ37WG.js → chunk-JVVTJDJY.js} +3 -3
- package/dist/{chunk-3MQXPZ6R.js → chunk-KET32GPP.js} +3 -3
- package/dist/{chunk-3CUPBG7W.js → chunk-KV5YT6L4.js} +3 -3
- package/dist/{chunk-OYXFVDEL.js → chunk-LEITYWHM.js} +2 -2
- package/dist/{chunk-C3OMT5XO.js → chunk-MIERFAOB.js} +2 -2
- package/dist/{chunk-53KBBSHJ.js → chunk-MU7YOHDK.js} +2 -2
- package/dist/{chunk-LERHV2DV.js → chunk-N426QQP6.js} +2 -2
- package/dist/{chunk-V37SADMF.js → chunk-N6XPJBIS.js} +27 -7
- package/dist/chunk-N6XPJBIS.js.map +1 -0
- package/dist/{chunk-6RWM6WRI.cjs → chunk-NIFJSZR7.cjs} +3 -3
- package/dist/{chunk-6RWM6WRI.cjs.map → chunk-NIFJSZR7.cjs.map} +1 -1
- package/dist/{chunk-XHAM4CGG.js → chunk-O2RV2FMS.js} +7 -6
- package/dist/chunk-O2RV2FMS.js.map +1 -0
- package/dist/{chunk-OEBMM2WZ.js → chunk-OHSTI6C3.js} +2 -2
- package/dist/{chunk-5ZDXCGBI.cjs → chunk-OTIYXYOL.cjs} +104 -104
- package/dist/{chunk-5ZDXCGBI.cjs.map → chunk-OTIYXYOL.cjs.map} +1 -1
- package/dist/{chunk-EM6II5KB.js → chunk-Q4DDUA7U.js} +2 -2
- package/dist/{chunk-AAIU5QXZ.js → chunk-QTRQ4KM3.js} +2 -2
- package/dist/{chunk-3LYXCBQ6.js → chunk-R6J7X4ND.js} +2 -2
- package/dist/{chunk-MHRKKMCS.js → chunk-RTQ2N6DG.js} +6 -6
- package/dist/{chunk-4NPX2NIK.js → chunk-TAATW772.js} +10 -10
- package/dist/{chunk-U456OELH.js → chunk-UD7DB4U3.js} +2 -2
- package/dist/{chunk-YBV3DCBB.js → chunk-UMVD6PRZ.js} +3 -3
- package/dist/{chunk-6ZWX733V.js → chunk-VCRBRUCO.js} +7 -6
- package/dist/chunk-VCRBRUCO.js.map +1 -0
- package/dist/{chunk-KCA54CHN.js → chunk-VZ2J3654.js} +5 -5
- package/dist/{chunk-GMTI7GBK.js → chunk-WVQDRZF5.js} +11 -11
- package/dist/{chunk-EBBPXRLU.js → chunk-XHBJCOWB.js} +4 -4
- package/dist/{chunk-YYGN4RAC.cjs → chunk-XRZERCPJ.cjs} +3 -3
- package/dist/{chunk-YYGN4RAC.cjs.map → chunk-XRZERCPJ.cjs.map} +1 -1
- package/dist/{chunk-MQHAFMEU.js → chunk-YG42FESS.js} +15 -15
- package/dist/{chunk-PZ7NOQHD.js → chunk-YY54476T.js} +2 -2
- package/dist/{chunk-4P4ZWHNQ.js → chunk-ZMPNA2W7.js} +7 -7
- package/dist/chunks-7ABYRV7K.js +11 -0
- package/dist/cli.js +45 -45
- package/dist/{formula-TO3RLKBZ.js → formula-BJU6ZM3X.js} +3 -3
- package/dist/{formula-4HIPZCUM.cjs → formula-BVDS6XNY.cjs} +9 -9
- package/dist/{formula-4HIPZCUM.cjs.map → formula-BVDS6XNY.cjs.map} +1 -1
- package/dist/{formula-ACYUF2DL.js → formula-ESTBYQ67.js} +4 -4
- package/dist/generator-B5RBQFEP.js +18 -0
- package/dist/generator-JBGS3C5H.cjs +12 -0
- package/dist/{generator-UAEKNWCY.cjs.map → generator-JBGS3C5H.cjs.map} +1 -1
- package/dist/generator-NZFUFJL4.js +11 -0
- package/dist/{hancom-FCNE5FBM.js → hancom-FINYE4NT.js} +2 -2
- package/dist/{hancom-JLRWAJ7K.js → hancom-TE4NLTFM.js} +2 -2
- package/dist/{hancom-4FAVUJFH.cjs → hancom-YC2LGVBP.cjs} +5 -5
- package/dist/{hancom-4FAVUJFH.cjs.map → hancom-YC2LGVBP.cjs.map} +1 -1
- package/dist/{image-ocr-ZIHIC6E7.js → image-ocr-L256UYPI.js} +7 -7
- package/dist/{image-ocr-HGYEY56S.cjs → image-ocr-T77T2NQO.cjs} +28 -28
- package/dist/{image-ocr-HGYEY56S.cjs.map → image-ocr-T77T2NQO.cjs.map} +1 -1
- package/dist/{image-ocr-53K5Y7RJ.js → image-ocr-TB5QRYYM.js} +10 -10
- package/dist/index.cjs +1115 -1115
- package/dist/index.js +9 -9
- package/dist/mcp.js +36 -36
- package/dist/memo-VDT6J2FA.js +17 -0
- package/dist/{model-bundle-VR77PCZE.js → model-bundle-THGO5EUW.js} +5 -5
- package/dist/{models-CLF7ODRG.js → models-MKIZDK2U.js} +5 -5
- package/dist/{parse-worker-v2-WXRS3WBA.js → parse-worker-v2-MGNDWJDE.js} +22 -22
- package/dist/{parser-LKSBUPHG.js → parser-C6EZWRQM.js} +12 -12
- package/dist/{parser-H27KVKB7.js → parser-EULDI5W6.js} +9 -9
- package/dist/{parser-7UHFKMVL.cjs → parser-IC2X7P2S.cjs} +166 -166
- package/dist/{parser-7UHFKMVL.cjs.map → parser-IC2X7P2S.cjs.map} +1 -1
- package/dist/{pdf-ocr-ABMCDMIV.js → pdf-ocr-4Y6VPEZC.js} +9 -9
- package/dist/pdf-ocr-7SNY67NL.cjs +43 -0
- package/dist/{pdf-ocr-Z22C7K6C.cjs.map → pdf-ocr-7SNY67NL.cjs.map} +1 -1
- package/dist/{pdf-ocr-AYLXK6OF.js → pdf-ocr-LQ5SYFCE.js} +6 -6
- package/dist/{profile-io-HGOQULXZ.js → profile-io-SDJTSIFY.js} +3 -3
- package/dist/{rasterize-5RWYKMSP.js → rasterize-TGFUBV6B.js} +3 -3
- package/dist/{redact-doc-HNKVSOLJ.js → redact-doc-X5WKER3O.js} +21 -21
- package/dist/{render-TUDHFNDV.js → render-6KIT7GYL.js} +12 -12
- package/dist/{rewrite-fallback-EWVH2MR4.js → rewrite-fallback-ARYCZKU6.js} +13 -13
- package/dist/seal-4IPGOMFX.js +16 -0
- package/dist/{setup-5EEOZUUH.js → setup-ZEMI2HI4.js} +3 -3
- package/dist/to-hwpx-MVDTG25O.cjs +16 -0
- package/dist/{to-hwpx-RNZ72ZYF.cjs.map → to-hwpx-MVDTG25O.cjs.map} +1 -1
- package/dist/{to-hwpx-UHNIAQ2L.js → to-hwpx-QRVTR6VA.js} +4 -4
- package/dist/{to-hwpx-6KY7WGVN.js → to-hwpx-XCS6LSWE.js} +7 -7
- package/dist/visual-4D32BQGS.js +38 -0
- package/dist/{watch-SZJOKRCO.js → watch-LFL26YPL.js} +22 -22
- package/package.json +1 -1
- package/dist/chunk-6T2QXCFD.cjs.map +0 -1
- package/dist/chunk-6ZWX733V.js.map +0 -1
- package/dist/chunk-R32ERRRI.js.map +0 -1
- package/dist/chunk-SQXRRR75.cjs.map +0 -1
- package/dist/chunk-V37SADMF.js.map +0 -1
- package/dist/chunk-XHAM4CGG.js.map +0 -1
- package/dist/chunks-HN36MEGV.js +0 -11
- package/dist/generator-5NUDHWLL.js +0 -11
- package/dist/generator-K2CNNN64.js +0 -18
- package/dist/generator-UAEKNWCY.cjs +0 -12
- package/dist/memo-ALIRNVIU.js +0 -17
- package/dist/pdf-ocr-Z22C7K6C.cjs +0 -43
- package/dist/seal-R6WDXSRI.js +0 -16
- package/dist/to-hwpx-RNZ72ZYF.cjs +0 -16
- package/dist/visual-Z5HND4S7.js +0 -38
- /package/dist/{-KG4BXVPV.js.map → -JPBHAOIR.js.map} +0 -0
- /package/dist/{chunk-KXVMRGSM.js.map → chunk-6PVJCEF7.js.map} +0 -0
- /package/dist/{chunk-I776RNAM.js.map → chunk-6SQF5PAM.js.map} +0 -0
- /package/dist/{chunk-FQHTZNNA.js.map → chunk-6T6VP4AQ.js.map} +0 -0
- /package/dist/{chunk-6RAP7IYO.js.map → chunk-6UNCF3PJ.js.map} +0 -0
- /package/dist/{chunk-3APUYEC6.js.map → chunk-7CLI2Y6A.js.map} +0 -0
- /package/dist/{chunk-ZPSCL2UV.js.map → chunk-CVH5PB65.js.map} +0 -0
- /package/dist/{chunk-OWYYRDZR.js.map → chunk-FPGY6TH2.js.map} +0 -0
- /package/dist/{chunk-YJA4HQUO.js.map → chunk-G3UCY3T7.js.map} +0 -0
- /package/dist/{chunk-ONKURIVQ.js.map → chunk-HUKGGV5M.js.map} +0 -0
- /package/dist/{chunk-JDHX44G4.js.map → chunk-ICK4R4HF.js.map} +0 -0
- /package/dist/{chunk-QXZZ37WG.js.map → chunk-JVVTJDJY.js.map} +0 -0
- /package/dist/{chunk-3MQXPZ6R.js.map → chunk-KET32GPP.js.map} +0 -0
- /package/dist/{chunk-3CUPBG7W.js.map → chunk-KV5YT6L4.js.map} +0 -0
- /package/dist/{chunk-OYXFVDEL.js.map → chunk-LEITYWHM.js.map} +0 -0
- /package/dist/{chunk-C3OMT5XO.js.map → chunk-MIERFAOB.js.map} +0 -0
- /package/dist/{chunk-53KBBSHJ.js.map → chunk-MU7YOHDK.js.map} +0 -0
- /package/dist/{chunk-LERHV2DV.js.map → chunk-N426QQP6.js.map} +0 -0
- /package/dist/{chunk-OEBMM2WZ.js.map → chunk-OHSTI6C3.js.map} +0 -0
- /package/dist/{chunk-EM6II5KB.js.map → chunk-Q4DDUA7U.js.map} +0 -0
- /package/dist/{chunk-AAIU5QXZ.js.map → chunk-QTRQ4KM3.js.map} +0 -0
- /package/dist/{chunk-3LYXCBQ6.js.map → chunk-R6J7X4ND.js.map} +0 -0
- /package/dist/{chunk-MHRKKMCS.js.map → chunk-RTQ2N6DG.js.map} +0 -0
- /package/dist/{chunk-4NPX2NIK.js.map → chunk-TAATW772.js.map} +0 -0
- /package/dist/{chunk-U456OELH.js.map → chunk-UD7DB4U3.js.map} +0 -0
- /package/dist/{chunk-YBV3DCBB.js.map → chunk-UMVD6PRZ.js.map} +0 -0
- /package/dist/{chunk-KCA54CHN.js.map → chunk-VZ2J3654.js.map} +0 -0
- /package/dist/{chunk-GMTI7GBK.js.map → chunk-WVQDRZF5.js.map} +0 -0
- /package/dist/{chunk-EBBPXRLU.js.map → chunk-XHBJCOWB.js.map} +0 -0
- /package/dist/{chunk-MQHAFMEU.js.map → chunk-YG42FESS.js.map} +0 -0
- /package/dist/{chunk-PZ7NOQHD.js.map → chunk-YY54476T.js.map} +0 -0
- /package/dist/{chunk-4P4ZWHNQ.js.map → chunk-ZMPNA2W7.js.map} +0 -0
- /package/dist/{chunks-HN36MEGV.js.map → chunks-7ABYRV7K.js.map} +0 -0
- /package/dist/{formula-TO3RLKBZ.js.map → formula-BJU6ZM3X.js.map} +0 -0
- /package/dist/{formula-ACYUF2DL.js.map → formula-ESTBYQ67.js.map} +0 -0
- /package/dist/{generator-5NUDHWLL.js.map → generator-B5RBQFEP.js.map} +0 -0
- /package/dist/{generator-K2CNNN64.js.map → generator-NZFUFJL4.js.map} +0 -0
- /package/dist/{hancom-FCNE5FBM.js.map → hancom-FINYE4NT.js.map} +0 -0
- /package/dist/{hancom-JLRWAJ7K.js.map → hancom-TE4NLTFM.js.map} +0 -0
- /package/dist/{image-ocr-ZIHIC6E7.js.map → image-ocr-L256UYPI.js.map} +0 -0
- /package/dist/{image-ocr-53K5Y7RJ.js.map → image-ocr-TB5QRYYM.js.map} +0 -0
- /package/dist/{memo-ALIRNVIU.js.map → memo-VDT6J2FA.js.map} +0 -0
- /package/dist/{model-bundle-VR77PCZE.js.map → model-bundle-THGO5EUW.js.map} +0 -0
- /package/dist/{models-CLF7ODRG.js.map → models-MKIZDK2U.js.map} +0 -0
- /package/dist/{parse-worker-v2-WXRS3WBA.js.map → parse-worker-v2-MGNDWJDE.js.map} +0 -0
- /package/dist/{parser-LKSBUPHG.js.map → parser-C6EZWRQM.js.map} +0 -0
- /package/dist/{parser-H27KVKB7.js.map → parser-EULDI5W6.js.map} +0 -0
- /package/dist/{pdf-ocr-ABMCDMIV.js.map → pdf-ocr-4Y6VPEZC.js.map} +0 -0
- /package/dist/{pdf-ocr-AYLXK6OF.js.map → pdf-ocr-LQ5SYFCE.js.map} +0 -0
- /package/dist/{profile-io-HGOQULXZ.js.map → profile-io-SDJTSIFY.js.map} +0 -0
- /package/dist/{rasterize-5RWYKMSP.js.map → rasterize-TGFUBV6B.js.map} +0 -0
- /package/dist/{redact-doc-HNKVSOLJ.js.map → redact-doc-X5WKER3O.js.map} +0 -0
- /package/dist/{render-TUDHFNDV.js.map → render-6KIT7GYL.js.map} +0 -0
- /package/dist/{rewrite-fallback-EWVH2MR4.js.map → rewrite-fallback-ARYCZKU6.js.map} +0 -0
- /package/dist/{seal-R6WDXSRI.js.map → seal-4IPGOMFX.js.map} +0 -0
- /package/dist/{setup-5EEOZUUH.js.map → setup-ZEMI2HI4.js.map} +0 -0
- /package/dist/{to-hwpx-6KY7WGVN.js.map → to-hwpx-QRVTR6VA.js.map} +0 -0
- /package/dist/{to-hwpx-UHNIAQ2L.js.map → to-hwpx-XCS6LSWE.js.map} +0 -0
- /package/dist/{visual-Z5HND4S7.js.map → visual-4D32BQGS.js.map} +0 -0
- /package/dist/{watch-SZJOKRCO.js.map → watch-LFL26YPL.js.map} +0 -0
|
@@ -39,12 +39,12 @@ var _chunkLAYKIZOXcjs = require('./chunk-LAYKIZOX.cjs');
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
var
|
|
42
|
+
var _chunkA5MTYCTOcjs = require('./chunk-A5MTYCTO.cjs');
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
var
|
|
47
|
+
var _chunk3EPX46NFcjs = require('./chunk-3EPX46NF.cjs');
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
var _chunkGS7T56RPcjs = require('./chunk-GS7T56RP.cjs');
|
|
@@ -122,7 +122,7 @@ function decompressStream(data2) {
|
|
|
122
122
|
return _zlib.inflateRawSync.call(void 0, data2, opts);
|
|
123
123
|
}
|
|
124
124
|
function parseFileHeader(data2) {
|
|
125
|
-
if (data2.length < 40) throw new (0,
|
|
125
|
+
if (data2.length < 40) throw new (0, _chunk3EPX46NFcjs.KordocError)("FileHeader\uAC00 \uB108\uBB34 \uC9E7\uC2B5\uB2C8\uB2E4 (\uCD5C\uC18C 40\uBC14\uC774\uD2B8)");
|
|
126
126
|
const sig = data2.subarray(0, 32).toString("utf8").replace(/\0+$/, "");
|
|
127
127
|
return {
|
|
128
128
|
signature: sig,
|
|
@@ -1351,7 +1351,7 @@ function decryptPasswordStream(raw, password) {
|
|
|
1351
1351
|
var TAG_DOCUMENT_PROPERTIES = 16;
|
|
1352
1352
|
var TAG_ID_MAPPINGS2 = 17;
|
|
1353
1353
|
function assertDecryptedDocInfo(data2, readRecords2) {
|
|
1354
|
-
const wrong = () => new (0,
|
|
1354
|
+
const wrong = () => new (0, _chunk3EPX46NFcjs.KordocError)("\uBE44\uBC00\uBC88\uD638\uAC00 \uC77C\uCE58\uD558\uC9C0 \uC54A\uAC70\uB098 \uC554\uD638\uD654 \uB370\uC774\uD130\uAC00 \uC190\uC0C1\uB418\uC5C8\uC2B5\uB2C8\uB2E4.");
|
|
1355
1355
|
let records;
|
|
1356
1356
|
try {
|
|
1357
1357
|
records = readRecords2(data2);
|
|
@@ -1363,7 +1363,7 @@ function assertDecryptedDocInfo(data2, readRecords2) {
|
|
|
1363
1363
|
}
|
|
1364
1364
|
function assertSupportedEncryptVersion(version) {
|
|
1365
1365
|
if (version !== SUPPORTED_ENCRYPT_VERSION) {
|
|
1366
|
-
throw new (0,
|
|
1366
|
+
throw new (0, _chunk3EPX46NFcjs.KordocError)(
|
|
1367
1367
|
`\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 HWP \uC554\uD638\uD654 \uBC84\uC804\uC785\uB2C8\uB2E4 (EncryptVersion=${version}, \uC9C0\uC6D0: ${SUPPORTED_ENCRYPT_VERSION})`
|
|
1368
1368
|
);
|
|
1369
1369
|
}
|
|
@@ -1597,19 +1597,19 @@ var HANJA_UNITS = ["", "\u5341", "\u767E", "\u5343", "\u842C"];
|
|
|
1597
1597
|
function formatNumber(n, fmt) {
|
|
1598
1598
|
switch (fmt) {
|
|
1599
1599
|
case "circled":
|
|
1600
|
-
return n >= 1 ?
|
|
1600
|
+
return n >= 1 ? _chunkA5MTYCTOcjs.circledNumber.call(void 0, n - 1) : String(n);
|
|
1601
1601
|
case "romanUpper":
|
|
1602
|
-
return
|
|
1602
|
+
return _chunkA5MTYCTOcjs.romanNumeral.call(void 0, n, true);
|
|
1603
1603
|
case "romanLower":
|
|
1604
|
-
return
|
|
1604
|
+
return _chunkA5MTYCTOcjs.romanNumeral.call(void 0, n, false);
|
|
1605
1605
|
case "latinUpper":
|
|
1606
1606
|
return formatLatin(n, true) || String(n);
|
|
1607
1607
|
case "latinLower":
|
|
1608
1608
|
return formatLatin(n, false) || String(n);
|
|
1609
1609
|
case "ganada":
|
|
1610
|
-
return n >= 1 ?
|
|
1610
|
+
return n >= 1 ? _chunkA5MTYCTOcjs.hangulOrdinal.call(void 0, n - 1) : String(n);
|
|
1611
1611
|
case "circledGanada":
|
|
1612
|
-
return n >= 1 ?
|
|
1612
|
+
return n >= 1 ? _chunkA5MTYCTOcjs.circledHangul.call(void 0, n - 1) : String(n);
|
|
1613
1613
|
case "jamo":
|
|
1614
1614
|
return fromTable(n, JAMO);
|
|
1615
1615
|
case "circledJamo":
|
|
@@ -1796,8 +1796,8 @@ function emitParagraphBlocks(p) {
|
|
|
1796
1796
|
return blocks;
|
|
1797
1797
|
}
|
|
1798
1798
|
function tableFlatText(table) {
|
|
1799
|
-
const flat =
|
|
1800
|
-
return table.caption ?
|
|
1799
|
+
const flat = _chunkA5MTYCTOcjs.convertTableToText.call(void 0, table.cells);
|
|
1800
|
+
return table.caption ? _chunkA5MTYCTOcjs.captionedText.call(void 0, flat, table.caption, table.captionBelow) : flat;
|
|
1801
1801
|
}
|
|
1802
1802
|
function blocksPlainText(blocks, sep) {
|
|
1803
1803
|
const parts = [];
|
|
@@ -1880,8 +1880,8 @@ ${cell.text}` : cell.text;
|
|
|
1880
1880
|
}
|
|
1881
1881
|
function buildAddressedTable(cells, rows, cols, keepAnchoredEmptyCols) {
|
|
1882
1882
|
for (const c of cells) {
|
|
1883
|
-
rows = Math.max(rows, Math.min((_nullishCoalesce(c.rowAddr, () => ( 0))) + 1,
|
|
1884
|
-
cols = Math.max(cols, Math.min((_nullishCoalesce(c.colAddr, () => ( 0))) + 1,
|
|
1883
|
+
rows = Math.max(rows, Math.min((_nullishCoalesce(c.rowAddr, () => ( 0))) + 1, _chunkA5MTYCTOcjs.MAX_ROWS));
|
|
1884
|
+
cols = Math.max(cols, Math.min((_nullishCoalesce(c.colAddr, () => ( 0))) + 1, _chunkA5MTYCTOcjs.MAX_COLS));
|
|
1885
1885
|
}
|
|
1886
1886
|
const placed = resolveCellOverlaps(cells, rows, cols);
|
|
1887
1887
|
const byRow = Array.from({ length: rows }, () => []);
|
|
@@ -1889,12 +1889,12 @@ function buildAddressedTable(cells, rows, cols, keepAnchoredEmptyCols) {
|
|
|
1889
1889
|
const r = _nullishCoalesce(c.rowAddr, () => ( 0));
|
|
1890
1890
|
if (r < rows && (_nullishCoalesce(c.colAddr, () => ( 0))) < cols) byRow[r].push(c);
|
|
1891
1891
|
}
|
|
1892
|
-
const table =
|
|
1892
|
+
const table = _chunkA5MTYCTOcjs.buildTable.call(void 0, byRow, { keepAnchoredEmptyCols });
|
|
1893
1893
|
if (table.rows === 0) return null;
|
|
1894
1894
|
for (const c of placed) {
|
|
1895
1895
|
if (c.edges) {
|
|
1896
1896
|
const at = _optionalChain([table, 'access', _12 => _12.cells, 'access', _13 => _13[_nullishCoalesce(c.rowAddr, () => ( 0))], 'optionalAccess', _14 => _14[_nullishCoalesce(c.colAddr, () => ( 0))]]);
|
|
1897
|
-
if (at)
|
|
1897
|
+
if (at) _chunkA5MTYCTOcjs.CELL_EDGES.set(at, c.edges);
|
|
1898
1898
|
}
|
|
1899
1899
|
if (!_optionalChain([c, 'access', _15 => _15.blocks, 'optionalAccess', _16 => _16.length]) && !c.isHeader) continue;
|
|
1900
1900
|
const target = _optionalChain([table, 'access', _17 => _17.cells, 'access', _18 => _18[_nullishCoalesce(c.rowAddr, () => ( 0))], 'optionalAccess', _19 => _19[_nullishCoalesce(c.colAddr, () => ( 0))]]);
|
|
@@ -2132,7 +2132,7 @@ function parseParagraph(records, start, end, ctx) {
|
|
|
2132
2132
|
continue;
|
|
2133
2133
|
}
|
|
2134
2134
|
if (!ctrl2.href) continue;
|
|
2135
|
-
const href =
|
|
2135
|
+
const href = _chunk3EPX46NFcjs.sanitizeHref.call(void 0, ctrl2.href);
|
|
2136
2136
|
if (!href) continue;
|
|
2137
2137
|
if (!anchor.trim() || anchor.includes(INLINE_TABLE_MARK)) continue;
|
|
2138
2138
|
text = text.slice(0, r.start) + `[${anchor}](${href})` + text.slice(r.end);
|
|
@@ -2142,7 +2142,7 @@ function parseParagraph(records, start, end, ctx) {
|
|
|
2142
2142
|
}
|
|
2143
2143
|
if (text.includes(LITERAL_DOLLAR_MARK)) text = text.replaceAll(LITERAL_DOLLAR_MARK, "\\$");
|
|
2144
2144
|
text = resolveLiteralLt(text);
|
|
2145
|
-
text =
|
|
2145
|
+
text = _chunkA5MTYCTOcjs.tidyScriptTags.call(void 0, text);
|
|
2146
2146
|
const toc = _chunkLAYKIZOXcjs.takeTocLeaders.call(void 0, text);
|
|
2147
2147
|
text = toc.text;
|
|
2148
2148
|
const holdsText = (c) => {
|
|
@@ -2239,7 +2239,8 @@ function applyCtrlEffect(ctrl2, records, ctx) {
|
|
|
2239
2239
|
const attr = ctrl2.data.readUInt32LE(4);
|
|
2240
2240
|
const type = attr & 15;
|
|
2241
2241
|
const format = attr >>> 4 & 255;
|
|
2242
|
-
const
|
|
2242
|
+
const stored = type !== 0 && ctrl2.data.length >= 10 ? ctrl2.data.readUInt16LE(8) : 0;
|
|
2243
|
+
const num = stored || (_nullishCoalesce(ctx.doc.autoCounters.get(type), () => ( 1)));
|
|
2243
2244
|
ctx.doc.autoCounters.set(type, num + 1);
|
|
2244
2245
|
const prefix = ctrl2.data.length >= 14 ? wcharAt(ctrl2.data, 12) : "";
|
|
2245
2246
|
const suffix = ctrl2.data.length >= 16 ? wcharAt(ctrl2.data, 14) : "";
|
|
@@ -2274,7 +2275,7 @@ function applyCtrlEffect(ctrl2, records, ctx) {
|
|
|
2274
2275
|
// 글자 겹침 — ctrl id 뒤 글자 수(WORD)·겹친 글자(WCHAR[n])·테두리 종류(BYTE, 0 = 없음). 종전엔 건너뛰어 법령 서식 원 번호(⑯·⑰)가 빠졌다
|
|
2275
2276
|
case CTRL_TCPS: {
|
|
2276
2277
|
const d = ctrl2.data, n = d.length >= 6 ? d.readUInt16LE(4) : 0;
|
|
2277
|
-
if (n > 0 && d.length >= 6 + 2 * n) ctrl2.inlineText =
|
|
2278
|
+
if (n > 0 && d.length >= 6 + 2 * n) ctrl2.inlineText = _chunkA5MTYCTOcjs.composeText.call(void 0, d.toString("utf16le", 6, 6 + 2 * n), (_nullishCoalesce(d[6 + 2 * n], () => ( 0))) !== 0);
|
|
2278
2279
|
return;
|
|
2279
2280
|
}
|
|
2280
2281
|
// 숨은 설명/단 정의/쪽번호 위치/감추기/찾아보기/책갈피/덧말 — 본문 텍스트 없음 또는 의도적 스킵
|
|
@@ -2407,7 +2408,7 @@ function hyperlinkUrlFromCommand(command) {
|
|
|
2407
2408
|
}
|
|
2408
2409
|
var A4_HEIGHT = 84188;
|
|
2409
2410
|
function keepUnlessPageSpanning(table, cells) {
|
|
2410
|
-
if (!cells.some((c) => c.pageSpanning))
|
|
2411
|
+
if (!cells.some((c) => c.pageSpanning)) _chunkA5MTYCTOcjs.markNonLayoutTable.call(void 0, table);
|
|
2411
2412
|
}
|
|
2412
2413
|
function parseTableControl(ctrl2, records, ctx) {
|
|
2413
2414
|
if (ctx.depth >= MAX_NEST_DEPTH) return null;
|
|
@@ -2419,8 +2420,8 @@ function parseTableControl(ctrl2, records, ctx) {
|
|
|
2419
2420
|
let tableIdx = -1;
|
|
2420
2421
|
for (let i2 = childStart; i2 < childEnd; i2++) {
|
|
2421
2422
|
if (records[i2].tagId === TAG_TABLE && records[i2].level === directLevel && records[i2].data.length >= 8) {
|
|
2422
|
-
rows = Math.min(records[i2].data.readUInt16LE(4),
|
|
2423
|
-
cols = Math.min(records[i2].data.readUInt16LE(6),
|
|
2423
|
+
rows = Math.min(records[i2].data.readUInt16LE(4), _chunkA5MTYCTOcjs.MAX_ROWS);
|
|
2424
|
+
cols = Math.min(records[i2].data.readUInt16LE(6), _chunkA5MTYCTOcjs.MAX_COLS);
|
|
2424
2425
|
tableIdx = i2;
|
|
2425
2426
|
break;
|
|
2426
2427
|
}
|
|
@@ -2467,11 +2468,11 @@ function parseTableControl(ctrl2, records, ctx) {
|
|
|
2467
2468
|
return table2;
|
|
2468
2469
|
}
|
|
2469
2470
|
if (rows === 0 || cols === 0) {
|
|
2470
|
-
rows = Math.min(cells.length,
|
|
2471
|
+
rows = Math.min(cells.length, _chunkA5MTYCTOcjs.MAX_ROWS);
|
|
2471
2472
|
cols = 1;
|
|
2472
2473
|
}
|
|
2473
2474
|
const cellRows = arrangeCells(rows, cols, cells);
|
|
2474
|
-
const table =
|
|
2475
|
+
const table = _chunkA5MTYCTOcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: ctx.doc.keepTrailingEmptyCols });
|
|
2475
2476
|
if (caption && table.rows > 0) table.caption = caption;
|
|
2476
2477
|
if (caption && captionBelow && table.rows > 0) table.captionBelow = true;
|
|
2477
2478
|
if (sourceId && table.rows > 0) table.sourceId = sourceId;
|
|
@@ -2491,8 +2492,8 @@ function parseCell(records, lhIdx, end, ctx) {
|
|
|
2491
2492
|
rowAddr = rec.data.readUInt16LE(10);
|
|
2492
2493
|
const cs = rec.data.readUInt16LE(12);
|
|
2493
2494
|
const rs = rec.data.readUInt16LE(14);
|
|
2494
|
-
if (cs > 0) colSpan = Math.min(cs,
|
|
2495
|
-
if (rs > 0) rowSpan = Math.min(rs,
|
|
2495
|
+
if (cs > 0) colSpan = Math.min(cs, _chunkA5MTYCTOcjs.MAX_COLS);
|
|
2496
|
+
if (rs > 0) rowSpan = Math.min(rs, _chunkA5MTYCTOcjs.MAX_ROWS);
|
|
2496
2497
|
}
|
|
2497
2498
|
const blocks = ctx.depth < MAX_NEST_DEPTH ? parseParagraphList(records, lhIdx + 1, end, { ...ctx, depth: ctx.depth + 1, plainText: false }) : [];
|
|
2498
2499
|
const { text, hasStructure } = cellTextFromBlocks(blocks);
|
|
@@ -2618,7 +2619,7 @@ function emphasisSpans(state, text) {
|
|
|
2618
2619
|
for (let r = 0; r < runs.length; r++) {
|
|
2619
2620
|
const end = r + 1 < runs.length ? runs[r + 1][0] : state.text.length;
|
|
2620
2621
|
const raw = state.text.slice(r === 0 ? 0 : runs[r][0], end);
|
|
2621
|
-
const t =
|
|
2622
|
+
const t = _chunkA5MTYCTOcjs.tidyScriptTags.call(void 0, resolveLiteralLt(raw.replaceAll(LITERAL_DOLLAR_MARK, "\\$")));
|
|
2622
2623
|
if (!t) continue;
|
|
2623
2624
|
const key = runs[r][1], last = spans[spans.length - 1];
|
|
2624
2625
|
if (last && last.key === key) {
|
|
@@ -2675,7 +2676,7 @@ function hasRealUnderline(attrFlags) {
|
|
|
2675
2676
|
|
|
2676
2677
|
|
|
2677
2678
|
// src/memo-notes.ts
|
|
2678
|
-
var squash = (s) =>
|
|
2679
|
+
var squash = (s) => _chunkA5MTYCTOcjs.sanitizeText.call(void 0, s).replace(/\s+/g, "");
|
|
2679
2680
|
function blockText(b) {
|
|
2680
2681
|
if (b.type !== "table" || !b.table) return _nullishCoalesce(b.text, () => ( ""));
|
|
2681
2682
|
return b.table.cells.flat().map((c) => _nullishCoalesce(_optionalChain([c, 'optionalAccess', _51 => _51.text]), () => ( ""))).join("\n");
|
|
@@ -2697,7 +2698,7 @@ function locateMemoBlocks(blocks, memos) {
|
|
|
2697
2698
|
});
|
|
2698
2699
|
}
|
|
2699
2700
|
function memosMarkdown(memos) {
|
|
2700
|
-
const one = (s) =>
|
|
2701
|
+
const one = (s) => _chunkA5MTYCTOcjs.escapeGfm.call(void 0, _chunkA5MTYCTOcjs.sanitizeText.call(void 0, s.replace(/\s*\n\s*/g, " / ")));
|
|
2701
2702
|
const lines = memos.map((m, i) => {
|
|
2702
2703
|
const when = _optionalChain([m, 'access', _52 => _52.createdAt, 'optionalAccess', _53 => _53.replace, 'call', _54 => _54("T", " "), 'access', _55 => _55.replace, 'call', _56 => _56(/(:\d\d)?Z?$/, "")]);
|
|
2703
2704
|
const who = [m.author, when].filter(Boolean).join(", ");
|
|
@@ -2729,7 +2730,7 @@ function openHwp5Container(buffer, options) {
|
|
|
2729
2730
|
lenientCfb = _chunkDEVQZTE7cjs.parseLenientCfb.call(void 0, buffer);
|
|
2730
2731
|
warnings.push({ message: "\uC190\uC0C1\uB41C CFB \uCEE8\uD14C\uC774\uB108 \u2014 lenient \uBAA8\uB4DC\uB85C \uBCF5\uAD6C", code: "LENIENT_CFB_RECOVERY" });
|
|
2731
2732
|
} catch (e8) {
|
|
2732
|
-
throw new (0,
|
|
2733
|
+
throw new (0, _chunk3EPX46NFcjs.KordocError)("CFB \uCEE8\uD14C\uC774\uB108 \uD30C\uC2F1 \uC2E4\uD328 (strict \uBC0F lenient \uBAA8\uB450)");
|
|
2733
2734
|
}
|
|
2734
2735
|
}
|
|
2735
2736
|
const readRawStream = (path) => {
|
|
@@ -2740,14 +2741,14 @@ function openHwp5Container(buffer, options) {
|
|
|
2740
2741
|
return lenientCfb.findStream(path);
|
|
2741
2742
|
};
|
|
2742
2743
|
const headerData = readRawStream("/FileHeader");
|
|
2743
|
-
if (!headerData) throw new (0,
|
|
2744
|
+
if (!headerData) throw new (0, _chunk3EPX46NFcjs.KordocError)("FileHeader \uC2A4\uD2B8\uB9BC \uC5C6\uC74C");
|
|
2744
2745
|
const header = parseFileHeader(headerData);
|
|
2745
|
-
if (header.signature !== "HWP Document File") throw new (0,
|
|
2746
|
-
if (header.flags & FLAG_DRM) throw new (0,
|
|
2746
|
+
if (header.signature !== "HWP Document File") throw new (0, _chunk3EPX46NFcjs.KordocError)("HWP \uC2DC\uADF8\uB2C8\uCC98 \uBD88\uC77C\uCE58");
|
|
2747
|
+
if (header.flags & FLAG_DRM) throw new (0, _chunk3EPX46NFcjs.KordocError)("DRM \uBCF4\uD638\uB41C HWP\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
|
|
2747
2748
|
const encrypted = (header.flags & FLAG_ENCRYPTED) !== 0;
|
|
2748
2749
|
if (encrypted) {
|
|
2749
2750
|
if (!_optionalChain([options, 'optionalAccess', _58 => _58.password])) {
|
|
2750
|
-
throw new (0,
|
|
2751
|
+
throw new (0, _chunk3EPX46NFcjs.KordocError)("\uC554\uD638\uB85C \uBCF4\uD638\uB41C HWP \uBB38\uC11C\uC785\uB2C8\uB2E4. password \uC635\uC158\uC5D0 \uC5F4\uAE30 \uC554\uD638\uB97C \uC9C0\uC815\uD558\uC138\uC694.");
|
|
2751
2752
|
}
|
|
2752
2753
|
assertSupportedEncryptVersion(readEncryptVersion(headerData));
|
|
2753
2754
|
}
|
|
@@ -2761,12 +2762,12 @@ function openHwp5Container(buffer, options) {
|
|
|
2761
2762
|
const distribution = (header.flags & FLAG_DISTRIBUTION) !== 0;
|
|
2762
2763
|
if (encrypted) {
|
|
2763
2764
|
const rawDocInfo = findStream("/DocInfo");
|
|
2764
|
-
if (!rawDocInfo) throw new (0,
|
|
2765
|
+
if (!rawDocInfo) throw new (0, _chunk3EPX46NFcjs.KordocError)("DocInfo \uC2A4\uD2B8\uB9BC \uC5C6\uC74C");
|
|
2765
2766
|
let docInfoData;
|
|
2766
2767
|
try {
|
|
2767
2768
|
docInfoData = compressed ? decompressStream(rawDocInfo) : rawDocInfo;
|
|
2768
2769
|
} catch (e9) {
|
|
2769
|
-
throw new (0,
|
|
2770
|
+
throw new (0, _chunk3EPX46NFcjs.KordocError)("\uBE44\uBC00\uBC88\uD638\uAC00 \uC77C\uCE58\uD558\uC9C0 \uC54A\uAC70\uB098 \uC554\uD638\uD654 \uB370\uC774\uD130\uAC00 \uC190\uC0C1\uB418\uC5C8\uC2B5\uB2C8\uB2E4.");
|
|
2770
2771
|
}
|
|
2771
2772
|
assertDecryptedDocInfo(docInfoData, readRecords);
|
|
2772
2773
|
}
|
|
@@ -2791,10 +2792,10 @@ function readHwp5SectionRecords(c, sections, warnings) {
|
|
|
2791
2792
|
try {
|
|
2792
2793
|
const data2 = !c.distribution && c.compressed ? decompressStream(Buffer.from(sections[si])) : Buffer.from(sections[si]);
|
|
2793
2794
|
totalDecompressed += data2.length;
|
|
2794
|
-
if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0,
|
|
2795
|
+
if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunk3EPX46NFcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
|
|
2795
2796
|
out.push(readRecords(data2));
|
|
2796
2797
|
} catch (secErr) {
|
|
2797
|
-
if (secErr instanceof
|
|
2798
|
+
if (secErr instanceof _chunk3EPX46NFcjs.KordocError) throw secErr;
|
|
2798
2799
|
out.push(null);
|
|
2799
2800
|
warnings.push({ page: si + 1, message: `\uC139\uC158 ${si + 1} \uD30C\uC2F1 \uC2E4\uD328: ${secErr instanceof Error ? secErr.message : "\uC54C \uC218 \uC5C6\uB294 \uC624\uB958"}`, code: "PARTIAL_PARSE" });
|
|
2800
2801
|
}
|
|
@@ -2814,7 +2815,7 @@ function parseHwp5Document(buffer, options) {
|
|
|
2814
2815
|
if (cfb) extractHwp5Metadata(cfb, metadata);
|
|
2815
2816
|
const docInfo = cfb && !encrypted ? parseDocInfoStream(cfb, compressed) : parseDocInfoFromStream(findStream("/DocInfo"), compressed);
|
|
2816
2817
|
const sections = readHwp5SectionStreams(c);
|
|
2817
|
-
if (sections.length === 0) throw new (0,
|
|
2818
|
+
if (sections.length === 0) throw new (0, _chunk3EPX46NFcjs.KordocError)("\uC139\uC158 \uC2A4\uD2B8\uB9BC\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
|
|
2818
2819
|
const sectionRecords = readHwp5SectionRecords(c, sections, warnings);
|
|
2819
2820
|
const sectionDetects = sectionRecords.map((r) => r ? detectHwp5SectionPages(r) : null);
|
|
2820
2821
|
const sectionTableIds = [];
|
|
@@ -2858,7 +2859,7 @@ function parseHwp5Document(buffer, options) {
|
|
|
2858
2859
|
parsedSections++;
|
|
2859
2860
|
_optionalChain([options, 'optionalAccess', _63 => _63.onProgress, 'optionalCall', _64 => _64(parsedSections, sections.length)]);
|
|
2860
2861
|
} catch (secErr) {
|
|
2861
|
-
if (secErr instanceof
|
|
2862
|
+
if (secErr instanceof _chunk3EPX46NFcjs.KordocError) throw secErr;
|
|
2862
2863
|
warnings.push({ page: si + 1, message: `\uC139\uC158 ${si + 1} \uD30C\uC2F1 \uC2E4\uD328: ${secErr instanceof Error ? secErr.message : "\uC54C \uC218 \uC5C6\uB294 \uC624\uB958"}`, code: "PARTIAL_PARSE" });
|
|
2863
2864
|
} finally {
|
|
2864
2865
|
pageBase += detect.pages;
|
|
@@ -2869,10 +2870,10 @@ function parseHwp5Document(buffer, options) {
|
|
|
2869
2870
|
}
|
|
2870
2871
|
const blocks = [...doc.headerBlocks, ...bodyBlocks, ...doc.footerBlocks];
|
|
2871
2872
|
const images = cfb ? extractHwp5Images(cfb.FileIndex, blocks, warnings, !pageFilter, encrypted ? findStream : void 0) : extractHwp5ImagesLenient(lenientCfb, blocks, warnings, !pageFilter, encrypted ? findStream : void 0);
|
|
2872
|
-
let flatBlocks =
|
|
2873
|
-
if (_optionalChain([options, 'optionalAccess', _65 => _65.layoutTables]) !== "keep") flatBlocks =
|
|
2873
|
+
let flatBlocks = _chunkA5MTYCTOcjs.flattenLayoutTables.call(void 0, blocks);
|
|
2874
|
+
if (_optionalChain([options, 'optionalAccess', _65 => _65.layoutTables]) !== "keep") flatBlocks = _chunkA5MTYCTOcjs.unframeLayoutTables.call(void 0, flatBlocks, !!_optionalChain([options, 'optionalAccess', _66 => _66.keepTrailingEmptyCols]));
|
|
2874
2875
|
if (_optionalChain([options, 'optionalAccess', _67 => _67.dedupeRunningHeaders])) {
|
|
2875
|
-
const deduped =
|
|
2876
|
+
const deduped = _chunkA5MTYCTOcjs.dedupeRunningHeaders.call(void 0, flatBlocks);
|
|
2876
2877
|
const removed = flatBlocks.length - deduped.length;
|
|
2877
2878
|
if (removed > 0) warnings.push({ message: `\uBC18\uBCF5 \uB7EC\uB2DD \uD5E4\uB354 ${removed}\uAC1C \uC81C\uAC70`, code: "HIDDEN_TEXT_FILTERED" });
|
|
2878
2879
|
flatBlocks = deduped;
|
|
@@ -2881,7 +2882,7 @@ function parseHwp5Document(buffer, options) {
|
|
|
2881
2882
|
detectHwp5Headings(flatBlocks, docInfo, doc.tocTexts);
|
|
2882
2883
|
}
|
|
2883
2884
|
const outline = flatBlocks.filter((b) => b.type === "heading" && b.level && b.text).map((b) => ({ level: b.level, text: b.text, pageNumber: b.pageNumber }));
|
|
2884
|
-
let markdown =
|
|
2885
|
+
let markdown = _chunkA5MTYCTOcjs.blocksToMarkdown.call(void 0, flatBlocks, { tableFormat: _optionalChain([options, 'optionalAccess', _68 => _68.tableFormat]) });
|
|
2885
2886
|
if (_optionalChain([options, 'optionalAccess', _69 => _69.inlineImages]) && options.images !== false && images.length > 0) {
|
|
2886
2887
|
try {
|
|
2887
2888
|
markdown = _chunk6NZ32OTXcjs.inlineImagesIntoMarkdown.call(void 0, markdown, images, { compress: true });
|
|
@@ -2949,9 +2950,9 @@ function detectHwp5Headings(blocks, docInfo, tocTexts) {
|
|
|
2949
2950
|
let level = 0;
|
|
2950
2951
|
if (_optionalChain([block, 'access', _76 => _76.style, 'optionalAccess', _77 => _77.fontSize]) && baseFontSize > 0) {
|
|
2951
2952
|
const ratio = block.style.fontSize / baseFontSize;
|
|
2952
|
-
if (ratio >=
|
|
2953
|
-
else if (ratio >=
|
|
2954
|
-
else if (ratio >=
|
|
2953
|
+
if (ratio >= _chunkA5MTYCTOcjs.HEADING_RATIO_H1) level = 1;
|
|
2954
|
+
else if (ratio >= _chunkA5MTYCTOcjs.HEADING_RATIO_H2) level = 2;
|
|
2955
|
+
else if (ratio >= _chunkA5MTYCTOcjs.HEADING_RATIO_H3) level = 3;
|
|
2955
2956
|
}
|
|
2956
2957
|
if (/^제\d+[장절편]\s/.test(text) && text.length <= 50) {
|
|
2957
2958
|
if (level === 0) level = 2;
|
|
@@ -3084,7 +3085,7 @@ function findSectionsLenient(lcfb) {
|
|
|
3084
3085
|
const raw = _nullishCoalesce(lcfb.findStream(`/BodyText/Section${i}`), () => ( lcfb.findStream(`Section${i}`)));
|
|
3085
3086
|
if (!raw) break;
|
|
3086
3087
|
totalBytes += raw.length;
|
|
3087
|
-
if (totalBytes > MAX_TOTAL_DECOMPRESS) throw new (0,
|
|
3088
|
+
if (totalBytes > MAX_TOTAL_DECOMPRESS) throw new (0, _chunk3EPX46NFcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
|
|
3088
3089
|
sections.push({ idx: i, content: raw });
|
|
3089
3090
|
}
|
|
3090
3091
|
if (sections.length === 0) {
|
|
@@ -3095,7 +3096,7 @@ function findSectionsLenient(lcfb) {
|
|
|
3095
3096
|
const raw = lcfb.findStream(e.name);
|
|
3096
3097
|
if (raw) {
|
|
3097
3098
|
totalBytes += raw.length;
|
|
3098
|
-
if (totalBytes > MAX_TOTAL_DECOMPRESS) throw new (0,
|
|
3099
|
+
if (totalBytes > MAX_TOTAL_DECOMPRESS) throw new (0, _chunk3EPX46NFcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
|
|
3099
3100
|
sections.push({ idx, content: raw });
|
|
3100
3101
|
}
|
|
3101
3102
|
}
|
|
@@ -3112,7 +3113,7 @@ function findViewTextSectionsLenient(lcfb, compressed) {
|
|
|
3112
3113
|
try {
|
|
3113
3114
|
const content = decryptViewText(raw, compressed);
|
|
3114
3115
|
totalDecompressed += content.length;
|
|
3115
|
-
if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0,
|
|
3116
|
+
if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunk3EPX46NFcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
|
|
3116
3117
|
sections.push({ idx: i, content });
|
|
3117
3118
|
} catch (e16) {
|
|
3118
3119
|
break;
|
|
@@ -4352,7 +4353,7 @@ function otherControlXml(id, node, ctx) {
|
|
|
4352
4353
|
["charSz", size],
|
|
4353
4354
|
["composeType", expansion ? "OVERLAP" : "SPREAD"],
|
|
4354
4355
|
["charPrCnt", ids.length],
|
|
4355
|
-
["composeText", circle ?
|
|
4356
|
+
["composeText", circle ? _chunkA5MTYCTOcjs.composeDigits.call(void 0, text) : text]
|
|
4356
4357
|
],
|
|
4357
4358
|
ids.map((i) => el("hp:charPr", [["prIDRef", i]])).join("")
|
|
4358
4359
|
) };
|
|
@@ -5260,7 +5261,7 @@ async function hwpToHwpx(input, options) {
|
|
|
5260
5261
|
["os", 1],
|
|
5261
5262
|
["xmlVersion", "1.5"],
|
|
5262
5263
|
["application", "kordoc"],
|
|
5263
|
-
["appVersion",
|
|
5264
|
+
["appVersion", _chunk3EPX46NFcjs.VERSION]
|
|
5264
5265
|
]),
|
|
5265
5266
|
{ compression: "STORE" }
|
|
5266
5267
|
);
|
|
@@ -5340,20 +5341,20 @@ async function convertToHwpx(input, options) {
|
|
|
5340
5341
|
const { detectFormat } = await Promise.resolve().then(() => _interopRequireWildcard(require("./detect-V75ERMYL.cjs")));
|
|
5341
5342
|
const format = detectFormat(ab);
|
|
5342
5343
|
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"] };
|
|
5343
|
-
if (format !== "hwp" && format !== "hwp3" && format !== "hwpml") throw new (0,
|
|
5344
|
+
if (format !== "hwp" && format !== "hwp3" && format !== "hwpml") throw new (0, _chunk3EPX46NFcjs.KordocError)(`HWP \uBB38\uC11C\uAC00 \uC544\uB2D9\uB2C8\uB2E4 (${format})`);
|
|
5344
5345
|
const engine = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _159 => _159.engine]), () => ( "kordoc"));
|
|
5345
5346
|
if (engine !== "kordoc") {
|
|
5346
|
-
const { hancomAvailable, hwpToHwpxViaHancom } = await Promise.resolve().then(() => _interopRequireWildcard(require("./hancom-
|
|
5347
|
+
const { hancomAvailable, hwpToHwpxViaHancom } = await Promise.resolve().then(() => _interopRequireWildcard(require("./hancom-YC2LGVBP.cjs")));
|
|
5347
5348
|
if (engine === "hancom" || !_optionalChain([options, 'optionalAccess', _160 => _160.password]) && hancomAvailable()) {
|
|
5348
|
-
if (_optionalChain([options, 'optionalAccess', _161 => _161.password])) throw new (0,
|
|
5349
|
+
if (_optionalChain([options, 'optionalAccess', _161 => _161.password])) throw new (0, _chunk3EPX46NFcjs.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');
|
|
5349
5350
|
return { data: hwpToHwpxViaHancom(bytes, format === "hwpml" ? "hml" : "hwp"), mode: "preserve", engine: "hancom", warnings: [] };
|
|
5350
5351
|
}
|
|
5351
5352
|
}
|
|
5352
5353
|
if (format === "hwp") return { data: await hwpToHwpx(bytes, options), mode: "preserve", engine: "kordoc", warnings: [] };
|
|
5353
5354
|
const { parse } = await Promise.resolve().then(() => _interopRequireWildcard(require("./index.cjs")));
|
|
5354
|
-
const { markdownToHwpx } = await Promise.resolve().then(() => _interopRequireWildcard(require("./generator-
|
|
5355
|
+
const { markdownToHwpx } = await Promise.resolve().then(() => _interopRequireWildcard(require("./generator-JBGS3C5H.cjs")));
|
|
5355
5356
|
const parsed = await parse(ab, { password: _optionalChain([options, 'optionalAccess', _162 => _162.password]) });
|
|
5356
|
-
if (!parsed.success) throw new (0,
|
|
5357
|
+
if (!parsed.success) throw new (0, _chunk3EPX46NFcjs.KordocError)(_nullishCoalesce(parsed.error, () => ( "\uBB38\uC11C\uB97C \uC77D\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4")));
|
|
5357
5358
|
return {
|
|
5358
5359
|
data: new Uint8Array(await markdownToHwpx(parsed.markdown)),
|
|
5359
5360
|
mode: "content",
|
|
@@ -5414,4 +5415,4 @@ async function convertToHwpx(input, options) {
|
|
|
5414
5415
|
|
|
5415
5416
|
|
|
5416
5417
|
exports.locateMemoBlocks = locateMemoBlocks; exports.memosMarkdown = memosMarkdown; exports.TAG_PARA_HEADER = TAG_PARA_HEADER; exports.TAG_PARA_TEXT = TAG_PARA_TEXT; exports.TAG_CHAR_SHAPE = TAG_CHAR_SHAPE; exports.TAG_PARA_LINE_SEG = TAG_PARA_LINE_SEG; exports.TAG_CTRL_HEADER = TAG_CTRL_HEADER; exports.TAG_LIST_HEADER = TAG_LIST_HEADER; exports.TAG_TABLE = TAG_TABLE; exports.TAG_SHAPE_COMPONENT = TAG_SHAPE_COMPONENT; exports.TAG_SHAPE_COMPONENT_PICTURE = TAG_SHAPE_COMPONENT_PICTURE; exports.TAG_ID_MAPPINGS = TAG_ID_MAPPINGS; exports.TAG_FACE_NAME = TAG_FACE_NAME; exports.TAG_DOC_CHAR_SHAPE = TAG_DOC_CHAR_SHAPE; exports.TAG_DOC_PARA_SHAPE = TAG_DOC_PARA_SHAPE; exports.FLAG_COMPRESSED = FLAG_COMPRESSED; exports.FLAG_ENCRYPTED = FLAG_ENCRYPTED; exports.FLAG_DISTRIBUTION = FLAG_DISTRIBUTION; exports.FLAG_DRM = FLAG_DRM; exports.FLAG_TRACK_CHANGES = FLAG_TRACK_CHANGES; exports.readRecords = readRecords; exports.decompressStream = decompressStream; exports.parseFileHeader = parseFileHeader; exports.fileTimeText = fileTimeText; exports.parseDocInfo = parseDocInfo; exports.createParaTextState = createParaTextState; exports.isExtendedOnlyCtrlChar = isExtendedOnlyCtrlChar; exports.appendParaText = appendParaText; exports.detectImageMime = detectImageMime; exports.resolveImageBlocks = resolveImageBlocks; exports.indexHwp5Tables = indexHwp5Tables; exports.formatNumber = formatNumber; exports.hwpEquationToLatex = hwpEquationToLatex; exports.INLINE_TABLE_MARK = INLINE_TABLE_MARK; exports.emitParagraphBlocks = emitParagraphBlocks; exports.blocksPlainText = blocksPlainText; exports.cellTextFromBlocks = cellTextFromBlocks; exports.buildAddressedTable = buildAddressedTable; exports.unfilledClickHereGuide = unfilledClickHereGuide; exports.isClickHereGuideText = isClickHereGuideText; exports.hasRealStrike = hasRealStrike; exports.hasRealUnderline = hasRealUnderline; exports.openHwp5Container = openHwp5Container; exports.readHwp5DocInfoRecords = readHwp5DocInfoRecords; exports.readHwp5SectionStreams = readHwp5SectionStreams; exports.readHwp5SectionRecords = readHwp5SectionRecords; exports.readHwp5BinData = readHwp5BinData; exports.parseHwp5Document = parseHwp5Document; exports.hwpToHwpx = hwpToHwpx; exports.convertToHwpx = convertToHwpx;
|
|
5417
|
-
//# sourceMappingURL=chunk-
|
|
5418
|
+
//# sourceMappingURL=chunk-7D6KEQNU.cjs.map
|