mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 07:41:01 +00:00
1 line
4.6 KiB
Plaintext
1 line
4.6 KiB
Plaintext
{"dependencies":[],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n exports.createWasmFn = createWasmFn;\n /**\n * @name createWasmFn\n * @description\n * Create a WASM (or ASM.js) creator interface based on the supplied information.\n *\n * It will attempt to create a WASM interface first and if this fails or is not available in\n * the environment, will fallback to attempting to create an ASM.js interface.\n */\n function createWasmFn(root, wasmBytes, asmFn) {\n return async wbg => {\n const result = {\n error: null,\n type: 'none',\n wasm: null\n };\n try {\n if (!wasmBytes?.length) {\n throw new Error('No WebAssembly provided for initialization');\n } else if (typeof WebAssembly !== 'object' || typeof WebAssembly.instantiate !== 'function') {\n throw new Error('WebAssembly is not available in your environment');\n }\n const source = await WebAssembly.instantiate(wasmBytes, {\n wbg\n });\n result.wasm = source.instance.exports;\n result.type = 'wasm';\n } catch (error) {\n // if we have a valid supplied asm.js, return that\n if (typeof asmFn === 'function') {\n result.wasm = asmFn(wbg);\n result.type = 'asm';\n } else {\n result.error = `FATAL: Unable to initialize @polkadot/wasm-${root}:: ${error.message}`;\n console.error(result.error);\n }\n }\n return result;\n };\n }\n});","lineCount":47,"map":[[7,2,9,0,"exports"],[7,9,9,0],[7,10,9,0,"createWasmFn"],[7,22,9,0],[7,25,9,0,"createWasmFn"],[7,37,9,0],[8,2,1,0],[9,0,2,0],[10,0,3,0],[11,0,4,0],[12,0,5,0],[13,0,6,0],[14,0,7,0],[15,0,8,0],[16,2,9,7],[16,11,9,16,"createWasmFn"],[16,23,9,28,"createWasmFn"],[16,24,9,29,"root"],[16,28,9,33],[16,30,9,35,"wasmBytes"],[16,39,9,44],[16,41,9,46,"asmFn"],[16,46,9,51],[16,48,9,53],[17,4,10,4],[17,11,10,11],[17,17,10,18,"wbg"],[17,20,10,21],[17,24,10,26],[18,6,11,8],[18,12,11,14,"result"],[18,18,11,20],[18,21,11,23],[19,8,12,12,"error"],[19,13,12,17],[19,15,12,19],[19,19,12,23],[20,8,13,12,"type"],[20,12,13,16],[20,14,13,18],[20,20,13,24],[21,8,14,12,"wasm"],[21,12,14,16],[21,14,14,18],[22,6,15,8],[22,7,15,9],[23,6,16,8],[23,10,16,12],[24,8,17,12],[24,12,17,16],[24,13,17,17,"wasmBytes"],[24,22,17,26],[24,24,17,28,"length"],[24,30,17,34],[24,32,17,36],[25,10,18,16],[25,16,18,22],[25,20,18,26,"Error"],[25,25,18,31],[25,26,18,32],[25,70,18,76],[25,71,18,77],[26,8,19,12],[26,9,19,13],[26,15,20,17],[26,19,20,21],[26,26,20,28,"WebAssembly"],[26,37,20,39],[26,42,20,44],[26,50,20,52],[26,54,20,56],[26,61,20,63,"WebAssembly"],[26,72,20,74],[26,73,20,75,"instantiate"],[26,84,20,86],[26,89,20,91],[26,99,20,101],[26,101,20,103],[27,10,21,16],[27,16,21,22],[27,20,21,26,"Error"],[27,25,21,31],[27,26,21,32],[27,76,21,82],[27,77,21,83],[28,8,22,12],[29,8,23,12],[29,14,23,18,"source"],[29,20,23,24],[29,23,23,27],[29,29,23,33,"WebAssembly"],[29,40,23,44],[29,41,23,45,"instantiate"],[29,52,23,56],[29,53,23,57,"wasmBytes"],[29,62,23,66],[29,64,23,68],[30,10,23,70,"wbg"],[31,8,23,74],[31,9,23,75],[31,10,23,76],[32,8,24,12,"result"],[32,14,24,18],[32,15,24,19,"wasm"],[32,19,24,23],[32,22,24,26,"source"],[32,28,24,32],[32,29,24,33,"instance"],[32,37,24,41],[32,38,24,42,"exports"],[32,45,24,49],[33,8,25,12,"result"],[33,14,25,18],[33,15,25,19,"type"],[33,19,25,23],[33,22,25,26],[33,28,25,32],[34,6,26,8],[34,7,26,9],[34,8,27,8],[34,15,27,15,"error"],[34,20,27,20],[34,22,27,22],[35,8,28,12],[36,8,29,12],[36,12,29,16],[36,19,29,23,"asmFn"],[36,24,29,28],[36,29,29,33],[36,39,29,43],[36,41,29,45],[37,10,30,16,"result"],[37,16,30,22],[37,17,30,23,"wasm"],[37,21,30,27],[37,24,30,30,"asmFn"],[37,29,30,35],[37,30,30,36,"wbg"],[37,33,30,39],[37,34,30,40],[38,10,31,16,"result"],[38,16,31,22],[38,17,31,23,"type"],[38,21,31,27],[38,24,31,30],[38,29,31,35],[39,8,32,12],[39,9,32,13],[39,15,33,17],[40,10,34,16,"result"],[40,16,34,22],[40,17,34,23,"error"],[40,22,34,28],[40,25,34,31],[40,71,34,77,"root"],[40,75,34,81],[40,81,34,87,"error"],[40,86,34,92],[40,87,34,93,"message"],[40,94,34,100],[40,96,34,102],[41,10,35,16,"console"],[41,17,35,23],[41,18,35,24,"error"],[41,23,35,29],[41,24,35,30,"result"],[41,30,35,36],[41,31,35,37,"error"],[41,36,35,42],[41,37,35,43],[42,8,36,12],[43,6,37,8],[44,6,38,8],[44,13,38,15,"result"],[44,19,38,21],[45,4,39,4],[45,5,39,5],[46,2,40,0],[47,0,40,1],[47,3]],"functionMap":{"names":["<global>","createWasmFn","<anonymous>"],"mappings":"AAA;OCQ;WCC;KD6B;CDC"},"hasCjsExports":false},"type":"js/module"}]} |