kordoc 4.2.8 → 4.2.9

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 (82) hide show
  1. package/dist/{-SCTT2TBZ.js → -ECUCTQTR.js} +8 -8
  2. package/dist/{chunk-IJUAWDOS.js → chunk-27Z4PUZZ.js} +2 -2
  3. package/dist/{chunk-UKEZ46VL.js → chunk-3PLF5UIS.js} +2 -2
  4. package/dist/{chunk-7GEBDS6B.js → chunk-3TSTZGCJ.js} +2 -2
  5. package/dist/{chunk-ROKHZE76.cjs → chunk-4ZWKFDUC.cjs} +9 -9
  6. package/dist/{chunk-ROKHZE76.cjs.map → chunk-4ZWKFDUC.cjs.map} +1 -1
  7. package/dist/{chunk-2BTKLDNX.cjs → chunk-6GM2QLM3.cjs} +4 -4
  8. package/dist/{chunk-2BTKLDNX.cjs.map → chunk-6GM2QLM3.cjs.map} +1 -1
  9. package/dist/{chunk-WP4VD5T7.js → chunk-7ZARSBQ3.js} +2 -2
  10. package/dist/{chunk-YNAPK4H6.js → chunk-G3DMDTZI.js} +18 -17
  11. package/dist/chunk-G3DMDTZI.js.map +1 -0
  12. package/dist/{chunk-OQNFGKRY.cjs → chunk-GZ7W64QU.cjs} +2 -2
  13. package/dist/{chunk-OQNFGKRY.cjs.map → chunk-GZ7W64QU.cjs.map} +1 -1
  14. package/dist/{chunk-COHHXQSP.js → chunk-KTPZYXN2.js} +2 -2
  15. package/dist/{chunk-FS3XQ3ZQ.js → chunk-LXE7OR6N.js} +2 -2
  16. package/dist/{chunk-4FTXKIGT.js → chunk-MHMVFI2N.js} +2 -2
  17. package/dist/{chunk-GKSFNCVP.js → chunk-NIISBGSR.js} +2 -2
  18. package/dist/{chunk-CELJIGBQ.cjs → chunk-PATPZTH7.cjs} +3 -3
  19. package/dist/{chunk-CELJIGBQ.cjs.map → chunk-PATPZTH7.cjs.map} +1 -1
  20. package/dist/{chunk-QZCAIFUW.js → chunk-STYN45MS.js} +2 -2
  21. package/dist/{chunk-JP5MNHUK.js → chunk-VEHC4EJL.js} +2 -2
  22. package/dist/{chunk-EOVJ27WC.js → chunk-WTT2KJOM.js} +4 -4
  23. package/dist/chunk-WTT2KJOM.js.map +1 -0
  24. package/dist/{chunk-55QIELGV.js → chunk-XU4VWOKL.js} +3 -3
  25. package/dist/{chunk-URKX77GB.js → chunk-YR4PF56B.js} +2 -2
  26. package/dist/chunks-VFIMYK36.js +10 -0
  27. package/dist/cli.js +16 -16
  28. package/dist/{image-ocr-GHQ6YKJH.cjs → image-ocr-J5656BEE.cjs} +9 -9
  29. package/dist/{image-ocr-GHQ6YKJH.cjs.map → image-ocr-J5656BEE.cjs.map} +1 -1
  30. package/dist/{image-ocr-ORATZW73.js → image-ocr-KZTNJ62U.js} +4 -4
  31. package/dist/{image-ocr-ANSXR5KJ.js → image-ocr-PS7XCV6K.js} +4 -4
  32. package/dist/index.cjs +162 -161
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.js +15 -14
  35. package/dist/index.js.map +1 -1
  36. package/dist/mcp.js +14 -14
  37. package/dist/{parser-BPVTYM5K.js → parser-A34NAYKA.js} +5 -5
  38. package/dist/{parser-KTNIUF2N.cjs → parser-CSYU3CAW.cjs} +24 -24
  39. package/dist/{parser-KTNIUF2N.cjs.map → parser-CSYU3CAW.cjs.map} +1 -1
  40. package/dist/{parser-GZDOZCHM.js → parser-WNFWMBSL.js} +5 -5
  41. package/dist/pdf-ocr-KBMWPG2L.js +12 -0
  42. package/dist/{pdf-ocr-W2PA2K3U.js → pdf-ocr-NPZG67FN.js} +4 -4
  43. package/dist/pdf-ocr-O44DAGTY.cjs +13 -0
  44. package/dist/{pdf-ocr-6XKLXZTF.cjs.map → pdf-ocr-O44DAGTY.cjs.map} +1 -1
  45. package/dist/{profile-io-I2TH44EO.js → profile-io-43MF52H6.js} +3 -3
  46. package/dist/{rasterize-QBA43YAQ.js → rasterize-OG7KXBJS.js} +2 -2
  47. package/dist/render-336CJHAS.js +10 -0
  48. package/dist/seal-TM2XCE2R.js +10 -0
  49. package/dist/{watch-7V6X7LHV.js → watch-SOHQMZN2.js} +8 -8
  50. package/package.json +1 -1
  51. package/dist/chunk-EOVJ27WC.js.map +0 -1
  52. package/dist/chunk-YNAPK4H6.js.map +0 -1
  53. package/dist/chunks-KKYJDJT7.js +0 -10
  54. package/dist/pdf-ocr-6XKLXZTF.cjs +0 -13
  55. package/dist/pdf-ocr-HWPNMKKC.js +0 -12
  56. package/dist/render-MDJDKKNH.js +0 -10
  57. package/dist/seal-Z52JR2GX.js +0 -10
  58. /package/dist/{-SCTT2TBZ.js.map → -ECUCTQTR.js.map} +0 -0
  59. /package/dist/{chunk-IJUAWDOS.js.map → chunk-27Z4PUZZ.js.map} +0 -0
  60. /package/dist/{chunk-UKEZ46VL.js.map → chunk-3PLF5UIS.js.map} +0 -0
  61. /package/dist/{chunk-7GEBDS6B.js.map → chunk-3TSTZGCJ.js.map} +0 -0
  62. /package/dist/{chunk-WP4VD5T7.js.map → chunk-7ZARSBQ3.js.map} +0 -0
  63. /package/dist/{chunk-COHHXQSP.js.map → chunk-KTPZYXN2.js.map} +0 -0
  64. /package/dist/{chunk-FS3XQ3ZQ.js.map → chunk-LXE7OR6N.js.map} +0 -0
  65. /package/dist/{chunk-4FTXKIGT.js.map → chunk-MHMVFI2N.js.map} +0 -0
  66. /package/dist/{chunk-GKSFNCVP.js.map → chunk-NIISBGSR.js.map} +0 -0
  67. /package/dist/{chunk-QZCAIFUW.js.map → chunk-STYN45MS.js.map} +0 -0
  68. /package/dist/{chunk-JP5MNHUK.js.map → chunk-VEHC4EJL.js.map} +0 -0
  69. /package/dist/{chunk-55QIELGV.js.map → chunk-XU4VWOKL.js.map} +0 -0
  70. /package/dist/{chunk-URKX77GB.js.map → chunk-YR4PF56B.js.map} +0 -0
  71. /package/dist/{chunks-KKYJDJT7.js.map → chunks-VFIMYK36.js.map} +0 -0
  72. /package/dist/{image-ocr-ORATZW73.js.map → image-ocr-KZTNJ62U.js.map} +0 -0
  73. /package/dist/{image-ocr-ANSXR5KJ.js.map → image-ocr-PS7XCV6K.js.map} +0 -0
  74. /package/dist/{parser-BPVTYM5K.js.map → parser-A34NAYKA.js.map} +0 -0
  75. /package/dist/{parser-GZDOZCHM.js.map → parser-WNFWMBSL.js.map} +0 -0
  76. /package/dist/{pdf-ocr-HWPNMKKC.js.map → pdf-ocr-KBMWPG2L.js.map} +0 -0
  77. /package/dist/{pdf-ocr-W2PA2K3U.js.map → pdf-ocr-NPZG67FN.js.map} +0 -0
  78. /package/dist/{profile-io-I2TH44EO.js.map → profile-io-43MF52H6.js.map} +0 -0
  79. /package/dist/{rasterize-QBA43YAQ.js.map → rasterize-OG7KXBJS.js.map} +0 -0
  80. /package/dist/{render-MDJDKKNH.js.map → render-336CJHAS.js.map} +0 -0
  81. /package/dist/{seal-Z52JR2GX.js.map → seal-TM2XCE2R.js.map} +0 -0
  82. /package/dist/{watch-7V6X7LHV.js.map → watch-SOHQMZN2.js.map} +0 -0
package/dist/index.cjs CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
 
10
10
 
11
- var _chunk2BTKLDNXcjs = require('./chunk-2BTKLDNX.cjs');
11
+ var _chunk6GM2QLM3cjs = require('./chunk-6GM2QLM3.cjs');
12
12
 
13
13
 
14
14
  var _chunkDCZVOIEOcjs = require('./chunk-DCZVOIEO.cjs');
@@ -27,7 +27,7 @@ var _chunkDCZVOIEOcjs = require('./chunk-DCZVOIEO.cjs');
27
27
 
28
28
 
29
29
 
30
- var _chunkOQNFGKRYcjs = require('./chunk-OQNFGKRY.cjs');
30
+ var _chunkGZ7W64QUcjs = require('./chunk-GZ7W64QU.cjs');
31
31
 
32
32
 
33
33
  var _chunkGS7T56RPcjs = require('./chunk-GS7T56RP.cjs');
