(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[1],{ /***/ "./pkg/boa.js": /*!********************!*\ !*** ./pkg/boa.js ***! \********************/ /*! exports provided: __wbg_log_e93ebc22f4028df1, evaluate, __wbindgen_throw, __wbindgen_object_drop_ref */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(TextDecoder, TextEncoder) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__wbg_log_e93ebc22f4028df1\", function() { return __wbg_log_e93ebc22f4028df1; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"evaluate\", function() { return evaluate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__wbindgen_throw\", function() { return __wbindgen_throw; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__wbindgen_object_drop_ref\", function() { return __wbindgen_object_drop_ref; });\n/* harmony import */ var _boa_bg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./boa_bg */ \"./pkg/boa_bg.wasm\");\n\n\nlet cachedTextDecoder = new TextDecoder('utf-8');\n\nlet cachegetUint8Memory = null;\nfunction getUint8Memory() {\n if (cachegetUint8Memory === null || cachegetUint8Memory.buffer !== _boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"memory\"].buffer) {\n cachegetUint8Memory = new Uint8Array(_boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"memory\"].buffer);\n }\n return cachegetUint8Memory;\n}\n\nfunction getStringFromWasm(ptr, len) {\n return cachedTextDecoder.decode(getUint8Memory().subarray(ptr, ptr + len));\n}\n\nfunction __wbg_log_e93ebc22f4028df1(arg0, arg1) {\n let varg0 = getStringFromWasm(arg0, arg1);\n try {\n console.log(varg0);\n } catch (e) {\n console.error(\"wasm-bindgen: imported JS function that was not marked as `catch` threw an error:\", e);\n throw e;\n }\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nlet cachedTextEncoder = new TextEncoder('utf-8');\n\nlet passStringToWasm;\nif (typeof cachedTextEncoder.encodeInto === 'function') {\n passStringToWasm = function(arg) {\n\n if (typeof(arg) !== 'string') throw new Error('expected a string argument');\n\n let size = arg.length;\n let ptr = _boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"__wbindgen_malloc\"](size);\n let writeOffset = 0;\n while (true) {\n const view = getUint8Memory().subarray(ptr + writeOffset, ptr + size);\n const { read, written } = cachedTextEncoder.encodeInto(arg, view);\n writeOffset += written;\n if (read === arg.length) {\n break;\n }\n arg = arg.substring(read);\n ptr = _boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"__wbindgen_realloc\"](ptr, size, size += arg.length * 3);\n }\n WASM_VECTOR_LEN = writeOffset;\n return ptr;\n };\n} else {\n passStringToWasm = function(arg) {\n\n if (typeof(arg) !== 'string') throw new Error('expected a string argument');\n\n const buf = cachedTextEncoder.encode(arg);\n const ptr = _boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"__wbindgen_malloc\"](buf.length);\n getUint8Memory().set(buf, ptr);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n };\n}\n\nlet cachedGlobalArgumentPtr = null;\nfunction globalArgumentPtr() {\n if (cachedGlobalArgumentPtr === null) {\n cachedGlobalArgumentPtr = _boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"__wbindgen_global_argument_ptr\"]();\n }\n return cachedGlobalArgumentPtr;\n}\n\nlet cachegetUint32Memory = null;\nfunction getUint32Memory() {\n if (cachegetUint32Memory === null || cachegetUint32Memory.buffer !== _boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"memory\"].buffer) {\n cachegetUint32Memory = new Uint32Array(_boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"memory\"].buffer);\n }\n return cachegetUint32Memory;\n}\n/**\n* @param {string} src\n* @returns {string}\n*/\nfunction evaluate(src) {\n const ptr0 = passStringToWasm(src);\n const len0 = WASM_VECTOR_LEN;\n const retptr = globalArgumentPtr();\n try {\n _boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"evaluate\"](retptr, ptr0, len0);\n const mem = getUint32Memory();\n const rustptr = mem[retptr / 4];\n const rustlen = mem[retptr / 4 + 1];\n\n const realRet = getStringFromWasm(rustptr, rustlen).slice();\n _boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"__wbindgen_free\"](rustptr, rustlen * 1);\n return realRet;\n\n\n } finally {\n _boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"__wbindgen_free\"](ptr0, len0 * 1);\n\n }\n\n}\n\nfunction __wbindgen_throw(ptr, len) {\n throw new Error(getStringFromWasm(ptr, len));\n}\n\nconst heap = new Array(32);\n\nheap.fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nlet heap_next = heap.length;\n\nfunction dropObject(idx) {\n if (idx < 36) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction __wbindgen_object_drop_ref(i) { dropObject(i); }\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! text-encoding */ \"./node_modules/text-encoding/index.js\")[\"TextDecoder\"], __webpack_require__(/*! text-encoding */ \"./node_modules/text-encoding/index.js\")[\"TextEncoder\"]))\n\n//# sourceURL=webpack:///./pkg/boa.js?"); /***/ }), /***/ "./pkg/boa_bg.wasm": /*!*************************!*\ !*** ./pkg/boa_bg.wasm ***! \*************************/ /*! exports provided: memory, __rustc_debug_gdb_scripts_section__, __wbindgen_global_argument_ptr, evaluate, __wbindgen_malloc, __wbindgen_realloc, __wbindgen_free */ /***/ (function(module, exports, __webpack_require__) { eval("\"use strict\";\n// Instantiate WebAssembly module\nvar wasmExports = __webpack_require__.w[module.i];\n__webpack_require__.r(exports);\n// export exports from WebAssembly module\nfor(var name in wasmExports) if(name != \"__webpack_init__\") exports[name] = wasmExports[name];\n// exec imports from WebAssembly module (for esm order)\n/* harmony import */ var m0 = __webpack_require__(/*! ./boa */ \"./pkg/boa.js\");\n\n\n// exec wasm module\nwasmExports[\"__webpack_init__\"]()\n\n//# sourceURL=webpack:///./pkg/boa_bg.wasm?"); /***/ }) }]);