@file-viewer/assets-wordperfect 3.1.1 → 3.2.0

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.
Files changed (22) hide show
  1. package/README.en.md +5 -1
  2. package/README.md +5 -1
  3. package/bin/install.mjs +0 -0
  4. package/package.json +32 -13
  5. package/viewer/THIRD_PARTY_LICENSES.assets.json +60 -0
  6. package/viewer/file-viewer-asset-pack.json +20 -1
  7. package/viewer/vendor/wordperfect/THIRD_PARTY_NOTICES.md +25 -0
  8. package/viewer/vendor/wordperfect/libwpd.mjs +1 -1
  9. package/viewer/vendor/wordperfect/libwpd.wasm +0 -0
  10. package/viewer/vendor/wordperfect/licenses/LICENSE.MPL-2.0.txt +373 -0
  11. package/viewer/vendor/wordperfect/licenses/LICENSE.boost-BSL-1.0.txt +23 -0
  12. package/viewer/vendor/wordperfect/licenses/LICENSE.toolchain-Emscripten-LICENSE.txt +102 -0
  13. package/viewer/vendor/wordperfect/licenses/LICENSE.toolchain-LLVM-compiler-rt-LICENSE.txt +311 -0
  14. package/viewer/vendor/wordperfect/licenses/LICENSE.toolchain-LLVM-libcxx-LICENSE.txt +311 -0
  15. package/viewer/vendor/wordperfect/licenses/LICENSE.toolchain-LLVM-libcxxabi-LICENSE.txt +311 -0
  16. package/viewer/vendor/wordperfect/licenses/LICENSE.toolchain-Musl-COPYRIGHT.txt +193 -0
  17. package/viewer/vendor/wordperfect/licenses/LICENSE.toolchain-Zlib-1.3.2-LICENSE.txt +22 -0
  18. package/viewer/vendor/wordperfect/licenses/LICENSE.toolchain-dlmalloc-CC0-1.0.txt +121 -0
  19. package/viewer/vendor/wordperfect/licenses/LICENSE.toolchain-dlmalloc-NOTICE.txt +10 -0
  20. package/viewer/vendor/wordperfect/licenses/LICENSE.xberg-shim-MIT.txt +21 -0
  21. package/viewer/vendor/wordperfect/licenses/NATIVE_PROVENANCE.json +96 -0
  22. package/viewer/vendor/wordperfect/licenses/PROVENANCE.md +23 -0
package/README.en.md CHANGED
@@ -1,3 +1,7 @@
1
1
  # @file-viewer/assets-wordperfect
2
2
 
3
- Self-hosted Worker and WebAssembly assets for the opt-in WordPerfect renderer. They are installed separately from the standard profile.
3
+ Runtime package version 3.2.0.
4
+
5
+ Usage and API documentation: https://doc.file-viewer.app/
6
+
7
+ The package's own license is Apache-2.0. Included third-party notices apply to their respective components.
package/README.md CHANGED
@@ -1,3 +1,7 @@
1
1
  # @file-viewer/assets-wordperfect
2
2
 
3
- WordPerfect Worker/WASM runtime. This package is installed only when the matching capability is selected. Its installer performs a transactional merge and records a per-file SHA-256 receipt.
3
+ Runtime package version 3.2.0.
4
+
5
+ Usage and API documentation: https://doc.file-viewer.app/
6
+
7
+ The package's own license is Apache-2.0. Included third-party notices apply to their respective components.
package/bin/install.mjs CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@file-viewer/assets-wordperfect",
3
- "version": "3.1.1",
3
+ "version": "3.2.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Independent self-hosted WordPerfect Worker/WASM runtime for opt-in File Viewer integration.",
@@ -10,17 +10,36 @@
10
10
  "./package.json": "./package.json"
11
11
  },
