@xberg-io/xberg-wasm 1.2.5 → 1.2.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xberg-io/xberg-wasm",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "private": false,
5
5
  "description": "High-performance document intelligence library",
6
6
  "license": "MIT",
@@ -2,7 +2,7 @@
2
2
  "name": "xberg-wasm",
3
3
  "type": "module",
4
4
  "description": "High-performance document intelligence library",
5
- "version": "1.2.5",
5
+ "version": "1.2.6",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
@@ -10,6 +10,8 @@ export interface WasmPdfMetadataCamelWire {
10
10
  pageCount: number | undefined;
11
11
  scannedConfidence: number | undefined;
12
12
  scannedPages: number[] | undefined;
13
+ fabricatedTextPages: number[] | undefined;
14
+ implausibleTextPages: number[] | undefined;
13
15
  layoutGatedPages: number[] | undefined;
14
16
  layoutGateReasons: string[] | undefined;
15
17
  }
@@ -2491,11 +2493,21 @@ export class WasmExtractionConfig {
2491
2493
  * For text-only extractions (no OCR, no image extraction), skipping image
2492
2494
  * decompression can improve CPU utilization by 5-10% by avoiding wasteful
2493
2495
  * image I/O and processing when results won't be used.
2494
- * Returns `true` when image binary data should be extracted.
2496
+ * Returns `true` when a CONTAINER document (DOCX, PPT, PPTX, HTML, ...) needs
2497
+ * to read an embedded image's binary data out of its archive or source.
2495
2498
  *
2496
- * True when `config.images.extract_images` is set, captioning is configured, or QR-code
2497
- * detection is enabled. Captioning and QR-code detection both require image bytes
2498
- * regardless of whether the caller also requested image extraction.
2499
+ * True when `config.images.extract_images` is set, captioning is configured, QR-code
2500
+ * detection is enabled, or embedded images get OCR'd. All four consume the bytes:
2501
+ * captioning and QR-code detection regardless of whether the caller also requested
2502
+ * image extraction, and embedded-image OCR because the OCR path reads the same bytes
2503
+ * the container would otherwise skip (GH#1662): before the OCR disjunct existed, a
2504
+ * container asked this question, was told no, and attached an image with an empty
2505
+ * buffer, which OCR then ran on and reported `Could not determine image format`.
2506
+ *
2507
+ * This governs whether a CONTAINER reads bytes it does not otherwise have. A
2508
+ * standalone image extractor already holds the whole file's bytes regardless of this
2509
+ * answer, so it must not use this method to decide whether to put its OWN bytes in the
2510
+ * result's `images` array; that is `wants_own_bytes_in_result`.
2499
2511
  */
2500
2512
  needsImageData(): boolean;
2501
2513
  /**
@@ -2509,6 +2521,18 @@ export class WasmExtractionConfig {
2509
2521
  */
2510
2522
  needsImageProcessing(): boolean;
2511
2523
  constructor(mimeDetectionPolicy?: WasmMimeDetectionPolicy | null, useCache?: boolean | null, enableQualityProcessing?: boolean | null, forceOcr?: boolean | null, ocrStrategy?: any | null, disableOcr?: boolean | null, resultFormat?: WasmResultFormat | null, outputFormat?: any | null, escapeMarkdown?: boolean | null, tableAnchors?: boolean | null, jupyterCellRendering?: WasmJupyterCellRendering | null, applyNotebookCellTags?: boolean | null, useLayoutForMarkdown?: boolean | null, includeDocumentStructure?: boolean | null, url?: WasmUrlExtractionConfig | null, maxArchiveDepth?: number | null, ocr?: WasmOcrConfig | null, forceOcrPages?: Uint32Array | null, chunking?: WasmChunkingConfig | null, contentFilter?: WasmContentFilterConfig | null, images?: WasmImageExtractionConfig | null, pdfOptions?: WasmPdfConfig | null, tokenReduction?: WasmTokenReductionOptions | null, languageDetection?: WasmLanguageDetectionConfig | null, pages?: WasmPageConfig | null, keywords?: WasmKeywordConfig | null, postprocessor?: WasmPostProcessorConfig | null, htmlOptions?: WasmConversionOptions | null, htmlOutput?: WasmHtmlOutputConfig | null, extractionTimeoutSecs?: bigint | null, maxConcurrentExtractions?: number | null, securityLimits?: WasmSecurityLimits | null, maxEmbeddedFileBytes?: bigint | null, layout?: WasmLayoutDetectionConfig | null, transcription?: WasmTranscriptionConfig | null, acceleration?: WasmAccelerationConfig | null, cacheNamespace?: string | null, cacheTtlSecs?: bigint | null, email?: WasmEmailConfig | null, csv?: WasmCsvConfig | null, geojson?: WasmGeoJsonExtractionConfig | null, concurrency?: WasmConcurrencyConfig | null, structuredExtraction?: WasmStructuredExtractionConfig | null, ner?: WasmNerConfig | null, redaction?: WasmRedactionConfig | null, summarization?: WasmSummarizationConfig | null, translation?: WasmTranslationConfig | null, pageClassification?: WasmPageClassificationConfig | null, chunkClassification?: WasmChunkClassificationConfig | null, captioning?: WasmCaptioningConfig | null, qrCodes?: boolean | null);
2524
+ /**
2525
+ * Whether embedded images get OCR'd.
2526
+ *
2527
+ * This mirrors the condition the pipeline itself uses before it calls
2528
+ * `image_ocr.process_images_with_ocr` (`core/pipeline/mod.rs`), and it is
2529
+ * deliberately the same predicate rather than an equivalent one: when the
2530
+ * two drifted apart, a container extractor asked `needs_image_data` and was
2531
+ * told no, so it attached an image with an empty buffer, and the OCR path
2532
+ * then ran on those zero bytes and reported `Could not determine image
2533
+ * format` (GH#1662).
2534
+ */
2535
+ runsOcrOnEmbeddedImages(): boolean;
2512
2536
  /**
2513
2537
  * Validate the configuration, returning an error if any settings are invalid.
2514
2538
  *
@@ -2538,6 +2562,21 @@ export class WasmExtractionConfig {
2538
2562
  * Returns `XbergError.Validation` describing the first invalid setting found.
2539
2563
  */
2540
2564
  validate(): void;
2565
+ /**
2566
+ * Returns `true` when a standalone image extraction (the whole input document IS
2567
+ * the image, not a container's embedded picture) should attach its own already-read
2568
+ * bytes to the result's `images` array.
2569
+ *
2570
+ * Deliberately narrower than `needs_image_data`: a standalone
2571
+ * image's content is read in full before this question is ever asked, whether or not OCR
2572
+ * runs, so OCR being configured is not by itself a reason to echo those bytes back in the
2573
+ * public output. Using `needs_image_data` here (as `needs_image_data`'s own OCR disjunct
2574
+ * briefly did) would silently start returning every OCR'd standalone image's raw bytes in
2575
+ * `images`, a public output contract change with nothing asking for it. Same three
2576
+ * conditions as before that disjunct existed: explicit image extraction, captioning, or
2577
+ * QR-code detection.
2578
+ */
2579
+ wantsOwnBytesInResult(): boolean;
2541
2580
  get acceleration(): WasmAccelerationConfig | undefined;
2542
2581
  set acceleration(value: WasmAccelerationConfig | null | undefined);
2543
2582
  applyNotebookCellTags: boolean;
@@ -4595,10 +4634,11 @@ export class WasmOcrQualityThresholds {
4595
4634
  free(): void;
4596
4635
  [Symbol.dispose](): void;
4597
4636
  static default(): WasmOcrQualityThresholds;
4598
- constructor(minTotalNonWhitespace?: number | null, minNonWhitespacePerPage?: number | null, minMeaningfulWordLen?: number | null, minMeaningfulWords?: number | null, minAlnumRatio?: number | null, minGarbageChars?: number | null, maxFragmentedWordRatio?: number | null, criticalFragmentedWordRatio?: number | null, maxOcrOutputFragmentedWordRatio?: number | null, minOcrMeanConfidence?: number | null, minWordsForOcrOutputCheck?: number | null, maxOcrOutputDictInvalidWordRatio?: number | null, discardSuspectedOcrNoise?: boolean | null, minAvgWordLength?: number | null, minWordsForAvgLengthCheck?: number | null, minConsecutiveRepeatRatio?: number | null, minWordsForRepeatCheck?: number | null, substantiveMinChars?: number | null, nonTextMinChars?: number | null, alnumWsRatioThreshold?: number | null, pipelineMinQuality?: number | null, minUndecodableRatio?: number | null, enableProvenanceOcrRouting?: boolean | null, minProvenanceFallbackRatio?: number | null);
4637
+ constructor(minTotalNonWhitespace?: number | null, minNonWhitespacePerPage?: number | null, minMeaningfulWordLen?: number | null, minMeaningfulWords?: number | null, minAlnumRatio?: number | null, minGarbageChars?: number | null, maxFragmentedWordRatio?: number | null, criticalFragmentedWordRatio?: number | null, maxOcrOutputFragmentedWordRatio?: number | null, minOcrMeanConfidence?: number | null, minWordsForOcrOutputCheck?: number | null, maxOcrOutputDictInvalidWordRatio?: number | null, discardSuspectedOcrNoise?: boolean | null, minAvgWordLength?: number | null, minWordsForAvgLengthCheck?: number | null, minConsecutiveRepeatRatio?: number | null, minWordsForRepeatCheck?: number | null, substantiveMinChars?: number | null, nonTextMinChars?: number | null, alnumWsRatioThreshold?: number | null, pipelineMinQuality?: number | null, minUndecodableRatio?: number | null, enableProvenanceOcrRouting?: boolean | null, minProvenanceFallbackRatio?: number | null, enablePlausibilityOcrRouting?: boolean | null, minReliableLanguageChunkRatio?: number | null);
4599
4638
  alnumWsRatioThreshold: number;
4600
4639
  criticalFragmentedWordRatio: number;
4601
4640
  discardSuspectedOcrNoise: boolean;
4641
+ enablePlausibilityOcrRouting: boolean;
4602
4642
  enableProvenanceOcrRouting: boolean;
4603
4643
  maxFragmentedWordRatio: number;
4604
4644
  maxOcrOutputDictInvalidWordRatio: number;
@@ -4612,6 +4652,7 @@ export class WasmOcrQualityThresholds {
4612
4652
  minNonWhitespacePerPage: number;
4613
4653
  minOcrMeanConfidence: number;
4614
4654
  minProvenanceFallbackRatio: number;
4655
+ minReliableLanguageChunkRatio: number;
4615
4656
  minTotalNonWhitespace: number;
4616
4657
  minUndecodableRatio: number;
4617
4658
  minWordsForAvgLengthCheck: number;
@@ -5377,9 +5418,13 @@ export class WasmPdfMetadata {
5377
5418
  free(): void;
5378
5419
  [Symbol.dispose](): void;
5379
5420
  static default(): WasmPdfMetadata;
5380
- constructor(pdfVersion?: string | null, producer?: string | null, isEncrypted?: boolean | null, width?: bigint | null, height?: bigint | null, pageCount?: number | null, scannedConfidence?: number | null, scannedPages?: Uint32Array | null, layoutGatedPages?: Uint32Array | null, layoutGateReasons?: string[] | null);
5421
+ constructor(pdfVersion?: string | null, producer?: string | null, isEncrypted?: boolean | null, width?: bigint | null, height?: bigint | null, pageCount?: number | null, scannedConfidence?: number | null, scannedPages?: Uint32Array | null, fabricatedTextPages?: Uint32Array | null, implausibleTextPages?: Uint32Array | null, layoutGatedPages?: Uint32Array | null, layoutGateReasons?: string[] | null);
5422
+ get fabricatedTextPages(): Uint32Array | undefined;
5423
+ set fabricatedTextPages(value: Uint32Array | null | undefined);
5381
5424
  get height(): bigint | undefined;
5382
5425
  set height(value: bigint | null | undefined);
5426
+ get implausibleTextPages(): Uint32Array | undefined;
5427
+ set implausibleTextPages(value: Uint32Array | null | undefined);
5383
5428
  get isEncrypted(): boolean | undefined;
5384
5429
  set isEncrypted(value: boolean | null | undefined);
5385
5430
  get layoutGateReasons(): string[] | undefined;
@@ -7248,9 +7293,10 @@ export function listEmbeddingBackends(): string[];
7248
7293
  * # Cost
7249
7294
  *
7250
7295
  * Calling this is not free for every backend. In particular, `TesseractBackend`'s
7251
- * `supported_languages()` allocates a Tesseract API and initializes it (`init("", "eng")`) the
7252
- * first time it is called, to enumerate installed tessdata languages; subsequent calls are
7253
- * served from a cache.
7296
+ * `supported_languages()` allocates a Tesseract API and initializes it against the same
7297
+ * tessdata directory a real OCR job resolves (`resolve_tessdata_path`), the first time it
7298
+ * is called, to enumerate installed tessdata languages; subsequent calls are served from a
7299
+ * cache.
7254
7300
  *
7255
7301
  * # Errors
7256
7302
  *
@@ -8974,6 +9020,7 @@ export interface InitOutput {
8974
9020
  readonly wasmextractionconfig_qrCodes: (a: number) => number;
8975
9021
  readonly wasmextractionconfig_redaction: (a: number) => number;
8976
9022
  readonly wasmextractionconfig_resultFormat: (a: number) => [number, number];
9023
+ readonly wasmextractionconfig_runsOcrOnEmbeddedImages: (a: number) => number;
8977
9024
  readonly wasmextractionconfig_securityLimits: (a: number) => number;
8978
9025
  readonly wasmextractionconfig_set_acceleration: (a: number, b: number) => void;
8979
9026
  readonly wasmextractionconfig_set_applyNotebookCellTags: (a: number, b: number) => void;
@@ -9036,6 +9083,7 @@ export interface InitOutput {
9036
9083
  readonly wasmextractionconfig_useCache: (a: number) => number;
9037
9084
  readonly wasmextractionconfig_useLayoutForMarkdown: (a: number) => number;
9038
9085
  readonly wasmextractionconfig_validate: (a: number) => [number, number];
9086
+ readonly wasmextractionconfig_wantsOwnBytesInResult: (a: number) => number;
9039
9087
  readonly wasmextractionerroritem_code: (a: number) => number;
9040
9088
  readonly wasmextractionerroritem_default: () => number;
9041
9089
  readonly wasmextractionerroritem_errorType: (a: number) => [number, number];
@@ -10086,6 +10134,7 @@ export interface InitOutput {
10086
10134
  readonly wasmocrqualitythresholds_criticalFragmentedWordRatio: (a: number) => number;
10087
10135
  readonly wasmocrqualitythresholds_default: () => number;
10088
10136
  readonly wasmocrqualitythresholds_discardSuspectedOcrNoise: (a: number) => number;
10137
+ readonly wasmocrqualitythresholds_enablePlausibilityOcrRouting: (a: number) => number;
10089
10138
  readonly wasmocrqualitythresholds_enableProvenanceOcrRouting: (a: number) => number;
10090
10139
  readonly wasmocrqualitythresholds_maxFragmentedWordRatio: (a: number) => number;
10091
10140
  readonly wasmocrqualitythresholds_maxOcrOutputDictInvalidWordRatio: (a: number) => number;
@@ -10099,17 +10148,19 @@ export interface InitOutput {
10099
10148
  readonly wasmocrqualitythresholds_minNonWhitespacePerPage: (a: number) => number;
10100
10149
  readonly wasmocrqualitythresholds_minOcrMeanConfidence: (a: number) => number;
10101
10150
  readonly wasmocrqualitythresholds_minProvenanceFallbackRatio: (a: number) => number;
10151
+ readonly wasmocrqualitythresholds_minReliableLanguageChunkRatio: (a: number) => number;
10102
10152
  readonly wasmocrqualitythresholds_minTotalNonWhitespace: (a: number) => number;
10103
10153
  readonly wasmocrqualitythresholds_minUndecodableRatio: (a: number) => number;
10104
10154
  readonly wasmocrqualitythresholds_minWordsForAvgLengthCheck: (a: number) => number;
10105
10155
  readonly wasmocrqualitythresholds_minWordsForOcrOutputCheck: (a: number) => number;
10106
10156
  readonly wasmocrqualitythresholds_minWordsForRepeatCheck: (a: number) => number;
10107
- readonly wasmocrqualitythresholds_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number, j1: number, k1: number) => number;
10157
+ readonly wasmocrqualitythresholds_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number, j1: number, k1: number, l1: number, m1: number, n1: number) => number;
10108
10158
  readonly wasmocrqualitythresholds_nonTextMinChars: (a: number) => number;
10109
10159
  readonly wasmocrqualitythresholds_pipelineMinQuality: (a: number) => number;
10110
10160
  readonly wasmocrqualitythresholds_set_alnumWsRatioThreshold: (a: number, b: number) => void;
10111
10161
  readonly wasmocrqualitythresholds_set_criticalFragmentedWordRatio: (a: number, b: number) => void;
10112
10162
  readonly wasmocrqualitythresholds_set_discardSuspectedOcrNoise: (a: number, b: number) => void;
10163
+ readonly wasmocrqualitythresholds_set_enablePlausibilityOcrRouting: (a: number, b: number) => void;
10113
10164
  readonly wasmocrqualitythresholds_set_enableProvenanceOcrRouting: (a: number, b: number) => void;
10114
10165
  readonly wasmocrqualitythresholds_set_maxFragmentedWordRatio: (a: number, b: number) => void;
10115
10166
  readonly wasmocrqualitythresholds_set_maxOcrOutputDictInvalidWordRatio: (a: number, b: number) => void;
@@ -10123,6 +10174,7 @@ export interface InitOutput {
10123
10174
  readonly wasmocrqualitythresholds_set_minNonWhitespacePerPage: (a: number, b: number) => void;
10124
10175
  readonly wasmocrqualitythresholds_set_minOcrMeanConfidence: (a: number, b: number) => void;
10125
10176
  readonly wasmocrqualitythresholds_set_minProvenanceFallbackRatio: (a: number, b: number) => void;
10177
+ readonly wasmocrqualitythresholds_set_minReliableLanguageChunkRatio: (a: number, b: number) => void;
10126
10178
  readonly wasmocrqualitythresholds_set_minTotalNonWhitespace: (a: number, b: number) => void;
10127
10179
  readonly wasmocrqualitythresholds_set_minUndecodableRatio: (a: number, b: number) => void;
10128
10180
  readonly wasmocrqualitythresholds_set_minWordsForAvgLengthCheck: (a: number, b: number) => void;
@@ -10430,17 +10482,21 @@ export interface InitOutput {
10430
10482
  readonly wasmpdfformfield_tooltip: (a: number) => [number, number];
10431
10483
  readonly wasmpdfformfield_value: (a: number) => [number, number];
10432
10484
  readonly wasmpdfmetadata_default: () => number;
10485
+ readonly wasmpdfmetadata_fabricatedTextPages: (a: number) => [number, number];
10433
10486
  readonly wasmpdfmetadata_height: (a: number) => [number, bigint];
10487
+ readonly wasmpdfmetadata_implausibleTextPages: (a: number) => [number, number];
10434
10488
  readonly wasmpdfmetadata_isEncrypted: (a: number) => number;
10435
10489
  readonly wasmpdfmetadata_layoutGateReasons: (a: number) => [number, number];
10436
10490
  readonly wasmpdfmetadata_layoutGatedPages: (a: number) => [number, number];
10437
- readonly wasmpdfmetadata_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: bigint, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number) => number;
10491
+ readonly wasmpdfmetadata_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: bigint, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number) => number;
10438
10492
  readonly wasmpdfmetadata_pageCount: (a: number) => number;
10439
10493
  readonly wasmpdfmetadata_pdfVersion: (a: number) => [number, number];
10440
10494
  readonly wasmpdfmetadata_producer: (a: number) => [number, number];
10441
10495
  readonly wasmpdfmetadata_scannedConfidence: (a: number) => number;
10442
10496
  readonly wasmpdfmetadata_scannedPages: (a: number) => [number, number];
10497
+ readonly wasmpdfmetadata_set_fabricatedTextPages: (a: number, b: number, c: number) => void;
10443
10498
  readonly wasmpdfmetadata_set_height: (a: number, b: number, c: bigint) => void;
10499
+ readonly wasmpdfmetadata_set_implausibleTextPages: (a: number, b: number, c: number) => void;
10444
10500
  readonly wasmpdfmetadata_set_isEncrypted: (a: number, b: number) => void;
10445
10501
  readonly wasmpdfmetadata_set_layoutGateReasons: (a: number, b: number, c: number) => void;
10446
10502
  readonly wasmpdfmetadata_set_layoutGatedPages: (a: number, b: number, c: number) => void;
@@ -13866,11 +13866,21 @@ export class WasmExtractionConfig {
13866
13866
  * For text-only extractions (no OCR, no image extraction), skipping image
13867
13867
  * decompression can improve CPU utilization by 5-10% by avoiding wasteful
13868
13868
  * image I/O and processing when results won't be used.
13869
- * Returns `true` when image binary data should be extracted.
13869
+ * Returns `true` when a CONTAINER document (DOCX, PPT, PPTX, HTML, ...) needs
13870
+ * to read an embedded image's binary data out of its archive or source.
13870
13871
  *
13871
- * True when `config.images.extract_images` is set, captioning is configured, or QR-code
13872
- * detection is enabled. Captioning and QR-code detection both require image bytes
13873
- * regardless of whether the caller also requested image extraction.
13872
+ * True when `config.images.extract_images` is set, captioning is configured, QR-code
13873
+ * detection is enabled, or embedded images get OCR'd. All four consume the bytes:
13874
+ * captioning and QR-code detection regardless of whether the caller also requested
13875
+ * image extraction, and embedded-image OCR because the OCR path reads the same bytes
13876
+ * the container would otherwise skip (GH#1662): before the OCR disjunct existed, a
13877
+ * container asked this question, was told no, and attached an image with an empty
13878
+ * buffer, which OCR then ran on and reported `Could not determine image format`.
13879
+ *
13880
+ * This governs whether a CONTAINER reads bytes it does not otherwise have. A
13881
+ * standalone image extractor already holds the whole file's bytes regardless of this
13882
+ * answer, so it must not use this method to decide whether to put its OWN bytes in the
13883
+ * result's `images` array; that is `wants_own_bytes_in_result`.
13874
13884
  * @returns {boolean}
13875
13885
  */
13876
13886
  needsImageData() {
@@ -14184,6 +14194,22 @@ export class WasmExtractionConfig {
14184
14194
  wasm.__wbindgen_free_command_export(deferred1_0, deferred1_1, 1);
14185
14195
  }
14186
14196
  }
14197
+ /**
14198
+ * Whether embedded images get OCR'd.
14199
+ *
14200
+ * This mirrors the condition the pipeline itself uses before it calls
14201
+ * `image_ocr.process_images_with_ocr` (`core/pipeline/mod.rs`), and it is
14202
+ * deliberately the same predicate rather than an equivalent one: when the
14203
+ * two drifted apart, a container extractor asked `needs_image_data` and was
14204
+ * told no, so it attached an image with an empty buffer, and the OCR path
14205
+ * then ran on those zero bytes and reported `Could not determine image
14206
+ * format` (GH#1662).
14207
+ * @returns {boolean}
14208
+ */
14209
+ runsOcrOnEmbeddedImages() {
14210
+ const ret = wasm.wasmextractionconfig_runsOcrOnEmbeddedImages(this.__wbg_ptr);
14211
+ return ret !== 0;
14212
+ }
14187
14213
  /**
14188
14214
  * @returns {WasmSecurityLimits | undefined}
14189
14215
  */
@@ -14740,6 +14766,25 @@ export class WasmExtractionConfig {
14740
14766
  throw takeFromExternrefTable0(ret[0]);
14741
14767
  }
14742
14768
  }
14769
+ /**
14770
+ * Returns `true` when a standalone image extraction (the whole input document IS
14771
+ * the image, not a container's embedded picture) should attach its own already-read
14772
+ * bytes to the result's `images` array.
14773
+ *
14774
+ * Deliberately narrower than `needs_image_data`: a standalone
14775
+ * image's content is read in full before this question is ever asked, whether or not OCR
14776
+ * runs, so OCR being configured is not by itself a reason to echo those bytes back in the
14777
+ * public output. Using `needs_image_data` here (as `needs_image_data`'s own OCR disjunct
14778
+ * briefly did) would silently start returning every OCR'd standalone image's raw bytes in
14779
+ * `images`, a public output contract change with nothing asking for it. Same three
14780
+ * conditions as before that disjunct existed: explicit image extraction, captioning, or
14781
+ * QR-code detection.
14782
+ * @returns {boolean}
14783
+ */
14784
+ wantsOwnBytesInResult() {
14785
+ const ret = wasm.wasmextractionconfig_wantsOwnBytesInResult(this.__wbg_ptr);
14786
+ return ret !== 0;
14787
+ }
14743
14788
  }
14744
14789
  if (Symbol.dispose) WasmExtractionConfig.prototype[Symbol.dispose] = WasmExtractionConfig.prototype.free;
14745
14790
 
@@ -26746,6 +26791,13 @@ export class WasmOcrQualityThresholds {
26746
26791
  const ret = wasm.wasmocrqualitythresholds_discardSuspectedOcrNoise(this.__wbg_ptr);
26747
26792
  return ret !== 0;
26748
26793
  }
26794
+ /**
26795
+ * @returns {boolean}
26796
+ */
26797
+ get enablePlausibilityOcrRouting() {
26798
+ const ret = wasm.wasmocrqualitythresholds_enablePlausibilityOcrRouting(this.__wbg_ptr);
26799
+ return ret !== 0;
26800
+ }
26749
26801
  /**
26750
26802
  * @returns {boolean}
26751
26803
  */
@@ -26837,6 +26889,13 @@ export class WasmOcrQualityThresholds {
26837
26889
  const ret = wasm.wasmocrqualitythresholds_minProvenanceFallbackRatio(this.__wbg_ptr);
26838
26890
  return ret;
26839
26891
  }
26892
+ /**
26893
+ * @returns {number}
26894
+ */
26895
+ get minReliableLanguageChunkRatio() {
26896
+ const ret = wasm.wasmocrqualitythresholds_minReliableLanguageChunkRatio(this.__wbg_ptr);
26897
+ return ret;
26898
+ }
26840
26899
  /**
26841
26900
  * @returns {number}
26842
26901
  */
@@ -26897,9 +26956,11 @@ export class WasmOcrQualityThresholds {
26897
26956
  * @param {number | null} [minUndecodableRatio]
26898
26957
  * @param {boolean | null} [enableProvenanceOcrRouting]
26899
26958
  * @param {number | null} [minProvenanceFallbackRatio]
26959
+ * @param {boolean | null} [enablePlausibilityOcrRouting]
26960
+ * @param {number | null} [minReliableLanguageChunkRatio]
26900
26961
  */
26901
- constructor(minTotalNonWhitespace, minNonWhitespacePerPage, minMeaningfulWordLen, minMeaningfulWords, minAlnumRatio, minGarbageChars, maxFragmentedWordRatio, criticalFragmentedWordRatio, maxOcrOutputFragmentedWordRatio, minOcrMeanConfidence, minWordsForOcrOutputCheck, maxOcrOutputDictInvalidWordRatio, discardSuspectedOcrNoise, minAvgWordLength, minWordsForAvgLengthCheck, minConsecutiveRepeatRatio, minWordsForRepeatCheck, substantiveMinChars, nonTextMinChars, alnumWsRatioThreshold, pipelineMinQuality, minUndecodableRatio, enableProvenanceOcrRouting, minProvenanceFallbackRatio) {
26902
- const ret = wasm.wasmocrqualitythresholds_new(isLikeNone(minTotalNonWhitespace) ? Number.MAX_SAFE_INTEGER : (minTotalNonWhitespace) >>> 0, !isLikeNone(minNonWhitespacePerPage), isLikeNone(minNonWhitespacePerPage) ? 0 : minNonWhitespacePerPage, isLikeNone(minMeaningfulWordLen) ? Number.MAX_SAFE_INTEGER : (minMeaningfulWordLen) >>> 0, isLikeNone(minMeaningfulWords) ? Number.MAX_SAFE_INTEGER : (minMeaningfulWords) >>> 0, !isLikeNone(minAlnumRatio), isLikeNone(minAlnumRatio) ? 0 : minAlnumRatio, isLikeNone(minGarbageChars) ? Number.MAX_SAFE_INTEGER : (minGarbageChars) >>> 0, !isLikeNone(maxFragmentedWordRatio), isLikeNone(maxFragmentedWordRatio) ? 0 : maxFragmentedWordRatio, !isLikeNone(criticalFragmentedWordRatio), isLikeNone(criticalFragmentedWordRatio) ? 0 : criticalFragmentedWordRatio, !isLikeNone(maxOcrOutputFragmentedWordRatio), isLikeNone(maxOcrOutputFragmentedWordRatio) ? 0 : maxOcrOutputFragmentedWordRatio, !isLikeNone(minOcrMeanConfidence), isLikeNone(minOcrMeanConfidence) ? 0 : minOcrMeanConfidence, isLikeNone(minWordsForOcrOutputCheck) ? Number.MAX_SAFE_INTEGER : (minWordsForOcrOutputCheck) >>> 0, !isLikeNone(maxOcrOutputDictInvalidWordRatio), isLikeNone(maxOcrOutputDictInvalidWordRatio) ? 0 : maxOcrOutputDictInvalidWordRatio, isLikeNone(discardSuspectedOcrNoise) ? 0xFFFFFF : discardSuspectedOcrNoise ? 1 : 0, !isLikeNone(minAvgWordLength), isLikeNone(minAvgWordLength) ? 0 : minAvgWordLength, isLikeNone(minWordsForAvgLengthCheck) ? Number.MAX_SAFE_INTEGER : (minWordsForAvgLengthCheck) >>> 0, !isLikeNone(minConsecutiveRepeatRatio), isLikeNone(minConsecutiveRepeatRatio) ? 0 : minConsecutiveRepeatRatio, isLikeNone(minWordsForRepeatCheck) ? Number.MAX_SAFE_INTEGER : (minWordsForRepeatCheck) >>> 0, isLikeNone(substantiveMinChars) ? Number.MAX_SAFE_INTEGER : (substantiveMinChars) >>> 0, isLikeNone(nonTextMinChars) ? Number.MAX_SAFE_INTEGER : (nonTextMinChars) >>> 0, !isLikeNone(alnumWsRatioThreshold), isLikeNone(alnumWsRatioThreshold) ? 0 : alnumWsRatioThreshold, !isLikeNone(pipelineMinQuality), isLikeNone(pipelineMinQuality) ? 0 : pipelineMinQuality, !isLikeNone(minUndecodableRatio), isLikeNone(minUndecodableRatio) ? 0 : minUndecodableRatio, isLikeNone(enableProvenanceOcrRouting) ? 0xFFFFFF : enableProvenanceOcrRouting ? 1 : 0, !isLikeNone(minProvenanceFallbackRatio), isLikeNone(minProvenanceFallbackRatio) ? 0 : minProvenanceFallbackRatio);
26962
+ constructor(minTotalNonWhitespace, minNonWhitespacePerPage, minMeaningfulWordLen, minMeaningfulWords, minAlnumRatio, minGarbageChars, maxFragmentedWordRatio, criticalFragmentedWordRatio, maxOcrOutputFragmentedWordRatio, minOcrMeanConfidence, minWordsForOcrOutputCheck, maxOcrOutputDictInvalidWordRatio, discardSuspectedOcrNoise, minAvgWordLength, minWordsForAvgLengthCheck, minConsecutiveRepeatRatio, minWordsForRepeatCheck, substantiveMinChars, nonTextMinChars, alnumWsRatioThreshold, pipelineMinQuality, minUndecodableRatio, enableProvenanceOcrRouting, minProvenanceFallbackRatio, enablePlausibilityOcrRouting, minReliableLanguageChunkRatio) {
26963
+ const ret = wasm.wasmocrqualitythresholds_new(isLikeNone(minTotalNonWhitespace) ? Number.MAX_SAFE_INTEGER : (minTotalNonWhitespace) >>> 0, !isLikeNone(minNonWhitespacePerPage), isLikeNone(minNonWhitespacePerPage) ? 0 : minNonWhitespacePerPage, isLikeNone(minMeaningfulWordLen) ? Number.MAX_SAFE_INTEGER : (minMeaningfulWordLen) >>> 0, isLikeNone(minMeaningfulWords) ? Number.MAX_SAFE_INTEGER : (minMeaningfulWords) >>> 0, !isLikeNone(minAlnumRatio), isLikeNone(minAlnumRatio) ? 0 : minAlnumRatio, isLikeNone(minGarbageChars) ? Number.MAX_SAFE_INTEGER : (minGarbageChars) >>> 0, !isLikeNone(maxFragmentedWordRatio), isLikeNone(maxFragmentedWordRatio) ? 0 : maxFragmentedWordRatio, !isLikeNone(criticalFragmentedWordRatio), isLikeNone(criticalFragmentedWordRatio) ? 0 : criticalFragmentedWordRatio, !isLikeNone(maxOcrOutputFragmentedWordRatio), isLikeNone(maxOcrOutputFragmentedWordRatio) ? 0 : maxOcrOutputFragmentedWordRatio, !isLikeNone(minOcrMeanConfidence), isLikeNone(minOcrMeanConfidence) ? 0 : minOcrMeanConfidence, isLikeNone(minWordsForOcrOutputCheck) ? Number.MAX_SAFE_INTEGER : (minWordsForOcrOutputCheck) >>> 0, !isLikeNone(maxOcrOutputDictInvalidWordRatio), isLikeNone(maxOcrOutputDictInvalidWordRatio) ? 0 : maxOcrOutputDictInvalidWordRatio, isLikeNone(discardSuspectedOcrNoise) ? 0xFFFFFF : discardSuspectedOcrNoise ? 1 : 0, !isLikeNone(minAvgWordLength), isLikeNone(minAvgWordLength) ? 0 : minAvgWordLength, isLikeNone(minWordsForAvgLengthCheck) ? Number.MAX_SAFE_INTEGER : (minWordsForAvgLengthCheck) >>> 0, !isLikeNone(minConsecutiveRepeatRatio), isLikeNone(minConsecutiveRepeatRatio) ? 0 : minConsecutiveRepeatRatio, isLikeNone(minWordsForRepeatCheck) ? Number.MAX_SAFE_INTEGER : (minWordsForRepeatCheck) >>> 0, isLikeNone(substantiveMinChars) ? Number.MAX_SAFE_INTEGER : (substantiveMinChars) >>> 0, isLikeNone(nonTextMinChars) ? Number.MAX_SAFE_INTEGER : (nonTextMinChars) >>> 0, !isLikeNone(alnumWsRatioThreshold), isLikeNone(alnumWsRatioThreshold) ? 0 : alnumWsRatioThreshold, !isLikeNone(pipelineMinQuality), isLikeNone(pipelineMinQuality) ? 0 : pipelineMinQuality, !isLikeNone(minUndecodableRatio), isLikeNone(minUndecodableRatio) ? 0 : minUndecodableRatio, isLikeNone(enableProvenanceOcrRouting) ? 0xFFFFFF : enableProvenanceOcrRouting ? 1 : 0, !isLikeNone(minProvenanceFallbackRatio), isLikeNone(minProvenanceFallbackRatio) ? 0 : minProvenanceFallbackRatio, isLikeNone(enablePlausibilityOcrRouting) ? 0xFFFFFF : enablePlausibilityOcrRouting ? 1 : 0, !isLikeNone(minReliableLanguageChunkRatio), isLikeNone(minReliableLanguageChunkRatio) ? 0 : minReliableLanguageChunkRatio);
26903
26964
  this.__wbg_ptr = ret;
26904
26965
  WasmOcrQualityThresholdsFinalization.register(this, this.__wbg_ptr, this);
26905
26966
  return this;
@@ -26936,6 +26997,12 @@ export class WasmOcrQualityThresholds {
26936
26997
  set discardSuspectedOcrNoise(value) {
26937
26998
  wasm.wasmocrqualitythresholds_set_discardSuspectedOcrNoise(this.__wbg_ptr, value);
26938
26999
  }
27000
+ /**
27001
+ * @param {boolean} value
27002
+ */
27003
+ set enablePlausibilityOcrRouting(value) {
27004
+ wasm.wasmocrqualitythresholds_set_enablePlausibilityOcrRouting(this.__wbg_ptr, value);
27005
+ }
26939
27006
  /**
26940
27007
  * @param {boolean} value
26941
27008
  */
@@ -27014,6 +27081,12 @@ export class WasmOcrQualityThresholds {
27014
27081
  set minProvenanceFallbackRatio(value) {
27015
27082
  wasm.wasmocrqualitythresholds_set_minProvenanceFallbackRatio(this.__wbg_ptr, value);
27016
27083
  }
27084
+ /**
27085
+ * @param {number} value
27086
+ */
27087
+ set minReliableLanguageChunkRatio(value) {
27088
+ wasm.wasmocrqualitythresholds_set_minReliableLanguageChunkRatio(this.__wbg_ptr, value);
27089
+ }
27017
27090
  /**
27018
27091
  * @param {number} value
27019
27092
  */
@@ -30587,6 +30660,18 @@ export class WasmPdfMetadata {
30587
30660
  const ret = wasm.wasmpdfmetadata_default();
30588
30661
  return WasmPdfMetadata.__wrap(ret);
30589
30662
  }
30663
+ /**
30664
+ * @returns {Uint32Array | undefined}
30665
+ */
30666
+ get fabricatedTextPages() {
30667
+ const ret = wasm.wasmpdfmetadata_fabricatedTextPages(this.__wbg_ptr);
30668
+ let v1;
30669
+ if (ret[0] !== 0) {
30670
+ v1 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
30671
+ wasm.__wbindgen_free_command_export(ret[0], ret[1] * 4, 4);
30672
+ }
30673
+ return v1;
30674
+ }
30590
30675
  /**
30591
30676
  * @returns {bigint | undefined}
30592
30677
  */
@@ -30594,6 +30679,18 @@ export class WasmPdfMetadata {
30594
30679
  const ret = wasm.wasmpdfmetadata_height(this.__wbg_ptr);
30595
30680
  return ret[0] === 0 ? undefined : ret[1];
30596
30681
  }
30682
+ /**
30683
+ * @returns {Uint32Array | undefined}
30684
+ */
30685
+ get implausibleTextPages() {
30686
+ const ret = wasm.wasmpdfmetadata_implausibleTextPages(this.__wbg_ptr);
30687
+ let v1;
30688
+ if (ret[0] !== 0) {
30689
+ v1 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
30690
+ wasm.__wbindgen_free_command_export(ret[0], ret[1] * 4, 4);
30691
+ }
30692
+ return v1;
30693
+ }
30597
30694
  /**
30598
30695
  * @returns {boolean | undefined}
30599
30696
  */
@@ -30634,21 +30731,27 @@ export class WasmPdfMetadata {
30634
30731
  * @param {number | null} [pageCount]
30635
30732
  * @param {number | null} [scannedConfidence]
30636
30733
  * @param {Uint32Array | null} [scannedPages]
30734
+ * @param {Uint32Array | null} [fabricatedTextPages]
30735
+ * @param {Uint32Array | null} [implausibleTextPages]
30637
30736
  * @param {Uint32Array | null} [layoutGatedPages]
30638
30737
  * @param {string[] | null} [layoutGateReasons]
30639
30738
  */
30640
- constructor(pdfVersion, producer, isEncrypted, width, height, pageCount, scannedConfidence, scannedPages, layoutGatedPages, layoutGateReasons) {
30739
+ constructor(pdfVersion, producer, isEncrypted, width, height, pageCount, scannedConfidence, scannedPages, fabricatedTextPages, implausibleTextPages, layoutGatedPages, layoutGateReasons) {
30641
30740
  var ptr0 = isLikeNone(pdfVersion) ? 0 : passStringToWasm0(pdfVersion, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
30642
30741
  var len0 = WASM_VECTOR_LEN;
30643
30742
  var ptr1 = isLikeNone(producer) ? 0 : passStringToWasm0(producer, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
30644
30743
  var len1 = WASM_VECTOR_LEN;
30645
30744
  var ptr2 = isLikeNone(scannedPages) ? 0 : passArray32ToWasm0(scannedPages, wasm.__wbindgen_malloc_command_export);
30646
30745
  var len2 = WASM_VECTOR_LEN;
30647
- var ptr3 = isLikeNone(layoutGatedPages) ? 0 : passArray32ToWasm0(layoutGatedPages, wasm.__wbindgen_malloc_command_export);
30746
+ var ptr3 = isLikeNone(fabricatedTextPages) ? 0 : passArray32ToWasm0(fabricatedTextPages, wasm.__wbindgen_malloc_command_export);
30648
30747
  var len3 = WASM_VECTOR_LEN;
30649
- var ptr4 = isLikeNone(layoutGateReasons) ? 0 : passArrayJsValueToWasm0(layoutGateReasons, wasm.__wbindgen_malloc_command_export);
30748
+ var ptr4 = isLikeNone(implausibleTextPages) ? 0 : passArray32ToWasm0(implausibleTextPages, wasm.__wbindgen_malloc_command_export);
30650
30749
  var len4 = WASM_VECTOR_LEN;
30651
- const ret = wasm.wasmpdfmetadata_new(ptr0, len0, ptr1, len1, isLikeNone(isEncrypted) ? 0xFFFFFF : isEncrypted ? 1 : 0, !isLikeNone(width), isLikeNone(width) ? BigInt(0) : width, !isLikeNone(height), isLikeNone(height) ? BigInt(0) : height, isLikeNone(pageCount) ? Number.MAX_SAFE_INTEGER : (pageCount) >>> 0, isLikeNone(scannedConfidence) ? Number.MAX_SAFE_INTEGER : Math.fround(scannedConfidence), ptr2, len2, ptr3, len3, ptr4, len4);
30750
+ var ptr5 = isLikeNone(layoutGatedPages) ? 0 : passArray32ToWasm0(layoutGatedPages, wasm.__wbindgen_malloc_command_export);
30751
+ var len5 = WASM_VECTOR_LEN;
30752
+ var ptr6 = isLikeNone(layoutGateReasons) ? 0 : passArrayJsValueToWasm0(layoutGateReasons, wasm.__wbindgen_malloc_command_export);
30753
+ var len6 = WASM_VECTOR_LEN;
30754
+ const ret = wasm.wasmpdfmetadata_new(ptr0, len0, ptr1, len1, isLikeNone(isEncrypted) ? 0xFFFFFF : isEncrypted ? 1 : 0, !isLikeNone(width), isLikeNone(width) ? BigInt(0) : width, !isLikeNone(height), isLikeNone(height) ? BigInt(0) : height, isLikeNone(pageCount) ? Number.MAX_SAFE_INTEGER : (pageCount) >>> 0, isLikeNone(scannedConfidence) ? Number.MAX_SAFE_INTEGER : Math.fround(scannedConfidence), ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6);
30652
30755
  this.__wbg_ptr = ret;
30653
30756
  WasmPdfMetadataFinalization.register(this, this.__wbg_ptr, this);
30654
30757
  return this;
@@ -30703,12 +30806,28 @@ export class WasmPdfMetadata {
30703
30806
  }
30704
30807
  return v1;
30705
30808
  }
30809
+ /**
30810
+ * @param {Uint32Array | null} [value]
30811
+ */
30812
+ set fabricatedTextPages(value) {
30813
+ var ptr0 = isLikeNone(value) ? 0 : passArray32ToWasm0(value, wasm.__wbindgen_malloc_command_export);
30814
+ var len0 = WASM_VECTOR_LEN;
30815
+ wasm.wasmpdfmetadata_set_fabricatedTextPages(this.__wbg_ptr, ptr0, len0);
30816
+ }
30706
30817
  /**
30707
30818
  * @param {bigint | null} [value]
30708
30819
  */
30709
30820
  set height(value) {
30710
30821
  wasm.wasmpdfmetadata_set_height(this.__wbg_ptr, !isLikeNone(value), isLikeNone(value) ? BigInt(0) : value);
30711
30822
  }
30823
+ /**
30824
+ * @param {Uint32Array | null} [value]
30825
+ */
30826
+ set implausibleTextPages(value) {
30827
+ var ptr0 = isLikeNone(value) ? 0 : passArray32ToWasm0(value, wasm.__wbindgen_malloc_command_export);
30828
+ var len0 = WASM_VECTOR_LEN;
30829
+ wasm.wasmpdfmetadata_set_implausibleTextPages(this.__wbg_ptr, ptr0, len0);
30830
+ }
30712
30831
  /**
30713
30832
  * @param {boolean | null} [value]
30714
30833
  */
@@ -40449,9 +40568,10 @@ export function listEmbeddingBackends() {
40449
40568
  * # Cost
40450
40569
  *
40451
40570
  * Calling this is not free for every backend. In particular, `TesseractBackend`'s
40452
- * `supported_languages()` allocates a Tesseract API and initializes it (`init("", "eng")`) the
40453
- * first time it is called, to enumerate installed tessdata languages; subsequent calls are
40454
- * served from a cache.
40571
+ * `supported_languages()` allocates a Tesseract API and initializes it against the same
40572
+ * tessdata directory a real OCR job resolves (`resolve_tessdata_path`), the first time it
40573
+ * is called, to enumerate installed tessdata languages; subsequent calls are served from a
40574
+ * cache.
40455
40575
  *
40456
40576
  * # Errors
40457
40577
  *
@@ -41451,7 +41571,7 @@ function __wbg_get_imports() {
41451
41571
  const ret = arg0.value;
41452
41572
  return ret;
41453
41573
  },
41454
- __wbg_warn_396d6a968bb12dcf: function(arg0, arg1) {
41574
+ __wbg_warn_2404f6e2ec92fd86: function(arg0, arg1) {
41455
41575
  console.warn(getStringFromWasm0(arg0, arg1));
41456
41576
  },
41457
41577
  __wbg_wasmarchiveentry_new: function(arg0) {
@@ -42015,7 +42135,7 @@ function __wbg_get_imports() {
42015
42135
  return ret;
42016
42136
  },
42017
42137
  __wbindgen_generic_0000000000000001: function(arg0, arg1) {
42018
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 678, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
42138
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 677, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
42019
42139
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h58dcb4b03347de73);
42020
42140
  return ret;
42021
42141
  },
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/pkg/web/xberg_wasm_bg.wasm
3
- size: 36487609 bytes
4
- sha256: 673faaa93ece262fba5786d6a2df8f7651e237b165409f2edb8dd69246cca4a9
3
+ size: 36531009 bytes
4
+ sha256: ba9a867b795a54358bbe0964fa583b54fca80be2f5b7735754892c882989b853
@@ -1533,6 +1533,7 @@ export const wasmextractionconfig_postprocessor: (a: number) => number;
1533
1533
  export const wasmextractionconfig_qrCodes: (a: number) => number;
1534
1534
  export const wasmextractionconfig_redaction: (a: number) => number;
1535
1535
  export const wasmextractionconfig_resultFormat: (a: number) => [number, number];
1536
+ export const wasmextractionconfig_runsOcrOnEmbeddedImages: (a: number) => number;
1536
1537
  export const wasmextractionconfig_securityLimits: (a: number) => number;
1537
1538
  export const wasmextractionconfig_set_acceleration: (a: number, b: number) => void;
1538
1539
  export const wasmextractionconfig_set_applyNotebookCellTags: (a: number, b: number) => void;
@@ -1595,6 +1596,7 @@ export const wasmextractionconfig_url: (a: number) => number;
1595
1596
  export const wasmextractionconfig_useCache: (a: number) => number;
1596
1597
  export const wasmextractionconfig_useLayoutForMarkdown: (a: number) => number;
1597
1598
  export const wasmextractionconfig_validate: (a: number) => [number, number];
1599
+ export const wasmextractionconfig_wantsOwnBytesInResult: (a: number) => number;
1598
1600
  export const wasmextractionerroritem_code: (a: number) => number;
1599
1601
  export const wasmextractionerroritem_default: () => number;
1600
1602
  export const wasmextractionerroritem_errorType: (a: number) => [number, number];
@@ -2645,6 +2647,7 @@ export const wasmocrqualitythresholds_alnumWsRatioThreshold: (a: number) => numb
2645
2647
  export const wasmocrqualitythresholds_criticalFragmentedWordRatio: (a: number) => number;
2646
2648
  export const wasmocrqualitythresholds_default: () => number;
2647
2649
  export const wasmocrqualitythresholds_discardSuspectedOcrNoise: (a: number) => number;
2650
+ export const wasmocrqualitythresholds_enablePlausibilityOcrRouting: (a: number) => number;
2648
2651
  export const wasmocrqualitythresholds_enableProvenanceOcrRouting: (a: number) => number;
2649
2652
  export const wasmocrqualitythresholds_maxFragmentedWordRatio: (a: number) => number;
2650
2653
  export const wasmocrqualitythresholds_maxOcrOutputDictInvalidWordRatio: (a: number) => number;
@@ -2658,17 +2661,19 @@ export const wasmocrqualitythresholds_minMeaningfulWords: (a: number) => number;
2658
2661
  export const wasmocrqualitythresholds_minNonWhitespacePerPage: (a: number) => number;
2659
2662
  export const wasmocrqualitythresholds_minOcrMeanConfidence: (a: number) => number;
2660
2663
  export const wasmocrqualitythresholds_minProvenanceFallbackRatio: (a: number) => number;
2664
+ export const wasmocrqualitythresholds_minReliableLanguageChunkRatio: (a: number) => number;
2661
2665
  export const wasmocrqualitythresholds_minTotalNonWhitespace: (a: number) => number;
2662
2666
  export const wasmocrqualitythresholds_minUndecodableRatio: (a: number) => number;
2663
2667
  export const wasmocrqualitythresholds_minWordsForAvgLengthCheck: (a: number) => number;
2664
2668
  export const wasmocrqualitythresholds_minWordsForOcrOutputCheck: (a: number) => number;
2665
2669
  export const wasmocrqualitythresholds_minWordsForRepeatCheck: (a: number) => number;
2666
- export const wasmocrqualitythresholds_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number, j1: number, k1: number) => number;
2670
+ export const wasmocrqualitythresholds_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number, j1: number, k1: number, l1: number, m1: number, n1: number) => number;
2667
2671
  export const wasmocrqualitythresholds_nonTextMinChars: (a: number) => number;
2668
2672
  export const wasmocrqualitythresholds_pipelineMinQuality: (a: number) => number;
2669
2673
  export const wasmocrqualitythresholds_set_alnumWsRatioThreshold: (a: number, b: number) => void;
2670
2674
  export const wasmocrqualitythresholds_set_criticalFragmentedWordRatio: (a: number, b: number) => void;
2671
2675
  export const wasmocrqualitythresholds_set_discardSuspectedOcrNoise: (a: number, b: number) => void;
2676
+ export const wasmocrqualitythresholds_set_enablePlausibilityOcrRouting: (a: number, b: number) => void;
2672
2677
  export const wasmocrqualitythresholds_set_enableProvenanceOcrRouting: (a: number, b: number) => void;
2673
2678
  export const wasmocrqualitythresholds_set_maxFragmentedWordRatio: (a: number, b: number) => void;
2674
2679
  export const wasmocrqualitythresholds_set_maxOcrOutputDictInvalidWordRatio: (a: number, b: number) => void;
@@ -2682,6 +2687,7 @@ export const wasmocrqualitythresholds_set_minMeaningfulWords: (a: number, b: num
2682
2687
  export const wasmocrqualitythresholds_set_minNonWhitespacePerPage: (a: number, b: number) => void;
2683
2688
  export const wasmocrqualitythresholds_set_minOcrMeanConfidence: (a: number, b: number) => void;
2684
2689
  export const wasmocrqualitythresholds_set_minProvenanceFallbackRatio: (a: number, b: number) => void;
2690
+ export const wasmocrqualitythresholds_set_minReliableLanguageChunkRatio: (a: number, b: number) => void;
2685
2691
  export const wasmocrqualitythresholds_set_minTotalNonWhitespace: (a: number, b: number) => void;
2686
2692
  export const wasmocrqualitythresholds_set_minUndecodableRatio: (a: number, b: number) => void;
2687
2693
  export const wasmocrqualitythresholds_set_minWordsForAvgLengthCheck: (a: number, b: number) => void;
@@ -2989,17 +2995,21 @@ export const wasmpdfformfield_set_value: (a: number, b: number, c: number) => vo
2989
2995
  export const wasmpdfformfield_tooltip: (a: number) => [number, number];
2990
2996
  export const wasmpdfformfield_value: (a: number) => [number, number];
2991
2997
  export const wasmpdfmetadata_default: () => number;
2998
+ export const wasmpdfmetadata_fabricatedTextPages: (a: number) => [number, number];
2992
2999
  export const wasmpdfmetadata_height: (a: number) => [number, bigint];
3000
+ export const wasmpdfmetadata_implausibleTextPages: (a: number) => [number, number];
2993
3001
  export const wasmpdfmetadata_isEncrypted: (a: number) => number;
2994
3002
  export const wasmpdfmetadata_layoutGateReasons: (a: number) => [number, number];
2995
3003
  export const wasmpdfmetadata_layoutGatedPages: (a: number) => [number, number];
2996
- export const wasmpdfmetadata_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: bigint, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number) => number;
3004
+ export const wasmpdfmetadata_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: bigint, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number) => number;
2997
3005
  export const wasmpdfmetadata_pageCount: (a: number) => number;
2998
3006
  export const wasmpdfmetadata_pdfVersion: (a: number) => [number, number];
2999
3007
  export const wasmpdfmetadata_producer: (a: number) => [number, number];
3000
3008
  export const wasmpdfmetadata_scannedConfidence: (a: number) => number;
3001
3009
  export const wasmpdfmetadata_scannedPages: (a: number) => [number, number];
3010
+ export const wasmpdfmetadata_set_fabricatedTextPages: (a: number, b: number, c: number) => void;
3002
3011
  export const wasmpdfmetadata_set_height: (a: number, b: number, c: bigint) => void;
3012
+ export const wasmpdfmetadata_set_implausibleTextPages: (a: number, b: number, c: number) => void;
3003
3013
  export const wasmpdfmetadata_set_isEncrypted: (a: number, b: number) => void;
3004
3014
  export const wasmpdfmetadata_set_layoutGateReasons: (a: number, b: number, c: number) => void;
3005
3015
  export const wasmpdfmetadata_set_layoutGatedPages: (a: number, b: number, c: number) => void;