50 lines
13 KiB
JavaScript

(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[0],{
/***/ "./crate/pkg/index.js":
/*!****************************!*\
!*** ./crate/pkg/index.js ***!
\****************************/
/*! exports provided: run, __wbg_name_94a86035038cc7d1, __wbg_new_4874a6f66cf0c390, __wbg_number_ce607e36453b3073, __wbg_setnumber_f4aff5634a639ce5, __wbg_render_5671e798f22c5fe4, __wbg_log_53ac7e38e2f9fa32, __wbindgen_object_drop_ref, __wbindgen_throw */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_bg_wasm__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index_bg.wasm */ \"./crate/pkg/index_bg.wasm\");\n/* harmony import */ var _index_bg_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index_bg.js */ \"./crate/pkg/index_bg.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"run\", function() { return _index_bg_js__WEBPACK_IMPORTED_MODULE_1__[\"run\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"__wbg_name_94a86035038cc7d1\", function() { return _index_bg_js__WEBPACK_IMPORTED_MODULE_1__[\"__wbg_name_94a86035038cc7d1\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"__wbg_new_4874a6f66cf0c390\", function() { return _index_bg_js__WEBPACK_IMPORTED_MODULE_1__[\"__wbg_new_4874a6f66cf0c390\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"__wbg_number_ce607e36453b3073\", function() { return _index_bg_js__WEBPACK_IMPORTED_MODULE_1__[\"__wbg_number_ce607e36453b3073\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"__wbg_setnumber_f4aff5634a639ce5\", function() { return _index_bg_js__WEBPACK_IMPORTED_MODULE_1__[\"__wbg_setnumber_f4aff5634a639ce5\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"__wbg_render_5671e798f22c5fe4\", function() { return _index_bg_js__WEBPACK_IMPORTED_MODULE_1__[\"__wbg_render_5671e798f22c5fe4\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"__wbg_log_53ac7e38e2f9fa32\", function() { return _index_bg_js__WEBPACK_IMPORTED_MODULE_1__[\"__wbg_log_53ac7e38e2f9fa32\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"__wbindgen_object_drop_ref\", function() { return _index_bg_js__WEBPACK_IMPORTED_MODULE_1__[\"__wbindgen_object_drop_ref\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"__wbindgen_throw\", function() { return _index_bg_js__WEBPACK_IMPORTED_MODULE_1__[\"__wbindgen_throw\"]; });\n\n\n\n_index_bg_wasm__WEBPACK_IMPORTED_MODULE_0__[\"__wbindgen_start\"]();\n\n\n//# sourceURL=webpack:///./crate/pkg/index.js?");
/***/ }),
/***/ "./crate/pkg/index_bg.js":
/*!*******************************!*\
!*** ./crate/pkg/index_bg.js ***!
\*******************************/
/*! exports provided: run, __wbg_name_94a86035038cc7d1, __wbg_new_4874a6f66cf0c390, __wbg_number_ce607e36453b3073, __wbg_setnumber_f4aff5634a639ce5, __wbg_render_5671e798f22c5fe4, __wbg_log_53ac7e38e2f9fa32, __wbindgen_object_drop_ref, __wbindgen_throw */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(TextDecoder, module, TextEncoder) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"run\", function() { return run; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__wbg_name_94a86035038cc7d1\", function() { return __wbg_name_94a86035038cc7d1; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__wbg_new_4874a6f66cf0c390\", function() { return __wbg_new_4874a6f66cf0c390; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__wbg_number_ce607e36453b3073\", function() { return __wbg_number_ce607e36453b3073; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__wbg_setnumber_f4aff5634a639ce5\", function() { return __wbg_setnumber_f4aff5634a639ce5; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__wbg_render_5671e798f22c5fe4\", function() { return __wbg_render_5671e798f22c5fe4; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__wbg_log_53ac7e38e2f9fa32\", function() { return __wbg_log_53ac7e38e2f9fa32; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__wbindgen_object_drop_ref\", function() { return __wbindgen_object_drop_ref; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__wbindgen_throw\", function() { return __wbindgen_throw; });\n/* harmony import */ var _snippets_import_js_614d6b8c410ac4f9_defined_in_js_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./snippets/import_js-614d6b8c410ac4f9/defined-in-js.js */ \"./crate/pkg/snippets/import_js-614d6b8c410ac4f9/defined-in-js.js\");\n/* harmony import */ var _index_bg_wasm__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index_bg.wasm */ \"./crate/pkg/index_bg.wasm\");\n\n\n\nconst heap = new Array(32).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nfunction getObject(idx) { return heap[idx]; }\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 takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nconst lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;\n\nlet cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });\n\ncachedTextDecoder.decode();\n\nlet cachegetUint8Memory0 = null;\nfunction getUint8Memory0() {\n if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== _index_bg_wasm__WEBPACK_IMPORTED_MODULE_1__[\"memory\"].buffer) {\n cachegetUint8Memory0 = new Uint8Array(_index_bg_wasm__WEBPACK_IMPORTED_MODULE_1__[\"memory\"].buffer);\n }\n return cachegetUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nconst lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;\n\nlet cachedTextEncoder = new lTextEncoder('utf-8');\n\nconst encodeString = (typeof cachedTextEncoder.encodeInto === 'function'\n ? function (arg, view) {\n return cachedTextEncoder.encodeInto(arg, view);\n}\n : function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n});\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (typeof(arg) !== 'string') throw new Error('expected a string argument');\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length);\n getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len);\n\n const mem = getUint8Memory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3);\n const view = getUint8Memory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n if (ret.read !== arg.length) throw new Error('failed to pass whole string');\n offset += ret.written;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nlet cachegetInt32Memory0 = null;\nfunction getInt32Memory0() {\n if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== _index_bg_wasm__WEBPACK_IMPORTED_MODULE_1__[\"memory\"].buffer) {\n cachegetInt32Memory0 = new Int32Array(_index_bg_wasm__WEBPACK_IMPORTED_MODULE_1__[\"memory\"].buffer);\n }\n return cachegetInt32Memory0;\n}\n\nfunction logError(f) {\n return function () {\n try {\n return f.apply(this, arguments);\n\n } catch (e) {\n let error = (function () {\n try {\n return e instanceof Error ? `${e.message}\\n\\nStack:\\n${e.stack}` : e.toString();\n } catch(_) {\n return \"<failed to stringify thrown value>\";\n }\n }());\n console.error(\"wasm-bindgen: imported JS function that was not marked as `catch` threw an error:\", error);\n throw e;\n }\n };\n}\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n if (typeof(heap_next) !== 'number') throw new Error('corrupt heap');\n\n heap[idx] = obj;\n return idx;\n}\n\nfunction _assertNum(n) {\n if (typeof(n) !== 'number') throw new Error('expected a number argument');\n}\n/**\n*/\nfunction run() {\n _index_bg_wasm__WEBPACK_IMPORTED_MODULE_1__[\"run\"]();\n}\n\nconst __wbg_name_94a86035038cc7d1 = logError(function(arg0) {\n var ret = Object(_snippets_import_js_614d6b8c410ac4f9_defined_in_js_js__WEBPACK_IMPORTED_MODULE_0__[\"name\"])();\n var ptr0 = passStringToWasm0(ret, _index_bg_wasm__WEBPACK_IMPORTED_MODULE_1__[\"__wbindgen_malloc\"], _index_bg_wasm__WEBPACK_IMPORTED_MODULE_1__[\"__wbindgen_realloc\"]);\n var len0 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len0;\n getInt32Memory0()[arg0 / 4 + 0] = ptr0;\n});\n\nconst __wbg_new_4874a6f66cf0c390 = logError(function() {\n var ret = new _snippets_import_js_614d6b8c410ac4f9_defined_in_js_js__WEBPACK_IMPORTED_MODULE_0__[\"MyClass\"]();\n return addHeapObject(ret);\n});\n\nconst __wbg_number_ce607e36453b3073 = logError(function(arg0) {\n var ret = getObject(arg0).number;\n _assertNum(ret);\n return ret;\n});\n\nconst __wbg_setnumber_f4aff5634a639ce5 = logError(function(arg0, arg1) {\n var ret = getObject(arg0).number = arg1 >>> 0;\n return addHeapObject(ret);\n});\n\nconst __wbg_render_5671e798f22c5fe4 = logError(function(arg0, arg1) {\n var ret = getObject(arg1).render();\n var ptr0 = passStringToWasm0(ret, _index_bg_wasm__WEBPACK_IMPORTED_MODULE_1__[\"__wbindgen_malloc\"], _index_bg_wasm__WEBPACK_IMPORTED_MODULE_1__[\"__wbindgen_realloc\"]);\n var len0 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len0;\n getInt32Memory0()[arg0 / 4 + 0] = ptr0;\n});\n\nconst __wbg_log_53ac7e38e2f9fa32 = logError(function(arg0, arg1) {\n console.log(getStringFromWasm0(arg0, arg1));\n});\n\nconst __wbindgen_object_drop_ref = function(arg0) {\n takeObject(arg0);\n};\n\nconst __wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n};\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! text-encoding */ \"../../node_modules/text-encoding/index.js\")[\"TextDecoder\"], __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/harmony-module.js */ \"../../node_modules/webpack/buildin/harmony-module.js\")(module), __webpack_require__(/*! text-encoding */ \"../../node_modules/text-encoding/index.js\")[\"TextEncoder\"]))\n\n//# sourceURL=webpack:///./crate/pkg/index_bg.js?");
/***/ }),
/***/ "./crate/pkg/index_bg.wasm":
/*!*********************************!*\
!*** ./crate/pkg/index_bg.wasm ***!
\*********************************/
/*! exports provided: memory, run, __wbindgen_malloc, __wbindgen_realloc, __wbindgen_start */
/***/ (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__(/*! ./index_bg.js */ \"./crate/pkg/index_bg.js\");\n\n\n// exec wasm module\nwasmExports[\"__webpack_init__\"]()\n\n//# sourceURL=webpack:///./crate/pkg/index_bg.wasm?");
/***/ }),
/***/ "./crate/pkg/snippets/import_js-614d6b8c410ac4f9/defined-in-js.js":
/*!************************************************************************!*\
!*** ./crate/pkg/snippets/import_js-614d6b8c410ac4f9/defined-in-js.js ***!
\************************************************************************/
/*! exports provided: name, MyClass */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"name\", function() { return name; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MyClass\", function() { return MyClass; });\nfunction name() {\n return 'Rust';\n}\n\nclass MyClass {\n constructor() {\n this._number = 42;\n }\n\n get number() {\n return this._number;\n }\n\n set number(n) {\n return this._number = n;\n }\n\n render() {\n return `My number is: ${this.number}`;\n }\n}\n\n\n//# sourceURL=webpack:///./crate/pkg/snippets/import_js-614d6b8c410ac4f9/defined-in-js.js?");
/***/ })
}]);