@claritylabs/cl-sdk 3.2.4 → 3.2.5
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/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5208,10 +5208,13 @@ function isTableCellSpan(span) {
|
|
|
5208
5208
|
}
|
|
5209
5209
|
function isOperationalEvidenceAnchor(span) {
|
|
5210
5210
|
const sourceUnit3 = spanSourceUnit(span);
|
|
5211
|
-
if (sourceUnit3 === "
|
|
5211
|
+
if (sourceUnit3 === "table_cell") return false;
|
|
5212
5212
|
if (sourceUnit3 === "table" || sourceUnit3 === "table_row") return true;
|
|
5213
5213
|
const text = cleanText([span.text, span.formNumber].filter(Boolean).join(" "), "");
|
|
5214
5214
|
if (!text) return false;
|
|
5215
|
+
if (sourceUnit3 === "page") {
|
|
5216
|
+
return hasSubstantiveDeclarationsScheduleText(text) || /\b(declarations?|named insured|policy number|policy period|effective date|expiration date|premium|total due|producer)\b/i.test(text);
|
|
5217
|
+
}
|
|
5215
5218
|
if (/\bitem\s+\d+\.?\s*(?:named insured|policy number|policy period|renewal|form of business|coverage parts?|premium|extended reporting|producer|forms? and endorsements?)\b/i.test(text)) return true;
|
|
5216
5219
|
if (/\b(policy\s*(number|period)|effective date|expiration date|expiry date|named insured|insurer|carrier|broker|producer|premium|total due)\b/i.test(text)) return true;
|
|
5217
5220
|
if (/\b(coverage part|forms? and endorsements?|attached at inception|endorsement\s+(?:no\.?|number|#)?\s*[A-Z0-9])\b/i.test(text)) return true;
|
|
@@ -5268,7 +5271,7 @@ function operationalProfileEvidence(sourceTree, sourceSpans) {
|
|
|
5268
5271
|
});
|
|
5269
5272
|
const detailEntries = entries.filter((entry) => entry.sourceUnit !== "page");
|
|
5270
5273
|
const pageEntries = entries.filter((entry) => entry.sourceUnit === "page");
|
|
5271
|
-
return
|
|
5274
|
+
return [...detailEntries, ...pageEntries].slice(0, 180);
|
|
5272
5275
|
}
|
|
5273
5276
|
function sourceTreeRootId(sourceTree) {
|
|
5274
5277
|
return sourceTree.find((node) => node.kind === "document")?.id;
|