@chialab/pdfjs-lib 1.0.0-alpha.29 → 1.0.0-alpha.30
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/browser/{chunk-W35PJZ6L.js → chunk-R7G44NYV.js} +521 -3
- package/dist/browser/index.js +2329 -969
- package/dist/browser/openjpeg-Q27OVS4T.js +9 -0
- package/dist/browser/worker.js +594 -609
- package/dist/index.d.ts +1 -1
- package/dist/lib/TextLayer.d.ts +4 -0
- package/dist/node/{NodeUtils-ZPPZPJWD.js → NodeUtils-PVXQMWFJ.js} +2 -2
- package/dist/node/{chunk-GWGW2EKY.js → chunk-4Y7OZIIX.js} +520 -2
- package/dist/node/{chunk-D4U3W2CD.js → chunk-O74KGUUC.js} +451 -1
- package/dist/node/{chunk-FHASHZBJ.js → chunk-T2JWSGAF.js} +2 -2
- package/dist/node/index.js +1896 -972
- package/dist/node/openjpeg-QFJSFVSJ.js +9 -0
- package/dist/node/worker.js +595 -610
- package/dist/pdf.js/external/openjpeg/openjpeg.d.ts +1 -1
- package/dist/pdf.js/src/core/fonts.d.ts +7 -1
- package/dist/pdf.js/src/display/annotation_layer.d.ts +28 -6
- package/dist/pdf.js/src/display/annotation_storage.d.ts +2 -0
- package/dist/pdf.js/src/display/api.d.ts +13 -7
- package/dist/pdf.js/src/display/canvas.d.ts +1 -1
- package/dist/pdf.js/src/display/canvas_dependency_tracker.d.ts +36 -20
- package/dist/pdf.js/src/display/display_utils.d.ts +22 -0
- package/dist/pdf.js/src/display/editor/annotation_editor_layer.d.ts +4 -2
- package/dist/pdf.js/src/display/editor/comment.d.ts +20 -5
- package/dist/pdf.js/src/display/editor/drawers/freedraw.d.ts +1 -0
- package/dist/pdf.js/src/display/editor/drawers/highlight.d.ts +2 -1
- package/dist/pdf.js/src/display/editor/editor.d.ts +67 -15
- package/dist/pdf.js/src/display/editor/freetext.d.ts +1 -1
- package/dist/pdf.js/src/display/editor/highlight.d.ts +3 -1
- package/dist/pdf.js/src/display/editor/ink.d.ts +2 -1
- package/dist/pdf.js/src/display/editor/signature.d.ts +0 -5
- package/dist/pdf.js/src/display/editor/toolbar.d.ts +3 -1
- package/dist/pdf.js/src/display/editor/tools.d.ts +21 -3
- package/dist/pdf.js/src/display/font_loader.d.ts +27 -1
- package/dist/pdf.js/src/display/pattern_helper.d.ts +2 -2
- package/dist/pdf.js/src/pdf.d.ts +5 -1
- package/dist/pdf.js/src/shared/obj-bin-transform.d.ts +64 -0
- package/dist/pdf.js/web/comment_manager.d.ts +20 -0
- package/package.json +1 -1
- package/dist/browser/openjpeg-QLA762TL.js +0 -9
- package/dist/node/openjpeg-TRZ4ANDN.js +0 -9
package/dist/browser/worker.js
CHANGED
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
DrawOPS,
|
|
17
17
|
FONT_IDENTITY_MATRIX,
|
|
18
18
|
FeatureTest,
|
|
19
|
+
FontInfo,
|
|
19
20
|
FormatError,
|
|
20
21
|
ImageKind,
|
|
21
22
|
InvalidPDFException,
|
|
@@ -61,7 +62,7 @@ import {
|
|
|
61
62
|
utf8StringToString,
|
|
62
63
|
warn,
|
|
63
64
|
wrapReason
|
|
64
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-R7G44NYV.js";
|
|
65
66
|
import {
|
|
66
67
|
__privateAdd,
|
|
67
68
|
__privateGet,
|
|
@@ -300,7 +301,7 @@ var Dict = class _Dict {
|
|
|
300
301
|
return dict;
|
|
301
302
|
}
|
|
302
303
|
delete(key) {
|
|
303
|
-
|
|
304
|
+
this._map.delete(key);
|
|
304
305
|
}
|
|
305
306
|
};
|
|
306
307
|
var Ref = class _Ref {
|
|
@@ -9791,610 +9792,582 @@ __privateAdd(_JpegStream, _isImageDecoderSupported, FeatureTest.isImageDecoderSu
|
|
|
9791
9792
|
var JpegStream = _JpegStream;
|
|
9792
9793
|
|
|
9793
9794
|
// src/pdf.js/external/openjpeg/openjpeg.js
|
|
9794
|
-
|
|
9795
|
-
|
|
9796
|
-
|
|
9797
|
-
|
|
9798
|
-
|
|
9799
|
-
|
|
9800
|
-
|
|
9801
|
-
|
|
9802
|
-
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
};
|
|
9810
|
-
var _scriptName = import.meta.url;
|
|
9811
|
-
var scriptDirectory = "";
|
|
9812
|
-
function locateFile(path) {
|
|
9813
|
-
if (Module["locateFile"]) {
|
|
9814
|
-
return Module["locateFile"](path, scriptDirectory);
|
|
9815
|
-
}
|
|
9816
|
-
return scriptDirectory + path;
|
|
9817
|
-
}
|
|
9818
|
-
var readAsync, readBinary;
|
|
9819
|
-
if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
|
|
9820
|
-
try {
|
|
9821
|
-
scriptDirectory = new URL(".", _scriptName).href;
|
|
9822
|
-
} catch {
|
|
9823
|
-
}
|
|
9824
|
-
{
|
|
9825
|
-
readAsync = async (url) => {
|
|
9826
|
-
var response = await fetch(url, { credentials: "same-origin" });
|
|
9827
|
-
if (response.ok) {
|
|
9828
|
-
return response.arrayBuffer();
|
|
9829
|
-
}
|
|
9830
|
-
throw new Error(response.status + " : " + response.url);
|
|
9831
|
-
};
|
|
9832
|
-
}
|
|
9833
|
-
} else {
|
|
9795
|
+
async function OpenJPEG(moduleArg = {}) {
|
|
9796
|
+
var moduleRtn;
|
|
9797
|
+
var Module = moduleArg;
|
|
9798
|
+
var ENVIRONMENT_IS_WEB = true;
|
|
9799
|
+
var ENVIRONMENT_IS_WORKER = false;
|
|
9800
|
+
var arguments_ = [];
|
|
9801
|
+
var thisProgram = "./this.program";
|
|
9802
|
+
var quit_ = (status, toThrow) => {
|
|
9803
|
+
throw toThrow;
|
|
9804
|
+
};
|
|
9805
|
+
var _scriptName = import.meta.url;
|
|
9806
|
+
var scriptDirectory = "";
|
|
9807
|
+
function locateFile(path) {
|
|
9808
|
+
if (Module["locateFile"]) {
|
|
9809
|
+
return Module["locateFile"](path, scriptDirectory);
|
|
9834
9810
|
}
|
|
9835
|
-
|
|
9836
|
-
|
|
9837
|
-
|
|
9838
|
-
|
|
9839
|
-
|
|
9840
|
-
|
|
9841
|
-
|
|
9842
|
-
var runtimeInitialized = false;
|
|
9843
|
-
function updateMemoryViews() {
|
|
9844
|
-
var b = wasmMemory.buffer;
|
|
9845
|
-
HEAP8 = new Int8Array(b);
|
|
9846
|
-
HEAP16 = new Int16Array(b);
|
|
9847
|
-
HEAPU8 = new Uint8Array(b);
|
|
9848
|
-
HEAPU16 = new Uint16Array(b);
|
|
9849
|
-
HEAP32 = new Int32Array(b);
|
|
9850
|
-
HEAPU32 = new Uint32Array(b);
|
|
9851
|
-
HEAPF32 = new Float32Array(b);
|
|
9852
|
-
HEAPF64 = new Float64Array(b);
|
|
9853
|
-
HEAP64 = new BigInt64Array(b);
|
|
9854
|
-
HEAPU64 = new BigUint64Array(b);
|
|
9855
|
-
}
|
|
9856
|
-
function preRun() {
|
|
9857
|
-
if (Module["preRun"]) {
|
|
9858
|
-
if (typeof Module["preRun"] == "function") Module["preRun"] = [Module["preRun"]];
|
|
9859
|
-
while (Module["preRun"].length) {
|
|
9860
|
-
addOnPreRun(Module["preRun"].shift());
|
|
9861
|
-
}
|
|
9862
|
-
}
|
|
9863
|
-
callRuntimeCallbacks(onPreRuns);
|
|
9864
|
-
}
|
|
9865
|
-
function initRuntime() {
|
|
9866
|
-
runtimeInitialized = true;
|
|
9867
|
-
wasmExports["t"]();
|
|
9868
|
-
}
|
|
9869
|
-
function postRun() {
|
|
9870
|
-
if (Module["postRun"]) {
|
|
9871
|
-
if (typeof Module["postRun"] == "function") Module["postRun"] = [Module["postRun"]];
|
|
9872
|
-
while (Module["postRun"].length) {
|
|
9873
|
-
addOnPostRun(Module["postRun"].shift());
|
|
9874
|
-
}
|
|
9875
|
-
}
|
|
9876
|
-
callRuntimeCallbacks(onPostRuns);
|
|
9877
|
-
}
|
|
9878
|
-
var runDependencies = 0;
|
|
9879
|
-
var dependenciesFulfilled = null;
|
|
9880
|
-
function addRunDependency(id) {
|
|
9881
|
-
runDependencies++;
|
|
9882
|
-
Module["monitorRunDependencies"]?.(runDependencies);
|
|
9883
|
-
}
|
|
9884
|
-
function removeRunDependency(id) {
|
|
9885
|
-
runDependencies--;
|
|
9886
|
-
Module["monitorRunDependencies"]?.(runDependencies);
|
|
9887
|
-
if (runDependencies == 0) {
|
|
9888
|
-
if (dependenciesFulfilled) {
|
|
9889
|
-
var callback = dependenciesFulfilled;
|
|
9890
|
-
dependenciesFulfilled = null;
|
|
9891
|
-
callback();
|
|
9892
|
-
}
|
|
9893
|
-
}
|
|
9894
|
-
}
|
|
9895
|
-
function abort(what) {
|
|
9896
|
-
Module["onAbort"]?.(what);
|
|
9897
|
-
what = "Aborted(" + what + ")";
|
|
9898
|
-
err(what);
|
|
9899
|
-
ABORT = true;
|
|
9900
|
-
what += ". Build with -sASSERTIONS for more info.";
|
|
9901
|
-
var e = new WebAssembly.RuntimeError(what);
|
|
9902
|
-
readyPromiseReject(e);
|
|
9903
|
-
throw e;
|
|
9811
|
+
return scriptDirectory + path;
|
|
9812
|
+
}
|
|
9813
|
+
var readAsync, readBinary;
|
|
9814
|
+
if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
|
|
9815
|
+
try {
|
|
9816
|
+
scriptDirectory = new URL(".", _scriptName).href;
|
|
9817
|
+
} catch {
|
|
9904
9818
|
}
|
|
9905
|
-
|
|
9906
|
-
|
|
9907
|
-
|
|
9908
|
-
|
|
9909
|
-
|
|
9910
|
-
|
|
9819
|
+
{
|
|
9820
|
+
readAsync = async (url) => {
|
|
9821
|
+
var response = await fetch(url, { credentials: "same-origin" });
|
|
9822
|
+
if (response.ok) {
|
|
9823
|
+
return response.arrayBuffer();
|
|
9824
|
+
}
|
|
9825
|
+
throw new Error(response.status + " : " + response.url);
|
|
9826
|
+
};
|
|
9911
9827
|
}
|
|
9912
|
-
|
|
9913
|
-
|
|
9914
|
-
|
|
9915
|
-
|
|
9916
|
-
|
|
9917
|
-
|
|
9828
|
+
} else {
|
|
9829
|
+
}
|
|
9830
|
+
var out = console.log.bind(console);
|
|
9831
|
+
var err = console.error.bind(console);
|
|
9832
|
+
var wasmBinary;
|
|
9833
|
+
var ABORT = false;
|
|
9834
|
+
var EXITSTATUS;
|
|
9835
|
+
var readyPromiseResolve, readyPromiseReject;
|
|
9836
|
+
var wasmMemory;
|
|
9837
|
+
var HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64;
|
|
9838
|
+
var HEAP64, HEAPU64;
|
|
9839
|
+
var runtimeInitialized = false;
|
|
9840
|
+
function updateMemoryViews() {
|
|
9841
|
+
var b = wasmMemory.buffer;
|
|
9842
|
+
HEAP8 = new Int8Array(b);
|
|
9843
|
+
HEAP16 = new Int16Array(b);
|
|
9844
|
+
HEAPU8 = new Uint8Array(b);
|
|
9845
|
+
HEAPU16 = new Uint16Array(b);
|
|
9846
|
+
HEAP32 = new Int32Array(b);
|
|
9847
|
+
HEAPU32 = new Uint32Array(b);
|
|
9848
|
+
HEAPF32 = new Float32Array(b);
|
|
9849
|
+
HEAPF64 = new Float64Array(b);
|
|
9850
|
+
HEAP64 = new BigInt64Array(b);
|
|
9851
|
+
HEAPU64 = new BigUint64Array(b);
|
|
9852
|
+
}
|
|
9853
|
+
function preRun() {
|
|
9854
|
+
if (Module["preRun"]) {
|
|
9855
|
+
if (typeof Module["preRun"] == "function") Module["preRun"] = [Module["preRun"]];
|
|
9856
|
+
while (Module["preRun"].length) {
|
|
9857
|
+
addOnPreRun(Module["preRun"].shift());
|
|
9858
|
+
}
|
|
9859
|
+
}
|
|
9860
|
+
callRuntimeCallbacks(onPreRuns);
|
|
9861
|
+
}
|
|
9862
|
+
function initRuntime() {
|
|
9863
|
+
runtimeInitialized = true;
|
|
9864
|
+
wasmExports["s"]();
|
|
9865
|
+
}
|
|
9866
|
+
function postRun() {
|
|
9867
|
+
if (Module["postRun"]) {
|
|
9868
|
+
if (typeof Module["postRun"] == "function") Module["postRun"] = [Module["postRun"]];
|
|
9869
|
+
while (Module["postRun"].length) {
|
|
9870
|
+
addOnPostRun(Module["postRun"].shift());
|
|
9871
|
+
}
|
|
9872
|
+
}
|
|
9873
|
+
callRuntimeCallbacks(onPostRuns);
|
|
9874
|
+
}
|
|
9875
|
+
function abort(what) {
|
|
9876
|
+
Module["onAbort"]?.(what);
|
|
9877
|
+
what = "Aborted(" + what + ")";
|
|
9878
|
+
err(what);
|
|
9879
|
+
ABORT = true;
|
|
9880
|
+
what += ". Build with -sASSERTIONS for more info.";
|
|
9881
|
+
var e = new WebAssembly.RuntimeError(what);
|
|
9882
|
+
readyPromiseReject?.(e);
|
|
9883
|
+
throw e;
|
|
9884
|
+
}
|
|
9885
|
+
var wasmBinaryFile;
|
|
9886
|
+
function findWasmBinary() {
|
|
9887
|
+
if (Module["locateFile"]) {
|
|
9888
|
+
return locateFile("openjpeg.wasm");
|
|
9889
|
+
}
|
|
9890
|
+
return new URL("openjpeg.wasm", import.meta.url).href;
|
|
9891
|
+
}
|
|
9892
|
+
function getBinarySync(file) {
|
|
9893
|
+
if (file == wasmBinaryFile && wasmBinary) {
|
|
9894
|
+
return new Uint8Array(wasmBinary);
|
|
9895
|
+
}
|
|
9896
|
+
if (readBinary) {
|
|
9897
|
+
return readBinary(file);
|
|
9898
|
+
}
|
|
9899
|
+
throw "both async and sync fetching of the wasm failed";
|
|
9900
|
+
}
|
|
9901
|
+
async function getWasmBinary(binaryFile) {
|
|
9902
|
+
if (!wasmBinary) {
|
|
9903
|
+
try {
|
|
9904
|
+
var response = await readAsync(binaryFile);
|
|
9905
|
+
return new Uint8Array(response);
|
|
9906
|
+
} catch {
|
|
9918
9907
|
}
|
|
9919
|
-
throw "both async and sync fetching of the wasm failed";
|
|
9920
9908
|
}
|
|
9921
|
-
|
|
9922
|
-
|
|
9923
|
-
|
|
9924
|
-
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
|
|
9928
|
-
|
|
9929
|
-
|
|
9909
|
+
return getBinarySync(binaryFile);
|
|
9910
|
+
}
|
|
9911
|
+
async function instantiateArrayBuffer(binaryFile, imports) {
|
|
9912
|
+
try {
|
|
9913
|
+
var binary = await getWasmBinary(binaryFile);
|
|
9914
|
+
var instance = await WebAssembly.instantiate(binary, imports);
|
|
9915
|
+
return instance;
|
|
9916
|
+
} catch (reason) {
|
|
9917
|
+
err(`failed to asynchronously prepare wasm: ${reason}`);
|
|
9918
|
+
abort(reason);
|
|
9930
9919
|
}
|
|
9931
|
-
|
|
9920
|
+
}
|
|
9921
|
+
async function instantiateAsync(binary, binaryFile, imports) {
|
|
9922
|
+
if (!binary) {
|
|
9932
9923
|
try {
|
|
9933
|
-
var
|
|
9934
|
-
var
|
|
9935
|
-
return
|
|
9924
|
+
var response = fetch(binaryFile, { credentials: "same-origin" });
|
|
9925
|
+
var instantiationResult = await WebAssembly.instantiateStreaming(response, imports);
|
|
9926
|
+
return instantiationResult;
|
|
9936
9927
|
} catch (reason) {
|
|
9937
|
-
err(`
|
|
9938
|
-
|
|
9928
|
+
err(`wasm streaming compile failed: ${reason}`);
|
|
9929
|
+
err("falling back to ArrayBuffer instantiation");
|
|
9939
9930
|
}
|
|
9940
9931
|
}
|
|
9941
|
-
|
|
9942
|
-
|
|
9943
|
-
|
|
9944
|
-
|
|
9945
|
-
|
|
9946
|
-
|
|
9947
|
-
|
|
9948
|
-
|
|
9949
|
-
|
|
9950
|
-
|
|
9951
|
-
|
|
9952
|
-
return
|
|
9932
|
+
return instantiateArrayBuffer(binaryFile, imports);
|
|
9933
|
+
}
|
|
9934
|
+
function getWasmImports() {
|
|
9935
|
+
return { a: wasmImports };
|
|
9936
|
+
}
|
|
9937
|
+
async function createWasm() {
|
|
9938
|
+
function receiveInstance(instance, module) {
|
|
9939
|
+
wasmExports = instance.exports;
|
|
9940
|
+
wasmMemory = wasmExports["r"];
|
|
9941
|
+
updateMemoryViews();
|
|
9942
|
+
assignWasmExports(wasmExports);
|
|
9943
|
+
return wasmExports;
|
|
9953
9944
|
}
|
|
9954
|
-
function
|
|
9955
|
-
return
|
|
9945
|
+
function receiveInstantiationResult(result2) {
|
|
9946
|
+
return receiveInstance(result2["instance"]);
|
|
9956
9947
|
}
|
|
9957
|
-
|
|
9958
|
-
|
|
9959
|
-
|
|
9960
|
-
|
|
9961
|
-
|
|
9962
|
-
removeRunDependency("wasm-instantiate");
|
|
9963
|
-
return wasmExports;
|
|
9964
|
-
}
|
|
9965
|
-
addRunDependency("wasm-instantiate");
|
|
9966
|
-
function receiveInstantiationResult(result2) {
|
|
9967
|
-
return receiveInstance(result2["instance"]);
|
|
9968
|
-
}
|
|
9969
|
-
var info2 = getWasmImports();
|
|
9970
|
-
if (Module["instantiateWasm"]) {
|
|
9971
|
-
return new Promise((resolve, reject) => {
|
|
9972
|
-
Module["instantiateWasm"](info2, (mod, inst) => {
|
|
9973
|
-
resolve(receiveInstance(mod, inst));
|
|
9974
|
-
});
|
|
9948
|
+
var info2 = getWasmImports();
|
|
9949
|
+
if (Module["instantiateWasm"]) {
|
|
9950
|
+
return new Promise((resolve, reject) => {
|
|
9951
|
+
Module["instantiateWasm"](info2, (mod, inst) => {
|
|
9952
|
+
resolve(receiveInstance(mod, inst));
|
|
9975
9953
|
});
|
|
9976
|
-
}
|
|
9977
|
-
wasmBinaryFile ?? (wasmBinaryFile = findWasmBinary());
|
|
9978
|
-
try {
|
|
9979
|
-
var result = await instantiateAsync(wasmBinary, wasmBinaryFile, info2);
|
|
9980
|
-
var exports = receiveInstantiationResult(result);
|
|
9981
|
-
return exports;
|
|
9982
|
-
} catch (e) {
|
|
9983
|
-
readyPromiseReject(e);
|
|
9984
|
-
return Promise.reject(e);
|
|
9985
|
-
}
|
|
9954
|
+
});
|
|
9986
9955
|
}
|
|
9987
|
-
|
|
9988
|
-
|
|
9989
|
-
|
|
9990
|
-
|
|
9991
|
-
|
|
9992
|
-
|
|
9956
|
+
wasmBinaryFile ?? (wasmBinaryFile = findWasmBinary());
|
|
9957
|
+
var result = await instantiateAsync(wasmBinary, wasmBinaryFile, info2);
|
|
9958
|
+
var exports = receiveInstantiationResult(result);
|
|
9959
|
+
return exports;
|
|
9960
|
+
}
|
|
9961
|
+
class ExitStatus {
|
|
9962
|
+
constructor(status) {
|
|
9963
|
+
__publicField(this, "name", "ExitStatus");
|
|
9964
|
+
this.message = `Program terminated with exit(${status})`;
|
|
9965
|
+
this.status = status;
|
|
9993
9966
|
}
|
|
9994
|
-
|
|
9995
|
-
|
|
9996
|
-
|
|
9997
|
-
|
|
9998
|
-
}
|
|
9999
|
-
|
|
10000
|
-
|
|
10001
|
-
|
|
10002
|
-
|
|
10003
|
-
|
|
10004
|
-
|
|
10005
|
-
|
|
10006
|
-
|
|
10007
|
-
|
|
10008
|
-
|
|
10009
|
-
|
|
10010
|
-
|
|
10011
|
-
|
|
10012
|
-
|
|
10013
|
-
|
|
10014
|
-
|
|
10015
|
-
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
|
|
10019
|
-
|
|
10020
|
-
|
|
10021
|
-
|
|
10022
|
-
|
|
10023
|
-
|
|
10024
|
-
|
|
10025
|
-
|
|
10026
|
-
|
|
10027
|
-
|
|
10028
|
-
|
|
10029
|
-
|
|
10030
|
-
|
|
10031
|
-
|
|
10032
|
-
|
|
10033
|
-
|
|
10034
|
-
_exit(EXITSTATUS);
|
|
10035
|
-
} catch (e) {
|
|
10036
|
-
handleException(e);
|
|
10037
|
-
}
|
|
10038
|
-
}
|
|
10039
|
-
};
|
|
10040
|
-
var callUserCallback = (func) => {
|
|
10041
|
-
if (ABORT) {
|
|
10042
|
-
return;
|
|
10043
|
-
}
|
|
9967
|
+
}
|
|
9968
|
+
var callRuntimeCallbacks = (callbacks) => {
|
|
9969
|
+
while (callbacks.length > 0) {
|
|
9970
|
+
callbacks.shift()(Module);
|
|
9971
|
+
}
|
|
9972
|
+
};
|
|
9973
|
+
var onPostRuns = [];
|
|
9974
|
+
var addOnPostRun = (cb) => onPostRuns.push(cb);
|
|
9975
|
+
var onPreRuns = [];
|
|
9976
|
+
var addOnPreRun = (cb) => onPreRuns.push(cb);
|
|
9977
|
+
var noExitRuntime = true;
|
|
9978
|
+
var __abort_js = () => abort("");
|
|
9979
|
+
var runtimeKeepaliveCounter = 0;
|
|
9980
|
+
var __emscripten_runtime_keepalive_clear = () => {
|
|
9981
|
+
noExitRuntime = false;
|
|
9982
|
+
runtimeKeepaliveCounter = 0;
|
|
9983
|
+
};
|
|
9984
|
+
var timers = {};
|
|
9985
|
+
var handleException = (e) => {
|
|
9986
|
+
if (e instanceof ExitStatus || e == "unwind") {
|
|
9987
|
+
return EXITSTATUS;
|
|
9988
|
+
}
|
|
9989
|
+
quit_(1, e);
|
|
9990
|
+
};
|
|
9991
|
+
var keepRuntimeAlive = () => noExitRuntime || runtimeKeepaliveCounter > 0;
|
|
9992
|
+
var _proc_exit = (code) => {
|
|
9993
|
+
EXITSTATUS = code;
|
|
9994
|
+
if (!keepRuntimeAlive()) {
|
|
9995
|
+
Module["onExit"]?.(code);
|
|
9996
|
+
ABORT = true;
|
|
9997
|
+
}
|
|
9998
|
+
quit_(code, new ExitStatus(code));
|
|
9999
|
+
};
|
|
10000
|
+
var exitJS = (status, implicit) => {
|
|
10001
|
+
EXITSTATUS = status;
|
|
10002
|
+
_proc_exit(status);
|
|
10003
|
+
};
|
|
10004
|
+
var _exit = exitJS;
|
|
10005
|
+
var maybeExit = () => {
|
|
10006
|
+
if (!keepRuntimeAlive()) {
|
|
10044
10007
|
try {
|
|
10045
|
-
|
|
10046
|
-
maybeExit();
|
|
10008
|
+
_exit(EXITSTATUS);
|
|
10047
10009
|
} catch (e) {
|
|
10048
10010
|
handleException(e);
|
|
10049
10011
|
}
|
|
10050
|
-
}
|
|
10051
|
-
|
|
10052
|
-
|
|
10053
|
-
|
|
10054
|
-
|
|
10055
|
-
|
|
10056
|
-
|
|
10057
|
-
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
|
|
10063
|
-
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
|
|
10067
|
-
|
|
10068
|
-
|
|
10069
|
-
|
|
10070
|
-
|
|
10071
|
-
|
|
10072
|
-
|
|
10073
|
-
|
|
10074
|
-
|
|
10075
|
-
|
|
10076
|
-
|
|
10077
|
-
|
|
10078
|
-
|
|
10079
|
-
|
|
10080
|
-
|
|
10081
|
-
|
|
10082
|
-
|
|
10083
|
-
|
|
10084
|
-
|
|
10085
|
-
|
|
10086
|
-
|
|
10087
|
-
|
|
10088
|
-
|
|
10089
|
-
|
|
10090
|
-
|
|
10091
|
-
|
|
10092
|
-
|
|
10093
|
-
|
|
10094
|
-
|
|
10095
|
-
|
|
10096
|
-
|
|
10097
|
-
|
|
10098
|
-
|
|
10099
|
-
|
|
10100
|
-
|
|
10101
|
-
|
|
10102
|
-
|
|
10103
|
-
|
|
10104
|
-
|
|
10105
|
-
|
|
10106
|
-
|
|
10107
|
-
|
|
10108
|
-
|
|
10109
|
-
|
|
10110
|
-
|
|
10111
|
-
|
|
10112
|
-
|
|
10113
|
-
|
|
10114
|
-
|
|
10115
|
-
|
|
10116
|
-
|
|
10117
|
-
|
|
10118
|
-
|
|
10119
|
-
|
|
10120
|
-
|
|
10121
|
-
|
|
10122
|
-
|
|
10123
|
-
|
|
10124
|
-
|
|
10125
|
-
|
|
10126
|
-
|
|
10127
|
-
|
|
10128
|
-
|
|
10129
|
-
|
|
10012
|
+
}
|
|
10013
|
+
};
|
|
10014
|
+
var callUserCallback = (func) => {
|
|
10015
|
+
if (ABORT) {
|
|
10016
|
+
return;
|
|
10017
|
+
}
|
|
10018
|
+
try {
|
|
10019
|
+
func();
|
|
10020
|
+
maybeExit();
|
|
10021
|
+
} catch (e) {
|
|
10022
|
+
handleException(e);
|
|
10023
|
+
}
|
|
10024
|
+
};
|
|
10025
|
+
var _emscripten_get_now = () => performance.now();
|
|
10026
|
+
var __setitimer_js = (which, timeout_ms) => {
|
|
10027
|
+
if (timers[which]) {
|
|
10028
|
+
clearTimeout(timers[which].id);
|
|
10029
|
+
delete timers[which];
|
|
10030
|
+
}
|
|
10031
|
+
if (!timeout_ms) return 0;
|
|
10032
|
+
var id = setTimeout(() => {
|
|
10033
|
+
delete timers[which];
|
|
10034
|
+
callUserCallback(() => __emscripten_timeout(which, _emscripten_get_now()));
|
|
10035
|
+
}, timeout_ms);
|
|
10036
|
+
timers[which] = { id, timeout_ms };
|
|
10037
|
+
return 0;
|
|
10038
|
+
};
|
|
10039
|
+
function _copy_pixels_1(compG_ptr, nb_pixels) {
|
|
10040
|
+
compG_ptr >>= 2;
|
|
10041
|
+
const imageData = Module.imageData = new Uint8ClampedArray(nb_pixels);
|
|
10042
|
+
const compG = HEAP32.subarray(compG_ptr, compG_ptr + nb_pixels);
|
|
10043
|
+
imageData.set(compG);
|
|
10044
|
+
}
|
|
10045
|
+
function _copy_pixels_3(compR_ptr, compG_ptr, compB_ptr, nb_pixels) {
|
|
10046
|
+
compR_ptr >>= 2;
|
|
10047
|
+
compG_ptr >>= 2;
|
|
10048
|
+
compB_ptr >>= 2;
|
|
10049
|
+
const imageData = Module.imageData = new Uint8ClampedArray(nb_pixels * 3);
|
|
10050
|
+
const compR = HEAP32.subarray(compR_ptr, compR_ptr + nb_pixels);
|
|
10051
|
+
const compG = HEAP32.subarray(compG_ptr, compG_ptr + nb_pixels);
|
|
10052
|
+
const compB = HEAP32.subarray(compB_ptr, compB_ptr + nb_pixels);
|
|
10053
|
+
for (let i = 0; i < nb_pixels; i++) {
|
|
10054
|
+
imageData[3 * i] = compR[i];
|
|
10055
|
+
imageData[3 * i + 1] = compG[i];
|
|
10056
|
+
imageData[3 * i + 2] = compB[i];
|
|
10057
|
+
}
|
|
10058
|
+
}
|
|
10059
|
+
function _copy_pixels_4(compR_ptr, compG_ptr, compB_ptr, compA_ptr, nb_pixels) {
|
|
10060
|
+
compR_ptr >>= 2;
|
|
10061
|
+
compG_ptr >>= 2;
|
|
10062
|
+
compB_ptr >>= 2;
|
|
10063
|
+
compA_ptr >>= 2;
|
|
10064
|
+
const imageData = Module.imageData = new Uint8ClampedArray(nb_pixels * 4);
|
|
10065
|
+
const compR = HEAP32.subarray(compR_ptr, compR_ptr + nb_pixels);
|
|
10066
|
+
const compG = HEAP32.subarray(compG_ptr, compG_ptr + nb_pixels);
|
|
10067
|
+
const compB = HEAP32.subarray(compB_ptr, compB_ptr + nb_pixels);
|
|
10068
|
+
const compA = HEAP32.subarray(compA_ptr, compA_ptr + nb_pixels);
|
|
10069
|
+
for (let i = 0; i < nb_pixels; i++) {
|
|
10070
|
+
imageData[4 * i] = compR[i];
|
|
10071
|
+
imageData[4 * i + 1] = compG[i];
|
|
10072
|
+
imageData[4 * i + 2] = compB[i];
|
|
10073
|
+
imageData[4 * i + 3] = compA[i];
|
|
10074
|
+
}
|
|
10075
|
+
}
|
|
10076
|
+
var getHeapMax = () => 2147483648;
|
|
10077
|
+
var alignMemory = (size, alignment) => Math.ceil(size / alignment) * alignment;
|
|
10078
|
+
var growMemory = (size) => {
|
|
10079
|
+
var oldHeapSize = wasmMemory.buffer.byteLength;
|
|
10080
|
+
var pages = (size - oldHeapSize + 65535) / 65536 | 0;
|
|
10081
|
+
try {
|
|
10082
|
+
wasmMemory.grow(pages);
|
|
10083
|
+
updateMemoryViews();
|
|
10084
|
+
return 1;
|
|
10085
|
+
} catch (e) {
|
|
10086
|
+
}
|
|
10087
|
+
};
|
|
10088
|
+
var _emscripten_resize_heap = (requestedSize) => {
|
|
10089
|
+
var oldSize = HEAPU8.length;
|
|
10090
|
+
requestedSize >>>= 0;
|
|
10091
|
+
var maxHeapSize = getHeapMax();
|
|
10092
|
+
if (requestedSize > maxHeapSize) {
|
|
10130
10093
|
return false;
|
|
10131
|
-
}
|
|
10132
|
-
var
|
|
10133
|
-
|
|
10134
|
-
|
|
10135
|
-
|
|
10136
|
-
|
|
10137
|
-
|
|
10138
|
-
|
|
10139
|
-
if (ENV[x] === void 0) delete env[x];
|
|
10140
|
-
else env[x] = ENV[x];
|
|
10141
|
-
}
|
|
10142
|
-
var strings = [];
|
|
10143
|
-
for (var x in env) {
|
|
10144
|
-
strings.push(`${x}=${env[x]}`);
|
|
10145
|
-
}
|
|
10146
|
-
getEnvStrings.strings = strings;
|
|
10147
|
-
}
|
|
10148
|
-
return getEnvStrings.strings;
|
|
10149
|
-
};
|
|
10150
|
-
var stringToUTF8Array = (str, heap, outIdx, maxBytesToWrite) => {
|
|
10151
|
-
if (!(maxBytesToWrite > 0)) return 0;
|
|
10152
|
-
var startIdx = outIdx;
|
|
10153
|
-
var endIdx = outIdx + maxBytesToWrite - 1;
|
|
10154
|
-
for (var i = 0; i < str.length; ++i) {
|
|
10155
|
-
var u = str.charCodeAt(i);
|
|
10156
|
-
if (u >= 55296 && u <= 57343) {
|
|
10157
|
-
var u1 = str.charCodeAt(++i);
|
|
10158
|
-
u = 65536 + ((u & 1023) << 10) | u1 & 1023;
|
|
10159
|
-
}
|
|
10160
|
-
if (u <= 127) {
|
|
10161
|
-
if (outIdx >= endIdx) break;
|
|
10162
|
-
heap[outIdx++] = u;
|
|
10163
|
-
} else if (u <= 2047) {
|
|
10164
|
-
if (outIdx + 1 >= endIdx) break;
|
|
10165
|
-
heap[outIdx++] = 192 | u >> 6;
|
|
10166
|
-
heap[outIdx++] = 128 | u & 63;
|
|
10167
|
-
} else if (u <= 65535) {
|
|
10168
|
-
if (outIdx + 2 >= endIdx) break;
|
|
10169
|
-
heap[outIdx++] = 224 | u >> 12;
|
|
10170
|
-
heap[outIdx++] = 128 | u >> 6 & 63;
|
|
10171
|
-
heap[outIdx++] = 128 | u & 63;
|
|
10172
|
-
} else {
|
|
10173
|
-
if (outIdx + 3 >= endIdx) break;
|
|
10174
|
-
heap[outIdx++] = 240 | u >> 18;
|
|
10175
|
-
heap[outIdx++] = 128 | u >> 12 & 63;
|
|
10176
|
-
heap[outIdx++] = 128 | u >> 6 & 63;
|
|
10177
|
-
heap[outIdx++] = 128 | u & 63;
|
|
10178
|
-
}
|
|
10179
|
-
}
|
|
10180
|
-
heap[outIdx] = 0;
|
|
10181
|
-
return outIdx - startIdx;
|
|
10182
|
-
};
|
|
10183
|
-
var stringToUTF8 = (str, outPtr, maxBytesToWrite) => stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite);
|
|
10184
|
-
var _environ_get = (__environ, environ_buf) => {
|
|
10185
|
-
var bufSize = 0;
|
|
10186
|
-
var envp = 0;
|
|
10187
|
-
for (var string of getEnvStrings()) {
|
|
10188
|
-
var ptr = environ_buf + bufSize;
|
|
10189
|
-
HEAPU32[__environ + envp >> 2] = ptr;
|
|
10190
|
-
bufSize += stringToUTF8(string, ptr, Infinity) + 1;
|
|
10191
|
-
envp += 4;
|
|
10192
|
-
}
|
|
10193
|
-
return 0;
|
|
10194
|
-
};
|
|
10195
|
-
var lengthBytesUTF8 = (str) => {
|
|
10196
|
-
var len = 0;
|
|
10197
|
-
for (var i = 0; i < str.length; ++i) {
|
|
10198
|
-
var c = str.charCodeAt(i);
|
|
10199
|
-
if (c <= 127) {
|
|
10200
|
-
len++;
|
|
10201
|
-
} else if (c <= 2047) {
|
|
10202
|
-
len += 2;
|
|
10203
|
-
} else if (c >= 55296 && c <= 57343) {
|
|
10204
|
-
len += 4;
|
|
10205
|
-
++i;
|
|
10206
|
-
} else {
|
|
10207
|
-
len += 3;
|
|
10208
|
-
}
|
|
10209
|
-
}
|
|
10210
|
-
return len;
|
|
10211
|
-
};
|
|
10212
|
-
var _environ_sizes_get = (penviron_count, penviron_buf_size) => {
|
|
10213
|
-
var strings = getEnvStrings();
|
|
10214
|
-
HEAPU32[penviron_count >> 2] = strings.length;
|
|
10215
|
-
var bufSize = 0;
|
|
10216
|
-
for (var string of strings) {
|
|
10217
|
-
bufSize += lengthBytesUTF8(string) + 1;
|
|
10218
|
-
}
|
|
10219
|
-
HEAPU32[penviron_buf_size >> 2] = bufSize;
|
|
10220
|
-
return 0;
|
|
10221
|
-
};
|
|
10222
|
-
var _fd_close = (fd) => 52;
|
|
10223
|
-
var INT53_MAX = 9007199254740992;
|
|
10224
|
-
var INT53_MIN = -9007199254740992;
|
|
10225
|
-
var bigintToI53Checked = (num) => num < INT53_MIN || num > INT53_MAX ? NaN : Number(num);
|
|
10226
|
-
function _fd_seek(fd, offset, whence, newOffset) {
|
|
10227
|
-
offset = bigintToI53Checked(offset);
|
|
10228
|
-
return 70;
|
|
10229
|
-
}
|
|
10230
|
-
var printCharBuffers = [null, [], []];
|
|
10231
|
-
var UTF8Decoder = typeof TextDecoder != "undefined" ? new TextDecoder() : void 0;
|
|
10232
|
-
var UTF8ArrayToString = (heapOrArray, idx = 0, maxBytesToRead = NaN) => {
|
|
10233
|
-
var endIdx = idx + maxBytesToRead;
|
|
10234
|
-
var endPtr = idx;
|
|
10235
|
-
while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr;
|
|
10236
|
-
if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {
|
|
10237
|
-
return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr));
|
|
10238
|
-
}
|
|
10239
|
-
var str = "";
|
|
10240
|
-
while (idx < endPtr) {
|
|
10241
|
-
var u0 = heapOrArray[idx++];
|
|
10242
|
-
if (!(u0 & 128)) {
|
|
10243
|
-
str += String.fromCharCode(u0);
|
|
10244
|
-
continue;
|
|
10245
|
-
}
|
|
10246
|
-
var u1 = heapOrArray[idx++] & 63;
|
|
10247
|
-
if ((u0 & 224) == 192) {
|
|
10248
|
-
str += String.fromCharCode((u0 & 31) << 6 | u1);
|
|
10249
|
-
continue;
|
|
10250
|
-
}
|
|
10251
|
-
var u2 = heapOrArray[idx++] & 63;
|
|
10252
|
-
if ((u0 & 240) == 224) {
|
|
10253
|
-
u0 = (u0 & 15) << 12 | u1 << 6 | u2;
|
|
10254
|
-
} else {
|
|
10255
|
-
u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63;
|
|
10256
|
-
}
|
|
10257
|
-
if (u0 < 65536) {
|
|
10258
|
-
str += String.fromCharCode(u0);
|
|
10259
|
-
} else {
|
|
10260
|
-
var ch3 = u0 - 65536;
|
|
10261
|
-
str += String.fromCharCode(55296 | ch3 >> 10, 56320 | ch3 & 1023);
|
|
10262
|
-
}
|
|
10094
|
+
}
|
|
10095
|
+
for (var cutDown = 1; cutDown <= 4; cutDown *= 2) {
|
|
10096
|
+
var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown);
|
|
10097
|
+
overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296);
|
|
10098
|
+
var newSize = Math.min(maxHeapSize, alignMemory(Math.max(requestedSize, overGrownHeapSize), 65536));
|
|
10099
|
+
var replacement = growMemory(newSize);
|
|
10100
|
+
if (replacement) {
|
|
10101
|
+
return true;
|
|
10263
10102
|
}
|
|
10264
|
-
|
|
10265
|
-
|
|
10266
|
-
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
|
|
10103
|
+
}
|
|
10104
|
+
return false;
|
|
10105
|
+
};
|
|
10106
|
+
var ENV = {};
|
|
10107
|
+
var getExecutableName = () => thisProgram || "./this.program";
|
|
10108
|
+
var getEnvStrings = () => {
|
|
10109
|
+
if (!getEnvStrings.strings) {
|
|
10110
|
+
var lang = (typeof navigator == "object" && navigator.language || "C").replace("-", "_") + ".UTF-8";
|
|
10111
|
+
var env = { USER: "web_user", LOGNAME: "web_user", PATH: "/", PWD: "/", HOME: "/home/web_user", LANG: lang, _: getExecutableName() };
|
|
10112
|
+
for (var x in ENV) {
|
|
10113
|
+
if (ENV[x] === void 0) delete env[x];
|
|
10114
|
+
else env[x] = ENV[x];
|
|
10115
|
+
}
|
|
10116
|
+
var strings = [];
|
|
10117
|
+
for (var x in env) {
|
|
10118
|
+
strings.push(`${x}=${env[x]}`);
|
|
10119
|
+
}
|
|
10120
|
+
getEnvStrings.strings = strings;
|
|
10121
|
+
}
|
|
10122
|
+
return getEnvStrings.strings;
|
|
10123
|
+
};
|
|
10124
|
+
var stringToUTF8Array = (str, heap, outIdx, maxBytesToWrite) => {
|
|
10125
|
+
if (!(maxBytesToWrite > 0)) return 0;
|
|
10126
|
+
var startIdx = outIdx;
|
|
10127
|
+
var endIdx = outIdx + maxBytesToWrite - 1;
|
|
10128
|
+
for (var i = 0; i < str.length; ++i) {
|
|
10129
|
+
var u = str.codePointAt(i);
|
|
10130
|
+
if (u <= 127) {
|
|
10131
|
+
if (outIdx >= endIdx) break;
|
|
10132
|
+
heap[outIdx++] = u;
|
|
10133
|
+
} else if (u <= 2047) {
|
|
10134
|
+
if (outIdx + 1 >= endIdx) break;
|
|
10135
|
+
heap[outIdx++] = 192 | u >> 6;
|
|
10136
|
+
heap[outIdx++] = 128 | u & 63;
|
|
10137
|
+
} else if (u <= 65535) {
|
|
10138
|
+
if (outIdx + 2 >= endIdx) break;
|
|
10139
|
+
heap[outIdx++] = 224 | u >> 12;
|
|
10140
|
+
heap[outIdx++] = 128 | u >> 6 & 63;
|
|
10141
|
+
heap[outIdx++] = 128 | u & 63;
|
|
10271
10142
|
} else {
|
|
10272
|
-
|
|
10143
|
+
if (outIdx + 3 >= endIdx) break;
|
|
10144
|
+
heap[outIdx++] = 240 | u >> 18;
|
|
10145
|
+
heap[outIdx++] = 128 | u >> 12 & 63;
|
|
10146
|
+
heap[outIdx++] = 128 | u >> 6 & 63;
|
|
10147
|
+
heap[outIdx++] = 128 | u & 63;
|
|
10148
|
+
i++;
|
|
10273
10149
|
}
|
|
10274
|
-
}
|
|
10275
|
-
|
|
10276
|
-
|
|
10277
|
-
|
|
10278
|
-
|
|
10279
|
-
|
|
10280
|
-
|
|
10281
|
-
|
|
10282
|
-
|
|
10283
|
-
|
|
10284
|
-
|
|
10285
|
-
|
|
10286
|
-
|
|
10287
|
-
|
|
10288
|
-
|
|
10289
|
-
|
|
10290
|
-
|
|
10291
|
-
|
|
10292
|
-
|
|
10293
|
-
|
|
10294
|
-
|
|
10295
|
-
|
|
10296
|
-
|
|
10297
|
-
|
|
10298
|
-
|
|
10299
|
-
|
|
10300
|
-
|
|
10301
|
-
compA_ptr >>= 2;
|
|
10302
|
-
const imageData = Module.imageData = new Uint8ClampedArray(nb_pixels * 4);
|
|
10303
|
-
const compG = HEAP32.subarray(compG_ptr, compG_ptr + nb_pixels);
|
|
10304
|
-
const compA = HEAP32.subarray(compA_ptr, compA_ptr + nb_pixels);
|
|
10305
|
-
for (let i = 0; i < nb_pixels; i++) {
|
|
10306
|
-
imageData[4 * i] = imageData[4 * i + 1] = imageData[4 * i + 2] = compG[i];
|
|
10307
|
-
imageData[4 * i + 3] = compA[i];
|
|
10308
|
-
}
|
|
10309
|
-
}
|
|
10310
|
-
function _jsPrintWarning(message_ptr) {
|
|
10311
|
-
const message = UTF8ToString(message_ptr);
|
|
10312
|
-
(Module.warn || console.warn)(`OpenJPEG: ${message}`);
|
|
10313
|
-
}
|
|
10314
|
-
function _rgb_to_rgba(compR_ptr, compG_ptr, compB_ptr, nb_pixels) {
|
|
10315
|
-
compR_ptr >>= 2;
|
|
10316
|
-
compG_ptr >>= 2;
|
|
10317
|
-
compB_ptr >>= 2;
|
|
10318
|
-
const imageData = Module.imageData = new Uint8ClampedArray(nb_pixels * 4);
|
|
10319
|
-
const compR = HEAP32.subarray(compR_ptr, compR_ptr + nb_pixels);
|
|
10320
|
-
const compG = HEAP32.subarray(compG_ptr, compG_ptr + nb_pixels);
|
|
10321
|
-
const compB = HEAP32.subarray(compB_ptr, compB_ptr + nb_pixels);
|
|
10322
|
-
for (let i = 0; i < nb_pixels; i++) {
|
|
10323
|
-
imageData[4 * i] = compR[i];
|
|
10324
|
-
imageData[4 * i + 1] = compG[i];
|
|
10325
|
-
imageData[4 * i + 2] = compB[i];
|
|
10326
|
-
imageData[4 * i + 3] = 255;
|
|
10327
|
-
}
|
|
10328
|
-
}
|
|
10329
|
-
function _storeErrorMessage(message_ptr) {
|
|
10330
|
-
const message = UTF8ToString(message_ptr);
|
|
10331
|
-
if (!Module.errorMessages) {
|
|
10332
|
-
Module.errorMessages = message;
|
|
10150
|
+
}
|
|
10151
|
+
heap[outIdx] = 0;
|
|
10152
|
+
return outIdx - startIdx;
|
|
10153
|
+
};
|
|
10154
|
+
var stringToUTF8 = (str, outPtr, maxBytesToWrite) => stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite);
|
|
10155
|
+
var _environ_get = (__environ, environ_buf) => {
|
|
10156
|
+
var bufSize = 0;
|
|
10157
|
+
var envp = 0;
|
|
10158
|
+
for (var string of getEnvStrings()) {
|
|
10159
|
+
var ptr = environ_buf + bufSize;
|
|
10160
|
+
HEAPU32[__environ + envp >> 2] = ptr;
|
|
10161
|
+
bufSize += stringToUTF8(string, ptr, Infinity) + 1;
|
|
10162
|
+
envp += 4;
|
|
10163
|
+
}
|
|
10164
|
+
return 0;
|
|
10165
|
+
};
|
|
10166
|
+
var lengthBytesUTF8 = (str) => {
|
|
10167
|
+
var len = 0;
|
|
10168
|
+
for (var i = 0; i < str.length; ++i) {
|
|
10169
|
+
var c = str.charCodeAt(i);
|
|
10170
|
+
if (c <= 127) {
|
|
10171
|
+
len++;
|
|
10172
|
+
} else if (c <= 2047) {
|
|
10173
|
+
len += 2;
|
|
10174
|
+
} else if (c >= 55296 && c <= 57343) {
|
|
10175
|
+
len += 4;
|
|
10176
|
+
++i;
|
|
10333
10177
|
} else {
|
|
10334
|
-
|
|
10178
|
+
len += 3;
|
|
10335
10179
|
}
|
|
10336
10180
|
}
|
|
10337
|
-
|
|
10338
|
-
|
|
10339
|
-
|
|
10340
|
-
|
|
10341
|
-
|
|
10342
|
-
|
|
10343
|
-
|
|
10344
|
-
|
|
10345
|
-
|
|
10346
|
-
|
|
10347
|
-
|
|
10348
|
-
|
|
10349
|
-
|
|
10350
|
-
|
|
10351
|
-
|
|
10352
|
-
|
|
10353
|
-
|
|
10354
|
-
|
|
10355
|
-
|
|
10356
|
-
|
|
10357
|
-
|
|
10358
|
-
|
|
10359
|
-
|
|
10181
|
+
return len;
|
|
10182
|
+
};
|
|
10183
|
+
var _environ_sizes_get = (penviron_count, penviron_buf_size) => {
|
|
10184
|
+
var strings = getEnvStrings();
|
|
10185
|
+
HEAPU32[penviron_count >> 2] = strings.length;
|
|
10186
|
+
var bufSize = 0;
|
|
10187
|
+
for (var string of strings) {
|
|
10188
|
+
bufSize += lengthBytesUTF8(string) + 1;
|
|
10189
|
+
}
|
|
10190
|
+
HEAPU32[penviron_buf_size >> 2] = bufSize;
|
|
10191
|
+
return 0;
|
|
10192
|
+
};
|
|
10193
|
+
var INT53_MAX = 9007199254740992;
|
|
10194
|
+
var INT53_MIN = -9007199254740992;
|
|
10195
|
+
var bigintToI53Checked = (num) => num < INT53_MIN || num > INT53_MAX ? NaN : Number(num);
|
|
10196
|
+
function _fd_seek(fd, offset, whence, newOffset) {
|
|
10197
|
+
offset = bigintToI53Checked(offset);
|
|
10198
|
+
return 70;
|
|
10199
|
+
}
|
|
10200
|
+
var printCharBuffers = [null, [], []];
|
|
10201
|
+
var UTF8Decoder = typeof TextDecoder != "undefined" ? new TextDecoder() : void 0;
|
|
10202
|
+
var findStringEnd = (heapOrArray, idx, maxBytesToRead, ignoreNul) => {
|
|
10203
|
+
var maxIdx = idx + maxBytesToRead;
|
|
10204
|
+
if (ignoreNul) return maxIdx;
|
|
10205
|
+
while (heapOrArray[idx] && !(idx >= maxIdx)) ++idx;
|
|
10206
|
+
return idx;
|
|
10207
|
+
};
|
|
10208
|
+
var UTF8ArrayToString = (heapOrArray, idx = 0, maxBytesToRead, ignoreNul) => {
|
|
10209
|
+
var endPtr = findStringEnd(heapOrArray, idx, maxBytesToRead, ignoreNul);
|
|
10210
|
+
if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {
|
|
10211
|
+
return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr));
|
|
10212
|
+
}
|
|
10213
|
+
var str = "";
|
|
10214
|
+
while (idx < endPtr) {
|
|
10215
|
+
var u0 = heapOrArray[idx++];
|
|
10216
|
+
if (!(u0 & 128)) {
|
|
10217
|
+
str += String.fromCharCode(u0);
|
|
10218
|
+
continue;
|
|
10360
10219
|
}
|
|
10361
|
-
|
|
10362
|
-
if (
|
|
10363
|
-
|
|
10364
|
-
|
|
10220
|
+
var u1 = heapOrArray[idx++] & 63;
|
|
10221
|
+
if ((u0 & 224) == 192) {
|
|
10222
|
+
str += String.fromCharCode((u0 & 31) << 6 | u1);
|
|
10223
|
+
continue;
|
|
10365
10224
|
}
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
initRuntime();
|
|
10370
|
-
readyPromiseResolve(Module);
|
|
10371
|
-
Module["onRuntimeInitialized"]?.();
|
|
10372
|
-
postRun();
|
|
10373
|
-
}
|
|
10374
|
-
if (Module["setStatus"]) {
|
|
10375
|
-
Module["setStatus"]("Running...");
|
|
10376
|
-
setTimeout(() => {
|
|
10377
|
-
setTimeout(() => Module["setStatus"](""), 1);
|
|
10378
|
-
doRun();
|
|
10379
|
-
}, 1);
|
|
10225
|
+
var u2 = heapOrArray[idx++] & 63;
|
|
10226
|
+
if ((u0 & 240) == 224) {
|
|
10227
|
+
u0 = (u0 & 15) << 12 | u1 << 6 | u2;
|
|
10380
10228
|
} else {
|
|
10381
|
-
|
|
10229
|
+
u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63;
|
|
10382
10230
|
}
|
|
10383
|
-
|
|
10384
|
-
|
|
10385
|
-
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
Module["preInit"].shift()();
|
|
10389
|
-
}
|
|
10231
|
+
if (u0 < 65536) {
|
|
10232
|
+
str += String.fromCharCode(u0);
|
|
10233
|
+
} else {
|
|
10234
|
+
var ch3 = u0 - 65536;
|
|
10235
|
+
str += String.fromCharCode(55296 | ch3 >> 10, 56320 | ch3 & 1023);
|
|
10390
10236
|
}
|
|
10391
10237
|
}
|
|
10392
|
-
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
|
|
10397
|
-
|
|
10238
|
+
return str;
|
|
10239
|
+
};
|
|
10240
|
+
var printChar = (stream, curr) => {
|
|
10241
|
+
var buffer = printCharBuffers[stream];
|
|
10242
|
+
if (curr === 0 || curr === 10) {
|
|
10243
|
+
(stream === 1 ? out : err)(UTF8ArrayToString(buffer));
|
|
10244
|
+
buffer.length = 0;
|
|
10245
|
+
} else {
|
|
10246
|
+
buffer.push(curr);
|
|
10247
|
+
}
|
|
10248
|
+
};
|
|
10249
|
+
var UTF8ToString = (ptr, maxBytesToRead, ignoreNul) => ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead, ignoreNul) : "";
|
|
10250
|
+
var _fd_write = (fd, iov, iovcnt, pnum) => {
|
|
10251
|
+
var num = 0;
|
|
10252
|
+
for (var i = 0; i < iovcnt; i++) {
|
|
10253
|
+
var ptr = HEAPU32[iov >> 2];
|
|
10254
|
+
var len = HEAPU32[iov + 4 >> 2];
|
|
10255
|
+
iov += 8;
|
|
10256
|
+
for (var j = 0; j < len; j++) {
|
|
10257
|
+
printChar(fd, HEAPU8[ptr + j]);
|
|
10258
|
+
}
|
|
10259
|
+
num += len;
|
|
10260
|
+
}
|
|
10261
|
+
HEAPU32[pnum >> 2] = num;
|
|
10262
|
+
return 0;
|
|
10263
|
+
};
|
|
10264
|
+
function _gray_to_rgba(compG_ptr, nb_pixels) {
|
|
10265
|
+
compG_ptr >>= 2;
|
|
10266
|
+
const imageData = Module.imageData = new Uint8ClampedArray(nb_pixels * 4);
|
|
10267
|
+
const compG = HEAP32.subarray(compG_ptr, compG_ptr + nb_pixels);
|
|
10268
|
+
for (let i = 0; i < nb_pixels; i++) {
|
|
10269
|
+
imageData[4 * i] = imageData[4 * i + 1] = imageData[4 * i + 2] = compG[i];
|
|
10270
|
+
imageData[4 * i + 3] = 255;
|
|
10271
|
+
}
|
|
10272
|
+
}
|
|
10273
|
+
function _graya_to_rgba(compG_ptr, compA_ptr, nb_pixels) {
|
|
10274
|
+
compG_ptr >>= 2;
|
|
10275
|
+
compA_ptr >>= 2;
|
|
10276
|
+
const imageData = Module.imageData = new Uint8ClampedArray(nb_pixels * 4);
|
|
10277
|
+
const compG = HEAP32.subarray(compG_ptr, compG_ptr + nb_pixels);
|
|
10278
|
+
const compA = HEAP32.subarray(compA_ptr, compA_ptr + nb_pixels);
|
|
10279
|
+
for (let i = 0; i < nb_pixels; i++) {
|
|
10280
|
+
imageData[4 * i] = imageData[4 * i + 1] = imageData[4 * i + 2] = compG[i];
|
|
10281
|
+
imageData[4 * i + 3] = compA[i];
|
|
10282
|
+
}
|
|
10283
|
+
}
|
|
10284
|
+
function _jsPrintWarning(message_ptr) {
|
|
10285
|
+
const message = UTF8ToString(message_ptr);
|
|
10286
|
+
(Module.warn || console.warn)(`OpenJPEG: ${message}`);
|
|
10287
|
+
}
|
|
10288
|
+
function _rgb_to_rgba(compR_ptr, compG_ptr, compB_ptr, nb_pixels) {
|
|
10289
|
+
compR_ptr >>= 2;
|
|
10290
|
+
compG_ptr >>= 2;
|
|
10291
|
+
compB_ptr >>= 2;
|
|
10292
|
+
const imageData = Module.imageData = new Uint8ClampedArray(nb_pixels * 4);
|
|
10293
|
+
const compR = HEAP32.subarray(compR_ptr, compR_ptr + nb_pixels);
|
|
10294
|
+
const compG = HEAP32.subarray(compG_ptr, compG_ptr + nb_pixels);
|
|
10295
|
+
const compB = HEAP32.subarray(compB_ptr, compB_ptr + nb_pixels);
|
|
10296
|
+
for (let i = 0; i < nb_pixels; i++) {
|
|
10297
|
+
imageData[4 * i] = compR[i];
|
|
10298
|
+
imageData[4 * i + 1] = compG[i];
|
|
10299
|
+
imageData[4 * i + 2] = compB[i];
|
|
10300
|
+
imageData[4 * i + 3] = 255;
|
|
10301
|
+
}
|
|
10302
|
+
}
|
|
10303
|
+
function _storeErrorMessage(message_ptr) {
|
|
10304
|
+
const message = UTF8ToString(message_ptr);
|
|
10305
|
+
if (!Module.errorMessages) {
|
|
10306
|
+
Module.errorMessages = message;
|
|
10307
|
+
} else {
|
|
10308
|
+
Module.errorMessages += "\n" + message;
|
|
10309
|
+
}
|
|
10310
|
+
}
|
|
10311
|
+
var writeArrayToMemory = (array, buffer) => {
|
|
10312
|
+
HEAP8.set(array, buffer);
|
|
10313
|
+
};
|
|
10314
|
+
{
|
|
10315
|
+
if (Module["noExitRuntime"]) noExitRuntime = Module["noExitRuntime"];
|
|
10316
|
+
if (Module["print"]) out = Module["print"];
|
|
10317
|
+
if (Module["printErr"]) err = Module["printErr"];
|
|
10318
|
+
if (Module["wasmBinary"]) wasmBinary = Module["wasmBinary"];
|
|
10319
|
+
if (Module["arguments"]) arguments_ = Module["arguments"];
|
|
10320
|
+
if (Module["thisProgram"]) thisProgram = Module["thisProgram"];
|
|
10321
|
+
if (Module["preInit"]) {
|
|
10322
|
+
if (typeof Module["preInit"] == "function") Module["preInit"] = [Module["preInit"]];
|
|
10323
|
+
while (Module["preInit"].length > 0) {
|
|
10324
|
+
Module["preInit"].shift()();
|
|
10325
|
+
}
|
|
10326
|
+
}
|
|
10327
|
+
}
|
|
10328
|
+
Module["writeArrayToMemory"] = writeArrayToMemory;
|
|
10329
|
+
var _malloc, _free, _jp2_decode, __emscripten_timeout;
|
|
10330
|
+
function assignWasmExports(wasmExports2) {
|
|
10331
|
+
Module["_malloc"] = _malloc = wasmExports2["t"];
|
|
10332
|
+
Module["_free"] = _free = wasmExports2["u"];
|
|
10333
|
+
Module["_jp2_decode"] = _jp2_decode = wasmExports2["v"];
|
|
10334
|
+
__emscripten_timeout = wasmExports2["w"];
|
|
10335
|
+
}
|
|
10336
|
+
var wasmImports = { k: __abort_js, j: __emscripten_runtime_keepalive_clear, l: __setitimer_js, f: _copy_pixels_1, e: _copy_pixels_3, d: _copy_pixels_4, m: _emscripten_resize_heap, o: _environ_get, p: _environ_sizes_get, n: _fd_seek, b: _fd_write, q: _gray_to_rgba, h: _graya_to_rgba, c: _jsPrintWarning, i: _proc_exit, g: _rgb_to_rgba, a: _storeErrorMessage };
|
|
10337
|
+
function run() {
|
|
10338
|
+
preRun();
|
|
10339
|
+
function doRun() {
|
|
10340
|
+
Module["calledRun"] = true;
|
|
10341
|
+
if (ABORT) return;
|
|
10342
|
+
initRuntime();
|
|
10343
|
+
readyPromiseResolve?.(Module);
|
|
10344
|
+
Module["onRuntimeInitialized"]?.();
|
|
10345
|
+
postRun();
|
|
10346
|
+
}
|
|
10347
|
+
if (Module["setStatus"]) {
|
|
10348
|
+
Module["setStatus"]("Running...");
|
|
10349
|
+
setTimeout(() => {
|
|
10350
|
+
setTimeout(() => Module["setStatus"](""), 1);
|
|
10351
|
+
doRun();
|
|
10352
|
+
}, 1);
|
|
10353
|
+
} else {
|
|
10354
|
+
doRun();
|
|
10355
|
+
}
|
|
10356
|
+
}
|
|
10357
|
+
var wasmExports;
|
|
10358
|
+
wasmExports = await createWasm();
|
|
10359
|
+
run();
|
|
10360
|
+
if (runtimeInitialized) {
|
|
10361
|
+
moduleRtn = Module;
|
|
10362
|
+
} else {
|
|
10363
|
+
moduleRtn = new Promise((resolve, reject) => {
|
|
10364
|
+
readyPromiseResolve = resolve;
|
|
10365
|
+
readyPromiseReject = reject;
|
|
10366
|
+
});
|
|
10367
|
+
}
|
|
10368
|
+
;
|
|
10369
|
+
return moduleRtn;
|
|
10370
|
+
}
|
|
10398
10371
|
var openjpeg_default = OpenJPEG;
|
|
10399
10372
|
|
|
10400
10373
|
// src/pdf.js/src/core/jpx.js
|
|
@@ -29890,9 +29863,12 @@ var Font = class {
|
|
|
29890
29863
|
this._glyphCache = /* @__PURE__ */ Object.create(null);
|
|
29891
29864
|
let isSerifFont = !!(properties.flags & FontFlags.Serif);
|
|
29892
29865
|
if (!isSerifFont && !properties.isSimulatedFlags) {
|
|
29893
|
-
const
|
|
29894
|
-
for (const namePart of
|
|
29895
|
-
|
|
29866
|
+
const stdFontMap = getStdFontMap(), nonStdFontMap = getNonStdFontMap(), serifFonts = getSerifFonts();
|
|
29867
|
+
for (const namePart of name.split("+")) {
|
|
29868
|
+
let fontName = namePart.replaceAll(/[,_]/g, "-");
|
|
29869
|
+
fontName = stdFontMap[fontName] || nonStdFontMap[fontName] || fontName;
|
|
29870
|
+
fontName = fontName.split("-", 1)[0];
|
|
29871
|
+
if (serifFonts[fontName]) {
|
|
29896
29872
|
isSerifFont = true;
|
|
29897
29873
|
break;
|
|
29898
29874
|
}
|
|
@@ -30005,15 +29981,24 @@ var Font = class {
|
|
|
30005
29981
|
return shadow(this, "renderer", renderer);
|
|
30006
29982
|
}
|
|
30007
29983
|
exportData() {
|
|
30008
|
-
const exportDataProps = this.fontExtraProperties ? [...EXPORT_DATA_PROPERTIES, ...EXPORT_DATA_EXTRA_PROPERTIES] : EXPORT_DATA_PROPERTIES;
|
|
30009
29984
|
const data = /* @__PURE__ */ Object.create(null);
|
|
30010
|
-
for (const prop of
|
|
29985
|
+
for (const prop of EXPORT_DATA_PROPERTIES) {
|
|
30011
29986
|
const value = this[prop];
|
|
30012
29987
|
if (value !== void 0) {
|
|
30013
29988
|
data[prop] = value;
|
|
30014
29989
|
}
|
|
30015
29990
|
}
|
|
30016
|
-
|
|
29991
|
+
if (!this.fontExtraProperties) {
|
|
29992
|
+
return { data };
|
|
29993
|
+
}
|
|
29994
|
+
const extra = /* @__PURE__ */ Object.create(null);
|
|
29995
|
+
for (const prop of EXPORT_DATA_EXTRA_PROPERTIES) {
|
|
29996
|
+
const value = this[prop];
|
|
29997
|
+
if (value !== void 0) {
|
|
29998
|
+
extra[prop] = value;
|
|
29999
|
+
}
|
|
30000
|
+
}
|
|
30001
|
+
return { data, extra };
|
|
30017
30002
|
}
|
|
30018
30003
|
fallbackToSystemFont(properties) {
|
|
30019
30004
|
this.missingFile = true;
|
|
@@ -56414,7 +56399,7 @@ var PartialEvaluator = class _PartialEvaluator {
|
|
|
56414
56399
|
const scale = textState.fontMatrix[0] * textState.fontSize;
|
|
56415
56400
|
for (let i = 0, ii = glyphs.length; i < ii; i++) {
|
|
56416
56401
|
const glyph = glyphs[i];
|
|
56417
|
-
const { category } = glyph;
|
|
56402
|
+
const { category, originalCharCode } = glyph;
|
|
56418
56403
|
if (category.isInvisibleFormatMark) {
|
|
56419
56404
|
continue;
|
|
56420
56405
|
}
|
|
@@ -56424,15 +56409,18 @@ var PartialEvaluator = class _PartialEvaluator {
|
|
|
56424
56409
|
glyphWidth = glyph.vmetric ? glyph.vmetric[0] : -glyphWidth;
|
|
56425
56410
|
}
|
|
56426
56411
|
let scaledDim = glyphWidth * scale;
|
|
56412
|
+
if (originalCharCode === 32) {
|
|
56413
|
+
charSpacing += textState.wordSpacing;
|
|
56414
|
+
}
|
|
56427
56415
|
if (!keepWhiteSpace && category.isWhitespace) {
|
|
56428
56416
|
if (!font.vertical) {
|
|
56429
|
-
charSpacing += scaledDim
|
|
56417
|
+
charSpacing += scaledDim;
|
|
56430
56418
|
textState.translateTextMatrix(
|
|
56431
56419
|
charSpacing * textState.textHScale,
|
|
56432
56420
|
0
|
|
56433
56421
|
);
|
|
56434
56422
|
} else {
|
|
56435
|
-
charSpacing += -scaledDim
|
|
56423
|
+
charSpacing += -scaledDim;
|
|
56436
56424
|
textState.translateTextMatrix(0, -charSpacing);
|
|
56437
56425
|
}
|
|
56438
56426
|
saveLastChar(" ");
|
|
@@ -56993,8 +56981,12 @@ var PartialEvaluator = class _PartialEvaluator {
|
|
|
56993
56981
|
if (baseEncodingName) {
|
|
56994
56982
|
properties.defaultEncoding = getEncoding(baseEncodingName);
|
|
56995
56983
|
} else {
|
|
56996
|
-
|
|
56984
|
+
let isSymbolicFont = !!(properties.flags & FontFlags.Symbolic);
|
|
56997
56985
|
const isNonsymbolicFont = !!(properties.flags & FontFlags.Nonsymbolic);
|
|
56986
|
+
if (properties.type === "TrueType" && isSymbolicFont && isNonsymbolicFont && differences.length !== 0) {
|
|
56987
|
+
properties.flags &= ~FontFlags.Symbolic;
|
|
56988
|
+
isSymbolicFont = false;
|
|
56989
|
+
}
|
|
56998
56990
|
encoding = StandardEncoding;
|
|
56999
56991
|
if (properties.type === "TrueType" && !isNonsymbolicFont) {
|
|
57000
56992
|
encoding = WinAnsiEncoding;
|
|
@@ -57827,11 +57819,16 @@ var TranslatedFont = class {
|
|
|
57827
57819
|
return;
|
|
57828
57820
|
}
|
|
57829
57821
|
__privateSet(this, _sent, true);
|
|
57830
|
-
|
|
57831
|
-
|
|
57832
|
-
|
|
57833
|
-
|
|
57834
|
-
|
|
57822
|
+
const fontData = this.font.exportData();
|
|
57823
|
+
const transfer = [];
|
|
57824
|
+
if (fontData.data) {
|
|
57825
|
+
if (fontData.data.charProcOperatorList) {
|
|
57826
|
+
fontData.charProcOperatorList = fontData.data.charProcOperatorList;
|
|
57827
|
+
}
|
|
57828
|
+
fontData.data = FontInfo.write(fontData.data);
|
|
57829
|
+
transfer.push(fontData.data);
|
|
57830
|
+
}
|
|
57831
|
+
handler.send("commonobj", [this.loadedName, "Font", fontData], transfer);
|
|
57835
57832
|
}
|
|
57836
57833
|
fallback(handler, evaluatorOptions) {
|
|
57837
57834
|
if (!this.font.data) {
|
|
@@ -62245,7 +62242,7 @@ function getMetrics2(xfaFont, real = false) {
|
|
|
62245
62242
|
|
|
62246
62243
|
// src/pdf.js/src/core/xfa/text.js
|
|
62247
62244
|
var WIDTH_FACTOR = 1.02;
|
|
62248
|
-
var
|
|
62245
|
+
var FontInfo2 = class {
|
|
62249
62246
|
constructor(xfaFont, margin, lineHeight, fontFinder) {
|
|
62250
62247
|
this.lineHeight = lineHeight;
|
|
62251
62248
|
this.paraMargin = margin || {
|
|
@@ -62303,7 +62300,7 @@ var FontSelector = class {
|
|
|
62303
62300
|
constructor(defaultXfaFont, defaultParaMargin, defaultLineHeight, fontFinder) {
|
|
62304
62301
|
this.fontFinder = fontFinder;
|
|
62305
62302
|
this.stack = [
|
|
62306
|
-
new
|
|
62303
|
+
new FontInfo2(
|
|
62307
62304
|
defaultXfaFont,
|
|
62308
62305
|
defaultParaMargin,
|
|
62309
62306
|
defaultLineHeight,
|
|
@@ -62329,7 +62326,7 @@ var FontSelector = class {
|
|
|
62329
62326
|
margin[name] = lastFont.paraMargin[name];
|
|
62330
62327
|
}
|
|
62331
62328
|
}
|
|
62332
|
-
const fontInfo = new
|
|
62329
|
+
const fontInfo = new FontInfo2(
|
|
62333
62330
|
xfaFont,
|
|
62334
62331
|
margin,
|
|
62335
62332
|
lineHeight || lastFont.lineHeight,
|
|
@@ -71223,7 +71220,7 @@ var FlipLabel = class extends OptionObject {
|
|
|
71223
71220
|
super(CONFIG_NS_ID, "flipLabel", ["usePrinterSetting", "on", "off"]);
|
|
71224
71221
|
}
|
|
71225
71222
|
};
|
|
71226
|
-
var
|
|
71223
|
+
var FontInfo3 = class extends XFAObject {
|
|
71227
71224
|
constructor(attributes) {
|
|
71228
71225
|
super(
|
|
71229
71226
|
CONFIG_NS_ID,
|
|
@@ -72264,7 +72261,7 @@ var ConfigNamespace = class _ConfigNamespace {
|
|
|
72264
72261
|
return new FlipLabel(attrs);
|
|
72265
72262
|
}
|
|
72266
72263
|
static fontInfo(attrs) {
|
|
72267
|
-
return new
|
|
72264
|
+
return new FontInfo3(attrs);
|
|
72268
72265
|
}
|
|
72269
72266
|
static formFieldFilling(attrs) {
|
|
72270
72267
|
return new FormFieldFilling(attrs);
|
|
@@ -75456,8 +75453,8 @@ var MarkupAnnotation = class extends Annotation {
|
|
|
75456
75453
|
data: annotationDict
|
|
75457
75454
|
});
|
|
75458
75455
|
const retRef = { ref: annotationRef };
|
|
75459
|
-
|
|
75460
|
-
|
|
75456
|
+
const { popup } = annotation;
|
|
75457
|
+
if (popup) {
|
|
75461
75458
|
if (popup.deleted) {
|
|
75462
75459
|
annotationDict.delete("Popup");
|
|
75463
75460
|
annotationDict.delete("Contents");
|
|
@@ -81722,10 +81719,8 @@ buildCipherConstructor_fn = function(cf, name, num, gen, key) {
|
|
|
81722
81719
|
var CipherTransformFactory = _CipherTransformFactory;
|
|
81723
81720
|
|
|
81724
81721
|
// src/pdf.js/src/core/xref.js
|
|
81725
|
-
var _firstXRefStmPos;
|
|
81726
81722
|
var XRef = class {
|
|
81727
81723
|
constructor(stream, pdfManager) {
|
|
81728
|
-
__privateAdd(this, _firstXRefStmPos, null);
|
|
81729
81724
|
this.stream = stream;
|
|
81730
81725
|
this.pdfManager = pdfManager;
|
|
81731
81726
|
this.entries = [];
|
|
@@ -82268,7 +82263,6 @@ var XRef = class {
|
|
|
82268
82263
|
if (Number.isInteger(obj) && !this._xrefStms.has(obj)) {
|
|
82269
82264
|
this._xrefStms.add(obj);
|
|
82270
82265
|
this.startXRefQueue.push(obj);
|
|
82271
|
-
__privateGet(this, _firstXRefStmPos) ?? __privateSet(this, _firstXRefStmPos, obj);
|
|
82272
82266
|
}
|
|
82273
82267
|
} else if (Number.isInteger(obj)) {
|
|
82274
82268
|
if (!Number.isInteger(parser.getObj()) || !isCmd(parser.getObj(), "obj") || !((obj = parser.getObj()) instanceof BaseStream)) {
|
|
@@ -82306,9 +82300,6 @@ var XRef = class {
|
|
|
82306
82300
|
}
|
|
82307
82301
|
throw new XRefParseException();
|
|
82308
82302
|
}
|
|
82309
|
-
get lastXRefStreamPos() {
|
|
82310
|
-
return __privateGet(this, _firstXRefStmPos) ?? (this._xrefStms.size > 0 ? Math.max(...this._xrefStms) : null);
|
|
82311
|
-
}
|
|
82312
82303
|
getEntry(i) {
|
|
82313
82304
|
const xrefEntry = this.entries[i];
|
|
82314
82305
|
if (xrefEntry && !xrefEntry.free && xrefEntry.offset) {
|
|
@@ -82503,7 +82494,6 @@ var XRef = class {
|
|
|
82503
82494
|
return this.root;
|
|
82504
82495
|
}
|
|
82505
82496
|
};
|
|
82506
|
-
_firstXRefStmPos = new WeakMap();
|
|
82507
82497
|
|
|
82508
82498
|
// src/pdf.js/src/core/document.js
|
|
82509
82499
|
var LETTER_SIZE_MEDIABOX = [0, 0, 612, 792];
|
|
@@ -85173,7 +85163,6 @@ var _WorkerMessageHandler = class _WorkerMessageHandler {
|
|
|
85173
85163
|
pdfManager.ensureCatalog("acroFormRef"),
|
|
85174
85164
|
pdfManager.ensureDoc("startXRef"),
|
|
85175
85165
|
pdfManager.ensureDoc("xref"),
|
|
85176
|
-
pdfManager.ensureDoc("linearization"),
|
|
85177
85166
|
pdfManager.ensureCatalog("structTreeRoot")
|
|
85178
85167
|
];
|
|
85179
85168
|
const changes = new RefSetCache();
|
|
@@ -85185,7 +85174,6 @@ var _WorkerMessageHandler = class _WorkerMessageHandler {
|
|
|
85185
85174
|
acroFormRef,
|
|
85186
85175
|
startXRef,
|
|
85187
85176
|
xref,
|
|
85188
|
-
linearization,
|
|
85189
85177
|
_structTreeRoot
|
|
85190
85178
|
] = await Promise.all(globalPromises);
|
|
85191
85179
|
const catalogRef = xref.trailer.getRaw("Root") || null;
|
|
@@ -85314,7 +85302,7 @@ var _WorkerMessageHandler = class _WorkerMessageHandler {
|
|
|
85314
85302
|
infoRef: xref.trailer.getRaw("Info") || null,
|
|
85315
85303
|
infoMap,
|
|
85316
85304
|
fileIds: xref.trailer.get("ID") || null,
|
|
85317
|
-
startXRef
|
|
85305
|
+
startXRef,
|
|
85318
85306
|
filename
|
|
85319
85307
|
};
|
|
85320
85308
|
}
|
|
@@ -85444,9 +85432,6 @@ var _WorkerMessageHandler = class _WorkerMessageHandler {
|
|
|
85444
85432
|
handler.on("GetXFADatasets", function(data) {
|
|
85445
85433
|
return pdfManager.ensureDoc("xfaDatasets");
|
|
85446
85434
|
});
|
|
85447
|
-
handler.on("GetXRefPrevValue", function(data) {
|
|
85448
|
-
return pdfManager.ensureXRef("trailer").then((trailer) => trailer.get("Prev"));
|
|
85449
|
-
});
|
|
85450
85435
|
handler.on("GetStartXRefPos", function(data) {
|
|
85451
85436
|
return pdfManager.ensureDoc("startXRef");
|
|
85452
85437
|
});
|