mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-06 03:17:58 +00:00
1 line
4.9 KiB
Plaintext
1 line
4.9 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":[[2,2,1,0],[2,14,1,12],[4,2,2,0,"Object"],[4,8,2,6],[4,9,2,7,"defineProperty"],[4,23,2,21],[4,24,2,22,"exports"],[4,31,2,29],[4,33,2,31],[4,45,2,43],[4,47,2,45],[5,4,2,47,"value"],[5,9,2,52],[5,11,2,54],[6,2,2,59],[6,3,2,60],[6,4,2,61],[7,2,3,0,"exports"],[7,9,3,7],[7,10,3,8,"createWasmFn"],[7,22,3,20],[7,25,3,23,"createWasmFn"],[7,37,3,35],[8,2,4,0],[9,0,5,0],[10,0,6,0],[11,0,7,0],[12,0,8,0],[13,0,9,0],[14,0,10,0],[15,0,11,0],[16,2,12,0],[16,11,12,9,"createWasmFn"],[16,23,12,21,"createWasmFn"],[16,24,12,22,"root"],[16,28,12,26],[16,30,12,28,"wasmBytes"],[16,39,12,37],[16,41,12,39,"asmFn"],[16,46,12,44],[16,48,12,46],[17,4,13,4],[17,11,13,11],[17,17,13,18,"wbg"],[17,20,13,21],[17,24,13,26],[18,6,14,8],[18,12,14,14,"result"],[18,18,14,20],[18,21,14,23],[19,8,15,12,"error"],[19,13,15,17],[19,15,15,19],[19,19,15,23],[20,8,16,12,"type"],[20,12,16,16],[20,14,16,18],[20,20,16,24],[21,8,17,12,"wasm"],[21,12,17,16],[21,14,17,18],[22,6,18,8],[22,7,18,9],[23,6,19,8],[23,10,19,12],[24,8,20,12],[24,12,20,16],[24,13,20,17,"wasmBytes"],[24,22,20,26],[24,24,20,28,"length"],[24,30,20,34],[24,32,20,36],[25,10,21,16],[25,16,21,22],[25,20,21,26,"Error"],[25,25,21,31],[25,26,21,32],[25,70,21,76],[25,71,21,77],[26,8,22,12],[26,9,22,13],[26,15,23,17],[26,19,23,21],[26,26,23,28,"WebAssembly"],[26,37,23,39],[26,42,23,44],[26,50,23,52],[26,54,23,56],[26,61,23,63,"WebAssembly"],[26,72,23,74],[26,73,23,75,"instantiate"],[26,84,23,86],[26,89,23,91],[26,99,23,101],[26,101,23,103],[27,10,24,16],[27,16,24,22],[27,20,24,26,"Error"],[27,25,24,31],[27,26,24,32],[27,76,24,82],[27,77,24,83],[28,8,25,12],[29,8,26,12],[29,14,26,18,"source"],[29,20,26,24],[29,23,26,27],[29,29,26,33,"WebAssembly"],[29,40,26,44],[29,41,26,45,"instantiate"],[29,52,26,56],[29,53,26,57,"wasmBytes"],[29,62,26,66],[29,64,26,68],[30,10,26,70,"wbg"],[31,8,26,74],[31,9,26,75],[31,10,26,76],[32,8,27,12,"result"],[32,14,27,18],[32,15,27,19,"wasm"],[32,19,27,23],[32,22,27,26,"source"],[32,28,27,32],[32,29,27,33,"instance"],[32,37,27,41],[32,38,27,42,"exports"],[32,45,27,49],[33,8,28,12,"result"],[33,14,28,18],[33,15,28,19,"type"],[33,19,28,23],[33,22,28,26],[33,28,28,32],[34,6,29,8],[34,7,29,9],[34,8,30,8],[34,15,30,15,"error"],[34,20,30,20],[34,22,30,22],[35,8,31,12],[36,8,32,12],[36,12,32,16],[36,19,32,23,"asmFn"],[36,24,32,28],[36,29,32,33],[36,39,32,43],[36,41,32,45],[37,10,33,16,"result"],[37,16,33,22],[37,17,33,23,"wasm"],[37,21,33,27],[37,24,33,30,"asmFn"],[37,29,33,35],[37,30,33,36,"wbg"],[37,33,33,39],[37,34,33,40],[38,10,34,16,"result"],[38,16,34,22],[38,17,34,23,"type"],[38,21,34,27],[38,24,34,30],[38,29,34,35],[39,8,35,12],[39,9,35,13],[39,15,36,17],[40,10,37,16,"result"],[40,16,37,22],[40,17,37,23,"error"],[40,22,37,28],[40,25,37,31],[40,71,37,77,"root"],[40,75,37,81],[40,81,37,87,"error"],[40,86,37,92],[40,87,37,93,"message"],[40,94,37,100],[40,96,37,102],[41,10,38,16,"console"],[41,17,38,23],[41,18,38,24,"error"],[41,23,38,29],[41,24,38,30,"result"],[41,30,38,36],[41,31,38,37,"error"],[41,36,38,42],[41,37,38,43],[42,8,39,12],[43,6,40,8],[44,6,41,8],[44,13,41,15,"result"],[44,19,41,21],[45,4,42,4],[45,5,42,5],[46,2,43,0],[47,0,43,1],[47,3]],"functionMap":{"names":["<global>","createWasmFn","<anonymous>"],"mappings":"AAA;ACW;WCC;KD6B;CDC"},"hasCjsExports":true},"type":"js/module"}]} |