@leofcoin/chain 1.3.7 → 1.3.8
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/dist/browser/workers/machine-worker.js +24 -549
- package/dist/chain.js +20 -16
- package/dist/module/chain.js +20 -16
- package/dist/module/workers/machine-worker.js +24 -10
- package/dist/workers/machine-worker.js +1 -1
- package/package.json +1 -1
- package/src/machine.js +20 -16
|
@@ -10114,543 +10114,6 @@ exports.finished = __webpack_require__(186);
|
|
|
10114
10114
|
exports.pipeline = __webpack_require__(619);
|
|
10115
10115
|
|
|
10116
10116
|
|
|
10117
|
-
/***/ }),
|
|
10118
|
-
|
|
10119
|
-
/***/ 470:
|
|
10120
|
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
10121
|
-
|
|
10122
|
-
/* provided dependency */ var process = __webpack_require__(155);
|
|
10123
|
-
// 'path' module extracted from Node.js v8.11.1 (only the posix part)
|
|
10124
|
-
// transplited with Babel
|
|
10125
|
-
|
|
10126
|
-
// Copyright Joyent, Inc. and other Node contributors.
|
|
10127
|
-
//
|
|
10128
|
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
10129
|
-
// copy of this software and associated documentation files (the
|
|
10130
|
-
// "Software"), to deal in the Software without restriction, including
|
|
10131
|
-
// without limitation the rights to use, copy, modify, merge, publish,
|
|
10132
|
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
10133
|
-
// persons to whom the Software is furnished to do so, subject to the
|
|
10134
|
-
// following conditions:
|
|
10135
|
-
//
|
|
10136
|
-
// The above copyright notice and this permission notice shall be included
|
|
10137
|
-
// in all copies or substantial portions of the Software.
|
|
10138
|
-
//
|
|
10139
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
10140
|
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
10141
|
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
10142
|
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
10143
|
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
10144
|
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
10145
|
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
10146
|
-
|
|
10147
|
-
|
|
10148
|
-
|
|
10149
|
-
function assertPath(path) {
|
|
10150
|
-
if (typeof path !== 'string') {
|
|
10151
|
-
throw new TypeError('Path must be a string. Received ' + JSON.stringify(path));
|
|
10152
|
-
}
|
|
10153
|
-
}
|
|
10154
|
-
|
|
10155
|
-
// Resolves . and .. elements in a path with directory names
|
|
10156
|
-
function normalizeStringPosix(path, allowAboveRoot) {
|
|
10157
|
-
var res = '';
|
|
10158
|
-
var lastSegmentLength = 0;
|
|
10159
|
-
var lastSlash = -1;
|
|
10160
|
-
var dots = 0;
|
|
10161
|
-
var code;
|
|
10162
|
-
for (var i = 0; i <= path.length; ++i) {
|
|
10163
|
-
if (i < path.length)
|
|
10164
|
-
code = path.charCodeAt(i);
|
|
10165
|
-
else if (code === 47 /*/*/)
|
|
10166
|
-
break;
|
|
10167
|
-
else
|
|
10168
|
-
code = 47 /*/*/;
|
|
10169
|
-
if (code === 47 /*/*/) {
|
|
10170
|
-
if (lastSlash === i - 1 || dots === 1) {
|
|
10171
|
-
// NOOP
|
|
10172
|
-
} else if (lastSlash !== i - 1 && dots === 2) {
|
|
10173
|
-
if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 /*.*/ || res.charCodeAt(res.length - 2) !== 46 /*.*/) {
|
|
10174
|
-
if (res.length > 2) {
|
|
10175
|
-
var lastSlashIndex = res.lastIndexOf('/');
|
|
10176
|
-
if (lastSlashIndex !== res.length - 1) {
|
|
10177
|
-
if (lastSlashIndex === -1) {
|
|
10178
|
-
res = '';
|
|
10179
|
-
lastSegmentLength = 0;
|
|
10180
|
-
} else {
|
|
10181
|
-
res = res.slice(0, lastSlashIndex);
|
|
10182
|
-
lastSegmentLength = res.length - 1 - res.lastIndexOf('/');
|
|
10183
|
-
}
|
|
10184
|
-
lastSlash = i;
|
|
10185
|
-
dots = 0;
|
|
10186
|
-
continue;
|
|
10187
|
-
}
|
|
10188
|
-
} else if (res.length === 2 || res.length === 1) {
|
|
10189
|
-
res = '';
|
|
10190
|
-
lastSegmentLength = 0;
|
|
10191
|
-
lastSlash = i;
|
|
10192
|
-
dots = 0;
|
|
10193
|
-
continue;
|
|
10194
|
-
}
|
|
10195
|
-
}
|
|
10196
|
-
if (allowAboveRoot) {
|
|
10197
|
-
if (res.length > 0)
|
|
10198
|
-
res += '/..';
|
|
10199
|
-
else
|
|
10200
|
-
res = '..';
|
|
10201
|
-
lastSegmentLength = 2;
|
|
10202
|
-
}
|
|
10203
|
-
} else {
|
|
10204
|
-
if (res.length > 0)
|
|
10205
|
-
res += '/' + path.slice(lastSlash + 1, i);
|
|
10206
|
-
else
|
|
10207
|
-
res = path.slice(lastSlash + 1, i);
|
|
10208
|
-
lastSegmentLength = i - lastSlash - 1;
|
|
10209
|
-
}
|
|
10210
|
-
lastSlash = i;
|
|
10211
|
-
dots = 0;
|
|
10212
|
-
} else if (code === 46 /*.*/ && dots !== -1) {
|
|
10213
|
-
++dots;
|
|
10214
|
-
} else {
|
|
10215
|
-
dots = -1;
|
|
10216
|
-
}
|
|
10217
|
-
}
|
|
10218
|
-
return res;
|
|
10219
|
-
}
|
|
10220
|
-
|
|
10221
|
-
function _format(sep, pathObject) {
|
|
10222
|
-
var dir = pathObject.dir || pathObject.root;
|
|
10223
|
-
var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || '');
|
|
10224
|
-
if (!dir) {
|
|
10225
|
-
return base;
|
|
10226
|
-
}
|
|
10227
|
-
if (dir === pathObject.root) {
|
|
10228
|
-
return dir + base;
|
|
10229
|
-
}
|
|
10230
|
-
return dir + sep + base;
|
|
10231
|
-
}
|
|
10232
|
-
|
|
10233
|
-
var posix = {
|
|
10234
|
-
// path.resolve([from ...], to)
|
|
10235
|
-
resolve: function resolve() {
|
|
10236
|
-
var resolvedPath = '';
|
|
10237
|
-
var resolvedAbsolute = false;
|
|
10238
|
-
var cwd;
|
|
10239
|
-
|
|
10240
|
-
for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
10241
|
-
var path;
|
|
10242
|
-
if (i >= 0)
|
|
10243
|
-
path = arguments[i];
|
|
10244
|
-
else {
|
|
10245
|
-
if (cwd === undefined)
|
|
10246
|
-
cwd = process.cwd();
|
|
10247
|
-
path = cwd;
|
|
10248
|
-
}
|
|
10249
|
-
|
|
10250
|
-
assertPath(path);
|
|
10251
|
-
|
|
10252
|
-
// Skip empty entries
|
|
10253
|
-
if (path.length === 0) {
|
|
10254
|
-
continue;
|
|
10255
|
-
}
|
|
10256
|
-
|
|
10257
|
-
resolvedPath = path + '/' + resolvedPath;
|
|
10258
|
-
resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/;
|
|
10259
|
-
}
|
|
10260
|
-
|
|
10261
|
-
// At this point the path should be resolved to a full absolute path, but
|
|
10262
|
-
// handle relative paths to be safe (might happen when process.cwd() fails)
|
|
10263
|
-
|
|
10264
|
-
// Normalize the path
|
|
10265
|
-
resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);
|
|
10266
|
-
|
|
10267
|
-
if (resolvedAbsolute) {
|
|
10268
|
-
if (resolvedPath.length > 0)
|
|
10269
|
-
return '/' + resolvedPath;
|
|
10270
|
-
else
|
|
10271
|
-
return '/';
|
|
10272
|
-
} else if (resolvedPath.length > 0) {
|
|
10273
|
-
return resolvedPath;
|
|
10274
|
-
} else {
|
|
10275
|
-
return '.';
|
|
10276
|
-
}
|
|
10277
|
-
},
|
|
10278
|
-
|
|
10279
|
-
normalize: function normalize(path) {
|
|
10280
|
-
assertPath(path);
|
|
10281
|
-
|
|
10282
|
-
if (path.length === 0) return '.';
|
|
10283
|
-
|
|
10284
|
-
var isAbsolute = path.charCodeAt(0) === 47 /*/*/;
|
|
10285
|
-
var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/;
|
|
10286
|
-
|
|
10287
|
-
// Normalize the path
|
|
10288
|
-
path = normalizeStringPosix(path, !isAbsolute);
|
|
10289
|
-
|
|
10290
|
-
if (path.length === 0 && !isAbsolute) path = '.';
|
|
10291
|
-
if (path.length > 0 && trailingSeparator) path += '/';
|
|
10292
|
-
|
|
10293
|
-
if (isAbsolute) return '/' + path;
|
|
10294
|
-
return path;
|
|
10295
|
-
},
|
|
10296
|
-
|
|
10297
|
-
isAbsolute: function isAbsolute(path) {
|
|
10298
|
-
assertPath(path);
|
|
10299
|
-
return path.length > 0 && path.charCodeAt(0) === 47 /*/*/;
|
|
10300
|
-
},
|
|
10301
|
-
|
|
10302
|
-
join: function join() {
|
|
10303
|
-
if (arguments.length === 0)
|
|
10304
|
-
return '.';
|
|
10305
|
-
var joined;
|
|
10306
|
-
for (var i = 0; i < arguments.length; ++i) {
|
|
10307
|
-
var arg = arguments[i];
|
|
10308
|
-
assertPath(arg);
|
|
10309
|
-
if (arg.length > 0) {
|
|
10310
|
-
if (joined === undefined)
|
|
10311
|
-
joined = arg;
|
|
10312
|
-
else
|
|
10313
|
-
joined += '/' + arg;
|
|
10314
|
-
}
|
|
10315
|
-
}
|
|
10316
|
-
if (joined === undefined)
|
|
10317
|
-
return '.';
|
|
10318
|
-
return posix.normalize(joined);
|
|
10319
|
-
},
|
|
10320
|
-
|
|
10321
|
-
relative: function relative(from, to) {
|
|
10322
|
-
assertPath(from);
|
|
10323
|
-
assertPath(to);
|
|
10324
|
-
|
|
10325
|
-
if (from === to) return '';
|
|
10326
|
-
|
|
10327
|
-
from = posix.resolve(from);
|
|
10328
|
-
to = posix.resolve(to);
|
|
10329
|
-
|
|
10330
|
-
if (from === to) return '';
|
|
10331
|
-
|
|
10332
|
-
// Trim any leading backslashes
|
|
10333
|
-
var fromStart = 1;
|
|
10334
|
-
for (; fromStart < from.length; ++fromStart) {
|
|
10335
|
-
if (from.charCodeAt(fromStart) !== 47 /*/*/)
|
|
10336
|
-
break;
|
|
10337
|
-
}
|
|
10338
|
-
var fromEnd = from.length;
|
|
10339
|
-
var fromLen = fromEnd - fromStart;
|
|
10340
|
-
|
|
10341
|
-
// Trim any leading backslashes
|
|
10342
|
-
var toStart = 1;
|
|
10343
|
-
for (; toStart < to.length; ++toStart) {
|
|
10344
|
-
if (to.charCodeAt(toStart) !== 47 /*/*/)
|
|
10345
|
-
break;
|
|
10346
|
-
}
|
|
10347
|
-
var toEnd = to.length;
|
|
10348
|
-
var toLen = toEnd - toStart;
|
|
10349
|
-
|
|
10350
|
-
// Compare paths to find the longest common path from root
|
|
10351
|
-
var length = fromLen < toLen ? fromLen : toLen;
|
|
10352
|
-
var lastCommonSep = -1;
|
|
10353
|
-
var i = 0;
|
|
10354
|
-
for (; i <= length; ++i) {
|
|
10355
|
-
if (i === length) {
|
|
10356
|
-
if (toLen > length) {
|
|
10357
|
-
if (to.charCodeAt(toStart + i) === 47 /*/*/) {
|
|
10358
|
-
// We get here if `from` is the exact base path for `to`.
|
|
10359
|
-
// For example: from='/foo/bar'; to='/foo/bar/baz'
|
|
10360
|
-
return to.slice(toStart + i + 1);
|
|
10361
|
-
} else if (i === 0) {
|
|
10362
|
-
// We get here if `from` is the root
|
|
10363
|
-
// For example: from='/'; to='/foo'
|
|
10364
|
-
return to.slice(toStart + i);
|
|
10365
|
-
}
|
|
10366
|
-
} else if (fromLen > length) {
|
|
10367
|
-
if (from.charCodeAt(fromStart + i) === 47 /*/*/) {
|
|
10368
|
-
// We get here if `to` is the exact base path for `from`.
|
|
10369
|
-
// For example: from='/foo/bar/baz'; to='/foo/bar'
|
|
10370
|
-
lastCommonSep = i;
|
|
10371
|
-
} else if (i === 0) {
|
|
10372
|
-
// We get here if `to` is the root.
|
|
10373
|
-
// For example: from='/foo'; to='/'
|
|
10374
|
-
lastCommonSep = 0;
|
|
10375
|
-
}
|
|
10376
|
-
}
|
|
10377
|
-
break;
|
|
10378
|
-
}
|
|
10379
|
-
var fromCode = from.charCodeAt(fromStart + i);
|
|
10380
|
-
var toCode = to.charCodeAt(toStart + i);
|
|
10381
|
-
if (fromCode !== toCode)
|
|
10382
|
-
break;
|
|
10383
|
-
else if (fromCode === 47 /*/*/)
|
|
10384
|
-
lastCommonSep = i;
|
|
10385
|
-
}
|
|
10386
|
-
|
|
10387
|
-
var out = '';
|
|
10388
|
-
// Generate the relative path based on the path difference between `to`
|
|
10389
|
-
// and `from`
|
|
10390
|
-
for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
|
|
10391
|
-
if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) {
|
|
10392
|
-
if (out.length === 0)
|
|
10393
|
-
out += '..';
|
|
10394
|
-
else
|
|
10395
|
-
out += '/..';
|
|
10396
|
-
}
|
|
10397
|
-
}
|
|
10398
|
-
|
|
10399
|
-
// Lastly, append the rest of the destination (`to`) path that comes after
|
|
10400
|
-
// the common path parts
|
|
10401
|
-
if (out.length > 0)
|
|
10402
|
-
return out + to.slice(toStart + lastCommonSep);
|
|
10403
|
-
else {
|
|
10404
|
-
toStart += lastCommonSep;
|
|
10405
|
-
if (to.charCodeAt(toStart) === 47 /*/*/)
|
|
10406
|
-
++toStart;
|
|
10407
|
-
return to.slice(toStart);
|
|
10408
|
-
}
|
|
10409
|
-
},
|
|
10410
|
-
|
|
10411
|
-
_makeLong: function _makeLong(path) {
|
|
10412
|
-
return path;
|
|
10413
|
-
},
|
|
10414
|
-
|
|
10415
|
-
dirname: function dirname(path) {
|
|
10416
|
-
assertPath(path);
|
|
10417
|
-
if (path.length === 0) return '.';
|
|
10418
|
-
var code = path.charCodeAt(0);
|
|
10419
|
-
var hasRoot = code === 47 /*/*/;
|
|
10420
|
-
var end = -1;
|
|
10421
|
-
var matchedSlash = true;
|
|
10422
|
-
for (var i = path.length - 1; i >= 1; --i) {
|
|
10423
|
-
code = path.charCodeAt(i);
|
|
10424
|
-
if (code === 47 /*/*/) {
|
|
10425
|
-
if (!matchedSlash) {
|
|
10426
|
-
end = i;
|
|
10427
|
-
break;
|
|
10428
|
-
}
|
|
10429
|
-
} else {
|
|
10430
|
-
// We saw the first non-path separator
|
|
10431
|
-
matchedSlash = false;
|
|
10432
|
-
}
|
|
10433
|
-
}
|
|
10434
|
-
|
|
10435
|
-
if (end === -1) return hasRoot ? '/' : '.';
|
|
10436
|
-
if (hasRoot && end === 1) return '//';
|
|
10437
|
-
return path.slice(0, end);
|
|
10438
|
-
},
|
|
10439
|
-
|
|
10440
|
-
basename: function basename(path, ext) {
|
|
10441
|
-
if (ext !== undefined && typeof ext !== 'string') throw new TypeError('"ext" argument must be a string');
|
|
10442
|
-
assertPath(path);
|
|
10443
|
-
|
|
10444
|
-
var start = 0;
|
|
10445
|
-
var end = -1;
|
|
10446
|
-
var matchedSlash = true;
|
|
10447
|
-
var i;
|
|
10448
|
-
|
|
10449
|
-
if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {
|
|
10450
|
-
if (ext.length === path.length && ext === path) return '';
|
|
10451
|
-
var extIdx = ext.length - 1;
|
|
10452
|
-
var firstNonSlashEnd = -1;
|
|
10453
|
-
for (i = path.length - 1; i >= 0; --i) {
|
|
10454
|
-
var code = path.charCodeAt(i);
|
|
10455
|
-
if (code === 47 /*/*/) {
|
|
10456
|
-
// If we reached a path separator that was not part of a set of path
|
|
10457
|
-
// separators at the end of the string, stop now
|
|
10458
|
-
if (!matchedSlash) {
|
|
10459
|
-
start = i + 1;
|
|
10460
|
-
break;
|
|
10461
|
-
}
|
|
10462
|
-
} else {
|
|
10463
|
-
if (firstNonSlashEnd === -1) {
|
|
10464
|
-
// We saw the first non-path separator, remember this index in case
|
|
10465
|
-
// we need it if the extension ends up not matching
|
|
10466
|
-
matchedSlash = false;
|
|
10467
|
-
firstNonSlashEnd = i + 1;
|
|
10468
|
-
}
|
|
10469
|
-
if (extIdx >= 0) {
|
|
10470
|
-
// Try to match the explicit extension
|
|
10471
|
-
if (code === ext.charCodeAt(extIdx)) {
|
|
10472
|
-
if (--extIdx === -1) {
|
|
10473
|
-
// We matched the extension, so mark this as the end of our path
|
|
10474
|
-
// component
|
|
10475
|
-
end = i;
|
|
10476
|
-
}
|
|
10477
|
-
} else {
|
|
10478
|
-
// Extension does not match, so our result is the entire path
|
|
10479
|
-
// component
|
|
10480
|
-
extIdx = -1;
|
|
10481
|
-
end = firstNonSlashEnd;
|
|
10482
|
-
}
|
|
10483
|
-
}
|
|
10484
|
-
}
|
|
10485
|
-
}
|
|
10486
|
-
|
|
10487
|
-
if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length;
|
|
10488
|
-
return path.slice(start, end);
|
|
10489
|
-
} else {
|
|
10490
|
-
for (i = path.length - 1; i >= 0; --i) {
|
|
10491
|
-
if (path.charCodeAt(i) === 47 /*/*/) {
|
|
10492
|
-
// If we reached a path separator that was not part of a set of path
|
|
10493
|
-
// separators at the end of the string, stop now
|
|
10494
|
-
if (!matchedSlash) {
|
|
10495
|
-
start = i + 1;
|
|
10496
|
-
break;
|
|
10497
|
-
}
|
|
10498
|
-
} else if (end === -1) {
|
|
10499
|
-
// We saw the first non-path separator, mark this as the end of our
|
|
10500
|
-
// path component
|
|
10501
|
-
matchedSlash = false;
|
|
10502
|
-
end = i + 1;
|
|
10503
|
-
}
|
|
10504
|
-
}
|
|
10505
|
-
|
|
10506
|
-
if (end === -1) return '';
|
|
10507
|
-
return path.slice(start, end);
|
|
10508
|
-
}
|
|
10509
|
-
},
|
|
10510
|
-
|
|
10511
|
-
extname: function extname(path) {
|
|
10512
|
-
assertPath(path);
|
|
10513
|
-
var startDot = -1;
|
|
10514
|
-
var startPart = 0;
|
|
10515
|
-
var end = -1;
|
|
10516
|
-
var matchedSlash = true;
|
|
10517
|
-
// Track the state of characters (if any) we see before our first dot and
|
|
10518
|
-
// after any path separator we find
|
|
10519
|
-
var preDotState = 0;
|
|
10520
|
-
for (var i = path.length - 1; i >= 0; --i) {
|
|
10521
|
-
var code = path.charCodeAt(i);
|
|
10522
|
-
if (code === 47 /*/*/) {
|
|
10523
|
-
// If we reached a path separator that was not part of a set of path
|
|
10524
|
-
// separators at the end of the string, stop now
|
|
10525
|
-
if (!matchedSlash) {
|
|
10526
|
-
startPart = i + 1;
|
|
10527
|
-
break;
|
|
10528
|
-
}
|
|
10529
|
-
continue;
|
|
10530
|
-
}
|
|
10531
|
-
if (end === -1) {
|
|
10532
|
-
// We saw the first non-path separator, mark this as the end of our
|
|
10533
|
-
// extension
|
|
10534
|
-
matchedSlash = false;
|
|
10535
|
-
end = i + 1;
|
|
10536
|
-
}
|
|
10537
|
-
if (code === 46 /*.*/) {
|
|
10538
|
-
// If this is our first dot, mark it as the start of our extension
|
|
10539
|
-
if (startDot === -1)
|
|
10540
|
-
startDot = i;
|
|
10541
|
-
else if (preDotState !== 1)
|
|
10542
|
-
preDotState = 1;
|
|
10543
|
-
} else if (startDot !== -1) {
|
|
10544
|
-
// We saw a non-dot and non-path separator before our dot, so we should
|
|
10545
|
-
// have a good chance at having a non-empty extension
|
|
10546
|
-
preDotState = -1;
|
|
10547
|
-
}
|
|
10548
|
-
}
|
|
10549
|
-
|
|
10550
|
-
if (startDot === -1 || end === -1 ||
|
|
10551
|
-
// We saw a non-dot character immediately before the dot
|
|
10552
|
-
preDotState === 0 ||
|
|
10553
|
-
// The (right-most) trimmed path component is exactly '..'
|
|
10554
|
-
preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
|
|
10555
|
-
return '';
|
|
10556
|
-
}
|
|
10557
|
-
return path.slice(startDot, end);
|
|
10558
|
-
},
|
|
10559
|
-
|
|
10560
|
-
format: function format(pathObject) {
|
|
10561
|
-
if (pathObject === null || typeof pathObject !== 'object') {
|
|
10562
|
-
throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof pathObject);
|
|
10563
|
-
}
|
|
10564
|
-
return _format('/', pathObject);
|
|
10565
|
-
},
|
|
10566
|
-
|
|
10567
|
-
parse: function parse(path) {
|
|
10568
|
-
assertPath(path);
|
|
10569
|
-
|
|
10570
|
-
var ret = { root: '', dir: '', base: '', ext: '', name: '' };
|
|
10571
|
-
if (path.length === 0) return ret;
|
|
10572
|
-
var code = path.charCodeAt(0);
|
|
10573
|
-
var isAbsolute = code === 47 /*/*/;
|
|
10574
|
-
var start;
|
|
10575
|
-
if (isAbsolute) {
|
|
10576
|
-
ret.root = '/';
|
|
10577
|
-
start = 1;
|
|
10578
|
-
} else {
|
|
10579
|
-
start = 0;
|
|
10580
|
-
}
|
|
10581
|
-
var startDot = -1;
|
|
10582
|
-
var startPart = 0;
|
|
10583
|
-
var end = -1;
|
|
10584
|
-
var matchedSlash = true;
|
|
10585
|
-
var i = path.length - 1;
|
|
10586
|
-
|
|
10587
|
-
// Track the state of characters (if any) we see before our first dot and
|
|
10588
|
-
// after any path separator we find
|
|
10589
|
-
var preDotState = 0;
|
|
10590
|
-
|
|
10591
|
-
// Get non-dir info
|
|
10592
|
-
for (; i >= start; --i) {
|
|
10593
|
-
code = path.charCodeAt(i);
|
|
10594
|
-
if (code === 47 /*/*/) {
|
|
10595
|
-
// If we reached a path separator that was not part of a set of path
|
|
10596
|
-
// separators at the end of the string, stop now
|
|
10597
|
-
if (!matchedSlash) {
|
|
10598
|
-
startPart = i + 1;
|
|
10599
|
-
break;
|
|
10600
|
-
}
|
|
10601
|
-
continue;
|
|
10602
|
-
}
|
|
10603
|
-
if (end === -1) {
|
|
10604
|
-
// We saw the first non-path separator, mark this as the end of our
|
|
10605
|
-
// extension
|
|
10606
|
-
matchedSlash = false;
|
|
10607
|
-
end = i + 1;
|
|
10608
|
-
}
|
|
10609
|
-
if (code === 46 /*.*/) {
|
|
10610
|
-
// If this is our first dot, mark it as the start of our extension
|
|
10611
|
-
if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1;
|
|
10612
|
-
} else if (startDot !== -1) {
|
|
10613
|
-
// We saw a non-dot and non-path separator before our dot, so we should
|
|
10614
|
-
// have a good chance at having a non-empty extension
|
|
10615
|
-
preDotState = -1;
|
|
10616
|
-
}
|
|
10617
|
-
}
|
|
10618
|
-
|
|
10619
|
-
if (startDot === -1 || end === -1 ||
|
|
10620
|
-
// We saw a non-dot character immediately before the dot
|
|
10621
|
-
preDotState === 0 ||
|
|
10622
|
-
// The (right-most) trimmed path component is exactly '..'
|
|
10623
|
-
preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
|
|
10624
|
-
if (end !== -1) {
|
|
10625
|
-
if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end);
|
|
10626
|
-
}
|
|
10627
|
-
} else {
|
|
10628
|
-
if (startPart === 0 && isAbsolute) {
|
|
10629
|
-
ret.name = path.slice(1, startDot);
|
|
10630
|
-
ret.base = path.slice(1, end);
|
|
10631
|
-
} else {
|
|
10632
|
-
ret.name = path.slice(startPart, startDot);
|
|
10633
|
-
ret.base = path.slice(startPart, end);
|
|
10634
|
-
}
|
|
10635
|
-
ret.ext = path.slice(startDot, end);
|
|
10636
|
-
}
|
|
10637
|
-
|
|
10638
|
-
if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/';
|
|
10639
|
-
|
|
10640
|
-
return ret;
|
|
10641
|
-
},
|
|
10642
|
-
|
|
10643
|
-
sep: '/',
|
|
10644
|
-
delimiter: ':',
|
|
10645
|
-
win32: null,
|
|
10646
|
-
posix: null
|
|
10647
|
-
};
|
|
10648
|
-
|
|
10649
|
-
posix.posix = posix;
|
|
10650
|
-
|
|
10651
|
-
module.exports = posix;
|
|
10652
|
-
|
|
10653
|
-
|
|
10654
10117
|
/***/ }),
|
|
10655
10118
|
|
|
10656
10119
|
/***/ 155:
|
|
@@ -13250,8 +12713,6 @@ function joinSignature(signature) {
|
|
|
13250
12713
|
]));
|
|
13251
12714
|
}
|
|
13252
12715
|
//# sourceMappingURL=index.js.map
|
|
13253
|
-
// EXTERNAL MODULE: ./node_modules/path-browserify/index.js
|
|
13254
|
-
var path_browserify = __webpack_require__(470);
|
|
13255
12716
|
;// CONCATENATED MODULE: ./node_modules/@vandeurenglenn/easy-worker/src/worker.js
|
|
13256
12717
|
/* provided dependency */ var process = __webpack_require__(155);
|
|
13257
12718
|
class EasyWorker {
|
|
@@ -13339,7 +12800,6 @@ class EasyWorker {
|
|
|
13339
12800
|
|
|
13340
12801
|
|
|
13341
12802
|
|
|
13342
|
-
|
|
13343
12803
|
var proto$1 = `
|
|
13344
12804
|
message ContractMessage {
|
|
13345
12805
|
required string creator = 1;
|
|
@@ -13732,21 +13192,20 @@ const get = (contract, method, params) => {
|
|
|
13732
13192
|
return result
|
|
13733
13193
|
};
|
|
13734
13194
|
|
|
13735
|
-
const runContract = async (
|
|
13736
|
-
const params =
|
|
13195
|
+
const runContract = async ({decoded, hash, encoded}) => {
|
|
13196
|
+
const params = decoded.constructorParameters;
|
|
13737
13197
|
try {
|
|
13738
13198
|
|
|
13739
|
-
const func = new Function(
|
|
13199
|
+
const func = new Function(decoded.contract);
|
|
13740
13200
|
const Contract = func();
|
|
13741
13201
|
|
|
13742
|
-
globalThis.msg = createMessage(
|
|
13743
|
-
|
|
13744
|
-
contracts[await contractMessage.hash] = await new Contract(...params);
|
|
13202
|
+
globalThis.msg = createMessage(decoded.creator);
|
|
13203
|
+
contracts[hash] = await new Contract(...params);
|
|
13745
13204
|
worker.postMessage({
|
|
13746
13205
|
type: 'debug',
|
|
13747
13206
|
messages: [
|
|
13748
|
-
`loaded contract: ${
|
|
13749
|
-
`size: ${formatBytes(
|
|
13207
|
+
`loaded contract: ${hash}`,
|
|
13208
|
+
`size: ${formatBytes(encoded.length)}`
|
|
13750
13209
|
]
|
|
13751
13210
|
});
|
|
13752
13211
|
} catch (e) {
|
|
@@ -13810,7 +13269,7 @@ const _init = async ({ contracts, blocks, peerid })=> {
|
|
|
13810
13269
|
|
|
13811
13270
|
contracts = await Promise.all(contracts.map(async contract => {
|
|
13812
13271
|
contract = await new ContractMessage(new Uint8Array(contract.split(',')));
|
|
13813
|
-
await runContract(contract);
|
|
13272
|
+
await runContract({decoded: contract.decoded, encoded: contract.encoded, hash: await contract.hash});
|
|
13814
13273
|
return contract
|
|
13815
13274
|
}));
|
|
13816
13275
|
|
|
@@ -13869,6 +13328,22 @@ const tasks = async (e) => {
|
|
|
13869
13328
|
});
|
|
13870
13329
|
}
|
|
13871
13330
|
}
|
|
13331
|
+
if (e.type === 'run') {
|
|
13332
|
+
try {
|
|
13333
|
+
const value = await runContract(e.input);
|
|
13334
|
+
worker.postMessage({
|
|
13335
|
+
type: 'response',
|
|
13336
|
+
id,
|
|
13337
|
+
value
|
|
13338
|
+
});
|
|
13339
|
+
} catch (e) {
|
|
13340
|
+
worker.postMessage({
|
|
13341
|
+
type: 'fetchError',
|
|
13342
|
+
message: e.message,
|
|
13343
|
+
id
|
|
13344
|
+
});
|
|
13345
|
+
}
|
|
13346
|
+
}
|
|
13872
13347
|
if (e.type === 'get') {
|
|
13873
13348
|
try {
|
|
13874
13349
|
const value = await get(e.input.contract, e.input.method, e.input.params);
|
package/dist/chain.js
CHANGED
|
@@ -140,22 +140,26 @@ class Machine {
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
async #runContract(contractMessage) {
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
143
|
+
const hash = await contractMessage.hash;
|
|
144
|
+
return new Promise((resolve, reject) => {
|
|
145
|
+
const id = node_crypto.randomBytes(20).toString('hex');
|
|
146
|
+
const onmessage = message => {
|
|
147
|
+
pubsub.unsubscribe(id, onmessage);
|
|
148
|
+
if (message?.error) reject(message.error);
|
|
149
|
+
else resolve(message);
|
|
150
|
+
};
|
|
151
|
+
pubsub.subscribe(id, onmessage);
|
|
152
|
+
this.worker.postMessage({
|
|
153
|
+
type: 'run',
|
|
154
|
+
id,
|
|
155
|
+
input: {
|
|
156
|
+
decoded: contractMessage.decoded,
|
|
157
|
+
encoded: contractMessage.encoded,
|
|
158
|
+
hash
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
})
|
|
162
|
+
|
|
159
163
|
}
|
|
160
164
|
/**
|
|
161
165
|
* @params {ContractMessage} - contractMessage
|
package/dist/module/chain.js
CHANGED
|
@@ -131,22 +131,26 @@ class Machine {
|
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
async #runContract(contractMessage) {
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
134
|
+
const hash = await contractMessage.hash;
|
|
135
|
+
return new Promise((resolve, reject) => {
|
|
136
|
+
const id = randomBytes(20).toString('hex');
|
|
137
|
+
const onmessage = message => {
|
|
138
|
+
pubsub.unsubscribe(id, onmessage);
|
|
139
|
+
if (message?.error) reject(message.error);
|
|
140
|
+
else resolve(message);
|
|
141
|
+
};
|
|
142
|
+
pubsub.subscribe(id, onmessage);
|
|
143
|
+
this.worker.postMessage({
|
|
144
|
+
type: 'run',
|
|
145
|
+
id,
|
|
146
|
+
input: {
|
|
147
|
+
decoded: contractMessage.decoded,
|
|
148
|
+
encoded: contractMessage.encoded,
|
|
149
|
+
hash
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
})
|
|
153
|
+
|
|
150
154
|
}
|
|
151
155
|
/**
|
|
152
156
|
* @params {ContractMessage} - contractMessage
|
|
@@ -3,7 +3,6 @@ import _BN from 'bn.js';
|
|
|
3
3
|
import { isBytes, hexlify, isHexString } from '@ethersproject/bytes';
|
|
4
4
|
import { Logger } from '@ethersproject/logger';
|
|
5
5
|
import '@ethersproject/bignumber';
|
|
6
|
-
import 'path';
|
|
7
6
|
import EasyWorker from '@vandeurenglenn/easy-worker';
|
|
8
7
|
|
|
9
8
|
var proto$1 = `
|
|
@@ -398,21 +397,20 @@ const get = (contract, method, params) => {
|
|
|
398
397
|
return result
|
|
399
398
|
};
|
|
400
399
|
|
|
401
|
-
const runContract = async (
|
|
402
|
-
const params =
|
|
400
|
+
const runContract = async ({decoded, hash, encoded}) => {
|
|
401
|
+
const params = decoded.constructorParameters;
|
|
403
402
|
try {
|
|
404
403
|
|
|
405
|
-
const func = new Function(
|
|
404
|
+
const func = new Function(decoded.contract);
|
|
406
405
|
const Contract = func();
|
|
407
406
|
|
|
408
|
-
globalThis.msg = createMessage(
|
|
409
|
-
|
|
410
|
-
contracts[await contractMessage.hash] = await new Contract(...params);
|
|
407
|
+
globalThis.msg = createMessage(decoded.creator);
|
|
408
|
+
contracts[hash] = await new Contract(...params);
|
|
411
409
|
worker.postMessage({
|
|
412
410
|
type: 'debug',
|
|
413
411
|
messages: [
|
|
414
|
-
`loaded contract: ${
|
|
415
|
-
`size: ${formatBytes(
|
|
412
|
+
`loaded contract: ${hash}`,
|
|
413
|
+
`size: ${formatBytes(encoded.length)}`
|
|
416
414
|
]
|
|
417
415
|
});
|
|
418
416
|
} catch (e) {
|
|
@@ -476,7 +474,7 @@ const _init = async ({ contracts, blocks, peerid })=> {
|
|
|
476
474
|
|
|
477
475
|
contracts = await Promise.all(contracts.map(async contract => {
|
|
478
476
|
contract = await new ContractMessage(new Uint8Array(contract.split(',')));
|
|
479
|
-
await runContract(contract);
|
|
477
|
+
await runContract({decoded: contract.decoded, encoded: contract.encoded, hash: await contract.hash});
|
|
480
478
|
return contract
|
|
481
479
|
}));
|
|
482
480
|
|
|
@@ -535,6 +533,22 @@ const tasks = async (e) => {
|
|
|
535
533
|
});
|
|
536
534
|
}
|
|
537
535
|
}
|
|
536
|
+
if (e.type === 'run') {
|
|
537
|
+
try {
|
|
538
|
+
const value = await runContract(e.input);
|
|
539
|
+
worker.postMessage({
|
|
540
|
+
type: 'response',
|
|
541
|
+
id,
|
|
542
|
+
value
|
|
543
|
+
});
|
|
544
|
+
} catch (e) {
|
|
545
|
+
worker.postMessage({
|
|
546
|
+
type: 'fetchError',
|
|
547
|
+
message: e.message,
|
|
548
|
+
id
|
|
549
|
+
});
|
|
550
|
+
}
|
|
551
|
+
}
|
|
538
552
|
if (e.type === 'get') {
|
|
539
553
|
try {
|
|
540
554
|
const value = await get(e.input.contract, e.input.method, e.input.params);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@leofcoin/codec-format-interface"),t=require("bn.js"),r=require("@ethersproject/bytes"),s=require("@ethersproject/logger");require("@ethersproject/bignumber"),require("path");var n=require("@vandeurenglenn/easy-worker");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(t),o=i(n);class ContractMessage extends e.FormatInterface{get keys(){return["creator","contract","constructorParameters"]}get messageName(){return"ContractMessage"}constructor(e){super(e,"\nmessage ContractMessage {\n required string creator = 1;\n required bytes contract = 2;\n repeated string constructorParameters = 3;\n}\n",{name:"contract-message"})}}class BlockMessage extends e.FormatInterface{get keys(){return["index","previousHash","timestamp","reward","fees","transactions","validators"]}get messageName(){return"BlockMessage"}constructor(e){super(e,"\nmessage ValidatorMessage {\n required string address = 1;\n required string reward = 2;\n}\n\nmessage Transaction {\n required string hash = 1;\n required uint64 timestamp = 2;\n required string from = 3;\n required string to = 4;\n required uint64 nonce = 5;\n required string method = 6;\n repeated string params = 7;\n}\n\nmessage BlockMessage {\n required uint64 index = 1;\n required string previousHash = 3;\n required uint64 timestamp = 4;\n required uint64 reward = 5;\n required string fees = 6;\n repeated Transaction transactions = 7;\n repeated ValidatorMessage validators = 8;\n}\n",{name:"block-message"})}}var u=a.default.BN;const g=new s.Logger("bignumber/5.6.2"),c={};let h=!1;class BigNumber{constructor(e,t){e!==c&&g.throwError("cannot call constructor directly; use BigNumber.from",s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return m(d(this).fromTwos(e))}toTwos(e){return m(d(this).toTwos(e))}abs(){return"-"===this._hex[0]?BigNumber.from(this._hex.substring(1)):this}add(e){return m(d(this).add(d(e)))}sub(e){return m(d(this).sub(d(e)))}div(e){return BigNumber.from(e).isZero()&&p("division-by-zero","div"),m(d(this).div(d(e)))}mul(e){return m(d(this).mul(d(e)))}mod(e){const t=d(e);return t.isNeg()&&p("division-by-zero","mod"),m(d(this).umod(t))}pow(e){const t=d(e);return t.isNeg()&&p("negative-power","pow"),m(d(this).pow(t))}and(e){const t=d(e);return(this.isNegative()||t.isNeg())&&p("unbound-bitwise-result","and"),m(d(this).and(t))}or(e){const t=d(e);return(this.isNegative()||t.isNeg())&&p("unbound-bitwise-result","or"),m(d(this).or(t))}xor(e){const t=d(e);return(this.isNegative()||t.isNeg())&&p("unbound-bitwise-result","xor"),m(d(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&p("negative-width","mask"),m(d(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&p("negative-width","shl"),m(d(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&p("negative-width","shr"),m(d(this).shrn(e))}eq(e){return d(this).eq(d(e))}lt(e){return d(this).lt(d(e))}lte(e){return d(this).lte(d(e))}gt(e){return d(this).gt(d(e))}gte(e){return d(this).gte(d(e))}isNegative(){return"-"===this._hex[0]}isZero(){return d(this).isZero()}toNumber(){try{return d(this).toNumber()}catch(e){p("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return g.throwError("this platform does not support BigInt",s.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?h||(h=!0,g.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?g.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",s.Logger.errors.UNEXPECTED_ARGUMENT,{}):g.throwError("BigNumber.toString does not accept parameters",s.Logger.errors.UNEXPECTED_ARGUMENT,{})),d(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof BigNumber)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new BigNumber(c,l(e)):e.match(/^-?[0-9]+$/)?new BigNumber(c,l(new u(e))):g.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&p("underflow","BigNumber.from",e),(e>=9007199254740991||e<=-9007199254740991)&&p("overflow","BigNumber.from",e),BigNumber.from(String(e));const t=e;if("bigint"==typeof t)return BigNumber.from(t.toString());if(r.isBytes(t))return BigNumber.from(r.hexlify(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"==typeof e)return BigNumber.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&(r.isHexString(e)||"-"===e[0]&&r.isHexString(e.substring(1))))return BigNumber.from(e)}return g.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function l(e){if("string"!=typeof e)return l(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&g.throwArgumentError("invalid hex","value",e),"0x00"===(e=l(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function m(e){return BigNumber.from(l(e))}function d(e){const t=BigNumber.from(e).toHexString();return"-"===t[0]?new u("-"+t.substring(3),16):new u(t.substring(2),16)}function p(e,t,r){const n={fault:e,operation:t};return null!=r&&(n.value=r),g.throwError(e,s.Logger.errors.NUMERIC_FAULT,n)}new s.Logger("units/5.6.1");const b=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],f=(e,t=2)=>{if(0===e)return"0 Bytes";t<0&&(t=0);const r=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,r)).toFixed(t))} ${b[r]}`};var w="237,198,141,3,123,34,99,114,101,97,116,111,114,34,58,34,56,71,85,107,103,52,120,87,113,109,110,83,56,75,101,122,56,107,54,68,115,82,120,90,66,68,97,54,114,71,74,109,104,107,122,67,75,113,78,75,102,85,110,103,90,122,109,54,97,81,34,44,34,99,111,110,116,114,97,99,116,34,58,34,99,108,97,115,115,32,70,97,99,116,111,114,121,123,35,110,97,109,101,61,92,34,65,114,116,79,110,108,105,110,101,67,111,110,116,114,97,99,116,70,97,99,116,111,114,121,92,34,59,35,116,111,116,97,108,67,111,110,116,114,97,99,116,115,61,48,59,35,99,111,110,116,114,97,99,116,115,61,91,93,59,99,111,110,115,116,114,117,99,116,111,114,40,115,116,97,116,101,41,123,115,116,97,116,101,38,38,40,116,104,105,115,46,35,99,111,110,116,114,97,99,116,115,61,115,116,97,116,101,46,99,111,110,116,114,97,99,116,115,44,116,104,105,115,46,35,116,111,116,97,108,67,111,110,116,114,97,99,116,115,61,115,116,97,116,101,46,116,111,116,97,108,67,111,110,116,114,97,99,116,115,41,125,103,101,116,32,115,116,97,116,101,40,41,123,114,101,116,117,114,110,123,116,111,116,97,108,67,111,110,116,114,97,99,116,115,58,116,104,105,115,46,35,116,111,116,97,108,67,111,110,116,114,97,99,116,115,44,99,111,110,116,114,97,99,116,115,58,116,104,105,115,46,35,99,111,110,116,114,97,99,116,115,125,125,103,101,116,32,110,97,109,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,110,97,109,101,125,103,101,116,32,99,111,110,116,114,97,99,116,115,40,41,123,114,101,116,117,114,110,91,46,46,46,116,104,105,115,46,35,99,111,110,116,114,97,99,116,115,93,125,103,101,116,32,116,111,116,97,108,67,111,110,116,114,97,99,116,115,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,116,111,116,97,108,67,111,110,116,114,97,99,116,115,125,97,115,121,110,99,32,114,101,103,105,115,116,101,114,67,111,110,116,114,97,99,116,40,97,100,100,114,101,115,115,41,123,105,102,40,97,119,97,105,116,32,109,115,103,46,115,116,97,116,105,99,67,97,108,108,40,97,100,100,114,101,115,115,44,92,34,104,97,115,82,111,108,101,92,34,44,91,109,115,103,46,115,101,110,100,101,114,44,92,34,79,87,78,69,82,92,34,93,41,44,116,104,105,115,46,35,99,111,110,116,114,97,99,116,115,46,105,110,99,108,117,100,101,115,40,97,100,100,114,101,115,115,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,97,108,114,101,97,100,121,32,114,101,103,105,115,116,101,114,101,100,92,34,41,59,116,104,105,115,46,35,116,111,116,97,108,67,111,110,116,114,97,99,116,115,43,61,49,44,116,104,105,115,46,35,99,111,110,116,114,97,99,116,115,46,112,117,115,104,40,97,100,100,114,101,115,115,41,125,125,114,101,116,117,114,110,32,70,97,99,116,111,114,121,59,34,44,34,99,111,110,115,116,114,117,99,116,111,114,80,97,114,97,109,101,116,101,114,115,34,58,91,93,125",N="237,198,141,3,123,34,99,114,101,97,116,111,114,34,58,34,56,71,85,107,103,52,120,87,113,109,110,83,56,75,101,122,56,107,54,68,115,82,120,90,66,68,97,54,114,71,74,109,104,107,122,67,75,113,78,75,102,85,110,103,90,122,109,54,97,81,34,44,34,99,111,110,116,114,97,99,116,34,58,34,99,108,97,115,115,32,82,111,108,101,115,123,35,114,111,108,101,115,61,123,79,87,78,69,82,58,91,93,44,77,73,78,84,58,91,93,44,66,85,82,78,58,91,93,125,59,99,111,110,115,116,114,117,99,116,111,114,40,114,111,108,101,115,41,123,105,102,40,114,111,108,101,115,41,123,105,102,40,33,40,114,111,108,101,115,32,105,110,115,116,97,110,99,101,111,102,32,79,98,106,101,99,116,41,41,116,104,114,111,119,32,110,101,119,32,84,121,112,101,69,114,114,111,114,40,92,34,101,120,112,101,99,116,101,100,32,114,111,108,101,115,32,116,111,32,98,101,32,97,110,32,111,98,106,101,99,116,92,34,41,59,116,104,105,115,46,35,114,111,108,101,115,61,123,46,46,46,114,111,108,101,115,44,46,46,46,116,104,105,115,46,35,114,111,108,101,115,125,125,101,108,115,101,32,116,104,105,115,46,35,103,114,97,110,116,82,111,108,101,40,109,115,103,46,115,101,110,100,101,114,44,92,34,79,87,78,69,82,92,34,41,125,103,101,116,32,115,116,97,116,101,40,41,123,114,101,116,117,114,110,123,114,111,108,101,115,58,116,104,105,115,46,114,111,108,101,115,125,125,103,101,116,32,114,111,108,101,115,40,41,123,114,101,116,117,114,110,123,46,46,46,116,104,105,115,46,35,114,111,108,101,115,125,125,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,114,101,116,117,114,110,33,33,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,38,38,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,105,110,99,108,117,100,101,115,40,97,100,100,114,101,115,115,41,125,35,103,114,97,110,116,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,36,123,114,111,108,101,125,32,114,111,108,101,32,97,108,114,101,97,100,121,32,103,114,97,110,116,101,100,32,102,111,114,32,36,123,97,100,100,114,101,115,115,125,96,41,59,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,112,117,115,104,40,97,100,100,114,101,115,115,41,125,35,114,101,118,111,107,101,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,36,123,114,111,108,101,125,32,114,111,108,101,32,97,108,114,101,97,100,121,32,114,101,118,111,107,101,100,32,102,111,114,32,36,123,97,100,100,114,101,115,115,125,96,41,59,105,102,40,92,34,79,87,78,69,82,92,34,61,61,61,114,111,108,101,38,38,49,61,61,61,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,108,101,110,103,116,104,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,97,116,108,101,97,115,116,32,111,110,101,32,111,119,110,101,114,32,105,115,32,110,101,101,100,101,100,33,92,34,41,59,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,115,112,108,105,99,101,40,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,105,110,100,101,120,79,102,40,97,100,100,114,101,115,115,41,41,125,103,114,97,110,116,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,92,34,79,87,78,69,82,92,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,78,111,116,32,97,108,108,111,119,101,100,92,34,41,59,116,104,105,115,46,35,103,114,97,110,116,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,125,114,101,118,111,107,101,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,92,34,79,87,78,69,82,92,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,78,111,116,32,97,108,108,111,119,101,100,92,34,41,59,116,104,105,115,46,35,114,101,118,111,107,101,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,125,125,99,108,97,115,115,32,84,111,107,101,110,32,101,120,116,101,110,100,115,32,82,111,108,101,115,123,35,110,97,109,101,59,35,115,121,109,98,111,108,59,35,104,111,108,100,101,114,115,61,48,59,35,98,97,108,97,110,99,101,115,61,123,125,59,35,97,112,112,114,111,118,97,108,115,61,123,125,59,35,100,101,99,105,109,97,108,115,61,49,56,59,35,116,111,116,97,108,83,117,112,112,108,121,61,66,105,103,78,117,109,98,101,114,46,102,114,111,109,40,48,41,59,99,111,110,115,116,114,117,99,116,111,114,40,110,97,109,101,44,115,121,109,98,111,108,44,100,101,99,105,109,97,108,115,61,49,56,44,115,116,97,116,101,41,123,105,102,40,33,110,97,109,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,110,97,109,101,32,117,110,100,101,102,105,110,101,100,92,34,41,59,105,102,40,33,115,121,109,98,111,108,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,115,121,109,98,111,108,32,117,110,100,101,102,105,110,101,100,92,34,41,59,115,117,112,101,114,40,115,116,97,116,101,63,46,114,111,108,101,115,41,44,116,104,105,115,46,35,110,97,109,101,61,110,97,109,101,44,116,104,105,115,46,35,115,121,109,98,111,108,61,115,121,109,98,111,108,44,116,104,105,115,46,35,100,101,99,105,109,97,108,115,61,100,101,99,105,109,97,108,115,125,103,101,116,32,115,116,97,116,101,40,41,123,114,101,116,117,114,110,123,46,46,46,115,117,112,101,114,46,115,116,97,116,101,44,104,111,108,100,101,114,115,58,116,104,105,115,46,104,111,108,100,101,114,115,44,98,97,108,97,110,99,101,115,58,116,104,105,115,46,98,97,108,97,110,99,101,115,44,97,112,112,114,111,118,97,108,115,58,123,46,46,46,116,104,105,115,46,35,97,112,112,114,111,118,97,108,115,125,44,116,111,116,97,108,83,117,112,112,108,121,58,116,104,105,115,46,116,111,116,97,108,83,117,112,112,108,121,125,125,103,101,116,32,116,111,116,97,108,83,117,112,112,108,121,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,116,111,116,97,108,83,117,112,112,108,121,125,103,101,116,32,110,97,109,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,110,97,109,101,125,103,101,116,32,115,121,109,98,111,108,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,115,121,109,98,111,108,125,103,101,116,32,104,111,108,100,101,114,115,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,104,111,108,100,101,114,115,125,103,101,116,32,98,97,108,97,110,99,101,115,40,41,123,114,101,116,117,114,110,123,46,46,46,116,104,105,115,46,35,98,97,108,97,110,99,101,115,125,125,109,105,110,116,40,116,111,44,97,109,111,117,110,116,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,109,115,103,46,115,101,110,100,101,114,44,92,34,77,73,78,84,92,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,110,111,116,32,97,108,108,111,119,101,100,92,34,41,59,116,104,105,115,46,35,116,111,116,97,108,83,117,112,112,108,121,61,116,104,105,115,46,35,116,111,116,97,108,83,117,112,112,108,121,46,97,100,100,40,97,109,111,117,110,116,41,44,116,104,105,115,46,35,105,110,99,114,101,97,115,101,66,97,108,97,110,99,101,40,116,111,44,97,109,111,117,110,116,41,125,98,117,114,110,40,102,114,111,109,44,97,109,111,117,110,116,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,109,115,103,46,115,101,110,100,101,114,44,92,34,66,85,82,78,92,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,110,111,116,32,97,108,108,111,119,101,100,92,34,41,59,116,104,105,115,46,35,116,111,116,97,108,83,117,112,112,108,121,61,116,104,105,115,46,35,116,111,116,97,108,83,117,112,112,108,121,46,115,117,98,40,97,109,111,117,110,116,41,44,116,104,105,115,46,35,100,101,99,114,101,97,115,101,66,97,108,97,110,99,101,40,102,114,111,109,44,97,109,111,117,110,116,41,125,35,98,101,102,111,114,101,84,114,97,110,115,102,101,114,40,102,114,111,109,44,116,111,44,97,109,111,117,110,116,41,123,105,102,40,33,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,102,114,111,109,93,124,124,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,102,114,111,109,93,60,97,109,111,117,110,116,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,97,109,111,117,110,116,32,101,120,99,101,101,100,115,32,98,97,108,97,110,99,101,92,34,41,125,35,117,112,100,97,116,101,72,111,108,100,101,114,115,40,97,100,100,114,101,115,115,44,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,41,123,92,34,48,120,48,48,92,34,61,61,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,46,116,111,72,101,120,83,116,114,105,110,103,40,41,63,116,104,105,115,46,35,104,111,108,100,101,114,115,45,61,49,58,92,34,48,120,48,48,92,34,33,61,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,46,116,111,72,101,120,83,116,114,105,110,103,40,41,38,38,92,34,48,120,48,48,92,34,61,61,61,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,46,116,111,72,101,120,83,116,114,105,110,103,40,41,38,38,40,116,104,105,115,46,35,104,111,108,100,101,114,115,43,61,49,41,125,35,105,110,99,114,101,97,115,101,66,97,108,97,110,99,101,40,97,100,100,114,101,115,115,44,97,109,111,117,110,116,41,123,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,124,124,40,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,61,66,105,103,78,117,109,98,101,114,46,102,114,111,109,40,48,41,41,59,99,111,110,115,116,32,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,59,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,46,97,100,100,40,97,109,111,117,110,116,41,44,116,104,105,115,46,35,117,112,100,97,116,101,72,111,108,100,101,114,115,40,97,100,100,114,101,115,115,44,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,41,125,35,100,101,99,114,101,97,115,101,66,97,108,97,110,99,101,40,97,100,100,114,101,115,115,44,97,109,111,117,110,116,41,123,99,111,110,115,116,32,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,59,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,46,115,117,98,40,97,109,111,117,110,116,41,44,116,104,105,115,46,35,117,112,100,97,116,101,72,111,108,100,101,114,115,40,97,100,100,114,101,115,115,44,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,41,125,98,97,108,97,110,99,101,79,102,40,97,100,100,114,101,115,115,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,125,115,101,116,65,112,112,114,111,118,97,108,40,111,112,101,114,97,116,111,114,44,97,109,111,117,110,116,41,123,99,111,110,115,116,32,111,119,110,101,114,61,103,108,111,98,97,108,84,104,105,115,46,109,115,103,46,115,101,110,100,101,114,59,116,104,105,115,46,35,97,112,112,114,111,118,97,108,115,91,111,119,110,101,114,93,124,124,40,116,104,105,115,46,35,97,112,112,114,111,118,97,108,115,91,111,119,110,101,114,93,61,123,125,41,44,116,104,105,115,46,35,97,112,112,114,111,118,97,108,115,91,111,119,110,101,114,93,91,111,112,101,114,97,116,111,114,93,61,97,109,111,117,110,116,125,97,112,112,114,111,118,101,100,40,111,119,110,101,114,44,111,112,101,114,97,116,111,114,44,97,109,111,117,110,116,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,97,112,112,114,111,118,97,108,115,91,111,119,110,101,114,93,91,111,112,101,114,97,116,111,114,93,61,61,61,97,109,111,117,110,116,125,116,114,97,110,115,102,101,114,40,102,114,111,109,44,116,111,44,97,109,111,117,110,116,41,123,97,109,111,117,110,116,61,66,105,103,78,117,109,98,101,114,46,102,114,111,109,40,97,109,111,117,110,116,41,44,116,104,105,115,46,35,98,101,102,111,114,101,84,114,97,110,115,102,101,114,40,102,114,111,109,44,116,111,44,97,109,111,117,110,116,41,44,116,104,105,115,46,35,100,101,99,114,101,97,115,101,66,97,108,97,110,99,101,40,102,114,111,109,44,97,109,111,117,110,116,41,44,116,104,105,115,46,35,105,110,99,114,101,97,115,101,66,97,108,97,110,99,101,40,116,111,44,97,109,111,117,110,116,41,125,125,99,108,97,115,115,32,65,114,116,79,110,108,105,110,101,32,101,120,116,101,110,100,115,32,84,111,107,101,110,123,99,111,110,115,116,114,117,99,116,111,114,40,115,116,97,116,101,41,123,115,117,112,101,114,40,92,34,65,114,116,79,110,108,105,110,101,92,34,44,92,34,65,82,84,92,34,44,49,56,44,115,116,97,116,101,41,125,125,114,101,116,117,114,110,32,65,114,116,79,110,108,105,110,101,59,34,44,34,99,111,110,115,116,114,117,99,116,111,114,80,97,114,97,109,101,116,101,114,115,34,58,91,93,125",y="237,198,141,3,123,34,99,114,101,97,116,111,114,34,58,34,56,71,85,107,103,52,120,87,113,109,110,83,56,75,101,122,56,107,54,68,115,82,120,90,66,68,97,54,114,71,74,109,104,107,122,67,75,113,78,75,102,85,110,103,90,122,109,54,97,81,34,44,34,99,111,110,116,114,97,99,116,34,58,34,99,108,97,115,115,32,78,97,109,101,83,101,114,118,105,99,101,123,35,110,97,109,101,61,92,34,65,114,116,79,110,108,105,110,101,78,97,109,101,83,101,114,118,105,99,101,92,34,59,35,111,119,110,101,114,59,35,112,114,105,99,101,61,48,59,35,114,101,103,105,115,116,114,121,61,123,125,59,35,99,117,114,114,101,110,99,121,59,103,101,116,32,110,97,109,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,110,97,109,101,125,103,101,116,32,114,101,103,105,115,116,114,121,40,41,123,114,101,116,117,114,110,123,46,46,46,116,104,105,115,46,35,114,101,103,105,115,116,114,121,125,125,103,101,116,32,115,116,97,116,101,40,41,123,125,99,111,110,115,116,114,117,99,116,111,114,40,102,97,99,116,111,114,121,65,100,100,114,101,115,115,44,99,117,114,114,101,110,99,121,44,118,97,108,105,100,97,116,111,114,65,100,100,114,101,115,115,44,112,114,105,99,101,44,115,116,97,116,101,41,123,115,116,97,116,101,63,40,116,104,105,115,46,35,111,119,110,101,114,61,115,116,97,116,101,46,111,119,110,101,114,44,116,104,105,115,46,35,114,101,103,105,115,116,114,121,61,115,116,97,116,101,46,114,101,103,105,115,116,114,121,44,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,115,116,97,116,101,46,99,117,114,114,101,110,99,121,44,116,104,105,115,46,35,112,114,105,99,101,61,115,116,97,116,101,46,112,114,105,99,101,41,58,40,116,104,105,115,46,35,111,119,110,101,114,61,109,115,103,46,115,101,110,100,101,114,44,116,104,105,115,46,35,112,114,105,99,101,61,112,114,105,99,101,44,116,104,105,115,46,35,114,101,103,105,115,116,114,121,46,65,114,116,79,110,108,105,110,101,67,111,110,116,114,97,99,116,70,97,99,116,111,114,121,61,123,111,119,110,101,114,58,109,115,103,46,115,101,110,100,101,114,44,97,100,100,114,101,115,115,58,102,97,99,116,111,114,121,65,100,100,114,101,115,115,125,44,116,104,105,115,46,35,114,101,103,105,115,116,114,121,46,65,114,116,79,110,108,105,110,101,84,111,107,101,110,61,123,111,119,110,101,114,58,109,115,103,46,115,101,110,100,101,114,44,97,100,100,114,101,115,115,58,99,117,114,114,101,110,99,121,125,44,116,104,105,115,46,35,114,101,103,105,115,116,114,121,46,65,114,116,79,110,108,105,110,101,86,97,108,105,100,97,116,111,114,115,61,123,111,119,110,101,114,58,109,115,103,46,115,101,110,100,101,114,44,97,100,100,114,101,115,115,58,118,97,108,105,100,97,116,111,114,65,100,100,114,101,115,115,125,44,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,99,117,114,114,101,110,99,121,41,125,99,104,97,110,103,101,79,119,110,101,114,40,111,119,110,101,114,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,110,111,32,111,119,110,101,114,92,34,41,59,116,104,105,115,46,35,111,119,110,101,114,61,111,119,110,101,114,125,99,104,97,110,103,101,80,114,105,99,101,40,112,114,105,99,101,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,110,111,32,111,119,110,101,114,92,34,41,59,116,104,105,115,46,35,112,114,105,99,101,61,112,114,105,99,101,125,99,104,97,110,103,101,67,117,114,114,101,110,99,121,40,99,117,114,114,101,110,99,121,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,110,111,32,111,119,110,101,114,92,34,41,59,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,99,117,114,114,101,110,99,121,125,97,115,121,110,99,32,112,117,114,99,104,97,115,101,78,97,109,101,40,110,97,109,101,44,97,100,100,114,101,115,115,41,123,105,102,40,97,119,97,105,116,32,109,115,103,46,99,97,108,108,40,116,104,105,115,46,35,99,117,114,114,101,110,99,121,44,92,34,98,97,108,97,110,99,101,79,102,92,34,44,91,109,115,103,46,115,101,110,100,101,114,93,41,60,116,104,105,115,46,35,112,114,105,99,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,112,114,105,99,101,32,101,120,99,101,101,100,115,32,98,97,108,97,110,99,101,92,34,41,59,116,114,121,123,97,119,97,105,116,32,109,115,103,46,99,97,108,108,40,116,104,105,115,46,35,99,117,114,114,101,110,99,121,44,92,34,116,114,97,110,115,102,101,114,92,34,44,91,109,115,103,46,115,101,110,100,101,114,44,116,104,105,115,46,35,111,119,110,101,114,44,116,104,105,115,46,35,112,114,105,99,101,93,41,125,99,97,116,99,104,40,101,114,114,111,114,41,123,116,104,114,111,119,32,101,114,114,111,114,125,116,104,105,115,46,35,114,101,103,105,115,116,114,121,91,110,97,109,101,93,61,123,111,119,110,101,114,58,109,115,103,46,115,101,110,100,101,114,44,97,100,100,114,101,115,115,125,125,108,111,111,107,117,112,40,110,97,109,101,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,114,101,103,105,115,116,114,121,91,110,97,109,101,93,125,116,114,97,110,115,102,101,114,79,119,110,101,114,115,104,105,112,40,110,97,109,101,44,116,111,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,114,101,103,105,115,116,114,121,46,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,110,111,116,32,97,32,111,119,110,101,114,92,34,41,59,116,104,105,115,46,35,114,101,103,105,115,116,114,121,91,110,97,109,101,93,46,111,119,110,101,114,61,116,111,125,99,104,97,110,103,101,65,100,100,114,101,115,115,40,110,97,109,101,44,97,100,100,114,101,115,115,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,114,101,103,105,115,116,114,121,46,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,110,111,116,32,97,32,111,119,110,101,114,92,34,41,59,116,104,105,115,46,35,114,101,103,105,115,116,114,121,91,110,97,109,101,93,46,97,100,100,114,101,115,115,61,97,100,100,114,101,115,115,125,125,114,101,116,117,114,110,32,78,97,109,101,83,101,114,118,105,99,101,59,34,44,34,99,111,110,115,116,114,117,99,116,111,114,80,97,114,97,109,101,116,101,114,115,34,58,91,34,105,104,110,121,50,103,113,103,54,99,54,109,119,121,53,109,104,98,114,115,53,117,108,107,107,111,122,115,103,119,116,107,53,118,117,122,53,107,114,106,105,100,111,117,121,52,109,98,119,102,100,98,106,110,98,109,107,122,122,34,44,34,105,104,110,121,50,103,113,104,111,111,99,107,121,103,55,121,103,52,110,53,98,112,120,117,108,100,97,104,102,97,118,112,113,110,109,112,111,101,50,98,110,52,105,118,110,120,109,107,55,114,101,100,99,50,108,116,119,107,98,34,44,34,105,104,110,121,50,103,113,104,52,101,50,112,114,52,112,98,116,112,107,97,109,104,106,51,104,116,115,118,117,111,121,100,121,51,119,111,116,97,117,100,111,101,97,107,116,103,99,100,119,109,111,105,106,54,54,112,101,99,112,34,44,34,49,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,34,93,125",B="237,198,141,3,123,34,99,114,101,97,116,111,114,34,58,34,56,71,85,107,103,52,120,87,113,109,110,83,56,75,101,122,56,107,54,68,115,82,120,90,66,68,97,54,114,71,74,109,104,107,122,67,75,113,78,75,102,85,110,103,90,122,109,54,97,81,34,44,34,99,111,110,116,114,97,99,116,34,58,34,99,108,97,115,115,32,82,111,108,101,115,123,35,114,111,108,101,115,61,123,79,87,78,69,82,58,91,93,44,77,73,78,84,58,91,93,44,66,85,82,78,58,91,93,125,59,99,111,110,115,116,114,117,99,116,111,114,40,114,111,108,101,115,41,123,105,102,40,114,111,108,101,115,41,123,105,102,40,33,40,114,111,108,101,115,32,105,110,115,116,97,110,99,101,111,102,32,79,98,106,101,99,116,41,41,116,104,114,111,119,32,110,101,119,32,84,121,112,101,69,114,114,111,114,40,92,34,101,120,112,101,99,116,101,100,32,114,111,108,101,115,32,116,111,32,98,101,32,97,110,32,111,98,106,101,99,116,92,34,41,59,116,104,105,115,46,35,114,111,108,101,115,61,123,46,46,46,114,111,108,101,115,44,46,46,46,116,104,105,115,46,35,114,111,108,101,115,125,125,101,108,115,101,32,116,104,105,115,46,35,103,114,97,110,116,82,111,108,101,40,109,115,103,46,115,101,110,100,101,114,44,92,34,79,87,78,69,82,92,34,41,125,103,101,116,32,115,116,97,116,101,40,41,123,114,101,116,117,114,110,123,114,111,108,101,115,58,116,104,105,115,46,114,111,108,101,115,125,125,103,101,116,32,114,111,108,101,115,40,41,123,114,101,116,117,114,110,123,46,46,46,116,104,105,115,46,35,114,111,108,101,115,125,125,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,114,101,116,117,114,110,33,33,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,38,38,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,105,110,99,108,117,100,101,115,40,97,100,100,114,101,115,115,41,125,35,103,114,97,110,116,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,36,123,114,111,108,101,125,32,114,111,108,101,32,97,108,114,101,97,100,121,32,103,114,97,110,116,101,100,32,102,111,114,32,36,123,97,100,100,114,101,115,115,125,96,41,59,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,112,117,115,104,40,97,100,100,114,101,115,115,41,125,35,114,101,118,111,107,101,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,36,123,114,111,108,101,125,32,114,111,108,101,32,97,108,114,101,97,100,121,32,114,101,118,111,107,101,100,32,102,111,114,32,36,123,97,100,100,114,101,115,115,125,96,41,59,105,102,40,92,34,79,87,78,69,82,92,34,61,61,61,114,111,108,101,38,38,49,61,61,61,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,108,101,110,103,116,104,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,97,116,108,101,97,115,116,32,111,110,101,32,111,119,110,101,114,32,105,115,32,110,101,101,100,101,100,33,92,34,41,59,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,115,112,108,105,99,101,40,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,105,110,100,101,120,79,102,40,97,100,100,114,101,115,115,41,41,125,103,114,97,110,116,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,92,34,79,87,78,69,82,92,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,78,111,116,32,97,108,108,111,119,101,100,92,34,41,59,116,104,105,115,46,35,103,114,97,110,116,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,125,114,101,118,111,107,101,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,92,34,79,87,78,69,82,92,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,78,111,116,32,97,108,108,111,119,101,100,92,34,41,59,116,104,105,115,46,35,114,101,118,111,107,101,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,125,125,99,108,97,115,115,32,86,97,108,105,100,97,116,111,114,115,32,101,120,116,101,110,100,115,32,82,111,108,101,115,123,35,110,97,109,101,61,92,34,65,114,116,79,110,108,105,110,101,86,97,108,105,100,97,116,111,114,115,92,34,59,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,61,48,59,35,97,99,116,105,118,101,86,97,108,105,100,97,116,111,114,115,61,48,59,35,118,97,108,105,100,97,116,111,114,115,61,123,125,59,35,99,117,114,114,101,110,99,121,59,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,59,103,101,116,32,115,116,97,116,101,40,41,123,114,101,116,117,114,110,123,46,46,46,115,117,112,101,114,46,115,116,97,116,101,44,109,105,110,105,109,117,109,66,97,108,97,110,99,101,58,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,44,99,117,114,114,101,110,99,121,58,116,104,105,115,46,35,99,117,114,114,101,110,99,121,44,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,58,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,44,97,99,116,105,118,101,86,97,108,105,100,97,116,111,114,115,58,116,104,105,115,46,35,97,99,116,105,118,101,86,97,108,105,100,97,116,111,114,115,44,118,97,108,105,100,97,116,111,114,115,58,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,125,125,99,111,110,115,116,114,117,99,116,111,114,40,116,111,107,101,110,65,100,100,114,101,115,115,44,115,116,97,116,101,41,123,115,117,112,101,114,40,115,116,97,116,101,63,46,114,111,108,101,115,41,44,115,116,97,116,101,63,40,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,61,115,116,97,116,101,46,109,105,110,105,109,117,109,66,97,108,97,110,99,101,44,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,115,116,97,116,101,46,99,117,114,114,101,110,99,121,44,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,61,115,116,97,116,101,46,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,44,116,104,105,115,46,35,97,99,116,105,118,101,86,97,108,105,100,97,116,111,114,115,61,115,116,97,116,101,46,97,99,116,105,118,101,86,97,108,105,100,97,116,111,114,115,44,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,61,115,116,97,116,101,46,118,97,108,105,100,97,116,111,114,115,41,58,40,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,61,53,101,52,44,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,116,111,107,101,110,65,100,100,114,101,115,115,44,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,43,61,49,44,116,104,105,115,46,35,97,99,116,105,118,101,86,97,108,105,100,97,116,111,114,115,43,61,49,44,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,109,115,103,46,115,101,110,100,101,114,93,61,123,102,105,114,115,116,83,101,101,110,58,68,97,116,101,46,110,111,119,40,41,44,108,97,115,116,83,101,101,110,58,68,97,116,101,46,110,111,119,40,41,44,97,99,116,105,118,101,58,33,48,125,41,125,103,101,116,32,110,97,109,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,110,97,109,101,125,103,101,116,32,99,117,114,114,101,110,99,121,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,99,117,114,114,101,110,99,121,125,103,101,116,32,118,97,108,105,100,97,116,111,114,115,40,41,123,114,101,116,117,114,110,123,46,46,46,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,125,125,103,101,116,32,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,125,103,101,116,32,109,105,110,105,109,117,109,66,97,108,97,110,99,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,125,99,104,97,110,103,101,67,117,114,114,101,110,99,121,40,99,117,114,114,101,110,99,121,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,109,115,103,46,115,101,110,100,101,114,44,92,34,79,87,78,69,82,92,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,110,111,116,32,97,110,32,111,119,110,101,114,92,34,41,59,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,99,117,114,114,101,110,99,121,125,104,97,115,40,118,97,108,105,100,97,116,111,114,41,123,114,101,116,117,114,110,32,66,111,111,108,101,97,110,40,118,111,105,100,32,48,33,61,61,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,41,125,35,105,115,65,108,108,111,119,101,100,40,97,100,100,114,101,115,115,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,97,100,100,114,101,115,115,38,38,33,116,104,105,115,46,104,97,115,82,111,108,101,40,109,115,103,46,115,101,110,100,101,114,44,92,34,79,87,78,69,82,92,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,115,101,110,100,101,114,32,105,115,32,110,111,116,32,116,104,101,32,118,97,108,105,100,97,116,111,114,32,111,114,32,111,119,110,101,114,92,34,41,59,114,101,116,117,114,110,33,48,125,97,115,121,110,99,32,97,100,100,86,97,108,105,100,97,116,111,114,40,118,97,108,105,100,97,116,111,114,41,123,105,102,40,116,104,105,115,46,35,105,115,65,108,108,111,119,101,100,40,118,97,108,105,100,97,116,111,114,41,44,116,104,105,115,46,104,97,115,40,118,97,108,105,100,97,116,111,114,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,97,108,114,101,97,100,121,32,97,32,118,97,108,105,100,97,116,111,114,92,34,41,59,99,111,110,115,116,32,98,97,108,97,110,99,101,61,97,119,97,105,116,32,109,115,103,46,115,116,97,116,105,99,67,97,108,108,40,116,104,105,115,46,99,117,114,114,101,110,99,121,44,92,34,98,97,108,97,110,99,101,79,102,92,34,44,91,118,97,108,105,100,97,116,111,114,93,41,59,105,102,40,98,97,108,97,110,99,101,60,116,104,105,115,46,109,105,110,105,109,117,109,66,97,108,97,110,99,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,98,97,108,97,110,99,101,32,116,111,32,108,111,119,33,32,103,111,116,58,32,36,123,98,97,108,97,110,99,101,125,32,110,101,101,100,58,32,36,123,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,125,96,41,59,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,43,61,49,44,116,104,105,115,46,35,97,99,116,105,118,101,86,97,108,105,100,97,116,111,114,115,43,61,49,44,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,61,123,102,105,114,115,116,83,101,101,110,58,68,97,116,101,46,110,111,119,40,41,44,108,97,115,116,83,101,101,110,58,68,97,116,101,46,110,111,119,40,41,44,97,99,116,105,118,101,58,33,48,125,125,114,101,109,111,118,101,86,97,108,105,100,97,116,111,114,40,118,97,108,105,100,97,116,111,114,41,123,105,102,40,116,104,105,115,46,35,105,115,65,108,108,111,119,101,100,40,118,97,108,105,100,97,116,111,114,41,44,33,116,104,105,115,46,104,97,115,40,118,97,108,105,100,97,116,111,114,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,118,97,108,105,100,97,116,111,114,32,110,111,116,32,102,111,117,110,100,92,34,41,59,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,45,61,49,44,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,46,97,99,116,105,118,101,38,38,40,116,104,105,115,46,35,97,99,116,105,118,101,86,97,108,105,100,97,116,111,114,115,45,61,49,41,44,100,101,108,101,116,101,32,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,125,97,115,121,110,99,32,117,112,100,97,116,101,86,97,108,105,100,97,116,111,114,40,118,97,108,105,100,97,116,111,114,44,97,99,116,105,118,101,41,123,105,102,40,116,104,105,115,46,35,105,115,65,108,108,111,119,101,100,40,118,97,108,105,100,97,116,111,114,41,44,33,116,104,105,115,46,104,97,115,40,118,97,108,105,100,97,116,111,114,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,118,97,108,105,100,97,116,111,114,32,110,111,116,32,102,111,117,110,100,92,34,41,59,99,111,110,115,116,32,98,97,108,97,110,99,101,61,97,119,97,105,116,32,109,115,103,46,115,116,97,116,105,99,67,97,108,108,40,116,104,105,115,46,99,117,114,114,101,110,99,121,44,92,34,98,97,108,97,110,99,101,79,102,92,34,44,91,118,97,108,105,100,97,116,111,114,93,41,59,105,102,40,98,97,108,97,110,99,101,60,116,104,105,115,46,109,105,110,105,109,117,109,66,97,108,97,110,99,101,38,38,97,99,116,105,118,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,98,97,108,97,110,99,101,32,116,111,32,108,111,119,33,32,103,111,116,58,32,36,123,98,97,108,97,110,99,101,125,32,110,101,101,100,58,32,36,123,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,125,96,41,59,105,102,40,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,46,97,99,116,105,118,101,61,61,61,97,99,116,105,118,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,97,108,114,101,97,100,121,32,92,34,43,40,97,99,116,105,118,101,63,92,34,97,99,116,105,118,97,116,101,100,92,34,58,92,34,100,101,97,99,116,105,118,97,116,101,100,92,34,41,41,59,97,99,116,105,118,101,63,116,104,105,115,46,35,97,99,116,105,118,101,86,97,108,105,100,97,116,111,114,115,43,61,49,58,116,104,105,115,46,35,97,99,116,105,118,101,86,97,108,105,100,97,116,111,114,115,45,61,49,44,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,46,97,99,116,105,118,101,61,97,99,116,105,118,101,125,125,114,101,116,117,114,110,32,86,97,108,105,100,97,116,111,114,115,59,34,44,34,99,111,110,115,116,114,117,99,116,111,114,80,97,114,97,109,101,116,101,114,115,34,58,91,34,105,104,110,121,50,103,113,104,111,111,99,107,121,103,55,121,103,52,110,53,98,112,120,117,108,100,97,104,102,97,118,112,113,110,109,112,111,101,50,98,110,52,105,118,110,120,109,107,55,114,101,100,99,50,108,116,119,107,98,34,93,125";const v=new o.default,x=w,E=N,M=y,k=B;globalThis.BigNumber=BigNumber,globalThis.peernet=globalThis.peernet||{},globalThis.contracts={};const T=(e,t,r)=>{let s;return s=r?.length>0?contracts[e][t](...r):contracts[e][t],s},q=async e=>{const t=e.decoded.constructorParameters;try{const r=new Function(e.decoded.contract)();globalThis.msg=P(e.decoded.creator),contracts[await e.hash]=await new r(...t),v.postMessage({type:"debug",messages:[`loaded contract: ${await e.hash}`,`size: ${f(e.encoded.length)}`]})}catch(t){console.log(t),v.postMessage({type:"contractError",hash:await e.hash})}},S=async(e,t,r)=>{try{let s;return s=contracts[e].fallback?await contracts[e].fallback(t,r):await contracts[e][t](...r),s}catch(e){throw e}},P=(e=globalThis.peerid)=>({sender:e,call:S,staticCall:T}),_=async e=>{const t=e.id;if("init"===e.type)try{await(async({contracts:e,blocks:t,peerid:r})=>{globalThis.peernet.codecs={"contract-message":{codec:parseInt("63636d",16),hashAlg:"keccak-256"},"transaction-message":{codec:parseInt("746d",16),hashAlg:"keccak-256"},"block-message":{codec:parseInt("626d",16),hashAlg:"keccak-256"}},globalThis.peerid=r,e=[x,E,M,k],e=await Promise.all(e.map((async e=>(e=await new ContractMessage(new Uint8Array(e.split(","))),await q(e),e))));let s={hash:"0x0"};if(t?.length>0){const e=await new o.default("./block-worker.js",{serialization:"advanced",type:"module"});(t=await e.once([t[t.length-1]])).length>0&&(s=t[t.length-1].decoded,s=await new BlockMessage(s),s={...s.decoded,hash:await s.hash}),globalThis.blocks=t}v.postMessage({type:"machine-ready",lastBlock:s})})(e.input)}catch(e){v.postMessage({type:"initError",message:e.message,id:t})}if("get"===e.type)try{const r=await T(e.input.contract,e.input.method,e.input.params);v.postMessage({type:"response",id:t,value:r})}catch(e){v.postMessage({type:"fetchError",message:e.message,id:t})}if("execute"===e.type)try{const r=await S(e.input.contract,e.input.method,e.input.params);v.postMessage({type:"response",id:t,value:r})}catch(e){v.postMessage({type:"executionError",message:e.message,id:t})}};v.onmessage((e=>_(e)));
|
|
1
|
+
"use strict";var e=require("@leofcoin/codec-format-interface"),t=require("bn.js"),r=require("@ethersproject/bytes"),s=require("@ethersproject/logger");require("@ethersproject/bignumber");var n=require("@vandeurenglenn/easy-worker");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(t),o=i(n);class ContractMessage extends e.FormatInterface{get keys(){return["creator","contract","constructorParameters"]}get messageName(){return"ContractMessage"}constructor(e){super(e,"\nmessage ContractMessage {\n required string creator = 1;\n required bytes contract = 2;\n repeated string constructorParameters = 3;\n}\n",{name:"contract-message"})}}class BlockMessage extends e.FormatInterface{get keys(){return["index","previousHash","timestamp","reward","fees","transactions","validators"]}get messageName(){return"BlockMessage"}constructor(e){super(e,"\nmessage ValidatorMessage {\n required string address = 1;\n required string reward = 2;\n}\n\nmessage Transaction {\n required string hash = 1;\n required uint64 timestamp = 2;\n required string from = 3;\n required string to = 4;\n required uint64 nonce = 5;\n required string method = 6;\n repeated string params = 7;\n}\n\nmessage BlockMessage {\n required uint64 index = 1;\n required string previousHash = 3;\n required uint64 timestamp = 4;\n required uint64 reward = 5;\n required string fees = 6;\n repeated Transaction transactions = 7;\n repeated ValidatorMessage validators = 8;\n}\n",{name:"block-message"})}}var u=a.default.BN;const g=new s.Logger("bignumber/5.6.2"),c={};let h=!1;class BigNumber{constructor(e,t){e!==c&&g.throwError("cannot call constructor directly; use BigNumber.from",s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return l(m(this).fromTwos(e))}toTwos(e){return l(m(this).toTwos(e))}abs(){return"-"===this._hex[0]?BigNumber.from(this._hex.substring(1)):this}add(e){return l(m(this).add(m(e)))}sub(e){return l(m(this).sub(m(e)))}div(e){return BigNumber.from(e).isZero()&&p("division-by-zero","div"),l(m(this).div(m(e)))}mul(e){return l(m(this).mul(m(e)))}mod(e){const t=m(e);return t.isNeg()&&p("division-by-zero","mod"),l(m(this).umod(t))}pow(e){const t=m(e);return t.isNeg()&&p("negative-power","pow"),l(m(this).pow(t))}and(e){const t=m(e);return(this.isNegative()||t.isNeg())&&p("unbound-bitwise-result","and"),l(m(this).and(t))}or(e){const t=m(e);return(this.isNegative()||t.isNeg())&&p("unbound-bitwise-result","or"),l(m(this).or(t))}xor(e){const t=m(e);return(this.isNegative()||t.isNeg())&&p("unbound-bitwise-result","xor"),l(m(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&p("negative-width","mask"),l(m(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&p("negative-width","shl"),l(m(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&p("negative-width","shr"),l(m(this).shrn(e))}eq(e){return m(this).eq(m(e))}lt(e){return m(this).lt(m(e))}lte(e){return m(this).lte(m(e))}gt(e){return m(this).gt(m(e))}gte(e){return m(this).gte(m(e))}isNegative(){return"-"===this._hex[0]}isZero(){return m(this).isZero()}toNumber(){try{return m(this).toNumber()}catch(e){p("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return g.throwError("this platform does not support BigInt",s.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?h||(h=!0,g.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?g.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",s.Logger.errors.UNEXPECTED_ARGUMENT,{}):g.throwError("BigNumber.toString does not accept parameters",s.Logger.errors.UNEXPECTED_ARGUMENT,{})),m(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof BigNumber)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new BigNumber(c,d(e)):e.match(/^-?[0-9]+$/)?new BigNumber(c,d(new u(e))):g.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&p("underflow","BigNumber.from",e),(e>=9007199254740991||e<=-9007199254740991)&&p("overflow","BigNumber.from",e),BigNumber.from(String(e));const t=e;if("bigint"==typeof t)return BigNumber.from(t.toString());if(r.isBytes(t))return BigNumber.from(r.hexlify(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"==typeof e)return BigNumber.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&(r.isHexString(e)||"-"===e[0]&&r.isHexString(e.substring(1))))return BigNumber.from(e)}return g.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function d(e){if("string"!=typeof e)return d(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&g.throwArgumentError("invalid hex","value",e),"0x00"===(e=d(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function l(e){return BigNumber.from(d(e))}function m(e){const t=BigNumber.from(e).toHexString();return"-"===t[0]?new u("-"+t.substring(3),16):new u(t.substring(2),16)}function p(e,t,r){const n={fault:e,operation:t};return null!=r&&(n.value=r),g.throwError(e,s.Logger.errors.NUMERIC_FAULT,n)}new s.Logger("units/5.6.1");const b=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],f=(e,t=2)=>{if(0===e)return"0 Bytes";t<0&&(t=0);const r=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,r)).toFixed(t))} ${b[r]}`};var w="237,198,141,3,123,34,99,114,101,97,116,111,114,34,58,34,56,71,85,107,103,52,120,87,113,109,110,83,56,75,101,122,56,107,54,68,115,82,120,90,66,68,97,54,114,71,74,109,104,107,122,67,75,113,78,75,102,85,110,103,90,122,109,54,97,81,34,44,34,99,111,110,116,114,97,99,116,34,58,34,99,108,97,115,115,32,70,97,99,116,111,114,121,123,35,110,97,109,101,61,92,34,65,114,116,79,110,108,105,110,101,67,111,110,116,114,97,99,116,70,97,99,116,111,114,121,92,34,59,35,116,111,116,97,108,67,111,110,116,114,97,99,116,115,61,48,59,35,99,111,110,116,114,97,99,116,115,61,91,93,59,99,111,110,115,116,114,117,99,116,111,114,40,115,116,97,116,101,41,123,115,116,97,116,101,38,38,40,116,104,105,115,46,35,99,111,110,116,114,97,99,116,115,61,115,116,97,116,101,46,99,111,110,116,114,97,99,116,115,44,116,104,105,115,46,35,116,111,116,97,108,67,111,110,116,114,97,99,116,115,61,115,116,97,116,101,46,116,111,116,97,108,67,111,110,116,114,97,99,116,115,41,125,103,101,116,32,115,116,97,116,101,40,41,123,114,101,116,117,114,110,123,116,111,116,97,108,67,111,110,116,114,97,99,116,115,58,116,104,105,115,46,35,116,111,116,97,108,67,111,110,116,114,97,99,116,115,44,99,111,110,116,114,97,99,116,115,58,116,104,105,115,46,35,99,111,110,116,114,97,99,116,115,125,125,103,101,116,32,110,97,109,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,110,97,109,101,125,103,101,116,32,99,111,110,116,114,97,99,116,115,40,41,123,114,101,116,117,114,110,91,46,46,46,116,104,105,115,46,35,99,111,110,116,114,97,99,116,115,93,125,103,101,116,32,116,111,116,97,108,67,111,110,116,114,97,99,116,115,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,116,111,116,97,108,67,111,110,116,114,97,99,116,115,125,97,115,121,110,99,32,114,101,103,105,115,116,101,114,67,111,110,116,114,97,99,116,40,97,100,100,114,101,115,115,41,123,105,102,40,97,119,97,105,116,32,109,115,103,46,115,116,97,116,105,99,67,97,108,108,40,97,100,100,114,101,115,115,44,92,34,104,97,115,82,111,108,101,92,34,44,91,109,115,103,46,115,101,110,100,101,114,44,92,34,79,87,78,69,82,92,34,93,41,44,116,104,105,115,46,35,99,111,110,116,114,97,99,116,115,46,105,110,99,108,117,100,101,115,40,97,100,100,114,101,115,115,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,97,108,114,101,97,100,121,32,114,101,103,105,115,116,101,114,101,100,92,34,41,59,116,104,105,115,46,35,116,111,116,97,108,67,111,110,116,114,97,99,116,115,43,61,49,44,116,104,105,115,46,35,99,111,110,116,114,97,99,116,115,46,112,117,115,104,40,97,100,100,114,101,115,115,41,125,125,114,101,116,117,114,110,32,70,97,99,116,111,114,121,59,34,44,34,99,111,110,115,116,114,117,99,116,111,114,80,97,114,97,109,101,116,101,114,115,34,58,91,93,125",N="237,198,141,3,123,34,99,114,101,97,116,111,114,34,58,34,56,71,85,107,103,52,120,87,113,109,110,83,56,75,101,122,56,107,54,68,115,82,120,90,66,68,97,54,114,71,74,109,104,107,122,67,75,113,78,75,102,85,110,103,90,122,109,54,97,81,34,44,34,99,111,110,116,114,97,99,116,34,58,34,99,108,97,115,115,32,82,111,108,101,115,123,35,114,111,108,101,115,61,123,79,87,78,69,82,58,91,93,44,77,73,78,84,58,91,93,44,66,85,82,78,58,91,93,125,59,99,111,110,115,116,114,117,99,116,111,114,40,114,111,108,101,115,41,123,105,102,40,114,111,108,101,115,41,123,105,102,40,33,40,114,111,108,101,115,32,105,110,115,116,97,110,99,101,111,102,32,79,98,106,101,99,116,41,41,116,104,114,111,119,32,110,101,119,32,84,121,112,101,69,114,114,111,114,40,92,34,101,120,112,101,99,116,101,100,32,114,111,108,101,115,32,116,111,32,98,101,32,97,110,32,111,98,106,101,99,116,92,34,41,59,116,104,105,115,46,35,114,111,108,101,115,61,123,46,46,46,114,111,108,101,115,44,46,46,46,116,104,105,115,46,35,114,111,108,101,115,125,125,101,108,115,101,32,116,104,105,115,46,35,103,114,97,110,116,82,111,108,101,40,109,115,103,46,115,101,110,100,101,114,44,92,34,79,87,78,69,82,92,34,41,125,103,101,116,32,115,116,97,116,101,40,41,123,114,101,116,117,114,110,123,114,111,108,101,115,58,116,104,105,115,46,114,111,108,101,115,125,125,103,101,116,32,114,111,108,101,115,40,41,123,114,101,116,117,114,110,123,46,46,46,116,104,105,115,46,35,114,111,108,101,115,125,125,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,114,101,116,117,114,110,33,33,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,38,38,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,105,110,99,108,117,100,101,115,40,97,100,100,114,101,115,115,41,125,35,103,114,97,110,116,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,36,123,114,111,108,101,125,32,114,111,108,101,32,97,108,114,101,97,100,121,32,103,114,97,110,116,101,100,32,102,111,114,32,36,123,97,100,100,114,101,115,115,125,96,41,59,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,112,117,115,104,40,97,100,100,114,101,115,115,41,125,35,114,101,118,111,107,101,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,36,123,114,111,108,101,125,32,114,111,108,101,32,97,108,114,101,97,100,121,32,114,101,118,111,107,101,100,32,102,111,114,32,36,123,97,100,100,114,101,115,115,125,96,41,59,105,102,40,92,34,79,87,78,69,82,92,34,61,61,61,114,111,108,101,38,38,49,61,61,61,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,108,101,110,103,116,104,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,97,116,108,101,97,115,116,32,111,110,101,32,111,119,110,101,114,32,105,115,32,110,101,101,100,101,100,33,92,34,41,59,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,115,112,108,105,99,101,40,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,105,110,100,101,120,79,102,40,97,100,100,114,101,115,115,41,41,125,103,114,97,110,116,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,92,34,79,87,78,69,82,92,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,78,111,116,32,97,108,108,111,119,101,100,92,34,41,59,116,104,105,115,46,35,103,114,97,110,116,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,125,114,101,118,111,107,101,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,92,34,79,87,78,69,82,92,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,78,111,116,32,97,108,108,111,119,101,100,92,34,41,59,116,104,105,115,46,35,114,101,118,111,107,101,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,125,125,99,108,97,115,115,32,84,111,107,101,110,32,101,120,116,101,110,100,115,32,82,111,108,101,115,123,35,110,97,109,101,59,35,115,121,109,98,111,108,59,35,104,111,108,100,101,114,115,61,48,59,35,98,97,108,97,110,99,101,115,61,123,125,59,35,97,112,112,114,111,118,97,108,115,61,123,125,59,35,100,101,99,105,109,97,108,115,61,49,56,59,35,116,111,116,97,108,83,117,112,112,108,121,61,66,105,103,78,117,109,98,101,114,46,102,114,111,109,40,48,41,59,99,111,110,115,116,114,117,99,116,111,114,40,110,97,109,101,44,115,121,109,98,111,108,44,100,101,99,105,109,97,108,115,61,49,56,44,115,116,97,116,101,41,123,105,102,40,33,110,97,109,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,110,97,109,101,32,117,110,100,101,102,105,110,101,100,92,34,41,59,105,102,40,33,115,121,109,98,111,108,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,115,121,109,98,111,108,32,117,110,100,101,102,105,110,101,100,92,34,41,59,115,117,112,101,114,40,115,116,97,116,101,63,46,114,111,108,101,115,41,44,116,104,105,115,46,35,110,97,109,101,61,110,97,109,101,44,116,104,105,115,46,35,115,121,109,98,111,108,61,115,121,109,98,111,108,44,116,104,105,115,46,35,100,101,99,105,109,97,108,115,61,100,101,99,105,109,97,108,115,125,103,101,116,32,115,116,97,116,101,40,41,123,114,101,116,117,114,110,123,46,46,46,115,117,112,101,114,46,115,116,97,116,101,44,104,111,108,100,101,114,115,58,116,104,105,115,46,104,111,108,100,101,114,115,44,98,97,108,97,110,99,101,115,58,116,104,105,115,46,98,97,108,97,110,99,101,115,44,97,112,112,114,111,118,97,108,115,58,123,46,46,46,116,104,105,115,46,35,97,112,112,114,111,118,97,108,115,125,44,116,111,116,97,108,83,117,112,112,108,121,58,116,104,105,115,46,116,111,116,97,108,83,117,112,112,108,121,125,125,103,101,116,32,116,111,116,97,108,83,117,112,112,108,121,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,116,111,116,97,108,83,117,112,112,108,121,125,103,101,116,32,110,97,109,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,110,97,109,101,125,103,101,116,32,115,121,109,98,111,108,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,115,121,109,98,111,108,125,103,101,116,32,104,111,108,100,101,114,115,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,104,111,108,100,101,114,115,125,103,101,116,32,98,97,108,97,110,99,101,115,40,41,123,114,101,116,117,114,110,123,46,46,46,116,104,105,115,46,35,98,97,108,97,110,99,101,115,125,125,109,105,110,116,40,116,111,44,97,109,111,117,110,116,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,109,115,103,46,115,101,110,100,101,114,44,92,34,77,73,78,84,92,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,110,111,116,32,97,108,108,111,119,101,100,92,34,41,59,116,104,105,115,46,35,116,111,116,97,108,83,117,112,112,108,121,61,116,104,105,115,46,35,116,111,116,97,108,83,117,112,112,108,121,46,97,100,100,40,97,109,111,117,110,116,41,44,116,104,105,115,46,35,105,110,99,114,101,97,115,101,66,97,108,97,110,99,101,40,116,111,44,97,109,111,117,110,116,41,125,98,117,114,110,40,102,114,111,109,44,97,109,111,117,110,116,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,109,115,103,46,115,101,110,100,101,114,44,92,34,66,85,82,78,92,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,110,111,116,32,97,108,108,111,119,101,100,92,34,41,59,116,104,105,115,46,35,116,111,116,97,108,83,117,112,112,108,121,61,116,104,105,115,46,35,116,111,116,97,108,83,117,112,112,108,121,46,115,117,98,40,97,109,111,117,110,116,41,44,116,104,105,115,46,35,100,101,99,114,101,97,115,101,66,97,108,97,110,99,101,40,102,114,111,109,44,97,109,111,117,110,116,41,125,35,98,101,102,111,114,101,84,114,97,110,115,102,101,114,40,102,114,111,109,44,116,111,44,97,109,111,117,110,116,41,123,105,102,40,33,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,102,114,111,109,93,124,124,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,102,114,111,109,93,60,97,109,111,117,110,116,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,97,109,111,117,110,116,32,101,120,99,101,101,100,115,32,98,97,108,97,110,99,101,92,34,41,125,35,117,112,100,97,116,101,72,111,108,100,101,114,115,40,97,100,100,114,101,115,115,44,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,41,123,92,34,48,120,48,48,92,34,61,61,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,46,116,111,72,101,120,83,116,114,105,110,103,40,41,63,116,104,105,115,46,35,104,111,108,100,101,114,115,45,61,49,58,92,34,48,120,48,48,92,34,33,61,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,46,116,111,72,101,120,83,116,114,105,110,103,40,41,38,38,92,34,48,120,48,48,92,34,61,61,61,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,46,116,111,72,101,120,83,116,114,105,110,103,40,41,38,38,40,116,104,105,115,46,35,104,111,108,100,101,114,115,43,61,49,41,125,35,105,110,99,114,101,97,115,101,66,97,108,97,110,99,101,40,97,100,100,114,101,115,115,44,97,109,111,117,110,116,41,123,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,124,124,40,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,61,66,105,103,78,117,109,98,101,114,46,102,114,111,109,40,48,41,41,59,99,111,110,115,116,32,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,59,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,46,97,100,100,40,97,109,111,117,110,116,41,44,116,104,105,115,46,35,117,112,100,97,116,101,72,111,108,100,101,114,115,40,97,100,100,114,101,115,115,44,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,41,125,35,100,101,99,114,101,97,115,101,66,97,108,97,110,99,101,40,97,100,100,114,101,115,115,44,97,109,111,117,110,116,41,123,99,111,110,115,116,32,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,59,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,46,115,117,98,40,97,109,111,117,110,116,41,44,116,104,105,115,46,35,117,112,100,97,116,101,72,111,108,100,101,114,115,40,97,100,100,114,101,115,115,44,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,41,125,98,97,108,97,110,99,101,79,102,40,97,100,100,114,101,115,115,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,125,115,101,116,65,112,112,114,111,118,97,108,40,111,112,101,114,97,116,111,114,44,97,109,111,117,110,116,41,123,99,111,110,115,116,32,111,119,110,101,114,61,103,108,111,98,97,108,84,104,105,115,46,109,115,103,46,115,101,110,100,101,114,59,116,104,105,115,46,35,97,112,112,114,111,118,97,108,115,91,111,119,110,101,114,93,124,124,40,116,104,105,115,46,35,97,112,112,114,111,118,97,108,115,91,111,119,110,101,114,93,61,123,125,41,44,116,104,105,115,46,35,97,112,112,114,111,118,97,108,115,91,111,119,110,101,114,93,91,111,112,101,114,97,116,111,114,93,61,97,109,111,117,110,116,125,97,112,112,114,111,118,101,100,40,111,119,110,101,114,44,111,112,101,114,97,116,111,114,44,97,109,111,117,110,116,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,97,112,112,114,111,118,97,108,115,91,111,119,110,101,114,93,91,111,112,101,114,97,116,111,114,93,61,61,61,97,109,111,117,110,116,125,116,114,97,110,115,102,101,114,40,102,114,111,109,44,116,111,44,97,109,111,117,110,116,41,123,97,109,111,117,110,116,61,66,105,103,78,117,109,98,101,114,46,102,114,111,109,40,97,109,111,117,110,116,41,44,116,104,105,115,46,35,98,101,102,111,114,101,84,114,97,110,115,102,101,114,40,102,114,111,109,44,116,111,44,97,109,111,117,110,116,41,44,116,104,105,115,46,35,100,101,99,114,101,97,115,101,66,97,108,97,110,99,101,40,102,114,111,109,44,97,109,111,117,110,116,41,44,116,104,105,115,46,35,105,110,99,114,101,97,115,101,66,97,108,97,110,99,101,40,116,111,44,97,109,111,117,110,116,41,125,125,99,108,97,115,115,32,65,114,116,79,110,108,105,110,101,32,101,120,116,101,110,100,115,32,84,111,107,101,110,123,99,111,110,115,116,114,117,99,116,111,114,40,115,116,97,116,101,41,123,115,117,112,101,114,40,92,34,65,114,116,79,110,108,105,110,101,92,34,44,92,34,65,82,84,92,34,44,49,56,44,115,116,97,116,101,41,125,125,114,101,116,117,114,110,32,65,114,116,79,110,108,105,110,101,59,34,44,34,99,111,110,115,116,114,117,99,116,111,114,80,97,114,97,109,101,116,101,114,115,34,58,91,93,125",y="237,198,141,3,123,34,99,114,101,97,116,111,114,34,58,34,56,71,85,107,103,52,120,87,113,109,110,83,56,75,101,122,56,107,54,68,115,82,120,90,66,68,97,54,114,71,74,109,104,107,122,67,75,113,78,75,102,85,110,103,90,122,109,54,97,81,34,44,34,99,111,110,116,114,97,99,116,34,58,34,99,108,97,115,115,32,78,97,109,101,83,101,114,118,105,99,101,123,35,110,97,109,101,61,92,34,65,114,116,79,110,108,105,110,101,78,97,109,101,83,101,114,118,105,99,101,92,34,59,35,111,119,110,101,114,59,35,112,114,105,99,101,61,48,59,35,114,101,103,105,115,116,114,121,61,123,125,59,35,99,117,114,114,101,110,99,121,59,103,101,116,32,110,97,109,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,110,97,109,101,125,103,101,116,32,114,101,103,105,115,116,114,121,40,41,123,114,101,116,117,114,110,123,46,46,46,116,104,105,115,46,35,114,101,103,105,115,116,114,121,125,125,103,101,116,32,115,116,97,116,101,40,41,123,125,99,111,110,115,116,114,117,99,116,111,114,40,102,97,99,116,111,114,121,65,100,100,114,101,115,115,44,99,117,114,114,101,110,99,121,44,118,97,108,105,100,97,116,111,114,65,100,100,114,101,115,115,44,112,114,105,99,101,44,115,116,97,116,101,41,123,115,116,97,116,101,63,40,116,104,105,115,46,35,111,119,110,101,114,61,115,116,97,116,101,46,111,119,110,101,114,44,116,104,105,115,46,35,114,101,103,105,115,116,114,121,61,115,116,97,116,101,46,114,101,103,105,115,116,114,121,44,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,115,116,97,116,101,46,99,117,114,114,101,110,99,121,44,116,104,105,115,46,35,112,114,105,99,101,61,115,116,97,116,101,46,112,114,105,99,101,41,58,40,116,104,105,115,46,35,111,119,110,101,114,61,109,115,103,46,115,101,110,100,101,114,44,116,104,105,115,46,35,112,114,105,99,101,61,112,114,105,99,101,44,116,104,105,115,46,35,114,101,103,105,115,116,114,121,46,65,114,116,79,110,108,105,110,101,67,111,110,116,114,97,99,116,70,97,99,116,111,114,121,61,123,111,119,110,101,114,58,109,115,103,46,115,101,110,100,101,114,44,97,100,100,114,101,115,115,58,102,97,99,116,111,114,121,65,100,100,114,101,115,115,125,44,116,104,105,115,46,35,114,101,103,105,115,116,114,121,46,65,114,116,79,110,108,105,110,101,84,111,107,101,110,61,123,111,119,110,101,114,58,109,115,103,46,115,101,110,100,101,114,44,97,100,100,114,101,115,115,58,99,117,114,114,101,110,99,121,125,44,116,104,105,115,46,35,114,101,103,105,115,116,114,121,46,65,114,116,79,110,108,105,110,101,86,97,108,105,100,97,116,111,114,115,61,123,111,119,110,101,114,58,109,115,103,46,115,101,110,100,101,114,44,97,100,100,114,101,115,115,58,118,97,108,105,100,97,116,111,114,65,100,100,114,101,115,115,125,44,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,99,117,114,114,101,110,99,121,41,125,99,104,97,110,103,101,79,119,110,101,114,40,111,119,110,101,114,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,110,111,32,111,119,110,101,114,92,34,41,59,116,104,105,115,46,35,111,119,110,101,114,61,111,119,110,101,114,125,99,104,97,110,103,101,80,114,105,99,101,40,112,114,105,99,101,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,110,111,32,111,119,110,101,114,92,34,41,59,116,104,105,115,46,35,112,114,105,99,101,61,112,114,105,99,101,125,99,104,97,110,103,101,67,117,114,114,101,110,99,121,40,99,117,114,114,101,110,99,121,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,110,111,32,111,119,110,101,114,92,34,41,59,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,99,117,114,114,101,110,99,121,125,97,115,121,110,99,32,112,117,114,99,104,97,115,101,78,97,109,101,40,110,97,109,101,44,97,100,100,114,101,115,115,41,123,105,102,40,97,119,97,105,116,32,109,115,103,46,99,97,108,108,40,116,104,105,115,46,35,99,117,114,114,101,110,99,121,44,92,34,98,97,108,97,110,99,101,79,102,92,34,44,91,109,115,103,46,115,101,110,100,101,114,93,41,60,116,104,105,115,46,35,112,114,105,99,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,112,114,105,99,101,32,101,120,99,101,101,100,115,32,98,97,108,97,110,99,101,92,34,41,59,116,114,121,123,97,119,97,105,116,32,109,115,103,46,99,97,108,108,40,116,104,105,115,46,35,99,117,114,114,101,110,99,121,44,92,34,116,114,97,110,115,102,101,114,92,34,44,91,109,115,103,46,115,101,110,100,101,114,44,116,104,105,115,46,35,111,119,110,101,114,44,116,104,105,115,46,35,112,114,105,99,101,93,41,125,99,97,116,99,104,40,101,114,114,111,114,41,123,116,104,114,111,119,32,101,114,114,111,114,125,116,104,105,115,46,35,114,101,103,105,115,116,114,121,91,110,97,109,101,93,61,123,111,119,110,101,114,58,109,115,103,46,115,101,110,100,101,114,44,97,100,100,114,101,115,115,125,125,108,111,111,107,117,112,40,110,97,109,101,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,114,101,103,105,115,116,114,121,91,110,97,109,101,93,125,116,114,97,110,115,102,101,114,79,119,110,101,114,115,104,105,112,40,110,97,109,101,44,116,111,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,114,101,103,105,115,116,114,121,46,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,110,111,116,32,97,32,111,119,110,101,114,92,34,41,59,116,104,105,115,46,35,114,101,103,105,115,116,114,121,91,110,97,109,101,93,46,111,119,110,101,114,61,116,111,125,99,104,97,110,103,101,65,100,100,114,101,115,115,40,110,97,109,101,44,97,100,100,114,101,115,115,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,114,101,103,105,115,116,114,121,46,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,110,111,116,32,97,32,111,119,110,101,114,92,34,41,59,116,104,105,115,46,35,114,101,103,105,115,116,114,121,91,110,97,109,101,93,46,97,100,100,114,101,115,115,61,97,100,100,114,101,115,115,125,125,114,101,116,117,114,110,32,78,97,109,101,83,101,114,118,105,99,101,59,34,44,34,99,111,110,115,116,114,117,99,116,111,114,80,97,114,97,109,101,116,101,114,115,34,58,91,34,105,104,110,121,50,103,113,103,54,99,54,109,119,121,53,109,104,98,114,115,53,117,108,107,107,111,122,115,103,119,116,107,53,118,117,122,53,107,114,106,105,100,111,117,121,52,109,98,119,102,100,98,106,110,98,109,107,122,122,34,44,34,105,104,110,121,50,103,113,104,111,111,99,107,121,103,55,121,103,52,110,53,98,112,120,117,108,100,97,104,102,97,118,112,113,110,109,112,111,101,50,98,110,52,105,118,110,120,109,107,55,114,101,100,99,50,108,116,119,107,98,34,44,34,105,104,110,121,50,103,113,104,52,101,50,112,114,52,112,98,116,112,107,97,109,104,106,51,104,116,115,118,117,111,121,100,121,51,119,111,116,97,117,100,111,101,97,107,116,103,99,100,119,109,111,105,106,54,54,112,101,99,112,34,44,34,49,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,34,93,125",B="237,198,141,3,123,34,99,114,101,97,116,111,114,34,58,34,56,71,85,107,103,52,120,87,113,109,110,83,56,75,101,122,56,107,54,68,115,82,120,90,66,68,97,54,114,71,74,109,104,107,122,67,75,113,78,75,102,85,110,103,90,122,109,54,97,81,34,44,34,99,111,110,116,114,97,99,116,34,58,34,99,108,97,115,115,32,82,111,108,101,115,123,35,114,111,108,101,115,61,123,79,87,78,69,82,58,91,93,44,77,73,78,84,58,91,93,44,66,85,82,78,58,91,93,125,59,99,111,110,115,116,114,117,99,116,111,114,40,114,111,108,101,115,41,123,105,102,40,114,111,108,101,115,41,123,105,102,40,33,40,114,111,108,101,115,32,105,110,115,116,97,110,99,101,111,102,32,79,98,106,101,99,116,41,41,116,104,114,111,119,32,110,101,119,32,84,121,112,101,69,114,114,111,114,40,92,34,101,120,112,101,99,116,101,100,32,114,111,108,101,115,32,116,111,32,98,101,32,97,110,32,111,98,106,101,99,116,92,34,41,59,116,104,105,115,46,35,114,111,108,101,115,61,123,46,46,46,114,111,108,101,115,44,46,46,46,116,104,105,115,46,35,114,111,108,101,115,125,125,101,108,115,101,32,116,104,105,115,46,35,103,114,97,110,116,82,111,108,101,40,109,115,103,46,115,101,110,100,101,114,44,92,34,79,87,78,69,82,92,34,41,125,103,101,116,32,115,116,97,116,101,40,41,123,114,101,116,117,114,110,123,114,111,108,101,115,58,116,104,105,115,46,114,111,108,101,115,125,125,103,101,116,32,114,111,108,101,115,40,41,123,114,101,116,117,114,110,123,46,46,46,116,104,105,115,46,35,114,111,108,101,115,125,125,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,114,101,116,117,114,110,33,33,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,38,38,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,105,110,99,108,117,100,101,115,40,97,100,100,114,101,115,115,41,125,35,103,114,97,110,116,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,36,123,114,111,108,101,125,32,114,111,108,101,32,97,108,114,101,97,100,121,32,103,114,97,110,116,101,100,32,102,111,114,32,36,123,97,100,100,114,101,115,115,125,96,41,59,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,112,117,115,104,40,97,100,100,114,101,115,115,41,125,35,114,101,118,111,107,101,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,36,123,114,111,108,101,125,32,114,111,108,101,32,97,108,114,101,97,100,121,32,114,101,118,111,107,101,100,32,102,111,114,32,36,123,97,100,100,114,101,115,115,125,96,41,59,105,102,40,92,34,79,87,78,69,82,92,34,61,61,61,114,111,108,101,38,38,49,61,61,61,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,108,101,110,103,116,104,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,97,116,108,101,97,115,116,32,111,110,101,32,111,119,110,101,114,32,105,115,32,110,101,101,100,101,100,33,92,34,41,59,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,115,112,108,105,99,101,40,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,105,110,100,101,120,79,102,40,97,100,100,114,101,115,115,41,41,125,103,114,97,110,116,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,92,34,79,87,78,69,82,92,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,78,111,116,32,97,108,108,111,119,101,100,92,34,41,59,116,104,105,115,46,35,103,114,97,110,116,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,125,114,101,118,111,107,101,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,92,34,79,87,78,69,82,92,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,78,111,116,32,97,108,108,111,119,101,100,92,34,41,59,116,104,105,115,46,35,114,101,118,111,107,101,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,125,125,99,108,97,115,115,32,86,97,108,105,100,97,116,111,114,115,32,101,120,116,101,110,100,115,32,82,111,108,101,115,123,35,110,97,109,101,61,92,34,65,114,116,79,110,108,105,110,101,86,97,108,105,100,97,116,111,114,115,92,34,59,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,61,48,59,35,97,99,116,105,118,101,86,97,108,105,100,97,116,111,114,115,61,48,59,35,118,97,108,105,100,97,116,111,114,115,61,123,125,59,35,99,117,114,114,101,110,99,121,59,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,59,103,101,116,32,115,116,97,116,101,40,41,123,114,101,116,117,114,110,123,46,46,46,115,117,112,101,114,46,115,116,97,116,101,44,109,105,110,105,109,117,109,66,97,108,97,110,99,101,58,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,44,99,117,114,114,101,110,99,121,58,116,104,105,115,46,35,99,117,114,114,101,110,99,121,44,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,58,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,44,97,99,116,105,118,101,86,97,108,105,100,97,116,111,114,115,58,116,104,105,115,46,35,97,99,116,105,118,101,86,97,108,105,100,97,116,111,114,115,44,118,97,108,105,100,97,116,111,114,115,58,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,125,125,99,111,110,115,116,114,117,99,116,111,114,40,116,111,107,101,110,65,100,100,114,101,115,115,44,115,116,97,116,101,41,123,115,117,112,101,114,40,115,116,97,116,101,63,46,114,111,108,101,115,41,44,115,116,97,116,101,63,40,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,61,115,116,97,116,101,46,109,105,110,105,109,117,109,66,97,108,97,110,99,101,44,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,115,116,97,116,101,46,99,117,114,114,101,110,99,121,44,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,61,115,116,97,116,101,46,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,44,116,104,105,115,46,35,97,99,116,105,118,101,86,97,108,105,100,97,116,111,114,115,61,115,116,97,116,101,46,97,99,116,105,118,101,86,97,108,105,100,97,116,111,114,115,44,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,61,115,116,97,116,101,46,118,97,108,105,100,97,116,111,114,115,41,58,40,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,61,53,101,52,44,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,116,111,107,101,110,65,100,100,114,101,115,115,44,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,43,61,49,44,116,104,105,115,46,35,97,99,116,105,118,101,86,97,108,105,100,97,116,111,114,115,43,61,49,44,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,109,115,103,46,115,101,110,100,101,114,93,61,123,102,105,114,115,116,83,101,101,110,58,68,97,116,101,46,110,111,119,40,41,44,108,97,115,116,83,101,101,110,58,68,97,116,101,46,110,111,119,40,41,44,97,99,116,105,118,101,58,33,48,125,41,125,103,101,116,32,110,97,109,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,110,97,109,101,125,103,101,116,32,99,117,114,114,101,110,99,121,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,99,117,114,114,101,110,99,121,125,103,101,116,32,118,97,108,105,100,97,116,111,114,115,40,41,123,114,101,116,117,114,110,123,46,46,46,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,125,125,103,101,116,32,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,125,103,101,116,32,109,105,110,105,109,117,109,66,97,108,97,110,99,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,125,99,104,97,110,103,101,67,117,114,114,101,110,99,121,40,99,117,114,114,101,110,99,121,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,109,115,103,46,115,101,110,100,101,114,44,92,34,79,87,78,69,82,92,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,110,111,116,32,97,110,32,111,119,110,101,114,92,34,41,59,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,99,117,114,114,101,110,99,121,125,104,97,115,40,118,97,108,105,100,97,116,111,114,41,123,114,101,116,117,114,110,32,66,111,111,108,101,97,110,40,118,111,105,100,32,48,33,61,61,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,41,125,35,105,115,65,108,108,111,119,101,100,40,97,100,100,114,101,115,115,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,97,100,100,114,101,115,115,38,38,33,116,104,105,115,46,104,97,115,82,111,108,101,40,109,115,103,46,115,101,110,100,101,114,44,92,34,79,87,78,69,82,92,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,115,101,110,100,101,114,32,105,115,32,110,111,116,32,116,104,101,32,118,97,108,105,100,97,116,111,114,32,111,114,32,111,119,110,101,114,92,34,41,59,114,101,116,117,114,110,33,48,125,97,115,121,110,99,32,97,100,100,86,97,108,105,100,97,116,111,114,40,118,97,108,105,100,97,116,111,114,41,123,105,102,40,116,104,105,115,46,35,105,115,65,108,108,111,119,101,100,40,118,97,108,105,100,97,116,111,114,41,44,116,104,105,115,46,104,97,115,40,118,97,108,105,100,97,116,111,114,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,97,108,114,101,97,100,121,32,97,32,118,97,108,105,100,97,116,111,114,92,34,41,59,99,111,110,115,116,32,98,97,108,97,110,99,101,61,97,119,97,105,116,32,109,115,103,46,115,116,97,116,105,99,67,97,108,108,40,116,104,105,115,46,99,117,114,114,101,110,99,121,44,92,34,98,97,108,97,110,99,101,79,102,92,34,44,91,118,97,108,105,100,97,116,111,114,93,41,59,105,102,40,98,97,108,97,110,99,101,60,116,104,105,115,46,109,105,110,105,109,117,109,66,97,108,97,110,99,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,98,97,108,97,110,99,101,32,116,111,32,108,111,119,33,32,103,111,116,58,32,36,123,98,97,108,97,110,99,101,125,32,110,101,101,100,58,32,36,123,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,125,96,41,59,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,43,61,49,44,116,104,105,115,46,35,97,99,116,105,118,101,86,97,108,105,100,97,116,111,114,115,43,61,49,44,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,61,123,102,105,114,115,116,83,101,101,110,58,68,97,116,101,46,110,111,119,40,41,44,108,97,115,116,83,101,101,110,58,68,97,116,101,46,110,111,119,40,41,44,97,99,116,105,118,101,58,33,48,125,125,114,101,109,111,118,101,86,97,108,105,100,97,116,111,114,40,118,97,108,105,100,97,116,111,114,41,123,105,102,40,116,104,105,115,46,35,105,115,65,108,108,111,119,101,100,40,118,97,108,105,100,97,116,111,114,41,44,33,116,104,105,115,46,104,97,115,40,118,97,108,105,100,97,116,111,114,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,118,97,108,105,100,97,116,111,114,32,110,111,116,32,102,111,117,110,100,92,34,41,59,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,45,61,49,44,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,46,97,99,116,105,118,101,38,38,40,116,104,105,115,46,35,97,99,116,105,118,101,86,97,108,105,100,97,116,111,114,115,45,61,49,41,44,100,101,108,101,116,101,32,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,125,97,115,121,110,99,32,117,112,100,97,116,101,86,97,108,105,100,97,116,111,114,40,118,97,108,105,100,97,116,111,114,44,97,99,116,105,118,101,41,123,105,102,40,116,104,105,115,46,35,105,115,65,108,108,111,119,101,100,40,118,97,108,105,100,97,116,111,114,41,44,33,116,104,105,115,46,104,97,115,40,118,97,108,105,100,97,116,111,114,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,118,97,108,105,100,97,116,111,114,32,110,111,116,32,102,111,117,110,100,92,34,41,59,99,111,110,115,116,32,98,97,108,97,110,99,101,61,97,119,97,105,116,32,109,115,103,46,115,116,97,116,105,99,67,97,108,108,40,116,104,105,115,46,99,117,114,114,101,110,99,121,44,92,34,98,97,108,97,110,99,101,79,102,92,34,44,91,118,97,108,105,100,97,116,111,114,93,41,59,105,102,40,98,97,108,97,110,99,101,60,116,104,105,115,46,109,105,110,105,109,117,109,66,97,108,97,110,99,101,38,38,97,99,116,105,118,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,98,97,108,97,110,99,101,32,116,111,32,108,111,119,33,32,103,111,116,58,32,36,123,98,97,108,97,110,99,101,125,32,110,101,101,100,58,32,36,123,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,125,96,41,59,105,102,40,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,46,97,99,116,105,118,101,61,61,61,97,99,116,105,118,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,92,34,97,108,114,101,97,100,121,32,92,34,43,40,97,99,116,105,118,101,63,92,34,97,99,116,105,118,97,116,101,100,92,34,58,92,34,100,101,97,99,116,105,118,97,116,101,100,92,34,41,41,59,97,99,116,105,118,101,63,116,104,105,115,46,35,97,99,116,105,118,101,86,97,108,105,100,97,116,111,114,115,43,61,49,58,116,104,105,115,46,35,97,99,116,105,118,101,86,97,108,105,100,97,116,111,114,115,45,61,49,44,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,46,97,99,116,105,118,101,61,97,99,116,105,118,101,125,125,114,101,116,117,114,110,32,86,97,108,105,100,97,116,111,114,115,59,34,44,34,99,111,110,115,116,114,117,99,116,111,114,80,97,114,97,109,101,116,101,114,115,34,58,91,34,105,104,110,121,50,103,113,104,111,111,99,107,121,103,55,121,103,52,110,53,98,112,120,117,108,100,97,104,102,97,118,112,113,110,109,112,111,101,50,98,110,52,105,118,110,120,109,107,55,114,101,100,99,50,108,116,119,107,98,34,93,125";const v=new o.default,x=w,M=N,E=y,k=B;globalThis.BigNumber=BigNumber,globalThis.peernet=globalThis.peernet||{},globalThis.contracts={};const T=(e,t,r)=>{let s;return s=r?.length>0?contracts[e][t](...r):contracts[e][t],s},q=async({decoded:e,hash:t,encoded:r})=>{const s=e.constructorParameters;try{const n=new Function(e.contract)();globalThis.msg=P(e.creator),contracts[t]=await new n(...s),v.postMessage({type:"debug",messages:[`loaded contract: ${t}`,`size: ${f(r.length)}`]})}catch(e){console.log(e),v.postMessage({type:"contractError",hash:await contractMessage.hash})}},S=async(e,t,r)=>{try{let s;return s=contracts[e].fallback?await contracts[e].fallback(t,r):await contracts[e][t](...r),s}catch(e){throw e}},P=(e=globalThis.peerid)=>({sender:e,call:S,staticCall:T}),_=async e=>{const t=e.id;if("init"===e.type)try{await(async({contracts:e,blocks:t,peerid:r})=>{globalThis.peernet.codecs={"contract-message":{codec:parseInt("63636d",16),hashAlg:"keccak-256"},"transaction-message":{codec:parseInt("746d",16),hashAlg:"keccak-256"},"block-message":{codec:parseInt("626d",16),hashAlg:"keccak-256"}},globalThis.peerid=r,e=[x,M,E,k],e=await Promise.all(e.map((async e=>(e=await new ContractMessage(new Uint8Array(e.split(","))),await q({decoded:e.decoded,encoded:e.encoded,hash:await e.hash}),e))));let s={hash:"0x0"};if(t?.length>0){const e=await new o.default("./block-worker.js",{serialization:"advanced",type:"module"});(t=await e.once([t[t.length-1]])).length>0&&(s=t[t.length-1].decoded,s=await new BlockMessage(s),s={...s.decoded,hash:await s.hash}),globalThis.blocks=t}v.postMessage({type:"machine-ready",lastBlock:s})})(e.input)}catch(e){v.postMessage({type:"initError",message:e.message,id:t})}if("run"===e.type)try{const r=await q(e.input);v.postMessage({type:"response",id:t,value:r})}catch(e){v.postMessage({type:"fetchError",message:e.message,id:t})}if("get"===e.type)try{const r=await T(e.input.contract,e.input.method,e.input.params);v.postMessage({type:"response",id:t,value:r})}catch(e){v.postMessage({type:"fetchError",message:e.message,id:t})}if("execute"===e.type)try{const r=await S(e.input.contract,e.input.method,e.input.params);v.postMessage({type:"response",id:t,value:r})}catch(e){v.postMessage({type:"executionError",message:e.message,id:t})}};v.onmessage((e=>_(e)));
|
package/package.json
CHANGED
package/src/machine.js
CHANGED
|
@@ -86,22 +86,26 @@ export default class Machine {
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
async #runContract(contractMessage) {
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
89
|
+
const hash = await contractMessage.hash
|
|
90
|
+
return new Promise((resolve, reject) => {
|
|
91
|
+
const id = randomBytes(20).toString('hex')
|
|
92
|
+
const onmessage = message => {
|
|
93
|
+
pubsub.unsubscribe(id, onmessage)
|
|
94
|
+
if (message?.error) reject(message.error)
|
|
95
|
+
else resolve(message)
|
|
96
|
+
}
|
|
97
|
+
pubsub.subscribe(id, onmessage)
|
|
98
|
+
this.worker.postMessage({
|
|
99
|
+
type: 'run',
|
|
100
|
+
id,
|
|
101
|
+
input: {
|
|
102
|
+
decoded: contractMessage.decoded,
|
|
103
|
+
encoded: contractMessage.encoded,
|
|
104
|
+
hash
|
|
105
|
+
}
|
|
106
|
+
})
|
|
107
|
+
})
|
|
108
|
+
|
|
105
109
|
}
|
|
106
110
|
/**
|
|
107
111
|
* @params {ContractMessage} - contractMessage
|