@flyfish-group/file-viewer3 1.0.21 → 1.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +373 -0
- package/README.md +23 -20
- package/dist/components/3MFLoader.js +1 -1
- package/dist/components/AMFLoader.js +1 -1
- package/dist/components/ArchiveViewer.js +1 -1
- package/dist/components/AudioViewer.js +1 -1
- package/dist/components/CadViewer.js +1 -1
- package/dist/components/CodeViewer.js +1 -1
- package/dist/components/ColladaLoader.js +1 -1
- package/dist/components/DrawingViewer.js +1 -1
- package/dist/components/EdaViewer.js +1 -1
- package/dist/components/EmailViewer.js +1 -1
- package/dist/components/EpubViewer.js +1 -1
- package/dist/components/FBXLoader.js +1 -1
- package/dist/components/GLTFLoader.js +1 -1
- package/dist/components/ImageViewer.js +1 -1
- package/dist/components/KMZLoader.js +1 -1
- package/dist/components/MarkdownViewer.js +1 -1
- package/dist/components/ModelViewer.js +1 -1
- package/dist/components/OBJLoader.js +1 -1
- package/dist/components/OfdViewer.js +1 -1
- package/dist/components/PCDLoader.js +1 -1
- package/dist/components/PLYLoader.js +1 -1
- package/dist/components/PdfView.js +5316 -4918
- package/dist/components/PptxRender.js +1 -1
- package/dist/components/STLLoader.js +1 -1
- package/dist/components/TDSLoader.js +1 -1
- package/dist/components/TypstViewer.js +3 -3
- package/dist/components/USDLoader.js +1 -1
- package/dist/components/UmdViewer.js +1 -1
- package/dist/components/VRMLLoader.js +1 -1
- package/dist/components/VTKLoader.js +1 -1
- package/dist/components/XYZLoader.js +1 -1
- package/dist/components/XlsxTable.js +1 -1
- package/dist/components/__vite-browser-external.js +1 -1
- package/dist/components/_plugin-vue_export-helper.js +1 -1
- package/dist/components/ar-SA-G6X2FPQ2.js +1 -1
- package/dist/components/arc.js +1 -1
- package/dist/components/architecture-7EHR7CIX.js +1 -1
- package/dist/components/architectureDiagram-3BPJPVTR.js +1 -1
- package/dist/components/archive.js +1 -1
- package/dist/components/asyncToGenerator.js +1 -1
- package/dist/components/audio.js +1 -1
- package/dist/components/az-AZ-76LH7QW2.js +1 -1
- package/dist/components/bash.js +1 -1
- package/dist/components/bg-BG-XCXSNQG7.js +1 -1
- package/dist/components/blockDiagram-GPEHLZMM.js +1 -1
- package/dist/components/bn-BD-2XOGV67Q.js +1 -1
- package/dist/components/c4Diagram-AAUBKEIU.js +1 -1
- package/dist/components/ca-ES-6MX7JW3Y.js +1 -1
- package/dist/components/cad.js +1 -1
- package/dist/components/cfb.js +1 -1
- package/dist/components/channel.js +1 -1
- package/dist/components/chunk-2J33WTMH.js +1 -1
- package/dist/components/chunk-3OPIFGDE.js +1 -1
- package/dist/components/chunk-4BX2VUAB.js +1 -1
- package/dist/components/chunk-55IACEB6.js +1 -1
- package/dist/components/chunk-5ZQYHXKU.js +1 -1
- package/dist/components/chunk-6U3AYISY.js +1 -1
- package/dist/components/chunk-727SXJPM.js +1 -1
- package/dist/components/chunk-AGHRB4JF.js +1 -1
- package/dist/components/chunk-AQP2D5EJ.js +1 -1
- package/dist/components/chunk-BSJP7CBP.js +1 -1
- package/dist/components/chunk-CSCIHK7Q.js +1 -1
- package/dist/components/chunk-EIO257PC.js +563 -564
- package/dist/components/chunk-FMBD7UC4.js +1 -1
- package/dist/components/chunk-K2UTITRG.js +1 -1
- package/dist/components/chunk-KSCS5N6A.js +1 -1
- package/dist/components/chunk-L5ZTLDWV.js +1 -1
- package/dist/components/chunk-LZXEDZCA.js +1 -1
- package/dist/components/chunk-ND2GUHAM.js +1 -1
- package/dist/components/chunk-NNHCCRGN.js +1 -0
- package/dist/components/chunk-NZK2D7GU.js +1 -1
- package/dist/components/chunk-O5CBEL6O.js +1 -1
- package/dist/components/chunk-QZHKN3VN.js +1 -1
- package/dist/components/chunk-SRAX5OIU.js +1 -1
- package/dist/components/chunk-WU5MYG2G.js +1 -1
- package/dist/components/chunk-XPW4576I.js +1 -1
- package/dist/components/chunk-Z3N5DIM6.js +1 -1
- package/dist/components/chunk-ZUYEQ4TG.js +1 -1
- package/dist/components/chunk.js +1 -1
- package/dist/components/classDiagram-4FO5ZUOK.js +1 -1
- package/dist/components/classDiagram-v2-Q7XG4LA2.js +1 -1
- package/dist/components/compiler.js +1 -1
- package/dist/components/core.js +1 -1
- package/dist/components/cose-bilkent-S5V4N54A.js +1 -1
- package/dist/components/cpp.js +1 -1
- package/dist/components/cs-CZ-2BRQDIVT.js +1 -1
- package/dist/components/csharp.js +1 -1
- package/dist/components/css.js +1 -1
- package/dist/components/cytoscape.esm.js +1 -1
- package/dist/components/da-DK-5WZEPLOC.js +1 -1
- package/dist/components/dagre-BM42HDAG.js +1 -1
- package/dist/components/dagre.js +1 -1
- package/dist/components/de-DE-XR44H4JA.js +1 -1
- package/dist/components/defaultLocale.js +1 -1
- package/dist/components/defineProperty.js +1 -1
- package/dist/components/diagram-2AECGRRQ.js +1 -1
- package/dist/components/diagram-5GNKFQAL.js +1 -1
- package/dist/components/diagram-KO2AKTUF.js +1 -1
- package/dist/components/diagram-LMA3HP47.js +1 -1
- package/dist/components/diagram-OG6HWLK6.js +1 -1
- package/dist/components/diff.js +1 -1
- package/dist/components/directory-open-01563666.js +1 -1
- package/dist/components/directory-open-4ed118d0.js +1 -1
- package/dist/components/dist.js +1 -1
- package/dist/components/dist2.js +1 -1
- package/dist/components/dist3.js +1 -1
- package/dist/components/docx-preview.js +1 -1
- package/dist/components/drawing.js +1 -1
- package/dist/components/ebook.js +1 -1
- package/dist/components/eda.js +1 -1
- package/dist/components/el-GR-BZB4AONW.js +1 -1
- package/dist/components/email.js +1 -1
- package/dist/components/en-B4ZKOASM.js +1 -1
- package/dist/components/erDiagram-TEJ5UH35.js +1 -1
- package/dist/components/es-ES-U4NZUMDT.js +1 -1
- package/dist/components/eu-ES-A7QVB2H4.js +1 -1
- package/dist/components/eventmodeling-FCH6USID.js +1 -1
- package/dist/components/fa-IR-HGAKTJCU.js +1 -1
- package/dist/components/fflate.module.js +1 -1
- package/dist/components/fi-FI-Z5N7JZ37.js +1 -1
- package/dist/components/file-open-002ab408.js +1 -1
- package/dist/components/file-open-7c801643.js +1 -1
- package/dist/components/file-save-3189631c.js +1 -1
- package/dist/components/file-save-745eba88.js +1 -1
- package/dist/components/flowDiagram-I6XJVG4X.js +1 -1
- package/dist/components/fr-FR-RHASNOE6.js +1 -1
- package/dist/components/ganttDiagram-6RSMTGT7.js +1 -1
- package/dist/components/gitGraph-WXDBUCRP.js +1 -1
- package/dist/components/gitGraphDiagram-PVQCEYII.js +1 -1
- package/dist/components/gl-ES-HMX3MZ6V.js +1 -1
- package/dist/components/global-compiler.js +1 -1
- package/dist/components/global-renderer.js +1 -1
- package/dist/components/go.js +1 -1
- package/dist/components/graphlib.js +1 -1
- package/dist/components/he-IL-6SHJWFNN.js +1 -1
- package/dist/components/hi-IN-IWLTKZ5I.js +1 -1
- package/dist/components/hu-HU-A5ZG7DT2.js +1 -1
- package/dist/components/id-ID-SAP4L64H.js +1 -1
- package/dist/components/image-GAAHSSAO.js +1 -1
- package/dist/components/image-blob-reduce.esm.js +1 -1
- package/dist/components/image.js +1 -1
- package/dist/components/info-J43DQDTF.js +1 -1
- package/dist/components/infoDiagram-5YYISTIA.js +1 -1
- package/dist/components/ini.js +1 -1
- package/dist/components/init.js +1 -1
- package/dist/components/ishikawaDiagram-YF4QCWOH.js +1 -1
- package/dist/components/it-IT-JPQ66NNP.js +1 -1
- package/dist/components/ja-JP-DBVTYXUO.js +1 -1
- package/dist/components/java.js +1 -1
- package/dist/components/javascript.js +1 -1
- package/dist/components/journeyDiagram-JHISSGLW.js +1 -1
- package/dist/components/json.js +1 -1
- package/dist/components/jszip.min.js +1 -1
- package/dist/components/kaa-6HZHGXH3.js +1 -1
- package/dist/components/kab-KAB-ZGHBKWFO.js +1 -1
- package/dist/components/kanban-definition-UN3LZRKU.js +1 -1
- package/dist/components/katex.js +1 -1
- package/dist/components/kk-KZ-P5N5QNE5.js +1 -1
- package/dist/components/km-KH-HSX4SM5Z.js +1 -1
- package/dist/components/ko-KR-MTYHY66A.js +1 -1
- package/dist/components/ku-TR-6OUDTVRD.js +1 -1
- package/dist/components/lib.js +1 -1
- package/dist/components/libarchive.js +1 -1
- package/dist/components/linear.js +1 -1
- package/dist/components/lt-LT-XHIRWOB4.js +1 -1
- package/dist/components/lv-LV-5QDEKY6T.js +1 -1
- package/dist/components/markdown.js +1 -1
- package/dist/components/md.js +1 -1
- package/dist/components/mermaid-parser.core.js +1 -1
- package/dist/components/mindmap-definition-RKZ34NQL.js +1 -1
- package/dist/components/model.js +1 -1
- package/dist/components/mp4.js +1 -1
- package/dist/components/mr-IN-CRQNXWMA.js +1 -1
- package/dist/components/my-MM-5M5IBNSE.js +1 -1
- package/dist/components/nb-NO-T6EIAALU.js +1 -1
- package/dist/components/nestedRender.js +1 -1
- package/dist/components/nl-NL-IS3SIHDZ.js +1 -1
- package/dist/components/nn-NO-6E72VCQL.js +1 -1
- package/dist/components/objectSpread2.js +1 -1
- package/dist/components/objectWithoutProperties.js +1 -1
- package/dist/components/oc-FR-POXYY2M6.js +1 -1
- package/dist/components/ofd.js +1 -1
- package/dist/components/ofd2.js +1 -1
- package/dist/components/ordinal.js +1 -1
- package/dist/components/pa-IN-N4M65BXN.js +1 -1
- package/dist/components/packet-YPE3B663.js +1 -1
- package/dist/components/pdf.js +1 -1
- package/dist/components/percentages-BXMCSKIN.js +1 -1
- package/dist/components/php.js +1 -1
- package/dist/components/pica.js +1 -1
- package/dist/components/pie-LRSECV5Y.js +1 -1
- package/dist/components/pie.js +1 -1
- package/dist/components/pieDiagram-4H26LBE5.js +1 -1
- package/dist/components/pl-PL-T2D74RX3.js +1 -1
- package/dist/components/postal-mime.js +1 -1
- package/dist/components/pptx.js +1 -1
- package/dist/components/printLayout.js +1 -1
- package/dist/components/prod.js +1 -1
- package/dist/components/pt-BR-5N22H2LF.js +1 -1
- package/dist/components/pt-PT-UZXXM6DQ.js +1 -1
- package/dist/components/python.js +1 -1
- package/dist/components/quadrantDiagram-W4KKPZXB.js +1 -1
- package/dist/components/radar-GUYGQ44K.js +1 -1
- package/dist/components/renderer.js +1 -1
- package/dist/components/requirementDiagram-4Y6WPE33.js +1 -1
- package/dist/components/ro-RO-JPDTUUEW.js +1 -1
- package/dist/components/rough.esm.js +1 -1
- package/dist/components/roundRect.js +1 -1
- package/dist/components/ru-RU-B4JR7IUQ.js +1 -1
- package/dist/components/rust.js +1 -1
- package/dist/components/sankeyDiagram-5OEKKPKP.js +1 -1
- package/dist/components/sequenceDiagram-3UESZ5HK.js +1 -1
- package/dist/components/shared.js +1 -1
- package/dist/components/shared2.js +1 -1
- package/dist/components/si-LK-N5RQ5JYF.js +1 -1
- package/dist/components/sk-SK-C5VTKIMK.js +1 -1
- package/dist/components/sl-SI-NN7IZMDC.js +1 -1
- package/dist/components/sourceLoading.js +1 -1
- package/dist/components/sql.js +1 -1
- package/dist/components/src.js +1 -1
- package/dist/components/src2.js +1 -1
- package/dist/components/stateDiagram-AJRCARHV.js +1 -1
- package/dist/components/stateDiagram-v2-BHNVJYJU.js +1 -1
- package/dist/components/subset-shared.chunk.js +1 -1
- package/dist/components/subset-worker.chunk.js +1 -1
- package/dist/components/sv-SE-XGPEYMSR.js +1 -1
- package/dist/components/ta-IN-2NMHFXQM.js +1 -1
- package/dist/components/text.js +1 -1
- package/dist/components/th-TH-HPSO5L25.js +1 -1
- package/dist/components/three.module.js +1 -1
- package/dist/components/time.js +1 -1
- package/dist/components/timeline-definition-PNZ67QCA.js +1 -1
- package/dist/components/tr-TR-DEFEU3FU.js +1 -1
- package/dist/components/treeView-BLDUP644.js +1 -1
- package/dist/components/treemap-LRROVOQU.js +1 -1
- package/dist/components/typescript.js +1 -1
- package/dist/components/typst.js +1 -1
- package/dist/components/uk-UA-QMV73CPH.js +1 -1
- package/dist/components/umd.js +1 -1
- package/dist/components/use.js +1 -1
- package/dist/components/util.js +1 -1
- package/dist/components/vennDiagram-CIIHVFJN.js +1 -1
- package/dist/components/vi-VN-M7AON7JQ.js +1 -1
- package/dist/components/wardley-L42UT6IY.js +1 -1
- package/dist/components/wardleyDiagram-YWT4CUSO.js +1 -1
- package/dist/components/wasm-pack-shim.js +1 -1
- package/dist/components/wasm-pack-shim2.js +1 -1
- package/dist/components/wasm.js +1 -1
- package/dist/components/word.js +1 -1
- package/dist/components/worker-ref.js +1 -1
- package/dist/components/xlsx.js +1 -1
- package/dist/components/xml.js +1 -1
- package/dist/components/xychartDiagram-2RQKCTM6.js +1 -1
- package/dist/components/yaml.js +1 -1
- package/dist/components/zh-CN-LNUGB5OW.js +1 -1
- package/dist/components/zh-HK-E62DVLB3.js +1 -1
- package/dist/components/zh-TW-RAJ6MFWO.js +1 -1
- package/dist/file-viewer3.css +1 -1
- package/dist/index.mjs +1 -1
- package/dist/src/App.vue.d.ts +3 -0
- package/dist/src/compare/CompareApp.vue.d.ts +3 -0
- package/dist/src/components/HelloWorld.vue.d.ts +3 -0
- package/dist/src/components/utils.d.ts +1 -1
- package/dist/src/package/common/type.d.ts +26 -0
- package/dist/src/package/components/FileViewer/FileViewer.vue.d.ts +1 -1
- package/dist/src/package/components/FileViewer/useViewerExport.d.ts +1 -1
- package/dist/src/package/components/FileViewer/util.d.ts +2 -2
- package/dist/src/package/vendors/archive/ArchiveViewer.vue.d.ts +1 -1
- package/dist/src/package/vendors/archive/index.d.ts +1 -1
- package/dist/src/package/vendors/eda/index.d.ts +1 -1
- package/dist/src/package/vendors/email/EmailViewer.vue.d.ts +1 -1
- package/dist/src/package/vendors/email/index.d.ts +1 -1
- package/dist/src/package/vendors/model/index.d.ts +1 -1
- package/dist/src/package/vendors/nestedRender.d.ts +1 -1
- package/dist/src/package/vendors/pdf/PdfView.vue.d.ts +1 -1
- package/dist/src/package/vendors/pdf/index.d.ts +1 -1
- package/dist/src/package/vendors/renders.d.ts +1 -1
- package/dist/src/package/vendors/typst/TypstViewer.vue.d.ts +1 -1
- package/dist/src/package/vendors/typst/index.d.ts +1 -1
- package/dist/src/package/vendors/word/doc.d.ts +1 -1
- package/dist/src/package/vendors/word/docx.d.ts +1 -1
- package/dist/src/package/vendors/xlsx/index.d.ts +1 -1
- package/dist/src/package/vendors/xlsx/util.d.ts +0 -5
- package/package.json +22 -20
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as e, t } from "./asyncToGenerator.js";
|
|
2
2
|
import { t as n } from "./chunk-SRAX5OIU.js";
|
|
3
|
-
//#region node_modules/.pnpm/@excalidraw+excalidraw@0.18.1_@types+react-dom@19.2.3_@types+react@19.2.
|
|
3
|
+
//#region node_modules/.pnpm/@excalidraw+excalidraw@0.18.1_@types+react-dom@19.2.3_@types+react@19.2.17__@types+reac_20b48e3fb533bfb35e3cd3573f75cb5d/node_modules/@excalidraw/excalidraw/dist/prod/chunk-EIO257PC.js
|
|
4
4
|
e();
|
|
5
5
|
var r = (() => {
|
|
6
6
|
let e = new Uint8Array(128);
|
|
@@ -37,9 +37,9 @@ var r = (() => {
|
|
|
37
37
|
return e || (e = n(["fs"].join())), r || (r = n(["path"].join())), t = r.normalize(t), a = e.readFileSync(t), i ? a : a.toString();
|
|
38
38
|
}, h = function(e) {
|
|
39
39
|
let t = m(e, !0);
|
|
40
|
-
return t.buffer || (t = new Uint8Array(t)),
|
|
40
|
+
return t.buffer || (t = new Uint8Array(t)), b(t.buffer), t;
|
|
41
41
|
}, process.argv.length > 1 && process.argv[1].replace(/\\/g, "/"), a = process.argv.slice(2), process.on("uncaughtException", (e) => {
|
|
42
|
-
if (!(e instanceof
|
|
42
|
+
if (!(e instanceof pr)) throw e;
|
|
43
43
|
}), process.on("unhandledRejection", F), o = function(e) {
|
|
44
44
|
process.exit(e);
|
|
45
45
|
}, t.inspect = function() {
|
|
@@ -49,7 +49,7 @@ var r = (() => {
|
|
|
49
49
|
return read(e);
|
|
50
50
|
}), h = function(e) {
|
|
51
51
|
let t;
|
|
52
|
-
return typeof readbuffer == "function" ? new Uint8Array(readbuffer(e)) : (t = read(e, "binary"),
|
|
52
|
+
return typeof readbuffer == "function" ? new Uint8Array(readbuffer(e)) : (t = read(e, "binary"), b(typeof t == "object"), t);
|
|
53
53
|
}, typeof scriptArgs < "u" ? a = scriptArgs : typeof arguments < "u" && (a = arguments), typeof quit == "function" && (o = function(e) {
|
|
54
54
|
quit(e);
|
|
55
55
|
}), typeof print < "u" && (typeof console > "u" && (console = {}), console.log = print, console.warn = console.error = typeof printErr < "u" ? printErr : print);
|
|
@@ -78,7 +78,7 @@ var r = (() => {
|
|
|
78
78
|
get() {
|
|
79
79
|
F("Module.quit has been replaced with plain quit_");
|
|
80
80
|
}
|
|
81
|
-
}),
|
|
81
|
+
}), b(typeof t.memoryInitializerPrefixURL > "u", "Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"), b(typeof t.pthreadMainPrefixURL > "u", "Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"), b(typeof t.cdInitializerPrefixURL > "u", "Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"), b(typeof t.filePackagePrefixURL > "u", "Module.filePackagePrefixURL option was removed, use Module.locateFile instead"), b(typeof t.read > "u", "Module.read option was removed (modify read_ in JS)"), b(typeof t.readAsync > "u", "Module.readAsync option was removed (modify readAsync in JS)"), b(typeof t.readBinary > "u", "Module.readBinary option was removed (modify readBinary in JS)"), b(typeof t.setWindowTitle > "u", "Module.setWindowTitle option was removed (modify setWindowTitle in JS)"), Object.getOwnPropertyDescriptor(t, "read") || Object.defineProperty(t, "read", {
|
|
82
82
|
configurable: !0,
|
|
83
83
|
get() {
|
|
84
84
|
F("Module.read has been replaced with plain read_");
|
|
@@ -93,7 +93,7 @@ var r = (() => {
|
|
|
93
93
|
get() {
|
|
94
94
|
F("Module.readBinary has been replaced with plain readBinary");
|
|
95
95
|
}
|
|
96
|
-
}),
|
|
96
|
+
}), dr = ur = lr = function() {
|
|
97
97
|
F("cannot use the stack before compiled code is ready to run, and has provided stack access");
|
|
98
98
|
};
|
|
99
99
|
function v(e) {
|
|
@@ -104,68 +104,68 @@ var r = (() => {
|
|
|
104
104
|
return e % t;
|
|
105
105
|
},
|
|
106
106
|
debugger() {}
|
|
107
|
-
}, te = function(e) {},
|
|
108
|
-
t.wasmBinary && (
|
|
107
|
+
}, te = function(e) {}, ne;
|
|
108
|
+
t.wasmBinary && (ne = t.wasmBinary), Object.getOwnPropertyDescriptor(t, "wasmBinary") || Object.defineProperty(t, "wasmBinary", {
|
|
109
109
|
configurable: !0,
|
|
110
110
|
get() {
|
|
111
111
|
F("Module.wasmBinary has been replaced with plain wasmBinary");
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
|
-
let
|
|
115
|
-
t.noExitRuntime && (
|
|
114
|
+
let re;
|
|
115
|
+
t.noExitRuntime && (re = t.noExitRuntime), Object.getOwnPropertyDescriptor(t, "noExitRuntime") || Object.defineProperty(t, "noExitRuntime", {
|
|
116
116
|
configurable: !0,
|
|
117
117
|
get() {
|
|
118
118
|
F("Module.noExitRuntime has been replaced with plain noExitRuntime");
|
|
119
119
|
}
|
|
120
120
|
}), typeof WebAssembly != "object" && F("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");
|
|
121
|
-
let
|
|
121
|
+
let y, ie = new WebAssembly.Table({
|
|
122
122
|
initial: 352,
|
|
123
123
|
maximum: 352,
|
|
124
124
|
element: "anyfunc"
|
|
125
|
-
}),
|
|
126
|
-
function
|
|
125
|
+
}), ae = !1;
|
|
126
|
+
function b(e, t) {
|
|
127
127
|
e || F(`Assertion failed: ${t}`);
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function oe(e) {
|
|
130
130
|
let n = t[`_${e}`];
|
|
131
|
-
return
|
|
131
|
+
return b(n, `Cannot call unknown function ${e}, make sure it is exported`), n;
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function se(e, t, n, r, i) {
|
|
134
134
|
let a = {
|
|
135
135
|
string(e) {
|
|
136
136
|
let t = 0;
|
|
137
137
|
if (e != null && e !== 0) {
|
|
138
138
|
let n = (e.length << 2) + 1;
|
|
139
|
-
t =
|
|
139
|
+
t = lr(n), fe(e, t, n);
|
|
140
140
|
}
|
|
141
141
|
return t;
|
|
142
142
|
},
|
|
143
143
|
array(e) {
|
|
144
|
-
let t =
|
|
145
|
-
return
|
|
144
|
+
let t = lr(e.length);
|
|
145
|
+
return me(e, t), t;
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
148
|
function o(e) {
|
|
149
|
-
return t === "string" ?
|
|
149
|
+
return t === "string" ? x(e) : t === "boolean" ? !!e : e;
|
|
150
150
|
}
|
|
151
|
-
let s =
|
|
152
|
-
if (
|
|
151
|
+
let s = oe(e), c = [], l = 0;
|
|
152
|
+
if (b(t !== "array", "Return type should not be \"array\"."), r) for (let e = 0; e < r.length; e++) {
|
|
153
153
|
let t = a[n[e]];
|
|
154
|
-
t ? (l === 0 && (l =
|
|
154
|
+
t ? (l === 0 && (l = dr()), c[e] = t(r[e])) : c[e] = r[e];
|
|
155
155
|
}
|
|
156
156
|
let u = s.apply(null, c);
|
|
157
|
-
return u = o(u), l !== 0 &&
|
|
157
|
+
return u = o(u), l !== 0 && ur(l), u;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function ce(e, t, n, r) {
|
|
160
160
|
return function() {
|
|
161
|
-
return
|
|
161
|
+
return se(e, t, n, arguments, r);
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
|
-
let
|
|
165
|
-
function
|
|
164
|
+
let le = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0;
|
|
165
|
+
function ue(e, t, n) {
|
|
166
166
|
let r = t + n, i = t;
|
|
167
167
|
for (; e[i] && !(i >= r);) ++i;
|
|
168
|
-
if (i - t > 16 && e.subarray &&
|
|
168
|
+
if (i - t > 16 && e.subarray && le) return le.decode(e.subarray(t, i));
|
|
169
169
|
let a = "";
|
|
170
170
|
for (; t < i;) {
|
|
171
171
|
let n = e[t++];
|
|
@@ -187,10 +187,10 @@ var r = (() => {
|
|
|
187
187
|
}
|
|
188
188
|
return a;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
191
|
-
return e ?
|
|
190
|
+
function x(e, t) {
|
|
191
|
+
return e ? ue(w, e, t) : "";
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function de(e, t, n, r) {
|
|
194
194
|
if (!(r > 0)) return 0;
|
|
195
195
|
let i = n, a = n + r - 1;
|
|
196
196
|
for (let r = 0; r < e.length; ++r) {
|
|
@@ -215,10 +215,10 @@ var r = (() => {
|
|
|
215
215
|
}
|
|
216
216
|
return t[n] = 0, n - i;
|
|
217
217
|
}
|
|
218
|
-
function
|
|
219
|
-
return
|
|
218
|
+
function fe(e, t, n) {
|
|
219
|
+
return b(typeof n == "number", "stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"), de(e, w, t, n);
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function pe(e) {
|
|
222
222
|
let t = 0;
|
|
223
223
|
for (let n = 0; n < e.length; ++n) {
|
|
224
224
|
let r = e.charCodeAt(n);
|
|
@@ -227,43 +227,42 @@ var r = (() => {
|
|
|
227
227
|
return t;
|
|
228
228
|
}
|
|
229
229
|
typeof TextDecoder < "u" && new TextDecoder("utf-16le");
|
|
230
|
-
function
|
|
231
|
-
|
|
230
|
+
function me(e, t) {
|
|
231
|
+
b(e.length >= 0, "writeArrayToMemory array must have a length (should be an array or typed array)"), C.set(e, t);
|
|
232
232
|
}
|
|
233
|
-
let
|
|
234
|
-
function
|
|
233
|
+
let he = 65536;
|
|
234
|
+
function ge(e, t) {
|
|
235
235
|
return e % t > 0 && (e += t - e % t), e;
|
|
236
236
|
}
|
|
237
|
-
let C, w,
|
|
238
|
-
function
|
|
239
|
-
|
|
237
|
+
let S, C, w, _e, ve, T, E, ye, be;
|
|
238
|
+
function xe(e) {
|
|
239
|
+
S = e, t.HEAP8 = C = new Int8Array(e), t.HEAP16 = _e = new Int16Array(e), t.HEAP32 = T = new Int32Array(e), t.HEAPU8 = w = new Uint8Array(e), t.HEAPU16 = ve = new Uint16Array(e), t.HEAPU32 = E = new Uint32Array(e), t.HEAPF32 = ye = new Float32Array(e), t.HEAPF64 = be = new Float64Array(e);
|
|
240
240
|
}
|
|
241
|
-
|
|
242
|
-
x(!0, "stack must start aligned"), x(xe % 16 == 0, "heap must start aligned");
|
|
241
|
+
b(!0, "stack must start aligned"), b(!0, "heap must start aligned");
|
|
243
242
|
let Se = 5242880;
|
|
244
|
-
t.TOTAL_STACK &&
|
|
243
|
+
t.TOTAL_STACK && b(Se === t.TOTAL_STACK, "the stack size can no longer be determined at runtime");
|
|
245
244
|
let Ce = t.TOTAL_MEMORY || 16777216;
|
|
246
245
|
Object.getOwnPropertyDescriptor(t, "TOTAL_MEMORY") || Object.defineProperty(t, "TOTAL_MEMORY", {
|
|
247
246
|
configurable: !0,
|
|
248
247
|
get() {
|
|
249
248
|
F("Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY");
|
|
250
249
|
}
|
|
251
|
-
}),
|
|
250
|
+
}), b(Ce >= Se, `TOTAL_MEMORY should be larger than TOTAL_STACK, was ${Ce}! (TOTAL_STACK=${Se})`), b(typeof Int32Array < "u" && typeof Float64Array < "u" && Int32Array.prototype.subarray !== void 0 && Int32Array.prototype.set !== void 0, "JS engine does not provide full typed array support"), y = t.wasmMemory ? t.wasmMemory : new WebAssembly.Memory({ initial: Ce / he }), y && (S = y.buffer), Ce = S.byteLength, b(Ce % he == 0), xe(S), T[108480] = 5676992;
|
|
252
251
|
function we() {
|
|
253
|
-
|
|
252
|
+
b(!0), E[1419247] = 34821223, E[1419246] = 2310721022, T[0] = 1668509029;
|
|
254
253
|
}
|
|
255
|
-
function
|
|
256
|
-
let e =
|
|
257
|
-
(e != 34821223 || t != 2310721022) && F(`Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x${t.toString(16)} ${e.toString(16)}`),
|
|
254
|
+
function D() {
|
|
255
|
+
let e = E[1419247], t = E[1419246];
|
|
256
|
+
(e != 34821223 || t != 2310721022) && F(`Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x${t.toString(16)} ${e.toString(16)}`), T[0] !== 1668509029 && F("Runtime error: The application has corrupted its heap memory area (address zero)!");
|
|
258
257
|
}
|
|
259
258
|
function Te(e) {
|
|
260
|
-
F(`Stack overflow! Attempted to allocate ${e} bytes on the stack, but stack has only ${
|
|
259
|
+
F(`Stack overflow! Attempted to allocate ${e} bytes on the stack, but stack has only ${5676992 - dr() + e} bytes available!`);
|
|
261
260
|
}
|
|
262
261
|
(function() {
|
|
263
262
|
let e = new Int16Array(1), t = new Int8Array(e.buffer);
|
|
264
263
|
if (e[0] = 25459, t[0] !== 115 || t[1] !== 99) throw "Runtime error: expected the system to be little-endian!";
|
|
265
264
|
})();
|
|
266
|
-
function
|
|
265
|
+
function O(e, t) {
|
|
267
266
|
F(`Invalid function pointer ${e} called with signature '${t}'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this). Build with ASSERTIONS=2 for more info.`);
|
|
268
267
|
}
|
|
269
268
|
function Ee(e) {
|
|
@@ -277,22 +276,22 @@ var r = (() => {
|
|
|
277
276
|
typeof r == "number" ? n.arg === void 0 ? t.dynCall_v(r) : t.dynCall_vi(r, n.arg) : r(n.arg === void 0 ? null : n.arg);
|
|
278
277
|
}
|
|
279
278
|
}
|
|
280
|
-
let De = [], Oe = [], ke = [], Ae = [],
|
|
279
|
+
let De = [], Oe = [], ke = [], Ae = [], k = !1, A = !1;
|
|
281
280
|
function je() {
|
|
282
281
|
if (t.preRun) for (typeof t.preRun == "function" && (t.preRun = [t.preRun]); t.preRun.length;) Ie(t.preRun.shift());
|
|
283
282
|
Ee(De);
|
|
284
283
|
}
|
|
285
284
|
function Me() {
|
|
286
|
-
|
|
285
|
+
D(), b(!k), k = !0, Ee(Oe);
|
|
287
286
|
}
|
|
288
287
|
function Ne() {
|
|
289
|
-
|
|
288
|
+
D(), Ee(ke);
|
|
290
289
|
}
|
|
291
290
|
function Pe() {
|
|
292
|
-
|
|
291
|
+
D(), A = !0;
|
|
293
292
|
}
|
|
294
293
|
function Fe() {
|
|
295
|
-
if (
|
|
294
|
+
if (D(), t.postRun) for (typeof t.postRun == "function" && (t.postRun = [t.postRun]); t.postRun.length;) Le(t.postRun.shift());
|
|
296
295
|
Ee(Ae);
|
|
297
296
|
}
|
|
298
297
|
function Ie(e) {
|
|
@@ -301,28 +300,28 @@ var r = (() => {
|
|
|
301
300
|
function Le(e) {
|
|
302
301
|
Ae.unshift(e);
|
|
303
302
|
}
|
|
304
|
-
|
|
305
|
-
let
|
|
306
|
-
function
|
|
307
|
-
|
|
308
|
-
if (
|
|
309
|
-
clearInterval(
|
|
303
|
+
b(Math.imul, "This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"), b(Math.fround, "This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"), b(Math.clz32, "This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"), b(Math.trunc, "This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
|
|
304
|
+
let j = 0, M = null, N = null, P = {};
|
|
305
|
+
function Re(e) {
|
|
306
|
+
j++, t.monitorRunDependencies && t.monitorRunDependencies(j), e ? (b(!P[e]), P[e] = 1, M === null && typeof setInterval < "u" && (M = setInterval(() => {
|
|
307
|
+
if (ae) {
|
|
308
|
+
clearInterval(M), M = null;
|
|
310
309
|
return;
|
|
311
310
|
}
|
|
312
311
|
let e = !1;
|
|
313
|
-
for (let t in
|
|
312
|
+
for (let t in P) e || (e = !0, _("still waiting on run dependencies:")), _(`dependency: ${t}`);
|
|
314
313
|
e && _("(end of list)");
|
|
315
314
|
}, 1e4))) : _("warning: run dependency added without ID");
|
|
316
315
|
}
|
|
317
|
-
function
|
|
318
|
-
if (
|
|
319
|
-
let e =
|
|
320
|
-
|
|
316
|
+
function ze(e) {
|
|
317
|
+
if (j--, t.monitorRunDependencies && t.monitorRunDependencies(j), e ? (b(P[e]), delete P[e]) : _("warning: run dependency removed without ID"), j == 0 && (M !== null && (clearInterval(M), M = null), N)) {
|
|
318
|
+
let e = N;
|
|
319
|
+
N = null, e();
|
|
321
320
|
}
|
|
322
321
|
}
|
|
323
322
|
t.preloadedImages = {}, t.preloadedAudios = {};
|
|
324
323
|
function F(e) {
|
|
325
|
-
throw t.onAbort && t.onAbort(e), e += "", g(e), _(e),
|
|
324
|
+
throw t.onAbort && t.onAbort(e), e += "", g(e), _(e), ae = !0, `abort(${e}) at ${Je()}`;
|
|
326
325
|
}
|
|
327
326
|
var I = {
|
|
328
327
|
error() {
|
|
@@ -360,33 +359,33 @@ var r = (() => {
|
|
|
360
359
|
}
|
|
361
360
|
};
|
|
362
361
|
t.FS_createDataFile = I.createDataFile, t.FS_createPreloadedFile = I.createPreloadedFile;
|
|
363
|
-
let
|
|
364
|
-
function
|
|
365
|
-
return String.prototype.startsWith ? e.startsWith(
|
|
362
|
+
let Be = "data:application/octet-stream;base64,";
|
|
363
|
+
function Ve(e) {
|
|
364
|
+
return String.prototype.startsWith ? e.startsWith(Be) : e.indexOf(Be) === 0;
|
|
366
365
|
}
|
|
367
366
|
let L = "woff2.wasm";
|
|
368
|
-
|
|
369
|
-
function
|
|
367
|
+
Ve(L) || (L = p(L));
|
|
368
|
+
function He() {
|
|
370
369
|
try {
|
|
371
|
-
if (
|
|
370
|
+
if (ne) return new Uint8Array(ne);
|
|
372
371
|
if (h) return h(L);
|
|
373
372
|
throw "both async and sync fetching of the wasm failed";
|
|
374
373
|
} catch (e) {
|
|
375
374
|
F(e);
|
|
376
375
|
}
|
|
377
376
|
}
|
|
378
|
-
function
|
|
379
|
-
return !
|
|
377
|
+
function Ue() {
|
|
378
|
+
return !ne && (s || c) && typeof fetch == "function" ? fetch(L, { credentials: "same-origin" }).then((e) => {
|
|
380
379
|
if (!e.ok) throw `failed to load wasm binary file at '${L}'`;
|
|
381
380
|
return e.arrayBuffer();
|
|
382
|
-
}).catch(() =>
|
|
383
|
-
e(
|
|
381
|
+
}).catch(() => He()) : new Promise((e, t) => {
|
|
382
|
+
e(He());
|
|
384
383
|
});
|
|
385
384
|
}
|
|
386
|
-
function
|
|
385
|
+
function We() {
|
|
387
386
|
let e = {
|
|
388
|
-
env:
|
|
389
|
-
wasi_unstable:
|
|
387
|
+
env: rr,
|
|
388
|
+
wasi_unstable: rr,
|
|
390
389
|
global: {
|
|
391
390
|
NaN: NaN,
|
|
392
391
|
Infinity: Infinity
|
|
@@ -396,20 +395,20 @@ var r = (() => {
|
|
|
396
395
|
};
|
|
397
396
|
function n(e, n) {
|
|
398
397
|
let r = e.exports;
|
|
399
|
-
t.asm = r,
|
|
398
|
+
t.asm = r, ze("wasm-instantiate");
|
|
400
399
|
}
|
|
401
|
-
|
|
400
|
+
Re("wasm-instantiate");
|
|
402
401
|
let r = t;
|
|
403
402
|
function i(e) {
|
|
404
|
-
|
|
403
|
+
b(t === r, "the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"), r = null, n(e.instance);
|
|
405
404
|
}
|
|
406
405
|
function a(t) {
|
|
407
|
-
return
|
|
406
|
+
return Ue().then((t) => WebAssembly.instantiate(t, e)).then(t, (e) => {
|
|
408
407
|
_(`failed to asynchronously prepare wasm: ${e}`), F(e);
|
|
409
408
|
});
|
|
410
409
|
}
|
|
411
410
|
function o() {
|
|
412
|
-
if (!
|
|
411
|
+
if (!ne && typeof WebAssembly.instantiateStreaming == "function" && !Ve(L) && typeof fetch == "function" && typeof process == "object" && process.versions && process.versions.node && +process.versions.node.split(".")[0] < 17) fetch(L, { credentials: "same-origin" }).then((t) => WebAssembly.instantiateStreaming(t, e).then(i, (e) => {
|
|
413
412
|
_(`wasm streaming compile failed: ${e}`), _("falling back to ArrayBuffer instantiation"), a(i);
|
|
414
413
|
}));
|
|
415
414
|
else return a(i);
|
|
@@ -421,32 +420,32 @@ var r = (() => {
|
|
|
421
420
|
}
|
|
422
421
|
return o(), {};
|
|
423
422
|
}
|
|
424
|
-
t.asm =
|
|
425
|
-
|
|
426
|
-
} }),
|
|
427
|
-
function
|
|
423
|
+
t.asm = We, Oe.push({ func() {
|
|
424
|
+
cr();
|
|
425
|
+
} }), b(!0);
|
|
426
|
+
function Ge(e) {
|
|
428
427
|
let n = t.___cxa_demangle || t.__cxa_demangle;
|
|
429
|
-
|
|
428
|
+
b(n);
|
|
430
429
|
try {
|
|
431
430
|
let t = e;
|
|
432
431
|
t.startsWith("__Z") && (t = t.substr(1));
|
|
433
|
-
let o =
|
|
434
|
-
var r =
|
|
435
|
-
|
|
436
|
-
var i =
|
|
437
|
-
if (
|
|
432
|
+
let o = pe(t) + 1;
|
|
433
|
+
var r = sr(o);
|
|
434
|
+
fe(t, r, o);
|
|
435
|
+
var i = sr(4), a = n(r, 0, 0, i);
|
|
436
|
+
if (T[i >> 2] === 0 && a) return x(a);
|
|
438
437
|
} catch (e) {} finally {
|
|
439
|
-
r &&
|
|
438
|
+
r && $(r), i && $(i), a && $(a);
|
|
440
439
|
}
|
|
441
440
|
return e;
|
|
442
441
|
}
|
|
443
|
-
function
|
|
442
|
+
function Ke(e) {
|
|
444
443
|
return e.replace(/\b__Z[\w\d_]+/g, (e) => {
|
|
445
|
-
let t =
|
|
444
|
+
let t = Ge(e);
|
|
446
445
|
return e === t ? e : `${t} [${e}]`;
|
|
447
446
|
});
|
|
448
447
|
}
|
|
449
|
-
function
|
|
448
|
+
function qe() {
|
|
450
449
|
let e = /* @__PURE__ */ Error();
|
|
451
450
|
if (!e.stack) {
|
|
452
451
|
try {
|
|
@@ -458,24 +457,24 @@ var r = (() => {
|
|
|
458
457
|
}
|
|
459
458
|
return e.stack.toString();
|
|
460
459
|
}
|
|
461
|
-
function
|
|
462
|
-
let e =
|
|
460
|
+
function Je() {
|
|
461
|
+
let e = qe();
|
|
463
462
|
return t.extraStackTrace && (e += `
|
|
464
|
-
${t.extraStackTrace()}`),
|
|
463
|
+
${t.extraStackTrace()}`), Ke(e);
|
|
465
464
|
}
|
|
466
|
-
function
|
|
467
|
-
F(`Assertion failed: ${
|
|
468
|
-
t ?
|
|
465
|
+
function Ye(e, t, n, r) {
|
|
466
|
+
F(`Assertion failed: ${x(e)}, at: ${[
|
|
467
|
+
t ? x(t) : "unknown filename",
|
|
469
468
|
n,
|
|
470
|
-
r ?
|
|
469
|
+
r ? x(r) : "unknown function"
|
|
471
470
|
]}`);
|
|
472
471
|
}
|
|
473
|
-
function
|
|
474
|
-
return
|
|
472
|
+
function Xe(e) {
|
|
473
|
+
return sr(e);
|
|
475
474
|
}
|
|
476
|
-
let
|
|
477
|
-
function
|
|
478
|
-
throw
|
|
475
|
+
let Ze = {};
|
|
476
|
+
function Qe(e, t, n) {
|
|
477
|
+
throw Ze[e] = {
|
|
479
478
|
ptr: e,
|
|
480
479
|
adjusted: [e],
|
|
481
480
|
type: t,
|
|
@@ -483,11 +482,11 @@ ${t.extraStackTrace()}`), Je(e);
|
|
|
483
482
|
refcount: 0,
|
|
484
483
|
caught: !1,
|
|
485
484
|
rethrown: !1
|
|
486
|
-
}, "uncaught_exception" in
|
|
485
|
+
}, "uncaught_exception" in ar ? ar.uncaught_exceptions++ : ar.uncaught_exceptions = 1, `${e} - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.`;
|
|
487
486
|
}
|
|
488
|
-
function
|
|
489
|
-
function
|
|
490
|
-
var
|
|
487
|
+
function $e() {}
|
|
488
|
+
function et() {}
|
|
489
|
+
var R = {
|
|
491
490
|
splitPath(e) {
|
|
492
491
|
return /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);
|
|
493
492
|
},
|
|
@@ -502,10 +501,10 @@ ${t.extraStackTrace()}`), Je(e);
|
|
|
502
501
|
},
|
|
503
502
|
normalize(e) {
|
|
504
503
|
let t = e.charAt(0) === "/", n = e.substr(-1) === "/";
|
|
505
|
-
return e =
|
|
504
|
+
return e = R.normalizeArray(e.split("/").filter((e) => !!e), !t).join("/"), !e && !t && (e = "."), e && n && (e += "/"), (t ? "/" : "") + e;
|
|
506
505
|
},
|
|
507
506
|
dirname(e) {
|
|
508
|
-
let t =
|
|
507
|
+
let t = R.splitPath(e), n = t[0], r = t[1];
|
|
509
508
|
return !n && !r ? "." : (r && (r = r.substr(0, r.length - 1)), n + r);
|
|
510
509
|
},
|
|
511
510
|
basename(e) {
|
|
@@ -514,83 +513,83 @@ ${t.extraStackTrace()}`), Je(e);
|
|
|
514
513
|
return t === -1 ? e : e.substr(t + 1);
|
|
515
514
|
},
|
|
516
515
|
extname(e) {
|
|
517
|
-
return
|
|
516
|
+
return R.splitPath(e)[3];
|
|
518
517
|
},
|
|
519
518
|
join() {
|
|
520
519
|
let e = Array.prototype.slice.call(arguments, 0);
|
|
521
|
-
return
|
|
520
|
+
return R.normalize(e.join("/"));
|
|
522
521
|
},
|
|
523
522
|
join2(e, t) {
|
|
524
|
-
return
|
|
523
|
+
return R.normalize(`${e}/${t}`);
|
|
525
524
|
}
|
|
526
|
-
},
|
|
525
|
+
}, z = {
|
|
527
526
|
buffers: [
|
|
528
527
|
null,
|
|
529
528
|
[],
|
|
530
529
|
[]
|
|
531
530
|
],
|
|
532
531
|
printChar(e, t) {
|
|
533
|
-
let n =
|
|
534
|
-
|
|
532
|
+
let n = z.buffers[e];
|
|
533
|
+
b(n), t === 0 || t === 10 ? ((e === 1 ? g : _)(ue(n, 0)), n.length = 0) : n.push(t);
|
|
535
534
|
},
|
|
536
535
|
varargs: 0,
|
|
537
536
|
get(e) {
|
|
538
|
-
return
|
|
537
|
+
return z.varargs += 4, T[z.varargs - 4 >> 2];
|
|
539
538
|
},
|
|
540
539
|
getStr() {
|
|
541
|
-
return
|
|
540
|
+
return x(z.get());
|
|
542
541
|
},
|
|
543
542
|
get64() {
|
|
544
|
-
let e =
|
|
545
|
-
return
|
|
543
|
+
let e = z.get(), t = z.get();
|
|
544
|
+
return b(e >= 0 ? t === 0 : t === -1), e;
|
|
546
545
|
},
|
|
547
546
|
getZero() {
|
|
548
|
-
|
|
547
|
+
b(z.get() === 0);
|
|
549
548
|
}
|
|
550
549
|
};
|
|
551
|
-
function
|
|
550
|
+
function tt(e) {
|
|
552
551
|
try {
|
|
553
552
|
return F("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"), 0;
|
|
554
553
|
} catch (e) {
|
|
555
554
|
return (typeof I > "u" || !(e instanceof I.ErrnoError)) && F(e), e.errno;
|
|
556
555
|
}
|
|
557
556
|
}
|
|
558
|
-
function
|
|
559
|
-
return
|
|
557
|
+
function nt() {
|
|
558
|
+
return tt.apply(null, arguments);
|
|
560
559
|
}
|
|
561
|
-
function
|
|
560
|
+
function rt(e, t, n, r, i) {
|
|
562
561
|
try {
|
|
563
562
|
return F("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"), 0;
|
|
564
563
|
} catch (e) {
|
|
565
564
|
return (typeof I > "u" || !(e instanceof I.ErrnoError)) && F(e), e.errno;
|
|
566
565
|
}
|
|
567
566
|
}
|
|
568
|
-
function
|
|
569
|
-
return
|
|
567
|
+
function it() {
|
|
568
|
+
return rt.apply(null, arguments);
|
|
570
569
|
}
|
|
571
|
-
function
|
|
570
|
+
function at() {
|
|
572
571
|
let e = t._fflush;
|
|
573
572
|
e && e(0);
|
|
574
|
-
let n =
|
|
575
|
-
n[1].length &&
|
|
573
|
+
let n = z.buffers;
|
|
574
|
+
n[1].length && z.printChar(1, 10), n[2].length && z.printChar(2, 10);
|
|
576
575
|
}
|
|
577
|
-
function
|
|
576
|
+
function ot(e, t, n, r) {
|
|
578
577
|
try {
|
|
579
578
|
let i = 0;
|
|
580
579
|
for (let r = 0; r < n; r++) {
|
|
581
|
-
let n =
|
|
582
|
-
for (let t = 0; t < a; t++)
|
|
580
|
+
let n = T[t + r * 8 >> 2], a = T[t + (r * 8 + 4) >> 2];
|
|
581
|
+
for (let t = 0; t < a; t++) z.printChar(e, w[n + t]);
|
|
583
582
|
i += a;
|
|
584
583
|
}
|
|
585
|
-
return
|
|
584
|
+
return T[r >> 2] = i, 0;
|
|
586
585
|
} catch (e) {
|
|
587
586
|
return (typeof I > "u" || !(e instanceof I.ErrnoError)) && F(e), e.errno;
|
|
588
587
|
}
|
|
589
588
|
}
|
|
590
|
-
function
|
|
591
|
-
return
|
|
589
|
+
function st() {
|
|
590
|
+
return ot.apply(null, arguments);
|
|
592
591
|
}
|
|
593
|
-
function
|
|
592
|
+
function ct(e) {
|
|
594
593
|
switch (e) {
|
|
595
594
|
case 1: return 0;
|
|
596
595
|
case 2: return 1;
|
|
@@ -599,32 +598,32 @@ ${t.extraStackTrace()}`), Je(e);
|
|
|
599
598
|
default: throw TypeError(`Unknown type size: ${e}`);
|
|
600
599
|
}
|
|
601
600
|
}
|
|
602
|
-
function
|
|
601
|
+
function lt() {
|
|
603
602
|
let e = Array(256);
|
|
604
603
|
for (let t = 0; t < 256; ++t) e[t] = String.fromCharCode(t);
|
|
605
|
-
|
|
604
|
+
ut = e;
|
|
606
605
|
}
|
|
607
|
-
var
|
|
608
|
-
function
|
|
606
|
+
var ut = void 0;
|
|
607
|
+
function B(e) {
|
|
609
608
|
let t = "", n = e;
|
|
610
|
-
for (;
|
|
609
|
+
for (; w[n];) t += ut[w[n++]];
|
|
611
610
|
return t;
|
|
612
611
|
}
|
|
613
|
-
let
|
|
614
|
-
function
|
|
612
|
+
let V = {}, H = {}, dt = {};
|
|
613
|
+
function ft(e) {
|
|
615
614
|
if (e === void 0) return "_unknown";
|
|
616
615
|
e = e.replace(/[^a-zA-Z0-9_]/g, "$");
|
|
617
616
|
let t = e.charCodeAt(0);
|
|
618
617
|
return t >= 48 && t <= 57 ? `_${e}` : e;
|
|
619
618
|
}
|
|
620
|
-
function
|
|
621
|
-
return e =
|
|
619
|
+
function pt(e, t) {
|
|
620
|
+
return e = ft(e), Function("body", `return function ${e}() {
|
|
622
621
|
"use strict"; return body.apply(this, arguments);
|
|
623
622
|
};
|
|
624
623
|
`)(t);
|
|
625
624
|
}
|
|
626
|
-
function
|
|
627
|
-
let n =
|
|
625
|
+
function mt(e, t) {
|
|
626
|
+
let n = pt(t, function(e) {
|
|
628
627
|
this.name = t, this.message = e;
|
|
629
628
|
let n = Error(e).stack;
|
|
630
629
|
n !== void 0 && (this.stack = `${this.toString()}
|
|
@@ -634,47 +633,47 @@ ${n.replace(/^Error(:[^\n]*)?\n/, "")}`);
|
|
|
634
633
|
return this.message === void 0 ? this.name : `${this.name}: ${this.message}`;
|
|
635
634
|
}, n;
|
|
636
635
|
}
|
|
637
|
-
let
|
|
638
|
-
function
|
|
639
|
-
throw new
|
|
636
|
+
let U;
|
|
637
|
+
function W(e) {
|
|
638
|
+
throw new U(e);
|
|
640
639
|
}
|
|
641
|
-
let
|
|
642
|
-
function
|
|
643
|
-
throw new
|
|
640
|
+
let ht;
|
|
641
|
+
function gt(e) {
|
|
642
|
+
throw new ht(e);
|
|
644
643
|
}
|
|
645
|
-
function
|
|
644
|
+
function G(e, t, n) {
|
|
646
645
|
e.forEach((e) => {
|
|
647
|
-
|
|
646
|
+
dt[e] = t;
|
|
648
647
|
});
|
|
649
648
|
function r(t) {
|
|
650
649
|
let r = n(t);
|
|
651
|
-
r.length !== e.length &&
|
|
652
|
-
for (let t = 0; t < e.length; ++t)
|
|
650
|
+
r.length !== e.length && gt("Mismatched type converter count");
|
|
651
|
+
for (let t = 0; t < e.length; ++t) K(e[t], r[t]);
|
|
653
652
|
}
|
|
654
653
|
let i = Array(t.length), a = [], o = 0;
|
|
655
654
|
t.forEach((e, t) => {
|
|
656
|
-
|
|
657
|
-
i[t] =
|
|
655
|
+
H.hasOwnProperty(e) ? i[t] = H[e] : (a.push(e), V.hasOwnProperty(e) || (V[e] = []), V[e].push(() => {
|
|
656
|
+
i[t] = H[e], ++o, o === a.length && r(i);
|
|
658
657
|
}));
|
|
659
658
|
}), a.length === 0 && r(i);
|
|
660
659
|
}
|
|
661
|
-
function
|
|
660
|
+
function K(e, t, n) {
|
|
662
661
|
if (n = n || {}, !("argPackAdvance" in t)) throw TypeError("registerType registeredInstance requires argPackAdvance");
|
|
663
662
|
let r = t.name;
|
|
664
|
-
if (e ||
|
|
663
|
+
if (e || W(`type "${r}" must have a positive integer typeid pointer`), H.hasOwnProperty(e)) {
|
|
665
664
|
if (n.ignoreDuplicateRegistrations) return;
|
|
666
|
-
|
|
665
|
+
W(`Cannot register type '${r}' twice`);
|
|
667
666
|
}
|
|
668
|
-
if (
|
|
669
|
-
let t =
|
|
670
|
-
delete
|
|
667
|
+
if (H[e] = t, delete dt[e], V.hasOwnProperty(e)) {
|
|
668
|
+
let t = V[e];
|
|
669
|
+
delete V[e], t.forEach((e) => {
|
|
671
670
|
e();
|
|
672
671
|
});
|
|
673
672
|
}
|
|
674
673
|
}
|
|
675
|
-
function
|
|
676
|
-
let a =
|
|
677
|
-
t =
|
|
674
|
+
function _t(e, t, n, r, i) {
|
|
675
|
+
let a = ct(n);
|
|
676
|
+
t = B(t), K(e, {
|
|
678
677
|
name: t,
|
|
679
678
|
fromWireType(e) {
|
|
680
679
|
return !!e;
|
|
@@ -685,23 +684,23 @@ ${n.replace(/^Error(:[^\n]*)?\n/, "")}`);
|
|
|
685
684
|
argPackAdvance: 8,
|
|
686
685
|
readValueFromPointer(e) {
|
|
687
686
|
let r;
|
|
688
|
-
if (n === 1) r =
|
|
689
|
-
else if (n === 2) r =
|
|
690
|
-
else if (n === 4) r =
|
|
687
|
+
if (n === 1) r = C;
|
|
688
|
+
else if (n === 2) r = _e;
|
|
689
|
+
else if (n === 4) r = T;
|
|
691
690
|
else throw TypeError(`Unknown boolean type size: ${t}`);
|
|
692
691
|
return this.fromWireType(r[e >> a]);
|
|
693
692
|
},
|
|
694
693
|
destructorFunction: null
|
|
695
694
|
});
|
|
696
695
|
}
|
|
697
|
-
function
|
|
698
|
-
if (!(this instanceof
|
|
696
|
+
function vt(e) {
|
|
697
|
+
if (!(this instanceof J) || !(e instanceof J)) return !1;
|
|
699
698
|
let t = this.$$.ptrType.registeredClass, n = this.$$.ptr, r = e.$$.ptrType.registeredClass, i = e.$$.ptr;
|
|
700
699
|
for (; t.baseClass;) n = t.upcast(n), t = t.baseClass;
|
|
701
700
|
for (; r.baseClass;) i = r.upcast(i), r = r.baseClass;
|
|
702
701
|
return t === r && n === i;
|
|
703
702
|
}
|
|
704
|
-
function
|
|
703
|
+
function yt(e) {
|
|
705
704
|
return {
|
|
706
705
|
count: e.count,
|
|
707
706
|
deleteScheduled: e.deleteScheduled,
|
|
@@ -712,92 +711,92 @@ ${n.replace(/^Error(:[^\n]*)?\n/, "")}`);
|
|
|
712
711
|
smartPtrType: e.smartPtrType
|
|
713
712
|
};
|
|
714
713
|
}
|
|
715
|
-
function
|
|
714
|
+
function bt(e) {
|
|
716
715
|
function t(e) {
|
|
717
716
|
return e.$$.ptrType.registeredClass.name;
|
|
718
717
|
}
|
|
719
|
-
|
|
718
|
+
W(`${t(e)} instance already deleted`);
|
|
720
719
|
}
|
|
721
|
-
let
|
|
722
|
-
function
|
|
723
|
-
function
|
|
720
|
+
let xt = !1;
|
|
721
|
+
function St(e) {}
|
|
722
|
+
function Ct(e) {
|
|
724
723
|
e.smartPtr ? e.smartPtrType.rawDestructor(e.smartPtr) : e.ptrType.registeredClass.rawDestructor(e.ptr);
|
|
725
724
|
}
|
|
726
|
-
function
|
|
727
|
-
--e.count.value, e.count.value === 0 &&
|
|
725
|
+
function wt(e) {
|
|
726
|
+
--e.count.value, e.count.value === 0 && Ct(e);
|
|
728
727
|
}
|
|
729
|
-
function
|
|
730
|
-
return typeof FinalizationGroup > "u" ? (
|
|
728
|
+
function q(e) {
|
|
729
|
+
return typeof FinalizationGroup > "u" ? (q = function(e) {
|
|
731
730
|
return e;
|
|
732
|
-
}, e) : (
|
|
731
|
+
}, e) : (xt = new FinalizationGroup((e) => {
|
|
733
732
|
for (let t = e.next(); !t.done; t = e.next()) {
|
|
734
733
|
let e = t.value;
|
|
735
|
-
e.ptr ?
|
|
734
|
+
e.ptr ? wt(e) : console.warn(`object already deleted: ${e.ptr}`);
|
|
736
735
|
}
|
|
737
|
-
}),
|
|
738
|
-
return
|
|
739
|
-
},
|
|
740
|
-
|
|
741
|
-
},
|
|
742
|
-
}
|
|
743
|
-
function
|
|
744
|
-
if (this.$$.ptr ||
|
|
745
|
-
let e =
|
|
736
|
+
}), q = function(e) {
|
|
737
|
+
return xt.register(e, e.$$, e.$$), e;
|
|
738
|
+
}, St = function(e) {
|
|
739
|
+
xt.unregister(e.$$);
|
|
740
|
+
}, q(e));
|
|
741
|
+
}
|
|
742
|
+
function Tt() {
|
|
743
|
+
if (this.$$.ptr || bt(this), this.$$.preservePointerOnDelete) return this.$$.count.value += 1, this;
|
|
744
|
+
let e = q(Object.create(Object.getPrototypeOf(this), { $$: { value: yt(this.$$) } }));
|
|
746
745
|
return e.$$.count.value += 1, e.$$.deleteScheduled = !1, e;
|
|
747
746
|
}
|
|
748
|
-
function
|
|
749
|
-
this.$$.ptr ||
|
|
747
|
+
function Et() {
|
|
748
|
+
this.$$.ptr || bt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && W("Object already scheduled for deletion"), St(this), wt(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0);
|
|
750
749
|
}
|
|
751
|
-
function
|
|
750
|
+
function Dt() {
|
|
752
751
|
return !this.$$.ptr;
|
|
753
752
|
}
|
|
754
|
-
let
|
|
755
|
-
function
|
|
756
|
-
for (;
|
|
757
|
-
let e =
|
|
753
|
+
let Ot, kt = [];
|
|
754
|
+
function At() {
|
|
755
|
+
for (; kt.length;) {
|
|
756
|
+
let e = kt.pop();
|
|
758
757
|
e.$$.deleteScheduled = !1, e.delete();
|
|
759
758
|
}
|
|
760
759
|
}
|
|
761
|
-
function
|
|
762
|
-
return this.$$.ptr ||
|
|
760
|
+
function jt() {
|
|
761
|
+
return this.$$.ptr || bt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && W("Object already scheduled for deletion"), kt.push(this), kt.length === 1 && Ot && Ot(At), this.$$.deleteScheduled = !0, this;
|
|
763
762
|
}
|
|
764
|
-
function
|
|
765
|
-
|
|
763
|
+
function Mt() {
|
|
764
|
+
J.prototype.isAliasOf = vt, J.prototype.clone = Tt, J.prototype.delete = Et, J.prototype.isDeleted = Dt, J.prototype.deleteLater = jt;
|
|
766
765
|
}
|
|
767
|
-
function
|
|
768
|
-
let
|
|
769
|
-
function
|
|
766
|
+
function J() {}
|
|
767
|
+
let Nt = {};
|
|
768
|
+
function Pt(e, t, n) {
|
|
770
769
|
if (e[t].overloadTable === void 0) {
|
|
771
770
|
let r = e[t];
|
|
772
771
|
e[t] = function() {
|
|
773
|
-
return e[t].overloadTable.hasOwnProperty(arguments.length) ||
|
|
772
|
+
return e[t].overloadTable.hasOwnProperty(arguments.length) || W(`Function '${n}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`), e[t].overloadTable[arguments.length].apply(this, arguments);
|
|
774
773
|
}, e[t].overloadTable = [], e[t].overloadTable[r.argCount] = r;
|
|
775
774
|
}
|
|
776
775
|
}
|
|
777
|
-
function
|
|
778
|
-
t.hasOwnProperty(e) ? ((r === void 0 || t[e].overloadTable !== void 0 && t[e].overloadTable[r] !== void 0) &&
|
|
776
|
+
function Ft(e, n, r) {
|
|
777
|
+
t.hasOwnProperty(e) ? ((r === void 0 || t[e].overloadTable !== void 0 && t[e].overloadTable[r] !== void 0) && W(`Cannot register public name '${e}' twice`), Pt(t, e, e), t.hasOwnProperty(r) && W(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`), t[e].overloadTable[r] = n) : (t[e] = n, r !== void 0 && (t[e].numArguments = r));
|
|
779
778
|
}
|
|
780
|
-
function
|
|
779
|
+
function It(e, t, n, r, i, a, o, s) {
|
|
781
780
|
this.name = e, this.constructor = t, this.instancePrototype = n, this.rawDestructor = r, this.baseClass = i, this.getActualType = a, this.upcast = o, this.downcast = s, this.pureVirtualFunctions = [];
|
|
782
781
|
}
|
|
783
|
-
function
|
|
784
|
-
for (; t !== n;) t.upcast ||
|
|
782
|
+
function Lt(e, t, n) {
|
|
783
|
+
for (; t !== n;) t.upcast || W(`Expected null or instance of ${n.name}, got an instance of ${t.name}`), e = t.upcast(e), t = t.baseClass;
|
|
785
784
|
return e;
|
|
786
785
|
}
|
|
787
|
-
function
|
|
788
|
-
if (t === null) return this.isReference &&
|
|
789
|
-
t.$$ ||
|
|
786
|
+
function Rt(e, t) {
|
|
787
|
+
if (t === null) return this.isReference && W(`null is not a valid ${this.name}`), 0;
|
|
788
|
+
t.$$ || W(`Cannot pass "${Q(t)}" as a ${this.name}`), t.$$.ptr || W(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
790
789
|
let n = t.$$.ptrType.registeredClass;
|
|
791
|
-
return
|
|
790
|
+
return Lt(t.$$.ptr, n, this.registeredClass);
|
|
792
791
|
}
|
|
793
|
-
function
|
|
792
|
+
function zt(e, t) {
|
|
794
793
|
let n;
|
|
795
|
-
if (t === null) return this.isReference &&
|
|
796
|
-
t.$$ ||
|
|
794
|
+
if (t === null) return this.isReference && W(`null is not a valid ${this.name}`), this.isSmartPointer ? (n = this.rawConstructor(), e !== null && e.push(this.rawDestructor, n), n) : 0;
|
|
795
|
+
t.$$ || W(`Cannot pass "${Q(t)}" as a ${this.name}`), t.$$.ptr || W(`Cannot pass deleted object as a pointer of type ${this.name}`), !this.isConst && t.$$.ptrType.isConst && W(`Cannot convert argument of type ${t.$$.smartPtrType ? t.$$.smartPtrType.name : t.$$.ptrType.name} to parameter type ${this.name}`);
|
|
797
796
|
let r = t.$$.ptrType.registeredClass;
|
|
798
|
-
if (n =
|
|
797
|
+
if (n = Lt(t.$$.ptr, r, this.registeredClass), this.isSmartPointer) switch (t.$$.smartPtr === void 0 && W("Passing raw pointer to smart pointer is illegal"), this.sharingPolicy) {
|
|
799
798
|
case 0:
|
|
800
|
-
t.$$.smartPtrType === this ? n = t.$$.smartPtr :
|
|
799
|
+
t.$$.smartPtrType === this ? n = t.$$.smartPtr : W(`Cannot convert argument of type ${t.$$.smartPtrType ? t.$$.smartPtrType.name : t.$$.ptrType.name} to parameter type ${this.name}`);
|
|
801
800
|
break;
|
|
802
801
|
case 1:
|
|
803
802
|
n = t.$$.smartPtr;
|
|
@@ -806,110 +805,110 @@ ${n.replace(/^Error(:[^\n]*)?\n/, "")}`);
|
|
|
806
805
|
if (t.$$.smartPtrType === this) n = t.$$.smartPtr;
|
|
807
806
|
else {
|
|
808
807
|
let r = t.clone();
|
|
809
|
-
n = this.rawShare(n,
|
|
808
|
+
n = this.rawShare(n, yn(() => {
|
|
810
809
|
r.delete();
|
|
811
810
|
})), e !== null && e.push(this.rawDestructor, n);
|
|
812
811
|
}
|
|
813
812
|
break;
|
|
814
|
-
default:
|
|
813
|
+
default: W("Unsupporting sharing policy");
|
|
815
814
|
}
|
|
816
815
|
return n;
|
|
817
816
|
}
|
|
818
|
-
function
|
|
819
|
-
if (t === null) return this.isReference &&
|
|
820
|
-
t.$$ ||
|
|
817
|
+
function Bt(e, t) {
|
|
818
|
+
if (t === null) return this.isReference && W(`null is not a valid ${this.name}`), 0;
|
|
819
|
+
t.$$ || W(`Cannot pass "${Q(t)}" as a ${this.name}`), t.$$.ptr || W(`Cannot pass deleted object as a pointer of type ${this.name}`), t.$$.ptrType.isConst && W(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);
|
|
821
820
|
let n = t.$$.ptrType.registeredClass;
|
|
822
|
-
return
|
|
821
|
+
return Lt(t.$$.ptr, n, this.registeredClass);
|
|
823
822
|
}
|
|
824
|
-
function
|
|
825
|
-
return this.fromWireType(
|
|
823
|
+
function Vt(e) {
|
|
824
|
+
return this.fromWireType(E[e >> 2]);
|
|
826
825
|
}
|
|
827
|
-
function
|
|
826
|
+
function Ht(e) {
|
|
828
827
|
return this.rawGetPointee && (e = this.rawGetPointee(e)), e;
|
|
829
828
|
}
|
|
830
|
-
function
|
|
829
|
+
function Ut(e) {
|
|
831
830
|
this.rawDestructor && this.rawDestructor(e);
|
|
832
831
|
}
|
|
833
|
-
function
|
|
832
|
+
function Wt(e) {
|
|
834
833
|
e !== null && e.delete();
|
|
835
834
|
}
|
|
836
|
-
function
|
|
835
|
+
function Gt(e, t, n) {
|
|
837
836
|
if (t === n) return e;
|
|
838
837
|
if (n.baseClass === void 0) return null;
|
|
839
|
-
let r =
|
|
838
|
+
let r = Gt(e, t, n.baseClass);
|
|
840
839
|
return r === null ? null : n.downcast(r);
|
|
841
840
|
}
|
|
842
|
-
function
|
|
843
|
-
return Object.keys(
|
|
841
|
+
function Kt() {
|
|
842
|
+
return Object.keys(Xt).length;
|
|
844
843
|
}
|
|
845
|
-
function
|
|
844
|
+
function qt() {
|
|
846
845
|
let e = [];
|
|
847
|
-
for (let t in
|
|
846
|
+
for (let t in Xt) Xt.hasOwnProperty(t) && e.push(Xt[t]);
|
|
848
847
|
return e;
|
|
849
848
|
}
|
|
850
|
-
function
|
|
851
|
-
|
|
849
|
+
function Jt(e) {
|
|
850
|
+
Ot = e, kt.length && Ot && Ot(At);
|
|
852
851
|
}
|
|
853
|
-
function
|
|
854
|
-
t.getInheritedInstanceCount =
|
|
852
|
+
function Yt() {
|
|
853
|
+
t.getInheritedInstanceCount = Kt, t.getLiveInheritedInstances = qt, t.flushPendingDeletes = At, t.setDelayFunction = Jt;
|
|
855
854
|
}
|
|
856
|
-
var
|
|
857
|
-
function
|
|
858
|
-
for (t === void 0 &&
|
|
855
|
+
var Xt = {};
|
|
856
|
+
function Zt(e, t) {
|
|
857
|
+
for (t === void 0 && W("ptr should not be undefined"); e.baseClass;) t = e.upcast(t), e = e.baseClass;
|
|
859
858
|
return t;
|
|
860
859
|
}
|
|
861
|
-
function
|
|
862
|
-
return t =
|
|
860
|
+
function Qt(e, t) {
|
|
861
|
+
return t = Zt(e, t), Xt[t];
|
|
863
862
|
}
|
|
864
|
-
function
|
|
865
|
-
return (!t.ptrType || !t.ptr) &&
|
|
863
|
+
function $t(e, t) {
|
|
864
|
+
return (!t.ptrType || !t.ptr) && gt("makeClassHandle requires ptr and ptrType"), !!t.smartPtrType != !!t.smartPtr && gt("Both smartPtrType and smartPtr must be specified"), t.count = { value: 1 }, q(Object.create(e, { $$: { value: t } }));
|
|
866
865
|
}
|
|
867
|
-
function
|
|
866
|
+
function en(e) {
|
|
868
867
|
let t = this.getPointee(e);
|
|
869
868
|
if (!t) return this.destructor(e), null;
|
|
870
|
-
let n =
|
|
869
|
+
let n = Qt(this.registeredClass, t);
|
|
871
870
|
if (n !== void 0) {
|
|
872
871
|
if (n.$$.count.value === 0) return n.$$.ptr = t, n.$$.smartPtr = e, n.clone();
|
|
873
872
|
let r = n.clone();
|
|
874
873
|
return this.destructor(e), r;
|
|
875
874
|
}
|
|
876
875
|
function r() {
|
|
877
|
-
return this.isSmartPointer ?
|
|
876
|
+
return this.isSmartPointer ? $t(this.registeredClass.instancePrototype, {
|
|
878
877
|
ptrType: this.pointeeType,
|
|
879
878
|
ptr: t,
|
|
880
879
|
smartPtrType: this,
|
|
881
880
|
smartPtr: e
|
|
882
|
-
}) :
|
|
881
|
+
}) : $t(this.registeredClass.instancePrototype, {
|
|
883
882
|
ptrType: this,
|
|
884
883
|
ptr: e
|
|
885
884
|
});
|
|
886
885
|
}
|
|
887
|
-
let i =
|
|
886
|
+
let i = Nt[this.registeredClass.getActualType(t)];
|
|
888
887
|
if (!i) return r.call(this);
|
|
889
888
|
let a;
|
|
890
889
|
a = this.isConst ? i.constPointerType : i.pointerType;
|
|
891
|
-
let o =
|
|
892
|
-
return o === null ? r.call(this) : this.isSmartPointer ?
|
|
890
|
+
let o = Gt(t, this.registeredClass, a.registeredClass);
|
|
891
|
+
return o === null ? r.call(this) : this.isSmartPointer ? $t(a.registeredClass.instancePrototype, {
|
|
893
892
|
ptrType: a,
|
|
894
893
|
ptr: o,
|
|
895
894
|
smartPtrType: this,
|
|
896
895
|
smartPtr: e
|
|
897
|
-
}) :
|
|
896
|
+
}) : $t(a.registeredClass.instancePrototype, {
|
|
898
897
|
ptrType: a,
|
|
899
898
|
ptr: o
|
|
900
899
|
});
|
|
901
900
|
}
|
|
902
|
-
function
|
|
903
|
-
|
|
901
|
+
function tn() {
|
|
902
|
+
Y.prototype.getPointee = Ht, Y.prototype.destructor = Ut, Y.prototype.argPackAdvance = 8, Y.prototype.readValueFromPointer = Vt, Y.prototype.deleteObject = Wt, Y.prototype.fromWireType = en;
|
|
904
903
|
}
|
|
905
|
-
function
|
|
906
|
-
this.name = e, this.registeredClass = t, this.isReference = n, this.isConst = r, this.isSmartPointer = i, this.pointeeType = a, this.sharingPolicy = o, this.rawGetPointee = s, this.rawConstructor = c, this.rawShare = l, this.rawDestructor = u, !i && t.baseClass === void 0 ? r ? (this.toWireType =
|
|
904
|
+
function Y(e, t, n, r, i, a, o, s, c, l, u) {
|
|
905
|
+
this.name = e, this.registeredClass = t, this.isReference = n, this.isConst = r, this.isSmartPointer = i, this.pointeeType = a, this.sharingPolicy = o, this.rawGetPointee = s, this.rawConstructor = c, this.rawShare = l, this.rawDestructor = u, !i && t.baseClass === void 0 ? r ? (this.toWireType = Rt, this.destructorFunction = null) : (this.toWireType = Bt, this.destructorFunction = null) : this.toWireType = zt;
|
|
907
906
|
}
|
|
908
|
-
function
|
|
909
|
-
t.hasOwnProperty(e) ||
|
|
907
|
+
function nn(e, n, r) {
|
|
908
|
+
t.hasOwnProperty(e) || gt("Replacing nonexistant public symbol"), t[e].overloadTable !== void 0 && r !== void 0 ? t[e].overloadTable[r] = n : (t[e] = n, t[e].argCount = r);
|
|
910
909
|
}
|
|
911
|
-
function
|
|
912
|
-
e =
|
|
910
|
+
function X(e, n) {
|
|
911
|
+
e = B(e);
|
|
913
912
|
function r(t) {
|
|
914
913
|
let r = [];
|
|
915
914
|
for (let t = 1; t < e.length; ++t) r.push(`a${t}`);
|
|
@@ -923,101 +922,101 @@ ${n.replace(/^Error(:[^\n]*)?\n/, "")}`);
|
|
|
923
922
|
else if (typeof FUNCTION_TABLE < "u") i = FUNCTION_TABLE[n];
|
|
924
923
|
else {
|
|
925
924
|
let n = t[`dynCall_${e}`];
|
|
926
|
-
n === void 0 && (n = t[`dynCall_${e.replace(/f/g, "d")}`], n === void 0 &&
|
|
925
|
+
n === void 0 && (n = t[`dynCall_${e.replace(/f/g, "d")}`], n === void 0 && W(`No dynCall invoker for signature: ${e}`)), i = r(n);
|
|
927
926
|
}
|
|
928
|
-
return typeof i != "function" &&
|
|
927
|
+
return typeof i != "function" && W(`unknown function pointer with signature ${e}: ${n}`), i;
|
|
929
928
|
}
|
|
930
|
-
let
|
|
931
|
-
function
|
|
932
|
-
let t =
|
|
933
|
-
return
|
|
929
|
+
let rn;
|
|
930
|
+
function an(e) {
|
|
931
|
+
let t = or(e), n = B(t);
|
|
932
|
+
return $(t), n;
|
|
934
933
|
}
|
|
935
|
-
function
|
|
934
|
+
function on(e, t) {
|
|
936
935
|
let n = [], r = {};
|
|
937
936
|
function i(e) {
|
|
938
|
-
if (!r[e] && !
|
|
939
|
-
if (
|
|
940
|
-
|
|
937
|
+
if (!r[e] && !H[e]) {
|
|
938
|
+
if (dt[e]) {
|
|
939
|
+
dt[e].forEach(i);
|
|
941
940
|
return;
|
|
942
941
|
}
|
|
943
942
|
n.push(e), r[e] = !0;
|
|
944
943
|
}
|
|
945
944
|
}
|
|
946
|
-
throw t.forEach(i), new
|
|
947
|
-
}
|
|
948
|
-
function
|
|
949
|
-
u =
|
|
950
|
-
let p =
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
}),
|
|
945
|
+
throw t.forEach(i), new rn(`${e}: ${n.map(an).join([", "])}`);
|
|
946
|
+
}
|
|
947
|
+
function sn(e, t, n, r, i, a, o, s, c, l, u, d, f) {
|
|
948
|
+
u = B(u), a = X(i, a), s && (s = X(o, s)), l && (l = X(c, l)), f = X(d, f);
|
|
949
|
+
let p = ft(u);
|
|
950
|
+
Ft(p, () => {
|
|
951
|
+
on(`Cannot construct ${u} due to unbound types`, [r]);
|
|
952
|
+
}), G([
|
|
954
953
|
e,
|
|
955
954
|
t,
|
|
956
955
|
n
|
|
957
956
|
], r ? [r] : [], (t) => {
|
|
958
957
|
t = t[0];
|
|
959
958
|
let n, i;
|
|
960
|
-
r ? (n = t.registeredClass, i = n.instancePrototype) : i =
|
|
961
|
-
let o =
|
|
962
|
-
if (Object.getPrototypeOf(this) !== c) throw new
|
|
963
|
-
if (d.constructor_body === void 0) throw new
|
|
959
|
+
r ? (n = t.registeredClass, i = n.instancePrototype) : i = J.prototype;
|
|
960
|
+
let o = pt(p, function() {
|
|
961
|
+
if (Object.getPrototypeOf(this) !== c) throw new U(`Use 'new' to construct ${u}`);
|
|
962
|
+
if (d.constructor_body === void 0) throw new U(`${u} has no accessible constructor`);
|
|
964
963
|
let e = d.constructor_body[arguments.length];
|
|
965
|
-
if (e === void 0) throw new
|
|
964
|
+
if (e === void 0) throw new U(`Tried to invoke ctor of ${u} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);
|
|
966
965
|
return e.apply(this, arguments);
|
|
967
966
|
});
|
|
968
967
|
var c = Object.create(i, { constructor: { value: o } });
|
|
969
968
|
o.prototype = c;
|
|
970
|
-
var d = new
|
|
971
|
-
let m = new
|
|
972
|
-
return
|
|
969
|
+
var d = new It(u, o, c, f, n, a, s, l);
|
|
970
|
+
let m = new Y(u, d, !0, !1, !1), h = new Y(`${u}*`, d, !1, !1, !1), g = new Y(`${u} const*`, d, !1, !0, !1);
|
|
971
|
+
return Nt[e] = {
|
|
973
972
|
pointerType: h,
|
|
974
973
|
constPointerType: g
|
|
975
|
-
},
|
|
974
|
+
}, nn(p, o), [
|
|
976
975
|
m,
|
|
977
976
|
h,
|
|
978
977
|
g
|
|
979
978
|
];
|
|
980
979
|
});
|
|
981
980
|
}
|
|
982
|
-
function
|
|
981
|
+
function cn(e, t) {
|
|
983
982
|
let n = [];
|
|
984
|
-
for (let r = 0; r < e; r++) n.push(
|
|
983
|
+
for (let r = 0; r < e; r++) n.push(T[(t >> 2) + r]);
|
|
985
984
|
return n;
|
|
986
985
|
}
|
|
987
|
-
function
|
|
986
|
+
function ln(e) {
|
|
988
987
|
for (; e.length;) {
|
|
989
988
|
let t = e.pop();
|
|
990
989
|
e.pop()(t);
|
|
991
990
|
}
|
|
992
991
|
}
|
|
993
|
-
function
|
|
994
|
-
let o =
|
|
995
|
-
i =
|
|
992
|
+
function un(e, t, n, r, i, a) {
|
|
993
|
+
let o = cn(t, n);
|
|
994
|
+
i = X(r, i), G([], [e], (e) => {
|
|
996
995
|
e = e[0];
|
|
997
996
|
let n = `constructor ${e.name}`;
|
|
998
|
-
if (e.registeredClass.constructor_body === void 0 && (e.registeredClass.constructor_body = []), e.registeredClass.constructor_body[t - 1] !== void 0) throw new
|
|
997
|
+
if (e.registeredClass.constructor_body === void 0 && (e.registeredClass.constructor_body = []), e.registeredClass.constructor_body[t - 1] !== void 0) throw new U(`Cannot register multiple constructors with identical number of parameters (${t - 1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
|
|
999
998
|
return e.registeredClass.constructor_body[t - 1] = function() {
|
|
1000
|
-
|
|
1001
|
-
},
|
|
1002
|
-
arguments.length !== t - 1 &&
|
|
999
|
+
on(`Cannot construct ${e.name} due to unbound types`, o);
|
|
1000
|
+
}, G([], o, (r) => (e.registeredClass.constructor_body[t - 1] = function() {
|
|
1001
|
+
arguments.length !== t - 1 && W(`${n} called with ${arguments.length} arguments, expected ${t - 1}`);
|
|
1003
1002
|
let e = [], o = Array(t);
|
|
1004
1003
|
o[0] = a;
|
|
1005
1004
|
for (let n = 1; n < t; ++n) o[n] = r[n].toWireType(e, arguments[n - 1]);
|
|
1006
1005
|
let s = i.apply(null, o);
|
|
1007
|
-
return
|
|
1006
|
+
return ln(e), r[0].fromWireType(s);
|
|
1008
1007
|
}, [])), [];
|
|
1009
1008
|
});
|
|
1010
1009
|
}
|
|
1011
|
-
function
|
|
1010
|
+
function dn(e, t) {
|
|
1012
1011
|
if (!(e instanceof Function)) throw TypeError(`new_ called with constructor type ${typeof e} which is not a function`);
|
|
1013
|
-
let n =
|
|
1012
|
+
let n = pt(e.name || "unknownFunctionName", () => {});
|
|
1014
1013
|
n.prototype = e.prototype;
|
|
1015
1014
|
let r = new n(), i = e.apply(r, t);
|
|
1016
1015
|
return i instanceof Object ? i : r;
|
|
1017
1016
|
}
|
|
1018
|
-
function
|
|
1017
|
+
function fn(e, t, n, r, i) {
|
|
1019
1018
|
let a = t.length;
|
|
1020
|
-
a < 2 &&
|
|
1019
|
+
a < 2 && W("argTypes array size mismatch! Must at least get return value and 'this' types!");
|
|
1021
1020
|
let o = t[1] !== null && n !== null, s = !1;
|
|
1022
1021
|
for (var c = 1; c < t.length; ++c) if (t[c] !== null && t[c].destructorFunction === void 0) {
|
|
1023
1022
|
s = !0;
|
|
@@ -1025,7 +1024,7 @@ ${n.replace(/^Error(:[^\n]*)?\n/, "")}`);
|
|
|
1025
1024
|
}
|
|
1026
1025
|
let l = t[0].name !== "void", u = "", d = "";
|
|
1027
1026
|
for (var c = 0; c < a - 2; ++c) u += `${c === 0 ? "" : ", "}arg${c}`, d += `${c === 0 ? "" : ", "}arg${c}Wired`;
|
|
1028
|
-
let f = `return function ${
|
|
1027
|
+
let f = `return function ${ft(e)}(${u}) {
|
|
1029
1028
|
if (arguments.length !== ${a - 2}) {
|
|
1030
1029
|
throwBindingError('function ${e} called with ' + arguments.length + ' arguments, expected ${a - 2} args!');
|
|
1031
1030
|
}
|
|
@@ -1039,10 +1038,10 @@ throwBindingError('function ${e} called with ' + arguments.length + ' arguments,
|
|
|
1039
1038
|
"retType",
|
|
1040
1039
|
"classParam"
|
|
1041
1040
|
], h = [
|
|
1042
|
-
|
|
1041
|
+
W,
|
|
1043
1042
|
r,
|
|
1044
1043
|
i,
|
|
1045
|
-
|
|
1044
|
+
ln,
|
|
1046
1045
|
t[0],
|
|
1047
1046
|
t[1]
|
|
1048
1047
|
];
|
|
@@ -1057,140 +1056,140 @@ throwBindingError('function ${e} called with ' + arguments.length + ' arguments,
|
|
|
1057
1056
|
t[c].destructorFunction !== null && (f += `${e}_dtor(${e}); // ${t[c].name}
|
|
1058
1057
|
`, m.push(`${e}_dtor`), h.push(t[c].destructorFunction));
|
|
1059
1058
|
}
|
|
1060
|
-
return l && (f += "var ret = retType.fromWireType(rv);\nreturn ret;\n"), f += "}\n", m.push(f),
|
|
1059
|
+
return l && (f += "var ret = retType.fromWireType(rv);\nreturn ret;\n"), f += "}\n", m.push(f), dn(Function, m).apply(null, h);
|
|
1061
1060
|
}
|
|
1062
|
-
function
|
|
1063
|
-
let c =
|
|
1064
|
-
t =
|
|
1061
|
+
function pn(e, t, n, r, i, a, o, s) {
|
|
1062
|
+
let c = cn(n, r);
|
|
1063
|
+
t = B(t), a = X(i, a), G([], [e], (e) => {
|
|
1065
1064
|
e = e[0];
|
|
1066
1065
|
let r = `${e.name}.${t}`;
|
|
1067
1066
|
s && e.registeredClass.pureVirtualFunctions.push(t);
|
|
1068
1067
|
function i() {
|
|
1069
|
-
|
|
1068
|
+
on(`Cannot call ${r} due to unbound types`, c);
|
|
1070
1069
|
}
|
|
1071
1070
|
let l = e.registeredClass.instancePrototype, u = l[t];
|
|
1072
|
-
return u === void 0 || u.overloadTable === void 0 && u.className !== e.name && u.argCount === n - 2 ? (i.argCount = n - 2, i.className = e.name, l[t] = i) : (
|
|
1073
|
-
let s =
|
|
1071
|
+
return u === void 0 || u.overloadTable === void 0 && u.className !== e.name && u.argCount === n - 2 ? (i.argCount = n - 2, i.className = e.name, l[t] = i) : (Pt(l, t, r), l[t].overloadTable[n - 2] = i), G([], c, (i) => {
|
|
1072
|
+
let s = fn(r, i, e, a, o);
|
|
1074
1073
|
return l[t].overloadTable === void 0 ? (s.argCount = n - 2, l[t] = s) : l[t].overloadTable[n - 2] = s, [];
|
|
1075
1074
|
}), [];
|
|
1076
1075
|
});
|
|
1077
1076
|
}
|
|
1078
|
-
let
|
|
1077
|
+
let mn = [], Z = [
|
|
1079
1078
|
{},
|
|
1080
1079
|
{ value: void 0 },
|
|
1081
1080
|
{ value: null },
|
|
1082
1081
|
{ value: !0 },
|
|
1083
1082
|
{ value: !1 }
|
|
1084
1083
|
];
|
|
1085
|
-
function
|
|
1086
|
-
e > 4 && --
|
|
1084
|
+
function hn(e) {
|
|
1085
|
+
e > 4 && --Z[e].refcount === 0 && (Z[e] = void 0, mn.push(e));
|
|
1087
1086
|
}
|
|
1088
|
-
function
|
|
1087
|
+
function gn() {
|
|
1089
1088
|
let e = 0;
|
|
1090
|
-
for (let t = 5; t <
|
|
1089
|
+
for (let t = 5; t < Z.length; ++t) Z[t] !== void 0 && ++e;
|
|
1091
1090
|
return e;
|
|
1092
1091
|
}
|
|
1093
|
-
function
|
|
1094
|
-
for (let e = 5; e <
|
|
1092
|
+
function _n() {
|
|
1093
|
+
for (let e = 5; e < Z.length; ++e) if (Z[e] !== void 0) return Z[e];
|
|
1095
1094
|
return null;
|
|
1096
1095
|
}
|
|
1097
|
-
function
|
|
1098
|
-
t.count_emval_handles =
|
|
1096
|
+
function vn() {
|
|
1097
|
+
t.count_emval_handles = gn, t.get_first_emval = _n;
|
|
1099
1098
|
}
|
|
1100
|
-
function
|
|
1099
|
+
function yn(e) {
|
|
1101
1100
|
switch (e) {
|
|
1102
1101
|
case void 0: return 1;
|
|
1103
1102
|
case null: return 2;
|
|
1104
1103
|
case !0: return 3;
|
|
1105
1104
|
case !1: return 4;
|
|
1106
1105
|
default: {
|
|
1107
|
-
let t =
|
|
1108
|
-
return
|
|
1106
|
+
let t = mn.length ? mn.pop() : Z.length;
|
|
1107
|
+
return Z[t] = {
|
|
1109
1108
|
refcount: 1,
|
|
1110
1109
|
value: e
|
|
1111
1110
|
}, t;
|
|
1112
1111
|
}
|
|
1113
1112
|
}
|
|
1114
1113
|
}
|
|
1115
|
-
function
|
|
1116
|
-
t =
|
|
1114
|
+
function bn(e, t) {
|
|
1115
|
+
t = B(t), K(e, {
|
|
1117
1116
|
name: t,
|
|
1118
1117
|
fromWireType(e) {
|
|
1119
|
-
let t =
|
|
1120
|
-
return
|
|
1118
|
+
let t = Z[e].value;
|
|
1119
|
+
return hn(e), t;
|
|
1121
1120
|
},
|
|
1122
1121
|
toWireType(e, t) {
|
|
1123
|
-
return
|
|
1122
|
+
return yn(t);
|
|
1124
1123
|
},
|
|
1125
1124
|
argPackAdvance: 8,
|
|
1126
|
-
readValueFromPointer:
|
|
1125
|
+
readValueFromPointer: Vt,
|
|
1127
1126
|
destructorFunction: null
|
|
1128
1127
|
});
|
|
1129
1128
|
}
|
|
1130
|
-
function
|
|
1129
|
+
function Q(e) {
|
|
1131
1130
|
if (e === null) return "null";
|
|
1132
1131
|
let t = typeof e;
|
|
1133
1132
|
return t === "object" || t === "array" || t === "function" ? e.toString() : `${e}`;
|
|
1134
1133
|
}
|
|
1135
|
-
function
|
|
1134
|
+
function xn(e, t) {
|
|
1136
1135
|
switch (t) {
|
|
1137
1136
|
case 2: return function(e) {
|
|
1138
|
-
return this.fromWireType(
|
|
1137
|
+
return this.fromWireType(ye[e >> 2]);
|
|
1139
1138
|
};
|
|
1140
1139
|
case 3: return function(e) {
|
|
1141
|
-
return this.fromWireType(
|
|
1140
|
+
return this.fromWireType(be[e >> 3]);
|
|
1142
1141
|
};
|
|
1143
1142
|
default: throw TypeError(`Unknown float type: ${e}`);
|
|
1144
1143
|
}
|
|
1145
1144
|
}
|
|
1146
|
-
function
|
|
1147
|
-
let r =
|
|
1148
|
-
t =
|
|
1145
|
+
function Sn(e, t, n) {
|
|
1146
|
+
let r = ct(n);
|
|
1147
|
+
t = B(t), K(e, {
|
|
1149
1148
|
name: t,
|
|
1150
1149
|
fromWireType(e) {
|
|
1151
1150
|
return e;
|
|
1152
1151
|
},
|
|
1153
1152
|
toWireType(e, t) {
|
|
1154
|
-
if (typeof t != "number" && typeof t != "boolean") throw TypeError(`Cannot convert "${
|
|
1153
|
+
if (typeof t != "number" && typeof t != "boolean") throw TypeError(`Cannot convert "${Q(t)}" to ${this.name}`);
|
|
1155
1154
|
return t;
|
|
1156
1155
|
},
|
|
1157
1156
|
argPackAdvance: 8,
|
|
1158
|
-
readValueFromPointer:
|
|
1157
|
+
readValueFromPointer: xn(t, r),
|
|
1159
1158
|
destructorFunction: null
|
|
1160
1159
|
});
|
|
1161
1160
|
}
|
|
1162
|
-
function
|
|
1163
|
-
let o =
|
|
1164
|
-
e =
|
|
1165
|
-
|
|
1166
|
-
}, t - 1),
|
|
1161
|
+
function Cn(e, t, n, r, i, a) {
|
|
1162
|
+
let o = cn(t, n);
|
|
1163
|
+
e = B(e), i = X(r, i), Ft(e, () => {
|
|
1164
|
+
on(`Cannot call ${e} due to unbound types`, o);
|
|
1165
|
+
}, t - 1), G([], o, (n) => {
|
|
1167
1166
|
let r = [n[0], null].concat(n.slice(1));
|
|
1168
|
-
return
|
|
1167
|
+
return nn(e, fn(e, r, null, i, a), t - 1), [];
|
|
1169
1168
|
});
|
|
1170
1169
|
}
|
|
1171
|
-
function
|
|
1170
|
+
function wn(e, t, n) {
|
|
1172
1171
|
switch (t) {
|
|
1173
1172
|
case 0: return n ? function(e) {
|
|
1174
|
-
return
|
|
1173
|
+
return C[e];
|
|
1175
1174
|
} : function(e) {
|
|
1176
|
-
return
|
|
1175
|
+
return w[e];
|
|
1177
1176
|
};
|
|
1178
1177
|
case 1: return n ? function(e) {
|
|
1179
|
-
return ge[e >> 1];
|
|
1180
|
-
} : function(e) {
|
|
1181
1178
|
return _e[e >> 1];
|
|
1179
|
+
} : function(e) {
|
|
1180
|
+
return ve[e >> 1];
|
|
1182
1181
|
};
|
|
1183
1182
|
case 2: return n ? function(e) {
|
|
1184
|
-
return
|
|
1183
|
+
return T[e >> 2];
|
|
1185
1184
|
} : function(e) {
|
|
1186
|
-
return
|
|
1185
|
+
return E[e >> 2];
|
|
1187
1186
|
};
|
|
1188
1187
|
default: throw TypeError(`Unknown integer type: ${e}`);
|
|
1189
1188
|
}
|
|
1190
1189
|
}
|
|
1191
|
-
function
|
|
1192
|
-
t =
|
|
1193
|
-
let a =
|
|
1190
|
+
function Tn(e, t, n, r, i) {
|
|
1191
|
+
t = B(t), i === -1 && (i = 4294967295);
|
|
1192
|
+
let a = ct(n), o = function(e) {
|
|
1194
1193
|
return e;
|
|
1195
1194
|
};
|
|
1196
1195
|
if (r === 0) {
|
|
@@ -1200,20 +1199,20 @@ throwBindingError('function ${e} called with ' + arguments.length + ' arguments,
|
|
|
1200
1199
|
};
|
|
1201
1200
|
}
|
|
1202
1201
|
let s = t.indexOf("unsigned") != -1;
|
|
1203
|
-
|
|
1202
|
+
K(e, {
|
|
1204
1203
|
name: t,
|
|
1205
1204
|
fromWireType: o,
|
|
1206
1205
|
toWireType(e, n) {
|
|
1207
|
-
if (typeof n != "number" && typeof n != "boolean") throw TypeError(`Cannot convert "${
|
|
1208
|
-
if (n < r || n > i) throw TypeError(`Passing a number "${
|
|
1206
|
+
if (typeof n != "number" && typeof n != "boolean") throw TypeError(`Cannot convert "${Q(n)}" to ${this.name}`);
|
|
1207
|
+
if (n < r || n > i) throw TypeError(`Passing a number "${Q(n)}" from JS side to C/C++ side to an argument of type "${t}", which is outside the valid range [${r}, ${i}]!`);
|
|
1209
1208
|
return s ? n >>> 0 : n | 0;
|
|
1210
1209
|
},
|
|
1211
1210
|
argPackAdvance: 8,
|
|
1212
|
-
readValueFromPointer:
|
|
1211
|
+
readValueFromPointer: wn(t, a, r !== 0),
|
|
1213
1212
|
destructorFunction: null
|
|
1214
1213
|
});
|
|
1215
1214
|
}
|
|
1216
|
-
function
|
|
1215
|
+
function En(e, t, n) {
|
|
1217
1216
|
let r = [
|
|
1218
1217
|
Int8Array,
|
|
1219
1218
|
Uint8Array,
|
|
@@ -1226,96 +1225,96 @@ throwBindingError('function ${e} called with ' + arguments.length + ' arguments,
|
|
|
1226
1225
|
][t];
|
|
1227
1226
|
function i(e) {
|
|
1228
1227
|
e >>= 2;
|
|
1229
|
-
let t =
|
|
1228
|
+
let t = E, n = t[e], i = t[e + 1];
|
|
1230
1229
|
return new r(t.buffer, i, n);
|
|
1231
1230
|
}
|
|
1232
|
-
n =
|
|
1231
|
+
n = B(n), K(e, {
|
|
1233
1232
|
name: n,
|
|
1234
1233
|
fromWireType: i,
|
|
1235
1234
|
argPackAdvance: 8,
|
|
1236
1235
|
readValueFromPointer: i
|
|
1237
1236
|
}, { ignoreDuplicateRegistrations: !0 });
|
|
1238
1237
|
}
|
|
1239
|
-
function
|
|
1240
|
-
t =
|
|
1238
|
+
function Dn(e, t) {
|
|
1239
|
+
t = B(t);
|
|
1241
1240
|
let n = t === "std::string";
|
|
1242
|
-
|
|
1241
|
+
K(e, {
|
|
1243
1242
|
name: t,
|
|
1244
1243
|
fromWireType(e) {
|
|
1245
|
-
let t =
|
|
1244
|
+
let t = E[e >> 2], r;
|
|
1246
1245
|
if (n) {
|
|
1247
|
-
let n =
|
|
1248
|
-
n != 0 && (a = n,
|
|
1246
|
+
let n = w[e + 4 + t], a = 0;
|
|
1247
|
+
n != 0 && (a = n, w[e + 4 + t] = 0);
|
|
1249
1248
|
let o = e + 4;
|
|
1250
1249
|
for (var i = 0; i <= t; ++i) {
|
|
1251
1250
|
let t = e + 4 + i;
|
|
1252
|
-
if (
|
|
1253
|
-
let e =
|
|
1251
|
+
if (w[t] == 0) {
|
|
1252
|
+
let e = x(o);
|
|
1254
1253
|
r === void 0 ? r = e : (r += "\0", r += e), o = t + 1;
|
|
1255
1254
|
}
|
|
1256
1255
|
}
|
|
1257
|
-
a != 0 && (
|
|
1256
|
+
a != 0 && (w[e + 4 + t] = a);
|
|
1258
1257
|
} else {
|
|
1259
1258
|
let n = Array(t);
|
|
1260
|
-
for (var i = 0; i < t; ++i) n[i] = String.fromCharCode(
|
|
1259
|
+
for (var i = 0; i < t; ++i) n[i] = String.fromCharCode(w[e + 4 + i]);
|
|
1261
1260
|
r = n.join("");
|
|
1262
1261
|
}
|
|
1263
|
-
return
|
|
1262
|
+
return $(e), r;
|
|
1264
1263
|
},
|
|
1265
1264
|
toWireType(e, t) {
|
|
1266
1265
|
Object.prototype.toString.call(t) === "[object ArrayBuffer]" && (t = new Uint8Array(t));
|
|
1267
1266
|
let r, i = typeof t == "string";
|
|
1268
|
-
i || t instanceof Uint8Array || t instanceof Uint8ClampedArray || t instanceof Int8Array ||
|
|
1269
|
-
return
|
|
1267
|
+
i || t instanceof Uint8Array || t instanceof Uint8ClampedArray || t instanceof Int8Array || W("Cannot pass non-string to std::string"), r = n && i ? function() {
|
|
1268
|
+
return pe(t);
|
|
1270
1269
|
} : function() {
|
|
1271
1270
|
return t.length;
|
|
1272
1271
|
};
|
|
1273
|
-
let a = r(), o =
|
|
1274
|
-
if (
|
|
1272
|
+
let a = r(), o = sr(4 + a + 1);
|
|
1273
|
+
if (E[o >> 2] = a, n && i) fe(t, o + 4, a + 1);
|
|
1275
1274
|
else if (i) for (var s = 0; s < a; ++s) {
|
|
1276
1275
|
let e = t.charCodeAt(s);
|
|
1277
|
-
e > 255 && (
|
|
1276
|
+
e > 255 && ($(o), W("String has UTF-16 code units that do not fit in 8 bits")), w[o + 4 + s] = e;
|
|
1278
1277
|
}
|
|
1279
|
-
else for (var s = 0; s < a; ++s)
|
|
1280
|
-
return e !== null && e.push(
|
|
1278
|
+
else for (var s = 0; s < a; ++s) w[o + 4 + s] = t[s];
|
|
1279
|
+
return e !== null && e.push($, o), o;
|
|
1281
1280
|
},
|
|
1282
1281
|
argPackAdvance: 8,
|
|
1283
|
-
readValueFromPointer:
|
|
1282
|
+
readValueFromPointer: Vt,
|
|
1284
1283
|
destructorFunction(e) {
|
|
1285
|
-
|
|
1284
|
+
$(e);
|
|
1286
1285
|
}
|
|
1287
1286
|
});
|
|
1288
1287
|
}
|
|
1289
|
-
function
|
|
1290
|
-
n =
|
|
1288
|
+
function On(e, t, n) {
|
|
1289
|
+
n = B(n);
|
|
1291
1290
|
let r, i;
|
|
1292
1291
|
t === 2 ? (r = function() {
|
|
1293
|
-
return
|
|
1292
|
+
return ve;
|
|
1294
1293
|
}, i = 1) : t === 4 && (r = function() {
|
|
1295
|
-
return
|
|
1296
|
-
}, i = 2),
|
|
1294
|
+
return E;
|
|
1295
|
+
}, i = 2), K(e, {
|
|
1297
1296
|
name: n,
|
|
1298
1297
|
fromWireType(e) {
|
|
1299
|
-
let t = r(), n =
|
|
1298
|
+
let t = r(), n = E[e >> 2], a = Array(n), o = e + 4 >> i;
|
|
1300
1299
|
for (let e = 0; e < n; ++e) a[e] = String.fromCharCode(t[o + e]);
|
|
1301
|
-
return
|
|
1300
|
+
return $(e), a.join("");
|
|
1302
1301
|
},
|
|
1303
1302
|
toWireType(e, n) {
|
|
1304
|
-
let a = n.length, o =
|
|
1305
|
-
|
|
1303
|
+
let a = n.length, o = sr(4 + a * t), s = r();
|
|
1304
|
+
E[o >> 2] = a;
|
|
1306
1305
|
let c = o + 4 >> i;
|
|
1307
1306
|
for (let e = 0; e < a; ++e) s[c + e] = n.charCodeAt(e);
|
|
1308
|
-
return e !== null && e.push(
|
|
1307
|
+
return e !== null && e.push($, o), o;
|
|
1309
1308
|
},
|
|
1310
1309
|
argPackAdvance: 8,
|
|
1311
|
-
readValueFromPointer:
|
|
1310
|
+
readValueFromPointer: Vt,
|
|
1312
1311
|
destructorFunction(e) {
|
|
1313
|
-
|
|
1312
|
+
$(e);
|
|
1314
1313
|
}
|
|
1315
1314
|
});
|
|
1316
1315
|
}
|
|
1317
|
-
function
|
|
1318
|
-
t =
|
|
1316
|
+
function kn(e, t) {
|
|
1317
|
+
t = B(t), K(e, {
|
|
1319
1318
|
isVoid: !0,
|
|
1320
1319
|
name: t,
|
|
1321
1320
|
argPackAdvance: 0,
|
|
@@ -1323,215 +1322,215 @@ throwBindingError('function ${e} called with ' + arguments.length + ' arguments,
|
|
|
1323
1322
|
toWireType(e, t) {}
|
|
1324
1323
|
});
|
|
1325
1324
|
}
|
|
1326
|
-
function
|
|
1327
|
-
e > 4 && (
|
|
1325
|
+
function An(e) {
|
|
1326
|
+
e > 4 && (Z[e].refcount += 1);
|
|
1328
1327
|
}
|
|
1329
|
-
function
|
|
1330
|
-
let n =
|
|
1331
|
-
return n === void 0 &&
|
|
1328
|
+
function jn(e, t) {
|
|
1329
|
+
let n = H[e];
|
|
1330
|
+
return n === void 0 && W(`${t} has unknown type ${an(e)}`), n;
|
|
1332
1331
|
}
|
|
1333
|
-
function
|
|
1334
|
-
return e =
|
|
1332
|
+
function Mn(e, t) {
|
|
1333
|
+
return e = jn(e, "_emval_take_value"), yn(e.readValueFromPointer(t));
|
|
1335
1334
|
}
|
|
1336
|
-
function
|
|
1335
|
+
function Nn() {
|
|
1337
1336
|
F();
|
|
1338
1337
|
}
|
|
1339
|
-
function
|
|
1340
|
-
return
|
|
1338
|
+
function Pn() {
|
|
1339
|
+
return C.length;
|
|
1341
1340
|
}
|
|
1342
|
-
function
|
|
1341
|
+
function Fn(e) {
|
|
1343
1342
|
try {
|
|
1344
|
-
return
|
|
1343
|
+
return y.grow(e - S.byteLength + 65535 >> 16), xe(y.buffer), 1;
|
|
1345
1344
|
} catch (t) {
|
|
1346
|
-
console.error(`emscripten_realloc_buffer: Attempted to grow heap from ${
|
|
1345
|
+
console.error(`emscripten_realloc_buffer: Attempted to grow heap from ${S.byteLength} bytes to ${e} bytes, but got error: ${t}`);
|
|
1347
1346
|
}
|
|
1348
1347
|
}
|
|
1349
|
-
function
|
|
1350
|
-
let t =
|
|
1351
|
-
|
|
1348
|
+
function In(e) {
|
|
1349
|
+
let t = Pn();
|
|
1350
|
+
b(e > t);
|
|
1352
1351
|
let n = 65536, r = 2147483648 - n;
|
|
1353
1352
|
if (e > r) return _(`Cannot enlarge memory, asked to go up to ${e} bytes, but the limit is ${r} bytes!`), !1;
|
|
1354
1353
|
let i = Math.max(t, 16777216);
|
|
1355
|
-
for (; i < e;) i = i <= 536870912 ?
|
|
1356
|
-
return
|
|
1354
|
+
for (; i < e;) i = i <= 536870912 ? ge(2 * i, n) : Math.min(ge((3 * i + 2147483648) / 4, n), r), i === t && v(`Cannot ask for more memory since we reached the practical limit in browsers (which is just below 2GB), so the request would have failed. Requesting only ${C.length}`);
|
|
1355
|
+
return Fn(i) ? !0 : (_(`Failed to grow the heap from ${t} bytes to ${i} bytes, not enough memory!`), !1);
|
|
1357
1356
|
}
|
|
1358
|
-
function
|
|
1359
|
-
|
|
1357
|
+
function Ln(e) {
|
|
1358
|
+
gr(e);
|
|
1360
1359
|
}
|
|
1361
|
-
function
|
|
1360
|
+
function Rn(e) {
|
|
1362
1361
|
return Math.log(e) / Math.LN2;
|
|
1363
1362
|
}
|
|
1364
|
-
function
|
|
1365
|
-
return
|
|
1363
|
+
function zn(e) {
|
|
1364
|
+
return Rn(e);
|
|
1366
1365
|
}
|
|
1367
|
-
function
|
|
1366
|
+
function Bn() {
|
|
1368
1367
|
F("trap!");
|
|
1369
1368
|
}
|
|
1370
|
-
function
|
|
1371
|
-
|
|
1369
|
+
function Vn(e, t, n) {
|
|
1370
|
+
w.set(w.subarray(t, t + n), e);
|
|
1371
|
+
}
|
|
1372
|
+
lt(), U = t.BindingError = mt(Error, "BindingError"), ht = t.InternalError = mt(Error, "InternalError"), Mt(), tn(), Yt(), rn = t.UnboundTypeError = mt(Error, "UnboundTypeError"), vn();
|
|
1373
|
+
function Hn(e) {
|
|
1374
|
+
O(e, "i");
|
|
1375
|
+
}
|
|
1376
|
+
function Un(e) {
|
|
1377
|
+
O(e, "ii");
|
|
1378
|
+
}
|
|
1379
|
+
function Wn(e) {
|
|
1380
|
+
O(e, "iidiiii");
|
|
1372
1381
|
}
|
|
1373
|
-
ft(), H = t.BindingError = _t(Error, "BindingError"), vt = t.InternalError = _t(Error, "InternalError"), Ft(), an(), Qt(), sn = t.UnboundTypeError = _t(Error, "UnboundTypeError"), xn();
|
|
1374
1382
|
function Gn(e) {
|
|
1375
|
-
|
|
1383
|
+
O(e, "iii");
|
|
1376
1384
|
}
|
|
1377
1385
|
function Kn(e) {
|
|
1378
|
-
|
|
1386
|
+
O(e, "iiii");
|
|
1379
1387
|
}
|
|
1380
1388
|
function qn(e) {
|
|
1381
|
-
|
|
1389
|
+
O(e, "iiiii");
|
|
1382
1390
|
}
|
|
1383
1391
|
function Jn(e) {
|
|
1384
|
-
|
|
1392
|
+
O(e, "jiji");
|
|
1385
1393
|
}
|
|
1386
1394
|
function Yn(e) {
|
|
1387
|
-
|
|
1395
|
+
O(e, "v");
|
|
1388
1396
|
}
|
|
1389
1397
|
function Xn(e) {
|
|
1390
|
-
|
|
1398
|
+
O(e, "vi");
|
|
1391
1399
|
}
|
|
1392
1400
|
function Zn(e) {
|
|
1393
|
-
|
|
1401
|
+
O(e, "vii");
|
|
1394
1402
|
}
|
|
1395
1403
|
function Qn(e) {
|
|
1396
|
-
|
|
1404
|
+
O(e, "viii");
|
|
1397
1405
|
}
|
|
1398
1406
|
function $n(e) {
|
|
1399
|
-
|
|
1407
|
+
O(e, "viiii");
|
|
1400
1408
|
}
|
|
1401
1409
|
function er(e) {
|
|
1402
|
-
|
|
1410
|
+
O(e, "viiiii");
|
|
1403
1411
|
}
|
|
1404
1412
|
function tr(e) {
|
|
1405
|
-
|
|
1406
|
-
}
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
__embind_register_function: En,
|
|
1433
|
-
__embind_register_integer: On,
|
|
1434
|
-
__embind_register_memory_view: kn,
|
|
1435
|
-
__embind_register_std_string: An,
|
|
1436
|
-
__embind_register_std_wstring: jn,
|
|
1437
|
-
__embind_register_void: Mn,
|
|
1438
|
-
__emval_decref: vn,
|
|
1439
|
-
__emval_incref: Nn,
|
|
1440
|
-
__emval_take_value: Fn,
|
|
1413
|
+
O(e, "viiiiii");
|
|
1414
|
+
}
|
|
1415
|
+
let nr = {};
|
|
1416
|
+
var rr = {
|
|
1417
|
+
___assert_fail: Ye,
|
|
1418
|
+
___cxa_allocate_exception: Xe,
|
|
1419
|
+
___cxa_throw: Qe,
|
|
1420
|
+
___lock: $e,
|
|
1421
|
+
___unlock: et,
|
|
1422
|
+
___wasi_fd_close: nt,
|
|
1423
|
+
___wasi_fd_seek: it,
|
|
1424
|
+
___wasi_fd_write: st,
|
|
1425
|
+
__embind_register_bool: _t,
|
|
1426
|
+
__embind_register_class: sn,
|
|
1427
|
+
__embind_register_class_constructor: un,
|
|
1428
|
+
__embind_register_class_function: pn,
|
|
1429
|
+
__embind_register_emval: bn,
|
|
1430
|
+
__embind_register_float: Sn,
|
|
1431
|
+
__embind_register_function: Cn,
|
|
1432
|
+
__embind_register_integer: Tn,
|
|
1433
|
+
__embind_register_memory_view: En,
|
|
1434
|
+
__embind_register_std_string: Dn,
|
|
1435
|
+
__embind_register_std_wstring: On,
|
|
1436
|
+
__embind_register_void: kn,
|
|
1437
|
+
__emval_decref: hn,
|
|
1438
|
+
__emval_incref: An,
|
|
1439
|
+
__emval_take_value: Mn,
|
|
1441
1440
|
__memory_base: 1024,
|
|
1442
1441
|
__table_base: 0,
|
|
1443
|
-
_abort:
|
|
1444
|
-
_emscripten_get_heap_size:
|
|
1445
|
-
_emscripten_memcpy_big:
|
|
1446
|
-
_emscripten_resize_heap:
|
|
1447
|
-
_exit:
|
|
1448
|
-
_llvm_log2_f64:
|
|
1449
|
-
_llvm_trap:
|
|
1442
|
+
_abort: Nn,
|
|
1443
|
+
_emscripten_get_heap_size: Pn,
|
|
1444
|
+
_emscripten_memcpy_big: Vn,
|
|
1445
|
+
_emscripten_resize_heap: In,
|
|
1446
|
+
_exit: Ln,
|
|
1447
|
+
_llvm_log2_f64: zn,
|
|
1448
|
+
_llvm_trap: Bn,
|
|
1450
1449
|
abortStackOverflow: Te,
|
|
1451
|
-
memory:
|
|
1452
|
-
nullFunc_i:
|
|
1453
|
-
nullFunc_ii:
|
|
1454
|
-
nullFunc_iidiiii:
|
|
1455
|
-
nullFunc_iii:
|
|
1456
|
-
nullFunc_iiii:
|
|
1457
|
-
nullFunc_iiiii:
|
|
1458
|
-
nullFunc_jiji:
|
|
1459
|
-
nullFunc_v:
|
|
1460
|
-
nullFunc_vi:
|
|
1461
|
-
nullFunc_vii:
|
|
1462
|
-
nullFunc_viii:
|
|
1463
|
-
nullFunc_viiii:
|
|
1464
|
-
nullFunc_viiiii:
|
|
1465
|
-
nullFunc_viiiiii:
|
|
1450
|
+
memory: y,
|
|
1451
|
+
nullFunc_i: Hn,
|
|
1452
|
+
nullFunc_ii: Un,
|
|
1453
|
+
nullFunc_iidiiii: Wn,
|
|
1454
|
+
nullFunc_iii: Gn,
|
|
1455
|
+
nullFunc_iiii: Kn,
|
|
1456
|
+
nullFunc_iiiii: qn,
|
|
1457
|
+
nullFunc_jiji: Jn,
|
|
1458
|
+
nullFunc_v: Yn,
|
|
1459
|
+
nullFunc_vi: Xn,
|
|
1460
|
+
nullFunc_vii: Zn,
|
|
1461
|
+
nullFunc_viii: Qn,
|
|
1462
|
+
nullFunc_viiii: $n,
|
|
1463
|
+
nullFunc_viiiii: er,
|
|
1464
|
+
nullFunc_viiiiii: tr,
|
|
1466
1465
|
setTempRet0: te,
|
|
1467
|
-
table:
|
|
1466
|
+
table: ie
|
|
1468
1467
|
};
|
|
1469
|
-
let
|
|
1470
|
-
t.asm =
|
|
1471
|
-
var
|
|
1472
|
-
return
|
|
1468
|
+
let ir = t.asm(nr, rr, S);
|
|
1469
|
+
t.asm = ir;
|
|
1470
|
+
var ar = t.__ZSt18uncaught_exceptionv = function() {
|
|
1471
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.__ZSt18uncaught_exceptionv.apply(null, arguments);
|
|
1473
1472
|
};
|
|
1474
1473
|
t.___cxa_demangle = function() {
|
|
1475
|
-
return
|
|
1474
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.___cxa_demangle.apply(null, arguments);
|
|
1476
1475
|
}, t.___embind_register_native_and_builtin_types = function() {
|
|
1477
|
-
return
|
|
1476
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.___embind_register_native_and_builtin_types.apply(null, arguments);
|
|
1478
1477
|
};
|
|
1479
|
-
var
|
|
1480
|
-
return
|
|
1478
|
+
var or = t.___getTypeName = function() {
|
|
1479
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.___getTypeName.apply(null, arguments);
|
|
1481
1480
|
};
|
|
1482
1481
|
t._fflush = function() {
|
|
1483
|
-
return
|
|
1482
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm._fflush.apply(null, arguments);
|
|
1484
1483
|
};
|
|
1485
|
-
var
|
|
1486
|
-
return
|
|
1487
|
-
},
|
|
1488
|
-
return
|
|
1484
|
+
var $ = t._free = function() {
|
|
1485
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm._free.apply(null, arguments);
|
|
1486
|
+
}, sr = t._malloc = function() {
|
|
1487
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm._malloc.apply(null, arguments);
|
|
1489
1488
|
};
|
|
1490
1489
|
t.establishStackSpace = function() {
|
|
1491
|
-
return
|
|
1490
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.establishStackSpace.apply(null, arguments);
|
|
1492
1491
|
};
|
|
1493
|
-
var
|
|
1494
|
-
return
|
|
1495
|
-
},
|
|
1496
|
-
return
|
|
1497
|
-
},
|
|
1498
|
-
return
|
|
1499
|
-
},
|
|
1500
|
-
return
|
|
1492
|
+
var cr = t.globalCtors = function() {
|
|
1493
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.globalCtors.apply(null, arguments);
|
|
1494
|
+
}, lr = t.stackAlloc = function() {
|
|
1495
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.stackAlloc.apply(null, arguments);
|
|
1496
|
+
}, ur = t.stackRestore = function() {
|
|
1497
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.stackRestore.apply(null, arguments);
|
|
1498
|
+
}, dr = t.stackSave = function() {
|
|
1499
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.stackSave.apply(null, arguments);
|
|
1501
1500
|
};
|
|
1502
1501
|
t.dynCall_i = function() {
|
|
1503
|
-
return
|
|
1502
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.dynCall_i.apply(null, arguments);
|
|
1504
1503
|
}, t.dynCall_ii = function() {
|
|
1505
|
-
return
|
|
1504
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.dynCall_ii.apply(null, arguments);
|
|
1506
1505
|
}, t.dynCall_iidiiii = function() {
|
|
1507
|
-
return
|
|
1506
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.dynCall_iidiiii.apply(null, arguments);
|
|
1508
1507
|
}, t.dynCall_iii = function() {
|
|
1509
|
-
return
|
|
1508
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.dynCall_iii.apply(null, arguments);
|
|
1510
1509
|
}, t.dynCall_iiii = function() {
|
|
1511
|
-
return
|
|
1510
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.dynCall_iiii.apply(null, arguments);
|
|
1512
1511
|
}, t.dynCall_iiiii = function() {
|
|
1513
|
-
return
|
|
1512
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.dynCall_iiiii.apply(null, arguments);
|
|
1514
1513
|
}, t.dynCall_jiji = function() {
|
|
1515
|
-
return
|
|
1514
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.dynCall_jiji.apply(null, arguments);
|
|
1516
1515
|
}, t.dynCall_v = function() {
|
|
1517
|
-
return
|
|
1516
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.dynCall_v.apply(null, arguments);
|
|
1518
1517
|
}, t.dynCall_vi = function() {
|
|
1519
|
-
return
|
|
1518
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.dynCall_vi.apply(null, arguments);
|
|
1520
1519
|
}, t.dynCall_vii = function() {
|
|
1521
|
-
return
|
|
1520
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.dynCall_vii.apply(null, arguments);
|
|
1522
1521
|
}, t.dynCall_viii = function() {
|
|
1523
|
-
return
|
|
1522
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.dynCall_viii.apply(null, arguments);
|
|
1524
1523
|
}, t.dynCall_viiii = function() {
|
|
1525
|
-
return
|
|
1524
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.dynCall_viiii.apply(null, arguments);
|
|
1526
1525
|
}, t.dynCall_viiiii = function() {
|
|
1527
|
-
return
|
|
1526
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.dynCall_viiiii.apply(null, arguments);
|
|
1528
1527
|
}, t.dynCall_viiiiii = function() {
|
|
1529
|
-
return
|
|
1530
|
-
}, t.asm =
|
|
1528
|
+
return b(k, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"), b(!A, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"), t.asm.dynCall_viiiiii.apply(null, arguments);
|
|
1529
|
+
}, t.asm = ir, Object.getOwnPropertyDescriptor(t, "intArrayFromString") || (t.intArrayFromString = function() {
|
|
1531
1530
|
F("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
|
|
1532
1531
|
}), Object.getOwnPropertyDescriptor(t, "intArrayToString") || (t.intArrayToString = function() {
|
|
1533
1532
|
F("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
|
|
1534
|
-
}), t.ccall =
|
|
1533
|
+
}), t.ccall = se, t.cwrap = ce, Object.getOwnPropertyDescriptor(t, "setValue") || (t.setValue = function() {
|
|
1535
1534
|
F("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
|
|
1536
1535
|
}), Object.getOwnPropertyDescriptor(t, "getValue") || (t.getValue = function() {
|
|
1537
1536
|
F("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
|
|
@@ -1549,7 +1548,7 @@ throwBindingError('function ${e} called with ' + arguments.length + ' arguments,
|
|
|
1549
1548
|
F("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
|
|
1550
1549
|
}), Object.getOwnPropertyDescriptor(t, "stringToUTF8Array") || (t.stringToUTF8Array = function() {
|
|
1551
1550
|
F("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
|
|
1552
|
-
}), t.stringToUTF8 =
|
|
1551
|
+
}), t.stringToUTF8 = fe, Object.getOwnPropertyDescriptor(t, "lengthBytesUTF8") || (t.lengthBytesUTF8 = function() {
|
|
1553
1552
|
F("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
|
|
1554
1553
|
}), Object.getOwnPropertyDescriptor(t, "UTF16ToString") || (t.UTF16ToString = function() {
|
|
1555
1554
|
F("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
|
|
@@ -1661,7 +1660,7 @@ throwBindingError('function ${e} called with ' + arguments.length + ' arguments,
|
|
|
1661
1660
|
F("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
|
|
1662
1661
|
}), Object.getOwnPropertyDescriptor(t, "warnOnce") || (t.warnOnce = function() {
|
|
1663
1662
|
F("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
|
|
1664
|
-
}), t.writeStackCookie = we, t.checkStackCookie =
|
|
1663
|
+
}), t.writeStackCookie = we, t.checkStackCookie = D, t.abortStackOverflow = Te, Object.getOwnPropertyDescriptor(t, "ALLOC_NORMAL") || Object.defineProperty(t, "ALLOC_NORMAL", {
|
|
1665
1664
|
configurable: !0,
|
|
1666
1665
|
get() {
|
|
1667
1666
|
F("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
|
|
@@ -1687,9 +1686,9 @@ throwBindingError('function ${e} called with ' + arguments.length + ' arguments,
|
|
|
1687
1686
|
F("'calledRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
|
|
1688
1687
|
}
|
|
1689
1688
|
});
|
|
1690
|
-
let
|
|
1689
|
+
let fr;
|
|
1691
1690
|
t.then = function(e) {
|
|
1692
|
-
if (
|
|
1691
|
+
if (fr) e(t);
|
|
1693
1692
|
else {
|
|
1694
1693
|
let n = t.onRuntimeInitialized;
|
|
1695
1694
|
t.onRuntimeInitialized = function() {
|
|
@@ -1698,40 +1697,40 @@ throwBindingError('function ${e} called with ' + arguments.length + ' arguments,
|
|
|
1698
1697
|
}
|
|
1699
1698
|
return t;
|
|
1700
1699
|
};
|
|
1701
|
-
function
|
|
1700
|
+
function pr(e) {
|
|
1702
1701
|
this.name = "ExitStatus", this.message = `Program terminated with exit(${e})`, this.status = e;
|
|
1703
1702
|
}
|
|
1704
|
-
|
|
1705
|
-
|
|
1703
|
+
N = function e() {
|
|
1704
|
+
fr || mr(), fr || (N = e);
|
|
1706
1705
|
};
|
|
1707
|
-
function
|
|
1708
|
-
if (e = e || a,
|
|
1706
|
+
function mr(e) {
|
|
1707
|
+
if (e = e || a, j > 0 || (we(), je(), j > 0)) return;
|
|
1709
1708
|
function n() {
|
|
1710
|
-
|
|
1709
|
+
fr || (fr = !0, !ae && (Me(), Ne(), t.onRuntimeInitialized && t.onRuntimeInitialized(), b(!t._main, "compiled without a main, but one is present. if you added it from JS, use Module[\"onRuntimeInitialized\"]"), Fe()));
|
|
1711
1710
|
}
|
|
1712
1711
|
t.setStatus ? (t.setStatus("Running..."), setTimeout(() => {
|
|
1713
1712
|
setTimeout(() => {
|
|
1714
1713
|
t.setStatus("");
|
|
1715
1714
|
}, 1), n();
|
|
1716
|
-
}, 1)) : n(),
|
|
1715
|
+
}, 1)) : n(), D();
|
|
1717
1716
|
}
|
|
1718
|
-
t.run =
|
|
1719
|
-
function
|
|
1717
|
+
t.run = mr;
|
|
1718
|
+
function hr() {
|
|
1720
1719
|
let e = g, t = _, n = !1;
|
|
1721
1720
|
g = _ = function(e) {
|
|
1722
1721
|
n = !0;
|
|
1723
1722
|
};
|
|
1724
1723
|
try {
|
|
1725
|
-
let e =
|
|
1724
|
+
let e = at;
|
|
1726
1725
|
e && e(0);
|
|
1727
1726
|
} catch (e) {}
|
|
1728
1727
|
g = e, _ = t, n && (v("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc."), v("(this may also be due to not including full filesystem support - try building with -s FORCE_FILESYSTEM=1)"));
|
|
1729
1728
|
}
|
|
1730
|
-
function
|
|
1731
|
-
|
|
1729
|
+
function gr(e, n) {
|
|
1730
|
+
hr(), !(n && re && e === 0) && (re ? n || _(`program exited (with status: ${e}), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)`) : (ae = !0, Pe(), t.onExit && t.onExit(e)), o(e, new pr(e)));
|
|
1732
1731
|
}
|
|
1733
1732
|
if (t.preInit) for (typeof t.preInit == "function" && (t.preInit = [t.preInit]); t.preInit.length > 0;) t.preInit.pop()();
|
|
1734
|
-
return
|
|
1733
|
+
return re = !0, mr(), t;
|
|
1735
1734
|
};
|
|
1736
1735
|
}(), a = null;
|
|
1737
1736
|
function o(e) {
|