kordoc 4.24.34 → 4.24.35
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 +4 -4
- package/dist/{-TB65UADR.js → -2E4K77IT.js} +21 -21
- package/dist/{chunk-ZB7EJUDU.js → chunk-24TTJGKB.js} +2 -2
- package/dist/{chunk-HKZMDPSE.js → chunk-2F7XY5YH.js} +2 -2
- package/dist/{chunk-VMFDVTQE.cjs → chunk-4ZTFAQQ5.cjs} +57 -57
- package/dist/{chunk-VMFDVTQE.cjs.map → chunk-4ZTFAQQ5.cjs.map} +1 -1
- package/dist/{chunk-CSGH4UWK.js → chunk-5CWZMORL.js} +2 -2
- package/dist/{chunk-PUXC2MIL.js → chunk-6XO2M6UP.js} +11 -11
- package/dist/{chunk-IIAKPCDD.cjs → chunk-AY5WCVGD.cjs} +3 -3
- package/dist/{chunk-IIAKPCDD.cjs.map → chunk-AY5WCVGD.cjs.map} +1 -1
- package/dist/{chunk-N6TU2AGG.js → chunk-D7FENV7F.js} +6 -6
- package/dist/{chunk-CUXWMIE4.cjs → chunk-DKQD2257.cjs} +48 -39
- package/dist/chunk-DKQD2257.cjs.map +1 -0
- package/dist/{chunk-CVQR4G22.js → chunk-DRNG6PLM.js} +2 -2
- package/dist/{chunk-ZXBBZVFG.js → chunk-E6ZXDD6B.js} +2 -2
- package/dist/{chunk-FMBG7JZY.js → chunk-F25GZK3B.js} +3 -3
- package/dist/{chunk-GC4AWWQ4.js → chunk-F7MA5KWA.js} +6 -6
- package/dist/{chunk-OD2KWIK2.js → chunk-FDVVHEFI.js} +15 -15
- package/dist/{chunk-WMGLEVBF.js → chunk-FGPDVC3H.js} +6 -6
- package/dist/{chunk-GWZKO5S2.js → chunk-GHYRE6BO.js} +3 -3
- package/dist/{chunk-AJR6KXMV.js → chunk-HSAD274D.js} +2 -2
- package/dist/{chunk-KJNAGH62.cjs → chunk-IL7RLPEW.cjs} +6 -6
- package/dist/{chunk-KJNAGH62.cjs.map → chunk-IL7RLPEW.cjs.map} +1 -1
- package/dist/{chunk-BOUGYQIB.js → chunk-IWCCZ3SL.js} +2 -2
- package/dist/{chunk-I4RJR5NC.js → chunk-J4RNO2J4.js} +2 -2
- package/dist/{chunk-NECLGVVM.js → chunk-JRK2WVVB.js} +2 -2
- package/dist/{chunk-6JSVSQLD.js → chunk-LQXAR5I6.js} +2 -2
- package/dist/{chunk-VTBBNT45.js → chunk-MFORI4AF.js} +2 -2
- package/dist/{chunk-53VLA4GS.js → chunk-N5XWNVSD.js} +3 -3
- package/dist/{chunk-BFMXSXZJ.js → chunk-N7IJJD5D.js} +5 -5
- package/dist/{chunk-HNELQUR6.cjs → chunk-NMTVPGAG.cjs} +77 -77
- package/dist/{chunk-HNELQUR6.cjs.map → chunk-NMTVPGAG.cjs.map} +1 -1
- package/dist/{chunk-EM4Q3LD7.js → chunk-NVGJZZJZ.js} +3 -3
- package/dist/{chunk-LOKDFWR6.js → chunk-ONRVMMIU.js} +26 -17
- package/dist/chunk-ONRVMMIU.js.map +1 -0
- package/dist/{chunk-4GXYZ4FS.js → chunk-Q2R7VRJY.js} +4 -4
- package/dist/{chunk-CVPFE6NS.js → chunk-QNSLRHBL.js} +2 -2
- package/dist/{chunk-NYC7XDJ6.js → chunk-QQUXPVOH.js} +10 -10
- package/dist/{chunk-6N5FP2LX.js → chunk-QWJ5KIWV.js} +2 -2
- package/dist/{chunk-ZH3YY4GN.js → chunk-SHZ4NZPS.js} +2 -2
- package/dist/{chunk-CVYBF3Y3.js → chunk-SNNWVEQR.js} +5 -5
- package/dist/{chunk-E3CRLQAY.js → chunk-T66JN7AP.js} +2 -2
- package/dist/{chunk-PUQUK3EY.cjs → chunk-TOYB5KCE.cjs} +3 -3
- package/dist/{chunk-PUQUK3EY.cjs.map → chunk-TOYB5KCE.cjs.map} +1 -1
- package/dist/{chunk-XGI43ROO.js → chunk-TZOBWD7J.js} +2 -2
- package/dist/{chunk-FHHNTQRH.cjs → chunk-W5TUVES3.cjs} +2 -2
- package/dist/{chunk-FHHNTQRH.cjs.map → chunk-W5TUVES3.cjs.map} +1 -1
- package/dist/{chunk-3U6GXRY4.cjs → chunk-WJKVPRPH.cjs} +98 -98
- package/dist/{chunk-3U6GXRY4.cjs.map → chunk-WJKVPRPH.cjs.map} +1 -1
- package/dist/{chunk-JY3XEJWS.js → chunk-X3K7J6KP.js} +4 -4
- package/dist/{chunk-GVJYZYG7.js → chunk-YU2WR5ZT.js} +27 -18
- package/dist/chunk-YU2WR5ZT.js.map +1 -0
- package/dist/{chunk-HCFQYBTZ.js → chunk-Z4TAVTCF.js} +2 -2
- package/dist/{chunk-MUKBAXTF.js → chunk-ZCM2RLTI.js} +2 -2
- package/dist/{chunk-JVF275X3.js → chunk-ZEXTE425.js} +2 -2
- package/dist/chunks-YK64NQKA.js +11 -0
- package/dist/cli.js +43 -43
- package/dist/{formula-SSGFVG66.js → formula-5CRHNMRG.js} +4 -4
- package/dist/{formula-PV3PFULG.js → formula-CONAN5NV.js} +3 -3
- package/dist/{formula-3E4ILK6C.cjs → formula-F7X5NBGL.cjs} +9 -9
- package/dist/{formula-3E4ILK6C.cjs.map → formula-F7X5NBGL.cjs.map} +1 -1
- package/dist/generator-7QULUIZN.cjs +11 -0
- package/dist/{generator-H2XRWHNP.cjs.map → generator-7QULUIZN.cjs.map} +1 -1
- package/dist/generator-QRTY3A2B.js +10 -0
- package/dist/generator-S3CJBUNO.js +17 -0
- package/dist/{image-ocr-J5PGRPMZ.js → image-ocr-CNN2BO6A.js} +6 -6
- package/dist/{image-ocr-X7TOAJNE.js → image-ocr-MGYQA47N.js} +9 -9
- package/dist/{image-ocr-7CMUA2CG.cjs → image-ocr-N2KTIH26.cjs} +17 -17
- package/dist/{image-ocr-7CMUA2CG.cjs.map → image-ocr-N2KTIH26.cjs.map} +1 -1
- package/dist/index.cjs +1105 -1105
- package/dist/index.js +9 -9
- package/dist/mcp.js +36 -36
- package/dist/memo-3D7ZMPXA.js +17 -0
- package/dist/{model-bundle-7NV6RX7O.js → model-bundle-CBAGMKXY.js} +5 -5
- package/dist/{models-DLJMMUXQ.js → models-4F3PY6ZH.js} +5 -5
- package/dist/{parse-worker-v2-C5AAYUOB.js → parse-worker-v2-NY4RCZH2.js} +22 -22
- package/dist/{parser-HO3KG7O2.js → parser-SDYZKFGP.js} +54 -11
- package/dist/parser-SDYZKFGP.js.map +1 -0
- package/dist/{parser-RQ3PETYY.cjs → parser-SGTP2HRJ.cjs} +204 -161
- package/dist/parser-SGTP2HRJ.cjs.map +1 -0
- package/dist/{parser-PYCVUUZF.js → parser-V3T4JIHZ.js} +57 -14
- package/dist/parser-V3T4JIHZ.js.map +1 -0
- package/dist/pdf-ocr-4VVHZACS.cjs +36 -0
- package/dist/{pdf-ocr-VSU2AT4O.cjs.map → pdf-ocr-4VVHZACS.cjs.map} +1 -1
- package/dist/{pdf-ocr-AZYKIETU.js → pdf-ocr-N67HU6JI.js} +6 -6
- package/dist/{pdf-ocr-DKEM7RAT.js → pdf-ocr-OMPJG4A3.js} +9 -9
- package/dist/{profile-io-6IRJLQAZ.js → profile-io-3NMJP3MS.js} +3 -3
- package/dist/{rasterize-33DLAIP2.js → rasterize-6KOICUFD.js} +3 -3
- package/dist/{redact-doc-X24MR3ZK.js → redact-doc-AYVTPSJ7.js} +21 -21
- package/dist/{render-VSQ3ARIV.js → render-G2S6NLNT.js} +12 -12
- package/dist/{rewrite-fallback-YHRACPSA.js → rewrite-fallback-6X6RAE44.js} +13 -13
- package/dist/seal-3YKKLMQE.js +16 -0
- package/dist/{setup-4PVWN2S7.js → setup-MPJIJVRK.js} +3 -3
- package/dist/{to-hwpx-O43M7T3K.js → to-hwpx-4LMIQ72J.js} +4 -4
- package/dist/{to-hwpx-BHVHZRUY.js → to-hwpx-DIDCKP5A.js} +7 -7
- package/dist/to-hwpx-KWYINCWF.cjs +16 -0
- package/dist/{to-hwpx-YUJI7GJ3.cjs.map → to-hwpx-KWYINCWF.cjs.map} +1 -1
- package/dist/visual-BMEMSXMR.js +37 -0
- package/dist/{watch-ESDXLWY7.js → watch-YPXIB3MW.js} +22 -22
- package/package.json +1 -1
- package/dist/chunk-CUXWMIE4.cjs.map +0 -1
- package/dist/chunk-GVJYZYG7.js.map +0 -1
- package/dist/chunk-LOKDFWR6.js.map +0 -1
- package/dist/chunks-WE36WDLN.js +0 -11
- package/dist/generator-5OWWNEV5.js +0 -10
- package/dist/generator-H2XRWHNP.cjs +0 -11
- package/dist/generator-LQOQIGHB.js +0 -17
- package/dist/memo-OZE6O2XS.js +0 -17
- package/dist/parser-HO3KG7O2.js.map +0 -1
- package/dist/parser-PYCVUUZF.js.map +0 -1
- package/dist/parser-RQ3PETYY.cjs.map +0 -1
- package/dist/pdf-ocr-VSU2AT4O.cjs +0 -36
- package/dist/seal-CS3DZSEY.js +0 -16
- package/dist/to-hwpx-YUJI7GJ3.cjs +0 -16
- package/dist/visual-OQONH277.js +0 -37
- /package/dist/{-TB65UADR.js.map → -2E4K77IT.js.map} +0 -0
- /package/dist/{chunk-ZB7EJUDU.js.map → chunk-24TTJGKB.js.map} +0 -0
- /package/dist/{chunk-HKZMDPSE.js.map → chunk-2F7XY5YH.js.map} +0 -0
- /package/dist/{chunk-CSGH4UWK.js.map → chunk-5CWZMORL.js.map} +0 -0
- /package/dist/{chunk-PUXC2MIL.js.map → chunk-6XO2M6UP.js.map} +0 -0
- /package/dist/{chunk-N6TU2AGG.js.map → chunk-D7FENV7F.js.map} +0 -0
- /package/dist/{chunk-CVQR4G22.js.map → chunk-DRNG6PLM.js.map} +0 -0
- /package/dist/{chunk-ZXBBZVFG.js.map → chunk-E6ZXDD6B.js.map} +0 -0
- /package/dist/{chunk-FMBG7JZY.js.map → chunk-F25GZK3B.js.map} +0 -0
- /package/dist/{chunk-GC4AWWQ4.js.map → chunk-F7MA5KWA.js.map} +0 -0
- /package/dist/{chunk-OD2KWIK2.js.map → chunk-FDVVHEFI.js.map} +0 -0
- /package/dist/{chunk-WMGLEVBF.js.map → chunk-FGPDVC3H.js.map} +0 -0
- /package/dist/{chunk-GWZKO5S2.js.map → chunk-GHYRE6BO.js.map} +0 -0
- /package/dist/{chunk-AJR6KXMV.js.map → chunk-HSAD274D.js.map} +0 -0
- /package/dist/{chunk-BOUGYQIB.js.map → chunk-IWCCZ3SL.js.map} +0 -0
- /package/dist/{chunk-I4RJR5NC.js.map → chunk-J4RNO2J4.js.map} +0 -0
- /package/dist/{chunk-NECLGVVM.js.map → chunk-JRK2WVVB.js.map} +0 -0
- /package/dist/{chunk-6JSVSQLD.js.map → chunk-LQXAR5I6.js.map} +0 -0
- /package/dist/{chunk-VTBBNT45.js.map → chunk-MFORI4AF.js.map} +0 -0
- /package/dist/{chunk-53VLA4GS.js.map → chunk-N5XWNVSD.js.map} +0 -0
- /package/dist/{chunk-BFMXSXZJ.js.map → chunk-N7IJJD5D.js.map} +0 -0
- /package/dist/{chunk-EM4Q3LD7.js.map → chunk-NVGJZZJZ.js.map} +0 -0
- /package/dist/{chunk-4GXYZ4FS.js.map → chunk-Q2R7VRJY.js.map} +0 -0
- /package/dist/{chunk-CVPFE6NS.js.map → chunk-QNSLRHBL.js.map} +0 -0
- /package/dist/{chunk-NYC7XDJ6.js.map → chunk-QQUXPVOH.js.map} +0 -0
- /package/dist/{chunk-6N5FP2LX.js.map → chunk-QWJ5KIWV.js.map} +0 -0
- /package/dist/{chunk-ZH3YY4GN.js.map → chunk-SHZ4NZPS.js.map} +0 -0
- /package/dist/{chunk-CVYBF3Y3.js.map → chunk-SNNWVEQR.js.map} +0 -0
- /package/dist/{chunk-E3CRLQAY.js.map → chunk-T66JN7AP.js.map} +0 -0
- /package/dist/{chunk-XGI43ROO.js.map → chunk-TZOBWD7J.js.map} +0 -0
- /package/dist/{chunk-JY3XEJWS.js.map → chunk-X3K7J6KP.js.map} +0 -0
- /package/dist/{chunk-HCFQYBTZ.js.map → chunk-Z4TAVTCF.js.map} +0 -0
- /package/dist/{chunk-MUKBAXTF.js.map → chunk-ZCM2RLTI.js.map} +0 -0
- /package/dist/{chunk-JVF275X3.js.map → chunk-ZEXTE425.js.map} +0 -0
- /package/dist/{chunks-WE36WDLN.js.map → chunks-YK64NQKA.js.map} +0 -0
- /package/dist/{formula-SSGFVG66.js.map → formula-5CRHNMRG.js.map} +0 -0
- /package/dist/{formula-PV3PFULG.js.map → formula-CONAN5NV.js.map} +0 -0
- /package/dist/{generator-5OWWNEV5.js.map → generator-QRTY3A2B.js.map} +0 -0
- /package/dist/{generator-LQOQIGHB.js.map → generator-S3CJBUNO.js.map} +0 -0
- /package/dist/{image-ocr-J5PGRPMZ.js.map → image-ocr-CNN2BO6A.js.map} +0 -0
- /package/dist/{image-ocr-X7TOAJNE.js.map → image-ocr-MGYQA47N.js.map} +0 -0
- /package/dist/{memo-OZE6O2XS.js.map → memo-3D7ZMPXA.js.map} +0 -0
- /package/dist/{model-bundle-7NV6RX7O.js.map → model-bundle-CBAGMKXY.js.map} +0 -0
- /package/dist/{models-DLJMMUXQ.js.map → models-4F3PY6ZH.js.map} +0 -0
- /package/dist/{parse-worker-v2-C5AAYUOB.js.map → parse-worker-v2-NY4RCZH2.js.map} +0 -0
- /package/dist/{pdf-ocr-AZYKIETU.js.map → pdf-ocr-N67HU6JI.js.map} +0 -0
- /package/dist/{pdf-ocr-DKEM7RAT.js.map → pdf-ocr-OMPJG4A3.js.map} +0 -0
- /package/dist/{profile-io-6IRJLQAZ.js.map → profile-io-3NMJP3MS.js.map} +0 -0
- /package/dist/{rasterize-33DLAIP2.js.map → rasterize-6KOICUFD.js.map} +0 -0
- /package/dist/{redact-doc-X24MR3ZK.js.map → redact-doc-AYVTPSJ7.js.map} +0 -0
- /package/dist/{render-VSQ3ARIV.js.map → render-G2S6NLNT.js.map} +0 -0
- /package/dist/{rewrite-fallback-YHRACPSA.js.map → rewrite-fallback-6X6RAE44.js.map} +0 -0
- /package/dist/{seal-CS3DZSEY.js.map → seal-3YKKLMQE.js.map} +0 -0
- /package/dist/{setup-4PVWN2S7.js.map → setup-MPJIJVRK.js.map} +0 -0
- /package/dist/{to-hwpx-BHVHZRUY.js.map → to-hwpx-4LMIQ72J.js.map} +0 -0
- /package/dist/{to-hwpx-O43M7T3K.js.map → to-hwpx-DIDCKP5A.js.map} +0 -0
- /package/dist/{visual-OQONH277.js.map → visual-BMEMSXMR.js.map} +0 -0
- /package/dist/{watch-ESDXLWY7.js.map → watch-YPXIB3MW.js.map} +0 -0
package/README.md
CHANGED
|
@@ -111,14 +111,14 @@ await writeFile("보고서.hwpx", Buffer.from(hwpx))
|
|
|
111
111
|
|
|
112
112
|
## 검증 결과
|
|
113
113
|
|
|
114
|
-
**4.22.14 · 2026-10-19 검증**(렌더 배치·별표는 4.24.24 · 2026-10-30, PDF 글·표는 4.24.
|
|
114
|
+
**4.22.14 · 2026-10-19 검증**(렌더 배치·별표는 4.24.24 · 2026-10-30, PDF 글·표는 4.24.35 · 2026-11-01, OCR 은 4.24.32 · 2026-11-01, HWP → HWPX 변환은 4.24.29 · 2026-10-31). 고정 코퍼스와 참조 기준으로 측정한 결과입니다.
|
|
115
115
|
|
|
116
116
|
| 대상 | 규모 | 결과 |
|
|
117
117
|
| --- | --- | --- |
|
|
118
118
|
| HWPX | 2,424문서 · 10,342표 | 표 구조 일치 **10,342/10,342 · 100%** |
|
|
119
119
|
| HWP 5.x ↔ HWPX | 1,130쌍 · 4,315표 | 짝 문서의 표 구조 일치 **100%** |
|
|
120
120
|
| HWP 5.x → HWPX 변환 | 한글 저장 짝 264쌍 (속성 대조 232쌍) | 속성 일치 **99.21%** · 완전 일치 **69/232** · 글 **264/264** · 한글 화면 대조 80문서 |
|
|
121
|
-
| PDF 글 | 744쌍 | 글자 재현율 **99.885%** · 정확도 **99.682%** · 읽기 순서 **99.
|
|
121
|
+
| PDF 글 | 744쌍 | 글자 재현율 **99.885%** · 정확도 **99.682%** · 읽기 순서 **99.360%** · 어절 F1 **99.076%** |
|
|
122
122
|
| PDF 표 | 708쌍 · 2,331표 | 표 탐지 **99.83%** · 구조 일치 **98.24%** · 칸 F1 **0.9919** |
|
|
123
123
|
| HWPX 재조판 | 다중줄 25,187문단 (12개 폴더) | 모든 줄 시작 일치 **24,941/25,187 · 99.02%** |
|
|
124
124
|
| PDF 중첩표 (텍스트층) | 29문서 · 101표 | 구조·칸 내용 **101/101 · 100%** |
|
|
@@ -132,15 +132,15 @@ await writeFile("보고서.hwpx", Buffer.from(hwpx))
|
|
|
132
132
|
|
|
133
133
|
## 최근 업데이트
|
|
134
134
|
|
|
135
|
-
최신 배포: **[4.24.
|
|
135
|
+
최신 배포: **[4.24.35](https://github.com/chrisryugj/kordoc/releases/tag/v4.24.35)** · 2026-11-01
|
|
136
136
|
|
|
137
137
|
| 버전 | 주요 변경 | 수치 변화 |
|
|
138
138
|
| --- | --- | --- |
|
|
139
|
+
| 4.24.35 | PDF: 자간 줄인 수치의 같은 숫자 둘("129.9") 지키기 · 글자마다 찍은 첨자 줄을 본문에 붙이기 · 수 가운데서 꺾인 줄("1,2⏎96억"·"(4.1⏎6.~5.16.)")과 칸 소수 잇기 · 표지 책등 외기둥 세로 글 | PDF 표 칸 완전 일치 0.99264 → **0.99267** · 칸 내용 0.98902 → **0.98905** · PDF 글 순서 99.359 → **99.360%** · 어절 F1 99.073 → **99.076%** · 그 밖 지표 그대로 |
|
|
139
140
|
| 4.24.34 | to-hwpx: 파일 여러 개·폴더 일괄 변환(하위 폴더, 이미 있는 .hwpx 건너뜀) · PDF: 기호 글꼴 작은 네모로 찍고 공백으로 적은 "·" 글머리 되살림 · 글자 단위로 나눈 줄 머리 어미("는데"·"졌다")·겹조사 잇기 | PDF 표 칸 완전 일치 0.99221 → **0.99264** · 칸 내용 0.98896 → **0.98902** · PDF 글 재현율 99.883 → **99.885%** · 순서 99.356 → **99.359%** · 어절 F1 99.071 → **99.073%** · 그 밖 지표 그대로 |
|
|
140
141
|
| 4.24.33 | PDF 표: 모아찍기 쪽 넘김에서 오른쪽 쪽 머리 상자로 넘어간 칸 글을 앞 칸에 잇기 · 칸을 한 겹 더 깐 1×1 클립(통계표 숫자 칸)을 중첩 표 대신 칸 글로 | PDF 표 칸 내용 일치 0.98794 → **0.98896** · 칸 완전 일치 0.99153 → **0.99221** · 그 밖 벤치 지표 그대로 |
|
|
141
142
|
| 4.24.32 | PDF·OCR 두 단: 같은 줄 격자 두 단(속기록·시험지)을 단으로 · 옆 단 머리 문항이 앞 선지 하위 목록이 되던 것 · 짝·홀 쪽에서 칸 순서가 뒤집히는 머리말 상자 걷기 | PDF 글 읽기 순서 99.348% → **99.356%** · 정확도 99.680% → **99.682%** · 어절 F1 99.069% → **99.071%** · OCR 정답(텍스트층) 회의록 두 단이 바로잡혀 CER 0.0237 → 0.0239(정답 변화, 채점 그대로) |
|
|
142
143
|
| 4.24.31 | PDF 읽기 순서: 그림 위주 2-up 쪽 · 결재문서 머리 나란한 표(문서번호 → 결재 칸) · PDF 가짜 표: 고시안 머리 "○○고시 제 호" 아래 본문 · HWP 3 기술 교재 고정폭 낱말 줄 | PDF 글 읽기 순서 99.312% → **99.348%** · 정확도 99.678% → **99.680%** · 표 순서 뒤바뀜 5 → **2** · 그 밖 벤치 지표 그대로 |
|
|
143
|
-
| 4.24.30 | 파서: 채운 누름틀·하이퍼링크가 든 문단의 굵게·밑줄 표지(보도자료 본문 누름틀 강조가 사라지던 것, HWPX·HWP) · PDF 표: 몇 칸에만 걸린 한컴 클립이 선 표 칸을 빼앗던 것 · to-hwpx: 그리기 선 투명도 | OCR 표 정답의 가짜 표가 빠져 34/67 → **34/66**·CER 0.0244 → **0.0237** · patch 굵은 낱말 넣기 잔차 HWPX 80 → **60**/489 · 벤치 지표 그대로 |
|
|
144
144
|
|
|
145
145
|
이전 버전과 상세 내용은 [변경 이력](CHANGELOG.md)에 있습니다.
|
|
146
146
|
|
|
@@ -53,26 +53,26 @@ import {
|
|
|
53
53
|
usesGaejosikMunche,
|
|
54
54
|
usesLogicStructure,
|
|
55
55
|
validateHwpx
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-FDVVHEFI.js";
|
|
57
57
|
import {
|
|
58
58
|
blocksToPages
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-MFORI4AF.js";
|
|
60
60
|
import {
|
|
61
61
|
extractClickHereFields,
|
|
62
62
|
patchHwp,
|
|
63
63
|
patchHwpx
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-6XO2M6UP.js";
|
|
65
65
|
import {
|
|
66
66
|
addMemoHwpx
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-FGPDVC3H.js";
|
|
68
68
|
import {
|
|
69
69
|
placeSealHwpx
|
|
70
|
-
} from "./chunk-
|
|
71
|
-
import "./chunk-
|
|
70
|
+
} from "./chunk-N7IJJD5D.js";
|
|
71
|
+
import "./chunk-IWCCZ3SL.js";
|
|
72
72
|
import {
|
|
73
73
|
convertToHwpx,
|
|
74
74
|
hwpToHwpx
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-D7FENV7F.js";
|
|
76
76
|
import {
|
|
77
77
|
DEFAULT_REDACT_RULES,
|
|
78
78
|
redactMarkdown,
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
} from "./chunk-3WSNLH4B.js";
|
|
81
81
|
import {
|
|
82
82
|
blocksToChunks
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-5CWZMORL.js";
|
|
84
84
|
import {
|
|
85
85
|
blocksToPdf,
|
|
86
86
|
extractRenderedRegions,
|
|
@@ -91,13 +91,13 @@ import {
|
|
|
91
91
|
renderHwp5Pages,
|
|
92
92
|
renderHwpxToSvg,
|
|
93
93
|
renderSceneToHtml
|
|
94
|
-
} from "./chunk-
|
|
95
|
-
import "./chunk-
|
|
96
|
-
import "./chunk-
|
|
97
|
-
import "./chunk-
|
|
94
|
+
} from "./chunk-QQUXPVOH.js";
|
|
95
|
+
import "./chunk-N5XWNVSD.js";
|
|
96
|
+
import "./chunk-2F7XY5YH.js";
|
|
97
|
+
import "./chunk-SNNWVEQR.js";
|
|
98
98
|
import "./chunk-VKVDMH7X.js";
|
|
99
|
-
import "./chunk-
|
|
100
|
-
import "./chunk-
|
|
99
|
+
import "./chunk-QWJ5KIWV.js";
|
|
100
|
+
import "./chunk-T66JN7AP.js";
|
|
101
101
|
import "./chunk-VQFA55IC.js";
|
|
102
102
|
import {
|
|
103
103
|
detectFormat,
|
|
@@ -119,7 +119,7 @@ import {
|
|
|
119
119
|
markdownToHwpx,
|
|
120
120
|
normalizeGongmunPreset,
|
|
121
121
|
placeTotalRow
|
|
122
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-F7MA5KWA.js";
|
|
123
123
|
import {
|
|
124
124
|
ValueCursor,
|
|
125
125
|
applySplices,
|
|
@@ -141,20 +141,20 @@ import {
|
|
|
141
141
|
measureTextWidth,
|
|
142
142
|
simulateWrap,
|
|
143
143
|
simulateWrapKeepWord
|
|
144
|
-
} from "./chunk-
|
|
145
|
-
import "./chunk-
|
|
144
|
+
} from "./chunk-DRNG6PLM.js";
|
|
145
|
+
import "./chunk-LQXAR5I6.js";
|
|
146
146
|
import "./chunk-OFVHQ2TZ.js";
|
|
147
147
|
import "./chunk-WFKFG2RT.js";
|
|
148
|
-
import "./chunk-
|
|
148
|
+
import "./chunk-ZCM2RLTI.js";
|
|
149
149
|
import {
|
|
150
150
|
blocksToMarkdown,
|
|
151
151
|
flattenLayoutTables,
|
|
152
152
|
hasStructuredCellContent
|
|
153
|
-
} from "./chunk-
|
|
153
|
+
} from "./chunk-HSAD274D.js";
|
|
154
154
|
import "./chunk-KFF47XZ7.js";
|
|
155
155
|
import {
|
|
156
156
|
VERSION
|
|
157
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-E6ZXDD6B.js";
|
|
158
158
|
export {
|
|
159
159
|
AGENCY_COMMON_NAME,
|
|
160
160
|
BUILTIN_TEMPLATES,
|
|
@@ -268,4 +268,4 @@ export {
|
|
|
268
268
|
usesLogicStructure,
|
|
269
269
|
validateHwpx
|
|
270
270
|
};
|
|
271
|
-
//# sourceMappingURL=-
|
|
271
|
+
//# sourceMappingURL=-2E4K77IT.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
KordocError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-E6ZXDD6B.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-24TTJGKB.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
createXmlParser,
|
|
4
4
|
findChildByLocalName
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-LQXAR5I6.js";
|
|
6
6
|
|
|
7
7
|
// src/render/head-styles.ts
|
|
8
8
|
var DEFAULT_PARA_GEOM = {
|
|
@@ -346,4 +346,4 @@ export {
|
|
|
346
346
|
hwpFaceToCssStack,
|
|
347
347
|
parseRenderStyles
|
|
348
348
|
};
|
|
349
|
-
//# sourceMappingURL=chunk-
|
|
349
|
+
//# sourceMappingURL=chunk-2F7XY5YH.js.map
|
|
@@ -39,12 +39,12 @@ var _chunkLAYKIZOXcjs = require('./chunk-LAYKIZOX.cjs');
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
var
|
|
42
|
+
var _chunkIL7RLPEWcjs = require('./chunk-IL7RLPEW.cjs');
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
var
|
|
47
|
+
var _chunkW5TUVES3cjs = require('./chunk-W5TUVES3.cjs');
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
var _chunkGS7T56RPcjs = require('./chunk-GS7T56RP.cjs');
|
|
@@ -121,7 +121,7 @@ function decompressStream(data2) {
|
|
|
121
121
|
return _zlib.inflateRawSync.call(void 0, data2, opts);
|
|
122
122
|
}
|
|
123
123
|
function parseFileHeader(data2) {
|
|
124
|
-
if (data2.length < 40) throw new (0,
|
|
124
|
+
if (data2.length < 40) throw new (0, _chunkW5TUVES3cjs.KordocError)("FileHeader\uAC00 \uB108\uBB34 \uC9E7\uC2B5\uB2C8\uB2E4 (\uCD5C\uC18C 40\uBC14\uC774\uD2B8)");
|
|
125
125
|
const sig = data2.subarray(0, 32).toString("utf8").replace(/\0+$/, "");
|
|
126
126
|
return {
|
|
127
127
|
signature: sig,
|
|
@@ -1350,7 +1350,7 @@ function decryptPasswordStream(raw, password) {
|
|
|
1350
1350
|
var TAG_DOCUMENT_PROPERTIES = 16;
|
|
1351
1351
|
var TAG_ID_MAPPINGS2 = 17;
|
|
1352
1352
|
function assertDecryptedDocInfo(data2, readRecords2) {
|
|
1353
|
-
const wrong = () => new (0,
|
|
1353
|
+
const wrong = () => new (0, _chunkW5TUVES3cjs.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.");
|
|
1354
1354
|
let records;
|
|
1355
1355
|
try {
|
|
1356
1356
|
records = readRecords2(data2);
|
|
@@ -1362,7 +1362,7 @@ function assertDecryptedDocInfo(data2, readRecords2) {
|
|
|
1362
1362
|
}
|
|
1363
1363
|
function assertSupportedEncryptVersion(version) {
|
|
1364
1364
|
if (version !== SUPPORTED_ENCRYPT_VERSION) {
|
|
1365
|
-
throw new (0,
|
|
1365
|
+
throw new (0, _chunkW5TUVES3cjs.KordocError)(
|
|
1366
1366
|
`\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 HWP \uC554\uD638\uD654 \uBC84\uC804\uC785\uB2C8\uB2E4 (EncryptVersion=${version}, \uC9C0\uC6D0: ${SUPPORTED_ENCRYPT_VERSION})`
|
|
1367
1367
|
);
|
|
1368
1368
|
}
|
|
@@ -1611,19 +1611,19 @@ var HANJA_UNITS = ["", "\u5341", "\u767E", "\u5343", "\u842C"];
|
|
|
1611
1611
|
function formatNumber(n, fmt) {
|
|
1612
1612
|
switch (fmt) {
|
|
1613
1613
|
case "circled":
|
|
1614
|
-
return n >= 1 ?
|
|
1614
|
+
return n >= 1 ? _chunkIL7RLPEWcjs.circledNumber.call(void 0, n - 1) : String(n);
|
|
1615
1615
|
case "romanUpper":
|
|
1616
|
-
return
|
|
1616
|
+
return _chunkIL7RLPEWcjs.romanNumeral.call(void 0, n, true);
|
|
1617
1617
|
case "romanLower":
|
|
1618
|
-
return
|
|
1618
|
+
return _chunkIL7RLPEWcjs.romanNumeral.call(void 0, n, false);
|
|
1619
1619
|
case "latinUpper":
|
|
1620
1620
|
return formatLatin(n, true) || String(n);
|
|
1621
1621
|
case "latinLower":
|
|
1622
1622
|
return formatLatin(n, false) || String(n);
|
|
1623
1623
|
case "ganada":
|
|
1624
|
-
return n >= 1 ?
|
|
1624
|
+
return n >= 1 ? _chunkIL7RLPEWcjs.hangulOrdinal.call(void 0, n - 1) : String(n);
|
|
1625
1625
|
case "circledGanada":
|
|
1626
|
-
return n >= 1 ?
|
|
1626
|
+
return n >= 1 ? _chunkIL7RLPEWcjs.circledHangul.call(void 0, n - 1) : String(n);
|
|
1627
1627
|
case "jamo":
|
|
1628
1628
|
return fromTable(n, JAMO);
|
|
1629
1629
|
case "circledJamo":
|
|
@@ -1806,8 +1806,8 @@ function emitParagraphBlocks(p) {
|
|
|
1806
1806
|
return blocks;
|
|
1807
1807
|
}
|
|
1808
1808
|
function tableFlatText(table) {
|
|
1809
|
-
const flat =
|
|
1810
|
-
return table.caption ?
|
|
1809
|
+
const flat = _chunkIL7RLPEWcjs.convertTableToText.call(void 0, table.cells);
|
|
1810
|
+
return table.caption ? _chunkIL7RLPEWcjs.captionedText.call(void 0, flat, table.caption, table.captionBelow) : flat;
|
|
1811
1811
|
}
|
|
1812
1812
|
function blocksPlainText(blocks, sep) {
|
|
1813
1813
|
const parts = [];
|
|
@@ -1890,8 +1890,8 @@ ${cell.text}` : cell.text;
|
|
|
1890
1890
|
}
|
|
1891
1891
|
function buildAddressedTable(cells, rows, cols, keepAnchoredEmptyCols) {
|
|
1892
1892
|
for (const c of cells) {
|
|
1893
|
-
rows = Math.max(rows, Math.min((_nullishCoalesce(c.rowAddr, () => ( 0))) + 1,
|
|
1894
|
-
cols = Math.max(cols, Math.min((_nullishCoalesce(c.colAddr, () => ( 0))) + 1,
|
|
1893
|
+
rows = Math.max(rows, Math.min((_nullishCoalesce(c.rowAddr, () => ( 0))) + 1, _chunkIL7RLPEWcjs.MAX_ROWS));
|
|
1894
|
+
cols = Math.max(cols, Math.min((_nullishCoalesce(c.colAddr, () => ( 0))) + 1, _chunkIL7RLPEWcjs.MAX_COLS));
|
|
1895
1895
|
}
|
|
1896
1896
|
const placed = resolveCellOverlaps(cells, rows, cols);
|
|
1897
1897
|
const byRow = Array.from({ length: rows }, () => []);
|
|
@@ -1899,12 +1899,12 @@ function buildAddressedTable(cells, rows, cols, keepAnchoredEmptyCols) {
|
|
|
1899
1899
|
const r = _nullishCoalesce(c.rowAddr, () => ( 0));
|
|
1900
1900
|
if (r < rows && (_nullishCoalesce(c.colAddr, () => ( 0))) < cols) byRow[r].push(c);
|
|
1901
1901
|
}
|
|
1902
|
-
const table =
|
|
1902
|
+
const table = _chunkIL7RLPEWcjs.buildTable.call(void 0, byRow, { keepAnchoredEmptyCols });
|
|
1903
1903
|
if (table.rows === 0) return null;
|
|
1904
1904
|
for (const c of placed) {
|
|
1905
1905
|
if (c.edges) {
|
|
1906
1906
|
const at = _optionalChain([table, 'access', _12 => _12.cells, 'access', _13 => _13[_nullishCoalesce(c.rowAddr, () => ( 0))], 'optionalAccess', _14 => _14[_nullishCoalesce(c.colAddr, () => ( 0))]]);
|
|
1907
|
-
if (at)
|
|
1907
|
+
if (at) _chunkIL7RLPEWcjs.CELL_EDGES.set(at, c.edges);
|
|
1908
1908
|
}
|
|
1909
1909
|
if (!_optionalChain([c, 'access', _15 => _15.blocks, 'optionalAccess', _16 => _16.length]) && !c.isHeader) continue;
|
|
1910
1910
|
const target = _optionalChain([table, 'access', _17 => _17.cells, 'access', _18 => _18[_nullishCoalesce(c.rowAddr, () => ( 0))], 'optionalAccess', _19 => _19[_nullishCoalesce(c.colAddr, () => ( 0))]]);
|
|
@@ -2141,7 +2141,7 @@ function parseParagraph(records, start, end, ctx) {
|
|
|
2141
2141
|
continue;
|
|
2142
2142
|
}
|
|
2143
2143
|
if (!ctrl2.href) continue;
|
|
2144
|
-
const href =
|
|
2144
|
+
const href = _chunkW5TUVES3cjs.sanitizeHref.call(void 0, ctrl2.href);
|
|
2145
2145
|
if (!href) continue;
|
|
2146
2146
|
if (!anchor.trim() || anchor.includes(INLINE_TABLE_MARK)) continue;
|
|
2147
2147
|
text = text.slice(0, r.start) + `[${anchor}](${href})` + text.slice(r.end);
|
|
@@ -2151,7 +2151,7 @@ function parseParagraph(records, start, end, ctx) {
|
|
|
2151
2151
|
}
|
|
2152
2152
|
if (text.includes(LITERAL_DOLLAR_MARK)) text = text.replaceAll(LITERAL_DOLLAR_MARK, "\\$");
|
|
2153
2153
|
text = resolveLiteralLt(text);
|
|
2154
|
-
text =
|
|
2154
|
+
text = _chunkIL7RLPEWcjs.tidyScriptTags.call(void 0, text);
|
|
2155
2155
|
const toc = _chunkLAYKIZOXcjs.takeTocLeaders.call(void 0, text);
|
|
2156
2156
|
text = toc.text;
|
|
2157
2157
|
const holdsText = (c) => {
|
|
@@ -2278,7 +2278,7 @@ function applyCtrlEffect(ctrl2, records, ctx) {
|
|
|
2278
2278
|
// 글자 겹침 — ctrl id 뒤 글자 수(WORD)·겹친 글자(WCHAR[n])·테두리 종류(BYTE, 0 = 없음). 종전엔 건너뛰어 법령 서식 원 번호(⑯·⑰)가 빠졌다
|
|
2279
2279
|
case CTRL_TCPS: {
|
|
2280
2280
|
const d = ctrl2.data, n = d.length >= 6 ? d.readUInt16LE(4) : 0;
|
|
2281
|
-
if (n > 0 && d.length >= 6 + 2 * n) ctrl2.inlineText =
|
|
2281
|
+
if (n > 0 && d.length >= 6 + 2 * n) ctrl2.inlineText = _chunkIL7RLPEWcjs.composeText.call(void 0, d.toString("utf16le", 6, 6 + 2 * n), (_nullishCoalesce(d[6 + 2 * n], () => ( 0))) !== 0);
|
|
2282
2282
|
return;
|
|
2283
2283
|
}
|
|
2284
2284
|
// 숨은 설명/단 정의/쪽번호 위치/감추기/찾아보기/책갈피/덧말 — 본문 텍스트 없음 또는 의도적 스킵
|
|
@@ -2413,7 +2413,7 @@ function hyperlinkUrlFromCommand(command) {
|
|
|
2413
2413
|
}
|
|
2414
2414
|
var A4_HEIGHT = 84188;
|
|
2415
2415
|
function keepUnlessPageSpanning(table, cells) {
|
|
2416
|
-
if (!cells.some((c) => c.pageSpanning))
|
|
2416
|
+
if (!cells.some((c) => c.pageSpanning)) _chunkIL7RLPEWcjs.markNonLayoutTable.call(void 0, table);
|
|
2417
2417
|
}
|
|
2418
2418
|
function parseTableControl(ctrl2, records, ctx) {
|
|
2419
2419
|
if (ctx.depth >= MAX_NEST_DEPTH) return null;
|
|
@@ -2425,8 +2425,8 @@ function parseTableControl(ctrl2, records, ctx) {
|
|
|
2425
2425
|
let tableIdx = -1;
|
|
2426
2426
|
for (let i2 = childStart; i2 < childEnd; i2++) {
|
|
2427
2427
|
if (records[i2].tagId === TAG_TABLE && records[i2].level === directLevel && records[i2].data.length >= 8) {
|
|
2428
|
-
rows = Math.min(records[i2].data.readUInt16LE(4),
|
|
2429
|
-
cols = Math.min(records[i2].data.readUInt16LE(6),
|
|
2428
|
+
rows = Math.min(records[i2].data.readUInt16LE(4), _chunkIL7RLPEWcjs.MAX_ROWS);
|
|
2429
|
+
cols = Math.min(records[i2].data.readUInt16LE(6), _chunkIL7RLPEWcjs.MAX_COLS);
|
|
2430
2430
|
tableIdx = i2;
|
|
2431
2431
|
break;
|
|
2432
2432
|
}
|
|
@@ -2473,11 +2473,11 @@ function parseTableControl(ctrl2, records, ctx) {
|
|
|
2473
2473
|
return table2;
|
|
2474
2474
|
}
|
|
2475
2475
|
if (rows === 0 || cols === 0) {
|
|
2476
|
-
rows = Math.min(cells.length,
|
|
2476
|
+
rows = Math.min(cells.length, _chunkIL7RLPEWcjs.MAX_ROWS);
|
|
2477
2477
|
cols = 1;
|
|
2478
2478
|
}
|
|
2479
2479
|
const cellRows = arrangeCells(rows, cols, cells);
|
|
2480
|
-
const table =
|
|
2480
|
+
const table = _chunkIL7RLPEWcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: ctx.doc.keepTrailingEmptyCols });
|
|
2481
2481
|
if (caption && table.rows > 0) table.caption = caption;
|
|
2482
2482
|
if (caption && captionBelow && table.rows > 0) table.captionBelow = true;
|
|
2483
2483
|
if (sourceId && table.rows > 0) table.sourceId = sourceId;
|
|
@@ -2497,8 +2497,8 @@ function parseCell(records, lhIdx, end, ctx) {
|
|
|
2497
2497
|
rowAddr = rec.data.readUInt16LE(10);
|
|
2498
2498
|
const cs = rec.data.readUInt16LE(12);
|
|
2499
2499
|
const rs = rec.data.readUInt16LE(14);
|
|
2500
|
-
if (cs > 0) colSpan = Math.min(cs,
|
|
2501
|
-
if (rs > 0) rowSpan = Math.min(rs,
|
|
2500
|
+
if (cs > 0) colSpan = Math.min(cs, _chunkIL7RLPEWcjs.MAX_COLS);
|
|
2501
|
+
if (rs > 0) rowSpan = Math.min(rs, _chunkIL7RLPEWcjs.MAX_ROWS);
|
|
2502
2502
|
}
|
|
2503
2503
|
const blocks = ctx.depth < MAX_NEST_DEPTH ? parseParagraphList(records, lhIdx + 1, end, { ...ctx, depth: ctx.depth + 1, plainText: false }) : [];
|
|
2504
2504
|
const { text, hasStructure } = cellTextFromBlocks(blocks);
|
|
@@ -2624,7 +2624,7 @@ function emphasisSpans(state, text) {
|
|
|
2624
2624
|
for (let r = 0; r < runs.length; r++) {
|
|
2625
2625
|
const end = r + 1 < runs.length ? runs[r + 1][0] : state.text.length;
|
|
2626
2626
|
const raw = state.text.slice(r === 0 ? 0 : runs[r][0], end);
|
|
2627
|
-
const t =
|
|
2627
|
+
const t = _chunkIL7RLPEWcjs.tidyScriptTags.call(void 0, resolveLiteralLt(raw.replaceAll(LITERAL_DOLLAR_MARK, "\\$")));
|
|
2628
2628
|
if (!t) continue;
|
|
2629
2629
|
const key = runs[r][1], last = spans[spans.length - 1];
|
|
2630
2630
|
if (last && last.key === key) {
|
|
@@ -2681,7 +2681,7 @@ function hasRealUnderline(attrFlags) {
|
|
|
2681
2681
|
|
|
2682
2682
|
|
|
2683
2683
|
// src/memo-notes.ts
|
|
2684
|
-
var squash = (s) =>
|
|
2684
|
+
var squash = (s) => _chunkIL7RLPEWcjs.sanitizeText.call(void 0, s).replace(/\s+/g, "");
|
|
2685
2685
|
function blockText(b) {
|
|
2686
2686
|
if (b.type !== "table" || !b.table) return _nullishCoalesce(b.text, () => ( ""));
|
|
2687
2687
|
return b.table.cells.flat().map((c) => _nullishCoalesce(_optionalChain([c, 'optionalAccess', _51 => _51.text]), () => ( ""))).join("\n");
|
|
@@ -2703,7 +2703,7 @@ function locateMemoBlocks(blocks, memos) {
|
|
|
2703
2703
|
});
|
|
2704
2704
|
}
|
|
2705
2705
|
function memosMarkdown(memos) {
|
|
2706
|
-
const one = (s) =>
|
|
2706
|
+
const one = (s) => _chunkIL7RLPEWcjs.escapeGfm.call(void 0, _chunkIL7RLPEWcjs.sanitizeText.call(void 0, s.replace(/\s*\n\s*/g, " / ")));
|
|
2707
2707
|
const lines = memos.map((m, i) => {
|
|
2708
2708
|
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?$/, "")]);
|
|
2709
2709
|
const who = [m.author, when].filter(Boolean).join(", ");
|
|
@@ -2735,7 +2735,7 @@ function openHwp5Container(buffer, options) {
|
|
|
2735
2735
|
lenientCfb = _chunkDEVQZTE7cjs.parseLenientCfb.call(void 0, buffer);
|
|
2736
2736
|
warnings.push({ message: "\uC190\uC0C1\uB41C CFB \uCEE8\uD14C\uC774\uB108 \u2014 lenient \uBAA8\uB4DC\uB85C \uBCF5\uAD6C", code: "LENIENT_CFB_RECOVERY" });
|
|
2737
2737
|
} catch (e8) {
|
|
2738
|
-
throw new (0,
|
|
2738
|
+
throw new (0, _chunkW5TUVES3cjs.KordocError)("CFB \uCEE8\uD14C\uC774\uB108 \uD30C\uC2F1 \uC2E4\uD328 (strict \uBC0F lenient \uBAA8\uB450)");
|
|
2739
2739
|
}
|
|
2740
2740
|
}
|
|
2741
2741
|
const readRawStream = (path) => {
|
|
@@ -2746,14 +2746,14 @@ function openHwp5Container(buffer, options) {
|
|
|
2746
2746
|
return lenientCfb.findStream(path);
|
|
2747
2747
|
};
|
|
2748
2748
|
const headerData = readRawStream("/FileHeader");
|
|
2749
|
-
if (!headerData) throw new (0,
|
|
2749
|
+
if (!headerData) throw new (0, _chunkW5TUVES3cjs.KordocError)("FileHeader \uC2A4\uD2B8\uB9BC \uC5C6\uC74C");
|
|
2750
2750
|
const header = parseFileHeader(headerData);
|
|
2751
|
-
if (header.signature !== "HWP Document File") throw new (0,
|
|
2752
|
-
if (header.flags & FLAG_DRM) throw new (0,
|
|
2751
|
+
if (header.signature !== "HWP Document File") throw new (0, _chunkW5TUVES3cjs.KordocError)("HWP \uC2DC\uADF8\uB2C8\uCC98 \uBD88\uC77C\uCE58");
|
|
2752
|
+
if (header.flags & FLAG_DRM) throw new (0, _chunkW5TUVES3cjs.KordocError)("DRM \uBCF4\uD638\uB41C HWP\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
|
|
2753
2753
|
const encrypted = (header.flags & FLAG_ENCRYPTED) !== 0;
|
|
2754
2754
|
if (encrypted) {
|
|
2755
2755
|
if (!_optionalChain([options, 'optionalAccess', _58 => _58.password])) {
|
|
2756
|
-
throw new (0,
|
|
2756
|
+
throw new (0, _chunkW5TUVES3cjs.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.");
|
|
2757
2757
|
}
|
|
2758
2758
|
assertSupportedEncryptVersion(readEncryptVersion(headerData));
|
|
2759
2759
|
}
|
|
@@ -2767,12 +2767,12 @@ function openHwp5Container(buffer, options) {
|
|
|
2767
2767
|
const distribution = (header.flags & FLAG_DISTRIBUTION) !== 0;
|
|
2768
2768
|
if (encrypted) {
|
|
2769
2769
|
const rawDocInfo = findStream("/DocInfo");
|
|
2770
|
-
if (!rawDocInfo) throw new (0,
|
|
2770
|
+
if (!rawDocInfo) throw new (0, _chunkW5TUVES3cjs.KordocError)("DocInfo \uC2A4\uD2B8\uB9BC \uC5C6\uC74C");
|
|
2771
2771
|
let docInfoData;
|
|
2772
2772
|
try {
|
|
2773
2773
|
docInfoData = compressed ? decompressStream(rawDocInfo) : rawDocInfo;
|
|
2774
2774
|
} catch (e9) {
|
|
2775
|
-
throw new (0,
|
|
2775
|
+
throw new (0, _chunkW5TUVES3cjs.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.");
|
|
2776
2776
|
}
|
|
2777
2777
|
assertDecryptedDocInfo(docInfoData, readRecords);
|
|
2778
2778
|
}
|
|
@@ -2797,10 +2797,10 @@ function readHwp5SectionRecords(c, sections, warnings) {
|
|
|
2797
2797
|
try {
|
|
2798
2798
|
const data2 = !c.distribution && c.compressed ? decompressStream(Buffer.from(sections[si])) : Buffer.from(sections[si]);
|
|
2799
2799
|
totalDecompressed += data2.length;
|
|
2800
|
-
if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0,
|
|
2800
|
+
if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkW5TUVES3cjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
|
|
2801
2801
|
out.push(readRecords(data2));
|
|
2802
2802
|
} catch (secErr) {
|
|
2803
|
-
if (secErr instanceof
|
|
2803
|
+
if (secErr instanceof _chunkW5TUVES3cjs.KordocError) throw secErr;
|
|
2804
2804
|
out.push(null);
|
|
2805
2805
|
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" });
|
|
2806
2806
|
}
|
|
@@ -2820,7 +2820,7 @@ function parseHwp5Document(buffer, options) {
|
|
|
2820
2820
|
if (cfb) extractHwp5Metadata(cfb, metadata);
|
|
2821
2821
|
const docInfo = cfb && !encrypted ? parseDocInfoStream(cfb, compressed) : parseDocInfoFromStream(findStream("/DocInfo"), compressed);
|
|
2822
2822
|
const sections = readHwp5SectionStreams(c);
|
|
2823
|
-
if (sections.length === 0) throw new (0,
|
|
2823
|
+
if (sections.length === 0) throw new (0, _chunkW5TUVES3cjs.KordocError)("\uC139\uC158 \uC2A4\uD2B8\uB9BC\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
|
|
2824
2824
|
const sectionRecords = readHwp5SectionRecords(c, sections, warnings);
|
|
2825
2825
|
const sectionDetects = sectionRecords.map((r) => r ? detectHwp5SectionPages(r) : null);
|
|
2826
2826
|
const sectionTableIds = [];
|
|
@@ -2864,7 +2864,7 @@ function parseHwp5Document(buffer, options) {
|
|
|
2864
2864
|
parsedSections++;
|
|
2865
2865
|
_optionalChain([options, 'optionalAccess', _63 => _63.onProgress, 'optionalCall', _64 => _64(parsedSections, sections.length)]);
|
|
2866
2866
|
} catch (secErr) {
|
|
2867
|
-
if (secErr instanceof
|
|
2867
|
+
if (secErr instanceof _chunkW5TUVES3cjs.KordocError) throw secErr;
|
|
2868
2868
|
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" });
|
|
2869
2869
|
} finally {
|
|
2870
2870
|
pageBase += detect.pages;
|
|
@@ -2875,10 +2875,10 @@ function parseHwp5Document(buffer, options) {
|
|
|
2875
2875
|
}
|
|
2876
2876
|
const blocks = [...doc.headerBlocks, ...bodyBlocks, ...doc.footerBlocks];
|
|
2877
2877
|
const images = cfb ? extractHwp5Images(cfb.FileIndex, blocks, warnings, !pageFilter, encrypted ? findStream : void 0) : extractHwp5ImagesLenient(lenientCfb, blocks, warnings, !pageFilter, encrypted ? findStream : void 0);
|
|
2878
|
-
let flatBlocks =
|
|
2879
|
-
if (_optionalChain([options, 'optionalAccess', _65 => _65.layoutTables]) !== "keep") flatBlocks =
|
|
2878
|
+
let flatBlocks = _chunkIL7RLPEWcjs.flattenLayoutTables.call(void 0, blocks);
|
|
2879
|
+
if (_optionalChain([options, 'optionalAccess', _65 => _65.layoutTables]) !== "keep") flatBlocks = _chunkIL7RLPEWcjs.unframeLayoutTables.call(void 0, flatBlocks, !!_optionalChain([options, 'optionalAccess', _66 => _66.keepTrailingEmptyCols]));
|
|
2880
2880
|
if (_optionalChain([options, 'optionalAccess', _67 => _67.dedupeRunningHeaders])) {
|
|
2881
|
-
const deduped =
|
|
2881
|
+
const deduped = _chunkIL7RLPEWcjs.dedupeRunningHeaders.call(void 0, flatBlocks);
|
|
2882
2882
|
const removed = flatBlocks.length - deduped.length;
|
|
2883
2883
|
if (removed > 0) warnings.push({ message: `\uBC18\uBCF5 \uB7EC\uB2DD \uD5E4\uB354 ${removed}\uAC1C \uC81C\uAC70`, code: "HIDDEN_TEXT_FILTERED" });
|
|
2884
2884
|
flatBlocks = deduped;
|
|
@@ -2887,7 +2887,7 @@ function parseHwp5Document(buffer, options) {
|
|
|
2887
2887
|
detectHwp5Headings(flatBlocks, docInfo, doc.tocTexts);
|
|
2888
2888
|
}
|
|
2889
2889
|
const outline = flatBlocks.filter((b) => b.type === "heading" && b.level && b.text).map((b) => ({ level: b.level, text: b.text, pageNumber: b.pageNumber }));
|
|
2890
|
-
let markdown =
|
|
2890
|
+
let markdown = _chunkIL7RLPEWcjs.blocksToMarkdown.call(void 0, flatBlocks, { tableFormat: _optionalChain([options, 'optionalAccess', _68 => _68.tableFormat]) });
|
|
2891
2891
|
if (_optionalChain([options, 'optionalAccess', _69 => _69.inlineImages]) && options.images !== false && images.length > 0) {
|
|
2892
2892
|
try {
|
|
2893
2893
|
markdown = _chunkX7RBVVDCcjs.inlineImagesIntoMarkdown.call(void 0, markdown, images, { compress: true });
|
|
@@ -2955,9 +2955,9 @@ function detectHwp5Headings(blocks, docInfo, tocTexts) {
|
|
|
2955
2955
|
let level = 0;
|
|
2956
2956
|
if (_optionalChain([block, 'access', _76 => _76.style, 'optionalAccess', _77 => _77.fontSize]) && baseFontSize > 0) {
|
|
2957
2957
|
const ratio = block.style.fontSize / baseFontSize;
|
|
2958
|
-
if (ratio >=
|
|
2959
|
-
else if (ratio >=
|
|
2960
|
-
else if (ratio >=
|
|
2958
|
+
if (ratio >= _chunkIL7RLPEWcjs.HEADING_RATIO_H1) level = 1;
|
|
2959
|
+
else if (ratio >= _chunkIL7RLPEWcjs.HEADING_RATIO_H2) level = 2;
|
|
2960
|
+
else if (ratio >= _chunkIL7RLPEWcjs.HEADING_RATIO_H3) level = 3;
|
|
2961
2961
|
}
|
|
2962
2962
|
if (/^제\d+[장절편]\s/.test(text) && text.length <= 50) {
|
|
2963
2963
|
if (level === 0) level = 2;
|
|
@@ -3090,7 +3090,7 @@ function findSectionsLenient(lcfb) {
|
|
|
3090
3090
|
const raw = _nullishCoalesce(lcfb.findStream(`/BodyText/Section${i}`), () => ( lcfb.findStream(`Section${i}`)));
|
|
3091
3091
|
if (!raw) break;
|
|
3092
3092
|
totalBytes += raw.length;
|
|
3093
|
-
if (totalBytes > MAX_TOTAL_DECOMPRESS) throw new (0,
|
|
3093
|
+
if (totalBytes > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkW5TUVES3cjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
|
|
3094
3094
|
sections.push({ idx: i, content: raw });
|
|
3095
3095
|
}
|
|
3096
3096
|
if (sections.length === 0) {
|
|
@@ -3101,7 +3101,7 @@ function findSectionsLenient(lcfb) {
|
|
|
3101
3101
|
const raw = lcfb.findStream(e.name);
|
|
3102
3102
|
if (raw) {
|
|
3103
3103
|
totalBytes += raw.length;
|
|
3104
|
-
if (totalBytes > MAX_TOTAL_DECOMPRESS) throw new (0,
|
|
3104
|
+
if (totalBytes > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkW5TUVES3cjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
|
|
3105
3105
|
sections.push({ idx, content: raw });
|
|
3106
3106
|
}
|
|
3107
3107
|
}
|
|
@@ -3118,7 +3118,7 @@ function findViewTextSectionsLenient(lcfb, compressed) {
|
|
|
3118
3118
|
try {
|
|
3119
3119
|
const content = decryptViewText(raw, compressed);
|
|
3120
3120
|
totalDecompressed += content.length;
|
|
3121
|
-
if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0,
|
|
3121
|
+
if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkW5TUVES3cjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
|
|
3122
3122
|
sections.push({ idx: i, content });
|
|
3123
3123
|
} catch (e16) {
|
|
3124
3124
|
break;
|
|
@@ -4322,7 +4322,7 @@ function otherControlXml(id, node, ctx) {
|
|
|
4322
4322
|
["charSz", size],
|
|
4323
4323
|
["composeType", expansion ? "OVERLAP" : "SPREAD"],
|
|
4324
4324
|
["charPrCnt", ids.length],
|
|
4325
|
-
["composeText", circle ?
|
|
4325
|
+
["composeText", circle ? _chunkIL7RLPEWcjs.composeDigits.call(void 0, text) : text]
|
|
4326
4326
|
],
|
|
4327
4327
|
ids.map((i) => el("hp:charPr", [["prIDRef", i]])).join("")
|
|
4328
4328
|
) };
|
|
@@ -5135,7 +5135,7 @@ var V13_DEFAULT_SCRIPT = "function OnDocument_New()\r\n{\r\n //todo : \r\n}\r\n\
|
|
|
5135
5135
|
async function hwpToHwpx(input, options) {
|
|
5136
5136
|
const buffer = Buffer.from(input instanceof ArrayBuffer ? new Uint8Array(input) : input);
|
|
5137
5137
|
const c = openHwp5Container(buffer, options);
|
|
5138
|
-
if (c.distribution) throw new (0,
|
|
5138
|
+
if (c.distribution) throw new (0, _chunkW5TUVES3cjs.KordocError)("\uBC30\uD3EC\uC6A9(\uC77D\uAE30 \uC804\uC6A9) HWP \uBB38\uC11C\uB294 HWPX \uB85C \uBCC0\uD658\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uC791\uC131\uC790\uAC00 \uBCF5\uC0AC\xB7\uD3B8\uC9D1\uC744 \uB9C9\uC740 \uBB38\uC11C\uC785\uB2C8\uB2E4");
|
|
5139
5139
|
const docInfo = _nullishCoalesce(readHwp5DocInfoRecords(c), () => ( []));
|
|
5140
5140
|
const sections = readHwp5SectionRecords(c, readHwp5SectionStreams(c), c.warnings);
|
|
5141
5141
|
const bins = readHwp5BinData(c);
|
|
@@ -5190,7 +5190,7 @@ async function hwpToHwpx(input, options) {
|
|
|
5190
5190
|
["os", 1],
|
|
5191
5191
|
["xmlVersion", "1.5"],
|
|
5192
5192
|
["application", "kordoc"],
|
|
5193
|
-
["appVersion",
|
|
5193
|
+
["appVersion", _chunkW5TUVES3cjs.VERSION]
|
|
5194
5194
|
]),
|
|
5195
5195
|
{ compression: "STORE" }
|
|
5196
5196
|
);
|
|
@@ -5271,11 +5271,11 @@ async function convertToHwpx(input, options) {
|
|
|
5271
5271
|
const format = detectFormat(ab);
|
|
5272
5272
|
if (format === "hwp") return { data: await hwpToHwpx(bytes, options), mode: "preserve", warnings: [] };
|
|
5273
5273
|
if (format === "hwpx") return { data: bytes, mode: "preserve", warnings: ["\uC774\uBBF8 HWPX \uBB38\uC11C\uC785\uB2C8\uB2E4 \u2014 \uADF8\uB300\uB85C \uB461\uB2C8\uB2E4"] };
|
|
5274
|
-
if (format !== "hwp3" && format !== "hwpml") throw new (0,
|
|
5274
|
+
if (format !== "hwp3" && format !== "hwpml") throw new (0, _chunkW5TUVES3cjs.KordocError)(`HWP \uBB38\uC11C\uAC00 \uC544\uB2D9\uB2C8\uB2E4 (${format})`);
|
|
5275
5275
|
const { parse } = await Promise.resolve().then(() => _interopRequireWildcard(require("./index.cjs")));
|
|
5276
|
-
const { markdownToHwpx } = await Promise.resolve().then(() => _interopRequireWildcard(require("./generator-
|
|
5276
|
+
const { markdownToHwpx } = await Promise.resolve().then(() => _interopRequireWildcard(require("./generator-7QULUIZN.cjs")));
|
|
5277
5277
|
const parsed = await parse(ab, { password: _optionalChain([options, 'optionalAccess', _157 => _157.password]) });
|
|
5278
|
-
if (!parsed.success) throw new (0,
|
|
5278
|
+
if (!parsed.success) throw new (0, _chunkW5TUVES3cjs.KordocError)(_nullishCoalesce(parsed.error, () => ( "\uBB38\uC11C\uB97C \uC77D\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4")));
|
|
5279
5279
|
return {
|
|
5280
5280
|
data: new Uint8Array(await markdownToHwpx(parsed.markdown)),
|
|
5281
5281
|
mode: "content",
|
|
@@ -5335,4 +5335,4 @@ async function convertToHwpx(input, options) {
|
|
|
5335
5335
|
|
|
5336
5336
|
|
|
5337
5337
|
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;
|
|
5338
|
-
//# sourceMappingURL=chunk-
|
|
5338
|
+
//# sourceMappingURL=chunk-4ZTFAQQ5.cjs.map
|