kordoc 4.22.6 → 4.22.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/README.md +5 -4
  2. package/dist/{-BNRFT3K4.js → -O7EP5UQ2.js} +11 -11
  3. package/dist/{chunk-HE5VV2CM.js → chunk-5S4UCIGP.js} +2 -2
  4. package/dist/{chunk-E5KDXBB5.js → chunk-5VCZDP2K.js} +2 -2
  5. package/dist/{chunk-JCF5DM7D.js → chunk-6U2O5LAV.js} +3 -3
  6. package/dist/{chunk-Q3MCNMTJ.js → chunk-BFAYABLC.js} +10 -3
  7. package/dist/chunk-BFAYABLC.js.map +1 -0
  8. package/dist/{chunk-2PCMUSEB.js → chunk-BHSATDA7.js} +2 -2
  9. package/dist/{chunk-V6MEUROO.js → chunk-BIF35Q4D.js} +11 -11
  10. package/dist/{chunk-OWQSWIMU.js → chunk-CEOOL37E.js} +4 -4
  11. package/dist/{chunk-IXCLL2U3.cjs → chunk-CIDWITQN.cjs} +24 -24
  12. package/dist/{chunk-IXCLL2U3.cjs.map → chunk-CIDWITQN.cjs.map} +1 -1
  13. package/dist/{chunk-6CHPX72J.js → chunk-CRMEBMMW.js} +4 -4
  14. package/dist/{chunk-7IUHIM2F.js → chunk-CVKSBUIO.js} +4 -3
  15. package/dist/chunk-CVKSBUIO.js.map +1 -0
  16. package/dist/{chunk-XMBILEZY.js → chunk-D4YBFNWK.js} +12 -10
  17. package/dist/chunk-D4YBFNWK.js.map +1 -0
  18. package/dist/{chunk-A6TLFPDO.js → chunk-DFBGN2TG.js} +2 -2
  19. package/dist/{chunk-6HSRXDZ7.js → chunk-DLAPQKGK.js} +4 -4
  20. package/dist/{chunk-NOGYQ7QQ.js → chunk-DXJRDFCT.js} +2 -2
  21. package/dist/{chunk-2XRJECQJ.cjs → chunk-F537QK7M.cjs} +3 -3
  22. package/dist/{chunk-2XRJECQJ.cjs.map → chunk-F537QK7M.cjs.map} +1 -1
  23. package/dist/{chunk-U6SSH2TG.cjs → chunk-FJ45NNLA.cjs} +2 -2
  24. package/dist/{chunk-U6SSH2TG.cjs.map → chunk-FJ45NNLA.cjs.map} +1 -1
  25. package/dist/{chunk-FK3UNG3M.js → chunk-OTCH63U3.js} +2 -2
  26. package/dist/{chunk-UFQ2DEYM.js → chunk-PILIRK7O.js} +3 -3
  27. package/dist/{chunk-2VH7CAVX.js → chunk-QYFBXJGK.js} +2 -2
  28. package/dist/{chunk-3DF57KEK.cjs → chunk-R3T4RTQL.cjs} +23 -23
  29. package/dist/{chunk-3DF57KEK.cjs.map → chunk-R3T4RTQL.cjs.map} +1 -1
  30. package/dist/{chunk-2VTIZIMO.js → chunk-RHHRVPLL.js} +2 -2
  31. package/dist/{chunk-37BDHFGX.cjs → chunk-S34OVRKD.cjs} +14 -7
  32. package/dist/chunk-S34OVRKD.cjs.map +1 -0
  33. package/dist/{chunk-JYUYW34P.cjs → chunk-TN4SSNES.cjs} +3 -3
  34. package/dist/{chunk-JYUYW34P.cjs.map → chunk-TN4SSNES.cjs.map} +1 -1
  35. package/dist/{chunk-JTBKTYUJ.js → chunk-V2SJJHJH.js} +10 -3
  36. package/dist/chunk-V2SJJHJH.js.map +1 -0
  37. package/dist/{chunk-PLFDJC3I.js → chunk-VYH2ATWU.js} +2 -2
  38. package/dist/{chunk-RG5PQS5J.js → chunk-WBR62IXV.js} +3 -3
  39. package/dist/{chunk-ZG4JVJYJ.js → chunk-YVRARYLN.js} +2 -2
  40. package/dist/{chunk-MYOUWFZQ.js → chunk-ZNSWN4JM.js} +2 -2
  41. package/dist/{chunk-QSVBBIOO.js → chunk-ZW3RY4YT.js} +2 -2
  42. package/dist/chunks-MPPNEL5A.js +10 -0
  43. package/dist/cli.js +30 -30
  44. package/dist/{formula-UZ52GCLC.cjs → formula-3M6U2J7S.cjs} +9 -9
  45. package/dist/{formula-UZ52GCLC.cjs.map → formula-3M6U2J7S.cjs.map} +1 -1
  46. package/dist/{formula-VSCB3MH4.js → formula-EQ2KQA5T.js} +4 -4
  47. package/dist/{formula-VKQA2725.js → formula-RH55FUJF.js} +3 -3
  48. package/dist/{image-ocr-PN3NFOXH.cjs → image-ocr-DP4YTLGN.cjs} +17 -17
  49. package/dist/{image-ocr-PN3NFOXH.cjs.map → image-ocr-DP4YTLGN.cjs.map} +1 -1
  50. package/dist/{image-ocr-VGCU4HVH.js → image-ocr-KIKAO43E.js} +9 -9
  51. package/dist/{image-ocr-P5RHC2L3.js → image-ocr-LO2GZKA5.js} +6 -6
  52. package/dist/index.cjs +468 -465
  53. package/dist/index.cjs.map +1 -1
  54. package/dist/index.js +14 -11
  55. package/dist/index.js.map +1 -1
  56. package/dist/mcp.js +22 -22
  57. package/dist/{model-bundle-WBD4F7F2.js → model-bundle-EAQ6LWS5.js} +5 -5
  58. package/dist/{models-K26273R4.js → models-ZN6JAI4Q.js} +5 -5
  59. package/dist/{parse-worker-v2-2VCHGYDP.js → parse-worker-v2-UKFFINUH.js} +12 -12
  60. package/dist/{parser-KQNPM3WX.cjs → parser-CGKXEB3U.cjs} +157 -157
  61. package/dist/{parser-KQNPM3WX.cjs.map → parser-CGKXEB3U.cjs.map} +1 -1
  62. package/dist/{parser-PNJE3RFH.js → parser-DFV3VDWX.js} +12 -12
  63. package/dist/{parser-EIPIIGFQ.js → parser-TJFS44BI.js} +9 -9
  64. package/dist/{pdf-ocr-TCNOGBIK.js → pdf-ocr-CATVQJ2I.js} +6 -6
  65. package/dist/{pdf-ocr-FMNWCHQ4.js → pdf-ocr-EQXJAKHB.js} +9 -9
  66. package/dist/pdf-ocr-U5MFMNCW.cjs +31 -0
  67. package/dist/{pdf-ocr-AVP5KTGK.cjs.map → pdf-ocr-U5MFMNCW.cjs.map} +1 -1
  68. package/dist/{profile-io-W325GOXE.js → profile-io-5IG6SSMK.js} +3 -3
  69. package/dist/{rasterize-6XYWTABU.js → rasterize-W4TJFQBT.js} +3 -3
  70. package/dist/{redact-doc-KX7TI5ON.js → redact-doc-LZ3PY2LX.js} +11 -11
  71. package/dist/{render-AG5VVKE3.js → render-N2QA335I.js} +7 -7
  72. package/dist/seal-FYJZMW4G.js +10 -0
  73. package/dist/{setup-XTBRWZ7D.js → setup-5Y2UAWZG.js} +3 -3
  74. package/dist/visual-VQGE67RU.js +21 -0
  75. package/dist/{watch-ZLJIZ6XU.js → watch-2MLCRQZQ.js} +12 -12
  76. package/package.json +1 -1
  77. package/dist/chunk-37BDHFGX.cjs.map +0 -1
  78. package/dist/chunk-7IUHIM2F.js.map +0 -1
  79. package/dist/chunk-JTBKTYUJ.js.map +0 -1
  80. package/dist/chunk-Q3MCNMTJ.js.map +0 -1
  81. package/dist/chunk-XMBILEZY.js.map +0 -1
  82. package/dist/chunks-5BRSLKC7.js +0 -10
  83. package/dist/pdf-ocr-AVP5KTGK.cjs +0 -31
  84. package/dist/seal-ESKG2KMT.js +0 -10
  85. package/dist/visual-QTIPKQVD.js +0 -21
  86. /package/dist/{-BNRFT3K4.js.map → -O7EP5UQ2.js.map} +0 -0
  87. /package/dist/{chunk-HE5VV2CM.js.map → chunk-5S4UCIGP.js.map} +0 -0
  88. /package/dist/{chunk-E5KDXBB5.js.map → chunk-5VCZDP2K.js.map} +0 -0
  89. /package/dist/{chunk-JCF5DM7D.js.map → chunk-6U2O5LAV.js.map} +0 -0
  90. /package/dist/{chunk-2PCMUSEB.js.map → chunk-BHSATDA7.js.map} +0 -0
  91. /package/dist/{chunk-V6MEUROO.js.map → chunk-BIF35Q4D.js.map} +0 -0
  92. /package/dist/{chunk-OWQSWIMU.js.map → chunk-CEOOL37E.js.map} +0 -0
  93. /package/dist/{chunk-6CHPX72J.js.map → chunk-CRMEBMMW.js.map} +0 -0
  94. /package/dist/{chunk-A6TLFPDO.js.map → chunk-DFBGN2TG.js.map} +0 -0
  95. /package/dist/{chunk-6HSRXDZ7.js.map → chunk-DLAPQKGK.js.map} +0 -0
  96. /package/dist/{chunk-NOGYQ7QQ.js.map → chunk-DXJRDFCT.js.map} +0 -0
  97. /package/dist/{chunk-FK3UNG3M.js.map → chunk-OTCH63U3.js.map} +0 -0
  98. /package/dist/{chunk-UFQ2DEYM.js.map → chunk-PILIRK7O.js.map} +0 -0
  99. /package/dist/{chunk-2VH7CAVX.js.map → chunk-QYFBXJGK.js.map} +0 -0
  100. /package/dist/{chunk-2VTIZIMO.js.map → chunk-RHHRVPLL.js.map} +0 -0
  101. /package/dist/{chunk-PLFDJC3I.js.map → chunk-VYH2ATWU.js.map} +0 -0
  102. /package/dist/{chunk-RG5PQS5J.js.map → chunk-WBR62IXV.js.map} +0 -0
  103. /package/dist/{chunk-ZG4JVJYJ.js.map → chunk-YVRARYLN.js.map} +0 -0
  104. /package/dist/{chunk-MYOUWFZQ.js.map → chunk-ZNSWN4JM.js.map} +0 -0
  105. /package/dist/{chunk-QSVBBIOO.js.map → chunk-ZW3RY4YT.js.map} +0 -0
  106. /package/dist/{chunks-5BRSLKC7.js.map → chunks-MPPNEL5A.js.map} +0 -0
  107. /package/dist/{formula-VSCB3MH4.js.map → formula-EQ2KQA5T.js.map} +0 -0
  108. /package/dist/{formula-VKQA2725.js.map → formula-RH55FUJF.js.map} +0 -0
  109. /package/dist/{image-ocr-VGCU4HVH.js.map → image-ocr-KIKAO43E.js.map} +0 -0
  110. /package/dist/{image-ocr-P5RHC2L3.js.map → image-ocr-LO2GZKA5.js.map} +0 -0
  111. /package/dist/{model-bundle-WBD4F7F2.js.map → model-bundle-EAQ6LWS5.js.map} +0 -0
  112. /package/dist/{models-K26273R4.js.map → models-ZN6JAI4Q.js.map} +0 -0
  113. /package/dist/{parse-worker-v2-2VCHGYDP.js.map → parse-worker-v2-UKFFINUH.js.map} +0 -0
  114. /package/dist/{parser-PNJE3RFH.js.map → parser-DFV3VDWX.js.map} +0 -0
  115. /package/dist/{parser-EIPIIGFQ.js.map → parser-TJFS44BI.js.map} +0 -0
  116. /package/dist/{pdf-ocr-FMNWCHQ4.js.map → pdf-ocr-CATVQJ2I.js.map} +0 -0
  117. /package/dist/{pdf-ocr-TCNOGBIK.js.map → pdf-ocr-EQXJAKHB.js.map} +0 -0
  118. /package/dist/{profile-io-W325GOXE.js.map → profile-io-5IG6SSMK.js.map} +0 -0
  119. /package/dist/{rasterize-6XYWTABU.js.map → rasterize-W4TJFQBT.js.map} +0 -0
  120. /package/dist/{redact-doc-KX7TI5ON.js.map → redact-doc-LZ3PY2LX.js.map} +0 -0
  121. /package/dist/{render-AG5VVKE3.js.map → render-N2QA335I.js.map} +0 -0
  122. /package/dist/{seal-ESKG2KMT.js.map → seal-FYJZMW4G.js.map} +0 -0
  123. /package/dist/{setup-XTBRWZ7D.js.map → setup-5Y2UAWZG.js.map} +0 -0
  124. /package/dist/{visual-QTIPKQVD.js.map → visual-VQGE67RU.js.map} +0 -0
  125. /package/dist/{watch-ZLJIZ6XU.js.map → watch-2MLCRQZQ.js.map} +0 -0
package/dist/index.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkJYUYW34Pcjs = require('./chunk-JYUYW34P.cjs');
5
+ var _chunkTN4SSNEScjs = require('./chunk-TN4SSNES.cjs');
6
6
 
7
7
 
8
8
  var _chunkJ55UQC5Hcjs = require('./chunk-J55UQC5H.cjs');
@@ -43,7 +43,7 @@ var _chunkJ55UQC5Hcjs = require('./chunk-J55UQC5H.cjs');
43
43
 
44
44
 
45
45
 
46
- var _chunk37BDHFGXcjs = require('./chunk-37BDHFGX.cjs');
46
+ var _chunkS34OVRKDcjs = require('./chunk-S34OVRKD.cjs');
47
47
 
48
48
 
49
49
 
@@ -61,14 +61,14 @@ var _chunk37BDHFGXcjs = require('./chunk-37BDHFGX.cjs');
61
61
 
62
62
 
63
63
 
64
- var _chunkU6SSH2TGcjs = require('./chunk-U6SSH2TG.cjs');
64
+ var _chunkFJ45NNLAcjs = require('./chunk-FJ45NNLA.cjs');
65
65
 
66
66
 
67
67
  var _chunkGS7T56RPcjs = require('./chunk-GS7T56RP.cjs');
68
68
 
69
69
  // src/plain-markdown.ts
70
70
  function toPlainMarkdown(md2) {
71
- return _chunk37BDHFGXcjs.plainScripts.call(void 0, md2).replace(/!\[[^\]\n]*\]\([^)\n]*\)/g, "").replace(/<img\b[^>]*>/gi, "").replace(/(?<!!)\[([^\]\n]*)\]\((?:https?|mailto|ftp):[^)\s]*\)/g, "$1").replace(/(?<!\\)<\/?u>/g, "").replace(/(?<!\\)\*\*(?=\S)([^\n]*?\S)(?<!\\)\*\*/g, "$1").replace(/(<br>)+(?=<\/t[dh]>)/g, "").replace(/[ \t]+$/gm, "").replace(/\n{3,}/g, "\n\n").trim();
71
+ return _chunkS34OVRKDcjs.plainScripts.call(void 0, md2).replace(/!\[[^\]\n]*\]\([^)\n]*\)/g, "").replace(/<img\b[^>]*>/gi, "").replace(/(?<!!)\[([^\]\n]*)\]\((?:https?|mailto|ftp):[^)\s]*\)/g, "$1").replace(/(?<!\\)<\/?u>/g, "").replace(/(?<!\\)\*\*(?=\S)([^\n]*?\S)(?<!\\)\*\*/g, "$1").replace(/(<br>)+(?=<\/t[dh]>)/g, "").replace(/[ \t]+$/gm, "").replace(/\n{3,}/g, "\n\n").trim();
72
72
  }
73
73
 
74
74
  // src/html-tables.ts
@@ -602,9 +602,9 @@ function rawTextContent(node, depth = 0) {
602
602
  }
603
603
 
604
604
  // src/hwpx/parser-shared.ts
605
- var MAX_DECOMPRESS_SIZE = _chunkU6SSH2TGcjs.unzipLimitBytes.call(void 0, 256 * 1024 * 1024);
605
+ var MAX_DECOMPRESS_SIZE = _chunkFJ45NNLAcjs.unzipLimitBytes.call(void 0, 256 * 1024 * 1024);
606
606
  var MAX_ZIP_ENTRIES = 500;
607
- var ZipBombError = class extends _chunkU6SSH2TGcjs.KordocError {
607
+ var ZipBombError = class extends _chunkFJ45NNLAcjs.KordocError {
608
608
  constructor(message) {
609
609
  super(message);
610
610
  this.name = "ZipBombError";
@@ -654,7 +654,7 @@ function createSectionShared() {
654
654
  function createXmlParser(warnings) {
655
655
  return new (0, _xmldom.DOMParser)({
656
656
  onError(level, msg2) {
657
- if (level === "fatalError") throw new (0, _chunkU6SSH2TGcjs.KordocError)(`XML \uD30C\uC2F1 \uC2E4\uD328: ${msg2}`);
657
+ if (level === "fatalError") throw new (0, _chunkFJ45NNLAcjs.KordocError)(`XML \uD30C\uC2F1 \uC2E4\uD328: ${msg2}`);
658
658
  _optionalChain([warnings, 'optionalAccess', _5 => _5.push, 'call', _6 => _6({ code: "MALFORMED_XML", message: `XML ${level === "warning" ? "\uACBD\uACE0" : "\uC624\uB958"}: ${msg2}` })]);
659
659
  }
660
660
  });
@@ -689,13 +689,13 @@ function parseEncryptionManifest(manifestXml) {
689
689
  const startKey = attrOf(inner, "start-key-generation-name");
690
690
  const checksumType = attrOf(inner, "checksum-type");
691
691
  if (algorithm !== AES256_CBC) {
692
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(`\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 HWPX \uC554\uD638\uD654 \uBC29\uC2DD\uC785\uB2C8\uB2E4: ${_nullishCoalesce(algorithm, () => ( "(\uBBF8\uC0C1)"))}`);
692
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(`\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 HWPX \uC554\uD638\uD654 \uBC29\uC2DD\uC785\uB2C8\uB2E4: ${_nullishCoalesce(algorithm, () => ( "(\uBBF8\uC0C1)"))}`);
693
693
  }
694
694
  if (startKey !== START_KEY_SHA256) {
695
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(`\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 HWPX \uC2DC\uC791\uD0A4 \uC0DD\uC131 \uBC29\uC2DD\uC785\uB2C8\uB2E4: ${_nullishCoalesce(startKey, () => ( "(\uBBF8\uC0C1)"))}`);
695
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(`\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 HWPX \uC2DC\uC791\uD0A4 \uC0DD\uC131 \uBC29\uC2DD\uC785\uB2C8\uB2E4: ${_nullishCoalesce(startKey, () => ( "(\uBBF8\uC0C1)"))}`);
696
696
  }
697
697
  if (!_optionalChain([checksumType, 'optionalAccess', _10 => _10.endsWith, 'call', _11 => _11(CHECKSUM_SHA256_1K)])) {
698
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(`\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 HWPX \uCCB4\uD06C\uC12C \uBC29\uC2DD\uC785\uB2C8\uB2E4: ${_nullishCoalesce(checksumType, () => ( "(\uBBF8\uC0C1)"))}`);
698
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(`\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 HWPX \uCCB4\uD06C\uC12C \uBC29\uC2DD\uC785\uB2C8\uB2E4: ${_nullishCoalesce(checksumType, () => ( "(\uBBF8\uC0C1)"))}`);
699
699
  }
700
700
  const iterations = parseInt(_nullishCoalesce(attrOf(inner, "iteration-count"), () => ( "")), 10);
701
701
  const keySize = parseInt(_nullishCoalesce(attrOf(inner, "key-size"), () => ( "")), 10);
@@ -703,10 +703,10 @@ function parseEncryptionManifest(manifestXml) {
703
703
  const salt = Buffer.from(_nullishCoalesce(attrOf(inner, "salt"), () => ( "")), "base64");
704
704
  const checksum = Buffer.from(_nullishCoalesce(attrOf(inner, "checksum"), () => ( "")), "base64");
705
705
  if (!(iterations > 0 && iterations <= MAX_ITERATION_COUNT)) {
706
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(`HWPX \uC554\uD638\uD654 \uBC18\uBCF5 \uD69F\uC218\uAC00 \uD5C8\uC6A9 \uBC94\uC704\uB97C \uBC97\uC5B4\uB0AC\uC2B5\uB2C8\uB2E4: ${iterations}`);
706
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(`HWPX \uC554\uD638\uD654 \uBC18\uBCF5 \uD69F\uC218\uAC00 \uD5C8\uC6A9 \uBC94\uC704\uB97C \uBC97\uC5B4\uB0AC\uC2B5\uB2C8\uB2E4: ${iterations}`);
707
707
  }
708
708
  if (keySize !== 32 || iv.length !== 16 || salt.length === 0 || checksum.length !== 32) {
709
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(`HWPX \uC554\uD638\uD654 \uD30C\uB77C\uBBF8\uD130\uAC00 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 (${path})`);
709
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(`HWPX \uC554\uD638\uD654 \uD30C\uB77C\uBBF8\uD130\uAC00 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 (${path})`);
710
710
  }
711
711
  entries.push({ path, checksum, iv, salt, iterations, keySize });
712
712
  }
@@ -740,12 +740,12 @@ async function decryptHwpxInPlace(zip, manifestXml, password) {
740
740
  for (const entry of entries) {
741
741
  const file = zip.file(entry.path);
742
742
  if (!file) {
743
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(`\uC554\uD638 \uBAA9\uB85D\uC5D0 \uC788\uB294 \uD30C\uC77C\uC774 \uBB38\uC11C\uC5D0 \uC5C6\uC2B5\uB2C8\uB2E4: ${entry.path}`);
743
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(`\uC554\uD638 \uBAA9\uB85D\uC5D0 \uC788\uB294 \uD30C\uC77C\uC774 \uBB38\uC11C\uC5D0 \uC5C6\uC2B5\uB2C8\uB2E4: ${entry.path}`);
744
744
  }
745
745
  const raw = await readZipEntry(file, "uint8array", used);
746
746
  const plain4 = decryptEntry(Buffer.from(raw.buffer, raw.byteOffset, raw.length), entry, startKey);
747
747
  if (!plain4) {
748
- throw new (0, _chunkU6SSH2TGcjs.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.");
748
+ throw new (0, _chunkFJ45NNLAcjs.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.");
749
749
  }
750
750
  used += plain4.length;
751
751
  if (used > MAX_DECOMPRESS_SIZE) throw new ZipBombError("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
@@ -811,10 +811,10 @@ async function extractHwpxStyles(zip, decompressed) {
811
811
  const xml = await readZipEntry(file, "text", _optionalChain([decompressed, 'optionalAccess', _12 => _12.total]));
812
812
  if (decompressed) {
813
813
  decompressed.total += xml.length * 2;
814
- if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkU6SSH2TGcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
814
+ if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkFJ45NNLAcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
815
815
  }
816
816
  const parser = createXmlParser();
817
- const doc = parser.parseFromString(_chunkU6SSH2TGcjs.stripDtd.call(void 0, xml), "text/xml");
817
+ const doc = parser.parseFromString(_chunkFJ45NNLAcjs.stripDtd.call(void 0, xml), "text/xml");
818
818
  if (!doc.documentElement) continue;
819
819
  const domDoc = doc;
820
820
  parseCharProperties(domDoc, result.charProperties);
@@ -1027,9 +1027,9 @@ function detectHwpxHeadings(blocks, styleMap, tocTexts) {
1027
1027
  let level = 0;
1028
1028
  if (baseFontSize > 0 && _optionalChain([block, 'access', _21 => _21.style, 'optionalAccess', _22 => _22.fontSize])) {
1029
1029
  const ratio = block.style.fontSize / baseFontSize;
1030
- if (ratio >= _chunk37BDHFGXcjs.HEADING_RATIO_H1) level = 1;
1031
- else if (ratio >= _chunk37BDHFGXcjs.HEADING_RATIO_H2) level = 2;
1032
- else if (ratio >= _chunk37BDHFGXcjs.HEADING_RATIO_H3) level = 3;
1030
+ if (ratio >= _chunkS34OVRKDcjs.HEADING_RATIO_H1) level = 1;
1031
+ else if (ratio >= _chunkS34OVRKDcjs.HEADING_RATIO_H2) level = 2;
1032
+ else if (ratio >= _chunkS34OVRKDcjs.HEADING_RATIO_H3) level = 3;
1033
1033
  }
1034
1034
  const compactText = text.replace(/\s+/g, "");
1035
1035
  if (/^제\d+[조장절편]/.test(compactText) && text.length <= 50) {
@@ -1643,11 +1643,11 @@ function formatHeadNumber(n, numFormat) {
1643
1643
  // 서수 시퀀스는 생성기(gongmun.ts)와 단일 소스 (v4.0.5) — 종전 mod-14 순환은
1644
1644
  // 15번째 형제를 다시 '가'로 만들어 한글 실렌더(가→하→거→너 단모음 연속)와 어긋났다
1645
1645
  case "CIRCLED_DIGIT":
1646
- return n <= 50 ? _chunk37BDHFGXcjs.circledNumber.call(void 0, n - 1) : `(${n})`;
1646
+ return n <= 50 ? _chunkS34OVRKDcjs.circledNumber.call(void 0, n - 1) : `(${n})`;
1647
1647
  case "HANGUL_SYLLABLE":
1648
- return _chunk37BDHFGXcjs.hangulOrdinal.call(void 0, n - 1);
1648
+ return _chunkS34OVRKDcjs.hangulOrdinal.call(void 0, n - 1);
1649
1649
  case "CIRCLED_HANGUL_SYLLABLE":
1650
- return n <= 14 ? _chunk37BDHFGXcjs.circledHangul.call(void 0, n - 1) : _chunk37BDHFGXcjs.hangulOrdinal.call(void 0, n - 1);
1650
+ return n <= 14 ? _chunkS34OVRKDcjs.circledHangul.call(void 0, n - 1) : _chunkS34OVRKDcjs.hangulOrdinal.call(void 0, n - 1);
1651
1651
  case "HANGUL_JAMO":
1652
1652
  return HANGUL_JAMO_SEQ[(n - 1) % HANGUL_JAMO_SEQ.length];
1653
1653
  case "CIRCLED_HANGUL_JAMO":
@@ -1661,9 +1661,9 @@ function formatHeadNumber(n, numFormat) {
1661
1661
  case "CIRCLED_LATIN_SMALL":
1662
1662
  return n <= 26 ? String.fromCodePoint(9424 + n - 1) : String.fromCharCode(97 + (n - 1) % 26);
1663
1663
  case "ROMAN_CAPITAL":
1664
- return _chunk37BDHFGXcjs.romanNumeral.call(void 0, n, true);
1664
+ return _chunkS34OVRKDcjs.romanNumeral.call(void 0, n, true);
1665
1665
  case "ROMAN_SMALL":
1666
- return _chunk37BDHFGXcjs.romanNumeral.call(void 0, n, false);
1666
+ return _chunkS34OVRKDcjs.romanNumeral.call(void 0, n, false);
1667
1667
  default:
1668
1668
  return String(n);
1669
1669
  }
@@ -1711,7 +1711,7 @@ function resolveParaHeading(paraEl, ctx) {
1711
1711
 
1712
1712
  // src/hwpx/table-build.ts
1713
1713
  function buildTableWithCellMeta(state, keepAnchoredEmptyCols, keepEmptyParagraphs) {
1714
- const table2 = _chunk37BDHFGXcjs.buildTable.call(void 0, state.rows, { keepAnchoredEmptyCols, keepEmptyParagraphs });
1714
+ const table2 = _chunkS34OVRKDcjs.buildTable.call(void 0, state.rows, { keepAnchoredEmptyCols, keepEmptyParagraphs });
1715
1715
  if (state.caption) table2.caption = state.caption;
1716
1716
  if (state.sourceId) table2.sourceId = state.sourceId;
1717
1717
  if (_optionalChain([state, 'access', _32 => _32.captionBlocks, 'optionalAccess', _33 => _33.length])) table2.captionBlocks = state.captionBlocks;
@@ -1740,7 +1740,7 @@ function buildTableWithCellMeta(state, keepAnchoredEmptyCols, keepEmptyParagraph
1740
1740
  for (const src of row) {
1741
1741
  if (!src.edges || src.rowAddr === void 0 || src.colAddr === void 0) continue;
1742
1742
  const cand = _optionalChain([table2, 'access', _37 => _37.cells, 'access', _38 => _38[src.rowAddr], 'optionalAccess', _39 => _39[src.colAddr]]);
1743
- if (cand && anchors2.includes(cand)) _chunk37BDHFGXcjs.CELL_EDGES.set(cand, src.edges);
1743
+ if (cand && anchors2.includes(cand)) _chunkS34OVRKDcjs.CELL_EDGES.set(cand, src.edges);
1744
1744
  }
1745
1745
  }
1746
1746
  const claimed = /* @__PURE__ */ new Set();
@@ -1790,7 +1790,7 @@ function completeTable(newTable, tableStack, blocks, ctx) {
1790
1790
  const cell2 = parentTable.cell;
1791
1791
  (cell2.blocks ??= []).push(block);
1792
1792
  cell2.hasStructure = true;
1793
- let flat = _chunk37BDHFGXcjs.convertTableToText.call(void 0, newTable.rows);
1793
+ let flat = _chunkS34OVRKDcjs.convertTableToText.call(void 0, newTable.rows);
1794
1794
  if (newTable.caption) flat = newTable.caption + (flat ? "\n" + flat : "");
1795
1795
  if (flat) {
1796
1796
  const inlineJoin = newTable.inline === true && cell2.lineOpen === true;
@@ -2024,7 +2024,7 @@ function extractRunSpans(para2, ctx, mode, requireMixed) {
2024
2024
  const tkids = rc.childNodes;
2025
2025
  for (let k = 0; k < (_nullishCoalesce(_optionalChain([tkids, 'optionalAccess', _47 => _47.length]), () => ( 0))); k++) {
2026
2026
  const tk = tkids[k];
2027
- if (tk.nodeType === 3 || tk.nodeType === 4) text += _chunk37BDHFGXcjs.escapeLiteralTags.call(void 0, _chunk37BDHFGXcjs.escapeLiteralDollar.call(void 0, tk.textContent || ""));
2027
+ if (tk.nodeType === 3 || tk.nodeType === 4) text += _chunkS34OVRKDcjs.escapeLiteralTags.call(void 0, _chunkS34OVRKDcjs.escapeLiteralDollar.call(void 0, tk.textContent || ""));
2028
2028
  else if (tk.nodeType === 1) {
2029
2029
  const ttag = (tk.tagName || tk.localName || "").replace(/^[^:]+:/, "");
2030
2030
  if (ttag === "tab" || ttag === "fwSpace" || ttag === "hwSpace" || ttag === "nbSpace") text += " ";
@@ -2044,7 +2044,7 @@ function extractRunSpans(para2, ctx, mode, requireMixed) {
2044
2044
  const span2 = { text };
2045
2045
  if (mode !== "foreign" && prId === KORDOC_CHAR_CODE) span2.code = true;
2046
2046
  else {
2047
- if (_optionalChain([cp, 'optionalAccess', _48 => _48.script])) span2.text = _chunk37BDHFGXcjs.wrapScript.call(void 0, text, cp.script);
2047
+ if (_optionalChain([cp, 'optionalAccess', _48 => _48.script])) span2.text = _chunkS34OVRKDcjs.wrapScript.call(void 0, text, cp.script);
2048
2048
  if (_optionalChain([cp, 'optionalAccess', _49 => _49.bold])) span2.bold = true;
2049
2049
  if (_optionalChain([cp, 'optionalAccess', _50 => _50.italic])) span2.italic = true;
2050
2050
  if (_optionalChain([cp, 'optionalAccess', _51 => _51.strike])) span2.strike = true;
@@ -2064,7 +2064,7 @@ function extractRunSpans(para2, ctx, mode, requireMixed) {
2064
2064
  }
2065
2065
  }
2066
2066
  if (requireMixed && !merged.some((s) => s.strike || s.underline) && !merged.some((s) => !(s.bold || s.italic || s.code))) return null;
2067
- for (const s of merged) s.text = _chunk37BDHFGXcjs.tidyScriptTags.call(void 0, s.text);
2067
+ for (const s of merged) s.text = _chunkS34OVRKDcjs.tidyScriptTags.call(void 0, s.text);
2068
2068
  return merged;
2069
2069
  }
2070
2070
  function gongmunDepthFromIndent(para2, left, ctx) {
@@ -2091,7 +2091,7 @@ function gongmunDepthFromIndent(para2, left, ctx) {
2091
2091
  // src/hwpx/section-walker.ts
2092
2092
  function parseSectionXml(xml, styleMap, warnings, sectionNum, shared) {
2093
2093
  const parser = createXmlParser(warnings);
2094
- const doc = parser.parseFromString(_chunkU6SSH2TGcjs.stripDtd.call(void 0, xml), "text/xml");
2094
+ const doc = parser.parseFromString(_chunkFJ45NNLAcjs.stripDtd.call(void 0, xml), "text/xml");
2095
2095
  if (!doc.documentElement) return [];
2096
2096
  const ctx = { styleMap, warnings, sectionNum, shared: _nullishCoalesce(shared, () => ( createSectionShared())) };
2097
2097
  ctx.shared.track.deleteDepth = 0;
@@ -2192,8 +2192,8 @@ function walkSection(node, blocks, tableCtx, tableStack, ctx, depth = 0) {
2192
2192
  const cs = isNaN(rawCs) ? 1 : rawCs;
2193
2193
  const rawRs = parseInt(el.getAttribute("rowSpan") || "1", 10);
2194
2194
  const rs = isNaN(rawRs) ? 1 : rawRs;
2195
- tableCtx.cell.colSpan = clampSpan(cs, _chunk37BDHFGXcjs.MAX_COLS);
2196
- tableCtx.cell.rowSpan = clampSpan(rs, _chunk37BDHFGXcjs.MAX_ROWS);
2195
+ tableCtx.cell.colSpan = clampSpan(cs, _chunkS34OVRKDcjs.MAX_COLS);
2196
+ tableCtx.cell.rowSpan = clampSpan(rs, _chunkS34OVRKDcjs.MAX_ROWS);
2197
2197
  }
2198
2198
  break;
2199
2199
  case "p": {
@@ -2516,7 +2516,7 @@ function buildSubListTable(el, ctx, depth) {
2516
2516
  const sink = [];
2517
2517
  const st = { rows: [], currentRow: [], cell: null, sourceId: _nullishCoalesce(el.getAttribute("id"), () => ( void 0)) };
2518
2518
  walkSection(el, sink, st, [], ctx, depth + 1);
2519
- let flat = _chunk37BDHFGXcjs.convertTableToText.call(void 0, st.rows);
2519
+ let flat = _chunkS34OVRKDcjs.convertTableToText.call(void 0, st.rows);
2520
2520
  if (st.caption) flat = st.caption + (flat ? "\n" + flat : "");
2521
2521
  const built = [];
2522
2522
  completeTable(st, [], built, ctx);
@@ -2680,7 +2680,7 @@ function extractHyperlinkHref(fieldBegin) {
2680
2680
  let url = (ch.textContent || "").trim();
2681
2681
  if (!url) continue;
2682
2682
  url = url.replace(/^https?:\/\/(?=https?:\/\/)/i, "");
2683
- const safe = _chunkU6SSH2TGcjs.sanitizeHref.call(void 0, url);
2683
+ const safe = _chunkFJ45NNLAcjs.sanitizeHref.call(void 0, url);
2684
2684
  if (safe) return safe;
2685
2685
  }
2686
2686
  return void 0;
@@ -2836,7 +2836,7 @@ function extractParagraphInfo(para2, styleMap, ctx) {
2836
2836
  _optionalChain([ctx, 'access', _112 => _112.warnings, 'optionalAccess', _113 => _113.push, 'call', _114 => _114({ page: ctx.page, message: "\uBCC0\uACBD\uCD94\uC801 \uC0AD\uC81C \uD14D\uC2A4\uD2B8 \uCD9C\uB825 \uC81C\uC678", code: "HIDDEN_TEXT_FILTERED" })]);
2837
2837
  }
2838
2838
  } else {
2839
- text += _chunk37BDHFGXcjs.escapeLiteralTags.call(void 0, _chunk37BDHFGXcjs.escapeLiteralDollar.call(void 0, t.replace(/\x1E/g, "")));
2839
+ text += _chunkS34OVRKDcjs.escapeLiteralTags.call(void 0, _chunkS34OVRKDcjs.escapeLiteralDollar.call(void 0, t.replace(/\x1E/g, "")));
2840
2840
  }
2841
2841
  continue;
2842
2842
  }
@@ -2881,7 +2881,7 @@ function extractParagraphInfo(para2, styleMap, ctx) {
2881
2881
  break;
2882
2882
  // 글자 겹치기 — 겹친 글은 composeText 속성에 있어 종전엔 통째로 빠졌다(법령 서식 원 번호 ⑯·⑰, 시험지 네모 번호 10)
2883
2883
  case "compose":
2884
- if (!isInDeletedRange(ctx)) text += _chunk37BDHFGXcjs.escapeLiteralTags.call(void 0, _chunk37BDHFGXcjs.escapeLiteralDollar.call(void 0, _chunk37BDHFGXcjs.composeText.call(void 0, _nullishCoalesce(child.getAttribute("composeText"), () => ( "")), (_nullishCoalesce(child.getAttribute("circleType"), () => ( "CHAR"))) !== "CHAR")));
2884
+ if (!isInDeletedRange(ctx)) text += _chunkS34OVRKDcjs.escapeLiteralTags.call(void 0, _chunkS34OVRKDcjs.escapeLiteralDollar.call(void 0, _chunkS34OVRKDcjs.composeText.call(void 0, _nullishCoalesce(child.getAttribute("composeText"), () => ( "")), (_nullishCoalesce(child.getAttribute("circleType"), () => ( "CHAR"))) !== "CHAR")));
2885
2885
  break;
2886
2886
  // 양식 선택 상자·라디오 단추 — 한컴이 그리는 상자 기호와 캡션 글 (종전엔 통째로 빠졌다: form-002 "원천기술형"·서울 결재 "부분공개")
2887
2887
  // 지운 구간의 양식 단추·수식은 글처럼 내지 않는다 (최종본)
@@ -2893,7 +2893,7 @@ function extractParagraphInfo(para2, styleMap, ctx) {
2893
2893
  case "hyperlink": {
2894
2894
  const url = child.getAttribute("url") || child.getAttribute("href") || "";
2895
2895
  if (url) {
2896
- const safe = _chunkU6SSH2TGcjs.sanitizeHref.call(void 0, url);
2896
+ const safe = _chunkFJ45NNLAcjs.sanitizeHref.call(void 0, url);
2897
2897
  if (safe) href = safe;
2898
2898
  }
2899
2899
  walk(child, depth + 1);
@@ -2987,7 +2987,7 @@ function extractParagraphInfo(para2, styleMap, ctx) {
2987
2987
  walk(child, depth + 1);
2988
2988
  if (script && linkRanges.length === nLinks && openFields.length === nOpen && runHasOnlyText(child)) {
2989
2989
  const added = text.slice(start);
2990
- if (added && !/[\x1E\n$]/.test(added)) text = text.slice(0, start) + _chunk37BDHFGXcjs.wrapScript.call(void 0, added, script);
2990
+ if (added && !/[\x1E\n$]/.test(added)) text = text.slice(0, start) + _chunkS34OVRKDcjs.wrapScript.call(void 0, added, script);
2991
2991
  }
2992
2992
  break;
2993
2993
  }
@@ -3010,7 +3010,7 @@ function extractParagraphInfo(para2, styleMap, ctx) {
3010
3010
  }
3011
3011
  if (applied.length) href = void 0;
3012
3012
  }
3013
- text = _chunk37BDHFGXcjs.tidyScriptTags.call(void 0, text);
3013
+ text = _chunkS34OVRKDcjs.tidyScriptTags.call(void 0, text);
3014
3014
  const toc = takeTocLeaders(text);
3015
3015
  text = toc.text;
3016
3016
  const tocEntry = toc.tocEntry;
@@ -3124,7 +3124,7 @@ function decompressStream(data) {
3124
3124
  return _zlib.inflateRawSync.call(void 0, data, opts);
3125
3125
  }
3126
3126
  function parseFileHeader(data) {
3127
- if (data.length < 40) throw new (0, _chunkU6SSH2TGcjs.KordocError)("FileHeader\uAC00 \uB108\uBB34 \uC9E7\uC2B5\uB2C8\uB2E4 (\uCD5C\uC18C 40\uBC14\uC774\uD2B8)");
3127
+ if (data.length < 40) throw new (0, _chunkFJ45NNLAcjs.KordocError)("FileHeader\uAC00 \uB108\uBB34 \uC9E7\uC2B5\uB2C8\uB2E4 (\uCD5C\uC18C 40\uBC14\uC774\uD2B8)");
3128
3128
  const sig = data.subarray(0, 32).toString("utf8").replace(/\0+$/, "");
3129
3129
  return {
3130
3130
  signature: sig,
@@ -3651,13 +3651,13 @@ async function extractImagesFromZip(zip, blocks, decompressed, warnings, sweepUn
3651
3651
  }
3652
3652
  const allCandidates = resolvedPath ? [resolvedPath, ...candidates] : candidates;
3653
3653
  for (const path of allCandidates) {
3654
- if (_chunkU6SSH2TGcjs.isPathTraversal.call(void 0, path)) continue;
3654
+ if (_chunkFJ45NNLAcjs.isPathTraversal.call(void 0, path)) continue;
3655
3655
  const file = zip.file(path);
3656
3656
  if (!file) continue;
3657
3657
  try {
3658
3658
  const data = await readZipEntry(file, "uint8array", decompressed.total);
3659
3659
  decompressed.total += data.length;
3660
- if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkU6SSH2TGcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3660
+ if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkFJ45NNLAcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3661
3661
  const ext = path.includes(".") ? path.split(".").pop() || "png" : "png";
3662
3662
  const extMime = imageExtToMime(ext);
3663
3663
  const mimeType = extMime === "image/svg+xml" && /<script|\son[a-z]+\s*=|javascript:|<foreignObject/i.test(Buffer.from(data).toString("utf8")) ? "application/octet-stream" : extMime;
@@ -3668,7 +3668,7 @@ async function extractImagesFromZip(zip, blocks, decompressed, warnings, sweepUn
3668
3668
  usedPaths.add(path);
3669
3669
  break;
3670
3670
  } catch (err) {
3671
- if (err instanceof _chunkU6SSH2TGcjs.KordocError) throw err;
3671
+ if (err instanceof _chunkFJ45NNLAcjs.KordocError) throw err;
3672
3672
  }
3673
3673
  }
3674
3674
  if (!img) _optionalChain([warnings, 'optionalAccess', _128 => _128.push, 'call', _129 => _129({ page: block.pageNumber, message: `\uC774\uBBF8\uC9C0 \uD30C\uC77C \uC5C6\uC74C: ${ref}`, code: "SKIPPED_IMAGE" })]);
@@ -3688,13 +3688,13 @@ async function extractImagesFromZip(zip, blocks, decompressed, warnings, sweepUn
3688
3688
  if (sweepUnreferenced) {
3689
3689
  const binEntries = zip.file(/(?:^|\/)BinData\//i);
3690
3690
  for (const file of binEntries) {
3691
- if (file.dir || usedPaths.has(file.name) || _chunkU6SSH2TGcjs.isPathTraversal.call(void 0, file.name)) continue;
3691
+ if (file.dir || usedPaths.has(file.name) || _chunkFJ45NNLAcjs.isPathTraversal.call(void 0, file.name)) continue;
3692
3692
  const basename = file.name.slice(file.name.lastIndexOf("/") + 1);
3693
3693
  if (_optionalChain([deletedRefs, 'optionalAccess', _130 => _130.has, 'call', _131 => _131(file.name)]) || _optionalChain([deletedRefs, 'optionalAccess', _132 => _132.has, 'call', _133 => _133(basename)]) || _optionalChain([deletedRefs, 'optionalAccess', _134 => _134.has, 'call', _135 => _135(file.name.replace(/\.[^/.]+$/, ""))]) || _optionalChain([deletedRefs, 'optionalAccess', _136 => _136.has, 'call', _137 => _137(basename.replace(/\.[^.]+$/, ""))])) continue;
3694
3694
  try {
3695
3695
  const data = await readZipEntry(file, "uint8array", decompressed.total);
3696
3696
  decompressed.total += data.length;
3697
- if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkU6SSH2TGcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3697
+ if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkFJ45NNLAcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3698
3698
  const ext = file.name.includes(".") ? file.name.split(".").pop() || "" : "";
3699
3699
  let mimeType = imageExtToMime(ext);
3700
3700
  if (mimeType === "application/octet-stream") {
@@ -3708,7 +3708,7 @@ async function extractImagesFromZip(zip, blocks, decompressed, warnings, sweepUn
3708
3708
  images.push(img);
3709
3709
  blocks.push({ type: "image", text: filename, imageData: { data, mimeType, filename: file.name } });
3710
3710
  } catch (err) {
3711
- if (err instanceof _chunkU6SSH2TGcjs.KordocError) throw err;
3711
+ if (err instanceof _chunkFJ45NNLAcjs.KordocError) throw err;
3712
3712
  _optionalChain([warnings, 'optionalAccess', _138 => _138.push, 'call', _139 => _139({ message: `\uC774\uBBF8\uC9C0 \uCD94\uCD9C \uC2E4\uD328: ${file.name}`, code: "SKIPPED_IMAGE" })]);
3713
3713
  }
3714
3714
  }
@@ -3759,7 +3759,7 @@ function extractFromBrokenZip(buffer, options) {
3759
3759
  }
3760
3760
  const nameBytes = data.slice(pos + 30, pos + 30 + nameLen);
3761
3761
  const name = new TextDecoder().decode(nameBytes);
3762
- if (_chunkU6SSH2TGcjs.isPathTraversal.call(void 0, name)) {
3762
+ if (_chunkFJ45NNLAcjs.isPathTraversal.call(void 0, name)) {
3763
3763
  pos = fileStart + compSize;
3764
3764
  continue;
3765
3765
  }
@@ -3777,7 +3777,7 @@ function extractFromBrokenZip(buffer, options) {
3777
3777
  continue;
3778
3778
  }
3779
3779
  totalDecompressed += content.length * 2;
3780
- if (totalDecompressed > MAX_DECOMPRESS_SIZE) throw new (0, _chunkU6SSH2TGcjs.KordocError)("\uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC");
3780
+ if (totalDecompressed > MAX_DECOMPRESS_SIZE) throw new (0, _chunkFJ45NNLAcjs.KordocError)("\uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC");
3781
3781
  sectionNum++;
3782
3782
  const secBlocks = parseSectionXml(content, void 0, warnings, sectionNum, shared);
3783
3783
  for (const b of secBlocks) b.pageNumber = sectionNum;
@@ -3786,9 +3786,9 @@ function extractFromBrokenZip(buffer, options) {
3786
3786
  continue;
3787
3787
  }
3788
3788
  }
3789
- if (blocks.length === 0) throw new (0, _chunkU6SSH2TGcjs.KordocError)("\uC190\uC0C1\uB41C HWPX\uC5D0\uC11C \uC139\uC158 \uB370\uC774\uD130\uB97C \uBCF5\uAD6C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
3789
+ if (blocks.length === 0) throw new (0, _chunkFJ45NNLAcjs.KordocError)("\uC190\uC0C1\uB41C HWPX\uC5D0\uC11C \uC139\uC158 \uB370\uC774\uD130\uB97C \uBCF5\uAD6C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
3790
3790
  applyPageText(blocks, shared);
3791
- const markdown = _chunk37BDHFGXcjs.blocksToMarkdown.call(void 0, blocks, { tableFormat: _optionalChain([options, 'optionalAccess', _140 => _140.tableFormat]) });
3791
+ const markdown = _chunkS34OVRKDcjs.blocksToMarkdown.call(void 0, blocks, { tableFormat: _optionalChain([options, 'optionalAccess', _140 => _140.tableFormat]) });
3792
3792
  return { markdown, blocks, warnings: warnings.length > 0 ? warnings : void 0 };
3793
3793
  }
3794
3794
  async function readKordocLayout(zip) {
@@ -3813,11 +3813,11 @@ async function resolveSectionPaths(zip) {
3813
3813
  if (paths.length > 0) return paths;
3814
3814
  }
3815
3815
  const sectionFiles = zip.file(/[Ss]ection\d+\.xml$/);
3816
- return sectionFiles.map((f) => f.name).sort(_chunkU6SSH2TGcjs.compareSectionPaths);
3816
+ return sectionFiles.map((f) => f.name).sort(_chunkFJ45NNLAcjs.compareSectionPaths);
3817
3817
  }
3818
3818
  function parseSectionPathsFromManifest(xml) {
3819
3819
  const parser = createXmlParser();
3820
- const doc = parser.parseFromString(_chunkU6SSH2TGcjs.stripDtd.call(void 0, xml), "text/xml");
3820
+ const doc = parser.parseFromString(_chunkFJ45NNLAcjs.stripDtd.call(void 0, xml), "text/xml");
3821
3821
  const opf = "http://www.idpf.org/2007/opf/";
3822
3822
  const namespacedItems = doc.getElementsByTagNameNS(opf, "item");
3823
3823
  const namespacedSpine = doc.getElementsByTagNameNS(opf, "itemref");
@@ -3827,7 +3827,7 @@ function parseSectionPathsFromManifest(xml) {
3827
3827
  for (let i = 0; i < items.length; i++) {
3828
3828
  const item = items[i];
3829
3829
  const id = item.getAttribute("id") || "";
3830
- const href = _chunkU6SSH2TGcjs.normalizeSectionHref.call(void 0, item.getAttribute("href") || "");
3830
+ const href = _chunkFJ45NNLAcjs.normalizeSectionHref.call(void 0, item.getAttribute("href") || "");
3831
3831
  if (id && href) idToHref.set(id, href);
3832
3832
  }
3833
3833
  if (spine.length > 0) {
@@ -3838,7 +3838,7 @@ function parseSectionPathsFromManifest(xml) {
3838
3838
  }
3839
3839
  if (ordered.length > 0) return ordered;
3840
3840
  }
3841
- return Array.from(idToHref.values()).sort(_chunkU6SSH2TGcjs.compareSectionPaths);
3841
+ return Array.from(idToHref.values()).sort(_chunkFJ45NNLAcjs.compareSectionPaths);
3842
3842
  }
3843
3843
 
3844
3844
  // src/hwpx/metadata.ts
@@ -3850,7 +3850,7 @@ async function extractHwpxMetadata(zip, metadata, decompressed) {
3850
3850
  const xml = await readZipEntry(file, "text", _optionalChain([decompressed, 'optionalAccess', _144 => _144.total]));
3851
3851
  if (decompressed) {
3852
3852
  decompressed.total += xml.length * 2;
3853
- if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkU6SSH2TGcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3853
+ if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkFJ45NNLAcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3854
3854
  }
3855
3855
  return xml;
3856
3856
  };
@@ -3872,7 +3872,7 @@ async function extractHwpxMetadata(zip, metadata, decompressed) {
3872
3872
  }
3873
3873
  }
3874
3874
  function parseOpfMetadata(xml, metadata) {
3875
- const root = createXmlParser().parseFromString(_chunkU6SSH2TGcjs.stripDtd.call(void 0, xml), "text/xml").documentElement;
3875
+ const root = createXmlParser().parseFromString(_chunkFJ45NNLAcjs.stripDtd.call(void 0, xml), "text/xml").documentElement;
3876
3876
  const md2 = root ? findChildByLocalName(root, "metadata") : null;
3877
3877
  if (!md2) return;
3878
3878
  let title;
@@ -3905,7 +3905,7 @@ function isoDate(s) {
3905
3905
  }
3906
3906
  function parseDublinCoreMetadata(xml, metadata) {
3907
3907
  const parser = createXmlParser();
3908
- const doc = parser.parseFromString(_chunkU6SSH2TGcjs.stripDtd.call(void 0, xml), "text/xml");
3908
+ const doc = parser.parseFromString(_chunkFJ45NNLAcjs.stripDtd.call(void 0, xml), "text/xml");
3909
3909
  if (!doc.documentElement) return;
3910
3910
  const getText = (tagNames) => {
3911
3911
  for (const tag of tagNames) {
@@ -3944,7 +3944,7 @@ function assignSectionPage(block, sectionNum) {
3944
3944
  }
3945
3945
  }
3946
3946
  async function parseHwpxDocument(buffer, options) {
3947
- _chunkU6SSH2TGcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE, MAX_ZIP_ENTRIES);
3947
+ _chunkFJ45NNLAcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE, MAX_ZIP_ENTRIES);
3948
3948
  let zip;
3949
3949
  try {
3950
3950
  zip = await _jszip2.default.loadAsync(buffer);
@@ -3953,7 +3953,7 @@ async function parseHwpxDocument(buffer, options) {
3953
3953
  }
3954
3954
  const actualEntryCount = Object.keys(zip.files).length;
3955
3955
  if (actualEntryCount > MAX_ZIP_ENTRIES) {
3956
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("ZIP \uC5D4\uD2B8\uB9AC \uC218 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3956
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("ZIP \uC5D4\uD2B8\uB9AC \uC218 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3957
3957
  }
3958
3958
  const manifestFile = zip.file("META-INF/manifest.xml");
3959
3959
  if (manifestFile) {
@@ -3973,7 +3973,7 @@ async function parseHwpxDocument(buffer, options) {
3973
3973
  }
3974
3974
  const hpfFile = zip.file("Contents/content.hpf");
3975
3975
  const hpf = hpfFile ? await readZipEntry(hpfFile, "text").catch(() => "") : "";
3976
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(
3976
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(
3977
3977
  /\bdistribution="1"/.test(_nullishCoalesce(hpf, () => ( ""))) ? "\uBC30\uD3EC\uC6A9\uC73C\uB85C \uC554\uD638\uD654\uB41C HWPX \uD30C\uC77C\uC785\uB2C8\uB2E4 (\uBC30\uD3EC\uC6A9 \uBCF5\uD638\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC74C). \uD55C\uCEF4\uC624\uD53C\uC2A4\uC5D0\uC11C \uC77C\uBC18 \uBB38\uC11C\uB85C \uC800\uC7A5\uD55C \uB4A4 \uC5EC\uC138\uC694." : "\uC554\uD638\uB85C \uBCF4\uD638\uB41C HWPX \uD30C\uC77C\uC785\uB2C8\uB2E4. password \uC635\uC158\uC5D0 \uC5F4\uAE30 \uC554\uD638\uB97C \uC9C0\uC815\uD558\uC138\uC694."
3978
3978
  );
3979
3979
  }
@@ -3985,7 +3985,7 @@ async function parseHwpxDocument(buffer, options) {
3985
3985
  const styleMap = await extractHwpxStyles(zip, decompressed);
3986
3986
  const warnings = [];
3987
3987
  const sectionPaths = await resolveSectionPaths(zip);
3988
- if (sectionPaths.length === 0) throw new (0, _chunkU6SSH2TGcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
3988
+ if (sectionPaths.length === 0) throw new (0, _chunkFJ45NNLAcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
3989
3989
  let allBlocks = [];
3990
3990
  const shared = createSectionShared();
3991
3991
  shared.kordocLayout = await readKordocLayout(zip);
@@ -4029,10 +4029,10 @@ async function parseHwpxDocument(buffer, options) {
4029
4029
  const blocks = allBlocks;
4030
4030
  applyPageText(blocks, shared);
4031
4031
  const images = await extractImagesFromZip(zip, blocks, decompressed, warnings, !_optionalChain([options, 'optionalAccess', _173 => _173.pages]), shared.track.deletedImageRefs);
4032
- const shown = _optionalChain([options, 'optionalAccess', _174 => _174.layoutTables]) === "keep" ? blocks : _chunk37BDHFGXcjs.unframeLayoutTables.call(void 0, blocks, !!_optionalChain([options, 'optionalAccess', _175 => _175.keepTrailingEmptyCols]));
4032
+ const shown = _optionalChain([options, 'optionalAccess', _174 => _174.layoutTables]) === "keep" ? blocks : _chunkS34OVRKDcjs.unframeLayoutTables.call(void 0, blocks, !!_optionalChain([options, 'optionalAccess', _175 => _175.keepTrailingEmptyCols]));
4033
4033
  detectHwpxHeadings(shown, styleMap, shared.tocTexts);
4034
4034
  const outline = shown.filter((b) => b.type === "heading" && b.level && b.text).map((b) => ({ level: b.level, text: b.text, pageNumber: b.pageNumber }));
4035
- const markdown = _chunk37BDHFGXcjs.blocksToMarkdown.call(void 0, shown, { tableFormat: _optionalChain([options, 'optionalAccess', _176 => _176.tableFormat]) });
4035
+ const markdown = _chunkS34OVRKDcjs.blocksToMarkdown.call(void 0, shown, { tableFormat: _optionalChain([options, 'optionalAccess', _176 => _176.tableFormat]) });
4036
4036
  return { markdown, blocks: shown, metadata, outline: outline.length > 0 ? outline : void 0, warnings: warnings.length > 0 ? warnings : void 0, images: images.length > 0 ? images : void 0 };
4037
4037
  }
4038
4038
 
@@ -4799,7 +4799,7 @@ function decryptPasswordStream(raw, password) {
4799
4799
  var TAG_DOCUMENT_PROPERTIES = 16;
4800
4800
  var TAG_ID_MAPPINGS2 = 17;
4801
4801
  function assertDecryptedDocInfo(data, readRecords3) {
4802
- const wrong = () => new (0, _chunkU6SSH2TGcjs.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.");
4802
+ const wrong = () => new (0, _chunkFJ45NNLAcjs.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.");
4803
4803
  let records;
4804
4804
  try {
4805
4805
  records = readRecords3(data);
@@ -4811,7 +4811,7 @@ function assertDecryptedDocInfo(data, readRecords3) {
4811
4811
  }
4812
4812
  function assertSupportedEncryptVersion(version) {
4813
4813
  if (version !== SUPPORTED_ENCRYPT_VERSION) {
4814
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(
4814
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(
4815
4815
  `\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 HWP \uC554\uD638\uD654 \uBC84\uC804\uC785\uB2C8\uB2E4 (EncryptVersion=${version}, \uC9C0\uC6D0: ${SUPPORTED_ENCRYPT_VERSION})`
4816
4816
  );
4817
4817
  }
@@ -5060,19 +5060,19 @@ var HANJA_UNITS = ["", "\u5341", "\u767E", "\u5343", "\u842C"];
5060
5060
  function formatNumber(n, fmt) {
5061
5061
  switch (fmt) {
5062
5062
  case "circled":
5063
- return n >= 1 ? _chunk37BDHFGXcjs.circledNumber.call(void 0, n - 1) : String(n);
5063
+ return n >= 1 ? _chunkS34OVRKDcjs.circledNumber.call(void 0, n - 1) : String(n);
5064
5064
  case "romanUpper":
5065
- return _chunk37BDHFGXcjs.romanNumeral.call(void 0, n, true);
5065
+ return _chunkS34OVRKDcjs.romanNumeral.call(void 0, n, true);
5066
5066
  case "romanLower":
5067
- return _chunk37BDHFGXcjs.romanNumeral.call(void 0, n, false);
5067
+ return _chunkS34OVRKDcjs.romanNumeral.call(void 0, n, false);
5068
5068
  case "latinUpper":
5069
5069
  return formatLatin(n, true) || String(n);
5070
5070
  case "latinLower":
5071
5071
  return formatLatin(n, false) || String(n);
5072
5072
  case "ganada":
5073
- return n >= 1 ? _chunk37BDHFGXcjs.hangulOrdinal.call(void 0, n - 1) : String(n);
5073
+ return n >= 1 ? _chunkS34OVRKDcjs.hangulOrdinal.call(void 0, n - 1) : String(n);
5074
5074
  case "circledGanada":
5075
- return n >= 1 ? _chunk37BDHFGXcjs.circledHangul.call(void 0, n - 1) : String(n);
5075
+ return n >= 1 ? _chunkS34OVRKDcjs.circledHangul.call(void 0, n - 1) : String(n);
5076
5076
  case "jamo":
5077
5077
  return fromTable(n, JAMO);
5078
5078
  case "circledJamo":
@@ -5254,7 +5254,7 @@ function emitParagraphBlocks(p) {
5254
5254
  return blocks;
5255
5255
  }
5256
5256
  function tableFlatText(table2) {
5257
- const flat = _chunk37BDHFGXcjs.convertTableToText.call(void 0, table2.cells);
5257
+ const flat = _chunkS34OVRKDcjs.convertTableToText.call(void 0, table2.cells);
5258
5258
  return table2.caption ? table2.caption + (flat ? "\n" + flat : "") : flat;
5259
5259
  }
5260
5260
  function blocksPlainText(blocks, sep) {
@@ -5335,8 +5335,8 @@ ${cell2.text}` : cell2.text;
5335
5335
  }
5336
5336
  function buildAddressedTable(cells, rows, cols, keepAnchoredEmptyCols) {
5337
5337
  for (const c of cells) {
5338
- rows = Math.max(rows, Math.min((_nullishCoalesce(c.rowAddr, () => ( 0))) + 1, _chunk37BDHFGXcjs.MAX_ROWS));
5339
- cols = Math.max(cols, Math.min((_nullishCoalesce(c.colAddr, () => ( 0))) + 1, _chunk37BDHFGXcjs.MAX_COLS));
5338
+ rows = Math.max(rows, Math.min((_nullishCoalesce(c.rowAddr, () => ( 0))) + 1, _chunkS34OVRKDcjs.MAX_ROWS));
5339
+ cols = Math.max(cols, Math.min((_nullishCoalesce(c.colAddr, () => ( 0))) + 1, _chunkS34OVRKDcjs.MAX_COLS));
5340
5340
  }
5341
5341
  const placed = resolveCellOverlaps(cells, rows, cols);
5342
5342
  const byRow = Array.from({ length: rows }, () => []);
@@ -5344,12 +5344,12 @@ function buildAddressedTable(cells, rows, cols, keepAnchoredEmptyCols) {
5344
5344
  const r = _nullishCoalesce(c.rowAddr, () => ( 0));
5345
5345
  if (r < rows && (_nullishCoalesce(c.colAddr, () => ( 0))) < cols) byRow[r].push(c);
5346
5346
  }
5347
- const table2 = _chunk37BDHFGXcjs.buildTable.call(void 0, byRow, { keepAnchoredEmptyCols });
5347
+ const table2 = _chunkS34OVRKDcjs.buildTable.call(void 0, byRow, { keepAnchoredEmptyCols });
5348
5348
  if (table2.rows === 0) return null;
5349
5349
  for (const c of placed) {
5350
5350
  if (c.edges) {
5351
5351
  const at = _optionalChain([table2, 'access', _183 => _183.cells, 'access', _184 => _184[_nullishCoalesce(c.rowAddr, () => ( 0))], 'optionalAccess', _185 => _185[_nullishCoalesce(c.colAddr, () => ( 0))]]);
5352
- if (at) _chunk37BDHFGXcjs.CELL_EDGES.set(at, c.edges);
5352
+ if (at) _chunkS34OVRKDcjs.CELL_EDGES.set(at, c.edges);
5353
5353
  }
5354
5354
  if (!_optionalChain([c, 'access', _186 => _186.blocks, 'optionalAccess', _187 => _187.length]) && !c.isHeader) continue;
5355
5355
  const target = _optionalChain([table2, 'access', _188 => _188.cells, 'access', _189 => _189[_nullishCoalesce(c.rowAddr, () => ( 0))], 'optionalAccess', _190 => _190[_nullishCoalesce(c.colAddr, () => ( 0))]]);
@@ -5551,7 +5551,7 @@ function parseParagraph(records, start, end, ctx) {
5551
5551
  continue;
5552
5552
  }
5553
5553
  if (!ctrl.href) continue;
5554
- const href = _chunkU6SSH2TGcjs.sanitizeHref.call(void 0, ctrl.href);
5554
+ const href = _chunkFJ45NNLAcjs.sanitizeHref.call(void 0, ctrl.href);
5555
5555
  if (!href) continue;
5556
5556
  if (!anchor.trim() || anchor.includes(INLINE_TABLE_MARK)) continue;
5557
5557
  text = text.slice(0, r.start) + `[${anchor}](${href})` + text.slice(r.end);
@@ -5560,7 +5560,7 @@ function parseParagraph(records, start, end, ctx) {
5560
5560
  }
5561
5561
  if (text.includes(LITERAL_DOLLAR_MARK)) text = text.replaceAll(LITERAL_DOLLAR_MARK, "\\$");
5562
5562
  text = resolveLiteralLt(text);
5563
- text = _chunk37BDHFGXcjs.tidyScriptTags.call(void 0, text);
5563
+ text = _chunkS34OVRKDcjs.tidyScriptTags.call(void 0, text);
5564
5564
  const toc = takeTocLeaders(text);
5565
5565
  text = toc.text;
5566
5566
  let headingLevel = 0;
@@ -5667,7 +5667,7 @@ function applyCtrlEffect(ctrl, records, ctx) {
5667
5667
  // 글자 겹침 — ctrl id 뒤 글자 수(WORD)·겹친 글자(WCHAR[n])·테두리 종류(BYTE, 0 = 없음). 종전엔 건너뛰어 법령 서식 원 번호(⑯·⑰)가 빠졌다
5668
5668
  case CTRL_TCPS: {
5669
5669
  const d = ctrl.data, n = d.length >= 6 ? d.readUInt16LE(4) : 0;
5670
- if (n > 0 && d.length >= 6 + 2 * n) ctrl.inlineText = _chunk37BDHFGXcjs.composeText.call(void 0, d.toString("utf16le", 6, 6 + 2 * n), (_nullishCoalesce(d[6 + 2 * n], () => ( 0))) !== 0);
5670
+ if (n > 0 && d.length >= 6 + 2 * n) ctrl.inlineText = _chunkS34OVRKDcjs.composeText.call(void 0, d.toString("utf16le", 6, 6 + 2 * n), (_nullishCoalesce(d[6 + 2 * n], () => ( 0))) !== 0);
5671
5671
  return;
5672
5672
  }
5673
5673
  // 숨은 설명/단 정의/쪽번호 위치/감추기/찾아보기/책갈피/덧말 — 본문 텍스트 없음 또는 의도적 스킵
@@ -5785,7 +5785,7 @@ function hyperlinkUrlFromCommand(command) {
5785
5785
  }
5786
5786
  var A4_HEIGHT = 84188;
5787
5787
  function keepUnlessPageSpanning(table2, cells) {
5788
- if (!cells.some((c) => c.pageSpanning)) _chunk37BDHFGXcjs.markNonLayoutTable.call(void 0, table2);
5788
+ if (!cells.some((c) => c.pageSpanning)) _chunkS34OVRKDcjs.markNonLayoutTable.call(void 0, table2);
5789
5789
  }
5790
5790
  function parseTableControl(ctrl, records, ctx) {
5791
5791
  if (ctx.depth >= MAX_NEST_DEPTH) return null;
@@ -5797,8 +5797,8 @@ function parseTableControl(ctrl, records, ctx) {
5797
5797
  let tableIdx = -1;
5798
5798
  for (let i2 = childStart; i2 < childEnd; i2++) {
5799
5799
  if (records[i2].tagId === TAG_TABLE && records[i2].level === directLevel && records[i2].data.length >= 8) {
5800
- rows = Math.min(records[i2].data.readUInt16LE(4), _chunk37BDHFGXcjs.MAX_ROWS);
5801
- cols = Math.min(records[i2].data.readUInt16LE(6), _chunk37BDHFGXcjs.MAX_COLS);
5800
+ rows = Math.min(records[i2].data.readUInt16LE(4), _chunkS34OVRKDcjs.MAX_ROWS);
5801
+ cols = Math.min(records[i2].data.readUInt16LE(6), _chunkS34OVRKDcjs.MAX_COLS);
5802
5802
  tableIdx = i2;
5803
5803
  break;
5804
5804
  }
@@ -5842,11 +5842,11 @@ function parseTableControl(ctrl, records, ctx) {
5842
5842
  return table3;
5843
5843
  }
5844
5844
  if (rows === 0 || cols === 0) {
5845
- rows = Math.min(cells.length, _chunk37BDHFGXcjs.MAX_ROWS);
5845
+ rows = Math.min(cells.length, _chunkS34OVRKDcjs.MAX_ROWS);
5846
5846
  cols = 1;
5847
5847
  }
5848
5848
  const cellRows = arrangeCells(rows, cols, cells);
5849
- const table2 = _chunk37BDHFGXcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: ctx.doc.keepTrailingEmptyCols });
5849
+ const table2 = _chunkS34OVRKDcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: ctx.doc.keepTrailingEmptyCols });
5850
5850
  if (caption && table2.rows > 0) table2.caption = caption;
5851
5851
  if (sourceId && table2.rows > 0) table2.sourceId = sourceId;
5852
5852
  keepUnlessPageSpanning(table2, cells);
@@ -5865,8 +5865,8 @@ function parseCell(records, lhIdx, end, ctx) {
5865
5865
  rowAddr = rec.data.readUInt16LE(10);
5866
5866
  const cs = rec.data.readUInt16LE(12);
5867
5867
  const rs = rec.data.readUInt16LE(14);
5868
- if (cs > 0) colSpan = Math.min(cs, _chunk37BDHFGXcjs.MAX_COLS);
5869
- if (rs > 0) rowSpan = Math.min(rs, _chunk37BDHFGXcjs.MAX_ROWS);
5868
+ if (cs > 0) colSpan = Math.min(cs, _chunkS34OVRKDcjs.MAX_COLS);
5869
+ if (rs > 0) rowSpan = Math.min(rs, _chunkS34OVRKDcjs.MAX_ROWS);
5870
5870
  }
5871
5871
  const blocks = ctx.depth < MAX_NEST_DEPTH ? parseParagraphList(records, lhIdx + 1, end, { ...ctx, depth: ctx.depth + 1 }) : [];
5872
5872
  const { text, hasStructure } = cellTextFromBlocks(blocks);
@@ -6015,7 +6015,7 @@ function openHwp5Container(buffer, options) {
6015
6015
  lenientCfb = parseLenientCfb(buffer);
6016
6016
  warnings.push({ message: "\uC190\uC0C1\uB41C CFB \uCEE8\uD14C\uC774\uB108 \u2014 lenient \uBAA8\uB4DC\uB85C \uBCF5\uAD6C", code: "LENIENT_CFB_RECOVERY" });
6017
6017
  } catch (e24) {
6018
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("CFB \uCEE8\uD14C\uC774\uB108 \uD30C\uC2F1 \uC2E4\uD328 (strict \uBC0F lenient \uBAA8\uB450)");
6018
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("CFB \uCEE8\uD14C\uC774\uB108 \uD30C\uC2F1 \uC2E4\uD328 (strict \uBC0F lenient \uBAA8\uB450)");
6019
6019
  }
6020
6020
  }
6021
6021
  const readRawStream = (path) => {
@@ -6026,14 +6026,14 @@ function openHwp5Container(buffer, options) {
6026
6026
  return lenientCfb.findStream(path);
6027
6027
  };
6028
6028
  const headerData = readRawStream("/FileHeader");
6029
- if (!headerData) throw new (0, _chunkU6SSH2TGcjs.KordocError)("FileHeader \uC2A4\uD2B8\uB9BC \uC5C6\uC74C");
6029
+ if (!headerData) throw new (0, _chunkFJ45NNLAcjs.KordocError)("FileHeader \uC2A4\uD2B8\uB9BC \uC5C6\uC74C");
6030
6030
  const header = parseFileHeader(headerData);
6031
- if (header.signature !== "HWP Document File") throw new (0, _chunkU6SSH2TGcjs.KordocError)("HWP \uC2DC\uADF8\uB2C8\uCC98 \uBD88\uC77C\uCE58");
6032
- if (header.flags & FLAG_DRM) throw new (0, _chunkU6SSH2TGcjs.KordocError)("DRM \uBCF4\uD638\uB41C HWP\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
6031
+ if (header.signature !== "HWP Document File") throw new (0, _chunkFJ45NNLAcjs.KordocError)("HWP \uC2DC\uADF8\uB2C8\uCC98 \uBD88\uC77C\uCE58");
6032
+ if (header.flags & FLAG_DRM) throw new (0, _chunkFJ45NNLAcjs.KordocError)("DRM \uBCF4\uD638\uB41C HWP\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
6033
6033
  const encrypted = (header.flags & FLAG_ENCRYPTED) !== 0;
6034
6034
  if (encrypted) {
6035
6035
  if (!_optionalChain([options, 'optionalAccess', _214 => _214.password])) {
6036
- throw new (0, _chunkU6SSH2TGcjs.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.");
6036
+ throw new (0, _chunkFJ45NNLAcjs.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.");
6037
6037
  }
6038
6038
  assertSupportedEncryptVersion(readEncryptVersion(headerData));
6039
6039
  }
@@ -6047,12 +6047,12 @@ function openHwp5Container(buffer, options) {
6047
6047
  const distribution = (header.flags & FLAG_DISTRIBUTION) !== 0;
6048
6048
  if (encrypted) {
6049
6049
  const rawDocInfo = findStream("/DocInfo");
6050
- if (!rawDocInfo) throw new (0, _chunkU6SSH2TGcjs.KordocError)("DocInfo \uC2A4\uD2B8\uB9BC \uC5C6\uC74C");
6050
+ if (!rawDocInfo) throw new (0, _chunkFJ45NNLAcjs.KordocError)("DocInfo \uC2A4\uD2B8\uB9BC \uC5C6\uC74C");
6051
6051
  let docInfoData;
6052
6052
  try {
6053
6053
  docInfoData = compressed ? decompressStream(rawDocInfo) : rawDocInfo;
6054
6054
  } catch (e25) {
6055
- throw new (0, _chunkU6SSH2TGcjs.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.");
6055
+ throw new (0, _chunkFJ45NNLAcjs.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.");
6056
6056
  }
6057
6057
  assertDecryptedDocInfo(docInfoData, readRecords);
6058
6058
  }
@@ -6077,10 +6077,10 @@ function readHwp5SectionRecords(c, sections, warnings) {
6077
6077
  try {
6078
6078
  const data = !c.distribution && c.compressed ? decompressStream(Buffer.from(sections[si])) : Buffer.from(sections[si]);
6079
6079
  totalDecompressed += data.length;
6080
- if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkU6SSH2TGcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
6080
+ if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkFJ45NNLAcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
6081
6081
  out.push(readRecords(data));
6082
6082
  } catch (secErr) {
6083
- if (secErr instanceof _chunkU6SSH2TGcjs.KordocError) throw secErr;
6083
+ if (secErr instanceof _chunkFJ45NNLAcjs.KordocError) throw secErr;
6084
6084
  out.push(null);
6085
6085
  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" });
6086
6086
  }
@@ -6100,7 +6100,7 @@ function parseHwp5Document(buffer, options) {
6100
6100
  if (cfb) extractHwp5Metadata(cfb, metadata);
6101
6101
  const docInfo = cfb && !encrypted ? parseDocInfoStream(cfb, compressed) : parseDocInfoFromStream(findStream("/DocInfo"), compressed);
6102
6102
  const sections = readHwp5SectionStreams(c);
6103
- if (sections.length === 0) throw new (0, _chunkU6SSH2TGcjs.KordocError)("\uC139\uC158 \uC2A4\uD2B8\uB9BC\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
6103
+ if (sections.length === 0) throw new (0, _chunkFJ45NNLAcjs.KordocError)("\uC139\uC158 \uC2A4\uD2B8\uB9BC\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
6104
6104
  const sectionRecords = readHwp5SectionRecords(c, sections, warnings);
6105
6105
  const sectionDetects = sectionRecords.map((r) => r ? detectHwp5SectionPages(r) : null);
6106
6106
  const sectionTableIds = [];
@@ -6144,7 +6144,7 @@ function parseHwp5Document(buffer, options) {
6144
6144
  parsedSections++;
6145
6145
  _optionalChain([options, 'optionalAccess', _219 => _219.onProgress, 'optionalCall', _220 => _220(parsedSections, sections.length)]);
6146
6146
  } catch (secErr) {
6147
- if (secErr instanceof _chunkU6SSH2TGcjs.KordocError) throw secErr;
6147
+ if (secErr instanceof _chunkFJ45NNLAcjs.KordocError) throw secErr;
6148
6148
  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" });
6149
6149
  } finally {
6150
6150
  pageBase += detect2.pages;
@@ -6155,10 +6155,10 @@ function parseHwp5Document(buffer, options) {
6155
6155
  }
6156
6156
  const blocks = [...doc.headerBlocks, ...bodyBlocks, ...doc.footerBlocks];
6157
6157
  const images = cfb ? extractHwp5Images(cfb.FileIndex, blocks, warnings, !pageFilter, encrypted ? findStream : void 0) : extractHwp5ImagesLenient(lenientCfb, blocks, warnings, !pageFilter, encrypted ? findStream : void 0);
6158
- let flatBlocks = _chunk37BDHFGXcjs.flattenLayoutTables.call(void 0, blocks);
6159
- if (_optionalChain([options, 'optionalAccess', _221 => _221.layoutTables]) !== "keep") flatBlocks = _chunk37BDHFGXcjs.unframeLayoutTables.call(void 0, flatBlocks, !!_optionalChain([options, 'optionalAccess', _222 => _222.keepTrailingEmptyCols]));
6158
+ let flatBlocks = _chunkS34OVRKDcjs.flattenLayoutTables.call(void 0, blocks);
6159
+ if (_optionalChain([options, 'optionalAccess', _221 => _221.layoutTables]) !== "keep") flatBlocks = _chunkS34OVRKDcjs.unframeLayoutTables.call(void 0, flatBlocks, !!_optionalChain([options, 'optionalAccess', _222 => _222.keepTrailingEmptyCols]));
6160
6160
  if (_optionalChain([options, 'optionalAccess', _223 => _223.dedupeRunningHeaders])) {
6161
- const deduped = _chunk37BDHFGXcjs.dedupeRunningHeaders.call(void 0, flatBlocks);
6161
+ const deduped = _chunkS34OVRKDcjs.dedupeRunningHeaders.call(void 0, flatBlocks);
6162
6162
  const removed = flatBlocks.length - deduped.length;
6163
6163
  if (removed > 0) warnings.push({ message: `\uBC18\uBCF5 \uB7EC\uB2DD \uD5E4\uB354 ${removed}\uAC1C \uC81C\uAC70`, code: "HIDDEN_TEXT_FILTERED" });
6164
6164
  flatBlocks = deduped;
@@ -6167,10 +6167,10 @@ function parseHwp5Document(buffer, options) {
6167
6167
  detectHwp5Headings(flatBlocks, docInfo, doc.tocTexts);
6168
6168
  }
6169
6169
  const outline = flatBlocks.filter((b) => b.type === "heading" && b.level && b.text).map((b) => ({ level: b.level, text: b.text, pageNumber: b.pageNumber }));
6170
- let markdown = _chunk37BDHFGXcjs.blocksToMarkdown.call(void 0, flatBlocks, { tableFormat: _optionalChain([options, 'optionalAccess', _224 => _224.tableFormat]) });
6170
+ let markdown = _chunkS34OVRKDcjs.blocksToMarkdown.call(void 0, flatBlocks, { tableFormat: _optionalChain([options, 'optionalAccess', _224 => _224.tableFormat]) });
6171
6171
  if (_optionalChain([options, 'optionalAccess', _225 => _225.inlineImages]) && options.images !== false && images.length > 0) {
6172
6172
  try {
6173
- markdown = _chunkJYUYW34Pcjs.inlineImagesIntoMarkdown.call(void 0, markdown, images, { compress: true });
6173
+ markdown = _chunkTN4SSNEScjs.inlineImagesIntoMarkdown.call(void 0, markdown, images, { compress: true });
6174
6174
  } catch (inlineErr) {
6175
6175
  warnings.push({ message: `\uC774\uBBF8\uC9C0 \uC778\uB77C\uC778 \uC2E4\uD328 \u2014 \uC6D0\uBCF8 \uD30C\uC77C \uCC38\uC870\uB85C \uD3F4\uBC31: ${inlineErr instanceof Error ? inlineErr.message : "\uC54C \uC218 \uC5C6\uB294 \uC624\uB958"}`, code: "SKIPPED_IMAGE" });
6176
6176
  }
@@ -6234,9 +6234,9 @@ function detectHwp5Headings(blocks, docInfo, tocTexts) {
6234
6234
  let level = 0;
6235
6235
  if (_optionalChain([block, 'access', _232 => _232.style, 'optionalAccess', _233 => _233.fontSize]) && baseFontSize > 0) {
6236
6236
  const ratio = block.style.fontSize / baseFontSize;
6237
- if (ratio >= _chunk37BDHFGXcjs.HEADING_RATIO_H1) level = 1;
6238
- else if (ratio >= _chunk37BDHFGXcjs.HEADING_RATIO_H2) level = 2;
6239
- else if (ratio >= _chunk37BDHFGXcjs.HEADING_RATIO_H3) level = 3;
6237
+ if (ratio >= _chunkS34OVRKDcjs.HEADING_RATIO_H1) level = 1;
6238
+ else if (ratio >= _chunkS34OVRKDcjs.HEADING_RATIO_H2) level = 2;
6239
+ else if (ratio >= _chunkS34OVRKDcjs.HEADING_RATIO_H3) level = 3;
6240
6240
  }
6241
6241
  if (/^제\d+[장절편]\s/.test(text) && text.length <= 50) {
6242
6242
  if (level === 0) level = 2;
@@ -6368,7 +6368,7 @@ function findSectionsLenient(lcfb) {
6368
6368
  const raw = _nullishCoalesce(lcfb.findStream(`/BodyText/Section${i}`), () => ( lcfb.findStream(`Section${i}`)));
6369
6369
  if (!raw) break;
6370
6370
  totalBytes += raw.length;
6371
- if (totalBytes > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkU6SSH2TGcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
6371
+ if (totalBytes > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkFJ45NNLAcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
6372
6372
  sections.push({ idx: i, content: raw });
6373
6373
  }
6374
6374
  if (sections.length === 0) {
@@ -6379,7 +6379,7 @@ function findSectionsLenient(lcfb) {
6379
6379
  const raw = lcfb.findStream(e.name);
6380
6380
  if (raw) {
6381
6381
  totalBytes += raw.length;
6382
- if (totalBytes > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkU6SSH2TGcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
6382
+ if (totalBytes > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkFJ45NNLAcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
6383
6383
  sections.push({ idx, content: raw });
6384
6384
  }
6385
6385
  }
@@ -6396,7 +6396,7 @@ function findViewTextSectionsLenient(lcfb, compressed) {
6396
6396
  try {
6397
6397
  const content = decryptViewText(raw, compressed);
6398
6398
  totalDecompressed += content.length;
6399
- if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkU6SSH2TGcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
6399
+ if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkFJ45NNLAcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
6400
6400
  sections.push({ idx: i, content });
6401
6401
  } catch (e32) {
6402
6402
  break;
@@ -18896,25 +18896,25 @@ function desEcbDecrypt(data, key) {
18896
18896
  }
18897
18897
  function readLayout(data) {
18898
18898
  if (data.length < FIXED_HEADER_BYTES) {
18899
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("HWP3 \uC554\uD638 \uBB38\uC11C: \uD5E4\uB354\uAC00 \uC798\uB838\uC2B5\uB2C8\uB2E4");
18899
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("HWP3 \uC554\uD638 \uBB38\uC11C: \uD5E4\uB354\uAC00 \uC798\uB838\uC2B5\uB2C8\uB2E4");
18900
18900
  }
18901
18901
  const infoBlockLength = data[INFO_BLOCK_LENGTH_OFFSET] | data[INFO_BLOCK_LENGTH_OFFSET + 1] << 8;
18902
18902
  const payloadOffset = FIXED_HEADER_BYTES + infoBlockLength;
18903
18903
  if (payloadOffset >= data.length) {
18904
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("HWP3 \uC554\uD638 \uBB38\uC11C: \uBCF8\uBB38\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
18904
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("HWP3 \uC554\uD638 \uBB38\uC11C: \uBCF8\uBB38\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
18905
18905
  }
18906
18906
  return { payloadOffset, compressed: data[COMPRESSION_FLAG_OFFSET] !== 0 };
18907
18907
  }
18908
18908
  function decryptHwp3Document(input, password) {
18909
18909
  const { payloadOffset, compressed } = readLayout(input);
18910
18910
  if (!compressed) {
18911
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 HWP3 \uC554\uD638\uD654 \uBC29\uC2DD\uC785\uB2C8\uB2E4 (\uC555\uCD95\uB418\uC9C0 \uC54A\uC740 \uC554\uD638 \uBCF8\uBB38)");
18911
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 HWP3 \uC554\uD638\uD654 \uBC29\uC2DD\uC785\uB2C8\uB2E4 (\uC555\uCD95\uB418\uC9C0 \uC54A\uC740 \uC554\uD638 \uBCF8\uBB38)");
18912
18912
  }
18913
18913
  const source = Buffer.from(input);
18914
18914
  const payload = source.subarray(payloadOffset);
18915
18915
  const aligned = payload.subarray(0, payload.length - payload.length % 8);
18916
18916
  if (aligned.length === 0) {
18917
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("HWP3 \uC554\uD638 \uBB38\uC11C: \uBCF8\uBB38\uC774 \uB108\uBB34 \uC9E7\uC2B5\uB2C8\uB2E4");
18917
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("HWP3 \uC554\uD638 \uBB38\uC11C: \uBCF8\uBB38\uC774 \uB108\uBB34 \uC9E7\uC2B5\uB2C8\uB2E4");
18918
18918
  }
18919
18919
  const decrypted = desEcbDecrypt(aligned, deriveDesKey(password));
18920
18920
  let inflated;
@@ -18922,14 +18922,14 @@ function decryptHwp3Document(input, password) {
18922
18922
  inflated = _zlib.inflateRawSync.call(void 0, decrypted, { maxOutputLength: MAX_DECOMPRESSED_BYTES });
18923
18923
  } catch (err) {
18924
18924
  if (_optionalChain([err, 'optionalAccess', _248 => _248.code]) === "ERR_BUFFER_TOO_LARGE") {
18925
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(
18925
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(
18926
18926
  `HWP3 \uC554\uD638 \uBCF8\uBB38\uC758 \uC555\uCD95 \uD574\uC81C \uACB0\uACFC\uAC00 \uCD5C\uB300 \uD5C8\uC6A9 \uD06C\uAE30(${MAX_DECOMPRESSED_BYTES / 1024 / 1024}MB)\uB97C \uCD08\uACFC\uD588\uC2B5\uB2C8\uB2E4`
18927
18927
  );
18928
18928
  }
18929
- throw new (0, _chunkU6SSH2TGcjs.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.");
18929
+ throw new (0, _chunkFJ45NNLAcjs.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.");
18930
18930
  }
18931
18931
  if (inflated.length <= PASSWORD_PREFIX_BYTES) {
18932
- throw new (0, _chunkU6SSH2TGcjs.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.");
18932
+ throw new (0, _chunkFJ45NNLAcjs.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.");
18933
18933
  }
18934
18934
  const body = inflated.subarray(PASSWORD_PREFIX_BYTES);
18935
18935
  const out = Buffer.concat([source.subarray(0, payloadOffset), body]);
@@ -18986,9 +18986,9 @@ function hwp3CellGrid(info, count) {
18986
18986
  const col = edgeAt(xs, g3.x), row = edgeAt(ys, g3.y);
18987
18987
  const c2 = nextX[k] !== void 0 ? edgeAt(xs, nextX[k]) : xs.length - 1;
18988
18988
  const r2 = nextY[k] !== void 0 ? edgeAt(ys, nextY[k]) : ys.length - 1;
18989
- return { row, col, rowSpan: Math.min(Math.max(1, r2 - row), _chunk37BDHFGXcjs.MAX_ROWS), colSpan: Math.min(Math.max(1, c2 - col), _chunk37BDHFGXcjs.MAX_COLS) };
18989
+ return { row, col, rowSpan: Math.min(Math.max(1, r2 - row), _chunkS34OVRKDcjs.MAX_ROWS), colSpan: Math.min(Math.max(1, c2 - col), _chunkS34OVRKDcjs.MAX_COLS) };
18990
18990
  });
18991
- return { rows: Math.min(Math.max(1, ys.length - 1), _chunk37BDHFGXcjs.MAX_ROWS), cols: Math.min(Math.max(1, xs.length - 1), _chunk37BDHFGXcjs.MAX_COLS), cells };
18991
+ return { rows: Math.min(Math.max(1, ys.length - 1), _chunkS34OVRKDcjs.MAX_ROWS), cols: Math.min(Math.max(1, xs.length - 1), _chunkS34OVRKDcjs.MAX_COLS), cells };
18992
18992
  }
18993
18993
 
18994
18994
  // src/hwp3/parser.ts
@@ -19029,7 +19029,7 @@ function parseHwp3Document(buffer, options) {
19029
19029
  let source = Buffer.from(buffer);
19030
19030
  if (isEncryptedHwp3(source)) {
19031
19031
  if (!_optionalChain([options, 'optionalAccess', _249 => _249.password])) {
19032
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(
19032
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(
19033
19033
  "\uC554\uD638\uB85C \uBCF4\uD638\uB41C HWP3 \uBB38\uC11C\uC785\uB2C8\uB2E4. password \uC635\uC158\uC5D0 \uC5F4\uAE30 \uC554\uD638\uB97C \uC9C0\uC815\uD558\uC138\uC694."
19034
19034
  );
19035
19035
  }
@@ -19046,10 +19046,10 @@ function parseHwp3Document(buffer, options) {
19046
19046
  body = _zlib.inflateRawSync.call(void 0, tail, { maxOutputLength: MAX_DECOMPRESS_SIZE3 });
19047
19047
  } catch (err) {
19048
19048
  if (_optionalChain([err, 'optionalAccess', _250 => _250.code]) === "ERR_BUFFER_TOO_LARGE") {
19049
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(`HWP3 \uC555\uCD95 \uD574\uC81C \uACB0\uACFC\uAC00 \uCD5C\uB300 \uD5C8\uC6A9 \uD06C\uAE30(${MAX_DECOMPRESS_SIZE3 / 1024 / 1024}MB)\uB97C \uCD08\uACFC\uD588\uC2B5\uB2C8\uB2E4`);
19049
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(`HWP3 \uC555\uCD95 \uD574\uC81C \uACB0\uACFC\uAC00 \uCD5C\uB300 \uD5C8\uC6A9 \uD06C\uAE30(${MAX_DECOMPRESS_SIZE3 / 1024 / 1024}MB)\uB97C \uCD08\uACFC\uD588\uC2B5\uB2C8\uB2E4`);
19050
19050
  }
19051
19051
  const msg2 = err instanceof Error ? err.message : String(err);
19052
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(`HWP3 \uC555\uCD95 \uD574\uC81C \uC2E4\uD328: ${msg2}`);
19052
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(`HWP3 \uC555\uCD95 \uD574\uC81C \uC2E4\uD328: ${msg2}`);
19053
19053
  }
19054
19054
  } else {
19055
19055
  body = tail;
@@ -19072,7 +19072,7 @@ function parseHwp3Document(buffer, options) {
19072
19072
  const names = new Map([...ctx.picIds].map(([name, id]) => [id, name]));
19073
19073
  dropMissingPictures(allBlocks, binData, names, warnings);
19074
19074
  const images = resolveImageBlocks(binData, allBlocks, warnings, true);
19075
- const blocks = _chunk37BDHFGXcjs.flattenLayoutTables.call(void 0, allBlocks);
19075
+ const blocks = _chunkS34OVRKDcjs.flattenLayoutTables.call(void 0, allBlocks);
19076
19076
  const metadata = {
19077
19077
  title: header.title || void 0,
19078
19078
  author: header.author || void 0,
@@ -19080,10 +19080,10 @@ function parseHwp3Document(buffer, options) {
19080
19080
  createdAt: header.date || void 0,
19081
19081
  version: "3.0"
19082
19082
  };
19083
- let markdown = _chunk37BDHFGXcjs.blocksToMarkdown.call(void 0, blocks, { tableFormat: _optionalChain([options, 'optionalAccess', _251 => _251.tableFormat]) });
19083
+ let markdown = _chunkS34OVRKDcjs.blocksToMarkdown.call(void 0, blocks, { tableFormat: _optionalChain([options, 'optionalAccess', _251 => _251.tableFormat]) });
19084
19084
  if (_optionalChain([options, 'optionalAccess', _252 => _252.inlineImages]) && options.images !== false && images.length > 0) {
19085
19085
  try {
19086
- markdown = _chunkJYUYW34Pcjs.inlineImagesIntoMarkdown.call(void 0, markdown, images, { compress: true });
19086
+ markdown = _chunkTN4SSNEScjs.inlineImagesIntoMarkdown.call(void 0, markdown, images, { compress: true });
19087
19087
  } catch (inlineErr) {
19088
19088
  warnings.push({ message: `\uC774\uBBF8\uC9C0 \uC778\uB77C\uC778 \uC2E4\uD328 \u2014 \uC6D0\uBCF8 \uD30C\uC77C \uCC38\uC870\uB85C \uD3F4\uBC31: ${inlineErr instanceof Error ? inlineErr.message : "\uC54C \uC218 \uC5C6\uB294 \uC624\uB958"}`, code: "SKIPPED_IMAGE" });
19089
19089
  }
@@ -19215,7 +19215,7 @@ function parseCharStream(reader, charCount, ctx, para2) {
19215
19215
  continue;
19216
19216
  }
19217
19217
  if (ch >= 32) {
19218
- para2.text += _chunk37BDHFGXcjs.escapeLiteralTags.call(void 0, _chunk37BDHFGXcjs.escapeLiteralDollar.call(void 0, _nullishCoalesce(decodeJohabText(ch), () => ( ""))));
19218
+ para2.text += _chunkS34OVRKDcjs.escapeLiteralTags.call(void 0, _chunkS34OVRKDcjs.escapeLiteralDollar.call(void 0, _nullishCoalesce(decodeJohabText(ch), () => ( ""))));
19219
19219
  continue;
19220
19220
  }
19221
19221
  if (ch === 9) {
@@ -19450,7 +19450,7 @@ function isDistributionSentinel(markdown) {
19450
19450
  // src/xlsx/sheet-blocks.ts
19451
19451
  var MAX_SHEET_COLS = 16384;
19452
19452
  function sheetRowCap(cols) {
19453
- return Math.floor(_chunk37BDHFGXcjs.MAX_TABLE_CELLS / Math.max(1, cols));
19453
+ return Math.floor(_chunkS34OVRKDcjs.MAX_TABLE_CELLS / Math.max(1, cols));
19454
19454
  }
19455
19455
  function sheetToBlocks(sheetName, rows, maxCol, merges, sheetIndex, warnings, keepAnchoredEmptyCols) {
19456
19456
  const blocks = [];
@@ -19481,7 +19481,7 @@ function sheetToBlocks(sheetName, rows, maxCol, merges, sheetIndex, warnings, ke
19481
19481
  if (keepRows.length > rowCap) {
19482
19482
  warnings.push({
19483
19483
  page: sheetIndex + 1,
19484
- message: `\uC2DC\uD2B8 "${sheetName}": ${keepRows.length}\uD589 \xD7 ${keepCols.length}\uC5F4 \uC911 \uC55E ${rowCap}\uD589\uB9CC \uD45C\uB85C \uB0C8\uC2B5\uB2C8\uB2E4 (\uD45C \uCE78 \uC0C1\uD55C ${_chunk37BDHFGXcjs.MAX_TABLE_CELLS})`,
19484
+ message: `\uC2DC\uD2B8 "${sheetName}": ${keepRows.length}\uD589 \xD7 ${keepCols.length}\uC5F4 \uC911 \uC55E ${rowCap}\uD589\uB9CC \uD45C\uB85C \uB0C8\uC2B5\uB2C8\uB2E4 (\uD45C \uCE78 \uC0C1\uD55C ${_chunkS34OVRKDcjs.MAX_TABLE_CELLS})`,
19485
19485
  code: "TRUNCATED_TABLE"
19486
19486
  });
19487
19487
  keepRows.length = rowCap;
@@ -19515,14 +19515,14 @@ function sheetToBlocks(sheetName, rows, maxCol, merges, sheetIndex, warnings, ke
19515
19515
  }
19516
19516
  cellRows.push(row);
19517
19517
  }
19518
- const table2 = _chunk37BDHFGXcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols, maxRows: rowCap, maxCols: keepCols.length });
19518
+ const table2 = _chunkS34OVRKDcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols, maxRows: rowCap, maxCols: keepCols.length });
19519
19519
  if (table2.rows > 0) blocks.push({ type: "table", table: table2, pageNumber: sheetIndex + 1 });
19520
19520
  return blocks;
19521
19521
  }
19522
19522
 
19523
19523
  // src/xlsx/parser.ts
19524
19524
  var MAX_SHEETS = 100;
19525
- var MAX_DECOMPRESS_SIZE4 = _chunkU6SSH2TGcjs.unzipLimitBytes.call(void 0, 100 * 1024 * 1024);
19525
+ var MAX_DECOMPRESS_SIZE4 = _chunkFJ45NNLAcjs.unzipLimitBytes.call(void 0, 100 * 1024 * 1024);
19526
19526
  var MAX_SHEET_ROWS = 1048576;
19527
19527
  function cleanNumericValue(raw) {
19528
19528
  if (!/^-?\d+\.\d+$/.test(raw)) return raw;
@@ -19559,7 +19559,7 @@ function getTextContent(el) {
19559
19559
  return _nullishCoalesce(_optionalChain([el, 'access', _268 => _268.textContent, 'optionalAccess', _269 => _269.trim, 'call', _270 => _270()]), () => ( ""));
19560
19560
  }
19561
19561
  function parseXml(text) {
19562
- return new (0, _xmldom.DOMParser)().parseFromString(_chunkU6SSH2TGcjs.stripDtd.call(void 0, text), "text/xml");
19562
+ return new (0, _xmldom.DOMParser)().parseFromString(_chunkFJ45NNLAcjs.stripDtd.call(void 0, text), "text/xml");
19563
19563
  }
19564
19564
  function collectRichText(root) {
19565
19565
  let out = "";
@@ -19570,7 +19570,7 @@ function collectRichText(root) {
19570
19570
  const el = children[i];
19571
19571
  const local = el.localName || _optionalChain([el, 'access', _271 => _271.tagName, 'optionalAccess', _272 => _272.replace, 'call', _273 => _273(/^[^:]+:/, "")]) || "";
19572
19572
  if (local === "rPh") continue;
19573
- if (local === "t") out += _chunk37BDHFGXcjs.escapeLiteralTags.call(void 0, _chunk37BDHFGXcjs.escapeLiteralDollar.call(void 0, _nullishCoalesce(el.textContent, () => ( ""))));
19573
+ if (local === "t") out += _chunkS34OVRKDcjs.escapeLiteralTags.call(void 0, _chunkS34OVRKDcjs.escapeLiteralDollar.call(void 0, _nullishCoalesce(el.textContent, () => ( ""))));
19574
19574
  else walk(el);
19575
19575
  }
19576
19576
  };
@@ -19781,12 +19781,12 @@ function parseWorksheet(xml, sharedStrings, dateXfs, date1904) {
19781
19781
  return { rows, merges, maxCol };
19782
19782
  }
19783
19783
  async function parseXlsxDocument(buffer, options) {
19784
- _chunkU6SSH2TGcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE4);
19784
+ _chunkFJ45NNLAcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE4);
19785
19785
  const zip = await _jszip2.default.loadAsync(buffer);
19786
19786
  const warnings = [];
19787
19787
  const workbookFile = zip.file("xl/workbook.xml");
19788
19788
  if (!workbookFile) {
19789
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 XLSX \uD30C\uC77C: xl/workbook.xml\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
19789
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 XLSX \uD30C\uC77C: xl/workbook.xml\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
19790
19790
  }
19791
19791
  let sharedStrings = [];
19792
19792
  const ssFile = zip.file("xl/sharedStrings.xml");
@@ -19795,7 +19795,7 @@ async function parseXlsxDocument(buffer, options) {
19795
19795
  }
19796
19796
  const { sheets, date1904 } = parseWorkbook(await readZipEntry(workbookFile, "text"));
19797
19797
  if (sheets.length === 0) {
19798
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("XLSX \uD30C\uC77C\uC5D0 \uC2DC\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4");
19798
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("XLSX \uD30C\uC77C\uC5D0 \uC2DC\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4");
19799
19799
  }
19800
19800
  let dateXfs = /* @__PURE__ */ new Map();
19801
19801
  const stylesFile = zip.file("xl/styles.xml");
@@ -19879,7 +19879,7 @@ async function parseXlsxDocument(buffer, options) {
19879
19879
  } catch (e35) {
19880
19880
  }
19881
19881
  }
19882
- const markdown = _chunk37BDHFGXcjs.blocksToMarkdown.call(void 0, blocks, { tableFormat: _optionalChain([options, 'optionalAccess', _278 => _278.tableFormat]) });
19882
+ const markdown = _chunkS34OVRKDcjs.blocksToMarkdown.call(void 0, blocks, { tableFormat: _optionalChain([options, 'optionalAccess', _278 => _278.tableFormat]) });
19883
19883
  return { markdown, blocks, metadata, warnings: warnings.length > 0 ? warnings : void 0 };
19884
19884
  }
19885
19885
 
@@ -20193,14 +20193,14 @@ function extractSheetCells(records, bofIndex, sst, convertNum) {
20193
20193
  const h = readCellHeader(rec.data);
20194
20194
  if (h && rec.data.length >= 10) {
20195
20195
  const isst = rec.data.readUInt32LE(6);
20196
- cells.push({ row: h.row, col: h.col, value: _chunk37BDHFGXcjs.escapeLiteralTags.call(void 0, _chunk37BDHFGXcjs.escapeLiteralDollar.call(void 0, _nullishCoalesce(sst[isst], () => ( "")))) });
20196
+ cells.push({ row: h.row, col: h.col, value: _chunkS34OVRKDcjs.escapeLiteralTags.call(void 0, _chunkS34OVRKDcjs.escapeLiteralDollar.call(void 0, _nullishCoalesce(sst[isst], () => ( "")))) });
20197
20197
  }
20198
20198
  break;
20199
20199
  }
20200
20200
  case OP_LABEL: {
20201
20201
  const h = readCellHeader(rec.data);
20202
20202
  if (h) {
20203
- cells.push({ row: h.row, col: h.col, value: _chunk37BDHFGXcjs.escapeLiteralTags.call(void 0, _chunk37BDHFGXcjs.escapeLiteralDollar.call(void 0, decodeLabelString(rec.data))) });
20203
+ cells.push({ row: h.row, col: h.col, value: _chunkS34OVRKDcjs.escapeLiteralTags.call(void 0, _chunkS34OVRKDcjs.escapeLiteralDollar.call(void 0, decodeLabelString(rec.data))) });
20204
20204
  }
20205
20205
  break;
20206
20206
  }
@@ -20216,7 +20216,7 @@ function extractSheetCells(records, bofIndex, sst, convertNum) {
20216
20216
  cells.push({
20217
20217
  row: h.row,
20218
20218
  col: h.col,
20219
- value: _chunk37BDHFGXcjs.escapeLiteralTags.call(void 0, _chunk37BDHFGXcjs.escapeLiteralDollar.call(void 0, decodeFormulaStringRecord(next.data)))
20219
+ value: _chunkS34OVRKDcjs.escapeLiteralTags.call(void 0, _chunkS34OVRKDcjs.escapeLiteralDollar.call(void 0, decodeFormulaStringRecord(next.data)))
20220
20220
  });
20221
20221
  i = j;
20222
20222
  } else {
@@ -20328,11 +20328,11 @@ function processGlobals(records) {
20328
20328
  const xfFmtIds = [];
20329
20329
  const firstBof = records[0];
20330
20330
  if (!firstBof || firstBof.opcode !== OP_BOF) {
20331
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("XLS: \uCCAB \uB808\uCF54\uB4DC\uAC00 BOF\uAC00 \uC544\uB2D8");
20331
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("XLS: \uCCAB \uB808\uCF54\uB4DC\uAC00 BOF\uAC00 \uC544\uB2D8");
20332
20332
  }
20333
20333
  const bof = decodeBof(firstBof.data);
20334
20334
  if (!bof || bof.dt !== DT_GLOBALS) {
20335
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("XLS: Globals \uC11C\uBE0C\uC2A4\uD2B8\uB9BC BOF \uB204\uB77D");
20335
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("XLS: Globals \uC11C\uBE0C\uC2A4\uD2B8\uB9BC BOF \uB204\uB77D");
20336
20336
  }
20337
20337
  let i = 1;
20338
20338
  while (i < records.length) {
@@ -20416,28 +20416,28 @@ async function parseXlsDocument(buffer, options) {
20416
20416
  try {
20417
20417
  cfb = parseLenientCfb(buf);
20418
20418
  } catch (e) {
20419
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(
20419
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(
20420
20420
  `XLS: OLE2 \uC2DC\uADF8\uB2C8\uCC98 \uAC80\uC99D \uC2E4\uD328 \u2014 ${e instanceof Error ? e.message : "\uC54C \uC218 \uC5C6\uB294 \uC624\uB958"}`
20421
20421
  );
20422
20422
  }
20423
20423
  const wb = _nullishCoalesce(cfb.findStream("/Workbook"), () => ( cfb.findStream("/Book")));
20424
20424
  if (!wb) {
20425
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("XLS: Workbook \uC2A4\uD2B8\uB9BC\uC774 \uC5C6\uC74C (BIFF5 \uB610\uB294 \uBE44\uD45C\uC900 \uD30C\uC77C)");
20425
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("XLS: Workbook \uC2A4\uD2B8\uB9BC\uC774 \uC5C6\uC74C (BIFF5 \uB610\uB294 \uBE44\uD45C\uC900 \uD30C\uC77C)");
20426
20426
  }
20427
20427
  const records = readRecords2(wb);
20428
20428
  if (records.length === 0) {
20429
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("XLS: \uC2DC\uADF8\uB2C8\uCC98 \uB808\uCF54\uB4DC\uAC00 \uC5C6\uC74C (Workbook \uC2A4\uD2B8\uB9BC \uC190\uC0C1)");
20429
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("XLS: \uC2DC\uADF8\uB2C8\uCC98 \uB808\uCF54\uB4DC\uAC00 \uC5C6\uC74C (Workbook \uC2A4\uD2B8\uB9BC \uC190\uC0C1)");
20430
20430
  }
20431
20431
  const firstBof = decodeBof(records[0].data);
20432
20432
  if (firstBof && firstBof.vers !== 1536) {
20433
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(
20433
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(
20434
20434
  `XLS: BIFF8(0x0600)\uB9CC \uC9C0\uC6D0 \u2014 \uBCF8 \uD30C\uC77C\uC740 0x${firstBof.vers.toString(16)}`
20435
20435
  );
20436
20436
  }
20437
20437
  const globals = processGlobals(records);
20438
20438
  const warnings = [];
20439
20439
  if (globals.encrypted) {
20440
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("XLS \uD30C\uC77C\uC774 \uC554\uD638\uD654\uB418\uC5B4 \uC788\uC5B4 \uD30C\uC2F1\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
20440
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("XLS \uD30C\uC77C\uC774 \uC554\uD638\uD654\uB418\uC5B4 \uC788\uC5B4 \uD30C\uC2F1\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
20441
20441
  }
20442
20442
  const convertNum = globals.dateXfs.size > 0 ? (n, ixfe) => {
20443
20443
  const kind = globals.dateXfs.get(ixfe);
@@ -20488,7 +20488,7 @@ async function parseXlsDocument(buffer, options) {
20488
20488
  pageCount: totalSheets
20489
20489
  };
20490
20490
  return {
20491
- markdown: _chunk37BDHFGXcjs.blocksToMarkdown.call(void 0, allBlocks, { tableFormat: _optionalChain([options, 'optionalAccess', _283 => _283.tableFormat]) }),
20491
+ markdown: _chunkS34OVRKDcjs.blocksToMarkdown.call(void 0, allBlocks, { tableFormat: _optionalChain([options, 'optionalAccess', _283 => _283.tableFormat]) }),
20492
20492
  blocks: allBlocks,
20493
20493
  metadata,
20494
20494
  warnings: warnings.length > 0 ? warnings : void 0
@@ -20927,7 +20927,7 @@ function isDisplayMath(el) {
20927
20927
  }
20928
20928
 
20929
20929
  // src/docx/parser.ts
20930
- var MAX_DECOMPRESS_SIZE5 = _chunkU6SSH2TGcjs.unzipLimitBytes.call(void 0, 100 * 1024 * 1024);
20930
+ var MAX_DECOMPRESS_SIZE5 = _chunkFJ45NNLAcjs.unzipLimitBytes.call(void 0, 100 * 1024 * 1024);
20931
20931
  var MEDIA_PART_RE = /^word\/(?:media|embeddings)\//;
20932
20932
  var NEVER_READ_RE = /^word\/(?:embeddings\/.*|media\/.+\.(?:mp4|m4v|mov|avi|wmv|mpe?g|mkv|webm|mp3|wav|m4a|wma|aac|ogg|flac|mid|bin))$/i;
20933
20933
  function matchesLocal(el, localName3) {
@@ -20985,7 +20985,7 @@ function getAttr(el, localName3) {
20985
20985
  return null;
20986
20986
  }
20987
20987
  function parseXml2(text) {
20988
- return new (0, _xmldom.DOMParser)().parseFromString(_chunkU6SSH2TGcjs.stripDtd.call(void 0, text), "text/xml");
20988
+ return new (0, _xmldom.DOMParser)().parseFromString(_chunkFJ45NNLAcjs.stripDtd.call(void 0, text), "text/xml");
20989
20989
  }
20990
20990
  function parseStyles(xml) {
20991
20991
  const doc = parseXml2(xml);
@@ -21121,7 +21121,7 @@ function parseFootnotes(xml) {
21121
21121
  const runs = findElements(p, "r");
21122
21122
  for (const r of runs) {
21123
21123
  const tElements = getChildElements(r, "t");
21124
- for (const t of tElements) texts.push(_chunk37BDHFGXcjs.escapeLiteralTags.call(void 0, _chunk37BDHFGXcjs.escapeLiteralDollar.call(void 0, _nullishCoalesce(t.textContent, () => ( "")))));
21124
+ for (const t of tElements) texts.push(_chunkS34OVRKDcjs.escapeLiteralTags.call(void 0, _chunkS34OVRKDcjs.escapeLiteralDollar.call(void 0, _nullishCoalesce(t.textContent, () => ( "")))));
21125
21125
  }
21126
21126
  }
21127
21127
  notes.set(id, texts.join("").trim());
@@ -21152,7 +21152,7 @@ function collectOmmlRoots(p) {
21152
21152
  function extractRun(r) {
21153
21153
  let text = "";
21154
21154
  for (const el of effectiveChildElements(r)) {
21155
- if (matchesLocal(el, "t")) text += _chunk37BDHFGXcjs.escapeLiteralTags.call(void 0, _chunk37BDHFGXcjs.escapeLiteralDollar.call(void 0, _nullishCoalesce(el.textContent, () => ( ""))));
21155
+ if (matchesLocal(el, "t")) text += _chunkS34OVRKDcjs.escapeLiteralTags.call(void 0, _chunkS34OVRKDcjs.escapeLiteralDollar.call(void 0, _nullishCoalesce(el.textContent, () => ( ""))));
21156
21156
  else if (matchesLocal(el, "br") || matchesLocal(el, "cr")) text += "\n";
21157
21157
  else if (matchesLocal(el, "tab")) text += " ";
21158
21158
  else if (matchesLocal(el, "sym")) text += symbolChar(getAttr(el, "font"), getAttr(el, "char"));
@@ -21165,7 +21165,7 @@ function extractRun(r) {
21165
21165
  italic = getChildElements(rPrEls[0], "i").length > 0;
21166
21166
  const va = getChildElements(rPrEls[0], "vertAlign")[0];
21167
21167
  const v = va ? getAttr(va, "val") : null;
21168
- if (v === "superscript" || v === "subscript") text = _chunk37BDHFGXcjs.wrapScript.call(void 0, text, v === "superscript" ? "sup" : "sub");
21168
+ if (v === "superscript" || v === "subscript") text = _chunkS34OVRKDcjs.wrapScript.call(void 0, text, v === "superscript" ? "sup" : "sub");
21169
21169
  }
21170
21170
  return { text, bold, italic };
21171
21171
  }
@@ -21183,7 +21183,7 @@ var PAGE_FIELD_RE = /^\s*(?:PAGE|NUMPAGES|SECTIONPAGES)\b/i;
21183
21183
  function makeLink(text, rawHref) {
21184
21184
  if (!text) return "";
21185
21185
  if (!rawHref) return text;
21186
- const href = _chunkU6SSH2TGcjs.sanitizeHref.call(void 0, rawHref);
21186
+ const href = _chunkFJ45NNLAcjs.sanitizeHref.call(void 0, rawHref);
21187
21187
  return href ? `[${text}](${href})` : text;
21188
21188
  }
21189
21189
  function collectInline(p, footnotes, rels) {
@@ -21274,7 +21274,7 @@ function collectInline(p, footnotes, rels) {
21274
21274
  const m = mathText(om);
21275
21275
  if (m) parts.push(isDisplayMath(om) ? m : " " + m + " ");
21276
21276
  }
21277
- const text = _chunk37BDHFGXcjs.tidyScriptTags.call(void 0, parts.join("")).replace(/[ \t]{2,}/g, " ").trim();
21277
+ const text = _chunkS34OVRKDcjs.tidyScriptTags.call(void 0, parts.join("")).replace(/[ \t]{2,}/g, " ").trim();
21278
21278
  return { text, bold, italic, footnoteText };
21279
21279
  }
21280
21280
  var COUNTERS = /* @__PURE__ */ new WeakMap();
@@ -21399,7 +21399,7 @@ ${cell2.text}` : cell2.text;
21399
21399
  return { text: cell2.text, colSpan: cell2.colSpan, rowSpan, colAddr: cell2.col, rowAddr: r };
21400
21400
  })
21401
21401
  );
21402
- const table2 = _chunk37BDHFGXcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: keepEmptyCols });
21402
+ const table2 = _chunkS34OVRKDcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: keepEmptyCols });
21403
21403
  if (table2.rows === 0 || table2.cols === 0) return null;
21404
21404
  return { type: "table", table: table2 };
21405
21405
  }
@@ -21448,7 +21448,7 @@ async function buildImageMap(zip, rels, doc, warnings, readBytes) {
21448
21448
  let data = null;
21449
21449
  if (readBytes) data = await readZipEntry(imgFile, "uint8array");
21450
21450
  imgIdx++;
21451
- const ext = _chunkU6SSH2TGcjs.partExtension.call(void 0, imgPath);
21451
+ const ext = _chunkFJ45NNLAcjs.partExtension.call(void 0, imgPath);
21452
21452
  const mimeMap = {
21453
21453
  png: "image/png",
21454
21454
  jpg: "image/jpeg",
@@ -21547,12 +21547,12 @@ async function parseHeaderFooterBlocks(zip, doc, rels, kind, styles, numbering,
21547
21547
  }
21548
21548
  async function parseDocxDocument(buffer, options) {
21549
21549
  const readImages = _optionalChain([options, 'optionalAccess', _319 => _319.images]) !== false;
21550
- _chunkU6SSH2TGcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE5, void 0, { re: MEDIA_PART_RE, skip: !readImages, never: NEVER_READ_RE });
21550
+ _chunkFJ45NNLAcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE5, void 0, { re: MEDIA_PART_RE, skip: !readImages, never: NEVER_READ_RE });
21551
21551
  const zip = await _jszip2.default.loadAsync(buffer);
21552
21552
  const warnings = [];
21553
21553
  const docFile = zip.file("word/document.xml");
21554
21554
  if (!docFile) {
21555
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 DOCX \uD30C\uC77C: word/document.xml\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
21555
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 DOCX \uD30C\uC77C: word/document.xml\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
21556
21556
  }
21557
21557
  let rels = /* @__PURE__ */ new Map();
21558
21558
  const relsFile = zip.file("word/_rels/document.xml.rels");
@@ -21599,7 +21599,7 @@ async function parseDocxDocument(buffer, options) {
21599
21599
  const doc = parseXml2(docXml);
21600
21600
  const body = findElements(doc, "body");
21601
21601
  if (body.length === 0) {
21602
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("DOCX \uBCF8\uBB38(w:body)\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
21602
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("DOCX \uBCF8\uBB38(w:body)\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
21603
21603
  }
21604
21604
  const { imageMap, images } = await buildImageMap(zip, rels, doc, warnings, readImages);
21605
21605
  const linkedImages = /* @__PURE__ */ new Set();
@@ -21652,7 +21652,7 @@ async function parseDocxDocument(buffer, options) {
21652
21652
  }
21653
21653
  }
21654
21654
  const outline = blocks.filter((b) => b.type === "heading").map((b) => ({ level: _nullishCoalesce(b.level, () => ( 2)), text: _nullishCoalesce(b.text, () => ( "")) }));
21655
- const markdown = _chunk37BDHFGXcjs.blocksToMarkdown.call(void 0, blocks, { tableFormat: _optionalChain([options, 'optionalAccess', _326 => _326.tableFormat]) });
21655
+ const markdown = _chunkS34OVRKDcjs.blocksToMarkdown.call(void 0, blocks, { tableFormat: _optionalChain([options, 'optionalAccess', _326 => _326.tableFormat]) });
21656
21656
  return {
21657
21657
  markdown,
21658
21658
  blocks,
@@ -21666,7 +21666,7 @@ async function parseDocxDocument(buffer, options) {
21666
21666
  // src/pptx/parser.ts
21667
21667
 
21668
21668
 
21669
- var MAX_DECOMPRESS_SIZE6 = _chunkU6SSH2TGcjs.unzipLimitBytes.call(void 0, 100 * 1024 * 1024);
21669
+ var MAX_DECOMPRESS_SIZE6 = _chunkFJ45NNLAcjs.unzipLimitBytes.call(void 0, 100 * 1024 * 1024);
21670
21670
  var MEDIA_PART_RE2 = /^ppt\/(?:media|embeddings)\//;
21671
21671
  var NEVER_READ_RE2 = /^ppt\/(?:embeddings\/.*|media\/.+\.(?:mp4|m4v|mov|avi|wmv|mpe?g|mkv|webm|mp3|wav|m4a|wma|aac|ogg|flac|mid|bin))$/i;
21672
21672
  var MAX_ZIP_ENTRIES2 = 1e4;
@@ -21689,7 +21689,7 @@ var IMAGE_MIME = {
21689
21689
  svg: "image/svg+xml"
21690
21690
  };
21691
21691
  function parseXml3(text) {
21692
- return new (0, _xmldom.DOMParser)().parseFromString(_chunkU6SSH2TGcjs.stripDtd.call(void 0, text), "text/xml");
21692
+ return new (0, _xmldom.DOMParser)().parseFromString(_chunkFJ45NNLAcjs.stripDtd.call(void 0, text), "text/xml");
21693
21693
  }
21694
21694
  function getAttr2(el, name) {
21695
21695
  const attrs = el.attributes;
@@ -21756,7 +21756,7 @@ async function slideParts(zip) {
21756
21756
  names.sort((a, b) => Number(SLIDE_PART_RE.exec(a)[1]) - Number(SLIDE_PART_RE.exec(b)[1]));
21757
21757
  ordered.push(...names);
21758
21758
  }
21759
- if (ordered.length > MAX_SLIDES) throw new (0, _chunkU6SSH2TGcjs.KordocError)(`PPTX \uC2AC\uB77C\uC774\uB4DC \uC218 \uCD08\uACFC: ${ordered.length} (\uCD5C\uB300 ${MAX_SLIDES})`);
21759
+ if (ordered.length > MAX_SLIDES) throw new (0, _chunkFJ45NNLAcjs.KordocError)(`PPTX \uC2AC\uB77C\uC774\uB4DC \uC218 \uCD08\uACFC: ${ordered.length} (\uCD5C\uB300 ${MAX_SLIDES})`);
21760
21760
  return ordered;
21761
21761
  }
21762
21762
  function paragraphText(p) {
@@ -21767,12 +21767,12 @@ function paragraphText(p) {
21767
21767
  const t = findChildByLocalName(child, "t");
21768
21768
  const rPr = findChildByLocalName(child, "rPr");
21769
21769
  const baseline = Number(rPr ? _nullishCoalesce(getAttr2(rPr, "baseline"), () => ( 0)) : 0);
21770
- if (t) text += _chunk37BDHFGXcjs.wrapScript.call(void 0, _chunk37BDHFGXcjs.escapeLiteralTags.call(void 0, _chunk37BDHFGXcjs.escapeLiteralDollar.call(void 0, rawTextContent(t))), baseline > 0 ? "sup" : baseline < 0 ? "sub" : null);
21770
+ if (t) text += _chunkS34OVRKDcjs.wrapScript.call(void 0, _chunkS34OVRKDcjs.escapeLiteralTags.call(void 0, _chunkS34OVRKDcjs.escapeLiteralDollar.call(void 0, rawTextContent(t))), baseline > 0 ? "sup" : baseline < 0 ? "sub" : null);
21771
21771
  } else if (name === "br") {
21772
21772
  text += " ";
21773
21773
  }
21774
21774
  }
21775
- return _chunk37BDHFGXcjs.tidyScriptTags.call(void 0, text.replace(/\s+/g, " ").trim());
21775
+ return _chunkS34OVRKDcjs.tidyScriptTags.call(void 0, text.replace(/\s+/g, " ").trim());
21776
21776
  }
21777
21777
  function bodyParagraphs(txBody) {
21778
21778
  const out = [];
@@ -21833,7 +21833,7 @@ function parseTable2(tbl2, page, keepEmptyCols) {
21833
21833
  });
21834
21834
  return cells;
21835
21835
  });
21836
- const table2 = _chunk37BDHFGXcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: keepEmptyCols });
21836
+ const table2 = _chunkS34OVRKDcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: keepEmptyCols });
21837
21837
  if (table2.rows === 0 || table2.cols === 0) return null;
21838
21838
  return { type: "table", table: table2, pageNumber: page };
21839
21839
  }
@@ -21846,7 +21846,7 @@ async function pictureBlock(pic, ctx) {
21846
21846
  if (!filename) {
21847
21847
  const file = ctx.zip.file(rel.target);
21848
21848
  if (!file) return null;
21849
- const ext = _chunkU6SSH2TGcjs.partExtension.call(void 0, rel.target);
21849
+ const ext = _chunkFJ45NNLAcjs.partExtension.call(void 0, rel.target);
21850
21850
  filename = `image_${String(ctx.imageNames.size + 1).padStart(3, "0")}.${ext}`;
21851
21851
  try {
21852
21852
  if (_optionalChain([ctx, 'access', _330 => _330.options, 'optionalAccess', _331 => _331.images]) !== false) {
@@ -21924,10 +21924,10 @@ async function notesText(zip, rels) {
21924
21924
  return texts.join(" ");
21925
21925
  }
21926
21926
  async function parsePptxDocument(buffer, options) {
21927
- _chunkU6SSH2TGcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE6, MAX_ZIP_ENTRIES2, { re: MEDIA_PART_RE2, skip: _optionalChain([options, 'optionalAccess', _334 => _334.images]) === false, never: NEVER_READ_RE2 });
21927
+ _chunkFJ45NNLAcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE6, MAX_ZIP_ENTRIES2, { re: MEDIA_PART_RE2, skip: _optionalChain([options, 'optionalAccess', _334 => _334.images]) === false, never: NEVER_READ_RE2 });
21928
21928
  const zip = await _jszip2.default.loadAsync(buffer);
21929
21929
  if (!zip.file("ppt/presentation.xml")) {
21930
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 PPTX \uD30C\uC77C: ppt/presentation.xml\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
21930
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 PPTX \uD30C\uC77C: ppt/presentation.xml\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
21931
21931
  }
21932
21932
  const warnings = [];
21933
21933
  const blocks = [];
@@ -21974,7 +21974,7 @@ async function parsePptxDocument(buffer, options) {
21974
21974
  }
21975
21975
  const outline = blocks.filter((b) => b.type === "heading").map((b) => ({ level: _nullishCoalesce(b.level, () => ( 2)), text: _nullishCoalesce(b.text, () => ( "")), pageNumber: b.pageNumber }));
21976
21976
  return {
21977
- markdown: _chunk37BDHFGXcjs.blocksToMarkdown.call(void 0, blocks, { tableFormat: _optionalChain([options, 'optionalAccess', _336 => _336.tableFormat]) }),
21977
+ markdown: _chunkS34OVRKDcjs.blocksToMarkdown.call(void 0, blocks, { tableFormat: _optionalChain([options, 'optionalAccess', _336 => _336.tableFormat]) }),
21978
21978
  blocks,
21979
21979
  metadata,
21980
21980
  outline: outline.length > 0 ? outline : void 0,
@@ -21990,11 +21990,11 @@ var MAX_TABLE_COLS = 500;
21990
21990
  var MAX_HWPML_BYTES = 50 * 1024 * 1024;
21991
21991
  function parseHwpmlDocument(buffer, options) {
21992
21992
  if (buffer.byteLength > MAX_HWPML_BYTES) {
21993
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(`HWPML \uD30C\uC77C \uD06C\uAE30 \uCD08\uACFC (${(buffer.byteLength / 1024 / 1024).toFixed(1)}MB > 50MB)`);
21993
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(`HWPML \uD30C\uC77C \uD06C\uAE30 \uCD08\uACFC (${(buffer.byteLength / 1024 / 1024).toFixed(1)}MB > 50MB)`);
21994
21994
  }
21995
21995
  const text = new TextDecoder("utf-8").decode(buffer).replace(/^\uFEFF/, "");
21996
21996
  const normalized = text.replace(/&nbsp;/g, "&#160;");
21997
- const xml = _chunkU6SSH2TGcjs.stripDtd.call(void 0, normalized);
21997
+ const xml = _chunkFJ45NNLAcjs.stripDtd.call(void 0, normalized);
21998
21998
  const warnings = [];
21999
21999
  const parser = new (0, _xmldom.DOMParser)({
22000
22000
  onError: (_level, msg2) => {
@@ -22034,7 +22034,7 @@ function parseHwpmlDocument(buffer, options) {
22034
22034
  parseSection2(el, blocks, paraShapeMap, sectionIdx, warnings, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _338 => _338.keepTrailingEmptyCols]), () => ( false)));
22035
22035
  }
22036
22036
  const outline = blocks.filter((b) => b.type === "heading" && b.text).map((b) => ({ level: _nullishCoalesce(b.level, () => ( 1)), text: b.text, pageNumber: b.pageNumber }));
22037
- const markdown = _chunk37BDHFGXcjs.blocksToMarkdown.call(void 0, blocks, { tableFormat: _optionalChain([options, 'optionalAccess', _339 => _339.tableFormat]) });
22037
+ const markdown = _chunkS34OVRKDcjs.blocksToMarkdown.call(void 0, blocks, { tableFormat: _optionalChain([options, 'optionalAccess', _339 => _339.tableFormat]) });
22038
22038
  return {
22039
22039
  markdown,
22040
22040
  blocks,
@@ -22141,7 +22141,7 @@ function collectCharText(node, parts, depth = 0) {
22141
22141
  if (tag === "CHAR") {
22142
22142
  for (const c of Array.from(el.childNodes)) {
22143
22143
  const t = c.nodeType === 1 ? localName(c) === "TAB" ? " " : rawTextContent(c) : c.nodeType === 3 || c.nodeType === 4 ? _nullishCoalesce(c.nodeValue, () => ( "")) : "";
22144
- if (t) parts.push(_chunk37BDHFGXcjs.escapeLiteralTags.call(void 0, t));
22144
+ if (t) parts.push(_chunkS34OVRKDcjs.escapeLiteralTags.call(void 0, t));
22145
22145
  }
22146
22146
  } else if (tag === "TABLE" || tag === "PICTURE" || tag === "SHAPEOBJECT") {
22147
22147
  } else if (tag === "AUTONUM") {
@@ -22201,7 +22201,7 @@ function buildHmlTable(el, warnings, keep, tableDepth) {
22201
22201
  const r = Math.min(Math.max(_nullishCoalesce(cell2.rowAddr, () => ( 0)), 0), rowCount - 1);
22202
22202
  cellRows[r].push(cell2);
22203
22203
  }
22204
- const table2 = _chunk37BDHFGXcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: keep });
22204
+ const table2 = _chunkS34OVRKDcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: keep });
22205
22205
  if (structured.length > 0) {
22206
22206
  const claimed = /* @__PURE__ */ new Set();
22207
22207
  for (const { ctx, cellBlocks } of structured) {
@@ -23964,7 +23964,7 @@ function fillClickHereInXml(xml, cursor, blockedLabels) {
23964
23964
  };
23965
23965
  }
23966
23966
  async function extractClickHereFields(hwpxBuffer) {
23967
- _chunkU6SSH2TGcjs.precheckZipSize.call(void 0, hwpxBuffer);
23967
+ _chunkFJ45NNLAcjs.precheckZipSize.call(void 0, hwpxBuffer);
23968
23968
  const zip = await _jszip2.default.loadAsync(hwpxBuffer);
23969
23969
  const sectionPaths = Object.keys(zip.files).filter((name) => /[Ss]ection\d+\.xml$/i.test(name)).sort();
23970
23970
  const fields = [];
@@ -24000,7 +24000,7 @@ function readZipEntries(buf) {
24000
24000
  }
24001
24001
  function localDataStart(view, localOffset) {
24002
24002
  if (view.getUint32(localOffset, true) !== LOCAL_SIG) {
24003
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("ZIP \uB85C\uCEEC \uD5E4\uB354 \uC2DC\uADF8\uB2C8\uCC98 \uBD88\uC77C\uCE58");
24003
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("ZIP \uB85C\uCEEC \uD5E4\uB354 \uC2DC\uADF8\uB2C8\uCC98 \uBD88\uC77C\uCE58");
24004
24004
  }
24005
24005
  const nameLen = view.getUint16(localOffset + 26, true);
24006
24006
  const extraLen = view.getUint16(localOffset + 28, true);
@@ -24030,19 +24030,19 @@ function parseCentralDirectory(buf) {
24030
24030
  }
24031
24031
  }
24032
24032
  }
24033
- if (eocdOffset < 0) throw new (0, _chunkU6SSH2TGcjs.KordocError)("ZIP EOCD\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
24033
+ if (eocdOffset < 0) throw new (0, _chunkFJ45NNLAcjs.KordocError)("ZIP EOCD\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
24034
24034
  const totalEntries = view.getUint16(eocdOffset + 10, true);
24035
24035
  const cdSize = view.getUint32(eocdOffset + 12, true);
24036
24036
  const cdOffset = view.getUint32(eocdOffset + 16, true);
24037
- if (cdOffset === 4294967295 || totalEntries === 65535) throw new (0, _chunkU6SSH2TGcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
24037
+ if (cdOffset === 4294967295 || totalEntries === 65535) throw new (0, _chunkFJ45NNLAcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
24038
24038
  if (eocdOffset >= 20 && view.getUint32(eocdOffset - 20, true) === ZIP64_EOCD_LOC_SIG) {
24039
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
24039
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
24040
24040
  }
24041
24041
  const decoder = new TextDecoder("utf-8");
24042
24042
  const entries = [];
24043
24043
  let pos = cdOffset;
24044
24044
  for (let i = 0; i < totalEntries; i++) {
24045
- if (view.getUint32(pos, true) !== CD_SIG) throw new (0, _chunkU6SSH2TGcjs.KordocError)("ZIP Central Directory \uC190\uC0C1");
24045
+ if (view.getUint32(pos, true) !== CD_SIG) throw new (0, _chunkFJ45NNLAcjs.KordocError)("ZIP Central Directory \uC190\uC0C1");
24046
24046
  const flags = view.getUint16(pos + 8, true);
24047
24047
  const method = view.getUint16(pos + 10, true);
24048
24048
  const crc = view.getUint32(pos + 16, true);
@@ -24053,7 +24053,7 @@ function parseCentralDirectory(buf) {
24053
24053
  const commentLen = view.getUint16(pos + 32, true);
24054
24054
  const localOffset = view.getUint32(pos + 42, true);
24055
24055
  if (compSize === 4294967295 || uncompSize === 4294967295 || localOffset === 4294967295) {
24056
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
24056
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
24057
24057
  }
24058
24058
  const name = decoder.decode(buf.subarray(pos + 46, pos + 46 + nameLen));
24059
24059
  const cdEnd = pos + 46 + nameLen + extraLen + commentLen;
@@ -24082,11 +24082,11 @@ function patchZipEntries(original, replacements, additions) {
24082
24082
  const { entries, cdOffset, eocdOffset } = parseCentralDirectory(original);
24083
24083
  const view = new DataView(original.buffer, original.byteOffset, original.byteLength);
24084
24084
  for (const name of replacements.keys()) {
24085
- if (!entries.some((e) => e.name === name)) throw new (0, _chunkU6SSH2TGcjs.KordocError)(`ZIP\uC5D0 \uC5C6\uB294 \uC5D4\uD2B8\uB9AC: ${name}`);
24085
+ if (!entries.some((e) => e.name === name)) throw new (0, _chunkFJ45NNLAcjs.KordocError)(`ZIP\uC5D0 \uC5C6\uB294 \uC5D4\uD2B8\uB9AC: ${name}`);
24086
24086
  }
24087
24087
  if (additions) {
24088
24088
  for (const name of additions.keys()) {
24089
- if (entries.some((e) => e.name === name)) throw new (0, _chunkU6SSH2TGcjs.KordocError)(`ZIP\uC5D0 \uC774\uBBF8 \uC788\uB294 \uC5D4\uD2B8\uB9AC: ${name}`);
24089
+ if (entries.some((e) => e.name === name)) throw new (0, _chunkFJ45NNLAcjs.KordocError)(`ZIP\uC5D0 \uC774\uBBF8 \uC788\uB294 \uC5D4\uD2B8\uB9AC: ${name}`);
24090
24090
  }
24091
24091
  }
24092
24092
  const byLocal = [...entries].sort((a, b) => a.localOffset - b.localOffset);
@@ -24105,7 +24105,7 @@ function patchZipEntries(original, replacements, additions) {
24105
24105
  offset += seg.length;
24106
24106
  continue;
24107
24107
  }
24108
- if (view.getUint32(e.localOffset, true) !== LOCAL_SIG) throw new (0, _chunkU6SSH2TGcjs.KordocError)("ZIP \uB85C\uCEEC \uD5E4\uB354 \uC2DC\uADF8\uB2C8\uCC98 \uBD88\uC77C\uCE58");
24108
+ if (view.getUint32(e.localOffset, true) !== LOCAL_SIG) throw new (0, _chunkFJ45NNLAcjs.KordocError)("ZIP \uB85C\uCEEC \uD5E4\uB354 \uC2DC\uADF8\uB2C8\uCC98 \uBD88\uC77C\uCE58");
24109
24109
  const nameLen = view.getUint16(e.localOffset + 26, true);
24110
24110
  const extraLen = view.getUint16(e.localOffset + 28, true);
24111
24111
  const headerLen = 30 + nameLen + extraLen;
@@ -24113,7 +24113,7 @@ function patchZipEntries(original, replacements, additions) {
24113
24113
  const hview = new DataView(header.buffer, header.byteOffset, header.byteLength);
24114
24114
  const method = e.method;
24115
24115
  if (method !== 0 && method !== 8) {
24116
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(`\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 ZIP \uC555\uCD95 \uBC29\uC2DD(method=${method}): ${e.name} \u2014 STORE(0)/DEFLATE(8)\uB9CC \uAD50\uCCB4 \uAC00\uB2A5`);
24116
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(`\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 ZIP \uC555\uCD95 \uBC29\uC2DD(method=${method}): ${e.name} \u2014 STORE(0)/DEFLATE(8)\uB9CC \uAD50\uCCB4 \uAC00\uB2A5`);
24117
24117
  }
24118
24118
  const compData = method === 0 ? newData : new Uint8Array(_zlib.deflateRawSync.call(void 0, newData));
24119
24119
  const crc = crc32(newData);
@@ -24211,11 +24211,11 @@ function patchZipEntries(original, replacements, additions) {
24211
24211
  // src/form/filler-hwpx.ts
24212
24212
  async function fillHwpx(hwpxBuffer, values, blockedLabels) {
24213
24213
  const u8 = new Uint8Array(hwpxBuffer);
24214
- _chunkU6SSH2TGcjs.precheckZipSize.call(void 0, hwpxBuffer);
24214
+ _chunkFJ45NNLAcjs.precheckZipSize.call(void 0, hwpxBuffer);
24215
24215
  const zip = await _jszip2.default.loadAsync(hwpxBuffer);
24216
24216
  const sectionPaths = Object.keys(zip.files).filter((name) => /[Ss]ection\d+\.xml$/i.test(name)).sort();
24217
24217
  if (sectionPaths.length === 0) {
24218
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
24218
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
24219
24219
  }
24220
24220
  const warnings = [];
24221
24221
  const normalizedValues = normalizeValues(values, warnings);
@@ -24607,7 +24607,7 @@ var MIN_SIDE = 24;
24607
24607
  async function ocrEmbeddedImages(blocks, options, warnings) {
24608
24608
  const ocr = _optionalChain([options, 'optionalAccess', _485 => _485.ocr]);
24609
24609
  if (ocr !== true && ocr !== "force" && typeof ocr !== "function") return false;
24610
- const { parseImageDocument } = await Promise.resolve().then(() => _interopRequireWildcard(require("./image-ocr-PN3NFOXH.cjs")));
24610
+ const { parseImageDocument } = await Promise.resolve().then(() => _interopRequireWildcard(require("./image-ocr-DP4YTLGN.cjs")));
24611
24611
  let inserted = false, unreadable = 0;
24612
24612
  let failed = null;
24613
24613
  const walk = async (list, depth) => {
@@ -24648,7 +24648,7 @@ async function ocrEmbeddedImages(blocks, options, warnings) {
24648
24648
  function ocrBytes(img) {
24649
24649
  const mime = img.mimeType.toLowerCase();
24650
24650
  if (mime.includes("wmf") || mime.includes("emf")) return null;
24651
- if (mime.includes("bmp")) return _chunkJYUYW34Pcjs.bmpToPng.call(void 0, img.data);
24651
+ if (mime.includes("bmp")) return _chunkTN4SSNEScjs.bmpToPng.call(void 0, img.data);
24652
24652
  return img.data;
24653
24653
  }
24654
24654
  async function tooSmall(bytes) {
@@ -24817,7 +24817,7 @@ function classifyTableTree(blocks) {
24817
24817
  return blocks;
24818
24818
  }
24819
24819
  function chooseTableRepresentation(table2, opts = {}) {
24820
- const structured = hasMerged(table2) || _chunk37BDHFGXcjs.hasStructuredCellContent.call(void 0, table2);
24820
+ const structured = hasMerged(table2) || _chunkS34OVRKDcjs.hasStructuredCellContent.call(void 0, table2);
24821
24821
  if (opts.smartVisual && _optionalChain([table2, 'access', _501 => _501.classification, 'optionalAccess', _502 => _502.kind]) === "non-tabular-layout") return "visual";
24822
24822
  return structured ? "html" : "gfm";
24823
24823
  }
@@ -35812,7 +35812,7 @@ function findAgency(name) {
35812
35812
  }
35813
35813
  function agencyStyle(name) {
35814
35814
  const s = findAgency(name);
35815
- if (!s) throw new (0, _chunkU6SSH2TGcjs.KordocError)(`agency: \uC2E4\uCE21 \uC11C\uC2DD\uC774 \uC5C6\uB294 \uAE30\uAD00\uC785\uB2C8\uB2E4 "${name}" \u2014 ${AGENCY_COMMON_NAME} \uB610\uB294 ${agencyNames().join("\xB7")}`);
35815
+ if (!s) throw new (0, _chunkFJ45NNLAcjs.KordocError)(`agency: \uC2E4\uCE21 \uC11C\uC2DD\uC774 \uC5C6\uB294 \uAE30\uAD00\uC785\uB2C8\uB2E4 "${name}" \u2014 ${AGENCY_COMMON_NAME} \uB610\uB294 ${agencyNames().join("\xB7")}`);
35816
35816
  return s;
35817
35817
  }
35818
35818
  function applyAgency(opts, preset) {
@@ -36876,7 +36876,7 @@ function needsGaejosikAssets(gongmun) {
36876
36876
  }
36877
36877
  function assertFiniteRange(name, value, min, max) {
36878
36878
  if (!Number.isFinite(value) || value < min || value > max) {
36879
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(`${name} must be a finite number between ${min} and ${max}`);
36879
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(`${name} must be a finite number between ${min} and ${max}`);
36880
36880
  }
36881
36881
  }
36882
36882
  function validateGongmunOptions(opts) {
@@ -36894,10 +36894,10 @@ function validateGongmunOptions(opts) {
36894
36894
  assertFiniteRange(`margins.${side}`, value, 0, 200);
36895
36895
  }
36896
36896
  if (opts.margins.left + opts.margins.right >= 210) {
36897
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("margins.left + margins.right must be less than 210");
36897
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("margins.left + margins.right must be less than 210");
36898
36898
  }
36899
36899
  if (opts.margins.top + opts.margins.bottom >= 297) {
36900
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("margins.top + margins.bottom must be less than 297");
36900
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("margins.top + margins.bottom must be less than 297");
36901
36901
  }
36902
36902
  }
36903
36903
  if (opts.sizes) {
@@ -36906,24 +36906,24 @@ function validateGongmunOptions(opts) {
36906
36906
  }
36907
36907
  }
36908
36908
  if (opts.approval && opts.approval.length > 6) {
36909
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("approval must contain at most 6 labels");
36909
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("approval must contain at most 6 labels");
36910
36910
  }
36911
36911
  if (opts.checklist && typeof opts.checklist === "object") {
36912
36912
  const nums = [..._nullishCoalesce(opts.checklist.na, () => ( [])), ...Object.keys(_nullishCoalesce(opts.checklist.notes, () => ( {}))).map(Number)];
36913
36913
  for (const n of nums) {
36914
- if (!Number.isInteger(n) || n < 1 || n > CHECKLIST_ITEMS) throw new (0, _chunkU6SSH2TGcjs.KordocError)(`checklist: item number must be an integer between 1 and ${CHECKLIST_ITEMS} (got ${n})`);
36914
+ if (!Number.isInteger(n) || n < 1 || n > CHECKLIST_ITEMS) throw new (0, _chunkFJ45NNLAcjs.KordocError)(`checklist: item number must be an integer between 1 and ${CHECKLIST_ITEMS} (got ${n})`);
36915
36915
  }
36916
36916
  }
36917
36917
  if (opts.levels) {
36918
36918
  for (const [key, st] of Object.entries(opts.levels)) {
36919
36919
  const depth = Number(key);
36920
36920
  if (!Number.isInteger(depth) || depth < 0 || depth >= GONGMUN_LEVEL_COUNT) {
36921
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(`levels: depth must be an integer between 0 and ${GONGMUN_LEVEL_COUNT - 1} (got "${key}")`);
36921
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(`levels: depth must be an integer between 0 and ${GONGMUN_LEVEL_COUNT - 1} (got "${key}")`);
36922
36922
  }
36923
- if (!st || typeof st !== "object") throw new (0, _chunkU6SSH2TGcjs.KordocError)(`levels.${key} must be an object {font, pt, bold}`);
36923
+ if (!st || typeof st !== "object") throw new (0, _chunkFJ45NNLAcjs.KordocError)(`levels.${key} must be an object {font, pt, bold}`);
36924
36924
  if (st.pt !== void 0) assertFiniteRange(`levels.${key}.pt`, st.pt, 6, 60);
36925
36925
  if (st.font !== void 0 && (typeof st.font !== "string" || !st.font.trim())) {
36926
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(`levels.${key}.font must be a non-empty string`);
36926
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(`levels.${key}.font must be a non-empty string`);
36927
36927
  }
36928
36928
  }
36929
36929
  }
@@ -36981,7 +36981,7 @@ function resolveChecklist(c, preset) {
36981
36981
  function hexColorOption(name, value) {
36982
36982
  if (value === void 0) return void 0;
36983
36983
  const v = value.trim();
36984
- if (!/^#[0-9a-fA-F]{6}$/.test(v)) throw new (0, _chunkU6SSH2TGcjs.KordocError)(`${name} must be a #RRGGBB color (got "${value}")`);
36984
+ if (!/^#[0-9a-fA-F]{6}$/.test(v)) throw new (0, _chunkFJ45NNLAcjs.KordocError)(`${name} must be a #RRGGBB color (got "${value}")`);
36985
36985
  return v.toUpperCase();
36986
36986
  }
36987
36987
  function resolveGongmun(input) {
@@ -37057,21 +37057,21 @@ function standardMarker(depth, n) {
37057
37057
  case 0:
37058
37058
  return `${n + 1}.`;
37059
37059
  case 1:
37060
- return `${_chunk37BDHFGXcjs.hangulOrdinal.call(void 0, n)}.`;
37060
+ return `${_chunkS34OVRKDcjs.hangulOrdinal.call(void 0, n)}.`;
37061
37061
  case 2:
37062
37062
  return `${n + 1})`;
37063
37063
  case 3:
37064
- return `${_chunk37BDHFGXcjs.hangulOrdinal.call(void 0, n)})`;
37064
+ return `${_chunkS34OVRKDcjs.hangulOrdinal.call(void 0, n)})`;
37065
37065
  case 4:
37066
37066
  return `(${n + 1})`;
37067
37067
  case 5:
37068
- return `(${_chunk37BDHFGXcjs.hangulOrdinal.call(void 0, n)})`;
37068
+ return `(${_chunkS34OVRKDcjs.hangulOrdinal.call(void 0, n)})`;
37069
37069
  case 6:
37070
- return _chunk37BDHFGXcjs.circledNumber.call(void 0, n);
37070
+ return _chunkS34OVRKDcjs.circledNumber.call(void 0, n);
37071
37071
  case 7:
37072
- return _chunk37BDHFGXcjs.circledHangul.call(void 0, n);
37072
+ return _chunkS34OVRKDcjs.circledHangul.call(void 0, n);
37073
37073
  default:
37074
- return _chunk37BDHFGXcjs.circledHangul.call(void 0, n);
37074
+ return _chunkS34OVRKDcjs.circledHangul.call(void 0, n);
37075
37075
  }
37076
37076
  }
37077
37077
  function reportMarker(depth, bullet2 = "\u25CB", asteriskThird = false) {
@@ -37725,7 +37725,7 @@ function parseInlineMarkdown(text) {
37725
37725
  else spans.push(...emphasisSpans(m[0]));
37726
37726
  } else {
37727
37727
  const anchor = m[2] || m[3];
37728
- const href = _nullishCoalesce(_chunkU6SSH2TGcjs.sanitizeHref.call(void 0, m[3].trim()), () => ( void 0));
37728
+ const href = _nullishCoalesce(_chunkFJ45NNLAcjs.sanitizeHref.call(void 0, m[3].trim()), () => ( void 0));
37729
37729
  const sub = emphasisSpans(anchor);
37730
37730
  if (href) for (const s of sub) s.href = href;
37731
37731
  spans.push(...sub);
@@ -37946,7 +37946,7 @@ function assertSequentialIds(rows, label, startId) {
37946
37946
  const m = rows[i].match(/\bid="(\d+)"/);
37947
37947
  const got = m ? Number(m[1]) : NaN;
37948
37948
  if (got !== startId + i) {
37949
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(
37949
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(
37950
37950
  `\uB0B4\uBD80 \uC624\uB958: ${label} id \uD30C\uD2F0\uC158 \uB4DC\uB9AC\uD504\uD2B8 \u2014 ${startId + i} \uC704\uCE58\uC5D0 id=${m ? m[1] : "?"} \uBC29\uCD9C. id \uC0C1\uC218(gen-ids)\uC640 \uC2E4\uC81C \uBC29\uCD9C \uC218\uAC00 \uC5B4\uAE0B\uB0AC\uB2E4 (GJ_CHAR_COUNT\uB958 \uCE74\uC6B4\uD2B8\xB7base \uC0B0\uC220 \uD655\uC778)`
37951
37951
  );
37952
37952
  }
@@ -38037,7 +38037,7 @@ function buildCharProperties(theme, gongmun, ratioVariants = [], extraCharPrXmls
38037
38037
  }
38038
38038
  const expectedBase = charVariantBase(richAssets, !!gongmun);
38039
38039
  if (rows.length !== expectedBase) {
38040
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(
38040
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(
38041
38041
  `\uB0B4\uBD80 \uC624\uB958: charPr \uAE30\uBCF8 \uBE14\uB85D \uBC29\uCD9C \uC218(${rows.length}) \u2260 charVariantBase(${expectedBase}) \u2014 gen-header \uBC29\uCD9C \uD589\uACFC gen-ids \uCE74\uC6B4\uD2B8 \uC0C1\uC218\uAC00 \uC5B4\uAE0B\uB0AC\uB2E4`
38042
38042
  );
38043
38043
  }
@@ -38545,7 +38545,7 @@ function variantMapper(fit, blockIdx, base = CHAR_VARIANT_BASE) {
38545
38545
  const vi = fit.variants.indexOf(r);
38546
38546
  return (id) => id >= 0 && id <= 3 ? base + vi * 4 + id : id;
38547
38547
  }
38548
- var ORDINAL_SYLLABLES = new Set(Array.from({ length: 84 }, (_, i) => _chunk37BDHFGXcjs.hangulOrdinal.call(void 0, i)));
38548
+ var ORDINAL_SYLLABLES = new Set(Array.from({ length: 84 }, (_, i) => _chunkS34OVRKDcjs.hangulOrdinal.call(void 0, i)));
38549
38549
  function literalMarkerDepth(text) {
38550
38550
  const t = text.trimStart();
38551
38551
  let m;
@@ -39046,7 +39046,7 @@ function bestSimInRange(arr, from, to, target) {
39046
39046
  return best;
39047
39047
  }
39048
39048
  function normForMatch(text) {
39049
- return _chunk37BDHFGXcjs.sanitizeText.call(void 0, text.replace(/\\\$/g, "$").replace(/\\(?=<\/?(?:u|sup|sub)>)/g, "")).replace(/\s+/g, " ").trim();
39049
+ return _chunkS34OVRKDcjs.sanitizeText.call(void 0, text.replace(/\\\$/g, "$").replace(/\\(?=<\/?(?:u|sup|sub)>)/g, "")).replace(/\s+/g, " ").trim();
39050
39050
  }
39051
39051
  function unescapeGfm(text) {
39052
39052
  return text.replace(/\\([~*_`|#<$\\])/g, "$1");
@@ -39068,7 +39068,7 @@ function replicateGfmTable(table2) {
39068
39068
  const cell2 = _optionalChain([cells, 'access', _632 => _632[r], 'optionalAccess', _633 => _633[c]]);
39069
39069
  if (!cell2) continue;
39070
39070
  display[r][c] = {
39071
- text: _chunk37BDHFGXcjs.escapeGfm.call(void 0, _chunk37BDHFGXcjs.sanitizeText.call(void 0, cell2.text)).replace(/(?<!\\)\|/g, "\\|").replace(/\r\n|\r|\n/g, "<br>"),
39071
+ text: _chunkS34OVRKDcjs.escapeGfm.call(void 0, _chunkS34OVRKDcjs.sanitizeText.call(void 0, cell2.text)).replace(/(?<!\\)\|/g, "\\|").replace(/\r\n|\r|\n/g, "<br>"),
39072
39072
  gridR: r,
39073
39073
  gridC: c
39074
39074
  };
@@ -39108,16 +39108,16 @@ function replicateCellInnerHtml(cell2) {
39108
39108
  if (_optionalChain([cell2, 'access', _634 => _634.blocks, 'optionalAccess', _635 => _635.length])) {
39109
39109
  return cell2.blocks.map((b) => {
39110
39110
  if (b.type === "table" && b.table) {
39111
- const cap = b.table.caption ? _chunk37BDHFGXcjs.sanitizeText.call(void 0, b.table.caption) : "";
39112
- return (cap ? _chunk37BDHFGXcjs.escapeHtmlCellText.call(void 0, cap) + "<br>" : "") + replicateTableToHtml(b.table);
39111
+ const cap = b.table.caption ? _chunkS34OVRKDcjs.sanitizeText.call(void 0, b.table.caption) : "";
39112
+ return (cap ? _chunkS34OVRKDcjs.escapeHtmlCellText.call(void 0, cap) + "<br>" : "") + replicateTableToHtml(b.table);
39113
39113
  }
39114
- if (b.type === "image" && b.text) return `<img src="${_chunkU6SSH2TGcjs.escapeHtml.call(void 0, b.text, true)}" alt="image">`;
39115
- const note = _chunk37BDHFGXcjs.noteTableHtml.call(void 0, b);
39116
- const t = (_chunk37BDHFGXcjs.sanitizeText.call(void 0, _chunk37BDHFGXcjs.visibleText.call(void 0, b)) + (note ? "" : _chunk37BDHFGXcjs.noteSuffix.call(void 0, b))).trim();
39117
- return ((t ? _chunk37BDHFGXcjs.escapeHtmlCellText.call(void 0, t).replace(/\n/g, "<br>") : "") + note).trim();
39114
+ if (b.type === "image" && b.text) return `<img src="${_chunkFJ45NNLAcjs.escapeHtml.call(void 0, b.text, true)}" alt="image">`;
39115
+ const note = _chunkS34OVRKDcjs.noteTableHtml.call(void 0, b);
39116
+ const t = (_chunkS34OVRKDcjs.sanitizeText.call(void 0, _chunkS34OVRKDcjs.visibleText.call(void 0, b)) + (note ? "" : _chunkS34OVRKDcjs.noteSuffix.call(void 0, b))).trim();
39117
+ return ((t ? _chunkS34OVRKDcjs.escapeHtmlCellText.call(void 0, t).replace(/\n/g, "<br>") : "") + note).trim();
39118
39118
  }).filter(Boolean).join("<br>");
39119
39119
  }
39120
- return _chunk37BDHFGXcjs.escapeHtmlCellText.call(void 0, _chunk37BDHFGXcjs.sanitizeText.call(void 0, cell2.text)).replace(/\n/g, "<br>");
39120
+ return _chunkS34OVRKDcjs.escapeHtmlCellText.call(void 0, _chunkS34OVRKDcjs.sanitizeText.call(void 0, cell2.text)).replace(/\n/g, "<br>");
39121
39121
  }
39122
39122
  function replicateTableToHtml(table2) {
39123
39123
  const rows = replicateHtmlTable(table2);
@@ -39194,7 +39194,7 @@ function parseHtmlTable(raw) {
39194
39194
  const cs = parseInt(_optionalChain([attrs, 'access', _638 => _638.match, 'call', _639 => _639(/colspan\s*=\s*["']?(\d+)/i), 'optionalAccess', _640 => _640[1]]) || "1", 10);
39195
39195
  const rs = parseInt(_optionalChain([attrs, 'access', _641 => _641.match, 'call', _642 => _642(/rowspan\s*=\s*["']?(\d+)/i), 'optionalAccess', _643 => _643[1]]) || "1", 10);
39196
39196
  cellStart = m.index + m[0].length;
39197
- cellInfo = { colSpan: clampSpan(isNaN(cs) ? 1 : cs, _chunk37BDHFGXcjs.MAX_COLS), rowSpan: clampSpan(isNaN(rs) ? 1 : rs, _chunk37BDHFGXcjs.MAX_ROWS) };
39197
+ cellInfo = { colSpan: clampSpan(isNaN(cs) ? 1 : cs, _chunkS34OVRKDcjs.MAX_COLS), rowSpan: clampSpan(isNaN(rs) ? 1 : rs, _chunkS34OVRKDcjs.MAX_ROWS) };
39198
39198
  } else if (cellStart >= 0 && cellInfo && currentRow) {
39199
39199
  currentRow.push({ inner: raw.slice(cellStart, m.index), colSpan: cellInfo.colSpan, rowSpan: cellInfo.rowSpan });
39200
39200
  cellStart = -1;
@@ -39219,11 +39219,11 @@ function htmlCellInnerToLines(inner) {
39219
39219
  work = work.replace(/<img\s(?:"[^"]*"|'[^']*'|[^>"'])*?>/gi, (tag) => {
39220
39220
  const m = /\bsrc\s*=\s*(?:"([^"]*)"|'([^']*)')/i.exec(tag);
39221
39221
  const src = _nullishCoalesce(_optionalChain([m, 'optionalAccess', _644 => _644[1]]), () => ( _optionalChain([m, 'optionalAccess', _645 => _645[2]])));
39222
- if (src) imgSrcs.push(_chunkU6SSH2TGcjs.unescapeHtml.call(void 0, src));
39222
+ if (src) imgSrcs.push(_chunkFJ45NNLAcjs.unescapeHtml.call(void 0, src));
39223
39223
  return "";
39224
39224
  });
39225
39225
  }
39226
- const lines = work.split(/<br\s*\/?>/gi).map((s) => _chunkU6SSH2TGcjs.unescapeHtml.call(void 0, s).trim()).filter((s) => s.length > 0);
39226
+ const lines = work.split(/<br\s*\/?>/gi).map((s) => _chunkFJ45NNLAcjs.unescapeHtml.call(void 0, s).trim()).filter((s) => s.length > 0);
39227
39227
  return { lines, hadNonText, imgSrcs };
39228
39228
  }
39229
39229
  function splitCellByTopLevelTables(html) {
@@ -40039,8 +40039,8 @@ function layoutHtmlRows(rows) {
40039
40039
  let c = 0;
40040
40040
  for (const cell2 of rows[r].cells) {
40041
40041
  while (occupied.has(`${r},${c}`)) c++;
40042
- const colSpan = clampSpan(cell2.colSpan, _chunk37BDHFGXcjs.MAX_COLS);
40043
- const rowSpan = clampSpan(cell2.rowSpan, _chunk37BDHFGXcjs.MAX_ROWS);
40042
+ const colSpan = clampSpan(cell2.colSpan, _chunkS34OVRKDcjs.MAX_COLS);
40043
+ const rowSpan = clampSpan(cell2.rowSpan, _chunkS34OVRKDcjs.MAX_ROWS);
40044
40044
  placed.push({ r, c, colSpan, rowSpan, inner: cell2.inner, isHeader: rows[r].tag === "th" });
40045
40045
  for (let dr = 0; dr < rowSpan; dr++) {
40046
40046
  for (let dc = 0; dc < colSpan; dc++) occupied.add(`${r + dr},${c + dc}`);
@@ -41504,7 +41504,7 @@ function buildMinistryItemBand(n, text, ctx, before2) {
41504
41504
  const base = { font: MINISTRY.bandFont, pt: s.pt, bold: false };
41505
41505
  const f = fitOneLine(plain(text), MINISTRY.bandFont, s.pt, w - 1800, s.pt);
41506
41506
  const styled = f.overflow || f.ratio === 100 && f.spacing === 0 ? base : { ...base, ratio: f.ratio, spacing: f.spacing };
41507
- const runs = ministryRuns(_chunk37BDHFGXcjs.circledNumber.call(void 0, n - 1), text, ctx, styled, MINISTRY.blue, MINISTRY.blue);
41507
+ const runs = ministryRuns(_chunkS34OVRKDcjs.circledNumber.call(void 0, n - 1), text, ctx, styled, MINISTRY.blue, MINISTRY.blue);
41508
41508
  const p = reg.para({ align: "LEFT", lineSp: 130, left: 300 });
41509
41509
  const cell2 = tc({ bf: band, row: 0, col: 0, w, h: s.h, paras: `<hp:p paraPrIDRef="${p}" styleIDRef="0">${runs}</hp:p>`, name: "__kordoc_h5" });
41510
41510
  return host(ftbl([cell2], w, s.h, 1, { bottomGap: 700 }), reg.para({ align: "LEFT", lineSp: 100, before: before2, keepWithNext: true }), reg.char(base));
@@ -42375,7 +42375,7 @@ function builtinTemplateDir() {
42375
42375
  for (const c of candidates) {
42376
42376
  if (_fs.existsSync.call(void 0, _path.join.call(void 0, c, BUILTIN_TEMPLATES[0].file))) return c;
42377
42377
  }
42378
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("\uB0B4\uC7A5 templates \uB514\uB809\uD1A0\uB9AC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4 (\uD328\uD0A4\uC9C0 \uC124\uCE58\uAC00 \uC190\uC0C1\uB418\uC5C8\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4)");
42378
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("\uB0B4\uC7A5 templates \uB514\uB809\uD1A0\uB9AC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4 (\uD328\uD0A4\uC9C0 \uC124\uCE58\uAC00 \uC190\uC0C1\uB418\uC5C8\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4)");
42379
42379
  }
42380
42380
  function readBuiltinTemplate(t) {
42381
42381
  const buf = _fs.readFileSync.call(void 0, _path.join.call(void 0, builtinTemplateDir(), t.file));
@@ -42561,7 +42561,8 @@ function parseRenderStyles(headXml, opts) {
42561
42561
  const before2024 = _optionalChain([opts, 'optionalAccess', _802 => _802.appMajor]) !== void 0 && opts.appMajor > 0 && opts.appMajor < 13;
42562
42562
  const major = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _803 => _803.appMajor]), () => ( 0)), build = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _804 => _804.appBuild]), () => ( 0));
42563
42563
  const halfQuote = major === 12 && build >= 4605 || major === 13 && build >= 3901 || major > 13;
42564
- const styles = { charPr: /* @__PURE__ */ new Map(), paraAlign: /* @__PURE__ */ new Map(), paraGeom: /* @__PURE__ */ new Map(), borderFill: /* @__PURE__ */ new Map(), ...before2024 ? { before2024 } : {} };
42564
+ const early2024 = major === 13 && build > 0 && build < 3622;
42565
+ const styles = { charPr: /* @__PURE__ */ new Map(), paraAlign: /* @__PURE__ */ new Map(), paraGeom: /* @__PURE__ */ new Map(), borderFill: /* @__PURE__ */ new Map(), ...before2024 ? { before2024 } : {}, ...early2024 ? { early2024 } : {} };
42565
42566
  const doc = createXmlParser().parseFromString(headXml, "text/xml");
42566
42567
  const root = doc.documentElement;
42567
42568
  if (!root) return styles;
@@ -42852,12 +42853,12 @@ function buildFloatPicXml(itemId, sizeHu, posXHu, posYHu, ids) {
42852
42853
  return `<hp:pic xmlns:hc="http://www.hancom.co.kr/hwpml/2011/core" id="${ids.id}" zOrder="0" numberingType="PICTURE" textWrap="IN_FRONT_OF_TEXT" textFlow="BOTH_SIDES" lock="0" dropcapstyle="None" href="" groupLevel="0" instid="${ids.instid}" reverse="0"><hp:offset x="0" y="0"/><hp:orgSz width="${w}" height="${h}"/><hp:curSz width="${w}" height="${h}"/><hp:flip horizontal="0" vertical="0"/><hp:rotationInfo angle="0" centerX="${Math.round(w / 2)}" centerY="${Math.round(h / 2)}" rotateimage="1"/><hp:renderingInfo><hc:transMatrix e1="1" e2="0" e3="0" e4="0" e5="1" e6="0"/><hc:scaMatrix e1="1" e2="0" e3="0" e4="0" e5="1" e6="0"/><hc:rotMatrix e1="1" e2="0" e3="0" e4="0" e5="1" e6="0"/></hp:renderingInfo><hp:imgRect><hc:pt0 x="0" y="0"/><hc:pt1 x="${w}" y="0"/><hc:pt2 x="${w}" y="${h}"/><hc:pt3 x="0" y="${h}"/></hp:imgRect><hp:imgClip left="0" right="${w}" top="0" bottom="${h}"/><hp:inMargin left="0" right="0" top="0" bottom="0"/><hp:imgDim dimwidth="${w}" dimheight="${h}"/><hc:img binaryItemIDRef="${itemId}" bright="0" contrast="0" effect="REAL_PIC" alpha="0"/><hp:effects/><hp:sz width="${w}" widthRelTo="ABSOLUTE" height="${h}" heightRelTo="ABSOLUTE" protect="0"/><hp:pos treatAsChar="0" affectLSpacing="0" flowWithText="0" allowOverlap="1" holdAnchorAndSO="0" vertRelTo="PARA" horzRelTo="COLUMN" vertAlign="TOP" horzAlign="LEFT" vertOffset="${posYHu}" horzOffset="${posXHu}"/><hp:outMargin left="0" right="0" top="0" bottom="0"/><hp:shapeComment>kordoc seal</hp:shapeComment></hp:pic>`;
42853
42854
  }
42854
42855
  async function placeSealHwpx(hwpxBuffer, ops) {
42855
- if (ops.length === 0) throw new (0, _chunkU6SSH2TGcjs.KordocError)("place_seal: \uBC30\uCE58\uD560 \uB3C4\uC7A5\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
42856
+ if (ops.length === 0) throw new (0, _chunkFJ45NNLAcjs.KordocError)("place_seal: \uBC30\uCE58\uD560 \uB3C4\uC7A5\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
42856
42857
  const u8 = new Uint8Array(hwpxBuffer);
42857
- _chunkU6SSH2TGcjs.precheckZipSize.call(void 0, hwpxBuffer);
42858
+ _chunkFJ45NNLAcjs.precheckZipSize.call(void 0, hwpxBuffer);
42858
42859
  const zip = await _jszip2.default.loadAsync(hwpxBuffer);
42859
42860
  const sectionPaths = Object.keys(zip.files).filter((name) => /[Ss]ection\d+\.xml$/i.test(name)).sort((a, b) => Number(_nullishCoalesce(_optionalChain([a, 'access', _858 => _858.match, 'call', _859 => _859(/(\d+)\.xml$/i), 'optionalAccess', _860 => _860[1]]), () => ( 0))) - Number(_nullishCoalesce(_optionalChain([b, 'access', _861 => _861.match, 'call', _862 => _862(/(\d+)\.xml$/i), 'optionalAccess', _863 => _863[1]]), () => ( 0))));
42860
- if (sectionPaths.length === 0) throw new (0, _chunkU6SSH2TGcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
42861
+ if (sectionPaths.length === 0) throw new (0, _chunkFJ45NNLAcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
42861
42862
  const manifestPath = Object.keys(zip.files).find((name) => /\.hpf$/i.test(name));
42862
42863
  const headerPath = Object.keys(zip.files).find((name) => /(^|\/)header\.xml$/i.test(name));
42863
42864
  const styles = headerPath ? parseRenderStyles(await readZipEntry(zip.file(headerPath), "text")) : null;
@@ -42898,11 +42899,11 @@ async function placeSealHwpx(hwpxBuffer, ops) {
42898
42899
  const manifestItems = [];
42899
42900
  const placed = [];
42900
42901
  for (const op of ops) {
42901
- if (!op.anchor) throw new (0, _chunkU6SSH2TGcjs.KordocError)("place_seal: anchor \uBB38\uAD6C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4");
42902
- if (!op.image || op.image.length === 0) throw new (0, _chunkU6SSH2TGcjs.KordocError)("place_seal: \uB3C4\uC7A5 \uC774\uBBF8\uC9C0\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4");
42902
+ if (!op.anchor) throw new (0, _chunkFJ45NNLAcjs.KordocError)("place_seal: anchor \uBB38\uAD6C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4");
42903
+ if (!op.image || op.image.length === 0) throw new (0, _chunkFJ45NNLAcjs.KordocError)("place_seal: \uB3C4\uC7A5 \uC774\uBBF8\uC9C0\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4");
42903
42904
  const ext = (_nullishCoalesce(op.ext, () => ( "png"))).toLowerCase();
42904
- if (!MIME[ext]) throw new (0, _chunkU6SSH2TGcjs.KordocError)(`place_seal: \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uC774\uBBF8\uC9C0 \uD655\uC7A5\uC790 .${ext} (png/jpg/bmp/gif)`);
42905
- if (!imageMagicMatches(op.image, ext)) throw new (0, _chunkU6SSH2TGcjs.KordocError)(`place_seal: \uC774\uBBF8\uC9C0 \uB0B4\uC6A9\uC774 .${ext} \uD615\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4 (\uB9E4\uC9C1\uBC14\uC774\uD2B8 \uBD88\uC77C\uCE58)`);
42905
+ if (!MIME[ext]) throw new (0, _chunkFJ45NNLAcjs.KordocError)(`place_seal: \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uC774\uBBF8\uC9C0 \uD655\uC7A5\uC790 .${ext} (png/jpg/bmp/gif)`);
42906
+ if (!imageMagicMatches(op.image, ext)) throw new (0, _chunkFJ45NNLAcjs.KordocError)(`place_seal: \uC774\uBBF8\uC9C0 \uB0B4\uC6A9\uC774 .${ext} \uD615\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4 (\uB9E4\uC9C1\uBC14\uC774\uD2B8 \uBD88\uC77C\uCE58)`);
42906
42907
  const wantOcc = _nullishCoalesce(op.occurrence, () => ( 0));
42907
42908
  let found = null;
42908
42909
  let total = 0;
@@ -42935,7 +42936,7 @@ async function placeSealHwpx(hwpxBuffer, ops) {
42935
42936
  }
42936
42937
  }
42937
42938
  }
42938
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(
42939
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(
42939
42940
  `place_seal: \uC575\uCEE4 "${op.anchor}" ${wantOcc}\uBC88\uC9F8 \uB4F1\uC7A5\uC744 \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4 (\uBCF8\uBB38 \uB0B4 ${total}\uD68C \uB4F1\uC7A5 \u2014 occurrence 0..${Math.max(0, total - 1)})`
42940
42941
  );
42941
42942
  }
@@ -42943,7 +42944,7 @@ async function placeSealHwpx(hwpxBuffer, ops) {
42943
42944
  const xml = sectionXmls[si];
42944
42945
  const run = anchorRunInfo(xml, site.para, op.anchor);
42945
42946
  if (!run) {
42946
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(`place_seal: \uC575\uCEE4 "${op.anchor}" \uBB38\uB2E8\uC5D0\uC11C run\uC744 \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4`);
42947
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(`place_seal: \uC575\uCEE4 "${op.anchor}" \uBB38\uB2E8\uC5D0\uC11C run\uC744 \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4`);
42947
42948
  }
42948
42949
  const charPrHeight = _nullishCoalesce(_optionalChain([styles, 'optionalAccess', _864 => _864.charPr, 'access', _865 => _865.get, 'call', _866 => _866(run.charPr), 'optionalAccess', _867 => _867.height]), () => ( 1e3));
42949
42950
  const fontPt = charPrHeight / 100;
@@ -43221,7 +43222,7 @@ function pick(map, keys) {
43221
43222
  return out;
43222
43223
  }
43223
43224
  async function hwpxToProfile(input) {
43224
- const buf = input instanceof ArrayBuffer ? input : _chunkU6SSH2TGcjs.toArrayBuffer.call(void 0, input);
43225
+ const buf = input instanceof ArrayBuffer ? input : _chunkFJ45NNLAcjs.toArrayBuffer.call(void 0, input);
43225
43226
  const zip = await _jszip2.default.loadAsync(buf);
43226
43227
  const parser = createXmlParser();
43227
43228
  const headerFile = _nullishCoalesce(zip.file("Contents/header.xml"), () => ( _optionalChain([zip, 'access', _892 => _892.file, 'call', _893 => _893(/[Hh]eader\.xml$/), 'optionalAccess', _894 => _894[0]])));
@@ -43523,7 +43524,7 @@ function moneyHangulCheck(m) {
43523
43524
  const n = Number(m[1].replace(/,/g, ""));
43524
43525
  const h = hangulToNumber(m[2].replace(/\s/g, ""));
43525
43526
  if (!Number.isFinite(n) || h === null || h === n) return null;
43526
- return `\uAE08${m[1]}\uC6D0(\uAE08${_chunk37BDHFGXcjs.hangulAmount.call(void 0, n)}\uC6D0)`;
43527
+ return `\uAE08${m[1]}\uC6D0(\uAE08${_chunkS34OVRKDcjs.hangulAmount.call(void 0, n)}\uC6D0)`;
43527
43528
  }
43528
43529
  var RULES = [
43529
43530
  // 날짜 ─ 온점 뒤 한 칸, 0 패딩 금지, 연도 4자리, 끝 마침표
@@ -43810,7 +43811,7 @@ function lintGongmunText(text, opts) {
43810
43811
  }
43811
43812
  function dictSuggest(code, match) {
43812
43813
  const m = match.trim();
43813
- if (code === "MONEY_NO_HANGUL") return `${m} \u2192 ${m}(\uAE08${_chunk37BDHFGXcjs.hangulAmount.call(void 0, m)}\uC6D0)`;
43814
+ if (code === "MONEY_NO_HANGUL") return `${m} \u2192 ${m}(\uAE08${_chunkS34OVRKDcjs.hangulAmount.call(void 0, m)}\uC6D0)`;
43814
43815
  if (code === "DATE_HYPHEN") {
43815
43816
  const d = m.match(/^(\d{4})-(\d{1,2})-(\d{1,2})$/);
43816
43817
  if (d) return `${m} \u2192 ${d[1]}. ${Number(d[2])}. ${Number(d[3])}.`;
@@ -44194,7 +44195,7 @@ function patchTableRows(input) {
44194
44195
  const cells = input.editedCells(ins.ei);
44195
44196
  if (!cells) return skip("\uC0BD\uC785 \uD589\uC5D0 \uC774\uBBF8\uC9C0/\uC911\uCCA9\uD45C \uD3EC\uD568 \u2014 \uD589 \uCD94\uAC00 \uBBF8\uC9C0\uC6D0");
44196
44197
  for (const cell2 of cells) {
44197
- const unstable = cell2.lines.find((l) => _chunk37BDHFGXcjs.sanitizeText.call(void 0, l) !== l);
44198
+ const unstable = cell2.lines.find((l) => _chunkS34OVRKDcjs.sanitizeText.call(void 0, l) !== l);
44198
44199
  if (unstable !== void 0) return skip("\uC0BD\uC785 \uD589\uC5D0 \uACF5\uBC31 \uC815\uADDC\uD654 \uBD88\uC548\uC815 \uD14D\uC2A4\uD2B8 \u2014 \uBBF8\uC9C0\uC6D0");
44199
44200
  }
44200
44201
  const tmplCells = scanTable.rows[template];
@@ -44389,14 +44390,14 @@ function buildEmbeddedLineSplices(para2, xml, newLines) {
44389
44390
  }
44390
44391
  if (text !== para2.text || !/[\r\n]/.test(text) || /<br\s*\/?\s*>/i.test(text)) return null;
44391
44392
  const lines = text.split(/\r\n|\r|\n/);
44392
- if (lines.length !== newLines.length || lines.some((line) => !line.trim() || _chunk37BDHFGXcjs.sanitizeText.call(void 0, line) !== line.trim())) return null;
44393
+ if (lines.length !== newLines.length || lines.some((line) => !line.trim() || _chunkS34OVRKDcjs.sanitizeText.call(void 0, line) !== line.trim())) return null;
44393
44394
  const splices = [];
44394
44395
  let offset = 0;
44395
44396
  for (let i = 0; i < lines.length; i++) {
44396
44397
  const line = lines[i];
44397
44398
  const orig = line.trim();
44398
44399
  const next = newLines[i];
44399
- if (_chunk37BDHFGXcjs.sanitizeText.call(void 0, next) !== next || /[\r\n]/.test(next) || /[\uD800-\uDFFF]/u.test(next) || decodeXmlEntities(escapeXmlText(next)) !== next) return null;
44400
+ if (_chunkS34OVRKDcjs.sanitizeText.call(void 0, next) !== next || /[\r\n]/.test(next) || /[\uD800-\uDFFF]/u.test(next) || decodeXmlEntities(escapeXmlText(next)) !== next) return null;
44400
44401
  let prefix = 0;
44401
44402
  while (prefix < orig.length && prefix < next.length && orig[prefix] === next[prefix]) prefix++;
44402
44403
  if (prefix > 0 && /[\uD800-\uDBFF]/.test(orig[prefix - 1]) && /[\uDC00-\uDFFF]/.test(_nullishCoalesce(orig[prefix], () => ( "")))) prefix--;
@@ -44796,12 +44797,12 @@ function stripCellTokens(text) {
44796
44797
  }
44797
44798
  function patchTextChunkTable(table2, scanTable, orig, edited, ctx, skip) {
44798
44799
  if (table2.rows === 1 && table2.cols === 1) {
44799
- const content = _chunk37BDHFGXcjs.sanitizeText.call(void 0, table2.cells[0][0].text);
44800
+ const content = _chunkS34OVRKDcjs.sanitizeText.call(void 0, table2.cells[0][0].text);
44800
44801
  const replicaLines = content.split(/\n/).map((line) => {
44801
44802
  const t = line.trim();
44802
44803
  if (!t) return "";
44803
- if (/^\d+\.\s/.test(t)) return `**${_chunk37BDHFGXcjs.escapeGfm.call(void 0, t)}**`;
44804
- return _chunk37BDHFGXcjs.escapeGfm.call(void 0, t);
44804
+ if (/^\d+\.\s/.test(t)) return `**${_chunkS34OVRKDcjs.escapeGfm.call(void 0, t)}**`;
44805
+ return _chunkS34OVRKDcjs.escapeGfm.call(void 0, t);
44805
44806
  }).filter(Boolean);
44806
44807
  if (replicaLines.join("\n") !== orig.lines.join("\n")) return skip("\uD45C \uC88C\uD45C \uC7AC\uD604 \uBD88\uC77C\uCE58 \u2014 \uB9E4\uD551 \uC2E0\uB8B0 \uBD88\uAC00");
44807
44808
  if (extractCellTokens(orig.raw) !== extractCellTokens(edited.raw)) return skip("\uC140 \uB0B4 \uC774\uBBF8\uC9C0 \uBCC0\uACBD\uC740 \uBBF8\uC9C0\uC6D0");
@@ -44815,7 +44816,7 @@ function patchTextChunkTable(table2, scanTable, orig, edited, ctx, skip) {
44815
44816
  if (table2.cols === 1 && table2.rows >= 2) {
44816
44817
  const replica = [];
44817
44818
  for (let r = 0; r < table2.rows; r++) {
44818
- const line = _chunk37BDHFGXcjs.escapeGfm.call(void 0, _chunk37BDHFGXcjs.sanitizeText.call(void 0, table2.cells[r][0].text)).replace(/\n/g, " ");
44819
+ const line = _chunkS34OVRKDcjs.escapeGfm.call(void 0, _chunkS34OVRKDcjs.sanitizeText.call(void 0, table2.cells[r][0].text)).replace(/\n/g, " ");
44819
44820
  if (line) replica.push({ line, gridR: r });
44820
44821
  }
44821
44822
  if (replica.map((x) => x.line).join("\n") !== orig.lines.join("\n")) return skip("\uD45C \uC88C\uD45C \uC7AC\uD604 \uBD88\uC77C\uCE58 \u2014 \uB9E4\uD551 \uC2E0\uB8B0 \uBD88\uAC00");
@@ -44869,7 +44870,7 @@ function applyCellEdit(table2, scanTable, gridR, gridC, newLines, ctx, before2,
44869
44870
  }
44870
44871
  const splices = [];
44871
44872
  let sectionIndex = -1;
44872
- const unstable = newLines.find((l) => _chunk37BDHFGXcjs.sanitizeText.call(void 0, l) !== l);
44873
+ const unstable = newLines.find((l) => _chunkS34OVRKDcjs.sanitizeText.call(void 0, l) !== l);
44873
44874
  if (unstable !== void 0) return skip("\uACF5\uBC31 \uC815\uADDC\uD654 \uBD88\uC548\uC815 \uD14D\uC2A4\uD2B8 \u2014 \uD328\uCE58 \uC2DC \uC6D0\uBB38 \uBCF4\uC874 \uBD88\uAC00\uB85C \uBBF8\uC9C0\uC6D0");
44874
44875
  if (nonEmpty.length === 0) {
44875
44876
  if (newLines.length === 0) return 0;
@@ -44993,7 +44994,7 @@ async function resolveSectionEntryNames(zip) {
44993
44994
  const paths = parseSectionPathsFromManifest(xml).filter((p) => zip.file(p) !== null);
44994
44995
  if (paths.length > 0) return paths;
44995
44996
  }
44996
- return Object.keys(zip.files).filter((n) => /[Ss]ection\d+\.xml$/.test(n)).sort(_chunkU6SSH2TGcjs.compareSectionPaths);
44997
+ return Object.keys(zip.files).filter((n) => /[Ss]ection\d+\.xml$/.test(n)).sort(_chunkFJ45NNLAcjs.compareSectionPaths);
44997
44998
  }
44998
44999
 
44999
45000
  // src/roundtrip/hwp5-patch.ts
@@ -45780,7 +45781,7 @@ function patchParagraph(block, orig, edited, ctx, skip) {
45780
45781
  }
45781
45782
  const origPlain = block.text != null ? block.text : restoreBr(textUnitToPlain(orig.raw, block));
45782
45783
  if (newPlain === origPlain) return skip("\uD14D\uC2A4\uD2B8 \uC678 \uBCC0\uACBD(\uD5E4\uB529 \uB808\uBCA8/\uC11C\uC2DD)\uB9CC \uAC10\uC9C0 \u2014 \uC2A4\uD0C0\uC77C \uBCC0\uACBD\uC740 \uBBF8\uC9C0\uC6D0");
45783
- if (_chunk37BDHFGXcjs.sanitizeText.call(void 0, newPlain) !== newPlain) {
45784
+ if (_chunkS34OVRKDcjs.sanitizeText.call(void 0, newPlain) !== newPlain) {
45784
45785
  return skip("\uACF5\uBC31 \uC815\uADDC\uD654 \uBD88\uC548\uC815 \uD14D\uC2A4\uD2B8 \u2014 \uD328\uCE58 \uC2DC \uC6D0\uBB38 \uBCF4\uC874 \uBD88\uAC00\uB85C \uBBF8\uC9C0\uC6D0");
45785
45786
  }
45786
45787
  let origMd = restoreBr(textUnitToPlain(orig.raw, block));
@@ -45827,7 +45828,7 @@ function patchGfmCells(scanTable, orig, edited, ctx, skip) {
45827
45828
  cellSkip("\uC140 \uD14D\uC2A4\uD2B8 \uBD88\uC77C\uCE58 \u2014 \uC18C\uC2A4\uB9F5 \uC2E0\uB8B0 \uBD88\uAC00");
45828
45829
  continue;
45829
45830
  }
45830
- if (afterEach.some((l) => _chunk37BDHFGXcjs.sanitizeText.call(void 0, l) !== l)) {
45831
+ if (afterEach.some((l) => _chunkS34OVRKDcjs.sanitizeText.call(void 0, l) !== l)) {
45831
45832
  cellSkip("\uACF5\uBC31 \uC815\uADDC\uD654 \uBD88\uC548\uC815 \uD14D\uC2A4\uD2B8 \u2014 \uBBF8\uC9C0\uC6D0");
45832
45833
  continue;
45833
45834
  }
@@ -45855,7 +45856,7 @@ function patchGfmCells(scanTable, orig, edited, ctx, skip) {
45855
45856
  cellSkip("\uC140 \uD14D\uC2A4\uD2B8 \uBD88\uC77C\uCE58 \u2014 \uC18C\uC2A4\uB9F5 \uC2E0\uB8B0 \uBD88\uAC00");
45856
45857
  break;
45857
45858
  }
45858
- if (_chunk37BDHFGXcjs.sanitizeText.call(void 0, after2) !== after2) {
45859
+ if (_chunkS34OVRKDcjs.sanitizeText.call(void 0, after2) !== after2) {
45859
45860
  cellSkip("\uACF5\uBC31 \uC815\uADDC\uD654 \uBD88\uC548\uC815 \uD14D\uC2A4\uD2B8 \u2014 \uBBF8\uC9C0\uC6D0");
45860
45861
  break;
45861
45862
  }
@@ -45911,12 +45912,12 @@ function patchHtmlCells5(table2, scanTable, orig, edited, ctx, skip) {
45911
45912
  }
45912
45913
  function patchTextChunk5(table2, scanTable, orig, edited, ctx, skip) {
45913
45914
  if (table2.rows === 1 && table2.cols === 1) {
45914
- const content = _chunk37BDHFGXcjs.sanitizeText.call(void 0, table2.cells[0][0].text);
45915
+ const content = _chunkS34OVRKDcjs.sanitizeText.call(void 0, table2.cells[0][0].text);
45915
45916
  const replicaLines = content.split(/\n/).map((line) => {
45916
45917
  const t = line.trim();
45917
45918
  if (!t) return "";
45918
- if (/^\d+\.\s/.test(t)) return `**${_chunk37BDHFGXcjs.escapeGfm.call(void 0, t)}**`;
45919
- return _chunk37BDHFGXcjs.escapeGfm.call(void 0, t);
45919
+ if (/^\d+\.\s/.test(t)) return `**${_chunkS34OVRKDcjs.escapeGfm.call(void 0, t)}**`;
45920
+ return _chunkS34OVRKDcjs.escapeGfm.call(void 0, t);
45920
45921
  }).filter(Boolean);
45921
45922
  if (replicaLines.join("\n") !== orig.lines.join("\n")) return skip("\uD45C \uC88C\uD45C \uC7AC\uD604 \uBD88\uC77C\uCE58 \u2014 \uB9E4\uD551 \uC2E0\uB8B0 \uBD88\uAC00");
45922
45923
  if (extractCellTokens(orig.raw) !== extractCellTokens(edited.raw)) return skip("\uC140 \uB0B4 \uC774\uBBF8\uC9C0 \uBCC0\uACBD\uC740 \uBBF8\uC9C0\uC6D0");
@@ -45930,7 +45931,7 @@ function patchTextChunk5(table2, scanTable, orig, edited, ctx, skip) {
45930
45931
  if (table2.cols === 1 && table2.rows >= 2) {
45931
45932
  const replica = [];
45932
45933
  for (let r = 0; r < table2.rows; r++) {
45933
- const line = _chunk37BDHFGXcjs.escapeGfm.call(void 0, _chunk37BDHFGXcjs.sanitizeText.call(void 0, table2.cells[r][0].text)).replace(/\n/g, " ");
45934
+ const line = _chunkS34OVRKDcjs.escapeGfm.call(void 0, _chunkS34OVRKDcjs.sanitizeText.call(void 0, table2.cells[r][0].text)).replace(/\n/g, " ");
45934
45935
  if (line) replica.push({ line, gridR: r });
45935
45936
  }
45936
45937
  if (replica.map((x) => x.line).join("\n") !== orig.lines.join("\n")) return skip("\uD45C \uC88C\uD45C \uC7AC\uD604 \uBD88\uC77C\uCE58 \u2014 \uB9E4\uD551 \uC2E0\uB8B0 \uBD88\uAC00");
@@ -45971,7 +45972,7 @@ function applyCellEdit5(table2, scanTable, gridR, gridC, newLines, ctx, before2,
45971
45972
  if (origLineCount !== void 0 && nonEmpty.length > 0 && origLineCount !== nonEmpty.length) {
45972
45973
  return skip("\uC140 \uC904 \uACBD\uACC4 \uB9E4\uD551 \uBAA8\uD638 (\uBB38\uB2E8 \uB0B4 \uC904\uBC14\uAFC8) \u2014 \uBBF8\uC9C0\uC6D0");
45973
45974
  }
45974
- const unstable = newLines.find((l) => _chunk37BDHFGXcjs.sanitizeText.call(void 0, l) !== l);
45975
+ const unstable = newLines.find((l) => _chunkS34OVRKDcjs.sanitizeText.call(void 0, l) !== l);
45975
45976
  if (unstable !== void 0) return skip("\uACF5\uBC31 \uC815\uADDC\uD654 \uBD88\uC548\uC815 \uD14D\uC2A4\uD2B8 \u2014 \uD328\uCE58 \uC2DC \uC6D0\uBB38 \uBCF4\uC874 \uBD88\uAC00\uB85C \uBBF8\uC9C0\uC6D0");
45976
45977
  const targets = nonEmpty.length > 0 ? nonEmpty : cell2.paras;
45977
45978
  if (targets.length === 0) return skip("\uC140\uC5D0 \uBB38\uB2E8\uC774 \uC5C6\uC74C \u2014 \uBBF8\uC9C0\uC6D0");
@@ -46373,12 +46374,12 @@ function buildOrigUnits(blocks) {
46373
46374
  const block = blocks[i];
46374
46375
  let consume = 1;
46375
46376
  let chunk;
46376
- if (block.type === "paragraph" && block.text && /^\[별표\s*\d+/.test(_chunk37BDHFGXcjs.sanitizeText.call(void 0, block.text))) {
46377
+ if (block.type === "paragraph" && block.text && /^\[별표\s*\d+/.test(_chunkS34OVRKDcjs.sanitizeText.call(void 0, block.text))) {
46377
46378
  const next = blocks[i + 1];
46378
46379
  if (_optionalChain([next, 'optionalAccess', _969 => _969.type]) === "paragraph" && next.text && /관련\)?$/.test(next.text)) consume = 2;
46379
- chunk = _chunk37BDHFGXcjs.blocksToMarkdown.call(void 0, blocks.slice(i, i + consume));
46380
+ chunk = _chunkS34OVRKDcjs.blocksToMarkdown.call(void 0, blocks.slice(i, i + consume));
46380
46381
  } else {
46381
- chunk = _chunk37BDHFGXcjs.blocksToMarkdown.call(void 0, [block]);
46382
+ chunk = _chunkS34OVRKDcjs.blocksToMarkdown.call(void 0, [block]);
46382
46383
  }
46383
46384
  if (chunk) {
46384
46385
  const subUnits = splitMarkdownUnits(chunk);
@@ -46662,7 +46663,7 @@ function patchParagraphUnit(block, orig, edited, ctx, skip) {
46662
46663
  }
46663
46664
  }
46664
46665
  if (newPlain === origPlain) return skip("\uD14D\uC2A4\uD2B8 \uC678 \uBCC0\uACBD(\uD5E4\uB529 \uB808\uBCA8/\uC11C\uC2DD)\uB9CC \uAC10\uC9C0 \u2014 \uC2A4\uD0C0\uC77C \uBCC0\uACBD\uC740 \uBBF8\uC9C0\uC6D0");
46665
- if (_chunk37BDHFGXcjs.sanitizeText.call(void 0, newPlain) !== newPlain && _chunk37BDHFGXcjs.sanitizeText.call(void 0, origPlain) === origPlain) {
46666
+ if (_chunkS34OVRKDcjs.sanitizeText.call(void 0, newPlain) !== newPlain && _chunkS34OVRKDcjs.sanitizeText.call(void 0, origPlain) === origPlain) {
46666
46667
  return skip("\uACF5\uBC31 \uC815\uADDC\uD654 \uBD88\uC548\uC815 \uD14D\uC2A4\uD2B8 \u2014 \uD328\uCE58 \uC2DC \uC6D0\uBB38 \uBCF4\uC874 \uBD88\uAC00\uB85C \uBBF8\uC9C0\uC6D0");
46667
46668
  }
46668
46669
  const xml = _optionalChain([ctx, 'access', _981 => _981.scans, 'access', _982 => _982[mapping.para.sectionIndex], 'optionalAccess', _983 => _983.xml]);
@@ -46679,14 +46680,14 @@ function textUnitToPlain(raw, block) {
46679
46680
  }
46680
46681
  function textUnitInline(raw, block) {
46681
46682
  let text = raw.split("\n").map((l) => l.trim()).filter(Boolean).join(" ");
46682
- if (block.type === "heading" || block.text && /^\[별표\s*\d+/.test(_chunk37BDHFGXcjs.sanitizeText.call(void 0, block.text))) {
46683
+ if (block.type === "heading" || block.text && /^\[별표\s*\d+/.test(_chunkS34OVRKDcjs.sanitizeText.call(void 0, block.text))) {
46683
46684
  text = text.replace(/^#{1,6}\s+/, "");
46684
46685
  }
46685
46686
  if (block.href) {
46686
46687
  const linkMatch = text.match(/^\[([\s\S]*)\]\([^)]*\)$/);
46687
46688
  if (linkMatch) text = linkMatch[1];
46688
46689
  }
46689
- if (/^\*[^*][\s\S]*\*$/.test(text) && block.text && /^\([^)]*조[^)]*관련\)$/.test(_chunk37BDHFGXcjs.sanitizeText.call(void 0, block.text))) {
46690
+ if (/^\*[^*][\s\S]*\*$/.test(text) && block.text && /^\([^)]*조[^)]*관련\)$/.test(_chunkS34OVRKDcjs.sanitizeText.call(void 0, block.text))) {
46690
46691
  text = text.slice(1, -1);
46691
46692
  }
46692
46693
  return text;
@@ -49234,7 +49235,7 @@ function blocksToChunks(blocks, options) {
49234
49235
  const granularity = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1014 => _1014.granularity]), () => ( "section"));
49235
49236
  const includeCells = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1015 => _1015.includeTableCells]), () => ( false));
49236
49237
  const mdOptions = { tableFormat: _optionalChain([options, 'optionalAccess', _1016 => _1016.tableFormat]) };
49237
- if (_optionalChain([options, 'optionalAccess', _1017 => _1017.tableFormat]) === "gfm") _chunk37BDHFGXcjs.assignTableIds.call(void 0, blocks);
49238
+ if (_optionalChain([options, 'optionalAccess', _1017 => _1017.tableFormat]) === "gfm") _chunkS34OVRKDcjs.assignTableIds.call(void 0, blocks);
49238
49239
  const chunks = [];
49239
49240
  const headingStack = [];
49240
49241
  const listStack = [];
@@ -49248,12 +49249,12 @@ function blocksToChunks(blocks, options) {
49248
49249
  let run = null;
49249
49250
  const flushRun = () => {
49250
49251
  if (!run) return;
49251
- push("text", run.breadcrumb, _chunk37BDHFGXcjs.blocksToMarkdown.call(void 0, run.blocks, mdOptions), [run.start, run.end], run.page);
49252
+ push("text", run.breadcrumb, _chunkS34OVRKDcjs.blocksToMarkdown.call(void 0, run.blocks, mdOptions), [run.start, run.end], run.page);
49252
49253
  run = null;
49253
49254
  };
49254
49255
  for (let i = 0; i < blocks.length; i++) {
49255
49256
  const block = blocks[i];
49256
- const md2 = _chunk37BDHFGXcjs.blocksToMarkdown.call(void 0, [block], mdOptions);
49257
+ const md2 = _chunkS34OVRKDcjs.blocksToMarkdown.call(void 0, [block], mdOptions);
49257
49258
  if (!md2) continue;
49258
49259
  if (block.type === "heading") {
49259
49260
  flushRun();
@@ -49341,7 +49342,7 @@ function u8ToArrayBuffer2(u8) {
49341
49342
  return u8.buffer.slice(u8.byteOffset, u8.byteOffset + u8.byteLength);
49342
49343
  }
49343
49344
  function irCellLines(text) {
49344
- return stripCellTokens(_chunk37BDHFGXcjs.sanitizeText.call(void 0, text)).split("\n").map((s) => s.trim()).filter(Boolean);
49345
+ return stripCellTokens(_chunkS34OVRKDcjs.sanitizeText.call(void 0, text)).split("\n").map((s) => s.trim()).filter(Boolean);
49345
49346
  }
49346
49347
  var HwpxSession = (_class10 = class _HwpxSession {
49347
49348
 
@@ -49601,7 +49602,7 @@ var HwpxSession = (_class10 = class _HwpxSession {
49601
49602
  if (newPlain === "") {
49602
49603
  return skip("\uBE14\uB85D \uBE44\uC6B0\uAE30/\uC0AD\uC81C\uB294 \uBBF8\uC9C0\uC6D0 (v1) \u2014 \uC6D0\uBCF8 \uC720\uC9C0");
49603
49604
  }
49604
- if (_chunk37BDHFGXcjs.sanitizeText.call(void 0, newPlain) !== newPlain) {
49605
+ if (_chunkS34OVRKDcjs.sanitizeText.call(void 0, newPlain) !== newPlain) {
49605
49606
  return skip("\uACF5\uBC31 \uC815\uADDC\uD654 \uBD88\uC548\uC815 \uD14D\uC2A4\uD2B8 \u2014 \uD328\uCE58 \uC2DC \uC6D0\uBB38 \uBCF4\uC874 \uBD88\uAC00\uB85C \uBBF8\uC9C0\uC6D0");
49606
49607
  }
49607
49608
  const splices = buildParagraphSplices(mapping.para, newPlain, _optionalChain([st, 'access', _1037 => _1037.scans, 'access', _1038 => _1038[mapping.para.sectionIndex], 'optionalAccess', _1039 => _1039.xml]));
@@ -49696,7 +49697,7 @@ var md = new (0, _markdownit2.default)({
49696
49697
  });
49697
49698
  var SAFE_RAW_TAG = /^(?:<\/?(?:table|thead|tbody|tfoot|tr|th|td|u)>|<br\s*\/?>|<(?:th|td)(?: (?:colspan|rowspan)="[1-9]\d*"){1,2}>|<img src="(?:images\/(?:[^"'<>\/\s]+\/)?)?image_\d+\.(?:png|jpe?g|gif|webp|bmp)" alt="image">)$/i;
49698
49699
  function sanitizeRawHtml(raw) {
49699
- return raw.replace(/<[^>]*>|</g, (tag) => SAFE_RAW_TAG.test(tag) ? tag : _chunkU6SSH2TGcjs.escapeHtml.call(void 0, tag));
49700
+ return raw.replace(/<[^>]*>|</g, (tag) => SAFE_RAW_TAG.test(tag) ? tag : _chunkFJ45NNLAcjs.escapeHtml.call(void 0, tag));
49700
49701
  }
49701
49702
  md.renderer.rules.html_block = (tokens, idx) => sanitizeRawHtml(tokens[idx].content);
49702
49703
  md.renderer.rules.html_inline = (tokens, idx) => sanitizeRawHtml(tokens[idx].content);
@@ -49704,7 +49705,7 @@ function renderHtml(markdown, options) {
49704
49705
  const preset = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1043 => _1043.preset]), () => ( "default"));
49705
49706
  const css = PRESETS[preset] + (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _1044 => _1044.extraCss]), () => ( "")));
49706
49707
  const body = md.render(markdown);
49707
- const watermark = _optionalChain([options, 'optionalAccess', _1045 => _1045.watermark]) ? `<div class="watermark">${_chunkU6SSH2TGcjs.escapeHtml.call(void 0, options.watermark)}</div>` : "";
49708
+ const watermark = _optionalChain([options, 'optionalAccess', _1045 => _1045.watermark]) ? `<div class="watermark">${_chunkFJ45NNLAcjs.escapeHtml.call(void 0, options.watermark)}</div>` : "";
49708
49709
  const watermarkCss = _optionalChain([options, 'optionalAccess', _1046 => _1046.watermark]) ? `
49709
49710
  .watermark {
49710
49711
  position: fixed;
@@ -49758,13 +49759,13 @@ async function htmlToPdf(html, options) {
49758
49759
  try {
49759
49760
  puppeteer = await Promise.resolve().then(() => _interopRequireWildcard(require("puppeteer-core")));
49760
49761
  } catch (e42) {
49761
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(
49762
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(
49762
49763
  "PDF \uC0DD\uC131\uC5D0 puppeteer-core\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. \uC124\uCE58: npm install puppeteer-core"
49763
49764
  );
49764
49765
  }
49765
49766
  const executablePath = _nullishCoalesce(process.env.PUPPETEER_EXECUTABLE_PATH, () => ( findChromiumPath()));
49766
49767
  if (!executablePath) {
49767
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(
49768
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(
49768
49769
  "Chromium \uC2E4\uD589 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. PUPPETEER_EXECUTABLE_PATH \uD658\uACBD\uBCC0\uC218\uB97C \uC124\uC815\uD558\uC138\uC694."
49769
49770
  );
49770
49771
  }
@@ -49819,7 +49820,7 @@ async function markdownToPdf(markdown, options) {
49819
49820
  return htmlToPdf(html, options);
49820
49821
  }
49821
49822
  async function blocksToPdf(blocks, options) {
49822
- const markdown = _chunk37BDHFGXcjs.blocksToMarkdown.call(void 0, blocks);
49823
+ const markdown = _chunkS34OVRKDcjs.blocksToMarkdown.call(void 0, blocks);
49823
49824
  return markdownToPdf(markdown, options);
49824
49825
  }
49825
49826
 
@@ -50321,13 +50322,15 @@ function splitTableRows(tbl2, top, lim, bodyH, styles, notes) {
50321
50322
  const rows = measureTableRowHeights(tbl2);
50322
50323
  if (rows.length === 0) return void 0;
50323
50324
  const outT = num2(om, "top");
50325
+ const cap = captionOf(tbl2);
50326
+ const capTop = _optionalChain([cap, 'optionalAccess', _1097 => _1097.side]) === "TOP" ? cap.h + cap.gap : 0, capBottom = _optionalChain([cap, 'optionalAccess', _1098 => _1098.side]) === "BOTTOM" ? cap.h + cap.gap : 0;
50324
50327
  let headH = 0;
50325
50328
  if (tbl2.getAttribute("repeatHeader") === "1") {
50326
50329
  const heads = /* @__PURE__ */ new Set();
50327
50330
  for (const c of collectCells(tbl2)) if (c.el.getAttribute("header") === "1") for (let r = c.ra; r < c.ra + c.rs; r++) heads.add(r);
50328
50331
  for (let r = 0; heads.has(r) && r < rows.length; r++) headH += rows[r];
50329
50332
  }
50330
- let y = top + outT, floor = lim, moved = false;
50333
+ let y = top + outT + capTop, floor = lim, moved = false;
50331
50334
  const rowNoteLines = rows.map(() => []);
50332
50335
  let allN = 0, allS = 0;
50333
50336
  if (notes) for (const c of collectCells(tbl2)) for (const fn of Array.from(c.el.getElementsByTagName("hp:footNote"))) {
@@ -50380,25 +50383,25 @@ function splitTableRows(tbl2, top, lim, bodyH, styles, notes) {
50380
50383
  if (record) rebaseSplitCells(record, carries, styles);
50381
50384
  if (moved) splitNotesLast = { n: allN, s: Math.max(0, allS - placed) };
50382
50385
  splitMovedLast = moved;
50383
- return y + outB;
50386
+ return y + capBottom + outB;
50384
50387
  }
50385
50388
  function cellRowRemainder(cells, row, avail, from, record, bases, carries, styles, contH = 0, piece = Infinity) {
50386
50389
  let rem = 0, any = false, placed = false;
50387
50390
  const cuts = [];
50388
50391
  for (const c of cells) {
50389
50392
  if (c.ra !== row || c.rs !== 1 || !c.sub) continue;
50390
- const off = _nullishCoalesce(from.get(c.el), () => ( 0)), base = _nullishCoalesce(_optionalChain([bases, 'optionalAccess', _1097 => _1097.get, 'call', _1098 => _1098(c.el)]), () => ( 0));
50393
+ const off = _nullishCoalesce(from.get(c.el), () => ( 0)), base = _nullishCoalesce(_optionalChain([bases, 'optionalAccess', _1099 => _1099.get, 'call', _1100 => _1100(c.el)]), () => ( 0));
50391
50394
  const limAbs = base + avail - c.marginB - c.marginT;
50392
50395
  let carry = 0, carryFrom = Infinity;
50393
50396
  let splitAt;
50394
50397
  for (let guard = 0; guard < 16; guard++) {
50395
50398
  const f = subFloatBottoms(c.sub).find((f2) => f2.v0 >= off && f2.lineBottom <= limAbs && f2.bottom > limAbs && f2.v0 < carryFrom);
50396
50399
  if (!f) break;
50397
- if (_optionalChain([f, 'access', _1099 => _1099.rows, 'optionalAccess', _1100 => _1100.length])) {
50400
+ if (_optionalChain([f, 'access', _1101 => _1101.rows, 'optionalAccess', _1102 => _1102.length])) {
50398
50401
  let y = f.bottom - f.carry + f.outT, k2 = 0;
50399
50402
  while (k2 < f.rows.length && y + f.rows[k2] <= limAbs) y += f.rows[k2++];
50400
50403
  if (k2 === f.rows.length) break;
50401
- if ((k2 > 0 || _optionalChain([f, 'access', _1101 => _1101.el, 'optionalAccess', _1102 => _1102.getAttribute, 'call', _1103 => _1103("pageBreak")]) === "CELL") && contH > 0 && f.el) {
50404
+ if ((k2 > 0 || _optionalChain([f, 'access', _1103 => _1103.el, 'optionalAccess', _1104 => _1104.getAttribute, 'call', _1105 => _1105("pageBreak")]) === "CELL") && contH > 0 && f.el) {
50402
50405
  const nested = splitTableRows(f.el, f.bottom - f.carry - base, avail - c.marginB - c.marginT, contH - c.marginT - c.marginB, styles);
50403
50406
  const rem2 = _nullishCoalesce(nested, () => ( (k2 > 0 ? f.outT + f.rows.slice(k2).reduce((a, b) => a + b, 0) + f.outB : void 0)));
50404
50407
  if (rem2 !== void 0) {
@@ -50444,9 +50447,9 @@ function cellRowRemainder(cells, row, avail, from, record, bases, carries, style
50444
50447
  }
50445
50448
  if (carry > 0 && cutV > carryFrom) {
50446
50449
  nb -= carry;
50447
- const m = _nullishCoalesce(_optionalChain([carries, 'optionalAccess', _1104 => _1104.get, 'call', _1105 => _1105(c.sub)]), () => ( /* @__PURE__ */ new Map()));
50450
+ const m = _nullishCoalesce(_optionalChain([carries, 'optionalAccess', _1106 => _1106.get, 'call', _1107 => _1107(c.sub)]), () => ( /* @__PURE__ */ new Map()));
50448
50451
  m.set(cutV, carry);
50449
- _optionalChain([carries, 'optionalAccess', _1106 => _1106.set, 'call', _1107 => _1107(c.sub, m)]);
50452
+ _optionalChain([carries, 'optionalAccess', _1108 => _1108.set, 'call', _1109 => _1109(c.sub, m)]);
50450
50453
  }
50451
50454
  cuts.push([c.el, base + lines[k][0], nb]);
50452
50455
  rem = Math.max(rem, end + base - nb + c.marginT + c.marginB);
@@ -50455,7 +50458,7 @@ function cellRowRemainder(cells, row, avail, from, record, bases, carries, style
50455
50458
  if (!(any && placed)) return void 0;
50456
50459
  for (const [el, v, nb] of cuts) {
50457
50460
  from.set(el, v);
50458
- _optionalChain([bases, 'optionalAccess', _1108 => _1108.set, 'call', _1109 => _1109(el, nb)]);
50461
+ _optionalChain([bases, 'optionalAccess', _1110 => _1110.set, 'call', _1111 => _1111(el, nb)]);
50459
50462
  }
50460
50463
  if (record) for (const c of cells) {
50461
50464
  if (c.ra !== row || c.rs !== 1 || !c.sub) continue;
@@ -50490,7 +50493,7 @@ function subFloatBottoms(sub) {
50490
50493
  for (const o of elements(run)) {
50491
50494
  if (!OBJ_TAGS.has(ln(o)) || o.getAttribute("textWrap") !== "TOP_AND_BOTTOM") continue;
50492
50495
  const pos = findChildByLocalName(o, "pos");
50493
- if (_optionalChain([pos, 'optionalAccess', _1110 => _1110.getAttribute, 'call', _1111 => _1111("treatAsChar")]) === "1" || (_nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1112 => _1112.getAttribute, 'call', _1113 => _1113("vertRelTo")]), () => ( "PARA"))) !== "PARA") continue;
50496
+ if (_optionalChain([pos, 'optionalAccess', _1112 => _1112.getAttribute, 'call', _1113 => _1113("treatAsChar")]) === "1" || (_nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1114 => _1114.getAttribute, 'call', _1115 => _1115("vertRelTo")]), () => ( "PARA"))) !== "PARA") continue;
50494
50497
  const om = findChildByLocalName(o, "outMargin"), sz = findChildByLocalName(o, "sz");
50495
50498
  const h = (ln(o) === "tbl" ? Math.max(num2(sz, "height"), measureTableHeight(o)) : num2(sz, "height")) + captionExtra(o);
50496
50499
  const vo = num2(pos, "vertOffset"), v0 = num2(seg, "vertpos"), carry = num2(om, "top") + h + num2(om, "bottom");
@@ -50510,11 +50513,11 @@ function subFloatBottoms(sub) {
50510
50513
  }
50511
50514
  function spaceAfterAt(sg, styles) {
50512
50515
  if (!styles) return 0;
50513
- const lsa = sg.parentNode, p = _optionalChain([lsa, 'optionalAccess', _1114 => _1114.parentNode]);
50516
+ const lsa = sg.parentNode, p = _optionalChain([lsa, 'optionalAccess', _1116 => _1116.parentNode]);
50514
50517
  if (!lsa || !p) return 0;
50515
50518
  const segs = elements(lsa).filter((e) => ln(e) === "lineseg");
50516
50519
  if (segs[segs.length - 1] !== sg) return 0;
50517
- return _nullishCoalesce(_optionalChain([styles, 'access', _1115 => _1115.paraGeom, 'access', _1116 => _1116.get, 'call', _1117 => _1117(_nullishCoalesce(p.getAttribute("paraPrIDRef"), () => ( ""))), 'optionalAccess', _1118 => _1118.spaceAfter]), () => ( 0));
50520
+ return _nullishCoalesce(_optionalChain([styles, 'access', _1117 => _1117.paraGeom, 'access', _1118 => _1118.get, 'call', _1119 => _1119(_nullishCoalesce(p.getAttribute("paraPrIDRef"), () => ( ""))), 'optionalAccess', _1120 => _1120.spaceAfter]), () => ( 0));
50518
50521
  }
50519
50522
  function rebaseSplitCells(record, carries, styles) {
50520
50523
  for (const [sub, cuts] of record) {
@@ -50532,7 +50535,7 @@ function rebaseSplitCells(record, carries, styles) {
50532
50535
  if (old[i] < c) base = Math.max(base, old[i] + num2(sg, "vertsize") + num2(sg, "spacing") + spaceAfterAt(sg, styles));
50533
50536
  });
50534
50537
  for (const f of floats) if (f.v0 < c && f.bottom <= c) base = Math.max(base, f.bottom);
50535
- return base - (_nullishCoalesce(_optionalChain([carries, 'optionalAccess', _1119 => _1119.get, 'call', _1120 => _1120(sub), 'optionalAccess', _1121 => _1121.get, 'call', _1122 => _1122(c)]), () => ( 0)));
50538
+ return base - (_nullishCoalesce(_optionalChain([carries, 'optionalAccess', _1121 => _1121.get, 'call', _1122 => _1122(sub), 'optionalAccess', _1123 => _1123.get, 'call', _1124 => _1124(c)]), () => ( 0)));
50536
50539
  });
50537
50540
  segs.forEach((sg, i) => {
50538
50541
  let j = -1;
@@ -50548,7 +50551,7 @@ function pageBottomReserve(p) {
50548
50551
  for (const o of elements(run)) {
50549
50552
  if (!OBJ_TAGS.has(ln(o)) || o.getAttribute("textWrap") !== "TOP_AND_BOTTOM") continue;
50550
50553
  const pos = findChildByLocalName(o, "pos");
50551
- if (_optionalChain([pos, 'optionalAccess', _1123 => _1123.getAttribute, 'call', _1124 => _1124("treatAsChar")]) === "1" || _optionalChain([pos, 'optionalAccess', _1125 => _1125.getAttribute, 'call', _1126 => _1126("vertRelTo")]) !== "PAGE" || _optionalChain([pos, 'optionalAccess', _1127 => _1127.getAttribute, 'call', _1128 => _1128("vertAlign")]) !== "BOTTOM") continue;
50554
+ if (_optionalChain([pos, 'optionalAccess', _1125 => _1125.getAttribute, 'call', _1126 => _1126("treatAsChar")]) === "1" || _optionalChain([pos, 'optionalAccess', _1127 => _1127.getAttribute, 'call', _1128 => _1128("vertRelTo")]) !== "PAGE" || _optionalChain([pos, 'optionalAccess', _1129 => _1129.getAttribute, 'call', _1130 => _1130("vertAlign")]) !== "BOTTOM") continue;
50552
50555
  const om = findChildByLocalName(o, "outMargin"), sz = findChildByLocalName(o, "sz");
50553
50556
  const h = ln(o) === "tbl" ? Math.max(num2(sz, "height"), measureTableHeight(o)) : num2(sz, "height");
50554
50557
  r = Math.max(r, num2(pos, "vertOffset") + num2(om, "top") + h + num2(om, "bottom"));
@@ -50677,17 +50680,17 @@ function formatHeadNumber2(n, format2) {
50677
50680
  }
50678
50681
  }
50679
50682
  function nextParaNumber(counters, geom) {
50680
- const num4 = _optionalChain([geom, 'optionalAccess', _1129 => _1129.number]);
50683
+ const num4 = _optionalChain([geom, 'optionalAccess', _1131 => _1131.number]);
50681
50684
  if (!num4) return "";
50682
50685
  const cur = _nullishCoalesce(counters.get(num4.id), () => ( []));
50683
50686
  const head = num4.heads.get(num4.level);
50684
- cur[num4.level] = (_nullishCoalesce(cur[num4.level], () => ( (_nullishCoalesce(_optionalChain([head, 'optionalAccess', _1130 => _1130.start]), () => ( 1))) - 1))) + 1;
50687
+ cur[num4.level] = (_nullishCoalesce(cur[num4.level], () => ( (_nullishCoalesce(_optionalChain([head, 'optionalAccess', _1132 => _1132.start]), () => ( 1))) - 1))) + 1;
50685
50688
  cur.length = num4.level + 1;
50686
50689
  counters.set(num4.id, cur);
50687
- return (_nullishCoalesce(_optionalChain([head, 'optionalAccess', _1131 => _1131.text]), () => ( ""))).replace(/\^(\d)?/g, (_m, d) => {
50690
+ return (_nullishCoalesce(_optionalChain([head, 'optionalAccess', _1133 => _1133.text]), () => ( ""))).replace(/\^(\d)?/g, (_m, d) => {
50688
50691
  if (d === void 0) return "";
50689
50692
  const lv = Number(d), h = num4.heads.get(lv);
50690
- return formatHeadNumber2(_nullishCoalesce(_nullishCoalesce(cur[lv], () => ( _optionalChain([h, 'optionalAccess', _1132 => _1132.start]))), () => ( 1)), _nullishCoalesce(_optionalChain([h, 'optionalAccess', _1133 => _1133.format]), () => ( "DIGIT")));
50693
+ return formatHeadNumber2(_nullishCoalesce(_nullishCoalesce(cur[lv], () => ( _optionalChain([h, 'optionalAccess', _1134 => _1134.start]))), () => ( 1)), _nullishCoalesce(_optionalChain([h, 'optionalAccess', _1135 => _1135.format]), () => ( "DIGIT")));
50691
50694
  });
50692
50695
  }
50693
50696
 
@@ -50751,7 +50754,7 @@ function lineBorderBox(model, styles, start, end) {
50751
50754
  let top = 0, all = 0;
50752
50755
  const include = (prId) => {
50753
50756
  const st = prId != null ? styles.charPr.get(prId) : void 0;
50754
- const f = _optionalChain([st, 'optionalAccess', _1134 => _1134.borderFill]) != null ? styles.borderFill.get(st.borderFill) : void 0;
50757
+ const f = _optionalChain([st, 'optionalAccess', _1136 => _1136.borderFill]) != null ? styles.borderFill.get(st.borderFill) : void 0;
50755
50758
  if (!f || !f.top && !f.bottom) return;
50756
50759
  const width = (pt3) => empty ? 2 * Math.trunc(pt3 * 50) : Math.trunc(pt3 * 100);
50757
50760
  const t = f.top ? width(f.top.widthPt) : 0, b = f.bottom ? width(f.bottom.widthPt) : 0;
@@ -50823,11 +50826,11 @@ function glyphWidth(ch, st, fallback = true) {
50823
50826
  let h = rel !== 100 ? mulDiv(st.height, rel, 100) : st.height;
50824
50827
  if (!space && st.script) h = mulDiv(h, 16, 25);
50825
50828
  const ratio = L ? L.ratio : st.ratio;
50826
- const spacing = space ? _nullishCoalesce(_optionalChain([st, 'access', _1135 => _1135.latin, 'optionalAccess', _1136 => _1136.spacing]), () => ( st.spacing)) : L ? L.spacing : st.spacing;
50827
- const face1 = _nullishCoalesce(_optionalChain([L, 'optionalAccess', _1137 => _1137.face]), () => ( st.face));
50829
+ const spacing = space ? _nullishCoalesce(_optionalChain([st, 'access', _1137 => _1137.latin, 'optionalAccess', _1138 => _1138.spacing]), () => ( st.spacing)) : L ? L.spacing : st.spacing;
50830
+ const face1 = _nullishCoalesce(_optionalChain([L, 'optionalAccess', _1139 => _1139.face]), () => ( st.face));
50828
50831
  const face0 = face1 === "Batang" ? st.before2024 ? "\uBC14\uD0D5" : "\uD55C\uCEF4\uBC14\uD0D5" : face1;
50829
50832
  const boldFace = !space && st.bold && (L ? L.hft : st.hft) && face0 && fontHasGlyph(`${face0} Bold`, cp) ? `${face0} Bold` : void 0;
50830
- const oldEm = st.halfQuote && face0 === "\uD734\uBA3C\uBA85\uC870" && (cp === 8220 || cp === 8221) ? 500 : st.halfQuote && !st.before2024 && face0 === "\uD734\uBA3C\uBA85\uC870" && (cp === 8216 || cp === 8217) ? 312 : st.before2024 && face0 && !(face0 === "\uC2E0\uBA85\uC870" && (st.halfQuote || (_optionalChain([L, 'optionalAccess', _1138 => _1138.face]) ? L.hft : st.hft))) ? _optionalChain([BEFORE_2024_WIDTH, 'access', _1139 => _1139[face0], 'optionalAccess', _1140 => _1140[cp]]) : !st.halfQuote && face0 === "\uD734\uBA3C\uBA85\uC870" && cp === 8231 ? _optionalChain([BEFORE_2024_WIDTH, 'access', _1141 => _1141[face0], 'optionalAccess', _1142 => _1142[cp]]) : void 0;
50833
+ const oldEm = st.halfQuote && face0 === "\uD734\uBA3C\uBA85\uC870" && (cp === 8220 || cp === 8221) ? 500 : st.halfQuote && !st.before2024 && face0 === "\uD734\uBA3C\uBA85\uC870" && (cp === 8216 || cp === 8217) ? 312 : st.before2024 && face0 && !(face0 === "\uC2E0\uBA85\uC870" && (st.halfQuote || (_optionalChain([L, 'optionalAccess', _1140 => _1140.face]) ? L.hft : st.hft))) ? _optionalChain([BEFORE_2024_WIDTH, 'access', _1141 => _1141[face0], 'optionalAccess', _1142 => _1142[cp]]) : !st.halfQuote && face0 === "\uD734\uBA3C\uBA85\uC870" && cp === 8231 ? _optionalChain([BEFORE_2024_WIDTH, 'access', _1143 => _1143[face0], 'optionalAccess', _1144 => _1144[cp]]) : void 0;
50831
50834
  const fc = faceClassForReflow(_nullishCoalesce(boldFace, () => ( face0)));
50832
50835
  const fsEm = space && st.fontSpace ? fontSpaceEm(st.face) : void 0;
50833
50836
  if (fsEm !== void 0) {
@@ -50835,7 +50838,7 @@ function glyphWidth(ch, st, fallback = true) {
50835
50838
  const s = spacing ? 4 * mulDiv(Math.trunc(b / 4), spacing, 100) : 0;
50836
50839
  return { w: b + s, sp: s };
50837
50840
  }
50838
- const bAdd = !space && st.bold && !boldFace ? syntheticBoldEm(_nullishCoalesce(_optionalChain([L, 'optionalAccess', _1143 => _1143.face]), () => ( st.face)), L ? L.hft : st.hft) : 0;
50841
+ const bAdd = !space && st.bold && !boldFace ? syntheticBoldEm(_nullishCoalesce(_optionalChain([L, 'optionalAccess', _1145 => _1145.face]), () => ( st.face)), L ? L.hft : st.hft) : 0;
50839
50842
  if (oldEm !== void 0) {
50840
50843
  const b0 = hancomEmWidth(oldEm + bAdd, h, ratio, 0), w0 = spacing ? hancomEmWidth(oldEm + bAdd, h, ratio, spacing) : b0;
50841
50844
  return { w: w0, sp: w0 - b0 };
@@ -50970,16 +50973,16 @@ function reflowPara(p, doc, styles, areaW, startV, mode, zones = [], nums = /* @
50970
50973
  const avail = Math.max(1440, Math.floor(areaW / 4) * 4 - marginL - geom.marginRight);
50971
50974
  const firstWidth = avail;
50972
50975
  const bu = _nullishCoalesce(geom.bullet, () => ( (numText && geom.number ? { ch: numText, ...geom.number } : void 0)));
50973
- const bst = _nullishCoalesce((_optionalChain([bu, 'optionalAccess', _1144 => _1144.charPrId]) != null ? styles.charPr.get(bu.charPrId) : void 0), () => ( domChar));
50976
+ const bst = _nullishCoalesce((_optionalChain([bu, 'optionalAccess', _1146 => _1146.charPrId]) != null ? styles.charPr.get(bu.charPrId) : void 0), () => ( domChar));
50974
50977
  let headW = 0;
50975
50978
  if (bu) for (const ch of bu.ch) headW += glyphWidth(ch, bst, bu.useInstWidth !== false).w;
50976
50979
  const bulletW = bu ? paraHeadAdvance(bu, height, headW) : 0;
50977
- const contBullet = _optionalChain([bu, 'optionalAccess', _1145 => _1145.autoIndent]) ? bulletW : 0;
50978
- const squeeze = _optionalChain([p, 'access', _1146 => _1146.parentNode, 'optionalAccess', _1147 => _1147.getAttribute, 'optionalCall', _1148 => _1148("lineWrap")]) === "SQUEEZE" || !!geom.squeeze;
50980
+ const contBullet = _optionalChain([bu, 'optionalAccess', _1147 => _1147.autoIndent]) ? bulletW : 0;
50981
+ const squeeze = _optionalChain([p, 'access', _1148 => _1148.parentNode, 'optionalAccess', _1149 => _1149.getAttribute, 'optionalCall', _1150 => _1150("lineWrap")]) === "SQUEEZE" || !!geom.squeeze;
50979
50982
  const NO_WRAP = 1e9;
50980
50983
  const intentPos = geom.marginIntent >= avail ? 0 : Math.max(0, geom.marginIntent);
50981
50984
  const firstWrapWidth = squeeze ? NO_WRAP : Math.max(500, avail - (styles.before2024 && bulletW > 0 ? Math.max(intentPos, bulletW) : intentPos + bulletW));
50982
- const condenseUse = !styles.before2024 && (geom.number || geom.bullet) ? 0 : geom.condense;
50985
+ const condenseUse = !styles.before2024 && !styles.early2024 && (geom.number || geom.bullet) ? 0 : geom.condense;
50983
50986
  for (const r of rightTabFit) {
50984
50987
  const edge = avail - bulletW;
50985
50988
  if (r.x + widths[r.wi] + r.after > edge && edge - r.x - r.after >= 0) widths[r.wi] = edge - r.x - r.after;
@@ -50998,7 +51001,7 @@ function reflowPara(p, doc, styles, areaW, startV, mode, zones = [], nums = /* @
50998
51001
  let cellFloatBottom = 0, cellTextBelow = 0;
50999
51002
  const spacesOnly = spacesHost(p);
51000
51003
  const zoneStart = zones.length;
51001
- const OVP = bodyFlow && m.objs.length > 0 && !m.chars.some((c) => c.ch !== "" && c.ch.trim() !== "") && m.objs.every((o) => !o.inline && o.tag === "pic" && o.el.getAttribute("textWrap") === "TOP_AND_BOTTOM" && _optionalChain([findChildByLocalName, 'call', _1149 => _1149(o.el, "pos"), 'optionalAccess', _1150 => _1150.getAttribute, 'call', _1151 => _1151("allowOverlap")]) === "1");
51004
+ const OVP = bodyFlow && m.objs.length > 0 && !m.chars.some((c) => c.ch !== "" && c.ch.trim() !== "") && m.objs.every((o) => !o.inline && o.tag === "pic" && o.el.getAttribute("textWrap") === "TOP_AND_BOTTOM" && _optionalChain([findChildByLocalName, 'call', _1151 => _1151(o.el, "pos"), 'optionalAccess', _1152 => _1152.getAttribute, 'call', _1153 => _1153("allowOverlap")]) === "1");
51002
51005
  const spacesText = bodyFlow && (spacesOnly || !!OVP || bulletEmptyHost(p, geom));
51003
51006
  const textish = m.chars.some((c) => c.ch !== "" && !c.nb && c.ch.trim() !== "") || m.objs.some((o) => o.inline) || spacesText;
51004
51007
  for (const o of m.objs) {
@@ -51008,11 +51011,11 @@ function reflowPara(p, doc, styles, areaW, startV, mode, zones = [], nums = /* @
51008
51011
  const outT = num3(om, "top"), outB = num3(om, "bottom");
51009
51012
  const wrapAttr = _nullishCoalesce(o.el.getAttribute("textWrap"), () => ( ""));
51010
51013
  if (wrapAttr === "BEHIND_TEXT" || wrapAttr === "IN_FRONT_OF_TEXT") continue;
51011
- const vertRel = _nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1152 => _1152.getAttribute, 'call', _1153 => _1153("vertRelTo")]), () => ( "PARA"));
51012
- const paperBand = wrapAttr === "TOP_AND_BOTTOM" && (_nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1154 => _1154.getAttribute, 'call', _1155 => _1155("vertAlign")]), () => ( "TOP"))) === "TOP";
51014
+ const vertRel = _nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1154 => _1154.getAttribute, 'call', _1155 => _1155("vertRelTo")]), () => ( "PARA"));
51015
+ const paperBand = wrapAttr === "TOP_AND_BOTTOM" && (_nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1156 => _1156.getAttribute, 'call', _1157 => _1157("vertAlign")]), () => ( "TOP"))) === "TOP";
51013
51016
  if (vertRel === "PAPER" && bodyFlow && (wrapAttr !== "TOP_AND_BOTTOM" || paperBand)) {
51014
51017
  const [oxL, oyT, paperW] = paperOrigin(p);
51015
- const hRel2 = _nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1156 => _1156.getAttribute, 'call', _1157 => _1157("horzRelTo")]), () => ( "COLUMN")), hAlign2 = _nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1158 => _1158.getAttribute, 'call', _1159 => _1159("horzAlign")]), () => ( "LEFT"));
51018
+ const hRel2 = _nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1158 => _1158.getAttribute, 'call', _1159 => _1159("horzRelTo")]), () => ( "COLUMN")), hAlign2 = _nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1160 => _1160.getAttribute, 'call', _1161 => _1161("horzAlign")]), () => ( "LEFT"));
51016
51019
  const ho2 = num3(pos, "horzOffset"), base2 = hRel2 === "PAPER" ? -oxL : hRel2 === "PARA" ? marginL : 0, span3 = hRel2 === "PAPER" ? paperW : hRel2 === "PARA" ? avail : areaW;
51017
51020
  const x02 = base2 + (hAlign2 === "RIGHT" ? span3 - ho2 - o.width : hAlign2 === "CENTER" ? (span3 - o.width) / 2 + ho2 : ho2);
51018
51021
  const vo0 = Math.max(0, num3(pos, "vertOffset")), top2 = vertRel === "PAPER" ? vo0 - oyT : vo0;
@@ -51026,7 +51029,7 @@ function reflowPara(p, doc, styles, areaW, startV, mode, zones = [], nums = /* @
51026
51029
  const voRaw = num3(pos, "vertOffset"), voSigned = Math.max(0, voRaw >= 2 ** 31 ? voRaw - 2 ** 32 : voRaw);
51027
51030
  const effH = effHOf(o);
51028
51031
  if (wrapAttr === "TOP_AND_BOTTOM") {
51029
- const hR = _nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1160 => _1160.getAttribute, 'call', _1161 => _1161("horzRelTo")]), () => ( "COLUMN")), hA = _nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1162 => _1162.getAttribute, 'call', _1163 => _1163("horzAlign")]), () => ( "LEFT"));
51032
+ const hR = _nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1162 => _1162.getAttribute, 'call', _1163 => _1163("horzRelTo")]), () => ( "COLUMN")), hA = _nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1164 => _1164.getAttribute, 'call', _1165 => _1165("horzAlign")]), () => ( "LEFT"));
51030
51033
  const hoff = num3(pos, "horzOffset"), b0 = hR === "PARA" ? marginL : 0, sp = hR === "PARA" ? avail : areaW;
51031
51034
  const xL = b0 + (hA === "RIGHT" ? sp - hoff - o.width : hA === "CENTER" ? (sp - o.width) / 2 + hoff : hoff);
51032
51035
  if ((hR === "COLUMN" || hR === "PARA") && (xL >= areaW || xL + o.width <= 0)) continue;
@@ -51043,7 +51046,7 @@ function reflowPara(p, doc, styles, areaW, startV, mode, zones = [], nums = /* @
51043
51046
  else cellFloatBottom = Math.max(cellFloatBottom, voSigned + outT + effH + outB);
51044
51047
  continue;
51045
51048
  }
51046
- const hRel = _nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1164 => _1164.getAttribute, 'call', _1165 => _1165("horzRelTo")]), () => ( "COLUMN")), hAlign = _nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1166 => _1166.getAttribute, 'call', _1167 => _1167("horzAlign")]), () => ( "LEFT"));
51049
+ const hRel = _nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1166 => _1166.getAttribute, 'call', _1167 => _1167("horzRelTo")]), () => ( "COLUMN")), hAlign = _nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1168 => _1168.getAttribute, 'call', _1169 => _1169("horzAlign")]), () => ( "LEFT"));
51047
51050
  const ho = num3(pos, "horzOffset"), base = hRel === "PARA" ? marginL : 0, span2 = hRel === "PARA" ? avail : areaW;
51048
51051
  const x0 = base + (hAlign === "RIGHT" ? span2 - ho - o.width : hAlign === "CENTER" ? (span2 - o.width) / 2 + ho : ho);
51049
51052
  const top = startV - (bodyFlow && vertRel === "PARA" && wrapAttr === "SQUARE" ? geom.spaceBefore : 0) + vo;
@@ -51053,7 +51056,7 @@ function reflowPara(p, doc, styles, areaW, startV, mode, zones = [], nums = /* @
51053
51056
  zones.push({ top: nextPage ? -1 : top, bottom: nextPage ? -1 : top + effH + outB, left: xs - omLx, right: xs + o.width + omRx, flow: _nullishCoalesce(o.el.getAttribute("textFlow"), () => ( "BOTH_SIDES")), anchor: nextPage ? void 0 : o.index, carry: outT + effH + outB, ...nextPage ? { nextPage } : {} });
51054
51057
  }
51055
51058
  const hasText = textish;
51056
- const nFloat = m.objs.filter((o) => !o.inline && o.el.getAttribute("textWrap") === "TOP_AND_BOTTOM" && (_nullishCoalesce(_optionalChain([findChildByLocalName, 'call', _1168 => _1168(o.el, "pos"), 'optionalAccess', _1169 => _1169.getAttribute, 'call', _1170 => _1170("vertRelTo")]), () => ( "PARA"))) === "PARA").length;
51059
+ const nFloat = m.objs.filter((o) => !o.inline && o.el.getAttribute("textWrap") === "TOP_AND_BOTTOM" && (_nullishCoalesce(_optionalChain([findChildByLocalName, 'call', _1170 => _1170(o.el, "pos"), 'optionalAccess', _1171 => _1171.getAttribute, 'call', _1172 => _1172("vertRelTo")]), () => ( "PARA"))) === "PARA").length;
51057
51060
  const areaTop = bodyFlow ? startV - (_nullishCoalesce(geom.spaceBefore, () => ( 0))) : startV;
51058
51061
  let floatFloor = 0;
51059
51062
  if (!hasText && nFloat < 2) {
@@ -51180,25 +51183,25 @@ function reflowPara(p, doc, styles, areaW, startV, mode, zones = [], nums = /* @
51180
51183
  const om = findChildByLocalName(o.el, "outMargin");
51181
51184
  const li = lineOf(o.index);
51182
51185
  const h = num3(om, "top") + effHOf(o) + num3(om, "bottom");
51183
- if (o.tag === "tbl" && li > 0 && o.omL + o.width + o.omR > (_nullishCoalesce(_optionalChain([lineWidth, 'optionalCall', _1171 => _1171(li - 1)]), () => ( (li === 1 ? firstWrapWidth : contWidth)))) && /^[\u2060\ufdd0]+$/.test(text.slice(wrap.starts[li - 1], wrap.starts[li]))) collisionHeights[li - 1] = Math.max(_nullishCoalesce(collisionHeights[li - 1], () => ( 0)), h);
51186
+ if (o.tag === "tbl" && li > 0 && o.omL + o.width + o.omR > (_nullishCoalesce(_optionalChain([lineWidth, 'optionalCall', _1173 => _1173(li - 1)]), () => ( (li === 1 ? firstWrapWidth : contWidth)))) && /^[\u2060\ufdd0]+$/.test(text.slice(wrap.starts[li - 1], wrap.starts[li]))) collisionHeights[li - 1] = Math.max(_nullishCoalesce(collisionHeights[li - 1], () => ( 0)), h);
51184
51187
  lineObjH[li] = Math.max(lineObjH[li], h);
51185
- if (_optionalChain([findChildByLocalName, 'call', _1172 => _1172(o.el, "pos"), 'optionalAccess', _1173 => _1173.getAttribute, 'call', _1174 => _1174("affectLSpacing")]) === "1") lineObjLs[li] = true;
51188
+ if (_optionalChain([findChildByLocalName, 'call', _1174 => _1174(o.el, "pos"), 'optionalAccess', _1175 => _1175.getAttribute, 'call', _1176 => _1176("affectLSpacing")]) === "1") lineObjLs[li] = true;
51186
51189
  const bl = o.tag === "equation" ? Number(o.el.getAttribute("baseLine")) : NaN;
51187
51190
  lineObjAsc[li] = Math.max(lineObjAsc[li], Math.round(h * (Number.isFinite(bl) ? bl / 100 : BASELINE_RATIO)));
51188
51191
  }
51189
51192
  const lsa = doc.createElement("hp:linesegarray");
51190
51193
  const subList = p.parentNode;
51191
- const verticalCenter = _optionalChain([subList, 'optionalAccess', _1175 => _1175.getAttribute, 'optionalCall', _1176 => _1176("vertAlign")]) === "CENTER" && ["VERTICAL", "VERTICALALL"].includes(_nullishCoalesce(subList.getAttribute("textDirection"), () => ( "")));
51194
+ const verticalCenter = _optionalChain([subList, 'optionalAccess', _1177 => _1177.getAttribute, 'optionalCall', _1178 => _1178("vertAlign")]) === "CENTER" && ["VERTICAL", "VERTICALALL"].includes(_nullishCoalesce(subList.getAttribute("textDirection"), () => ( "")));
51192
51195
  let v = textStartV;
51193
51196
  let firstAcc = 0;
51194
51197
  const textposOf = wrap.starts.map((startReal, li) => li === 0 ? 0 : startReal < realIdx.length ? realIdx[startReal] : realIdx.length ? m.chars.length : 0);
51195
- const heightOf = (prId) => (prId != null ? _optionalChain([styles, 'access', _1177 => _1177.charPr, 'access', _1178 => _1178.get, 'call', _1179 => _1179(prId), 'optionalAccess', _1180 => _1180.height]) : void 0) || 0;
51198
+ const heightOf = (prId) => (prId != null ? _optionalChain([styles, 'access', _1179 => _1179.charPr, 'access', _1180 => _1180.get, 'call', _1181 => _1181(prId), 'optionalAccess', _1182 => _1182.height]) : void 0) || 0;
51196
51199
  const lineTextH = (li) => {
51197
51200
  const s = textposOf[li], last = li === wrap.starts.length - 1, e = last ? m.chars.length : textposOf[li + 1];
51198
51201
  let h = 0;
51199
51202
  for (let k = s; k < e; k++) h = Math.max(h, heightOf(m.chars[k].prId));
51200
51203
  for (const r of m.runs) if (r.at >= s && (last ? r.at <= e : r.at < e)) h = Math.max(h, heightOf(r.prId));
51201
- if (li === 0 && _optionalChain([bu, 'optionalAccess', _1181 => _1181.charPrId]) != null) h = Math.max(h, heightOf(bu.charPrId));
51204
+ if (li === 0 && _optionalChain([bu, 'optionalAccess', _1183 => _1183.charPrId]) != null) h = Math.max(h, heightOf(bu.charPrId));
51202
51205
  return h || height;
51203
51206
  };
51204
51207
  const fontLineOf = (li) => {
@@ -51248,7 +51251,7 @@ function reflowPara(p, doc, styles, areaW, startV, mode, zones = [], nums = /* @
51248
51251
  }
51249
51252
  const vertpos = v;
51250
51253
  const nextStart = textposOf[li + 1], nextChar = m.chars[nextStart];
51251
- const boundaryH = !m.objs.length && !geom.fontLineHeight && _optionalChain([nextChar, 'optionalAccess', _1182 => _1182.ch, 'access', _1183 => _1183.trim, 'call', _1184 => _1184()]) && m.runs.some((r) => r.at === nextStart && r.prId === nextChar.prId) ? heightOf(nextChar.prId) : 0;
51254
+ const boundaryH = !m.objs.length && !geom.fontLineHeight && _optionalChain([nextChar, 'optionalAccess', _1184 => _1184.ch, 'access', _1185 => _1185.trim, 'call', _1186 => _1186()]) && m.runs.some((r) => r.at === nextStart && r.prId === nextChar.prId) ? heightOf(nextChar.prId) : 0;
51252
51255
  const occupiedH = Math.max(lineH, _nullishCoalesce(collisionHeights[li], () => ( 0)), boundaryH);
51253
51256
  v += lineH + spacing;
51254
51257
  const isFirst = li === 0;
@@ -51260,7 +51263,7 @@ function reflowPara(p, doc, styles, areaW, startV, mode, zones = [], nums = /* @
51260
51263
  seg.setAttribute("baseline", String(geom.vertAlign === "TOP" ? 0 : geom.vertAlign === "CENTER" || verticalCenter && (!geom.vertAlign || geom.vertAlign === "BASELINE") ? Math.floor(lineH / 2) : geom.vertAlign === "BOTTOM" ? lineH : Math.max(fl ? fl[1] : Math.round(textH0 * BASELINE_RATIO), boxTop > textH0 ? Math.round(boxTop * BASELINE_RATIO) : 0, lineObjAsc[li])));
51261
51264
  seg.setAttribute("spacing", String(spacing));
51262
51265
  let box = boxAt(li);
51263
- const fit = wrap.starts.length === 1 && lineObjH[li] === 0 ? _optionalChain([lineParts, 'access', _1185 => _1185[li], 'optionalAccess', _1186 => _1186.filter, 'call', _1187 => _1187(([a, b]) => b - a >= 1440)]) : void 0;
51266
+ const fit = wrap.starts.length === 1 && lineObjH[li] === 0 ? _optionalChain([lineParts, 'access', _1187 => _1187[li], 'optionalAccess', _1188 => _1188.filter, 'call', _1189 => _1189(([a, b]) => b - a >= 1440)]) : void 0;
51264
51267
  const parts = fit && fit.length > 1 && natW <= fit[0][1] - fit[0][0] - Math.max(0, geom.marginIntent) ? fit : void 0;
51265
51268
  if (parts) box = [parts[0][0], parts[0][1] - parts[0][0]];
51266
51269
  seg.setAttribute("horzpos", String(box ? box[0] : isFirst ? marginL : contHorz));
@@ -51274,7 +51277,7 @@ function reflowPara(p, doc, styles, areaW, startV, mode, zones = [], nums = /* @
51274
51277
  { text, widths, spacings, slots: realIdx, start: wrap.starts[li], end: _nullishCoalesce(wrap.starts[li + 1], () => ( text.length)) }
51275
51278
  )) continue;
51276
51279
  lsa.appendChild(seg);
51277
- for (const [a, b] of _nullishCoalesce(_optionalChain([parts, 'optionalAccess', _1188 => _1188.slice, 'call', _1189 => _1189(1)]), () => ( []))) {
51280
+ for (const [a, b] of _nullishCoalesce(_optionalChain([parts, 'optionalAccess', _1190 => _1190.slice, 'call', _1191 => _1191(1)]), () => ( []))) {
51278
51281
  const more = seg.cloneNode(false);
51279
51282
  more.setAttribute("textpos", String(m.chars.length + 1));
51280
51283
  more.setAttribute("horzpos", String(a));
@@ -51293,9 +51296,9 @@ function paperOrigin(p) {
51293
51296
  const d = p.ownerDocument;
51294
51297
  const hit = originMemo.get(d);
51295
51298
  if (hit) return hit;
51296
- const pagePr = _nullishCoalesce(_optionalChain([p, 'access', _1190 => _1190.ownerDocument, 'optionalAccess', _1191 => _1191.getElementsByTagName, 'call', _1192 => _1192("hp:pagePr"), 'access', _1193 => _1193[0]]), () => ( null));
51299
+ const pagePr = _nullishCoalesce(_optionalChain([p, 'access', _1192 => _1192.ownerDocument, 'optionalAccess', _1193 => _1193.getElementsByTagName, 'call', _1194 => _1194("hp:pagePr"), 'access', _1195 => _1195[0]]), () => ( null));
51297
51300
  const mg = pagePr ? findChildByLocalName(pagePr, "margin") : null;
51298
- const tb = _optionalChain([pagePr, 'optionalAccess', _1194 => _1194.getAttribute, 'call', _1195 => _1195("gutterType")]) === "TOP_BOTTOM", gut = num3(mg, "gutter");
51301
+ const tb = _optionalChain([pagePr, 'optionalAccess', _1196 => _1196.getAttribute, 'call', _1197 => _1197("gutterType")]) === "TOP_BOTTOM", gut = num3(mg, "gutter");
51299
51302
  const o = [num3(mg, "left", 8504) + (tb ? 0 : gut), num3(mg, "top", 5668) + num3(mg, "header") + (tb ? gut : 0), num3(pagePr, "width", 59528)];
51300
51303
  originMemo.set(d, o);
51301
51304
  return o;
@@ -51312,7 +51315,7 @@ function pageTopBand(p) {
51312
51315
  for (const o of elements2(run)) {
51313
51316
  if (!OBJ_TAGS.has(ln2(o)) || o.getAttribute("textWrap") !== "TOP_AND_BOTTOM") continue;
51314
51317
  const pos = findChildByLocalName(o, "pos");
51315
- if (_optionalChain([pos, 'optionalAccess', _1196 => _1196.getAttribute, 'call', _1197 => _1197("treatAsChar")]) === "1" || _optionalChain([pos, 'optionalAccess', _1198 => _1198.getAttribute, 'call', _1199 => _1199("vertRelTo")]) !== "PAGE" || (_nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1200 => _1200.getAttribute, 'call', _1201 => _1201("vertAlign")]), () => ( "TOP"))) !== "TOP") continue;
51318
+ if (_optionalChain([pos, 'optionalAccess', _1198 => _1198.getAttribute, 'call', _1199 => _1199("treatAsChar")]) === "1" || _optionalChain([pos, 'optionalAccess', _1200 => _1200.getAttribute, 'call', _1201 => _1201("vertRelTo")]) !== "PAGE" || (_nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1202 => _1202.getAttribute, 'call', _1203 => _1203("vertAlign")]), () => ( "TOP"))) !== "TOP") continue;
51316
51319
  const om = findChildByLocalName(o, "outMargin"), sz = findChildByLocalName(o, "sz");
51317
51320
  const h = ln2(o) === "tbl" ? Math.max(num3(sz, "height"), measureTableHeight(o)) : num3(sz, "height");
51318
51321
  const vo = Math.max(0, num3(pos, "vertOffset"));
@@ -51368,7 +51371,7 @@ function footNoteHeights(p, ownOnly = false) {
51368
51371
  let a = fn.parentNode, inSplit = false;
51369
51372
  while (a && a !== p) {
51370
51373
  const e = a;
51371
- if (ln2(e) === "tbl" && (e.getAttribute("pageBreak") === "CELL" || e.getAttribute("pageBreak") === "TABLE") && _optionalChain([findChildByLocalName, 'call', _1202 => _1202(e, "pos"), 'optionalAccess', _1203 => _1203.getAttribute, 'call', _1204 => _1204("treatAsChar")]) !== "1") inSplit = true;
51374
+ if (ln2(e) === "tbl" && (e.getAttribute("pageBreak") === "CELL" || e.getAttribute("pageBreak") === "TABLE") && _optionalChain([findChildByLocalName, 'call', _1204 => _1204(e, "pos"), 'optionalAccess', _1205 => _1205.getAttribute, 'call', _1206 => _1206("treatAsChar")]) !== "1") inSplit = true;
51372
51375
  a = a.parentNode;
51373
51376
  }
51374
51377
  if (inSplit) continue;
@@ -51397,7 +51400,7 @@ function reflowBlockFlow(container, doc, styles, areaW, mode, counter, bodyH) {
51397
51400
  let prevPlaced;
51398
51401
  const bodyFlow = areaW === counter.bodyW && bodyH > 0;
51399
51402
  const vis = bodyH > 0 ? findFirst(container, "visibility") : null;
51400
- const hideFirstEmpty = _optionalChain([vis, 'optionalAccess', _1205 => _1205.getAttribute, 'call', _1206 => _1206("hideFirstEmptyLine")]) === "1";
51403
+ const hideFirstEmpty = _optionalChain([vis, 'optionalAccess', _1207 => _1207.getAttribute, 'call', _1208 => _1208("hideFirstEmptyLine")]) === "1";
51401
51404
  let hidPrev = 0;
51402
51405
  const cellW = areaW;
51403
51406
  let cellCols = 1, cellCol = 0;
@@ -51422,7 +51425,7 @@ function reflowBlockFlow(container, doc, styles, areaW, mode, counter, bodyH) {
51422
51425
  reflowSubListsIn(p, doc, styles, mode, counter, reflowBlockFlow, bodyFlow ? areaW : void 0);
51423
51426
  const g3 = styles.paraGeom.get(_nullishCoalesce(p.getAttribute("paraPrIDRef"), () => ( "")));
51424
51427
  const cursorBefore = cursorV;
51425
- let startV = Math.max(cursorV + prevSpaceAfter + (_nullishCoalesce(_optionalChain([g3, 'optionalAccess', _1207 => _1207.spaceBefore]), () => ( 0))), floatFloor);
51428
+ let startV = Math.max(cursorV + prevSpaceAfter + (_nullishCoalesce(_optionalChain([g3, 'optionalAccess', _1209 => _1209.spaceBefore]), () => ( 0))), floatFloor);
51426
51429
  floatFloor = 0;
51427
51430
  if (bodyH > 0) {
51428
51431
  const [top, bot] = pageTopBand(p);
@@ -51448,13 +51451,13 @@ function reflowBlockFlow(container, doc, styles, areaW, mode, counter, bodyH) {
51448
51451
  const bottom = cachedParagraphBottom(lsa, bodyFlow);
51449
51452
  if (Number.isFinite(bottom)) {
51450
51453
  cursorV = bottom;
51451
- prevSpaceAfter = _nullishCoalesce(_optionalChain([g3, 'optionalAccess', _1208 => _1208.spaceAfter]), () => ( 0));
51454
+ prevSpaceAfter = _nullishCoalesce(_optionalChain([g3, 'optionalAccess', _1210 => _1210.spaceAfter]), () => ( 0));
51452
51455
  }
51453
51456
  }
51454
51457
  continue;
51455
51458
  }
51456
51459
  const paraH = res.paraBottom - startV;
51457
- const explicitBreak = bodyH > 0 && startV > 0 && (p.getAttribute("pageBreak") === "1" || p.getAttribute("columnBreak") === "1" || !!_optionalChain([g3, 'optionalAccess', _1209 => _1209.pageBreakBefore]));
51460
+ const explicitBreak = bodyH > 0 && startV > 0 && (p.getAttribute("pageBreak") === "1" || p.getAttribute("columnBreak") === "1" || !!_optionalChain([g3, 'optionalAccess', _1211 => _1211.pageBreakBefore]));
51458
51461
  const lines = bodyH > 0 ? elements2(_nullishCoalesce(findChildByLocalName(p, "linesegarray"), () => ( p))).filter((e) => ln2(e) === "lineseg") : [];
51459
51462
  const reserve = bodyH > 0 ? pageBottomReserve(p) : 0;
51460
51463
  const fns = bodyH > 0 ? footNoteHeights(p) : [];
@@ -51489,9 +51492,9 @@ function reflowBlockFlow(container, doc, styles, areaW, mode, counter, bodyH) {
51489
51492
  let cut = -1;
51490
51493
  if (!explicitBreak && !firstOver && lines.length > 1) {
51491
51494
  cut = lines.findIndex((seg, i) => i > 0 && lineBottom(seg) > limAt(i) && num3(seg, "vertsize") <= bodyH);
51492
- if (cut > 0 && _optionalChain([g3, 'optionalAccess', _1210 => _1210.widowOrphan]) && lines.length >= 3 && cut === lines.length - 1) cut--;
51495
+ if (cut > 0 && _optionalChain([g3, 'optionalAccess', _1212 => _1212.widowOrphan]) && lines.length >= 3 && cut === lines.length - 1) cut--;
51493
51496
  }
51494
- const orphan = cut === 1 && !!_optionalChain([g3, 'optionalAccess', _1211 => _1211.widowOrphan]) || cut > 0 && !!_optionalChain([g3, 'optionalAccess', _1212 => _1212.keepLines]);
51497
+ const orphan = cut === 1 && !!_optionalChain([g3, 'optionalAccess', _1213 => _1213.widowOrphan]) || cut > 0 && !!_optionalChain([g3, 'optionalAccess', _1214 => _1214.keepLines]);
51495
51498
  if (cut > 0 && !orphan) {
51496
51499
  for (let i = cut; i < lines.length; i++) {
51497
51500
  const seg = lines[i];
@@ -51513,7 +51516,7 @@ function reflowBlockFlow(container, doc, styles, areaW, mode, counter, bodyH) {
51513
51516
  const lsa = findChildByLocalName(p, "linesegarray");
51514
51517
  if (lsa) p.removeChild(lsa);
51515
51518
  const zb = zones.length;
51516
- const sb0 = _nullishCoalesce(_optionalChain([g3, 'optionalAccess', _1213 => _1213.spaceBefore]), () => ( 0));
51519
+ const sb0 = _nullishCoalesce(_optionalChain([g3, 'optionalAccess', _1215 => _1215.spaceBefore]), () => ( 0));
51517
51520
  let moveRes = reflowPara(p, doc, styles, areaW, sb0, mode, zones, new Map([...numsBefore].map(([k, v]) => [k, v.slice()])), true, bodyH);
51518
51521
  const lsaM = findChildByLocalName(p, "linesegarray"), sM = lsaM ? elements2(lsaM).find((e) => ln2(e) === "lineseg") : void 0;
51519
51522
  const vM = sM ? num3(sM, "vertpos") : sb0;
@@ -51533,7 +51536,7 @@ function reflowBlockFlow(container, doc, styles, areaW, mode, counter, bodyH) {
51533
51536
  }
51534
51537
  }
51535
51538
  } else {
51536
- const top = _nullishCoalesce(_optionalChain([g3, 'optionalAccess', _1214 => _1214.spaceBefore]), () => ( 0));
51539
+ const top = _nullishCoalesce(_optionalChain([g3, 'optionalAccess', _1216 => _1216.spaceBefore]), () => ( 0));
51537
51540
  shiftParaVert(p, top - startV);
51538
51541
  cursorV = paraH + top;
51539
51542
  if (bodyH > 0 && (top + paraH > bodyH || squareTableOver(p, top, bodyH))) {
@@ -51545,7 +51548,7 @@ function reflowBlockFlow(container, doc, styles, areaW, mode, counter, bodyH) {
51545
51548
  splitPage = true;
51546
51549
  }
51547
51550
  }
51548
- if (_optionalChain([prevPlaced, 'optionalAccess', _1215 => _1215.keepWithNext]) && prevPlaced.startV > prevPlaced.top) {
51551
+ if (_optionalChain([prevPlaced, 'optionalAccess', _1217 => _1217.keepWithNext]) && prevPlaced.startV > prevPlaced.top) {
51549
51552
  shiftParaVert(prevPlaced.p, prevPlaced.top - prevPlaced.startV);
51550
51553
  const base = prevPlaced.top + prevPlaced.h + prevPlaced.spaceAfter;
51551
51554
  shiftParaVert(p, base);
@@ -51555,12 +51558,12 @@ function reflowBlockFlow(container, doc, styles, areaW, mode, counter, bodyH) {
51555
51558
  } else {
51556
51559
  cursorV = (res.floatFloor > 0 && off === 0 ? res.textBottom : res.paraBottom) + off;
51557
51560
  if (res.floatFloor > 0 && off === 0) floatFloor = res.floatFloor;
51558
- const split = bodyH > 0 && off === 0 && (res.paraBottom > lim || squareTableOver(p, startV, lim)) ? splitFloatTableRemainder(p, startV, limOwn, bodyH, styles, false, { n0: pageNotes + fnsOwn.length, s0: pageFoot + ownSum, area: footArea }) : void 0;
51561
+ const split = bodyH > 0 && off === 0 && (res.paraBottom > lim || squareTableOver(p, startV, lim)) ? splitFloatTableRemainder(p, startV - (_nullishCoalesce(_optionalChain([g3, 'optionalAccess', _1218 => _1218.spaceBefore]), () => ( 0))), limOwn, bodyH, styles, false, { n0: pageNotes + fnsOwn.length, s0: pageFoot + ownSum, area: footArea }) : void 0;
51559
51562
  const tEl = split !== void 0 && splitWhole ? m0Objs(p) : void 0;
51560
51563
  const tVo = tEl ? num3(findChildByLocalName(tEl, "pos"), "vertOffset") : 0;
51561
51564
  const tOm = tEl ? findChildByLocalName(tEl, "outMargin") : null;
51562
51565
  if (tEl && tVo > 0 && tVo < 2 ** 31 && num3(tOm, "top") + measureTableHeight(tEl) + num3(tOm, "bottom") <= bodyH) {
51563
- const tTop = startV - (_nullishCoalesce(_optionalChain([g3, 'optionalAccess', _1216 => _1216.spaceBefore]), () => ( 0))) + tVo;
51566
+ const tTop = startV - (_nullishCoalesce(_optionalChain([g3, 'optionalAccess', _1219 => _1219.spaceBefore]), () => ( 0))) + tVo;
51564
51567
  zones.push({ top: tTop, bottom: Math.max(bodyH + 1, tTop + 1), left: -1e9, right: 1e9, flow: "BOTH_SIDES", carry: split });
51565
51568
  floatFloor = 0;
51566
51569
  cursorV = res.textBottom;
@@ -51587,9 +51590,9 @@ function reflowBlockFlow(container, doc, styles, areaW, mode, counter, bodyH) {
51587
51590
  zones.length = 0;
51588
51591
  splitPage = true;
51589
51592
  }
51590
- } else if (bodyH > 0 && off === 0 && bandTableOver(p, startV - (_nullishCoalesce(_optionalChain([g3, 'optionalAccess', _1217 => _1217.spaceBefore]), () => ( 0))), lim)) {
51593
+ } else if (bodyH > 0 && off === 0 && bandTableOver(p, startV - (_nullishCoalesce(_optionalChain([g3, 'optionalAccess', _1220 => _1220.spaceBefore]), () => ( 0))), lim)) {
51591
51594
  const BU = BUH;
51592
- const split4 = splitFloatTableRemainder(p, startV - (_nullishCoalesce(_optionalChain([g3, 'optionalAccess', _1218 => _1218.spaceBefore]), () => ( 0))), BU ? limOwn : lim, bodyH, styles, true, BU ? { n0: pageNotes + fnsOwn.length, s0: pageFoot + ownSum, area: footArea } : void 0);
51595
+ const split4 = splitFloatTableRemainder(p, startV - (_nullishCoalesce(_optionalChain([g3, 'optionalAccess', _1221 => _1221.spaceBefore]), () => ( 0))), BU ? limOwn : lim, bodyH, styles, true, BU ? { n0: pageNotes + fnsOwn.length, s0: pageFoot + ownSum, area: footArea } : void 0);
51593
51596
  if (split4 !== void 0) {
51594
51597
  cursorV = 0;
51595
51598
  floatFloor = split4;
@@ -51607,7 +51610,7 @@ function reflowBlockFlow(container, doc, styles, areaW, mode, counter, bodyH) {
51607
51610
  }
51608
51611
  const keepCursor = hidden && !explicitBreak;
51609
51612
  hidPrev = hidden ? hidPrev + 1 : 0;
51610
- prevPlaced = off === 0 && !(explicitBreak || firstOver || orphan) ? { p, startV, top: _nullishCoalesce(_optionalChain([g3, 'optionalAccess', _1219 => _1219.spaceBefore]), () => ( 0)), h: paraH, spaceAfter: res.spaceAfter, keepWithNext: !!_optionalChain([g3, 'optionalAccess', _1220 => _1220.keepWithNext]) } : void 0;
51613
+ prevPlaced = off === 0 && !(explicitBreak || firstOver || orphan) ? { p, startV, top: _nullishCoalesce(_optionalChain([g3, 'optionalAccess', _1222 => _1222.spaceBefore]), () => ( 0)), h: paraH, spaceAfter: res.spaceAfter, keepWithNext: !!_optionalChain([g3, 'optionalAccess', _1223 => _1223.keepWithNext]) } : void 0;
51611
51614
  const moved = explicitBreak || firstOver || orphan || off !== 0;
51612
51615
  pageLimit = reserve > 0 ? bodyH - reserve : moved ? bodyH : Math.min(pageLimit, reserve > 0 ? bodyH - reserve : pageLimit);
51613
51616
  if (moved && refs.length && cut > 0 && !orphan && !explicitBreak && !firstOver) {
@@ -51707,7 +51710,7 @@ function flowEndNotes(root, bodyH) {
51707
51710
  if (done.has(f) || raw0 < f.bottom) continue;
51708
51711
  done.add(f);
51709
51712
  if (!(base + f.lineBottom - shift <= bodyH && base + f.bottom - shift > bodyH)) continue;
51710
- if (_optionalChain([f, 'access', _1221 => _1221.rows, 'optionalAccess', _1222 => _1222.length]) && _optionalChain([f, 'access', _1223 => _1223.el, 'optionalAccess', _1224 => _1224.getAttribute, 'call', _1225 => _1225("pageBreak")]) === "CELL") {
51713
+ if (_optionalChain([f, 'access', _1224 => _1224.rows, 'optionalAccess', _1225 => _1225.length]) && _optionalChain([f, 'access', _1226 => _1226.el, 'optionalAccess', _1227 => _1227.getAttribute, 'call', _1228 => _1228("pageBreak")]) === "CELL") {
51711
51714
  let yy = base + f.bottom - f.carry - shift + f.outT, k = 0;
51712
51715
  while (k < f.rows.length && yy + f.rows[k] <= bodyH) yy += f.rows[k++];
51713
51716
  if (k === f.rows.length) continue;
@@ -51774,7 +51777,7 @@ function pageStories(root, masters, paraPages, pageCount, pageBase, geom) {
51774
51777
  const declarations = [];
51775
51778
  const hidden = /* @__PURE__ */ new Map();
51776
51779
  for (const p of elements(root)) if (ln(p) === "p") {
51777
- const page = _nullishCoalesce(_optionalChain([paraPages, 'access', _1226 => _1226.get, 'call', _1227 => _1227(p), 'optionalAccess', _1228 => _1228[0]]), () => ( 0));
51780
+ const page = _nullishCoalesce(_optionalChain([paraPages, 'access', _1229 => _1229.get, 'call', _1230 => _1230(p), 'optionalAccess', _1231 => _1231[0]]), () => ( 0));
51778
51781
  for (const run of elements(p)) if (ln(run) === "run") {
51779
51782
  for (const ctrl of elements(run)) if (ln(ctrl) === "ctrl") {
51780
51783
  for (const el of elements(ctrl)) {
@@ -51794,7 +51797,7 @@ function pageStories(root, masters, paraPages, pageCount, pageBase, geom) {
51794
51797
  const out = [];
51795
51798
  for (let page = 0; page < pageCount; page++) {
51796
51799
  const n = pageBase + page + 1;
51797
- const hides = (name) => _optionalChain([hidden, 'access', _1229 => _1229.get, 'call', _1230 => _1230(page), 'optionalAccess', _1231 => _1231.has, 'call', _1232 => _1232(name)]) === true || page === 0 && num2(visibility, `hideFirst${name}`) !== 0;
51800
+ const hides = (name) => _optionalChain([hidden, 'access', _1232 => _1232.get, 'call', _1233 => _1233(page), 'optionalAccess', _1234 => _1234.has, 'call', _1235 => _1235(name)]) === true || page === 0 && num2(visibility, `hideFirst${name}`) !== 0;
51798
51801
  if (!hides("MasterPage")) {
51799
51802
  const matching = masters.filter((m) => m.getAttribute("type") === (n % 2 ? "ODD" : "EVEN"));
51800
51803
  const both = masters.filter((m) => (m.getAttribute("type") || "BOTH") === "BOTH");
@@ -51823,7 +51826,7 @@ function footNoteStories(root, paraPages, geom) {
51823
51826
  const above = num2(sp, "aboveLine", 850), below = num2(sp, "belowLine", 567), between = num2(sp, "betweenNotes", 283);
51824
51827
  const byPage = /* @__PURE__ */ new Map();
51825
51828
  for (const p of elements(root)) if (ln(p) === "p") {
51826
- const page = _nullishCoalesce(_optionalChain([paraPages, 'access', _1233 => _1233.get, 'call', _1234 => _1234(p), 'optionalAccess', _1235 => _1235[0]]), () => ( 0));
51829
+ const page = _nullishCoalesce(_optionalChain([paraPages, 'access', _1236 => _1236.get, 'call', _1237 => _1237(p), 'optionalAccess', _1238 => _1238[0]]), () => ( 0));
51827
51830
  for (const run of elements(p)) if (ln(run) === "run") {
51828
51831
  for (const ctrl of elements(run)) if (ln(ctrl) === "ctrl") {
51829
51832
  const fn = findChildByLocalName(ctrl, "footNote");
@@ -51841,12 +51844,12 @@ function footNoteStories(root, paraPages, geom) {
51841
51844
  }
51842
51845
  }
51843
51846
  const stories = [], rules = [];
51844
- const lenAttr = num2(line, "length", -1), widthMm = Number.parseFloat(_nullishCoalesce(_optionalChain([line, 'optionalAccess', _1236 => _1236.getAttribute, 'call', _1237 => _1237("width")]), () => ( "0.12"))) || 0.12;
51845
- const lineType = _nullishCoalesce(_optionalChain([line, 'optionalAccess', _1238 => _1238.getAttribute, 'call', _1239 => _1239("type")]), () => ( "SOLID"));
51847
+ const lenAttr = num2(line, "length", -1), widthMm = Number.parseFloat(_nullishCoalesce(_optionalChain([line, 'optionalAccess', _1239 => _1239.getAttribute, 'call', _1240 => _1240("width")]), () => ( "0.12"))) || 0.12;
51848
+ const lineType = _nullishCoalesce(_optionalChain([line, 'optionalAccess', _1241 => _1241.getAttribute, 'call', _1242 => _1242("type")]), () => ( "SOLID"));
51846
51849
  for (const [page, notes] of byPage) {
51847
51850
  const area = above + below + notes.reduce((a, n) => a + n.h, 0) + between * (notes.length - 1);
51848
51851
  const top = geom.MT + geom.BODY_H - area;
51849
- if (lineType !== "NONE") rules.push({ page, x: geom.ML, y: top + above, length: lenAttr > 0 ? lenAttr : 14173, widthMm, color: _nullishCoalesce(_optionalChain([line, 'optionalAccess', _1240 => _1240.getAttribute, 'call', _1241 => _1241("color")]), () => ( "#000000")) });
51852
+ if (lineType !== "NONE") rules.push({ page, x: geom.ML, y: top + above, length: lenAttr > 0 ? lenAttr : 14173, widthMm, color: _nullishCoalesce(_optionalChain([line, 'optionalAccess', _1243 => _1243.getAttribute, 'call', _1244 => _1244("color")]), () => ( "#000000")) });
51850
51853
  let y = top + above + below;
51851
51854
  for (const n of notes) {
51852
51855
  stories.push({ sub: n.sub, page, x: geom.ML, y, width: geom.BODY_W });
@@ -51882,8 +51885,8 @@ function endNoteLayout(root, paraPages, geom) {
51882
51885
  let col = nCol > 1 ? Math.min(nCol - 1, Math.max(0, Math.round(num2(last.seg, "horzpos") / (colW + gap)))) : 0;
51883
51886
  let y = num2(last.seg, "vertpos") + num2(last.seg, "vertsize") + above;
51884
51887
  const rules = [];
51885
- const lenAttr = num2(line, "length", -1), widthMm = Number.parseFloat(_nullishCoalesce(_optionalChain([line, 'optionalAccess', _1242 => _1242.getAttribute, 'call', _1243 => _1243("width")]), () => ( "0.12"))) || 0.12;
51886
- if ((_nullishCoalesce(_optionalChain([line, 'optionalAccess', _1244 => _1244.getAttribute, 'call', _1245 => _1245("type")]), () => ( "SOLID"))) !== "NONE") rules.push({ page, x: geom.ML + col * (colW + gap), y: geom.MT + y, length: lenAttr > 0 ? lenAttr : 14173, widthMm, color: _nullishCoalesce(_optionalChain([line, 'optionalAccess', _1246 => _1246.getAttribute, 'call', _1247 => _1247("color")]), () => ( "#000000")) });
51888
+ const lenAttr = num2(line, "length", -1), widthMm = Number.parseFloat(_nullishCoalesce(_optionalChain([line, 'optionalAccess', _1245 => _1245.getAttribute, 'call', _1246 => _1246("width")]), () => ( "0.12"))) || 0.12;
51889
+ if ((_nullishCoalesce(_optionalChain([line, 'optionalAccess', _1247 => _1247.getAttribute, 'call', _1248 => _1248("type")]), () => ( "SOLID"))) !== "NONE") rules.push({ page, x: geom.ML + col * (colW + gap), y: geom.MT + y, length: lenAttr > 0 ? lenAttr : 14173, widthMm, color: _nullishCoalesce(_optionalChain([line, 'optionalAccess', _1249 => _1249.getAttribute, 'call', _1250 => _1250("color")]), () => ( "#000000")) });
51887
51890
  y += below;
51888
51891
  const next = () => {
51889
51892
  if (++col >= nCol) {
@@ -51977,7 +51980,7 @@ function planTableRows(tbl2, cells, rowH, ty, MT, BODY_H, slack = 0, floatSpan,
51977
51980
  return st.length >= 2 && st.reduce((a, f) => a + f.h, 0) > h;
51978
51981
  });
51979
51982
  if (BODY_H <= 0 || ty + rowY[nRows] <= pageBottom + slack && !stackOver) return plain4();
51980
- if (_optionalChain([findChildByLocalName, 'call', _1248 => _1248(tbl2, "pos"), 'optionalAccess', _1249 => _1249.getAttribute, 'call', _1250 => _1250("treatAsChar")]) === "1") {
51983
+ if (_optionalChain([findChildByLocalName, 'call', _1251 => _1251(tbl2, "pos"), 'optionalAccess', _1252 => _1252.getAttribute, 'call', _1253 => _1253("treatAsChar")]) === "1") {
51981
51984
  const declared = num2(findChildByLocalName(tbl2, "sz"), "height") || rowY[nRows];
51982
51985
  if (ty - MT < 2e3 || ty + declared <= pageBottom + slack) return plain4();
51983
51986
  return rowH.map((h, r) => [{ page: 1, y: MT + rowY[r], h }]);
@@ -52033,7 +52036,7 @@ function planTableRows(tbl2, cells, rowH, ty, MT, BODY_H, slack = 0, floatSpan,
52033
52036
  const b = (_nullishCoalesce(boxes.get(c.el), () => ( []))).find((x) => x.part === k);
52034
52037
  if (!b) continue;
52035
52038
  const f = floatSpan(b.seg, y + c.marginT);
52036
- if (_optionalChain([f, 'optionalAccess', _1251 => _1251.el]) && f.pages > 0 && f.pages > lead && Math.abs(contTop + c.marginT + b.top - b.origin - f.endY) < 3e3) {
52039
+ if (_optionalChain([f, 'optionalAccess', _1254 => _1254.el]) && f.pages > 0 && f.pages > lead && Math.abs(contTop + c.marginT + b.top - b.origin - f.endY) < 3e3) {
52037
52040
  lead = f.pages;
52038
52041
  place = /* @__PURE__ */ new Map([[f.el, y + c.marginT]]);
52039
52042
  led.add(b.seg);
@@ -52050,8 +52053,8 @@ function planTableRows(tbl2, cells, rowH, ty, MT, BODY_H, slack = 0, floatSpan,
52050
52053
  for (const c of rowCells) {
52051
52054
  const bs = _nullishCoalesce(boxes.get(c.el), () => ( []));
52052
52055
  const inK = bs.filter((b) => b.part === k), next = bs.find((b) => b.part > k);
52053
- const from = _nullishCoalesce(_nullishCoalesce(_optionalChain([inK, 'access', _1252 => _1252[0], 'optionalAccess', _1253 => _1253.origin]), () => ( _optionalChain([next, 'optionalAccess', _1254 => _1254.origin]))), () => ( Number.POSITIVE_INFINITY));
52054
- range.set(c.el, [from, _nullishCoalesce(_optionalChain([next, 'optionalAccess', _1255 => _1255.top]), () => ( Number.POSITIVE_INFINITY))]);
52056
+ const from = _nullishCoalesce(_nullishCoalesce(_optionalChain([inK, 'access', _1255 => _1255[0], 'optionalAccess', _1256 => _1256.origin]), () => ( _optionalChain([next, 'optionalAccess', _1257 => _1257.origin]))), () => ( Number.POSITIVE_INFINITY));
52057
+ range.set(c.el, [from, _nullishCoalesce(_optionalChain([next, 'optionalAccess', _1258 => _1258.top]), () => ( Number.POSITIVE_INFINITY))]);
52055
52058
  if (inK.length) ext = Math.max(ext, inK[inK.length - 1].bottom - from + c.marginT + c.marginB);
52056
52059
  if (inK.length && next) toNext = Math.max(toNext, next.top - from + c.marginT + c.marginB);
52057
52060
  }
@@ -52062,7 +52065,7 @@ function planTableRows(tbl2, cells, rowH, ty, MT, BODY_H, slack = 0, floatSpan,
52062
52065
  if (!last) {
52063
52066
  let span2 = 0, spanEnd = 0;
52064
52067
  if (floatSpan) for (const c of rowCells) {
52065
- const bs = (_nullishCoalesce(boxes.get(c.el), () => ( []))).filter((b) => b.part === k), from = _nullishCoalesce(_optionalChain([bs, 'access', _1256 => _1256[0], 'optionalAccess', _1257 => _1257.origin]), () => ( 0));
52068
+ const bs = (_nullishCoalesce(boxes.get(c.el), () => ( []))).filter((b) => b.part === k), from = _nullishCoalesce(_optionalChain([bs, 'access', _1259 => _1259[0], 'optionalAccess', _1260 => _1260.origin]), () => ( 0));
52066
52069
  for (const b of bs) {
52067
52070
  if (led.has(b.seg)) continue;
52068
52071
  const f = floatSpan(b.seg, y + c.marginT + b.top - from);
@@ -52227,7 +52230,7 @@ function objectGeometry(el, x, y, w, h, boxW = w, boxH = h) {
52227
52230
  function shapeFill(el, defs, images, warn) {
52228
52231
  const brush = findChildByLocalName(el, "fillBrush");
52229
52232
  const win = brush && findChildByLocalName(brush, "winBrush");
52230
- const face = _optionalChain([win, 'optionalAccess', _1258 => _1258.getAttribute, 'call', _1259 => _1259("faceColor")]);
52233
+ const face = _optionalChain([win, 'optionalAccess', _1261 => _1261.getAttribute, 'call', _1262 => _1262("faceColor")]);
52231
52234
  if (docColor(face)) return esc(face);
52232
52235
  const grad = brush && findChildByLocalName(brush, "gradation");
52233
52236
  if (grad) {
@@ -52278,8 +52281,8 @@ function shapeGeometry(o, boxX, boxY, defs, images, warn, local = false) {
52278
52281
  const geometry = local ? { x: boxX, y: boxY, w, h, bbox: { x: boxX, y: boxY, w, h }, transform: "" } : objectGeometry(el, boxX, boxY, w, h, o.width || w, o.height || h);
52279
52282
  const { x, y } = geometry;
52280
52283
  const sx = ow > 0 ? w / ow : 1, sy = oh > 0 ? h / oh : 1;
52281
- const line = findChildByLocalName(el, "lineShape"), style = _nullishCoalesce(_optionalChain([line, 'optionalAccess', _1260 => _1260.getAttribute, 'call', _1261 => _1261("style")]), () => ( "SOLID"));
52282
- const color = esc(docColor(_optionalChain([line, 'optionalAccess', _1262 => _1262.getAttribute, 'call', _1263 => _1263("color")]), "#000000"));
52284
+ const line = findChildByLocalName(el, "lineShape"), style = _nullishCoalesce(_optionalChain([line, 'optionalAccess', _1263 => _1263.getAttribute, 'call', _1264 => _1264("style")]), () => ( "SOLID"));
52285
+ const color = esc(docColor(_optionalChain([line, 'optionalAccess', _1265 => _1265.getAttribute, 'call', _1266 => _1266("color")]), "#000000"));
52283
52286
  const strokeW = style === "NONE" ? 0 : Math.max(0.2, num2(line, "width", 33) / 100 * 2.834645);
52284
52287
  const dash = /DASH|DOT/.test(style) ? ` stroke-dasharray="${style.includes("DOT") ? "1,1.5" : "3,1.5"}"` : "";
52285
52288
  const keepWidth = local ? ` vector-effect="non-scaling-stroke"` : "";
@@ -52546,7 +52549,7 @@ function anchorObject(o, ox, oy, baseV, areaW, ctx, anchorLineV, stayLine = fals
52546
52549
  if (hrel === "PAGE") {
52547
52550
  x = ha === "RIGHT" ? ML + BODY_W - w - ho - omR : ha === "CENTER" ? ML + (BODY_W - w) / 2 + ho : ML + ho + omL;
52548
52551
  } else if (hrel === "PAPER") {
52549
- x = (ha === "RIGHT" ? PW - w - ho - omR : ha === "CENTER" ? (PW - w) / 2 + ho : ho + omL) - (_nullishCoalesce(_optionalChain([ctx, 'access', _1264 => _1264.bodyDx, 'optionalCall', _1265 => _1265(ctx.page)]), () => ( 0)));
52552
+ x = (ha === "RIGHT" ? PW - w - ho - omR : ha === "CENTER" ? (PW - w) / 2 + ho : ho + omL) - (_nullishCoalesce(_optionalChain([ctx, 'access', _1267 => _1267.bodyDx, 'optionalCall', _1268 => _1268(ctx.page)]), () => ( 0)));
52550
52553
  } else {
52551
52554
  x = ha === "RIGHT" ? ox + areaW - w - ho - omR : ha === "CENTER" ? ox + (areaW - w) / 2 + ho : ox + ho + omL;
52552
52555
  }
@@ -52600,10 +52603,10 @@ function planLines(m, styles, numText = "") {
52600
52603
  const align = _nullishCoalesce((m.paraPrId != null ? styles.paraAlign.get(m.paraPrId) : void 0), () => ( "JUSTIFY"));
52601
52604
  const geom = m.paraPrId != null ? styles.paraGeom.get(m.paraPrId) : void 0;
52602
52605
  const hang = geom && geom.marginIntent < 0 ? -geom.marginIntent : 0;
52603
- const bu = _nullishCoalesce(_optionalChain([geom, 'optionalAccess', _1266 => _1266.bullet]), () => ( (numText && _optionalChain([geom, 'optionalAccess', _1267 => _1267.number]) ? { ch: numText, ...geom.number } : void 0)));
52604
- const firstPr = _nullishCoalesce(_optionalChain([m, 'access', _1268 => _1268.chars, 'access', _1269 => _1269.find, 'call', _1270 => _1270((c) => c.ch !== ""), 'optionalAccess', _1271 => _1271.prId]), () => ( null));
52605
- const bst = _nullishCoalesce((_optionalChain([bu, 'optionalAccess', _1272 => _1272.charPrId]) != null ? styles.charPr.get(bu.charPrId) : firstPr != null ? styles.charPr.get(firstPr) : void 0), () => ( DEFAULT_CHAR));
52606
- const headW = _optionalChain([bu, 'optionalAccess', _1273 => _1273.useInstWidth]) === false ? [...bu.ch].reduce((w, ch) => w + glyphWidth(ch, bst, false).w, 0) : bu ? measureTextWidth(bu.ch, bst.height, bst.ratio, { spacingPct: bst.spacing, faceClass: faceClassOf(bst.face) }) : 0;
52606
+ const bu = _nullishCoalesce(_optionalChain([geom, 'optionalAccess', _1269 => _1269.bullet]), () => ( (numText && _optionalChain([geom, 'optionalAccess', _1270 => _1270.number]) ? { ch: numText, ...geom.number } : void 0)));
52607
+ const firstPr = _nullishCoalesce(_optionalChain([m, 'access', _1271 => _1271.chars, 'access', _1272 => _1272.find, 'call', _1273 => _1273((c) => c.ch !== ""), 'optionalAccess', _1274 => _1274.prId]), () => ( null));
52608
+ const bst = _nullishCoalesce((_optionalChain([bu, 'optionalAccess', _1275 => _1275.charPrId]) != null ? styles.charPr.get(bu.charPrId) : firstPr != null ? styles.charPr.get(firstPr) : void 0), () => ( DEFAULT_CHAR));
52609
+ const headW = _optionalChain([bu, 'optionalAccess', _1276 => _1276.useInstWidth]) === false ? [...bu.ch].reduce((w, ch) => w + glyphWidth(ch, bst, false).w, 0) : bu ? measureTextWidth(bu.ch, bst.height, bst.ratio, { spacingPct: bst.spacing, faceClass: faceClassOf(bst.face) }) : 0;
52607
52610
  const bulletW = bu ? paraHeadAdvance(bu, bst.height, headW) : 0;
52608
52611
  const plans = [];
52609
52612
  for (let i = 0; i < m.segs.length; i++) {
@@ -52611,8 +52614,8 @@ function planLines(m, styles, numText = "") {
52611
52614
  const start = seg.textpos;
52612
52615
  const end = i + 1 < m.segs.length ? m.segs[i + 1].textpos : Math.max(m.chars.length, start);
52613
52616
  const tabs = /* @__PURE__ */ new Map();
52614
- const lead = i === 0 ? Math.max(_nullishCoalesce(_optionalChain([geom, 'optionalAccess', _1274 => _1274.marginIntent]), () => ( 0)), 0) + bulletW : hang + (_optionalChain([bu, 'optionalAccess', _1275 => _1275.autoIndent]) ? bulletW : 0);
52615
- let x = (i === 0 ? Math.max(_nullishCoalesce(_optionalChain([geom, 'optionalAccess', _1276 => _1276.marginIntent]), () => ( 0)), 0) : hang) + (i === 0 || _optionalChain([bu, 'optionalAccess', _1277 => _1277.autoIndent]) ? bulletW : 0);
52617
+ const lead = i === 0 ? Math.max(_nullishCoalesce(_optionalChain([geom, 'optionalAccess', _1277 => _1277.marginIntent]), () => ( 0)), 0) + bulletW : hang + (_optionalChain([bu, 'optionalAccess', _1278 => _1278.autoIndent]) ? bulletW : 0);
52618
+ let x = (i === 0 ? Math.max(_nullishCoalesce(_optionalChain([geom, 'optionalAccess', _1279 => _1279.marginIntent]), () => ( 0)), 0) : hang) + (i === 0 || _optionalChain([bu, 'optionalAccess', _1280 => _1280.autoIndent]) ? bulletW : 0);
52616
52619
  let fixedTo = start;
52617
52620
  let fixedW = 0;
52618
52621
  for (let k = start; k < end && k < m.chars.length; k++) {
@@ -52708,7 +52711,7 @@ function drawPara(p, ox, oy, areaW, ctx, depth, segPages) {
52708
52711
  let i = plan.start;
52709
52712
  let cursor = ox + seg.horzpos + plan.xoff;
52710
52713
  const y = oy + seg.vertpos + seg.baseline;
52711
- const pva = m.paraPrId != null ? _optionalChain([ctx, 'access', _1278 => _1278.styles, 'access', _1279 => _1279.paraGeom, 'access', _1280 => _1280.get, 'call', _1281 => _1281(m.paraPrId), 'optionalAccess', _1282 => _1282.vertAlign]) : void 0;
52714
+ const pva = m.paraPrId != null ? _optionalChain([ctx, 'access', _1281 => _1281.styles, 'access', _1282 => _1282.paraGeom, 'access', _1283 => _1283.get, 'call', _1284 => _1284(m.paraPrId), 'optionalAccess', _1285 => _1285.vertAlign]) : void 0;
52712
52715
  const glyphY = (h) => y + (pva === "CENTER" ? Math.round(h * 0.35) : pva === "BOTTOM" ? -Math.round(h * 0.15) : 0);
52713
52716
  if (plan.bullet) {
52714
52717
  const bs = _nullishCoalesce((plan.bullet.prId != null ? ctx.styles.charPr.get(plan.bullet.prId) : void 0), () => ( DEFAULT_CHAR));
@@ -52793,7 +52796,7 @@ function drawPara(p, ox, oy, areaW, ctx, depth, segPages) {
52793
52796
  if (st.italic) attrs.push(`font-style="italic"`);
52794
52797
  if (st.underline) attrs.push(`text-decoration="underline"`);
52795
52798
  if (st.color) attrs.push(`fill="${escapeXml7(st.color)}"`);
52796
- emit(ctx, `<text ${attrs.join(" ")}>${escapeXml7(_chunk37BDHFGXcjs.mapPuaText.call(void 0, text))}</text>`);
52799
+ emit(ctx, `<text ${attrs.join(" ")}>${escapeXml7(_chunkS34OVRKDcjs.mapPuaText.call(void 0, text))}</text>`);
52797
52800
  ctx.stats.texts++;
52798
52801
  }
52799
52802
  return sw;
@@ -52862,26 +52865,26 @@ function drawPara(p, ox, oy, areaW, ctx, depth, segPages) {
52862
52865
  anchorLineH = pl.seg.textheight;
52863
52866
  }
52864
52867
  let objBaseV = baseV;
52865
- const pTop = depth === 0 ? _optionalChain([ctx, 'access', _1283 => _1283.paraTops, 'optionalAccess', _1284 => _1284.get, 'call', _1285 => _1285(p)]) : void 0;
52868
+ const pTop = depth === 0 ? _optionalChain([ctx, 'access', _1286 => _1286.paraTops, 'optionalAccess', _1287 => _1287.get, 'call', _1288 => _1288(p)]) : void 0;
52866
52869
  const wrapA = _nullishCoalesce(o.el.getAttribute("textWrap"), () => ( "TOP_AND_BOTTOM"));
52867
52870
  const top0 = _nullishCoalesce(pTop, () => ( (depth > 0 && wrapA !== "TOP_AND_BOTTOM" ? cellParaTop(p, ctx.styles.paraGeom) : void 0)));
52868
52871
  if (top0 !== void 0 && wrapA !== "TOP_AND_BOTTOM") {
52869
- const start = top0 + (m.paraPrId != null ? _nullishCoalesce(_optionalChain([ctx, 'access', _1286 => _1286.styles, 'access', _1287 => _1287.paraGeom, 'access', _1288 => _1288.get, 'call', _1289 => _1289(m.paraPrId), 'optionalAccess', _1290 => _1290.spaceBefore]), () => ( 0)) : 0);
52872
+ const start = top0 + (m.paraPrId != null ? _nullishCoalesce(_optionalChain([ctx, 'access', _1289 => _1289.styles, 'access', _1290 => _1290.paraGeom, 'access', _1291 => _1291.get, 'call', _1292 => _1292(m.paraPrId), 'optionalAccess', _1293 => _1293.spaceBefore]), () => ( 0)) : 0);
52870
52873
  if (baseV > start + 100) {
52871
52874
  objBaseV = start;
52872
52875
  if (anchorLineV === baseV) anchorLineV = start;
52873
52876
  }
52874
52877
  }
52875
- const tbFloats = m.objs.filter((q) => !q.inline && (_nullishCoalesce(q.el.getAttribute("textWrap"), () => ( "TOP_AND_BOTTOM"))) === "TOP_AND_BOTTOM" && (_nullishCoalesce(_optionalChain([findChildByLocalName, 'call', _1291 => _1291(q.el, "pos"), 'optionalAccess', _1292 => _1292.getAttribute, 'call', _1293 => _1293("vertRelTo")]), () => ( "PARA"))) === "PARA").length;
52878
+ const tbFloats = m.objs.filter((q) => !q.inline && (_nullishCoalesce(q.el.getAttribute("textWrap"), () => ( "TOP_AND_BOTTOM"))) === "TOP_AND_BOTTOM" && (_nullishCoalesce(_optionalChain([findChildByLocalName, 'call', _1294 => _1294(q.el, "pos"), 'optionalAccess', _1295 => _1295.getAttribute, 'call', _1296 => _1296("vertRelTo")]), () => ( "PARA"))) === "PARA").length;
52876
52879
  const stay = tbFloats < 2 && !m.objs.some((q) => q.inline) && !m.chars.some((c) => c.ch !== "" && !c.nb && c.ch.trim() !== "");
52877
- const sbA = m.paraPrId != null ? _nullishCoalesce(_optionalChain([ctx, 'access', _1294 => _1294.styles, 'access', _1295 => _1295.paraGeom, 'access', _1296 => _1296.get, 'call', _1297 => _1297(m.paraPrId), 'optionalAccess', _1298 => _1298.spaceBefore]), () => ( 0)) : 0;
52880
+ const sbA = m.paraPrId != null ? _nullishCoalesce(_optionalChain([ctx, 'access', _1297 => _1297.styles, 'access', _1298 => _1298.paraGeom, 'access', _1299 => _1299.get, 'call', _1300 => _1300(m.paraPrId), 'optionalAccess', _1301 => _1301.spaceBefore]), () => ( 0)) : 0;
52878
52881
  const firstLine = anchorLineV === void 0 || anchorLineV === baseV;
52879
52882
  let { x, y } = anchorObject(o, ax, oy, objBaseV, aw, ctx, anchorLineV, stay ? sbA : false, (firstLine || wrapA === "SQUARE") && pTop !== void 0 && pTop < baseV ? pTop : void 0, firstLine ? void 0 : anchorLineH);
52880
52883
  if (depth === 0 && tbFloats >= 2 && wrapA === "TOP_AND_BOTTOM") {
52881
52884
  if (!tbStack) {
52882
52885
  tbStack = /* @__PURE__ */ new Map();
52883
52886
  let below = 0;
52884
- const stackable = m.objs.filter((q) => !q.inline && (_nullishCoalesce(q.el.getAttribute("textWrap"), () => ( "TOP_AND_BOTTOM"))) === "TOP_AND_BOTTOM" && (_nullishCoalesce(_optionalChain([findChildByLocalName, 'call', _1299 => _1299(q.el, "pos"), 'optionalAccess', _1300 => _1300.getAttribute, 'call', _1301 => _1301("vertRelTo")]), () => ( "PARA"))) === "PARA" && _optionalChain([findChildByLocalName, 'call', _1302 => _1302(q.el, "pos"), 'optionalAccess', _1303 => _1303.getAttribute, 'call', _1304 => _1304("allowOverlap")]) !== "1");
52887
+ const stackable = m.objs.filter((q) => !q.inline && (_nullishCoalesce(q.el.getAttribute("textWrap"), () => ( "TOP_AND_BOTTOM"))) === "TOP_AND_BOTTOM" && (_nullishCoalesce(_optionalChain([findChildByLocalName, 'call', _1302 => _1302(q.el, "pos"), 'optionalAccess', _1303 => _1303.getAttribute, 'call', _1304 => _1304("vertRelTo")]), () => ( "PARA"))) === "PARA" && _optionalChain([findChildByLocalName, 'call', _1305 => _1305(q.el, "pos"), 'optionalAccess', _1306 => _1306.getAttribute, 'call', _1307 => _1307("allowOverlap")]) !== "1");
52885
52888
  for (const q of stackable.length >= 2 ? stackable.sort((a, b) => a.index - b.index) : []) {
52886
52889
  const omQ = findChildByLocalName(q.el, "outMargin"), raw = num2(findChildByLocalName(q.el, "pos"), "vertOffset");
52887
52890
  const top = Math.max(below, raw >= 2 ** 31 ? raw - 2 ** 32 : raw);
@@ -52892,7 +52895,7 @@ function drawPara(p, ox, oy, areaW, ctx, depth, segPages) {
52892
52895
  const st = tbStack.get(o.el);
52893
52896
  if (st !== void 0) y = oy + (_nullishCoalesce(pTop, () => ( 0))) + st;
52894
52897
  }
52895
- const moved = _optionalChain([ctx, 'access', _1305 => _1305.objPlace, 'optionalAccess', _1306 => _1306.get, 'call', _1307 => _1307(o.el)]);
52898
+ const moved = _optionalChain([ctx, 'access', _1308 => _1308.objPlace, 'optionalAccess', _1309 => _1309.get, 'call', _1310 => _1310(o.el)]);
52896
52899
  if (moved) {
52897
52900
  const pg = ctx.page;
52898
52901
  ctx.page = moved.page;
@@ -52911,7 +52914,7 @@ function cellParaTop(p, geom) {
52911
52914
  const segs = lsa ? elements(lsa).filter((e) => ln(e) === "lineseg") : [];
52912
52915
  if (!segs.length) return void 0;
52913
52916
  const last = segs[segs.length - 1];
52914
- return num2(last, "vertpos") + num2(last, "vertsize") + num2(last, "spacing") + (_nullishCoalesce(_optionalChain([geom, 'access', _1308 => _1308.get, 'call', _1309 => _1309(_nullishCoalesce(prev.getAttribute("paraPrIDRef"), () => ( ""))), 'optionalAccess', _1310 => _1310.spaceAfter]), () => ( 0)));
52917
+ return num2(last, "vertpos") + num2(last, "vertsize") + num2(last, "spacing") + (_nullishCoalesce(_optionalChain([geom, 'access', _1311 => _1311.get, 'call', _1312 => _1312(_nullishCoalesce(prev.getAttribute("paraPrIDRef"), () => ( ""))), 'optionalAccess', _1313 => _1313.spaceAfter]), () => ( 0)));
52915
52918
  }
52916
52919
  function drawObject(o, x, y, baseV, areaW, ctx, depth) {
52917
52920
  if (!o.inline && depth === 0 && ctx.paintJobs) {
@@ -52952,7 +52955,7 @@ function drawObject(o, x, y, baseV, areaW, ctx, depth) {
52952
52955
  drawObject(sub, x + num2(off, "x"), y + num2(off, "y"), baseV, areaW, ctx, depth + 1);
52953
52956
  }
52954
52957
  } else if (o.tag === "equation") {
52955
- const script = _nullishCoalesce(_optionalChain([findChildByLocalName, 'call', _1311 => _1311(o.el, "script"), 'optionalAccess', _1312 => _1312.textContent]), () => ( ""));
52958
+ const script = _nullishCoalesce(_optionalChain([findChildByLocalName, 'call', _1314 => _1314(o.el, "script"), 'optionalAccess', _1315 => _1315.textContent]), () => ( ""));
52956
52959
  const text = script ? latexToPlain(hwpEquationToLatex(script)) : "";
52957
52960
  if (text && o.width > 0) {
52958
52961
  const bl = Number(o.el.getAttribute("baseLine")), size = num2(o.el, "baseUnit", 1e3);
@@ -53057,7 +53060,7 @@ function tableContPages(tbl2, ty, MT, BODY_H, memo, slack = 0, floatSpan, nested
53057
53060
  }
53058
53061
  function cellFloatSpan(MT, BODY_H, memo, slack) {
53059
53062
  return (seg, top) => {
53060
- const lsa = seg.parentNode, p = _optionalChain([lsa, 'optionalAccess', _1313 => _1313.parentNode]);
53063
+ const lsa = seg.parentNode, p = _optionalChain([lsa, 'optionalAccess', _1316 => _1316.parentNode]);
53061
53064
  if (!p || ln(p) !== "p") return void 0;
53062
53065
  const segs = elements(lsa).filter((e) => ln(e) === "lineseg"), k = segs.indexOf(seg);
53063
53066
  const m = buildPara(p);
@@ -53065,10 +53068,10 @@ function cellFloatSpan(MT, BODY_H, memo, slack) {
53065
53068
  for (const o of m.objs) {
53066
53069
  if (o.tag !== "tbl" || o.inline) continue;
53067
53070
  const pos = findChildByLocalName(o.el, "pos");
53068
- if ((_nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1314 => _1314.getAttribute, 'call', _1315 => _1315("vertRelTo")]), () => ( "PARA"))) !== "PARA") continue;
53071
+ if ((_nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1317 => _1317.getAttribute, 'call', _1318 => _1318("vertRelTo")]), () => ( "PARA"))) !== "PARA") continue;
53069
53072
  const segK = Math.max(0, m.segs.findIndex((sg, i) => sg.textpos <= o.index && (i === m.segs.length - 1 || m.segs[i + 1].textpos > o.index)));
53070
53073
  if (segK !== k) continue;
53071
- const ty = top + num2(findChildByLocalName(o.el, "outMargin"), "top") + Math.max(0, toInt32(_nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1316 => _1316.getAttribute, 'call', _1317 => _1317("vertOffset")]), () => ( void 0)), 0));
53074
+ const ty = top + num2(findChildByLocalName(o.el, "outMargin"), "top") + Math.max(0, toInt32(_nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1319 => _1319.getAttribute, 'call', _1320 => _1320("vertOffset")]), () => ( void 0)), 0));
53072
53075
  const span2 = tableContPages(o.el, ty, MT, BODY_H, memo, slack, cellFloatSpan(MT, BODY_H, memo, slack), true);
53073
53076
  if (span2.pages > 0 && (!best || span2.pages > best.pages)) best = { ...span2, el: o.el };
53074
53077
  }
@@ -53100,7 +53103,7 @@ function drawTable(tbl2, tx, ty, ctx, depth) {
53100
53103
  let hdrRows = 0;
53101
53104
  if (tbl2.getAttribute("repeatHeader") === "1") while (hdrRows < nRows && cells.some((c) => c.ra === hdrRows) && cells.filter((c) => c.ra === hdrRows).every((c) => c.el.getAttribute("header") === "1")) hdrRows++;
53102
53105
  const slack = ctx.geom.PH - ctx.geom.MT - ctx.geom.BODY_H;
53103
- const splitHere = depth === 1 || !!ctx.splitCell && _optionalChain([findChildByLocalName, 'call', _1318 => _1318(tbl2, "pos"), 'optionalAccess', _1319 => _1319.getAttribute, 'call', _1320 => _1320("treatAsChar")]) !== "1";
53106
+ const splitHere = depth === 1 || !!ctx.splitCell && _optionalChain([findChildByLocalName, 'call', _1321 => _1321(tbl2, "pos"), 'optionalAccess', _1322 => _1322.getAttribute, 'call', _1323 => _1323("treatAsChar")]) !== "1";
53104
53107
  const plan = splitHere ? planTableRows(tbl2, cells, rowH, ty, ctx.geom.MT, ctx.geom.BODY_H, slack, cellFloatSpan(ctx.geom.MT, ctx.geom.BODY_H, ctx.extentMemo, slack), depth !== 1) : rowH.map((h, r) => [{ page: 0, y: ty + rowY[r], h }]);
53105
53108
  const splitSaved = ctx.splitCell;
53106
53109
  ctx.splitCell = false;
@@ -53122,7 +53125,7 @@ function drawTable(tbl2, tx, ty, ctx, depth) {
53122
53125
  for (const g3 of geom) {
53123
53126
  ctx.page = g3.page;
53124
53127
  const bf = g3.c.bfId != null ? ctx.styles.borderFill.get(g3.c.bfId) : void 0;
53125
- if (_optionalChain([bf, 'optionalAccess', _1321 => _1321.fill])) emit(ctx, `<rect x="${pt2(g3.x)}" y="${pt2(g3.y)}" width="${pt2(g3.w)}" height="${pt2(g3.h)}" fill="${escapeXml7(bf.fill)}"/>`);
53128
+ if (_optionalChain([bf, 'optionalAccess', _1324 => _1324.fill])) emit(ctx, `<rect x="${pt2(g3.x)}" y="${pt2(g3.y)}" width="${pt2(g3.w)}" height="${pt2(g3.h)}" fill="${escapeXml7(bf.fill)}"/>`);
53126
53129
  }
53127
53130
  for (const g3 of geom) {
53128
53131
  const { c } = g3;
@@ -53133,13 +53136,13 @@ function drawTable(tbl2, tx, ty, ctx, depth) {
53133
53136
  const boxes = cellLineBoxes(c);
53134
53137
  const contV = new Map(boxes.map((b) => [b.seg, b.top]));
53135
53138
  const pieceOf = (v) => Math.max(0, g3.pieces.findIndex((pc) => {
53136
- const r = _optionalChain([pc, 'access', _1322 => _1322.range, 'optionalAccess', _1323 => _1323.get, 'call', _1324 => _1324(c.el)]);
53139
+ const r = _optionalChain([pc, 'access', _1325 => _1325.range, 'optionalAccess', _1326 => _1326.get, 'call', _1327 => _1327(c.el)]);
53137
53140
  return !!r && v >= r[0] && v < r[1];
53138
53141
  }));
53139
53142
  const va2 = _nullishCoalesce(c.sub.getAttribute("vertAlign"), () => ( "TOP"));
53140
53143
  const pieceOff = g3.pieces.map((pc, k) => {
53141
53144
  if (va2 === "TOP") return 0;
53142
- const from = _nullishCoalesce(_optionalChain([pc, 'access', _1325 => _1325.range, 'optionalAccess', _1326 => _1326.get, 'call', _1327 => _1327(c.el), 'optionalAccess', _1328 => _1328[0]]), () => ( 0));
53145
+ const from = _nullishCoalesce(_optionalChain([pc, 'access', _1328 => _1328.range, 'optionalAccess', _1329 => _1329.get, 'call', _1330 => _1330(c.el), 'optionalAccess', _1331 => _1331[0]]), () => ( 0));
53143
53146
  const bottoms = boxes.filter((b) => pieceOf(b.top) === k).map((b) => b.bottom - from);
53144
53147
  if (!bottoms.length) return 0;
53145
53148
  const free = pc.h - c.marginT - c.marginB - Math.max(...bottoms);
@@ -53152,7 +53155,7 @@ function drawTable(tbl2, tx, ty, ctx, depth) {
53152
53155
  const pages = segs.map((sg) => {
53153
53156
  const v = _nullishCoalesce(contV.get(sg), () => ( num2(sg, "vertpos")));
53154
53157
  const k = pieceOf(v);
53155
- const pc = g3.pieces[k], from = _nullishCoalesce(_optionalChain([pc, 'access', _1329 => _1329.range, 'optionalAccess', _1330 => _1330.get, 'call', _1331 => _1331(c.el), 'optionalAccess', _1332 => _1332[0]]), () => ( 0));
53158
+ const pc = g3.pieces[k], from = _nullishCoalesce(_optionalChain([pc, 'access', _1332 => _1332.range, 'optionalAccess', _1333 => _1333.get, 'call', _1334 => _1334(c.el), 'optionalAccess', _1335 => _1335[0]]), () => ( 0));
53156
53159
  sg.setAttribute("vertpos", String(v - from + pc.y + c.marginT + pieceOff[k] - base));
53157
53160
  return startPage + pc.page;
53158
53161
  });
@@ -53244,7 +53247,7 @@ function drawPic(pic, x, y, ctx) {
53244
53247
  }
53245
53248
  function drawPicFrame(pic, x, y, w, h, transform, ctx) {
53246
53249
  const img = findFirst(pic, "img");
53247
- const ref = _optionalChain([img, 'optionalAccess', _1333 => _1333.getAttribute, 'call', _1334 => _1334("binaryItemIDRef")]);
53250
+ const ref = _optionalChain([img, 'optionalAccess', _1336 => _1336.getAttribute, 'call', _1337 => _1337("binaryItemIDRef")]);
53248
53251
  const loaded = ref != null ? ctx.images.get(ref) : void 0;
53249
53252
  const imgId = ctx.regions.add("image", bboxOf(ctx, x, y, w, h), { sourceId: _nullishCoalesce(ref, () => ( void 0)), parentId: parentId(ctx) });
53250
53253
  emit(ctx, regionOpenTag(imgId, "image", pageNo(ctx)));
@@ -53290,12 +53293,12 @@ function readSectionGeom(root) {
53290
53293
  const pagePr = findFirst(root, "pagePr");
53291
53294
  const margin = pagePr ? findChildByLocalName(pagePr, "margin") : null;
53292
53295
  let PW = num2(pagePr, "width", 59528), PH = num2(pagePr, "height", 84188);
53293
- if (_optionalChain([pagePr, 'optionalAccess', _1335 => _1335.getAttribute, 'call', _1336 => _1336("landscape")]) === "NARROWLY" && PW < PH) {
53296
+ if (_optionalChain([pagePr, 'optionalAccess', _1338 => _1338.getAttribute, 'call', _1339 => _1339("landscape")]) === "NARROWLY" && PW < PH) {
53294
53297
  const t = PW;
53295
53298
  PW = PH;
53296
53299
  PH = t;
53297
53300
  }
53298
- const gutterType = _nullishCoalesce(_optionalChain([pagePr, 'optionalAccess', _1337 => _1337.getAttribute, 'call', _1338 => _1338("gutterType")]), () => ( "LEFT_ONLY")), gutter = num2(margin, "gutter", 0);
53301
+ const gutterType = _nullishCoalesce(_optionalChain([pagePr, 'optionalAccess', _1340 => _1340.getAttribute, 'call', _1341 => _1341("gutterType")]), () => ( "LEFT_ONLY")), gutter = num2(margin, "gutter", 0);
53299
53302
  const gL = gutterType === "TOP_BOTTOM" ? 0 : gutter, gT = gutterType === "TOP_BOTTOM" ? gutter : 0;
53300
53303
  const ML = num2(margin, "left", 8504) + gL;
53301
53304
  const MT = num2(margin, "top", 5668) + num2(margin, "header", 0) + gT;
@@ -53426,7 +53429,7 @@ function renderSectionToPages(root, geom, ctxBase, doReflow, reflowMode, masters
53426
53429
  for (const o of m0.objs) {
53427
53430
  if (o.tag !== "tbl") continue;
53428
53431
  const pos = findChildByLocalName(o.el, "pos"), om = findChildByLocalName(o.el, "outMargin");
53429
- if (!o.inline && (_nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1339 => _1339.getAttribute, 'call', _1340 => _1340("vertRelTo")]), () => ( "PARA"))) !== "PARA") continue;
53432
+ if (!o.inline && (_nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1342 => _1342.getAttribute, 'call', _1343 => _1343("vertRelTo")]), () => ( "PARA"))) !== "PARA") continue;
53430
53433
  const segK = Math.max(0, m0.segs.findIndex((sg, k) => sg.textpos <= o.index && (k === m0.segs.length - 1 || m0.segs[k + 1].textpos > o.index)));
53431
53434
  const segV = num2(segEls[segK], "vertpos");
53432
53435
  const h = Math.max(o.height, measureTableHeight(o.el, ctxBase.extentMemo)), omT = num2(om, "top"), omB = num2(om, "bottom");
@@ -53434,9 +53437,9 @@ function renderSectionToPages(root, geom, ctxBase, doReflow, reflowMode, masters
53434
53437
  const nTb = m0.objs.filter((q) => !q.inline && (_nullishCoalesce(q.el.getAttribute("textWrap"), () => ( "TOP_AND_BOTTOM"))) === "TOP_AND_BOTTOM").length;
53435
53438
  const stay = nTb < 2 && !m0.objs.some((q) => q.inline) && !m0.chars.some((c) => c.ch !== "" && !c.nb && c.ch.trim() !== "");
53436
53439
  const wrapP = _nullishCoalesce(o.el.getAttribute("textWrap"), () => ( "TOP_AND_BOTTOM"));
53437
- const pTop = paraTops.get(p), sbP = m0.paraPrId != null ? _nullishCoalesce(_optionalChain([geom0, 'access', _1341 => _1341.get, 'call', _1342 => _1342(m0.paraPrId), 'optionalAccess', _1343 => _1343.spaceBefore]), () => ( 0)) : 0;
53440
+ const pTop = paraTops.get(p), sbP = m0.paraPrId != null ? _nullishCoalesce(_optionalChain([geom0, 'access', _1344 => _1344.get, 'call', _1345 => _1345(m0.paraPrId), 'optionalAccess', _1346 => _1346.spaceBefore]), () => ( 0)) : 0;
53438
53441
  const nonPush = wrapP !== "TOP_AND_BOTTOM" && pTop !== void 0 && segV > pTop + sbP + 100 ? pTop + sbP : void 0;
53439
- const voP = Math.max(0, toInt32(_nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1344 => _1344.getAttribute, 'call', _1345 => _1345("vertOffset")]), () => ( void 0)), 0));
53442
+ const voP = Math.max(0, toInt32(_nullishCoalesce(_optionalChain([pos, 'optionalAccess', _1347 => _1347.getAttribute, 'call', _1348 => _1348("vertOffset")]), () => ( void 0)), 0));
53440
53443
  const paraStart = segK === 0 && pTop !== void 0 && pTop < segV ? pTop : segV;
53441
53444
  const ty = o.inline ? MT + segV + omT : nonPush !== void 0 ? MT + nonPush + omT + voP : MT + (stay ? segV - sbP : pushed >= -100 ? pushed : paraStart) + omT + voP;
53442
53445
  const span2 = tableContPages(o.el, ty, MT, BODY_H, ctxBase.extentMemo, PH - MT - BODY_H, cellFloatSpan(MT, BODY_H, ctxBase.extentMemo, PH - MT - BODY_H));
@@ -53463,7 +53466,7 @@ function renderSectionToPages(root, geom, ctxBase, doReflow, reflowMode, masters
53463
53466
  for (const p of elements(root)) {
53464
53467
  if (ln(p) !== "p") continue;
53465
53468
  const pg = paraSegPages.get(p);
53466
- if (!_optionalChain([pg, 'optionalAccess', _1346 => _1346.length])) continue;
53469
+ if (!_optionalChain([pg, 'optionalAccess', _1349 => _1349.length])) continue;
53467
53470
  const pm = buildPara(p);
53468
53471
  if (pm.objs.length || pm.chars.some((c) => c.ch.trim() !== "" || !!c.ctrlText)) lastContent = Math.max(lastContent, ...pg);
53469
53472
  }
@@ -53480,7 +53483,7 @@ function renderSectionToPages(root, geom, ctxBase, doReflow, reflowMode, masters
53480
53483
  for (const p of elements(root)) {
53481
53484
  if (ln(p) !== "p") continue;
53482
53485
  const pg = paraSegPages.get(p);
53483
- if (!_optionalChain([pg, 'optionalAccess', _1347 => _1347.includes, 'call', _1348 => _1348(lastContent)])) continue;
53486
+ if (!_optionalChain([pg, 'optionalAccess', _1350 => _1350.includes, 'call', _1351 => _1351(lastContent)])) continue;
53484
53487
  const pm = buildPara(p);
53485
53488
  pm.segs.forEach((sg, k) => {
53486
53489
  if (pg[k] !== lastContent) return;
@@ -53500,7 +53503,7 @@ function renderSectionToPages(root, geom, ctxBase, doReflow, reflowMode, masters
53500
53503
  const ens = endNoteLayout(root, paraSegPages, geom);
53501
53504
  const ctx = {
53502
53505
  ...ctxBase,
53503
- pages: Array.from({ length: Math.max(nPages, _nullishCoalesce(_optionalChain([ens, 'optionalAccess', _1349 => _1349.pageCount]), () => ( 0))) }, () => []),
53506
+ pages: Array.from({ length: Math.max(nPages, _nullishCoalesce(_optionalChain([ens, 'optionalAccess', _1352 => _1352.pageCount]), () => ( 0))) }, () => []),
53504
53507
  page: 0,
53505
53508
  geom,
53506
53509
  pageH,
@@ -53558,7 +53561,7 @@ function renderSectionToPages(root, geom, ctxBase, doReflow, reflowMode, masters
53558
53561
  ctx.bodyDx = void 0;
53559
53562
  wrapMirror(ctx.pages, (page) => _nullishCoalesce(bodyStart[page], () => ( 0)));
53560
53563
  const allPages = new Map(paraSegPages);
53561
- for (const e of _nullishCoalesce(_optionalChain([ens, 'optionalAccess', _1350 => _1350.paras]), () => ( []))) allPages.set(e.p, e.pages);
53564
+ for (const e of _nullishCoalesce(_optionalChain([ens, 'optionalAccess', _1353 => _1353.paras]), () => ( []))) allPages.set(e.p, e.pages);
53562
53565
  drawPageDecor(root, allPages, ctx, localCols ? nCol : 1, colW, colGap);
53563
53566
  drawPageNumbers(root, paraSegPages, ctx);
53564
53567
  ctx.page = 0;
@@ -53627,7 +53630,7 @@ function drawPageNumbers(root, paraPages, ctx) {
53627
53630
  let decl;
53628
53631
  const hidden = /* @__PURE__ */ new Set();
53629
53632
  for (const p of elements(root)) if (ln(p) === "p") {
53630
- const page = _nullishCoalesce(_optionalChain([paraPages, 'access', _1351 => _1351.get, 'call', _1352 => _1352(p), 'optionalAccess', _1353 => _1353[0]]), () => ( 0));
53633
+ const page = _nullishCoalesce(_optionalChain([paraPages, 'access', _1354 => _1354.get, 'call', _1355 => _1355(p), 'optionalAccess', _1356 => _1356[0]]), () => ( 0));
53631
53634
  for (const run of elements(p)) if (ln(run) === "run") {
53632
53635
  for (const ctrl of elements(run)) if (ln(ctrl) === "ctrl") {
53633
53636
  const pn = findChildByLocalName(ctrl, "pageNum"), ph = findChildByLocalName(ctrl, "pageHiding");
@@ -53689,22 +53692,22 @@ function renderSectionRoots(sections, input) {
53689
53692
  rendered.push({ pages, PW: geom.PW, pageH, clipId: `pgclip${index}` });
53690
53693
  ctxBase.pageBase += pages.length;
53691
53694
  }
53692
- if (rendered.length === 0) throw new (0, _chunkU6SSH2TGcjs.KordocError)("\uB80C\uB354\uD560 \uAD6C\uC5ED\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
53695
+ if (rendered.length === 0) throw new (0, _chunkFJ45NNLAcjs.KordocError)("\uB80C\uB354\uD560 \uAD6C\uC5ED\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
53693
53696
  return { sections: rendered, defs: ctxBase.defs, warnings: input.warnings, stats: ctxBase.stats, regions: ctxBase.regions.regions };
53694
53697
  }
53695
53698
  var SVG_FONT_FAMILY = `'HCR Batang','\uD568\uCD08\uB86C\uBC14\uD0D5','Hancom Batang',AppleMyungjo,'Noto Serif CJK KR',serif`;
53696
53699
  async function renderHwpxInternal(input, options) {
53697
- const maxImg = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1354 => _1354.maxImageBytes]), () => ( 40 * 1024 * 1024));
53700
+ const maxImg = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1357 => _1357.maxImageBytes]), () => ( 40 * 1024 * 1024));
53698
53701
  const ab = input instanceof Uint8Array ? input.buffer.slice(input.byteOffset, input.byteOffset + input.byteLength) : input;
53699
- _chunkU6SSH2TGcjs.precheckZipSize.call(void 0, ab, MAX_DECOMPRESS_SIZE, MAX_ZIP_ENTRIES);
53702
+ _chunkFJ45NNLAcjs.precheckZipSize.call(void 0, ab, MAX_DECOMPRESS_SIZE, MAX_ZIP_ENTRIES);
53700
53703
  let zip;
53701
53704
  try {
53702
53705
  zip = await _jszip2.default.loadAsync(input);
53703
53706
  } catch (e43) {
53704
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("HWPX(ZIP) \uD615\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4 \u2014 \uB80C\uB354\uB294 HWPX\uB9CC \uC9C0\uC6D0");
53707
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("HWPX(ZIP) \uD615\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4 \u2014 \uB80C\uB354\uB294 HWPX\uB9CC \uC9C0\uC6D0");
53705
53708
  }
53706
- const secFiles = zip.file(/Contents\/section\d+\.xml$/i).sort((a, b) => _chunkU6SSH2TGcjs.compareSectionPaths.call(void 0, a.name, b.name));
53707
- if (secFiles.length === 0) throw new (0, _chunkU6SSH2TGcjs.KordocError)("Contents/section0.xml \uC5C6\uC74C \u2014 HWPX\uAC00 \uC544\uB2C8\uAC70\uB098 \uC190\uC0C1\uB428");
53709
+ const secFiles = zip.file(/Contents\/section\d+\.xml$/i).sort((a, b) => _chunkFJ45NNLAcjs.compareSectionPaths.call(void 0, a.name, b.name));
53710
+ if (secFiles.length === 0) throw new (0, _chunkFJ45NNLAcjs.KordocError)("Contents/section0.xml \uC5C6\uC74C \u2014 HWPX\uAC00 \uC544\uB2C8\uAC70\uB098 \uC190\uC0C1\uB428");
53708
53711
  const warnings = [];
53709
53712
  const headFile = _nullishCoalesce(zip.file("Contents/header.xml"), () => ( zip.file("Contents/head.xml")));
53710
53713
  const verFile = zip.file("version.xml");
@@ -53715,14 +53718,14 @@ async function renderHwpxInternal(input, options) {
53715
53718
  const secXmls = [];
53716
53719
  for (const f of secFiles) {
53717
53720
  const xml = await readZipEntry(f, "text");
53718
- if (xml.length > MAX_DECOMPRESS_SIZE) throw new (0, _chunkU6SSH2TGcjs.KordocError)("\uC139\uC158 XML\uC774 \uD5C8\uC6A9 \uD06C\uAE30\uB97C \uCD08\uACFC");
53721
+ if (xml.length > MAX_DECOMPRESS_SIZE) throw new (0, _chunkFJ45NNLAcjs.KordocError)("\uC139\uC158 XML\uC774 \uD5C8\uC6A9 \uD06C\uAE30\uB97C \uCD08\uACFC");
53719
53722
  secXmls.push(xml);
53720
53723
  }
53721
53724
  const masterPages = /* @__PURE__ */ new Map();
53722
53725
  const masterXmls = [];
53723
53726
  for (const file of zip.file(/Contents\/masterpage[^/]*\.xml$/i)) {
53724
53727
  const xml = await readZipEntry(file, "text");
53725
- if (xml.length > MAX_DECOMPRESS_SIZE) throw new (0, _chunkU6SSH2TGcjs.KordocError)("\uBC14\uD0D5\uCABD XML\uC774 \uD5C8\uC6A9 \uD06C\uAE30\uB97C \uCD08\uACFC");
53728
+ if (xml.length > MAX_DECOMPRESS_SIZE) throw new (0, _chunkFJ45NNLAcjs.KordocError)("\uBC14\uD0D5\uCABD XML\uC774 \uD5C8\uC6A9 \uD06C\uAE30\uB97C \uCD08\uACFC");
53726
53729
  const root = createXmlParser().parseFromString(xml, "text/xml").documentElement;
53727
53730
  if (root && ln(root) === "masterPage") {
53728
53731
  masterPages.set(root.getAttribute("id") || file.name.replace(/^.*\/|\.xml$/g, ""), root);
@@ -53750,7 +53753,7 @@ async function renderHwpxInternal(input, options) {
53750
53753
  let href = binmap.get(ref);
53751
53754
  if (!href) {
53752
53755
  const cand = zip.file(new RegExp(`BinData/.*${ref.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}`, "i"))[0];
53753
- href = _optionalChain([cand, 'optionalAccess', _1355 => _1355.name]);
53756
+ href = _optionalChain([cand, 'optionalAccess', _1358 => _1358.name]);
53754
53757
  }
53755
53758
  if (!href) continue;
53756
53759
  const f = _nullishCoalesce(zip.file(href), () => ( zip.file("Contents/" + href)));
@@ -53772,7 +53775,7 @@ async function renderHwpxInternal(input, options) {
53772
53775
  for (let si = 0; si < secXmls.length; si++) {
53773
53776
  const secXml = secXmls[si];
53774
53777
  const hasCache = /<(?:[A-Za-z][\w.-]*:)?linesegarray[\s/>]/.test(secXml);
53775
- if (!hasCache && !_optionalChain([options, 'optionalAccess', _1356 => _1356.reflow])) {
53778
+ if (!hasCache && !_optionalChain([options, 'optionalAccess', _1359 => _1359.reflow])) {
53776
53779
  noCacheSkipped = true;
53777
53780
  warnings.push(`\uAD6C\uC5ED ${si}: \uC870\uD310 \uCE90\uC2DC \uC5C6\uC74C \u2014 reflow \uC635\uC158 \uD544\uC694, \uC0DD\uB7B5`);
53778
53781
  continue;
@@ -53789,11 +53792,11 @@ async function renderHwpxInternal(input, options) {
53789
53792
  }
53790
53793
  if (roots.length === 0) {
53791
53794
  if (noCacheSkipped) {
53792
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("\uC870\uD310 \uCE90\uC2DC(linesegarray) \uC5C6\uC74C \u2014 \uD55C\uCEF4\uC5D0\uC11C \uC800\uC7A5\uD55C HWPX\uB9CC \uB80C\uB354 \uAC00\uB2A5 (reflow \uC635\uC158\uC73C\uB85C \uD569\uC131 \uB80C\uB354 \uAC00\uB2A5)");
53795
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("\uC870\uD310 \uCE90\uC2DC(linesegarray) \uC5C6\uC74C \u2014 \uD55C\uCEF4\uC5D0\uC11C \uC800\uC7A5\uD55C HWPX\uB9CC \uB80C\uB354 \uAC00\uB2A5 (reflow \uC635\uC158\uC73C\uB85C \uD569\uC131 \uB80C\uB354 \uAC00\uB2A5)");
53793
53796
  }
53794
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("\uB80C\uB354\uD560 \uAD6C\uC5ED\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 HWPX\uAC00 \uC190\uC0C1\uB418\uC5C8\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4");
53797
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("\uB80C\uB354\uD560 \uAD6C\uC5ED\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 HWPX\uAC00 \uC190\uC0C1\uB418\uC5C8\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4");
53795
53798
  }
53796
- return renderSectionRoots(roots, { styles, images, warnings, reflow: !!_optionalChain([options, 'optionalAccess', _1357 => _1357.reflow]), reflowMode: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1358 => _1358.reflowMode]), () => ( "keep")), highlights: _optionalChain([options, 'optionalAccess', _1359 => _1359.highlights]) });
53799
+ return renderSectionRoots(roots, { styles, images, warnings, reflow: !!_optionalChain([options, 'optionalAccess', _1360 => _1360.reflow]), reflowMode: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1361 => _1361.reflowMode]), () => ( "keep")), highlights: _optionalChain([options, 'optionalAccess', _1362 => _1362.highlights]) });
53797
53800
  }
53798
53801
  async function renderHwpxToSvg(input, options) {
53799
53802
  const r = await renderHwpxInternal(input, options);
@@ -54016,7 +54019,7 @@ var FOLD_END = 42124;
54016
54019
  var FOLD_SHIFT = 983040 - 40960;
54017
54020
  function textChar(ch) {
54018
54021
  if (ch >= FOLD_START && ch <= FOLD_END) {
54019
- const mapped = _chunk37BDHFGXcjs.mapPuaText.call(void 0, String.fromCodePoint(ch + FOLD_SHIFT));
54022
+ const mapped = _chunkS34OVRKDcjs.mapPuaText.call(void 0, String.fromCodePoint(ch + FOLD_SHIFT));
54020
54023
  return /[\u{F0000}-\u{FFFFF}]/u.test(mapped) ? "" : mapped;
54021
54024
  }
54022
54025
  if (ch === 65534 || ch === 65535 || ch >= 55296 && ch <= 57343) return "\uFFFD";
@@ -54108,7 +54111,7 @@ function paragraphXml(records, i, j, level, ctx, depth) {
54108
54111
  out += run.join("") + "</hp:run>";
54109
54112
  run = [];
54110
54113
  };
54111
- openRun(_nullishCoalesce(_optionalChain([shapes, 'access', _1360 => _1360[0], 'optionalAccess', _1361 => _1361[1]]), () => ( 0)));
54114
+ openRun(_nullishCoalesce(_optionalChain([shapes, 'access', _1363 => _1363[0], 'optionalAccess', _1364 => _1364[1]]), () => ( 0)));
54112
54115
  let pos = 0, ctrlIdx = 0, o = 0;
54113
54116
  const switchShape = () => {
54114
54117
  while (shapeIdx + 1 < shapes.length && pos >= shapes[shapeIdx + 1][0]) {
@@ -54194,7 +54197,7 @@ function paragraphXml(records, i, j, level, ctx, depth) {
54194
54197
  closeRun();
54195
54198
  const rest = ctrls.filter((c) => !c.used && (c.id === CTRL_TBL3 || c.id === CTRL_GSO3 || c.id === CTRL_SECD2 || c.id === CTRL_COLD2));
54196
54199
  if (rest.length > 0) {
54197
- openRun(_nullishCoalesce(_optionalChain([shapes, 'access', _1362 => _1362[0], 'optionalAccess', _1363 => _1363[1]]), () => ( 0)));
54200
+ openRun(_nullishCoalesce(_optionalChain([shapes, 'access', _1365 => _1365[0], 'optionalAccess', _1366 => _1366[1]]), () => ( 0)));
54198
54201
  for (const c of rest) {
54199
54202
  const el = ctrlElement(ctrls.indexOf(c), c.id);
54200
54203
  run.push(el);
@@ -54360,14 +54363,14 @@ function hwp5SectionToXml(records, ctx) {
54360
54363
  return `<hs:sec xmlns:hs="http://www.hancom.co.kr/hwpml/2011/section" xmlns:hp="http://www.hancom.co.kr/hwpml/2011/paragraph" xmlns:hc="http://www.hancom.co.kr/hwpml/2011/core">` + paragraphsXml(records, 0, records.length, 0, ctx, 0) + "</hs:sec>";
54361
54364
  }
54362
54365
  function renderHwp5Records(docInfo, styles, secRecords, binData, options, select, warnings = []) {
54363
- const maxImg = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1364 => _1364.maxImageBytes]), () => ( 40 * 1024 * 1024));
54366
+ const maxImg = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1367 => _1367.maxImageBytes]), () => ( 40 * 1024 * 1024));
54364
54367
  const MAX_TOTAL_IMAGE_BYTES = 128 * 1024 * 1024;
54365
54368
  const images = /* @__PURE__ */ new Map();
54366
54369
  let totalImgBytes = 0;
54367
54370
  const imageRef = (binDataId) => {
54368
54371
  if (binDataId <= 0) return null;
54369
- const item = _optionalChain([docInfo, 'optionalAccess', _1365 => _1365.binData, 'access', _1366 => _1366[binDataId - 1]]);
54370
- if (_optionalChain([item, 'optionalAccess', _1367 => _1367.kind]) === "link") return null;
54372
+ const item = _optionalChain([docInfo, 'optionalAccess', _1368 => _1368.binData, 'access', _1369 => _1369[binDataId - 1]]);
54373
+ if (_optionalChain([item, 'optionalAccess', _1370 => _1370.kind]) === "link") return null;
54371
54374
  const storageId = item && item.storageId > 0 ? item.storageId : binDataId;
54372
54375
  const ref = `bin${storageId}`;
54373
54376
  if (images.has(ref)) return ref;
@@ -54401,8 +54404,8 @@ function renderHwp5Records(docInfo, styles, secRecords, binData, options, select
54401
54404
  }
54402
54405
  roots.push({ root, index: si });
54403
54406
  }
54404
- if (roots.length === 0) throw new (0, _chunkU6SSH2TGcjs.KordocError)("\uB80C\uB354\uD560 \uAD6C\uC5ED\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 HWP \uAC00 \uC190\uC0C1\uB418\uC5C8\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4");
54405
- const r = renderSectionRoots(roots, { styles, images, warnings, reflow: !!_optionalChain([options, 'optionalAccess', _1368 => _1368.reflow]), reflowMode: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1369 => _1369.reflowMode]), () => ( "keep")), highlights: _optionalChain([options, 'optionalAccess', _1370 => _1370.highlights]) });
54407
+ if (roots.length === 0) throw new (0, _chunkFJ45NNLAcjs.KordocError)("\uB80C\uB354\uD560 \uAD6C\uC5ED\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 HWP \uAC00 \uC190\uC0C1\uB418\uC5C8\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4");
54408
+ const r = renderSectionRoots(roots, { styles, images, warnings, reflow: !!_optionalChain([options, 'optionalAccess', _1371 => _1371.reflow]), reflowMode: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1372 => _1372.reflowMode]), () => ( "keep")), highlights: _optionalChain([options, 'optionalAccess', _1373 => _1373.highlights]) });
54406
54409
  return assemblePageSvgs(r, "hwp", select);
54407
54410
  }
54408
54411
  function renderHwp5Pages(input, options, select) {
@@ -54414,7 +54417,7 @@ function renderHwp5Pages(input, options, select) {
54414
54417
  const styles = buildHwp5RenderStyles(_nullishCoalesce(docInfoRecords, () => ( [])));
54415
54418
  const docInfo = docInfoRecords ? parseDocInfo(docInfoRecords) : null;
54416
54419
  const sections = readHwp5SectionStreams(c);
54417
- if (sections.length === 0) throw new (0, _chunkU6SSH2TGcjs.KordocError)("\uC139\uC158 \uC2A4\uD2B8\uB9BC\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
54420
+ if (sections.length === 0) throw new (0, _chunkFJ45NNLAcjs.KordocError)("\uC139\uC158 \uC2A4\uD2B8\uB9BC\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
54418
54421
  const parseWarnings = [];
54419
54422
  const secRecords = readHwp5SectionRecords(c, sections, parseWarnings);
54420
54423
  for (const w of parseWarnings) warnings.push(w.message);
@@ -54500,14 +54503,14 @@ async function loadSharp() {
54500
54503
  const mod = await Promise.resolve().then(() => _interopRequireWildcard(require("sharp")));
54501
54504
  return _nullishCoalesce(mod.default, () => ( mod));
54502
54505
  } catch (e46) {
54503
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(
54504
- 'PNG \uB798\uC2A4\uD130\uC5D0\uB294 sharp\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4 (npm install sharp). sharp \uC5C6\uC774 \uC4F0\uB824\uBA74 format: "svg" + output_path\uB85C SVG \uD30C\uC77C \uC800\uC7A5\uC744 \uC0AC\uC6A9\uD558\uC138\uC694.' + _chunkU6SSH2TGcjs.OPTIONAL_DEP_INSTALL_HINT
54506
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(
54507
+ 'PNG \uB798\uC2A4\uD130\uC5D0\uB294 sharp\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4 (npm install sharp). sharp \uC5C6\uC774 \uC4F0\uB824\uBA74 format: "svg" + output_path\uB85C SVG \uD30C\uC77C \uC800\uC7A5\uC744 \uC0AC\uC6A9\uD558\uC138\uC694.' + _chunkFJ45NNLAcjs.OPTIONAL_DEP_INSTALL_HINT
54505
54508
  );
54506
54509
  }
54507
54510
  }
54508
54511
  async function rasterizePageSvg(svg, widthPt, heightPt, options = {}) {
54509
54512
  const sharp = await loadSharp();
54510
- if (!(widthPt > 0) || !(heightPt > 0)) throw new (0, _chunkU6SSH2TGcjs.KordocError)(`\uC798\uBABB\uB41C \uD398\uC774\uC9C0 \uD06C\uAE30: ${widthPt}x${heightPt}pt`);
54513
+ if (!(widthPt > 0) || !(heightPt > 0)) throw new (0, _chunkFJ45NNLAcjs.KordocError)(`\uC798\uBABB\uB41C \uD398\uC774\uC9C0 \uD06C\uAE30: ${widthPt}x${heightPt}pt`);
54511
54514
  const maxW = _nullishCoalesce(options.maxWidthPx, () => ( 1400));
54512
54515
  const maxH = _nullishCoalesce(options.maxHeightPx, () => ( 4e3));
54513
54516
  const scale2 = Math.min(maxW / widthPt, maxH / heightPt, 2);
@@ -54525,11 +54528,11 @@ async function renderHtmlToPdf(html, options = {}) {
54525
54528
  try {
54526
54529
  puppeteer = await Promise.resolve().then(() => _interopRequireWildcard(require("puppeteer-core")));
54527
54530
  } catch (e47) {
54528
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("PDF \uB80C\uB354\uC5D0\uB294 puppeteer-core \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4 (npm install puppeteer-core). SVG/HTML/PNG \uB294 Chromium \uC5C6\uC774 \uB429\uB2C8\uB2E4");
54531
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("PDF \uB80C\uB354\uC5D0\uB294 puppeteer-core \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4 (npm install puppeteer-core). SVG/HTML/PNG \uB294 Chromium \uC5C6\uC774 \uB429\uB2C8\uB2E4");
54529
54532
  }
54530
54533
  const executablePath = _nullishCoalesce(_nullishCoalesce(options.browserExecutablePath, () => ( process.env.PUPPETEER_EXECUTABLE_PATH)), () => ( findChromiumPath()));
54531
54534
  if (!executablePath) {
54532
- throw new (0, _chunkU6SSH2TGcjs.KordocError)("Chromium \uC2E4\uD589 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 browserExecutablePath \uC635\uC158 \uB610\uB294 PUPPETEER_EXECUTABLE_PATH \uD658\uACBD\uBCC0\uC218\uB97C \uC9C0\uC815\uD558\uC138\uC694");
54535
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)("Chromium \uC2E4\uD589 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 browserExecutablePath \uC635\uC158 \uB610\uB294 PUPPETEER_EXECUTABLE_PATH \uD658\uACBD\uBCC0\uC218\uB97C \uC9C0\uC815\uD558\uC138\uC694");
54533
54536
  }
54534
54537
  const { browser, page } = await launchLockedPage(puppeteer, executablePath);
54535
54538
  try {
@@ -54545,13 +54548,13 @@ async function renderHtmlToPdf(html, options = {}) {
54545
54548
  async function loadBuffer(input) {
54546
54549
  if (typeof input === "string") {
54547
54550
  try {
54548
- return _chunkU6SSH2TGcjs.toArrayBuffer.call(void 0, await _promises.readFile.call(void 0, input));
54551
+ return _chunkFJ45NNLAcjs.toArrayBuffer.call(void 0, await _promises.readFile.call(void 0, input));
54549
54552
  } catch (err) {
54550
54553
  const code = err instanceof Error && "code" in err ? err.code : void 0;
54551
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(code === "ENOENT" ? `\uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: ${input}` : `\uD30C\uC77C \uC77D\uAE30 \uC2E4\uD328: ${input}`);
54554
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(code === "ENOENT" ? `\uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: ${input}` : `\uD30C\uC77C \uC77D\uAE30 \uC2E4\uD328: ${input}`);
54552
54555
  }
54553
54556
  }
54554
- if (Buffer.isBuffer(input)) return _chunkU6SSH2TGcjs.toArrayBuffer.call(void 0, input);
54557
+ if (Buffer.isBuffer(input)) return _chunkFJ45NNLAcjs.toArrayBuffer.call(void 0, input);
54555
54558
  if (input instanceof Uint8Array) return input.buffer.slice(input.byteOffset, input.byteOffset + input.byteLength);
54556
54559
  return input;
54557
54560
  }
@@ -54560,17 +54563,17 @@ async function sourceFormatOf(buffer) {
54560
54563
  if (format2 === "hwpx") {
54561
54564
  const zip = await detectZipFormat(buffer);
54562
54565
  if (zip === "hwpx" || zip === "unknown") return "hwpx";
54563
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(`\uB80C\uB354 \uBBF8\uC9C0\uC6D0 \uD615\uC2DD(${zip}) \u2014 \uB808\uC774\uC544\uC6C3 \uB80C\uB354\uB294 HWPX\xB7HWP \uB9CC \uC9C0\uC6D0\uD569\uB2C8\uB2E4`);
54566
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(`\uB80C\uB354 \uBBF8\uC9C0\uC6D0 \uD615\uC2DD(${zip}) \u2014 \uB808\uC774\uC544\uC6C3 \uB80C\uB354\uB294 HWPX\xB7HWP \uB9CC \uC9C0\uC6D0\uD569\uB2C8\uB2E4`);
54564
54567
  }
54565
54568
  if (format2 === "hwp") return "hwp";
54566
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(`\uB80C\uB354 \uBBF8\uC9C0\uC6D0 \uD615\uC2DD(${format2}) \u2014 \uB808\uC774\uC544\uC6C3 \uB80C\uB354\uB294 HWPX\xB7HWP \uB9CC \uC9C0\uC6D0\uD569\uB2C8\uB2E4`);
54569
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(`\uB80C\uB354 \uBBF8\uC9C0\uC6D0 \uD615\uC2DD(${format2}) \u2014 \uB808\uC774\uC544\uC6C3 \uB80C\uB354\uB294 HWPX\xB7HWP \uB9CC \uC9C0\uC6D0\uD569\uB2C8\uB2E4`);
54567
54570
  }
54568
54571
  async function renderDocumentToScene(input, options = {}) {
54569
54572
  const buffer = await loadBuffer(input);
54570
54573
  const source = await sourceFormatOf(buffer);
54571
54574
  const select = options.pages !== void 0 ? (pageCount) => {
54572
54575
  const set = _chunkJ55UQC5Hcjs.parsePageRange.call(void 0, options.pages, pageCount);
54573
- if (set.size === 0) throw new (0, _chunkU6SSH2TGcjs.KordocError)(`\uC120\uD0DD\uD55C \uD398\uC774\uC9C0\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 \uBB38\uC11C\uB294 ${pageCount}\uCABD (pages: ${JSON.stringify(options.pages)})`);
54576
+ if (set.size === 0) throw new (0, _chunkFJ45NNLAcjs.KordocError)(`\uC120\uD0DD\uD55C \uD398\uC774\uC9C0\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 \uBB38\uC11C\uB294 ${pageCount}\uCABD (pages: ${JSON.stringify(options.pages)})`);
54574
54577
  return set;
54575
54578
  } : void 0;
54576
54579
  const renderOptions = { reflow: _nullishCoalesce(options.reflow, () => ( true)), reflowMode: options.reflowMode, highlights: options.highlights, maxImageBytes: options.maxImageBytes };
@@ -54606,7 +54609,7 @@ async function renderDocument(input, options) {
54606
54609
  break;
54607
54610
  }
54608
54611
  default:
54609
- throw new (0, _chunkU6SSH2TGcjs.KordocError)(`\uC54C \uC218 \uC5C6\uB294 \uB80C\uB354 \uD3EC\uB9F7: ${String(options.format)} (svg|html|png|jpeg|pdf)`);
54612
+ throw new (0, _chunkFJ45NNLAcjs.KordocError)(`\uC54C \uC218 \uC5C6\uB294 \uB80C\uB354 \uD3EC\uB9F7: ${String(options.format)} (svg|html|png|jpeg|pdf)`);
54610
54613
  }
54611
54614
  return { scene, assets };
54612
54615
  }
@@ -54636,7 +54639,7 @@ async function extractRenderedRegions(input, options = {}) {
54636
54639
  const out = [];
54637
54640
  for (const [page, items] of [...byPage.entries()].sort((a, b) => a[0] - b[0])) {
54638
54641
  const meta = scene.pages.find((p) => p.page === page);
54639
- if (!meta) throw new (0, _chunkU6SSH2TGcjs.KordocError)(`\uD398\uC774\uC9C0 ${page} \uBA54\uD0C0 \uC5C6\uC74C`);
54642
+ if (!meta) throw new (0, _chunkFJ45NNLAcjs.KordocError)(`\uD398\uC774\uC9C0 ${page} \uBA54\uD0C0 \uC5C6\uC74C`);
54640
54643
  const raster = await rasterizePageSvg(pageSvgs.get(page), meta.width, meta.height, { format: format2, maxWidthPx: options.maxWidthPx, quality: options.quality });
54641
54644
  for (const { region, bbox } of items) {
54642
54645
  const rect = cropRect(bbox, raster.scale, raster.widthPx, raster.heightPx, _nullishCoalesce(options.paddingPt, () => ( 0)));
@@ -54660,9 +54663,9 @@ function wantsCrop(kind, policy) {
54660
54663
  }
54661
54664
  async function extractTables(input, options = {}) {
54662
54665
  const policy = _nullishCoalesce(options.policy, () => ( "non-tabular-and-uncertain"));
54663
- const buffer = typeof input === "string" ? _chunkU6SSH2TGcjs.toArrayBuffer.call(void 0, await _promises.readFile.call(void 0, input)) : Buffer.isBuffer(input) ? _chunkU6SSH2TGcjs.toArrayBuffer.call(void 0, input) : input;
54666
+ const buffer = typeof input === "string" ? _chunkFJ45NNLAcjs.toArrayBuffer.call(void 0, await _promises.readFile.call(void 0, input)) : Buffer.isBuffer(input) ? _chunkFJ45NNLAcjs.toArrayBuffer.call(void 0, input) : input;
54664
54667
  const parsed = await parse(buffer, { classifyTables: true, layoutTables: "keep" });
54665
- if (!parsed.success) throw new (0, _chunkU6SSH2TGcjs.KordocError)(`\uD30C\uC2F1 \uC2E4\uD328: ${parsed.error}`);
54668
+ if (!parsed.success) throw new (0, _chunkFJ45NNLAcjs.KordocError)(`\uD30C\uC2F1 \uC2E4\uD328: ${parsed.error}`);
54666
54669
  const blocks = collectTableBlocks(parsed.blocks);
54667
54670
  const out = blocks.map((b, i) => ({
54668
54671
  id: _nullishCoalesce(b.table.sourceId, () => ( `tbl-${i + 1}`)),
@@ -54720,22 +54723,22 @@ async function extractTables(input, options = {}) {
54720
54723
  // src/index.ts
54721
54724
  async function parse(input, options) {
54722
54725
  let buffer;
54723
- const opts = typeof input === "string" && !_optionalChain([options, 'optionalAccess', _1371 => _1371.filePath]) ? { ...options, filePath: input } : options;
54724
- if (_optionalChain([opts, 'optionalAccess', _1372 => _1372.htmlTables]) && opts.tableFormat) {
54726
+ const opts = typeof input === "string" && !_optionalChain([options, 'optionalAccess', _1374 => _1374.filePath]) ? { ...options, filePath: input } : options;
54727
+ if (_optionalChain([opts, 'optionalAccess', _1375 => _1375.htmlTables]) && opts.tableFormat) {
54725
54728
  return { success: false, fileType: "unknown", error: "htmlTables \uC640 tableFormat \uC740 \uD568\uAED8 \uC4F8 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4" };
54726
54729
  }
54727
- const ocrOptionError = _chunk37BDHFGXcjs.validateOcrOptions.call(void 0, opts);
54730
+ const ocrOptionError = _chunkS34OVRKDcjs.validateOcrOptions.call(void 0, opts);
54728
54731
  if (ocrOptionError) return { success: false, fileType: "unknown", error: ocrOptionError };
54729
54732
  if (typeof input === "string") {
54730
54733
  try {
54731
54734
  const buf = await _promises.readFile.call(void 0, input);
54732
- buffer = _chunkU6SSH2TGcjs.toArrayBuffer.call(void 0, buf);
54735
+ buffer = _chunkFJ45NNLAcjs.toArrayBuffer.call(void 0, buf);
54733
54736
  } catch (err) {
54734
54737
  const msg2 = err instanceof Error && "code" in err && err.code === "ENOENT" ? `\uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: ${input}` : `\uD30C\uC77C \uC77D\uAE30 \uC2E4\uD328: ${input}`;
54735
- return { success: false, fileType: "unknown", error: msg2, code: _chunkU6SSH2TGcjs.classifyError.call(void 0, err) };
54738
+ return { success: false, fileType: "unknown", error: msg2, code: _chunkFJ45NNLAcjs.classifyError.call(void 0, err) };
54736
54739
  }
54737
54740
  } else if (Buffer.isBuffer(input)) {
54738
- buffer = _chunkU6SSH2TGcjs.toArrayBuffer.call(void 0, input);
54741
+ buffer = _chunkFJ45NNLAcjs.toArrayBuffer.call(void 0, input);
54739
54742
  } else {
54740
54743
  buffer = input;
54741
54744
  }
@@ -54744,23 +54747,23 @@ async function parse(input, options) {
54744
54747
  }
54745
54748
  const format2 = detectFormat(buffer);
54746
54749
  const result = await dispatch(format2, buffer, opts);
54747
- if (result.success && _optionalChain([opts, 'optionalAccess', _1373 => _1373.images]) === false) {
54750
+ if (result.success && _optionalChain([opts, 'optionalAccess', _1376 => _1376.images]) === false) {
54748
54751
  delete result.images;
54749
54752
  dropImageBytes(result.blocks);
54750
54753
  }
54751
- if (result.success && _optionalChain([opts, 'optionalAccess', _1374 => _1374.classifyTables])) classifyTableTree(result.blocks);
54754
+ if (result.success && _optionalChain([opts, 'optionalAccess', _1377 => _1377.classifyTables])) classifyTableTree(result.blocks);
54752
54755
  let out = result;
54753
- if (result.success && _optionalChain([opts, 'optionalAccess', _1375 => _1375.pages]) && result.pageCount && _chunkJ55UQC5Hcjs.parsePageRange.call(void 0, opts.pages, result.pageCount).size === 0) {
54756
+ if (result.success && _optionalChain([opts, 'optionalAccess', _1378 => _1378.pages]) && result.pageCount && _chunkJ55UQC5Hcjs.parsePageRange.call(void 0, opts.pages, result.pageCount).size === 0) {
54754
54757
  out = { ...result, warnings: [..._nullishCoalesce(result.warnings, () => ( [])), { code: "PARTIAL_PARSE", message: `\uC694\uCCAD\uD55C \uCABD \uBC94\uC704(${opts.pages})\uAC00 \uBB38\uC11C \uCABD(1~${result.pageCount})\uACFC \uACB9\uCE58\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4` }] };
54755
54758
  }
54756
54759
  if (out.success && !out.pages) {
54757
- const pages = _chunkJYUYW34Pcjs.blocksToPages.call(void 0, out.blocks, (bs) => _chunk37BDHFGXcjs.blocksToMarkdown.call(void 0, bs, { tableFormat: _optionalChain([opts, 'optionalAccess', _1376 => _1376.tableFormat]) }));
54760
+ const pages = _chunkTN4SSNEScjs.blocksToPages.call(void 0, out.blocks, (bs) => _chunkS34OVRKDcjs.blocksToMarkdown.call(void 0, bs, { tableFormat: _optionalChain([opts, 'optionalAccess', _1379 => _1379.tableFormat]) }));
54758
54761
  if (pages) out = { ...out, pages };
54759
54762
  }
54760
- if (out.success && _optionalChain([opts, 'optionalAccess', _1377 => _1377.plain])) {
54763
+ if (out.success && _optionalChain([opts, 'optionalAccess', _1380 => _1380.plain])) {
54761
54764
  out = { ...out, markdown: toPlainMarkdown(out.markdown), ...out.pages ? { pages: out.pages.map((p) => ({ ...p, markdown: toPlainMarkdown(p.markdown) })) } : {} };
54762
54765
  }
54763
- if (out.success && _optionalChain([opts, 'optionalAccess', _1378 => _1378.htmlTables])) {
54766
+ if (out.success && _optionalChain([opts, 'optionalAccess', _1381 => _1381.htmlTables])) {
54764
54767
  out = { ...out, markdown: toHtmlTables(out.markdown), ...out.pages ? { pages: out.pages.map((p) => ({ ...p, markdown: toHtmlTables(p.markdown) })) } : {} };
54765
54768
  }
54766
54769
  return out;
@@ -54805,42 +54808,42 @@ async function dispatch(format2, buffer, opts) {
54805
54808
  async function withEmbeddedImageOcr(blocks, markdown, warnings, images, options) {
54806
54809
  const list = [..._nullishCoalesce(warnings, () => ( []))];
54807
54810
  if (!await ocrEmbeddedImages(blocks, options, list)) return { markdown, warnings: list.length ? list : void 0 };
54808
- let md2 = _chunk37BDHFGXcjs.blocksToMarkdown.call(void 0, blocks, { tableFormat: _optionalChain([options, 'optionalAccess', _1379 => _1379.tableFormat]) });
54809
- if (_optionalChain([options, 'optionalAccess', _1380 => _1380.inlineImages]) && options.images !== false && _optionalChain([images, 'optionalAccess', _1381 => _1381.length])) {
54811
+ let md2 = _chunkS34OVRKDcjs.blocksToMarkdown.call(void 0, blocks, { tableFormat: _optionalChain([options, 'optionalAccess', _1382 => _1382.tableFormat]) });
54812
+ if (_optionalChain([options, 'optionalAccess', _1383 => _1383.inlineImages]) && options.images !== false && _optionalChain([images, 'optionalAccess', _1384 => _1384.length])) {
54810
54813
  try {
54811
- md2 = _chunkJYUYW34Pcjs.inlineImagesIntoMarkdown.call(void 0, md2, images, { compress: true });
54814
+ md2 = _chunkTN4SSNEScjs.inlineImagesIntoMarkdown.call(void 0, md2, images, { compress: true });
54812
54815
  } catch (e48) {
54813
54816
  }
54814
54817
  }
54815
54818
  return { markdown: md2, warnings: list.length ? list : void 0 };
54816
54819
  }
54817
54820
  function scriptsOff(r, off) {
54818
- return off ? _chunk37BDHFGXcjs.stripScriptTags.call(void 0, r) : r;
54821
+ return off ? _chunkS34OVRKDcjs.stripScriptTags.call(void 0, r) : r;
54819
54822
  }
54820
54823
  async function parseImage(buffer, options) {
54821
54824
  try {
54822
- const { parseImageDocument } = await Promise.resolve().then(() => _interopRequireWildcard(require("./image-ocr-PN3NFOXH.cjs")));
54825
+ const { parseImageDocument } = await Promise.resolve().then(() => _interopRequireWildcard(require("./image-ocr-DP4YTLGN.cjs")));
54823
54826
  const { blocks, warnings, lines } = await parseImageDocument(buffer, options);
54824
- _chunk37BDHFGXcjs.stripScriptTags.call(void 0, { blocks });
54827
+ _chunkS34OVRKDcjs.stripScriptTags.call(void 0, { blocks });
54825
54828
  return {
54826
54829
  success: true,
54827
54830
  fileType: "image",
54828
- markdown: _chunk37BDHFGXcjs.blocksToMarkdown.call(void 0, blocks, { tableFormat: _optionalChain([options, 'optionalAccess', _1382 => _1382.tableFormat]) }),
54831
+ markdown: _chunkS34OVRKDcjs.blocksToMarkdown.call(void 0, blocks, { tableFormat: _optionalChain([options, 'optionalAccess', _1385 => _1385.tableFormat]) }),
54829
54832
  blocks,
54830
54833
  warnings: warnings.length ? warnings : void 0,
54831
54834
  pageCount: 1,
54832
- ..._optionalChain([options, 'optionalAccess', _1383 => _1383.ocrLines]) ? { ocrLines: lines ? [lines] : [] } : {}
54835
+ ..._optionalChain([options, 'optionalAccess', _1386 => _1386.ocrLines]) ? { ocrLines: lines ? [lines] : [] } : {}
54833
54836
  };
54834
54837
  } catch (err) {
54835
- return { success: false, fileType: "image", error: _chunkU6SSH2TGcjs.sanitizeError.call(void 0, err), code: _chunkU6SSH2TGcjs.classifyError.call(void 0, err) };
54838
+ return { success: false, fileType: "image", error: _chunkFJ45NNLAcjs.sanitizeError.call(void 0, err), code: _chunkFJ45NNLAcjs.classifyError.call(void 0, err) };
54836
54839
  }
54837
54840
  }
54838
54841
  async function parseHwp3(buffer, options) {
54839
54842
  try {
54840
54843
  const { markdown, blocks, metadata, outline, warnings, images } = parseHwp3Document(buffer, options);
54841
- return { success: true, fileType: "hwp3", markdown, blocks, metadata, outline, warnings, images, pageCount: _optionalChain([metadata, 'optionalAccess', _1384 => _1384.pageCount]) };
54844
+ return { success: true, fileType: "hwp3", markdown, blocks, metadata, outline, warnings, images, pageCount: _optionalChain([metadata, 'optionalAccess', _1387 => _1387.pageCount]) };
54842
54845
  } catch (err) {
54843
- return { success: false, fileType: "hwp3", error: _chunkU6SSH2TGcjs.sanitizeError.call(void 0, err), code: _chunkU6SSH2TGcjs.classifyError.call(void 0, err) };
54846
+ return { success: false, fileType: "hwp3", error: _chunkFJ45NNLAcjs.sanitizeError.call(void 0, err), code: _chunkFJ45NNLAcjs.classifyError.call(void 0, err) };
54844
54847
  }
54845
54848
  }
54846
54849
  async function parseHwpx(buffer, options) {
@@ -54848,15 +54851,15 @@ async function parseHwpx(buffer, options) {
54848
54851
  const doc = await parseHwpxDocument(buffer, options);
54849
54852
  const { blocks, metadata, outline, images } = doc;
54850
54853
  const { markdown, warnings } = await withEmbeddedImageOcr(blocks, doc.markdown, doc.warnings, void 0, options);
54851
- return scriptsOff({ success: true, fileType: "hwpx", markdown, blocks, metadata, outline, warnings, images: _optionalChain([images, 'optionalAccess', _1385 => _1385.length]) ? images : void 0, pageCount: _optionalChain([metadata, 'optionalAccess', _1386 => _1386.pageCount]) }, _optionalChain([options, 'optionalAccess', _1387 => _1387.scriptTags]) === false);
54854
+ return scriptsOff({ success: true, fileType: "hwpx", markdown, blocks, metadata, outline, warnings, images: _optionalChain([images, 'optionalAccess', _1388 => _1388.length]) ? images : void 0, pageCount: _optionalChain([metadata, 'optionalAccess', _1389 => _1389.pageCount]) }, _optionalChain([options, 'optionalAccess', _1390 => _1390.scriptTags]) === false);
54852
54855
  } catch (err) {
54853
- return { success: false, fileType: "hwpx", error: _chunkU6SSH2TGcjs.sanitizeError.call(void 0, err), code: _chunkU6SSH2TGcjs.classifyError.call(void 0, err) };
54856
+ return { success: false, fileType: "hwpx", error: _chunkFJ45NNLAcjs.sanitizeError.call(void 0, err), code: _chunkFJ45NNLAcjs.classifyError.call(void 0, err) };
54854
54857
  }
54855
54858
  }
54856
54859
  async function parseHwp(buffer, options) {
54857
54860
  try {
54858
54861
  const { markdown, blocks, metadata, outline, warnings, images } = parseHwp5Document(Buffer.from(buffer), options);
54859
- if (isDistributionSentinel(markdown) && isComFallbackAvailable() && _optionalChain([options, 'optionalAccess', _1388 => _1388.filePath])) {
54862
+ if (isDistributionSentinel(markdown) && isComFallbackAvailable() && _optionalChain([options, 'optionalAccess', _1391 => _1391.filePath])) {
54860
54863
  try {
54861
54864
  const { pages, pageCount, warnings: comWarns } = extractTextViaCom(options.filePath);
54862
54865
  if (pages.some((p) => p && p.trim().length > 0)) {
@@ -54875,15 +54878,15 @@ async function parseHwp(buffer, options) {
54875
54878
  }
54876
54879
  }
54877
54880
  const ocred = await withEmbeddedImageOcr(blocks, markdown, warnings, images, options);
54878
- return scriptsOff({ success: true, fileType: "hwp", markdown: ocred.markdown, blocks, metadata, outline, warnings: ocred.warnings, images: _optionalChain([images, 'optionalAccess', _1389 => _1389.length]) ? images : void 0, pageCount: _optionalChain([metadata, 'optionalAccess', _1390 => _1390.pageCount]) }, _optionalChain([options, 'optionalAccess', _1391 => _1391.scriptTags]) === false);
54881
+ return scriptsOff({ success: true, fileType: "hwp", markdown: ocred.markdown, blocks, metadata, outline, warnings: ocred.warnings, images: _optionalChain([images, 'optionalAccess', _1392 => _1392.length]) ? images : void 0, pageCount: _optionalChain([metadata, 'optionalAccess', _1393 => _1393.pageCount]) }, _optionalChain([options, 'optionalAccess', _1394 => _1394.scriptTags]) === false);
54879
54882
  } catch (err) {
54880
- return { success: false, fileType: "hwp", error: _chunkU6SSH2TGcjs.sanitizeError.call(void 0, err), code: _chunkU6SSH2TGcjs.classifyError.call(void 0, err) };
54883
+ return { success: false, fileType: "hwp", error: _chunkFJ45NNLAcjs.sanitizeError.call(void 0, err), code: _chunkFJ45NNLAcjs.classifyError.call(void 0, err) };
54881
54884
  }
54882
54885
  }
54883
54886
  async function parsePdf(buffer, options) {
54884
54887
  let parsePdfDocument;
54885
54888
  try {
54886
- const mod = await Promise.resolve().then(() => _interopRequireWildcard(require("./parser-KQNPM3WX.cjs")));
54889
+ const mod = await Promise.resolve().then(() => _interopRequireWildcard(require("./parser-CGKXEB3U.cjs")));
54887
54890
  parsePdfDocument = mod.parsePdfDocument;
54888
54891
  } catch (e50) {
54889
54892
  return {
@@ -54895,59 +54898,59 @@ async function parsePdf(buffer, options) {
54895
54898
  }
54896
54899
  try {
54897
54900
  const { markdown, blocks, metadata, outline, warnings, isImageBased, pageQuality, qualitySummary, images, pages, ocrLines } = await parsePdfDocument(buffer, options);
54898
- return scriptsOff({ success: true, fileType: "pdf", markdown, blocks, metadata, outline, warnings, isImageBased, pageQuality, qualitySummary, images, pages, pageCount: _optionalChain([metadata, 'optionalAccess', _1392 => _1392.pageCount]), ...ocrLines ? { ocrLines } : {} }, _optionalChain([options, 'optionalAccess', _1393 => _1393.scriptTags]) !== true);
54901
+ return scriptsOff({ success: true, fileType: "pdf", markdown, blocks, metadata, outline, warnings, isImageBased, pageQuality, qualitySummary, images, pages, pageCount: _optionalChain([metadata, 'optionalAccess', _1395 => _1395.pageCount]), ...ocrLines ? { ocrLines } : {} }, _optionalChain([options, 'optionalAccess', _1396 => _1396.scriptTags]) !== true);
54899
54902
  } catch (err) {
54900
54903
  const isImageBased = err instanceof Error && "isImageBased" in err ? true : void 0;
54901
- return { success: false, fileType: "pdf", error: _chunkU6SSH2TGcjs.sanitizeError.call(void 0, err), code: _chunkU6SSH2TGcjs.classifyError.call(void 0, err), isImageBased };
54904
+ return { success: false, fileType: "pdf", error: _chunkFJ45NNLAcjs.sanitizeError.call(void 0, err), code: _chunkFJ45NNLAcjs.classifyError.call(void 0, err), isImageBased };
54902
54905
  }
54903
54906
  }
54904
54907
  async function parseXlsx(buffer, options) {
54905
54908
  try {
54906
54909
  const { markdown, blocks, metadata, warnings } = await parseXlsxDocument(buffer, options);
54907
- return { success: true, fileType: "xlsx", markdown, blocks, metadata, warnings, pageCount: _optionalChain([metadata, 'optionalAccess', _1394 => _1394.pageCount]) };
54910
+ return { success: true, fileType: "xlsx", markdown, blocks, metadata, warnings, pageCount: _optionalChain([metadata, 'optionalAccess', _1397 => _1397.pageCount]) };
54908
54911
  } catch (err) {
54909
- return { success: false, fileType: "xlsx", error: _chunkU6SSH2TGcjs.sanitizeError.call(void 0, err), code: _chunkU6SSH2TGcjs.classifyError.call(void 0, err) };
54912
+ return { success: false, fileType: "xlsx", error: _chunkFJ45NNLAcjs.sanitizeError.call(void 0, err), code: _chunkFJ45NNLAcjs.classifyError.call(void 0, err) };
54910
54913
  }
54911
54914
  }
54912
54915
  async function parseXls(buffer, options) {
54913
54916
  try {
54914
54917
  const { markdown, blocks, metadata, warnings } = await parseXlsDocument(buffer, options);
54915
- return { success: true, fileType: "xls", markdown, blocks, metadata, warnings, pageCount: _optionalChain([metadata, 'optionalAccess', _1395 => _1395.pageCount]) };
54918
+ return { success: true, fileType: "xls", markdown, blocks, metadata, warnings, pageCount: _optionalChain([metadata, 'optionalAccess', _1398 => _1398.pageCount]) };
54916
54919
  } catch (err) {
54917
- return { success: false, fileType: "xls", error: _chunkU6SSH2TGcjs.sanitizeError.call(void 0, err), code: _chunkU6SSH2TGcjs.classifyError.call(void 0, err) };
54920
+ return { success: false, fileType: "xls", error: _chunkFJ45NNLAcjs.sanitizeError.call(void 0, err), code: _chunkFJ45NNLAcjs.classifyError.call(void 0, err) };
54918
54921
  }
54919
54922
  }
54920
54923
  async function parseDocx(buffer, options) {
54921
54924
  try {
54922
54925
  const { markdown, blocks, metadata, outline, warnings, images } = await parseDocxDocument(buffer, options);
54923
- return scriptsOff({ success: true, fileType: "docx", markdown, blocks, metadata, outline, warnings, images: _optionalChain([images, 'optionalAccess', _1396 => _1396.length]) ? images : void 0, pageCount: _optionalChain([metadata, 'optionalAccess', _1397 => _1397.pageCount]) }, _optionalChain([options, 'optionalAccess', _1398 => _1398.scriptTags]) === false);
54926
+ return scriptsOff({ success: true, fileType: "docx", markdown, blocks, metadata, outline, warnings, images: _optionalChain([images, 'optionalAccess', _1399 => _1399.length]) ? images : void 0, pageCount: _optionalChain([metadata, 'optionalAccess', _1400 => _1400.pageCount]) }, _optionalChain([options, 'optionalAccess', _1401 => _1401.scriptTags]) === false);
54924
54927
  } catch (err) {
54925
- return { success: false, fileType: "docx", error: _chunkU6SSH2TGcjs.sanitizeError.call(void 0, err), code: _chunkU6SSH2TGcjs.classifyError.call(void 0, err) };
54928
+ return { success: false, fileType: "docx", error: _chunkFJ45NNLAcjs.sanitizeError.call(void 0, err), code: _chunkFJ45NNLAcjs.classifyError.call(void 0, err) };
54926
54929
  }
54927
54930
  }
54928
54931
  async function parsePptx(buffer, options) {
54929
54932
  try {
54930
54933
  const { markdown, blocks, metadata, outline, warnings, images } = await parsePptxDocument(buffer, options);
54931
- return scriptsOff({ success: true, fileType: "pptx", markdown, blocks, metadata, outline, warnings, images: _optionalChain([images, 'optionalAccess', _1399 => _1399.length]) ? images : void 0, pageCount: _optionalChain([metadata, 'optionalAccess', _1400 => _1400.pageCount]) }, _optionalChain([options, 'optionalAccess', _1401 => _1401.scriptTags]) === false);
54934
+ return scriptsOff({ success: true, fileType: "pptx", markdown, blocks, metadata, outline, warnings, images: _optionalChain([images, 'optionalAccess', _1402 => _1402.length]) ? images : void 0, pageCount: _optionalChain([metadata, 'optionalAccess', _1403 => _1403.pageCount]) }, _optionalChain([options, 'optionalAccess', _1404 => _1404.scriptTags]) === false);
54932
54935
  } catch (err) {
54933
- return { success: false, fileType: "pptx", error: _chunkU6SSH2TGcjs.sanitizeError.call(void 0, err), code: _chunkU6SSH2TGcjs.classifyError.call(void 0, err) };
54936
+ return { success: false, fileType: "pptx", error: _chunkFJ45NNLAcjs.sanitizeError.call(void 0, err), code: _chunkFJ45NNLAcjs.classifyError.call(void 0, err) };
54934
54937
  }
54935
54938
  }
54936
54939
  async function parseHwpml(buffer, options) {
54937
54940
  try {
54938
54941
  const { markdown, blocks, metadata, outline, warnings } = parseHwpmlDocument(buffer, options);
54939
- return { success: true, fileType: "hwpml", markdown, blocks, metadata, outline, warnings, pageCount: _optionalChain([metadata, 'optionalAccess', _1402 => _1402.pageCount]) };
54942
+ return { success: true, fileType: "hwpml", markdown, blocks, metadata, outline, warnings, pageCount: _optionalChain([metadata, 'optionalAccess', _1405 => _1405.pageCount]) };
54940
54943
  } catch (err) {
54941
- return { success: false, fileType: "hwpml", error: _chunkU6SSH2TGcjs.sanitizeError.call(void 0, err), code: _chunkU6SSH2TGcjs.classifyError.call(void 0, err) };
54944
+ return { success: false, fileType: "hwpml", error: _chunkFJ45NNLAcjs.sanitizeError.call(void 0, err), code: _chunkFJ45NNLAcjs.classifyError.call(void 0, err) };
54942
54945
  }
54943
54946
  }
54944
54947
  async function fillForm(input, values, outputFormat = "markdown") {
54945
54948
  let buffer;
54946
54949
  if (typeof input === "string") {
54947
54950
  const buf = await _promises.readFile.call(void 0, input);
54948
- buffer = _chunkU6SSH2TGcjs.toArrayBuffer.call(void 0, buf);
54951
+ buffer = _chunkFJ45NNLAcjs.toArrayBuffer.call(void 0, buf);
54949
54952
  } else if (Buffer.isBuffer(input)) {
54950
- buffer = _chunkU6SSH2TGcjs.toArrayBuffer.call(void 0, input);
54953
+ buffer = _chunkFJ45NNLAcjs.toArrayBuffer.call(void 0, input);
54951
54954
  } else {
54952
54955
  buffer = input;
54953
54956
  }
@@ -54973,7 +54976,7 @@ async function fillForm(input, values, outputFormat = "markdown") {
54973
54976
  throw new Error(`\uC11C\uC2DD \uD30C\uC2F1 \uC2E4\uD328: ${parsed.error}`);
54974
54977
  }
54975
54978
  const fill = fillFormFields(parsed.blocks, values);
54976
- const markdown = _chunk37BDHFGXcjs.blocksToMarkdown.call(void 0, fill.blocks);
54979
+ const markdown = _chunkS34OVRKDcjs.blocksToMarkdown.call(void 0, fill.blocks);
54977
54980
  if (outputFormat === "hwpx") {
54978
54981
  const hwpxBuffer = await markdownToHwpx(markdown);
54979
54982
  return { output: hwpxBuffer, format: "hwpx", fill };
@@ -55072,5 +55075,5 @@ async function fillForm(input, values, outputFormat = "markdown") {
55072
55075
 
55073
55076
 
55074
55077
 
55075
- exports.AGENCY_COMMON_NAME = AGENCY_COMMON_NAME; exports.BUILTIN_TEMPLATES = BUILTIN_TEMPLATES; exports.DEFAULT_REDACT_RULES = DEFAULT_REDACT_RULES; exports.HwpxSession = HwpxSession; exports.PRESET_ALIAS = PRESET_ALIAS; exports.SPACE_EM_FIXED = SPACE_EM_FIXED; exports.SPACE_EM_FONT = SPACE_EM_FONT; exports.VERSION = _chunkU6SSH2TGcjs.VERSION; exports.ValueCursor = ValueCursor; exports.agencyNames = agencyNames; exports.agencyStyle = agencyStyle; exports.applySplices = applySplices; exports.blocksToChunks = blocksToChunks; exports.blocksToMarkdown = _chunk37BDHFGXcjs.blocksToMarkdown; exports.blocksToPages = _chunkJYUYW34Pcjs.blocksToPages; exports.blocksToPdf = blocksToPdf; exports.buildParagraphSplices = buildParagraphSplices; exports.buildRangeSplices = buildRangeSplices; exports.charWidthEm1000 = charWidthEm1000; exports.chooseTableRepresentation = chooseTableRepresentation; exports.classifyTable = classifyTable; exports.classifyTableTree = classifyTableTree; exports.collectTableBlocks = collectTableBlocks; exports.compare = compare; exports.detectFormat = detectFormat; exports.detectOle2Format = detectOle2Format; exports.detectZipFormat = detectZipFormat; exports.diffBlocks = diffBlocks; exports.extractClickHereFields = extractClickHereFields; exports.extractFormFields = extractFormFields; exports.extractFormSchema = extractFormSchema; exports.extractRenderedRegions = extractRenderedRegions; exports.extractTables = extractTables; exports.fillForm = fillForm; exports.fillFormFields = fillFormFields; exports.fillHwpx = fillHwpx; exports.fillWithUniqueGuard = fillWithUniqueGuard; exports.fitRatioForFewerLines = fitRatioForFewerLines; exports.flattenLayoutTables = _chunk37BDHFGXcjs.flattenLayoutTables; exports.formatFillValue = formatFillValue; exports.gongmunLintWarnings = gongmunLintWarnings; exports.hasStructuredCellContent = _chunk37BDHFGXcjs.hasStructuredCellContent; exports.hwpxToProfile = hwpxToProfile; exports.incompatibleGongmunWarnings = incompatibleGongmunWarnings; exports.inferFieldType = inferFieldType; exports.isHwpxFile = isHwpxFile; exports.isKnownFont = isKnownFont; exports.isLabelCell = isLabelCell; exports.isOldHwpFile = isOldHwpFile; exports.isPdfFile = isPdfFile; exports.isZipFile = isZipFile; exports.lintGongmunText = lintGongmunText; exports.lintMuncheText = lintMuncheText; exports.markdownToHwpx = markdownToHwpx; exports.markdownToPdf = markdownToPdf; exports.measureTextWidth = measureTextWidth; exports.muncheLintWarnings = muncheLintWarnings; exports.normalizeGongmunPreset = normalizeGongmunPreset; exports.openHwpxDocument = openHwpxDocument; exports.parse = parse; exports.parseDocx = parseDocx; exports.parseHwp = parseHwp; exports.parseHwp3 = parseHwp3; exports.parseHwpml = parseHwpml; exports.parseHwpx = parseHwpx; exports.parseImage = parseImage; exports.parsePdf = parsePdf; exports.parsePptx = parsePptx; exports.parseXls = parseXls; exports.parseXlsx = parseXlsx; exports.patchHwp = patchHwp; exports.patchHwpx = patchHwpx; exports.patchHwpxBlocks = patchHwpxBlocks; exports.placeSealHwpx = placeSealHwpx; exports.readBuiltinTemplate = readBuiltinTemplate; exports.readBuiltinTemplateSample = readBuiltinTemplateSample; exports.redactMarkdown = redactMarkdown; exports.redactText = redactText; exports.renderDocument = renderDocument; exports.renderDocumentToScene = renderDocumentToScene; exports.renderHtml = renderHtml; exports.renderHwp5Pages = renderHwp5Pages; exports.renderHwpxToSvg = renderHwpxToSvg; exports.renderSceneToHtml = renderSceneToHtml; exports.resolveBuiltinTemplate = resolveBuiltinTemplate; exports.scanSectionXml = scanSectionXml; exports.simulateWrap = simulateWrap; exports.simulateWrapKeepWord = simulateWrapKeepWord; exports.unknownFontWarnings = unknownFontWarnings; exports.usesGaejosikMunche = usesGaejosikMunche; exports.validateHwpx = validateHwpx;
55078
+ exports.AGENCY_COMMON_NAME = AGENCY_COMMON_NAME; exports.BUILTIN_TEMPLATES = BUILTIN_TEMPLATES; exports.DEFAULT_REDACT_RULES = DEFAULT_REDACT_RULES; exports.HwpxSession = HwpxSession; exports.PRESET_ALIAS = PRESET_ALIAS; exports.SPACE_EM_FIXED = SPACE_EM_FIXED; exports.SPACE_EM_FONT = SPACE_EM_FONT; exports.VERSION = _chunkFJ45NNLAcjs.VERSION; exports.ValueCursor = ValueCursor; exports.agencyNames = agencyNames; exports.agencyStyle = agencyStyle; exports.applySplices = applySplices; exports.blocksToChunks = blocksToChunks; exports.blocksToMarkdown = _chunkS34OVRKDcjs.blocksToMarkdown; exports.blocksToPages = _chunkTN4SSNEScjs.blocksToPages; exports.blocksToPdf = blocksToPdf; exports.buildParagraphSplices = buildParagraphSplices; exports.buildRangeSplices = buildRangeSplices; exports.charWidthEm1000 = charWidthEm1000; exports.chooseTableRepresentation = chooseTableRepresentation; exports.classifyTable = classifyTable; exports.classifyTableTree = classifyTableTree; exports.collectTableBlocks = collectTableBlocks; exports.compare = compare; exports.detectFormat = detectFormat; exports.detectOle2Format = detectOle2Format; exports.detectZipFormat = detectZipFormat; exports.diffBlocks = diffBlocks; exports.extractClickHereFields = extractClickHereFields; exports.extractFormFields = extractFormFields; exports.extractFormSchema = extractFormSchema; exports.extractRenderedRegions = extractRenderedRegions; exports.extractTables = extractTables; exports.fillForm = fillForm; exports.fillFormFields = fillFormFields; exports.fillHwpx = fillHwpx; exports.fillWithUniqueGuard = fillWithUniqueGuard; exports.fitRatioForFewerLines = fitRatioForFewerLines; exports.flattenLayoutTables = _chunkS34OVRKDcjs.flattenLayoutTables; exports.formatFillValue = formatFillValue; exports.gongmunLintWarnings = gongmunLintWarnings; exports.hasStructuredCellContent = _chunkS34OVRKDcjs.hasStructuredCellContent; exports.hwpxToProfile = hwpxToProfile; exports.incompatibleGongmunWarnings = incompatibleGongmunWarnings; exports.inferFieldType = inferFieldType; exports.isHwpxFile = isHwpxFile; exports.isKnownFont = isKnownFont; exports.isLabelCell = isLabelCell; exports.isOldHwpFile = isOldHwpFile; exports.isPdfFile = isPdfFile; exports.isZipFile = isZipFile; exports.lintGongmunText = lintGongmunText; exports.lintMuncheText = lintMuncheText; exports.markdownToHwpx = markdownToHwpx; exports.markdownToPdf = markdownToPdf; exports.measureTextWidth = measureTextWidth; exports.muncheLintWarnings = muncheLintWarnings; exports.normalizeGongmunPreset = normalizeGongmunPreset; exports.openHwpxDocument = openHwpxDocument; exports.parse = parse; exports.parseDocx = parseDocx; exports.parseHwp = parseHwp; exports.parseHwp3 = parseHwp3; exports.parseHwpml = parseHwpml; exports.parseHwpx = parseHwpx; exports.parseImage = parseImage; exports.parsePdf = parsePdf; exports.parsePptx = parsePptx; exports.parseXls = parseXls; exports.parseXlsx = parseXlsx; exports.patchHwp = patchHwp; exports.patchHwpx = patchHwpx; exports.patchHwpxBlocks = patchHwpxBlocks; exports.placeSealHwpx = placeSealHwpx; exports.readBuiltinTemplate = readBuiltinTemplate; exports.readBuiltinTemplateSample = readBuiltinTemplateSample; exports.redactMarkdown = redactMarkdown; exports.redactText = redactText; exports.renderDocument = renderDocument; exports.renderDocumentToScene = renderDocumentToScene; exports.renderHtml = renderHtml; exports.renderHwp5Pages = renderHwp5Pages; exports.renderHwpxToSvg = renderHwpxToSvg; exports.renderSceneToHtml = renderSceneToHtml; exports.resolveBuiltinTemplate = resolveBuiltinTemplate; exports.scanSectionXml = scanSectionXml; exports.simulateWrap = simulateWrap; exports.simulateWrapKeepWord = simulateWrapKeepWord; exports.unknownFontWarnings = unknownFontWarnings; exports.usesGaejosikMunche = usesGaejosikMunche; exports.validateHwpx = validateHwpx;
55076
55079
  //# sourceMappingURL=index.cjs.map