@@ -413,7 +413,7 @@ function comResultToParseResult(pages, pageCount, warnings) {
413
413
  var _xmldom = require('@xmldom/xmldom');
414
414
  var MAX_DECOMPRESS_SIZE = 256 * 1024 * 1024;
415
415
  var MAX_ZIP_ENTRIES = 500;
416
- var ZipBombError = class extends _chunkOQNFGKRYcjs.KordocError {
416
+ var ZipBombError = class extends _chunkGZ7W64QUcjs.KordocError {
417
417
  constructor(message) {
418
418
  super(message);
419
419
  this.name = "ZipBombError";
@@ -429,7 +429,7 @@ function createSectionShared() {
429
429
  function createXmlParser(warnings) {
430
430
  return new (0, _xmldom.DOMParser)({
431
431
  onError(level, msg2) {
432
- if (level === "fatalError") throw new (0, _chunkOQNFGKRYcjs.KordocError)(`XML \uD30C\uC2F1 \uC2E4\uD328: ${msg2}`);
432
+ if (level === "fatalError") throw new (0, _chunkGZ7W64QUcjs.KordocError)(`XML \uD30C\uC2F1 \uC2E4\uD328: ${msg2}`);
433
433
  _optionalChain([warnings, 'optionalAccess', _3 => _3.push, 'call', _4 => _4({ code: "MALFORMED_XML", message: `XML ${level === "warning" ? "\uACBD\uACE0" : "\uC624\uB958"}: ${msg2}` })]);
434
434
  }
435
435
  });
@@ -506,10 +506,10 @@ async function extractHwpxStyles(zip, decompressed) {
506
506
  const xml = await file.async("text");
507
507
  if (decompressed) {
508
508
  decompressed.total += xml.length * 2;
509
- if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkOQNFGKRYcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
509
+ if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkGZ7W64QUcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
510
510
  }
511
511
  const parser = createXmlParser();
512
- const doc = parser.parseFromString(_chunkOQNFGKRYcjs.stripDtd.call(void 0, xml), "text/xml");
512
+ const doc = parser.parseFromString(_chunkGZ7W64QUcjs.stripDtd.call(void 0, xml), "text/xml");
513
513
  if (!doc.documentElement) continue;
514
514
  const domDoc = doc;
515
515
  parseCharProperties(domDoc, result.charProperties);
@@ -696,9 +696,9 @@ function detectHwpxHeadings(blocks, styleMap) {
696
696
  let level = 0;
697
697
  if (baseFontSize > 0 && _optionalChain([block, 'access', _11 => _11.style, 'optionalAccess', _12 => _12.fontSize])) {
698
698
  const ratio = block.style.fontSize / baseFontSize;
699
- if (ratio >= _chunkOQNFGKRYcjs.HEADING_RATIO_H1) level = 1;
700
- else if (ratio >= _chunkOQNFGKRYcjs.HEADING_RATIO_H2) level = 2;
701
- else if (ratio >= _chunkOQNFGKRYcjs.HEADING_RATIO_H3) level = 3;
699
+ if (ratio >= _chunkGZ7W64QUcjs.HEADING_RATIO_H1) level = 1;
700
+ else if (ratio >= _chunkGZ7W64QUcjs.HEADING_RATIO_H2) level = 2;
701
+ else if (ratio >= _chunkGZ7W64QUcjs.HEADING_RATIO_H3) level = 3;
702
702
  }
703
703
  const compactText = text.replace(/\s+/g, "");
704
704
  if (/^제\d+[조장절편]/.test(compactText) && text.length <= 50) {
@@ -1623,7 +1623,7 @@ function needsGaejosikAssets(gongmun) {
1623
1623
  }
1624
1624
  function assertFiniteRange(name, value, min, max) {
1625
1625
  if (!Number.isFinite(value) || value < min || value > max) {
1626
- throw new (0, _chunkOQNFGKRYcjs.KordocError)(`${name} must be a finite number between ${min} and ${max}`);
1626
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)(`${name} must be a finite number between ${min} and ${max}`);
1627
1627
  }
1628
1628
  }
1629
1629
  function validateGongmunOptions(opts) {
@@ -1638,10 +1638,10 @@ function validateGongmunOptions(opts) {
1638
1638
  assertFiniteRange(`margins.${side}`, value, 0, 200);
1639
1639
  }
1640
1640
  if (opts.margins.left + opts.margins.right >= 210) {
1641
- throw new (0, _chunkOQNFGKRYcjs.KordocError)("margins.left + margins.right must be less than 210");
1641
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)("margins.left + margins.right must be less than 210");
1642
1642
  }
1643
1643
  if (opts.margins.top + opts.margins.bottom >= 297) {
1644
- throw new (0, _chunkOQNFGKRYcjs.KordocError)("margins.top + margins.bottom must be less than 297");
1644
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)("margins.top + margins.bottom must be less than 297");
1645
1645
  }
1646
1646
  }
1647
1647
  if (opts.sizes) {
@@ -1650,7 +1650,7 @@ function validateGongmunOptions(opts) {
1650
1650
  }
1651
1651
  }
1652
1652
  if (opts.approval && opts.approval.length > 6) {
1653
- throw new (0, _chunkOQNFGKRYcjs.KordocError)("approval must contain at most 6 labels");
1653
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)("approval must contain at most 6 labels");
1654
1654
  }
1655
1655
  }
1656
1656
  function incompatibleGongmunWarnings(opts) {
@@ -1915,7 +1915,7 @@ function resolveParaHeading(paraEl, ctx) {
1915
1915
 
1916
1916
  // src/hwpx/table-build.ts
1917
1917
  function buildTableWithCellMeta(state, keepAnchoredEmptyCols) {
1918
- const table2 = _chunk2BTKLDNXcjs.buildTable.call(void 0, state.rows, { keepAnchoredEmptyCols });
1918
+ const table2 = _chunk6GM2QLM3cjs.buildTable.call(void 0, state.rows, { keepAnchoredEmptyCols });
1919
1919
  if (state.caption) table2.caption = state.caption;
1920
1920
  if (_optionalChain([state, 'access', _25 => _25.captionBlocks, 'optionalAccess', _26 => _26.length])) table2.captionBlocks = state.captionBlocks;
1921
1921
  const anchors = [];
@@ -1986,7 +1986,7 @@ function completeTable(newTable, tableStack, blocks, ctx) {
1986
1986
  const cell2 = parentTable.cell;
1987
1987
  (cell2.blocks ??= []).push(block);
1988
1988
  cell2.hasStructure = true;
1989
- let flat = _chunk2BTKLDNXcjs.convertTableToText.call(void 0, newTable.rows);
1989
+ let flat = _chunk6GM2QLM3cjs.convertTableToText.call(void 0, newTable.rows);
1990
1990
  if (newTable.caption) flat = newTable.caption + (flat ? "\n" + flat : "");
1991
1991
  if (flat) {
1992
1992
  const inlineJoin = newTable.inline === true && cell2.lineOpen === true;
@@ -2002,7 +2002,7 @@ function completeTable(newTable, tableStack, blocks, ctx) {
2002
2002
  // src/hwpx/section-walker.ts
2003
2003
  function parseSectionXml(xml, styleMap, warnings, sectionNum, shared) {
2004
2004
  const parser = createXmlParser(warnings);
2005
- const doc = parser.parseFromString(_chunkOQNFGKRYcjs.stripDtd.call(void 0, xml), "text/xml");
2005
+ const doc = parser.parseFromString(_chunkGZ7W64QUcjs.stripDtd.call(void 0, xml), "text/xml");
2006
2006
  if (!doc.documentElement) return [];
2007
2007
  const ctx = { styleMap, warnings, sectionNum, shared: _nullishCoalesce(shared, () => ( createSectionShared())) };
2008
2008
  ctx.shared.track.deleteDepth = 0;
@@ -2109,8 +2109,8 @@ function walkSection(node, blocks, tableCtx, tableStack, ctx, depth = 0) {
2109
2109
  const cs = isNaN(rawCs) ? 1 : rawCs;
2110
2110
  const rawRs = parseInt(el.getAttribute("rowSpan") || "1", 10);
2111
2111
  const rs = isNaN(rawRs) ? 1 : rawRs;
2112
- tableCtx.cell.colSpan = clampSpan(cs, _chunk2BTKLDNXcjs.MAX_COLS);
2113
- tableCtx.cell.rowSpan = clampSpan(rs, _chunk2BTKLDNXcjs.MAX_ROWS);
2112
+ tableCtx.cell.colSpan = clampSpan(cs, _chunk6GM2QLM3cjs.MAX_COLS);
2113
+ tableCtx.cell.rowSpan = clampSpan(rs, _chunk6GM2QLM3cjs.MAX_ROWS);
2114
2114
  }
2115
2115
  break;
2116
2116
  case "p": {
@@ -2370,7 +2370,7 @@ function buildSubListTable(el, ctx, depth) {
2370
2370
  const sink = [];
2371
2371
  const st = { rows: [], currentRow: [], cell: null };
2372
2372
  walkSection(el, sink, st, [], ctx, depth + 1);
2373
- let flat = _chunk2BTKLDNXcjs.convertTableToText.call(void 0, st.rows);
2373
+ let flat = _chunk6GM2QLM3cjs.convertTableToText.call(void 0, st.rows);
2374
2374
  if (st.caption) flat = st.caption + (flat ? "\n" + flat : "");
2375
2375
  const built = [];
2376
2376
  completeTable(st, [], built, ctx);
@@ -2511,7 +2511,7 @@ function extractHyperlinkHref(fieldBegin) {
2511
2511
  let url = (ch.textContent || "").trim();
2512
2512
  if (!url) continue;
2513
2513
  url = url.replace(/^https?:\/\/(?=https?:\/\/)/i, "");
2514
- const safe = _chunkOQNFGKRYcjs.sanitizeHref.call(void 0, url);
2514
+ const safe = _chunkGZ7W64QUcjs.sanitizeHref.call(void 0, url);
2515
2515
  if (safe) return safe;
2516
2516
  }
2517
2517
  return void 0;
@@ -2671,7 +2671,7 @@ function extractParagraphInfo(para2, styleMap, ctx) {
2671
2671
  case "hyperlink": {
2672
2672
  const url = child.getAttribute("url") || child.getAttribute("href") || "";
2673
2673
  if (url) {
2674
- const safe = _chunkOQNFGKRYcjs.sanitizeHref.call(void 0, url);
2674
+ const safe = _chunkGZ7W64QUcjs.sanitizeHref.call(void 0, url);
2675
2675
  if (safe) href = safe;
2676
2676
  }
2677
2677
  walk(child, depth + 1);
@@ -2945,7 +2945,7 @@ function decompressStream(data) {
2945
2945
  return _zlib.inflateRawSync.call(void 0, data, opts);
2946
2946
  }
2947
2947
  function parseFileHeader(data) {
2948
- if (data.length < 40) throw new (0, _chunkOQNFGKRYcjs.KordocError)("FileHeader\uAC00 \uB108\uBB34 \uC9E7\uC2B5\uB2C8\uB2E4 (\uCD5C\uC18C 40\uBC14\uC774\uD2B8)");
2948
+ if (data.length < 40) throw new (0, _chunkGZ7W64QUcjs.KordocError)("FileHeader\uAC00 \uB108\uBB34 \uC9E7\uC2B5\uB2C8\uB2E4 (\uCD5C\uC18C 40\uBC14\uC774\uD2B8)");
2949
2949
  const sig = data.subarray(0, 32).toString("utf8").replace(/\0+$/, "");
2950
2950
  return {
2951
2951
  signature: sig,
@@ -3394,13 +3394,13 @@ async function extractImagesFromZip(zip, blocks, decompressed, warnings, sweepUn
3394
3394
  }
3395
3395
  const allCandidates = resolvedPath ? [resolvedPath, ...candidates] : candidates;
3396
3396
  for (const path of allCandidates) {
3397
- if (_chunkOQNFGKRYcjs.isPathTraversal.call(void 0, path)) continue;
3397
+ if (_chunkGZ7W64QUcjs.isPathTraversal.call(void 0, path)) continue;
3398
3398
  const file = zip.file(path);
3399
3399
  if (!file) continue;
3400
3400
  try {
3401
3401
  const data = await file.async("uint8array");
3402
3402
  decompressed.total += data.length;
3403
- if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkOQNFGKRYcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3403
+ if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkGZ7W64QUcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3404
3404
  const ext = path.includes(".") ? path.split(".").pop() || "png" : "png";
3405
3405
  const mimeType = imageExtToMime(ext);
3406
3406
  imageIndex++;
@@ -3410,7 +3410,7 @@ async function extractImagesFromZip(zip, blocks, decompressed, warnings, sweepUn
3410
3410
  usedPaths.add(path);
3411
3411
  break;
3412
3412
  } catch (err) {
3413
- if (err instanceof _chunkOQNFGKRYcjs.KordocError) throw err;
3413
+ if (err instanceof _chunkGZ7W64QUcjs.KordocError) throw err;
3414
3414
  }
3415
3415
  }
3416
3416
  if (!img) _optionalChain([warnings, 'optionalAccess', _80 => _80.push, 'call', _81 => _81({ page: block.pageNumber, message: `\uC774\uBBF8\uC9C0 \uD30C\uC77C \uC5C6\uC74C: ${ref}`, code: "SKIPPED_IMAGE" })]);
@@ -3430,11 +3430,11 @@ async function extractImagesFromZip(zip, blocks, decompressed, warnings, sweepUn
3430
3430
  if (sweepUnreferenced) {
3431
3431
  const binEntries = zip.file(/(?:^|\/)BinData\//i);
3432
3432
  for (const file of binEntries) {
3433
- if (file.dir || usedPaths.has(file.name) || _chunkOQNFGKRYcjs.isPathTraversal.call(void 0, file.name)) continue;
3433
+ if (file.dir || usedPaths.has(file.name) || _chunkGZ7W64QUcjs.isPathTraversal.call(void 0, file.name)) continue;
3434
3434
  try {
3435
3435
  const data = await file.async("uint8array");
3436
3436
  decompressed.total += data.length;
3437
- if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkOQNFGKRYcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3437
+ if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkGZ7W64QUcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3438
3438
  const ext = file.name.includes(".") ? file.name.split(".").pop() || "" : "";
3439
3439
  let mimeType = imageExtToMime(ext);
3440
3440
  if (mimeType === "application/octet-stream") {
@@ -3448,7 +3448,7 @@ async function extractImagesFromZip(zip, blocks, decompressed, warnings, sweepUn
3448
3448
  images.push(img);
3449
3449
  blocks.push({ type: "image", text: filename, imageData: { data, mimeType, filename: file.name } });
3450
3450
  } catch (err) {
3451
- if (err instanceof _chunkOQNFGKRYcjs.KordocError) throw err;
3451
+ if (err instanceof _chunkGZ7W64QUcjs.KordocError) throw err;
3452
3452
  _optionalChain([warnings, 'optionalAccess', _82 => _82.push, 'call', _83 => _83({ message: `\uC774\uBBF8\uC9C0 \uCD94\uCD9C \uC2E4\uD328: ${file.name}`, code: "SKIPPED_IMAGE" })]);
3453
3453
  }
3454
3454
  }
@@ -3499,7 +3499,7 @@ function extractFromBrokenZip(buffer) {
3499
3499
  }
3500
3500
  const nameBytes = data.slice(pos + 30, pos + 30 + nameLen);
3501
3501
  const name = new TextDecoder().decode(nameBytes);
3502
- if (_chunkOQNFGKRYcjs.isPathTraversal.call(void 0, name)) {
3502
+ if (_chunkGZ7W64QUcjs.isPathTraversal.call(void 0, name)) {
3503
3503
  pos = fileStart + compSize;
3504
3504
  continue;
3505
3505
  }
@@ -3517,16 +3517,16 @@ function extractFromBrokenZip(buffer) {
3517
3517
  continue;
3518
3518
  }
3519
3519
  totalDecompressed += content.length * 2;
3520
- if (totalDecompressed > MAX_DECOMPRESS_SIZE) throw new (0, _chunkOQNFGKRYcjs.KordocError)("\uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC");
3520
+ if (totalDecompressed > MAX_DECOMPRESS_SIZE) throw new (0, _chunkGZ7W64QUcjs.KordocError)("\uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC");
3521
3521
  sectionNum++;
3522
3522
  blocks.push(...parseSectionXml(content, void 0, warnings, sectionNum, shared));
3523
3523
  } catch (e16) {
3524
3524
  continue;
3525
3525
  }
3526
3526
  }
3527
- if (blocks.length === 0) throw new (0, _chunkOQNFGKRYcjs.KordocError)("\uC190\uC0C1\uB41C HWPX\uC5D0\uC11C \uC139\uC158 \uB370\uC774\uD130\uB97C \uBCF5\uAD6C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
3527
+ if (blocks.length === 0) throw new (0, _chunkGZ7W64QUcjs.KordocError)("\uC190\uC0C1\uB41C HWPX\uC5D0\uC11C \uC139\uC158 \uB370\uC774\uD130\uB97C \uBCF5\uAD6C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
3528
3528
  applyPageText(blocks, shared);
3529
- const markdown = _chunk2BTKLDNXcjs.blocksToMarkdown.call(void 0, blocks);
3529
+ const markdown = _chunk6GM2QLM3cjs.blocksToMarkdown.call(void 0, blocks);
3530
3530
  return { markdown, blocks, warnings: warnings.length > 0 ? warnings : void 0 };
3531
3531
  }
3532
3532
  async function readKordocLayout(zip) {
@@ -3551,18 +3551,18 @@ async function resolveSectionPaths(zip) {
3551
3551
  if (paths.length > 0) return paths;
3552
3552
  }
3553
3553
  const sectionFiles = zip.file(/[Ss]ection\d+\.xml$/);
3554
- return sectionFiles.map((f) => f.name).sort(_chunkOQNFGKRYcjs.compareSectionPaths);
3554
+ return sectionFiles.map((f) => f.name).sort(_chunkGZ7W64QUcjs.compareSectionPaths);
3555
3555
  }
3556
3556
  function parseSectionPathsFromManifest(xml) {
3557
3557
  const parser = createXmlParser();
3558
- const doc = parser.parseFromString(_chunkOQNFGKRYcjs.stripDtd.call(void 0, xml), "text/xml");
3558
+ const doc = parser.parseFromString(_chunkGZ7W64QUcjs.stripDtd.call(void 0, xml), "text/xml");
3559
3559
  const items = doc.getElementsByTagName("opf:item");
3560
3560
  const spine = doc.getElementsByTagName("opf:itemref");
3561
3561
  const idToHref = /* @__PURE__ */ new Map();
3562
3562
  for (let i = 0; i < items.length; i++) {
3563
3563
  const item = items[i];
3564
3564
  const id = item.getAttribute("id") || "";
3565
- const href = _chunkOQNFGKRYcjs.normalizeSectionHref.call(void 0, item.getAttribute("href") || "");
3565
+ const href = _chunkGZ7W64QUcjs.normalizeSectionHref.call(void 0, item.getAttribute("href") || "");
3566
3566
  if (id && href) idToHref.set(id, href);
3567
3567
  }
3568
3568
  if (spine.length > 0) {
@@ -3573,7 +3573,7 @@ function parseSectionPathsFromManifest(xml) {
3573
3573
  }
3574
3574
  if (ordered.length > 0) return ordered;
3575
3575
  }
3576
- return Array.from(idToHref.values()).sort(_chunkOQNFGKRYcjs.compareSectionPaths);
3576
+ return Array.from(idToHref.values()).sort(_chunkGZ7W64QUcjs.compareSectionPaths);
3577
3577
  }
3578
3578
 
3579
3579
  // src/hwpx/metadata.ts
@@ -3586,7 +3586,7 @@ async function extractHwpxMetadata(zip, metadata, decompressed) {
3586
3586
  const xml = await file.async("text");
3587
3587
  if (decompressed) {
3588
3588
  decompressed.total += xml.length * 2;
3589
- if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkOQNFGKRYcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3589
+ if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkGZ7W64QUcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3590
3590
  }
3591
3591
  parseDublinCoreMetadata(xml, metadata);
3592
3592
  if (metadata.title || metadata.author) return;
@@ -3596,7 +3596,7 @@ async function extractHwpxMetadata(zip, metadata, decompressed) {
3596
3596
  }
3597
3597
  function parseDublinCoreMetadata(xml, metadata) {
3598
3598
  const parser = createXmlParser();
3599
- const doc = parser.parseFromString(_chunkOQNFGKRYcjs.stripDtd.call(void 0, xml), "text/xml");
3599
+ const doc = parser.parseFromString(_chunkGZ7W64QUcjs.stripDtd.call(void 0, xml), "text/xml");
3600
3600
  if (!doc.documentElement) return;
3601
3601
  const getText = (tagNames) => {
3602
3602
  for (const tag of tagNames) {
@@ -3621,7 +3621,7 @@ function parseDublinCoreMetadata(xml, metadata) {
3621
3621
 
3622
3622
  // src/hwpx/parser.ts
3623
3623
  async function parseHwpxDocument(buffer, options) {
3624
- _chunkOQNFGKRYcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE, MAX_ZIP_ENTRIES);
3624
+ _chunkGZ7W64QUcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE, MAX_ZIP_ENTRIES);
3625
3625
  let zip;
3626
3626
  try {
3627
3627
  zip = await _jszip2.default.loadAsync(buffer);
@@ -3630,7 +3630,7 @@ async function parseHwpxDocument(buffer, options) {
3630
3630
  }
3631
3631
  const actualEntryCount = Object.keys(zip.files).length;
3632
3632
  if (actualEntryCount > MAX_ZIP_ENTRIES) {
3633
- throw new (0, _chunkOQNFGKRYcjs.KordocError)("ZIP \uC5D4\uD2B8\uB9AC \uC218 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3633
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)("ZIP \uC5D4\uD2B8\uB9AC \uC218 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3634
3634
  }
3635
3635
  const manifestFile = zip.file("META-INF/manifest.xml");
3636
3636
  if (manifestFile) {
@@ -3642,7 +3642,7 @@ async function parseHwpxDocument(buffer, options) {
3642
3642
  return comResultToParseResult(pages, pageCount, warnings2);
3643
3643
  }
3644
3644
  }
3645
- throw new (0, _chunkOQNFGKRYcjs.KordocError)("DRM \uC554\uD638\uD654\uB41C HWPX \uD30C\uC77C\uC785\uB2C8\uB2E4. Windows + \uD55C\uCEF4 \uC624\uD53C\uC2A4 \uC124\uCE58 \uC2DC \uC790\uB3D9 \uCD94\uCD9C\uB429\uB2C8\uB2E4.");
3645
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)("DRM \uC554\uD638\uD654\uB41C HWPX \uD30C\uC77C\uC785\uB2C8\uB2E4. Windows + \uD55C\uCEF4 \uC624\uD53C\uC2A4 \uC124\uCE58 \uC2DC \uC790\uB3D9 \uCD94\uCD9C\uB429\uB2C8\uB2E4.");
3646
3646
  }
3647
3647
  }
3648
3648
  const decompressed = { total: 0 };
@@ -3651,7 +3651,7 @@ async function parseHwpxDocument(buffer, options) {
3651
3651
  const styleMap = await extractHwpxStyles(zip, decompressed);
3652
3652
  const warnings = [];
3653
3653
  const sectionPaths = await resolveSectionPaths(zip);
3654
- if (sectionPaths.length === 0) throw new (0, _chunkOQNFGKRYcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
3654
+ if (sectionPaths.length === 0) throw new (0, _chunkGZ7W64QUcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
3655
3655
  metadata.pageCount = sectionPaths.length;
3656
3656
  const pageFilter = _optionalChain([options, 'optionalAccess', _92 => _92.pages]) ? _chunkDCZVOIEOcjs.parsePageRange.call(void 0, options.pages, sectionPaths.length) : null;
3657
3657
  const totalTarget = pageFilter ? pageFilter.size : sectionPaths.length;
@@ -3680,7 +3680,7 @@ async function parseHwpxDocument(buffer, options) {
3680
3680
  const images = await extractImagesFromZip(zip, blocks, decompressed, warnings, !pageFilter);
3681
3681
  detectHwpxHeadings(blocks, styleMap);
3682
3682
  const outline = blocks.filter((b) => b.type === "heading" && b.level && b.text).map((b) => ({ level: b.level, text: b.text, pageNumber: b.pageNumber }));
3683
- const markdown = _chunk2BTKLDNXcjs.blocksToMarkdown.call(void 0, blocks);
3683
+ const markdown = _chunk6GM2QLM3cjs.blocksToMarkdown.call(void 0, blocks);
3684
3684
  return { markdown, blocks, metadata, outline: outline.length > 0 ? outline : void 0, warnings: warnings.length > 0 ? warnings : void 0, images: images.length > 0 ? images : void 0 };
3685
3685
  }
3686
3686
 
@@ -4859,7 +4859,7 @@ function parseHwp5Document(buffer, options) {
4859
4859
  lenientCfb = parseLenientCfb(buffer);
4860
4860
  warnings.push({ message: "\uC190\uC0C1\uB41C CFB \uCEE8\uD14C\uC774\uB108 \u2014 lenient \uBAA8\uB4DC\uB85C \uBCF5\uAD6C", code: "LENIENT_CFB_RECOVERY" });
4861
4861
  } catch (e22) {
4862
- throw new (0, _chunkOQNFGKRYcjs.KordocError)("CFB \uCEE8\uD14C\uC774\uB108 \uD30C\uC2F1 \uC2E4\uD328 (strict \uBC0F lenient \uBAA8\uB450)");
4862
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)("CFB \uCEE8\uD14C\uC774\uB108 \uD30C\uC2F1 \uC2E4\uD328 (strict \uBC0F lenient \uBAA8\uB450)");
4863
4863
  }
4864
4864
  }
4865
4865
  const findStream = (path) => {
@@ -4870,11 +4870,11 @@ function parseHwp5Document(buffer, options) {
4870
4870
  return lenientCfb.findStream(path);
4871
4871
  };
4872
4872
  const headerData = findStream("/FileHeader");
4873
- if (!headerData) throw new (0, _chunkOQNFGKRYcjs.KordocError)("FileHeader \uC2A4\uD2B8\uB9BC \uC5C6\uC74C");
4873
+ if (!headerData) throw new (0, _chunkGZ7W64QUcjs.KordocError)("FileHeader \uC2A4\uD2B8\uB9BC \uC5C6\uC74C");
4874
4874
  const header = parseFileHeader(headerData);
4875
- if (header.signature !== "HWP Document File") throw new (0, _chunkOQNFGKRYcjs.KordocError)("HWP \uC2DC\uADF8\uB2C8\uCC98 \uBD88\uC77C\uCE58");
4876
- if (header.flags & FLAG_ENCRYPTED) throw new (0, _chunkOQNFGKRYcjs.KordocError)("\uC554\uD638\uD654\uB41C HWP\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
4877
- if (header.flags & FLAG_DRM) throw new (0, _chunkOQNFGKRYcjs.KordocError)("DRM \uBCF4\uD638\uB41C HWP\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
4875
+ if (header.signature !== "HWP Document File") throw new (0, _chunkGZ7W64QUcjs.KordocError)("HWP \uC2DC\uADF8\uB2C8\uCC98 \uBD88\uC77C\uCE58");
4876
+ if (header.flags & FLAG_ENCRYPTED) throw new (0, _chunkGZ7W64QUcjs.KordocError)("\uC554\uD638\uD654\uB41C HWP\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
4877
+ if (header.flags & FLAG_DRM) throw new (0, _chunkGZ7W64QUcjs.KordocError)("DRM \uBCF4\uD638\uB41C HWP\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
4878
4878
  const compressed = (header.flags & FLAG_COMPRESSED) !== 0;
4879
4879
  const distribution = (header.flags & FLAG_DISTRIBUTION) !== 0;
4880
4880
  const metadata = {
@@ -4883,7 +4883,7 @@ function parseHwp5Document(buffer, options) {
4883
4883
  if (cfb) extractHwp5Metadata(cfb, metadata);
4884
4884
  const docInfo = cfb ? parseDocInfoStream(cfb, compressed) : parseDocInfoFromStream(findStream("/DocInfo"), compressed);
4885
4885
  const sections = distribution ? cfb ? findViewTextSections(cfb, compressed) : findViewTextSectionsLenient(lenientCfb, compressed) : cfb ? findSections(cfb) : findSectionsLenient(lenientCfb, compressed);
4886
- if (sections.length === 0) throw new (0, _chunkOQNFGKRYcjs.KordocError)("\uC139\uC158 \uC2A4\uD2B8\uB9BC\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
4886
+ if (sections.length === 0) throw new (0, _chunkGZ7W64QUcjs.KordocError)("\uC139\uC158 \uC2A4\uD2B8\uB9BC\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
4887
4887
  metadata.pageCount = sections.length;
4888
4888
  const pageFilter = _optionalChain([options, 'optionalAccess', _97 => _97.pages]) ? _chunkDCZVOIEOcjs.parsePageRange.call(void 0, options.pages, sections.length) : null;
4889
4889
  const totalTarget = pageFilter ? pageFilter.size : sections.length;
@@ -4898,22 +4898,22 @@ function parseHwp5Document(buffer, options) {
4898
4898
  const sectionData = sections[si];
4899
4899
  const data = !distribution && compressed ? decompressStream(Buffer.from(sectionData)) : Buffer.from(sectionData);
4900
4900
  totalDecompressed += data.length;
4901
- if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkOQNFGKRYcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
4901
+ if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkGZ7W64QUcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
4902
4902
  const records = readRecords(data);
4903
4903
  const sectionBlocks = parseSection(records, docInfo, warnings, si + 1, doc);
4904
4904
  bodyBlocks.push(...sectionBlocks);
4905
4905
  parsedSections++;
4906
4906
  _optionalChain([options, 'optionalAccess', _99 => _99.onProgress, 'optionalCall', _100 => _100(parsedSections, totalTarget)]);
4907
4907
  } catch (secErr) {
4908
- if (secErr instanceof _chunkOQNFGKRYcjs.KordocError) throw secErr;
4908
+ if (secErr instanceof _chunkGZ7W64QUcjs.KordocError) throw secErr;
4909
4909
  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" });
4910
4910
  }
4911
4911
  }
4912
4912
  const blocks = [...doc.headerBlocks, ...bodyBlocks, ...doc.footerBlocks];
4913
4913
  const images = cfb ? extractHwp5Images(cfb.FileIndex, blocks, warnings, !pageFilter) : extractHwp5ImagesLenient(lenientCfb, blocks, warnings, !pageFilter);
4914
- let flatBlocks = _chunk2BTKLDNXcjs.flattenLayoutTables.call(void 0, blocks);
4914
+ let flatBlocks = _chunk6GM2QLM3cjs.flattenLayoutTables.call(void 0, blocks);
4915
4915
  if (_optionalChain([options, 'optionalAccess', _101 => _101.dedupeRunningHeaders])) {
4916
- const deduped = _chunk2BTKLDNXcjs.dedupeRunningHeaders.call(void 0, flatBlocks);
4916
+ const deduped = _chunk6GM2QLM3cjs.dedupeRunningHeaders.call(void 0, flatBlocks);
4917
4917
  const removed = flatBlocks.length - deduped.length;
4918
4918
  if (removed > 0) warnings.push({ message: `\uBC18\uBCF5 \uB7EC\uB2DD \uD5E4\uB354 ${removed}\uAC1C \uC81C\uAC70`, code: "HIDDEN_TEXT_FILTERED" });
4919
4919
  flatBlocks = deduped;
@@ -4922,10 +4922,10 @@ function parseHwp5Document(buffer, options) {
4922
4922
  detectHwp5Headings(flatBlocks, docInfo);
4923
4923
  }
4924
4924
  const outline = flatBlocks.filter((b) => b.type === "heading" && b.level && b.text).map((b) => ({ level: b.level, text: b.text, pageNumber: b.pageNumber }));
4925
- let markdown = _chunk2BTKLDNXcjs.blocksToMarkdown.call(void 0, flatBlocks);
4925
+ let markdown = _chunk6GM2QLM3cjs.blocksToMarkdown.call(void 0, flatBlocks);
4926
4926
  if (_optionalChain([options, 'optionalAccess', _102 => _102.inlineImages]) && images.length > 0) {
4927
4927
  try {
4928
- markdown = _chunk2BTKLDNXcjs.inlineImagesIntoMarkdown.call(void 0, markdown, images, { compress: true });
4928
+ markdown = _chunk6GM2QLM3cjs.inlineImagesIntoMarkdown.call(void 0, markdown, images, { compress: true });
4929
4929
  } catch (inlineErr) {
4930
4930
  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" });
4931
4931
  }
@@ -4989,9 +4989,9 @@ function detectHwp5Headings(blocks, docInfo) {
4989
4989
  let level = 0;
4990
4990
  if (_optionalChain([block, 'access', _107 => _107.style, 'optionalAccess', _108 => _108.fontSize]) && baseFontSize > 0) {
4991
4991
  const ratio = block.style.fontSize / baseFontSize;
4992
- if (ratio >= _chunkOQNFGKRYcjs.HEADING_RATIO_H1) level = 1;
4993
- else if (ratio >= _chunkOQNFGKRYcjs.HEADING_RATIO_H2) level = 2;
4994
- else if (ratio >= _chunkOQNFGKRYcjs.HEADING_RATIO_H3) level = 3;
4992
+ if (ratio >= _chunkGZ7W64QUcjs.HEADING_RATIO_H1) level = 1;
4993
+ else if (ratio >= _chunkGZ7W64QUcjs.HEADING_RATIO_H2) level = 2;
4994
+ else if (ratio >= _chunkGZ7W64QUcjs.HEADING_RATIO_H3) level = 3;
4995
4995
  }
4996
4996
  if (/^제\d+[장절편]\s/.test(text) && text.length <= 50) {
4997
4997
  if (level === 0) level = 2;
@@ -5076,7 +5076,7 @@ function findSectionsLenient(lcfb, compressed) {
5076
5076
  if (!raw) break;
5077
5077
  const content = compressed ? decompressStream(raw) : raw;
5078
5078
  totalDecompressed += content.length;
5079
- if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkOQNFGKRYcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
5079
+ if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkGZ7W64QUcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
5080
5080
  sections.push({ idx: i, content });
5081
5081
  }
5082
5082
  if (sections.length === 0) {
@@ -5088,7 +5088,7 @@ function findSectionsLenient(lcfb, compressed) {
5088
5088
  if (raw) {
5089
5089
  const content = compressed ? decompressStream(raw) : raw;
5090
5090
  totalDecompressed += content.length;
5091
- if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkOQNFGKRYcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
5091
+ if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkGZ7W64QUcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
5092
5092
  sections.push({ idx, content });
5093
5093
  }
5094
5094
  }
@@ -5105,7 +5105,7 @@ function findViewTextSectionsLenient(lcfb, compressed) {
5105
5105
  try {
5106
5106
  const content = decryptViewText(raw, compressed);
5107
5107
  totalDecompressed += content.length;
5108
- if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkOQNFGKRYcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
5108
+ if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkGZ7W64QUcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
5109
5109
  sections.push({ idx: i, content });
5110
5110
  } catch (e27) {
5111
5111
  break;
@@ -5208,7 +5208,7 @@ function parseParagraph(records, start, end, ctx) {
5208
5208
  const ctrl = ctrls[r.ctrlIdx];
5209
5209
  if (!_optionalChain([ctrl, 'optionalAccess', _115 => _115.href]) || r.end <= r.start) continue;
5210
5210
  if (applied.some(([s, e]) => r.start < e && r.end > s)) continue;
5211
- const href = _chunkOQNFGKRYcjs.sanitizeHref.call(void 0, ctrl.href);
5211
+ const href = _chunkGZ7W64QUcjs.sanitizeHref.call(void 0, ctrl.href);
5212
5212
  if (!href) continue;
5213
5213
  const anchor = text.slice(r.start, r.end);
5214
5214
  if (!anchor.trim()) continue;
@@ -5444,8 +5444,8 @@ function parseTableControl(ctrl, records, ctx) {
5444
5444
  let tableIdx = -1;
5445
5445
  for (let i2 = childStart; i2 < childEnd; i2++) {
5446
5446
  if (records[i2].tagId === TAG_TABLE && records[i2].data.length >= 8) {
5447
- rows = Math.min(records[i2].data.readUInt16LE(4), _chunk2BTKLDNXcjs.MAX_ROWS);
5448
- cols = Math.min(records[i2].data.readUInt16LE(6), _chunk2BTKLDNXcjs.MAX_COLS);
5447
+ rows = Math.min(records[i2].data.readUInt16LE(4), _chunk6GM2QLM3cjs.MAX_ROWS);
5448
+ cols = Math.min(records[i2].data.readUInt16LE(6), _chunk6GM2QLM3cjs.MAX_COLS);
5449
5449
  tableIdx = i2;
5450
5450
  break;
5451
5451
  }
@@ -5494,7 +5494,7 @@ function parseTableControl(ctrl, records, ctx) {
5494
5494
  return table3;
5495
5495
  }
5496
5496
  const cellRows = arrangeCells(rows, cols, cells);
5497
- const table2 = _chunk2BTKLDNXcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: ctx.doc.keepTrailingEmptyCols });
5497
+ const table2 = _chunk6GM2QLM3cjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: ctx.doc.keepTrailingEmptyCols });
5498
5498
  if (caption && table2.rows > 0) table2.caption = caption;
5499
5499
  return table2.rows > 0 ? table2 : null;
5500
5500
  }
@@ -5511,8 +5511,8 @@ function parseCell(records, lhIdx, end, ctx) {
5511
5511
  rowAddr = rec.data.readUInt16LE(10);
5512
5512
  const cs = rec.data.readUInt16LE(12);
5513
5513
  const rs = rec.data.readUInt16LE(14);
5514
- if (cs > 0) colSpan = Math.min(cs, _chunk2BTKLDNXcjs.MAX_COLS);
5515
- if (rs > 0) rowSpan = Math.min(rs, _chunk2BTKLDNXcjs.MAX_ROWS);
5514
+ if (cs > 0) colSpan = Math.min(cs, _chunk6GM2QLM3cjs.MAX_COLS);
5515
+ if (rs > 0) rowSpan = Math.min(rs, _chunk6GM2QLM3cjs.MAX_ROWS);
5516
5516
  }
5517
5517
  const blocks = ctx.depth < MAX_NEST_DEPTH ? parseParagraphList(records, lhIdx + 1, end, { ...ctx, depth: ctx.depth + 1 }) : [];
5518
5518
  const parts = [];
@@ -5522,7 +5522,7 @@ function parseCell(records, lhIdx, end, ctx) {
5522
5522
  parts.push(`![image](hwp5bin:${b.text})`);
5523
5523
  hasStructure = true;
5524
5524
  } else if (b.type === "table" && b.table) {
5525
- const flat = _chunk2BTKLDNXcjs.convertTableToText.call(void 0, b.table.cells);
5525
+ const flat = _chunk6GM2QLM3cjs.convertTableToText.call(void 0, b.table.cells);
5526
5526
  if (flat) parts.push(flat);
5527
5527
  hasStructure = true;
5528
5528
  } else if (b.text) {
@@ -17571,9 +17571,8 @@ function decodeJohab(ch) {
17571
17571
  const jongIdx = ch & 31;
17572
17572
  const cho = CHO_MAP[choIdx];
17573
17573
  const jung = JUNG_MAP[jungIdx];
17574
- let jong = JONG_MAP[jongIdx];
17575
- if (cho !== -1 && jung !== -1) {
17576
- if (jong === -1) jong = 0;
17574
+ const jong = JONG_MAP[jongIdx];
17575
+ if (cho !== -1 && jung !== -1 && jong !== -1) {
17577
17576
  return 44032 + cho * 588 + jung * 28 + jong;
17578
17577
  }
17579
17578
  const hit = lookupSymbol(ch);
@@ -17742,8 +17741,6 @@ var LINE_INFO_SIZE = 14;
17742
17741
  var INLINE_CHAR_SHAPE_SIZE = 31;
17743
17742
  var SIMPLE_CTRL = /* @__PURE__ */ new Map([
17744
17743
  [9, { extraBytes: 6, extraHchar: 3, emit: " " }],
17745
- [7, { extraBytes: 6, extraHchar: 3, emit: "\uFFFC" }],
17746
- [8, { extraBytes: 6, extraHchar: 3, emit: "\uFFFC" }],
17747
17744
  [18, { extraBytes: 6, extraHchar: 3, emit: " " }],
17748
17745
  // AutoNumber → 공백 (HWP5 패턴)
17749
17746
  [19, { extraBytes: 6, extraHchar: 3, emit: "\uFFFC" }],
@@ -17752,7 +17749,8 @@ var SIMPLE_CTRL = /* @__PURE__ */ new Map([
17752
17749
  [22, { extraBytes: 22, extraHchar: 11, emit: "\uFFFC" }],
17753
17750
  [23, { extraBytes: 8, extraHchar: 4, emit: "\uFFFC" }],
17754
17751
  [24, { extraBytes: 4, extraHchar: 2, emit: "-" }],
17755
- [25, { extraBytes: 4, extraHchar: 2, emit: "-" }],
17752
+ [25, { extraBytes: 4, extraHchar: 2, emit: null }],
17753
+ // 차례 표식 — 비가시 (rhwp #2765)
17756
17754
  [26, { extraBytes: 244, extraHchar: 122, emit: "\uFFFC" }],
17757
17755
  [28, { extraBytes: 62, extraHchar: 31, emit: "\uFFFC" }],
17758
17756
  [30, { extraBytes: 2, extraHchar: 1, emit: "\xA0" }],
@@ -17896,9 +17894,6 @@ function parseCharStream(reader, charCount, ctx) {
17896
17894
  case 11:
17897
17895
  parsePicture(reader, ctx);
17898
17896
  break;
17899
- case 12:
17900
- reader.skip(84);
17901
- break;
17902
17897
  case 14:
17903
17898
  reader.skip(84);
17904
17899
  break;
@@ -17923,6 +17918,12 @@ function parseCharStream(reader, charCount, ctx) {
17923
17918
  case 6:
17924
17919
  reader.skip(34);
17925
17920
  break;
17921
+ case 7:
17922
+ reader.skip(76);
17923
+ break;
17924
+ case 8:
17925
+ reader.skip(88);
17926
+ break;
17926
17927
  case 29:
17927
17928
  if (headerVal1 < 1e6) reader.skip(headerVal1);
17928
17929
  break;
@@ -18017,7 +18018,7 @@ function getTextContent(el) {
18017
18018
  return _nullishCoalesce(_optionalChain([el, 'access', _131 => _131.textContent, 'optionalAccess', _132 => _132.trim, 'call', _133 => _133()]), () => ( ""));
18018
18019
  }
18019
18020
  function parseXml(text) {
18020
- return new (0, _xmldom.DOMParser)().parseFromString(_chunkOQNFGKRYcjs.stripDtd.call(void 0, text), "text/xml");
18021
+ return new (0, _xmldom.DOMParser)().parseFromString(_chunkGZ7W64QUcjs.stripDtd.call(void 0, text), "text/xml");
18021
18022
  }
18022
18023
  function collectRichText(root) {
18023
18024
  let out = "";
@@ -18252,7 +18253,7 @@ function sheetToBlocks(sheetName, grid, merges, maxRow, maxCol, sheetIndex, keep
18252
18253
  cellRows.push(row);
18253
18254
  }
18254
18255
  if (cellRows.length > 0) {
18255
- const table2 = _chunk2BTKLDNXcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols });
18256
+ const table2 = _chunk6GM2QLM3cjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols });
18256
18257
  if (table2.rows > 0) {
18257
18258
  blocks.push({ type: "table", table: table2, pageNumber: sheetIndex + 1 });
18258
18259
  }
@@ -18260,12 +18261,12 @@ function sheetToBlocks(sheetName, grid, merges, maxRow, maxCol, sheetIndex, keep
18260
18261
  return blocks;
18261
18262
  }
18262
18263
  async function parseXlsxDocument(buffer, options) {
18263
- _chunkOQNFGKRYcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE4);
18264
+ _chunkGZ7W64QUcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE4);
18264
18265
  const zip = await _jszip2.default.loadAsync(buffer);
18265
18266
  const warnings = [];
18266
18267
  const workbookFile = zip.file("xl/workbook.xml");
18267
18268
  if (!workbookFile) {
18268
- throw new (0, _chunkOQNFGKRYcjs.KordocError)("\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 XLSX \uD30C\uC77C: xl/workbook.xml\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
18269
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)("\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 XLSX \uD30C\uC77C: xl/workbook.xml\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
18269
18270
  }
18270
18271
  let sharedStrings = [];
18271
18272
  const ssFile = zip.file("xl/sharedStrings.xml");
@@ -18274,7 +18275,7 @@ async function parseXlsxDocument(buffer, options) {
18274
18275
  }
18275
18276
  const { sheets, date1904 } = parseWorkbook(await workbookFile.async("text"));
18276
18277
  if (sheets.length === 0) {
18277
- throw new (0, _chunkOQNFGKRYcjs.KordocError)("XLSX \uD30C\uC77C\uC5D0 \uC2DC\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4");
18278
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)("XLSX \uD30C\uC77C\uC5D0 \uC2DC\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4");
18278
18279
  }
18279
18280
  let dateXfs = /* @__PURE__ */ new Map();
18280
18281
  const stylesFile = zip.file("xl/styles.xml");
@@ -18354,7 +18355,7 @@ async function parseXlsxDocument(buffer, options) {
18354
18355
  } catch (e29) {
18355
18356
  }
18356
18357
  }
18357
- const markdown = _chunk2BTKLDNXcjs.blocksToMarkdown.call(void 0, blocks);
18358
+ const markdown = _chunk6GM2QLM3cjs.blocksToMarkdown.call(void 0, blocks);
18358
18359
  return { markdown, blocks, metadata, warnings: warnings.length > 0 ? warnings : void 0 };
18359
18360
  }
18360
18361
 
@@ -18805,11 +18806,11 @@ function processGlobals(records) {
18805
18806
  const xfFmtIds = [];
18806
18807
  const firstBof = records[0];
18807
18808
  if (!firstBof || firstBof.opcode !== OP_BOF) {
18808
- throw new (0, _chunkOQNFGKRYcjs.KordocError)("XLS: \uCCAB \uB808\uCF54\uB4DC\uAC00 BOF\uAC00 \uC544\uB2D8");
18809
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)("XLS: \uCCAB \uB808\uCF54\uB4DC\uAC00 BOF\uAC00 \uC544\uB2D8");
18809
18810
  }
18810
18811
  const bof = decodeBof(firstBof.data);
18811
18812
  if (!bof || bof.dt !== DT_GLOBALS) {
18812
- throw new (0, _chunkOQNFGKRYcjs.KordocError)("XLS: Globals \uC11C\uBE0C\uC2A4\uD2B8\uB9BC BOF \uB204\uB77D");
18813
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)("XLS: Globals \uC11C\uBE0C\uC2A4\uD2B8\uB9BC BOF \uB204\uB77D");
18813
18814
  }
18814
18815
  let i = 1;
18815
18816
  while (i < records.length) {
@@ -18944,7 +18945,7 @@ function sheetToBlocks2(sheetName, sheet, sheetIndex, keepAnchoredEmptyCols) {
18944
18945
  cellRows.push(row);
18945
18946
  }
18946
18947
  if (cellRows.length > 0) {
18947
- const table2 = _chunk2BTKLDNXcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols });
18948
+ const table2 = _chunk6GM2QLM3cjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols });
18948
18949
  if (table2.rows > 0) {
18949
18950
  blocks.push({ type: "table", table: table2, pageNumber: sheetIndex + 1 });
18950
18951
  }
@@ -18957,21 +18958,21 @@ async function parseXlsDocument(buffer, options) {
18957
18958
  try {
18958
18959
  cfb = parseLenientCfb(buf);
18959
18960
  } catch (e) {
18960
- throw new (0, _chunkOQNFGKRYcjs.KordocError)(
18961
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)(
18961
18962
  `XLS: OLE2 \uC2DC\uADF8\uB2C8\uCC98 \uAC80\uC99D \uC2E4\uD328 \u2014 ${e instanceof Error ? e.message : "\uC54C \uC218 \uC5C6\uB294 \uC624\uB958"}`
18962
18963
  );
18963
18964
  }
18964
18965
  const wb = _nullishCoalesce(cfb.findStream("/Workbook"), () => ( cfb.findStream("/Book")));
18965
18966
  if (!wb) {
18966
- throw new (0, _chunkOQNFGKRYcjs.KordocError)("XLS: Workbook \uC2A4\uD2B8\uB9BC\uC774 \uC5C6\uC74C (BIFF5 \uB610\uB294 \uBE44\uD45C\uC900 \uD30C\uC77C)");
18967
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)("XLS: Workbook \uC2A4\uD2B8\uB9BC\uC774 \uC5C6\uC74C (BIFF5 \uB610\uB294 \uBE44\uD45C\uC900 \uD30C\uC77C)");
18967
18968
  }
18968
18969
  const records = readRecords2(wb);
18969
18970
  if (records.length === 0) {
18970
- throw new (0, _chunkOQNFGKRYcjs.KordocError)("XLS: \uC2DC\uADF8\uB2C8\uCC98 \uB808\uCF54\uB4DC\uAC00 \uC5C6\uC74C (Workbook \uC2A4\uD2B8\uB9BC \uC190\uC0C1)");
18971
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)("XLS: \uC2DC\uADF8\uB2C8\uCC98 \uB808\uCF54\uB4DC\uAC00 \uC5C6\uC74C (Workbook \uC2A4\uD2B8\uB9BC \uC190\uC0C1)");
18971
18972
  }
18972
18973
  const firstBof = decodeBof(records[0].data);
18973
18974
  if (firstBof && firstBof.vers !== 1536) {
18974
- throw new (0, _chunkOQNFGKRYcjs.KordocError)(
18975
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)(
18975
18976
  `XLS: BIFF8(0x0600)\uB9CC \uC9C0\uC6D0 \u2014 \uBCF8 \uD30C\uC77C\uC740 0x${firstBof.vers.toString(16)}`
18976
18977
  );
18977
18978
  }
@@ -19039,7 +19040,7 @@ async function parseXlsDocument(buffer, options) {
19039
19040
  pageCount: totalSheets
19040
19041
  };
19041
19042
  return {
19042
- markdown: _chunk2BTKLDNXcjs.blocksToMarkdown.call(void 0, allBlocks),
19043
+ markdown: _chunk6GM2QLM3cjs.blocksToMarkdown.call(void 0, allBlocks),
19043
19044
  blocks: allBlocks,
19044
19045
  metadata,
19045
19046
  warnings: warnings.length > 0 ? warnings : void 0
@@ -19495,7 +19496,7 @@ function getAttr(el, localName2) {
19495
19496
  return null;
19496
19497
  }
19497
19498
  function parseXml2(text) {
19498
- return new (0, _xmldom.DOMParser)().parseFromString(_chunkOQNFGKRYcjs.stripDtd.call(void 0, text), "text/xml");
19499
+ return new (0, _xmldom.DOMParser)().parseFromString(_chunkGZ7W64QUcjs.stripDtd.call(void 0, text), "text/xml");
19499
19500
  }
19500
19501
  function parseStyles(xml) {
19501
19502
  const doc = parseXml2(xml);
@@ -19653,7 +19654,7 @@ function fieldUrlFromInstr(instr) {
19653
19654
  function makeLink(text, rawHref) {
19654
19655
  if (!text) return "";
19655
19656
  if (!rawHref) return text;
19656
- const href = _chunkOQNFGKRYcjs.sanitizeHref.call(void 0, rawHref);
19657
+ const href = _chunkGZ7W64QUcjs.sanitizeHref.call(void 0, rawHref);
19657
19658
  return href ? `[${text}](${href})` : text;
19658
19659
  }
19659
19660
  function collectInline(p, footnotes, rels) {
@@ -19847,7 +19848,7 @@ ${cell2.text}` : cell2.text;
19847
19848
  return { text: cell2.text, colSpan: cell2.colSpan, rowSpan, colAddr: cell2.col, rowAddr: r };
19848
19849
  })
19849
19850
  );
19850
- const table2 = _chunk2BTKLDNXcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: keepEmptyCols });
19851
+ const table2 = _chunk6GM2QLM3cjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: keepEmptyCols });
19851
19852
  if (table2.rows === 0 || table2.cols === 0) return null;
19852
19853
  return { type: "table", table: table2 };
19853
19854
  }
@@ -19949,12 +19950,12 @@ function emitParagraphImages(p, imageMap, linked, out) {
19949
19950
  }
19950
19951
  }
19951
19952
  async function parseDocxDocument(buffer, options) {
19952
- _chunkOQNFGKRYcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE5);
19953
+ _chunkGZ7W64QUcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE5);
19953
19954
  const zip = await _jszip2.default.loadAsync(buffer);
19954
19955
  const warnings = [];
19955
19956
  const docFile = zip.file("word/document.xml");
19956
19957
  if (!docFile) {
19957
- throw new (0, _chunkOQNFGKRYcjs.KordocError)("\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 DOCX \uD30C\uC77C: word/document.xml\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
19958
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)("\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 DOCX \uD30C\uC77C: word/document.xml\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
19958
19959
  }
19959
19960
  let rels = /* @__PURE__ */ new Map();
19960
19961
  const relsFile = zip.file("word/_rels/document.xml.rels");
@@ -20001,7 +20002,7 @@ async function parseDocxDocument(buffer, options) {
20001
20002
  const doc = parseXml2(docXml);
20002
20003
  const body = findElements(doc, "body");
20003
20004
  if (body.length === 0) {
20004
- throw new (0, _chunkOQNFGKRYcjs.KordocError)("DOCX \uBCF8\uBB38(w:body)\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
20005
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)("DOCX \uBCF8\uBB38(w:body)\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
20005
20006
  }
20006
20007
  const { imageMap, images } = await buildImageMap(zip, rels, doc, warnings);
20007
20008
  const linkedImages = /* @__PURE__ */ new Set();
@@ -20052,7 +20053,7 @@ async function parseDocxDocument(buffer, options) {
20052
20053
  }
20053
20054
  }
20054
20055
  const outline = blocks.filter((b) => b.type === "heading").map((b) => ({ level: _nullishCoalesce(b.level, () => ( 2)), text: _nullishCoalesce(b.text, () => ( "")) }));
20055
- const markdown = _chunk2BTKLDNXcjs.blocksToMarkdown.call(void 0, blocks);
20056
+ const markdown = _chunk6GM2QLM3cjs.blocksToMarkdown.call(void 0, blocks);
20056
20057
  return {
20057
20058
  markdown,
20058
20059
  blocks,
@@ -20075,7 +20076,7 @@ function parseHwpmlDocument(buffer, options) {
20075
20076
  }
20076
20077
  const text = new TextDecoder("utf-8").decode(buffer).replace(/^\uFEFF/, "");
20077
20078
  const normalized = text.replace(/&nbsp;/g, "&#160;");
20078
- const xml = _chunkOQNFGKRYcjs.stripDtd.call(void 0, normalized);
20079
+ const xml = _chunkGZ7W64QUcjs.stripDtd.call(void 0, normalized);
20079
20080
  const warnings = [];
20080
20081
  const parser = new (0, _xmldom.DOMParser)({
20081
20082
  onError: (_level, msg2) => {
@@ -20115,7 +20116,7 @@ function parseHwpmlDocument(buffer, options) {
20115
20116
  parseSection2(el, blocks, paraShapeMap, sectionIdx, warnings, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _180 => _180.keepTrailingEmptyCols]), () => ( false)));
20116
20117
  }
20117
20118
  const outline = blocks.filter((b) => b.type === "heading" && b.text).map((b) => ({ level: _nullishCoalesce(b.level, () => ( 1)), text: b.text, pageNumber: b.pageNumber }));
20118
- const markdown = _chunk2BTKLDNXcjs.blocksToMarkdown.call(void 0, blocks);
20119
+ const markdown = _chunk6GM2QLM3cjs.blocksToMarkdown.call(void 0, blocks);
20119
20120
  return {
20120
20121
  markdown,
20121
20122
  blocks,
@@ -20260,7 +20261,7 @@ function parseTable2(el, blocks, paraShapeMap, sectionNum, warnings, keep) {
20260
20261
  const r = Math.min(Math.max(_nullishCoalesce(cell2.rowAddr, () => ( 0)), 0), rowCount - 1);
20261
20262
  cellRows[r].push(cell2);
20262
20263
  }
20263
- const table2 = _chunk2BTKLDNXcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: keep });
20264
+ const table2 = _chunk6GM2QLM3cjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: keep });
20264
20265
  const caption = extractShapeCaption(el);
20265
20266
  if (caption.text && caption.before) {
20266
20267
  blocks.push({ type: "paragraph", text: caption.text, pageNumber: sectionNum });
@@ -21642,19 +21643,19 @@ function parseCentralDirectory(buf) {
21642
21643
  }
21643
21644
  }
21644
21645
  }
21645
- if (eocdOffset < 0) throw new (0, _chunkOQNFGKRYcjs.KordocError)("ZIP EOCD\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
21646
+ if (eocdOffset < 0) throw new (0, _chunkGZ7W64QUcjs.KordocError)("ZIP EOCD\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
21646
21647
  const totalEntries = view.getUint16(eocdOffset + 10, true);
21647
21648
  const cdSize = view.getUint32(eocdOffset + 12, true);
21648
21649
  const cdOffset = view.getUint32(eocdOffset + 16, true);
21649
- if (cdOffset === 4294967295 || totalEntries === 65535) throw new (0, _chunkOQNFGKRYcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
21650
+ if (cdOffset === 4294967295 || totalEntries === 65535) throw new (0, _chunkGZ7W64QUcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
21650
21651
  if (eocdOffset >= 20 && view.getUint32(eocdOffset - 20, true) === ZIP64_EOCD_LOC_SIG) {
21651
- throw new (0, _chunkOQNFGKRYcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
21652
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
21652
21653
  }
21653
21654
  const decoder = new TextDecoder("utf-8");
21654
21655
  const entries = [];
21655
21656
  let pos = cdOffset;
21656
21657
  for (let i = 0; i < totalEntries; i++) {
21657
- if (view.getUint32(pos, true) !== CD_SIG) throw new (0, _chunkOQNFGKRYcjs.KordocError)("ZIP Central Directory \uC190\uC0C1");
21658
+ if (view.getUint32(pos, true) !== CD_SIG) throw new (0, _chunkGZ7W64QUcjs.KordocError)("ZIP Central Directory \uC190\uC0C1");
21658
21659
  const flags = view.getUint16(pos + 8, true);
21659
21660
  const method = view.getUint16(pos + 10, true);
21660
21661
  const crc = view.getUint32(pos + 16, true);
@@ -21665,7 +21666,7 @@ function parseCentralDirectory(buf) {
21665
21666
  const commentLen = view.getUint16(pos + 32, true);
21666
21667
  const localOffset = view.getUint32(pos + 42, true);
21667
21668
  if (compSize === 4294967295 || uncompSize === 4294967295 || localOffset === 4294967295) {
21668
- throw new (0, _chunkOQNFGKRYcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
21669
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
21669
21670
  }
21670
21671
  const name = decoder.decode(buf.subarray(pos + 46, pos + 46 + nameLen));
21671
21672
  const cdEnd = pos + 46 + nameLen + extraLen + commentLen;
@@ -21694,11 +21695,11 @@ function patchZipEntries(original, replacements, additions) {
21694
21695
  const { entries, cdOffset, eocdOffset } = parseCentralDirectory(original);
21695
21696
  const view = new DataView(original.buffer, original.byteOffset, original.byteLength);
21696
21697
  for (const name of replacements.keys()) {
21697
- if (!entries.some((e) => e.name === name)) throw new (0, _chunkOQNFGKRYcjs.KordocError)(`ZIP\uC5D0 \uC5C6\uB294 \uC5D4\uD2B8\uB9AC: ${name}`);
21698
+ if (!entries.some((e) => e.name === name)) throw new (0, _chunkGZ7W64QUcjs.KordocError)(`ZIP\uC5D0 \uC5C6\uB294 \uC5D4\uD2B8\uB9AC: ${name}`);
21698
21699
  }
21699
21700
  if (additions) {
21700
21701
  for (const name of additions.keys()) {
21701
- if (entries.some((e) => e.name === name)) throw new (0, _chunkOQNFGKRYcjs.KordocError)(`ZIP\uC5D0 \uC774\uBBF8 \uC788\uB294 \uC5D4\uD2B8\uB9AC: ${name}`);
21702
+ if (entries.some((e) => e.name === name)) throw new (0, _chunkGZ7W64QUcjs.KordocError)(`ZIP\uC5D0 \uC774\uBBF8 \uC788\uB294 \uC5D4\uD2B8\uB9AC: ${name}`);
21702
21703
  }
21703
21704
  }
21704
21705
  const byLocal = [...entries].sort((a, b) => a.localOffset - b.localOffset);
@@ -21717,7 +21718,7 @@ function patchZipEntries(original, replacements, additions) {
21717
21718
  offset += seg.length;
21718
21719
  continue;
21719
21720
  }
21720
- if (view.getUint32(e.localOffset, true) !== LOCAL_SIG) throw new (0, _chunkOQNFGKRYcjs.KordocError)("ZIP \uB85C\uCEEC \uD5E4\uB354 \uC2DC\uADF8\uB2C8\uCC98 \uBD88\uC77C\uCE58");
21721
+ if (view.getUint32(e.localOffset, true) !== LOCAL_SIG) throw new (0, _chunkGZ7W64QUcjs.KordocError)("ZIP \uB85C\uCEEC \uD5E4\uB354 \uC2DC\uADF8\uB2C8\uCC98 \uBD88\uC77C\uCE58");
21721
21722
  const nameLen = view.getUint16(e.localOffset + 26, true);
21722
21723
  const extraLen = view.getUint16(e.localOffset + 28, true);
21723
21724
  const headerLen = 30 + nameLen + extraLen;
@@ -21725,7 +21726,7 @@ function patchZipEntries(original, replacements, additions) {
21725
21726
  const hview = new DataView(header.buffer, header.byteOffset, header.byteLength);
21726
21727
  const method = e.method;
21727
21728
  if (method !== 0 && method !== 8) {
21728
- throw new (0, _chunkOQNFGKRYcjs.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`);
21729
+ throw new (0, _chunkGZ7W64QUcjs.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`);
21729
21730
  }
21730
21731
  const compData = method === 0 ? newData : new Uint8Array(_zlib.deflateRawSync.call(void 0, newData));
21731
21732
  const crc = crc32(newData);
@@ -21826,7 +21827,7 @@ async function fillHwpx(hwpxBuffer, values, blockedLabels) {
21826
21827
  const zip = await _jszip2.default.loadAsync(hwpxBuffer);
21827
21828
  const sectionPaths = Object.keys(zip.files).filter((name) => /[Ss]ection\d+\.xml$/i.test(name)).sort();
21828
21829
  if (sectionPaths.length === 0) {
21829
- throw new (0, _chunkOQNFGKRYcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
21830
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
21830
21831
  }
21831
21832
  const warnings = [];
21832
21833
  const normalizedValues = normalizeValues(values, warnings);
@@ -22563,7 +22564,7 @@ function assertSequentialIds(rows, label, startId) {
22563
22564
  const m = rows[i].match(/\bid="(\d+)"/);
22564
22565
  const got = m ? Number(m[1]) : NaN;
22565
22566
  if (got !== startId + i) {
22566
- throw new (0, _chunkOQNFGKRYcjs.KordocError)(
22567
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)(
22567
22568
  `\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)`
22568
22569
  );
22569
22570
  }
@@ -22647,7 +22648,7 @@ function buildCharProperties(theme, gongmun, ratioVariants = [], extraCharPrXmls
22647
22648
  }
22648
22649
  const expectedBase = charVariantBase(richAssets, !!gongmun);
22649
22650
  if (rows.length !== expectedBase) {
22650
- throw new (0, _chunkOQNFGKRYcjs.KordocError)(
22651
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)(
22651
22652
  `\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`
22652
22653
  );
22653
22654
  }
@@ -23543,7 +23544,7 @@ function escapeGfm(text) {
23543
23544
  }
23544
23545
  var HWP_SHAPE_ALT_TEXT_RE = /^(?:모서리가 둥근 |둥근 )?(?:사각형|직사각형|정사각형|원|타원|삼각형|이등변 삼각형|직각 삼각형|선|직선|곡선|화살표|굵은 화살표|이중 화살표|오각형|육각형|팔각형|별|[4-8]점별|십자|십자형|구름|구름형|마름모|도넛|평행사변형|사다리꼴|부채꼴|호|반원|물결|번개|하트|빗금|블록 화살표|수식|표|그림|개체|그리기\s?개체|묶음\s?개체|글상자|수식\s?개체|OLE\s?개체)\s?입니다\.?$/gm;
23545
23546
  function sanitizeText(text) {
23546
- let result = _chunk2BTKLDNXcjs.mapPuaText.call(void 0, text).replace(/[\u{F0000}-\u{FFFFD}]/gu, "").replace(HWP_SHAPE_ALT_TEXT_RE, "").replace(/ +/g, " ").trim();
23547
+ let result = _chunk6GM2QLM3cjs.mapPuaText.call(void 0, text).replace(/[\u{F0000}-\u{FFFFD}]/gu, "").replace(HWP_SHAPE_ALT_TEXT_RE, "").replace(/ +/g, " ").trim();
23547
23548
  if (result.length <= 30 && result.includes(" ")) {
23548
23549
  const tokens = result.split(" ");
23549
23550
  const koreanSingleCharCount = tokens.filter((t) => t.length === 1 && /[가-힯ㄱ-ㆎ]/.test(t)).length;
@@ -23715,7 +23716,7 @@ function parseHtmlTable(raw) {
23715
23716
  const cs = parseInt(_optionalChain([attrs, 'access', _287 => _287.match, 'call', _288 => _288(/colspan\s*=\s*["']?(\d+)/i), 'optionalAccess', _289 => _289[1]]) || "1", 10);
23716
23717
  const rs = parseInt(_optionalChain([attrs, 'access', _290 => _290.match, 'call', _291 => _291(/rowspan\s*=\s*["']?(\d+)/i), 'optionalAccess', _292 => _292[1]]) || "1", 10);
23717
23718
  cellStart = m.index + m[0].length;
23718
- cellInfo = { colSpan: clampSpan(isNaN(cs) ? 1 : cs, _chunk2BTKLDNXcjs.MAX_COLS), rowSpan: clampSpan(isNaN(rs) ? 1 : rs, _chunk2BTKLDNXcjs.MAX_ROWS) };
23719
+ cellInfo = { colSpan: clampSpan(isNaN(cs) ? 1 : cs, _chunk6GM2QLM3cjs.MAX_COLS), rowSpan: clampSpan(isNaN(rs) ? 1 : rs, _chunk6GM2QLM3cjs.MAX_ROWS) };
23719
23720
  } else if (cellStart >= 0 && cellInfo && currentRow) {
23720
23721
  currentRow.push({ inner: raw.slice(cellStart, m.index), colSpan: cellInfo.colSpan, rowSpan: cellInfo.rowSpan });
23721
23722
  cellStart = -1;
@@ -24371,8 +24372,8 @@ function layoutHtmlRows(rows) {
24371
24372
  let c = 0;
24372
24373
  for (const cell2 of rows[r].cells) {
24373
24374
  while (occupied.has(`${r},${c}`)) c++;
24374
- const colSpan = clampSpan(cell2.colSpan, _chunk2BTKLDNXcjs.MAX_COLS);
24375
- const rowSpan = clampSpan(cell2.rowSpan, _chunk2BTKLDNXcjs.MAX_ROWS);
24375
+ const colSpan = clampSpan(cell2.colSpan, _chunk6GM2QLM3cjs.MAX_COLS);
24376
+ const rowSpan = clampSpan(cell2.rowSpan, _chunk6GM2QLM3cjs.MAX_ROWS);
24376
24377
  placed.push({ r, c, colSpan, rowSpan, inner: cell2.inner, isHeader: rows[r].tag === "th" });
24377
24378
  for (let dr = 0; dr < rowSpan; dr++) {
24378
24379
  for (let dc = 0; dc < colSpan; dc++) occupied.add(`${r + dr},${c + dc}`);
@@ -25969,11 +25970,11 @@ function buildFloatPicXml(itemId, sizeHu, posXHu, posYHu, ids) {
25969
25970
  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>`;
25970
25971
  }
25971
25972
  async function placeSealHwpx(hwpxBuffer, ops) {
25972
- if (ops.length === 0) throw new (0, _chunkOQNFGKRYcjs.KordocError)("place_seal: \uBC30\uCE58\uD560 \uB3C4\uC7A5\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
25973
+ if (ops.length === 0) throw new (0, _chunkGZ7W64QUcjs.KordocError)("place_seal: \uBC30\uCE58\uD560 \uB3C4\uC7A5\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
25973
25974
  const u8 = new Uint8Array(hwpxBuffer);
25974
25975
  const zip = await _jszip2.default.loadAsync(hwpxBuffer);
25975
25976
  const sectionPaths = Object.keys(zip.files).filter((name) => /[Ss]ection\d+\.xml$/i.test(name)).sort((a, b) => Number(_nullishCoalesce(_optionalChain([a, 'access', _394 => _394.match, 'call', _395 => _395(/(\d+)\.xml$/i), 'optionalAccess', _396 => _396[1]]), () => ( 0))) - Number(_nullishCoalesce(_optionalChain([b, 'access', _397 => _397.match, 'call', _398 => _398(/(\d+)\.xml$/i), 'optionalAccess', _399 => _399[1]]), () => ( 0))));
25976
- if (sectionPaths.length === 0) throw new (0, _chunkOQNFGKRYcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
25977
+ if (sectionPaths.length === 0) throw new (0, _chunkGZ7W64QUcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
25977
25978
  const manifestPath = Object.keys(zip.files).find((name) => /\.hpf$/i.test(name));
25978
25979
  const headerPath = Object.keys(zip.files).find((name) => /(^|\/)header\.xml$/i.test(name));
25979
25980
  const styles = headerPath ? parseRenderStyles(await zip.file(headerPath).async("text")) : null;
@@ -26014,11 +26015,11 @@ async function placeSealHwpx(hwpxBuffer, ops) {
26014
26015
  const manifestItems = [];
26015
26016
  const placed = [];
26016
26017
  for (const op of ops) {
26017
- if (!op.anchor) throw new (0, _chunkOQNFGKRYcjs.KordocError)("place_seal: anchor \uBB38\uAD6C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4");
26018
- if (!op.image || op.image.length === 0) throw new (0, _chunkOQNFGKRYcjs.KordocError)("place_seal: \uB3C4\uC7A5 \uC774\uBBF8\uC9C0\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4");
26018
+ if (!op.anchor) throw new (0, _chunkGZ7W64QUcjs.KordocError)("place_seal: anchor \uBB38\uAD6C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4");
26019
+ if (!op.image || op.image.length === 0) throw new (0, _chunkGZ7W64QUcjs.KordocError)("place_seal: \uB3C4\uC7A5 \uC774\uBBF8\uC9C0\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4");
26019
26020
  const ext = (_nullishCoalesce(op.ext, () => ( "png"))).toLowerCase();
26020
- if (!MIME[ext]) throw new (0, _chunkOQNFGKRYcjs.KordocError)(`place_seal: \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uC774\uBBF8\uC9C0 \uD655\uC7A5\uC790 .${ext} (png/jpg/bmp/gif)`);
26021
- if (!imageMagicMatches(op.image, ext)) throw new (0, _chunkOQNFGKRYcjs.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)`);
26021
+ if (!MIME[ext]) throw new (0, _chunkGZ7W64QUcjs.KordocError)(`place_seal: \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uC774\uBBF8\uC9C0 \uD655\uC7A5\uC790 .${ext} (png/jpg/bmp/gif)`);
26022
+ if (!imageMagicMatches(op.image, ext)) throw new (0, _chunkGZ7W64QUcjs.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)`);
26022
26023
  const wantOcc = _nullishCoalesce(op.occurrence, () => ( 0));
26023
26024
  let found = null;
26024
26025
  let total = 0;
@@ -26051,7 +26052,7 @@ async function placeSealHwpx(hwpxBuffer, ops) {
26051
26052
  }
26052
26053
  }
26053
26054
  }
26054
- throw new (0, _chunkOQNFGKRYcjs.KordocError)(
26055
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)(
26055
26056
  `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)})`
26056
26057
  );
26057
26058
  }
@@ -26059,7 +26060,7 @@ async function placeSealHwpx(hwpxBuffer, ops) {
26059
26060
  const xml = sectionXmls[si];
26060
26061
  const run = anchorRunInfo(xml, site.para, op.anchor);
26061
26062
  if (!run) {
26062
- throw new (0, _chunkOQNFGKRYcjs.KordocError)(`place_seal: \uC575\uCEE4 "${op.anchor}" \uBB38\uB2E8\uC5D0\uC11C run\uC744 \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4`);
26063
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)(`place_seal: \uC575\uCEE4 "${op.anchor}" \uBB38\uB2E8\uC5D0\uC11C run\uC744 \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4`);
26063
26064
  }
26064
26065
  const charPrHeight = _nullishCoalesce(_optionalChain([styles, 'optionalAccess', _400 => _400.charPr, 'access', _401 => _401.get, 'call', _402 => _402(run.charPr), 'optionalAccess', _403 => _403.height]), () => ( 1e3));
26065
26066
  const fontPt = charPrHeight / 100;
@@ -26337,7 +26338,7 @@ function pick(map, keys) {
26337
26338
  return out;
26338
26339
  }
26339
26340
  async function hwpxToProfile(input) {
26340
- const buf = input instanceof ArrayBuffer ? input : _chunkOQNFGKRYcjs.toArrayBuffer.call(void 0, input);
26341
+ const buf = input instanceof ArrayBuffer ? input : _chunkGZ7W64QUcjs.toArrayBuffer.call(void 0, input);
26341
26342
  const zip = await _jszip2.default.loadAsync(buf);
26342
26343
  const parser = createXmlParser();
26343
26344
  const headerFile = _nullishCoalesce(zip.file("Contents/header.xml"), () => ( _optionalChain([zip, 'access', _425 => _425.file, 'call', _426 => _426(/[Hh]eader\.xml$/), 'optionalAccess', _427 => _427[0]])));
@@ -27265,7 +27266,7 @@ async function resolveSectionEntryNames(zip) {
27265
27266
  const paths = sectionPathsFromManifest(xml).filter((p) => zip.file(p) !== null);
27266
27267
  if (paths.length > 0) return paths;
27267
27268
  }
27268
- return Object.keys(zip.files).filter((n) => /[Ss]ection\d+\.xml$/.test(n)).sort(_chunkOQNFGKRYcjs.compareSectionPaths);
27269
+ return Object.keys(zip.files).filter((n) => /[Ss]ection\d+\.xml$/.test(n)).sort(_chunkGZ7W64QUcjs.compareSectionPaths);
27269
27270
  }
27270
27271
  function sectionPathsFromManifest(xml) {
27271
27272
  const attr = (tag, name) => {
@@ -27275,7 +27276,7 @@ function sectionPathsFromManifest(xml) {
27275
27276
  const idToHref = /* @__PURE__ */ new Map();
27276
27277
  for (const m of xml.matchAll(/<opf:item(\s(?:"[^"]*"|'[^']*'|[^>"'])*?)\/?>/g)) {
27277
27278
  const id = attr(m[1], "id");
27278
- const href = _chunkOQNFGKRYcjs.normalizeSectionHref.call(void 0, attr(m[1], "href"));
27279
+ const href = _chunkGZ7W64QUcjs.normalizeSectionHref.call(void 0, attr(m[1], "href"));
27279
27280
  if (id && href) idToHref.set(id, href);
27280
27281
  }
27281
27282
  const ordered = [];
@@ -27284,7 +27285,7 @@ function sectionPathsFromManifest(xml) {
27284
27285
  if (href) ordered.push(href);
27285
27286
  }
27286
27287
  if (ordered.length > 0) return ordered;
27287
- return Array.from(idToHref.values()).sort(_chunkOQNFGKRYcjs.compareSectionPaths);
27288
+ return Array.from(idToHref.values()).sort(_chunkGZ7W64QUcjs.compareSectionPaths);
27288
27289
  }
27289
27290
 
27290
27291
  // src/roundtrip/patcher.ts
@@ -27395,9 +27396,9 @@ function buildOrigUnits(blocks) {
27395
27396
  if (block.type === "paragraph" && block.text && /^\[별표\s*\d+/.test(sanitizeText(block.text))) {
27396
27397
  const next = blocks[i + 1];
27397
27398
  if (_optionalChain([next, 'optionalAccess', _460 => _460.type]) === "paragraph" && next.text && /관련\)?$/.test(next.text)) consume = 2;
27398
- chunk = _chunk2BTKLDNXcjs.blocksToMarkdown.call(void 0, blocks.slice(i, i + consume));
27399
+ chunk = _chunk6GM2QLM3cjs.blocksToMarkdown.call(void 0, blocks.slice(i, i + consume));
27399
27400
  } else {
27400
- chunk = _chunk2BTKLDNXcjs.blocksToMarkdown.call(void 0, [block]);
27401
+ chunk = _chunk6GM2QLM3cjs.blocksToMarkdown.call(void 0, [block]);
27401
27402
  }
27402
27403
  if (chunk) {
27403
27404
  const subUnits = splitMarkdownUnits(chunk);
@@ -29000,12 +29001,12 @@ function blocksToChunks(blocks, options) {
29000
29001
  let run = null;
29001
29002
  const flushRun = () => {
29002
29003
  if (!run) return;
29003
- push("text", run.breadcrumb, _chunk2BTKLDNXcjs.blocksToMarkdown.call(void 0, run.blocks), [run.start, run.end], run.page);
29004
+ push("text", run.breadcrumb, _chunk6GM2QLM3cjs.blocksToMarkdown.call(void 0, run.blocks), [run.start, run.end], run.page);
29004
29005
  run = null;
29005
29006
  };
29006
29007
  for (let i = 0; i < blocks.length; i++) {
29007
29008
  const block = blocks[i];
29008
- const md2 = _chunk2BTKLDNXcjs.blocksToMarkdown.call(void 0, [block]);
29009
+ const md2 = _chunk6GM2QLM3cjs.blocksToMarkdown.call(void 0, [block]);
29009
29010
  if (!md2) continue;
29010
29011
  if (block.type === "heading") {
29011
29012
  flushRun();
@@ -29475,13 +29476,13 @@ async function htmlToPdf(html, options) {
29475
29476
  try {
29476
29477
  puppeteer = await Promise.resolve().then(() => _interopRequireWildcard(require("puppeteer-core")));
29477
29478
  } catch (e32) {
29478
- throw new (0, _chunkOQNFGKRYcjs.KordocError)(
29479
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)(
29479
29480
  "PDF \uC0DD\uC131\uC5D0 puppeteer-core\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. \uC124\uCE58: npm install puppeteer-core"
29480
29481
  );
29481
29482
  }
29482
29483
  const executablePath = _nullishCoalesce(process.env.PUPPETEER_EXECUTABLE_PATH, () => ( findChromiumPath()));
29483
29484
  if (!executablePath) {
29484
- throw new (0, _chunkOQNFGKRYcjs.KordocError)(
29485
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)(
29485
29486
  "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."
29486
29487
  );
29487
29488
  }
@@ -29540,7 +29541,7 @@ async function markdownToPdf(markdown, options) {
29540
29541
  return htmlToPdf(html, options);
29541
29542
  }
29542
29543
  async function blocksToPdf(blocks, options) {
29543
- const markdown = _chunk2BTKLDNXcjs.blocksToMarkdown.call(void 0, blocks);
29544
+ const markdown = _chunk6GM2QLM3cjs.blocksToMarkdown.call(void 0, blocks);
29544
29545
  return markdownToPdf(markdown, options);
29545
29546
  }
29546
29547
 
@@ -29842,7 +29843,7 @@ function findFirst(el, name, depth = 0) {
29842
29843
  return null;
29843
29844
  }
29844
29845
  function escapeXml3(s) {
29845
- return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
29846
+ return s.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]/g, "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
29846
29847
  }
29847
29848
  var OBJ_TAGS = /* @__PURE__ */ new Set(["tbl", "pic", "container", "equation", "rect", "ellipse", "polygon", "curv", "line", "arc", "ole", "textart"]);
29848
29849
  var pt = (u) => String(Math.round(u) / 100);
@@ -30434,15 +30435,15 @@ function renderSectionToPages(root, geom, ctxBase, doReflow, reflowMode) {
30434
30435
  async function renderHwpxToSvg(input, options) {
30435
30436
  const maxImg = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _557 => _557.maxImageBytes]), () => ( 40 * 1024 * 1024));
30436
30437
  const ab = input instanceof Uint8Array ? input.buffer.slice(input.byteOffset, input.byteOffset + input.byteLength) : input;
30437
- _chunkOQNFGKRYcjs.precheckZipSize.call(void 0, ab, MAX_DECOMPRESS_SIZE, MAX_ZIP_ENTRIES);
30438
+ _chunkGZ7W64QUcjs.precheckZipSize.call(void 0, ab, MAX_DECOMPRESS_SIZE, MAX_ZIP_ENTRIES);
30438
30439
  let zip;
30439
30440
  try {
30440
30441
  zip = await _jszip2.default.loadAsync(input);
30441
30442
  } catch (e33) {
30442
- throw new (0, _chunkOQNFGKRYcjs.KordocError)("HWPX(ZIP) \uD615\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4 \u2014 \uB80C\uB354\uB294 HWPX\uB9CC \uC9C0\uC6D0");
30443
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)("HWPX(ZIP) \uD615\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4 \u2014 \uB80C\uB354\uB294 HWPX\uB9CC \uC9C0\uC6D0");
30443
30444
  }
30444
30445
  const secFiles = zip.file(/Contents\/section\d+\.xml$/i).sort((a, b) => a.name.localeCompare(b.name));
30445
- if (secFiles.length === 0) throw new (0, _chunkOQNFGKRYcjs.KordocError)("Contents/section0.xml \uC5C6\uC74C \u2014 HWPX\uAC00 \uC544\uB2C8\uAC70\uB098 \uC190\uC0C1\uB428");
30446
+ if (secFiles.length === 0) throw new (0, _chunkGZ7W64QUcjs.KordocError)("Contents/section0.xml \uC5C6\uC74C \u2014 HWPX\uAC00 \uC544\uB2C8\uAC70\uB098 \uC190\uC0C1\uB428");
30446
30447
  const warnings = [];
30447
30448
  const headFile = _nullishCoalesce(zip.file("Contents/header.xml"), () => ( zip.file("Contents/head.xml")));
30448
30449
  const styles = headFile ? parseRenderStyles(await headFile.async("string")) : { charPr: /* @__PURE__ */ new Map(), paraAlign: /* @__PURE__ */ new Map(), paraGeom: /* @__PURE__ */ new Map(), borderFill: /* @__PURE__ */ new Map() };
@@ -30450,7 +30451,7 @@ async function renderHwpxToSvg(input, options) {
30450
30451
  const secXmls = [];
30451
30452
  for (const f of secFiles) {
30452
30453
  const xml = await f.async("string");
30453
- if (xml.length > MAX_DECOMPRESS_SIZE) throw new (0, _chunkOQNFGKRYcjs.KordocError)("\uC139\uC158 XML\uC774 \uD5C8\uC6A9 \uD06C\uAE30\uB97C \uCD08\uACFC");
30454
+ if (xml.length > MAX_DECOMPRESS_SIZE) throw new (0, _chunkGZ7W64QUcjs.KordocError)("\uC139\uC158 XML\uC774 \uD5C8\uC6A9 \uD06C\uAE30\uB97C \uCD08\uACFC");
30454
30455
  secXmls.push(xml);
30455
30456
  }
30456
30457
  const binmap = /* @__PURE__ */ new Map();
@@ -30523,9 +30524,9 @@ async function renderHwpxToSvg(input, options) {
30523
30524
  }
30524
30525
  if (rendered.length === 0) {
30525
30526
  if (noCacheSkipped) {
30526
- throw new (0, _chunkOQNFGKRYcjs.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)");
30527
+ throw new (0, _chunkGZ7W64QUcjs.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)");
30527
30528
  }
30528
- throw new (0, _chunkOQNFGKRYcjs.KordocError)("\uB80C\uB354\uD560 \uAD6C\uC5ED\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 HWPX\uAC00 \uC190\uC0C1\uB418\uC5C8\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4");
30529
+ throw new (0, _chunkGZ7W64QUcjs.KordocError)("\uB80C\uB354\uD560 \uAD6C\uC5ED\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 HWPX\uAC00 \uC190\uC0C1\uB418\uC5C8\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4");
30529
30530
  }
30530
30531
  const GAP = 2400;
30531
30532
  const clipDefs = [];
@@ -30561,13 +30562,13 @@ async function parse(input, options) {
30561
30562
  if (typeof input === "string") {
30562
30563
  try {
30563
30564
  const buf = await _promises.readFile.call(void 0, input);
30564
- buffer = _chunkOQNFGKRYcjs.toArrayBuffer.call(void 0, buf);
30565
+ buffer = _chunkGZ7W64QUcjs.toArrayBuffer.call(void 0, buf);
30565
30566
  } catch (err) {
30566
30567
  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}`;
30567
30568
  return { success: false, fileType: "unknown", error: msg2, code: "PARSE_ERROR" };
30568
30569
  }
30569
30570
  } else if (Buffer.isBuffer(input)) {
30570
- buffer = _chunkOQNFGKRYcjs.toArrayBuffer.call(void 0, input);
30571
+ buffer = _chunkGZ7W64QUcjs.toArrayBuffer.call(void 0, input);
30571
30572
  } else {
30572
30573
  buffer = input;
30573
30574
  }
@@ -30601,18 +30602,18 @@ async function parse(input, options) {
30601
30602
  }
30602
30603
  async function parseImage(buffer, options) {
30603
30604
  try {
30604
- const { parseImageDocument } = await Promise.resolve().then(() => _interopRequireWildcard(require("./image-ocr-GHQ6YKJH.cjs")));
30605
+ const { parseImageDocument } = await Promise.resolve().then(() => _interopRequireWildcard(require("./image-ocr-J5656BEE.cjs")));
30605
30606
  const { blocks, warnings } = await parseImageDocument(buffer, options);
30606
30607
  return {
30607
30608
  success: true,
30608
30609
  fileType: "image",
30609
- markdown: _chunk2BTKLDNXcjs.blocksToMarkdown.call(void 0, blocks),
30610
+ markdown: _chunk6GM2QLM3cjs.blocksToMarkdown.call(void 0, blocks),
30610
30611
  blocks,
30611
30612
  warnings: warnings.length ? warnings : void 0,
30612
30613
  pageCount: 1
30613
30614
  };
30614
30615
  } catch (err) {
30615
- return { success: false, fileType: "image", error: _chunkOQNFGKRYcjs.sanitizeError.call(void 0, err), code: _chunkOQNFGKRYcjs.classifyError.call(void 0, err) };
30616
+ return { success: false, fileType: "image", error: _chunkGZ7W64QUcjs.sanitizeError.call(void 0, err), code: _chunkGZ7W64QUcjs.classifyError.call(void 0, err) };
30616
30617
  }
30617
30618
  }
30618
30619
  async function parseHwp3(buffer, options) {
@@ -30620,7 +30621,7 @@ async function parseHwp3(buffer, options) {
30620
30621
  const { markdown, blocks, metadata, outline, warnings } = parseHwp3Document(buffer, options);
30621
30622
  return { success: true, fileType: "hwp3", markdown, blocks, metadata, outline, warnings };
30622
30623
  } catch (err) {
30623
- return { success: false, fileType: "hwp3", error: _chunkOQNFGKRYcjs.sanitizeError.call(void 0, err), code: _chunkOQNFGKRYcjs.classifyError.call(void 0, err) };
30624
+ return { success: false, fileType: "hwp3", error: _chunkGZ7W64QUcjs.sanitizeError.call(void 0, err), code: _chunkGZ7W64QUcjs.classifyError.call(void 0, err) };
30624
30625
  }
30625
30626
  }
30626
30627
  async function parseHwpx(buffer, options) {
@@ -30628,7 +30629,7 @@ async function parseHwpx(buffer, options) {
30628
30629
  const { markdown, blocks, metadata, outline, warnings, images } = await parseHwpxDocument(buffer, options);
30629
30630
  return { success: true, fileType: "hwpx", markdown, blocks, metadata, outline, warnings, images: _optionalChain([images, 'optionalAccess', _564 => _564.length]) ? images : void 0 };
30630
30631
  } catch (err) {
30631
- return { success: false, fileType: "hwpx", error: _chunkOQNFGKRYcjs.sanitizeError.call(void 0, err), code: _chunkOQNFGKRYcjs.classifyError.call(void 0, err) };
30632
+ return { success: false, fileType: "hwpx", error: _chunkGZ7W64QUcjs.sanitizeError.call(void 0, err), code: _chunkGZ7W64QUcjs.classifyError.call(void 0, err) };
30632
30633
  }
30633
30634
  }
30634
30635
  async function parseHwp(buffer, options) {
@@ -30653,13 +30654,13 @@ async function parseHwp(buffer, options) {
30653
30654
  }
30654
30655
  return { success: true, fileType: "hwp", markdown, blocks, metadata, outline, warnings, images: _optionalChain([images, 'optionalAccess', _566 => _566.length]) ? images : void 0 };
30655
30656
  } catch (err) {
30656
- return { success: false, fileType: "hwp", error: _chunkOQNFGKRYcjs.sanitizeError.call(void 0, err), code: _chunkOQNFGKRYcjs.classifyError.call(void 0, err) };
30657
+ return { success: false, fileType: "hwp", error: _chunkGZ7W64QUcjs.sanitizeError.call(void 0, err), code: _chunkGZ7W64QUcjs.classifyError.call(void 0, err) };
30657
30658
  }
30658
30659
  }
30659
30660
  async function parsePdf(buffer, options) {
30660
30661
  let parsePdfDocument;
30661
30662
  try {
30662
- const mod = await Promise.resolve().then(() => _interopRequireWildcard(require("./parser-KTNIUF2N.cjs")));
30663
+ const mod = await Promise.resolve().then(() => _interopRequireWildcard(require("./parser-CSYU3CAW.cjs")));
30663
30664
  parsePdfDocument = mod.parsePdfDocument;
30664
30665
  } catch (e35) {
30665
30666
  return {
@@ -30674,7 +30675,7 @@ async function parsePdf(buffer, options) {
30674
30675
  return { success: true, fileType: "pdf", markdown, blocks, metadata, outline, warnings, isImageBased, pageQuality, qualitySummary, images };
30675
30676
  } catch (err) {
30676
30677
  const isImageBased = err instanceof Error && "isImageBased" in err ? true : void 0;
30677
- return { success: false, fileType: "pdf", error: _chunkOQNFGKRYcjs.sanitizeError.call(void 0, err), code: _chunkOQNFGKRYcjs.classifyError.call(void 0, err), isImageBased };
30678
+ return { success: false, fileType: "pdf", error: _chunkGZ7W64QUcjs.sanitizeError.call(void 0, err), code: _chunkGZ7W64QUcjs.classifyError.call(void 0, err), isImageBased };
30678
30679
  }
30679
30680
  }
30680
30681
  async function parseXlsx(buffer, options) {
@@ -30682,7 +30683,7 @@ async function parseXlsx(buffer, options) {
30682
30683
  const { markdown, blocks, metadata, warnings } = await parseXlsxDocument(buffer, options);
30683
30684
  return { success: true, fileType: "xlsx", markdown, blocks, metadata, warnings };
30684
30685
  } catch (err) {
30685
- return { success: false, fileType: "xlsx", error: _chunkOQNFGKRYcjs.sanitizeError.call(void 0, err), code: _chunkOQNFGKRYcjs.classifyError.call(void 0, err) };
30686
+ return { success: false, fileType: "xlsx", error: _chunkGZ7W64QUcjs.sanitizeError.call(void 0, err), code: _chunkGZ7W64QUcjs.classifyError.call(void 0, err) };
30686
30687
  }
30687
30688
  }
30688
30689
  async function parseXls(buffer, options) {
@@ -30690,7 +30691,7 @@ async function parseXls(buffer, options) {
30690
30691
  const { markdown, blocks, metadata, warnings } = await parseXlsDocument(buffer, options);
30691
30692
  return { success: true, fileType: "xls", markdown, blocks, metadata, warnings };
30692
30693
  } catch (err) {
30693
- return { success: false, fileType: "xls", error: _chunkOQNFGKRYcjs.sanitizeError.call(void 0, err), code: _chunkOQNFGKRYcjs.classifyError.call(void 0, err) };
30694
+ return { success: false, fileType: "xls", error: _chunkGZ7W64QUcjs.sanitizeError.call(void 0, err), code: _chunkGZ7W64QUcjs.classifyError.call(void 0, err) };
30694
30695
  }
30695
30696
  }
30696
30697
  async function parseDocx(buffer, options) {
@@ -30698,7 +30699,7 @@ async function parseDocx(buffer, options) {
30698
30699
  const { markdown, blocks, metadata, outline, warnings, images } = await parseDocxDocument(buffer, options);
30699
30700
  return { success: true, fileType: "docx", markdown, blocks, metadata, outline, warnings, images: _optionalChain([images, 'optionalAccess', _567 => _567.length]) ? images : void 0 };
30700
30701
  } catch (err) {
30701
- return { success: false, fileType: "docx", error: _chunkOQNFGKRYcjs.sanitizeError.call(void 0, err), code: _chunkOQNFGKRYcjs.classifyError.call(void 0, err) };
30702
+ return { success: false, fileType: "docx", error: _chunkGZ7W64QUcjs.sanitizeError.call(void 0, err), code: _chunkGZ7W64QUcjs.classifyError.call(void 0, err) };
30702
30703
  }
30703
30704
  }
30704
30705
  async function parseHwpml(buffer, options) {
@@ -30706,16 +30707,16 @@ async function parseHwpml(buffer, options) {
30706
30707
  const { markdown, blocks, metadata, outline, warnings } = parseHwpmlDocument(buffer, options);
30707
30708
  return { success: true, fileType: "hwpml", markdown, blocks, metadata, outline, warnings };
30708
30709
  } catch (err) {
30709
- return { success: false, fileType: "hwpml", error: _chunkOQNFGKRYcjs.sanitizeError.call(void 0, err), code: _chunkOQNFGKRYcjs.classifyError.call(void 0, err) };
30710
+ return { success: false, fileType: "hwpml", error: _chunkGZ7W64QUcjs.sanitizeError.call(void 0, err), code: _chunkGZ7W64QUcjs.classifyError.call(void 0, err) };
30710
30711
  }
30711
30712
  }
30712
30713
  async function fillForm(input, values, outputFormat = "markdown") {
30713
30714
  let buffer;
30714
30715
  if (typeof input === "string") {
30715
30716
  const buf = await _promises.readFile.call(void 0, input);
30716
- buffer = _chunkOQNFGKRYcjs.toArrayBuffer.call(void 0, buf);
30717
+ buffer = _chunkGZ7W64QUcjs.toArrayBuffer.call(void 0, buf);
30717
30718
  } else if (Buffer.isBuffer(input)) {
30718
- buffer = _chunkOQNFGKRYcjs.toArrayBuffer.call(void 0, input);
30719
+ buffer = _chunkGZ7W64QUcjs.toArrayBuffer.call(void 0, input);
30719
30720
  } else {
30720
30721
  buffer = input;
30721
30722
  }
@@ -30741,7 +30742,7 @@ async function fillForm(input, values, outputFormat = "markdown") {
30741
30742
  throw new Error(`\uC11C\uC2DD \uD30C\uC2F1 \uC2E4\uD328: ${parsed.error}`);
30742
30743
  }
30743
30744
  const fill = fillFormFields(parsed.blocks, values);
30744
- const markdown = _chunk2BTKLDNXcjs.blocksToMarkdown.call(void 0, fill.blocks);
30745
+ const markdown = _chunk6GM2QLM3cjs.blocksToMarkdown.call(void 0, fill.blocks);
30745
30746
  if (outputFormat === "hwpx") {
30746
30747
  const hwpxBuffer = await markdownToHwpx(markdown);
30747
30748
  return { output: hwpxBuffer, format: "hwpx", fill };
@@ -30815,5 +30816,5 @@ async function fillForm(input, values, outputFormat = "markdown") {
30815
30816
 
30816
30817
 
30817
30818
 
30818
- 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 = _chunkOQNFGKRYcjs.VERSION; exports.ValueCursor = ValueCursor; exports.applySplices = applySplices; exports.blocksToChunks = blocksToChunks; exports.blocksToMarkdown = _chunk2BTKLDNXcjs.blocksToMarkdown; exports.blocksToPdf = blocksToPdf; exports.buildParagraphSplices = buildParagraphSplices; exports.buildRangeSplices = buildRangeSplices; exports.charWidthEm1000 = charWidthEm1000; exports.compare = compare; exports.detectFormat = detectFormat; exports.detectOle2Format = detectOle2Format; exports.detectZipFormat = detectZipFormat; exports.diffBlocks = diffBlocks; exports.extractFormFields = extractFormFields; exports.extractFormSchema = extractFormSchema; exports.fillForm = fillForm; exports.fillFormFields = fillFormFields; exports.fillHwpx = fillHwpx; exports.fillWithUniqueGuard = fillWithUniqueGuard; exports.fitRatioForFewerLines = fitRatioForFewerLines; exports.formatFillValue = formatFillValue; exports.gongmunLintWarnings = gongmunLintWarnings; 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.markdownToHwpx = markdownToHwpx; exports.markdownToPdf = markdownToPdf; exports.measureTextWidth = measureTextWidth; 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.parseXls = parseXls; exports.parseXlsx = parseXlsx; exports.patchHwp = patchHwp; exports.patchHwpx = patchHwpx; exports.patchHwpxBlocks = patchHwpxBlocks; exports.placeSealHwpx = placeSealHwpx; exports.redactMarkdown = redactMarkdown; exports.redactText = redactText; exports.renderHtml = renderHtml; exports.renderHwpxToSvg = renderHwpxToSvg; exports.scanSectionXml = scanSectionXml; exports.simulateWrap = simulateWrap; exports.simulateWrapKeepWord = simulateWrapKeepWord; exports.unknownFontWarnings = unknownFontWarnings; exports.validateHwpx = validateHwpx;
30819
+ 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 = _chunkGZ7W64QUcjs.VERSION; exports.ValueCursor = ValueCursor; exports.applySplices = applySplices; exports.blocksToChunks = blocksToChunks; exports.blocksToMarkdown = _chunk6GM2QLM3cjs.blocksToMarkdown; exports.blocksToPdf = blocksToPdf; exports.buildParagraphSplices = buildParagraphSplices; exports.buildRangeSplices = buildRangeSplices; exports.charWidthEm1000 = charWidthEm1000; exports.compare = compare; exports.detectFormat = detectFormat; exports.detectOle2Format = detectOle2Format; exports.detectZipFormat = detectZipFormat; exports.diffBlocks = diffBlocks; exports.extractFormFields = extractFormFields; exports.extractFormSchema = extractFormSchema; exports.fillForm = fillForm; exports.fillFormFields = fillFormFields; exports.fillHwpx = fillHwpx; exports.fillWithUniqueGuard = fillWithUniqueGuard; exports.fitRatioForFewerLines = fitRatioForFewerLines; exports.formatFillValue = formatFillValue; exports.gongmunLintWarnings = gongmunLintWarnings; 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.markdownToHwpx = markdownToHwpx; exports.markdownToPdf = markdownToPdf; exports.measureTextWidth = measureTextWidth; 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.parseXls = parseXls; exports.parseXlsx = parseXlsx; exports.patchHwp = patchHwp; exports.patchHwpx = patchHwpx; exports.patchHwpxBlocks = patchHwpxBlocks; exports.placeSealHwpx = placeSealHwpx; exports.redactMarkdown = redactMarkdown; exports.redactText = redactText; exports.renderHtml = renderHtml; exports.renderHwpxToSvg = renderHwpxToSvg; exports.scanSectionXml = scanSectionXml; exports.simulateWrap = simulateWrap; exports.simulateWrapKeepWord = simulateWrapKeepWord; exports.unknownFontWarnings = unknownFontWarnings; exports.validateHwpx = validateHwpx;
30819
30820
  //# sourceMappingURL=index.cjs.map