12
12
  "files": [
13
- "bin",
14
- "viewer",
13
+ "bin/install.mjs",
15
14
  "file-viewer.asset-pack.json",
15
+ "LICENSE",
16
+ "README.en.md",
16
17
  "README.md",
17
- "README.en.md"
18
+ "viewer/file-viewer-asset-pack.json",
19
+ "viewer/THIRD_PARTY_LICENSES.assets.json",
20
+ "viewer/vendor/wordperfect/libwpd.mjs",
21
+ "viewer/vendor/wordperfect/libwpd.wasm",
22
+ "viewer/vendor/wordperfect/licenses/LICENSE.boost-BSL-1.0.txt",
23
+ "viewer/vendor/wordperfect/licenses/LICENSE.MPL-2.0.txt",
24
+ "viewer/vendor/wordperfect/licenses/LICENSE.toolchain-dlmalloc-CC0-1.0.txt",
25
+ "viewer/vendor/wordperfect/licenses/LICENSE.toolchain-dlmalloc-NOTICE.txt",
26
+ "viewer/vendor/wordperfect/licenses/LICENSE.toolchain-Emscripten-LICENSE.txt",
27
+ "viewer/vendor/wordperfect/licenses/LICENSE.toolchain-LLVM-compiler-rt-LICENSE.txt",
28
+ "viewer/vendor/wordperfect/licenses/LICENSE.toolchain-LLVM-libcxx-LICENSE.txt",
29
+ "viewer/vendor/wordperfect/licenses/LICENSE.toolchain-LLVM-libcxxabi-LICENSE.txt",
30
+ "viewer/vendor/wordperfect/licenses/LICENSE.toolchain-Musl-COPYRIGHT.txt",
31
+ "viewer/vendor/wordperfect/licenses/LICENSE.toolchain-Zlib-1.3.2-LICENSE.txt",
32
+ "viewer/vendor/wordperfect/licenses/LICENSE.xberg-shim-MIT.txt",
33
+ "viewer/vendor/wordperfect/licenses/NATIVE_PROVENANCE.json",
34
+ "viewer/vendor/wordperfect/licenses/PROVENANCE.md",
35
+ "viewer/vendor/wordperfect/THIRD_PARTY_NOTICES.md",
36
+ "viewer/vendor/wordperfect/wordperfect.worker.js"
18
37
  ],
19
38
  "bin": {
20
39
  "file-viewer-assets-wordperfect": "./bin/install.mjs"
21
40
  },
22
41
  "dependencies": {
23
- "@file-viewer/asset-installer": "3.1.1"
42
+ "@file-viewer/asset-installer": "3.2.0"
24
43
  },
25
44
  "engines": {
26
45
  "node": ">=20"
@@ -31,14 +50,14 @@
31
50
  },
32
51
  "repository": {
33
52
  "type": "git",
34
- "url": "git+https://github.com/flyfish-dev/file-viewer.git",
35
- "directory": "packages/tools/assets-wordperfect"
53
+ "url": "git+https://github.com/flyfish-dev/file-viewer.git"
36
54
  },
37
55
  "fileViewer": {
38
- "assetPackManifest": "./file-viewer.asset-pack.json"
56
+ "assetPackManifest": "./file-viewer.asset-pack.json",
57
+ "distribution": {
58
+ "schemaVersion": 1,
59
+ "mode": "runtime-only"
60
+ }
39
61
  },
40
- "license": "Apache-2.0",
41
- "scripts": {
42
- "stage-assets": "node ../../build-support/stage-capability-asset-pack.mjs --package-dir packages/tools/assets-wordperfect"
43
- }
44
- }
62
+ "license": "Apache-2.0"
63
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "purpose": "shared-runtime-material-attribution",
4
+ "scope": "Material identity and actual copied payloads; not a source-availability or release approval.",
5
+ "registrySha256": "cbbc5c184136a51210dc688fcae649b743cef36a5a5a2e55d2b55ba54f784dc6",
6
+ "releaseApproval": false,
7
+ "materials": [
8
+ {
9
+ "path": "vendor/wordperfect/licenses/LICENSE.xberg-shim-MIT.txt",
10
+ "sha256": "081ff9e2978a771dc90f475aa5130871d85debdf120683cbb860b41662641272",
11
+ "bytes": 1077,
12
+ "kind": "original-license-grant",
13
+ "component": "WordPerfect native runtime",
14
+ "declaredLicense": "MIT",
15
+ "source": "Fixed public source archives and original materials in NATIVE_PROVENANCE.json",
16
+ "runtimePaths": [
17
+ "vendor/wordperfect/libwpd.mjs",
18
+ "vendor/wordperfect/libwpd.wasm",
19
+ "vendor/wordperfect/wordperfect.worker.js"
20
+ ]
21
+ },
22
+ {
23
+ "path": "vendor/wordperfect/licenses/PROVENANCE.md",
24
+ "sha256": "ffb0692e8addbecc36081ce7beefedc2ec29d4bd559ba62e79794e58698e7826",
25
+ "bytes": 2238,
26
+ "kind": "generated-native-provenance",
27
+ "component": "WordPerfect native runtime",
28
+ "declaredLicense": null,
29
+ "source": "Fixed public source archives and original materials in NATIVE_PROVENANCE.json",
30
+ "runtimePaths": [
31
+ "vendor/wordperfect/libwpd.mjs",
32
+ "vendor/wordperfect/libwpd.wasm",
33
+ "vendor/wordperfect/wordperfect.worker.js"
34
+ ]
35
+ }
36
+ ],
37
+ "runtimeFiles": [
38
+ {
39
+ "path": "vendor/wordperfect/libwpd.mjs",
40
+ "bytes": 17313,
41
+ "sha256": "ccd3267ce9cac2961bb6a500761753efa05c93563e7a5e46a31594cceb5e3096",
42
+ "sourceSha256": "ccd3267ce9cac2961bb6a500761753efa05c93563e7a5e46a31594cceb5e3096",
43
+ "sourceTransform": "none"
44
+ },
45
+ {
46
+ "path": "vendor/wordperfect/libwpd.wasm",
47
+ "bytes": 531158,
48
+ "sha256": "bbfe0c7f712a357e3f9d11f9cf96d931e7cf4b9165d4379af78bf1bcb69333f0",
49
+ "sourceSha256": "bbfe0c7f712a357e3f9d11f9cf96d931e7cf4b9165d4379af78bf1bcb69333f0",
50
+ "sourceTransform": "none"
51
+ },
52
+ {
53
+ "path": "vendor/wordperfect/wordperfect.worker.js",
54
+ "bytes": 6410,
55
+ "sha256": "1cde144694172a70e1429e454edc859f43597f423b16fde83ab5ea82f0f58e37",
56
+ "sourceSha256": "1cde144694172a70e1429e454edc859f43597f423b16fde83ab5ea82f0f58e37",
57
+ "sourceTransform": "none"
58
+ }
59
+ ]
60
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "packageName": "@file-viewer/assets-wordperfect",
4
- "packageVersion": "3.1.1",
4
+ "packageVersion": "3.2.0",
5
5
  "copyGroups": [
6
6
  "office-wordperfect"
7
7
  ],
