waves_lib 0.1.0
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.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/.rubocop.yml +22 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/LICENSE.txt +19 -0
- data/README.md +39 -0
- data/Rakefile +12 -0
- data/js/node_modules/@protobufjs/aspromise/LICENSE +26 -0
- data/js/node_modules/@protobufjs/aspromise/README.md +13 -0
- data/js/node_modules/@protobufjs/aspromise/index.d.ts +13 -0
- data/js/node_modules/@protobufjs/aspromise/index.js +52 -0
- data/js/node_modules/@protobufjs/aspromise/package.json +21 -0
- data/js/node_modules/@protobufjs/aspromise/tests/index.js +130 -0
- data/js/node_modules/@protobufjs/base64/LICENSE +26 -0
- data/js/node_modules/@protobufjs/base64/README.md +19 -0
- data/js/node_modules/@protobufjs/base64/index.d.ts +32 -0
- data/js/node_modules/@protobufjs/base64/index.js +139 -0
- data/js/node_modules/@protobufjs/base64/package.json +21 -0
- data/js/node_modules/@protobufjs/base64/tests/index.js +46 -0
- data/js/node_modules/@protobufjs/codegen/LICENSE +26 -0
- data/js/node_modules/@protobufjs/codegen/README.md +49 -0
- data/js/node_modules/@protobufjs/codegen/index.d.ts +31 -0
- data/js/node_modules/@protobufjs/codegen/index.js +99 -0
- data/js/node_modules/@protobufjs/codegen/package.json +13 -0
- data/js/node_modules/@protobufjs/codegen/tests/index.js +13 -0
- data/js/node_modules/@protobufjs/eventemitter/LICENSE +26 -0
- data/js/node_modules/@protobufjs/eventemitter/README.md +22 -0
- data/js/node_modules/@protobufjs/eventemitter/index.d.ts +43 -0
- data/js/node_modules/@protobufjs/eventemitter/index.js +76 -0
- data/js/node_modules/@protobufjs/eventemitter/package.json +21 -0
- data/js/node_modules/@protobufjs/eventemitter/tests/index.js +47 -0
- data/js/node_modules/@protobufjs/fetch/LICENSE +26 -0
- data/js/node_modules/@protobufjs/fetch/README.md +13 -0
- data/js/node_modules/@protobufjs/fetch/index.d.ts +56 -0
- data/js/node_modules/@protobufjs/fetch/index.js +115 -0
- data/js/node_modules/@protobufjs/fetch/package.json +25 -0
- data/js/node_modules/@protobufjs/fetch/tests/index.js +16 -0
- data/js/node_modules/@protobufjs/float/LICENSE +26 -0
- data/js/node_modules/@protobufjs/float/README.md +102 -0
- data/js/node_modules/@protobufjs/float/bench/index.js +87 -0
- data/js/node_modules/@protobufjs/float/bench/suite.js +46 -0
- data/js/node_modules/@protobufjs/float/index.d.ts +83 -0
- data/js/node_modules/@protobufjs/float/index.js +335 -0
- data/js/node_modules/@protobufjs/float/package.json +26 -0
- data/js/node_modules/@protobufjs/float/tests/index.js +100 -0
- data/js/node_modules/@protobufjs/inquire/LICENSE +26 -0
- data/js/node_modules/@protobufjs/inquire/README.md +13 -0
- data/js/node_modules/@protobufjs/inquire/index.d.ts +9 -0
- data/js/node_modules/@protobufjs/inquire/index.js +17 -0
- data/js/node_modules/@protobufjs/inquire/package.json +21 -0
- data/js/node_modules/@protobufjs/inquire/tests/data/array.js +1 -0
- data/js/node_modules/@protobufjs/inquire/tests/data/emptyArray.js +1 -0
- data/js/node_modules/@protobufjs/inquire/tests/data/emptyObject.js +1 -0
- data/js/node_modules/@protobufjs/inquire/tests/data/object.js +1 -0
- data/js/node_modules/@protobufjs/inquire/tests/index.js +20 -0
- data/js/node_modules/@protobufjs/path/LICENSE +26 -0
- data/js/node_modules/@protobufjs/path/README.md +19 -0
- data/js/node_modules/@protobufjs/path/index.d.ts +22 -0
- data/js/node_modules/@protobufjs/path/index.js +65 -0
- data/js/node_modules/@protobufjs/path/package.json +21 -0
- data/js/node_modules/@protobufjs/path/tests/index.js +60 -0
- data/js/node_modules/@protobufjs/pool/LICENSE +26 -0
- data/js/node_modules/@protobufjs/pool/README.md +13 -0
- data/js/node_modules/@protobufjs/pool/index.d.ts +32 -0
- data/js/node_modules/@protobufjs/pool/index.js +48 -0
- data/js/node_modules/@protobufjs/pool/package.json +21 -0
- data/js/node_modules/@protobufjs/pool/tests/index.js +33 -0
- data/js/node_modules/@protobufjs/utf8/LICENSE +26 -0
- data/js/node_modules/@protobufjs/utf8/README.md +20 -0
- data/js/node_modules/@protobufjs/utf8/index.d.ts +24 -0
- data/js/node_modules/@protobufjs/utf8/index.js +105 -0
- data/js/node_modules/@protobufjs/utf8/package.json +21 -0
- data/js/node_modules/@protobufjs/utf8/tests/data/utf8.txt +216 -0
- data/js/node_modules/@protobufjs/utf8/tests/index.js +57 -0
- data/js/node_modules/@types/base64-js/LICENSE +21 -0
- data/js/node_modules/@types/base64-js/README.md +16 -0
- data/js/node_modules/@types/base64-js/index.d.ts +23 -0
- data/js/node_modules/@types/base64-js/package.json +29 -0
- data/js/node_modules/@types/long/LICENSE +21 -0
- data/js/node_modules/@types/long/README.md +16 -0
- data/js/node_modules/@types/long/index.d.ts +389 -0
- data/js/node_modules/@types/long/package.json +25 -0
- data/js/node_modules/@types/node/LICENSE +21 -0
- data/js/node_modules/@types/node/README.md +16 -0
- data/js/node_modules/@types/node/assert/strict.d.ts +8 -0
- data/js/node_modules/@types/node/assert.d.ts +972 -0
- data/js/node_modules/@types/node/async_hooks.d.ts +530 -0
- data/js/node_modules/@types/node/buffer.d.ts +2354 -0
- data/js/node_modules/@types/node/child_process.d.ts +1395 -0
- data/js/node_modules/@types/node/cluster.d.ts +414 -0
- data/js/node_modules/@types/node/console.d.ts +412 -0
- data/js/node_modules/@types/node/constants.d.ts +18 -0
- data/js/node_modules/@types/node/crypto.d.ts +3978 -0
- data/js/node_modules/@types/node/dgram.d.ts +545 -0
- data/js/node_modules/@types/node/diagnostics_channel.d.ts +191 -0
- data/js/node_modules/@types/node/dns/promises.d.ts +414 -0
- data/js/node_modules/@types/node/dns.d.ts +668 -0
- data/js/node_modules/@types/node/dom-events.d.ts +126 -0
- data/js/node_modules/@types/node/domain.d.ts +170 -0
- data/js/node_modules/@types/node/events.d.ts +724 -0
- data/js/node_modules/@types/node/fs/promises.d.ts +1190 -0
- data/js/node_modules/@types/node/fs.d.ts +4044 -0
- data/js/node_modules/@types/node/globals.d.ts +303 -0
- data/js/node_modules/@types/node/globals.global.d.ts +1 -0
- data/js/node_modules/@types/node/http.d.ts +1724 -0
- data/js/node_modules/@types/node/http2.d.ts +2129 -0
- data/js/node_modules/@types/node/https.d.ts +441 -0
- data/js/node_modules/@types/node/index.d.ts +134 -0
- data/js/node_modules/@types/node/inspector.d.ts +2748 -0
- data/js/node_modules/@types/node/module.d.ts +129 -0
- data/js/node_modules/@types/node/net.d.ts +888 -0
- data/js/node_modules/@types/node/os.d.ts +477 -0
- data/js/node_modules/@types/node/package.json +237 -0
- data/js/node_modules/@types/node/path.d.ts +191 -0
- data/js/node_modules/@types/node/perf_hooks.d.ts +638 -0
- data/js/node_modules/@types/node/process.d.ts +1494 -0
- data/js/node_modules/@types/node/punycode.d.ts +117 -0
- data/js/node_modules/@types/node/querystring.d.ts +131 -0
- data/js/node_modules/@types/node/readline/promises.d.ts +145 -0
- data/js/node_modules/@types/node/readline.d.ts +526 -0
- data/js/node_modules/@types/node/repl.d.ts +424 -0
- data/js/node_modules/@types/node/stream/consumers.d.ts +12 -0
- data/js/node_modules/@types/node/stream/promises.d.ts +42 -0
- data/js/node_modules/@types/node/stream/web.d.ts +330 -0
- data/js/node_modules/@types/node/stream.d.ts +1421 -0
- data/js/node_modules/@types/node/string_decoder.d.ts +67 -0
- data/js/node_modules/@types/node/test.d.ts +1383 -0
- data/js/node_modules/@types/node/timers/promises.d.ts +93 -0
- data/js/node_modules/@types/node/timers.d.ts +215 -0
- data/js/node_modules/@types/node/tls.d.ts +1130 -0
- data/js/node_modules/@types/node/trace_events.d.ts +182 -0
- data/js/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- data/js/node_modules/@types/node/ts4.8/assert.d.ts +972 -0
- data/js/node_modules/@types/node/ts4.8/async_hooks.d.ts +530 -0
- data/js/node_modules/@types/node/ts4.8/buffer.d.ts +2354 -0
- data/js/node_modules/@types/node/ts4.8/child_process.d.ts +1395 -0
- data/js/node_modules/@types/node/ts4.8/cluster.d.ts +414 -0
- data/js/node_modules/@types/node/ts4.8/console.d.ts +412 -0
- data/js/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
- data/js/node_modules/@types/node/ts4.8/crypto.d.ts +3977 -0
- data/js/node_modules/@types/node/ts4.8/dgram.d.ts +545 -0
- data/js/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
- data/js/node_modules/@types/node/ts4.8/dns/promises.d.ts +414 -0
- data/js/node_modules/@types/node/ts4.8/dns.d.ts +668 -0
- data/js/node_modules/@types/node/ts4.8/dom-events.d.ts +126 -0
- data/js/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- data/js/node_modules/@types/node/ts4.8/events.d.ts +724 -0
- data/js/node_modules/@types/node/ts4.8/fs/promises.d.ts +1189 -0
- data/js/node_modules/@types/node/ts4.8/fs.d.ts +4044 -0
- data/js/node_modules/@types/node/ts4.8/globals.d.ts +303 -0
- data/js/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- data/js/node_modules/@types/node/ts4.8/http.d.ts +1724 -0
- data/js/node_modules/@types/node/ts4.8/http2.d.ts +2129 -0
- data/js/node_modules/@types/node/ts4.8/https.d.ts +441 -0
- data/js/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- data/js/node_modules/@types/node/ts4.8/inspector.d.ts +2748 -0
- data/js/node_modules/@types/node/ts4.8/module.d.ts +129 -0
- data/js/node_modules/@types/node/ts4.8/net.d.ts +888 -0
- data/js/node_modules/@types/node/ts4.8/os.d.ts +477 -0
- data/js/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- data/js/node_modules/@types/node/ts4.8/perf_hooks.d.ts +638 -0
- data/js/node_modules/@types/node/ts4.8/process.d.ts +1494 -0
- data/js/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- data/js/node_modules/@types/node/ts4.8/querystring.d.ts +131 -0
- data/js/node_modules/@types/node/ts4.8/readline/promises.d.ts +145 -0
- data/js/node_modules/@types/node/ts4.8/readline.d.ts +526 -0
- data/js/node_modules/@types/node/ts4.8/repl.d.ts +424 -0
- data/js/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- data/js/node_modules/@types/node/ts4.8/stream/promises.d.ts +42 -0
- data/js/node_modules/@types/node/ts4.8/stream/web.d.ts +330 -0
- data/js/node_modules/@types/node/ts4.8/stream.d.ts +1392 -0
- data/js/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- data/js/node_modules/@types/node/ts4.8/test.d.ts +1365 -0
- data/js/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- data/js/node_modules/@types/node/ts4.8/timers.d.ts +215 -0
- data/js/node_modules/@types/node/ts4.8/tls.d.ts +1130 -0
- data/js/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
- data/js/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
- data/js/node_modules/@types/node/ts4.8/url.d.ts +901 -0
- data/js/node_modules/@types/node/ts4.8/util.d.ts +2116 -0
- data/js/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
- data/js/node_modules/@types/node/ts4.8/vm.d.ts +894 -0
- data/js/node_modules/@types/node/ts4.8/wasi.d.ts +152 -0
- data/js/node_modules/@types/node/ts4.8/worker_threads.d.ts +693 -0
- data/js/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- data/js/node_modules/@types/node/tty.d.ts +208 -0
- data/js/node_modules/@types/node/url.d.ts +901 -0
- data/js/node_modules/@types/node/util.d.ts +2116 -0
- data/js/node_modules/@types/node/v8.d.ts +635 -0
- data/js/node_modules/@types/node/vm.d.ts +894 -0
- data/js/node_modules/@types/node/wasi.d.ts +152 -0
- data/js/node_modules/@types/node/worker_threads.d.ts +693 -0
- data/js/node_modules/@types/node/zlib.d.ts +517 -0
- data/js/node_modules/@types/node-fetch/LICENSE +21 -0
- data/js/node_modules/@types/node-fetch/README.md +16 -0
- data/js/node_modules/@types/node-fetch/externals.d.ts +24 -0
- data/js/node_modules/@types/node-fetch/index.d.ts +224 -0
- data/js/node_modules/@types/node-fetch/package.json +83 -0
- data/js/node_modules/@waves/bignumber/dist/BigNumber.d.ts +74 -0
- data/js/node_modules/@waves/bignumber/dist/BigNumber.js +252 -0
- data/js/node_modules/@waves/bignumber/dist/BigNumber.js.map +1 -0
- data/js/node_modules/@waves/bignumber/dist/Config.d.ts +22 -0
- data/js/node_modules/@waves/bignumber/dist/Config.js +43 -0
- data/js/node_modules/@waves/bignumber/dist/Config.js.map +1 -0
- data/js/node_modules/@waves/bignumber/dist/bignumber.umd.js +3194 -0
- data/js/node_modules/@waves/bignumber/dist/bignumber.umd.min.js +1 -0
- data/js/node_modules/@waves/bignumber/dist/index.d.ts +3 -0
- data/js/node_modules/@waves/bignumber/dist/index.js +9 -0
- data/js/node_modules/@waves/bignumber/dist/index.js.map +1 -0
- data/js/node_modules/@waves/bignumber/package.json +64 -0
- data/js/node_modules/@waves/bignumber/readme.md +285 -0
- data/js/node_modules/@waves/marshall/LICENSE +9 -0
- data/js/node_modules/@waves/marshall/README.md +39 -0
- data/js/node_modules/@waves/marshall/dist/index.d.ts +26 -0
- data/js/node_modules/@waves/marshall/dist/index.js +45 -0
- data/js/node_modules/@waves/marshall/dist/index.js.map +1 -0
- data/js/node_modules/@waves/marshall/dist/jsonMethods.d.ts +36 -0
- data/js/node_modules/@waves/marshall/dist/jsonMethods.js +194 -0
- data/js/node_modules/@waves/marshall/dist/jsonMethods.js.map +1 -0
- data/js/node_modules/@waves/marshall/dist/libs/Utf8ArrayToStr.d.ts +1 -0
- data/js/node_modules/@waves/marshall/dist/libs/Utf8ArrayToStr.js +35 -0
- data/js/node_modules/@waves/marshall/dist/libs/Utf8ArrayToStr.js.map +1 -0
- data/js/node_modules/@waves/marshall/dist/libs/base58.d.ts +5 -0
- data/js/node_modules/@waves/marshall/dist/libs/base58.js +66 -0
- data/js/node_modules/@waves/marshall/dist/libs/base58.js.map +1 -0
- data/js/node_modules/@waves/marshall/dist/libs/utils.d.ts +2 -0
- data/js/node_modules/@waves/marshall/dist/libs/utils.js +6 -0
- data/js/node_modules/@waves/marshall/dist/libs/utils.js.map +1 -0
- data/js/node_modules/@waves/marshall/dist/min/waves-marshall.min.js +1 -0
- data/js/node_modules/@waves/marshall/dist/parse.d.ts +21 -0
- data/js/node_modules/@waves/marshall/dist/parse.js +142 -0
- data/js/node_modules/@waves/marshall/dist/parse.js.map +1 -0
- data/js/node_modules/@waves/marshall/dist/parsePrimitives.d.ts +57 -0
- data/js/node_modules/@waves/marshall/dist/parsePrimitives.js +96 -0
- data/js/node_modules/@waves/marshall/dist/parsePrimitives.js.map +1 -0
- data/js/node_modules/@waves/marshall/dist/schemaTypes.d.ts +62 -0
- data/js/node_modules/@waves/marshall/dist/schemaTypes.js +41 -0
- data/js/node_modules/@waves/marshall/dist/schemaTypes.js.map +1 -0
- data/js/node_modules/@waves/marshall/dist/schemas.d.ts +128 -0
- data/js/node_modules/@waves/marshall/dist/schemas.js +542 -0
- data/js/node_modules/@waves/marshall/dist/schemas.js.map +1 -0
- data/js/node_modules/@waves/marshall/dist/serialize.d.ts +11 -0
- data/js/node_modules/@waves/marshall/dist/serialize.js +102 -0
- data/js/node_modules/@waves/marshall/dist/serialize.js.map +1 -0
- data/js/node_modules/@waves/marshall/dist/serializePrimitives.d.ts +21 -0
- data/js/node_modules/@waves/marshall/dist/serializePrimitives.js +63 -0
- data/js/node_modules/@waves/marshall/dist/serializePrimitives.js.map +1 -0
- data/js/node_modules/@waves/marshall/package.json +45 -0
- data/js/node_modules/@waves/marshall/src/index.ts +51 -0
- data/js/node_modules/@waves/marshall/src/jsonMethods.ts +231 -0
- data/js/node_modules/@waves/marshall/src/libs/Utf8ArrayToStr.ts +35 -0
- data/js/node_modules/@waves/marshall/src/libs/base58.ts +88 -0
- data/js/node_modules/@waves/marshall/src/libs/utils.ts +6 -0
- data/js/node_modules/@waves/marshall/src/parse.ts +157 -0
- data/js/node_modules/@waves/marshall/src/parsePrimitives.ts +118 -0
- data/js/node_modules/@waves/marshall/src/schemaTypes.ts +91 -0
- data/js/node_modules/@waves/marshall/src/schemas.ts +630 -0
- data/js/node_modules/@waves/marshall/src/serialize.ts +110 -0
- data/js/node_modules/@waves/marshall/src/serializePrimitives.ts +80 -0
- data/js/node_modules/@waves/node-api-js/README.md +2 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/activation/index.d.ts +21 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/activation/index.js +20 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/activation/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/addresses/index.d.ts +81 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/addresses/index.js +174 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/addresses/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/alias/index.d.ts +6 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/alias/index.js +22 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/alias/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/assets/index.d.ts +79 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/assets/index.js +172 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/assets/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/blocks/index.d.ts +131 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/blocks/index.js +210 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/blocks/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/consensus/index.d.ts +39 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/consensus/index.js +37 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/consensus/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/debug/index.d.ts +189 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/debug/index.js +245 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/debug/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/eth/index.d.ts +3 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/eth/index.js +15 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/eth/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/leasing/index.d.ts +22 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/leasing/index.js +42 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/leasing/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/node/index.d.ts +11 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/node/index.js +20 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/node/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/peers/index.d.ts +46 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/peers/index.js +60 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/peers/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/rewards/index.d.ts +21 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/rewards/index.js +21 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/rewards/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/transactions/index.d.ts +73 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/transactions/index.js +193 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/transactions/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/utils/index.d.ts +110 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/utils/index.js +211 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/utils/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/wallet/index.d.ts +5 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/wallet/index.js +7 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/wallet/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/constants.d.ts +40 -0
- data/js/node_modules/@waves/node-api-js/cjs/constants.js +43 -0
- data/js/node_modules/@waves/node-api-js/cjs/constants.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/create.d.ts +1240 -0
- data/js/node_modules/@waves/node-api-js/cjs/create.js +119 -0
- data/js/node_modules/@waves/node-api-js/cjs/create.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/index.d.ts +9 -0
- data/js/node_modules/@waves/node-api-js/cjs/index.js +18 -0
- data/js/node_modules/@waves/node-api-js/cjs/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/interface.d.ts +44 -0
- data/js/node_modules/@waves/node-api-js/cjs/interface.js +10 -0
- data/js/node_modules/@waves/node-api-js/cjs/interface.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/availableSponsoredBalances.d.ts +7 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/availableSponsoredBalances.js +30 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/availableSponsoredBalances.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/ethAddress2waves.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/ethAddress2waves.js +47 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/ethAddress2waves.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetIdListByTx.d.ts +2 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetIdListByTx.js +48 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetIdListByTx.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetsByTransaction.d.ts +3 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetsByTransaction.js +14 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetsByTransaction.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getTransactionsWithAssets.d.ts +6 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getTransactionsWithAssets.js +13 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getTransactionsWithAssets.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/watch.d.ts +24 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/watch.js +168 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/watch.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/wavesAddress2eth.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/wavesAddress2eth.js +10 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/wavesAddress2eth.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/assets/wavesAsset2eth.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/assets/wavesAsset2eth.js +10 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/assets/wavesAsset2eth.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/detectInterval.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/detectInterval.js +12 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/detectInterval.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkByte.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkByte.js +54 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkByte.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkCode.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkCode.js +11 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkCode.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/waitHeight.d.ts +3 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/waitHeight.js +65 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/waitHeight.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/parse.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/parse.js +8 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/parse.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/query.d.ts +4 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/query.js +41 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/query.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/request.d.ts +64 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/request.js +42 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/request.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/resolve.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/resolve.js +7 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/resolve.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/stringify.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/stringify.js +21 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/stringify.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/broadcast.d.ts +14 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/broadcast.js +60 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/broadcast.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/ethTxId2waves.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/ethTxId2waves.js +11 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/ethTxId2waves.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/transactions.d.ts +0 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/transactions.js +2 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/transactions.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/wait.d.ts +10 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/wait.js +42 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/wait.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/utils.d.ts +32 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/utils.js +118 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/utils.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/dist/0.node-api.js +467 -0
- data/js/node_modules/@waves/node-api-js/dist/node-api.js +30544 -0
- data/js/node_modules/@waves/node-api-js/dist/node-api.min.js +26 -0
- data/js/node_modules/@waves/node-api-js/dist/node-api.min.js.LICENSE.txt +17 -0
- data/js/node_modules/@waves/node-api-js/dist/node_fs-node_path.node-api.js +23 -0
- data/js/node_modules/@waves/node-api-js/dist/vendors-node_modules_node-fetch_src_utils_multipart-parser_js.node-api.js +599 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/activation/index.d.ts +21 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/activation/index.js +13 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/activation/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/addresses/index.d.ts +81 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/addresses/index.js +111 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/addresses/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/alias/index.d.ts +6 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/alias/index.js +14 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/alias/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/assets/index.d.ts +79 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/assets/index.js +103 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/assets/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/blocks/index.d.ts +131 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/blocks/index.js +179 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/blocks/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/consensus/index.d.ts +39 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/consensus/index.js +27 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/consensus/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/debug/index.d.ts +189 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/debug/index.js +201 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/debug/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/eth/index.d.ts +3 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/eth/index.js +8 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/eth/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/leasing/index.d.ts +22 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/leasing/index.js +22 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/leasing/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/node/index.d.ts +11 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/node/index.js +10 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/node/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/peers/index.d.ts +46 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/peers/index.js +46 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/peers/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/rewards/index.d.ts +21 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/rewards/index.js +13 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/rewards/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/transactions/index.d.ts +73 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/transactions/index.js +137 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/transactions/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/utils/index.d.ts +110 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/utils/index.js +193 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/utils/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/wallet/index.d.ts +5 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/wallet/index.js +7 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/wallet/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/constants.d.ts +40 -0
- data/js/node_modules/@waves/node-api-js/es/constants.js +40 -0
- data/js/node_modules/@waves/node-api-js/es/constants.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/create.d.ts +1240 -0
- data/js/node_modules/@waves/node-api-js/es/create.js +93 -0
- data/js/node_modules/@waves/node-api-js/es/create.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/index.d.ts +9 -0
- data/js/node_modules/@waves/node-api-js/es/index.js +9 -0
- data/js/node_modules/@waves/node-api-js/es/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/interface.d.ts +44 -0
- data/js/node_modules/@waves/node-api-js/es/interface.js +3 -0
- data/js/node_modules/@waves/node-api-js/es/interface.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/availableSponsoredBalances.d.ts +7 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/availableSponsoredBalances.js +27 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/availableSponsoredBalances.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/ethAddress2waves.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/ethAddress2waves.js +31 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/ethAddress2waves.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetIdListByTx.d.ts +2 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetIdListByTx.js +24 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetIdListByTx.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetsByTransaction.d.ts +3 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetsByTransaction.js +8 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetsByTransaction.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/getTransactionsWithAssets.d.ts +6 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/getTransactionsWithAssets.js +7 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/getTransactionsWithAssets.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/watch.d.ts +24 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/watch.js +134 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/watch.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/wavesAddress2eth.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/wavesAddress2eth.js +7 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/wavesAddress2eth.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/assets/wavesAsset2eth.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/assets/wavesAsset2eth.js +7 -0
- data/js/node_modules/@waves/node-api-js/es/tools/assets/wavesAsset2eth.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/detectInterval.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/detectInterval.js +9 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/detectInterval.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkByte.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkByte.js +51 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkByte.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkCode.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkCode.js +5 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkCode.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/waitHeight.d.ts +3 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/waitHeight.js +36 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/waitHeight.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/parse.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/parse.js +5 -0
- data/js/node_modules/@waves/node-api-js/es/tools/parse.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/query.d.ts +4 -0
- data/js/node_modules/@waves/node-api-js/es/tools/query.js +12 -0
- data/js/node_modules/@waves/node-api-js/es/tools/query.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/request.d.ts +64 -0
- data/js/node_modules/@waves/node-api-js/es/tools/request.js +22 -0
- data/js/node_modules/@waves/node-api-js/es/tools/request.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/resolve.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/resolve.js +4 -0
- data/js/node_modules/@waves/node-api-js/es/tools/resolve.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/stringify.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/stringify.js +18 -0
- data/js/node_modules/@waves/node-api-js/es/tools/stringify.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/broadcast.d.ts +14 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/broadcast.js +43 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/broadcast.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/ethTxId2waves.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/ethTxId2waves.js +8 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/ethTxId2waves.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/transactions.d.ts +0 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/transactions.js +2 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/transactions.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/wait.d.ts +10 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/wait.js +39 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/wait.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/utils.d.ts +32 -0
- data/js/node_modules/@waves/node-api-js/es/tools/utils.js +73 -0
- data/js/node_modules/@waves/node-api-js/es/tools/utils.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/package.json +66 -0
- data/js/node_modules/@waves/parse-json-bignumber/coverage/clover.xml +225 -0
- data/js/node_modules/@waves/parse-json-bignumber/coverage/coverage-final.json +2 -0
- data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/base.css +212 -0
- data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/index.html +93 -0
- data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/parse-json-bignumber.ts.html +1598 -0
- data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/prettify.css +1 -0
- data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/prettify.js +1 -0
- data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/sorter.js +158 -0
- data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov.info +415 -0
- data/js/node_modules/@waves/parse-json-bignumber/dist/parse-json-bignumber.d.ts +11 -0
- data/js/node_modules/@waves/parse-json-bignumber/dist/parse-json-bignumber.js +412 -0
- data/js/node_modules/@waves/parse-json-bignumber/dist/parse-json-bignumber.min.js +1 -0
- data/js/node_modules/@waves/parse-json-bignumber/package.json +40 -0
- data/js/node_modules/@waves/parse-json-bignumber/src/parse-json-bignumber.ts +511 -0
- data/js/node_modules/@waves/parse-json-bignumber/test/index.ts +130 -0
- data/js/node_modules/@waves/parse-json-bignumber/test/tsconfig.json +14 -0
- data/js/node_modules/@waves/parse-json-bignumber/tsconfig.json +15 -0
- data/js/node_modules/@waves/protobuf-serialization/README.MD +116 -0
- data/js/node_modules/@waves/protobuf-serialization/dist/index.d.ts +2005 -0
- data/js/node_modules/@waves/protobuf-serialization/dist/index.js +6636 -0
- data/js/node_modules/@waves/protobuf-serialization/package.json +30 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/amount.proto +10 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/block.proto +40 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/events/events.proto +213 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/events/grpc/blockchain_updates.proto +42 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/invoke_script_result.proto +98 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/lang/dapp_meta.proto +21 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/node/grpc/accounts_api.proto +68 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/node/grpc/assets_api.proto +41 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/node/grpc/blockchain_api.proto +54 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/node/grpc/blocks_api.proto +41 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/node/grpc/transactions_api.proto +73 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/order.proto +43 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/recipient.proto +13 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/transaction.proto +156 -0
- data/js/node_modules/@waves/ts-lib-crypto/README.md +492 -0
- data/js/node_modules/@waves/ts-lib-crypto/bytes.d.ts +10 -0
- data/js/node_modules/@waves/ts-lib-crypto/bytes.js +21 -0
- data/js/node_modules/@waves/ts-lib-crypto/bytes.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/conversions/base-xx.d.ts +7 -0
- data/js/node_modules/@waves/ts-lib-crypto/conversions/base-xx.js +27 -0
- data/js/node_modules/@waves/ts-lib-crypto/conversions/base-xx.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/conversions/param.d.ts +3 -0
- data/js/node_modules/@waves/ts-lib-crypto/conversions/param.js +24 -0
- data/js/node_modules/@waves/ts-lib-crypto/conversions/param.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/conversions/string-bytes.d.ts +11 -0
- data/js/node_modules/@waves/ts-lib-crypto/conversions/string-bytes.js +65 -0
- data/js/node_modules/@waves/ts-lib-crypto/conversions/string-bytes.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/address-keys-seed.d.ts +7 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/address-keys-seed.js +58 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/address-keys-seed.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/concat-split.d.ts +3 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/concat-split.js +39 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/concat-split.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/crypto.d.ts +13 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/crypto.js +117 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/crypto.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/encryption.d.ts +6 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/encryption.js +89 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/encryption.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/hashing.d.ts +7 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/hashing.js +39 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/hashing.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/interface.d.ts +98 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/interface.js +9 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/interface.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/merkle-verify.d.ts +7 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/merkle-verify.js +51 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/merkle-verify.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/random.d.ts +4 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/random.js +51 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/random.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/rsa.d.ts +7 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/rsa.js +159 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/rsa.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-ecryption.d.ts +9 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-ecryption.js +62 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-ecryption.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-words-list.d.ts +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-words-list.js +189 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-words-list.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/sign.d.ts +2 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/sign.js +16 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/sign.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/util.d.ts +3 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/util.js +9 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/util.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/verification.d.ts +7 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/verification.js +49 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/verification.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/extensions/chain-id.d.ts +5 -0
- data/js/node_modules/@waves/ts-lib-crypto/extensions/chain-id.js +16 -0
- data/js/node_modules/@waves/ts-lib-crypto/extensions/chain-id.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/extensions/seed.d.ts +6 -0
- data/js/node_modules/@waves/ts-lib-crypto/extensions/seed.js +18 -0
- data/js/node_modules/@waves/ts-lib-crypto/extensions/seed.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/index.d.ts +10 -0
- data/js/node_modules/@waves/ts-lib-crypto/index.js +21 -0
- data/js/node_modules/@waves/ts-lib-crypto/index.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/libs/Utf8.d.ts +2 -0
- data/js/node_modules/@waves/ts-lib-crypto/libs/Utf8.js +61 -0
- data/js/node_modules/@waves/ts-lib-crypto/libs/Utf8.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/libs/axlsign.js +1374 -0
- data/js/node_modules/@waves/ts-lib-crypto/libs/base58.d.ts +5 -0
- data/js/node_modules/@waves/ts-lib-crypto/libs/base58.js +66 -0
- data/js/node_modules/@waves/ts-lib-crypto/libs/base58.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/libs/blake2b.js +308 -0
- data/js/node_modules/@waves/ts-lib-crypto/libs/sha3.js +441 -0
- data/js/node_modules/@waves/ts-lib-crypto/min/waves-lib-crypto.js +33 -0
- data/js/node_modules/@waves/ts-lib-crypto/package.json +31 -0
- data/js/node_modules/@waves/ts-types/dist/src/common.d.ts +59 -0
- data/js/node_modules/@waves/ts-types/dist/src/common.js +53 -0
- data/js/node_modules/@waves/ts-types/dist/src/exchange.d.ts +47 -0
- data/js/node_modules/@waves/ts-types/dist/src/exchange.js +2 -0
- data/js/node_modules/@waves/ts-types/dist/src/index.d.ts +52 -0
- data/js/node_modules/@waves/ts-types/dist/src/index.js +63 -0
- data/js/node_modules/@waves/ts-types/dist/src/invoke.d.ts +22 -0
- data/js/node_modules/@waves/ts-types/dist/src/invoke.js +2 -0
- data/js/node_modules/@waves/ts-types/dist/src/network.d.ts +6 -0
- data/js/node_modules/@waves/ts-types/dist/src/network.js +10 -0
- data/js/node_modules/@waves/ts-types/dist/src/parts.d.ts +159 -0
- data/js/node_modules/@waves/ts-types/dist/src/parts.js +2 -0
- data/js/node_modules/@waves/ts-types/dist/transactions/index.d.ts +363 -0
- data/js/node_modules/@waves/ts-types/dist/transactions/index.js +3 -0
- data/js/node_modules/@waves/ts-types/index.ts +1 -0
- data/js/node_modules/@waves/ts-types/package.json +41 -0
- data/js/node_modules/@waves/ts-types/src/index.ts +57 -0
- data/js/node_modules/@waves/ts-types/src/parts.ts +247 -0
- data/js/node_modules/@waves/ts-types/transactions/index.ts +789 -0
- data/js/node_modules/@waves/ts-types/tsconfig.json +16 -0
- data/js/node_modules/@waves/waves-transactions/README.md +432 -0
- data/js/node_modules/@waves/waves-transactions/dist/defaultVersions.d.ts +18 -0
- data/js/node_modules/@waves/waves-transactions/dist/defaultVersions.js +22 -0
- data/js/node_modules/@waves/waves-transactions/dist/defaultVersions.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/general.d.ts +68 -0
- data/js/node_modules/@waves/waves-transactions/dist/general.js +135 -0
- data/js/node_modules/@waves/waves-transactions/dist/general.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/generic.d.ts +28 -0
- data/js/node_modules/@waves/waves-transactions/dist/generic.js +88 -0
- data/js/node_modules/@waves/waves-transactions/dist/generic.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/index.d.ts +37 -0
- data/js/node_modules/@waves/waves-transactions/dist/index.js +98 -0
- data/js/node_modules/@waves/waves-transactions/dist/index.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/make-tx.d.ts +50 -0
- data/js/node_modules/@waves/waves-transactions/dist/make-tx.js +106 -0
- data/js/node_modules/@waves/waves-transactions/dist/make-tx.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/min/waves-transactions.min.js +26 -0
- data/js/node_modules/@waves/waves-transactions/dist/nodeInteraction.d.ts +116 -0
- data/js/node_modules/@waves/waves-transactions/dist/nodeInteraction.js +277 -0
- data/js/node_modules/@waves/waves-transactions/dist/nodeInteraction.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/proto-serialize.d.ts +62 -0
- data/js/node_modules/@waves/waves-transactions/dist/proto-serialize.js +514 -0
- data/js/node_modules/@waves/waves-transactions/dist/proto-serialize.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/auth.d.ts +7 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/auth.js +31 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/auth.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/cancel-order.d.ts +7 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/cancel-order.js +29 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/cancel-order.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/custom-data.d.ts +40 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/custom-data.js +37 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/custom-data.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/order.d.ts +50 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/order.js +62 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/order.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/wavesAuth.d.ts +7 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/wavesAuth.js +31 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/wavesAuth.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/seedUtils/index.d.ts +21 -0
- data/js/node_modules/@waves/waves-transactions/dist/seedUtils/index.js +85 -0
- data/js/node_modules/@waves/waves-transactions/dist/seedUtils/index.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/alias.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/alias.js +35 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/alias.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/burn.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/burn.js +35 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/burn.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/cancel-lease.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/cancel-lease.js +34 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/cancel-lease.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/data.d.ts +5 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/data.js +112 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/data.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/exchange.d.ts +7 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/exchange.js +39 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/exchange.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-expression.d.ts +0 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-expression.js +52 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-expression.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-script.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-script.js +43 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-script.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/issue.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/issue.js +42 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/issue.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/lease.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/lease.js +35 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/lease.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/mass-transfer.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/mass-transfer.js +39 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/mass-transfer.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/reissue.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/reissue.js +36 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/reissue.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/set-asset-script.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/set-asset-script.js +37 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/set-asset-script.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/set-script.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/set-script.js +38 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/set-script.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/sponsorship.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/sponsorship.js +35 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/sponsorship.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/transfer.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/transfer.js +38 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/transfer.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/update-asset-info.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/update-asset-info.js +35 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/update-asset-info.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions.d.ts +277 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions.js +3 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/types.d.ts +11 -0
- data/js/node_modules/@waves/waves-transactions/dist/types.js +6 -0
- data/js/node_modules/@waves/waves-transactions/dist/types.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/alias.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/alias.js +17 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/alias.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/auth.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/auth.js +10 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/auth.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/burn.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/burn.js +18 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/burn.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-lease.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-lease.js +17 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-lease.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-order.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-order.js +12 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-order.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/custom-data.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/custom-data.js +16 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/custom-data.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/data.d.ts +2 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/data.js +18 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/data.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/exchange.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/exchange.js +22 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/exchange.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/index.d.ts +24 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/index.js +60 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/index.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-expression.d.ts +0 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-expression.js +33 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-expression.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-script.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-script.js +20 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-script.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/issue.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/issue.js +22 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/issue.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/lease.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/lease.js +17 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/lease.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/mass-transfer.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/mass-transfer.js +18 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/mass-transfer.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/order.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/order.js +34 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/order.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/reissue.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/reissue.js +19 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/reissue.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/set-asset-script.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/set-asset-script.js +18 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/set-asset-script.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/set-script.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/set-script.js +17 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/set-script.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/sponsorship.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/sponsorship.js +17 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/sponsorship.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/transfer.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/transfer.js +20 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/transfer.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/update-asset-info.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/update-asset-info.js +18 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/update-asset-info.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/validators.d.ts +52 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/validators.js +160 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/validators.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/wavesAuth.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/wavesAuth.js +10 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/wavesAuth.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/package.json +83 -0
- data/js/node_modules/@waves/waves-transactions/src/defaultVersions.ts +18 -0
- data/js/node_modules/@waves/waves-transactions/src/general.ts +165 -0
- data/js/node_modules/@waves/waves-transactions/src/generic.ts +88 -0
- data/js/node_modules/@waves/waves-transactions/src/index.ts +87 -0
- data/js/node_modules/@waves/waves-transactions/src/make-tx.ts +179 -0
- data/js/node_modules/@waves/waves-transactions/src/nodeInteraction.ts +297 -0
- data/js/node_modules/@waves/waves-transactions/src/proto-serialize.ts +571 -0
- data/js/node_modules/@waves/waves-transactions/src/requests/auth.ts +42 -0
- data/js/node_modules/@waves/waves-transactions/src/requests/cancel-order.ts +37 -0
- data/js/node_modules/@waves/waves-transactions/src/requests/custom-data.ts +73 -0
- data/js/node_modules/@waves/waves-transactions/src/requests/order.ts +121 -0
- data/js/node_modules/@waves/waves-transactions/src/requests/wavesAuth.ts +40 -0
- data/js/node_modules/@waves/waves-transactions/src/seedUtils/index.ts +124 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/alias.ts +46 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/burn.ts +45 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/cancel-lease.ts +44 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/data.ts +122 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/exchange.ts +47 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/invoke-expression.ts +50 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/invoke-script.ts +54 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/issue.ts +52 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/lease.ts +45 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/mass-transfer.ts +55 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/reissue.ts +46 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/set-asset-script.ts +57 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/set-script.ts +54 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/sponsorship.ts +45 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/transfer.ts +55 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/update-asset-info.ts +44 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions.ts +352 -0
- data/js/node_modules/@waves/waves-transactions/src/types.ts +12 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/alias.ts +28 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/auth.ts +14 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/burn.ts +29 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/cancel-lease.ts +27 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/cancel-order.ts +17 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/custom-data.ts +40 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/data.ts +33 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/exchange.ts +36 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/index.ts +50 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/invoke-expression.ts +31 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/invoke-script.ts +64 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/issue.ts +41 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/lease.ts +29 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/mass-transfer.ts +47 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/order.ts +68 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/reissue.ts +31 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/set-asset-script.ts +28 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/set-script.ts +28 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/sponsorship.ts +28 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/transfer.ts +32 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/update-asset-info.ts +32 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/validators.ts +306 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/wavesAuth.ts +15 -0
- data/js/node_modules/asynckit/LICENSE +21 -0
- data/js/node_modules/asynckit/README.md +233 -0
- data/js/node_modules/asynckit/bench.js +76 -0
- data/js/node_modules/asynckit/index.js +6 -0
- data/js/node_modules/asynckit/lib/abort.js +29 -0
- data/js/node_modules/asynckit/lib/async.js +34 -0
- data/js/node_modules/asynckit/lib/defer.js +26 -0
- data/js/node_modules/asynckit/lib/iterate.js +75 -0
- data/js/node_modules/asynckit/lib/readable_asynckit.js +91 -0
- data/js/node_modules/asynckit/lib/readable_parallel.js +25 -0
- data/js/node_modules/asynckit/lib/readable_serial.js +25 -0
- data/js/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
- data/js/node_modules/asynckit/lib/state.js +37 -0
- data/js/node_modules/asynckit/lib/streamify.js +141 -0
- data/js/node_modules/asynckit/lib/terminator.js +29 -0
- data/js/node_modules/asynckit/package.json +63 -0
- data/js/node_modules/asynckit/parallel.js +43 -0
- data/js/node_modules/asynckit/serial.js +17 -0
- data/js/node_modules/asynckit/serialOrdered.js +75 -0
- data/js/node_modules/asynckit/stream.js +21 -0
- data/js/node_modules/axios/CHANGELOG.md +413 -0
- data/js/node_modules/axios/LICENSE +19 -0
- data/js/node_modules/axios/README.md +709 -0
- data/js/node_modules/axios/UPGRADE_GUIDE.md +162 -0
- data/js/node_modules/axios/dist/axios.js +1715 -0
- data/js/node_modules/axios/dist/axios.map +1 -0
- data/js/node_modules/axios/dist/axios.min.js +3 -0
- data/js/node_modules/axios/dist/axios.min.map +1 -0
- data/js/node_modules/axios/index.d.ts +157 -0
- data/js/node_modules/axios/index.js +1 -0
- data/js/node_modules/axios/lib/adapters/README.md +37 -0
- data/js/node_modules/axios/lib/adapters/http.js +279 -0
- data/js/node_modules/axios/lib/adapters/xhr.js +180 -0
- data/js/node_modules/axios/lib/axios.js +53 -0
- data/js/node_modules/axios/lib/cancel/Cancel.js +19 -0
- data/js/node_modules/axios/lib/cancel/CancelToken.js +57 -0
- data/js/node_modules/axios/lib/cancel/isCancel.js +5 -0
- data/js/node_modules/axios/lib/core/Axios.js +94 -0
- data/js/node_modules/axios/lib/core/InterceptorManager.js +52 -0
- data/js/node_modules/axios/lib/core/README.md +7 -0
- data/js/node_modules/axios/lib/core/buildFullPath.js +20 -0
- data/js/node_modules/axios/lib/core/createError.js +18 -0
- data/js/node_modules/axios/lib/core/dispatchRequest.js +79 -0
- data/js/node_modules/axios/lib/core/enhanceError.js +42 -0
- data/js/node_modules/axios/lib/core/mergeConfig.js +73 -0
- data/js/node_modules/axios/lib/core/settle.js +25 -0
- data/js/node_modules/axios/lib/core/transformData.js +20 -0
- data/js/node_modules/axios/lib/defaults.js +97 -0
- data/js/node_modules/axios/lib/helpers/README.md +7 -0
- data/js/node_modules/axios/lib/helpers/bind.js +11 -0
- data/js/node_modules/axios/lib/helpers/buildURL.js +71 -0
- data/js/node_modules/axios/lib/helpers/combineURLs.js +14 -0
- data/js/node_modules/axios/lib/helpers/cookies.js +53 -0
- data/js/node_modules/axios/lib/helpers/deprecatedMethod.js +24 -0
- data/js/node_modules/axios/lib/helpers/isAbsoluteURL.js +14 -0
- data/js/node_modules/axios/lib/helpers/isURLSameOrigin.js +68 -0
- data/js/node_modules/axios/lib/helpers/normalizeHeaderName.js +12 -0
- data/js/node_modules/axios/lib/helpers/parseHeaders.js +53 -0
- data/js/node_modules/axios/lib/helpers/spread.js +27 -0
- data/js/node_modules/axios/lib/utils.js +344 -0
- data/js/node_modules/axios/package.json +84 -0
- data/js/node_modules/base64-js/LICENSE +21 -0
- data/js/node_modules/base64-js/README.md +34 -0
- data/js/node_modules/base64-js/base64js.min.js +1 -0
- data/js/node_modules/base64-js/index.d.ts +3 -0
- data/js/node_modules/base64-js/index.js +150 -0
- data/js/node_modules/base64-js/package.json +47 -0
- data/js/node_modules/bignumber.js/CHANGELOG.md +290 -0
- data/js/node_modules/bignumber.js/LICENCE.md +26 -0
- data/js/node_modules/bignumber.js/README.md +286 -0
- data/js/node_modules/bignumber.js/bignumber.d.ts +1831 -0
- data/js/node_modules/bignumber.js/bignumber.js +2926 -0
- data/js/node_modules/bignumber.js/bignumber.mjs +2889 -0
- data/js/node_modules/bignumber.js/doc/API.html +2249 -0
- data/js/node_modules/bignumber.js/package.json +50 -0
- data/js/node_modules/combined-stream/License +19 -0
- data/js/node_modules/combined-stream/Readme.md +138 -0
- data/js/node_modules/combined-stream/lib/combined_stream.js +208 -0
- data/js/node_modules/combined-stream/package.json +25 -0
- data/js/node_modules/combined-stream/yarn.lock +17 -0
- data/js/node_modules/debug/CHANGELOG.md +395 -0
- data/js/node_modules/debug/LICENSE +19 -0
- data/js/node_modules/debug/Makefile +58 -0
- data/js/node_modules/debug/README.md +368 -0
- data/js/node_modules/debug/karma.conf.js +70 -0
- data/js/node_modules/debug/node.js +1 -0
- data/js/node_modules/debug/package.json +43 -0
- data/js/node_modules/debug/src/browser.js +195 -0
- data/js/node_modules/debug/src/debug.js +225 -0
- data/js/node_modules/debug/src/index.js +10 -0
- data/js/node_modules/debug/src/node.js +186 -0
- data/js/node_modules/delayed-stream/License +19 -0
- data/js/node_modules/delayed-stream/Makefile +7 -0
- data/js/node_modules/delayed-stream/Readme.md +141 -0
- data/js/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
- data/js/node_modules/delayed-stream/package.json +27 -0
- data/js/node_modules/follow-redirects/LICENSE +18 -0
- data/js/node_modules/follow-redirects/README.md +155 -0
- data/js/node_modules/follow-redirects/http.js +1 -0
- data/js/node_modules/follow-redirects/https.js +1 -0
- data/js/node_modules/follow-redirects/index.js +322 -0
- data/js/node_modules/follow-redirects/package.json +60 -0
- data/js/node_modules/form-data/License +19 -0
- data/js/node_modules/form-data/README.md.bak +356 -0
- data/js/node_modules/form-data/Readme.md +356 -0
- data/js/node_modules/form-data/index.d.ts +62 -0
- data/js/node_modules/form-data/lib/browser.js +2 -0
- data/js/node_modules/form-data/lib/form_data.js +498 -0
- data/js/node_modules/form-data/lib/populate.js +10 -0
- data/js/node_modules/form-data/package.json +68 -0
- data/js/node_modules/js-sha3/CHANGELOG.md +106 -0
- data/js/node_modules/js-sha3/LICENSE.txt +20 -0
- data/js/node_modules/js-sha3/README.md +241 -0
- data/js/node_modules/js-sha3/build/sha3.min.js +9 -0
- data/js/node_modules/js-sha3/index.d.ts +317 -0
- data/js/node_modules/js-sha3/package.json +45 -0
- data/js/node_modules/js-sha3/src/sha3.js +656 -0
- data/js/node_modules/long/LICENSE +202 -0
- data/js/node_modules/long/README.md +246 -0
- data/js/node_modules/long/dist/long.js +2 -0
- data/js/node_modules/long/dist/long.js.map +1 -0
- data/js/node_modules/long/index.js +1 -0
- data/js/node_modules/long/package.json +34 -0
- data/js/node_modules/long/src/long.js +1323 -0
- data/js/node_modules/mime-db/HISTORY.md +507 -0
- data/js/node_modules/mime-db/LICENSE +23 -0
- data/js/node_modules/mime-db/README.md +100 -0
- data/js/node_modules/mime-db/db.json +8519 -0
- data/js/node_modules/mime-db/index.js +12 -0
- data/js/node_modules/mime-db/package.json +60 -0
- data/js/node_modules/mime-types/HISTORY.md +397 -0
- data/js/node_modules/mime-types/LICENSE +23 -0
- data/js/node_modules/mime-types/README.md +113 -0
- data/js/node_modules/mime-types/index.js +188 -0
- data/js/node_modules/mime-types/package.json +44 -0
- data/js/node_modules/ms/index.js +152 -0
- data/js/node_modules/ms/license.md +21 -0
- data/js/node_modules/ms/package.json +37 -0
- data/js/node_modules/ms/readme.md +51 -0
- data/js/node_modules/node-fetch/LICENSE.md +22 -0
- data/js/node_modules/node-fetch/README.md +633 -0
- data/js/node_modules/node-fetch/browser.js +25 -0
- data/js/node_modules/node-fetch/lib/index.es.js +1781 -0
- data/js/node_modules/node-fetch/lib/index.js +1790 -0
- data/js/node_modules/node-fetch/lib/index.mjs +1779 -0
- data/js/node_modules/node-fetch/package.json +89 -0
- data/js/node_modules/node-forge/CHANGELOG.md +211 -0
- data/js/node_modules/node-forge/LICENSE +331 -0
- data/js/node_modules/node-forge/README.md +2097 -0
- data/js/node_modules/node-forge/dist/forge.all.min.js +2 -0
- data/js/node_modules/node-forge/dist/forge.all.min.js.map +1 -0
- data/js/node_modules/node-forge/dist/forge.min.js +2 -0
- data/js/node_modules/node-forge/dist/forge.min.js.map +1 -0
- data/js/node_modules/node-forge/dist/prime.worker.min.js +2 -0
- data/js/node_modules/node-forge/dist/prime.worker.min.js.map +1 -0
- data/js/node_modules/node-forge/flash/README.md +48 -0
- data/js/node_modules/node-forge/flash/package.json +28 -0
- data/js/node_modules/node-forge/flash/swf/SocketPool.swf +0 -0
- data/js/node_modules/node-forge/lib/aes.js +1091 -0
- data/js/node_modules/node-forge/lib/aesCipherSuites.js +282 -0
- data/js/node_modules/node-forge/lib/asn1.js +1408 -0
- data/js/node_modules/node-forge/lib/baseN.js +186 -0
- data/js/node_modules/node-forge/lib/cipher.js +230 -0
- data/js/node_modules/node-forge/lib/cipherModes.js +987 -0
- data/js/node_modules/node-forge/lib/debug.js +78 -0
- data/js/node_modules/node-forge/lib/des.js +496 -0
- data/js/node_modules/node-forge/lib/ed25519.js +996 -0
- data/js/node_modules/node-forge/lib/forge.js +13 -0
- data/js/node_modules/node-forge/lib/form.js +149 -0
- data/js/node_modules/node-forge/lib/hmac.js +146 -0
- data/js/node_modules/node-forge/lib/http.js +1364 -0
- data/js/node_modules/node-forge/lib/index.all.js +16 -0
- data/js/node_modules/node-forge/lib/index.js +35 -0
- data/js/node_modules/node-forge/lib/jsbn.js +1264 -0
- data/js/node_modules/node-forge/lib/kem.js +168 -0
- data/js/node_modules/node-forge/lib/log.js +317 -0
- data/js/node_modules/node-forge/lib/md.all.js +13 -0
- data/js/node_modules/node-forge/lib/md.js +11 -0
- data/js/node_modules/node-forge/lib/md5.js +289 -0
- data/js/node_modules/node-forge/lib/mgf.js +12 -0
- data/js/node_modules/node-forge/lib/mgf1.js +57 -0
- data/js/node_modules/node-forge/lib/oids.js +163 -0
- data/js/node_modules/node-forge/lib/pbe.js +1023 -0
- data/js/node_modules/node-forge/lib/pbkdf2.js +211 -0
- data/js/node_modules/node-forge/lib/pem.js +230 -0
- data/js/node_modules/node-forge/lib/pkcs1.js +276 -0
- data/js/node_modules/node-forge/lib/pkcs12.js +1074 -0
- data/js/node_modules/node-forge/lib/pkcs7.js +1257 -0
- data/js/node_modules/node-forge/lib/pkcs7asn1.js +409 -0
- data/js/node_modules/node-forge/lib/pki.js +102 -0
- data/js/node_modules/node-forge/lib/prime.js +297 -0
- data/js/node_modules/node-forge/lib/prime.worker.js +168 -0
- data/js/node_modules/node-forge/lib/prng.js +419 -0
- data/js/node_modules/node-forge/lib/pss.js +241 -0
- data/js/node_modules/node-forge/lib/random.js +191 -0
- data/js/node_modules/node-forge/lib/rc2.js +410 -0
- data/js/node_modules/node-forge/lib/rsa.js +1858 -0
- data/js/node_modules/node-forge/lib/sha1.js +319 -0
- data/js/node_modules/node-forge/lib/sha256.js +327 -0
- data/js/node_modules/node-forge/lib/sha512.js +561 -0
- data/js/node_modules/node-forge/lib/socket.js +287 -0
- data/js/node_modules/node-forge/lib/ssh.js +236 -0
- data/js/node_modules/node-forge/lib/task.js +725 -0
- data/js/node_modules/node-forge/lib/tls.js +4282 -0
- data/js/node_modules/node-forge/lib/tlssocket.js +249 -0
- data/js/node_modules/node-forge/lib/util.js +2993 -0
- data/js/node_modules/node-forge/lib/x509.js +3333 -0
- data/js/node_modules/node-forge/lib/xhr.js +736 -0
- data/js/node_modules/node-forge/package.json +120 -0
- data/js/node_modules/protobufjs/CHANGELOG.md +1027 -0
- data/js/node_modules/protobufjs/LICENSE +39 -0
- data/js/node_modules/protobufjs/README.md +905 -0
- data/js/node_modules/protobufjs/bin/pbjs +6 -0
- data/js/node_modules/protobufjs/bin/pbts +6 -0
- data/js/node_modules/protobufjs/cli/LICENSE +33 -0
- data/js/node_modules/protobufjs/cli/README.md +174 -0
- data/js/node_modules/protobufjs/cli/bin/pbjs +6 -0
- data/js/node_modules/protobufjs/cli/bin/pbts +6 -0
- data/js/node_modules/protobufjs/cli/index.d.ts +3 -0
- data/js/node_modules/protobufjs/cli/index.js +3 -0
- data/js/node_modules/protobufjs/cli/lib/tsd-jsdoc/LICENSE +21 -0
- data/js/node_modules/protobufjs/cli/lib/tsd-jsdoc/README.md +23 -0
- data/js/node_modules/protobufjs/cli/lib/tsd-jsdoc/plugin.js +21 -0
- data/js/node_modules/protobufjs/cli/lib/tsd-jsdoc/publish.js +705 -0
- data/js/node_modules/protobufjs/cli/lib/tsd-jsdoc.json +18 -0
- data/js/node_modules/protobufjs/cli/package.json +8 -0
- data/js/node_modules/protobufjs/cli/package.standalone.json +32 -0
- data/js/node_modules/protobufjs/cli/pbjs.d.ts +9 -0
- data/js/node_modules/protobufjs/cli/pbjs.js +330 -0
- data/js/node_modules/protobufjs/cli/pbts.d.ts +9 -0
- data/js/node_modules/protobufjs/cli/pbts.js +197 -0
- data/js/node_modules/protobufjs/cli/targets/json-module.js +38 -0
- data/js/node_modules/protobufjs/cli/targets/json.js +8 -0
- data/js/node_modules/protobufjs/cli/targets/proto.js +326 -0
- data/js/node_modules/protobufjs/cli/targets/proto2.js +10 -0
- data/js/node_modules/protobufjs/cli/targets/proto3.js +10 -0
- data/js/node_modules/protobufjs/cli/targets/static-module.js +29 -0
- data/js/node_modules/protobufjs/cli/targets/static.js +711 -0
- data/js/node_modules/protobufjs/cli/util.js +183 -0
- data/js/node_modules/protobufjs/cli/wrappers/amd.js +7 -0
- data/js/node_modules/protobufjs/cli/wrappers/closure.js +7 -0
- data/js/node_modules/protobufjs/cli/wrappers/commonjs.js +7 -0
- data/js/node_modules/protobufjs/cli/wrappers/default.js +15 -0
- data/js/node_modules/protobufjs/cli/wrappers/es6.js +5 -0
- data/js/node_modules/protobufjs/dist/README.md +31 -0
- data/js/node_modules/protobufjs/dist/light/README.md +31 -0
- data/js/node_modules/protobufjs/dist/light/protobuf.js +7322 -0
- data/js/node_modules/protobufjs/dist/light/protobuf.js.map +1 -0
- data/js/node_modules/protobufjs/dist/light/protobuf.min.js +8 -0
- data/js/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -0
- data/js/node_modules/protobufjs/dist/minimal/README.md +31 -0
- data/js/node_modules/protobufjs/dist/minimal/protobuf.js +2714 -0
- data/js/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -0
- data/js/node_modules/protobufjs/dist/minimal/protobuf.min.js +8 -0
- data/js/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -0
- data/js/node_modules/protobufjs/dist/protobuf.js +8964 -0
- data/js/node_modules/protobufjs/dist/protobuf.js.map +1 -0
- data/js/node_modules/protobufjs/dist/protobuf.min.js +8 -0
- data/js/node_modules/protobufjs/dist/protobuf.min.js.map +1 -0
- data/js/node_modules/protobufjs/ext/debug/README.md +4 -0
- data/js/node_modules/protobufjs/ext/debug/index.js +71 -0
- data/js/node_modules/protobufjs/ext/descriptor/README.md +72 -0
- data/js/node_modules/protobufjs/ext/descriptor/index.d.ts +191 -0
- data/js/node_modules/protobufjs/ext/descriptor/index.js +1052 -0
- data/js/node_modules/protobufjs/ext/descriptor/test.js +54 -0
- data/js/node_modules/protobufjs/google/LICENSE +27 -0
- data/js/node_modules/protobufjs/google/README.md +1 -0
- data/js/node_modules/protobufjs/google/api/annotations.json +83 -0
- data/js/node_modules/protobufjs/google/api/annotations.proto +11 -0
- data/js/node_modules/protobufjs/google/api/http.json +86 -0
- data/js/node_modules/protobufjs/google/api/http.proto +31 -0
- data/js/node_modules/protobufjs/google/protobuf/api.json +118 -0
- data/js/node_modules/protobufjs/google/protobuf/api.proto +34 -0
- data/js/node_modules/protobufjs/google/protobuf/descriptor.json +739 -0
- data/js/node_modules/protobufjs/google/protobuf/descriptor.proto +286 -0
- data/js/node_modules/protobufjs/google/protobuf/source_context.json +20 -0
- data/js/node_modules/protobufjs/google/protobuf/source_context.proto +7 -0
- data/js/node_modules/protobufjs/google/protobuf/type.json +202 -0
- data/js/node_modules/protobufjs/google/protobuf/type.proto +89 -0
- data/js/node_modules/protobufjs/index.d.ts +2739 -0
- data/js/node_modules/protobufjs/index.js +4 -0
- data/js/node_modules/protobufjs/light.d.ts +2 -0
- data/js/node_modules/protobufjs/light.js +4 -0
- data/js/node_modules/protobufjs/minimal.d.ts +2 -0
- data/js/node_modules/protobufjs/minimal.js +4 -0
- data/js/node_modules/protobufjs/package-lock.json +7870 -0
- data/js/node_modules/protobufjs/package.json +122 -0
- data/js/node_modules/protobufjs/scripts/changelog.js +150 -0
- data/js/node_modules/protobufjs/scripts/postinstall.js +35 -0
- data/js/node_modules/protobufjs/src/common.js +399 -0
- data/js/node_modules/protobufjs/src/converter.js +293 -0
- data/js/node_modules/protobufjs/src/decoder.js +128 -0
- data/js/node_modules/protobufjs/src/encoder.js +100 -0
- data/js/node_modules/protobufjs/src/enum.js +181 -0
- data/js/node_modules/protobufjs/src/field.js +374 -0
- data/js/node_modules/protobufjs/src/index-light.js +104 -0
- data/js/node_modules/protobufjs/src/index-minimal.js +36 -0
- data/js/node_modules/protobufjs/src/index.js +12 -0
- data/js/node_modules/protobufjs/src/mapfield.js +126 -0
- data/js/node_modules/protobufjs/src/message.js +139 -0
- data/js/node_modules/protobufjs/src/method.js +160 -0
- data/js/node_modules/protobufjs/src/namespace.js +434 -0
- data/js/node_modules/protobufjs/src/object.js +243 -0
- data/js/node_modules/protobufjs/src/oneof.js +203 -0
- data/js/node_modules/protobufjs/src/parse.js +820 -0
- data/js/node_modules/protobufjs/src/reader.js +411 -0
- data/js/node_modules/protobufjs/src/reader_buffer.js +51 -0
- data/js/node_modules/protobufjs/src/root.js +363 -0
- data/js/node_modules/protobufjs/src/roots.js +18 -0
- data/js/node_modules/protobufjs/src/rpc/service.js +142 -0
- data/js/node_modules/protobufjs/src/rpc.js +36 -0
- data/js/node_modules/protobufjs/src/service.js +167 -0
- data/js/node_modules/protobufjs/src/tokenize.js +403 -0
- data/js/node_modules/protobufjs/src/type.js +589 -0
- data/js/node_modules/protobufjs/src/types.js +196 -0
- data/js/node_modules/protobufjs/src/typescript.jsdoc +15 -0
- data/js/node_modules/protobufjs/src/util/longbits.js +200 -0
- data/js/node_modules/protobufjs/src/util/minimal.js +421 -0
- data/js/node_modules/protobufjs/src/util.js +212 -0
- data/js/node_modules/protobufjs/src/verifier.js +177 -0
- data/js/node_modules/protobufjs/src/wrappers.js +102 -0
- data/js/node_modules/protobufjs/src/writer.js +465 -0
- data/js/node_modules/protobufjs/src/writer_buffer.js +85 -0
- data/js/node_modules/protobufjs/tsconfig.json +7 -0
- data/js/node_modules/tr46/index.js +193 -0
- data/js/node_modules/tr46/lib/mappingTable.json +1 -0
- data/js/node_modules/tr46/package.json +31 -0
- data/js/node_modules/typed-ts-events/dist/EventEmitter.d.ts +23 -0
- data/js/node_modules/typed-ts-events/dist/events.js +145 -0
- data/js/node_modules/typed-ts-events/dist/events.js.map +1 -0
- data/js/node_modules/typed-ts-events/dist/events.min.js +2 -0
- data/js/node_modules/typed-ts-events/dist/events.min.js.map +1 -0
- data/js/node_modules/typed-ts-events/dist/index.d.ts +3 -0
- data/js/node_modules/typed-ts-events/package.json +64 -0
- data/js/node_modules/typed-ts-events/readme.md +77 -0
- data/js/node_modules/webidl-conversions/LICENSE.md +12 -0
- data/js/node_modules/webidl-conversions/README.md +53 -0
- data/js/node_modules/webidl-conversions/lib/index.js +189 -0
- data/js/node_modules/webidl-conversions/package.json +23 -0
- data/js/node_modules/whatwg-url/LICENSE.txt +21 -0
- data/js/node_modules/whatwg-url/README.md +67 -0
- data/js/node_modules/whatwg-url/lib/URL-impl.js +200 -0
- data/js/node_modules/whatwg-url/lib/URL.js +196 -0
- data/js/node_modules/whatwg-url/lib/public-api.js +11 -0
- data/js/node_modules/whatwg-url/lib/url-state-machine.js +1297 -0
- data/js/node_modules/whatwg-url/lib/utils.js +20 -0
- data/js/node_modules/whatwg-url/package.json +32 -0
- data/js/package-lock.json +706 -0
- data/js/package.json +15 -0
- data/js/worker.js +109 -0
- data/js/yarn.lock +285 -0
- data/lib/waves_lib/map.rb +211 -0
- data/lib/waves_lib/root_wrapper.rb +85 -0
- data/lib/waves_lib/version.rb +6 -0
- data/lib/waves_lib/wrapped_buffer.rb +26 -0
- data/lib/waves_lib/wrapper.rb +82 -0
- data/lib/waves_lib.rb +10 -0
- metadata +1264 -0
@@ -0,0 +1,33 @@
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.WavesCrypto=t():e.WavesCrypto=t()}(window,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=40)}([function(e,t){e.exports={options:{usePureJavaScript:!1}}},function(e,t,r){(function(t,n,a,i){var s=r(0),o=r(46),u=e.exports=s.util=s.util||{};function c(e){if(8!==e&&16!==e&&24!==e&&32!==e)throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}function l(e){if(this.data="",this.read=0,"string"==typeof e)this.data=e;else if(u.isArrayBuffer(e)||u.isArrayBufferView(e))if(void 0!==i&&e instanceof i)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch(e){for(var r=0;r<t.length;++r)this.putByte(t[r])}}else(e instanceof l||"object"==typeof e&&"string"==typeof e.data&&"number"==typeof e.read)&&(this.data=e.data,this.read=e.read);this._constructedStringLength=0}!function(){if(void 0!==t&&t.nextTick&&!t.browser)return u.nextTick=t.nextTick,void(u.setImmediate="function"==typeof n?n:u.nextTick);if("function"==typeof n)return u.setImmediate=function(){return n.apply(void 0,arguments)},void(u.nextTick=function(e){return n(e)});if(u.setImmediate=function(e){setTimeout(e,0)},"undefined"!=typeof window&&"function"==typeof window.postMessage){var e="forge.setImmediate",r=[];u.setImmediate=function(t){r.push(t),1===r.length&&window.postMessage(e,"*")},window.addEventListener("message",function(t){if(t.source===window&&t.data===e){t.stopPropagation();var n=r.slice();r.length=0,n.forEach(function(e){e()})}},!0)}if("undefined"!=typeof MutationObserver){var a=Date.now(),i=!0,s=document.createElement("div");r=[];new MutationObserver(function(){var e=r.slice();r.length=0,e.forEach(function(e){e()})}).observe(s,{attributes:!0});var o=u.setImmediate;u.setImmediate=function(e){Date.now()-a>15?(a=Date.now(),o(e)):(r.push(e),1===r.length&&s.setAttribute("a",i=!i))}}u.nextTick=u.setImmediate}(),u.isNodejs=void 0!==t&&t.versions&&t.versions.node,u.globalScope=u.isNodejs?a:"undefined"==typeof self?window:self,u.isArray=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},u.isArrayBuffer=function(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer},u.isArrayBufferView=function(e){return e&&u.isArrayBuffer(e.buffer)&&void 0!==e.byteLength},u.ByteBuffer=l,u.ByteStringBuffer=l;u.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},u.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},u.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},u.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))},u.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var r=this.data;t>0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return this.data=r,this._optimizeConstructedString(t),this},u.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this},u.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(u.encodeUtf8(e))},u.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},u.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},u.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},u.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255))},u.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))},u.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))},u.ByteStringBuffer.prototype.putInt=function(e,t){c(t);var r="";do{t-=8,r+=String.fromCharCode(e>>t&255)}while(t>0);return this.putBytes(r)},u.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<<t-1),this.putInt(e,t)},u.ByteStringBuffer.prototype.putBuffer=function(e){return this.putBytes(e.getBytes())},u.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},u.ByteStringBuffer.prototype.getInt16=function(){var e=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,e},u.ByteStringBuffer.prototype.getInt24=function(){var e=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,e},u.ByteStringBuffer.prototype.getInt32=function(){var e=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,e},u.ByteStringBuffer.prototype.getInt16Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,e},u.ByteStringBuffer.prototype.getInt24Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,e},u.ByteStringBuffer.prototype.getInt32Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,e},u.ByteStringBuffer.prototype.getInt=function(e){c(e);var t=0;do{t=(t<<8)+this.data.charCodeAt(this.read++),e-=8}while(e>0);return t},u.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<<e-2;return t>=r&&(t-=r<<1),t},u.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},u.ByteStringBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},u.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)},u.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this},u.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},u.ByteStringBuffer.prototype.copy=function(){var e=u.createBuffer(this.data);return e.read=this.read,e},u.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},u.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},u.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this},u.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.length;++t){var r=this.data.charCodeAt(t);r<16&&(e+="0"),e+=r.toString(16)}return e},u.ByteStringBuffer.prototype.toString=function(){return u.decodeUtf8(this.bytes())},u.DataBuffer=function(e,t){t=t||{},this.read=t.readOffset||0,this.growSize=t.growSize||1024;var r=u.isArrayBuffer(e),n=u.isArrayBufferView(e);if(r||n)return this.data=r?new DataView(e):new DataView(e.buffer,e.byteOffset,e.byteLength),void(this.write="writeOffset"in t?t.writeOffset:this.data.byteLength);this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!=e&&this.putBytes(e),"writeOffset"in t&&(this.write=t.writeOffset)},u.DataBuffer.prototype.length=function(){return this.write-this.read},u.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},u.DataBuffer.prototype.accommodate=function(e,t){if(this.length()>=e)return this;t=Math.max(t||this.growSize,e);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+t);return n.set(r),this.data=new DataView(n.buffer),this},u.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this},u.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var r=0;r<t;++r)this.data.setUint8(e);return this},u.DataBuffer.prototype.putBytes=function(e,t){if(u.isArrayBufferView(e)){var r=(n=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)).byteLength-n.byteOffset;return this.accommodate(r),new Uint8Array(this.data.buffer,this.write).set(n),this.write+=r,this}if(u.isArrayBuffer(e)){var n=new Uint8Array(e);return this.accommodate(n.byteLength),new Uint8Array(this.data.buffer).set(n,this.write),this.write+=n.byteLength,this}if(e instanceof u.DataBuffer||"object"==typeof e&&"number"==typeof e.read&&"number"==typeof e.write&&u.isArrayBufferView(e.data)){n=new Uint8Array(e.data.byteLength,e.read,e.length());return this.accommodate(n.byteLength),new Uint8Array(e.data.byteLength,this.write).set(n),this.write+=n.byteLength,this}if(e instanceof u.ByteStringBuffer&&(e=e.data,t="binary"),t=t||"binary","string"==typeof e){var a;if("hex"===t)return this.accommodate(Math.ceil(e.length/2)),a=new Uint8Array(this.data.buffer,this.write),this.write+=u.binary.hex.decode(e,a,this.write),this;if("base64"===t)return this.accommodate(3*Math.ceil(e.length/4)),a=new Uint8Array(this.data.buffer,this.write),this.write+=u.binary.base64.decode(e,a,this.write),this;if("utf8"===t&&(e=u.encodeUtf8(e),t="binary"),"binary"===t||"raw"===t)return this.accommodate(e.length),a=new Uint8Array(this.data.buffer,this.write),this.write+=u.binary.raw.decode(a),this;if("utf16"===t)return this.accommodate(2*e.length),a=new Uint16Array(this.data.buffer,this.write),this.write+=u.text.utf16.encode(a),this;throw new Error("Invalid encoding: "+t)}throw Error("Invalid parameter: "+e)},u.DataBuffer.prototype.putBuffer=function(e){return this.putBytes(e),e.clear(),this},u.DataBuffer.prototype.putString=function(e){return this.putBytes(e,"utf16")},u.DataBuffer.prototype.putInt16=function(e){return this.accommodate(2),this.data.setInt16(this.write,e),this.write+=2,this},u.DataBuffer.prototype.putInt24=function(e){return this.accommodate(3),this.data.setInt16(this.write,e>>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this},u.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this},u.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this},u.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this},u.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this},u.DataBuffer.prototype.putInt=function(e,t){c(t),this.accommodate(t/8);do{t-=8,this.data.setInt8(this.write++,e>>t&255)}while(t>0);return this},u.DataBuffer.prototype.putSignedInt=function(e,t){return c(t),this.accommodate(t/8),e<0&&(e+=2<<t-1),this.putInt(e,t)},u.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},u.DataBuffer.prototype.getInt16=function(){var e=this.data.getInt16(this.read);return this.read+=2,e},u.DataBuffer.prototype.getInt24=function(){var e=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,e},u.DataBuffer.prototype.getInt32=function(){var e=this.data.getInt32(this.read);return this.read+=4,e},u.DataBuffer.prototype.getInt16Le=function(){var e=this.data.getInt16(this.read,!0);return this.read+=2,e},u.DataBuffer.prototype.getInt24Le=function(){var e=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,e},u.DataBuffer.prototype.getInt32Le=function(){var e=this.data.getInt32(this.read,!0);return this.read+=4,e},u.DataBuffer.prototype.getInt=function(e){c(e);var t=0;do{t=(t<<8)+this.data.getInt8(this.read++),e-=8}while(e>0);return t},u.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<<e-2;return t>=r&&(t-=r<<1),t},u.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},u.DataBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},u.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)},u.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this},u.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},u.DataBuffer.prototype.copy=function(){return new u.DataBuffer(this)},u.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this},u.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},u.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this},u.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.byteLength;++t){var r=this.data.getUint8(t);r<16&&(e+="0"),e+=r.toString(16)}return e},u.DataBuffer.prototype.toString=function(e){var t=new Uint8Array(this.data,this.read,this.length());if("binary"===(e=e||"utf8")||"raw"===e)return u.binary.raw.encode(t);if("hex"===e)return u.binary.hex.encode(t);if("base64"===e)return u.binary.base64.encode(t);if("utf8"===e)return u.text.utf8.decode(t);if("utf16"===e)return u.text.utf16.decode(t);throw new Error("Invalid encoding: "+e)},u.createBuffer=function(e,t){return t=t||"raw",void 0!==e&&"utf8"===t&&(e=u.encodeUtf8(e)),new u.ByteBuffer(e)},u.fillString=function(e,t){for(var r="";t>0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return r},u.xorBytes=function(e,t,r){for(var n="",a="",i="",s=0,o=0;r>0;--r,++s)a=e.charCodeAt(s)^t.charCodeAt(s),o>=10&&(n+=i,i="",o=0),i+=String.fromCharCode(a),++o;return n+=i},u.hexToBytes=function(e){var t="",r=0;for(!0&e.length&&(r=1,t+=String.fromCharCode(parseInt(e[0],16)));r<e.length;r+=2)t+=String.fromCharCode(parseInt(e.substr(r,2),16));return t},u.bytesToHex=function(e){return u.createBuffer(e).toHex()},u.int32ToBytes=function(e){return String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)};var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",h=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],p="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";u.encode64=function(e,t){for(var r,n,a,i="",s="",o=0;o<e.length;)r=e.charCodeAt(o++),n=e.charCodeAt(o++),a=e.charCodeAt(o++),i+=f.charAt(r>>2),i+=f.charAt((3&r)<<4|n>>4),isNaN(n)?i+="==":(i+=f.charAt((15&n)<<2|a>>6),i+=isNaN(a)?"=":f.charAt(63&a)),t&&i.length>t&&(s+=i.substr(0,t)+"\r\n",i=i.substr(t));return s+=i},u.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t,r,n,a,i="",s=0;s<e.length;)t=h[e.charCodeAt(s++)-43],r=h[e.charCodeAt(s++)-43],n=h[e.charCodeAt(s++)-43],a=h[e.charCodeAt(s++)-43],i+=String.fromCharCode(t<<2|r>>4),64!==n&&(i+=String.fromCharCode((15&r)<<4|n>>2),64!==a&&(i+=String.fromCharCode((3&n)<<6|a)));return i},u.encodeUtf8=function(e){return unescape(encodeURIComponent(e))},u.decodeUtf8=function(e){return decodeURIComponent(escape(e))},u.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:o.encode,decode:o.decode}},u.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)},u.binary.raw.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(e.length));for(var a=r=r||0,i=0;i<e.length;++i)n[a++]=e.charCodeAt(i);return t?a-r:n},u.binary.hex.encode=u.bytesToHex,u.binary.hex.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(Math.ceil(e.length/2)));var a=0,i=r=r||0;for(1&e.length&&(a=1,n[i++]=parseInt(e[0],16));a<e.length;a+=2)n[i++]=parseInt(e.substr(a,2),16);return t?i-r:n},u.binary.base64.encode=function(e,t){for(var r,n,a,i="",s="",o=0;o<e.byteLength;)r=e[o++],n=e[o++],a=e[o++],i+=f.charAt(r>>2),i+=f.charAt((3&r)<<4|n>>4),isNaN(n)?i+="==":(i+=f.charAt((15&n)<<2|a>>6),i+=isNaN(a)?"=":f.charAt(63&a)),t&&i.length>t&&(s+=i.substr(0,t)+"\r\n",i=i.substr(t));return s+=i},u.binary.base64.decode=function(e,t,r){var n,a,i,s,o=t;o||(o=new Uint8Array(3*Math.ceil(e.length/4))),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var u=0,c=r=r||0;u<e.length;)n=h[e.charCodeAt(u++)-43],a=h[e.charCodeAt(u++)-43],i=h[e.charCodeAt(u++)-43],s=h[e.charCodeAt(u++)-43],o[c++]=n<<2|a>>4,64!==i&&(o[c++]=(15&a)<<4|i>>2,64!==s&&(o[c++]=(3&i)<<6|s));return t?c-r:o.subarray(0,c)},u.binary.base58.encode=function(e,t){return u.binary.baseN.encode(e,p,t)},u.binary.base58.decode=function(e,t){return u.binary.baseN.decode(e,p,t)},u.text={utf8:{},utf16:{}},u.text.utf8.encode=function(e,t,r){e=u.encodeUtf8(e);var n=t;n||(n=new Uint8Array(e.length));for(var a=r=r||0,i=0;i<e.length;++i)n[a++]=e.charCodeAt(i);return t?a-r:n},u.text.utf8.decode=function(e){return u.decodeUtf8(String.fromCharCode.apply(null,e))},u.text.utf16.encode=function(e,t,r){var n=t;n||(n=new Uint8Array(2*e.length));for(var a=new Uint16Array(n.buffer),i=r=r||0,s=r,o=0;o<e.length;++o)a[s++]=e.charCodeAt(o),i+=2;return t?i-r:n},u.text.utf16.decode=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))},u.deflate=function(e,t,r){if(t=u.decode64(e.deflate(u.encode64(t)).rval),r){var n=2;32&t.charCodeAt(1)&&(n=6),t=t.substring(n,t.length-4)}return t},u.inflate=function(e,t,r){var n=e.inflate(u.encode64(t)).rval;return null===n?null:u.decode64(n)};var d=function(e,t,r){if(!e)throw new Error("WebStorage not available.");var n;if(null===r?n=e.removeItem(t):(r=u.encode64(JSON.stringify(r)),n=e.setItem(t,r)),void 0!==n&&!0!==n.rval){var a=new Error(n.error.message);throw a.id=n.error.id,a.name=n.error.name,a}},y=function(e,t){if(!e)throw new Error("WebStorage not available.");var r=e.getItem(t);if(e.init)if(null===r.rval){if(r.error){var n=new Error(r.error.message);throw n.id=r.error.id,n.name=r.error.name,n}r=null}else r=r.rval;return null!==r&&(r=JSON.parse(u.decode64(r))),r},g=function(e,t,r,n){var a=y(e,t);null===a&&(a={}),a[r]=n,d(e,t,a)},m=function(e,t,r){var n=y(e,t);return null!==n&&(n=r in n?n[r]:null),n},v=function(e,t,r){var n=y(e,t);if(null!==n&&r in n){delete n[r];var a=!0;for(var i in n){a=!1;break}a&&(n=null),d(e,t,n)}},E=function(e,t){d(e,t,null)},C=function(e,t,r){var n,a=null;void 0===r&&(r=["web","flash"]);var i=!1,s=null;for(var o in r){n=r[o];try{if("flash"===n||"both"===n){if(null===t[0])throw new Error("Flash local storage not available.");a=e.apply(this,t),i="flash"===n}"web"!==n&&"both"!==n||(t[0]=localStorage,a=e.apply(this,t),i=!0)}catch(e){s=e}if(i)break}if(!i)throw s;return a};u.setItem=function(e,t,r,n,a){C(g,arguments,a)},u.getItem=function(e,t,r,n){return C(m,arguments,n)},u.removeItem=function(e,t,r,n){C(v,arguments,n)},u.clearItems=function(e,t,r){C(E,arguments,r)},u.parseUrl=function(e){var t=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;t.lastIndex=0;var r=t.exec(e),n=null===r?null:{full:e,scheme:r[1],host:r[2],port:r[3],path:r[4]};return n&&(n.fullHost=n.host,n.port?80!==n.port&&"http"===n.scheme?n.fullHost+=":"+n.port:443!==n.port&&"https"===n.scheme&&(n.fullHost+=":"+n.port):"http"===n.scheme?n.port=80:"https"===n.scheme&&(n.port=443),n.full=n.scheme+"://"+n.fullHost),n};var b=null;u.getQueryVariables=function(e){var t,r=function(e){for(var t={},r=e.split("&"),n=0;n<r.length;n++){var a,i,s=r[n].indexOf("=");s>0?(a=r[n].substring(0,s),i=r[n].substring(s+1)):(a=r[n],i=null),a in t||(t[a]=[]),a in Object.prototype||null===i||t[a].push(unescape(i))}return t};return void 0===e?(null===b&&(b="undefined"!=typeof window&&window.location&&window.location.search?r(window.location.search.substring(1)):{}),t=b):t=r(e),t},u.parseFragment=function(e){var t=e,r="",n=e.indexOf("?");n>0&&(t=e.substring(0,n),r=e.substring(n+1));var a=t.split("/");return a.length>0&&""===a[0]&&a.shift(),{pathString:t,queryString:r,path:a,query:""===r?{}:u.getQueryVariables(r)}},u.makeRequest=function(e){var t=u.parseFragment(e),r={path:t.pathString,query:t.queryString,getPath:function(e){return void 0===e?t.path:t.path[e]},getQuery:function(e,r){var n;return void 0===e?n=t.query:(n=t.query[e])&&void 0!==r&&(n=n[r]),n},getQueryLast:function(e,t){var n=r.getQuery(e);return n?n[n.length-1]:t}};return r},u.makeLink=function(e,t,r){e=jQuery.isArray(e)?e.join("/"):e;var n=jQuery.param(t||{});return r=r||"",e+(n.length>0?"?"+n:"")+(r.length>0?"#"+r:"")},u.setPath=function(e,t,r){if("object"==typeof e&&null!==e)for(var n=0,a=t.length;n<a;){var i=t[n++];if(n==a)e[i]=r;else{var s=i in e;(!s||s&&"object"!=typeof e[i]||s&&null===e[i])&&(e[i]={}),e=e[i]}}},u.getPath=function(e,t,r){for(var n=0,a=t.length,i=!0;i&&n<a&&"object"==typeof e&&null!==e;){var s=t[n++];(i=s in e)&&(e=e[s])}return i?e:r},u.deletePath=function(e,t){if("object"==typeof e&&null!==e)for(var r=0,n=t.length;r<n;){var a=t[r++];if(r==n)delete e[a];else{if(!(a in e)||"object"!=typeof e[a]||null===e[a])break;e=e[a]}}},u.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},u.format=function(e){for(var t,r,n=/%./g,a=0,i=[],s=0;t=n.exec(e);){(r=e.substring(s,n.lastIndex-2)).length>0&&i.push(r),s=n.lastIndex;var o=t[0][1];switch(o){case"s":case"o":a<arguments.length?i.push(arguments[1+a++]):i.push("<?>");break;case"%":i.push("%");break;default:i.push("<%"+o+"?>")}}return i.push(e.substring(s)),i.join("")},u.formatNumber=function(e,t,r,n){var a=e,i=isNaN(t=Math.abs(t))?2:t,s=void 0===r?",":r,o=void 0===n?".":n,u=a<0?"-":"",c=parseInt(a=Math.abs(+a||0).toFixed(i),10)+"",l=c.length>3?c.length%3:0;return u+(l?c.substr(0,l)+o:"")+c.substr(l).replace(/(\d{3})(?=\d)/g,"$1"+o)+(i?s+Math.abs(a-c).toFixed(i).slice(2):"")},u.formatSize=function(e){return e=e>=1073741824?u.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?u.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?u.formatNumber(e/1024,0)+" KiB":u.formatNumber(e,0)+" bytes"},u.bytesFromIP=function(e){return-1!==e.indexOf(".")?u.bytesFromIPv4(e):-1!==e.indexOf(":")?u.bytesFromIPv6(e):null},u.bytesFromIPv4=function(e){if(4!==(e=e.split(".")).length)return null;for(var t=u.createBuffer(),r=0;r<e.length;++r){var n=parseInt(e[r],10);if(isNaN(n))return null;t.putByte(n)}return t.getBytes()},u.bytesFromIPv6=function(e){for(var t=0,r=2*(8-(e=e.split(":").filter(function(e){return 0===e.length&&++t,!0})).length+t),n=u.createBuffer(),a=0;a<8;++a)if(e[a]&&0!==e[a].length){var i=u.hexToBytes(e[a]);i.length<2&&n.putByte(0),n.putBytes(i)}else n.fillWithByte(0,r),r=0;return n.getBytes()},u.bytesToIP=function(e){return 4===e.length?u.bytesToIPv4(e):16===e.length?u.bytesToIPv6(e):null},u.bytesToIPv4=function(e){if(4!==e.length)return null;for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t.join(".")},u.bytesToIPv6=function(e){if(16!==e.length)return null;for(var t=[],r=[],n=0,a=0;a<e.length;a+=2){for(var i=u.bytesToHex(e[a]+e[a+1]);"0"===i[0]&&"0"!==i;)i=i.substr(1);if("0"===i){var s=r[r.length-1],o=t.length;s&&o===s.end+1?(s.end=o,s.end-s.start>r[n].end-r[n].start&&(n=r.length-1)):r.push({start:o,end:o})}t.push(i)}if(r.length>0){var c=r[n];c.end-c.start>0&&(t.splice(c.start,c.end-c.start+1,""),0===c.start&&t.unshift(""),7===c.end&&t.push(""))}return t.join(":")},u.estimateCores=function(e,t){if("function"==typeof e&&(t=e,e={}),e=e||{},"cores"in u&&!e.update)return t(null,u.cores);if("undefined"!=typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return u.cores=navigator.hardwareConcurrency,t(null,u.cores);if("undefined"==typeof Worker)return u.cores=1,t(null,u.cores);if("undefined"==typeof Blob)return u.cores=2,t(null,u.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(e){for(var t=Date.now(),r=t+4;Date.now()<r;);self.postMessage({st:t,et:r})})}.toString(),")()"],{type:"application/javascript"}));!function e(n,a,i){if(0===a){var s=Math.floor(n.reduce(function(e,t){return e+t},0)/n.length);return u.cores=Math.max(1,s),URL.revokeObjectURL(r),t(null,u.cores)}!function(e,t){for(var n=[],a=[],i=0;i<e;++i){var s=new Worker(r);s.addEventListener("message",function(r){if(a.push(r.data),a.length===e){for(var i=0;i<e;++i)n[i].terminate();t(null,a)}}),n.push(s)}for(var i=0;i<e;++i)n[i].postMessage(i)}(i,function(t,r){n.push(function(e,t){for(var r=[],n=0;n<e;++n)for(var a=t[n],i=r[n]=[],s=0;s<e;++s)if(n!==s){var o=t[s];(a.st>o.st&&a.st<o.et||o.st>a.st&&o.st<a.et)&&i.push(s)}return r.reduce(function(e,t){return Math.max(e,t.length)},0)}(i,r)),e(n,a-1,i)})}([],5,16)}}).call(this,r(14),r(44).setImmediate,r(10),r(9).Buffer)},function(e,t,r){var n=r(0);e.exports=n.md=n.md||{},n.md.algorithms=n.md.algorithms||{}},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return s},a=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e};Object.defineProperty(t,"__esModule",{value:!0});var i=r(4),s=r(49);t.stringToBytes=function(e,t){if(void 0===t&&(t="utf8"),"utf8"===t)return s.strToUtf8Array(e);if("raw"===t)return Uint8Array.from(a(e).map(function(e){return e.charCodeAt(0)}));throw new Error("Unsupported encoding "+t)},t.bytesToString=function(e,t){if(void 0===t&&(t="utf8"),"utf8"===t)return s.utf8ArrayToStr(Array.from(i._fromIn(e)));if("raw"===t)return Array.from(i._fromIn(e)).map(function(e){return String.fromCharCode(e)}).join("");throw new Error("Unsupported encoding "+t)},t.binaryStringToBytes=function(e){return Uint8Array.from(a(e).map(function(e){return e.charCodeAt(0)}))},t.bytesToBinaryString=function(e){return Array.from(i._fromIn(e)).map(function(e){return String.fromCharCode(e)}).join("")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(15),a=r(3),i=function(e){return"string"==typeof e||e instanceof String},s=function(e){return e instanceof Uint8Array};t._fromIn=function(e){return i(e)?n.base58Decode(e):s(e)?e:Uint8Array.from(e)},t._fromRawIn=function(e){return i(e)?a.stringToBytes(e):s(e)?e:Uint8Array.from(e)}},function(e,t,r){var n=r(0);r(18),r(27),r(47),r(1),n.random&&n.random.getBytes?e.exports=n.random:function(t){var r={},a=new Array(4),i=n.util.createBuffer();function s(){var e=n.prng.create(r);return e.getBytes=function(t,r){return e.generate(t,r)},e.getBytesSync=function(t){return e.generate(t)},e}r.formatKey=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),n.aes._expandKey(e,!1)},r.formatSeed=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),e},r.cipher=function(e,t){return n.aes._updateBlock(e,t,a,!1),i.putInt32(a[0]),i.putInt32(a[1]),i.putInt32(a[2]),i.putInt32(a[3]),i.getBytes()},r.increment=function(e){return++e[3],e},r.md=n.md.sha256;var o=s(),u=null,c=n.util.globalScope,l=c.crypto||c.msCrypto;if(l&&l.getRandomValues&&(u=function(e){return l.getRandomValues(e)}),n.options.usePureJavaScript||!n.util.isNodejs&&!u){if("undefined"==typeof window||window.document,o.collectInt(+new Date,32),"undefined"!=typeof navigator){var f="";for(var h in navigator)try{"string"==typeof navigator[h]&&(f+=navigator[h])}catch(e){}o.collect(f),f=null}t&&(t().mousemove(function(e){o.collectInt(e.clientX,16),o.collectInt(e.clientY,16)}),t().keypress(function(e){o.collectInt(e.charCode,8)}))}if(n.random)for(var h in o)n.random[h]=o[h];else n.random=o;n.random.createInstance=s,e.exports=n.random}("undefined"!=typeof jQuery?jQuery:null)},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=r(4),i=r(50),s=n(r(21)),o=n(r(2));r(27);var u=n(r(51)),c=r(3);t._hashChain=function(e){return a._fromIn(t.keccak(t.blake2b(a._fromIn(e))))},t.sha256=function(e){var t=o.algorithms.sha256.create();return t.update(c.bytesToString(e,"raw")),c.stringToBytes(t.digest().getBytes(),"raw")},t.blake2b=function(e){return u.blake2b(a._fromIn(e),null,32)},t.keccak=function(e){return a._fromIn(i.keccak256.array(a._fromIn(e)))},t.hmacSHA256=function(e,t){var r=s.create();return r.start("sha256",c.bytesToString(a._fromIn(t),"raw")),r.update(c.bytesToString(a._fromIn(e),"raw")),c.stringToBytes(r.digest().getBytes(),"raw")}},function(e,t,r){var n=r(0);r(1),r(8);var a=e.exports=n.asn1=n.asn1||{};function i(e,t,r){if(r>t){var n=new Error("Too few bytes to parse DER.");throw n.available=e.length(),n.remaining=t,n.requested=r,n}}a.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},a.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},a.create=function(e,t,r,i,s){if(n.util.isArray(i)){for(var o=[],u=0;u<i.length;++u)void 0!==i[u]&&o.push(i[u]);i=o}var c={tagClass:e,type:t,constructed:r,composed:r||n.util.isArray(i),value:i};return s&&"bitStringContents"in s&&(c.bitStringContents=s.bitStringContents,c.original=a.copy(c)),c},a.copy=function(e,t){var r;if(n.util.isArray(e)){r=[];for(var i=0;i<e.length;++i)r.push(a.copy(e[i],t));return r}return"string"==typeof e?e:(r={tagClass:e.tagClass,type:e.type,constructed:e.constructed,composed:e.composed,value:a.copy(e.value,t)},t&&!t.excludeBitStringContents&&(r.bitStringContents=e.bitStringContents),r)},a.equals=function(e,t,r){if(n.util.isArray(e)){if(!n.util.isArray(t))return!1;if(e.length!==t.length)return!1;for(var i=0;i<e.length;++i)if(!a.equals(e[i],t[i]))return!1;return!0}if(typeof e!=typeof t)return!1;if("string"==typeof e)return e===t;var s=e.tagClass===t.tagClass&&e.type===t.type&&e.constructed===t.constructed&&e.composed===t.composed&&a.equals(e.value,t.value);return r&&r.includeBitStringContents&&(s=s&&e.bitStringContents===t.bitStringContents),s},a.getBerValueLength=function(e){var t=e.getByte();if(128!==t)return 128&t?e.getInt((127&t)<<3):t};var s=function(e,t){var r=e.getByte();if(128!==r){var n;if(128&r){var a=127&r;i(e,--t,a),n=e.getInt(a<<3)}else n=r;if(n<0)throw new Error("Negative length: "+n);return n}};a.fromDer=function(e,t){return void 0===t&&(t={strict:!0,decodeBitStrings:!0}),"boolean"==typeof t&&(t={strict:t,decodeBitStrings:!0}),"strict"in t||(t.strict=!0),"decodeBitStrings"in t||(t.decodeBitStrings=!0),"string"==typeof e&&(e=n.util.createBuffer(e)),function e(t,r,n,o){var u;i(t,r,2);var c=t.getByte();r--;var l=192&c;var f=31&c;u=t.length();var h=s(t,r);r-=u-t.length();if(void 0!==h&&h>r){if(o.strict){var p=new Error("Too few bytes to read ASN.1 value.");throw p.available=t.length(),p.remaining=r,p.requested=h,p}h=r}var d;var y;var g=32==(32&c);if(g)if(d=[],void 0===h)for(;;){if(i(t,r,2),t.bytes(2)===String.fromCharCode(0,0)){t.getBytes(2),r-=2;break}u=t.length(),d.push(e(t,r,n+1,o)),r-=u-t.length()}else for(;h>0;)u=t.length(),d.push(e(t,h,n+1,o)),r-=u-t.length(),h-=u-t.length();void 0===d&&l===a.Class.UNIVERSAL&&f===a.Type.BITSTRING&&(y=t.bytes(h));if(void 0===d&&o.decodeBitStrings&&l===a.Class.UNIVERSAL&&f===a.Type.BITSTRING&&h>1){var m=t.read,v=r,E=0;if(f===a.Type.BITSTRING&&(i(t,r,1),E=t.getByte(),r--),0===E)try{u=t.length();var C={verbose:o.verbose,strict:!0,decodeBitStrings:!0},b=e(t,r,n+1,C),S=u-t.length();r-=S,f==a.Type.BITSTRING&&S++;var T=b.tagClass;S!==h||T!==a.Class.UNIVERSAL&&T!==a.Class.CONTEXT_SPECIFIC||(d=[b])}catch(e){}void 0===d&&(t.read=m,r=v)}if(void 0===d){if(void 0===h){if(o.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");h=r}if(f===a.Type.BMPSTRING)for(d="";h>0;h-=2)i(t,r,2),d+=String.fromCharCode(t.getInt16()),r-=2;else d=t.getBytes(h)}var I=void 0===y?null:{bitStringContents:y};return a.create(l,f,g,d,I)}(e,e.length(),0,t)},a.toDer=function(e){var t=n.util.createBuffer(),r=e.tagClass|e.type,i=n.util.createBuffer(),s=!1;if("bitStringContents"in e&&(s=!0,e.original&&(s=a.equals(e,e.original))),s)i.putBytes(e.bitStringContents);else if(e.composed){e.constructed?r|=32:i.putByte(0);for(var o=0;o<e.value.length;++o)void 0!==e.value[o]&&i.putBuffer(a.toDer(e.value[o]))}else if(e.type===a.Type.BMPSTRING)for(o=0;o<e.value.length;++o)i.putInt16(e.value.charCodeAt(o));else e.type===a.Type.INTEGER&&e.value.length>1&&(0===e.value.charCodeAt(0)&&0==(128&e.value.charCodeAt(1))||255===e.value.charCodeAt(0)&&128==(128&e.value.charCodeAt(1)))?i.putBytes(e.value.substr(1)):i.putBytes(e.value);if(t.putByte(r),i.length()<=127)t.putByte(127&i.length());else{var u=i.length(),c="";do{c+=String.fromCharCode(255&u),u>>>=8}while(u>0);t.putByte(128|c.length);for(o=c.length-1;o>=0;--o)t.putByte(c.charCodeAt(o))}return t.putBuffer(i),t},a.oidToDer=function(e){var t,r,a,i,s=e.split("."),o=n.util.createBuffer();o.putByte(40*parseInt(s[0],10)+parseInt(s[1],10));for(var u=2;u<s.length;++u){t=!0,r=[],a=parseInt(s[u],10);do{i=127&a,a>>>=7,t||(i|=128),r.push(i),t=!1}while(a>0);for(var c=r.length-1;c>=0;--c)o.putByte(r[c])}return o},a.derToOid=function(e){var t;"string"==typeof e&&(e=n.util.createBuffer(e));var r=e.getByte();t=Math.floor(r/40)+"."+r%40;for(var a=0;e.length()>0;)a<<=7,128&(r=e.getByte())?a+=127&r:(t+="."+(a+r),a=0);return t},a.utcTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,2),10);r=r>=50?1900+r:2e3+r;var n=parseInt(e.substr(2,2),10)-1,a=parseInt(e.substr(4,2),10),i=parseInt(e.substr(6,2),10),s=parseInt(e.substr(8,2),10),o=0;if(e.length>11){var u=e.charAt(10),c=10;"+"!==u&&"-"!==u&&(o=parseInt(e.substr(10,2),10),c+=2)}if(t.setUTCFullYear(r,n,a),t.setUTCHours(i,s,o,0),c&&("+"===(u=e.charAt(c))||"-"===u)){var l=60*parseInt(e.substr(c+1,2),10)+parseInt(e.substr(c+4,2),10);l*=6e4,"+"===u?t.setTime(+t-l):t.setTime(+t+l)}return t},a.generalizedTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,4),10),n=parseInt(e.substr(4,2),10)-1,a=parseInt(e.substr(6,2),10),i=parseInt(e.substr(8,2),10),s=parseInt(e.substr(10,2),10),o=parseInt(e.substr(12,2),10),u=0,c=0,l=!1;"Z"===e.charAt(e.length-1)&&(l=!0);var f=e.length-5,h=e.charAt(f);"+"!==h&&"-"!==h||(c=60*parseInt(e.substr(f+1,2),10)+parseInt(e.substr(f+4,2),10),c*=6e4,"+"===h&&(c*=-1),l=!0);return"."===e.charAt(14)&&(u=1e3*parseFloat(e.substr(14),10)),l?(t.setUTCFullYear(r,n,a),t.setUTCHours(i,s,o,u),t.setTime(+t+c)):(t.setFullYear(r,n,a),t.setHours(i,s,o,u)),t},a.dateToUtcTime=function(e){if("string"==typeof e)return e;var t="",r=[];r.push((""+e.getUTCFullYear()).substr(2)),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var n=0;n<r.length;++n)r[n].length<2&&(t+="0"),t+=r[n];return t+="Z"},a.dateToGeneralizedTime=function(e){if("string"==typeof e)return e;var t="",r=[];r.push(""+e.getUTCFullYear()),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var n=0;n<r.length;++n)r[n].length<2&&(t+="0"),t+=r[n];return t+="Z"},a.integerToDer=function(e){var t=n.util.createBuffer();if(e>=-128&&e<128)return t.putSignedInt(e,8);if(e>=-32768&&e<32768)return t.putSignedInt(e,16);if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24);if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=e,r},a.derToInteger=function(e){"string"==typeof e&&(e=n.util.createBuffer(e));var t=8*e.length();if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)},a.validate=function(e,t,r,i){var s=!1;if(e.tagClass!==t.tagClass&&void 0!==t.tagClass||e.type!==t.type&&void 0!==t.type)i&&(e.tagClass!==t.tagClass&&i.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&i.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"'));else if(e.constructed===t.constructed||void 0===t.constructed){if(s=!0,t.value&&n.util.isArray(t.value))for(var o=0,u=0;s&&u<t.value.length;++u)s=t.value[u].optional||!1,e.value[o]&&((s=a.validate(e.value[o],t.value[u],r,i))?++o:t.value[u].optional&&(s=!0)),!s&&i&&i.push("["+t.name+'] Tag class "'+t.tagClass+'", type "'+t.type+'" expected value length "'+t.value.length+'", got "'+e.value.length+'"');if(s&&r)if(t.capture&&(r[t.capture]=e.value),t.captureAsn1&&(r[t.captureAsn1]=e),t.captureBitStringContents&&"bitStringContents"in e&&(r[t.captureBitStringContents]=e.bitStringContents),t.captureBitStringValue&&"bitStringContents"in e)if(e.bitStringContents.length<2)r[t.captureBitStringValue]="";else{if(0!==e.bitStringContents.charCodeAt(0))throw new Error("captureBitStringValue only supported for zero unused bits");r[t.captureBitStringValue]=e.bitStringContents.slice(1)}}else i&&i.push("["+t.name+'] Expected constructed "'+t.constructed+'", got "'+e.constructed+'"');return s};var o=/[^\\u0000-\\u00ff]/;a.prettyPrint=function(e,t,r){var i="";r=r||2,(t=t||0)>0&&(i+="\n");for(var s="",u=0;u<t*r;++u)s+=" ";switch(i+=s+"Tag: ",e.tagClass){case a.Class.UNIVERSAL:i+="Universal:";break;case a.Class.APPLICATION:i+="Application:";break;case a.Class.CONTEXT_SPECIFIC:i+="Context-Specific:";break;case a.Class.PRIVATE:i+="Private:"}if(e.tagClass===a.Class.UNIVERSAL)switch(i+=e.type,e.type){case a.Type.NONE:i+=" (None)";break;case a.Type.BOOLEAN:i+=" (Boolean)";break;case a.Type.INTEGER:i+=" (Integer)";break;case a.Type.BITSTRING:i+=" (Bit string)";break;case a.Type.OCTETSTRING:i+=" (Octet string)";break;case a.Type.NULL:i+=" (Null)";break;case a.Type.OID:i+=" (Object Identifier)";break;case a.Type.ODESC:i+=" (Object Descriptor)";break;case a.Type.EXTERNAL:i+=" (External or Instance of)";break;case a.Type.REAL:i+=" (Real)";break;case a.Type.ENUMERATED:i+=" (Enumerated)";break;case a.Type.EMBEDDED:i+=" (Embedded PDV)";break;case a.Type.UTF8:i+=" (UTF8)";break;case a.Type.ROID:i+=" (Relative Object Identifier)";break;case a.Type.SEQUENCE:i+=" (Sequence)";break;case a.Type.SET:i+=" (Set)";break;case a.Type.PRINTABLESTRING:i+=" (Printable String)";break;case a.Type.IA5String:i+=" (IA5String (ASCII))";break;case a.Type.UTCTIME:i+=" (UTC time)";break;case a.Type.GENERALIZEDTIME:i+=" (Generalized time)";break;case a.Type.BMPSTRING:i+=" (BMP String)"}else i+=e.type;if(i+="\n",i+=s+"Constructed: "+e.constructed+"\n",e.composed){var c=0,l="";for(u=0;u<e.value.length;++u)void 0!==e.value[u]&&(c+=1,l+=a.prettyPrint(e.value[u],t+1,r),u+1<e.value.length&&(l+=","));i+=s+"Sub values: "+c+l}else{if(i+=s+"Value: ",e.type===a.Type.OID){var f=a.derToOid(e.value);i+=f,n.pki&&n.pki.oids&&f in n.pki.oids&&(i+=" ("+n.pki.oids[f]+") ")}if(e.type===a.Type.INTEGER)try{i+=a.derToInteger(e.value)}catch(t){i+="0x"+n.util.bytesToHex(e.value)}else if(e.type===a.Type.BITSTRING){if(e.value.length>1?i+="0x"+n.util.bytesToHex(e.value.slice(1)):i+="(none)",e.value.length>0){var h=e.value.charCodeAt(0);1==h?i+=" (1 unused bit shown)":h>1&&(i+=" ("+h+" unused bits shown)")}}else e.type===a.Type.OCTETSTRING?(o.test(e.value)||(i+="("+e.value+") "),i+="0x"+n.util.bytesToHex(e.value)):e.type===a.Type.UTF8?i+=n.util.decodeUtf8(e.value):e.type===a.Type.PRINTABLESTRING||e.type===a.Type.IA5String?i+=e.value:o.test(e.value)?i+="0x"+n.util.bytesToHex(e.value):0===e.value.length?i+="[null]":i+=e.value}return i}},function(e,t,r){var n=r(0);n.pki=n.pki||{};var a=e.exports=n.pki.oids=n.oids=n.oids||{};function i(e,t){a[e]=t,a[t]=e}function s(e,t){a[e]=t}i("1.2.840.113549.1.1.1","rsaEncryption"),i("1.2.840.113549.1.1.4","md5WithRSAEncryption"),i("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),i("1.2.840.113549.1.1.7","RSAES-OAEP"),i("1.2.840.113549.1.1.8","mgf1"),i("1.2.840.113549.1.1.9","pSpecified"),i("1.2.840.113549.1.1.10","RSASSA-PSS"),i("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),i("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),i("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),i("1.2.840.10040.4.3","dsa-with-sha1"),i("1.3.14.3.2.7","desCBC"),i("1.3.14.3.2.26","sha1"),i("2.16.840.1.101.3.4.2.1","sha256"),i("2.16.840.1.101.3.4.2.2","sha384"),i("2.16.840.1.101.3.4.2.3","sha512"),i("1.2.840.113549.2.5","md5"),i("1.2.840.113549.1.7.1","data"),i("1.2.840.113549.1.7.2","signedData"),i("1.2.840.113549.1.7.3","envelopedData"),i("1.2.840.113549.1.7.4","signedAndEnvelopedData"),i("1.2.840.113549.1.7.5","digestedData"),i("1.2.840.113549.1.7.6","encryptedData"),i("1.2.840.113549.1.9.1","emailAddress"),i("1.2.840.113549.1.9.2","unstructuredName"),i("1.2.840.113549.1.9.3","contentType"),i("1.2.840.113549.1.9.4","messageDigest"),i("1.2.840.113549.1.9.5","signingTime"),i("1.2.840.113549.1.9.6","counterSignature"),i("1.2.840.113549.1.9.7","challengePassword"),i("1.2.840.113549.1.9.8","unstructuredAddress"),i("1.2.840.113549.1.9.14","extensionRequest"),i("1.2.840.113549.1.9.20","friendlyName"),i("1.2.840.113549.1.9.21","localKeyId"),i("1.2.840.113549.1.9.22.1","x509Certificate"),i("1.2.840.113549.1.12.10.1.1","keyBag"),i("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),i("1.2.840.113549.1.12.10.1.3","certBag"),i("1.2.840.113549.1.12.10.1.4","crlBag"),i("1.2.840.113549.1.12.10.1.5","secretBag"),i("1.2.840.113549.1.12.10.1.6","safeContentsBag"),i("1.2.840.113549.1.5.13","pkcs5PBES2"),i("1.2.840.113549.1.5.12","pkcs5PBKDF2"),i("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),i("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),i("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),i("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),i("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),i("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),i("1.2.840.113549.2.7","hmacWithSHA1"),i("1.2.840.113549.2.8","hmacWithSHA224"),i("1.2.840.113549.2.9","hmacWithSHA256"),i("1.2.840.113549.2.10","hmacWithSHA384"),i("1.2.840.113549.2.11","hmacWithSHA512"),i("1.2.840.113549.3.7","des-EDE3-CBC"),i("2.16.840.1.101.3.4.1.2","aes128-CBC"),i("2.16.840.1.101.3.4.1.22","aes192-CBC"),i("2.16.840.1.101.3.4.1.42","aes256-CBC"),i("2.5.4.3","commonName"),i("2.5.4.5","serialName"),i("2.5.4.6","countryName"),i("2.5.4.7","localityName"),i("2.5.4.8","stateOrProvinceName"),i("2.5.4.10","organizationName"),i("2.5.4.11","organizationalUnitName"),i("2.5.4.13","description"),i("2.16.840.1.113730.1.1","nsCertType"),i("2.16.840.1.113730.1.13","nsComment"),s("2.5.29.1","authorityKeyIdentifier"),s("2.5.29.2","keyAttributes"),s("2.5.29.3","certificatePolicies"),s("2.5.29.4","keyUsageRestriction"),s("2.5.29.5","policyMapping"),s("2.5.29.6","subtreesConstraint"),s("2.5.29.7","subjectAltName"),s("2.5.29.8","issuerAltName"),s("2.5.29.9","subjectDirectoryAttributes"),s("2.5.29.10","basicConstraints"),s("2.5.29.11","nameConstraints"),s("2.5.29.12","policyConstraints"),s("2.5.29.13","basicConstraints"),i("2.5.29.14","subjectKeyIdentifier"),i("2.5.29.15","keyUsage"),s("2.5.29.16","privateKeyUsagePeriod"),i("2.5.29.17","subjectAltName"),i("2.5.29.18","issuerAltName"),i("2.5.29.19","basicConstraints"),s("2.5.29.20","cRLNumber"),s("2.5.29.21","cRLReason"),s("2.5.29.22","expirationDate"),s("2.5.29.23","instructionCode"),s("2.5.29.24","invalidityDate"),s("2.5.29.25","cRLDistributionPoints"),s("2.5.29.26","issuingDistributionPoint"),s("2.5.29.27","deltaCRLIndicator"),s("2.5.29.28","issuingDistributionPoint"),s("2.5.29.29","certificateIssuer"),s("2.5.29.30","nameConstraints"),i("2.5.29.31","cRLDistributionPoints"),i("2.5.29.32","certificatePolicies"),s("2.5.29.33","policyMappings"),s("2.5.29.34","policyConstraints"),i("2.5.29.35","authorityKeyIdentifier"),s("2.5.29.36","policyConstraints"),i("2.5.29.37","extKeyUsage"),s("2.5.29.46","freshestCRL"),s("2.5.29.54","inhibitAnyPolicy"),i("1.3.6.1.4.1.11129.2.4.2","timestampList"),i("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),i("1.3.6.1.5.5.7.3.1","serverAuth"),i("1.3.6.1.5.5.7.3.2","clientAuth"),i("1.3.6.1.5.5.7.3.3","codeSigning"),i("1.3.6.1.5.5.7.3.4","emailProtection"),i("1.3.6.1.5.5.7.3.8","timeStamping")},function(e,t,r){"use strict";(function(e){
|
2
|
+
/*!
|
3
|
+
* The buffer module from node.js, for the browser.
|
4
|
+
*
|
5
|
+
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
6
|
+
* @license MIT
|
7
|
+
*/
|
8
|
+
var n=r(41),a=r(42),i=r(43);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return c(this,e,t,r)}function c(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=h(e,t);return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(t,r),a=(e=o(e,n)).write(t,r);a!==n&&(e=e.slice(0,a));return e}(e,t,r):function(e,t){if(u.isBuffer(t)){var r=0|p(t.length);return 0===(e=o(e,r)).length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?o(e,0):h(e,t);if("Buffer"===t.type&&i(t.data))return h(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=o(e,t<0?0:0|p(t)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function h(e,t){var r=t.length<0?0:0|p(t.length);e=o(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function p(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return M(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return j(e).length;default:if(n)return M(e).length;t=(""+t).toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,a){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,a);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,a);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,a){var i,s=1,o=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,o/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(a){var l=-1;for(i=r;i<o;i++)if(c(e,i)===c(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*s}else-1!==l&&(i-=i-l),l=-1}else for(r+u>o&&(r=o-u),i=r;i>=0;i--){for(var f=!0,h=0;h<u;h++)if(c(e,i+h)!==c(t,h)){f=!1;break}if(f)return i}return-1}function v(e,t,r,n){r=Number(r)||0;var a=e.length-r;n?(n=Number(n))>a&&(n=a):n=a;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var s=0;s<n;++s){var o=parseInt(t.substr(2*s,2),16);if(isNaN(o))return s;e[r+s]=o}return s}function E(e,t,r,n){return F(M(t,e.length-r),e,r,n)}function C(e,t,r,n){return F(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function b(e,t,r,n){return C(e,t,r,n)}function S(e,t,r,n){return F(j(t),e,r,n)}function T(e,t,r,n){return F(function(e,t){for(var r,n,a,i=[],s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,a=r%256,i.push(a),i.push(n);return i}(t,e.length-r),e,r,n)}function I(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);for(var n=[],a=t;a<r;){var i,s,o,u,c=e[a],l=null,f=c>239?4:c>223?3:c>191?2:1;if(a+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[a+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[a+1],s=e[a+2],128==(192&i)&&128==(192&s)&&(u=(15&c)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[a+1],s=e[a+2],o=e[a+3],128==(192&i)&&128==(192&s)&&128==(192&o)&&(u=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&o)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),a+=f}return function(e){var t=e.length;if(t<=w)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=w));return r}(n)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,r){return c(null,e,t,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,r){return function(e,t,r,n){return l(t),t<=0?o(e,t):void 0!==r?"string"==typeof n?o(e,t).fill(r,n):o(e,t).fill(r):o(e,t)}(null,e,t,r)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,a=0,i=Math.min(r,n);a<i;++a)if(e[a]!==t[a]){r=e[a],n=t[a];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=u.allocUnsafe(t),a=0;for(r=0;r<e.length;++r){var s=e[r];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,a),a+=s.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?A(this,0,e):function(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return B(this,t,r);case"latin1":case"binary":return N(this,t,r);case"base64":return I(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,r,n,a){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),t<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&t>=r)return 0;if(n>=a)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(a>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),o=Math.min(i,s),c=this.slice(n,a),l=e.slice(t,r),f=0;f<o;++f)if(c[f]!==l[f]){i=c[f],s=l[f];break}return i<s?-1:s<i?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var a=this.length-t;if((void 0===r||r>a)&&(r=a),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":return C(this,e,t,r);case"latin1":case"binary":return b(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var w=4096;function B(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;a<r;++a)n+=String.fromCharCode(127&e[a]);return n}function N(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;a<r;++a)n+=String.fromCharCode(e[a]);return n}function R(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var a="",i=t;i<r;++i)a+=K(e[i]);return a}function k(e,t,r){for(var n=e.slice(t,r),a="",i=0;i<n.length;i+=2)a+=String.fromCharCode(n[i]+256*n[i+1]);return a}function U(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function _(e,t,r,n,a,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function L(e,t,r,n){t<0&&(t=65535+t+1);for(var a=0,i=Math.min(e.length-r,2);a<i;++a)e[r+a]=(t&255<<8*(n?a:1-a))>>>8*(n?a:1-a)}function P(e,t,r,n){t<0&&(t=4294967295+t+1);for(var a=0,i=Math.min(e.length-r,4);a<i;++a)e[r+a]=t>>>8*(n?a:3-a)&255}function D(e,t,r,n,a,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function O(e,t,r,n,i){return i||D(e,0,r,4),a.write(e,t,r,n,23,4),r+4}function V(e,t,r,n,i){return i||D(e,0,r,8),a.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=u.prototype;else{var a=t-e;r=new u(a,void 0);for(var i=0;i<a;++i)r[i]=this[i+e]}return r},u.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||U(e,t,this.length);for(var n=this[e],a=1,i=0;++i<t&&(a*=256);)n+=this[e+i]*a;return n},u.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||U(e,t,this.length);for(var n=this[e+--t],a=1;t>0&&(a*=256);)n+=this[e+--t]*a;return n},u.prototype.readUInt8=function(e,t){return t||U(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||U(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||U(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||U(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||U(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||U(e,t,this.length);for(var n=this[e],a=1,i=0;++i<t&&(a*=256);)n+=this[e+i]*a;return n>=(a*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||U(e,t,this.length);for(var n=t,a=1,i=this[e+--n];n>0&&(a*=256);)i+=this[e+--n]*a;return i>=(a*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return t||U(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||U(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||U(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||U(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||U(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||U(e,4,this.length),a.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||U(e,4,this.length),a.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||U(e,8,this.length),a.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||U(e,8,this.length),a.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||_(this,e,t,r,Math.pow(2,8*r)-1,0);var a=1,i=0;for(this[t]=255&e;++i<r&&(a*=256);)this[t+i]=e/a&255;return t+r},u.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||_(this,e,t,r,Math.pow(2,8*r)-1,0);var a=r-1,i=1;for(this[t+a]=255&e;--a>=0&&(i*=256);)this[t+a]=e/i&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):P(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):P(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);_(this,e,t,r,a-1,-a)}var i=0,s=1,o=0;for(this[t]=255&e;++i<r&&(s*=256);)e<0&&0===o&&0!==this[t+i-1]&&(o=1),this[t+i]=(e/s>>0)-o&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);_(this,e,t,r,a-1,-a)}var i=r-1,s=1,o=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/s>>0)-o&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):P(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):P(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return O(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return O(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return V(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return V(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var a,i=n-r;if(this===e&&r<t&&t<n)for(a=i-1;a>=0;--a)e[a+t]=this[a+r];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(a=0;a<i;++a)e[a+t]=this[a+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+i),t);return i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var a=e.charCodeAt(0);a<256&&(e=a)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var s=u.isBuffer(e)?e:M(new u(e,n).toString()),o=s.length;for(i=0;i<r-t;++i)this[i+t]=s[i%o]}return this};var x=/[^+\/0-9A-Za-z-_]/g;function K(e){return e<16?"0"+e.toString(16):e.toString(16)}function M(e,t){var r;t=t||1/0;for(var n=e.length,a=null,i=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function j(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(x,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,r,n){for(var a=0;a<n&&!(a+r>=t.length||a>=e.length);++a)t[a+r]=e[a];return a}}).call(this,r(10))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return s},a=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e};Object.defineProperty(t,"__esModule",{value:!0});var i=r(4);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce(function(e,t){return Uint8Array.from(a(e,i._fromIn(t)))},new Uint8Array(0))},t.split=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=t.reduce(function(e,t){return{arr:e.arr.slice(t),r:a(e.r,[e.arr.slice(0,t)])}},{arr:i._fromIn(e),r:[]}),s=n.r,o=n.arr;return a(s,[o])}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PUBLIC_KEY_LENGTH=32,t.PRIVATE_KEY_LENGTH=32,t.SIGNATURE_LENGTH=64,t.ADDRESS_LENGTH=26,t.MAIN_NET_CHAIN_ID=87,t.TEST_NET_CHAIN_ID=84},function(e,t,r){"use strict";(function(e){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(r(5)),i=r(28),s=r(3),o=function(e){return s.stringToBytes(a.default.getBytesSync(e),"raw")};t.random=function(r,n){switch(n){case"Array8":return Array.from(o(r));case"Array16":return Array.from(t.random(r,"Uint16Array"));case"Array32":return Array.from(t.random(r,"Uint32Array"));case"Buffer":return function(){try{new e(1)}catch(e){throw new Error("Buffer not supported in this environment. Use Node.js or Browserify for browser support.")}}(),e.from(o(r));case"Uint8Array":return o(r);case"Uint16Array":return new Uint16Array(r).map(function(e){return o(2).reduce(function(e,t,r){return e|t<<8*(1-r)},0)});case"Uint32Array":return new Uint32Array(r).map(function(e){return o(4).reduce(function(e,t,r){return e|t<<8*(1-r)},0)});default:throw new Error(n+" is unsupported.")}},t.randomBytes=function(e){return t.random(e,"Uint8Array")},t.randomSeed=function(e){return void 0===e&&(e=15),t.random(e,"Array32").map(function(e){return i.seedWordsList[e%i.seedWordsList.length]}).join(" ")}}).call(this,r(9).Buffer)},function(e,t){var r,n,a=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=o(h);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function y(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new d(e,t)),1!==c.length||l||o(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=y,a.addListener=y,a.once=y,a.off=y,a.removeListener=y,a.removeAllListeners=y,a.emit=y,a.prependListener=y,a.prependOnceListener=y,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=r(1),i=n(r(48)),s=r(4),o=r(3);t.base64Decode=function(e){return o.stringToBytes(a.decode64(e),"raw")},t.base64Encode=function(e){return a.encode64(o.bytesToString(s._fromIn(e),"raw"))},t.base58Decode=function(e){return i.default.decode(e)},t.base58Encode=function(e){return i.default.encode(s._fromIn(e))},t.base16Decode=function(e){return o.stringToBytes(a.hexToBytes(e),"raw")},t.base16Encode=function(e){return a.bytesToHex(o.bytesToString(s._fromIn(e),"raw"))}},function(e,t,r){"use strict";t.__esModule=!0;var n=Object.create(null),a=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},i=(new Uint8Array(16),new Uint8Array(32));i[0]=9;var s=a(),o=a([1]),u=a([56129,1]),c=a([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=a([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=a([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),h=a([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=a([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function d(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function y(e,t,r,n){return function(e,t,r,n,a){var i,s=0;for(i=0;i<a;i++)s|=e[t+i]^r[n+i];return(1&s-1>>>8)-1}(e,t,r,n,32)}function g(e,t){for(var r=0;r<16;r++)e[r]=0|t[r]}function m(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function v(e,t,r){for(var n,a=~(r-1),i=0;i<16;i++)n=a&(e[i]^t[i]),e[i]^=n,t[i]^=n}function E(e,t){var r,n,i,s=a(),o=a();for(r=0;r<16;r++)o[r]=t[r];for(m(o),m(o),m(o),n=0;n<2;n++){for(s[0]=o[0]-65517,r=1;r<15;r++)s[r]=o[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=o[15]-32767-(s[14]>>16&1),i=s[15]>>16&1,s[14]&=65535,v(o,s,1-i)}for(r=0;r<16;r++)e[2*r]=255&o[r],e[2*r+1]=o[r]>>8}function C(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return E(r,e),E(n,t),y(r,0,n,0)}function b(e){var t=new Uint8Array(32);return E(t,e),1&t[0]}function S(e,t){for(var r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function T(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function I(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function A(e,t,r){var n,a,i=0,s=0,o=0,u=0,c=0,l=0,f=0,h=0,p=0,d=0,y=0,g=0,m=0,v=0,E=0,C=0,b=0,S=0,T=0,I=0,A=0,w=0,B=0,N=0,R=0,k=0,U=0,_=0,L=0,P=0,D=0,O=r[0],V=r[1],x=r[2],K=r[3],M=r[4],j=r[5],F=r[6],z=r[7],q=r[8],G=r[9],Q=r[10],H=r[11],W=r[12],Y=r[13],X=r[14],Z=r[15];i+=(n=t[0])*O,s+=n*V,o+=n*x,u+=n*K,c+=n*M,l+=n*j,f+=n*F,h+=n*z,p+=n*q,d+=n*G,y+=n*Q,g+=n*H,m+=n*W,v+=n*Y,E+=n*X,C+=n*Z,s+=(n=t[1])*O,o+=n*V,u+=n*x,c+=n*K,l+=n*M,f+=n*j,h+=n*F,p+=n*z,d+=n*q,y+=n*G,g+=n*Q,m+=n*H,v+=n*W,E+=n*Y,C+=n*X,b+=n*Z,o+=(n=t[2])*O,u+=n*V,c+=n*x,l+=n*K,f+=n*M,h+=n*j,p+=n*F,d+=n*z,y+=n*q,g+=n*G,m+=n*Q,v+=n*H,E+=n*W,C+=n*Y,b+=n*X,S+=n*Z,u+=(n=t[3])*O,c+=n*V,l+=n*x,f+=n*K,h+=n*M,p+=n*j,d+=n*F,y+=n*z,g+=n*q,m+=n*G,v+=n*Q,E+=n*H,C+=n*W,b+=n*Y,S+=n*X,T+=n*Z,c+=(n=t[4])*O,l+=n*V,f+=n*x,h+=n*K,p+=n*M,d+=n*j,y+=n*F,g+=n*z,m+=n*q,v+=n*G,E+=n*Q,C+=n*H,b+=n*W,S+=n*Y,T+=n*X,I+=n*Z,l+=(n=t[5])*O,f+=n*V,h+=n*x,p+=n*K,d+=n*M,y+=n*j,g+=n*F,m+=n*z,v+=n*q,E+=n*G,C+=n*Q,b+=n*H,S+=n*W,T+=n*Y,I+=n*X,A+=n*Z,f+=(n=t[6])*O,h+=n*V,p+=n*x,d+=n*K,y+=n*M,g+=n*j,m+=n*F,v+=n*z,E+=n*q,C+=n*G,b+=n*Q,S+=n*H,T+=n*W,I+=n*Y,A+=n*X,w+=n*Z,h+=(n=t[7])*O,p+=n*V,d+=n*x,y+=n*K,g+=n*M,m+=n*j,v+=n*F,E+=n*z,C+=n*q,b+=n*G,S+=n*Q,T+=n*H,I+=n*W,A+=n*Y,w+=n*X,B+=n*Z,p+=(n=t[8])*O,d+=n*V,y+=n*x,g+=n*K,m+=n*M,v+=n*j,E+=n*F,C+=n*z,b+=n*q,S+=n*G,T+=n*Q,I+=n*H,A+=n*W,w+=n*Y,B+=n*X,N+=n*Z,d+=(n=t[9])*O,y+=n*V,g+=n*x,m+=n*K,v+=n*M,E+=n*j,C+=n*F,b+=n*z,S+=n*q,T+=n*G,I+=n*Q,A+=n*H,w+=n*W,B+=n*Y,N+=n*X,R+=n*Z,y+=(n=t[10])*O,g+=n*V,m+=n*x,v+=n*K,E+=n*M,C+=n*j,b+=n*F,S+=n*z,T+=n*q,I+=n*G,A+=n*Q,w+=n*H,B+=n*W,N+=n*Y,R+=n*X,k+=n*Z,g+=(n=t[11])*O,m+=n*V,v+=n*x,E+=n*K,C+=n*M,b+=n*j,S+=n*F,T+=n*z,I+=n*q,A+=n*G,w+=n*Q,B+=n*H,N+=n*W,R+=n*Y,k+=n*X,U+=n*Z,m+=(n=t[12])*O,v+=n*V,E+=n*x,C+=n*K,b+=n*M,S+=n*j,T+=n*F,I+=n*z,A+=n*q,w+=n*G,B+=n*Q,N+=n*H,R+=n*W,k+=n*Y,U+=n*X,_+=n*Z,v+=(n=t[13])*O,E+=n*V,C+=n*x,b+=n*K,S+=n*M,T+=n*j,I+=n*F,A+=n*z,w+=n*q,B+=n*G,N+=n*Q,R+=n*H,k+=n*W,U+=n*Y,_+=n*X,L+=n*Z,E+=(n=t[14])*O,C+=n*V,b+=n*x,S+=n*K,T+=n*M,I+=n*j,A+=n*F,w+=n*z,B+=n*q,N+=n*G,R+=n*Q,k+=n*H,U+=n*W,_+=n*Y,L+=n*X,P+=n*Z,C+=(n=t[15])*O,s+=38*(S+=n*x),o+=38*(T+=n*K),u+=38*(I+=n*M),c+=38*(A+=n*j),l+=38*(w+=n*F),f+=38*(B+=n*z),h+=38*(N+=n*q),p+=38*(R+=n*G),d+=38*(k+=n*Q),y+=38*(U+=n*H),g+=38*(_+=n*W),m+=38*(L+=n*Y),v+=38*(P+=n*X),E+=38*(D+=n*Z),i=(n=(i+=38*(b+=n*V))+(a=1)+65535)-65536*(a=Math.floor(n/65536)),s=(n=s+a+65535)-65536*(a=Math.floor(n/65536)),o=(n=o+a+65535)-65536*(a=Math.floor(n/65536)),u=(n=u+a+65535)-65536*(a=Math.floor(n/65536)),c=(n=c+a+65535)-65536*(a=Math.floor(n/65536)),l=(n=l+a+65535)-65536*(a=Math.floor(n/65536)),f=(n=f+a+65535)-65536*(a=Math.floor(n/65536)),h=(n=h+a+65535)-65536*(a=Math.floor(n/65536)),p=(n=p+a+65535)-65536*(a=Math.floor(n/65536)),d=(n=d+a+65535)-65536*(a=Math.floor(n/65536)),y=(n=y+a+65535)-65536*(a=Math.floor(n/65536)),g=(n=g+a+65535)-65536*(a=Math.floor(n/65536)),m=(n=m+a+65535)-65536*(a=Math.floor(n/65536)),v=(n=v+a+65535)-65536*(a=Math.floor(n/65536)),E=(n=E+a+65535)-65536*(a=Math.floor(n/65536)),C=(n=C+a+65535)-65536*(a=Math.floor(n/65536)),i=(n=(i+=a-1+37*(a-1))+(a=1)+65535)-65536*(a=Math.floor(n/65536)),s=(n=s+a+65535)-65536*(a=Math.floor(n/65536)),o=(n=o+a+65535)-65536*(a=Math.floor(n/65536)),u=(n=u+a+65535)-65536*(a=Math.floor(n/65536)),c=(n=c+a+65535)-65536*(a=Math.floor(n/65536)),l=(n=l+a+65535)-65536*(a=Math.floor(n/65536)),f=(n=f+a+65535)-65536*(a=Math.floor(n/65536)),h=(n=h+a+65535)-65536*(a=Math.floor(n/65536)),p=(n=p+a+65535)-65536*(a=Math.floor(n/65536)),d=(n=d+a+65535)-65536*(a=Math.floor(n/65536)),y=(n=y+a+65535)-65536*(a=Math.floor(n/65536)),g=(n=g+a+65535)-65536*(a=Math.floor(n/65536)),m=(n=m+a+65535)-65536*(a=Math.floor(n/65536)),v=(n=v+a+65535)-65536*(a=Math.floor(n/65536)),E=(n=E+a+65535)-65536*(a=Math.floor(n/65536)),C=(n=C+a+65535)-65536*(a=Math.floor(n/65536)),i+=a-1+37*(a-1),e[0]=i,e[1]=s,e[2]=o,e[3]=u,e[4]=c,e[5]=l,e[6]=f,e[7]=h,e[8]=p,e[9]=d,e[10]=y,e[11]=g,e[12]=m,e[13]=v,e[14]=E,e[15]=C}function w(e,t){A(e,t,t)}function B(e,t){var r,n=a();for(r=0;r<16;r++)n[r]=t[r];for(r=253;r>=0;r--)w(n,n),2!==r&&4!==r&&A(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function N(e,t,r){var n,i,s=new Uint8Array(32),o=new Float64Array(80),c=a(),l=a(),f=a(),h=a(),p=a(),d=a();for(i=0;i<31;i++)s[i]=t[i];for(s[31]=127&t[31]|64,s[0]&=248,S(o,r),i=0;i<16;i++)l[i]=o[i],h[i]=c[i]=f[i]=0;for(c[0]=h[0]=1,i=254;i>=0;--i)v(c,l,n=s[i>>>3]>>>(7&i)&1),v(f,h,n),T(p,c,f),I(c,c,f),T(f,l,h),I(l,l,h),w(h,p),w(d,c),A(c,f,c),A(f,l,p),T(p,c,f),I(c,c,f),w(l,c),I(f,h,d),A(c,f,u),T(c,c,h),A(f,f,c),A(c,h,d),A(h,l,o),w(l,p),v(c,l,n),v(f,h,n);for(i=0;i<16;i++)o[i+16]=c[i],o[i+32]=f[i],o[i+48]=l[i],o[i+64]=h[i];var y=o.subarray(32),g=o.subarray(16);return B(y,y),A(g,g,y),E(e,g),0}var R=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function k(e,t,r,n){for(var a,i,s,o,u,c,l,f,h,p,d,y,g,m,v,E,C,b,S,T,I,A,w,B,N,k,U=new Int32Array(16),_=new Int32Array(16),L=e[0],P=e[1],D=e[2],O=e[3],V=e[4],x=e[5],K=e[6],M=e[7],j=t[0],F=t[1],z=t[2],q=t[3],G=t[4],Q=t[5],H=t[6],W=t[7],Y=0;n>=128;){for(S=0;S<16;S++)T=8*S+Y,U[S]=r[T+0]<<24|r[T+1]<<16|r[T+2]<<8|r[T+3],_[S]=r[T+4]<<24|r[T+5]<<16|r[T+6]<<8|r[T+7];for(S=0;S<80;S++)if(a=L,i=P,s=D,o=O,u=V,c=x,l=K,M,h=j,p=F,d=z,y=q,g=G,m=Q,v=H,W,w=65535&(A=W),B=A>>>16,N=65535&(I=M),k=I>>>16,w+=65535&(A=(G>>>14|V<<18)^(G>>>18|V<<14)^(V>>>9|G<<23)),B+=A>>>16,N+=65535&(I=(V>>>14|G<<18)^(V>>>18|G<<14)^(G>>>9|V<<23)),k+=I>>>16,w+=65535&(A=G&Q^~G&H),B+=A>>>16,N+=65535&(I=V&x^~V&K),k+=I>>>16,I=R[2*S],w+=65535&(A=R[2*S+1]),B+=A>>>16,N+=65535&I,k+=I>>>16,I=U[S%16],B+=(A=_[S%16])>>>16,N+=65535&I,k+=I>>>16,N+=(B+=(w+=65535&A)>>>16)>>>16,w=65535&(A=b=65535&w|B<<16),B=A>>>16,N=65535&(I=C=65535&N|(k+=N>>>16)<<16),k=I>>>16,w+=65535&(A=(j>>>28|L<<4)^(L>>>2|j<<30)^(L>>>7|j<<25)),B+=A>>>16,N+=65535&(I=(L>>>28|j<<4)^(j>>>2|L<<30)^(j>>>7|L<<25)),k+=I>>>16,B+=(A=j&F^j&z^F&z)>>>16,N+=65535&(I=L&P^L&D^P&D),k+=I>>>16,f=65535&(N+=(B+=(w+=65535&A)>>>16)>>>16)|(k+=N>>>16)<<16,E=65535&w|B<<16,w=65535&(A=y),B=A>>>16,N=65535&(I=o),k=I>>>16,B+=(A=b)>>>16,N+=65535&(I=C),k+=I>>>16,P=a,D=i,O=s,V=o=65535&(N+=(B+=(w+=65535&A)>>>16)>>>16)|(k+=N>>>16)<<16,x=u,K=c,M=l,L=f,F=h,z=p,q=d,G=y=65535&w|B<<16,Q=g,H=m,W=v,j=E,S%16==15)for(T=0;T<16;T++)I=U[T],w=65535&(A=_[T]),B=A>>>16,N=65535&I,k=I>>>16,I=U[(T+9)%16],w+=65535&(A=_[(T+9)%16]),B+=A>>>16,N+=65535&I,k+=I>>>16,C=U[(T+1)%16],w+=65535&(A=((b=_[(T+1)%16])>>>1|C<<31)^(b>>>8|C<<24)^(b>>>7|C<<25)),B+=A>>>16,N+=65535&(I=(C>>>1|b<<31)^(C>>>8|b<<24)^C>>>7),k+=I>>>16,C=U[(T+14)%16],B+=(A=((b=_[(T+14)%16])>>>19|C<<13)^(C>>>29|b<<3)^(b>>>6|C<<26))>>>16,N+=65535&(I=(C>>>19|b<<13)^(b>>>29|C<<3)^C>>>6),k+=I>>>16,k+=(N+=(B+=(w+=65535&A)>>>16)>>>16)>>>16,U[T]=65535&N|k<<16,_[T]=65535&w|B<<16;w=65535&(A=j),B=A>>>16,N=65535&(I=L),k=I>>>16,I=e[0],B+=(A=t[0])>>>16,N+=65535&I,k+=I>>>16,k+=(N+=(B+=(w+=65535&A)>>>16)>>>16)>>>16,e[0]=L=65535&N|k<<16,t[0]=j=65535&w|B<<16,w=65535&(A=F),B=A>>>16,N=65535&(I=P),k=I>>>16,I=e[1],B+=(A=t[1])>>>16,N+=65535&I,k+=I>>>16,k+=(N+=(B+=(w+=65535&A)>>>16)>>>16)>>>16,e[1]=P=65535&N|k<<16,t[1]=F=65535&w|B<<16,w=65535&(A=z),B=A>>>16,N=65535&(I=D),k=I>>>16,I=e[2],B+=(A=t[2])>>>16,N+=65535&I,k+=I>>>16,k+=(N+=(B+=(w+=65535&A)>>>16)>>>16)>>>16,e[2]=D=65535&N|k<<16,t[2]=z=65535&w|B<<16,w=65535&(A=q),B=A>>>16,N=65535&(I=O),k=I>>>16,I=e[3],B+=(A=t[3])>>>16,N+=65535&I,k+=I>>>16,k+=(N+=(B+=(w+=65535&A)>>>16)>>>16)>>>16,e[3]=O=65535&N|k<<16,t[3]=q=65535&w|B<<16,w=65535&(A=G),B=A>>>16,N=65535&(I=V),k=I>>>16,I=e[4],B+=(A=t[4])>>>16,N+=65535&I,k+=I>>>16,k+=(N+=(B+=(w+=65535&A)>>>16)>>>16)>>>16,e[4]=V=65535&N|k<<16,t[4]=G=65535&w|B<<16,w=65535&(A=Q),B=A>>>16,N=65535&(I=x),k=I>>>16,I=e[5],B+=(A=t[5])>>>16,N+=65535&I,k+=I>>>16,k+=(N+=(B+=(w+=65535&A)>>>16)>>>16)>>>16,e[5]=x=65535&N|k<<16,t[5]=Q=65535&w|B<<16,w=65535&(A=H),B=A>>>16,N=65535&(I=K),k=I>>>16,I=e[6],B+=(A=t[6])>>>16,N+=65535&I,k+=I>>>16,k+=(N+=(B+=(w+=65535&A)>>>16)>>>16)>>>16,e[6]=K=65535&N|k<<16,t[6]=H=65535&w|B<<16,w=65535&(A=W),B=A>>>16,N=65535&(I=M),k=I>>>16,I=e[7],B+=(A=t[7])>>>16,N+=65535&I,k+=I>>>16,k+=(N+=(B+=(w+=65535&A)>>>16)>>>16)>>>16,e[7]=M=65535&N|k<<16,t[7]=W=65535&w|B<<16,Y+=128,n-=128}return n}function U(e,t,r){var n,a=new Int32Array(8),i=new Int32Array(8),s=new Uint8Array(256),o=r;for(a[0]=1779033703,a[1]=3144134277,a[2]=1013904242,a[3]=2773480762,a[4]=1359893119,a[5]=2600822924,a[6]=528734635,a[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,k(a,i,t,r),r%=128,n=0;n<r;n++)s[n]=t[o-r+n];for(s[r]=128,s[(r=256-128*(r<112?1:0))-9]=0,d(s,r-8,o/536870912|0,o<<3),k(a,i,s,r),n=0;n<8;n++)d(e,8*n,a[n],i[n]);return 0}function _(e,t){var r=a(),n=a(),i=a(),s=a(),o=a(),u=a(),c=a(),f=a(),h=a();I(r,e[1],e[0]),I(h,t[1],t[0]),A(r,r,h),T(n,e[0],e[1]),T(h,t[0],t[1]),A(n,n,h),A(i,e[3],t[3]),A(i,i,l),A(s,e[2],t[2]),T(s,s,s),I(o,n,r),I(u,s,i),T(c,s,i),T(f,n,r),A(e[0],o,u),A(e[1],f,c),A(e[2],c,u),A(e[3],o,f)}function L(e,t,r){for(var n=0;n<4;n++)v(e[n],t[n],r)}function P(e,t){var r=a(),n=a(),i=a();B(i,t[2]),A(r,t[0],i),A(n,t[1],i),E(e,n),e[31]^=b(r)<<7}function D(e,t,r){var n,a;for(g(e[0],s),g(e[1],o),g(e[2],o),g(e[3],s),a=255;a>=0;--a)L(e,t,n=r[a/8|0]>>(7&a)&1),_(t,e),_(e,e),L(e,t,n)}function O(e,t){var r=[a(),a(),a(),a()];g(r[0],f),g(r[1],h),g(r[2],o),A(r[3],f,h),D(e,r,t)}var V=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function x(e,t){var r,n,a,i;for(n=63;n>=32;--n){for(r=0,a=n-32,i=n-12;a<i;++a)t[a]+=r-16*t[n]*V[a-(n-32)],r=t[a]+128>>8,t[a]-=256*r;t[a]+=r,t[n]=0}for(r=0,a=0;a<32;a++)t[a]+=r-(t[31]>>4)*V[a],r=t[a]>>8,t[a]&=255;for(a=0;a<32;a++)t[a]-=r*V[a];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function K(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;x(e,r)}function M(e,t,r,n,i){for(var s=new Uint8Array(64),o=[a(),a(),a(),a()],u=0;u<32;u++)s[u]=n[u];s[0]&=248,s[31]&=127,s[31]|=64,O(o,s),P(s.subarray(32),o);var c,l=128&s[63];return c=i?function(e,t,r,n,i){new Uint8Array(64);var s,o,u=new Uint8Array(64),c=new Uint8Array(64),l=new Float64Array(64),f=[a(),a(),a(),a()];for(e[0]=254,s=1;s<32;s++)e[s]=255;for(s=0;s<32;s++)e[32+s]=n[s];for(s=0;s<r;s++)e[64+s]=t[s];for(s=0;s<64;s++)e[r+64+s]=i[s];for(U(c,e,r+128),K(c),O(f,c),P(e,f),s=0;s<32;s++)e[s+32]=n[32+s];for(U(u,e,r+64),K(u),s=0;s<64;s++)e[r+64+s]=0;for(s=0;s<64;s++)l[s]=0;for(s=0;s<32;s++)l[s]=c[s];for(s=0;s<32;s++)for(o=0;o<32;o++)l[s+o]+=u[s]*n[o];return x(e.subarray(32,r+64),l),r+64}(e,t,r,s,i):function(e,t,r,n){new Uint8Array(64);var i,s,o=new Uint8Array(64),u=new Uint8Array(64),c=new Float64Array(64),l=[a(),a(),a(),a()];for(i=0;i<r;i++)e[64+i]=t[i];for(i=0;i<32;i++)e[32+i]=n[i];for(U(u,e.subarray(32),r+32),K(u),O(l,u),P(e,l),i=0;i<32;i++)e[i+32]=n[32+i];for(U(o,e,r+64),K(o),i=0;i<64;i++)c[i]=0;for(i=0;i<32;i++)c[i]=u[i];for(i=0;i<32;i++)for(s=0;s<32;s++)c[i+s]+=o[i]*n[s];return x(e.subarray(32),c),r+64}(e,t,r,s),e[63]|=l,c}function j(e,t){var r=a(),n=a(),i=a(),u=a(),l=a(),f=a(),h=a();return g(e[2],o),S(e[1],t),w(i,e[1]),A(u,i,c),I(i,i,e[2]),T(u,e[2],u),w(l,u),w(f,l),A(h,f,l),A(r,h,i),A(r,r,u),function(e,t){var r,n=a();for(r=0;r<16;r++)n[r]=t[r];for(r=250;r>=0;r--)w(n,n),1!==r&&A(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}(r,r),A(r,r,i),A(r,r,u),A(r,r,u),A(e[0],r,u),w(n,e[0]),A(n,n,u),C(n,i)&&A(e[0],e[0],p),w(n,e[0]),A(n,n,u),C(n,i)?-1:(b(e[0])===t[31]>>7&&I(e[0],s,e[0]),A(e[3],e[0],e[1]),0)}function F(e,t,r,n){var i=function(e){var t=new Uint8Array(32),r=a(),n=a(),i=a();return S(r,e),T(n,r,o),I(i,r,o),B(n,n),A(n,n,i),E(t,n),t}(n);return i[31]|=128&t[63],t[63]&=127,function(e,t,r,n){var i,s=new Uint8Array(32),o=new Uint8Array(64),u=[a(),a(),a(),a()],c=[a(),a(),a(),a()];if(r<64)return-1;if(j(c,n))return-1;for(i=0;i<r;i++)e[i]=t[i];for(i=0;i<32;i++)e[i+32]=n[i];if(U(o,e,r),K(o),D(u,c,o),O(c,t.subarray(32)),_(u,c),P(s,u),r-=64,y(t,0,s,0)){for(i=0;i<r;i++)e[i]=0;return-1}for(i=0;i<r;i++)e[i]=t[i+64];return r}(e,t,r,i)}function z(){for(var e,t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];for(t=0;t<arguments.length;t++)if("[object Uint8Array]"!==(e=Object.prototype.toString.call(arguments[t])))throw new TypeError("unexpected type "+e+", use Uint8Array")}n.sharedKey=function(e,t){if(z(t,e),32!==t.length)throw new Error("wrong public key length");if(32!==e.length)throw new Error("wrong secret key length");var r=new Uint8Array(32);return N(r,e,t),r},n.signMessage=function(e,t,r){if(z(t,e),32!==e.length)throw new Error("wrong secret key length");if(r){if(z(r),64!==r.length)throw new Error("wrong random data length");var n=new Uint8Array(128+t.length);return M(n,t,t.length,e,r),new Uint8Array(n.subarray(0,64+t.length))}var a=new Uint8Array(64+t.length);return M(a,t,t.length,e),a},n.openMessage=function(e,t){if(z(t,e),32!==e.length)throw new Error("wrong public key length");var r=new Uint8Array(t.length),n=F(r,t,t.length,e);if(n<0)return null;for(var a=new Uint8Array(n),i=0;i<a.length;i++)a[i]=r[i];return a},n.sign=function(e,t,r){if(z(e,t),32!==e.length)throw new Error("wrong secret key length");if(r&&(z(r),64!==r.length))throw new Error("wrong random data length");var n=new Uint8Array((r?128:64)+t.length);M(n,t,t.length,e,r);for(var a=new Uint8Array(64),i=0;i<a.length;i++)a[i]=n[i];return a},n.verify=function(e,t,r){if(z(t,r,e),64!==r.length)throw new Error("wrong signature length");if(32!==e.length)throw new Error("wrong public key length");var n,a=new Uint8Array(64+t.length),i=new Uint8Array(64+t.length);for(n=0;n<64;n++)a[n]=r[n];for(n=0;n<t.length;n++)a[n+64]=t[n];return F(i,a,a.length,e)>=0},n.generateKeyPair=function(e){if(z(e),32!==e.length)throw new Error("wrong seed length");for(var t=new Uint8Array(32),r=new Uint8Array(32),n=0;n<32;n++)t[n]=e[n];return N(r,t,i),t[0]&=248,t[31]&=127,t[31]|=64,r[31]&=127,{public:r,private:t}},t.default=n},function(e,t,r){var n=r(0);if(r(7),r(35),r(8),r(57),r(58),r(5),r(1),void 0===a)var a=n.jsbn.BigInteger;var i=n.util.isNodejs?r(20):null,s=n.asn1,o=n.util;n.pki=n.pki||{},e.exports=n.pki.rsa=n.rsa=n.rsa||{};var u=n.pki,c=[6,4,2,4,2,4,6,2],l={name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},f={name:"RSAPrivateKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},h={name:"RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},p=n.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},d=function(e){var t;if(!(e.algorithm in u.oids)){var r=new Error("Unknown message digest algorithm.");throw r.algorithm=e.algorithm,r}t=u.oids[e.algorithm];var n=s.oidToDer(t).getBytes(),a=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]),i=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]);i.value.push(s.create(s.Class.UNIVERSAL,s.Type.OID,!1,n)),i.value.push(s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,""));var o=s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,e.digest().getBytes());return a.value.push(i),a.value.push(o),s.toDer(a).getBytes()},y=function(e,t,r){if(r)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);var i;t.dP||(t.dP=t.d.mod(t.p.subtract(a.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(a.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));do{i=new a(n.util.bytesToHex(n.random.getBytes(t.n.bitLength()/8)),16)}while(i.compareTo(t.n)>=0||!i.gcd(t.n).equals(a.ONE));for(var s=(e=e.multiply(i.modPow(t.e,t.n)).mod(t.n)).mod(t.p).modPow(t.dP,t.p),o=e.mod(t.q).modPow(t.dQ,t.q);s.compareTo(o)<0;)s=s.add(t.p);var u=s.subtract(o).multiply(t.qInv).mod(t.p).multiply(t.q).add(o);return u=u.multiply(i.modInverse(t.n)).mod(t.n)};function g(e,t,r){var a=n.util.createBuffer(),i=Math.ceil(t.n.bitLength()/8);if(e.length>i-11){var s=new Error("Message is too long for PKCS#1 v1.5 padding.");throw s.length=e.length,s.max=i-11,s}a.putByte(0),a.putByte(r);var o,u=i-3-e.length;if(0===r||1===r){o=0===r?0:255;for(var c=0;c<u;++c)a.putByte(o)}else for(;u>0;){var l=0,f=n.random.getBytes(u);for(c=0;c<u;++c)0===(o=f.charCodeAt(c))?++l:a.putByte(o);u=l}return a.putByte(0),a.putBytes(e),a}function m(e,t,r,a){var i=Math.ceil(t.n.bitLength()/8),s=n.util.createBuffer(e),o=s.getByte(),u=s.getByte();if(0!==o||r&&0!==u&&1!==u||!r&&2!=u||r&&0===u&&void 0===a)throw new Error("Encryption block is invalid.");var c=0;if(0===u){c=i-3-a;for(var l=0;l<c;++l)if(0!==s.getByte())throw new Error("Encryption block is invalid.")}else if(1===u)for(c=0;s.length()>1;){if(255!==s.getByte()){--s.read;break}++c}else if(2===u)for(c=0;s.length()>1;){if(0===s.getByte()){--s.read;break}++c}if(0!==s.getByte()||c!==i-3-s.length())throw new Error("Encryption block is invalid.");return s.getBytes()}function v(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var r=n.util.hexToBytes(t);return r.length>1&&(0===r.charCodeAt(0)&&0==(128&r.charCodeAt(1))||255===r.charCodeAt(0)&&128==(128&r.charCodeAt(1)))?r.substr(1):r}function E(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function C(e){return n.util.isNodejs&&"function"==typeof i[e]}function b(e){return void 0!==o.globalScope&&"object"==typeof o.globalScope.crypto&&"object"==typeof o.globalScope.crypto.subtle&&"function"==typeof o.globalScope.crypto.subtle[e]}function S(e){return void 0!==o.globalScope&&"object"==typeof o.globalScope.msCrypto&&"object"==typeof o.globalScope.msCrypto.subtle&&"function"==typeof o.globalScope.msCrypto.subtle[e]}function T(e){for(var t=n.util.hexToBytes(e.toString(16)),r=new Uint8Array(t.length),a=0;a<t.length;++a)r[a]=t.charCodeAt(a);return r}u.rsa.encrypt=function(e,t,r){var i,s=r,o=Math.ceil(t.n.bitLength()/8);!1!==r&&!0!==r?(s=2===r,i=g(e,t,r)):(i=n.util.createBuffer()).putBytes(e);for(var u=new a(i.toHex(),16),c=y(u,t,s).toString(16),l=n.util.createBuffer(),f=o-Math.ceil(c.length/2);f>0;)l.putByte(0),--f;return l.putBytes(n.util.hexToBytes(c)),l.getBytes()},u.rsa.decrypt=function(e,t,r,i){var s=Math.ceil(t.n.bitLength()/8);if(e.length!==s){var o=new Error("Encrypted message length is invalid.");throw o.length=e.length,o.expected=s,o}var u=new a(n.util.createBuffer(e).toHex(),16);if(u.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var c=y(u,t,r).toString(16),l=n.util.createBuffer(),f=s-Math.ceil(c.length/2);f>0;)l.putByte(0),--f;return l.putBytes(n.util.hexToBytes(c)),!1!==i?m(l.getBytes(),t,r):l.getBytes()},u.rsa.createKeyPairGenerationState=function(e,t,r){"string"==typeof e&&(e=parseInt(e,10)),e=e||2048;var i,s=(r=r||{}).prng||n.random,o={nextBytes:function(e){for(var t=s.getBytesSync(e.length),r=0;r<e.length;++r)e[r]=t.charCodeAt(r)}},u=r.algorithm||"PRIMEINC";if("PRIMEINC"!==u)throw new Error("Invalid key generation algorithm: "+u);return(i={algorithm:u,state:0,bits:e,rng:o,eInt:t||65537,e:new a(null),p:null,q:null,qBits:e>>1,pBits:e-(e>>1),pqState:0,num:null,keys:null}).e.fromInt(i.eInt),i},u.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var r=new a(null);r.fromInt(30);for(var n,i=0,s=function(e,t){return e|t},o=+new Date,l=0;null===e.keys&&(t<=0||l<t);){if(0===e.state){var f=null===e.p?e.pBits:e.qBits,h=f-1;0===e.pqState?(e.num=new a(f,e.rng),e.num.testBit(h)||e.num.bitwiseTo(a.ONE.shiftLeft(h),s,e.num),e.num.dAddOffset(31-e.num.mod(r).byteValue(),0),i=0,++e.pqState):1===e.pqState?e.num.bitLength()>f?e.pqState=0:e.num.isProbablePrime(E(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(c[i++%8],0):2===e.pqState?e.pqState=0===e.num.subtract(a.ONE).gcd(e.e).compareTo(a.ONE)?3:0:3===e.pqState&&(e.pqState=0,null===e.p?e.p=e.num:e.q=e.num,null!==e.p&&null!==e.q&&++e.state,e.num=null)}else if(1===e.state)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(2===e.state)e.p1=e.p.subtract(a.ONE),e.q1=e.q.subtract(a.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(3===e.state)0===e.phi.gcd(e.e).compareTo(a.ONE)?++e.state:(e.p=null,e.q=null,e.state=0);else if(4===e.state)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(5===e.state){var p=e.e.modInverse(e.phi);e.keys={privateKey:u.rsa.setPrivateKey(e.n,e.e,p,e.p,e.q,p.mod(e.p1),p.mod(e.q1),e.q.modInverse(e.p)),publicKey:u.rsa.setPublicKey(e.n,e.e)}}l+=(n=+new Date)-o,o=n}return null!==e.keys},u.rsa.generateKeyPair=function(e,t,r,c){if(1===arguments.length?"object"==typeof e?(r=e,e=void 0):"function"==typeof e&&(c=e,e=void 0):2===arguments.length?"number"==typeof e?"function"==typeof t?(c=t,t=void 0):"number"!=typeof t&&(r=t,t=void 0):(r=e,c=t,e=void 0,t=void 0):3===arguments.length&&("number"==typeof t?"function"==typeof r&&(c=r,r=void 0):(c=r,r=t,t=void 0)),r=r||{},void 0===e&&(e=r.bits||2048),void 0===t&&(t=r.e||65537),!n.options.usePureJavaScript&&!r.prng&&e>=256&&e<=16384&&(65537===t||3===t))if(c){if(C("generateKeyPair"))return i.generateKeyPair("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(e,t,r){if(e)return c(e);c(null,{privateKey:u.privateKeyFromPem(r),publicKey:u.publicKeyFromPem(t)})});if(b("generateKey")&&b("exportKey"))return o.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:T(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(e){return o.globalScope.crypto.subtle.exportKey("pkcs8",e.privateKey)}).then(void 0,function(e){c(e)}).then(function(e){if(e){var t=u.privateKeyFromAsn1(s.fromDer(n.util.createBuffer(e)));c(null,{privateKey:t,publicKey:u.setRsaPublicKey(t.n,t.e)})}});if(S("generateKey")&&S("exportKey")){var l=o.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:T(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);return l.oncomplete=function(e){var t=e.target.result,r=o.globalScope.msCrypto.subtle.exportKey("pkcs8",t.privateKey);r.oncomplete=function(e){var t=e.target.result,r=u.privateKeyFromAsn1(s.fromDer(n.util.createBuffer(t)));c(null,{privateKey:r,publicKey:u.setRsaPublicKey(r.n,r.e)})},r.onerror=function(e){c(e)}},void(l.onerror=function(e){c(e)})}}else if(C("generateKeyPairSync")){var f=i.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:u.privateKeyFromPem(f.privateKey),publicKey:u.publicKeyFromPem(f.publicKey)}}var h=u.rsa.createKeyPairGenerationState(e,t,r);if(!c)return u.rsa.stepKeyPairGenerationState(h,0),h.keys;!function(e,t,r){"function"==typeof t&&(r=t,t={});var i={algorithm:{name:(t=t||{}).algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};"prng"in t&&(i.prng=t.prng);function s(){o(e.pBits,function(t,n){return t?r(t):(e.p=n,null!==e.q?c(t,e.q):void o(e.qBits,c))})}function o(e,t){n.prime.generateProbablePrime(e,i,t)}function c(t,n){if(t)return r(t);if(e.q=n,e.p.compareTo(e.q)<0){var i=e.p;e.p=e.q,e.q=i}if(0!==e.p.subtract(a.ONE).gcd(e.e).compareTo(a.ONE))return e.p=null,void s();if(0!==e.q.subtract(a.ONE).gcd(e.e).compareTo(a.ONE))return e.q=null,void o(e.qBits,c);if(e.p1=e.p.subtract(a.ONE),e.q1=e.q.subtract(a.ONE),e.phi=e.p1.multiply(e.q1),0!==e.phi.gcd(e.e).compareTo(a.ONE))return e.p=e.q=null,void s();if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits)return e.q=null,void o(e.qBits,c);var l=e.e.modInverse(e.phi);e.keys={privateKey:u.rsa.setPrivateKey(e.n,e.e,l,e.p,e.q,l.mod(e.p1),l.mod(e.q1),e.q.modInverse(e.p)),publicKey:u.rsa.setPublicKey(e.n,e.e)},r(null,e.keys)}s()}(h,r,c)},u.setRsaPublicKey=u.rsa.setPublicKey=function(e,t){var r={n:e,e:t,encrypt:function(e,t,a){if("string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===t)t={encode:function(e,t,r){return g(e,t,2).getBytes()}};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={encode:function(e,t){return n.pkcs1.encode_rsa_oaep(t,e,a)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(t))t={encode:function(e){return e}};else if("string"==typeof t)throw new Error('Unsupported encryption scheme: "'+t+'".');var i=t.encode(e,r,!0);return u.rsa.encrypt(i,r,!0)},verify:function(e,t,n){"string"==typeof n?n=n.toUpperCase():void 0===n&&(n="RSASSA-PKCS1-V1_5"),"RSASSA-PKCS1-V1_5"===n?n={verify:function(e,t){return t=m(t,r,!0),e===s.fromDer(t).value[1].value}}:"NONE"!==n&&"NULL"!==n&&null!==n||(n={verify:function(e,t){return e===(t=m(t,r,!0))}});var a=u.rsa.decrypt(t,r,!0,!1);return n.verify(e,a,r.n.bitLength())}};return r},u.setRsaPrivateKey=u.rsa.setPrivateKey=function(e,t,r,a,i,s,o,c){var l={n:e,e:t,d:r,p:a,q:i,dP:s,dQ:o,qInv:c,decrypt:function(e,t,r){"string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5");var a=u.rsa.decrypt(e,l,!1,!1);if("RSAES-PKCS1-V1_5"===t)t={decode:m};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={decode:function(e,t){return n.pkcs1.decode_rsa_oaep(t,e,r)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(t))throw new Error('Unsupported encryption scheme: "'+t+'".');t={decode:function(e){return e}}}return t.decode(a,l,!1)},sign:function(e,t){var r=!1;"string"==typeof t&&(t=t.toUpperCase()),void 0===t||"RSASSA-PKCS1-V1_5"===t?(t={encode:d},r=1):"NONE"!==t&&"NULL"!==t&&null!==t||(t={encode:function(){return e}},r=1);var n=t.encode(e,l.n.bitLength());return u.rsa.encrypt(n,l,r)}};return l},u.wrapRsaPrivateKey=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(u.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,s.toDer(e).getBytes())])},u.privateKeyFromAsn1=function(e){var t,r,i,o,c,h,p,d,y={},g=[];if(s.validate(e,l,y,g)&&(e=s.fromDer(n.util.createBuffer(y.privateKey))),y={},g=[],!s.validate(e,f,y,g)){var m=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw m.errors=g,m}return t=n.util.createBuffer(y.privateKeyModulus).toHex(),r=n.util.createBuffer(y.privateKeyPublicExponent).toHex(),i=n.util.createBuffer(y.privateKeyPrivateExponent).toHex(),o=n.util.createBuffer(y.privateKeyPrime1).toHex(),c=n.util.createBuffer(y.privateKeyPrime2).toHex(),h=n.util.createBuffer(y.privateKeyExponent1).toHex(),p=n.util.createBuffer(y.privateKeyExponent2).toHex(),d=n.util.createBuffer(y.privateKeyCoefficient).toHex(),u.setRsaPrivateKey(new a(t,16),new a(r,16),new a(i,16),new a(o,16),new a(c,16),new a(h,16),new a(p,16),new a(d,16))},u.privateKeyToAsn1=u.privateKeyToRSAPrivateKey=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(e.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(e.e)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(e.d)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(e.p)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(e.q)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(e.dP)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(e.dQ)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(e.qInv))])},u.publicKeyFromAsn1=function(e){var t={},r=[];if(s.validate(e,p,t,r)){var i,o=s.derToOid(t.publicKeyOid);if(o!==u.oids.rsaEncryption)throw(i=new Error("Cannot read public key. Unknown OID.")).oid=o,i;e=t.rsaPublicKey}if(r=[],!s.validate(e,h,t,r))throw(i=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=r,i;var c=n.util.createBuffer(t.publicKeyModulus).toHex(),l=n.util.createBuffer(t.publicKeyExponent).toHex();return u.setRsaPublicKey(new a(c,16),new a(l,16))},u.publicKeyToAsn1=u.publicKeyToSubjectPublicKeyInfo=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(u.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.BITSTRING,!1,[u.publicKeyToRSAPublicKey(e)])])},u.publicKeyToRSAPublicKey=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(e.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(e.e))])}},function(e,t,r){var n=r(0);function a(e,t){n.cipher.registerAlgorithm(e,function(){return new n.aes.Algorithm(e,t)})}r(19),r(26),r(1),e.exports=n.aes=n.aes||{},n.aes.startEncrypting=function(e,t,r,n){var a=y({key:e,output:r,decrypt:!1,mode:n});return a.start(t),a},n.aes.createEncryptionCipher=function(e,t){return y({key:e,output:null,decrypt:!1,mode:t})},n.aes.startDecrypting=function(e,t,r,n){var a=y({key:e,output:r,decrypt:!0,mode:n});return a.start(t),a},n.aes.createDecryptionCipher=function(e,t){return y({key:e,output:null,decrypt:!0,mode:t})},n.aes.Algorithm=function(e,t){l||h();var r=this;r.name=e,r.mode=new t({blockSize:16,cipher:{encrypt:function(e,t){return d(r._w,e,t,!1)},decrypt:function(e,t){return d(r._w,e,t,!0)}}}),r._init=!1},n.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t,r=e.key;if("string"!=typeof r||16!==r.length&&24!==r.length&&32!==r.length){if(n.util.isArray(r)&&(16===r.length||24===r.length||32===r.length)){t=r,r=n.util.createBuffer();for(var a=0;a<t.length;++a)r.putByte(t[a])}}else r=n.util.createBuffer(r);if(!n.util.isArray(r)){t=r,r=[];var i=t.length();if(16===i||24===i||32===i){i>>>=2;for(a=0;a<i;++a)r.push(t.getInt32())}}if(!n.util.isArray(r)||4!==r.length&&6!==r.length&&8!==r.length)throw new Error("Invalid key parameter.");var s=this.mode.name,o=-1!==["CFB","OFB","CTR","GCM"].indexOf(s);this._w=p(r,e.decrypt&&!o),this._init=!0}},n.aes._expandKey=function(e,t){return l||h(),p(e,t)},n.aes._updateBlock=d,a("AES-ECB",n.cipher.modes.ecb),a("AES-CBC",n.cipher.modes.cbc),a("AES-CFB",n.cipher.modes.cfb),a("AES-OFB",n.cipher.modes.ofb),a("AES-CTR",n.cipher.modes.ctr),a("AES-GCM",n.cipher.modes.gcm);var i,s,o,u,c,l=!1,f=4;function h(){l=!0,o=[0,1,2,4,8,16,32,64,128,27,54];for(var e=new Array(256),t=0;t<128;++t)e[t]=t<<1,e[t+128]=t+128<<1^283;i=new Array(256),s=new Array(256),u=new Array(4),c=new Array(4);for(t=0;t<4;++t)u[t]=new Array(256),c[t]=new Array(256);var r,n,a,f,h,p,d,y=0,g=0;for(t=0;t<256;++t){f=(f=g^g<<1^g<<2^g<<3^g<<4)>>8^255&f^99,i[y]=f,s[f]=y,p=(h=e[f])<<24^f<<16^f<<8^f^h,d=((r=e[y])^(n=e[r])^(a=e[n]))<<24^(y^a)<<16^(y^n^a)<<8^y^r^a;for(var m=0;m<4;++m)u[m][y]=p,c[m][f]=d,p=p<<24|p>>>8,d=d<<24|d>>>8;0===y?y=g=1:(y=r^e[e[e[r^a]]],g^=e[e[g]])}}function p(e,t){for(var r,n=e.slice(0),a=1,s=n.length,u=f*(s+6+1),l=s;l<u;++l)r=n[l-1],l%s==0?(r=i[r>>>16&255]<<24^i[r>>>8&255]<<16^i[255&r]<<8^i[r>>>24]^o[a]<<24,a++):s>6&&l%s==4&&(r=i[r>>>24]<<24^i[r>>>16&255]<<16^i[r>>>8&255]<<8^i[255&r]),n[l]=n[l-s]^r;if(t){for(var h,p=c[0],d=c[1],y=c[2],g=c[3],m=n.slice(0),v=(l=0,(u=n.length)-f);l<u;l+=f,v-=f)if(0===l||l===u-f)m[l]=n[v],m[l+1]=n[v+3],m[l+2]=n[v+2],m[l+3]=n[v+1];else for(var E=0;E<f;++E)h=n[v+E],m[l+(3&-E)]=p[i[h>>>24]]^d[i[h>>>16&255]]^y[i[h>>>8&255]]^g[i[255&h]];n=m}return n}function d(e,t,r,n){var a,o,l,f,h,p,d,y,g,m,v,E,C=e.length/4-1;n?(a=c[0],o=c[1],l=c[2],f=c[3],h=s):(a=u[0],o=u[1],l=u[2],f=u[3],h=i),p=t[0]^e[0],d=t[n?3:1]^e[1],y=t[2]^e[2],g=t[n?1:3]^e[3];for(var b=3,S=1;S<C;++S)m=a[p>>>24]^o[d>>>16&255]^l[y>>>8&255]^f[255&g]^e[++b],v=a[d>>>24]^o[y>>>16&255]^l[g>>>8&255]^f[255&p]^e[++b],E=a[y>>>24]^o[g>>>16&255]^l[p>>>8&255]^f[255&d]^e[++b],g=a[g>>>24]^o[p>>>16&255]^l[d>>>8&255]^f[255&y]^e[++b],p=m,d=v,y=E;r[0]=h[p>>>24]<<24^h[d>>>16&255]<<16^h[y>>>8&255]<<8^h[255&g]^e[++b],r[n?3:1]=h[d>>>24]<<24^h[y>>>16&255]<<16^h[g>>>8&255]<<8^h[255&p]^e[++b],r[2]=h[y>>>24]<<24^h[g>>>16&255]<<16^h[p>>>8&255]<<8^h[255&d]^e[++b],r[n?1:3]=h[g>>>24]<<24^h[p>>>16&255]<<16^h[d>>>8&255]<<8^h[255&y]^e[++b]}function y(e){var t,r="AES-"+((e=e||{}).mode||"CBC").toUpperCase(),a=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var i=null;r instanceof n.util.ByteBuffer&&(i=r,r={}),(r=r||{}).output=i,r.iv=e,a.call(t,r)},t}},function(e,t,r){var n=r(0);r(1),e.exports=n.cipher=n.cipher||{},n.cipher.algorithms=n.cipher.algorithms||{},n.cipher.createCipher=function(e,t){var r=e;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!1})},n.cipher.createDecipher=function(e,t){var r=e;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!0})},n.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),n.cipher.algorithms[e]=t},n.cipher.getAlgorithm=function(e){return(e=e.toUpperCase())in n.cipher.algorithms?n.cipher.algorithms[e]:null};var a=n.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};a.prototype.start=function(e){e=e||{};var t={};for(var r in e)t[r]=e[r];t.decrypt=this._decrypt,this._finish=!1,this._input=n.util.createBuffer(),this.output=e.output||n.util.createBuffer(),this.mode.start(t)},a.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},a.prototype.finish=function(e){!e||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(t){return e(this.blockSize,t,!1)},this.mode.unpad=function(t){return e(this.blockSize,t,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t))&&(this._finish=!0,this.update(),!(this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))&&!(this.mode.afterFinish&&!this.mode.afterFinish(this.output,t)))}},function(e,t){},function(e,t,r){var n=r(0);r(2),r(1),(e.exports=n.hmac=n.hmac||{}).create=function(){var e=null,t=null,r=null,a=null,i={start:function(i,s){if(null!==i)if("string"==typeof i){if(!((i=i.toLowerCase())in n.md.algorithms))throw new Error('Unknown hash algorithm "'+i+'"');t=n.md.algorithms[i].create()}else t=i;if(null===s)s=e;else{if("string"==typeof s)s=n.util.createBuffer(s);else if(n.util.isArray(s)){var o=s;s=n.util.createBuffer();for(var u=0;u<o.length;++u)s.putByte(o[u])}var c=s.length();c>t.blockLength&&(t.start(),t.update(s.bytes()),s=t.digest()),r=n.util.createBuffer(),a=n.util.createBuffer(),c=s.length();for(u=0;u<c;++u){o=s.at(u);r.putByte(54^o),a.putByte(92^o)}if(c<t.blockLength)for(o=t.blockLength-c,u=0;u<o;++u)r.putByte(54),a.putByte(92);e=s,r=r.bytes(),a=a.bytes()}t.start(),t.update(r)},update:function(e){t.update(e)},getMac:function(){var e=t.digest().bytes();return t.start(),t.update(a),t.update(e),t.digest()}};return i.digest=i.getMac,i}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=r(12),i=r(30),s=r(6),o=r(4),u=r(11),c=r(23),l=n(r(16));t.seedWithNonce=function(e,t){return{seed:i.Seed.toBinary(e).seed,nonce:t}},t.buildAddress=function(e,t){void 0===t&&(t=a.MAIN_NET_CHAIN_ID);var r=[1,"string"==typeof t?t.charCodeAt(0):t],n=s._hashChain(e).slice(0,20),i=u.concat(r,n),o=s._hashChain(i).slice(0,4);return u.concat(i,o)};t.keyPair=function(e){var t=i.Seed.toBinary(e),r=function(e,t){var r=[0,0,0,0];if(t&&t>0)for(var n=t,a=3;a>=0;a--)r[3-a]=Math.floor(n/Math.pow(2,8*a)),n%=Math.pow(2,8*a);var i=u.concat(r,e),o=s._hashChain(i);return s.sha256(o)}(t.seed,t.nonce),n=l.default.generateKeyPair(r);return{privateKey:n.private,publicKey:n.public}},t.address=function(e,r){return void 0===r&&(r=a.MAIN_NET_CHAIN_ID),c.isPublicKey(e)?t.buildAddress(o._fromIn(e.publicKey),r):t.address(t.keyPair(e),r)},t.publicKey=function(e){return c.isPrivateKey(e)?l.default.generateKeyPair(o._fromIn(e.privateKey)).public:t.keyPair(e).publicKey},t.privateKey=function(e){return t.keyPair(e).privateKey}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPublicKey=function(e){return void 0!==e.publicKey},t.isPrivateKey=function(e){return void 0!==e.privateKey}},function(e,t,r){var n=r(0);r(1);var a=e.exports=n.pem=n.pem||{};function i(e){for(var t=e.name+": ",r=[],n=function(e,t){return" "+t},a=0;a<e.values.length;++a)r.push(e.values[a].replace(/^(\S+\r\n)/,n));t+=r.join(",")+"\r\n";var i=0,s=-1;for(a=0;a<t.length;++a,++i)if(i>65&&-1!==s){var o=t[s];","===o?(++s,t=t.substr(0,s)+"\r\n "+t.substr(s)):t=t.substr(0,s)+"\r\n"+o+t.substr(s+1),i=a-s-1,s=-1,++a}else" "!==t[a]&&"\t"!==t[a]&&","!==t[a]||(s=a);return t}function s(e){return e.replace(/^\s+/,"")}a.encode=function(e,t){t=t||{};var r,a="-----BEGIN "+e.type+"-----\r\n";if(e.procType&&(a+=i(r={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]})),e.contentDomain&&(a+=i(r={name:"Content-Domain",values:[e.contentDomain]})),e.dekInfo&&(r={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&r.values.push(e.dekInfo.parameters),a+=i(r)),e.headers)for(var s=0;s<e.headers.length;++s)a+=i(e.headers[s]);return e.procType&&(a+="\r\n"),a+=n.util.encode64(e.body,t.maxline||64)+"\r\n",a+="-----END "+e.type+"-----\r\n"},a.decode=function(e){for(var t,r=[],a=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,i=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,o=/\r?\n/;t=a.exec(e);){var u={type:t[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:n.util.decode64(t[3])};if(r.push(u),t[2]){for(var c=t[2].split(o),l=0;t&&l<c.length;){for(var f=c[l].replace(/\s+$/,""),h=l+1;h<c.length;++h){var p=c[h];if(!/\s/.test(p[0]))break;f+=p,l=h}if(t=f.match(i)){for(var d={name:t[1],values:[]},y=t[2].split(","),g=0;g<y.length;++g)d.values.push(s(y[g]));if(u.procType)if(u.contentDomain||"Content-Domain"!==d.name)if(u.dekInfo||"DEK-Info"!==d.name)u.headers.push(d);else{if(0===d.values.length)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');u.dekInfo={algorithm:y[0],parameters:y[1]||null}}else u.contentDomain=y[0]||"";else{if("Proc-Type"!==d.name)throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==d.values.length)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');u.procType={version:y[0],type:y[1]}}}++l}if("ENCRYPTED"===u.procType&&!u.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(0===r.length)throw new Error("Invalid PEM formatted message.");return r}},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return s},i=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e};Object.defineProperty(t,"__esModule",{value:!0});var s=r(13),o=r(29),u=r(15),c=r(3),l=r(11),f=r(6),h=r(22),p=r(52),d=r(53),y=r(54),g=r(65),m=r(66);t.crypto=function(e){if(e&&""==e.seed)throw new Error("Empty seed is not allowed.");var t,r=function(e,t){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.apply(void 0,i([t],r))}},a=function(t){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=t.apply(void 0,i(r));return!e||e&&"Base58"===e.output?u.base58Encode(a):a}},v=e&&e.seed?e.seed:void 0,E={seedWithNonce:v?r(h.seedWithNonce,v):h.seedWithNonce,signBytes:a(v?r(p.signBytes,v):p.signBytes),keyPair:(t=v?r(h.keyPair,v):h.keyPair,function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=t.apply(void 0,i(r));return!e||e&&"Base58"===e.output?{privateKey:u.base58Encode(a.privateKey),publicKey:u.base58Encode(a.publicKey)}:a}),publicKey:a(v?r(h.publicKey,v):h.publicKey),privateKey:a(v?r(h.privateKey,v):h.privateKey),address:a(v?r(h.address,v):h.address)};return n({},E,{sharedKey:a(o.sharedKey),buildAddress:h.buildAddress,blake2b:f.blake2b,keccak:f.keccak,sha256:f.sha256,base64Encode:u.base64Encode,base64Decode:u.base64Decode,base58Encode:u.base58Encode,base58Decode:u.base58Decode,base16Encode:u.base16Encode,base16Decode:u.base16Decode,stringToBytes:c.stringToBytes,bytesToString:c.bytesToString,random:s.random,randomSeed:s.randomSeed,randomBytes:s.randomBytes,verifySignature:d.verifySignature,verifyPublicKey:d.verifyPublicKey,verifyAddress:d.verifyAddress,messageDecrypt:o.messageDecrypt,messageEncrypt:o.messageEncrypt,aesDecrypt:o.aesDecrypt,aesEncrypt:o.aesEncrypt,encryptSeed:g.encryptSeed,decryptSeed:g.decryptSeed,rsaKeyPair:y.rsaKeyPair,rsaKeyPairSync:y.rsaKeyPairSync,rsaSign:y.rsaSign,rsaVerify:y.rsaVerify,merkleVerify:m.merkleVerify,split:l.split,concat:l.concat})}},function(e,t,r){var n=r(0);r(1),n.cipher=n.cipher||{};var a=e.exports=n.cipher.modes=n.cipher.modes||{};function i(e){if("string"==typeof e&&(e=n.util.createBuffer(e)),n.util.isArray(e)&&e.length>4){var t=e;e=n.util.createBuffer();for(var r=0;r<t.length;++r)e.putByte(t[r])}return n.util.isArray(e)||(e=[e.getInt32(),e.getInt32(),e.getInt32(),e.getInt32()]),e}function s(e){e[e.length-1]=e[e.length-1]+1&4294967295}function o(e){return[e/4294967296|0,4294967295&e]}a.ecb=function(e){e=e||{},this.name="ECB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},a.ecb.prototype.start=function(e){},a.ecb.prototype.encrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._outBlock[n])},a.ecb.prototype.decrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._outBlock[n])},a.ecb.prototype.pad=function(e,t){var r=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(r,r),!0},a.ecb.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2)&&(e.truncate(n),!0)},a.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},a.cbc.prototype.start=function(e){if(null===e.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=i(e.iv),this._prev=this._iv.slice(0)}},a.cbc.prototype.encrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=this._prev[n]^e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._outBlock[n]);this._prev=this._outBlock},a.cbc.prototype.decrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._prev[n]^this._outBlock[n]);this._prev=this._inBlock.slice(0)},a.cbc.prototype.pad=function(e,t){var r=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(r,r),!0},a.cbc.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2)&&(e.truncate(n),!0)},a.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},a.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=i(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},a.cfb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var a=0;a<this._ints;++a)this._inBlock[a]=e.getInt32()^this._outBlock[a],t.putInt32(this._inBlock[a]);else{var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(a=0;a<this._ints;++a)this._partialBlock[a]=e.getInt32()^this._outBlock[a],this._partialOutput.putInt32(this._partialBlock[a]);if(i>0)e.read-=this.blockSize;else for(a=0;a<this._ints;++a)this._inBlock[a]=this._partialBlock[a];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!r)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},a.cfb.prototype.decrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var a=0;a<this._ints;++a)this._inBlock[a]=e.getInt32(),t.putInt32(this._inBlock[a]^this._outBlock[a]);else{var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(a=0;a<this._ints;++a)this._partialBlock[a]=e.getInt32(),this._partialOutput.putInt32(this._partialBlock[a]^this._outBlock[a]);if(i>0)e.read-=this.blockSize;else for(a=0;a<this._ints;++a)this._inBlock[a]=this._partialBlock[a];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!r)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},a.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},a.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=i(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},a.ofb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===e.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var a=0;a<this._ints;++a)t.putInt32(e.getInt32()^this._outBlock[a]),this._inBlock[a]=this._outBlock[a];else{var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(a=0;a<this._ints;++a)this._partialOutput.putInt32(e.getInt32()^this._outBlock[a]);if(i>0)e.read-=this.blockSize;else for(a=0;a<this._ints;++a)this._inBlock[a]=this._outBlock[a];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!r)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},a.ofb.prototype.decrypt=a.ofb.prototype.encrypt,a.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},a.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=i(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},a.ctr.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var a=0;a<this._ints;++a)t.putInt32(e.getInt32()^this._outBlock[a]);else{var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(a=0;a<this._ints;++a)this._partialOutput.putInt32(e.getInt32()^this._outBlock[a]);if(i>0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!r)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}s(this._inBlock)},a.ctr.prototype.decrypt=a.ctr.prototype.encrypt,a.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0,this._R=3774873600},a.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t,r=n.util.createBuffer(e.iv);if(this._cipherLength=0,t="additionalData"in e?n.util.createBuffer(e.additionalData):n.util.createBuffer(),this._tagLength="tagLength"in e?e.tagLength:128,this._tag=null,e.decrypt&&(this._tag=n.util.createBuffer(e.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var a=r.length();if(12===a)this._j0=[r.getInt32(),r.getInt32(),r.getInt32(),1];else{for(this._j0=[0,0,0,0];r.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(o(8*a)))}this._inBlock=this._j0.slice(0),s(this._inBlock),this._partialBytes=0,t=n.util.createBuffer(t),this._aDataLength=o(8*t.length());var i=t.length()%this.blockSize;for(i&&t.fillWithByte(0,this.blockSize-i),this._s=[0,0,0,0];t.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()])},a.gcm.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize){for(var a=0;a<this._ints;++a)t.putInt32(this._outBlock[a]^=e.getInt32());this._cipherLength+=this.blockSize}else{var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(a=0;a<this._ints;++a)this._partialOutput.putInt32(e.getInt32()^this._outBlock[a]);if(i<=0||r){if(r){var o=n%this.blockSize;this._cipherLength+=o,this._partialOutput.truncate(this.blockSize-o)}else this._cipherLength+=this.blockSize;for(a=0;a<this._ints;++a)this._outBlock[a]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!r)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),s(this._inBlock)},a.gcm.prototype.decrypt=function(e,t,r){var n=e.length();if(n<this.blockSize&&!(r&&n>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),s(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var a=0;a<this._ints;++a)t.putInt32(this._outBlock[a]^this._hashBlock[a]);n<this.blockSize?this._cipherLength+=n%this.blockSize:this._cipherLength+=this.blockSize},a.gcm.prototype.afterFinish=function(e,t){var r=!0;t.decrypt&&t.overflow&&e.truncate(this.blockSize-t.overflow),this.tag=n.util.createBuffer();var a=this._aDataLength.concat(o(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,a);var i=[];this.cipher.encrypt(this._j0,i);for(var s=0;s<this._ints;++s)this.tag.putInt32(this._s[s]^i[s]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),t.decrypt&&this.tag.bytes()!==this._tag&&(r=!1),r},a.gcm.prototype.multiply=function(e,t){for(var r=[0,0,0,0],n=t.slice(0),a=0;a<128;++a){e[a/32|0]&1<<31-a%32&&(r[0]^=n[0],r[1]^=n[1],r[2]^=n[2],r[3]^=n[3]),this.pow(n,n)}return r},a.gcm.prototype.pow=function(e,t){for(var r=1&e[3],n=3;n>0;--n)t[n]=e[n]>>>1|(1&e[n-1])<<31;t[0]=e[0]>>>1,r&&(t[0]^=this._R)},a.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],r=0;r<32;++r){var n=e[r/8|0]>>>4*(7-r%8)&15,a=this._m[r][n];t[0]^=a[0],t[1]^=a[1],t[2]^=a[2],t[3]^=a[3]}return t},a.gcm.prototype.ghash=function(e,t,r){return t[0]^=r[0],t[1]^=r[1],t[2]^=r[2],t[3]^=r[3],this.tableMultiply(t)},a.gcm.prototype.generateHashTable=function(e,t){for(var r=8/t,n=4*r,a=16*r,i=new Array(a),s=0;s<a;++s){var o=[0,0,0,0],u=(n-1-s%n)*t;o[s/n|0]=1<<t-1<<u,i[s]=this.generateSubHashTable(this.multiply(o,e),t)}return i},a.gcm.prototype.generateSubHashTable=function(e,t){var r=1<<t,n=r>>>1,a=new Array(r);a[n]=e.slice(0);for(var i=n>>>1;i>0;)this.pow(a[2*i],a[i]=[]),i>>=1;for(i=2;i<n;){for(var s=1;s<i;++s){var o=a[i],u=a[s];a[i+s]=[o[0]^u[0],o[1]^u[1],o[2]^u[2],o[3]^u[3]]}i*=2}for(a[0]=[0,0,0,0],i=n+1;i<r;++i){var c=a[i^n];a[i]=[e[0]^c[0],e[1]^c[1],e[2]^c[2],e[3]^c[3]]}return a}},function(e,t,r){var n=r(0);r(2),r(1);var a=e.exports=n.sha256=n.sha256||{};n.md.sha256=n.md.algorithms.sha256=a,a.create=function(){s||(i=String.fromCharCode(128),i+=n.util.fillString(String.fromCharCode(0),64),o=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=!0);var e=null,t=n.util.createBuffer(),r=new Array(64),a={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){a.messageLength=0,a.fullMessageLength=a.messageLength64=[];for(var r=a.messageLengthSize/4,i=0;i<r;++i)a.fullMessageLength.push(0);return t=n.util.createBuffer(),e={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},a}};return a.start(),a.update=function(i,s){"utf8"===s&&(i=n.util.encodeUtf8(i));var o=i.length;a.messageLength+=o,o=[o/4294967296>>>0,o>>>0];for(var c=a.fullMessageLength.length-1;c>=0;--c)a.fullMessageLength[c]+=o[1],o[1]=o[0]+(a.fullMessageLength[c]/4294967296>>>0),a.fullMessageLength[c]=a.fullMessageLength[c]>>>0,o[0]=o[1]/4294967296>>>0;return t.putBytes(i),u(e,r,t),(t.read>2048||0===t.length())&&t.compact(),a},a.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var o,c=a.fullMessageLength[a.fullMessageLength.length-1]+a.messageLengthSize&a.blockLength-1;s.putBytes(i.substr(0,a.blockLength-c));for(var l=8*a.fullMessageLength[0],f=0;f<a.fullMessageLength.length-1;++f)l+=(o=8*a.fullMessageLength[f+1])/4294967296>>>0,s.putInt32(l>>>0),l=o>>>0;s.putInt32(l);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};u(h,r,s);var p=n.util.createBuffer();return p.putInt32(h.h0),p.putInt32(h.h1),p.putInt32(h.h2),p.putInt32(h.h3),p.putInt32(h.h4),p.putInt32(h.h5),p.putInt32(h.h6),p.putInt32(h.h7),p},a};var i=null,s=!1,o=null;function u(e,t,r){for(var n,a,i,s,u,c,l,f,h,p,d,y,g,m=r.length();m>=64;){for(u=0;u<16;++u)t[u]=r.getInt32();for(;u<64;++u)n=((n=t[u-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,a=((a=t[u-15])>>>7|a<<25)^(a>>>18|a<<14)^a>>>3,t[u]=n+t[u-7]+a+t[u-16]|0;for(c=e.h0,l=e.h1,f=e.h2,h=e.h3,p=e.h4,d=e.h5,y=e.h6,g=e.h7,u=0;u<64;++u)i=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),s=c&l|f&(c^l),n=g+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(y^p&(d^y))+o[u]+t[u],g=y,y=d,d=p,p=h+n>>>0,h=f,f=l,l=c,c=n+(a=i+s)>>>0;e.h0=e.h0+c|0,e.h1=e.h1+l|0,e.h2=e.h2+f|0,e.h3=e.h3+h|0,e.h4=e.h4+p|0,e.h5=e.h5+d|0,e.h6=e.h6+y|0,e.h7=e.h7+g|0,m-=64}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.seedWordsList=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"]},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return s},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=a(r(19)),o=a(r(1)),u=r(13),c=r(4),l=r(6),f=r(11),h=i(r(16)),p=r(3);t.aesEncrypt=function(e,t,r,n){void 0===r&&(r="CBC");var a=s.createCipher("AES-"+r,p.bytesToString(c._fromIn(t),"raw"));return a.start({iv:n&&o.createBuffer(p.bytesToString(c._fromIn(n),"raw"))}),a.update(o.createBuffer(p.bytesToString(e,"raw"))),a.finish(),p.stringToBytes(a.output.getBytes(),"raw")},t.aesDecrypt=function(e,t,r,n){void 0===r&&(r="CBC");var a=s.createDecipher("AES-"+r,p.bytesToString(c._fromIn(t),"raw"));a.start({iv:n&&o.createBuffer(p.bytesToString(c._fromIn(n),"raw"))});var i=o.createBuffer(p.bytesToString(c._fromIn(e),"raw"));if(a.update(i),!a.finish())throw new Error("Failed to decrypt data with provided key");return p.stringToBytes(a.output.getBytes(),"raw")},t.messageEncrypt=function(e,r){var n=Uint8Array.from([1]),a=u.randomBytes(32),i=u.randomBytes(16),s=p.stringToBytes(r),o=t.aesEncrypt(s,a,"CTR",i),c=t.aesEncrypt(a,e,"ECB"),h=l.hmacSHA256(s,a),d=l.hmacSHA256(f.concat(a,i),e);return f.concat(n,c,d,h,i,o)},t.messageDecrypt=function(e,r){var a=n(f.split(r,1,48,32,32,16),6),i=(a[0],a[1]),s=a[2],o=a[3],u=a[4],h=a[5],d=t.aesDecrypt(i,e,"ECB");if(!c._fromIn(l.hmacSHA256(f.concat(d,u),c._fromIn(e))).every(function(e,t){return e===s[t]}))throw new Error("Invalid key");var y=t.aesDecrypt(h,d,"CTR",u);if(!c._fromIn(l.hmacSHA256(y,d)).every(function(e,t){return e===o[t]}))throw new Error("Invalid message");return p.bytesToString(y)},t.sharedKey=function(e,t,r){var n=h.default.sharedKey(c._fromIn(e),c._fromIn(t)),a=l.sha256(c._fromRawIn(r));return l.hmacSHA256(n,a)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4),a=r(3);t.Seed={isSeedWithNonce:function(e){return void 0!==e.nonce},toBinary:function(e){return t.Seed.isSeedWithNonce(e)?{seed:t.Seed.toBinary(e.seed).seed,nonce:e.nonce}:{seed:n._fromRawIn(e),nonce:void 0}},toString:function(e){return a.bytesToString(t.Seed.toBinary(e).seed)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(12),a=r(12);t.ChaidId={toNumber:function(e){return"string"==typeof e?e.charCodeAt(0):e},isMainnet:function(e){return t.ChaidId.toNumber(e)===n.MAIN_NET_CHAIN_ID},isTestnet:function(e){return t.ChaidId.toNumber(e)===a.TEST_NET_CHAIN_ID}}},function(e,t,r){var n=r(0);if(r(18),r(7),r(33),r(2),r(8),r(34),r(24),r(5),r(56),r(17),r(1),void 0===a)var a=n.jsbn.BigInteger;var i=n.asn1,s=n.pki=n.pki||{};e.exports=s.pbe=n.pbe=n.pbe||{};var o=s.oids,u={name:"EncryptedPrivateKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},c={name:"PBES2Algorithms",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},l={name:"pkcs-12PbeParams",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"iterations"}]};function f(e,t){return e.start().update(t).digest().getBytes()}function h(e){var t;if(e){if(!(t=s.oids[i.derToOid(e)])){var r=new Error("Unsupported PRF OID.");throw r.oid=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}}else t="hmacWithSHA1";return p(t)}function p(e){var t=n.md;switch(e){case"hmacWithSHA224":t=n.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase();break;default:var r=new Error("Unsupported PRF algorithm.");throw r.algorithm=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}if(!(t&&e in t))throw new Error("Unknown hash algorithm: "+e);return t[e].create()}s.encryptPrivateKeyInfo=function(e,t,r){(r=r||{}).saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var a,u,c,l=n.random.getBytesSync(r.saltSize),f=r.count,h=i.integerToDer(f);if(0===r.algorithm.indexOf("aes")||"des"===r.algorithm){var d,y,g;switch(r.algorithm){case"aes128":a=16,d=16,y=o["aes128-CBC"],g=n.aes.createEncryptionCipher;break;case"aes192":a=24,d=16,y=o["aes192-CBC"],g=n.aes.createEncryptionCipher;break;case"aes256":a=32,d=16,y=o["aes256-CBC"],g=n.aes.createEncryptionCipher;break;case"des":a=8,d=8,y=o.desCBC,g=n.des.createEncryptionCipher;break;default:throw(S=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,S}var m="hmacWith"+r.prfAlgorithm.toUpperCase(),v=p(m),E=n.pkcs5.pbkdf2(t,l,f,a,v),C=n.random.getBytesSync(d);(T=g(E)).start(C),T.update(i.toDer(e)),T.finish(),c=T.output.getBytes();var b=function(e,t,r,a){var o=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,e),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,t.getBytes())]);"hmacWithSHA1"!==a&&o.value.push(i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,n.util.hexToBytes(r.toString(16))),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(s.oids[a]).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]));return o}(l,h,a,m);u=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.pkcs5PBES2).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.pkcs5PBKDF2).getBytes()),b]),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(y).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,C)])])])}else{var S;if("3des"!==r.algorithm)throw(S=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,S;a=24;var T,I=new n.util.ByteBuffer(l);E=s.pbe.generatePkcs12Key(t,I,1,f,a),C=s.pbe.generatePkcs12Key(t,I,2,f,a);(T=n.des.createEncryptionCipher(E)).start(C),T.update(i.toDer(e)),T.finish(),c=T.output.getBytes(),u=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,l),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,h.getBytes())])])}return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[u,i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,c)])},s.decryptPrivateKeyInfo=function(e,t){var r=null,a={},o=[];if(!i.validate(e,u,a,o)){var c=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw c.errors=o,c}var l=i.derToOid(a.encryptionOid),f=s.pbe.getCipher(l,a.encryptionParams,t),h=n.util.createBuffer(a.encryptedData);return f.update(h),f.finish()&&(r=i.fromDer(f.output)),r},s.encryptedPrivateKeyToPem=function(e,t){var r={type:"ENCRYPTED PRIVATE KEY",body:i.toDer(e).getBytes()};return n.pem.encode(r,{maxline:t})},s.encryptedPrivateKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==t.type){var r=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return i.fromDer(t.body)},s.encryptRsaPrivateKey=function(e,t,r){if(!(r=r||{}).legacy){var a=s.wrapRsaPrivateKey(s.privateKeyToAsn1(e));return a=s.encryptPrivateKeyInfo(a,t,r),s.encryptedPrivateKeyToPem(a)}var o,u,c,l;switch(r.algorithm){case"aes128":o="AES-128-CBC",c=16,u=n.random.getBytesSync(16),l=n.aes.createEncryptionCipher;break;case"aes192":o="AES-192-CBC",c=24,u=n.random.getBytesSync(16),l=n.aes.createEncryptionCipher;break;case"aes256":o="AES-256-CBC",c=32,u=n.random.getBytesSync(16),l=n.aes.createEncryptionCipher;break;case"3des":o="DES-EDE3-CBC",c=24,u=n.random.getBytesSync(8),l=n.des.createEncryptionCipher;break;case"des":o="DES-CBC",c=8,u=n.random.getBytesSync(8),l=n.des.createEncryptionCipher;break;default:var f=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw f.algorithm=r.algorithm,f}var h=l(n.pbe.opensslDeriveBytes(t,u.substr(0,8),c));h.start(u),h.update(i.toDer(s.privateKeyToAsn1(e))),h.finish();var p={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:o,parameters:n.util.bytesToHex(u).toUpperCase()},body:h.output.getBytes()};return n.pem.encode(p)},s.decryptRsaPrivateKey=function(e,t){var r=null,a=n.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==a.type&&"PRIVATE KEY"!==a.type&&"RSA PRIVATE KEY"!==a.type)throw(c=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".')).headerType=c,c;if(a.procType&&"ENCRYPTED"===a.procType.type){var o,u;switch(a.dekInfo.algorithm){case"DES-CBC":o=8,u=n.des.createDecryptionCipher;break;case"DES-EDE3-CBC":o=24,u=n.des.createDecryptionCipher;break;case"AES-128-CBC":o=16,u=n.aes.createDecryptionCipher;break;case"AES-192-CBC":o=24,u=n.aes.createDecryptionCipher;break;case"AES-256-CBC":o=32,u=n.aes.createDecryptionCipher;break;case"RC2-40-CBC":o=5,u=function(e){return n.rc2.createDecryptionCipher(e,40)};break;case"RC2-64-CBC":o=8,u=function(e){return n.rc2.createDecryptionCipher(e,64)};break;case"RC2-128-CBC":o=16,u=function(e){return n.rc2.createDecryptionCipher(e,128)};break;default:var c;throw(c=new Error('Could not decrypt private key; unsupported encryption algorithm "'+a.dekInfo.algorithm+'".')).algorithm=a.dekInfo.algorithm,c}var l=n.util.hexToBytes(a.dekInfo.parameters),f=u(n.pbe.opensslDeriveBytes(t,l.substr(0,8),o));if(f.start(l),f.update(n.util.createBuffer(a.body)),!f.finish())return r;r=f.output.getBytes()}else r=a.body;return null!==(r="ENCRYPTED PRIVATE KEY"===a.type?s.decryptPrivateKeyInfo(i.fromDer(r),t):i.fromDer(r))&&(r=s.privateKeyFromAsn1(r)),r},s.pbe.generatePkcs12Key=function(e,t,r,a,i,s){var o,u;if(null==s){if(!("sha1"in n.md))throw new Error('"sha1" hash algorithm unavailable.');s=n.md.sha1.create()}var c=s.digestLength,l=s.blockLength,f=new n.util.ByteBuffer,h=new n.util.ByteBuffer;if(null!=e){for(u=0;u<e.length;u++)h.putInt16(e.charCodeAt(u));h.putInt16(0)}var p=h.length(),d=t.length(),y=new n.util.ByteBuffer;y.fillWithByte(r,l);var g=l*Math.ceil(d/l),m=new n.util.ByteBuffer;for(u=0;u<g;u++)m.putByte(t.at(u%d));var v=l*Math.ceil(p/l),E=new n.util.ByteBuffer;for(u=0;u<v;u++)E.putByte(h.at(u%p));var C=m;C.putBuffer(E);for(var b=Math.ceil(i/c),S=1;S<=b;S++){var T=new n.util.ByteBuffer;T.putBytes(y.bytes()),T.putBytes(C.bytes());for(var I=0;I<a;I++)s.start(),s.update(T.getBytes()),T=s.digest();var A=new n.util.ByteBuffer;for(u=0;u<l;u++)A.putByte(T.at(u%c));var w=Math.ceil(d/l)+Math.ceil(p/l),B=new n.util.ByteBuffer;for(o=0;o<w;o++){var N=new n.util.ByteBuffer(C.getBytes(l)),R=511;for(u=A.length()-1;u>=0;u--)R>>=8,R+=A.at(u)+N.at(u),N.setAt(u,255&R);B.putBuffer(N)}C=B,f.putBuffer(T)}return f.truncate(f.length()-i),f},s.pbe.getCipher=function(e,t,r){switch(e){case s.oids.pkcs5PBES2:return s.pbe.getCipherForPBES2(e,t,r);case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case s.oids["pbewithSHAAnd40BitRC2-CBC"]:return s.pbe.getCipherForPKCS12PBE(e,t,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=e,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}},s.pbe.getCipherForPBES2=function(e,t,r){var a,o={},u=[];if(!i.validate(t,c,o,u))throw(a=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=u,a;if((e=i.derToOid(o.kdfOid))!==s.oids.pkcs5PBKDF2)throw(a=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=e,a.supportedOids=["pkcs5PBKDF2"],a;if((e=i.derToOid(o.encOid))!==s.oids["aes128-CBC"]&&e!==s.oids["aes192-CBC"]&&e!==s.oids["aes256-CBC"]&&e!==s.oids["des-EDE3-CBC"]&&e!==s.oids.desCBC)throw(a=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=e,a.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],a;var l,f,p=o.kdfSalt,d=n.util.createBuffer(o.kdfIterationCount);switch(d=d.getInt(d.length()<<3),s.oids[e]){case"aes128-CBC":l=16,f=n.aes.createDecryptionCipher;break;case"aes192-CBC":l=24,f=n.aes.createDecryptionCipher;break;case"aes256-CBC":l=32,f=n.aes.createDecryptionCipher;break;case"des-EDE3-CBC":l=24,f=n.des.createDecryptionCipher;break;case"desCBC":l=8,f=n.des.createDecryptionCipher}var y=h(o.prfOid),g=n.pkcs5.pbkdf2(r,p,d,l,y),m=o.encIv,v=f(g);return v.start(m),v},s.pbe.getCipherForPKCS12PBE=function(e,t,r){var a={},o=[];if(!i.validate(t,l,a,o))throw(y=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=o,y;var u,c,f,p=n.util.createBuffer(a.salt),d=n.util.createBuffer(a.iterations);switch(d=d.getInt(d.length()<<3),e){case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:u=24,c=8,f=n.des.startDecrypting;break;case s.oids["pbewithSHAAnd40BitRC2-CBC"]:u=5,c=8,f=function(e,t){var r=n.rc2.createDecryptionCipher(e,40);return r.start(t,null),r};break;default:var y;throw(y=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=e,y}var g=h(a.prfOid),m=s.pbe.generatePkcs12Key(r,p,1,d,u,g);return g.start(),f(m,s.pbe.generatePkcs12Key(r,p,2,d,c,g))},s.pbe.opensslDeriveBytes=function(e,t,r,a){if(null==a){if(!("md5"in n.md))throw new Error('"md5" hash algorithm unavailable.');a=n.md.md5.create()}null===t&&(t="");for(var i=[f(a,e+t)],s=16,o=1;s<r;++o,s+=16)i.push(f(a,i[o-1]+e+t));return i.join("").substr(0,r)}},function(e,t,r){var n=r(0);function a(e,t){n.cipher.registerAlgorithm(e,function(){return new n.des.Algorithm(e,t)})}r(19),r(26),r(1),e.exports=n.des=n.des||{},n.des.startEncrypting=function(e,t,r,n){var a=d({key:e,output:r,decrypt:!1,mode:n||(null===t?"ECB":"CBC")});return a.start(t),a},n.des.createEncryptionCipher=function(e,t){return d({key:e,output:null,decrypt:!1,mode:t})},n.des.startDecrypting=function(e,t,r,n){var a=d({key:e,output:r,decrypt:!0,mode:n||(null===t?"ECB":"CBC")});return a.start(t),a},n.des.createDecryptionCipher=function(e,t){return d({key:e,output:null,decrypt:!0,mode:t})},n.des.Algorithm=function(e,t){var r=this;r.name=e,r.mode=new t({blockSize:8,cipher:{encrypt:function(e,t){return p(r._keys,e,t,!1)},decrypt:function(e,t){return p(r._keys,e,t,!0)}}}),r._init=!1},n.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=n.util.createBuffer(e.key);if(0===this.name.indexOf("3DES")&&24!==t.length())throw new Error("Invalid Triple-DES key size: "+8*t.length());this._keys=function(e){for(var t,r=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],n=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],a=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],i=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],s=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],o=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],u=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],c=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],f=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],h=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],p=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],d=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],y=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],g=e.length()>8?3:1,m=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],E=0,C=0;C<g;C++){var b=e.getInt32(),S=e.getInt32();b^=(t=252645135&(b>>>4^S))<<4,b^=t=65535&((S^=t)>>>-16^b),b^=(t=858993459&(b>>>2^(S^=t<<-16)))<<2,b^=t=65535&((S^=t)>>>-16^b),b^=(t=1431655765&(b>>>1^(S^=t<<-16)))<<1,b^=t=16711935&((S^=t)>>>8^b),t=(b^=(t=1431655765&(b>>>1^(S^=t<<8)))<<1)<<8|(S^=t)>>>20&240,b=S<<24|S<<8&16711680|S>>>8&65280|S>>>24&240,S=t;for(var T=0;T<v.length;++T){v[T]?(b=b<<2|b>>>26,S=S<<2|S>>>26):(b=b<<1|b>>>27,S=S<<1|S>>>27);var I=r[(b&=-15)>>>28]|n[b>>>24&15]|a[b>>>20&15]|i[b>>>16&15]|s[b>>>12&15]|o[b>>>8&15]|u[b>>>4&15],A=c[(S&=-15)>>>28]|l[S>>>24&15]|f[S>>>20&15]|h[S>>>16&15]|p[S>>>12&15]|d[S>>>8&15]|y[S>>>4&15];t=65535&(A>>>16^I),m[E++]=I^t,m[E++]=A^t<<16}}return m}(t),this._init=!0}},a("DES-ECB",n.cipher.modes.ecb),a("DES-CBC",n.cipher.modes.cbc),a("DES-CFB",n.cipher.modes.cfb),a("DES-OFB",n.cipher.modes.ofb),a("DES-CTR",n.cipher.modes.ctr),a("3DES-ECB",n.cipher.modes.ecb),a("3DES-CBC",n.cipher.modes.cbc),a("3DES-CFB",n.cipher.modes.cfb),a("3DES-OFB",n.cipher.modes.ofb),a("3DES-CTR",n.cipher.modes.ctr);var i=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],s=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],o=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],u=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],c=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],l=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],f=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],h=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function p(e,t,r,n){var a,p,d=32===e.length?3:9;a=3===d?n?[30,-2,-2]:[0,32,2]:n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var y=t[0],g=t[1];y^=(p=252645135&(y>>>4^g))<<4,y^=(p=65535&(y>>>16^(g^=p)))<<16,y^=p=858993459&((g^=p)>>>2^y),y^=p=16711935&((g^=p<<2)>>>8^y),y=(y^=(p=1431655765&(y>>>1^(g^=p<<8)))<<1)<<1|y>>>31,g=(g^=p)<<1|g>>>31;for(var m=0;m<d;m+=3){for(var v=a[m+1],E=a[m+2],C=a[m];C!=v;C+=E){var b=g^e[C],S=(g>>>4|g<<28)^e[C+1];p=y,y=g,g=p^(s[b>>>24&63]|u[b>>>16&63]|l[b>>>8&63]|h[63&b]|i[S>>>24&63]|o[S>>>16&63]|c[S>>>8&63]|f[63&S])}p=y,y=g,g=p}g=g>>>1|g<<31,g^=p=1431655765&((y=y>>>1|y<<31)>>>1^g),g^=(p=16711935&(g>>>8^(y^=p<<1)))<<8,g^=(p=858993459&(g>>>2^(y^=p)))<<2,g^=p=65535&((y^=p)>>>16^g),g^=p=252645135&((y^=p<<16)>>>4^g),y^=p<<4,r[0]=y,r[1]=g}function d(e){var t,r="DES-"+((e=e||{}).mode||"CBC").toUpperCase(),a=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var i=null;r instanceof n.util.ByteBuffer&&(i=r,r={}),(r=r||{}).output=i,r.iv=e,a.call(t,r)},t}},function(e,t,r){(function(t){var n=r(0);r(21),r(2),r(1);var a,i=n.pkcs5=n.pkcs5||{};n.util.isNodejs&&!n.options.usePureJavaScript&&(a=r(20)),e.exports=n.pbkdf2=i.pbkdf2=function(e,r,i,s,o,u){if("function"==typeof o&&(u=o,o=null),n.util.isNodejs&&!n.options.usePureJavaScript&&a.pbkdf2&&(null===o||"object"!=typeof o)&&(a.pbkdf2Sync.length>4||!o||"sha1"===o))return"string"!=typeof o&&(o="sha1"),e=t.from(e,"binary"),r=t.from(r,"binary"),u?4===a.pbkdf2Sync.length?a.pbkdf2(e,r,i,s,function(e,t){if(e)return u(e);u(null,t.toString("binary"))}):a.pbkdf2(e,r,i,s,o,function(e,t){if(e)return u(e);u(null,t.toString("binary"))}):4===a.pbkdf2Sync.length?a.pbkdf2Sync(e,r,i,s).toString("binary"):a.pbkdf2Sync(e,r,i,s,o).toString("binary");if(null==o&&(o="sha1"),"string"==typeof o){if(!(o in n.md.algorithms))throw new Error("Unknown hash algorithm: "+o);o=n.md[o].create()}var c=o.digestLength;if(s>4294967295*c){var l=new Error("Derived key is too long.");if(u)return u(l);throw l}var f=Math.ceil(s/c),h=s-(f-1)*c,p=n.hmac.create();p.start(o,e);var d,y,g,m="";if(!u){for(var v=1;v<=f;++v){p.start(null,null),p.update(r),p.update(n.util.int32ToBytes(v)),d=g=p.digest().getBytes();for(var E=2;E<=i;++E)p.start(null,null),p.update(g),y=p.digest().getBytes(),d=n.util.xorBytes(d,y,c),g=y;m+=v<f?d:d.substr(0,h)}return m}v=1;function C(){if(v>f)return u(null,m);p.start(null,null),p.update(r),p.update(n.util.int32ToBytes(v)),d=g=p.digest().getBytes(),E=2,b()}function b(){if(E<=i)return p.start(null,null),p.update(g),y=p.digest().getBytes(),d=n.util.xorBytes(d,y,c),g=y,++E,n.util.setImmediate(b);m+=v<f?d:d.substr(0,h),++v,C()}C()}}).call(this,r(9).Buffer)},function(e,t,r){var n,a=r(0);e.exports=a.jsbn=a.jsbn||{};function i(e,t,r){this.data=[],null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function s(){return new i(null)}function o(e,t,r,n,a,i){for(var s=16383&t,o=t>>14;--i>=0;){var u=16383&this.data[e],c=this.data[e++]>>14,l=o*u+c*s;a=((u=s*u+((16383&l)<<14)+r.data[n]+a)>>28)+(l>>14)+o*c,r.data[n++]=268435455&u}return a}a.jsbn.BigInteger=i,"undefined"==typeof navigator?(i.prototype.am=o,n=28):"Microsoft Internet Explorer"==navigator.appName?(i.prototype.am=function(e,t,r,n,a,i){for(var s=32767&t,o=t>>15;--i>=0;){var u=32767&this.data[e],c=this.data[e++]>>15,l=o*u+c*s;a=((u=s*u+((32767&l)<<15)+r.data[n]+(1073741823&a))>>>30)+(l>>>15)+o*c+(a>>>30),r.data[n++]=1073741823&u}return a},n=30):"Netscape"!=navigator.appName?(i.prototype.am=function(e,t,r,n,a,i){for(;--i>=0;){var s=t*this.data[e++]+r.data[n]+a;a=Math.floor(s/67108864),r.data[n++]=67108863&s}return a},n=26):(i.prototype.am=o,n=28),i.prototype.DB=n,i.prototype.DM=(1<<n)-1,i.prototype.DV=1<<n;i.prototype.FV=Math.pow(2,52),i.prototype.F1=52-n,i.prototype.F2=2*n-52;var u,c,l="0123456789abcdefghijklmnopqrstuvwxyz",f=new Array;for(u="0".charCodeAt(0),c=0;c<=9;++c)f[u++]=c;for(u="a".charCodeAt(0),c=10;c<36;++c)f[u++]=c;for(u="A".charCodeAt(0),c=10;c<36;++c)f[u++]=c;function h(e){return l.charAt(e)}function p(e,t){var r=f[e.charCodeAt(t)];return null==r?-1:r}function d(e){var t=s();return t.fromInt(e),t}function y(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function g(e){this.m=e}function m(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function v(e,t){return e&t}function E(e,t){return e|t}function C(e,t){return e^t}function b(e,t){return e&~t}function S(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function T(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function I(){}function A(e){return e}function w(e){this.r2=s(),this.q3=s(),i.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}g.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},g.prototype.revert=function(e){return e},g.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},g.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},g.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},m.prototype.convert=function(e){var t=s();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(i.ZERO)>0&&this.m.subTo(t,t),t},m.prototype.revert=function(e){var t=s();return e.copyTo(t),this.reduce(t),t},m.prototype.reduce=function(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=32767&e.data[t],n=r*this.mpl+((r*this.mph+(e.data[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e.data[r]+=this.m.am(0,n,e,t,0,this.m.t);e.data[r]>=e.DV;)e.data[r]-=e.DV,e.data[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},m.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},m.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},i.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s},i.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0},i.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.fromRadix(e,t);r=2}this.t=0,this.s=0;for(var n=e.length,a=!1,s=0;--n>=0;){var o=8==r?255&e[n]:p(e,n);o<0?"-"==e.charAt(n)&&(a=!0):(a=!1,0==s?this.data[this.t++]=o:s+r>this.DB?(this.data[this.t-1]|=(o&(1<<this.DB-s)-1)<<s,this.data[this.t++]=o>>this.DB-s):this.data[this.t-1]|=o<<s,(s+=r)>=this.DB&&(s-=this.DB))}8==r&&0!=(128&e[0])&&(this.s=-1,s>0&&(this.data[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),a&&i.ZERO.subTo(this,this)},i.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this.data[this.t-1]==e;)--this.t},i.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t.data[r+e]=this.data[r];for(r=e-1;r>=0;--r)t.data[r]=0;t.t=this.t+e,t.s=this.s},i.prototype.drShiftTo=function(e,t){for(var r=e;r<this.t;++r)t.data[r-e]=this.data[r];t.t=Math.max(this.t-e,0),t.s=this.s},i.prototype.lShiftTo=function(e,t){var r,n=e%this.DB,a=this.DB-n,i=(1<<a)-1,s=Math.floor(e/this.DB),o=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)t.data[r+s+1]=this.data[r]>>a|o,o=(this.data[r]&i)<<n;for(r=s-1;r>=0;--r)t.data[r]=0;t.data[s]=o,t.t=this.t+s+1,t.s=this.s,t.clamp()},i.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,a=this.DB-n,i=(1<<n)-1;t.data[0]=this.data[r]>>n;for(var s=r+1;s<this.t;++s)t.data[s-r-1]|=(this.data[s]&i)<<a,t.data[s-r]=this.data[s]>>n;n>0&&(t.data[this.t-r-1]|=(this.s&i)<<a),t.t=this.t-r,t.clamp()}},i.prototype.subTo=function(e,t){for(var r=0,n=0,a=Math.min(e.t,this.t);r<a;)n+=this.data[r]-e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t.data[r++]=this.DV+n:n>0&&(t.data[r++]=n),t.t=r,t.clamp()},i.prototype.multiplyTo=function(e,t){var r=this.abs(),n=e.abs(),a=r.t;for(t.t=a+n.t;--a>=0;)t.data[a]=0;for(a=0;a<n.t;++a)t.data[a+r.t]=r.am(0,n.data[a],t,a,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&i.ZERO.subTo(t,t)},i.prototype.squareTo=function(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e.data[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t.data[r],e,2*r,0,1);(e.data[r+t.t]+=t.am(r+1,2*t.data[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e.data[r+t.t]-=t.DV,e.data[r+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(r,t.data[r],e,2*r,0,1)),e.s=0,e.clamp()},i.prototype.divRemTo=function(e,t,r){var n=e.abs();if(!(n.t<=0)){var a=this.abs();if(a.t<n.t)return null!=t&&t.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=s());var o=s(),u=this.s,c=e.s,l=this.DB-y(n.data[n.t-1]);l>0?(n.lShiftTo(l,o),a.lShiftTo(l,r)):(n.copyTo(o),a.copyTo(r));var f=o.t,h=o.data[f-1];if(0!=h){var p=h*(1<<this.F1)+(f>1?o.data[f-2]>>this.F2:0),d=this.FV/p,g=(1<<this.F1)/p,m=1<<this.F2,v=r.t,E=v-f,C=null==t?s():t;for(o.dlShiftTo(E,C),r.compareTo(C)>=0&&(r.data[r.t++]=1,r.subTo(C,r)),i.ONE.dlShiftTo(f,C),C.subTo(o,o);o.t<f;)o.data[o.t++]=0;for(;--E>=0;){var b=r.data[--v]==h?this.DM:Math.floor(r.data[v]*d+(r.data[v-1]+m)*g);if((r.data[v]+=o.am(0,b,r,E,0,f))<b)for(o.dlShiftTo(E,C),r.subTo(C,r);r.data[v]<--b;)r.subTo(C,r)}null!=t&&(r.drShiftTo(f,t),u!=c&&i.ZERO.subTo(t,t)),r.t=f,r.clamp(),l>0&&r.rShiftTo(l,r),u<0&&i.ZERO.subTo(r,r)}}},i.prototype.invDigit=function(){if(this.t<1)return 0;var e=this.data[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},i.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},i.prototype.exp=function(e,t){if(e>4294967295||e<1)return i.ONE;var r=s(),n=s(),a=t.convert(this),o=y(e)-1;for(a.copyTo(r);--o>=0;)if(t.sqrTo(r,n),(e&1<<o)>0)t.mulTo(n,a,r);else{var u=r;r=n,n=u}return t.revert(r)},i.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<<t)-1,a=!1,i="",s=this.t,o=this.DB-s*this.DB%t;if(s-- >0)for(o<this.DB&&(r=this.data[s]>>o)>0&&(a=!0,i=h(r));s>=0;)o<t?(r=(this.data[s]&(1<<o)-1)<<t-o,r|=this.data[--s]>>(o+=this.DB-t)):(r=this.data[s]>>(o-=t)&n,o<=0&&(o+=this.DB,--s)),r>0&&(a=!0),a&&(i+=h(r));return a?i:"0"},i.prototype.negate=function(){var e=s();return i.ZERO.subTo(this,e),e},i.prototype.abs=function(){return this.s<0?this.negate():this},i.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this.data[r]-e.data[r]))return t;return 0},i.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+y(this.data[this.t-1]^this.s&this.DM)},i.prototype.mod=function(e){var t=s();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(i.ZERO)>0&&e.subTo(t,t),t},i.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new g(t):new m(t),this.exp(e,r)},i.ZERO=d(0),i.ONE=d(1),I.prototype.convert=A,I.prototype.revert=A,I.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},I.prototype.sqrTo=function(e,t){e.squareTo(t)},w.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=s();return e.copyTo(t),this.reduce(t),t},w.prototype.revert=function(e){return e},w.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},w.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},w.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var B=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],N=(1<<26)/B[B.length-1];i.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},i.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=d(r),a=s(),i=s(),o="";for(this.divRemTo(n,a,i);a.signum()>0;)o=(r+i.intValue()).toString(e).substr(1)+o,a.divRemTo(n,a,i);return i.intValue().toString(e)+o},i.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var r=this.chunkSize(t),n=Math.pow(t,r),a=!1,s=0,o=0,u=0;u<e.length;++u){var c=p(e,u);c<0?"-"==e.charAt(u)&&0==this.signum()&&(a=!0):(o=t*o+c,++s>=r&&(this.dMultiply(n),this.dAddOffset(o,0),s=0,o=0))}s>0&&(this.dMultiply(Math.pow(t,s)),this.dAddOffset(o,0)),a&&i.ZERO.subTo(this,this)},i.prototype.fromNumber=function(e,t,r){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(i.ONE.shiftLeft(e-1),E,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(i.ONE.shiftLeft(e-1),this);else{var n=new Array,a=7&e;n.length=1+(e>>3),t.nextBytes(n),a>0?n[0]&=(1<<a)-1:n[0]=0,this.fromString(n,256)}},i.prototype.bitwiseTo=function(e,t,r){var n,a,i=Math.min(e.t,this.t);for(n=0;n<i;++n)r.data[n]=t(this.data[n],e.data[n]);if(e.t<this.t){for(a=e.s&this.DM,n=i;n<this.t;++n)r.data[n]=t(this.data[n],a);r.t=this.t}else{for(a=this.s&this.DM,n=i;n<e.t;++n)r.data[n]=t(a,e.data[n]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()},i.prototype.changeBit=function(e,t){var r=i.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r},i.prototype.addTo=function(e,t){for(var r=0,n=0,a=Math.min(e.t,this.t);r<a;)n+=this.data[r]+e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t.data[r++]=n:n<-1&&(t.data[r++]=this.DV+n),t.t=r,t.clamp()},i.prototype.dMultiply=function(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},i.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}},i.prototype.multiplyLowerTo=function(e,t,r){var n,a=Math.min(this.t+e.t,t);for(r.s=0,r.t=a;a>0;)r.data[--a]=0;for(n=r.t-this.t;a<n;++a)r.data[a+this.t]=this.am(0,e.data[a],r,a,0,this.t);for(n=Math.min(e.t,t);a<n;++a)this.am(0,e.data[a],r,a,0,t-a);r.clamp()},i.prototype.multiplyUpperTo=function(e,t,r){--t;var n=r.t=this.t+e.t-t;for(r.s=0;--n>=0;)r.data[n]=0;for(n=Math.max(t-this.t,0);n<e.t;++n)r.data[this.t+n-t]=this.am(t-n,e.data[n],r,0,0,this.t+n-t);r.clamp(),r.drShiftTo(1,r)},i.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(0==t)r=this.data[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this.data[n])%e;return r},i.prototype.millerRabin=function(e){var t=this.subtract(i.ONE),r=t.getLowestSetBit();if(r<=0)return!1;for(var n,a=t.shiftRight(r),s={nextBytes:function(e){for(var t=0;t<e.length;++t)e[t]=Math.floor(256*Math.random())}},o=0;o<e;++o){do{n=new i(this.bitLength(),s)}while(n.compareTo(i.ONE)<=0||n.compareTo(t)>=0);var u=n.modPow(a,this);if(0!=u.compareTo(i.ONE)&&0!=u.compareTo(t)){for(var c=1;c++<r&&0!=u.compareTo(t);)if(0==(u=u.modPowInt(2,this)).compareTo(i.ONE))return!1;if(0!=u.compareTo(t))return!1}}return!0},i.prototype.clone=function(){var e=s();return this.copyTo(e),e},i.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]},i.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24},i.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},i.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},i.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var r,n=this.DB-e*this.DB%8,a=0;if(e-- >0)for(n<this.DB&&(r=this.data[e]>>n)!=(this.s&this.DM)>>n&&(t[a++]=r|this.s<<this.DB-n);e>=0;)n<8?(r=(this.data[e]&(1<<n)-1)<<8-n,r|=this.data[--e]>>(n+=this.DB-8)):(r=this.data[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==a&&(128&this.s)!=(128&r)&&++a,(a>0||r!=this.s)&&(t[a++]=r);return t},i.prototype.equals=function(e){return 0==this.compareTo(e)},i.prototype.min=function(e){return this.compareTo(e)<0?this:e},i.prototype.max=function(e){return this.compareTo(e)>0?this:e},i.prototype.and=function(e){var t=s();return this.bitwiseTo(e,v,t),t},i.prototype.or=function(e){var t=s();return this.bitwiseTo(e,E,t),t},i.prototype.xor=function(e){var t=s();return this.bitwiseTo(e,C,t),t},i.prototype.andNot=function(e){var t=s();return this.bitwiseTo(e,b,t),t},i.prototype.not=function(){for(var e=s(),t=0;t<this.t;++t)e.data[t]=this.DM&~this.data[t];return e.t=this.t,e.s=~this.s,e},i.prototype.shiftLeft=function(e){var t=s();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},i.prototype.shiftRight=function(e){var t=s();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},i.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this.data[e])return e*this.DB+S(this.data[e]);return this.s<0?this.t*this.DB:-1},i.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=T(this.data[r]^t);return e},i.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this.data[t]&1<<e%this.DB)},i.prototype.setBit=function(e){return this.changeBit(e,E)},i.prototype.clearBit=function(e){return this.changeBit(e,b)},i.prototype.flipBit=function(e){return this.changeBit(e,C)},i.prototype.add=function(e){var t=s();return this.addTo(e,t),t},i.prototype.subtract=function(e){var t=s();return this.subTo(e,t),t},i.prototype.multiply=function(e){var t=s();return this.multiplyTo(e,t),t},i.prototype.divide=function(e){var t=s();return this.divRemTo(e,t,null),t},i.prototype.remainder=function(e){var t=s();return this.divRemTo(e,null,t),t},i.prototype.divideAndRemainder=function(e){var t=s(),r=s();return this.divRemTo(e,t,r),new Array(t,r)},i.prototype.modPow=function(e,t){var r,n,a=e.bitLength(),i=d(1);if(a<=0)return i;r=a<18?1:a<48?3:a<144?4:a<768?5:6,n=a<8?new g(t):t.isEven()?new w(t):new m(t);var o=new Array,u=3,c=r-1,l=(1<<r)-1;if(o[1]=n.convert(this),r>1){var f=s();for(n.sqrTo(o[1],f);u<=l;)o[u]=s(),n.mulTo(f,o[u-2],o[u]),u+=2}var h,p,v=e.t-1,E=!0,C=s();for(a=y(e.data[v])-1;v>=0;){for(a>=c?h=e.data[v]>>a-c&l:(h=(e.data[v]&(1<<a+1)-1)<<c-a,v>0&&(h|=e.data[v-1]>>this.DB+a-c)),u=r;0==(1&h);)h>>=1,--u;if((a-=u)<0&&(a+=this.DB,--v),E)o[h].copyTo(i),E=!1;else{for(;u>1;)n.sqrTo(i,C),n.sqrTo(C,i),u-=2;u>0?n.sqrTo(i,C):(p=i,i=C,C=p),n.mulTo(C,o[h],i)}for(;v>=0&&0==(e.data[v]&1<<a);)n.sqrTo(i,C),p=i,i=C,C=p,--a<0&&(a=this.DB-1,--v)}return n.revert(i)},i.prototype.modInverse=function(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return i.ZERO;for(var r=e.clone(),n=this.clone(),a=d(1),s=d(0),o=d(0),u=d(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),t?(a.isEven()&&s.isEven()||(a.addTo(this,a),s.subTo(e,s)),a.rShiftTo(1,a)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);for(;n.isEven();)n.rShiftTo(1,n),t?(o.isEven()&&u.isEven()||(o.addTo(this,o),u.subTo(e,u)),o.rShiftTo(1,o)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u);r.compareTo(n)>=0?(r.subTo(n,r),t&&a.subTo(o,a),s.subTo(u,s)):(n.subTo(r,n),t&&o.subTo(a,o),u.subTo(s,u))}return 0!=n.compareTo(i.ONE)?i.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u},i.prototype.pow=function(e){return this.exp(e,new I)},i.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var a=t.getLowestSetBit(),i=r.getLowestSetBit();if(i<0)return t;for(a<i&&(i=a),i>0&&(t.rShiftTo(i,t),r.rShiftTo(i,r));t.signum()>0;)(a=t.getLowestSetBit())>0&&t.rShiftTo(a,t),(a=r.getLowestSetBit())>0&&r.rShiftTo(a,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return i>0&&r.lShiftTo(i,r),r},i.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r.data[0]<=B[B.length-1]){for(t=0;t<B.length;++t)if(r.data[0]==B[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<B.length;){for(var n=B[t],a=t+1;a<B.length&&n<N;)n*=B[a++];for(n=r.modInt(n);t<a;)if(n%B[t++]==0)return!1}return r.millerRabin(e)}},function(e,t,r){var n=r(0);r(2),r(1);var a=e.exports=n.sha1=n.sha1||{};n.md.sha1=n.md.algorithms.sha1=a,a.create=function(){s||(i=String.fromCharCode(128),i+=n.util.fillString(String.fromCharCode(0),64),s=!0);var e=null,t=n.util.createBuffer(),r=new Array(80),a={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){a.messageLength=0,a.fullMessageLength=a.messageLength64=[];for(var r=a.messageLengthSize/4,i=0;i<r;++i)a.fullMessageLength.push(0);return t=n.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},a}};return a.start(),a.update=function(i,s){"utf8"===s&&(i=n.util.encodeUtf8(i));var u=i.length;a.messageLength+=u,u=[u/4294967296>>>0,u>>>0];for(var c=a.fullMessageLength.length-1;c>=0;--c)a.fullMessageLength[c]+=u[1],u[1]=u[0]+(a.fullMessageLength[c]/4294967296>>>0),a.fullMessageLength[c]=a.fullMessageLength[c]>>>0,u[0]=u[1]/4294967296>>>0;return t.putBytes(i),o(e,r,t),(t.read>2048||0===t.length())&&t.compact(),a},a.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var u,c=a.fullMessageLength[a.fullMessageLength.length-1]+a.messageLengthSize&a.blockLength-1;s.putBytes(i.substr(0,a.blockLength-c));for(var l=8*a.fullMessageLength[0],f=0;f<a.fullMessageLength.length-1;++f)l+=(u=8*a.fullMessageLength[f+1])/4294967296>>>0,s.putInt32(l>>>0),l=u>>>0;s.putInt32(l);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};o(h,r,s);var p=n.util.createBuffer();return p.putInt32(h.h0),p.putInt32(h.h1),p.putInt32(h.h2),p.putInt32(h.h3),p.putInt32(h.h4),p},a};var i=null,s=!1;function o(e,t,r){for(var n,a,i,s,o,u,c,l=r.length();l>=64;){for(a=e.h0,i=e.h1,s=e.h2,o=e.h3,u=e.h4,c=0;c<16;++c)n=r.getInt32(),t[c]=n,n=(a<<5|a>>>27)+(o^i&(s^o))+u+1518500249+n,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=n;for(;c<20;++c)n=(n=t[c-3]^t[c-8]^t[c-14]^t[c-16])<<1|n>>>31,t[c]=n,n=(a<<5|a>>>27)+(o^i&(s^o))+u+1518500249+n,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=n;for(;c<32;++c)n=(n=t[c-3]^t[c-8]^t[c-14]^t[c-16])<<1|n>>>31,t[c]=n,n=(a<<5|a>>>27)+(i^s^o)+u+1859775393+n,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=n;for(;c<40;++c)n=(n=t[c-6]^t[c-16]^t[c-28]^t[c-32])<<2|n>>>30,t[c]=n,n=(a<<5|a>>>27)+(i^s^o)+u+1859775393+n,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=n;for(;c<60;++c)n=(n=t[c-6]^t[c-16]^t[c-28]^t[c-32])<<2|n>>>30,t[c]=n,n=(a<<5|a>>>27)+(i&s|o&(i^s))+u+2400959708+n,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=n;for(;c<80;++c)n=(n=t[c-6]^t[c-16]^t[c-28]^t[c-32])<<2|n>>>30,t[c]=n,n=(a<<5|a>>>27)+(i^s^o)+u+3395469782+n,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=n;e.h0=e.h0+a|0,e.h1=e.h1+i|0,e.h2=e.h2+s|0,e.h3=e.h3+o|0,e.h4=e.h4+u|0,l-=64}}},function(e,t,r){var n=r(0);r(18),r(7),r(33),r(2),r(61),r(8),r(24),r(38),r(17),r(1);var a=n.asn1,i=e.exports=n.pki=n.pki||{},s=i.oids,o={};o.CN=s.commonName,o.commonName="CN",o.C=s.countryName,o.countryName="C",o.L=s.localityName,o.localityName="L",o.ST=s.stateOrProvinceName,o.stateOrProvinceName="ST",o.O=s.organizationName,o.organizationName="O",o.OU=s.organizationalUnitName,o.organizationalUnitName="OU",o.E=s.emailAddress,o.emailAddress="E";var u=n.pki.rsa.publicKeyValidator,c={name:"Certificate",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:a.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:a.Class.UNIVERSAL,type:a.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:a.Class.UNIVERSAL,type:a.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:a.Class.UNIVERSAL,type:a.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:a.Class.UNIVERSAL,type:a.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},u,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:a.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:a.Class.UNIVERSAL,type:a.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:a.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:a.Class.UNIVERSAL,type:a.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:a.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:a.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:a.Class.UNIVERSAL,type:a.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},l={name:"rsapss",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:a.Class.UNIVERSAL,type:a.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:a.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:a.Class.UNIVERSAL,type:a.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:a.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:a.Class.UNIVERSAL,type:a.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:a.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:a.Class.UNIVERSAL,type:a.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},f={name:"CertificationRequestInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},u,{name:"CertificationRequestInfo.attributes",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:a.Class.UNIVERSAL,type:a.Type.SET,constructed:!0}]}]}]},h={name:"CertificationRequest",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[f,{name:"CertificationRequest.signatureAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:a.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:a.Class.UNIVERSAL,type:a.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};function p(e,t){"string"==typeof t&&(t={shortName:t});for(var r,n=null,a=0;null===n&&a<e.attributes.length;++a)r=e.attributes[a],t.type&&t.type===r.type?n=r:t.name&&t.name===r.name?n=r:t.shortName&&t.shortName===r.shortName&&(n=r);return n}i.RDNAttributesAsArray=function(e,t){for(var r,n,i,u=[],c=0;c<e.value.length;++c){r=e.value[c];for(var l=0;l<r.value.length;++l)i={},n=r.value[l],i.type=a.derToOid(n.value[0].value),i.value=n.value[1].value,i.valueTagClass=n.value[1].type,i.type in s&&(i.name=s[i.type],i.name in o&&(i.shortName=o[i.name])),t&&(t.update(i.type),t.update(i.value)),u.push(i)}return u},i.CRIAttributesAsArray=function(e){for(var t=[],r=0;r<e.length;++r)for(var n=e[r],u=a.derToOid(n.value[0].value),c=n.value[1].value,l=0;l<c.length;++l){var f={};if(f.type=u,f.value=c[l].value,f.valueTagClass=c[l].type,f.type in s&&(f.name=s[f.type],f.name in o&&(f.shortName=o[f.name])),f.type===s.extensionRequest){f.extensions=[];for(var h=0;h<f.value.length;++h)f.extensions.push(i.certificateExtensionFromAsn1(f.value[h]))}t.push(f)}return t};var d=function(e,t,r){var n={};if(e!==s["RSASSA-PSS"])return n;r&&(n={hash:{algorithmOid:s.sha1},mgf:{algorithmOid:s.mgf1,hash:{algorithmOid:s.sha1}},saltLength:20});var i={},o=[];if(!a.validate(t,l,i,o)){var u=new Error("Cannot read RSASSA-PSS parameter block.");throw u.errors=o,u}return void 0!==i.hashOid&&(n.hash=n.hash||{},n.hash.algorithmOid=a.derToOid(i.hashOid)),void 0!==i.maskGenOid&&(n.mgf=n.mgf||{},n.mgf.algorithmOid=a.derToOid(i.maskGenOid),n.mgf.hash=n.mgf.hash||{},n.mgf.hash.algorithmOid=a.derToOid(i.maskGenHashOid)),void 0!==i.saltLength&&(n.saltLength=i.saltLength.charCodeAt(0)),n};function y(e){for(var t,r,i=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]),s=e.attributes,o=0;o<s.length;++o){var u=(t=s[o]).value,c=a.Type.PRINTABLESTRING;"valueTagClass"in t&&(c=t.valueTagClass)===a.Type.UTF8&&(u=n.util.encodeUtf8(u)),r=a.create(a.Class.UNIVERSAL,a.Type.SET,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(t.type).getBytes()),a.create(a.Class.UNIVERSAL,c,!1,u)])]),i.value.push(r)}return i}function g(e){for(var t,r=0;r<e.length;++r){if(void 0===(t=e[r]).name&&(t.type&&t.type in i.oids?t.name=i.oids[t.type]:t.shortName&&t.shortName in o&&(t.name=i.oids[o[t.shortName]])),void 0===t.type){if(!(t.name&&t.name in i.oids))throw(u=new Error("Attribute type not specified.")).attribute=t,u;t.type=i.oids[t.name]}if(void 0===t.shortName&&t.name&&t.name in o&&(t.shortName=o[t.name]),t.type===s.extensionRequest&&(t.valueConstructed=!0,t.valueTagClass=a.Type.SEQUENCE,!t.value&&t.extensions)){t.value=[];for(var n=0;n<t.extensions.length;++n)t.value.push(i.certificateExtensionToAsn1(m(t.extensions[n])))}var u;if(void 0===t.value)throw(u=new Error("Attribute value not specified.")).attribute=t,u}}function m(e,t){if(t=t||{},void 0===e.name&&e.id&&e.id in i.oids&&(e.name=i.oids[e.id]),void 0===e.id){if(!(e.name&&e.name in i.oids))throw(b=new Error("Extension ID not specified.")).extension=e,b;e.id=i.oids[e.name]}if(void 0!==e.value)return e;if("keyUsage"===e.name){var r=0,o=0,u=0;e.digitalSignature&&(o|=128,r=7),e.nonRepudiation&&(o|=64,r=6),e.keyEncipherment&&(o|=32,r=5),e.dataEncipherment&&(o|=16,r=4),e.keyAgreement&&(o|=8,r=3),e.keyCertSign&&(o|=4,r=2),e.cRLSign&&(o|=2,r=1),e.encipherOnly&&(o|=1,r=0),e.decipherOnly&&(u|=128,r=7);var c=String.fromCharCode(r);0!==u?c+=String.fromCharCode(o)+String.fromCharCode(u):0!==o&&(c+=String.fromCharCode(o)),e.value=a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,c)}else if("basicConstraints"===e.name)e.value=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]),e.cA&&e.value.value.push(a.create(a.Class.UNIVERSAL,a.Type.BOOLEAN,!1,String.fromCharCode(255))),"pathLenConstraint"in e&&e.value.value.push(a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(e.pathLenConstraint).getBytes()));else if("extKeyUsage"===e.name){e.value=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]);var l=e.value.value;for(var f in e)!0===e[f]&&(f in s?l.push(a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s[f]).getBytes())):-1!==f.indexOf(".")&&l.push(a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(f).getBytes())))}else if("nsCertType"===e.name){r=0,o=0;e.client&&(o|=128,r=7),e.server&&(o|=64,r=6),e.email&&(o|=32,r=5),e.objsign&&(o|=16,r=4),e.reserved&&(o|=8,r=3),e.sslCA&&(o|=4,r=2),e.emailCA&&(o|=2,r=1),e.objCA&&(o|=1,r=0);c=String.fromCharCode(r);0!==o&&(c+=String.fromCharCode(o)),e.value=a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,c)}else if("subjectAltName"===e.name||"issuerAltName"===e.name){e.value=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]);for(var h=0;h<e.altNames.length;++h){c=(v=e.altNames[h]).value;if(7===v.type&&v.ip){if(null===(c=n.util.bytesFromIP(v.ip)))throw(b=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=e,b}else 8===v.type&&(c=v.oid?a.oidToDer(a.oidToDer(v.oid)):a.oidToDer(c));e.value.value.push(a.create(a.Class.CONTEXT_SPECIFIC,v.type,!1,c))}}else if("nsComment"===e.name&&t.cert){if(!/^[\x00-\x7F]*$/.test(e.comment)||e.comment.length<1||e.comment.length>128)throw new Error('Invalid "nsComment" content.');e.value=a.create(a.Class.UNIVERSAL,a.Type.IA5STRING,!1,e.comment)}else if("subjectKeyIdentifier"===e.name&&t.cert){var p=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=p.toHex(),e.value=a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,p.getBytes())}else if("authorityKeyIdentifier"===e.name&&t.cert){e.value=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]);l=e.value.value;if(e.keyIdentifier){var d=!0===e.keyIdentifier?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;l.push(a.create(a.Class.CONTEXT_SPECIFIC,0,!1,d))}if(e.authorityCertIssuer){var g=[a.create(a.Class.CONTEXT_SPECIFIC,4,!0,[y(!0===e.authorityCertIssuer?t.cert.issuer:e.authorityCertIssuer)])];l.push(a.create(a.Class.CONTEXT_SPECIFIC,1,!0,g))}if(e.serialNumber){var m=n.util.hexToBytes(!0===e.serialNumber?t.cert.serialNumber:e.serialNumber);l.push(a.create(a.Class.CONTEXT_SPECIFIC,2,!1,m))}}else if("cRLDistributionPoints"===e.name){e.value=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]);l=e.value.value;var v,E=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]),C=a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[]);for(h=0;h<e.altNames.length;++h){c=(v=e.altNames[h]).value;if(7===v.type&&v.ip){if(null===(c=n.util.bytesFromIP(v.ip)))throw(b=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=e,b}else 8===v.type&&(c=v.oid?a.oidToDer(a.oidToDer(v.oid)):a.oidToDer(c));C.value.push(a.create(a.Class.CONTEXT_SPECIFIC,v.type,!1,c))}E.value.push(a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[C])),l.push(E)}var b;if(void 0===e.value)throw(b=new Error("Extension value not specified.")).extension=e,b;return e}function v(e,t){switch(e){case s["RSASSA-PSS"]:var r=[];return void 0!==t.hash.algorithmOid&&r.push(a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(t.hash.algorithmOid).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")])])),void 0!==t.mgf.algorithmOid&&r.push(a.create(a.Class.CONTEXT_SPECIFIC,1,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(t.mgf.algorithmOid).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(t.mgf.hash.algorithmOid).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")])])])),void 0!==t.saltLength&&r.push(a.create(a.Class.CONTEXT_SPECIFIC,2,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(t.saltLength).getBytes())])),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,r);default:return a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")}}function E(e){var t=a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===e.attributes.length)return t;for(var r=e.attributes,i=0;i<r.length;++i){var s=r[i],o=s.value,u=a.Type.UTF8;"valueTagClass"in s&&(u=s.valueTagClass),u===a.Type.UTF8&&(o=n.util.encodeUtf8(o));var c=!1;"valueConstructed"in s&&(c=s.valueConstructed);var l=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s.type).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SET,!0,[a.create(a.Class.UNIVERSAL,u,c,o)])]);t.value.push(l)}return t}i.certificateFromPem=function(e,t,r){var s=n.pem.decode(e)[0];if("CERTIFICATE"!==s.type&&"X509 CERTIFICATE"!==s.type&&"TRUSTED CERTIFICATE"!==s.type){var o=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw o.headerType=s.type,o}if(s.procType&&"ENCRYPTED"===s.procType.type)throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var u=a.fromDer(s.body,r);return i.certificateFromAsn1(u,t)},i.certificateToPem=function(e,t){var r={type:"CERTIFICATE",body:a.toDer(i.certificateToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},i.publicKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("PUBLIC KEY"!==t.type&&"RSA PUBLIC KEY"!==t.type){var r=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert public key from PEM; PEM is encrypted.");var s=a.fromDer(t.body);return i.publicKeyFromAsn1(s)},i.publicKeyToPem=function(e,t){var r={type:"PUBLIC KEY",body:a.toDer(i.publicKeyToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},i.publicKeyToRSAPublicKeyPem=function(e,t){var r={type:"RSA PUBLIC KEY",body:a.toDer(i.publicKeyToRSAPublicKey(e)).getBytes()};return n.pem.encode(r,{maxline:t})},i.getPublicKeyFingerprint=function(e,t){var r,s=(t=t||{}).md||n.md.sha1.create();switch(t.type||"RSAPublicKey"){case"RSAPublicKey":r=a.toDer(i.publicKeyToRSAPublicKey(e)).getBytes();break;case"SubjectPublicKeyInfo":r=a.toDer(i.publicKeyToAsn1(e)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+t.type+'".')}s.start(),s.update(r);var o=s.digest();if("hex"===t.encoding){var u=o.toHex();return t.delimiter?u.match(/.{2}/g).join(t.delimiter):u}if("binary"===t.encoding)return o.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".');return o},i.certificationRequestFromPem=function(e,t,r){var s=n.pem.decode(e)[0];if("CERTIFICATE REQUEST"!==s.type){var o=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw o.headerType=s.type,o}if(s.procType&&"ENCRYPTED"===s.procType.type)throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var u=a.fromDer(s.body,r);return i.certificationRequestFromAsn1(u,t)},i.certificationRequestToPem=function(e,t){var r={type:"CERTIFICATE REQUEST",body:a.toDer(i.certificationRequestToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},i.createCertificate=function(){var e={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};return e.siginfo.algorithmOid=null,e.validity={},e.validity.notBefore=new Date,e.validity.notAfter=new Date,e.issuer={},e.issuer.getField=function(t){return p(e.issuer,t)},e.issuer.addField=function(t){g([t]),e.issuer.attributes.push(t)},e.issuer.attributes=[],e.issuer.hash=null,e.subject={},e.subject.getField=function(t){return p(e.subject,t)},e.subject.addField=function(t){g([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.extensions=[],e.publicKey=null,e.md=null,e.setSubject=function(t,r){g(t),e.subject.attributes=t,delete e.subject.uniqueId,r&&(e.subject.uniqueId=r),e.subject.hash=null},e.setIssuer=function(t,r){g(t),e.issuer.attributes=t,delete e.issuer.uniqueId,r&&(e.issuer.uniqueId=r),e.issuer.hash=null},e.setExtensions=function(t){for(var r=0;r<t.length;++r)m(t[r],{cert:e});e.extensions=t},e.getExtension=function(t){"string"==typeof t&&(t={name:t});for(var r,n=null,a=0;null===n&&a<e.extensions.length;++a)r=e.extensions[a],t.id&&r.id===t.id?n=r:t.name&&r.name===t.name&&(n=r);return n},e.sign=function(t,r){e.md=r||n.md.sha1.create();var o=s[e.md.algorithm+"WithRSAEncryption"];if(!o){var u=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw u.algorithm=e.md.algorithm,u}e.signatureOid=e.siginfo.algorithmOid=o,e.tbsCertificate=i.getTBSCertificate(e);var c=a.toDer(e.tbsCertificate);e.md.update(c.getBytes()),e.signature=t.sign(e.md)},e.verify=function(t){var r=!1;if(!e.issued(t)){var o=t.issuer,u=e.subject;throw(y=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.")).expectedIssuer=o.attributes,y.actualIssuer=u.attributes,y}var c=t.md;if(null===c){if(t.signatureOid in s)switch(s[t.signatureOid]){case"sha1WithRSAEncryption":c=n.md.sha1.create();break;case"md5WithRSAEncryption":c=n.md.md5.create();break;case"sha256WithRSAEncryption":c=n.md.sha256.create();break;case"sha384WithRSAEncryption":c=n.md.sha384.create();break;case"sha512WithRSAEncryption":c=n.md.sha512.create();break;case"RSASSA-PSS":c=n.md.sha256.create()}if(null===c)throw(y=new Error("Could not compute certificate digest. Unknown signature OID.")).signatureOid=t.signatureOid,y;var l=t.tbsCertificate||i.getTBSCertificate(t),f=a.toDer(l);c.update(f.getBytes())}if(null!==c){var h;switch(t.signatureOid){case s.sha1WithRSAEncryption:h=void 0;break;case s["RSASSA-PSS"]:var p,d,y;if(void 0===(p=s[t.signatureParameters.mgf.hash.algorithmOid])||void 0===n.md[p])throw(y=new Error("Unsupported MGF hash function.")).oid=t.signatureParameters.mgf.hash.algorithmOid,y.name=p,y;if(void 0===(d=s[t.signatureParameters.mgf.algorithmOid])||void 0===n.mgf[d])throw(y=new Error("Unsupported MGF function.")).oid=t.signatureParameters.mgf.algorithmOid,y.name=d,y;if(d=n.mgf[d].create(n.md[p].create()),void 0===(p=s[t.signatureParameters.hash.algorithmOid])||void 0===n.md[p])throw{message:"Unsupported RSASSA-PSS hash function.",oid:t.signatureParameters.hash.algorithmOid,name:p};h=n.pss.create(n.md[p].create(),d,t.signatureParameters.saltLength)}r=e.publicKey.verify(c.digest().getBytes(),t.signature,h)}return r},e.isIssuer=function(t){var r=!1,n=e.issuer,a=t.subject;if(n.hash&&a.hash)r=n.hash===a.hash;else if(n.attributes.length===a.attributes.length){var i,s;r=!0;for(var o=0;r&&o<n.attributes.length;++o)i=n.attributes[o],s=a.attributes[o],i.type===s.type&&i.value===s.value||(r=!1)}return r},e.issued=function(t){return t.isIssuer(e)},e.generateSubjectKeyIdentifier=function(){return i.getPublicKeyFingerprint(e.publicKey,{type:"RSAPublicKey"})},e.verifySubjectKeyIdentifier=function(){for(var t=s.subjectKeyIdentifier,r=0;r<e.extensions.length;++r){var a=e.extensions[r];if(a.id===t){var i=e.generateSubjectKeyIdentifier().getBytes();return n.util.hexToBytes(a.subjectKeyIdentifier)===i}}return!1},e},i.certificateFromAsn1=function(e,t){var r={},o=[];if(!a.validate(e,c,r,o))throw(h=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.")).errors=o,h;if(a.derToOid(r.publicKeyOid)!==i.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var u=i.createCertificate();u.version=r.certVersion?r.certVersion.charCodeAt(0):0;var l=n.util.createBuffer(r.certSerialNumber);u.serialNumber=l.toHex(),u.signatureOid=n.asn1.derToOid(r.certSignatureOid),u.signatureParameters=d(u.signatureOid,r.certSignatureParams,!0),u.siginfo.algorithmOid=n.asn1.derToOid(r.certinfoSignatureOid),u.siginfo.parameters=d(u.siginfo.algorithmOid,r.certinfoSignatureParams,!1),u.signature=r.certSignature;var f=[];if(void 0!==r.certValidity1UTCTime&&f.push(a.utcTimeToDate(r.certValidity1UTCTime)),void 0!==r.certValidity2GeneralizedTime&&f.push(a.generalizedTimeToDate(r.certValidity2GeneralizedTime)),void 0!==r.certValidity3UTCTime&&f.push(a.utcTimeToDate(r.certValidity3UTCTime)),void 0!==r.certValidity4GeneralizedTime&&f.push(a.generalizedTimeToDate(r.certValidity4GeneralizedTime)),f.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(f.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(u.validity.notBefore=f[0],u.validity.notAfter=f[1],u.tbsCertificate=r.tbsCertificate,t){var h;if(u.md=null,u.signatureOid in s)switch(s[u.signatureOid]){case"sha1WithRSAEncryption":u.md=n.md.sha1.create();break;case"md5WithRSAEncryption":u.md=n.md.md5.create();break;case"sha256WithRSAEncryption":u.md=n.md.sha256.create();break;case"sha384WithRSAEncryption":u.md=n.md.sha384.create();break;case"sha512WithRSAEncryption":u.md=n.md.sha512.create();break;case"RSASSA-PSS":u.md=n.md.sha256.create()}if(null===u.md)throw(h=new Error("Could not compute certificate digest. Unknown signature OID.")).signatureOid=u.signatureOid,h;var y=a.toDer(u.tbsCertificate);u.md.update(y.getBytes())}var m=n.md.sha1.create();u.issuer.getField=function(e){return p(u.issuer,e)},u.issuer.addField=function(e){g([e]),u.issuer.attributes.push(e)},u.issuer.attributes=i.RDNAttributesAsArray(r.certIssuer,m),r.certIssuerUniqueId&&(u.issuer.uniqueId=r.certIssuerUniqueId),u.issuer.hash=m.digest().toHex();var v=n.md.sha1.create();return u.subject.getField=function(e){return p(u.subject,e)},u.subject.addField=function(e){g([e]),u.subject.attributes.push(e)},u.subject.attributes=i.RDNAttributesAsArray(r.certSubject,v),r.certSubjectUniqueId&&(u.subject.uniqueId=r.certSubjectUniqueId),u.subject.hash=v.digest().toHex(),r.certExtensions?u.extensions=i.certificateExtensionsFromAsn1(r.certExtensions):u.extensions=[],u.publicKey=i.publicKeyFromAsn1(r.subjectPublicKeyInfo),u},i.certificateExtensionsFromAsn1=function(e){for(var t=[],r=0;r<e.value.length;++r)for(var n=e.value[r],a=0;a<n.value.length;++a)t.push(i.certificateExtensionFromAsn1(n.value[a]));return t},i.certificateExtensionFromAsn1=function(e){var t={};if(t.id=a.derToOid(e.value[0].value),t.critical=!1,e.value[1].type===a.Type.BOOLEAN?(t.critical=0!==e.value[1].value.charCodeAt(0),t.value=e.value[2].value):t.value=e.value[1].value,t.id in s)if(t.name=s[t.id],"keyUsage"===t.name){var r=0,i=0;(u=a.fromDer(t.value)).value.length>1&&(r=u.value.charCodeAt(1),i=u.value.length>2?u.value.charCodeAt(2):0),t.digitalSignature=128==(128&r),t.nonRepudiation=64==(64&r),t.keyEncipherment=32==(32&r),t.dataEncipherment=16==(16&r),t.keyAgreement=8==(8&r),t.keyCertSign=4==(4&r),t.cRLSign=2==(2&r),t.encipherOnly=1==(1&r),t.decipherOnly=128==(128&i)}else if("basicConstraints"===t.name){(u=a.fromDer(t.value)).value.length>0&&u.value[0].type===a.Type.BOOLEAN?t.cA=0!==u.value[0].value.charCodeAt(0):t.cA=!1;var o=null;u.value.length>0&&u.value[0].type===a.Type.INTEGER?o=u.value[0].value:u.value.length>1&&(o=u.value[1].value),null!==o&&(t.pathLenConstraint=a.derToInteger(o))}else if("extKeyUsage"===t.name)for(var u=a.fromDer(t.value),c=0;c<u.value.length;++c){var l=a.derToOid(u.value[c].value);l in s?t[s[l]]=!0:t[l]=!0}else if("nsCertType"===t.name){r=0;(u=a.fromDer(t.value)).value.length>1&&(r=u.value.charCodeAt(1)),t.client=128==(128&r),t.server=64==(64&r),t.email=32==(32&r),t.objsign=16==(16&r),t.reserved=8==(8&r),t.sslCA=4==(4&r),t.emailCA=2==(2&r),t.objCA=1==(1&r)}else if("subjectAltName"===t.name||"issuerAltName"===t.name){var f;t.altNames=[];u=a.fromDer(t.value);for(var h=0;h<u.value.length;++h){var p={type:(f=u.value[h]).type,value:f.value};switch(t.altNames.push(p),f.type){case 1:case 2:case 6:break;case 7:p.ip=n.util.bytesToIP(f.value);break;case 8:p.oid=a.derToOid(f.value)}}}else if("subjectKeyIdentifier"===t.name){u=a.fromDer(t.value);t.subjectKeyIdentifier=n.util.bytesToHex(u.value)}return t},i.certificationRequestFromAsn1=function(e,t){var r={},o=[];if(!a.validate(e,h,r,o))throw(c=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.")).errors=o,c;if(a.derToOid(r.publicKeyOid)!==i.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var u=i.createCertificationRequest();if(u.version=r.csrVersion?r.csrVersion.charCodeAt(0):0,u.signatureOid=n.asn1.derToOid(r.csrSignatureOid),u.signatureParameters=d(u.signatureOid,r.csrSignatureParams,!0),u.siginfo.algorithmOid=n.asn1.derToOid(r.csrSignatureOid),u.siginfo.parameters=d(u.siginfo.algorithmOid,r.csrSignatureParams,!1),u.signature=r.csrSignature,u.certificationRequestInfo=r.certificationRequestInfo,t){var c;if(u.md=null,u.signatureOid in s)switch(s[u.signatureOid]){case"sha1WithRSAEncryption":u.md=n.md.sha1.create();break;case"md5WithRSAEncryption":u.md=n.md.md5.create();break;case"sha256WithRSAEncryption":u.md=n.md.sha256.create();break;case"sha384WithRSAEncryption":u.md=n.md.sha384.create();break;case"sha512WithRSAEncryption":u.md=n.md.sha512.create();break;case"RSASSA-PSS":u.md=n.md.sha256.create()}if(null===u.md)throw(c=new Error("Could not compute certification request digest. Unknown signature OID.")).signatureOid=u.signatureOid,c;var l=a.toDer(u.certificationRequestInfo);u.md.update(l.getBytes())}var f=n.md.sha1.create();return u.subject.getField=function(e){return p(u.subject,e)},u.subject.addField=function(e){g([e]),u.subject.attributes.push(e)},u.subject.attributes=i.RDNAttributesAsArray(r.certificationRequestInfoSubject,f),u.subject.hash=f.digest().toHex(),u.publicKey=i.publicKeyFromAsn1(r.subjectPublicKeyInfo),u.getAttribute=function(e){return p(u,e)},u.addAttribute=function(e){g([e]),u.attributes.push(e)},u.attributes=i.CRIAttributesAsArray(r.certificationRequestInfoAttributes||[]),u},i.createCertificationRequest=function(){var e={version:0,signatureOid:null,signature:null,siginfo:{}};return e.siginfo.algorithmOid=null,e.subject={},e.subject.getField=function(t){return p(e.subject,t)},e.subject.addField=function(t){g([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.publicKey=null,e.attributes=[],e.getAttribute=function(t){return p(e,t)},e.addAttribute=function(t){g([t]),e.attributes.push(t)},e.md=null,e.setSubject=function(t){g(t),e.subject.attributes=t,e.subject.hash=null},e.setAttributes=function(t){g(t),e.attributes=t},e.sign=function(t,r){e.md=r||n.md.sha1.create();var o=s[e.md.algorithm+"WithRSAEncryption"];if(!o){var u=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw u.algorithm=e.md.algorithm,u}e.signatureOid=e.siginfo.algorithmOid=o,e.certificationRequestInfo=i.getCertificationRequestInfo(e);var c=a.toDer(e.certificationRequestInfo);e.md.update(c.getBytes()),e.signature=t.sign(e.md)},e.verify=function(){var t=!1,r=e.md;if(null===r){if(e.signatureOid in s)switch(s[e.signatureOid]){case"sha1WithRSAEncryption":r=n.md.sha1.create();break;case"md5WithRSAEncryption":r=n.md.md5.create();break;case"sha256WithRSAEncryption":r=n.md.sha256.create();break;case"sha384WithRSAEncryption":r=n.md.sha384.create();break;case"sha512WithRSAEncryption":r=n.md.sha512.create();break;case"RSASSA-PSS":r=n.md.sha256.create()}if(null===r)throw(h=new Error("Could not compute certification request digest. Unknown signature OID.")).signatureOid=e.signatureOid,h;var o=e.certificationRequestInfo||i.getCertificationRequestInfo(e),u=a.toDer(o);r.update(u.getBytes())}if(null!==r){var c;switch(e.signatureOid){case s.sha1WithRSAEncryption:break;case s["RSASSA-PSS"]:var l,f,h;if(void 0===(l=s[e.signatureParameters.mgf.hash.algorithmOid])||void 0===n.md[l])throw(h=new Error("Unsupported MGF hash function.")).oid=e.signatureParameters.mgf.hash.algorithmOid,h.name=l,h;if(void 0===(f=s[e.signatureParameters.mgf.algorithmOid])||void 0===n.mgf[f])throw(h=new Error("Unsupported MGF function.")).oid=e.signatureParameters.mgf.algorithmOid,h.name=f,h;if(f=n.mgf[f].create(n.md[l].create()),void 0===(l=s[e.signatureParameters.hash.algorithmOid])||void 0===n.md[l])throw(h=new Error("Unsupported RSASSA-PSS hash function.")).oid=e.signatureParameters.hash.algorithmOid,h.name=l,h;c=n.pss.create(n.md[l].create(),f,e.signatureParameters.saltLength)}t=e.publicKey.verify(r.digest().getBytes(),e.signature,c)}return t},e};var C=new Date("1950-01-01T00:00:00Z"),b=new Date("2050-01-01T00:00:00Z");function S(e){return e>=C&&e<b?a.create(a.Class.UNIVERSAL,a.Type.UTCTIME,!1,a.dateToUtcTime(e)):a.create(a.Class.UNIVERSAL,a.Type.GENERALIZEDTIME,!1,a.dateToGeneralizedTime(e))}i.getTBSCertificate=function(e){var t=S(e.validity.notBefore),r=S(e.validity.notAfter),s=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(e.version).getBytes())]),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,n.util.hexToBytes(e.serialNumber)),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(e.siginfo.algorithmOid).getBytes()),v(e.siginfo.algorithmOid,e.siginfo.parameters)]),y(e.issuer),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[t,r]),y(e.subject),i.publicKeyToAsn1(e.publicKey)]);return e.issuer.uniqueId&&s.value.push(a.create(a.Class.CONTEXT_SPECIFIC,1,!0,[a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,String.fromCharCode(0)+e.issuer.uniqueId)])),e.subject.uniqueId&&s.value.push(a.create(a.Class.CONTEXT_SPECIFIC,2,!0,[a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,String.fromCharCode(0)+e.subject.uniqueId)])),e.extensions.length>0&&s.value.push(i.certificateExtensionsToAsn1(e.extensions)),s},i.getCertificationRequestInfo=function(e){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(e.version).getBytes()),y(e.subject),i.publicKeyToAsn1(e.publicKey),E(e)])},i.distinguishedNameToAsn1=function(e){return y(e)},i.certificateToAsn1=function(e){var t=e.tbsCertificate||i.getTBSCertificate(e);return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[t,a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(e.signatureOid).getBytes()),v(e.signatureOid,e.signatureParameters)]),a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},i.certificateExtensionsToAsn1=function(e){var t=a.create(a.Class.CONTEXT_SPECIFIC,3,!0,[]),r=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]);t.value.push(r);for(var n=0;n<e.length;++n)r.value.push(i.certificateExtensionToAsn1(e[n]));return t},i.certificateExtensionToAsn1=function(e){var t=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]);t.value.push(a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(e.id).getBytes())),e.critical&&t.value.push(a.create(a.Class.UNIVERSAL,a.Type.BOOLEAN,!1,String.fromCharCode(255)));var r=e.value;return"string"!=typeof e.value&&(r=a.toDer(r).getBytes()),t.value.push(a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,r)),t},i.certificationRequestToAsn1=function(e){var t=e.certificationRequestInfo||i.getCertificationRequestInfo(e);return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[t,a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(e.signatureOid).getBytes()),v(e.signatureOid,e.signatureParameters)]),a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},i.createCaStore=function(e){var t={certs:{}};function r(e){return s(e),t.certs[e.hash]||null}function s(e){if(!e.hash){var t=n.md.sha1.create();e.attributes=i.RDNAttributesAsArray(y(e),t),e.hash=t.digest().toHex()}}if(t.getIssuer=function(e){return r(e.issuer)},t.addCertificate=function(e){if("string"==typeof e&&(e=n.pki.certificateFromPem(e)),s(e.subject),!t.hasCertificate(e))if(e.subject.hash in t.certs){var r=t.certs[e.subject.hash];n.util.isArray(r)||(r=[r]),r.push(e),t.certs[e.subject.hash]=r}else t.certs[e.subject.hash]=e},t.hasCertificate=function(e){"string"==typeof e&&(e=n.pki.certificateFromPem(e));var t=r(e.subject);if(!t)return!1;n.util.isArray(t)||(t=[t]);for(var s=a.toDer(i.certificateToAsn1(e)).getBytes(),o=0;o<t.length;++o){if(s===a.toDer(i.certificateToAsn1(t[o])).getBytes())return!0}return!1},t.listAllCertificates=function(){var e=[];for(var r in t.certs)if(t.certs.hasOwnProperty(r)){var a=t.certs[r];if(n.util.isArray(a))for(var i=0;i<a.length;++i)e.push(a[i]);else e.push(a)}return e},t.removeCertificate=function(e){var o;if("string"==typeof e&&(e=n.pki.certificateFromPem(e)),s(e.subject),!t.hasCertificate(e))return null;var u=r(e.subject);if(!n.util.isArray(u))return o=t.certs[e.subject.hash],delete t.certs[e.subject.hash],o;for(var c=a.toDer(i.certificateToAsn1(e)).getBytes(),l=0;l<u.length;++l){c===a.toDer(i.certificateToAsn1(u[l])).getBytes()&&(o=u[l],u.splice(l,1))}return 0===u.length&&delete t.certs[e.subject.hash],o},e)for(var o=0;o<e.length;++o){var u=e[o];t.addCertificate(u)}return t},i.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"},i.verifyCertificateChain=function(e,t,r){"function"==typeof r&&(r={verify:r}),r=r||{};var a=(t=t.slice(0)).slice(0),s=r.validityCheckDate;void 0===s&&(s=new Date);var o=!0,u=null,c=0;do{var l=t.shift(),f=null,h=!1;if(s&&(s<l.validity.notBefore||s>l.validity.notAfter)&&(u={message:"Certificate is not valid yet or has expired.",error:i.certificateError.certificate_expired,notBefore:l.validity.notBefore,notAfter:l.validity.notAfter,now:s}),null===u){if(null===(f=t[0]||e.getIssuer(l))&&l.isIssuer(l)&&(h=!0,f=l),f){var p=f;n.util.isArray(p)||(p=[p]);for(var d=!1;!d&&p.length>0;){f=p.shift();try{d=f.verify(l)}catch(e){}}d||(u={message:"Certificate signature is invalid.",error:i.certificateError.bad_certificate})}null!==u||f&&!h||e.hasCertificate(l)||(u={message:"Certificate is not trusted.",error:i.certificateError.unknown_ca})}if(null===u&&f&&!l.isIssuer(f)&&(u={message:"Certificate issuer is invalid.",error:i.certificateError.bad_certificate}),null===u)for(var y={keyUsage:!0,basicConstraints:!0},g=0;null===u&&g<l.extensions.length;++g){var m=l.extensions[g];!m.critical||m.name in y||(u={message:"Certificate has an unsupported critical extension.",error:i.certificateError.unsupported_certificate})}if(null===u&&(!o||0===t.length&&(!f||h))){var v=l.getExtension("basicConstraints"),E=l.getExtension("keyUsage");if(null!==E&&(E.keyCertSign&&null!==v||(u={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:i.certificateError.bad_certificate})),null!==u||null===v||v.cA||(u={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:i.certificateError.bad_certificate}),null===u&&null!==E&&"pathLenConstraint"in v)c-1>v.pathLenConstraint&&(u={message:"Certificate basicConstraints pathLenConstraint violated.",error:i.certificateError.bad_certificate})}var C=null===u||u.error,b=r.verify?r.verify(C,c,a):C;if(!0!==b)throw!0===C&&(u={message:"The application rejected the certificate.",error:i.certificateError.bad_certificate}),(b||0===b)&&("object"!=typeof b||n.util.isArray(b)?"string"==typeof b&&(u.error=b):(b.message&&(u.message=b.message),b.error&&(u.error=b.error))),u;u=null,o=!1,++c}while(t.length>0);return!0}},function(e,t,r){var n=r(0);r(5),r(1),(e.exports=n.pss=n.pss||{}).create=function(e){3===arguments.length&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t,r=e.md,a=e.mgf,i=r.digestLength,s=e.salt||null;if("string"==typeof s&&(s=n.util.createBuffer(s)),"saltLength"in e)t=e.saltLength;else{if(null===s)throw new Error("Salt length not specified or specific salt not given.");t=s.length()}if(null!==s&&s.length()!==t)throw new Error("Given salt length does not match length of given salt.");var o=e.prng||n.random,u={encode:function(e,u){var c,l,f=u-1,h=Math.ceil(f/8),p=e.digest().getBytes();if(h<i+t+2)throw new Error("Message is too long to encrypt.");l=null===s?o.getBytesSync(t):s.bytes();var d=new n.util.ByteBuffer;d.fillWithByte(0,8),d.putBytes(p),d.putBytes(l),r.start(),r.update(d.getBytes());var y=r.digest().getBytes(),g=new n.util.ByteBuffer;g.fillWithByte(0,h-t-i-2),g.putByte(1),g.putBytes(l);var m=g.getBytes(),v=h-i-1,E=a.generate(y,v),C="";for(c=0;c<v;c++)C+=String.fromCharCode(m.charCodeAt(c)^E.charCodeAt(c));var b=65280>>8*h-f&255;return(C=String.fromCharCode(C.charCodeAt(0)&~b)+C.substr(1))+y+String.fromCharCode(188)},verify:function(e,s,o){var u,c=o-1,l=Math.ceil(c/8);if(s=s.substr(-l),l<i+t+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(188!==s.charCodeAt(l-1))throw new Error("Encoded message does not end in 0xBC.");var f=l-i-1,h=s.substr(0,f),p=s.substr(f,i),d=65280>>8*l-c&255;if(0!=(h.charCodeAt(0)&d))throw new Error("Bits beyond keysize not zero as expected.");var y=a.generate(p,f),g="";for(u=0;u<f;u++)g+=String.fromCharCode(h.charCodeAt(u)^y.charCodeAt(u));g=String.fromCharCode(g.charCodeAt(0)&~d)+g.substr(1);var m=l-i-t-2;for(u=0;u<m;u++)if(0!==g.charCodeAt(u))throw new Error("Leftmost octets not zero as expected");if(1!==g.charCodeAt(m))throw new Error("Inconsistent PSS signature, 0x01 marker not found");var v=g.substr(-t),E=new n.util.ByteBuffer;return E.fillWithByte(0,8),E.putBytes(e),E.putBytes(v),r.start(),r.update(E.getBytes()),p===r.digest().getBytes()}};return u}},function(e,t,r){var n=r(0);r(2),r(1);var a=e.exports=n.md5=n.md5||{};n.md.md5=n.md.algorithms.md5=a,a.create=function(){c||function(){i=String.fromCharCode(128),i+=n.util.fillString(String.fromCharCode(0),64),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],o=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],u=new Array(64);for(var e=0;e<64;++e)u[e]=Math.floor(4294967296*Math.abs(Math.sin(e+1)));c=!0}();var e=null,t=n.util.createBuffer(),r=new Array(16),a={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){a.messageLength=0,a.fullMessageLength=a.messageLength64=[];for(var r=a.messageLengthSize/4,i=0;i<r;++i)a.fullMessageLength.push(0);return t=n.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},a}};return a.start(),a.update=function(i,s){"utf8"===s&&(i=n.util.encodeUtf8(i));var o=i.length;a.messageLength+=o,o=[o/4294967296>>>0,o>>>0];for(var u=a.fullMessageLength.length-1;u>=0;--u)a.fullMessageLength[u]+=o[1],o[1]=o[0]+(a.fullMessageLength[u]/4294967296>>>0),a.fullMessageLength[u]=a.fullMessageLength[u]>>>0,o[0]=o[1]/4294967296>>>0;return t.putBytes(i),l(e,r,t),(t.read>2048||0===t.length())&&t.compact(),a},a.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var o=a.fullMessageLength[a.fullMessageLength.length-1]+a.messageLengthSize&a.blockLength-1;s.putBytes(i.substr(0,a.blockLength-o));for(var u,c=0,f=a.fullMessageLength.length-1;f>=0;--f)c=(u=8*a.fullMessageLength[f]+c)/4294967296>>>0,s.putInt32Le(u>>>0);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3};l(h,r,s);var p=n.util.createBuffer();return p.putInt32Le(h.h0),p.putInt32Le(h.h1),p.putInt32Le(h.h2),p.putInt32Le(h.h3),p},a};var i=null,s=null,o=null,u=null,c=!1;function l(e,t,r){for(var n,a,i,c,l,f,h,p=r.length();p>=64;){for(a=e.h0,i=e.h1,c=e.h2,l=e.h3,h=0;h<16;++h)t[h]=r.getInt32Le(),n=a+(l^i&(c^l))+u[h]+t[h],a=l,l=c,c=i,i+=n<<(f=o[h])|n>>>32-f;for(;h<32;++h)n=a+(c^l&(i^c))+u[h]+t[s[h]],a=l,l=c,c=i,i+=n<<(f=o[h])|n>>>32-f;for(;h<48;++h)n=a+(i^c^l)+u[h]+t[s[h]],a=l,l=c,c=i,i+=n<<(f=o[h])|n>>>32-f;for(;h<64;++h)n=a+(c^(i|~l))+u[h]+t[s[h]],a=l,l=c,c=i,i+=n<<(f=o[h])|n>>>32-f;e.h0=e.h0+a|0,e.h1=e.h1+i|0,e.h2=e.h2+c|0,e.h3=e.h3+l|0,p-=64}}},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0});var a=r(25),i=r(28);t.seedWordsList=i.seedWordsList;var s=r(31);t.ChaidId=s.ChaidId;var o=r(30);t.Seed=o.Seed;var u=r(23);t.isPrivateKey=u.isPrivateKey,t.isPublicKey=u.isPublicKey;var c=r(25);t.crypto=c.crypto,function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r(12)),t.signBytes=(n=a.crypto({output:"Base58"})).signBytes,t.keyPair=n.keyPair,t.publicKey=n.publicKey,t.privateKey=n.privateKey,t.address=n.address,t.buildAddress=n.buildAddress,t.blake2b=n.blake2b,t.keccak=n.keccak,t.sha256=n.sha256,t.sharedKey=n.sharedKey,t.seedWithNonce=n.seedWithNonce,t.base64Encode=n.base64Encode,t.base64Decode=n.base64Decode,t.base58Encode=n.base58Encode,t.base58Decode=n.base58Decode,t.base16Encode=n.base16Encode,t.base16Decode=n.base16Decode,t.stringToBytes=n.stringToBytes,t.bytesToString=n.bytesToString,t.random=n.random,t.randomSeed=n.randomSeed,t.randomBytes=n.randomBytes,t.verifySignature=n.verifySignature,t.verifyPublicKey=n.verifyPublicKey,t.verifyAddress=n.verifyAddress,t.messageDecrypt=n.messageDecrypt,t.messageEncrypt=n.messageEncrypt,t.aesDecrypt=n.aesDecrypt,t.aesEncrypt=n.aesEncrypt,t.encryptSeed=n.encryptSeed,t.decryptSeed=n.decryptSeed,t.rsaKeyPair=n.rsaKeyPair,t.rsaKeyPairSync=n.rsaKeyPairSync,t.rsaSign=n.rsaSign,t.rsaVerify=n.rsaVerify,t.merkleVerify=n.merkleVerify,t.split=n.split,t.concat=n.concat},function(e,t,r){"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){for(var t,r=c(e),n=r[0],s=r[1],o=new i(function(e,t,r){return 3*(t+r)/4-r}(0,n,s)),u=0,l=s>0?n-4:n,f=0;f<l;f+=4)t=a[e.charCodeAt(f)]<<18|a[e.charCodeAt(f+1)]<<12|a[e.charCodeAt(f+2)]<<6|a[e.charCodeAt(f+3)],o[u++]=t>>16&255,o[u++]=t>>8&255,o[u++]=255&t;2===s&&(t=a[e.charCodeAt(f)]<<2|a[e.charCodeAt(f+1)]>>4,o[u++]=255&t);1===s&&(t=a[e.charCodeAt(f)]<<10|a[e.charCodeAt(f+1)]<<4|a[e.charCodeAt(f+2)]>>2,o[u++]=t>>8&255,o[u++]=255&t);return o},t.fromByteArray=function(e){for(var t,r=e.length,a=r%3,i=[],s=0,o=r-a;s<o;s+=16383)i.push(l(e,s,s+16383>o?o:s+16383));1===a?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===a&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],a=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,u=s.length;o<u;++o)n[o]=s[o],a[s.charCodeAt(o)]=o;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,r){for(var a,i,s=[],o=t;o<r;o+=3)a=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),s.push(n[(i=a)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return s.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,n,a){var i,s,o=8*a-n-1,u=(1<<o)-1,c=u>>1,l=-7,f=r?a-1:0,h=r?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=o;l>0;i=256*i+e[t+f],f+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),i-=c}return(p?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,a,i){var s,o,u,c=8*i-a-1,l=(1<<c)-1,f=l>>1,h=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(o=0,s=l):s+f>=1?(o=(t*u-1)*Math.pow(2,a),s+=f):(o=t*Math.pow(2,f-1)*Math.pow(2,a),s=0));a>=8;e[r+p]=255&o,p+=d,o/=256,a-=8);for(s=s<<a|o,c+=a;c>0;e[r+p]=255&s,p+=d,s/=256,c-=8);e[r+p-d]|=128*y}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,a=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(a.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new i(a.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r(45),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(10))},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,a,i,s,o,u=1,c={},l=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick(function(){d(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){d(e.data)},n=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(a=f.documentElement,n=function(e){var t=f.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):n=function(e){setTimeout(d,0,e)}:(s="setImmediate$"+Math.random()+"$",o=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&d(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",o,!1):e.attachEvent("onmessage",o),n=function(t){e.postMessage(s+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var a={callback:e,args:t};return c[u]=a,n(u),u++},h.clearImmediate=p}function p(e){delete c[e]}function d(e){if(l)setTimeout(d,0,e);else{var t=c[e];if(t){l=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(r,n)}}(t)}finally{p(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,r(10),r(14))},function(e,t,r){(function(t){var r={};e.exports=r;var n={};r.encode=function(e,t,r){if("string"!=typeof t)throw new TypeError('"alphabet" must be a string.');if(void 0!==r&&"number"!=typeof r)throw new TypeError('"maxline" must be a number.');var n="";if(e instanceof Uint8Array){var a=0,i=t.length,s=t.charAt(0),o=[0];for(a=0;a<e.length;++a){for(var u=0,c=e[a];u<o.length;++u)c+=o[u]<<8,o[u]=c%i,c=c/i|0;for(;c>0;)o.push(c%i),c=c/i|0}for(a=0;0===e[a]&&a<e.length-1;++a)n+=s;for(a=o.length-1;a>=0;--a)n+=t[o[a]]}else n=function(e,t){var r=0,n=t.length,a=t.charAt(0),i=[0];for(r=0;r<e.length();++r){for(var s=0,o=e.at(r);s<i.length;++s)o+=i[s]<<8,i[s]=o%n,o=o/n|0;for(;o>0;)i.push(o%n),o=o/n|0}var u="";for(r=0;0===e.at(r)&&r<e.length()-1;++r)u+=a;for(r=i.length-1;r>=0;--r)u+=t[i[r]];return u}(e,t);if(r){var l=new RegExp(".{1,"+r+"}","g");n=n.match(l).join("\r\n")}return n},r.decode=function(e,r){if("string"!=typeof e)throw new TypeError('"input" must be a string.');if("string"!=typeof r)throw new TypeError('"alphabet" must be a string.');var a=n[r];if(!a){a=n[r]=[];for(var i=0;i<r.length;++i)a[r.charCodeAt(i)]=i}e=e.replace(/\s/g,"");var s=r.length,o=r.charAt(0),u=[0];for(i=0;i<e.length;i++){var c=a[e.charCodeAt(i)];if(void 0===c)return;for(var l=0,f=c;l<u.length;++l)f+=u[l]*s,u[l]=255&f,f>>=8;for(;f>0;)u.push(255&f),f>>=8}for(var h=0;e[h]===o&&h<e.length-1;++h)u.push(0);return void 0!==t?t.from(u.reverse()):new Uint8Array(u.reverse())}}).call(this,r(9).Buffer)},function(e,t,r){(function(t){var n=r(0);r(1);var a=null;!n.util.isNodejs||n.options.usePureJavaScript||t.versions["node-webkit"]||(a=r(20)),(e.exports=n.prng=n.prng||{}).create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=e.md,i=new Array(32),s=0;s<32;++s)i[s]=r.create();function o(){if(t.pools[0].messageLength>=32)return u();var e=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(e)),u()}function u(){t.reseeds=4294967295===t.reseeds?0:t.reseeds+1;var e=t.plugin.md.create();e.update(t.keyBytes);for(var r=1,n=0;n<32;++n)t.reseeds%r==0&&(e.update(t.pools[n].digest().getBytes()),t.pools[n].start()),r<<=1;t.keyBytes=e.digest().getBytes(),e.start(),e.update(t.keyBytes);var a=e.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(a),t.generated=0}function c(e){var t=null,r=n.util.globalScope,a=r.crypto||r.msCrypto;a&&a.getRandomValues&&(t=function(e){return a.getRandomValues(e)});var i=n.util.createBuffer();if(t)for(;i.length()<e;){var s=Math.max(1,Math.min(e-i.length(),65536)/4),o=new Uint32Array(Math.floor(s));try{t(o);for(var u=0;u<o.length;++u)i.putInt32(o[u])}catch(e){if(!("undefined"!=typeof QuotaExceededError&&e instanceof QuotaExceededError))throw e}}if(i.length()<e)for(var c,l,f,h=Math.floor(65536*Math.random());i.length()<e;){l=16807*(65535&h),l+=(32767&(c=16807*(h>>16)))<<16,h=4294967295&(l=(2147483647&(l+=c>>15))+(l>>31));for(u=0;u<3;++u)f=h>>>(u<<3),f^=Math.floor(256*Math.random()),i.putByte(String.fromCharCode(255&f))}return i.getBytes(e)}return t.pools=i,t.pool=0,t.generate=function(e,r){if(!r)return t.generateSync(e);var a=t.plugin.cipher,i=t.plugin.increment,s=t.plugin.formatKey,o=t.plugin.formatSeed,c=n.util.createBuffer();t.key=null,function l(f){if(f)return r(f);if(c.length()>=e)return r(null,c.getBytes(e));t.generated>1048575&&(t.key=null);if(null===t.key)return n.util.nextTick(function(){!function(e){if(t.pools[0].messageLength>=32)return u(),e();var r=32-t.pools[0].messageLength<<5;t.seedFile(r,function(r,n){if(r)return e(r);t.collect(n),u(),e()})}(l)});var h=a(t.key,t.seed);t.generated+=h.length;c.putBytes(h);t.key=s(a(t.key,i(t.seed)));t.seed=o(a(t.key,t.seed));n.util.setImmediate(l)}()},t.generateSync=function(e){var r=t.plugin.cipher,a=t.plugin.increment,i=t.plugin.formatKey,s=t.plugin.formatSeed;t.key=null;for(var u=n.util.createBuffer();u.length()<e;){t.generated>1048575&&(t.key=null),null===t.key&&o();var c=r(t.key,t.seed);t.generated+=c.length,u.putBytes(c),t.key=i(r(t.key,a(t.seed))),t.seed=s(r(t.key,t.seed))}return u.getBytes(e)},a?(t.seedFile=function(e,t){a.randomBytes(e,function(e,r){if(e)return t(e);t(null,r.toString())})},t.seedFileSync=function(e){return a.randomBytes(e).toString()}):(t.seedFile=function(e,t){try{t(null,c(e))}catch(e){t(e)}},t.seedFileSync=c),t.collect=function(e){for(var r=e.length,n=0;n<r;++n)t.pools[t.pool].update(e.substr(n,1)),t.pool=31===t.pool?0:t.pool+1},t.collectInt=function(e,r){for(var n="",a=0;a<r;a+=8)n+=String.fromCharCode(e>>a&255);t.collect(n)},t.registerWorker=function(e){if(e===self)t.seedFile=function(e,t){self.addEventListener("message",function e(r){var n=r.data;n.forge&&n.forge.prng&&(self.removeEventListener("message",e),t(n.forge.prng.err,n.forge.prng.bytes))}),self.postMessage({forge:{prng:{needed:e}}})};else{e.addEventListener("message",function(r){var n=r.data;n.forge&&n.forge.prng&&t.seedFile(n.forge.prng.needed,function(t,r){e.postMessage({forge:{prng:{err:t,bytes:r}}})})})}},t}}).call(this,r(14))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",a=n.split("").reduce(function(e,t,r){return e[t]=r,e},{});t.default={encode:function(e){if(!e.length)return"";for(var t=[0],r=0;r<e.length;r++){for(var a=0;a<t.length;a++)t[a]<<=8;t[0]+=e[r];for(var i=0,s=0;s<t.length;s++)t[s]+=i,i=t[s]/58|0,t[s]%=58;for(;i;)t.push(i%58),i=i/58|0}for(r=0;0===e[r]&&r<e.length-1;r++)t.push(0);return t.reverse().map(function(e){return n[e]}).join("")},decode:function(e){if(!e.length)return new Uint8Array(0);for(var t=[0],r=0;r<e.length;r++){var n=e[r];if(!(n in a))throw'There is no character "'+n+'" in the Base58 sequence!';for(var i=0;i<t.length;i++)t[i]*=58;t[0]+=a[n];var s=0;for(i=0;i<t.length;i++)t[i]+=s,s=t[i]>>8,t[i]&=255;for(;s;)t.push(255&s),s>>=8}for(r=0;"1"===e[r]&&r<e.length-1;r++)t.push(0);return new Uint8Array(t.reverse())}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,a,i;t.utf8ArrayToStr=(n=new Array(128),a=String.fromCodePoint||String.fromCharCode,i=[],function(e){var t,r,s=e.length;i.length=0;for(var o=0;o<s;)(r=e[o++])<=127?t=r:r<=223?t=(31&r)<<6|63&e[o++]:r<=239?t=(15&r)<<12|(63&e[o++])<<6|63&e[o++]:String.fromCodePoint?t=(7&r)<<18|(63&e[o++])<<12|(63&e[o++])<<6|63&e[o++]:(t=63,o+=3),i.push(n[t]||(n[t]=a(t)));return i.join("")}),t.strToUtf8Array=function(e){for(var t=[],r=0;r<e.length;r++){var n=e.charCodeAt(r);n<128?t.push(n):n<2048?t.push(192|n>>6,128|63&n):n<55296||n>=57344?t.push(224|n>>12,128|n>>6&63,128|63&n):(r++,n=65536+((1023&n)<<10|1023&e.charCodeAt(r)),t.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return Uint8Array.from(t)}},function(e,t,r){"use strict";
|
9
|
+
/**
|
10
|
+
* [js-sha3]{@link https://github.com/emn178/js-sha3}
|
11
|
+
*
|
12
|
+
* @version 0.5.7
|
13
|
+
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
14
|
+
* @copyright Chen, Yi-Cyuan 2015-2016
|
15
|
+
* @license MIT
|
16
|
+
*/t.__esModule=!0;for(var n="0123456789abcdef".split(""),a=[0,8,16,24],i=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],s=[224,256,384,512],o=["hex","buffer","arrayBuffer","array"],u=function(e,t,r){return function(n){return new E(e,t,e).update(n)[r]()}},c=function(e,t,r){return function(n,a){return new E(e,t,a).update(n)[r]()}},l=function(e,t){var r=u(e,t,"hex");r.create=function(){return new E(e,t,e)},r.update=function(e){return r.create().update(e)};for(var n=0;n<o.length;++n){var a=o[n];r[a]=u(e,t,a)}return r},f=[{name:"keccak",padding:[1,256,65536,16777216],bits:s,createMethod:l},{name:"sha3",padding:[6,1536,393216,100663296],bits:s,createMethod:l},{name:"shake",padding:[31,7936,2031616,520093696],bits:[128,256],createMethod:function(e,t){var r=c(e,t,"hex");r.create=function(r){return new E(e,t,r)},r.update=function(e,t){return r.create(t).update(e)};for(var n=0;n<o.length;++n){var a=o[n];r[a]=c(e,t,a)}return r}}],h={},p=[],d=0;d<f.length;++d)for(var y=f[d],g=y.bits,m=0;m<g.length;++m){var v=y.name+"_"+g[m];p.push(v),h[v]=y.createMethod(g[m],y.padding)}function E(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}E.prototype.update=function(e){var t="string"!=typeof e;t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e));for(var r,n,i=e.length,s=this.blocks,o=this.byteCount,u=this.blockCount,c=0,l=this.s;c<i;){if(this.reset)for(this.reset=!1,s[0]=this.block,r=1;r<u+1;++r)s[r]=0;if(t)for(r=this.start;c<i&&r<o;++c)s[r>>2]|=e[c]<<a[3&r++];else for(r=this.start;c<i&&r<o;++c)(n=e.charCodeAt(c))<128?s[r>>2]|=n<<a[3&r++]:n<2048?(s[r>>2]|=(192|n>>6)<<a[3&r++],s[r>>2]|=(128|63&n)<<a[3&r++]):n<55296||n>=57344?(s[r>>2]|=(224|n>>12)<<a[3&r++],s[r>>2]|=(128|n>>6&63)<<a[3&r++],s[r>>2]|=(128|63&n)<<a[3&r++]):(n=65536+((1023&n)<<10|1023&e.charCodeAt(++c)),s[r>>2]|=(240|n>>18)<<a[3&r++],s[r>>2]|=(128|n>>12&63)<<a[3&r++],s[r>>2]|=(128|n>>6&63)<<a[3&r++],s[r>>2]|=(128|63&n)<<a[3&r++]);if(this.lastByteIndex=r,r>=o){for(this.start=r-o,this.block=s[u],r=0;r<u;++r)l[r]^=s[r];C(l),this.reset=!0}else this.start=r}return this},E.prototype.finalize=function(){var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];C(n)},E.prototype.toString=E.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,a=this.outputBlocks,i=this.extraBytes,s=0,o=0,u="";o<a;){for(s=0;s<t&&o<a;++s,++o)e=r[s],u+=n[e>>4&15]+n[15&e]+n[e>>12&15]+n[e>>8&15]+n[e>>20&15]+n[e>>16&15]+n[e>>28&15]+n[e>>24&15];o%t==0&&(C(r),s=0)}return i&&(e=r[s],i>0&&(u+=n[e>>4&15]+n[15&e]),i>1&&(u+=n[e>>12&15]+n[e>>8&15]),i>2&&(u+=n[e>>20&15]+n[e>>16&15])),u},E.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,a=this.extraBytes,i=0,s=0,o=this.outputBits>>3;e=a?new ArrayBuffer(n+1<<2):new ArrayBuffer(o);for(var u=new Uint32Array(e);s<n;){for(i=0;i<t&&s<n;++i,++s)u[s]=r[i];s%t==0&&C(r)}return a&&(u[i]=r[i],e=e.slice(0,o)),e},E.prototype.buffer=E.prototype.arrayBuffer,E.prototype.digest=E.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,a=this.outputBlocks,i=this.extraBytes,s=0,o=0,u=[];o<a;){for(s=0;s<r&&o<a;++s,++o)e=o<<2,t=n[s],u[e]=255&t,u[e+1]=t>>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;o%r==0&&C(n)}return i&&(e=o<<2,t=n[s],i>0&&(u[e]=255&t),i>1&&(u[e+1]=t>>8&255),i>2&&(u[e+2]=t>>16&255)),u};var C=function(e){var t,r,n,a,s,o,u,c,l,f,h,p,d,y,g,m,v,E,C,b,S,T,I,A,w,B,N,R,k,U,_,L,P,D,O,V,x,K,M,j,F,z,q,G,Q,H,W,Y,X,Z,J,$,ee,te,re,ne,ae,ie,se,oe,ue,ce,le;for(n=0;n<48;n+=2)a=e[0]^e[10]^e[20]^e[30]^e[40],s=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],h=e[7]^e[17]^e[27]^e[37]^e[47],t=(p=e[8]^e[18]^e[28]^e[38]^e[48])^(o<<1|u>>>31),r=(d=e[9]^e[19]^e[29]^e[39]^e[49])^(u<<1|o>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=a^(c<<1|l>>>31),r=s^(l<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=o^(f<<1|h>>>31),r=u^(h<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(p<<1|d>>>31),r=l^(d<<1|p>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(a<<1|s>>>31),r=h^(s<<1|a>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,y=e[0],g=e[1],H=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,R=e[20]<<3|e[21]>>>29,k=e[21]<<3|e[20]>>>29,oe=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,z=e[40]<<18|e[41]>>>14,q=e[41]<<18|e[40]>>>14,D=e[2]<<1|e[3]>>>31,O=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Y=e[22]<<10|e[23]>>>22,X=e[23]<<10|e[22]>>>22,U=e[33]<<13|e[32]>>>19,_=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,V=e[14]<<6|e[15]>>>26,x=e[15]<<6|e[14]>>>26,E=e[25]<<11|e[24]>>>21,C=e[24]<<11|e[25]>>>21,Z=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,L=e[45]<<29|e[44]>>>3,P=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,w=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ae=e[16]<<23|e[17]>>>9,K=e[26]<<25|e[27]>>>7,M=e[27]<<25|e[26]>>>7,b=e[36]<<21|e[37]>>>11,S=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,Q=e[9]<<27|e[8]>>>5,B=e[18]<<20|e[19]>>>12,N=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,j=e[38]<<8|e[39]>>>24,F=e[39]<<8|e[38]>>>24,T=e[48]<<14|e[49]>>>18,I=e[49]<<14|e[48]>>>18,e[0]=y^~m&E,e[1]=g^~v&C,e[10]=A^~B&R,e[11]=w^~N&k,e[20]=D^~V&K,e[21]=O^~x&M,e[30]=G^~H&Y,e[31]=Q^~W&X,e[40]=te^~ne&ie,e[41]=re^~ae&se,e[2]=m^~E&b,e[3]=v^~C&S,e[12]=B^~R&U,e[13]=N^~k&_,e[22]=V^~K&j,e[23]=x^~M&F,e[32]=H^~Y&Z,e[33]=W^~X&J,e[42]=ne^~ie&oe,e[43]=ae^~se&ue,e[4]=E^~b&T,e[5]=C^~S&I,e[14]=R^~U&L,e[15]=k^~_&P,e[24]=K^~j&z,e[25]=M^~F&q,e[34]=Y^~Z&$,e[35]=X^~J&ee,e[44]=ie^~oe&ce,e[45]=se^~ue&le,e[6]=b^~T&y,e[7]=S^~I&g,e[16]=U^~L&A,e[17]=_^~P&w,e[26]=j^~z&D,e[27]=F^~q&O,e[36]=Z^~$&G,e[37]=J^~ee&Q,e[46]=oe^~ce&te,e[47]=ue^~le&re,e[8]=T^~y&m,e[9]=I^~g&v,e[18]=L^~A&B,e[19]=P^~w&N,e[28]=z^~D&V,e[29]=q^~O&x,e[38]=$^~G&H,e[39]=ee^~Q&W,e[48]=ce^~te&ne,e[49]=le^~re&ae,e[0]^=i[n],e[1]^=i[n+1]};t.keccak256=h.keccak_256},function(e,t,r){"use strict";(function(e){t.__esModule=!0;var r="Input must be an string, Buffer or Uint8Array";function n(e,t,r){var n=e[t]+e[r],a=e[t+1]+e[r+1];n>=4294967296&&a++,e[t]=n,e[t+1]=a}function a(e,t,r,n){var a=e[t]+r;r<0&&(a+=4294967296);var i=e[t+1]+n;a>=4294967296&&i++,e[t]=a,e[t+1]=i}function i(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function s(e,t,r,i,s,o){var u=l[s],f=l[s+1],h=l[o],p=l[o+1];n(c,e,t),a(c,e,u,f);var d=c[i]^c[e],y=c[i+1]^c[e+1];c[i]=y,c[i+1]=d,n(c,r,i),d=c[t]^c[r],y=c[t+1]^c[r+1],c[t]=d>>>24^y<<8,c[t+1]=y>>>24^d<<8,n(c,e,t),a(c,e,h,p),d=c[i]^c[e],y=c[i+1]^c[e+1],c[i]=d>>>16^y<<16,c[i+1]=y>>>16^d<<16,n(c,r,i),d=c[t]^c[r],y=c[t+1]^c[r+1],c[t]=y>>>31^d<<1,c[t+1]=d>>>31^y<<1}var o=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),u=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map(function(e){return 2*e})),c=new Uint32Array(32),l=new Uint32Array(32);function f(e,t){var r=0;for(r=0;r<16;r++)c[r]=e.h[r],c[r+16]=o[r];for(c[24]=c[24]^e.t,c[25]=c[25]^e.t/4294967296,t&&(c[28]=~c[28],c[29]=~c[29]),r=0;r<32;r++)l[r]=i(e.b,4*r);for(r=0;r<12;r++)s(0,8,16,24,u[16*r+0],u[16*r+1]),s(2,10,18,26,u[16*r+2],u[16*r+3]),s(4,12,20,28,u[16*r+4],u[16*r+5]),s(6,14,22,30,u[16*r+6],u[16*r+7]),s(0,10,20,30,u[16*r+8],u[16*r+9]),s(2,12,22,24,u[16*r+10],u[16*r+11]),s(4,14,16,26,u[16*r+12],u[16*r+13]),s(6,8,18,28,u[16*r+14],u[16*r+15]);for(r=0;r<16;r++)e.h[r]=e.h[r]^c[r]^c[r+16]}function h(e,t){if(0===e||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(t&&t.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");for(var r={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e},n=0;n<16;n++)r.h[n]=o[n];var a=t?t.length:0;return r.h[0]^=16842752^a<<8^e,t&&(p(r,t),r.c=128),r}function p(e,t){for(var r=0;r<t.length;r++)128===e.c&&(e.t+=e.c,f(e,!1),e.c=0),e.b[e.c++]=t[r]}function d(e){for(e.t+=e.c;e.c<128;)e.b[e.c++]=0;f(e,!0);for(var t=new Uint8Array(e.outlen),r=0;r<e.outlen;r++)t[r]=e.h[r>>2]>>8*(3&r);return t}function y(t,n,a){a=a||64,t=function(t){var n;if(t instanceof Uint8Array)n=t;else if(t instanceof e)n=new Uint8Array(t);else{if("string"!=typeof t)throw new Error(r);n=new Uint8Array(e.from(t,"utf8"))}return n}(t);var i=h(a,n);return p(i,t),d(i)}t.blake2bInit=h,t.blake2bUpdate=p,t.blake2bFinal=d,t.blake2b=y,t.blake2bHex=function(e,t,r){var n,a=y(e,t,r);return n=a,Array.prototype.map.call(n,function(e){return(e<16?"0":"")+e.toString(16)}).join("")}}).call(this,r(9).Buffer)},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(r(16)),i=r(4),s=r(23),o=r(22),u=r(13);t.signBytes=function(e,t,r){return a.default.sign(i._fromIn(s.isPrivateKey(e)?e.privateKey:o.privateKey(e)),i._fromIn(t),i._fromIn(r||u.randomBytes(64)))}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=r(12),i=r(31),s=r(4),o=r(6),u=r(22),c=n(r(16));t.verifyAddress=function(e,t){var r=t?t.chainId:void 0;try{var n=s._fromIn(e);if(1!=n[0]||r&&n[1]!=i.ChaidId.toNumber(r))return!1;for(var a=n.slice(0,22),c=n.slice(22,26),l=o._hashChain(a).slice(0,4),f=0;f<4;f++)if(c[f]!=l[f])return!1;if(t&&t.publicKey){var h=u.address({publicKey:t.publicKey},r);if(n.length!==h.length)return!1;for(f=0;f<h.length;f++)if(h[f]!==n[f])return!1}}catch(e){return!1}return!0},t.verifySignature=function(e,t,r){try{return c.default.verify(s._fromIn(e),s._fromIn(t),s._fromIn(r))}catch(e){return!1}},t.verifyPublicKey=function(e){return s._fromIn(e).length===a.PUBLIC_KEY_LENGTH}},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(a,i){function s(e){try{u(n.next(e))}catch(e){i(e)}}function o(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){e.done?a(e.value):new r(function(t){t(e.value)}).then(s,o)}u((n=n.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){var r,n,a,i,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function o(i){return function(o){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(a=(a=s.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){s.label=i[1];break}if(6===i[0]&&s.label<a[1]){s.label=a[1],a=i;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(i);break}a[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,o])}}},i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t},s=this;Object.defineProperty(t,"__esModule",{value:!0});var o=i(r(55)),u=i(r(2)),c=i(r(39)),l=i(r(1)),f=r(15),h=r(3),p=i(r(63));o.oids.sha224="2.16.840.1.101.3.4.2.4",o.oids["2.16.840.1.101.3.4.2.4"]="sha224",o.oids["sha3-224"]="2.16.840.1.101.3.4.2.7",o.oids["2.16.840.1.101.3.4.2.7"]="sha3-224",o.oids["sha3-256"]="2.16.840.1.101.3.4.2.8",o.oids["2.16.840.1.101.3.4.2.8"]="sha3-256",o.oids["sha3-384"]="2.16.840.1.101.3.4.2.9",o.oids["2.16.840.1.101.3.4.2.9"]="sha3-384",o.oids["sha3-512"]="2.16.840.1.101.3.4.2.10",o.oids["2.16.840.1.101.3.4.2.10"]="sha3-512",t.pemToBytes=function(e){return f.base64Decode(e.trim().split(/\r\n|\n/).slice(1,-1).join("").trim())};var d={rsaPrivateNonEncrypted:"RSA PRIVATE KEY",rsaPublic:"PUBLIC KEY"};t.bytesToPem=function(e,t){var r="-----BEGIN "+d[t]+"-----\n",n="-----END "+d[t]+"-----\n",a=f.base64Encode(e);a.length%64!=0&&(a+=" ".repeat(64-a.length%64));for(var i=r,s=0;s<a.length/64;s++)i+=a.slice(64*s,64*(s+1))+"\n";return i+=n},t.rsaKeyPairSync=function(e,r){var n=o.rsa.generateKeyPair(e,r);return{rsaPrivate:t.pemToBytes(o.privateKeyToPem(n.privateKey)),rsaPublic:t.pemToBytes(o.publicKeyToPem(n.publicKey))}},t.rsaKeyPair=function(e,r){return n(s,void 0,void 0,function(){return a(this,function(n){return[2,new Promise(function(n,a){o.rsa.generateKeyPair(e,r,function(e,r){e&&a(e),n({rsaPrivate:t.pemToBytes(o.privateKeyToPem(r.privateKey)),rsaPublic:t.pemToBytes(o.publicKeyToPem(r.publicKey))})})})]})})};var y,g=function(){function e(e,t){this.sha3Digest=e,this.algorithm=t}return e.makeCreator=function(t,r){return{create:function(){return new e(t.create(),r)}}},e.prototype.update=function(e,t){return this.sha3Digest.update(h.stringToBytes(e,null==t?"raw":t)),this},e.prototype.digest=function(){var e=Uint8Array.from(this.sha3Digest.digest());return l.createBuffer(h.bytesToString(e,"raw"))},e}(),m={MD5:c,SHA1:u.algorithms.sha1,SHA224:(y="SHA224",function(){throw new Error("Digest "+y+" is unsupported")}),SHA256:u.algorithms.sha256,SHA384:u.algorithms.sha384,SHA512:u.algorithms.sha512,"SHA3-224":g.makeCreator(p.sha3_224,"sha3-224"),"SHA3-256":g.makeCreator(p.sha3_256,"sha3-256"),"SHA3-384":g.makeCreator(p.sha3_384,"sha3-384"),"SHA3-512":g.makeCreator(p.sha3_512,"sha3-512")};t.rsaSign=function(e,r,n){void 0===n&&(n="SHA256");var a=t.bytesToPem(e,"rsaPrivateNonEncrypted"),i=o.privateKeyFromPem(a),s=m[n].create();return s.update(h.bytesToString(r,"raw")),h.stringToBytes(i.sign(s),"raw")},t.rsaVerify=function(e,r,n,a){void 0===a&&(a="SHA256");var i=o.publicKeyFromPem(t.bytesToPem(e,"rsaPublic")),s=m[a].create();return s.update(h.bytesToString(r),"raw"),i.verify(s.digest().getBytes(),h.bytesToString(n,"raw"))}},function(e,t,r){var n=r(0);r(7),r(8),r(32),r(24),r(34),r(59),r(38),r(17),r(1),r(37);var a=n.asn1,i=e.exports=n.pki=n.pki||{};i.pemToDer=function(e){var t=n.pem.decode(e)[0];if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert PEM to DER; PEM is encrypted.");return n.util.createBuffer(t.body)},i.privateKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("PRIVATE KEY"!==t.type&&"RSA PRIVATE KEY"!==t.type){var r=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert private key from PEM; PEM is encrypted.");var s=a.fromDer(t.body);return i.privateKeyFromAsn1(s)},i.privateKeyToPem=function(e,t){var r={type:"RSA PRIVATE KEY",body:a.toDer(i.privateKeyToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},i.privateKeyInfoToPem=function(e,t){var r={type:"PRIVATE KEY",body:a.toDer(e).getBytes()};return n.pem.encode(r,{maxline:t})}},function(e,t,r){var n=r(0);r(1);var a=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],i=[1,2,3,5],s=function(e,t){return e<<t&65535|(65535&e)>>16-t},o=function(e,t){return(65535&e)>>t|e<<16-t&65535};e.exports=n.rc2=n.rc2||{},n.rc2.expandKey=function(e,t){"string"==typeof e&&(e=n.util.createBuffer(e)),t=t||128;var r,i=e,s=e.length(),o=t,u=Math.ceil(o/8),c=255>>(7&o);for(r=s;r<128;r++)i.putByte(a[i.at(r-1)+i.at(r-s)&255]);for(i.setAt(128-u,a[i.at(128-u)&c]),r=127-u;r>=0;r--)i.setAt(r,a[i.at(r+1)^i.at(r+u)]);return i};var u=function(e,t,r){var a,u,c,l,f=!1,h=null,p=null,d=null,y=[];for(e=n.rc2.expandKey(e,t),c=0;c<64;c++)y.push(e.getInt16Le());r?(a=function(e){for(c=0;c<4;c++)e[c]+=y[l]+(e[(c+3)%4]&e[(c+2)%4])+(~e[(c+3)%4]&e[(c+1)%4]),e[c]=s(e[c],i[c]),l++},u=function(e){for(c=0;c<4;c++)e[c]+=y[63&e[(c+3)%4]]}):(a=function(e){for(c=3;c>=0;c--)e[c]=o(e[c],i[c]),e[c]-=y[l]+(e[(c+3)%4]&e[(c+2)%4])+(~e[(c+3)%4]&e[(c+1)%4]),l--},u=function(e){for(c=3;c>=0;c--)e[c]-=y[63&e[(c+3)%4]]});var g=function(e){var t=[];for(c=0;c<4;c++){var n=h.getInt16Le();null!==d&&(r?n^=d.getInt16Le():d.putInt16Le(n)),t.push(65535&n)}l=r?0:63;for(var a=0;a<e.length;a++)for(var i=0;i<e[a][0];i++)e[a][1](t);for(c=0;c<4;c++)null!==d&&(r?d.putInt16Le(t[c]):t[c]^=d.getInt16Le()),p.putInt16Le(t[c])},m=null;return m={start:function(e,t){e&&"string"==typeof e&&(e=n.util.createBuffer(e)),f=!1,h=n.util.createBuffer(),p=t||new n.util.createBuffer,d=e,m.output=p},update:function(e){for(f||h.putBuffer(e);h.length()>=8;)g([[5,a],[1,u],[6,a],[1,u],[5,a]])},finish:function(e){var t=!0;if(r)if(e)t=e(8,h,!r);else{var n=8===h.length()?8:8-h.length();h.fillWithByte(n,n)}if(t&&(f=!0,m.update()),!r&&(t=0===h.length()))if(e)t=e(8,p,!r);else{var a=p.length(),i=p.at(a-1);i>a?t=!1:p.truncate(i)}return t}}};n.rc2.startEncrypting=function(e,t,r){var a=n.rc2.createEncryptionCipher(e,128);return a.start(t,r),a},n.rc2.createEncryptionCipher=function(e,t){return u(e,t,!0)},n.rc2.startDecrypting=function(e,t,r){var a=n.rc2.createDecryptionCipher(e,128);return a.start(t,r),a},n.rc2.createDecryptionCipher=function(e,t){return u(e,t,!1)}},function(e,t,r){var n=r(0);r(1),r(5),r(36);var a=e.exports=n.pkcs1=n.pkcs1||{};function i(e,t,r){r||(r=n.md.sha1.create());for(var a="",i=Math.ceil(t/r.digestLength),s=0;s<i;++s){var o=String.fromCharCode(s>>24&255,s>>16&255,s>>8&255,255&s);r.start(),r.update(e+o),a+=r.digest().getBytes()}return a.substring(0,t)}a.encode_rsa_oaep=function(e,t,r){var a,s,o,u;"string"==typeof r?(a=r,s=arguments[3]||void 0,o=arguments[4]||void 0):r&&(a=r.label||void 0,s=r.seed||void 0,o=r.md||void 0,r.mgf1&&r.mgf1.md&&(u=r.mgf1.md)),o?o.start():o=n.md.sha1.create(),u||(u=o);var c=Math.ceil(e.n.bitLength()/8),l=c-2*o.digestLength-2;if(t.length>l)throw(g=new Error("RSAES-OAEP input message length is too long.")).length=t.length,g.maxLength=l,g;a||(a=""),o.update(a,"raw");for(var f=o.digest(),h="",p=l-t.length,d=0;d<p;d++)h+="\0";var y=f.getBytes()+h+""+t;if(s){if(s.length!==o.digestLength){var g;throw(g=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.")).seedLength=s.length,g.digestLength=o.digestLength,g}}else s=n.random.getBytes(o.digestLength);var m=i(s,c-o.digestLength-1,u),v=n.util.xorBytes(y,m,y.length),E=i(v,o.digestLength,u);return"\0"+n.util.xorBytes(s,E,s.length)+v},a.decode_rsa_oaep=function(e,t,r){var a,s,o;"string"==typeof r?(a=r,s=arguments[3]||void 0):r&&(a=r.label||void 0,s=r.md||void 0,r.mgf1&&r.mgf1.md&&(o=r.mgf1.md));var u=Math.ceil(e.n.bitLength()/8);if(t.length!==u)throw(m=new Error("RSAES-OAEP encoded message length is invalid.")).length=t.length,m.expectedLength=u,m;if(void 0===s?s=n.md.sha1.create():s.start(),o||(o=s),u<2*s.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");a||(a=""),s.update(a,"raw");for(var c=s.digest().getBytes(),l=t.charAt(0),f=t.substring(1,s.digestLength+1),h=t.substring(1+s.digestLength),p=i(h,s.digestLength,o),d=i(n.util.xorBytes(f,p,f.length),u-s.digestLength-1,o),y=n.util.xorBytes(h,d,h.length),g=y.substring(0,s.digestLength),m="\0"!==l,v=0;v<s.digestLength;++v)m|=c.charAt(v)!==g.charAt(v);for(var E=1,C=s.digestLength,b=s.digestLength;b<y.length;b++){var S=y.charCodeAt(b);m|=S&(E?65534:0),C+=E&=1&S^1}if(m||1!==y.charCodeAt(C))throw new Error("Invalid RSAES-OAEP padding.");return y.substring(C+1)}},function(e,t,r){var n=r(0);r(1),r(35),r(5),function(){if(n.prime)e.exports=n.prime;else{var t=e.exports=n.prime=n.prime||{},r=n.jsbn.BigInteger,a=[6,4,2,4,2,4,6,2],i=new r(null);i.fromInt(30);var s=function(e,t){return e|t};t.generateProbablePrime=function(e,t,a){"function"==typeof t&&(a=t,t={});var i=(t=t||{}).algorithm||"PRIMEINC";"string"==typeof i&&(i={name:i}),i.options=i.options||{};var s=t.prng||n.random,c={nextBytes:function(e){for(var t=s.getBytesSync(e.length),r=0;r<e.length;++r)e[r]=t.charCodeAt(r)}};if("PRIMEINC"===i.name)return function(e,t,a,i){if("workers"in a)return function(e,t,a,i){if("undefined"==typeof Worker)return o(e,t,a,i);var s=u(e,t),c=a.workers,l=a.workLoad||100,f=30*l/8,h=a.workerScript||"forge/prime.worker.js";if(-1===c)return n.util.estimateCores(function(e,t){e&&(t=2),c=t-1,p()});function p(){c=Math.max(1,c);for(var n=[],a=0;a<c;++a)n[a]=new Worker(h);for(var a=0;a<c;++a)n[a].addEventListener("message",p);var o=!1;function p(a){if(!o){0;var c=a.data;if(c.found){for(var h=0;h<n.length;++h)n[h].terminate();return o=!0,i(null,new r(c.prime,16))}s.bitLength()>e&&(s=u(e,t));var p=s.toString(16);a.target.postMessage({hex:p,workLoad:l}),s.dAddOffset(f,0)}}}p()}(e,t,a,i);return o(e,t,a,i)}(e,c,i.options,a);throw new Error("Invalid prime generation algorithm: "+i.name)}}function o(e,t,r,i){var s=u(e,t),o=function(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}(s.bitLength());"millerRabinTests"in r&&(o=r.millerRabinTests);var c=10;"maxBlockTime"in r&&(c=r.maxBlockTime),function e(t,r,i,s,o,c,l){var f=+new Date;do{if(t.bitLength()>r&&(t=u(r,i)),t.isProbablePrime(o))return l(null,t);t.dAddOffset(a[s++%8],0)}while(c<0||+new Date-f<c);n.util.setImmediate(function(){e(t,r,i,s,o,c,l)})}(s,e,t,0,o,c,i)}function u(e,t){var n=new r(e,t),a=e-1;return n.testBit(a)||n.bitwiseTo(r.ONE.shiftLeft(a),s,n),n.dAddOffset(31-n.mod(i).byteValue(),0),n}}()},function(e,t,r){var n=r(0);r(7),r(21),r(8),r(60),r(32),r(5),r(17),r(36),r(1),r(37);var a=n.asn1,i=n.pki,s=e.exports=n.pkcs12=n.pkcs12||{},o={name:"ContentInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:a.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},u={name:"PFX",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"version"},o,{name:"PFX.macData",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:a.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},c={name:"SafeBag",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:a.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:a.Class.UNIVERSAL,type:a.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},l={name:"Attribute",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:a.Class.UNIVERSAL,type:a.Type.SET,constructed:!0,capture:"values"}]},f={name:"CertBag",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:a.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:a.Class.UNIVERSAL,type:a.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function h(e,t,r,n){for(var a=[],i=0;i<e.length;i++)for(var s=0;s<e[i].safeBags.length;s++){var o=e[i].safeBags[s];void 0!==n&&o.type!==n||(null!==t?void 0!==o.attributes[t]&&o.attributes[t].indexOf(r)>=0&&a.push(o):a.push(o))}return a}function p(e){if(e.composed||e.constructed){for(var t=n.util.createBuffer(),r=0;r<e.value.length;++r)t.putBytes(e.value[r].value);e.composed=e.constructed=!1,e.value=t.getBytes()}return e}function d(e,t){var r={},s=[];if(!a.validate(e,n.pkcs7.asn1.encryptedDataValidator,r,s))throw(o=new Error("Cannot read EncryptedContentInfo.")).errors=s,o;var o,u=a.derToOid(r.contentType);if(u!==i.oids.data)throw(o=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.")).oid=u,o;u=a.derToOid(r.encAlgorithm);var c=i.pbe.getCipher(u,r.encParameter,t),l=p(r.encryptedContentAsn1),f=n.util.createBuffer(l.value);if(c.update(f),!c.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return c.output.getBytes()}function y(e,t,r){if(!t&&0===e.length)return[];if((e=a.fromDer(e,t)).tagClass!==a.Class.UNIVERSAL||e.type!==a.Type.SEQUENCE||!0!==e.constructed)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var n=[],s=0;s<e.value.length;s++){var o=e.value[s],u={},l=[];if(!a.validate(o,c,u,l))throw(m=new Error("Cannot read SafeBag.")).errors=l,m;var h,p,d={type:a.derToOid(u.bagId),attributes:g(u.bagAttributes)};n.push(d);var y=u.bagValue.value[0];switch(d.type){case i.oids.pkcs8ShroudedKeyBag:if(null===(y=i.decryptPrivateKeyInfo(y,r)))throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case i.oids.keyBag:try{d.key=i.privateKeyFromAsn1(y)}catch(e){d.key=null,d.asn1=y}continue;case i.oids.certBag:h=f,p=function(){if(a.derToOid(u.certId)!==i.oids.x509Certificate){var e=new Error("Unsupported certificate type, only X.509 supported.");throw e.oid=a.derToOid(u.certId),e}var r=a.fromDer(u.cert,t);try{d.cert=i.certificateFromAsn1(r,!0)}catch(e){d.cert=null,d.asn1=r}};break;default:var m;throw(m=new Error("Unsupported PKCS#12 SafeBag type.")).oid=d.type,m}if(void 0!==h&&!a.validate(y,h,u,l))throw(m=new Error("Cannot read PKCS#12 "+h.name)).errors=l,m;p()}return n}function g(e){var t={};if(void 0!==e)for(var r=0;r<e.length;++r){var n={},s=[];if(!a.validate(e[r],l,n,s)){var o=new Error("Cannot read PKCS#12 BagAttribute.");throw o.errors=s,o}var u=a.derToOid(n.oid);if(void 0!==i.oids[u]){t[i.oids[u]]=[];for(var c=0;c<n.values.length;++c)t[i.oids[u]].push(n.values[c].value)}}return t}s.pkcs12FromAsn1=function(e,t,r){"string"==typeof t?(r=t,t=!0):void 0===t&&(t=!0);var c={};if(!a.validate(e,u,c,[]))throw(l=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.")).errors=l,l;var l,f={version:c.version.charCodeAt(0),safeContents:[],getBags:function(e){var t,r={};return"localKeyId"in e?t=e.localKeyId:"localKeyIdHex"in e&&(t=n.util.hexToBytes(e.localKeyIdHex)),void 0===t&&!("friendlyName"in e)&&"bagType"in e&&(r[e.bagType]=h(f.safeContents,null,null,e.bagType)),void 0!==t&&(r.localKeyId=h(f.safeContents,"localKeyId",t,e.bagType)),"friendlyName"in e&&(r.friendlyName=h(f.safeContents,"friendlyName",e.friendlyName,e.bagType)),r},getBagsByFriendlyName:function(e,t){return h(f.safeContents,"friendlyName",e,t)},getBagsByLocalKeyId:function(e,t){return h(f.safeContents,"localKeyId",e,t)}};if(3!==c.version.charCodeAt(0))throw(l=new Error("PKCS#12 PFX of version other than 3 not supported.")).version=c.version.charCodeAt(0),l;if(a.derToOid(c.contentType)!==i.oids.data)throw(l=new Error("Only PKCS#12 PFX in password integrity mode supported.")).oid=a.derToOid(c.contentType),l;var g=c.content.value[0];if(g.tagClass!==a.Class.UNIVERSAL||g.type!==a.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(g=p(g),c.mac){var m=null,v=0,E=a.derToOid(c.macAlgorithm);switch(E){case i.oids.sha1:m=n.md.sha1.create(),v=20;break;case i.oids.sha256:m=n.md.sha256.create(),v=32;break;case i.oids.sha384:m=n.md.sha384.create(),v=48;break;case i.oids.sha512:m=n.md.sha512.create(),v=64;break;case i.oids.md5:m=n.md.md5.create(),v=16}if(null===m)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+E);var C=new n.util.ByteBuffer(c.macSalt),b="macIterations"in c?parseInt(n.util.bytesToHex(c.macIterations),16):1,S=s.generateKey(r,C,3,b,v,m),T=n.hmac.create();if(T.start(m,S),T.update(g.value),T.getMac().getBytes()!==c.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return function(e,t,r,n){if((t=a.fromDer(t,r)).tagClass!==a.Class.UNIVERSAL||t.type!==a.Type.SEQUENCE||!0!==t.constructed)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var s=0;s<t.value.length;s++){var u=t.value[s],c={},l=[];if(!a.validate(u,o,c,l)){var f=new Error("Cannot read ContentInfo.");throw f.errors=l,f}var h={encrypted:!1},g=null,m=c.content.value[0];switch(a.derToOid(c.contentType)){case i.oids.data:if(m.tagClass!==a.Class.UNIVERSAL||m.type!==a.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");g=p(m).value;break;case i.oids.encryptedData:g=d(m,n),h.encrypted=!0;break;default:var f=new Error("Unsupported PKCS#12 contentType.");throw f.contentType=a.derToOid(c.contentType),f}h.safeBags=y(g,r,n),e.safeContents.push(h)}}(f,g.value,t,r),f},s.toPkcs12Asn1=function(e,t,r,o){(o=o||{}).saltSize=o.saltSize||8,o.count=o.count||2048,o.algorithm=o.algorithm||o.encAlgorithm||"aes128","useMac"in o||(o.useMac=!0),"localKeyId"in o||(o.localKeyId=null),"generateLocalKeyId"in o||(o.generateLocalKeyId=!0);var u,c=o.localKeyId;if(null!==c)c=n.util.hexToBytes(c);else if(o.generateLocalKeyId)if(t){var l=n.util.isArray(t)?t[0]:t;"string"==typeof l&&(l=i.certificateFromPem(l)),(B=n.md.sha1.create()).update(a.toDer(i.certificateToAsn1(l)).getBytes()),c=B.digest().getBytes()}else c=n.random.getBytes(20);var f=[];null!==c&&f.push(a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(i.oids.localKeyId).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SET,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,c)])])),"friendlyName"in o&&f.push(a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(i.oids.friendlyName).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SET,!0,[a.create(a.Class.UNIVERSAL,a.Type.BMPSTRING,!1,o.friendlyName)])])),f.length>0&&(u=a.create(a.Class.UNIVERSAL,a.Type.SET,!0,f));var h=[],p=[];null!==t&&(p=n.util.isArray(t)?t:[t]);for(var d=[],y=0;y<p.length;++y){"string"==typeof(t=p[y])&&(t=i.certificateFromPem(t));var g=0===y?u:void 0,m=i.certificateToAsn1(t),v=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(i.oids.certBag).getBytes()),a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(i.oids.x509Certificate).getBytes()),a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,a.toDer(m).getBytes())])])]),g]);d.push(v)}if(d.length>0){var E=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,d),C=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(i.oids.data).getBytes()),a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,a.toDer(E).getBytes())])]);h.push(C)}var b=null;if(null!==e){var S=i.wrapRsaPrivateKey(i.privateKeyToAsn1(e));b=null===r?a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(i.oids.keyBag).getBytes()),a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[S]),u]):a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(i.oids.pkcs8ShroudedKeyBag).getBytes()),a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[i.encryptPrivateKeyInfo(S,r,o)]),u]);var T=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[b]),I=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(i.oids.data).getBytes()),a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,a.toDer(T).getBytes())])]);h.push(I)}var A,w=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,h);if(o.useMac){var B=n.md.sha1.create(),N=new n.util.ByteBuffer(n.random.getBytes(o.saltSize)),R=o.count,k=(e=s.generateKey(r,N,3,R,20),n.hmac.create());k.start(B,e),k.update(a.toDer(w).getBytes());var U=k.getMac();A=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(i.oids.sha1).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")]),a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,U.getBytes())]),a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,N.getBytes()),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(R).getBytes())])}return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(3).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(i.oids.data).getBytes()),a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,a.toDer(w).getBytes())])]),A])},s.generateKey=n.pbe.generatePkcs12Key},function(e,t,r){var n=r(0);r(7),r(1);var a=n.asn1,i=e.exports=n.pkcs7asn1=n.pkcs7asn1||{};n.pkcs7=n.pkcs7||{},n.pkcs7.asn1=i;var s={name:"ContentInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};i.contentInfoValidator=s;var o={name:"EncryptedContentInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:a.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};i.envelopedDataValidator={name:"EnvelopedData",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:a.Class.UNIVERSAL,type:a.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(o)},i.encryptedDataValidator={name:"EncryptedData",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"version"}].concat(o)};var u={name:"SignerInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:a.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:a.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};i.signedDataValidator={name:"SignedData",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:a.Class.UNIVERSAL,type:a.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},s,{name:"SignedData.Certificates",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:a.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:a.Class.UNIVERSAL,type:a.Type.SET,capture:"signerInfos",optional:!0,value:[u]}]},i.recipientInfoValidator={name:"RecipientInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:a.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}},function(e,t,r){var n=r(0);r(62),e.exports=n.mgf=n.mgf||{},n.mgf.mgf1=n.mgf1},function(e,t,r){var n=r(0);r(1),n.mgf=n.mgf||{},(e.exports=n.mgf.mgf1=n.mgf1=n.mgf1||{}).create=function(e){return{generate:function(t,r){for(var a=new n.util.ByteBuffer,i=Math.ceil(r/e.digestLength),s=0;s<i;s++){var o=new n.util.ByteBuffer;o.putInt32(s),e.start(),e.update(t+o.getBytes()),a.putBuffer(e.digest())}return a.truncate(a.length()-r),a.getBytes()}}}},function(e,t,r){(function(n,a){var i;
|
17
|
+
/**
|
18
|
+
* [js-sha3]{@link https://github.com/emn178/js-sha3}
|
19
|
+
*
|
20
|
+
* @version 0.8.0
|
21
|
+
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
22
|
+
* @copyright Chen, Yi-Cyuan 2015-2018
|
23
|
+
* @license MIT
|
24
|
+
*/
|
25
|
+
/**
|
26
|
+
* [js-sha3]{@link https://github.com/emn178/js-sha3}
|
27
|
+
*
|
28
|
+
* @version 0.8.0
|
29
|
+
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
30
|
+
* @copyright Chen, Yi-Cyuan 2015-2018
|
31
|
+
* @license MIT
|
32
|
+
*/
|
33
|
+
!function(){"use strict";var s="input is invalid type",o="object"==typeof window,u=o?window:{};u.JS_SHA3_NO_WINDOW&&(o=!1);var c=!o&&"object"==typeof self;!u.JS_SHA3_NO_NODE_JS&&"object"==typeof n&&n.versions&&n.versions.node?u=a:c&&(u=self);var l=!u.JS_SHA3_NO_COMMON_JS&&"object"==typeof e&&e.exports,f=r(64),h=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,p="0123456789abcdef".split(""),d=[4,1024,262144,67108864],y=[0,8,16,24],g=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],m=[224,256,384,512],v=[128,256],E=["hex","buffer","arrayBuffer","array","digest"],C={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!h||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var b=function(e,t,r){return function(n){return new O(e,t,e).update(n)[r]()}},S=function(e,t,r){return function(n,a){return new O(e,t,a).update(n)[r]()}},T=function(e,t,r){return function(t,n,a,i){return N["cshake"+e].update(t,n,a,i)[r]()}},I=function(e,t,r){return function(t,n,a,i){return N["kmac"+e].update(t,n,a,i)[r]()}},A=function(e,t,r,n){for(var a=0;a<E.length;++a){var i=E[a];e[i]=t(r,n,i)}return e},w=function(e,t){var r=b(e,t,"hex");return r.create=function(){return new O(e,t,e)},r.update=function(e){return r.create().update(e)},A(r,b,e,t)},B=[{name:"keccak",padding:[1,256,65536,16777216],bits:m,createMethod:w},{name:"sha3",padding:[6,1536,393216,100663296],bits:m,createMethod:w},{name:"shake",padding:[31,7936,2031616,520093696],bits:v,createMethod:function(e,t){var r=S(e,t,"hex");return r.create=function(r){return new O(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},A(r,S,e,t)}},{name:"cshake",padding:d,bits:v,createMethod:function(e,t){var r=C[e],n=T(e,0,"hex");return n.create=function(n,a,i){return a||i?new O(e,t,n).bytepad([a,i],r):N["shake"+e].create(n)},n.update=function(e,t,r,a){return n.create(t,r,a).update(e)},A(n,T,e,t)}},{name:"kmac",padding:d,bits:v,createMethod:function(e,t){var r=C[e],n=I(e,0,"hex");return n.create=function(n,a,i){return new V(e,t,a).bytepad(["KMAC",i],r).bytepad([n],r)},n.update=function(e,t,r,a){return n.create(e,r,a).update(t)},A(n,I,e,t)}}],N={},R=[],k=0;k<B.length;++k)for(var U=B[k],_=U.bits,L=0;L<_.length;++L){var P=U.name+"_"+_[L];if(R.push(P),N[P]=U.createMethod(_[L],U.padding),"sha3"!==U.name){var D=U.name+_[L];R.push(D),N[D]=N[P]}}function O(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function V(e,t,r){O.call(this,e,t,r)}O.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(s);if(null===e)throw new Error(s);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(s);t=!0}for(var n,a,i=this.blocks,o=this.byteCount,u=e.length,c=this.blockCount,l=0,f=this.s;l<u;){if(this.reset)for(this.reset=!1,i[0]=this.block,n=1;n<c+1;++n)i[n]=0;if(t)for(n=this.start;l<u&&n<o;++l)i[n>>2]|=e[l]<<y[3&n++];else for(n=this.start;l<u&&n<o;++l)(a=e.charCodeAt(l))<128?i[n>>2]|=a<<y[3&n++]:a<2048?(i[n>>2]|=(192|a>>6)<<y[3&n++],i[n>>2]|=(128|63&a)<<y[3&n++]):a<55296||a>=57344?(i[n>>2]|=(224|a>>12)<<y[3&n++],i[n>>2]|=(128|a>>6&63)<<y[3&n++],i[n>>2]|=(128|63&a)<<y[3&n++]):(a=65536+((1023&a)<<10|1023&e.charCodeAt(++l)),i[n>>2]|=(240|a>>18)<<y[3&n++],i[n>>2]|=(128|a>>12&63)<<y[3&n++],i[n>>2]|=(128|a>>6&63)<<y[3&n++],i[n>>2]|=(128|63&a)<<y[3&n++]);if(this.lastByteIndex=n,n>=o){for(this.start=n-o,this.block=i[c],n=0;n<c;++n)f[n]^=i[n];x(f),this.reset=!0}else this.start=n}return this},O.prototype.encode=function(e,t){var r=255&e,n=1,a=[r];for(r=255&(e>>=8);r>0;)a.unshift(r),r=255&(e>>=8),++n;return t?a.push(n):a.unshift(n),this.update(a),a.length},O.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(s);if(null===e)throw new Error(s);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(s);t=!0}var n=0,a=e.length;if(t)n=a;else for(var i=0;i<e.length;++i){var o=e.charCodeAt(i);o<128?n+=1:o<2048?n+=2:o<55296||o>=57344?n+=3:(o=65536+((1023&o)<<10|1023&e.charCodeAt(++i)),n+=4)}return n+=this.encode(8*n),this.update(e),n},O.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n<e.length;++n)r+=this.encodeString(e[n]);var a=t-r%t,i=[];return i.length=a,this.update(i),this},O.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];x(n)}},O.prototype.toString=O.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,a=this.extraBytes,i=0,s=0,o="";s<n;){for(i=0;i<t&&s<n;++i,++s)e=r[i],o+=p[e>>4&15]+p[15&e]+p[e>>12&15]+p[e>>8&15]+p[e>>20&15]+p[e>>16&15]+p[e>>28&15]+p[e>>24&15];s%t==0&&(x(r),i=0)}return a&&(e=r[i],o+=p[e>>4&15]+p[15&e],a>1&&(o+=p[e>>12&15]+p[e>>8&15]),a>2&&(o+=p[e>>20&15]+p[e>>16&15])),o},O.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,a=this.extraBytes,i=0,s=0,o=this.outputBits>>3;e=a?new ArrayBuffer(n+1<<2):new ArrayBuffer(o);for(var u=new Uint32Array(e);s<n;){for(i=0;i<t&&s<n;++i,++s)u[s]=r[i];s%t==0&&x(r)}return a&&(u[i]=r[i],e=e.slice(0,o)),e},O.prototype.buffer=O.prototype.arrayBuffer,O.prototype.digest=O.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,a=this.outputBlocks,i=this.extraBytes,s=0,o=0,u=[];o<a;){for(s=0;s<r&&o<a;++s,++o)e=o<<2,t=n[s],u[e]=255&t,u[e+1]=t>>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;o%r==0&&x(n)}return i&&(e=o<<2,t=n[s],u[e]=255&t,i>1&&(u[e+1]=t>>8&255),i>2&&(u[e+2]=t>>16&255)),u},V.prototype=new O,V.prototype.finalize=function(){return this.encode(this.outputBits,!0),O.prototype.finalize.call(this)};var x=function(e){var t,r,n,a,i,s,o,u,c,l,f,h,p,d,y,m,v,E,C,b,S,T,I,A,w,B,N,R,k,U,_,L,P,D,O,V,x,K,M,j,F,z,q,G,Q,H,W,Y,X,Z,J,$,ee,te,re,ne,ae,ie,se,oe,ue,ce,le;for(n=0;n<48;n+=2)a=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],o=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|o>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(o<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=a^(u<<1|c>>>31),r=i^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(l<<1|f>>>31),r=o^(f<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|p>>>31),r=c^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(a<<1|i>>>31),r=f^(i<<1|a>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,d=e[0],y=e[1],H=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,R=e[20]<<3|e[21]>>>29,k=e[21]<<3|e[20]>>>29,oe=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,z=e[40]<<18|e[41]>>>14,q=e[41]<<18|e[40]>>>14,D=e[2]<<1|e[3]>>>31,O=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Y=e[22]<<10|e[23]>>>22,X=e[23]<<10|e[22]>>>22,U=e[33]<<13|e[32]>>>19,_=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,V=e[14]<<6|e[15]>>>26,x=e[15]<<6|e[14]>>>26,E=e[25]<<11|e[24]>>>21,C=e[24]<<11|e[25]>>>21,Z=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,L=e[45]<<29|e[44]>>>3,P=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,w=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ae=e[16]<<23|e[17]>>>9,K=e[26]<<25|e[27]>>>7,M=e[27]<<25|e[26]>>>7,b=e[36]<<21|e[37]>>>11,S=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,Q=e[9]<<27|e[8]>>>5,B=e[18]<<20|e[19]>>>12,N=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,j=e[38]<<8|e[39]>>>24,F=e[39]<<8|e[38]>>>24,T=e[48]<<14|e[49]>>>18,I=e[49]<<14|e[48]>>>18,e[0]=d^~m&E,e[1]=y^~v&C,e[10]=A^~B&R,e[11]=w^~N&k,e[20]=D^~V&K,e[21]=O^~x&M,e[30]=G^~H&Y,e[31]=Q^~W&X,e[40]=te^~ne&ie,e[41]=re^~ae&se,e[2]=m^~E&b,e[3]=v^~C&S,e[12]=B^~R&U,e[13]=N^~k&_,e[22]=V^~K&j,e[23]=x^~M&F,e[32]=H^~Y&Z,e[33]=W^~X&J,e[42]=ne^~ie&oe,e[43]=ae^~se&ue,e[4]=E^~b&T,e[5]=C^~S&I,e[14]=R^~U&L,e[15]=k^~_&P,e[24]=K^~j&z,e[25]=M^~F&q,e[34]=Y^~Z&$,e[35]=X^~J&ee,e[44]=ie^~oe&ce,e[45]=se^~ue&le,e[6]=b^~T&d,e[7]=S^~I&y,e[16]=U^~L&A,e[17]=_^~P&w,e[26]=j^~z&D,e[27]=F^~q&O,e[36]=Z^~$&G,e[37]=J^~ee&Q,e[46]=oe^~ce&te,e[47]=ue^~le&re,e[8]=T^~d&m,e[9]=I^~y&v,e[18]=L^~A&B,e[19]=P^~w&N,e[28]=z^~D&V,e[29]=q^~O&x,e[38]=$^~G&H,e[39]=ee^~Q&W,e[48]=ce^~te&ne,e[49]=le^~re&ae,e[0]^=g[n],e[1]^=g[n+1]};if(l)e.exports=N;else{for(k=0;k<R.length;++k)u[R[k]]=N[R[k]];f&&(void 0===(i=function(){return N}.call(t,r,t,e))||(e.exports=i))}}()}).call(this,r(14),r(10))},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),i=n(r(39)),s=r(11),o=r(29),u=r(15),c=r(6),l=r(13);function f(e,t){for(void 0===t&&(t=5e3);t--;){var r=a.stringToBytes(e);e=u.base16Encode(c.sha256(r))}return e}function h(e,t,r){void 0===r&&(r=48);for(var n=a.bytesToString(s.concat(e,t),"raw"),o="",u=o;u.length<r;)u+=o=i.create().update(o+n).digest().getBytes();return u}t.encryptSeed=function(e,t,r){var n=f(t,r),i=l.randomBytes(8),c=h(a.stringToBytes(n,"raw"),i),p=a.stringToBytes(c.slice(0,32),"raw"),d=a.stringToBytes(c.slice(32),"raw"),y=o.aesEncrypt(a.stringToBytes(e),p,"CBC",d);return u.base64Encode(s.concat(a.stringToBytes("Salted__"),i,y))},t.decryptSeed=function(e,t,r){var n=f(t,r),i=u.base64Decode(e),s=i.slice(8,16),c=h(a.stringToBytes(n,"raw"),s),l=a.stringToBytes(c.slice(0,32),"raw"),p=a.stringToBytes(c.slice(32),"raw");return a.bytesToString(o.aesDecrypt(i.slice(16),l,"CBC",p))}},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return s};Object.defineProperty(t,"__esModule",{value:!0});var a=r(6),i=r(11);t.merkleVerify=function(e,t,r){var s=Uint8Array.from([0]),o=Uint8Array.from([1]);if(32!==e.length)throw new Error("Failed to parse merkleProof: Invalid rootHash length");for(var u=a.blake2b(i.concat(s,r)),c=[],l=t.map(function(e){return e});l.length>0;){var f=0===l[0]?"L":"R",h=l[1];if(h<1)throw new Error("Failed to parse merkleProof: Wrong hash size");var p=l.slice(2,2+h);c.push([f,p]),l=l.slice(2+h)}return c.reduce(function(e,t){var r=n(t,2),s=r[0],u=r[1];return a.blake2b(i.concat(o,"R"===s?i.concat(u,e):i.concat(e,u)))},u).every(function(t,r){return t===e[r]})}}])});
|