kordoc 4.19.1 → 4.19.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/{-LYUUVVQF.js → -3JIHF2AL.js} +11 -11
- package/dist/{chunk-KYFP5LDC.js → chunk-4CS7XE2Q.js} +2 -2
- package/dist/{chunk-XFZMRCGJ.js → chunk-56ZWAREM.js} +2 -2
- package/dist/{chunk-FNX3ZAYB.cjs → chunk-5PGOZBEQ.cjs} +22 -22
- package/dist/{chunk-FNX3ZAYB.cjs.map → chunk-5PGOZBEQ.cjs.map} +1 -1
- package/dist/{chunk-JA5B4NPF.js → chunk-6ZBORHFB.js} +2 -2
- package/dist/{chunk-YLST4S4P.js → chunk-AKSCTGKG.js} +2 -2
- package/dist/{chunk-L5N5UQBP.js → chunk-AOVMOCTK.js} +2 -2
- package/dist/{chunk-TRUR4RUJ.js → chunk-B4R443MV.js} +2 -2
- package/dist/{chunk-CL3CJ7X5.js → chunk-EUCBMW6C.js} +3 -3
- package/dist/{chunk-7XRI4FL4.js → chunk-GNUGD4RO.js} +2 -2
- package/dist/{chunk-4WTJS6ES.js → chunk-I2TBI7PN.js} +2 -2
- package/dist/{chunk-Z2WI3E4N.js → chunk-J75TVRJB.js} +2 -2
- package/dist/{chunk-BDTWXJNM.js → chunk-JK7N4R4K.js} +2 -2
- package/dist/{chunk-ADBES5QJ.js → chunk-JXJDXDOU.js} +3 -3
- package/dist/{chunk-RHMIEEAZ.cjs → chunk-MZ6XNFZL.cjs} +2 -2
- package/dist/{chunk-RHMIEEAZ.cjs.map → chunk-MZ6XNFZL.cjs.map} +1 -1
- package/dist/{chunk-6KOQPPLX.js → chunk-NV46IWKF.js} +27 -21
- package/dist/chunk-NV46IWKF.js.map +1 -0
- package/dist/{chunk-7L5GY54Q.js → chunk-OKHKEYTL.js} +2 -2
- package/dist/{chunk-W5NXOMCD.cjs → chunk-ORGWGR4K.cjs} +6 -6
- package/dist/{chunk-W5NXOMCD.cjs.map → chunk-ORGWGR4K.cjs.map} +1 -1
- package/dist/{chunk-MSUGYK6A.js → chunk-PWQ2BVAT.js} +3 -3
- package/dist/{chunk-UAAYIEIK.js → chunk-QYJPU4FZ.js} +30 -2
- package/dist/chunk-QYJPU4FZ.js.map +1 -0
- package/dist/{chunk-5AZQEMMG.js → chunk-QZ63HXEG.js} +51 -20
- package/dist/chunk-QZ63HXEG.js.map +1 -0
- package/dist/{chunk-FEGRQA3Q.js → chunk-R2JM2HOJ.js} +4 -4
- package/dist/{chunk-UOXOYZU4.cjs → chunk-RVBQT2PD.cjs} +3 -3
- package/dist/{chunk-UOXOYZU4.cjs.map → chunk-RVBQT2PD.cjs.map} +1 -1
- package/dist/{chunk-GPNPYBXJ.cjs → chunk-T2DZTOGG.cjs} +12 -12
- package/dist/{chunk-GPNPYBXJ.cjs.map → chunk-T2DZTOGG.cjs.map} +1 -1
- package/dist/{chunk-JNIJPP4B.js → chunk-TM4T4NYJ.js} +2 -2
- package/dist/{chunk-DQHDI567.js → chunk-U6AJU2VD.js} +2 -2
- package/dist/{chunk-X6ME7YYS.js → chunk-VO22VAR3.js} +2 -2
- package/dist/{chunk-HMJXB7ZE.cjs → chunk-WQAGDJIP.cjs} +3 -3
- package/dist/{chunk-HMJXB7ZE.cjs.map → chunk-WQAGDJIP.cjs.map} +1 -1
- package/dist/{chunk-ZTGTFO52.js → chunk-XPM7WC54.js} +4 -4
- package/dist/chunks-2EC2R7PY.js +10 -0
- package/dist/cli.js +26 -26
- package/dist/{formula-J3UUIPCX.cjs → formula-RNATQ3FQ.cjs} +9 -9
- package/dist/{formula-J3UUIPCX.cjs.map → formula-RNATQ3FQ.cjs.map} +1 -1
- package/dist/{formula-QSZRYZ44.js → formula-RSTTP626.js} +4 -4
- package/dist/{formula-G4YA7SNQ.js → formula-STIFIS57.js} +3 -3
- package/dist/{image-ocr-467KLV3F.cjs → image-ocr-7L5TBBPA.cjs} +15 -15
- package/dist/{image-ocr-467KLV3F.cjs.map → image-ocr-7L5TBBPA.cjs.map} +1 -1
- package/dist/{image-ocr-I52GBXRE.js → image-ocr-R6ZDFBAN.js} +6 -6
- package/dist/{image-ocr-ZP3F4MUY.js → image-ocr-XKSAEEXP.js} +9 -9
- package/dist/index.cjs +824 -761
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +94 -31
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +22 -22
- package/dist/{model-bundle-FEUM7XXS.js → model-bundle-NGTKULP7.js} +5 -5
- package/dist/{models-6QCNX5YR.js → models-QOSU5SYL.js} +5 -5
- package/dist/{parser-6EIBURDE.js → parser-3G4G6SST.js} +11 -11
- package/dist/{parser-YX4LGKIK.js → parser-5GUEP6EK.js} +8 -8
- package/dist/{parser-BIJBX2D5.cjs → parser-AIQBU7FS.cjs} +132 -132
- package/dist/{parser-BIJBX2D5.cjs.map → parser-AIQBU7FS.cjs.map} +1 -1
- package/dist/pdf-ocr-7OAFUDM4.cjs +17 -0
- package/dist/{pdf-ocr-DXQIMO77.cjs.map → pdf-ocr-7OAFUDM4.cjs.map} +1 -1
- package/dist/pdf-ocr-DAXS5RX4.js +16 -0
- package/dist/pdf-ocr-R3VGX6F2.js +20 -0
- package/dist/{profile-io-ATHFEUAP.js → profile-io-ZVNMDLLS.js} +3 -3
- package/dist/{rasterize-SG3CLXMQ.js → rasterize-Y2RLMVCL.js} +3 -3
- package/dist/{redact-doc-K3S4HFHU.js → redact-doc-PNRDDBI3.js} +11 -11
- package/dist/{render-6CQJM7VE.js → render-S3ALARVO.js} +7 -7
- package/dist/seal-EJWPS5VK.js +10 -0
- package/dist/{setup-CZ5KHGPI.js → setup-JH66VSFZ.js} +3 -3
- package/dist/visual-GDXMKDVY.js +20 -0
- package/dist/{watch-RQRIGLFF.js → watch-KMB2FTOD.js} +12 -12
- package/package.json +1 -1
- package/dist/chunk-5AZQEMMG.js.map +0 -1
- package/dist/chunk-6KOQPPLX.js.map +0 -1
- package/dist/chunk-UAAYIEIK.js.map +0 -1
- package/dist/chunks-T67OQGPJ.js +0 -10
- package/dist/pdf-ocr-DXQIMO77.cjs +0 -17
- package/dist/pdf-ocr-MESGGING.js +0 -20
- package/dist/pdf-ocr-YSRBRIPR.js +0 -16
- package/dist/seal-SMO4544N.js +0 -10
- package/dist/visual-UWYGQLOU.js +0 -20
- /package/dist/{-LYUUVVQF.js.map → -3JIHF2AL.js.map} +0 -0
- /package/dist/{chunk-KYFP5LDC.js.map → chunk-4CS7XE2Q.js.map} +0 -0
- /package/dist/{chunk-XFZMRCGJ.js.map → chunk-56ZWAREM.js.map} +0 -0
- /package/dist/{chunk-JA5B4NPF.js.map → chunk-6ZBORHFB.js.map} +0 -0
- /package/dist/{chunk-YLST4S4P.js.map → chunk-AKSCTGKG.js.map} +0 -0
- /package/dist/{chunk-L5N5UQBP.js.map → chunk-AOVMOCTK.js.map} +0 -0
- /package/dist/{chunk-TRUR4RUJ.js.map → chunk-B4R443MV.js.map} +0 -0
- /package/dist/{chunk-CL3CJ7X5.js.map → chunk-EUCBMW6C.js.map} +0 -0
- /package/dist/{chunk-7XRI4FL4.js.map → chunk-GNUGD4RO.js.map} +0 -0
- /package/dist/{chunk-4WTJS6ES.js.map → chunk-I2TBI7PN.js.map} +0 -0
- /package/dist/{chunk-Z2WI3E4N.js.map → chunk-J75TVRJB.js.map} +0 -0
- /package/dist/{chunk-BDTWXJNM.js.map → chunk-JK7N4R4K.js.map} +0 -0
- /package/dist/{chunk-ADBES5QJ.js.map → chunk-JXJDXDOU.js.map} +0 -0
- /package/dist/{chunk-7L5GY54Q.js.map → chunk-OKHKEYTL.js.map} +0 -0
- /package/dist/{chunk-MSUGYK6A.js.map → chunk-PWQ2BVAT.js.map} +0 -0
- /package/dist/{chunk-FEGRQA3Q.js.map → chunk-R2JM2HOJ.js.map} +0 -0
- /package/dist/{chunk-JNIJPP4B.js.map → chunk-TM4T4NYJ.js.map} +0 -0
- /package/dist/{chunk-DQHDI567.js.map → chunk-U6AJU2VD.js.map} +0 -0
- /package/dist/{chunk-X6ME7YYS.js.map → chunk-VO22VAR3.js.map} +0 -0
- /package/dist/{chunk-ZTGTFO52.js.map → chunk-XPM7WC54.js.map} +0 -0
- /package/dist/{chunks-T67OQGPJ.js.map → chunks-2EC2R7PY.js.map} +0 -0
- /package/dist/{formula-QSZRYZ44.js.map → formula-RSTTP626.js.map} +0 -0
- /package/dist/{formula-G4YA7SNQ.js.map → formula-STIFIS57.js.map} +0 -0
- /package/dist/{image-ocr-I52GBXRE.js.map → image-ocr-R6ZDFBAN.js.map} +0 -0
- /package/dist/{image-ocr-ZP3F4MUY.js.map → image-ocr-XKSAEEXP.js.map} +0 -0
- /package/dist/{model-bundle-FEUM7XXS.js.map → model-bundle-NGTKULP7.js.map} +0 -0
- /package/dist/{models-6QCNX5YR.js.map → models-QOSU5SYL.js.map} +0 -0
- /package/dist/{parser-6EIBURDE.js.map → parser-3G4G6SST.js.map} +0 -0
- /package/dist/{parser-YX4LGKIK.js.map → parser-5GUEP6EK.js.map} +0 -0
- /package/dist/{pdf-ocr-MESGGING.js.map → pdf-ocr-DAXS5RX4.js.map} +0 -0
- /package/dist/{pdf-ocr-YSRBRIPR.js.map → pdf-ocr-R3VGX6F2.js.map} +0 -0
- /package/dist/{profile-io-ATHFEUAP.js.map → profile-io-ZVNMDLLS.js.map} +0 -0
- /package/dist/{rasterize-SG3CLXMQ.js.map → rasterize-Y2RLMVCL.js.map} +0 -0
- /package/dist/{redact-doc-K3S4HFHU.js.map → redact-doc-PNRDDBI3.js.map} +0 -0
- /package/dist/{render-6CQJM7VE.js.map → render-S3ALARVO.js.map} +0 -0
- /package/dist/{seal-SMO4544N.js.map → seal-EJWPS5VK.js.map} +0 -0
- /package/dist/{setup-CZ5KHGPI.js.map → setup-JH66VSFZ.js.map} +0 -0
- /package/dist/{visual-UWYGQLOU.js.map → visual-GDXMKDVY.js.map} +0 -0
- /package/dist/{watch-RQRIGLFF.js.map → watch-KMB2FTOD.js.map} +0 -0
package/dist/mcp.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
assertWithinRoot,
|
|
4
4
|
getAccessRoot,
|
|
5
5
|
isOfflineMode
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-I2TBI7PN.js";
|
|
7
7
|
import {
|
|
8
8
|
APPROVAL_MAX,
|
|
9
9
|
BODY_FONTS,
|
|
@@ -43,25 +43,25 @@ import {
|
|
|
43
43
|
resolveBuiltinTemplate,
|
|
44
44
|
unknownFontWarnings,
|
|
45
45
|
usesGaejosikMunche
|
|
46
|
-
} from "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
46
|
+
} from "./chunk-NV46IWKF.js";
|
|
47
|
+
import "./chunk-VO22VAR3.js";
|
|
48
|
+
import "./chunk-PWQ2BVAT.js";
|
|
49
49
|
import "./chunk-3WSNLH4B.js";
|
|
50
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-TM4T4NYJ.js";
|
|
51
51
|
import {
|
|
52
52
|
detectFormat,
|
|
53
53
|
detectOle2Format,
|
|
54
54
|
detectZipFormat,
|
|
55
55
|
extractHwp5MetadataOnly
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-QZ63HXEG.js";
|
|
57
57
|
import "./chunk-7FCNOKOR.js";
|
|
58
|
-
import "./chunk-
|
|
58
|
+
import "./chunk-AOVMOCTK.js";
|
|
59
59
|
import "./chunk-VQFA55IC.js";
|
|
60
|
-
import "./chunk-
|
|
60
|
+
import "./chunk-QYJPU4FZ.js";
|
|
61
61
|
import {
|
|
62
62
|
blocksToMarkdown
|
|
63
|
-
} from "./chunk-
|
|
64
|
-
import "./chunk-
|
|
63
|
+
} from "./chunk-B4R443MV.js";
|
|
64
|
+
import "./chunk-6ZBORHFB.js";
|
|
65
65
|
import {
|
|
66
66
|
KordocError,
|
|
67
67
|
VERSION,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
routeConsoleToStderr,
|
|
70
70
|
sanitizeError,
|
|
71
71
|
toArrayBuffer
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-OKHKEYTL.js";
|
|
73
73
|
|
|
74
74
|
// src/mcp.ts
|
|
75
75
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
@@ -355,7 +355,7 @@ ${markdown}`);
|
|
|
355
355
|
break;
|
|
356
356
|
case "pdf":
|
|
357
357
|
try {
|
|
358
|
-
const { extractPdfMetadataOnly } = await import("./parser-
|
|
358
|
+
const { extractPdfMetadataOnly } = await import("./parser-3G4G6SST.js");
|
|
359
359
|
metadata = await extractPdfMetadataOnly(buffer);
|
|
360
360
|
} catch {
|
|
361
361
|
metadata = void 0;
|
|
@@ -532,7 +532,7 @@ ${tableMarkdown}` }]
|
|
|
532
532
|
if (!parsed.success) {
|
|
533
533
|
return { content: [{ type: "text", text: `\uD30C\uC2F1 \uC2E4\uD328: ${parsed.error}` }], isError: true };
|
|
534
534
|
}
|
|
535
|
-
const { blocksToChunks } = await import("./chunks-
|
|
535
|
+
const { blocksToChunks } = await import("./chunks-2EC2R7PY.js");
|
|
536
536
|
const chunks = blocksToChunks(parsed.blocks, { granularity, includeTableCells: include_table_cells });
|
|
537
537
|
return { content: [{ type: "text", text: capResponseText(JSON.stringify(chunks, null, 2)) }] };
|
|
538
538
|
} catch (err) {
|
|
@@ -777,7 +777,7 @@ ${previewMd}` }]
|
|
|
777
777
|
}
|
|
778
778
|
const image = new Uint8Array(await readFile2(imgResolved));
|
|
779
779
|
const ext = extname2(imgResolved).slice(1).toLowerCase();
|
|
780
|
-
const { placeSealHwpx } = await import("./seal-
|
|
780
|
+
const { placeSealHwpx } = await import("./seal-EJWPS5VK.js");
|
|
781
781
|
const result = await placeSealHwpx(buffer, [{
|
|
782
782
|
anchor,
|
|
783
783
|
occurrence,
|
|
@@ -894,7 +894,7 @@ ${previewMd}` }]
|
|
|
894
894
|
if (outPath && await isSameFile(outPath, resolved)) {
|
|
895
895
|
return { content: [{ type: "text", text: "output_path\uAC00 \uC785\uB825 \uD30C\uC77C\uACFC \uAC19\uC2B5\uB2C8\uB2E4 \u2014 \uC6D0\uBCF8\uC744 \uB36E\uC5B4\uC4F0\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB2E4\uB978 \uACBD\uB85C\uB97C \uC9C0\uC815\uD558\uC138\uC694." }], isError: true };
|
|
896
896
|
}
|
|
897
|
-
const { redactDocument } = await import("./redact-doc-
|
|
897
|
+
const { redactDocument } = await import("./redact-doc-PNRDDBI3.js");
|
|
898
898
|
const r = await redactDocument(buffer, { rules, maskChar: mask_char, filePath: file_path, dryRun: dry_run });
|
|
899
899
|
const MAX_LINES = 50;
|
|
900
900
|
const listed = r.fileHits.length > 0 ? r.fileHits.map((h) => ` - [${h.rule}] ${h.masked} (${h.where} @ ${h.part})`) : r.markdownHits.map((h) => ` - [${h.rule}] ${h.masked}`);
|
|
@@ -968,7 +968,7 @@ function registerRenderTools(server2) {
|
|
|
968
968
|
const { buffer, resolved } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
|
|
969
969
|
const isHwp5 = resolved.toLowerCase().endsWith(".hwp");
|
|
970
970
|
if (!isHwp5 && !pages && (format === "png" || format === "svg")) {
|
|
971
|
-
const { renderHwpxToSvg } = await import("./render-
|
|
971
|
+
const { renderHwpxToSvg } = await import("./render-S3ALARVO.js");
|
|
972
972
|
const result = await renderHwpxToSvg(buffer, { highlights, reflow: true, reflowMode: reflow_mode });
|
|
973
973
|
const summary2 = [
|
|
974
974
|
`\uB80C\uB354 \uC644\uB8CC: ${result.pageCount}\uD398\uC774\uC9C0, ${Math.round(result.width)}x${Math.round(result.height)}pt (\uD14D\uC2A4\uD2B8 ${result.stats.texts}\xB7\uC774\uBBF8\uC9C0 ${result.stats.images}\xB7\uD45C ${result.stats.tables})`,
|
|
@@ -980,7 +980,7 @@ function registerRenderTools(server2) {
|
|
|
980
980
|
summary2.push(`\uC800\uC7A5: ${outPath}`);
|
|
981
981
|
return { content: [{ type: "text", text: summary2.join("\n") }] };
|
|
982
982
|
}
|
|
983
|
-
const { rasterizeSvg } = await import("./rasterize-
|
|
983
|
+
const { rasterizeSvg } = await import("./rasterize-Y2RLMVCL.js");
|
|
984
984
|
const raster = await rasterizeSvg(result.svg, result.width, result.height, max_width_px ? { maxWidthPx: max_width_px } : void 0);
|
|
985
985
|
if (outPath) {
|
|
986
986
|
await mkdir2(dirname3(outPath), { recursive: true });
|
|
@@ -995,7 +995,7 @@ function registerRenderTools(server2) {
|
|
|
995
995
|
]
|
|
996
996
|
};
|
|
997
997
|
}
|
|
998
|
-
const { renderDocument } = await import("./render-
|
|
998
|
+
const { renderDocument } = await import("./render-S3ALARVO.js");
|
|
999
999
|
const { scene, assets } = await renderDocument(buffer, { format, pages, highlights, reflow: true, reflowMode: reflow_mode, maxWidthPx: max_width_px });
|
|
1000
1000
|
const summary = [
|
|
1001
1001
|
`\uB80C\uB354 \uC644\uB8CC: \uBB38\uC11C ${scene.pages.length}\uD398\uC774\uC9C0 \uC911 ${assets.filter((a) => a.page !== void 0).length || 1}\uAC74 (\uD14D\uC2A4\uD2B8 ${scene.stats.texts}\xB7\uC774\uBBF8\uC9C0 ${scene.stats.images}\xB7\uD45C ${scene.stats.tables}\xB7\uB3C4\uD615 ${scene.stats.shapes})`,
|
|
@@ -1045,7 +1045,7 @@ function registerRenderTools(server2) {
|
|
|
1045
1045
|
try {
|
|
1046
1046
|
const { buffer } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
|
|
1047
1047
|
const dir = safeOutputPath(join2(output_dir, "regions.json"), /* @__PURE__ */ new Set([".json"])).replace(/[\\/]regions\.json$/, "");
|
|
1048
|
-
const { extractRenderedRegions } = await import("./render-
|
|
1048
|
+
const { extractRenderedRegions } = await import("./render-S3ALARVO.js");
|
|
1049
1049
|
const regions = await extractRenderedRegions(buffer, { types: target, format, pages, paddingPt: padding_pt, reflow: true });
|
|
1050
1050
|
await mkdir2(dir, { recursive: true });
|
|
1051
1051
|
const ext = format === "jpeg" ? "jpg" : "png";
|
|
@@ -1081,7 +1081,7 @@ function registerRenderTools(server2) {
|
|
|
1081
1081
|
}
|
|
1082
1082
|
const { buffer } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
|
|
1083
1083
|
const dir = output_dir ? safeOutputPath(join2(output_dir, "tables.json"), /* @__PURE__ */ new Set([".json"])).replace(/[\\/]tables\.json$/, "") : void 0;
|
|
1084
|
-
const { extractTables } = await import("./visual-
|
|
1084
|
+
const { extractTables } = await import("./visual-GDXMKDVY.js");
|
|
1085
1085
|
const tables = await extractTables(buffer, { policy: visual, format, paddingPt: padding_pt });
|
|
1086
1086
|
if (dir) await mkdir2(dir, { recursive: true });
|
|
1087
1087
|
const ext = format === "jpeg" ? "jpg" : "png";
|
|
@@ -1138,7 +1138,7 @@ function registerGenerateTools(server2) {
|
|
|
1138
1138
|
try {
|
|
1139
1139
|
const out = safeOutputPath(output_path, PROFILE_EXTENSIONS);
|
|
1140
1140
|
const { buffer } = await readValidatedFile(hwpx_path);
|
|
1141
|
-
const { hwpxToProfile } = await import("./-
|
|
1141
|
+
const { hwpxToProfile } = await import("./-3JIHF2AL.js");
|
|
1142
1142
|
const profile = await hwpxToProfile(buffer);
|
|
1143
1143
|
await mkdir3(dirname4(out), { recursive: true });
|
|
1144
1144
|
await writeOutputFile(out, JSON.stringify(profile, null, 2));
|
|
@@ -1245,7 +1245,7 @@ function registerGenerateTools(server2) {
|
|
|
1245
1245
|
}
|
|
1246
1246
|
let profile;
|
|
1247
1247
|
if (profile_path) {
|
|
1248
|
-
const { parseFormatProfileJson } = await import("./profile-io-
|
|
1248
|
+
const { parseFormatProfileJson } = await import("./profile-io-ZVNMDLLS.js");
|
|
1249
1249
|
profile = parseFormatProfileJson(await readFile3(safePath(profile_path, PROFILE_EXTENSIONS), "utf-8"));
|
|
1250
1250
|
}
|
|
1251
1251
|
const out = safeOutputPath(output_path, /* @__PURE__ */ new Set([".hwpx"]));
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ALL_OCR_MODELS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-56ZWAREM.js";
|
|
5
5
|
import {
|
|
6
6
|
ALL_FORMULA_MODELS,
|
|
7
7
|
getModelStatusIn,
|
|
8
8
|
getModelsDir
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-JK7N4R4K.js";
|
|
10
|
+
import "./chunk-I2TBI7PN.js";
|
|
11
|
+
import "./chunk-OKHKEYTL.js";
|
|
12
12
|
|
|
13
13
|
// src/shared/model-bundle.ts
|
|
14
14
|
import { copyFile, mkdir } from "fs/promises";
|
|
@@ -101,4 +101,4 @@ export {
|
|
|
101
101
|
importModels,
|
|
102
102
|
modelCacheStatus
|
|
103
103
|
};
|
|
104
|
-
//# sourceMappingURL=model-bundle-
|
|
104
|
+
//# sourceMappingURL=model-bundle-NGTKULP7.js.map
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
ocrModelPath,
|
|
11
11
|
ocrModelsCached,
|
|
12
12
|
parseCharacterDict
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-56ZWAREM.js";
|
|
14
|
+
import "./chunk-JK7N4R4K.js";
|
|
15
|
+
import "./chunk-I2TBI7PN.js";
|
|
16
|
+
import "./chunk-OKHKEYTL.js";
|
|
17
17
|
export {
|
|
18
18
|
ALL_OCR_MODELS,
|
|
19
19
|
OCR_DET_MODEL,
|
|
@@ -26,4 +26,4 @@ export {
|
|
|
26
26
|
ocrModelsCached,
|
|
27
27
|
parseCharacterDict
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=models-
|
|
29
|
+
//# sourceMappingURL=models-QOSU5SYL.js.map
|
|
@@ -50,15 +50,15 @@ import {
|
|
|
50
50
|
startsNewItem,
|
|
51
51
|
trimTrailingEmptyTableCols,
|
|
52
52
|
wrapJoiner
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-EUCBMW6C.js";
|
|
54
54
|
import {
|
|
55
55
|
ocrModelsCached
|
|
56
|
-
} from "./chunk-
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
56
|
+
} from "./chunk-56ZWAREM.js";
|
|
57
|
+
import "./chunk-JK7N4R4K.js";
|
|
58
|
+
import "./chunk-I2TBI7PN.js";
|
|
59
59
|
import {
|
|
60
60
|
blocksToPages
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-VO22VAR3.js";
|
|
62
62
|
import {
|
|
63
63
|
encodePng
|
|
64
64
|
} from "./chunk-7FCNOKOR.js";
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
escapeLiteralTags,
|
|
70
70
|
stripScriptTags,
|
|
71
71
|
unframeLayoutTables
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-AOVMOCTK.js";
|
|
73
73
|
import {
|
|
74
74
|
hasRequestedPagesAfter,
|
|
75
75
|
parsePageRange
|
|
@@ -79,11 +79,11 @@ import {
|
|
|
79
79
|
assignTableIds,
|
|
80
80
|
blocksToMarkdown,
|
|
81
81
|
escapeLiteralDollar
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-B4R443MV.js";
|
|
83
83
|
import {
|
|
84
84
|
KordocError,
|
|
85
85
|
sanitizeHref
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-OKHKEYTL.js";
|
|
87
87
|
|
|
88
88
|
// src/pdf/ocr-region-merge.ts
|
|
89
89
|
function mergeOcrImageRegions(blocks, page, regions, ocrBlocks) {
|
|
@@ -3047,7 +3047,7 @@ function mergeLinkRuns(markdown) {
|
|
|
3047
3047
|
|
|
3048
3048
|
// src/pdf/formula-ocr.ts
|
|
3049
3049
|
async function applyFormulaOcr(buffer, blocks, pageFilter, effectivePageCount, warnings, _onProgress) {
|
|
3050
|
-
const formulaMod = await import("./formula-
|
|
3050
|
+
const formulaMod = await import("./formula-RSTTP626.js");
|
|
3051
3051
|
const { FormulaPipeline, ensureFormulaModels } = formulaMod;
|
|
3052
3052
|
await ensureFormulaModels((p) => {
|
|
3053
3053
|
if (p.phase === "download" && p.total) {
|
|
@@ -3468,7 +3468,7 @@ async function parsePdfDocument(buffer, options) {
|
|
|
3468
3468
|
}
|
|
3469
3469
|
if (targets.size > 0) {
|
|
3470
3470
|
try {
|
|
3471
|
-
const { runPdfOcr } = await import("./pdf-ocr-
|
|
3471
|
+
const { runPdfOcr } = await import("./pdf-ocr-R3VGX6F2.js");
|
|
3472
3472
|
const mode = typeof options?.ocr === "function" ? options.ocr : "builtin";
|
|
3473
3473
|
const regionPages = new Map([...ocrRegions].filter(([p]) => options?.ocr !== "force" && !isImageBased && !pageQuality.find((q) => q.page === p)?.needsOcr));
|
|
3474
3474
|
const ocrPageBlocks = await runPdfOcr(ocrBuffer, targets, mode, warnings, options?.onProgress, options?.tables !== false, vectorPageOps, regionPages);
|
|
@@ -3706,4 +3706,4 @@ export {
|
|
|
3706
3706
|
parsePdfDocument,
|
|
3707
3707
|
removeHeaderFooterBlocks
|
|
3708
3708
|
};
|
|
3709
|
-
//# sourceMappingURL=parser-
|
|
3709
|
+
//# sourceMappingURL=parser-3G4G6SST.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
blocksToPages,
|
|
3
3
|
encodePng
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-U6AJU2VD.js";
|
|
5
5
|
import {
|
|
6
6
|
hasRequestedPagesAfter,
|
|
7
7
|
parsePageRange
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
startsNewItem,
|
|
59
59
|
trimTrailingEmptyTableCols,
|
|
60
60
|
wrapJoiner
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-R2JM2HOJ.js";
|
|
62
62
|
import {
|
|
63
63
|
CELL_EDGES,
|
|
64
64
|
CELL_PAGES,
|
|
@@ -70,12 +70,12 @@ import {
|
|
|
70
70
|
escapeLiteralTags,
|
|
71
71
|
stripScriptTags,
|
|
72
72
|
unframeLayoutTables
|
|
73
|
-
} from "./chunk-
|
|
74
|
-
import "./chunk-
|
|
73
|
+
} from "./chunk-AKSCTGKG.js";
|
|
74
|
+
import "./chunk-GNUGD4RO.js";
|
|
75
75
|
import {
|
|
76
76
|
KordocError,
|
|
77
77
|
sanitizeHref
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-J75TVRJB.js";
|
|
79
79
|
|
|
80
80
|
// src/pdf/ocr-region-merge.ts
|
|
81
81
|
function mergeOcrImageRegions(blocks, page, regions, ocrBlocks) {
|
|
@@ -3039,7 +3039,7 @@ function mergeLinkRuns(markdown) {
|
|
|
3039
3039
|
|
|
3040
3040
|
// src/pdf/formula-ocr.ts
|
|
3041
3041
|
async function applyFormulaOcr(buffer, blocks, pageFilter, effectivePageCount, warnings, _onProgress) {
|
|
3042
|
-
const formulaMod = await import("./formula-
|
|
3042
|
+
const formulaMod = await import("./formula-STIFIS57.js");
|
|
3043
3043
|
const { FormulaPipeline, ensureFormulaModels } = formulaMod;
|
|
3044
3044
|
await ensureFormulaModels((p) => {
|
|
3045
3045
|
if (p.phase === "download" && p.total) {
|
|
@@ -3460,7 +3460,7 @@ async function parsePdfDocument(buffer, options) {
|
|
|
3460
3460
|
}
|
|
3461
3461
|
if (targets.size > 0) {
|
|
3462
3462
|
try {
|
|
3463
|
-
const { runPdfOcr } = await import("./pdf-ocr-
|
|
3463
|
+
const { runPdfOcr } = await import("./pdf-ocr-DAXS5RX4.js");
|
|
3464
3464
|
const mode = typeof options?.ocr === "function" ? options.ocr : "builtin";
|
|
3465
3465
|
const regionPages = new Map([...ocrRegions].filter(([p]) => options?.ocr !== "force" && !isImageBased && !pageQuality.find((q) => q.page === p)?.needsOcr));
|
|
3466
3466
|
const ocrPageBlocks = await runPdfOcr(ocrBuffer, targets, mode, warnings, options?.onProgress, options?.tables !== false, vectorPageOps, regionPages);
|
|
@@ -3698,4 +3698,4 @@ export {
|
|
|
3698
3698
|
parsePdfDocument,
|
|
3699
3699
|
removeHeaderFooterBlocks
|
|
3700
3700
|
};
|
|
3701
|
-
//# sourceMappingURL=parser-
|
|
3701
|
+
//# sourceMappingURL=parser-5GUEP6EK.js.map
|