saito-wasm 0.0.2
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/Cargo.toml +30 -0
- package/dist/browser/index.d.ts +428 -0
- package/dist/browser/index.js +220 -0
- package/dist/server/113b3ee1c6c31ca8f96e.module.wasm +0 -0
- package/dist/server/index.d.ts +300 -0
- package/dist/server/index.js +283 -0
- package/dist/server/pkg_node_index_js.index.js +55 -0
- package/dist/server/vendors-node_modules_text-encoding_index_js.index.js +44 -0
- package/dist/types/dist/browser/index.d.ts +3 -0
- package/dist/types/dist/browser/index.d.ts.map +1 -0
- package/dist/types/dist/server/index.d.ts +3 -0
- package/dist/types/dist/server/index.d.ts.map +1 -0
- package/dist/types/dist/server/pkg_node_index_js.index.d.ts +9 -0
- package/dist/types/dist/server/pkg_node_index_js.index.d.ts.map +1 -0
- package/dist/types/dist/server/vendors-node_modules_text-encoding_index_js.index.d.ts +8 -0
- package/dist/types/dist/server/vendors-node_modules_text-encoding_index_js.index.d.ts.map +1 -0
- package/dist/types/index.node.d.ts +34 -0
- package/dist/types/index.node.d.ts.map +1 -0
- package/dist/types/index.web.d.ts +3 -0
- package/dist/types/index.web.d.ts.map +1 -0
- package/dist/types/js/msg_handler.d.ts +17 -0
- package/dist/types/js/msg_handler.d.ts.map +1 -0
- package/dist/types/pkg/node/index.d.ts +2 -0
- package/dist/types/pkg/node/index.d.ts.map +1 -0
- package/dist/types/pkg/node/index_bg.d.ts +476 -0
- package/dist/types/pkg/node/index_bg.d.ts.map +1 -0
- package/dist/types/pkg/node/snippets/saito-wasm-10de7e358f6ef4db/js/msg_handler.d.ts +17 -0
- package/dist/types/pkg/node/snippets/saito-wasm-10de7e358f6ef4db/js/msg_handler.d.ts.map +1 -0
- package/dist/types/pkg/web/index.d.ts +406 -0
- package/dist/types/pkg/web/index.d.ts.map +1 -0
- package/dist/types/pkg/web/snippets/saito-wasm-10de7e358f6ef4db/js/msg_handler.d.ts +17 -0
- package/dist/types/pkg/web/snippets/saito-wasm-10de7e358f6ef4db/js/msg_handler.d.ts.map +1 -0
- package/dist/types/webpack.config.d.ts +14 -0
- package/dist/types/webpack.config.d.ts.map +1 -0
- package/index.node.ts +5 -0
- package/index.web.ts +8 -0
- package/js/msg_handler.js +60 -0
- package/package.json +39 -0
- package/src/lib.rs +18 -0
- package/src/saitowasm.rs +718 -0
- package/src/wasm_block.rs +97 -0
- package/src/wasm_configuration.rs +94 -0
- package/src/wasm_io_handler.rs +258 -0
- package/src/wasm_peer.rs +80 -0
- package/src/wasm_slip.rs +101 -0
- package/src/wasm_task_runner.rs +12 -0
- package/src/wasm_time_keeper.rs +12 -0
- package/src/wasm_transaction.rs +177 -0
- package/tsconfig.json +116 -0
- package/webpack.config.js +171 -0
|
Binary file
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* @param {string} json
|
|
5
|
+
* @returns {Promise<any>}
|
|
6
|
+
*/
|
|
7
|
+
export function initialize(json: string): Promise<any>;
|
|
8
|
+
/**
|
|
9
|
+
* @param {string} public_key
|
|
10
|
+
* @param {bigint} amount
|
|
11
|
+
* @param {bigint} fee
|
|
12
|
+
* @param {boolean} force_merge
|
|
13
|
+
* @returns {Promise<WasmTransaction>}
|
|
14
|
+
*/
|
|
15
|
+
export function create_transaction(public_key: string, amount: bigint, fee: bigint, force_merge: boolean): Promise<WasmTransaction>;
|
|
16
|
+
/**
|
|
17
|
+
* @returns {Promise<string>}
|
|
18
|
+
*/
|
|
19
|
+
export function get_latest_block_hash(): Promise<string>;
|
|
20
|
+
/**
|
|
21
|
+
* @param {bigint} index
|
|
22
|
+
* @param {any} peer_config
|
|
23
|
+
* @returns {Promise<void>}
|
|
24
|
+
*/
|
|
25
|
+
export function process_new_peer(index: bigint, peer_config: any): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* @param {bigint} peer_index
|
|
28
|
+
* @returns {Promise<void>}
|
|
29
|
+
*/
|
|
30
|
+
export function process_peer_disconnection(peer_index: bigint): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* @param {Uint8Array} buffer
|
|
33
|
+
* @param {bigint} peer_index
|
|
34
|
+
* @returns {Promise<void>}
|
|
35
|
+
*/
|
|
36
|
+
export function process_msg_buffer_from_peer(buffer: Uint8Array, peer_index: bigint): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* @param {Uint8Array} buffer
|
|
39
|
+
* @param {Uint8Array} hash
|
|
40
|
+
* @param {bigint} peer_index
|
|
41
|
+
* @returns {Promise<void>}
|
|
42
|
+
*/
|
|
43
|
+
export function process_fetched_block(buffer: Uint8Array, hash: Uint8Array, peer_index: bigint): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* @param {bigint} duration_in_ms
|
|
46
|
+
* @returns {Promise<void>}
|
|
47
|
+
*/
|
|
48
|
+
export function process_timer_event(duration_in_ms: bigint): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* @param {Uint8Array} buffer
|
|
51
|
+
* @returns {string}
|
|
52
|
+
*/
|
|
53
|
+
export function hash(buffer: Uint8Array): string;
|
|
54
|
+
/**
|
|
55
|
+
* @param {Uint8Array} buffer
|
|
56
|
+
* @param {string} private_key
|
|
57
|
+
* @returns {string}
|
|
58
|
+
*/
|
|
59
|
+
export function sign_buffer(buffer: Uint8Array, private_key: string): string;
|
|
60
|
+
/**
|
|
61
|
+
* @param {Uint8Array} buffer
|
|
62
|
+
* @param {string} signature
|
|
63
|
+
* @param {string} public_key
|
|
64
|
+
* @returns {boolean}
|
|
65
|
+
*/
|
|
66
|
+
export function verify_signature(buffer: Uint8Array, signature: string, public_key: string): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* @returns {Promise<Array<any>>}
|
|
69
|
+
*/
|
|
70
|
+
export function get_peers(): Promise<Array<any>>;
|
|
71
|
+
/**
|
|
72
|
+
* @param {bigint} peer_index
|
|
73
|
+
* @returns {Promise<WasmPeer | undefined>}
|
|
74
|
+
*/
|
|
75
|
+
export function get_peer(peer_index: bigint): Promise<WasmPeer | undefined>;
|
|
76
|
+
/**
|
|
77
|
+
* @returns {Promise<string>}
|
|
78
|
+
*/
|
|
79
|
+
export function get_public_key(): Promise<string>;
|
|
80
|
+
/**
|
|
81
|
+
* @returns {Promise<string>}
|
|
82
|
+
*/
|
|
83
|
+
export function get_private_key(): Promise<string>;
|
|
84
|
+
/**
|
|
85
|
+
* @returns {Promise<Array<any>>}
|
|
86
|
+
*/
|
|
87
|
+
export function get_pending_txs(): Promise<Array<any>>;
|
|
88
|
+
/**
|
|
89
|
+
* @param {string} _ticker
|
|
90
|
+
* @returns {Promise<bigint>}
|
|
91
|
+
*/
|
|
92
|
+
export function get_balance(_ticker: string): Promise<bigint>;
|
|
93
|
+
/**
|
|
94
|
+
* @returns {string}
|
|
95
|
+
*/
|
|
96
|
+
export function generate_private_key(): string;
|
|
97
|
+
/**
|
|
98
|
+
* @param {string} private_key
|
|
99
|
+
* @returns {string}
|
|
100
|
+
*/
|
|
101
|
+
export function generate_public_key(private_key: string): string;
|
|
102
|
+
/**
|
|
103
|
+
* @param {WasmTransaction} tx
|
|
104
|
+
* @returns {Promise<void>}
|
|
105
|
+
*/
|
|
106
|
+
export function propagate_transaction(tx: WasmTransaction): Promise<void>;
|
|
107
|
+
/**
|
|
108
|
+
* @param {Uint8Array} buffer
|
|
109
|
+
* @param {number} msg_index
|
|
110
|
+
* @param {bigint} peer_index
|
|
111
|
+
* @returns {Promise<void>}
|
|
112
|
+
*/
|
|
113
|
+
export function send_api_call(buffer: Uint8Array, msg_index: number, peer_index: bigint): Promise<void>;
|
|
114
|
+
/**
|
|
115
|
+
* @param {Uint8Array} buffer
|
|
116
|
+
* @param {number} msg_index
|
|
117
|
+
* @param {bigint} peer_index
|
|
118
|
+
* @returns {Promise<void>}
|
|
119
|
+
*/
|
|
120
|
+
export function send_api_success(buffer: Uint8Array, msg_index: number, peer_index: bigint): Promise<void>;
|
|
121
|
+
/**
|
|
122
|
+
* @param {Uint8Array} buffer
|
|
123
|
+
* @param {number} msg_index
|
|
124
|
+
* @param {bigint} peer_index
|
|
125
|
+
* @returns {Promise<void>}
|
|
126
|
+
*/
|
|
127
|
+
export function send_api_error(buffer: Uint8Array, msg_index: number, peer_index: bigint): Promise<void>;
|
|
128
|
+
/**
|
|
129
|
+
* @param {bigint} peer_index
|
|
130
|
+
* @param {any} services
|
|
131
|
+
* @returns {Promise<void>}
|
|
132
|
+
*/
|
|
133
|
+
export function propagate_services(peer_index: bigint, services: any): Promise<void>;
|
|
134
|
+
/**
|
|
135
|
+
*/
|
|
136
|
+
export class SaitoWasm {
|
|
137
|
+
free(): void;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
*/
|
|
141
|
+
export class WasmBlock {
|
|
142
|
+
free(): void;
|
|
143
|
+
/**
|
|
144
|
+
*/
|
|
145
|
+
constructor();
|
|
146
|
+
/**
|
|
147
|
+
* @returns {Uint8Array}
|
|
148
|
+
*/
|
|
149
|
+
serialize(): Uint8Array;
|
|
150
|
+
/**
|
|
151
|
+
*/
|
|
152
|
+
creator: string;
|
|
153
|
+
/**
|
|
154
|
+
*/
|
|
155
|
+
readonly hash: string;
|
|
156
|
+
/**
|
|
157
|
+
*/
|
|
158
|
+
id: bigint;
|
|
159
|
+
/**
|
|
160
|
+
*/
|
|
161
|
+
previous_block_hash: string;
|
|
162
|
+
/**
|
|
163
|
+
*/
|
|
164
|
+
timestamp: bigint;
|
|
165
|
+
/**
|
|
166
|
+
*/
|
|
167
|
+
readonly transactions: Array<any>;
|
|
168
|
+
/**
|
|
169
|
+
*/
|
|
170
|
+
type: number;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
*/
|
|
174
|
+
export class WasmPeer {
|
|
175
|
+
free(): void;
|
|
176
|
+
/**
|
|
177
|
+
* @param {bigint} peer_index
|
|
178
|
+
*/
|
|
179
|
+
constructor(peer_index: bigint);
|
|
180
|
+
/**
|
|
181
|
+
* @param {string} service
|
|
182
|
+
* @returns {boolean}
|
|
183
|
+
*/
|
|
184
|
+
has_service(service: string): boolean;
|
|
185
|
+
/**
|
|
186
|
+
* @returns {boolean}
|
|
187
|
+
*/
|
|
188
|
+
is_main_peer(): boolean;
|
|
189
|
+
/**
|
|
190
|
+
*/
|
|
191
|
+
readonly key_list: Array<any>;
|
|
192
|
+
/**
|
|
193
|
+
*/
|
|
194
|
+
readonly peer_index: bigint;
|
|
195
|
+
/**
|
|
196
|
+
*/
|
|
197
|
+
readonly public_key: string;
|
|
198
|
+
/**
|
|
199
|
+
*/
|
|
200
|
+
services: any;
|
|
201
|
+
/**
|
|
202
|
+
*/
|
|
203
|
+
readonly sync_type: string;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
*/
|
|
207
|
+
export class WasmSlip {
|
|
208
|
+
free(): void;
|
|
209
|
+
/**
|
|
210
|
+
*/
|
|
211
|
+
constructor();
|
|
212
|
+
/**
|
|
213
|
+
*/
|
|
214
|
+
amount: bigint;
|
|
215
|
+
/**
|
|
216
|
+
*/
|
|
217
|
+
block_id: bigint;
|
|
218
|
+
/**
|
|
219
|
+
*/
|
|
220
|
+
public_key: string;
|
|
221
|
+
/**
|
|
222
|
+
*/
|
|
223
|
+
slip_index: number;
|
|
224
|
+
/**
|
|
225
|
+
*/
|
|
226
|
+
slip_type: number;
|
|
227
|
+
/**
|
|
228
|
+
*/
|
|
229
|
+
tx_ordinal: bigint;
|
|
230
|
+
/**
|
|
231
|
+
*/
|
|
232
|
+
utxo_key: string;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
*/
|
|
236
|
+
export class WasmTransaction {
|
|
237
|
+
free(): void;
|
|
238
|
+
/**
|
|
239
|
+
*/
|
|
240
|
+
constructor();
|
|
241
|
+
/**
|
|
242
|
+
* @param {WasmSlip} slip
|
|
243
|
+
*/
|
|
244
|
+
add_to_slip(slip: WasmSlip): void;
|
|
245
|
+
/**
|
|
246
|
+
* @param {WasmSlip} slip
|
|
247
|
+
*/
|
|
248
|
+
add_from_slip(slip: WasmSlip): void;
|
|
249
|
+
/**
|
|
250
|
+
* @param {string} key
|
|
251
|
+
* @returns {boolean}
|
|
252
|
+
*/
|
|
253
|
+
is_from(key: string): boolean;
|
|
254
|
+
/**
|
|
255
|
+
* @param {string} key
|
|
256
|
+
* @returns {boolean}
|
|
257
|
+
*/
|
|
258
|
+
is_to(key: string): boolean;
|
|
259
|
+
/**
|
|
260
|
+
* @returns {Promise<void>}
|
|
261
|
+
*/
|
|
262
|
+
sign(): Promise<void>;
|
|
263
|
+
/**
|
|
264
|
+
* @returns {Promise<void>}
|
|
265
|
+
*/
|
|
266
|
+
sign_and_encrypt(): Promise<void>;
|
|
267
|
+
/**
|
|
268
|
+
* @returns {Uint8Array}
|
|
269
|
+
*/
|
|
270
|
+
serialize(): Uint8Array;
|
|
271
|
+
/**
|
|
272
|
+
* @param {Uint8Array} buffer
|
|
273
|
+
* @returns {WasmTransaction}
|
|
274
|
+
*/
|
|
275
|
+
static deserialize(buffer: Uint8Array): WasmTransaction;
|
|
276
|
+
/**
|
|
277
|
+
*/
|
|
278
|
+
data: Uint8Array;
|
|
279
|
+
/**
|
|
280
|
+
*/
|
|
281
|
+
readonly from: Array<any>;
|
|
282
|
+
/**
|
|
283
|
+
*/
|
|
284
|
+
signature: string;
|
|
285
|
+
/**
|
|
286
|
+
*/
|
|
287
|
+
timestamp: bigint;
|
|
288
|
+
/**
|
|
289
|
+
*/
|
|
290
|
+
readonly to: Array<any>;
|
|
291
|
+
/**
|
|
292
|
+
*/
|
|
293
|
+
readonly total_fees: bigint;
|
|
294
|
+
/**
|
|
295
|
+
*/
|
|
296
|
+
txs_replacements: number;
|
|
297
|
+
/**
|
|
298
|
+
*/
|
|
299
|
+
type: number;
|
|
300
|
+
}
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
3
|
+
* This devtool is neither made for production nor for readable output files.
|
|
4
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
5
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
6
|
+
* or disable the default devtool with "devtool: false".
|
|
7
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
8
|
+
*/
|
|
9
|
+
/******/ (() => { // webpackBootstrap
|
|
10
|
+
/******/ var __webpack_modules__ = ({
|
|
11
|
+
|
|
12
|
+
/***/ "./node_modules/babel-regenerator-runtime/runtime.js":
|
|
13
|
+
/*!***********************************************************!*\
|
|
14
|
+
!*** ./node_modules/babel-regenerator-runtime/runtime.js ***!
|
|
15
|
+
\***********************************************************/
|
|
16
|
+
/***/ (function(module) {
|
|
17
|
+
|
|
18
|
+
eval("/**\n * Copyright (c) 2014, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * https://raw.github.com/facebook/regenerator/master/LICENSE file. An\n * additional grant of patent rights can be found in the PATENTS file in\n * the same directory.\n */\n\n!(function(global) {\n \"use strict\";\n\n var hasOwn = Object.prototype.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var iteratorSymbol =\n typeof Symbol === \"function\" && Symbol.iterator || \"@@iterator\";\n\n var inModule = \"object\" === \"object\";\n var runtime = global.regeneratorRuntime;\n if (runtime) {\n if (inModule) {\n // If regeneratorRuntime is defined globally and we're in a module,\n // make the exports object identical to regeneratorRuntime.\n module.exports = runtime;\n }\n // Don't bother evaluating the rest of this file if the runtime was\n // already defined globally.\n return;\n }\n\n // Define the runtime globally (as expected by generated code) as either\n // module.exports (if we're in a module) or a new, empty object.\n runtime = global.regeneratorRuntime = inModule ? module.exports : {};\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided, then outerFn.prototype instanceof Generator.\n var generator = Object.create((outerFn || Generator).prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n runtime.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype;\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n runtime.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n runtime.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `value instanceof AwaitArgument` to determine if the yielded value is\n // meant to be awaited. Some may consider the name of this method too\n // cutesy, but they are curmudgeons.\n runtime.awrap = function(arg) {\n return new AwaitArgument(arg);\n };\n\n function AwaitArgument(arg) {\n this.arg = arg;\n }\n\n function AsyncIterator(generator) {\n // This invoke function is written in a style that assumes some\n // calling function (or Promise) will handle exceptions.\n function invoke(method, arg) {\n var result = generator[method](arg);\n var value = result.value;\n return value instanceof AwaitArgument\n ? Promise.resolve(value.arg).then(invokeNext, invokeThrow)\n : Promise.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration. If the Promise is rejected, however, the\n // result for this iteration will be rejected with the same\n // reason. Note that rejections of yielded Promises are not\n // thrown back into the generator function, as is the case\n // when an awaited Promise is rejected. This difference in\n // behavior between yield and await is important, because it\n // allows the consumer to decide what to do with the yielded\n // rejection (swallow it and continue, manually .throw it back\n // into the generator, abandon iteration, whatever). With\n // await, by contrast, there is no opportunity to examine the\n // rejection reason outside the generator function, so the\n // only option is to throw it from the await expression, and\n // let the generator function handle the exception.\n result.value = unwrapped;\n return result;\n });\n }\n\n if (typeof process === \"object\" && process.domain) {\n invoke = process.domain.bind(invoke);\n }\n\n var invokeNext = invoke.bind(generator, \"next\");\n var invokeThrow = invoke.bind(generator, \"throw\");\n var invokeReturn = invoke.bind(generator, \"return\");\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return invoke(method, arg);\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : new Promise(function (resolve) {\n resolve(callInvokeWithMethodAndArg());\n });\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n runtime.async = function(innerFn, outerFn, self, tryLocsList) {\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList)\n );\n\n return runtime.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n if (method === \"return\" ||\n (method === \"throw\" && delegate.iterator[method] === undefined)) {\n // A return or throw (when the delegate iterator has no throw\n // method) always terminates the yield* loop.\n context.delegate = null;\n\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n var returnMethod = delegate.iterator[\"return\"];\n if (returnMethod) {\n var record = tryCatch(returnMethod, delegate.iterator, arg);\n if (record.type === \"throw\") {\n // If the return method threw an exception, let that\n // exception prevail over the original return or throw.\n method = \"throw\";\n arg = record.arg;\n continue;\n }\n }\n\n if (method === \"return\") {\n // Continue with the outer return, now that the delegate\n // iterator has been terminated.\n continue;\n }\n }\n\n var record = tryCatch(\n delegate.iterator[method],\n delegate.iterator,\n arg\n );\n\n if (record.type === \"throw\") {\n context.delegate = null;\n\n // Like returning generator.throw(uncaught), but without the\n // overhead of an extra function call.\n method = \"throw\";\n arg = record.arg;\n continue;\n }\n\n // Delegate generator ran and handled its own exceptions so\n // regardless of what the method was, we continue as if it is\n // \"next\" with an undefined arg.\n method = \"next\";\n arg = undefined;\n\n var info = record.arg;\n if (info.done) {\n context[delegate.resultName] = info.value;\n context.next = delegate.nextLoc;\n } else {\n state = GenStateSuspendedYield;\n return info;\n }\n\n context.delegate = null;\n }\n\n if (method === \"next\") {\n context._sent = arg;\n\n if (state === GenStateSuspendedYield) {\n context.sent = arg;\n } else {\n context.sent = undefined;\n }\n } else if (method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw arg;\n }\n\n if (context.dispatchException(arg)) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n method = \"next\";\n arg = undefined;\n }\n\n } else if (method === \"return\") {\n context.abrupt(\"return\", arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n var info = {\n value: record.arg,\n done: context.done\n };\n\n if (record.arg === ContinueSentinel) {\n if (context.delegate && method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n arg = undefined;\n }\n } else {\n return info;\n }\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(arg) call above.\n method = \"throw\";\n arg = record.arg;\n }\n }\n };\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n runtime.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n runtime.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n this.sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n return !!caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.next = finallyEntry.finallyLoc;\n } else {\n this.complete(record);\n }\n\n return ContinueSentinel;\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = record.arg;\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n return ContinueSentinel;\n }\n };\n})(\n // Among the various tricks for obtaining a reference to the global\n // object, this seems to be the most reliable technique that does not\n // use indirect eval (which violates Content Security Policy).\n typeof global === \"object\" ? global :\n typeof window === \"object\" ? window :\n typeof self === \"object\" ? self : this\n);\n\n\n//# sourceURL=webpack://saito-wasm/./node_modules/babel-regenerator-runtime/runtime.js?");
|
|
19
|
+
|
|
20
|
+
/***/ }),
|
|
21
|
+
|
|
22
|
+
/***/ "./index.node.ts":
|
|
23
|
+
/*!***********************!*\
|
|
24
|
+
!*** ./index.node.ts ***!
|
|
25
|
+
\***********************/
|
|
26
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
27
|
+
|
|
28
|
+
"use strict";
|
|
29
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Promise.all(/*! import() */[__webpack_require__.e(\"vendors-node_modules_text-encoding_index_js\"), __webpack_require__.e(\"pkg_node_index_js\")]).then(__webpack_require__.bind(__webpack_require__, /*! ./pkg/node */ \"./pkg/node/index.js\")).then(s => {\n return s;\n}).catch(error => {\n console.error(error);\n}));\n\n\n//# sourceURL=webpack://saito-wasm/./index.node.ts?");
|
|
30
|
+
|
|
31
|
+
/***/ })
|
|
32
|
+
|
|
33
|
+
/******/ });
|
|
34
|
+
/************************************************************************/
|
|
35
|
+
/******/ // The module cache
|
|
36
|
+
/******/ var __webpack_module_cache__ = {};
|
|
37
|
+
/******/
|
|
38
|
+
/******/ // The require function
|
|
39
|
+
/******/ function __webpack_require__(moduleId) {
|
|
40
|
+
/******/ // Check if module is in cache
|
|
41
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
42
|
+
/******/ if (cachedModule !== undefined) {
|
|
43
|
+
/******/ return cachedModule.exports;
|
|
44
|
+
/******/ }
|
|
45
|
+
/******/ // Create a new module (and put it into the cache)
|
|
46
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
47
|
+
/******/ id: moduleId,
|
|
48
|
+
/******/ loaded: false,
|
|
49
|
+
/******/ exports: {}
|
|
50
|
+
/******/ };
|
|
51
|
+
/******/
|
|
52
|
+
/******/ // Execute the module function
|
|
53
|
+
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
54
|
+
/******/
|
|
55
|
+
/******/ // Flag the module as loaded
|
|
56
|
+
/******/ module.loaded = true;
|
|
57
|
+
/******/
|
|
58
|
+
/******/ // Return the exports of the module
|
|
59
|
+
/******/ return module.exports;
|
|
60
|
+
/******/ }
|
|
61
|
+
/******/
|
|
62
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
63
|
+
/******/ __webpack_require__.m = __webpack_modules__;
|
|
64
|
+
/******/
|
|
65
|
+
/************************************************************************/
|
|
66
|
+
/******/ /* webpack/runtime/async module */
|
|
67
|
+
/******/ (() => {
|
|
68
|
+
/******/ var webpackQueues = typeof Symbol === "function" ? Symbol("webpack queues") : "__webpack_queues__";
|
|
69
|
+
/******/ var webpackExports = typeof Symbol === "function" ? Symbol("webpack exports") : "__webpack_exports__";
|
|
70
|
+
/******/ var webpackError = typeof Symbol === "function" ? Symbol("webpack error") : "__webpack_error__";
|
|
71
|
+
/******/ var resolveQueue = (queue) => {
|
|
72
|
+
/******/ if(queue && !queue.d) {
|
|
73
|
+
/******/ queue.d = 1;
|
|
74
|
+
/******/ queue.forEach((fn) => (fn.r--));
|
|
75
|
+
/******/ queue.forEach((fn) => (fn.r-- ? fn.r++ : fn()));
|
|
76
|
+
/******/ }
|
|
77
|
+
/******/ }
|
|
78
|
+
/******/ var wrapDeps = (deps) => (deps.map((dep) => {
|
|
79
|
+
/******/ if(dep !== null && typeof dep === "object") {
|
|
80
|
+
/******/ if(dep[webpackQueues]) return dep;
|
|
81
|
+
/******/ if(dep.then) {
|
|
82
|
+
/******/ var queue = [];
|
|
83
|
+
/******/ queue.d = 0;
|
|
84
|
+
/******/ dep.then((r) => {
|
|
85
|
+
/******/ obj[webpackExports] = r;
|
|
86
|
+
/******/ resolveQueue(queue);
|
|
87
|
+
/******/ }, (e) => {
|
|
88
|
+
/******/ obj[webpackError] = e;
|
|
89
|
+
/******/ resolveQueue(queue);
|
|
90
|
+
/******/ });
|
|
91
|
+
/******/ var obj = {};
|
|
92
|
+
/******/ obj[webpackQueues] = (fn) => (fn(queue));
|
|
93
|
+
/******/ return obj;
|
|
94
|
+
/******/ }
|
|
95
|
+
/******/ }
|
|
96
|
+
/******/ var ret = {};
|
|
97
|
+
/******/ ret[webpackQueues] = x => {};
|
|
98
|
+
/******/ ret[webpackExports] = dep;
|
|
99
|
+
/******/ return ret;
|
|
100
|
+
/******/ }));
|
|
101
|
+
/******/ __webpack_require__.a = (module, body, hasAwait) => {
|
|
102
|
+
/******/ var queue;
|
|
103
|
+
/******/ hasAwait && ((queue = []).d = 1);
|
|
104
|
+
/******/ var depQueues = new Set();
|
|
105
|
+
/******/ var exports = module.exports;
|
|
106
|
+
/******/ var currentDeps;
|
|
107
|
+
/******/ var outerResolve;
|
|
108
|
+
/******/ var reject;
|
|
109
|
+
/******/ var promise = new Promise((resolve, rej) => {
|
|
110
|
+
/******/ reject = rej;
|
|
111
|
+
/******/ outerResolve = resolve;
|
|
112
|
+
/******/ });
|
|
113
|
+
/******/ promise[webpackExports] = exports;
|
|
114
|
+
/******/ promise[webpackQueues] = (fn) => (queue && fn(queue), depQueues.forEach(fn), promise["catch"](x => {}));
|
|
115
|
+
/******/ module.exports = promise;
|
|
116
|
+
/******/ body((deps) => {
|
|
117
|
+
/******/ currentDeps = wrapDeps(deps);
|
|
118
|
+
/******/ var fn;
|
|
119
|
+
/******/ var getResult = () => (currentDeps.map((d) => {
|
|
120
|
+
/******/ if(d[webpackError]) throw d[webpackError];
|
|
121
|
+
/******/ return d[webpackExports];
|
|
122
|
+
/******/ }))
|
|
123
|
+
/******/ var promise = new Promise((resolve) => {
|
|
124
|
+
/******/ fn = () => (resolve(getResult));
|
|
125
|
+
/******/ fn.r = 0;
|
|
126
|
+
/******/ var fnQueue = (q) => (q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn))));
|
|
127
|
+
/******/ currentDeps.map((dep) => (dep[webpackQueues](fnQueue)));
|
|
128
|
+
/******/ });
|
|
129
|
+
/******/ return fn.r ? promise : getResult();
|
|
130
|
+
/******/ }, (err) => ((err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue)));
|
|
131
|
+
/******/ queue && (queue.d = 0);
|
|
132
|
+
/******/ };
|
|
133
|
+
/******/ })();
|
|
134
|
+
/******/
|
|
135
|
+
/******/ /* webpack/runtime/define property getters */
|
|
136
|
+
/******/ (() => {
|
|
137
|
+
/******/ // define getter functions for harmony exports
|
|
138
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
139
|
+
/******/ for(var key in definition) {
|
|
140
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
141
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
142
|
+
/******/ }
|
|
143
|
+
/******/ }
|
|
144
|
+
/******/ };
|
|
145
|
+
/******/ })();
|
|
146
|
+
/******/
|
|
147
|
+
/******/ /* webpack/runtime/ensure chunk */
|
|
148
|
+
/******/ (() => {
|
|
149
|
+
/******/ __webpack_require__.f = {};
|
|
150
|
+
/******/ // This file contains only the entry chunk.
|
|
151
|
+
/******/ // The chunk loading function for additional chunks
|
|
152
|
+
/******/ __webpack_require__.e = (chunkId) => {
|
|
153
|
+
/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {
|
|
154
|
+
/******/ __webpack_require__.f[key](chunkId, promises);
|
|
155
|
+
/******/ return promises;
|
|
156
|
+
/******/ }, []));
|
|
157
|
+
/******/ };
|
|
158
|
+
/******/ })();
|
|
159
|
+
/******/
|
|
160
|
+
/******/ /* webpack/runtime/get javascript chunk filename */
|
|
161
|
+
/******/ (() => {
|
|
162
|
+
/******/ // This function allow to reference async chunks
|
|
163
|
+
/******/ __webpack_require__.u = (chunkId) => {
|
|
164
|
+
/******/ // return url for filenames based on template
|
|
165
|
+
/******/ return "" + chunkId + ".index.js";
|
|
166
|
+
/******/ };
|
|
167
|
+
/******/ })();
|
|
168
|
+
/******/
|
|
169
|
+
/******/ /* webpack/runtime/harmony module decorator */
|
|
170
|
+
/******/ (() => {
|
|
171
|
+
/******/ __webpack_require__.hmd = (module) => {
|
|
172
|
+
/******/ module = Object.create(module);
|
|
173
|
+
/******/ if (!module.children) module.children = [];
|
|
174
|
+
/******/ Object.defineProperty(module, 'exports', {
|
|
175
|
+
/******/ enumerable: true,
|
|
176
|
+
/******/ set: () => {
|
|
177
|
+
/******/ throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);
|
|
178
|
+
/******/ }
|
|
179
|
+
/******/ });
|
|
180
|
+
/******/ return module;
|
|
181
|
+
/******/ };
|
|
182
|
+
/******/ })();
|
|
183
|
+
/******/
|
|
184
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
185
|
+
/******/ (() => {
|
|
186
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
187
|
+
/******/ })();
|
|
188
|
+
/******/
|
|
189
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
190
|
+
/******/ (() => {
|
|
191
|
+
/******/ // define __esModule on exports
|
|
192
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
193
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
194
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
195
|
+
/******/ }
|
|
196
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
197
|
+
/******/ };
|
|
198
|
+
/******/ })();
|
|
199
|
+
/******/
|
|
200
|
+
/******/ /* webpack/runtime/wasm loading */
|
|
201
|
+
/******/ (() => {
|
|
202
|
+
/******/ __webpack_require__.v = (exports, wasmModuleId, wasmModuleHash, importsObj) => {
|
|
203
|
+
/******/ var req = new Promise(function (resolve, reject) {
|
|
204
|
+
/******/ try {
|
|
205
|
+
/******/ var { readFile } = require('fs');
|
|
206
|
+
/******/ var { join } = require('path');
|
|
207
|
+
/******/
|
|
208
|
+
/******/ readFile(join(__dirname, "" + wasmModuleHash + ".module.wasm"), function(err, buffer){
|
|
209
|
+
/******/ if (err) return reject(err);
|
|
210
|
+
/******/
|
|
211
|
+
/******/ // Fake fetch response
|
|
212
|
+
/******/ resolve({
|
|
213
|
+
/******/ arrayBuffer() { return buffer; }
|
|
214
|
+
/******/ });
|
|
215
|
+
/******/ });
|
|
216
|
+
/******/ } catch (err) { reject(err); }
|
|
217
|
+
/******/ });
|
|
218
|
+
/******/ // no support for streaming compilation
|
|
219
|
+
/******/ return req
|
|
220
|
+
/******/ .then((x) => (x.arrayBuffer()))
|
|
221
|
+
/******/ .then((bytes) => (WebAssembly.instantiate(bytes, importsObj)))
|
|
222
|
+
/******/ .then((res) => (Object.assign(exports, res.instance.exports)));
|
|
223
|
+
/******/ };
|
|
224
|
+
/******/ })();
|
|
225
|
+
/******/
|
|
226
|
+
/******/ /* webpack/runtime/publicPath */
|
|
227
|
+
/******/ (() => {
|
|
228
|
+
/******/ __webpack_require__.p = "";
|
|
229
|
+
/******/ })();
|
|
230
|
+
/******/
|
|
231
|
+
/******/ /* webpack/runtime/require chunk loading */
|
|
232
|
+
/******/ (() => {
|
|
233
|
+
/******/ // no baseURI
|
|
234
|
+
/******/
|
|
235
|
+
/******/ // object to store loaded chunks
|
|
236
|
+
/******/ // "1" means "loaded", otherwise not loaded yet
|
|
237
|
+
/******/ var installedChunks = {
|
|
238
|
+
/******/ "main": 1
|
|
239
|
+
/******/ };
|
|
240
|
+
/******/
|
|
241
|
+
/******/ // no on chunks loaded
|
|
242
|
+
/******/
|
|
243
|
+
/******/ var installChunk = (chunk) => {
|
|
244
|
+
/******/ var moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime;
|
|
245
|
+
/******/ for(var moduleId in moreModules) {
|
|
246
|
+
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
|
247
|
+
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
|
248
|
+
/******/ }
|
|
249
|
+
/******/ }
|
|
250
|
+
/******/ if(runtime) runtime(__webpack_require__);
|
|
251
|
+
/******/ for(var i = 0; i < chunkIds.length; i++)
|
|
252
|
+
/******/ installedChunks[chunkIds[i]] = 1;
|
|
253
|
+
/******/
|
|
254
|
+
/******/ };
|
|
255
|
+
/******/
|
|
256
|
+
/******/ // require() chunk loading for javascript
|
|
257
|
+
/******/ __webpack_require__.f.require = (chunkId, promises) => {
|
|
258
|
+
/******/ // "1" is the signal for "already loaded"
|
|
259
|
+
/******/ if(!installedChunks[chunkId]) {
|
|
260
|
+
/******/ if(true) { // all chunks have JS
|
|
261
|
+
/******/ installChunk(require("./" + __webpack_require__.u(chunkId)));
|
|
262
|
+
/******/ } else installedChunks[chunkId] = 1;
|
|
263
|
+
/******/ }
|
|
264
|
+
/******/ };
|
|
265
|
+
/******/
|
|
266
|
+
/******/ // no external install chunk
|
|
267
|
+
/******/
|
|
268
|
+
/******/ // no HMR
|
|
269
|
+
/******/
|
|
270
|
+
/******/ // no HMR manifest
|
|
271
|
+
/******/ })();
|
|
272
|
+
/******/
|
|
273
|
+
/************************************************************************/
|
|
274
|
+
/******/
|
|
275
|
+
/******/ // startup
|
|
276
|
+
/******/ // Load entry module and return exports
|
|
277
|
+
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
278
|
+
/******/ __webpack_require__("./node_modules/babel-regenerator-runtime/runtime.js");
|
|
279
|
+
/******/ var __webpack_exports__ = __webpack_require__("./index.node.ts");
|
|
280
|
+
/******/ module.exports = __webpack_exports__;
|
|
281
|
+
/******/
|
|
282
|
+
/******/ })()
|
|
283
|
+
;
|