@@ -41,6 +41,25 @@
41
41
  "defaultPath": "vendor/wordperfect/libwpd.mjs",
42
42
  "packagePath": "@file-viewer/renderer-wordperfect/worker/libwpd.mjs",
43
43
  "description": "Emscripten ES module loader for the MPL-2.0 libwpd/librevenge WebAssembly runtime."
44
+ },
45
+ {
46
+ "id": "wordperfect-third-party-notices",
47
+ "rendererId": "office-wordperfect",
48
+ "kind": "license",
49
+ "target": "public",
50
+ "required": true,
51
+ "defaultPath": "vendor/wordperfect/THIRD_PARTY_NOTICES.md",
52
+ "packagePath": "@file-viewer/renderer-wordperfect/third-party-notices",
53
+ "description": "Matching source availability and third-party notices for the WordPerfect native runtime."
54
+ },
55
+ {
56
+ "id": "wordperfect-native-licenses",
57
+ "rendererId": "office-wordperfect",
58
+ "kind": "directory",
59
+ "target": "public",
60
+ "required": true,
61
+ "defaultPath": "vendor/wordperfect/licenses",
62
+ "description": "Complete parser and linked toolchain licenses and native provenance."
44
63
  }
45
64
  ]
46
65
  }
@@ -0,0 +1,25 @@
1
+ # Third-party notices
2
+
3
+ - `libwpd` 0.10.3 and `librevenge` 0.0.6 are compiled to WebAssembly under their MPL-2.0 license arm. The complete license is included in `vendor/libwpd-src/LICENSE.MPL-2.0.txt`.
4
+ - The callback bridge is derived from the MIT-licensed `xberg-libwpd` shim. Its license is included verbatim in `vendor/libwpd-src/LICENSE.xberg-shim-MIT.txt`.
5
+ - A header-only Boost 1.90 subset is present at build time under BSL-1.0. It is checksum-pinned and described in `vendor/libwpd-src/PROVENANCE.md`.
6
+ - The native runtime uses Emscripten 6.0.9 (official commit
7
+ `4e4223852a0835923411059a3929907d7df1232e`) and zlib 1.3.2. Its actual system
8
+ link inputs are libc, libc++, libc++abi, compiler-rt builtins, dlmalloc and
9
+ zlib. Their complete upstream grants and notices are retained as
10
+ `vendor/libwpd-src/LICENSE.toolchain-*`; see `NATIVE_PROVENANCE.json` in that
11
+ directory for exact source and output identities. The covered parser and
12
+ bridge sources remain unchanged.
13
+
14
+ Self-hosted asset copies include this notice, native provenance, and a
15
+ `licenses/` directory. Preserve them alongside the Worker, module and WASM.
16
+
17
+ The runtime distribution excludes source archives and build instructions. The
18
+ matching public source archives are available from the fixed Xberg commit
19
+ `db5ff1624cb0307ebca7cafb2af8fa6c6f93f2b4`:
20
+
21
+ - [libwpd 0.10.3 source](https://raw.githubusercontent.com/xberg-io/xberg/db5ff1624cb0307ebca7cafb2af8fa6c6f93f2b4/crates/xberg-libwpd/vendor/libwpd-0.10.3.tar.gz), SHA-256 `ca3575282acff8c952c12160433ad7e73e803ff3f070b8442c7ffa1f3a19f9ae`.
22
+ - [librevenge 0.0.6 source](https://raw.githubusercontent.com/xberg-io/xberg/db5ff1624cb0307ebca7cafb2af8fa6c6f93f2b4/crates/xberg-libwpd/vendor/librevenge-0.0.6.tar.gz), SHA-256 `686cc36be3196a0a808761cfd3951a46ff809cb0e028b0902c787261a1389d0f`.
23
+ - [Boost 1.90 header subset](https://raw.githubusercontent.com/xberg-io/xberg/db5ff1624cb0307ebca7cafb2af8fa6c6f93f2b4/crates/xberg-libwpd/vendor/boost-subset.tar.gz), SHA-256 `802ee17c5e380efbcbb696468ee3c7090aa409db89c2063b4c9b8d3e3aff1e08`.
24
+
25
+ The WebAssembly runtime is lazy-loaded by the WordPerfect Worker. The bounded TypeScript signature/text fallback remains separate and is not presented as equivalent fidelity.
@@ -1,2 +1,2 @@
1
- async function createFileViewerLibWpd(moduleArg={}){var Module=moduleArg;var ENVIRONMENT_IS_WEB=!!globalThis.window;var ENVIRONMENT_IS_WORKER=!!globalThis.WorkerGlobalScope;var ENVIRONMENT_IS_NODE=globalThis.process?.versions?.node&&globalThis.process?.type!="renderer";if(ENVIRONMENT_IS_NODE){const{createRequire}=await import("node:module");var require=createRequire(import.meta.url)}var programArgs=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var _scriptName=import.meta.url;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("node:fs");if(_scriptName.startsWith("file:")){scriptDirectory=require("node:path").dirname(require("node:url").fileURLToPath(_scriptName))+"/"}readBinary=filename=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename);return ret};readAsync=async(filename,binary=true)=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename,binary?undefined:"utf8");return ret};if(process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}programArgs=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){try{scriptDirectory=new URL(".",_scriptName).href}catch{}{if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=async url=>{var response=await fetch(url,{credentials:"same-origin"});if(response.ok){return response.arrayBuffer()}throw new Error(response.status+" : "+response.url)}}}else{}var out=console.log.bind(console);var err=console.error.bind(console);var wasmBinary;var ABORT=false;var isFileURI=filename=>filename.startsWith("file://");class EmscriptenEH{}class EmscriptenSjLj extends EmscriptenEH{}class CppException extends EmscriptenEH{constructor(excPtr){super();this.excPtr=excPtr}}var runtimeInitialized=false;function getMemoryBuffer(){return wasmMemory.buffer}function updateMemoryViews(){if(HEAP8?.buffer?.resizable)return;var b=getMemoryBuffer();HEAP8=new Int8Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);HEAP32=new Int32Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b)}function preRun(){}function initRuntime(){runtimeInitialized=true;wasmExports["O"]()}function postRun(){}function abort(what){what=`Aborted(${what})`;err(what);ABORT=true;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);throw e}var wasmBinaryFile;function findWasmBinary(){if(Module["locateFile"]){return locateFile("libwpd.wasm")}return new URL("libwpd.wasm",import.meta.url).href}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}async function getWasmBinary(binaryFile){if(!wasmBinary){try{var response=await readAsync(binaryFile);return new Uint8Array(response)}catch{}}return getBinarySync(binaryFile)}async function instantiateArrayBuffer(binaryFile,imports){try{var binary=await getWasmBinary(binaryFile);var instance=await WebAssembly.instantiate(binary,imports);return instance}catch(reason){err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)}}async function instantiateAsync(binary,binaryFile,imports){if(!binary&&!ENVIRONMENT_IS_NODE){try{var response=fetch(binaryFile,{credentials:"same-origin"});var instantiationResult=await WebAssembly.instantiateStreaming(response,imports);return instantiationResult}catch(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation")}}return instantiateArrayBuffer(binaryFile,imports)}function getWasmImports(){var imports={a:wasmImports};return imports}async function createWasm(){function receiveInstance(instance){wasmExports=instance.exports;assignWasmExports(wasmExports);updateMemoryViews();return wasmExports}function receiveInstantiationResult(result){return receiveInstance(result["instance"])}var info=getWasmImports();wasmBinaryFile??=findWasmBinary();var result=await instantiateAsync(wasmBinary,wasmBinaryFile,info);var exports=receiveInstantiationResult(result);return exports}class ExitStatus{name="ExitStatus";constructor(status){this.message=`Program terminated with exit(${status})`;this.status=status}}var HEAP8;var stackRestore=val=>__emscripten_stack_restore(val);var stackSave=()=>_emscripten_stack_get_current();var exceptionCaught=[];var uncaughtExceptionCount=0;var ___cxa_begin_catch=ptr=>{var info=new ExceptionInfo(ptr);if(!info.get_caught()){info.set_caught(true);uncaughtExceptionCount--}info.set_rethrown(false);exceptionCaught.push(info);return ___cxa_get_exception_ptr(ptr)};var exceptionLast=null;var ___cxa_end_catch=()=>{_setThrew(0,0);var info=exceptionCaught.pop();___cxa_decrement_exception_refcount(info.excPtr);exceptionLast=null};var HEAPU32;class ExceptionInfo{constructor(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24}set_type(type){HEAPU32[this.ptr+4>>2]=type}get_type(){return HEAPU32[this.ptr+4>>2]}set_destructor(destructor){HEAPU32[this.ptr+8>>2]=destructor}get_destructor(){return HEAPU32[this.ptr+8>>2]}set_caught(caught){caught=caught?1:0;HEAP8[this.ptr+12]=caught}get_caught(){return HEAP8[this.ptr+12]!=0}set_rethrown(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13]=rethrown}get_rethrown(){return HEAP8[this.ptr+13]!=0}init(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor)}set_adjusted_ptr(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr}get_adjusted_ptr(){return HEAPU32[this.ptr+16>>2]}}var setTempRet0=val=>__emscripten_tempret_set(val);var findMatchingCatch=args=>{var thrown=exceptionLast?.excPtr;if(!thrown){setTempRet0(0);return 0}var info=new ExceptionInfo(thrown);info.set_adjusted_ptr(thrown);var thrownType=info.get_type();if(!thrownType){setTempRet0(0);return thrown}for(var caughtType of args){if(!caughtType||caughtType===thrownType){break}var adjusted_ptr_addr=info.ptr+16;if(___cxa_can_catch(caughtType,thrownType,adjusted_ptr_addr)){setTempRet0(caughtType);return thrown}}setTempRet0(thrownType);return thrown};var ___cxa_find_matching_catch_2=()=>findMatchingCatch([]);var ___cxa_find_matching_catch_3=arg0=>findMatchingCatch([arg0]);var ___cxa_find_matching_catch_4=(arg0,arg1)=>findMatchingCatch([arg0,arg1]);var ___cxa_find_matching_catch_6=(arg0,arg1,arg2,arg3)=>findMatchingCatch([arg0,arg1,arg2,arg3]);var ___cxa_rethrow=()=>{if(!exceptionCaught.length){abort("no exception to throw")}var info=exceptionCaught.at(-1);var ptr=info.excPtr;info.set_rethrown(true);info.set_caught(false);uncaughtExceptionCount++;___cxa_increment_exception_refcount(ptr);exceptionLast=new CppException(ptr);throw exceptionLast};var ___cxa_throw=(ptr,type,destructor)=>{var info=new ExceptionInfo(ptr);info.init(type,destructor);___cxa_increment_exception_refcount(ptr);exceptionLast=new CppException(ptr);uncaughtExceptionCount++;throw exceptionLast};var ___resumeException=ptr=>{if(!exceptionLast){exceptionLast=new CppException(ptr)}throw exceptionLast};var __abort_js=()=>abort("");var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.codePointAt(i);if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63;i++}}heap[outIdx]=0;return outIdx-startIdx};var HEAPU8;var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var HEAP32;var __tzset_js=(timezone,daylight,std_name,dst_name)=>{var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);HEAPU32[timezone>>2]=stdTimezoneOffset*60;HEAP32[daylight>>2]=Number(winterOffset!=summerOffset);var extractZone=timezoneOffset=>{var sign=timezoneOffset>=0?"-":"+";var absOffset=Math.abs(timezoneOffset);var hours=String(Math.floor(absOffset/60)).padStart(2,"0");var minutes=String(absOffset%60).padStart(2,"0");return`UTC${sign}${hours}${minutes}`};var winterName=extractZone(winterOffset);var summerName=extractZone(summerOffset);if(summerOffset<winterOffset){stringToUTF8(winterName,std_name,17);stringToUTF8(summerName,dst_name,17)}else{stringToUTF8(winterName,dst_name,17);stringToUTF8(summerName,std_name,17)}};var getHeapMax=()=>2147483648;var alignMemory=(size,alignment)=>Math.ceil(size/alignment)*alignment;var growMemory=size=>{var oldHeapSize=wasmMemory.buffer.byteLength;var pages=(size-oldHeapSize+65535)/65536|0;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignMemory(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};var _llvm_eh_typeid_for=type=>type;var wasmTableMirror=[];var getWasmTableEntry=funcPtr=>{var func=wasmTableMirror[funcPtr];if(!func){wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr)}return func};{if(Module["print"])out=Module["print"];if(Module["printErr"])err=Module["printErr"];if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"]}var _malloc,_xberg_wpd_is_supported,_xberg_wpd_extract_document,_xberg_wpd_free_string,_free,_setThrew,__emscripten_tempret_set,__emscripten_stack_restore,_emscripten_stack_get_current,___cxa_decrement_exception_refcount,___cxa_increment_exception_refcount,___cxa_can_catch,___cxa_get_exception_ptr,memory,__indirect_function_table,wasmMemory,wasmTable;function assignWasmExports(wasmExports){_malloc=Module["_malloc"]=wasmExports["P"];_xberg_wpd_is_supported=Module["_xberg_wpd_is_supported"]=wasmExports["Q"];_xberg_wpd_extract_document=Module["_xberg_wpd_extract_document"]=wasmExports["R"];_xberg_wpd_free_string=Module["_xberg_wpd_free_string"]=wasmExports["T"];_free=Module["_free"]=wasmExports["U"];_setThrew=wasmExports["V"];__emscripten_tempret_set=wasmExports["W"];__emscripten_stack_restore=wasmExports["X"];_emscripten_stack_get_current=wasmExports["Y"];___cxa_decrement_exception_refcount=wasmExports["Z"];___cxa_increment_exception_refcount=wasmExports["_"];___cxa_can_catch=wasmExports["$"];___cxa_get_exception_ptr=wasmExports["aa"];memory=wasmMemory=wasmExports["N"];__indirect_function_table=wasmTable=wasmExports["S"]}var wasmImports={m:___cxa_begin_catch,o:___cxa_end_catch,a:___cxa_find_matching_catch_2,g:___cxa_find_matching_catch_3,u:___cxa_find_matching_catch_4,r:___cxa_find_matching_catch_6,M:___cxa_rethrow,n:___cxa_throw,b:___resumeException,I:__abort_js,J:__tzset_js,H:_emscripten_resize_heap,x:invoke_di,d:invoke_ii,h:invoke_iii,A:invoke_iiidd,c:invoke_iiii,k:invoke_iiiii,w:invoke_iiiiii,v:invoke_iiiiiii,F:invoke_iiiiiiii,C:invoke_iiiiiiiiii,j:invoke_v,i:invoke_vi,E:invoke_vid,G:invoke_viddddiiii,f:invoke_vii,z:invoke_viid,D:invoke_viiddddiii,l:invoke_viidi,e:invoke_viii,t:invoke_viiii,y:invoke_viiiid,p:invoke_viiiii,s:invoke_viiiiii,B:invoke_viiiiiii,K:invoke_viiiiiiiiiii,L:invoke_viiiiiiiiiiiiiiiii,q:_llvm_eh_typeid_for};function invoke_iiii(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_ii(index,a1){var sp=stackSave();try{return getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_vii(index,a1,a2){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_v(index){var sp=stackSave();try{getWasmTableEntry(index)()}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_vi(index,a1){var sp=stackSave();try{getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iii(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viii(index,a1,a2,a3){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viiii(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iiiii(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iiiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_di(index,a1){var sp=stackSave();try{return getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_vid(index,a1,a2){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viidi(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iiidd(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viiddddiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viddddiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viid(index,a1,a2,a3){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iiiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viiiid(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}async function run(){preRun();if(ABORT)return;initRuntime();postRun()}var wasmExports;wasmExports=await createWasm();await run();
1
+ async function createFileViewerLibWpd(moduleArg={}){var Module=moduleArg;var ENVIRONMENT_IS_WEB=!!globalThis.window;var ENVIRONMENT_IS_WORKER=!!globalThis.WorkerGlobalScope;var ENVIRONMENT_IS_NODE=globalThis.process?.versions?.node&&globalThis.process?.type!="renderer";if(ENVIRONMENT_IS_NODE){const{createRequire}=await import("node:module");var require=createRequire(import.meta.url)}var programArgs=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var _scriptName=import.meta.url;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("node:fs");if(_scriptName.startsWith("file:")){scriptDirectory=require("node:path").dirname(require("node:url").fileURLToPath(_scriptName))+"/"}readBinary=filename=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename);return ret};readAsync=async(filename,binary=true)=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename,binary?undefined:"utf8");return ret};if(process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}programArgs=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){try{scriptDirectory=new URL(".",_scriptName).href}catch{}{if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=async url=>{var response=await fetch(url,{credentials:"same-origin"});if(response.ok){return response.arrayBuffer()}throw new Error(response.status+" : "+response.url)}}}else{}var out=console.log.bind(console);var err=console.error.bind(console);var wasmBinary;var ABORT=false;var isFileURI=filename=>filename.startsWith("file://");class EmscriptenEH{}class EmscriptenSjLj extends EmscriptenEH{}class CppException extends EmscriptenEH{constructor(excPtr){super();this.excPtr=excPtr}}var runtimeInitialized=false;function getMemoryBuffer(){return wasmMemory.buffer}function updateMemoryViews(){if(HEAP8?.buffer?.resizable)return;var b=getMemoryBuffer();HEAP8=new Int8Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);HEAP32=new Int32Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b)}function preRun(){}function initRuntime(){runtimeInitialized=true;wasmExports["O"]()}function postRun(){}function abort(what){what=`Aborted(${what})`;err(what);ABORT=true;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);throw e}var wasmBinaryFile;function findWasmBinary(){if(Module["locateFile"]){return locateFile("libwpd.wasm")}return new URL("libwpd.wasm",import.meta.url).href}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}async function getWasmBinary(binaryFile){if(!wasmBinary){try{var response=await readAsync(binaryFile);return new Uint8Array(response)}catch{}}return getBinarySync(binaryFile)}async function instantiateArrayBuffer(binaryFile,imports){try{var binary=await getWasmBinary(binaryFile);var instance=await WebAssembly.instantiate(binary,imports);return instance}catch(reason){err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)}}async function instantiateAsync(binary,binaryFile,imports){if(!binary&&!ENVIRONMENT_IS_NODE){try{var response=fetch(binaryFile,{credentials:"same-origin"});var instantiationResult=await WebAssembly.instantiateStreaming(response,imports);return instantiationResult}catch(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation")}}return instantiateArrayBuffer(binaryFile,imports)}function getWasmImports(){var imports={a:wasmImports};return imports}async function createWasm(){function receiveInstance(instance){wasmExports=instance.exports;assignWasmExports(wasmExports);updateMemoryViews();return wasmExports}function receiveInstantiationResult(result){return receiveInstance(result["instance"])}var info=getWasmImports();wasmBinaryFile??=findWasmBinary();var result=await instantiateAsync(wasmBinary,wasmBinaryFile,info);var exports=receiveInstantiationResult(result);return exports}class ExitStatus{name="ExitStatus";constructor(status){this.message=`Program terminated with exit(${status})`;this.status=status}}var HEAP8;var stackRestore=val=>__emscripten_stack_restore(val);var stackSave=()=>_emscripten_stack_get_current();var exceptionCaught=[];var uncaughtExceptionCount=0;var ___cxa_begin_catch=ptr=>{var info=new ExceptionInfo(ptr);if(!info.get_caught()){info.set_caught(true);uncaughtExceptionCount--}info.set_rethrown(false);exceptionCaught.push(info);return ___cxa_get_exception_ptr(ptr)};var exceptionLast=null;var ___cxa_end_catch=()=>{_setThrew(0,0);var info=exceptionCaught.pop();___cxa_decrement_exception_refcount(info.excPtr);exceptionLast=null};var HEAPU32;class ExceptionInfo{constructor(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24}set_type(type){HEAPU32[this.ptr+4>>2]=type}get_type(){return HEAPU32[this.ptr+4>>2]}set_destructor(destructor){HEAPU32[this.ptr+8>>2]=destructor}get_destructor(){return HEAPU32[this.ptr+8>>2]}set_caught(caught){caught=caught?1:0;HEAP8[this.ptr+12]=caught}get_caught(){return HEAP8[this.ptr+12]!=0}set_rethrown(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13]=rethrown}get_rethrown(){return HEAP8[this.ptr+13]!=0}init(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor)}set_adjusted_ptr(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr}get_adjusted_ptr(){return HEAPU32[this.ptr+16>>2]}}var setTempRet0=val=>__emscripten_tempret_set(val);var findMatchingCatch=args=>{var thrown=exceptionLast?.excPtr;if(!thrown){setTempRet0(0);return 0}var info=new ExceptionInfo(thrown);info.set_adjusted_ptr(thrown);var thrownType=info.get_type();if(!thrownType){setTempRet0(0);return thrown}for(var caughtType of args){if(!caughtType||caughtType===thrownType){break}var adjusted_ptr_addr=info.ptr+16;if(___cxa_can_catch(caughtType,thrownType,adjusted_ptr_addr)){setTempRet0(caughtType);return thrown}}setTempRet0(thrownType);return thrown};var ___cxa_find_matching_catch_2=()=>findMatchingCatch([]);var ___cxa_find_matching_catch_3=arg0=>findMatchingCatch([arg0]);var ___cxa_find_matching_catch_4=(arg0,arg1)=>findMatchingCatch([arg0,arg1]);var ___cxa_find_matching_catch_6=(arg0,arg1,arg2,arg3)=>findMatchingCatch([arg0,arg1,arg2,arg3]);var __Unwind_RaiseException=ex=>{throw ex};var ___cxa_rethrow=()=>{if(!exceptionCaught.length){abort("no exception to throw")}var info=exceptionCaught.at(-1);var ptr=info.excPtr;info.set_rethrown(true);info.set_caught(false);uncaughtExceptionCount++;___cxa_increment_exception_refcount(ptr);ptr=exceptionLast=new CppException(ptr);__Unwind_RaiseException(ptr)};var ___cxa_throw=(ptr,type,destructor)=>{var info=new ExceptionInfo(ptr);info.init(type,destructor);___cxa_increment_exception_refcount(ptr);ptr=exceptionLast=new CppException(ptr);uncaughtExceptionCount++;__Unwind_RaiseException(ptr)};var __Unwind_Resume=ex=>{throw ex};var ___resumeException=ptr=>{ptr=exceptionLast??=new CppException(ptr);__Unwind_Resume(ptr)};var __abort_js=()=>abort("");var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.codePointAt(i);if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63;i++}}heap[outIdx]=0;return outIdx-startIdx};var HEAPU8;var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var HEAP32;var __tzset_js=(timezone,daylight,std_name,dst_name)=>{var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);HEAPU32[timezone>>2]=stdTimezoneOffset*60;HEAP32[daylight>>2]=Number(winterOffset!=summerOffset);var extractZone=timezoneOffset=>{var sign=timezoneOffset>=0?"-":"+";var absOffset=Math.abs(timezoneOffset);var hours=String(Math.floor(absOffset/60)).padStart(2,"0");var minutes=String(absOffset%60).padStart(2,"0");return`UTC${sign}${hours}${minutes}`};var winterName=extractZone(winterOffset);var summerName=extractZone(summerOffset);if(summerOffset<winterOffset){stringToUTF8(winterName,std_name,17);stringToUTF8(summerName,dst_name,17)}else{stringToUTF8(winterName,dst_name,17);stringToUTF8(summerName,std_name,17)}};var getHeapMax=()=>2147483648;var alignMemory=(size,alignment)=>Math.ceil(size/alignment)*alignment;var growMemory=size=>{var oldHeapSize=wasmMemory.buffer.byteLength;var pages=(size-oldHeapSize+65535)/65536|0;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignMemory(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};var _llvm_eh_typeid_for=type=>type;var wasmTableMirror=[];var getWasmTableEntry=funcPtr=>{var func=wasmTableMirror[funcPtr];if(!func){wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr)}return func};{if(Module["print"])out=Module["print"];if(Module["printErr"])err=Module["printErr"];if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"]}var _malloc,_xberg_wpd_is_supported,_xberg_wpd_extract_document,_xberg_wpd_free_string,_free,_setThrew,__emscripten_tempret_set,__emscripten_stack_restore,_emscripten_stack_get_current,___cxa_decrement_exception_refcount,___cxa_increment_exception_refcount,___cxa_can_catch,___cxa_get_exception_ptr,memory,__indirect_function_table,wasmMemory,wasmTable;function assignWasmExports(wasmExports){_malloc=Module["_malloc"]=wasmExports["P"];_xberg_wpd_is_supported=Module["_xberg_wpd_is_supported"]=wasmExports["Q"];_xberg_wpd_extract_document=Module["_xberg_wpd_extract_document"]=wasmExports["R"];_xberg_wpd_free_string=Module["_xberg_wpd_free_string"]=wasmExports["T"];_free=Module["_free"]=wasmExports["U"];_setThrew=wasmExports["V"];__emscripten_tempret_set=wasmExports["W"];__emscripten_stack_restore=wasmExports["X"];_emscripten_stack_get_current=wasmExports["Y"];___cxa_decrement_exception_refcount=wasmExports["Z"];___cxa_increment_exception_refcount=wasmExports["_"];___cxa_can_catch=wasmExports["$"];___cxa_get_exception_ptr=wasmExports["aa"];memory=wasmMemory=wasmExports["N"];__indirect_function_table=wasmTable=wasmExports["S"]}var wasmImports={m:___cxa_begin_catch,o:___cxa_end_catch,a:___cxa_find_matching_catch_2,g:___cxa_find_matching_catch_3,u:___cxa_find_matching_catch_4,r:___cxa_find_matching_catch_6,M:___cxa_rethrow,n:___cxa_throw,b:___resumeException,I:__abort_js,J:__tzset_js,H:_emscripten_resize_heap,x:invoke_di,d:invoke_ii,h:invoke_iii,A:invoke_iiidd,c:invoke_iiii,k:invoke_iiiii,w:invoke_iiiiii,v:invoke_iiiiiii,F:invoke_iiiiiiii,C:invoke_iiiiiiiiii,j:invoke_v,i:invoke_vi,E:invoke_vid,G:invoke_viddddiiii,f:invoke_vii,z:invoke_viid,D:invoke_viiddddiii,l:invoke_viidi,e:invoke_viii,t:invoke_viiii,y:invoke_viiiid,p:invoke_viiiii,s:invoke_viiiiii,B:invoke_viiiiiii,K:invoke_viiiiiiiiiii,L:invoke_viiiiiiiiiiiiiiiii,q:_llvm_eh_typeid_for};function invoke_iiii(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_ii(index,a1){var sp=stackSave();try{return getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_vii(index,a1,a2){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_v(index){var sp=stackSave();try{getWasmTableEntry(index)()}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_vi(index,a1){var sp=stackSave();try{getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iii(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viii(index,a1,a2,a3){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viiii(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iiiii(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iiiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_di(index,a1){var sp=stackSave();try{return getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_vid(index,a1,a2){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viidi(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iiidd(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viiddddiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viddddiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viid(index,a1,a2,a3){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iiiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viiiid(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}async function run(){preRun();if(ABORT)return;initRuntime();postRun()}var wasmExports;wasmExports=await createWasm();await run();
2
2
  ;return Module}export default createFileViewerLibWpd;