kordoc 4.12.1 → 4.12.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 +11 -0
- package/dist/{-BUYIUNW3.js → -EZH6NKTE.js} +8 -8
- package/dist/{chunk-WGUVKNBX.js → chunk-2B7OIEJJ.js} +6 -3
- package/dist/chunk-2B7OIEJJ.js.map +1 -0
- package/dist/{chunk-CJPVVR2Y.js → chunk-2HBYWA5X.js} +2 -2
- package/dist/{chunk-EOGPRO3U.cjs → chunk-2LKYJ4G3.cjs} +6 -6
- package/dist/{chunk-EOGPRO3U.cjs.map → chunk-2LKYJ4G3.cjs.map} +1 -1
- package/dist/{chunk-FNCBOTM5.js → chunk-2LO525TL.js} +2 -2
- package/dist/{chunk-WJOWM27X.cjs → chunk-2LPBIW2B.cjs} +3 -3
- package/dist/{chunk-WJOWM27X.cjs.map → chunk-2LPBIW2B.cjs.map} +1 -1
- package/dist/{chunk-6MF7JRG3.cjs → chunk-62IU4NV3.cjs} +2 -2
- package/dist/{chunk-6MF7JRG3.cjs.map → chunk-62IU4NV3.cjs.map} +1 -1
- package/dist/{chunk-BPKJTQAW.js → chunk-7XUXSDH5.js} +89 -25
- package/dist/chunk-7XUXSDH5.js.map +1 -0
- package/dist/{chunk-ST3JBCIL.js → chunk-DBGEUDBY.js} +2 -2
- package/dist/{chunk-E37VAV46.js → chunk-FBLMVHDK.js} +2 -2
- package/dist/{chunk-EWSH6O6S.js → chunk-FVBR7SC3.js} +2 -2
- package/dist/{chunk-F2KL5Z5T.js → chunk-IOJX4Q63.js} +3 -3
- package/dist/{chunk-L5DNHSX4.js → chunk-JCMBQC5N.js} +2 -2
- package/dist/{chunk-JD4H6Y33.js → chunk-KX7IYCCZ.js} +3 -3
- package/dist/{chunk-VO37BVAH.js → chunk-LD2K4K5V.js} +40 -19
- package/dist/chunk-LD2K4K5V.js.map +1 -0
- package/dist/{chunk-D2XNLIFU.js → chunk-MUYU4JI5.js} +2 -2
- package/dist/{chunk-OS2IOI3W.js → chunk-OEYECZGV.js} +89 -25
- package/dist/chunk-OEYECZGV.js.map +1 -0
- package/dist/{chunk-MXZXZTKW.cjs → chunk-ONNAHSPV.cjs} +104 -40
- package/dist/chunk-ONNAHSPV.cjs.map +1 -0
- package/dist/{chunk-JQBF4PSF.js → chunk-Q6ETEJFK.js} +6 -3
- package/dist/chunk-Q6ETEJFK.js.map +1 -0
- package/dist/{chunk-ELCPCTJ6.js → chunk-QBCMFNHS.js} +2 -2
- package/dist/{chunk-DXKNPBXX.js → chunk-QM2RSJ2S.js} +3 -3
- package/dist/{chunk-L6FIUSD2.js → chunk-UL2MDA5C.js} +3 -3
- package/dist/{chunk-CBPO5IZZ.cjs → chunk-V5BUPZ6I.cjs} +20 -17
- package/dist/chunk-V5BUPZ6I.cjs.map +1 -0
- package/dist/{chunk-7U34YNFR.js → chunk-XXDZ2KTW.js} +2 -2
- package/dist/chunks-TT7ZE5QQ.js +10 -0
- package/dist/cli.js +20 -20
- package/dist/{formula-7TN26AKF.js → formula-6RQX4NMJ.js} +4 -4
- package/dist/{formula-XKRMKGAW.cjs → formula-NBEO6CFC.cjs} +9 -9
- package/dist/{formula-XKRMKGAW.cjs.map → formula-NBEO6CFC.cjs.map} +1 -1
- package/dist/{formula-RZNSECGO.js → formula-NW33S4TA.js} +3 -3
- package/dist/{image-ocr-3O34O7XS.js → image-ocr-CAVU2TNZ.js} +5 -5
- package/dist/{image-ocr-TNU4ILLU.js → image-ocr-SO56VETS.js} +7 -7
- package/dist/{image-ocr-XDZONLD6.cjs → image-ocr-V4KY373B.cjs} +11 -11
- package/dist/{image-ocr-XDZONLD6.cjs.map → image-ocr-V4KY373B.cjs.map} +1 -1
- package/dist/index.cjs +419 -398
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +36 -15
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +15 -15
- package/dist/{model-bundle-NCYN375I.js → model-bundle-EIJF34DR.js} +5 -5
- package/dist/{models-J4G4VZMU.js → models-6V4CPQXC.js} +5 -5
- package/dist/{parser-6IH62P6U.js → parser-GIREMEPD.js} +6 -6
- package/dist/{parser-5WZBCP7H.js → parser-OBHNXEQM.js} +6 -6
- package/dist/{parser-LVMTVO2N.cjs → parser-OMT25WH2.cjs} +26 -26
- package/dist/{parser-LVMTVO2N.cjs.map → parser-OMT25WH2.cjs.map} +1 -1
- package/dist/pdf-ocr-IRXQ5GBM.js +13 -0
- package/dist/pdf-ocr-SL4GCOGS.js +16 -0
- package/dist/pdf-ocr-TFYVK4FI.cjs +14 -0
- package/dist/{pdf-ocr-IAO273AQ.cjs.map → pdf-ocr-TFYVK4FI.cjs.map} +1 -1
- package/dist/{profile-io-ANPS7DTT.js → profile-io-PZVMM66V.js} +3 -3
- package/dist/{rasterize-FKXCEFHV.js → rasterize-NRWP2C6L.js} +2 -2
- package/dist/render-V5ZPTZQ7.js +10 -0
- package/dist/seal-LVG2DGAB.js +10 -0
- package/dist/{setup-DEAFODGI.js → setup-V55AJP6H.js} +3 -3
- package/dist/{watch-B5X7IAMK.js → watch-7CQSMDDP.js} +9 -9
- package/package.json +1 -1
- package/dist/chunk-BPKJTQAW.js.map +0 -1
- package/dist/chunk-CBPO5IZZ.cjs.map +0 -1
- package/dist/chunk-JQBF4PSF.js.map +0 -1
- package/dist/chunk-MXZXZTKW.cjs.map +0 -1
- package/dist/chunk-OS2IOI3W.js.map +0 -1
- package/dist/chunk-VO37BVAH.js.map +0 -1
- package/dist/chunk-WGUVKNBX.js.map +0 -1
- package/dist/chunks-G2U2XUZU.js +0 -10
- package/dist/pdf-ocr-5PLJOKGI.js +0 -13
- package/dist/pdf-ocr-7FPCZCV7.js +0 -16
- package/dist/pdf-ocr-IAO273AQ.cjs +0 -14
- package/dist/render-NWQI3AXU.js +0 -10
- package/dist/seal-N3GCBTVA.js +0 -10
- /package/dist/{-BUYIUNW3.js.map → -EZH6NKTE.js.map} +0 -0
- /package/dist/{chunk-CJPVVR2Y.js.map → chunk-2HBYWA5X.js.map} +0 -0
- /package/dist/{chunk-FNCBOTM5.js.map → chunk-2LO525TL.js.map} +0 -0
- /package/dist/{chunk-ST3JBCIL.js.map → chunk-DBGEUDBY.js.map} +0 -0
- /package/dist/{chunk-E37VAV46.js.map → chunk-FBLMVHDK.js.map} +0 -0
- /package/dist/{chunk-EWSH6O6S.js.map → chunk-FVBR7SC3.js.map} +0 -0
- /package/dist/{chunk-F2KL5Z5T.js.map → chunk-IOJX4Q63.js.map} +0 -0
- /package/dist/{chunk-L5DNHSX4.js.map → chunk-JCMBQC5N.js.map} +0 -0
- /package/dist/{chunk-JD4H6Y33.js.map → chunk-KX7IYCCZ.js.map} +0 -0
- /package/dist/{chunk-D2XNLIFU.js.map → chunk-MUYU4JI5.js.map} +0 -0
- /package/dist/{chunk-ELCPCTJ6.js.map → chunk-QBCMFNHS.js.map} +0 -0
- /package/dist/{chunk-DXKNPBXX.js.map → chunk-QM2RSJ2S.js.map} +0 -0
- /package/dist/{chunk-L6FIUSD2.js.map → chunk-UL2MDA5C.js.map} +0 -0
- /package/dist/{chunk-7U34YNFR.js.map → chunk-XXDZ2KTW.js.map} +0 -0
- /package/dist/{chunks-G2U2XUZU.js.map → chunks-TT7ZE5QQ.js.map} +0 -0
- /package/dist/{formula-7TN26AKF.js.map → formula-6RQX4NMJ.js.map} +0 -0
- /package/dist/{formula-RZNSECGO.js.map → formula-NW33S4TA.js.map} +0 -0
- /package/dist/{image-ocr-3O34O7XS.js.map → image-ocr-CAVU2TNZ.js.map} +0 -0
- /package/dist/{image-ocr-TNU4ILLU.js.map → image-ocr-SO56VETS.js.map} +0 -0
- /package/dist/{model-bundle-NCYN375I.js.map → model-bundle-EIJF34DR.js.map} +0 -0
- /package/dist/{models-J4G4VZMU.js.map → models-6V4CPQXC.js.map} +0 -0
- /package/dist/{parser-6IH62P6U.js.map → parser-GIREMEPD.js.map} +0 -0
- /package/dist/{parser-5WZBCP7H.js.map → parser-OBHNXEQM.js.map} +0 -0
- /package/dist/{pdf-ocr-5PLJOKGI.js.map → pdf-ocr-IRXQ5GBM.js.map} +0 -0
- /package/dist/{pdf-ocr-7FPCZCV7.js.map → pdf-ocr-SL4GCOGS.js.map} +0 -0
- /package/dist/{profile-io-ANPS7DTT.js.map → profile-io-PZVMM66V.js.map} +0 -0
- /package/dist/{rasterize-FKXCEFHV.js.map → rasterize-NRWP2C6L.js.map} +0 -0
- /package/dist/{render-NWQI3AXU.js.map → render-V5ZPTZQ7.js.map} +0 -0
- /package/dist/{seal-N3GCBTVA.js.map → seal-LVG2DGAB.js.map} +0 -0
- /package/dist/{setup-DEAFODGI.js.map → setup-V55AJP6H.js.map} +0 -0
- /package/dist/{watch-B5X7IAMK.js.map → watch-7CQSMDDP.js.map} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
safeMax,
|
|
8
8
|
safeMin
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MUYU4JI5.js";
|
|
10
10
|
|
|
11
11
|
// src/pdf/image-regions.ts
|
|
12
12
|
import { OPS } from "pdfjs-dist/legacy/build/pdf.mjs";
|
|
@@ -1009,8 +1009,14 @@ function edgeStroked(lines, dir, pos, a1, a2) {
|
|
|
1009
1009
|
}
|
|
1010
1010
|
function buildClipCellGrids(rects, strokedH, strokedV, pageWidth, pageHeight) {
|
|
1011
1011
|
const pageArea = pageWidth * pageHeight;
|
|
1012
|
-
const
|
|
1013
|
-
|
|
1012
|
+
const sameRect = (a, b) => Math.abs(a.x1 - b.x1) <= CLIP_EDGE_TOL && Math.abs(a.x2 - b.x2) <= CLIP_EDGE_TOL && Math.abs(a.y1 - b.y1) <= CLIP_EDGE_TOL && Math.abs(a.y2 - b.y2) <= CLIP_EDGE_TOL;
|
|
1013
|
+
const cells = [];
|
|
1014
|
+
for (const r of rects) {
|
|
1015
|
+
if (r.x2 - r.x1 < CLIP_MIN_W2 || r.y2 - r.y1 < CLIP_MIN_H2) continue;
|
|
1016
|
+
if (pageArea > 0 && (r.x2 - r.x1) * (r.y2 - r.y1) >= pageArea * CLIP_MAX_PAGE_FRAC) continue;
|
|
1017
|
+
if (!cells.some((c) => sameRect(c, r))) cells.push(r);
|
|
1018
|
+
}
|
|
1019
|
+
if (cells.length < 1) return { grids: [], containers: [] };
|
|
1014
1020
|
const parent = new Array(cells.length).fill(-1);
|
|
1015
1021
|
for (let i = 0; i < cells.length; i++) {
|
|
1016
1022
|
for (let j = 0; j < cells.length; j++) {
|
|
@@ -1045,15 +1051,30 @@ function buildClipCellGrids(rects, strokedH, strokedV, pageWidth, pageHeight) {
|
|
|
1045
1051
|
if (g) g.push(i);
|
|
1046
1052
|
else groups.set(r, [i]);
|
|
1047
1053
|
}
|
|
1048
|
-
const containers = [];
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
+
const containers = cells.filter((_, i) => isContainer[i]);
|
|
1055
|
+
const groupSize = (i) => groups.get(find(i))?.length ?? 0;
|
|
1056
|
+
const isGridMember = (i) => groupSize(i) >= CLIP_MIN_GROUP;
|
|
1057
|
+
const framed = (r) => edgeStroked(strokedH, "h", r.y1, r.x1, r.x2) && edgeStroked(strokedH, "h", r.y2, r.x1, r.x2) && edgeStroked(strokedV, "v", r.x1, r.y1, r.y2) && edgeStroked(strokedV, "v", r.x2, r.y1, r.y2);
|
|
1058
|
+
const loneFrame = (i) => isContainer[i] && !isGridMember(i) && framed(cells[i]);
|
|
1059
|
+
const parentAttachable = (i) => parent[i] >= 0 && (isGridMember(parent[i]) || loneFrame(parent[i]));
|
|
1060
|
+
const onlyChild = (i) => parent[i] >= 0 && parent.filter((p) => p === parent[i]).length === 1;
|
|
1054
1061
|
const grids = [];
|
|
1055
1062
|
for (const idxs of groups.values()) {
|
|
1056
|
-
|
|
1063
|
+
const first = idxs[0];
|
|
1064
|
+
const parentRect = parentAttachable(first) ? cells[parent[first]] : void 0;
|
|
1065
|
+
if (idxs.length < CLIP_MIN_GROUP) {
|
|
1066
|
+
if (!loneFrame(first) && !((parentRect || onlyChild(first)) && framed(cells[first]))) continue;
|
|
1067
|
+
const r = cells[first];
|
|
1068
|
+
grids.push({
|
|
1069
|
+
rowYs: [r.y2, r.y1],
|
|
1070
|
+
colXs: [r.x1, r.x2],
|
|
1071
|
+
bbox: { x1: r.x1, y1: r.y1, x2: r.x2, y2: r.y2 },
|
|
1072
|
+
vertexRadius: 1,
|
|
1073
|
+
cells: [{ row: 0, col: 0, rowSpan: 1, colSpan: 1, bbox: { x1: r.x1, y1: r.y1, x2: r.x2, y2: r.y2 } }],
|
|
1074
|
+
...parentRect ? { clipParent: parentRect } : {}
|
|
1075
|
+
});
|
|
1076
|
+
continue;
|
|
1077
|
+
}
|
|
1057
1078
|
const members = idxs.map((i) => cells[i]);
|
|
1058
1079
|
let edges = 0, invisible = 0;
|
|
1059
1080
|
for (const r of members) {
|
|
@@ -1094,7 +1115,8 @@ function buildClipCellGrids(rects, strokedH, strokedV, pageWidth, pageHeight) {
|
|
|
1094
1115
|
colXs,
|
|
1095
1116
|
bbox: { x1: colXs[0], y1: rowYs[numRows], x2: colXs[numCols], y2: rowYs[0] },
|
|
1096
1117
|
vertexRadius: 1,
|
|
1097
|
-
cells: out
|
|
1118
|
+
cells: out,
|
|
1119
|
+
...parentRect ? { clipParent: parentRect } : {}
|
|
1098
1120
|
});
|
|
1099
1121
|
}
|
|
1100
1122
|
return { grids, containers };
|
|
@@ -3463,9 +3485,47 @@ function isProseBoxGrid(grid, verticals, table) {
|
|
|
3463
3485
|
if (longCells < PROSEBOX_LONG_CELL_MIN || longCells < texts.length * PROSEBOX_LONG_CELL_RATIO) return false;
|
|
3464
3486
|
return true;
|
|
3465
3487
|
}
|
|
3488
|
+
function cleanCellText(text) {
|
|
3489
|
+
const stripped = text.replace(/^[\s]*[-–—]\s*\d+\s*[-–—][\s]*$/gm, "").trim();
|
|
3490
|
+
return stripped.split("\n").map((line) => collapseEvenSpacing(line)).join("\n");
|
|
3491
|
+
}
|
|
3492
|
+
var FRAME_RECT_TOL = 1.5;
|
|
3493
|
+
function takePendingNested(pending, cellBox) {
|
|
3494
|
+
const out = [];
|
|
3495
|
+
for (let i = pending.length - 1; i >= 0; i--) {
|
|
3496
|
+
const p = pending[i].parent;
|
|
3497
|
+
if (Math.abs(p.x1 - cellBox.x1) <= FRAME_RECT_TOL && Math.abs(p.x2 - cellBox.x2) <= FRAME_RECT_TOL && Math.abs(p.y1 - cellBox.y1) <= FRAME_RECT_TOL && Math.abs(p.y2 - cellBox.y2) <= FRAME_RECT_TOL) {
|
|
3498
|
+
out.push(pending[i].block);
|
|
3499
|
+
pending.splice(i, 1);
|
|
3500
|
+
}
|
|
3501
|
+
}
|
|
3502
|
+
return out;
|
|
3503
|
+
}
|
|
3504
|
+
function buildFrameCellBlocks(cellItems, nested, pageNum) {
|
|
3505
|
+
const tables = [...nested].sort((a, b) => b.bbox.y + b.bbox.height - (a.bbox.y + a.bbox.height));
|
|
3506
|
+
const blocks = [];
|
|
3507
|
+
let rest = [...cellItems];
|
|
3508
|
+
const pushParagraphs = (items) => {
|
|
3509
|
+
if (items.length === 0) return;
|
|
3510
|
+
for (const line of cleanCellText(cellTextToString(items)).split("\n")) {
|
|
3511
|
+
const t = line.trim();
|
|
3512
|
+
if (t) blocks.push({ type: "paragraph", text: t, pageNumber: pageNum });
|
|
3513
|
+
}
|
|
3514
|
+
};
|
|
3515
|
+
for (const tb of tables) {
|
|
3516
|
+
const bottom = tb.bbox.y;
|
|
3517
|
+
pushParagraphs(rest.filter((it) => it.y >= bottom));
|
|
3518
|
+
rest = rest.filter((it) => it.y < bottom);
|
|
3519
|
+
blocks.push(tb);
|
|
3520
|
+
}
|
|
3521
|
+
pushParagraphs(rest);
|
|
3522
|
+
const text = blocks.map((b) => b.type === "table" && b.table ? b.table.cells.flat().map((c) => c.text).filter(Boolean).join("\n") : b.text ?? "").filter(Boolean).join("\n");
|
|
3523
|
+
return { blocks, text };
|
|
3524
|
+
}
|
|
3466
3525
|
function extractBlocksWithGrids(items, pageNum, grids, horizontals, verticals) {
|
|
3467
3526
|
const blocks = [];
|
|
3468
3527
|
const usedItems = /* @__PURE__ */ new Set();
|
|
3528
|
+
const pendingNested = [];
|
|
3469
3529
|
const gridArea = (g) => (g.bbox.x2 - g.bbox.x1) * (g.bbox.y2 - g.bbox.y1);
|
|
3470
3530
|
const sortedGrids = [...grids].sort((a, b) => (b.cells ? 1 : 0) - (a.cells ? 1 : 0) || (a.cells && b.cells ? gridArea(a) - gridArea(b) : 0) || b.bbox.y2 - a.bbox.y2);
|
|
3471
3531
|
for (const grid of sortedGrids) {
|
|
@@ -3505,13 +3565,18 @@ function extractBlocksWithGrids(items, pageNum, grids, horizontals, verticals) {
|
|
|
3505
3565
|
{ length: numRows },
|
|
3506
3566
|
() => Array.from({ length: numCols }, () => ({ text: "", colSpan: 1, rowSpan: 1 }))
|
|
3507
3567
|
);
|
|
3568
|
+
let nestedAttached = false;
|
|
3508
3569
|
for (const cell of cells) {
|
|
3509
3570
|
const cellItems = cellTextMap.get(cell) || [];
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3571
|
+
const nested = grid.cells ? takePendingNested(pendingNested, cell.bbox) : [];
|
|
3572
|
+
if (nested.length > 0) {
|
|
3573
|
+
nestedAttached = true;
|
|
3574
|
+
const built = buildFrameCellBlocks(cellItems, nested, pageNum);
|
|
3575
|
+
irGrid[cell.row][cell.col] = { text: built.text, colSpan: cell.colSpan, rowSpan: cell.rowSpan, blocks: built.blocks };
|
|
3576
|
+
continue;
|
|
3577
|
+
}
|
|
3513
3578
|
irGrid[cell.row][cell.col] = {
|
|
3514
|
-
text,
|
|
3579
|
+
text: cleanCellText(cellTextToString(cellItems)),
|
|
3515
3580
|
colSpan: cell.colSpan,
|
|
3516
3581
|
rowSpan: cell.rowSpan
|
|
3517
3582
|
};
|
|
@@ -3519,18 +3584,11 @@ function extractBlocksWithGrids(items, pageNum, grids, horizontals, verticals) {
|
|
|
3519
3584
|
let finalGrid = irGrid;
|
|
3520
3585
|
let finalRows = numRows;
|
|
3521
3586
|
let rebuiltUsed = false;
|
|
3522
|
-
if (numRows <= 2 && numCols >= 3) {
|
|
3587
|
+
if (numRows <= 2 && numCols >= 3 && !nestedAttached) {
|
|
3523
3588
|
const rebuilt = normalizeUndersegmentedTable(irGrid, grid.colXs, textItems);
|
|
3524
3589
|
if (rebuilt) {
|
|
3525
3590
|
rebuiltUsed = true;
|
|
3526
|
-
finalGrid = rebuilt.map((row) => row.map((rawText) => {
|
|
3527
|
-
const cleaned = rawText.replace(/^[\s]*[-–—]\s*\d+\s*[-–—][\s]*$/gm, "").trim();
|
|
3528
|
-
return {
|
|
3529
|
-
text: cleaned.split("\n").map((line) => collapseEvenSpacing(line)).join("\n"),
|
|
3530
|
-
colSpan: 1,
|
|
3531
|
-
rowSpan: 1
|
|
3532
|
-
};
|
|
3533
|
-
}));
|
|
3591
|
+
finalGrid = rebuilt.map((row) => row.map((rawText) => ({ text: cleanCellText(rawText), colSpan: 1, rowSpan: 1 })));
|
|
3534
3592
|
finalRows = finalGrid.length;
|
|
3535
3593
|
}
|
|
3536
3594
|
}
|
|
@@ -3547,6 +3605,11 @@ function extractBlocksWithGrids(items, pageNum, grids, horizontals, verticals) {
|
|
|
3547
3605
|
};
|
|
3548
3606
|
const hasContent = finalGrid.some((row) => row.some((cell) => cell.text.trim() !== ""));
|
|
3549
3607
|
if (!hasContent) continue;
|
|
3608
|
+
if (grid.clipParent) {
|
|
3609
|
+
const nb = { page: pageNum, x: grid.bbox.x1, y: grid.bbox.y1, width: grid.bbox.x2 - grid.bbox.x1, height: grid.bbox.y2 - grid.bbox.y1 };
|
|
3610
|
+
pendingNested.push({ parent: grid.clipParent, block: { type: "table", table: irTable, pageNumber: pageNum, bbox: nb } });
|
|
3611
|
+
continue;
|
|
3612
|
+
}
|
|
3550
3613
|
if (!grid.cells && isProseBoxGrid(grid, verticals, irTable)) {
|
|
3551
3614
|
for (const it of tableItems) usedItems.delete(it);
|
|
3552
3615
|
continue;
|
|
@@ -3568,6 +3631,7 @@ function extractBlocksWithGrids(items, pageNum, grids, horizontals, verticals) {
|
|
|
3568
3631
|
}
|
|
3569
3632
|
blocks.push({ type: "table", table: irTable, pageNumber: pageNum, bbox: tableBbox });
|
|
3570
3633
|
}
|
|
3634
|
+
for (const p of pendingNested) blocks.push(p.block);
|
|
3571
3635
|
let remaining = items.filter((i) => !usedItems.has(i));
|
|
3572
3636
|
const groupSizes = [];
|
|
3573
3637
|
let finalTextBlocks = [];
|
|
@@ -3877,4 +3941,4 @@ export {
|
|
|
3877
3941
|
extractPageBlocksWithLines,
|
|
3878
3942
|
mergeCrossPageTables
|
|
3879
3943
|
};
|
|
3880
|
-
//# sourceMappingURL=chunk-
|
|
3944
|
+
//# sourceMappingURL=chunk-7XUXSDH5.js.map
|