@aeternity/aepp-sdk 13.3.2 → 14.0.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.
- package/README.md +4 -2
- package/bin/aesophia_cli +0 -0
- package/dist/aepp-sdk.browser-script.cjs +3 -0
- package/dist/aepp-sdk.browser-script.cjs.LICENSE.txt +10 -0
- package/dist/aepp-sdk.browser-script.cjs.map +1 -0
- package/dist/aepp-sdk.browser.cjs +3 -0
- package/dist/aepp-sdk.browser.cjs.map +1 -0
- package/dist/aepp-sdk.cjs +33535 -0
- package/dist/aepp-sdk.cjs.map +1 -0
- package/es/AeSdk.d.ts +4 -4
- package/es/AeSdk.js +76 -0
- package/es/AeSdk.js.map +1 -0
- package/es/AeSdkAepp.d.ts +13 -8
- package/es/AeSdkAepp.js +153 -0
- package/es/AeSdkAepp.js.map +1 -0
- package/es/AeSdkBase.d.ts +5 -40
- package/es/AeSdkBase.js +225 -0
- package/es/AeSdkBase.js.map +1 -0
- package/es/AeSdkMethods.d.ts +10 -33
- package/es/AeSdkMethods.js +81 -0
- package/es/AeSdkMethods.js.map +1 -0
- package/es/AeSdkWallet.d.ts +13 -8
- package/es/AeSdkWallet.js +347 -0
- package/es/AeSdkWallet.js.map +1 -0
- package/es/Middleware.d.ts +9 -25
- package/es/Middleware.js +97 -0
- package/es/Middleware.js.map +1 -0
- package/es/MiddlewareSubscriber.d.ts +2 -3
- package/es/MiddlewareSubscriber.js +165 -0
- package/es/MiddlewareSubscriber.js.map +1 -0
- package/es/Node.d.ts +5 -21
- package/es/Node.js +97 -0
- package/es/Node.js.map +1 -0
- package/es/account/Base.d.ts +7 -71
- package/es/account/Base.js +6 -0
- package/es/account/Base.js.map +1 -0
- package/es/account/BaseFactory.d.ts +19 -0
- package/es/account/BaseFactory.js +28 -0
- package/es/account/BaseFactory.js.map +1 -0
- package/es/account/Generalized.d.ts +2 -6
- package/es/account/Generalized.js +108 -0
- package/es/account/Generalized.js.map +1 -0
- package/es/account/Ledger.d.ts +3 -7
- package/es/account/Ledger.js +107 -0
- package/es/account/Ledger.js.map +1 -0
- package/es/account/LedgerFactory.d.ts +16 -16
- package/es/account/LedgerFactory.js +80 -0
- package/es/account/LedgerFactory.js.map +1 -0
- package/es/account/Memory.d.ts +6 -22
- package/es/account/Memory.js +97 -0
- package/es/account/Memory.js.map +1 -0
- package/es/account/Metamask.d.ts +26 -0
- package/es/account/Metamask.js +76 -0
- package/es/account/Metamask.js.map +1 -0
- package/es/account/MetamaskFactory.d.ts +40 -0
- package/es/account/MetamaskFactory.js +110 -0
- package/es/account/MetamaskFactory.js.map +1 -0
- package/es/account/MnemonicFactory.d.ts +35 -0
- package/es/account/MnemonicFactory.js +88 -0
- package/es/account/MnemonicFactory.js.map +1 -0
- package/es/account/Rpc.d.ts +5 -19
- package/es/account/Rpc.js +86 -0
- package/es/account/Rpc.js.map +1 -0
- package/es/aens.d.ts +125 -166
- package/es/aens.js +258 -0
- package/es/aens.js.map +1 -0
- package/es/aepp-wallet-communication/WalletConnectorFrame.d.ts +25 -0
- package/es/aepp-wallet-communication/WalletConnectorFrame.js +39 -0
- package/es/aepp-wallet-communication/WalletConnectorFrame.js.map +1 -0
- package/es/aepp-wallet-communication/WalletConnectorFrameBase.d.ts +43 -0
- package/es/aepp-wallet-communication/WalletConnectorFrameBase.js +110 -0
- package/es/aepp-wallet-communication/WalletConnectorFrameBase.js.map +1 -0
- package/es/aepp-wallet-communication/WalletConnectorFrameWithNode.d.ts +27 -0
- package/es/aepp-wallet-communication/WalletConnectorFrameWithNode.js +43 -0
- package/es/aepp-wallet-communication/WalletConnectorFrameWithNode.js.map +1 -0
- package/es/aepp-wallet-communication/connection/Browser.js +53 -0
- package/es/aepp-wallet-communication/connection/Browser.js.map +1 -0
- package/es/aepp-wallet-communication/connection/BrowserRuntime.d.ts +1 -1
- package/es/aepp-wallet-communication/connection/BrowserRuntime.js +54 -0
- package/es/aepp-wallet-communication/connection/BrowserRuntime.js.map +1 -0
- package/es/aepp-wallet-communication/connection/BrowserWindowMessage.d.ts +2 -2
- package/es/aepp-wallet-communication/connection/BrowserWindowMessage.js +90 -0
- package/es/aepp-wallet-communication/connection/BrowserWindowMessage.js.map +1 -0
- package/es/aepp-wallet-communication/connection-proxy.d.ts +2 -2
- package/es/aepp-wallet-communication/connection-proxy.js +17 -0
- package/es/aepp-wallet-communication/connection-proxy.js.map +1 -0
- package/es/aepp-wallet-communication/rpc/RpcClient.d.ts +1 -1
- package/es/aepp-wallet-communication/rpc/RpcClient.js +119 -0
- package/es/aepp-wallet-communication/rpc/RpcClient.js.map +1 -0
- package/es/aepp-wallet-communication/rpc/types.d.ts +13 -19
- package/es/aepp-wallet-communication/rpc/types.js +3 -0
- package/es/aepp-wallet-communication/rpc/types.js.map +1 -0
- package/es/aepp-wallet-communication/schema.d.ts +10 -3
- package/es/aepp-wallet-communication/schema.js +202 -0
- package/es/aepp-wallet-communication/schema.js.map +1 -0
- package/es/aepp-wallet-communication/wallet-detector.d.ts +4 -4
- package/es/aepp-wallet-communication/wallet-detector.js +44 -0
- package/es/aepp-wallet-communication/wallet-detector.js.map +1 -0
- package/es/apis/compiler/compiler.d.ts +2 -2
- package/es/apis/compiler/compiler.js +513 -0
- package/es/apis/compiler/compiler.js.map +1 -0
- package/es/apis/compiler/index.d.ts +2 -2
- package/es/apis/compiler/index.js +3 -0
- package/es/apis/compiler/index.js.map +1 -0
- package/es/apis/compiler/models/index.js +2 -0
- package/es/apis/compiler/models/index.js.map +1 -0
- package/es/apis/compiler/models/mappers.js +554 -0
- package/es/apis/compiler/models/mappers.js.map +1 -0
- package/es/apis/compiler/models/parameters.js +67 -0
- package/es/apis/compiler/models/parameters.js.map +1 -0
- package/es/apis/middleware/index.d.ts +2 -2
- package/es/apis/middleware/index.js +3 -0
- package/es/apis/middleware/index.js.map +1 -0
- package/es/apis/middleware/middleware.d.ts +142 -134
- package/es/apis/middleware/middleware.js +1677 -0
- package/es/apis/middleware/middleware.js.map +1 -0
- package/es/apis/middleware/models/index.d.ts +1998 -819
- package/es/apis/middleware/models/index.js +1364 -0
- package/es/apis/middleware/models/index.js.map +1 -0
- package/es/apis/middleware/models/mappers.d.ts +135 -80
- package/es/apis/middleware/models/mappers.js +6054 -0
- package/es/apis/middleware/models/mappers.js.map +1 -0
- package/es/apis/middleware/models/parameters.d.ts +58 -14
- package/es/apis/middleware/models/parameters.js +909 -0
- package/es/apis/middleware/models/parameters.js.map +1 -0
- package/es/apis/node/index.d.ts +2 -2
- package/es/apis/node/index.js +3 -0
- package/es/apis/node/index.js.map +1 -0
- package/es/apis/node/models/index.d.ts +643 -636
- package/es/apis/node/models/index.js +2 -0
- package/es/apis/node/models/index.js.map +1 -0
- package/es/apis/node/models/mappers.d.ts +55 -55
- package/es/apis/node/models/mappers.js +5322 -0
- package/es/apis/node/models/mappers.js.map +1 -0
- package/es/apis/node/models/parameters.d.ts +5 -5
- package/es/apis/node/models/parameters.js +165 -0
- package/es/apis/node/models/parameters.js.map +1 -0
- package/es/apis/node/node.d.ts +101 -96
- package/es/apis/node/node.js +1238 -0
- package/es/apis/node/node.js.map +1 -0
- package/es/chain.d.ts +21 -21
- package/es/chain.js +442 -0
- package/es/chain.js.map +1 -0
- package/es/channel/Base.d.ts +13 -15
- package/es/channel/Base.js +246 -0
- package/es/channel/Base.js.map +1 -0
- package/es/channel/Contract.d.ts +9 -9
- package/es/channel/Contract.js +382 -0
- package/es/channel/Contract.js.map +1 -0
- package/es/channel/Spend.d.ts +11 -11
- package/es/channel/Spend.js +357 -0
- package/es/channel/Spend.js.map +1 -0
- package/es/channel/handlers.d.ts +4 -3
- package/es/channel/handlers.js +395 -0
- package/es/channel/handlers.js.map +1 -0
- package/es/channel/internal.d.ts +32 -25
- package/es/channel/internal.js +224 -0
- package/es/channel/internal.js.map +1 -0
- package/es/contract/Contract.d.ts +17 -19
- package/es/contract/Contract.js +525 -0
- package/es/contract/Contract.js.map +1 -0
- package/es/contract/compiler/Base.d.ts +1 -1
- package/es/contract/compiler/Base.js +5 -0
- package/es/contract/compiler/Base.js.map +1 -0
- package/es/contract/compiler/Cli.d.ts +2 -2
- package/es/contract/compiler/Cli.js +167 -0
- package/es/contract/compiler/Cli.js.map +1 -0
- package/es/contract/compiler/Http.d.ts +3 -3
- package/es/contract/compiler/Http.js +124 -0
- package/es/contract/compiler/Http.js.map +1 -0
- package/es/contract/compiler/HttpNode.d.ts +3 -3
- package/es/contract/compiler/HttpNode.js +29 -0
- package/es/contract/compiler/HttpNode.js.map +1 -0
- package/es/contract/compiler/getFileSystem.js +32 -0
- package/es/contract/compiler/getFileSystem.js.map +1 -0
- package/es/contract/ga.d.ts +8 -12
- package/es/contract/ga.js +136 -0
- package/es/contract/ga.js.map +1 -0
- package/es/index-browser.d.ts +56 -51
- package/es/index-browser.js +55 -0
- package/es/index-browser.js.map +1 -0
- package/es/index.d.ts +4 -5
- package/es/index.js +5 -0
- package/es/index.js.map +1 -0
- package/es/oracle/Oracle.d.ts +70 -0
- package/es/oracle/Oracle.js +173 -0
- package/es/oracle/Oracle.js.map +1 -0
- package/es/oracle/OracleBase.d.ts +41 -0
- package/es/oracle/OracleBase.js +52 -0
- package/es/oracle/OracleBase.js.map +1 -0
- package/es/oracle/OracleClient.d.ts +57 -0
- package/es/oracle/OracleClient.js +100 -0
- package/es/oracle/OracleClient.js.map +1 -0
- package/es/send-transaction.d.ts +8 -8
- package/es/send-transaction.js +110 -0
- package/es/send-transaction.js.map +1 -0
- package/es/spend.d.ts +8 -13
- package/es/spend.js +93 -0
- package/es/spend.js.map +1 -0
- package/es/tx/builder/SchemaTypes.d.ts +3 -3
- package/es/tx/builder/SchemaTypes.js +2 -0
- package/es/tx/builder/SchemaTypes.js.map +1 -0
- package/es/tx/builder/common.d.ts +2 -2
- package/es/tx/builder/common.js +38 -0
- package/es/tx/builder/common.js.map +1 -0
- package/es/tx/builder/constants.d.ts +2 -26
- package/es/tx/builder/constants.js +120 -0
- package/es/tx/builder/constants.js.map +1 -0
- package/es/tx/builder/delegation/index.d.ts +3 -3
- package/es/tx/builder/delegation/index.js +24 -0
- package/es/tx/builder/delegation/index.js.map +1 -0
- package/es/tx/builder/delegation/schema.d.ts +21 -4
- package/es/tx/builder/delegation/schema.generated.d.ts +2 -2
- package/es/tx/builder/delegation/schema.generated.js +2 -0
- package/es/tx/builder/delegation/schema.generated.js.map +1 -0
- package/es/tx/builder/delegation/schema.js +68 -0
- package/es/tx/builder/delegation/schema.js.map +1 -0
- package/es/tx/builder/entry/constants.d.ts +32 -0
- package/es/tx/builder/entry/constants.js +36 -0
- package/es/tx/builder/entry/constants.js.map +1 -0
- package/es/tx/builder/entry/index.d.ts +38 -0
- package/es/tx/builder/entry/index.js +37 -0
- package/es/tx/builder/entry/index.js.map +1 -0
- package/es/tx/builder/entry/schema.d.ts +1030 -0
- package/es/tx/builder/entry/schema.generated.d.ts +607 -0
- package/es/tx/builder/entry/schema.generated.js +2 -0
- package/es/tx/builder/entry/schema.generated.js.map +1 -0
- package/es/tx/builder/entry/schema.js +204 -0
- package/es/tx/builder/entry/schema.js.map +1 -0
- package/es/tx/builder/field-types/abi-version.d.ts +4 -5
- package/es/tx/builder/field-types/abi-version.js +34 -0
- package/es/tx/builder/field-types/abi-version.js.map +1 -0
- package/es/tx/builder/field-types/address.d.ts +2 -3
- package/es/tx/builder/field-types/address.js +46 -0
- package/es/tx/builder/field-types/address.js.map +1 -0
- package/es/tx/builder/field-types/array.js +11 -0
- package/es/tx/builder/field-types/array.js.map +1 -0
- package/es/tx/builder/field-types/boolean.d.ts +0 -1
- package/es/tx/builder/field-types/boolean.js +10 -0
- package/es/tx/builder/field-types/boolean.js.map +1 -0
- package/es/tx/builder/field-types/coin-amount.d.ts +3 -4
- package/es/tx/builder/field-types/coin-amount.js +18 -0
- package/es/tx/builder/field-types/coin-amount.js.map +1 -0
- package/es/tx/builder/field-types/ct-version.d.ts +4 -19
- package/es/tx/builder/field-types/ct-version.js +58 -0
- package/es/tx/builder/field-types/ct-version.js.map +1 -0
- package/es/tx/builder/field-types/encoded.d.ts +1 -2
- package/es/tx/builder/field-types/encoded.js +18 -0
- package/es/tx/builder/field-types/encoded.js.map +1 -0
- package/es/tx/builder/field-types/entry.d.ts +5 -6
- package/es/tx/builder/field-types/entry.js +26 -0
- package/es/tx/builder/field-types/entry.js.map +1 -0
- package/es/tx/builder/field-types/enumeration.d.ts +0 -1
- package/es/tx/builder/field-types/enumeration.js +27 -0
- package/es/tx/builder/field-types/enumeration.js.map +1 -0
- package/es/tx/builder/field-types/fee.d.ts +9 -10
- package/es/tx/builder/field-types/fee.js +160 -0
- package/es/tx/builder/field-types/fee.js.map +1 -0
- package/es/tx/builder/field-types/field.d.ts +0 -1
- package/es/tx/builder/field-types/field.js +10 -0
- package/es/tx/builder/field-types/field.js.map +1 -0
- package/es/tx/builder/field-types/gas-limit.d.ts +4 -5
- package/es/tx/builder/field-types/gas-limit.js +31 -0
- package/es/tx/builder/field-types/gas-limit.js.map +1 -0
- package/es/tx/builder/field-types/gas-price.d.ts +7 -8
- package/es/tx/builder/field-types/gas-price.js +53 -0
- package/es/tx/builder/field-types/gas-price.js.map +1 -0
- package/es/tx/builder/field-types/interface.d.ts +7 -0
- package/es/tx/builder/field-types/interface.js +2 -0
- package/es/tx/builder/field-types/interface.js.map +1 -0
- package/es/tx/builder/field-types/map.d.ts +6 -7
- package/es/tx/builder/field-types/map.js +38 -0
- package/es/tx/builder/field-types/map.js.map +1 -0
- package/es/tx/builder/field-types/mptree.d.ts +12 -13
- package/es/tx/builder/field-types/mptree.js +223 -0
- package/es/tx/builder/field-types/mptree.js.map +1 -0
- package/es/tx/builder/field-types/name-fee.d.ts +3 -4
- package/es/tx/builder/field-types/name-fee.js +22 -0
- package/es/tx/builder/field-types/name-fee.js.map +1 -0
- package/es/tx/builder/field-types/name-id.d.ts +2 -3
- package/es/tx/builder/field-types/name-id.js +14 -0
- package/es/tx/builder/field-types/name-id.js.map +1 -0
- package/es/tx/builder/field-types/name.d.ts +1 -2
- package/es/tx/builder/field-types/name.js +16 -0
- package/es/tx/builder/field-types/name.js.map +1 -0
- package/es/tx/builder/field-types/nonce.d.ts +6 -4
- package/es/tx/builder/field-types/nonce.js +40 -0
- package/es/tx/builder/field-types/nonce.js.map +1 -0
- package/es/tx/builder/field-types/pointers.d.ts +9 -18
- package/es/tx/builder/field-types/pointers.js +69 -0
- package/es/tx/builder/field-types/pointers.js.map +1 -0
- package/es/tx/builder/field-types/query-fee.d.ts +4 -5
- package/es/tx/builder/field-types/query-fee.js +21 -0
- package/es/tx/builder/field-types/query-fee.js.map +1 -0
- package/es/tx/builder/field-types/raw.d.ts +0 -1
- package/es/tx/builder/field-types/raw.js +10 -0
- package/es/tx/builder/field-types/raw.js.map +1 -0
- package/es/tx/builder/field-types/short-u-int-const.d.ts +0 -1
- package/es/tx/builder/field-types/short-u-int-const.js +20 -0
- package/es/tx/builder/field-types/short-u-int-const.js.map +1 -0
- package/es/tx/builder/field-types/short-u-int.d.ts +0 -1
- package/es/tx/builder/field-types/short-u-int.js +10 -0
- package/es/tx/builder/field-types/short-u-int.js.map +1 -0
- package/es/tx/builder/field-types/string.d.ts +0 -1
- package/es/tx/builder/field-types/string.js +10 -0
- package/es/tx/builder/field-types/string.js.map +1 -0
- package/es/tx/builder/field-types/transaction.d.ts +10 -0
- package/es/tx/builder/field-types/transaction.js +26 -0
- package/es/tx/builder/field-types/transaction.js.map +1 -0
- package/es/tx/builder/field-types/ttl.d.ts +6 -11
- package/es/tx/builder/field-types/ttl.js +33 -0
- package/es/tx/builder/field-types/ttl.js.map +1 -0
- package/es/tx/builder/field-types/u-int.d.ts +1 -2
- package/es/tx/builder/field-types/u-int.js +13 -0
- package/es/tx/builder/field-types/u-int.js.map +1 -0
- package/es/tx/builder/field-types/with-default.js +9 -0
- package/es/tx/builder/field-types/with-default.js.map +1 -0
- package/es/tx/builder/field-types/with-formatting.js +9 -0
- package/es/tx/builder/field-types/with-formatting.js.map +1 -0
- package/es/tx/builder/field-types/wrapped.d.ts +5 -6
- package/es/tx/builder/field-types/wrapped.js +20 -0
- package/es/tx/builder/field-types/wrapped.js.map +1 -0
- package/es/tx/builder/helpers.d.ts +5 -6
- package/es/tx/builder/helpers.js +207 -0
- package/es/tx/builder/helpers.js.map +1 -0
- package/es/tx/builder/index.d.ts +4 -13
- package/es/tx/builder/index.js +91 -0
- package/es/tx/builder/index.js.map +1 -0
- package/es/tx/builder/schema.d.ts +583 -1723
- package/es/tx/builder/schema.generated.d.ts +36 -992
- package/es/tx/builder/schema.generated.js +2 -0
- package/es/tx/builder/schema.generated.js.map +1 -0
- package/es/tx/builder/schema.js +355 -0
- package/es/tx/builder/schema.js.map +1 -0
- package/es/tx/execution-cost.d.ts +2 -2
- package/es/tx/execution-cost.js +140 -0
- package/es/tx/execution-cost.js.map +1 -0
- package/es/tx/transaction-signer.d.ts +1 -1
- package/es/tx/transaction-signer.js +24 -0
- package/es/tx/transaction-signer.js.map +1 -0
- package/es/tx/validator.d.ts +2 -2
- package/es/tx/validator.js +206 -0
- package/es/tx/validator.js.map +1 -0
- package/es/typings/blakejs/index.d.js +2 -0
- package/es/typings/blakejs/index.d.js.map +1 -0
- package/es/typings/sha-js/index.d.js +2 -0
- package/es/typings/sha-js/index.d.js.map +1 -0
- package/es/typings/tweetnacl-auth/index.d.js +2 -0
- package/es/typings/tweetnacl-auth/index.d.js.map +1 -0
- package/es/utils/MiddlewarePage.d.ts +36 -0
- package/es/utils/MiddlewarePage.js +57 -0
- package/es/utils/MiddlewarePage.js.map +1 -0
- package/es/utils/amount-formatter.d.ts +6 -6
- package/es/utils/amount-formatter.js +97 -0
- package/es/utils/amount-formatter.js.map +1 -0
- package/es/utils/autorest.d.ts +6 -1
- package/es/utils/autorest.js +206 -0
- package/es/utils/autorest.js.map +1 -0
- package/es/utils/bignumber.d.ts +1 -1
- package/es/utils/bignumber.js +21 -0
- package/es/utils/bignumber.js.map +1 -0
- package/es/utils/bytes.d.ts +1 -2
- package/es/utils/bytes.js +30 -0
- package/es/utils/bytes.js.map +1 -0
- package/es/utils/crypto.d.ts +2 -46
- package/es/utils/crypto.js +111 -0
- package/es/utils/crypto.js.map +1 -0
- package/es/utils/encoder-types.d.ts +2 -0
- package/es/utils/encoder-types.js +36 -0
- package/es/utils/encoder-types.js.map +1 -0
- package/es/utils/encoder.d.ts +2 -3
- package/es/utils/encoder.js +104 -0
- package/es/utils/encoder.js.map +1 -0
- package/es/utils/errors.d.ts +4 -10
- package/es/utils/errors.js +746 -0
- package/es/utils/errors.js.map +1 -0
- package/es/utils/json-big.d.ts +1 -1
- package/es/utils/json-big.js +25 -0
- package/es/utils/json-big.js.map +1 -0
- package/es/utils/jwt.d.ts +2 -2
- package/es/utils/jwt.js +112 -0
- package/es/utils/jwt.js.map +1 -0
- package/es/utils/other.d.ts +4 -4
- package/es/utils/other.js +48 -0
- package/es/utils/other.js.map +1 -0
- package/es/utils/semver-satisfies.js +12 -0
- package/es/utils/semver-satisfies.js.map +1 -0
- package/es/utils/string.js +18 -0
- package/es/utils/string.js.map +1 -0
- package/es/utils/typed-data.d.ts +1 -2
- package/es/utils/typed-data.js +52 -0
- package/es/utils/typed-data.js.map +1 -0
- package/es/utils/wrap-proxy.js +15 -0
- package/es/utils/wrap-proxy.js.map +1 -0
- package/package.json +85 -105
- package/bin/aesophia_cli_8 +0 -0
- package/dist/aepp-sdk.browser-script.js +0 -3
- package/dist/aepp-sdk.browser-script.js.LICENSE.txt +0 -12
- package/dist/aepp-sdk.browser-script.js.map +0 -1
- package/dist/aepp-sdk.browser.js +0 -3
- package/dist/aepp-sdk.browser.js.map +0 -1
- package/dist/aepp-sdk.js +0 -30474
- package/dist/aepp-sdk.js.map +0 -1
- package/es/AeSdk.mjs +0 -76
- package/es/AeSdk.mjs.map +0 -1
- package/es/AeSdkAepp.mjs +0 -145
- package/es/AeSdkAepp.mjs.map +0 -1
- package/es/AeSdkBase.mjs +0 -289
- package/es/AeSdkBase.mjs.map +0 -1
- package/es/AeSdkMethods.mjs +0 -92
- package/es/AeSdkMethods.mjs.map +0 -1
- package/es/AeSdkWallet.mjs +0 -365
- package/es/AeSdkWallet.mjs.map +0 -1
- package/es/Middleware.mjs +0 -94
- package/es/Middleware.mjs.map +0 -1
- package/es/MiddlewareSubscriber.mjs +0 -189
- package/es/MiddlewareSubscriber.mjs.map +0 -1
- package/es/Node.mjs +0 -148
- package/es/Node.mjs.map +0 -1
- package/es/account/Base.mjs +0 -134
- package/es/account/Base.mjs.map +0 -1
- package/es/account/Generalized.mjs +0 -129
- package/es/account/Generalized.mjs.map +0 -1
- package/es/account/Ledger.mjs +0 -131
- package/es/account/Ledger.mjs.map +0 -1
- package/es/account/LedgerFactory.mjs +0 -79
- package/es/account/LedgerFactory.mjs.map +0 -1
- package/es/account/Memory.mjs +0 -187
- package/es/account/Memory.mjs.map +0 -1
- package/es/account/Rpc.mjs +0 -178
- package/es/account/Rpc.mjs.map +0 -1
- package/es/aens.mjs +0 -290
- package/es/aens.mjs.map +0 -1
- package/es/aepp-wallet-communication/connection/Browser.mjs +0 -52
- package/es/aepp-wallet-communication/connection/Browser.mjs.map +0 -1
- package/es/aepp-wallet-communication/connection/BrowserRuntime.mjs +0 -55
- package/es/aepp-wallet-communication/connection/BrowserRuntime.mjs.map +0 -1
- package/es/aepp-wallet-communication/connection/BrowserWindowMessage.mjs +0 -98
- package/es/aepp-wallet-communication/connection/BrowserWindowMessage.mjs.map +0 -1
- package/es/aepp-wallet-communication/connection-proxy.mjs +0 -17
- package/es/aepp-wallet-communication/connection-proxy.mjs.map +0 -1
- package/es/aepp-wallet-communication/rpc/RpcClient.mjs +0 -134
- package/es/aepp-wallet-communication/rpc/RpcClient.mjs.map +0 -1
- package/es/aepp-wallet-communication/rpc/types.mjs +0 -3
- package/es/aepp-wallet-communication/rpc/types.mjs.map +0 -1
- package/es/aepp-wallet-communication/schema.mjs +0 -187
- package/es/aepp-wallet-communication/schema.mjs.map +0 -1
- package/es/aepp-wallet-communication/wallet-detector.mjs +0 -44
- package/es/aepp-wallet-communication/wallet-detector.mjs.map +0 -1
- package/es/apis/compiler/compiler.mjs +0 -513
- package/es/apis/compiler/compiler.mjs.map +0 -1
- package/es/apis/compiler/index.mjs +0 -3
- package/es/apis/compiler/index.mjs.map +0 -1
- package/es/apis/compiler/models/index.mjs +0 -2
- package/es/apis/compiler/models/index.mjs.map +0 -1
- package/es/apis/compiler/models/mappers.mjs +0 -554
- package/es/apis/compiler/models/mappers.mjs.map +0 -1
- package/es/apis/compiler/models/parameters.mjs +0 -67
- package/es/apis/compiler/models/parameters.mjs.map +0 -1
- package/es/apis/middleware/index.mjs +0 -3
- package/es/apis/middleware/index.mjs.map +0 -1
- package/es/apis/middleware/middleware.mjs +0 -1623
- package/es/apis/middleware/middleware.mjs.map +0 -1
- package/es/apis/middleware/models/index.mjs +0 -630
- package/es/apis/middleware/models/index.mjs.map +0 -1
- package/es/apis/middleware/models/mappers.mjs +0 -3707
- package/es/apis/middleware/models/mappers.mjs.map +0 -1
- package/es/apis/middleware/models/parameters.mjs +0 -444
- package/es/apis/middleware/models/parameters.mjs.map +0 -1
- package/es/apis/node/index.mjs +0 -3
- package/es/apis/node/index.mjs.map +0 -1
- package/es/apis/node/models/index.mjs +0 -2
- package/es/apis/node/models/index.mjs.map +0 -1
- package/es/apis/node/models/mappers.mjs +0 -4395
- package/es/apis/node/models/mappers.mjs.map +0 -1
- package/es/apis/node/models/parameters.mjs +0 -165
- package/es/apis/node/models/parameters.mjs.map +0 -1
- package/es/apis/node/node.mjs +0 -1240
- package/es/apis/node/node.mjs.map +0 -1
- package/es/chain.mjs +0 -441
- package/es/chain.mjs.map +0 -1
- package/es/channel/Base.mjs +0 -254
- package/es/channel/Base.mjs.map +0 -1
- package/es/channel/Contract.mjs +0 -383
- package/es/channel/Contract.mjs.map +0 -1
- package/es/channel/Spend.mjs +0 -357
- package/es/channel/Spend.mjs.map +0 -1
- package/es/channel/handlers.mjs +0 -383
- package/es/channel/handlers.mjs.map +0 -1
- package/es/channel/internal.mjs +0 -237
- package/es/channel/internal.mjs.map +0 -1
- package/es/contract/Contract.mjs +0 -540
- package/es/contract/Contract.mjs.map +0 -1
- package/es/contract/compiler/Base.mjs +0 -5
- package/es/contract/compiler/Base.mjs.map +0 -1
- package/es/contract/compiler/Cli.mjs +0 -197
- package/es/contract/compiler/Cli.mjs.map +0 -1
- package/es/contract/compiler/Cli8.d.ts +0 -13
- package/es/contract/compiler/Cli8.mjs +0 -22
- package/es/contract/compiler/Cli8.mjs.map +0 -1
- package/es/contract/compiler/Http.mjs +0 -126
- package/es/contract/compiler/Http.mjs.map +0 -1
- package/es/contract/compiler/HttpNode.mjs +0 -31
- package/es/contract/compiler/HttpNode.mjs.map +0 -1
- package/es/contract/compiler/getFileSystem.mjs +0 -40
- package/es/contract/compiler/getFileSystem.mjs.map +0 -1
- package/es/contract/delegation-signature.d.ts +0 -45
- package/es/contract/delegation-signature.mjs +0 -80
- package/es/contract/delegation-signature.mjs.map +0 -1
- package/es/contract/ga.mjs +0 -135
- package/es/contract/ga.mjs.map +0 -1
- package/es/deprecated.d.ts +0 -62
- package/es/deprecated.mjs +0 -87
- package/es/deprecated.mjs.map +0 -1
- package/es/index-browser.mjs +0 -49
- package/es/index-browser.mjs.map +0 -1
- package/es/index.mjs +0 -6
- package/es/index.mjs.map +0 -1
- package/es/oracle.d.ts +0 -125
- package/es/oracle.mjs +0 -242
- package/es/oracle.mjs.map +0 -1
- package/es/send-transaction.mjs +0 -109
- package/es/send-transaction.mjs.map +0 -1
- package/es/spend.mjs +0 -90
- package/es/spend.mjs.map +0 -1
- package/es/tx/builder/SchemaTypes.mjs +0 -2
- package/es/tx/builder/SchemaTypes.mjs.map +0 -1
- package/es/tx/builder/common.mjs +0 -42
- package/es/tx/builder/common.mjs.map +0 -1
- package/es/tx/builder/constants.mjs +0 -147
- package/es/tx/builder/constants.mjs.map +0 -1
- package/es/tx/builder/delegation/index.mjs +0 -24
- package/es/tx/builder/delegation/index.mjs.map +0 -1
- package/es/tx/builder/delegation/schema.generated.mjs +0 -2
- package/es/tx/builder/delegation/schema.generated.mjs.map +0 -1
- package/es/tx/builder/delegation/schema.mjs +0 -54
- package/es/tx/builder/delegation/schema.mjs.map +0 -1
- package/es/tx/builder/field-types/abi-version.mjs +0 -37
- package/es/tx/builder/field-types/abi-version.mjs.map +0 -1
- package/es/tx/builder/field-types/address.mjs +0 -48
- package/es/tx/builder/field-types/address.mjs.map +0 -1
- package/es/tx/builder/field-types/array.mjs +0 -11
- package/es/tx/builder/field-types/array.mjs.map +0 -1
- package/es/tx/builder/field-types/boolean.mjs +0 -13
- package/es/tx/builder/field-types/boolean.mjs.map +0 -1
- package/es/tx/builder/field-types/coin-amount.mjs +0 -18
- package/es/tx/builder/field-types/coin-amount.mjs.map +0 -1
- package/es/tx/builder/field-types/ct-version.mjs +0 -75
- package/es/tx/builder/field-types/ct-version.mjs.map +0 -1
- package/es/tx/builder/field-types/encoded.mjs +0 -21
- package/es/tx/builder/field-types/encoded.mjs.map +0 -1
- package/es/tx/builder/field-types/entry.mjs +0 -29
- package/es/tx/builder/field-types/entry.mjs.map +0 -1
- package/es/tx/builder/field-types/enumeration.mjs +0 -30
- package/es/tx/builder/field-types/enumeration.mjs.map +0 -1
- package/es/tx/builder/field-types/fee.mjs +0 -160
- package/es/tx/builder/field-types/fee.mjs.map +0 -1
- package/es/tx/builder/field-types/field.mjs +0 -13
- package/es/tx/builder/field-types/field.mjs.map +0 -1
- package/es/tx/builder/field-types/gas-limit.mjs +0 -31
- package/es/tx/builder/field-types/gas-limit.mjs.map +0 -1
- package/es/tx/builder/field-types/gas-price.mjs +0 -60
- package/es/tx/builder/field-types/gas-price.mjs.map +0 -1
- package/es/tx/builder/field-types/index.d.ts +0 -39
- package/es/tx/builder/field-types/index.mjs +0 -32
- package/es/tx/builder/field-types/index.mjs.map +0 -1
- package/es/tx/builder/field-types/map.mjs +0 -38
- package/es/tx/builder/field-types/map.mjs.map +0 -1
- package/es/tx/builder/field-types/mptree.mjs +0 -251
- package/es/tx/builder/field-types/mptree.mjs.map +0 -1
- package/es/tx/builder/field-types/name-fee.mjs +0 -22
- package/es/tx/builder/field-types/name-fee.mjs.map +0 -1
- package/es/tx/builder/field-types/name-id.mjs +0 -14
- package/es/tx/builder/field-types/name-id.mjs.map +0 -1
- package/es/tx/builder/field-types/name.mjs +0 -16
- package/es/tx/builder/field-types/name.mjs.map +0 -1
- package/es/tx/builder/field-types/nonce.mjs +0 -31
- package/es/tx/builder/field-types/nonce.mjs.map +0 -1
- package/es/tx/builder/field-types/pointers.mjs +0 -33
- package/es/tx/builder/field-types/pointers.mjs.map +0 -1
- package/es/tx/builder/field-types/pointers2.d.ts +0 -23
- package/es/tx/builder/field-types/pointers2.mjs +0 -65
- package/es/tx/builder/field-types/pointers2.mjs.map +0 -1
- package/es/tx/builder/field-types/query-fee.mjs +0 -20
- package/es/tx/builder/field-types/query-fee.mjs.map +0 -1
- package/es/tx/builder/field-types/raw.mjs +0 -13
- package/es/tx/builder/field-types/raw.mjs.map +0 -1
- package/es/tx/builder/field-types/short-u-int-const.mjs +0 -20
- package/es/tx/builder/field-types/short-u-int-const.mjs.map +0 -1
- package/es/tx/builder/field-types/short-u-int.mjs +0 -10
- package/es/tx/builder/field-types/short-u-int.mjs.map +0 -1
- package/es/tx/builder/field-types/string.mjs +0 -10
- package/es/tx/builder/field-types/string.mjs.map +0 -1
- package/es/tx/builder/field-types/ttl.mjs +0 -32
- package/es/tx/builder/field-types/ttl.mjs.map +0 -1
- package/es/tx/builder/field-types/u-int.mjs +0 -13
- package/es/tx/builder/field-types/u-int.mjs.map +0 -1
- package/es/tx/builder/field-types/with-default.mjs +0 -9
- package/es/tx/builder/field-types/with-default.mjs.map +0 -1
- package/es/tx/builder/field-types/with-formatting.mjs +0 -9
- package/es/tx/builder/field-types/with-formatting.mjs.map +0 -1
- package/es/tx/builder/field-types/wrapped.mjs +0 -20
- package/es/tx/builder/field-types/wrapped.mjs.map +0 -1
- package/es/tx/builder/helpers.mjs +0 -200
- package/es/tx/builder/helpers.mjs.map +0 -1
- package/es/tx/builder/index.mjs +0 -98
- package/es/tx/builder/index.mjs.map +0 -1
- package/es/tx/builder/schema.generated.mjs +0 -2
- package/es/tx/builder/schema.generated.mjs.map +0 -1
- package/es/tx/builder/schema.mjs +0 -513
- package/es/tx/builder/schema.mjs.map +0 -1
- package/es/tx/execution-cost.mjs +0 -139
- package/es/tx/execution-cost.mjs.map +0 -1
- package/es/tx/transaction-signer.mjs +0 -24
- package/es/tx/transaction-signer.mjs.map +0 -1
- package/es/tx/validator.mjs +0 -214
- package/es/tx/validator.mjs.map +0 -1
- package/es/typings/@aeternity__uuid/index.d.mjs +0 -2
- package/es/typings/@aeternity__uuid/index.d.mjs.map +0 -1
- package/es/typings/bip32-path/index.d.mjs +0 -2
- package/es/typings/bip32-path/index.d.mjs.map +0 -1
- package/es/typings/blakejs/index.d.mjs +0 -2
- package/es/typings/blakejs/index.d.mjs.map +0 -1
- package/es/typings/sha-js/index.d.mjs +0 -2
- package/es/typings/sha-js/index.d.mjs.map +0 -1
- package/es/typings/tweetnacl-auth/index.d.mjs +0 -2
- package/es/typings/tweetnacl-auth/index.d.mjs.map +0 -1
- package/es/utils/amount-formatter.mjs +0 -97
- package/es/utils/amount-formatter.mjs.map +0 -1
- package/es/utils/autorest.mjs +0 -141
- package/es/utils/autorest.mjs.map +0 -1
- package/es/utils/bignumber.mjs +0 -21
- package/es/utils/bignumber.mjs.map +0 -1
- package/es/utils/bytes.mjs +0 -32
- package/es/utils/bytes.mjs.map +0 -1
- package/es/utils/crypto.mjs +0 -193
- package/es/utils/crypto.mjs.map +0 -1
- package/es/utils/encoder-types.mjs +0 -35
- package/es/utils/encoder-types.mjs.map +0 -1
- package/es/utils/encoder.mjs +0 -110
- package/es/utils/encoder.mjs.map +0 -1
- package/es/utils/errors.mjs +0 -756
- package/es/utils/errors.mjs.map +0 -1
- package/es/utils/hd-wallet.d.ts +0 -60
- package/es/utils/hd-wallet.mjs +0 -169
- package/es/utils/hd-wallet.mjs.map +0 -1
- package/es/utils/json-big.mjs +0 -25
- package/es/utils/json-big.mjs.map +0 -1
- package/es/utils/jwt.mjs +0 -120
- package/es/utils/jwt.mjs.map +0 -1
- package/es/utils/keystore.d.ts +0 -57
- package/es/utils/keystore.mjs +0 -140
- package/es/utils/keystore.mjs.map +0 -1
- package/es/utils/other.mjs +0 -49
- package/es/utils/other.mjs.map +0 -1
- package/es/utils/semver-satisfies.mjs +0 -12
- package/es/utils/semver-satisfies.mjs.map +0 -1
- package/es/utils/string.mjs +0 -18
- package/es/utils/string.mjs.map +0 -1
- package/es/utils/typed-data.mjs +0 -55
- package/es/utils/typed-data.mjs.map +0 -1
- package/es/utils/wrap-proxy.mjs +0 -15
- package/es/utils/wrap-proxy.mjs.map +0 -1
- package/src/AeSdk.ts +0 -75
- package/src/AeSdkAepp.ts +0 -179
- package/src/AeSdkBase.ts +0 -315
- package/src/AeSdkMethods.ts +0 -149
- package/src/AeSdkWallet.ts +0 -382
- package/src/Middleware.ts +0 -149
- package/src/MiddlewareSubscriber.ts +0 -207
- package/src/Node.ts +0 -213
- package/src/account/Base.ts +0 -224
- package/src/account/Generalized.ts +0 -113
- package/src/account/Ledger.ts +0 -161
- package/src/account/LedgerFactory.ts +0 -86
- package/src/account/Memory.ts +0 -218
- package/src/account/Rpc.ts +0 -170
- package/src/aens.ts +0 -372
- package/src/aepp-wallet-communication/connection/Browser.ts +0 -54
- package/src/aepp-wallet-communication/connection/BrowserRuntime.ts +0 -57
- package/src/aepp-wallet-communication/connection/BrowserWindowMessage.ts +0 -105
- package/src/aepp-wallet-communication/connection-proxy.ts +0 -19
- package/src/aepp-wallet-communication/rpc/RpcClient.ts +0 -153
- package/src/aepp-wallet-communication/rpc/types.ts +0 -115
- package/src/aepp-wallet-communication/schema.ts +0 -212
- package/src/aepp-wallet-communication/wallet-detector.ts +0 -54
- package/src/apis/compiler/compiler.ts +0 -527
- package/src/apis/compiler/index.ts +0 -2
- package/src/apis/compiler/models/index.ts +0 -236
- package/src/apis/compiler/models/mappers.ts +0 -555
- package/src/apis/compiler/models/parameters.ts +0 -87
- package/src/apis/middleware/index.ts +0 -2
- package/src/apis/middleware/middleware.ts +0 -1928
- package/src/apis/middleware/models/index.ts +0 -1949
- package/src/apis/middleware/models/mappers.ts +0 -3808
- package/src/apis/middleware/models/parameters.ts +0 -493
- package/src/apis/node/index.ts +0 -2
- package/src/apis/node/models/index.ts +0 -1335
- package/src/apis/node/models/mappers.ts +0 -4508
- package/src/apis/node/models/parameters.ts +0 -188
- package/src/apis/node/node.ts +0 -1420
- package/src/chain.ts +0 -433
- package/src/channel/Base.ts +0 -302
- package/src/channel/Contract.ts +0 -465
- package/src/channel/Spend.ts +0 -385
- package/src/channel/handlers.ts +0 -386
- package/src/channel/internal.ts +0 -454
- package/src/contract/Contract.ts +0 -629
- package/src/contract/compiler/Base.ts +0 -123
- package/src/contract/compiler/Cli.ts +0 -173
- package/src/contract/compiler/Cli8.ts +0 -17
- package/src/contract/compiler/Http.ts +0 -134
- package/src/contract/compiler/HttpNode.ts +0 -32
- package/src/contract/compiler/getFileSystem.ts +0 -42
- package/src/contract/delegation-signature.ts +0 -88
- package/src/contract/ga.ts +0 -138
- package/src/deprecated.ts +0 -77
- package/src/index-browser.ts +0 -121
- package/src/index.ts +0 -6
- package/src/oracle.ts +0 -311
- package/src/send-transaction.ts +0 -136
- package/src/spend.ts +0 -136
- package/src/tx/builder/SchemaTypes.ts +0 -79
- package/src/tx/builder/common.ts +0 -74
- package/src/tx/builder/constants.ts +0 -155
- package/src/tx/builder/delegation/index.ts +0 -28
- package/src/tx/builder/delegation/schema.generated.ts +0 -143
- package/src/tx/builder/delegation/schema.ts +0 -61
- package/src/tx/builder/field-types/abi-version.ts +0 -44
- package/src/tx/builder/field-types/address.ts +0 -62
- package/src/tx/builder/field-types/array.ts +0 -19
- package/src/tx/builder/field-types/boolean.ts +0 -9
- package/src/tx/builder/field-types/coin-amount.ts +0 -26
- package/src/tx/builder/field-types/ct-version.ts +0 -83
- package/src/tx/builder/field-types/encoded.ts +0 -27
- package/src/tx/builder/field-types/entry.ts +0 -33
- package/src/tx/builder/field-types/enumeration.ts +0 -32
- package/src/tx/builder/field-types/fee.ts +0 -191
- package/src/tx/builder/field-types/field.ts +0 -9
- package/src/tx/builder/field-types/gas-limit.ts +0 -46
- package/src/tx/builder/field-types/gas-price.ts +0 -67
- package/src/tx/builder/field-types/index.ts +0 -40
- package/src/tx/builder/field-types/map.ts +0 -45
- package/src/tx/builder/field-types/mptree.ts +0 -243
- package/src/tx/builder/field-types/name-fee.ts +0 -32
- package/src/tx/builder/field-types/name-id.ts +0 -17
- package/src/tx/builder/field-types/name.ts +0 -18
- package/src/tx/builder/field-types/nonce.ts +0 -46
- package/src/tx/builder/field-types/pointers.ts +0 -41
- package/src/tx/builder/field-types/pointers2.ts +0 -62
- package/src/tx/builder/field-types/query-fee.ts +0 -25
- package/src/tx/builder/field-types/raw.ts +0 -9
- package/src/tx/builder/field-types/short-u-int-const.ts +0 -30
- package/src/tx/builder/field-types/short-u-int.ts +0 -11
- package/src/tx/builder/field-types/string.ts +0 -11
- package/src/tx/builder/field-types/ttl.ts +0 -34
- package/src/tx/builder/field-types/u-int.ts +0 -15
- package/src/tx/builder/field-types/with-default.ts +0 -18
- package/src/tx/builder/field-types/with-formatting.ts +0 -18
- package/src/tx/builder/field-types/wrapped.ts +0 -32
- package/src/tx/builder/helpers.ts +0 -243
- package/src/tx/builder/index.ts +0 -123
- package/src/tx/builder/schema.generated.ts +0 -2049
- package/src/tx/builder/schema.ts +0 -612
- package/src/tx/execution-cost.ts +0 -164
- package/src/tx/transaction-signer.ts +0 -27
- package/src/tx/validator.ts +0 -222
- package/src/typings/@aeternity__uuid/index.d.ts +0 -5
- package/src/typings/bip32-path/index.d.ts +0 -33
- package/src/typings/blakejs/index.d.ts +0 -5
- package/src/typings/sha-js/index.d.ts +0 -5
- package/src/typings/tweetnacl-auth/index.d.ts +0 -14
- package/src/utils/amount-formatter.ts +0 -98
- package/src/utils/autorest.ts +0 -153
- package/src/utils/bignumber.ts +0 -21
- package/src/utils/bytes.ts +0 -28
- package/src/utils/crypto.ts +0 -216
- package/src/utils/encoder-types.ts +0 -63
- package/src/utils/encoder.ts +0 -145
- package/src/utils/errors.ts +0 -777
- package/src/utils/hd-wallet.ts +0 -189
- package/src/utils/json-big.ts +0 -27
- package/src/utils/jwt.ts +0 -126
- package/src/utils/keystore.ts +0 -189
- package/src/utils/other.ts +0 -64
- package/src/utils/semver-satisfies.ts +0 -22
- package/src/utils/string.ts +0 -17
- package/src/utils/typed-data.ts +0 -69
- package/src/utils/wrap-proxy.ts +0 -24
- package/types-legacy/ts4.2/AeSdk.d.ts +0 -44
- package/types-legacy/ts4.2/AeSdkAepp.d.ts +0 -71
- package/types-legacy/ts4.2/AeSdkBase.d.ts +0 -164
- package/types-legacy/ts4.2/AeSdkMethods.d.ts +0 -146
- package/types-legacy/ts4.2/AeSdkWallet.d.ts +0 -90
- package/types-legacy/ts4.2/Middleware.d.ts +0 -46
- package/types-legacy/ts4.2/MiddlewareSubscriber.d.ts +0 -30
- package/types-legacy/ts4.2/Node.d.ts +0 -95
- package/types-legacy/ts4.2/account/Base.d.ts +0 -147
- package/types-legacy/ts4.2/account/Generalized.d.ts +0 -22
- package/types-legacy/ts4.2/account/Ledger.d.ts +0 -34
- package/types-legacy/ts4.2/account/LedgerFactory.d.ts +0 -39
- package/types-legacy/ts4.2/account/Memory.d.ts +0 -46
- package/types-legacy/ts4.2/account/Rpc.d.ts +0 -35
- package/types-legacy/ts4.2/aens.d.ts +0 -193
- package/types-legacy/ts4.2/aepp-wallet-communication/connection/Browser.d.ts +0 -33
- package/types-legacy/ts4.2/aepp-wallet-communication/connection/BrowserRuntime.d.ts +0 -22
- package/types-legacy/ts4.2/aepp-wallet-communication/connection/BrowserWindowMessage.d.ts +0 -36
- package/types-legacy/ts4.2/aepp-wallet-communication/connection-proxy.d.ts +0 -11
- package/types-legacy/ts4.2/aepp-wallet-communication/rpc/RpcClient.d.ts +0 -34
- package/types-legacy/ts4.2/aepp-wallet-communication/rpc/types.d.ts +0 -120
- package/types-legacy/ts4.2/aepp-wallet-communication/schema.d.ts +0 -129
- package/types-legacy/ts4.2/aepp-wallet-communication/wallet-detector.d.ts +0 -22
- package/types-legacy/ts4.2/apis/compiler/compiler.d.ts +0 -86
- package/types-legacy/ts4.2/apis/compiler/index.d.ts +0 -2
- package/types-legacy/ts4.2/apis/compiler/models/index.d.ts +0 -191
- package/types-legacy/ts4.2/apis/compiler/models/mappers.d.ts +0 -22
- package/types-legacy/ts4.2/apis/compiler/models/parameters.d.ts +0 -12
- package/types-legacy/ts4.2/apis/middleware/index.d.ts +0 -2
- package/types-legacy/ts4.2/apis/middleware/middleware.d.ts +0 -327
- package/types-legacy/ts4.2/apis/middleware/models/index.d.ts +0 -1645
- package/types-legacy/ts4.2/apis/middleware/models/mappers.d.ts +0 -109
- package/types-legacy/ts4.2/apis/middleware/models/parameters.d.ts +0 -46
- package/types-legacy/ts4.2/apis/node/index.d.ts +0 -2
- package/types-legacy/ts4.2/apis/node/models/index.d.ts +0 -1129
- package/types-legacy/ts4.2/apis/node/models/mappers.d.ts +0 -99
- package/types-legacy/ts4.2/apis/node/models/parameters.d.ts +0 -17
- package/types-legacy/ts4.2/apis/node/node.d.ts +0 -236
- package/types-legacy/ts4.2/chain.d.ts +0 -227
- package/types-legacy/ts4.2/channel/Base.d.ts +0 -168
- package/types-legacy/ts4.2/channel/Contract.d.ts +0 -239
- package/types-legacy/ts4.2/channel/Spend.d.ts +0 -213
- package/types-legacy/ts4.2/channel/handlers.d.ts +0 -21
- package/types-legacy/ts4.2/channel/internal.d.ts +0 -226
- package/types-legacy/ts4.2/contract/Contract.d.ts +0 -164
- package/types-legacy/ts4.2/contract/compiler/Base.d.ts +0 -104
- package/types-legacy/ts4.2/contract/compiler/Cli.d.ts +0 -26
- package/types-legacy/ts4.2/contract/compiler/Cli8.d.ts +0 -13
- package/types-legacy/ts4.2/contract/compiler/Http.d.ts +0 -28
- package/types-legacy/ts4.2/contract/compiler/HttpNode.d.ts +0 -15
- package/types-legacy/ts4.2/contract/compiler/getFileSystem.d.ts +0 -6
- package/types-legacy/ts4.2/contract/delegation-signature.d.ts +0 -45
- package/types-legacy/ts4.2/contract/ga.d.ts +0 -59
- package/types-legacy/ts4.2/deprecated.d.ts +0 -62
- package/types-legacy/ts4.2/globals.d.ts +0 -16
- package/types-legacy/ts4.2/index-browser.d.ts +0 -51
- package/types-legacy/ts4.2/index.d.ts +0 -6
- package/types-legacy/ts4.2/oracle.d.ts +0 -125
- package/types-legacy/ts4.2/send-transaction.d.ts +0 -53
- package/types-legacy/ts4.2/spend.d.ts +0 -56
- package/types-legacy/ts4.2/tx/builder/SchemaTypes.d.ts +0 -37
- package/types-legacy/ts4.2/tx/builder/common.d.ts +0 -32
- package/types-legacy/ts4.2/tx/builder/constants.d.ts +0 -100
- package/types-legacy/ts4.2/tx/builder/delegation/index.d.ts +0 -20
- package/types-legacy/ts4.2/tx/builder/delegation/schema.d.ts +0 -136
- package/types-legacy/ts4.2/tx/builder/delegation/schema.generated.d.ts +0 -141
- package/types-legacy/ts4.2/tx/builder/field-types/abi-version.d.ts +0 -19
- package/types-legacy/ts4.2/tx/builder/field-types/address.d.ts +0 -21
- package/types-legacy/ts4.2/tx/builder/field-types/array.d.ts +0 -7
- package/types-legacy/ts4.2/tx/builder/field-types/boolean.d.ts +0 -6
- package/types-legacy/ts4.2/tx/builder/field-types/coin-amount.d.ts +0 -11
- package/types-legacy/ts4.2/tx/builder/field-types/ct-version.d.ts +0 -72
- package/types-legacy/ts4.2/tx/builder/field-types/encoded.d.ts +0 -6
- package/types-legacy/ts4.2/tx/builder/field-types/entry.d.ts +0 -11
- package/types-legacy/ts4.2/tx/builder/field-types/enumeration.d.ts +0 -7
- package/types-legacy/ts4.2/tx/builder/field-types/fee.d.ts +0 -30
- package/types-legacy/ts4.2/tx/builder/field-types/field.d.ts +0 -6
- package/types-legacy/ts4.2/tx/builder/field-types/gas-limit.d.ts +0 -16
- package/types-legacy/ts4.2/tx/builder/field-types/gas-price.d.ts +0 -17
- package/types-legacy/ts4.2/tx/builder/field-types/index.d.ts +0 -45
- package/types-legacy/ts4.2/tx/builder/field-types/map.d.ts +0 -13
- package/types-legacy/ts4.2/tx/builder/field-types/mptree.d.ts +0 -48
- package/types-legacy/ts4.2/tx/builder/field-types/name-fee.d.ts +0 -18
- package/types-legacy/ts4.2/tx/builder/field-types/name-id.d.ts +0 -11
- package/types-legacy/ts4.2/tx/builder/field-types/name.d.ts +0 -13
- package/types-legacy/ts4.2/tx/builder/field-types/nonce.d.ts +0 -15
- package/types-legacy/ts4.2/tx/builder/field-types/pointers.d.ts +0 -26
- package/types-legacy/ts4.2/tx/builder/field-types/pointers2.d.ts +0 -26
- package/types-legacy/ts4.2/tx/builder/field-types/query-fee.d.ts +0 -19
- package/types-legacy/ts4.2/tx/builder/field-types/raw.d.ts +0 -6
- package/types-legacy/ts4.2/tx/builder/field-types/short-u-int-const.d.ts +0 -7
- package/types-legacy/ts4.2/tx/builder/field-types/short-u-int.d.ts +0 -6
- package/types-legacy/ts4.2/tx/builder/field-types/string.d.ts +0 -6
- package/types-legacy/ts4.2/tx/builder/field-types/ttl.d.ts +0 -20
- package/types-legacy/ts4.2/tx/builder/field-types/u-int.d.ts +0 -7
- package/types-legacy/ts4.2/tx/builder/field-types/with-default.d.ts +0 -7
- package/types-legacy/ts4.2/tx/builder/field-types/with-formatting.d.ts +0 -7
- package/types-legacy/ts4.2/tx/builder/field-types/wrapped.d.ts +0 -14
- package/types-legacy/ts4.2/tx/builder/helpers.d.ts +0 -119
- package/types-legacy/ts4.2/tx/builder/index.d.ts +0 -62
- package/types-legacy/ts4.2/tx/builder/schema.d.ts +0 -3256
- package/types-legacy/ts4.2/tx/builder/schema.generated.d.ts +0 -2047
- package/types-legacy/ts4.2/tx/execution-cost.d.ts +0 -53
- package/types-legacy/ts4.2/tx/transaction-signer.d.ts +0 -6
- package/types-legacy/ts4.2/tx/validator.d.ts +0 -18
- package/types-legacy/ts4.2/utils/amount-formatter.d.ts +0 -41
- package/types-legacy/ts4.2/utils/autorest.d.ts +0 -7
- package/types-legacy/ts4.2/utils/bignumber.d.ts +0 -13
- package/types-legacy/ts4.2/utils/bytes.d.ts +0 -9
- package/types-legacy/ts4.2/utils/crypto.d.ts +0 -100
- package/types-legacy/ts4.2/utils/encoder-types.d.ts +0 -61
- package/types-legacy/ts4.2/utils/encoder.d.ts +0 -24
- package/types-legacy/ts4.2/utils/errors.d.ts +0 -464
- package/types-legacy/ts4.2/utils/hd-wallet.d.ts +0 -67
- package/types-legacy/ts4.2/utils/json-big.d.ts +0 -5
- package/types-legacy/ts4.2/utils/jwt.d.ts +0 -53
- package/types-legacy/ts4.2/utils/keystore.d.ts +0 -57
- package/types-legacy/ts4.2/utils/other.d.ts +0 -32
- package/types-legacy/ts4.2/utils/semver-satisfies.d.ts +0 -1
- package/types-legacy/ts4.2/utils/string.d.ts +0 -12
- package/types-legacy/ts4.2/utils/typed-data.d.ts +0 -58
- package/types-legacy/ts4.2/utils/wrap-proxy.d.ts +0 -2
- package/types-legacy/ts4.5/AeSdk.d.ts +0 -44
- package/types-legacy/ts4.5/AeSdkAepp.d.ts +0 -71
- package/types-legacy/ts4.5/AeSdkBase.d.ts +0 -164
- package/types-legacy/ts4.5/AeSdkMethods.d.ts +0 -146
- package/types-legacy/ts4.5/AeSdkWallet.d.ts +0 -90
- package/types-legacy/ts4.5/Middleware.d.ts +0 -46
- package/types-legacy/ts4.5/MiddlewareSubscriber.d.ts +0 -30
- package/types-legacy/ts4.5/Node.d.ts +0 -95
- package/types-legacy/ts4.5/account/Base.d.ts +0 -147
- package/types-legacy/ts4.5/account/Generalized.d.ts +0 -22
- package/types-legacy/ts4.5/account/Ledger.d.ts +0 -34
- package/types-legacy/ts4.5/account/LedgerFactory.d.ts +0 -39
- package/types-legacy/ts4.5/account/Memory.d.ts +0 -46
- package/types-legacy/ts4.5/account/Rpc.d.ts +0 -35
- package/types-legacy/ts4.5/aens.d.ts +0 -193
- package/types-legacy/ts4.5/aepp-wallet-communication/connection/Browser.d.ts +0 -33
- package/types-legacy/ts4.5/aepp-wallet-communication/connection/BrowserRuntime.d.ts +0 -22
- package/types-legacy/ts4.5/aepp-wallet-communication/connection/BrowserWindowMessage.d.ts +0 -36
- package/types-legacy/ts4.5/aepp-wallet-communication/connection-proxy.d.ts +0 -11
- package/types-legacy/ts4.5/aepp-wallet-communication/rpc/RpcClient.d.ts +0 -34
- package/types-legacy/ts4.5/aepp-wallet-communication/rpc/types.d.ts +0 -120
- package/types-legacy/ts4.5/aepp-wallet-communication/schema.d.ts +0 -129
- package/types-legacy/ts4.5/aepp-wallet-communication/wallet-detector.d.ts +0 -22
- package/types-legacy/ts4.5/apis/compiler/compiler.d.ts +0 -86
- package/types-legacy/ts4.5/apis/compiler/index.d.ts +0 -2
- package/types-legacy/ts4.5/apis/compiler/models/index.d.ts +0 -191
- package/types-legacy/ts4.5/apis/compiler/models/mappers.d.ts +0 -22
- package/types-legacy/ts4.5/apis/compiler/models/parameters.d.ts +0 -12
- package/types-legacy/ts4.5/apis/middleware/index.d.ts +0 -2
- package/types-legacy/ts4.5/apis/middleware/middleware.d.ts +0 -327
- package/types-legacy/ts4.5/apis/middleware/models/index.d.ts +0 -1645
- package/types-legacy/ts4.5/apis/middleware/models/mappers.d.ts +0 -109
- package/types-legacy/ts4.5/apis/middleware/models/parameters.d.ts +0 -46
- package/types-legacy/ts4.5/apis/node/index.d.ts +0 -2
- package/types-legacy/ts4.5/apis/node/models/index.d.ts +0 -1129
- package/types-legacy/ts4.5/apis/node/models/mappers.d.ts +0 -99
- package/types-legacy/ts4.5/apis/node/models/parameters.d.ts +0 -17
- package/types-legacy/ts4.5/apis/node/node.d.ts +0 -236
- package/types-legacy/ts4.5/chain.d.ts +0 -227
- package/types-legacy/ts4.5/channel/Base.d.ts +0 -168
- package/types-legacy/ts4.5/channel/Contract.d.ts +0 -239
- package/types-legacy/ts4.5/channel/Spend.d.ts +0 -213
- package/types-legacy/ts4.5/channel/handlers.d.ts +0 -21
- package/types-legacy/ts4.5/channel/internal.d.ts +0 -226
- package/types-legacy/ts4.5/contract/Contract.d.ts +0 -164
- package/types-legacy/ts4.5/contract/compiler/Base.d.ts +0 -104
- package/types-legacy/ts4.5/contract/compiler/Cli.d.ts +0 -26
- package/types-legacy/ts4.5/contract/compiler/Cli8.d.ts +0 -13
- package/types-legacy/ts4.5/contract/compiler/Http.d.ts +0 -28
- package/types-legacy/ts4.5/contract/compiler/HttpNode.d.ts +0 -15
- package/types-legacy/ts4.5/contract/compiler/getFileSystem.d.ts +0 -6
- package/types-legacy/ts4.5/contract/delegation-signature.d.ts +0 -45
- package/types-legacy/ts4.5/contract/ga.d.ts +0 -59
- package/types-legacy/ts4.5/deprecated.d.ts +0 -62
- package/types-legacy/ts4.5/index-browser.d.ts +0 -51
- package/types-legacy/ts4.5/index.d.ts +0 -5
- package/types-legacy/ts4.5/oracle.d.ts +0 -125
- package/types-legacy/ts4.5/send-transaction.d.ts +0 -53
- package/types-legacy/ts4.5/spend.d.ts +0 -56
- package/types-legacy/ts4.5/tx/builder/SchemaTypes.d.ts +0 -37
- package/types-legacy/ts4.5/tx/builder/common.d.ts +0 -32
- package/types-legacy/ts4.5/tx/builder/constants.d.ts +0 -100
- package/types-legacy/ts4.5/tx/builder/delegation/index.d.ts +0 -20
- package/types-legacy/ts4.5/tx/builder/delegation/schema.d.ts +0 -136
- package/types-legacy/ts4.5/tx/builder/delegation/schema.generated.d.ts +0 -141
- package/types-legacy/ts4.5/tx/builder/field-types/abi-version.d.ts +0 -19
- package/types-legacy/ts4.5/tx/builder/field-types/address.d.ts +0 -21
- package/types-legacy/ts4.5/tx/builder/field-types/array.d.ts +0 -7
- package/types-legacy/ts4.5/tx/builder/field-types/boolean.d.ts +0 -6
- package/types-legacy/ts4.5/tx/builder/field-types/coin-amount.d.ts +0 -11
- package/types-legacy/ts4.5/tx/builder/field-types/ct-version.d.ts +0 -72
- package/types-legacy/ts4.5/tx/builder/field-types/encoded.d.ts +0 -6
- package/types-legacy/ts4.5/tx/builder/field-types/entry.d.ts +0 -11
- package/types-legacy/ts4.5/tx/builder/field-types/enumeration.d.ts +0 -7
- package/types-legacy/ts4.5/tx/builder/field-types/fee.d.ts +0 -30
- package/types-legacy/ts4.5/tx/builder/field-types/field.d.ts +0 -6
- package/types-legacy/ts4.5/tx/builder/field-types/gas-limit.d.ts +0 -16
- package/types-legacy/ts4.5/tx/builder/field-types/gas-price.d.ts +0 -17
- package/types-legacy/ts4.5/tx/builder/field-types/index.d.ts +0 -45
- package/types-legacy/ts4.5/tx/builder/field-types/map.d.ts +0 -13
- package/types-legacy/ts4.5/tx/builder/field-types/mptree.d.ts +0 -48
- package/types-legacy/ts4.5/tx/builder/field-types/name-fee.d.ts +0 -18
- package/types-legacy/ts4.5/tx/builder/field-types/name-id.d.ts +0 -11
- package/types-legacy/ts4.5/tx/builder/field-types/name.d.ts +0 -13
- package/types-legacy/ts4.5/tx/builder/field-types/nonce.d.ts +0 -15
- package/types-legacy/ts4.5/tx/builder/field-types/pointers.d.ts +0 -26
- package/types-legacy/ts4.5/tx/builder/field-types/pointers2.d.ts +0 -26
- package/types-legacy/ts4.5/tx/builder/field-types/query-fee.d.ts +0 -19
- package/types-legacy/ts4.5/tx/builder/field-types/raw.d.ts +0 -6
- package/types-legacy/ts4.5/tx/builder/field-types/short-u-int-const.d.ts +0 -7
- package/types-legacy/ts4.5/tx/builder/field-types/short-u-int.d.ts +0 -6
- package/types-legacy/ts4.5/tx/builder/field-types/string.d.ts +0 -6
- package/types-legacy/ts4.5/tx/builder/field-types/ttl.d.ts +0 -20
- package/types-legacy/ts4.5/tx/builder/field-types/u-int.d.ts +0 -7
- package/types-legacy/ts4.5/tx/builder/field-types/with-default.d.ts +0 -7
- package/types-legacy/ts4.5/tx/builder/field-types/with-formatting.d.ts +0 -7
- package/types-legacy/ts4.5/tx/builder/field-types/wrapped.d.ts +0 -14
- package/types-legacy/ts4.5/tx/builder/helpers.d.ts +0 -119
- package/types-legacy/ts4.5/tx/builder/index.d.ts +0 -62
- package/types-legacy/ts4.5/tx/builder/schema.d.ts +0 -3256
- package/types-legacy/ts4.5/tx/builder/schema.generated.d.ts +0 -2047
- package/types-legacy/ts4.5/tx/execution-cost.d.ts +0 -53
- package/types-legacy/ts4.5/tx/transaction-signer.d.ts +0 -6
- package/types-legacy/ts4.5/tx/validator.d.ts +0 -18
- package/types-legacy/ts4.5/utils/amount-formatter.d.ts +0 -41
- package/types-legacy/ts4.5/utils/autorest.d.ts +0 -7
- package/types-legacy/ts4.5/utils/bignumber.d.ts +0 -13
- package/types-legacy/ts4.5/utils/bytes.d.ts +0 -9
- package/types-legacy/ts4.5/utils/crypto.d.ts +0 -100
- package/types-legacy/ts4.5/utils/encoder-types.d.ts +0 -61
- package/types-legacy/ts4.5/utils/encoder.d.ts +0 -24
- package/types-legacy/ts4.5/utils/errors.d.ts +0 -464
- package/types-legacy/ts4.5/utils/hd-wallet.d.ts +0 -67
- package/types-legacy/ts4.5/utils/json-big.d.ts +0 -5
- package/types-legacy/ts4.5/utils/jwt.d.ts +0 -53
- package/types-legacy/ts4.5/utils/keystore.d.ts +0 -57
- package/types-legacy/ts4.5/utils/other.d.ts +0 -32
- package/types-legacy/ts4.5/utils/semver-satisfies.d.ts +0 -1
- package/types-legacy/ts4.5/utils/string.d.ts +0 -12
- package/types-legacy/ts4.5/utils/typed-data.d.ts +0 -58
- package/types-legacy/ts4.5/utils/wrap-proxy.d.ts +0 -2
- /package/dist/{aepp-sdk.browser.js.LICENSE.txt → aepp-sdk.browser.cjs.LICENSE.txt} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see aepp-sdk.browser-script.cjs.LICENSE.txt */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Aeternity=t():e.Aeternity=t()}(self,(function(){return function(){var e={9226:function(e,t,n){const r=n(9986),i=n(7776),a=n(9101),s=n(2813),o=n(8836),{FateTypeCalldata:c,FateTypeString:u}=n(3182),l=n(7611);e.exports=class{constructor(e){this._byteArrayEncoder=new r,this._typeResolver=new i(e),this._apiEncoder=new a,this._eventEncoder=new s,this._canonicalMapper=new o}encodeCall(e,t,n){const{types:r,required:i}=this._typeResolver.getCallTypes(e,t);if(n.length>r.length||n.length<i)throw new l(`Non matching number of arguments. ${t} expects between ${i} and ${r.length} number of arguments but got ${n.length}`);for(;n.length<r.length;)n.push(void 0);return this._byteArrayEncoder.encode(c(t,r),n)}decodeCall(e,t,n){const{types:r,_required:i}=this._typeResolver.getCallTypes(e,t),a=c(t,r);return this._byteArrayEncoder.decodeWithType(n,a)}decodeResult(e,t,n,r="ok"){if("ok"===r){const r=this._typeResolver.getReturnType(e,t);return this._byteArrayEncoder.decodeWithType(n,r)}if("error"===r){const e=new TextDecoder,t=this._apiEncoder.decodeWithType(n,"contract_bytearray");return e.decode(t)}if("revert"===r)return this._byteArrayEncoder.decodeWithType(n,u());throw new l(`Unknown call result type: "${r}"`)}decodeEvent(e,t,n){const r=this._typeResolver.getEventType(e,n);return this._eventEncoder.decodeWithType(t,r)}}},7776:function(e,t,n){const r=n(7815),i=n(4495),{FateTypeEvent:a}=n(3182),s=({type:e})=>{let t,n=e;var r;return(r=n)&&"object"==typeof r&&r.constructor===Object&&([[n,t]]=Object.entries(n)),"option"===n};e.exports=class extends r{constructor(e){super(),this.aci=e}getCallTypes(e,t){const n=this.getNamespaceAci(e).functions.find((e=>e.name===t));if(n){const e=n.arguments.map((e=>this.resolveType(e.type))),t=n.arguments.filter(s);return{types:e,required:e.length-t.length}}if("init"===t)return{types:[],required:0};throw new i(`Unknown function ${t}`)}getReturnType(e,t){if("init"===t)return this.resolveType("void");const n=this.getNamespaceAci(e).functions.find((e=>e.name===t));if(!n)throw new i(`Unknown function ${t}`);return this.resolveType(n.returns)}getEventType(e,t){const n=this.getNamespaceAci(e);if(!n.hasOwnProperty("event"))throw new i("Missing event declaration");return a(this.resolveType(n.event),t)}isCustomType(e){if("string"!=typeof e)return!1;if(this.isStdType(e))return!1;const[t,n]=e.split(".");return!!this.getNamespaceAci(t)}isStdType(e){return"Set.set"===e}getNamespaceAci(e){for(const t of this.aci){const[[n,r]]=Object.entries(t);if(r.name===e)return r}return null}resolveTypeDef(e,t=[]){const[n,r]=e.split("."),a=this.getNamespaceAci(n);if(!a)throw new i("Unknown namespace for "+JSON.stringify(e));if(a.name===e)return["contract_pubkey",[]];const s=[...a.typedefs||a.type_defs,...a.state?[{name:"state",typedef:a.state,vars:[]}]:[]].find((e=>e.name===r));if(!s)throw new i("Unknown type definition: "+JSON.stringify(e));const o={};return s.vars.forEach(((e,n)=>{const[[r,i]]=Object.entries(e);o[i]=t[n]})),[o.hasOwnProperty(s.typedef)?o[s.typedef]:s.typedef,o]}}},9101:function(e,t,n){const r=n(2122),i=n(6911),a=n(5450),s=n(5345),o={key_block_hash:{tag:"kh",size:32,encoder:i},micro_block_hash:{tag:"mh",size:32,encoder:i},block_pof_hash:{tag:"bf",size:32,encoder:i},block_tx_hash:{tag:"bx",size:32,encoder:i},block_state_hash:{tag:"bs",size:32,encoder:i},contract_bytearray:{tag:"cb",size:0,encoder:r},contract_pubkey:{tag:"ct",size:32,encoder:i},account_pubkey:{tag:"ak",size:32,encoder:i},channel:{tag:"ch",size:32,encoder:i},oracle_pubkey:{tag:"ok",size:32,encoder:i},oracle_query_id:{tag:"oq",size:32,encoder:i},peer_pubkey:{tag:"pp",size:32,encoder:i},name:{tag:"nm",size:0,encoder:i},tx_hash:{tag:"th",size:32,encoder:i},signature:{tag:"sg",size:64,encoder:i},commitment:{tag:"cm",size:32,encoder:i},bytearray:{tag:"ba",size:0,encoder:r}},c={kh:"key_block_hash",mh:"micro_block_hash",bf:"block_pof_hash",bx:"block_tx_hash",bs:"block_state_hash",cb:"contract_bytearray",ct:"contract_pubkey",ak:"account_pubkey",ch:"channel",ok:"oracle_pubkey",oq:"oracle_query_id",pp:"peer_pubkey",nm:"name",th:"tx_hash",sg:"signature",cm:"commitment",ba:"bytearray"};e.exports=class{encode(e,t){if(!o.hasOwnProperty(e))throw new s(e,`Unsupported API type ${e}`);const n=o[e];if(n.size>0&&t.length!==n.size)throw new s(e,`Invalid payload. Expected size ${n.size}, but got ${t.length}`);const r=n.encoder.encode(t);return`${n.tag}_${r}`}decode(e){const t=e.substring(0,2);if(!c.hasOwnProperty(t))throw new a(`Invalid API data format. Unsupported tag: ${t}`);if("_"!==e[2])throw new a(`Invalid API data format. Expected _ separator on position 2, got ${e[2]}`);const n=o[c[t]],r=e.substring(3),i=n.encoder.decode(r);if(n.size>0&&i.length!==n.size)throw new a(`Invalid API data format. Expected size ${n.size}, but got ${i.length}`);return i}decodeWithType(e,t){const n=e.substring(0,2);if(!o.hasOwnProperty(t))throw new s(t,"Unsupported API type");const r=o[t].tag;if(n!==r){const n=this.capitalizeType(t);throw new s(t,`${n} should start with ${r}_, got ${e} instead`)}return this.decode(e)}capitalizeType(e){const t=e.replace("_"," ");return t.charAt(0).toUpperCase()+t.slice(1)}}},146:function(e,t,n){const r=n(9986),i=n(5192),a=n(9101),s=n(2813),{FateTypeCalldata:o,FateTypeString:c}=n(3182),u=n(7611);e.exports=class{constructor(e){this._byteArrayEncoder=new r,this._typeResolver=new i(e),this._apiEncoder=new a,this._eventEncoder=new s}encodeCall(e,t){const{types:n,required:r}=this._typeResolver.getCallTypes(e);if(t.length>n.length||t.length<r)throw new u(`Non matching number of arguments. ${e} expects between ${r} and ${n.length} number of arguments but got ${t.length}`);return this._byteArrayEncoder.encode(o(e,n),t)}decodeCall(e){const{functionId:t,args:n}=this._byteArrayEncoder.decodeWithType(e,o());return{functionId:t,functionName:this._typeResolver.getFunctionName(t),args:n}}decodeResult(e,t,n="ok"){if("ok"===n){const n=this._typeResolver.getReturnType(e);return this._byteArrayEncoder.decodeWithType(t,n)}if("error"===n){const e=new TextDecoder,n=this._apiEncoder.decodeWithType(t,"contract_bytearray");return e.decode(n)}if("revert"===n)return this._byteArrayEncoder.decodeWithType(t,c());throw new u(`Unknown call resutls type: "${n}"`)}}},5192:function(e,t,n){const r=n(9479),i=n(4495),{FateTypeVoid:a,FateTypeTuple:s,FateTypeEvent:o,FateTypeList:c,FateTypeMap:u,FateTypeVariant:l,FateTypeOracleAddress:p,FateTypeOracleQueryAddress:d}=n(3182);e.exports=class{constructor(e){this._contractEncoder=new r,this._encodedContract=e,this._contract=null}get _bytecode(){return null===this._contract&&(this._contract=this._contractEncoder.decode(this._encodedContract)),this._contract.bytecode}getFunctionId(e){const{symbols:t}=this._bytecode;return Object.keys(t).find((n=>t[n]===e))}getFunction(e){const{functions:t}=this._bytecode;return t.find((t=>t.id===e))}getFunctionName(e){const{name:t}=this.getFunction(e);return t}getCallTypes(e){const t=this.getFunction(this.getFunctionId(e));if(t){const e=t.args.valueTypes.map((e=>this.resolveType(e)));return{types:e,required:e.length}}if("init"===e)return{types:[],required:0};throw new i(`Unknown function ${e}`)}getReturnType(e){if("init"===e)return a();const t=this.getFunction(this.getFunctionId(e));if(t)return this.resolveType(t.returnType);throw new i(`Unknown function ${e}`)}getEventType(e){const t=this.getFunction(this.getFunctionId("Chain.event"));if(!t)throw new i("The contract does not have event declaration");const n=t.args.valueTypes[0];return o(this.resolveType(n),e)}resolveType(e){if("variant"===e.name){const t=e.variants.map(((e,t)=>{const n=e.valueTypes.map((e=>this.resolveType(e)));return{[t]:n}}));return l(t)}let t=[];return Array.isArray(e.valueTypes)&&(t=e.valueTypes.map((e=>this.resolveType(e)))),"tuple"===e.name?s(t):"list"===e.name?c(...t):"map"===e.name?u(...t):"oracle"===e.name?p(...t):"oracle_query"===e.name?d(...t):e}}},9986:function(e,t,n){const r=n(9945),i=n(9101),a=n(8836),s=n(7746);e.exports=class{constructor(){this._serializer=new r,this._apiEncoder=new i,this._externalDataFactory=new s,this._canonicalMapper=new a}encode(e,t){const n=this._externalDataFactory.create(e,t),r=this._serializer.serialize(n),i=new Uint8Array(r.flat(1/0));return this._apiEncoder.encode("contract_bytearray",i)}decode(e){const t=this._apiEncoder.decodeWithType(e,"contract_bytearray"),n=this._serializer.deserialize(t);return this._canonicalMapper.toCanonical(n)}decodeWithType(e,t){const n=this._apiEncoder.decodeWithType(e,"contract_bytearray"),r=this._serializer.deserializeWithType(n,t);return this._canonicalMapper.toCanonical(r)}}},9479:function(e,t,n){const r=n(9101),i=n(9945),a=n(4058),s=n(8766),o=n(8707);e.exports=class{constructor(){this._apiEncoder=new r,this._contractBytecodeSerializer=new a(new i),this._intSerializer=new s}decode(e){const t=this._apiEncoder.decodeWithType(e,"contract_bytearray"),n=new Uint8Array([o.CONTRACT_BYTEARRAY,...this._intSerializer.serialize(t.length),...t]);return this._contractBytecodeSerializer.deserialize(n)}}},8269:function(e){e.exports=class{constructor(e){this._valueFactory=e}get valueFactory(){return this._valueFactory}supports({_name:e,_valueTypes:t}){return!1}create(e,t){throw new Error("Not implemented.")}}},8824:function(e,t,n){const r=n(1047),i=n(4537),a=n(8269),s=["bls12_381.fr","bls12_381.fp"];e.exports=class extends a{supports({name:e,_valueTypes:t}){return s.includes(e)}create(e,t){switch(e.name){case"bls12_381.fr":return new r(t);case"bls12_381.fp":return new i(t);default:throw new Error(`Unsupported type "${e.name}"`)}}}},9310:function(e,t,n){const{symbolIdentifier:r}=n(7439),i=n(5345),a=n(3585),s=n(8269);e.exports=class extends s{supports({name:e,_valueTypes:t}){return"calldata"===e}create(e,t){if(!Array.isArray(t))throw new i(e.name,`Fate calldata arguments must be an Array, got ${t} instead`);const n=this.valueFactory.createMultiple(e.argumentTypes,t),s=r(e.functionName);return new a(s,e.argumentTypes,n)}}},6753:function(e,t,n){const r=n(6949),i=n(7412),a=n(715),s=n(5542),o=n(344),c=n(2182),u=n(9398),l=n(329),p=n(6571),d=n(7196),m=n(8824),h=n(9310);e.exports=class{constructor(){this._factories=[new a(this),new s(this),new o(this),new c(this),new u(this),new l(this),new d(this),new p(this),new m(this),new h(this)]}createMultiple(e,t){return r(t.length===e.length,`Number of types (${e.length}) and values (${t.length}) should match`),i(e,t).map((e=>this.create(...e)))}create(e,t){const n=this._factories.find((t=>t.supports(e)));return r(n,`Unsupported type "${e.name}"`),n.create(e,t)}}},7196:function(e,t,n){const{hash:r}=n(7439),{byteArray2Int:i}=n(1247),a=n(4495),s=n(8269),o=["string","signature","bytes"];e.exports=class extends s{supports({name:e,_valueTypes:t}){return"event"===e}create({variantType:e,topics:t},n){const[s,...o]=t;if("bigint"!=typeof s)throw new a(`Event name hash (first topic) should be of type "BigInt", got "${typeof s}" instead.`);const c=e.variants.map((e=>i(r(Object.keys(e)[0])))).findIndex((e=>e===s));if(-1===c)throw new a("Event name hash does not match any event variant constructor");const u=e.variants[c],l=Object.keys(u)[0],[p]=Object.values(u),d=p.map((e=>this._isData(e)?n:o.shift()));return this.valueFactory.create(e,{[l]:d})}_isData(e){return!(!o.includes(e.name)||"bytes"===e.name&&e.size<=32)}}},5542:function(e,t,n){const r=n(889),i=n(5345),a=n(8269);e.exports=class extends a{supports({name:e,_valueTypes:t}){return"list"===e}create(e,t){if(!Array.isArray(t))throw new i(e.name,`Fate list must be an Array, got ${t} instead`);const n=t.map((t=>this.valueFactory.create(e.valuesType,t)));return new r(e.valuesType,n)}}},2182:function(e,t,n){const r=n(5603),i=n(8269);e.exports=class extends i{supports({name:e,_valueTypes:t}){return"map"===e}create(e,t){const n=[];for(const r of t)n.push([this.valueFactory.create(e.keyType,r[0]),this.valueFactory.create(e.valueType,r[1])]);return new r(e.keyType,e.valueType,n)}}},715:function(e,t,n){const r=n(9512),i=n(6465),a=n(2280),s=n(1649),o=n(1143),c=n(1794),u=n(2325),l=n(9640),p=n(8767),d=n(9216),m=n(9511),h=n(3131),f=n(8269),y=["int","bool","string","bits","hash","bytes","signature","account_pubkey","contract_pubkey","channel","oracle_pubkey","oracle_query_id"];e.exports=class extends f{supports({name:e,_valueTypes:t}){return y.includes(e)}create(e,t){switch(e.name){case"int":return new r(t);case"bool":return new i(t);case"string":return new a(t);case"bits":return new u(t);case"hash":return new s(t);case"bytes":return new c(t,e.valueTypes);case"signature":return new o(t);case"account_pubkey":return new l(t);case"contract_pubkey":return new p(t);case"channel":return new d(t);case"oracle_pubkey":return new m(t);case"oracle_query_id":return new h(t);default:throw new Error(`Unsupported type "${e.name}"`)}}}},329:function(e,t,n){const r=n(8269),i=n(4899),{FateTypeRecord:a}=n(3182),s=n(5345);e.exports=class extends r{supports({name:e,_valueTypes:t}){return"record"===e}create(e,t){if("object"!=typeof t)throw new s(e.name,`Fate record must be an Object, got ${t} instead`);const n=Object.keys(t).length;if(n!==e.keys.length)throw new s(e.name,`Number of expected keys (${e.keys.length}) and actual keys (${n}) should match`);const r=e.valueTypes.map(((n,r)=>{const i=e.keys[r];return this.valueFactory.create(n,t[i])}));return 1===r.length?r[0]:new i(a(e.keys,e.valueTypes),r)}}},344:function(e,t,n){const r=n(5981),i=n(8269);e.exports=class extends i{supports({name:e,_valueTypes:t}){return"set"===e}create(e,t){const n=[];for(const r of t)n.push(this.valueFactory.create(e.valuesType,r));return new r(e.valuesType,n)}}},9398:function(e,t,n){const r=n(4899),i=n(5345),a=n(8269);e.exports=class extends a{supports({name:e,_valueTypes:t}){return"tuple"===e}create(e,t){if(!Array.isArray(t))throw new i(e.name,`Fate tuple must be an Array, got ${t} instead`);const n=e.valueTypes.map(((e,n)=>this.valueFactory.create(e,t[n])));return 1===n.length?n[0]:new r(e.valueTypes,n)}}},6571:function(e,t,n){const r=n(9560),i=n(5345),a=n(8269),s=["variant","Chain.ttl","AENS.pointee","AENSv2.pointee","AENS.name","AENSv2.name"];e.exports=class extends a{supports({name:e,_valueTypes:t}){return s.includes(e)}create(e,t){if(!this.isValid(t))throw new i(e.name,`Variant should be an object mapping constructor to array of values, got "${t}" instead`);const[n,a]=Object.entries(t)[0],s=e.variants.map((e=>{const[[,t]]=Object.entries(e);return t.length})),o=e.variants.findIndex((e=>{const[[t,r]]=Object.entries(e);return t===n}));if(-1===o)throw new i(e.name,`Unknown variant constructor: ${n}`);const[[,c]]=Object.entries(e.variants[o]);if(a.length!==c.length)throw new i(e.name,`"${n}" variant constructor expects ${c.length} argument(s) but got ${a.length} instead`);const u=this.valueFactory.createMultiple(c,a);return new r(s,o,u,c,e.variants)}isValid(e){return"object"==typeof e&&null!==e&&1===Object.entries(e).length&&Array.isArray(Object.values(e)[0])}}},4841:function(e,t,n){const r=n(9986),i=n(7776),a=n(9101),s=n(2813),o=n(8836),{FateTypeCalldata:c,FateTypeString:u}=n(3182),l=n(7611);e.exports=class{constructor(e){this._byteArrayEncoder=new r,this._typeResolver=new i(e),this._apiEncoder=new a,this._eventEncoder=new s,this._canonicalMapper=new o}encode(e,t,n){const{types:r,required:i}=this._typeResolver.getCallTypes(e,t);if(n.length>r.length||n.length<i)throw new l(`Non matching number of arguments. ${t} expects between ${i} and ${r.length} number of arguments but got ${n.length}`);for(;n.length<r.length;)n.push(void 0);return this._byteArrayEncoder.encode(c(t,r),n)}decode(e,t,n){const r=this._typeResolver.getReturnType(e,t);return this._byteArrayEncoder.decodeWithType(n,r)}decodeContractByteArray(e){return this._byteArrayEncoder.decode(e)}decodeString(e){const t=new TextDecoder,n=this._apiEncoder.decodeWithType(e,"contract_bytearray");return t.decode(n)}decodeFateString(e){return this._byteArrayEncoder.decodeWithType(e,u())}decodeEvent(e,t,n){const r=this._typeResolver.getEventType(e,n);return this._eventEncoder.decodeWithType(t,r)}}},7611:function(e){class t extends Error{constructor(e){super(e),this.name="EncoderError"}}e.exports=t},3541:function(e){class t extends Error{constructor(e){super("Invalid FATE prefix: 0b"+e.toString(2).padStart(8,"0")),this.name="FatePrefixError",this.prefix=e}}e.exports=t},5345:function(e){class t extends Error{constructor(e,t){super(t),this.name="FateTypeError",this.type=e}}e.exports=t},5450:function(e){class t extends Error{constructor(e){super(e),this.name="FormatError"}}e.exports=t},9520:function(e){class t extends Error{constructor(e){super(e),this.name="InternalError"}}e.exports=t},4275:function(e){class t extends Error{constructor(e){super(e),this.name="SerializerError"}}e.exports=t},4495:function(e){class t extends Error{constructor(e){super(e),this.name="TypeResolveError"}}e.exports=t},2813:function(e,t,n){const r=n(9101),i=n(6753),a=n(8836);e.exports=class{constructor(){this._dataFactory=new i,this._apiEncoder=new r,this._canonicalMapper=new a}decodeWithType(e,t){const n=this._apiEncoder.decode(e),r=this._dataFactory.create(t,n);return this._canonicalMapper.toCanonical(r)}}},7746:function(e,t,n){const r=n(6753),i=n(991);e.exports=class extends r{constructor(){super(),this._mapper=new i}create(e,t){const n=this._mapper.toInternal(e,t);return super.create(e,n)}}},5167:function(e,t,n){const r=n(6949),i=n(889),a=n(4899),{FateTypeTuple:s,FateTypeInt:o}=n(3182),c=(e,t)=>{if(0===e.length)return-1;if(0===t.length)return 1;const n=m(e.itemsType);for(let r=0;r<e.length;r++){if(void 0===t.items[r])return 1;const i=n(e.items[r],t.items[r]);if(0!==i)return i}return e.length===t.length?0:-1},u=e=>{const t=m(e);return(e,n)=>t(e.key,n.key)},l=(e,t)=>{const n=new i(o(),e.valueOf()),r=new i(o(),t.valueOf());return c(n,r)},p=(e,t)=>Number(BigInt(e)-BigInt(t)),d={int:p,bool:(e,t)=>e-t,string:(e,t)=>{const n=new TextEncoder,r=e.toString(),i=t.toString();return r.length===i.length?l(n.encode(e),n.encode(t)):r.length-i.length},bits:(e,t)=>e<0||t<0?-p(e,t):p(e,t),list:c,tuple:(e,t)=>{if(0===e.size)return-1;const n=e.size-t.size;if(0!==n)return n;for(let n=0;n<e.size;n++){const r=e.valueTypes[n],i=m(r)(e.items[n],t.items[n]);if(0!==i)return i}return 0},variant:(e,t)=>{const n=e.arities.length-t.arities.length;if(0!==n)return n;const r=new i(e.aritiesType,e.arities),o=new i(t.aritiesType,t.arities),c=m(r)(r,o);if(0!==c)return c;const u=e.tag-t.tag;return 0!==u?u:m(s())(new a(e.valueTypes,e.value),new a(t.valueTypes,t.value))},map:(e,t)=>{const n=[...e.items],r=[...t.items];n.sort(u(e.keyType)),r.sort(u(t.keyType));const i=m(e.keyType),a=m(e.valueType);for(let e=0;e<n.length;e++){if(void 0===r[e])return 1;const t=n[e],s=r[e],o=i(t.key,s.key);if(0!==o)return o;const c=a(t.value,s.value);if(0!==c)return c}return n.length===r.length?0:-1},bytes:l,account_pubkey:l,channel:l,contract_pubkey:l,oracle_query_id:l,oracle_pubkey:l},m=e=>(r(e.hasOwnProperty("name"),`Cannot determine type name of ${JSON.stringify(e)}`),r(d.hasOwnProperty(e.name),`Unsupported comparator for ${e.name}`),d[e.name]);e.exports=m},7824:function(e){e.exports=Object.freeze({0:{mnemonic:"RETURN",args:0,end:!0},1:{mnemonic:"RETURNR",args:1,end:!0},2:{mnemonic:"CALL",args:1,end:!0},3:{mnemonic:"CALL_R",args:5,end:!0},4:{mnemonic:"CALL_T",args:1,end:!0},5:{mnemonic:"CALL_GR",args:6,end:!0},6:{mnemonic:"JUMP",args:1,end:!0},7:{mnemonic:"JUMPIF",args:2,end:!0},8:{mnemonic:"SWITCH_V2",args:3,end:!0},9:{mnemonic:"SWITCH_V3",args:4,end:!0},10:{mnemonic:"SWITCH_VN",args:2,end:!0},11:{mnemonic:"CALL_VALUE",args:1,end:!1},12:{mnemonic:"PUSH",args:1,end:!1},13:{mnemonic:"DUPA",args:0,end:!1},14:{mnemonic:"DUP",args:1,end:!1},15:{mnemonic:"POP",args:1,end:!1},16:{mnemonic:"INCA",args:0,end:!1},17:{mnemonic:"INC",args:1,end:!1},18:{mnemonic:"DECA",args:0,end:!1},19:{mnemonic:"DEC",args:1,end:!1},20:{mnemonic:"ADD",args:3,end:!1},21:{mnemonic:"SUB",args:3,end:!1},22:{mnemonic:"MUL",args:3,end:!1},23:{mnemonic:"DIV",args:3,end:!1},24:{mnemonic:"MOD",args:3,end:!1},25:{mnemonic:"POW",args:3,end:!1},26:{mnemonic:"STORE",args:2,end:!1},27:{mnemonic:"SHA3",args:2,end:!1},28:{mnemonic:"SHA256",args:2,end:!1},29:{mnemonic:"BLAKE2B",args:2,end:!1},30:{mnemonic:"LT",args:3,end:!1},31:{mnemonic:"GT",args:3,end:!1},32:{mnemonic:"EQ",args:3,end:!1},33:{mnemonic:"ELT",args:3,end:!1},34:{mnemonic:"EGT",args:3,end:!1},35:{mnemonic:"NEQ",args:3,end:!1},36:{mnemonic:"AND",args:3,end:!1},37:{mnemonic:"OR",args:3,end:!1},38:{mnemonic:"NOT",args:2,end:!1},39:{mnemonic:"TUPLE",args:2,end:!1},40:{mnemonic:"ELEMENT",args:3,end:!1},41:{mnemonic:"SETELEMENT",args:4,end:!1},42:{mnemonic:"MAP_EMPTY",args:1,end:!1},43:{mnemonic:"MAP_LOOKUP",args:3,end:!1},44:{mnemonic:"MAP_LOOKUPD",args:4,end:!1},45:{mnemonic:"MAP_UPDATE",args:4,end:!1},46:{mnemonic:"MAP_DELETE",args:3,end:!1},47:{mnemonic:"MAP_MEMBER",args:3,end:!1},48:{mnemonic:"MAP_FROM_LIST",args:2,end:!1},49:{mnemonic:"MAP_SIZE",args:2,end:!1},50:{mnemonic:"MAP_TO_LIST",args:2,end:!1},51:{mnemonic:"IS_NIL",args:2,end:!1},52:{mnemonic:"CONS",args:3,end:!1},53:{mnemonic:"HD",args:2,end:!1},54:{mnemonic:"TL",args:2,end:!1},55:{mnemonic:"LENGTH",args:2,end:!1},56:{mnemonic:"NIL",args:1,end:!1},57:{mnemonic:"APPEND",args:3,end:!1},58:{mnemonic:"STR_JOIN",args:3,end:!1},59:{mnemonic:"INT_TO_STR",args:2,end:!1},60:{mnemonic:"ADDR_TO_STR",args:2,end:!1},61:{mnemonic:"STR_REVERSE",args:2,end:!1},62:{mnemonic:"STR_LENGTH",args:2,end:!1},63:{mnemonic:"BYTES_TO_INT",args:2,end:!1},64:{mnemonic:"BYTES_TO_STR",args:2,end:!1},65:{mnemonic:"BYTES_CONCAT",args:3,end:!1},66:{mnemonic:"BYTES_SPLIT",args:3,end:!1},67:{mnemonic:"INT_TO_ADDR",args:2,end:!1},68:{mnemonic:"VARIANT",args:4,end:!1},69:{mnemonic:"VARIANT_TEST",args:3,end:!1},70:{mnemonic:"VARIANT_ELEMENT",args:3,end:!1},71:{mnemonic:"BITS_NONEA",args:0,end:!1},72:{mnemonic:"BITS_NONE",args:1,end:!1},73:{mnemonic:"BITS_ALLA",args:0,end:!1},74:{mnemonic:"BITS_ALL",args:1,end:!1},75:{mnemonic:"BITS_ALL_N",args:2,end:!1},76:{mnemonic:"BITS_SET",args:3,end:!1},77:{mnemonic:"BITS_CLEAR",args:3,end:!1},78:{mnemonic:"BITS_TEST",args:3,end:!1},79:{mnemonic:"BITS_SUM",args:2,end:!1},80:{mnemonic:"BITS_OR",args:3,end:!1},81:{mnemonic:"BITS_AND",args:3,end:!1},82:{mnemonic:"BITS_DIFF",args:3,end:!1},83:{mnemonic:"BALANCE",args:1,end:!1},84:{mnemonic:"ORIGIN",args:1,end:!1},85:{mnemonic:"CALLER",args:1,end:!1},86:{mnemonic:"BLOCKHASH",args:2,end:!1},87:{mnemonic:"BENEFICIARY",args:1,end:!1},88:{mnemonic:"TIMESTAMP",args:1,end:!1},89:{mnemonic:"GENERATION",args:1,end:!1},90:{mnemonic:"MICROBLOCK",args:1,end:!1},91:{mnemonic:"DIFFICULTY",args:1,end:!1},92:{mnemonic:"GASLIMIT",args:1,end:!1},93:{mnemonic:"GAS",args:1,end:!1},94:{mnemonic:"ADDRESS",args:1,end:!1},95:{mnemonic:"GASPRICE",args:1,end:!1},96:{mnemonic:"LOG0",args:1,end:!1},97:{mnemonic:"LOG1",args:2,end:!1},98:{mnemonic:"LOG2",args:3,end:!1},99:{mnemonic:"LOG3",args:4,end:!1},100:{mnemonic:"LOG4",args:5,end:!1},101:{mnemonic:"SPEND",args:2,end:!1},102:{mnemonic:"ORACLE_REGISTER",args:7,end:!1},103:{mnemonic:"ORACLE_QUERY",args:8,end:!1},104:{mnemonic:"ORACLE_RESPOND",args:6,end:!1},105:{mnemonic:"ORACLE_EXTEND",args:3,end:!1},106:{mnemonic:"ORACLE_GET_ANSWER",args:5,end:!1},107:{mnemonic:"ORACLE_GET_QUESTION",args:5,end:!1},108:{mnemonic:"ORACLE_QUERY_FEE",args:2,end:!1},109:{mnemonic:"AENS_RESOLVE",args:4,end:!1},110:{mnemonic:"AENS_PRECLAIM",args:3,end:!1},111:{mnemonic:"AENS_CLAIM",args:5,end:!1},112:{mnemonic:"AENS_UPDATE",args:6,end:!1},113:{mnemonic:"AENS_TRANSFER",args:4,end:!1},114:{mnemonic:"AENS_REVOKE",args:3,end:!1},115:{mnemonic:"BALANCE_OTHER",args:2,end:!1},116:{mnemonic:"VERIFY_SIG",args:4,end:!1},117:{mnemonic:"VERIFY_SIG_SECP256K1",args:4,end:!1},118:{mnemonic:"CONTRACT_TO_ADDRESS",args:2,end:!1},119:{mnemonic:"AUTH_TX_HASH",args:1,end:!1},120:{mnemonic:"ORACLE_CHECK",args:4,end:!1},121:{mnemonic:"ORACLE_CHECK_QUERY",args:5,end:!1},122:{mnemonic:"IS_ORACLE",args:2,end:!1},123:{mnemonic:"IS_CONTRACT",args:2,end:!1},124:{mnemonic:"IS_PAYABLE",args:2,end:!1},125:{mnemonic:"CREATOR",args:1,end:!1},126:{mnemonic:"ECVERIFY_SECP256K1",args:4,end:!1},127:{mnemonic:"ECRECOVER_SECP256K1",args:3,end:!1},128:{mnemonic:"ADDRESS_TO_CONTRACT",args:2,end:!1},129:{mnemonic:"BLS12_381_G1_NEG",args:2,end:!1},130:{mnemonic:"BLS12_381_G1_NORM",args:2,end:!1},131:{mnemonic:"BLS12_381_G1_VALID",args:2,end:!1},132:{mnemonic:"BLS12_381_G1_IS_ZERO",args:2,end:!1},133:{mnemonic:"BLS12_381_G1_ADD",args:3,end:!1},134:{mnemonic:"BLS12_381_G1_MUL",args:3,end:!1},135:{mnemonic:"BLS12_381_G2_NEG",args:2,end:!1},136:{mnemonic:"BLS12_381_G2_NORM",args:2,end:!1},137:{mnemonic:"BLS12_381_G2_VALID",args:2,end:!1},138:{mnemonic:"BLS12_381_G2_IS_ZERO",args:2,end:!1},139:{mnemonic:"BLS12_381_G2_ADD",args:3,end:!1},140:{mnemonic:"BLS12_381_G2_MUL",args:3,end:!1},141:{mnemonic:"BLS12_381_GT_INV",args:2,end:!1},142:{mnemonic:"BLS12_381_GT_ADD",args:3,end:!1},143:{mnemonic:"BLS12_381_GT_MUL",args:3,end:!1},144:{mnemonic:"BLS12_381_GT_POW",args:3,end:!1},145:{mnemonic:"BLS12_381_GT_IS_ONE",args:2,end:!1},146:{mnemonic:"BLS12_381_PAIRING",args:3,end:!1},147:{mnemonic:"BLS12_381_MILLER_LOOP",args:3,end:!1},148:{mnemonic:"BLS12_381_FINAL_EXP",args:2,end:!1},149:{mnemonic:"BLS12_381_INT_TO_FR",args:2,end:!1},150:{mnemonic:"BLS12_381_INT_TO_FP",args:2,end:!1},151:{mnemonic:"BLS12_381_FR_TO_INT",args:2,end:!1},152:{mnemonic:"BLS12_381_FP_TO_INT",args:2,end:!1},153:{mnemonic:"AENS_LOOKUP",args:2,end:!1},154:{mnemonic:"ORACLE_EXPIRY",args:2,end:!1},155:{mnemonic:"AUTH_TX",args:1,end:!1},156:{mnemonic:"STR_TO_LIST",args:2,end:!1},157:{mnemonic:"STR_FROM_LIST",args:2,end:!1},158:{mnemonic:"STR_TO_UPPER",args:2,end:!1},159:{mnemonic:"STR_TO_LOWER",args:2,end:!1},160:{mnemonic:"CHAR_TO_INT",args:2,end:!1},161:{mnemonic:"CHAR_FROM_INT",args:2,end:!1},162:{mnemonic:"CALL_PGR",args:7,end:!0},163:{mnemonic:"CREATE",args:3,end:!0},164:{mnemonic:"CLONE",args:4,end:!0},165:{mnemonic:"CLONE_G",args:5,end:!0},166:{mnemonic:"BYTECODE_HASH",args:2,end:!1},167:{mnemonic:"FEE",args:1,end:!1},168:{mnemonic:"ADDRESS_TO_BYTES",args:2,end:!1},169:{mnemonic:"POSEIDON",args:3,end:!1},170:{mnemonic:"MULMOD",args:4,end:!1},171:{mnemonic:"BAND",args:3,end:!1},172:{mnemonic:"BOR",args:3,end:!1},173:{mnemonic:"BXOR",args:3,end:!1},174:{mnemonic:"BNOT",args:2,end:!1},175:{mnemonic:"BSL",args:3,end:!1},176:{mnemonic:"BSR",args:3,end:!1},250:{mnemonic:"DEACTIVATE",args:0,end:!1},251:{mnemonic:"ABORT",args:1,end:!0},252:{mnemonic:"EXIT",args:1,end:!0},253:{mnemonic:"NOP",args:0,end:!1},254:{mnemonic:"FUNCTION",args:0,end:!1},255:{mnemonic:"EXTEND",args:0,end:!1}})},8707:function(e){e.exports=Object.freeze({SMALL_INT:0,LONG_STRING:1,SHORT_STRING:1,SHORT_LIST:3,TYPE_INTEGER:7,TYPE_BOOLEAN:23,TYPE_LIST:39,TYPE_TUPLE:55,TYPE_OBJECT:71,TYPE_BITS:87,TYPE_MAP:103,TYPE_STRING:119,TYPE_VARIANT:135,TYPE_BYTES:151,TYPE_CONTRACT_BYTEARRAY:167,TYPE_VAR:231,TYPE_ANY:247,LONG_TUPLE:11,SHORT_TUPLE:11,LONG_LIST:31,MAP:47,EMPTY_TUPLE:63,POS_BITS:79,EMPTY_STRING:95,POS_BIG_INT:111,FALSE:127,CONTRACT_BYTEARRAY:143,OBJECT:159,VARIANT:175,MAP_ID:191,NEG_BITS:207,EMPTY_MAP:223,NEG_BIG_INT:239,TRUE:255,OTYPE_ADDRESS:0,OTYPE_BYTES:1,OTYPE_CONTRACT:2,OTYPE_ORACLE:3,OTYPE_ORACLE_QUERY:4,OTYPE_CHANNEL:5})},3182:function(e){const t=e=>({name:"bytes",size:e}),n=(e,t)=>({name:"map",keyType:e,valueType:t}),r=e=>({name:"variant",variants:e}),i=()=>r([{RelativeTTL:[{name:"int"}]},{FixedTTL:[{name:"int"}]}]),a=()=>r([{"AENS.AccountPt":[{name:"account_pubkey"}]},{"AENS.OraclePt":[{name:"account_pubkey"}]},{"AENS.ContractPt":[{name:"account_pubkey"}]},{"AENS.ChannelPt":[{name:"account_pubkey"}]}]),s=()=>{const e=[{"AENSv2.AccountPt":[{name:"account_pubkey"}]},{"AENSv2.OraclePt":[{name:"account_pubkey"}]},{"AENSv2.ContractPt":[{name:"account_pubkey"}]},{"AENSv2.ChannelPt":[{name:"account_pubkey"}]},{"AENSv2.DataPt":[t()]}];return r(e)};e.exports={FateTypeVoid:()=>({name:"void"}),FateTypeInt:()=>({name:"int"}),FateTypeBool:()=>({name:"bool"}),FateTypeString:()=>({name:"string"}),FateTypeBits:()=>({name:"bits"}),FateTypeBytes:t,FateTypeHash:()=>({name:"hash"}),FateTypeSignature:()=>({name:"signature"}),FateTypeAccountAddress:()=>({name:"account_pubkey"}),FateTypeContractAddress:()=>({name:"contract_pubkey"}),FateTypeChannelAddress:()=>({name:"channel"}),FateTypeOracleAddress:(e,t)=>({name:"oracle_pubkey",questionType:e,answerType:t}),FateTypeOracleQueryAddress:(e,t)=>({name:"oracle_query_id",questionType:e,answerType:t}),FateTypeByteArray:()=>({name:"byte_array"}),FateTypeList:e=>({name:"list",valuesType:e}),FateTypeTuple:(e=[])=>({name:"tuple",valueTypes:e}),FateTypeRecord:(e,t)=>({name:"record",keys:e,valueTypes:t}),FateTypeSet:e=>({name:"set",valuesType:e}),FateTypeMap:n,FateTypeVariant:r,FateTypeType:e=>({name:"type",type:e}),FateTypeOption:e=>r([{None:[]},{Some:e}]),FateTypeChainTTL:i,FateTypeChainGAMetaTx:()=>r([{"Chain.GAMetaTx":[{name:"account_pubkey"},{name:"int"}]}]),FateTypeChainPayingForTx:()=>r([{"Chain.PayingForTx":[{name:"account_pubkey"},{name:"int"}]}]),FateTypeChainBaseTx:()=>r([{"Chain.SpendTx":[{name:"account_pubkey"},{name:"int"},{name:"string"}]},{"Chain.OracleRegisterTx":[]},{"Chain.OracleQueryTx":[]},{"Chain.OracleResponseTx":[]},{"Chain.OracleExtendTx":[]},{"Chain.NamePreclaimTx":[]},{"Chain.NameClaimTx":[{name:"string"}]},{"Chain.NameUpdateTx":[{name:"hash"}]},{"Chain.NameRevokeTx":[{name:"hash"}]},{"Chain.NameTransferTx":[{name:"account_pubkey"},{name:"hash"}]},{"Chain.ChannelCreateTx":[{name:"account_pubkey"}]},{"Chain.ChannelDepositTx":[{name:"account_pubkey"},{name:"int"}]},{"Chain.ChannelWithdrawTx":[{name:"account_pubkey"},{name:"int"}]},{"Chain.ChannelForceProgressTx":[{name:"account_pubkey"}]},{"Chain.ChannelCloseMutualTx":[{name:"account_pubkey"}]},{"Chain.ChannelCloseSoloTx":[{name:"account_pubkey"}]},{"Chain.ChannelSlashTx":[{name:"account_pubkey"}]},{"Chain.ChannelSettleTx":[{name:"account_pubkey"}]},{"Chain.ChannelSnapshotSoloTx":[{name:"account_pubkey"}]},{"Chain.ContractCreateTx":[{name:"account_pubkey"}]},{"Chain.ContractCallTx":[{name:"account_pubkey"},{name:"int"}]},{"Chain.GAAttachTx":[]}]),FateTypeAENSPointee:a,FateTypeAENSv2Pointee:s,FateTypeAENSName:()=>{const e=[{"AENS.Name":[{name:"account_pubkey"},i(),n({name:"string"},a())]}];return r(e)},FateTypeAENSv2Name:()=>{const e=[{"AENSv2.Name":[{name:"account_pubkey"},i(),n({name:"string"},s())]}];return r(e)},FateTypeEvent:(e,t)=>({name:"event",variantType:e,topics:t}),FateTypeBls12381Fr:()=>({name:"bls12_381.fr"}),FateTypeBls12381Fp:()=>({name:"bls12_381.fp"}),FateTypeCalldata:(e,t)=>({name:"calldata",functionName:e,argumentTypes:t}),FateTypeContractBytearray:()=>({name:"contract_bytearray"}),FateTypeVar:e=>({name:"tvar",id:e}),FateTypeAny:()=>({name:"any"})}},8836:function(e,t,n){const r=n(9101),{montBytes2Int:i}=n(2041),{byteArray2Hex:a}=n(1247);e.exports=class{constructor(){this._apiEncoder=new r}toCanonical(e){return e.accept(this)}visitData(e){return e.valueOf()}visitAddress(e){return this._apiEncoder.encode(e.name,e.value)}visitList(e){return e.items.map((e=>e.accept(this)))}visitSet(e){return new Set(e.items.map((e=>e.accept(this))))}visitMap(e){const t=new Map;for(const[n,r]of e.iterator)t.set(n.accept(this),r.accept(this));return t}visitTuple(e){return e.prepareItems((e=>e.accept(this)))}visitVariant(e){const t=e.value.map((e=>e.accept(this)));if("None"!==e.variantName)return"Some"===e.variantName?t[0]:{[e.variantName]:t}}visitBls12381Fr(e){return i(e.valueOf(),"r")}visitBls12381Fp(e){return i(e.valueOf(),"p")}visitCalldata(e){const{functionId:t,args:n}=e.valueOf();return{functionId:a(t),args:n.map((e=>e.accept(this)))}}}},991:function(e,t,n){const r=n(9101),{int2MontBytes:i}=n(2041),a=n(5345);e.exports=class{constructor(){this._apiEncoder=new r}toInternal(e,t){switch(e.name){case"account_pubkey":case"contract_pubkey":case"channel":case"oracle_pubkey":case"oracle_query_id":return this.toAddress(e,t);case"variant":return this.toVariant(e,t);case"map":return this.toMap(e,t);case"set":return this.toSet(e,t);case"record":return this.toRecord(e,t);case"bls12_381.fr":return this.toBls12381Fr(e,t);case"bls12_381.fp":return this.toBls12381Fp(e,t);default:return t}}toAddress({name:e,_:t},n){return this._apiEncoder.decodeWithType(n,e)}toVariant(e,t){if(!this.isOptionVariant(e))return t;if([void 0,null].includes(t))return{None:[]};const[n]=Object.keys(t);return["Some","None"].includes(n)?t:{Some:[t]}}isOptionVariant({_name:e,variants:t}){return t.some((({None:e})=>e&&0===e.length))&&t.some((({Some:e})=>e))}toMap(e,t){if("object"!=typeof t||null===t)throw new a("map",`Fate map must be one of: Map, Array, Object; got ${t} instead`);return Array.isArray(t)||t instanceof Map?t:Object.entries(t)}toSet(e,t){if(t instanceof Set)return t;if(Array.isArray(t))return new Set(t);throw new a("set",`Fate set must be a Set or Array, got "${t}" instead`)}toRecord(e,t){return e.keys.reduce(((e,n)=>({...e,[n]:t[n]})),{})}validateBls12381Field(e,t){if("bigint"!=typeof t&&!Number.isInteger(t))throw new a(e.name,`Should be one of: BigInt or Number; got ${t} instead`)}toBls12381Fr(e,t){return this.validateBls12381Field(e,t),i(t,"r")}toBls12381Fp(e,t){return this.validateBls12381Field(e,t),i(t,"p")}}},9945:function(e,t,n){const r=n(9291),i=n(8517),a=n(1666),s=n(5323),o=n(5499),c=n(1251),u=n(5980),l=n(7596),p=n(284),d=n(1849),m=n(8766),h=n(9737),f=n(5411),y=n(6291),g=n(1885),w=n(4157),N=n(5945),v=n(8566),b=n(2021),x=n(8950),_=n(6937),T=n(8003),C=n(4058),S=n(4323),A=n(4275);e.exports=class extends a{constructor(){super(),this.typeFactory=new r,this._serializers={void:new h,bool:new c,int:new m,tuple:new b(this),record:new b(this),list:new f(this),set:new y(this),map:new g(this),byte_array:new u,string:new v,hash:new l,signature:new l,bits:new o,variant:new x(this),bytes:new l,account_pubkey:new s,contract_pubkey:new d,oracle_pubkey:new N,oracle_query_id:new w,channel:new p,"bls12_381.fr":new _,"bls12_381.fp":new _,calldata:new T(this),contract_bytearray:new C(this),type:new S}}_getSerializer(e){if(!e.hasOwnProperty("name"))throw new A("Unsupported type: "+JSON.stringify(e));const t=e.name;if(!this._serializers.hasOwnProperty(t))throw new A("Unsupported type: "+JSON.stringify(t));return this._serializers[t]}serialize(e){if("object"!=typeof e)throw new A("Only object serialization is supported. Got: "+JSON.stringify(e));if(!(e instanceof i))throw new A("Only instances of FateData is supported.");return this._getSerializer(e).serialize(e)}deserializeWithType(e,t){if(!(e instanceof Uint8Array))throw new A("Only instances of Uint8Array is supported.");return this._getSerializer(t).deserialize(e,t)}deserialize(e){if(!(e instanceof Uint8Array))throw new A("Only instances of Uint8Array is supported.");const t=this.typeFactory.createType(e);return this.deserializeWithType(e,t)}deserializeStream(e,t){if(!(e instanceof Uint8Array))throw new A("Only instances of Uint8Array is supported.");let n=t;return void 0===t&&(n=this.typeFactory.createType(e)),this._getSerializer(n).deserializeStream(e,t)}}},5323:function(e,t,n){const r=n(858),i=n(8707),a=n(1666),s=n(9640);e.exports=class extends a{serialize(e){return[i.OBJECT,i.OTYPE_ADDRESS,...r.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=r.decode(t.slice(2),!0);return[new s(n.data),new Uint8Array(n.remainder)]}}},1666:function(e,t,n){const r=n(4275);e.exports=class{constructor(e){this.globalSerializer=e}serialize(e){throw new r("Not implemented.")}deserialize(e,t){const[n,r]=this.deserializeStream(e,t);return n}deserializeStream(e,t){throw new r("Not implemented.")}}},5499:function(e,t,n){const r=n(8707),i=n(6128),a=n(2325),s=n(1666),o=n(1351);e.exports=class extends s{serialize(e){return[e.value>=0?r.POS_BITS:r.NEG_BITS,...i.encode(o(e.value))]}deserializeStream(e){const t=new Uint8Array(e),n=t[0]===r.POS_BITS?1n:-1n,[s,o]=i.decode(t.slice(1));return[new a(s*n),new Uint8Array(o)]}}},6937:function(e,t,n){const r=n(1666),i=n(7596),a=n(1047),s=n(4537),o=new i,c=(e,t)=>{switch(e.name){case"bls12_381.fr":return new a(t);case"bls12_381.fp":return new s(t);default:throw new Error(`Unsupported type "${e.name}"`)}};e.exports=class extends r{serialize(e){return o.serialize(e)}deserializeStream(e,t){const[n,r]=o.deserializeStream(e);return[c(t,n.valueOf()),r]}}},1251:function(e,t,n){const r=n(8707),i=n(6465),a=n(1666),s=n(3541);e.exports=class extends a{serialize(e){return!0===e.valueOf()?[r.TRUE]:[r.FALSE]}deserializeStream(e){const t=new Uint8Array(e),n=t[0],a=t.slice(1);if(n===r.TRUE)return[new i(!0),a];if(n===r.FALSE)return[new i(!1),a];throw new s(n)}}},5980:function(e,t,n){const r=n(8707),i=n(1666),a=n(30),s=new(n(8766));e.exports=class extends i{serialize(e){return 0===e.length?[r.EMPTY_STRING]:e.length<64?[e.length<<2|r.SHORT_STRING,...e.valueOf()]:[r.LONG_STRING,...s.serialize(e.length-64),...e.valueOf()]}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(n===r.EMPTY_STRING)return[new a,t.slice(1)];if(n===r.LONG_STRING){const[e,n]=s.deserializeStream(t.slice(1)),r=Number(e.valueOf())+64;return[new a(n.slice(0,r)),n.slice(r)]}const i=1+(n>>2);return[new a(t.slice(1,i)),t.slice(i)]}}},2664:function(e,t,n){const r=n(858),i=n(1666),a=n(4323),{byteArray2Hex:s,byteArray2Int:o}=n(1247),c=n(7824),{FateTypeByteArray:u,FateTypeString:l,FateTypeMap:p}=n(3182),d={3:"immediate",2:"var",1:"arg",0:"stack"};e.exports=class extends i{constructor(e){super(e),this._typeSerializer=new a}deserialize(e){const t=r.decode(e,!0),n=r.decode(t.remainder,!0),i=r.decode(n.remainder),a=this.deserializeSymbols(n.data);return{functions:this.deserializeFunctions(t.data,a),symbols:a,annotations:this.deserializeAnnotations(i)}}deserializeFunctions(e,t){let n={},r=e;const i=[];for(;r.length;)[n,r]=this.deserializeFunction(r,t),i.push(n);return i}deserializeFunction(e,t){const n=e[0],r=s(e.slice(1,5));if(254!==n)throw new Error(`Wrong function prefix, expected 0xfe got 0x${e[0].toString(16)}`);const i=t[r],[a,o]=this.deserializeAttributes(e.slice(5)),[c,u,l]=this.deserializeSignature(o),[p,d]=this.deserializeInstructions(l);return[{id:r,name:i,attributes:a,args:c,returnType:u,instructions:p},d]}deserializeInstructions(e){let t={},n=e;const r=[];let i=0,a=!1;for(;n.length&&254!==n[0];)void 0===r[i]&&(r[i]=[]),[t,n,a]=this.deserializeInstruction(n),r[i].push(t),a&&i++;return[r,n]}deserializeInstruction(e){const t=e[0],n=e.slice(1);if(!c.hasOwnProperty(t))throw new Error(`Unsupported opcode: 0x${t.toString(16)}`);const r=c[t],{mnemonic:i,end:a}=r;if(0===r.args)return[{mnemonic:i,args:[]},n,a];const[s,o]=this.deserializeArguments(n,r.args);return[{mnemonic:i,args:s},o,a]}deserializeArguments(e,t){const n=t<=4?1:2,r=e.subarray(0,n),i=e.slice(n),a=((e,t=1)=>{const n=[];let r=Number(o(e));for(let e=0;e<2*t;e+=2)n.push(3&r),r>>=2;if(0!==r)throw new Error(`Invalid argument modifier data. Unexpected padding: 0b${r.toString(2)}`);return n})(r,t),s=[];let c,u=i;return a.forEach((e=>{[c,u]=this.deserializeArgument(e,u),s.push(c)})),[s,u]}deserializeArgument(e,t){const n=d[e];if("stack"===n)return[{mod:n,arg:0},t];const[r,i]=this.globalSerializer.deserializeStream(t);return[{mod:n,arg:r.valueOf()},i]}deserializeSignature(e){const[t,n]=this._typeSerializer.deserializeStream(e),[r,i]=this._typeSerializer.deserializeStream(n);return[t,r,i]}deserializeAttributes(e){const[t,n]=this.globalSerializer.deserializeStream(e),r=Number(t.valueOf()),i=[];return 1&r&&i.push("private"),2&r&&i.push("payable"),[i,n]}deserializeSymbols(e){const t=p(u(),l()),n=this.globalSerializer.deserializeWithType(e,t).valueOf(),r={};return n.forEach(((e,t)=>{const n=s(t);r[n]=e})),r}deserializeAnnotations(e){return this.globalSerializer.deserialize(e).valueOf()}}},7596:function(e,t,n){const r=n(8707),i=n(5980),a=n(1794),s=n(1666),o=new i;e.exports=class extends s{serialize(e){return[r.OBJECT,r.OTYPE_BYTES,...o.serialize(e.value)]}deserializeStream(e){const t=new Uint8Array(e),[n,r]=o.deserializeStream(t.slice(2));return[new a(n.valueOf()),r]}}},8003:function(e,t,n){const r=n(4899),i=n(3585),a=n(30),s=n(1666),{FateTypeTuple:o,FateTypeByteArray:c}=n(3182);e.exports=class extends s{serialize(e){const t=new a(e.functionId),n=new r(e.argTypes,e.args),i=new r([t.type,n.type],[t,n]);return this.globalSerializer.serialize(i)}deserialize(e,t){const n=o([c(),o(t.argumentTypes)]),[r]=this.globalSerializer.deserializeStream(e,n),[a,s]=r.items;return new i(a.valueOf(),s.valueTypes,s.items)}}},284:function(e,t,n){const r=n(858),i=n(8707),a=n(1666),s=n(9216);e.exports=class extends a{serialize(e){return[i.OBJECT,i.OTYPE_CHANNEL,...r.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=r.decode(t.slice(2),!0);return[new s(n.data),new Uint8Array(n.remainder)]}}},4058:function(e,t,n){const r=n(858),i=n(1666),a=n(2664),s=n(8766),{byteArray2Int:o,byteArray2Hex:c}=n(1247);e.exports=class extends i{constructor(e){super(),this._bytecodeSerializer=new a(e),this._intSerializer=new s}deserializeStream(e){const t=new Uint8Array(e),[n,i]=this._intSerializer.deserializeStream(t.slice(1)),a=Number(n),s=r.decode(i.slice(0,a)),u=new TextDecoder;return[{tag:o(s[0]),vsn:o(s[1]),sourceHash:c(s[2]),aevmTypeInfo:s[3],bytecode:this._bytecodeSerializer.deserialize(s[4]),compilerVersion:u.decode(s[5]),payable:Boolean(s[6][0])},i.slice(a)]}}},1849:function(e,t,n){const r=n(858),i=n(8707),a=n(1666),s=n(8767);e.exports=class extends a{serialize(e){return[i.OBJECT,i.OTYPE_CONTRACT,...r.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=r.decode(t.slice(2),!0);return[new s(n.data),new Uint8Array(n.remainder)]}}},8766:function(e,t,n){const r=n(8707),i=n(6128),a=n(9512),s=n(1666),o=n(3541),c=n(1351);e.exports=class extends s{serialize(e){const t=e instanceof a?e.value:BigInt(e),n=c(t);if(n<64){const e=Number(n);return t>=0?[e<<1]:[e<<1&254|128]}return t<0?[r.NEG_BIG_INT,...i.encode(n-64n)]:[r.POS_BIG_INT,...i.encode(n-64n)]}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(!(1&n))return 128&n?[new a(-((126&n)>>1)),t.slice(1)]:[new a(n>>1),t.slice(1)];if(n===r.POS_BIG_INT||n===r.NEG_BIG_INT){const e=n===r.POS_BIG_INT?1n:-1n,[s,o]=i.decode(t.slice(1));return[new a((s+64n)*e),new Uint8Array(o)]}throw new o(n)}}},5411:function(e,t,n){const r=n(6128),i=n(8707),a=n(889),s=n(1666);e.exports=class extends s{serialize(e){const t=e.items.map((e=>this.globalSerializer.serialize(e))).flat(1/0),n=e.items.length;return n<16?[n<<4|i.SHORT_LIST,...t]:[i.LONG_LIST,...r.encode(n-16),...t]}deserializeStream(e,t){const n=new Uint8Array(e),s=n[0];let o,c,u=0n,l=n.slice(1);s===i.LONG_LIST&&([u,l]=r.decode(n.slice(1)),u+=16n),(15&s)===i.SHORT_LIST&&(u=BigInt((240&s)>>4)),void 0!==t&&(o=t.valuesType);const p=[];for(let e=0n;e<u;e++)[c,l]=this.globalSerializer.deserializeStream(l,o),p.push(c);return 0n===u?[new a,l]:(void 0===t&&(o=p[0].type),[new a(o,p),l])}}},1885:function(e,t,n){const r=n(8707),i=n(6128),a=n(1666),s=n(5167),o=n(5603),c=n(3541);e.exports=class extends a{serialize(e){const t=e.length,n=s(e.keyType),a=[...e.items];a.sort(((e,t)=>n(e.key,t.key)));const o=a.map((e=>[this.globalSerializer.serialize(e.key),this.globalSerializer.serialize(e.value)]));return[r.MAP,...i.encode(t),...o.flat(1/0)]}deserializeStream(e,t){const n=new Uint8Array(e),a=n[0];if(a!==r.MAP)throw new c(a);const[s,u]=i.decode(n.slice(1));let l,p,d=u;if(0n===s)return[new o,d];void 0!==t&&({keyType:l,valueType:p}=t);const m=[];for(let e=0n;e<s;e++){const[e,t]=this.globalSerializer.deserializeStream(d,l),[n,r]=this.globalSerializer.deserializeStream(t,p);m.push([e,n]),d=r}const h=m[0];return void 0===t&&(l=h[0].type,p=h[1].type),[new o(l,p,m),d]}}},4157:function(e,t,n){const r=n(858),i=n(8707),a=n(1666),s=n(3131);e.exports=class extends a{serialize(e){return[i.OBJECT,i.OTYPE_ORACLE_QUERY,...r.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=r.decode(t.slice(2),!0);return[new s(n.data),new Uint8Array(n.remainder)]}}},5945:function(e,t,n){const r=n(858),i=n(8707),a=n(1666),s=n(9511);e.exports=class extends a{serialize(e){return[i.OBJECT,i.OTYPE_ORACLE,...r.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=r.decode(t.slice(2),!0);return[new s(n.data),new Uint8Array(n.remainder)]}}},6291:function(e,t,n){const r=n(1666),{FateTypeTuple:i,FateTypeMap:a}=n(3182),s=n(5603),o=n(4899),c=n(5981);e.exports=class extends r{serialize(e){return this.globalSerializer.serialize(new s(e.itemsType,i(),e.items.map((e=>[e,new o]))))}deserializeStream(e,t){const n=a(t.valuesType,i()),[r,s]=this.globalSerializer.deserializeStream(e,n);return[new c(t.valuesType,r.keys),s]}}},8566:function(e,t,n){const r=n(8707),i=n(1666),a=n(5980),s=n(2280),o=n(3541),c=new a;e.exports=class extends i{serialize(e){const t=(new TextEncoder).encode(e);return c.serialize(t)}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if((3&n)!==r.SHORT_STRING&&![r.EMPTY_STRING,r.LONG_STRING].includes(n))throw new o(n);const i=new TextDecoder,[a,u]=c.deserializeStream(t);return[new s(i.decode(a.valueOf())),u]}}},2021:function(e,t,n){const r=n(8707),i=n(4899),a=n(1666),s=n(6128);e.exports=class extends a{serialize(e){const t=e.size;if(0===t)return[r.EMPTY_TUPLE];const n=e.items.map((e=>this.globalSerializer.serialize(e))).flat(1/0);return t<16?[t<<4|r.SHORT_TUPLE,...n]:[r.LONG_TUPLE,...s.encode(t-16),...n]}deserializeStream(e,t){const n=new Uint8Array(e),a=n[0];let o=0n,c=n.slice(1);if(a===r.EMPTY_TUPLE)return[new i,c];(15&a)===r.SHORT_TUPLE&&(o=(240&a)>>4),a===r.LONG_TUPLE&&([o,c]=s.decode(n.slice(1)),o+=16n);let u=[];void 0!==t&&(u=t.valueTypes);const l=[];let p=null;for(let e=0n;e<o;e++)[p,c]=this.globalSerializer.deserializeStream(c,u[e]),l.push(p);let d=t;return void 0===t&&(d=l.map((e=>e.type))),[new i(d,l),c]}}},4323:function(e,t,n){const r=n(8707),i=n(1666),a=n(8766),s=n(3541),o=n(5345),{FateTypeInt:c,FateTypeBool:u,FateTypeString:l,FateTypeBits:p,FateTypeBytes:d,FateTypeAccountAddress:m,FateTypeContractAddress:h,FateTypeOracleAddress:f,FateTypeOracleQueryAddress:y,FateTypeChannelAddress:g,FateTypeList:w,FateTypeMap:N,FateTypeTuple:v,FateTypeVariant:b,FateTypeVar:x,FateTypeAny:_}=n(3182),T={[r.TYPE_INTEGER]:c(),[r.TYPE_BOOLEAN]:u(),[r.TYPE_BITS]:p(),[r.TYPE_STRING]:l(),[r.TYPE_ANY]:_()},C={[r.OTYPE_ADDRESS]:m(),[r.OTYPE_CONTRACT]:h(),[r.OTYPE_ORACLE]:f(),[r.OTYPE_ORACLE_QUERY]:y(),[r.OTYPE_CHANNEL]:g()};e.exports=class extends i{constructor(e){super(e),this._intSerializer=new a}serialize(e){const t=Object.entries(T).find((([t,{name:n}])=>n===e.name))?.[0];if(null!=t)return new Uint8Array([t]);const n=Object.entries(C).find((([t,{name:n}])=>n===e.name))?.[0];if(null!=n)return new Uint8Array([r.TYPE_OBJECT,n]);if("tvar"===e.name)return new Uint8Array([r.TYPE_VAR,e.id]);if("bytes"===e.name)return new Uint8Array([r.TYPE_BYTES,...this._intSerializer.serialize(e.size)]);if("list"===e.name)return new Uint8Array([r.TYPE_LIST,...this.serialize(e.valuesType)]);if("map"===e.name)return new Uint8Array([r.TYPE_MAP,...this.serialize(e.keyType),...this.serialize(e.valueType)]);if("tuple"===e.name)return new Uint8Array([r.TYPE_TUPLE,e.valueTypes.length,...e.valueTypes.map((e=>[...this.serialize(e)])).flat()]);if("variant"===e.name)return new Uint8Array([r.TYPE_VARIANT,e.variants.length,...e.variants.map((e=>[...this.serialize(e)])).flat()]);throw new o(e.name,`Unsupported type: ${e.name}`)}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(T.hasOwnProperty(n))return[T[n],t.slice(1)];if(n===r.TYPE_OBJECT){const e=t[1];if(!C.hasOwnProperty(e))throw new s(e,"Unsupported object type");return[C[e],t.slice(2)]}if(n===r.TYPE_VAR)return[x(t[1]),t.slice(2)];if(n===r.TYPE_BYTES){const[e,n]=this._intSerializer.deserializeStream(t.slice(1));return[d(e.valueOf()),n]}if(n===r.TYPE_LIST){const[e,n]=this.deserializeStream(t.slice(1));return[w(e),n]}if(n===r.TYPE_MAP){const[e,n]=this.deserializeStream(t.slice(1)),[r,i]=this.deserializeStream(n);return[N(e,r),i]}if(n===r.TYPE_TUPLE){const e=t[1],n=[];let r,i=t.slice(2);for(let t=0;t<e;t++)[r,i]=this.deserializeStream(i),n.push(r);return[v(n),i]}if(n===r.TYPE_VARIANT){const e=t[1],n=[];let r,i=t.slice(2);for(let t=0;t<e;t++)[r,i]=this.deserializeStream(i),n.push(r);return[b(n),i]}throw new s(n)}}},8950:function(e,t,n){const r=n(858),i=n(8707),a=n(4899),s=n(9560),{FateTypeTuple:o}=n(3182),c=n(1666);e.exports=class extends c{serialize(e){const t=new a(e.valueTypes,e.value);return[i.VARIANT,...r.encode(new Uint8Array(e.arities)),e.tag,...this.globalSerializer.serialize(t)]}deserializeStream(e,t){const n=new Uint8Array(e),i=r.decode(n.slice(1),!0),a=[...i.data],c=i.remainder[0],u=i.remainder.slice(1);let l,p=[];void 0!==t&&void 0!==t.variants&&(p=t.variants,l=o(Object.values(p[c])[0]));const[d,m]=this.globalSerializer.deserializeStream(u,l);return[new s(a,c,d.items,d.valueTypes,p),m]}}},9737:function(e,t,n){const r=n(4779),i=n(1666);e.exports=class extends i{serialize(){return""}deserialize(){return new r}deserializeStream(e){return[new r,e]}}},9291:function(e,t,n){const r=n(6949),i=n(8707),a=n(3541),{FateTypeInt:s,FateTypeBool:o,FateTypeString:c,FateTypeBits:u,FateTypeBytes:l,FateTypeAccountAddress:p,FateTypeContractAddress:d,FateTypeOracleAddress:m,FateTypeOracleQueryAddress:h,FateTypeChannelAddress:f,FateTypeList:y,FateTypeMap:g,FateTypeTuple:w,FateTypeVariant:N,FateTypeContractBytearray:v,FateTypeType:b}=n(3182),x={[i.OTYPE_ADDRESS]:p(),[i.OTYPE_BYTES]:l(),[i.OTYPE_CONTRACT]:d(),[i.OTYPE_ORACLE]:m(),[i.OTYPE_ORACLE_QUERY]:h(),[i.OTYPE_CHANNEL]:f()};e.exports=class{createType(e){const t=e[0];if(t===i.TRUE||t===i.FALSE)return o();if((1&t)===i.SMALL_INT||t===i.POS_BIG_INT||t===i.NEG_BIG_INT)return s();if((3&t)===i.SHORT_STRING||t===i.LONG_STRING||t===i.EMPTY_STRING)return c();if((15&t)===i.SHORT_LIST||t===i.LONG_LIST)return y();if((15&t)===i.SHORT_TUPLE||t===i.LONG_TUPLE||t===i.EMPTY_TUPLE)return w();if(t===i.MAP||t===i.EMPTY_MAP)return g();if(t===i.POS_BITS||t===i.NEG_BITS)return u();if(t===i.VARIANT)return N();if(t===i.OBJECT){const t=e[1];return r(x.hasOwnProperty(t),`Unsupported object type "${t}"`),x[t]}if(t===i.CONTRACT_BYTEARRAY)return v();if(t===i.TYPE_INTEGER||t===i.TYPE_BOOLEAN||t===i.TYPE_LIST||t===i.TYPE_TUPLE||t===i.TYPE_OBJECT||t===i.TYPE_BITS||t===i.TYPE_MAP||t===i.TYPE_STRING||t===i.TYPE_VARIANT||t===i.TYPE_BYTES||t===i.TYPE_CONTRACT_BYTEARRAY||t===i.TYPE_VAR||t===i.TYPE_ANY)return b();throw new a(t)}}},7815:function(e,t,n){const r=n(4495),{FateTypeVoid:i,FateTypeInt:a,FateTypeBool:s,FateTypeString:o,FateTypeBits:c,FateTypeBytes:u,FateTypeHash:l,FateTypeSignature:p,FateTypeAccountAddress:d,FateTypeContractAddress:m,FateTypeOracleAddress:h,FateTypeOracleQueryAddress:f,FateTypeList:y,FateTypeMap:g,FateTypeTuple:w,FateTypeRecord:N,FateTypeSet:v,FateTypeVariant:b,FateTypeOption:x,FateTypeChainTTL:_,FateTypeChainGAMetaTx:T,FateTypeChainPayingForTx:C,FateTypeChainBaseTx:S,FateTypeAENSPointee:A,FateTypeAENSv2Pointee:P,FateTypeAENSName:E,FateTypeAENSv2Name:z,FateTypeBls12381Fr:I,FateTypeBls12381Fp:M}=n(3182);e.exports=class{isCustomType(){return!1}resolveTypeDef(e,t){return[e,t]}resolveValueTypes(e,t){return Array.isArray(e)?e.map((e=>{const n=e.hasOwnProperty("type")?e.type:e,r=t.hasOwnProperty(n)?t[n]:n;return this.resolveType(r,t)})):[]}resolveType(e,t={}){let n=e,b=[],q=[];var R;if((R=e)&&"object"==typeof R&&R.constructor===Object&&([[n,b]]=Object.entries(e)),this.isCustomType(n)){const[e,t]=this.resolveTypeDef(n,b);return this.resolveType(e,t)}if("variant"!==n&&(q=this.resolveValueTypes(b,t)),"void"===n)return i();if("unit"===n)return w([]);if("int"===n)return a();if("bool"===n)return s();if("string"===n)return o();if("bits"===n)return c();if("hash"===n)return l();if("signature"===n)return p();if("address"===n)return d();if("contract_pubkey"===n)return m();if("Chain.ttl"===n)return _();if("Chain.ga_meta_tx"===n)return T();if("Chain.paying_for_tx"===n)return C();if("Chain.base_tx"===n)return S();if("AENS.pointee"===n)return A();if("AENSv2.pointee"===n)return P();if("AENS.name"===n)return E();if("AENSv2.name"===n)return z();if("Set.set"===n)return v(...q);if("MCL_BLS12_381.fr"===n)return I();if("MCL_BLS12_381.fp"===n)return M();if("bytes"===n)return u("any"===b?void 0:b);if("list"===n)return y(...q);if("map"===n)return g(...q);if(("tuple"===n||"record"===n)&&1===q.length)return q[0];if("tuple"===n)return w(q);if("record"===n){const e=b.map((e=>e.name));return N(e,q)}if("variant"===n)return this.resolveVariant(b,t);if("option"===n)return x(q);if("oracle"===n)return h(...q);if("oracle_query"===n)return f(...q);throw new r("Cannot resolve type: "+JSON.stringify(e))}resolveVariant(e,t){const n=e.map((e=>{const[[n,r]]=Object.entries(e),i=r.map((e=>{const n=t.hasOwnProperty(e)?t[e]:e;return this.resolveType(n,t)}));return{[n]:i}}));return b(n)}}},5711:function(e,t,n){const r=n(9226);e.exports=class{constructor(e){this._internalEncoder=new r(e)}encodeCall(e,t,n){return this._internalEncoder.encodeCall(e,t,n)}decodeCall(e,t,n){return this._internalEncoder.decodeCall(e,t,n)}decodeResult(e,t,n,r="ok"){return this._internalEncoder.decodeResult(e,t,n,r)}decodeEvent(e,t,n){return this._internalEncoder.decodeEvent(e,t,n)}}},1877:function(e,t,n){const r=n(146);e.exports=class{constructor(e){this._internalEncoder=new r(e)}encodeCall(e,t){return this._internalEncoder.encodeCall(e,t)}decodeCall(e){return this._internalEncoder.decodeCall(e)}decodeResult(e,t="ok"){return this._internalEncoder.decodeResult(e,t)}}},4747:function(e,t,n){const r=n(9986);e.exports=class{constructor(){this._internalEncoder=new r}encodeWithType(e,t){return this._internalEncoder.encode(t,e)}decode(e){return this._internalEncoder.decode(e)}decodeWithType(e,t){return this._internalEncoder.decodeWithType(e,t)}}},9316:function(e,t,n){const r=n(9479);e.exports=class{constructor(){this._internalEncoder=new r}decode(e){return this._internalEncoder.decode(e)}}},3442:function(e,t,n){const r=n(4841);e.exports=class{constructor(e){this._internalEncoder=new r(e)}encode(e,t,n){return this._internalEncoder.encode(e,t,n)}decode(e,t,n){return this._internalEncoder.decode(e,t,n)}decodeContractByteArray(e){return this._internalEncoder.decodeContractByteArray(e)}decodeString(e){return this._internalEncoder.decodeString(e)}decodeFateString(e){return this._internalEncoder.decodeFateString(e)}decodeEvent(e,t,n){return this._internalEncoder.decodeEvent(e,t,n)}}},6278:function(e,t,n){const r=n(9101);e.exports=class{constructor(){this._internalEncoder=new r}encode(e,t){return this._internalEncoder.encode(e,t)}decode(e){return this._internalEncoder.decode(e)}}},9102:function(e,t,n){const r=n(7815);e.exports=class{constructor(){this._internalResolver=new r}resolveType(e,t={}){return this._internalResolver.resolveType(e,t)}}},6176:function(e,t,n){const r=n(3442),i=n(5711),a=n(1877),s=n(4747),o=n(6278),c=n(9316),u=n(9102);e.exports={Encoder:r,AciContractCallEncoder:i,BytecodeContractCallEncoder:a,ContractByteArrayEncoder:s,FateApiEncoder:o,ContractEncoder:c,TypeResolver:u}},9640:function(e,t,n){const r=n(3533);e.exports=class extends r{constructor(e){super(e,"account_pubkey","ak")}}},3533:function(e,t,n){const r=n(1794);e.exports=class extends r{constructor(e,t,n){super(e,32,t),this._prefix=n}get prefix(){return this._prefix}accept(e){return e.visitAddress(this)}}},2325:function(e,t,n){const r=n(8517);e.exports=class extends r{constructor(e){super("bits"),this._value=BigInt(e)}get value(){return this._value}valueOf(){return this._value}}},6859:function(e,t,n){const r=n(8517),i=n(5345);e.exports=class extends r{constructor(e,t,n){if(super(n),!Array.isArray(e)&&!ArrayBuffer.isView(e))throw new i(n,`Should be one of: Array or ArrayBuffer; got ${e} instead`);const r=new Uint8Array(e);if(r.byteLength!==t)throw new i(n,`Invalid length: got ${r.byteLength} bytes instead of ${t} bytes`);this._value=r,this._size=t}get value(){return this._value}get size(){return this._size}valueOf(){return this._value}}},4537:function(e,t,n){const r=n(6859),{FateTypeBls12381Fp:i}=n(3182);e.exports=class extends r{constructor(e){super(e,48,"bls12_381.fp")}get type(){return i()}accept(e){return e.visitBls12381Fp(this)}}},1047:function(e,t,n){const r=n(6859),{FateTypeBls12381Fr:i}=n(3182);e.exports=class extends r{constructor(e){super(e,32,"bls12_381.fr")}get type(){return i()}accept(e){return e.visitBls12381Fr(this)}}},6465:function(e,t,n){const r=n(8517),{FateTypeBool:i}=n(3182);e.exports=class extends r{constructor(e){super("bool"),this._value=!!e}get value(){return this._value}get type(){return i()}valueOf(){return this._value}}},30:function(e,t,n){const r=n(8517),{FateTypeByteArray:i}=n(3182);e.exports=class extends r{constructor(e=[]){super("byte_array"),this._value=new Uint8Array(e)}get length(){return this._value.length}get type(){return i()}valueOf(){return this._value}}},1794:function(e,t,n){const r=n(8517),{int2ByteArray:i}=n(1247),a=n(6423),s=n(5345);e.exports=class extends r{constructor(e,t,n="bytes"){if(super(n),this._value=((e,t=0)=>{if(Array.isArray(e)||ArrayBuffer.isView(e))return new Uint8Array(e);if("string"==typeof e)return a(e);if("bigint"!=typeof e&&!Number.isInteger(e))throw new s("byte_array",`Should be one of: Array, ArrayBuffer, hex string, Number, BigInt; got ${e} instead`);const n=i(e);if(n.length>=t)return n;const r=new Uint8Array(t);return r.set(n,t-n.length),r})(e,t),t&&this._value.byteLength!==t)throw new s(n,`Invalid length: got ${this._value.byteLength} bytes instead of ${t} bytes`);this._size=t}get value(){return this._value}get size(){return this._size}valueOf(){return this._value}}},3585:function(e,t,n){const r=n(8517);e.exports=class extends r{constructor(e,t,n){super("calldata"),this._functionId=new Uint8Array(e),this._argTypes=t,this._args=n}get functionId(){return this._functionId}get argTypes(){return this._argTypes}get args(){return this._args}valueOf(){return{functionId:this._functionId,args:this._args}}accept(e){return e.visitCalldata(this)}}},9216:function(e,t,n){const r=n(3533);e.exports=class extends r{constructor(e){super(e,"channel","ch")}}},8767:function(e,t,n){const r=n(3533);e.exports=class extends r{constructor(e){super(e,"contract_pubkey","ct")}}},8517:function(e,t,n){const r=n(9520);e.exports=class{constructor(e){this.name=e}valueOf(){throw new r("Not implemented.")}accept(e){return e.visitData(this)}}},1649:function(e,t,n){const r=n(1794);e.exports=class extends r{constructor(e){super(e,32,"hash")}}},9512:function(e,t,n){const r=n(8517),{FateTypeInt:i}=n(3182);e.exports=class extends r{constructor(e){super("int"),this._value=BigInt(e)}get value(){return this._value}get type(){return i()}valueOf(){return this._value}}},889:function(e,t,n){const r=n(8517),{FateTypeList:i}=n(3182);e.exports=class extends r{constructor(e,t=[]){super("list"),this._itemsType=e,this.items=Array.from(t)}get itemsType(){return this._itemsType}get type(){return i(this.itemsType)}get length(){return this.items.length}valueOf(){return this.items.map((e=>e.valueOf()))}accept(e){return e.visitList(this)}}},5603:function(e,t,n){const r=n(8517),{FateTypeMap:i}=n(3182),a=e=>{const[t,n]=e;return{key:t,value:n}};e.exports=class extends r{constructor(e,t,n=[]){super("map"),this._keyType=e,this._valueType=t,this._type=i(e,t),this._value=new Map(n)}get items(){return[...this._value.entries()].map(a)}get keyType(){return this._keyType}get valueType(){return this._valueType}get type(){return this._type}get length(){return this._value.size}get iterator(){return this._value[Symbol.iterator]()}get keys(){return this._value.keys()}valueOf(){const e=new Map;for(const[t,n]of this.iterator)e.set(t.valueOf(),n.valueOf());return e}accept(e){return e.visitMap(this)}}},9511:function(e,t,n){const r=n(3533);e.exports=class extends r{constructor(e){super(e,"oracle_pubkey","ok")}}},3131:function(e,t,n){const r=n(3533);e.exports=class extends r{constructor(e){super(e,"oracle_query_id","oq")}}},5981:function(e,t,n){const r=n(8517),{FateTypeSet:i}=n(3182);e.exports=class extends r{constructor(e,t=[]){super("set"),this._itemsType=e,this._items=new Set(t)}get items(){return Array.from(this._items.values())}get itemsType(){return this._itemsType}get type(){return i(this.itemsType)}get length(){return this._items.size}valueOf(){return new Set(this.items.map((e=>e.valueOf())))}accept(e){return e.visitSet(this)}}},1143:function(e,t,n){const r=n(1794);e.exports=class extends r{constructor(e){super(e,64,"signature")}}},2280:function(e,t,n){const r=n(8517),{FateTypeString:i}=n(3182);e.exports=class extends r{constructor(e){var t;super("string"),this._value=(t=e)instanceof Uint8Array?(new TextDecoder).decode(t):t.toString()}get type(){return i()}toString(){return this._value}valueOf(){return this._value}}},4899:function(e,t,n){const r=n(8517),{FateTypeTuple:i}=n(3182);e.exports=class extends r{constructor(e=[],t=[]){super("tuple"),this._valueTypes=e.hasOwnProperty("valueTypes")?e.valueTypes:e,this._type=Array.isArray(e)?i(e):e,this._items=Array.from(t)}get valueTypes(){return this._valueTypes}get type(){return this._type}get size(){return this._items.length}get items(){return this._items}valueOf(){return this.prepareItems((e=>e.valueOf()))}prepareItems(e){const t=this._items.map(e);return"record"===this._type.name?(n=this._type.keys,r=t,n.reduce(((e,t,n)=>(e[t]=r[n],e)),{})):t;var n,r}accept(e){return e.visitTuple(this)}}},9560:function(e,t,n){const r=n(8517),{FateTypeVariant:i,FateTypeTuple:a,FateTypeInt:s}=n(3182);e.exports=class extends r{constructor(e,t,n=[],r=[],a=[]){super("variant"),this.arities=Array.from(e),this._tag=t,this._value=n,this._valueTypes=r,this._type=i(a)}get valueTypes(){return this._valueTypes}get type(){return this._type}get tag(){return this._tag}get value(){return this._value}get aritiesType(){return s()}get variantType(){return a(this._valueTypes)}get variants(){return this._type.variants}get variantName(){if(0===this.variants.length)return this.tag;const e=this.variants[this.tag];return Object.keys(e)[0]}valueOf(){if(0===this.variants.length)return this;const e=this._value.map((e=>e.valueOf()));return{[this.variantName]:e}}accept(e){return e.visitVariant(this)}}},4779:function(e,t,n){const r=n(8517),{FateTypeVoid:i}=n(3182);e.exports=class extends r{constructor(){super("void"),this._value=void 0}get value(){return this._value}get type(){return i()}valueOf(){return this._value}}},6128:function(e,t,n){const r=n(858),{int2ByteArray:i,byteArray2Int:a}=n(1247);e.exports={encode(e){return new Uint8Array(r.encode(i(e)))},decode(e){const t=r.decode(e,!0);return[a(t.data),t.remainder]}}},1351:function(e){e.exports=e=>e>0?e:-1n*e},6949:function(e,t,n){const r=n(9520);e.exports=(e,t)=>{if(!e)throw new r(t)}},6911:function(e,t,n){const r=n(8957).default,{addChecksum:i,getPayload:a}=n(2122);e.exports={encode:e=>r.encode(i(e)),decode:e=>a(r.decode(e))}},2122:function(e,t,n){const r=n(4107),{Buffer:i}=n(2861),a=n(5450),s=e=>(new r).update(e).digest(),o=e=>s(s(e)).slice(0,4),c=e=>{const t=i.from(e),n=o(e);return i.concat([t,n],t.length+4)},u=e=>{const t=i.from(e),n=t.slice(0,-4),r=t.slice(-4),s=o(n);if(!r.equals(s))throw new a("Invalid checksum");return new Uint8Array(n)};e.exports={addChecksum:c,getPayload:u,encode:e=>c(e).toString("base64"),decode:e=>{const t=i.from(e,"base64");return u(t)}}},2041:function(e,t,n){const{int2ByteArray:r,byteArray2IntBE:i}=n(1247),a={r:{R:1n<<256n,N:0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001n},p:{R:1n<<384n,N:0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn}},s=(e,t)=>{if(0n===t)return[1n,0n,e];const[n,r,i]=s(t,e%t);return[r,n-r*(e/t),i]};e.exports={int2MontBytes:(e,t)=>{const n=a[t],i=BigInt(e)*n.R%n.N;return r(i)},montBytes2Int:(e,t)=>{const n=a[t],r=i(e),o=((e,t)=>{const[n,r,i]=s(e,t);return(n+t)%t})(n.R,n.N);return r*o%n.N}}},7439:function(e,t,n){const r=n(4156),i=e=>Array.from(r.blake2b(e,null,32));e.exports={hash:i,symbolIdentifier:e=>i(e).slice(0,4)}},6423:function(e,t,n){const r=n(5450);e.exports=e=>{const t=e.match(/^(0x)?([a-f0-9]*)$/i);if(!t)throw new r(`Invalid hex string: ${e}`);return new Uint8Array(t[2].split(/(.{1,2})/).filter((e=>e)).map((e=>parseInt(e,16))))}},1247:function(e){const t=e=>{const n=BigInt(e);return n<256n?new Uint8Array([Number(n)]):new Uint8Array([...t(n>>8n),Number(0xffn&n)])},n=e=>[...e].map((e=>e.toString(16).padStart(2,"0")));e.exports={int2ByteArray:t,byteArray2Int:e=>{const t=n(e);return BigInt("0x"+t.join(""))},byteArray2IntBE:e=>{const t=n(e).reverse();return BigInt("0x"+t.join(""))},byteArray2Hex:e=>n(e).join("")}},7412:function(e){e.exports=(e,...t)=>e.map(((e,n)=>t.reduce(((e,t)=>[...e,t[n]]),[e])))},7526:function(e,t){"use strict";t.byteLength=function(e){var t=o(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,a=o(e),s=a[0],c=a[1],u=new i(function(e,t,n){return 3*(t+n)/4-n}(0,s,c)),l=0,p=c>0?s-4:s;for(n=0;n<p;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===c&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[l++]=255&t),1===c&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],s=16383,o=0,u=r-i;o<u;o+=s)a.push(c(e,o,o+s>u?u:o+s));return 1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),a.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=a[s],r[a.charCodeAt(s)]=s;function o(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,r){for(var i,a,s=[],o=t;o<r;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),s.push(n[(a=i)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},1594:function(e,t,n){var r;!function(){"use strict";var i,a=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,o=Math.floor,c="[BigNumber Error] ",u=c+"Number primitive has more than 15 significant digits: ",l=1e14,p=14,d=9007199254740991,m=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],h=1e7,f=1e9;function y(e){var t=0|e;return e>0||e===t?t:t-1}function g(e){for(var t,n,r=1,i=e.length,a=e[0]+"";r<i;){for(t=e[r++]+"",n=p-t.length;n--;t="0"+t);a+=t}for(i=a.length;48===a.charCodeAt(--i););return a.slice(0,i+1||1)}function w(e,t){var n,r,i=e.c,a=t.c,s=e.s,o=t.s,c=e.e,u=t.e;if(!s||!o)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-o:s;if(s!=o)return s;if(n=s<0,r=c==u,!i||!a)return r?0:!i^n?1:-1;if(!r)return c>u^n?1:-1;for(o=(c=i.length)<(u=a.length)?c:u,s=0;s<o;s++)if(i[s]!=a[s])return i[s]>a[s]^n?1:-1;return c==u?0:c>u^n?1:-1}function N(e,t,n,r){if(e<t||e>n||e!==o(e))throw Error(c+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function v(e){var t=e.c.length-1;return y(e.e/p)==t&&e.c[t]%2!=0}function b(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function x(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}i=function e(t){var n,r,i,_,T,C,S,A,P,E,z=V.prototype={constructor:V,toString:null,valueOf:null},I=new V(1),M=20,q=4,R=-7,O=21,k=-1e7,B=1e7,$=!1,U=1,L=0,G={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},F="0123456789abcdefghijklmnopqrstuvwxyz",D=!0;function V(e,t){var n,s,c,l,m,h,f,y,g=this;if(!(g instanceof V))return new V(e,t);if(null==t){if(e&&!0===e._isBigNumber)return g.s=e.s,void(!e.c||e.e>B?g.c=g.e=null:e.e<k?g.c=[g.e=0]:(g.e=e.e,g.c=e.c.slice()));if((h="number"==typeof e)&&0*e==0){if(g.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,m=e;m>=10;m/=10,l++);return void(l>B?g.c=g.e=null:(g.e=l,g.c=[e]))}y=String(e)}else{if(!a.test(y=String(e)))return i(g,y,h);g.s=45==y.charCodeAt(0)?(y=y.slice(1),-1):1}(l=y.indexOf("."))>-1&&(y=y.replace(".","")),(m=y.search(/e/i))>0?(l<0&&(l=m),l+=+y.slice(m+1),y=y.substring(0,m)):l<0&&(l=y.length)}else{if(N(t,2,F.length,"Base"),10==t&&D)return W(g=new V(e),M+g.e+1,q);if(y=String(e),h="number"==typeof e){if(0*e!=0)return i(g,y,h,t);if(g.s=1/e<0?(y=y.slice(1),-1):1,V.DEBUG&&y.replace(/^0\.0*|\./,"").length>15)throw Error(u+e)}else g.s=45===y.charCodeAt(0)?(y=y.slice(1),-1):1;for(n=F.slice(0,t),l=m=0,f=y.length;m<f;m++)if(n.indexOf(s=y.charAt(m))<0){if("."==s){if(m>l){l=f;continue}}else if(!c&&(y==y.toUpperCase()&&(y=y.toLowerCase())||y==y.toLowerCase()&&(y=y.toUpperCase()))){c=!0,m=-1,l=0;continue}return i(g,String(e),h,t)}h=!1,(l=(y=r(y,t,10,g.s)).indexOf("."))>-1?y=y.replace(".",""):l=y.length}for(m=0;48===y.charCodeAt(m);m++);for(f=y.length;48===y.charCodeAt(--f););if(y=y.slice(m,++f)){if(f-=m,h&&V.DEBUG&&f>15&&(e>d||e!==o(e)))throw Error(u+g.s*e);if((l=l-m-1)>B)g.c=g.e=null;else if(l<k)g.c=[g.e=0];else{if(g.e=l,g.c=[],m=(l+1)%p,l<0&&(m+=p),m<f){for(m&&g.c.push(+y.slice(0,m)),f-=p;m<f;)g.c.push(+y.slice(m,m+=p));m=p-(y=y.slice(m)).length}else m-=f;for(;m--;y+="0");g.c.push(+y)}}else g.c=[g.e=0]}function j(e,t,n,r){var i,a,s,o,c;if(null==n?n=q:N(n,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)c=g(e.c),c=1==r||2==r&&(s<=R||s>=O)?b(c,s):x(c,s,"0");else if(a=(e=W(new V(e),t,n)).e,o=(c=g(e.c)).length,1==r||2==r&&(t<=a||a<=R)){for(;o<t;c+="0",o++);c=b(c,a)}else if(t-=s,c=x(c,a,"0"),a+1>o){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=a-o)>0)for(a+1==o&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function H(e,t){for(var n,r,i=1,a=new V(e[0]);i<e.length;i++)(!(r=new V(e[i])).s||(n=w(a,r))===t||0===n&&a.s===t)&&(a=r);return a}function J(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*p-1)>B?e.c=e.e=null:n<k?e.c=[e.e=0]:(e.e=n,e.c=t),e}function W(e,t,n,r){var i,a,c,u,d,h,f,y=e.c,g=m;if(y){e:{for(i=1,u=y[0];u>=10;u/=10,i++);if((a=t-i)<0)a+=p,c=t,d=y[h=0],f=o(d/g[i-c-1]%10);else if((h=s((a+1)/p))>=y.length){if(!r)break e;for(;y.length<=h;y.push(0));d=f=0,i=1,c=(a%=p)-p+1}else{for(d=u=y[h],i=1;u>=10;u/=10,i++);f=(c=(a%=p)-p+i)<0?0:o(d/g[i-c-1]%10)}if(r=r||t<0||null!=y[h+1]||(c<0?d:d%g[i-c-1]),r=n<4?(f||r)&&(0==n||n==(e.s<0?3:2)):f>5||5==f&&(4==n||r||6==n&&(a>0?c>0?d/g[i-c]:0:y[h-1])%10&1||n==(e.s<0?8:7)),t<1||!y[0])return y.length=0,r?(t-=e.e+1,y[0]=g[(p-t%p)%p],e.e=-t||0):y[0]=e.e=0,e;if(0==a?(y.length=h,u=1,h--):(y.length=h+1,u=g[p-a],y[h]=c>0?o(d/g[i-c]%g[c])*u:0),r)for(;;){if(0==h){for(a=1,c=y[0];c>=10;c/=10,a++);for(c=y[0]+=u,u=1;c>=10;c/=10,u++);a!=u&&(e.e++,y[0]==l&&(y[0]=1));break}if(y[h]+=u,y[h]!=l)break;y[h--]=0,u=1}for(a=y.length;0===y[--a];y.pop());}e.e>B?e.c=e.e=null:e.e<k&&(e.c=[e.e=0])}return e}function Y(e){var t,n=e.e;return null===n?e.toString():(t=g(e.c),t=n<=R||n>=O?b(t,n):x(t,n,"0"),e.s<0?"-"+t:t)}return V.clone=e,V.ROUND_UP=0,V.ROUND_DOWN=1,V.ROUND_CEIL=2,V.ROUND_FLOOR=3,V.ROUND_HALF_UP=4,V.ROUND_HALF_DOWN=5,V.ROUND_HALF_EVEN=6,V.ROUND_HALF_CEIL=7,V.ROUND_HALF_FLOOR=8,V.EUCLID=9,V.config=V.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(c+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(N(n=e[t],0,f,t),M=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(N(n=e[t],0,8,t),q=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(N(n[0],-f,0,t),N(n[1],0,f,t),R=n[0],O=n[1]):(N(n,-f,f,t),R=-(O=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)N(n[0],-f,-1,t),N(n[1],1,f,t),k=n[0],B=n[1];else{if(N(n,-f,f,t),!n)throw Error(c+t+" cannot be zero: "+n);k=-(B=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(c+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw $=!n,Error(c+"crypto unavailable");$=n}else $=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(N(n=e[t],0,9,t),U=n),e.hasOwnProperty(t="POW_PRECISION")&&(N(n=e[t],0,f,t),L=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(c+t+" not an object: "+n);G=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(c+t+" invalid: "+n);D="0123456789"==n.slice(0,10),F=n}}return{DECIMAL_PLACES:M,ROUNDING_MODE:q,EXPONENTIAL_AT:[R,O],RANGE:[k,B],CRYPTO:$,MODULO_MODE:U,POW_PRECISION:L,FORMAT:G,ALPHABET:F}},V.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!V.DEBUG)return!0;var t,n,r=e.c,i=e.e,a=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===a||-1===a)&&i>=-f&&i<=f&&i===o(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if((t=(i+1)%p)<1&&(t+=p),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=l||n!==o(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===a||1===a||-1===a))return!0;throw Error(c+"Invalid BigNumber: "+e)},V.maximum=V.max=function(){return H(arguments,-1)},V.minimum=V.min=function(){return H(arguments,1)},V.random=(_=9007199254740992,T=Math.random()*_&2097151?function(){return o(Math.random()*_)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,i,a,u=0,l=[],d=new V(I);if(null==e?e=M:N(e,0,f),i=s(e/p),$)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));u<i;)(a=131072*t[u]+(t[u+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[u]=n[0],t[u+1]=n[1]):(l.push(a%1e14),u+=2);u=i/2}else{if(!crypto.randomBytes)throw $=!1,Error(c+"crypto unavailable");for(t=crypto.randomBytes(i*=7);u<i;)(a=281474976710656*(31&t[u])+1099511627776*t[u+1]+4294967296*t[u+2]+16777216*t[u+3]+(t[u+4]<<16)+(t[u+5]<<8)+t[u+6])>=9e15?crypto.randomBytes(7).copy(t,u):(l.push(a%1e14),u+=7);u=i/7}if(!$)for(;u<i;)(a=T())<9e15&&(l[u++]=a%1e14);for(i=l[--u],e%=p,i&&e&&(a=m[p-e],l[u]=o(i/a)*a);0===l[u];l.pop(),u--);if(u<0)l=[r=0];else{for(r=-1;0===l[0];l.splice(0,1),r-=p);for(u=1,a=l[0];a>=10;a/=10,u++);u<p&&(r-=p-u)}return d.e=r,d.c=l,d}),V.sum=function(){for(var e=1,t=arguments,n=new V(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){var e="0123456789";function t(e,t,n,r){for(var i,a,s=[0],o=0,c=e.length;o<c;){for(a=s.length;a--;s[a]*=t);for(s[0]+=r.indexOf(e.charAt(o++)),i=0;i<s.length;i++)s[i]>n-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/n|0,s[i]%=n)}return s.reverse()}return function(r,i,a,s,o){var c,u,l,p,d,m,h,f,y=r.indexOf("."),w=M,N=q;for(y>=0&&(p=L,L=0,r=r.replace(".",""),m=(f=new V(i)).pow(r.length-y),L=p,f.c=t(x(g(m.c),m.e,"0"),10,a,e),f.e=f.c.length),l=p=(h=t(r,i,a,o?(c=F,e):(c=e,F))).length;0==h[--p];h.pop());if(!h[0])return c.charAt(0);if(y<0?--l:(m.c=h,m.e=l,m.s=s,h=(m=n(m,f,w,N,a)).c,d=m.r,l=m.e),y=h[u=l+w+1],p=a/2,d=d||u<0||null!=h[u+1],d=N<4?(null!=y||d)&&(0==N||N==(m.s<0?3:2)):y>p||y==p&&(4==N||d||6==N&&1&h[u-1]||N==(m.s<0?8:7)),u<1||!h[0])r=d?x(c.charAt(1),-w,c.charAt(0)):c.charAt(0);else{if(h.length=u,d)for(--a;++h[--u]>a;)h[u]=0,u||(++l,h=[1].concat(h));for(p=h.length;!h[--p];);for(y=0,r="";y<=p;r+=c.charAt(h[y++]));r=x(r,l,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,a,s,o=0,c=e.length,u=t%h,l=t/h|0;for(e=e.slice();c--;)o=((i=u*(a=e[c]%h)+(r=l*a+(s=e[c]/h|0)*u)%h*h+o)/n|0)+(r/h|0)+l*s,e[c]=i%n;return o&&(e=[o].concat(e)),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,a,s,c){var u,d,m,h,f,g,w,N,v,b,x,_,T,C,S,A,P,E=r.s==i.s?1:-1,z=r.c,I=i.c;if(!(z&&z[0]&&I&&I[0]))return new V(r.s&&i.s&&(z?!I||z[0]!=I[0]:I)?z&&0==z[0]||!I?0*E:E/0:NaN);for(v=(N=new V(E)).c=[],E=a+(d=r.e-i.e)+1,c||(c=l,d=y(r.e/p)-y(i.e/p),E=E/p|0),m=0;I[m]==(z[m]||0);m++);if(I[m]>(z[m]||0)&&d--,E<0)v.push(1),h=!0;else{for(C=z.length,A=I.length,m=0,E+=2,(f=o(c/(I[0]+1)))>1&&(I=e(I,f,c),z=e(z,f,c),A=I.length,C=z.length),T=A,x=(b=z.slice(0,A)).length;x<A;b[x++]=0);P=I.slice(),P=[0].concat(P),S=I[0],I[1]>=c/2&&S++;do{if(f=0,(u=t(I,b,A,x))<0){if(_=b[0],A!=x&&(_=_*c+(b[1]||0)),(f=o(_/S))>1)for(f>=c&&(f=c-1),w=(g=e(I,f,c)).length,x=b.length;1==t(g,b,w,x);)f--,n(g,A<w?P:I,w,c),w=g.length,u=1;else 0==f&&(u=f=1),w=(g=I.slice()).length;if(w<x&&(g=[0].concat(g)),n(b,g,x,c),x=b.length,-1==u)for(;t(I,b,A,x)<1;)f++,n(b,A<x?P:I,x,c),x=b.length}else 0===u&&(f++,b=[0]);v[m++]=f,b[0]?b[x++]=z[T]||0:(b=[z[T]],x=1)}while((T++<C||null!=b[0])&&E--);h=null!=b[0],v[0]||v.splice(0,1)}if(c==l){for(m=1,E=v[0];E>=10;E/=10,m++);W(N,a+(N.e=m+d*p-1)+1,s,h)}else N.e=d,N.r=+h;return N}}(),C=/^(-?)0([xbo])(?=\w[\w.]*$)/i,S=/^([^.]+)\.$/,A=/^\.([^.]+)$/,P=/^-?(Infinity|NaN)$/,E=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,n,r){var i,a=n?t:t.replace(E,"");if(P.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!n&&(a=a.replace(C,(function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t})),r&&(i=r,a=a.replace(S,"$1").replace(A,"0.$1")),t!=a))return new V(a,i);if(V.DEBUG)throw Error(c+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},z.absoluteValue=z.abs=function(){var e=new V(this);return e.s<0&&(e.s=1),e},z.comparedTo=function(e,t){return w(this,new V(e,t))},z.decimalPlaces=z.dp=function(e,t){var n,r,i,a=this;if(null!=e)return N(e,0,f),null==t?t=q:N(t,0,8),W(new V(a),e+a.e+1,t);if(!(n=a.c))return null;if(r=((i=n.length-1)-y(this.e/p))*p,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},z.dividedBy=z.div=function(e,t){return n(this,new V(e,t),M,q)},z.dividedToIntegerBy=z.idiv=function(e,t){return n(this,new V(e,t),0,1)},z.exponentiatedBy=z.pow=function(e,t){var n,r,i,a,u,l,d,m,h=this;if((e=new V(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+Y(e));if(null!=t&&(t=new V(t)),u=e.e>14,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return m=new V(Math.pow(+Y(h),u?e.s*(2-v(e)):+Y(e))),t?m.mod(t):m;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new V(NaN);(r=!l&&h.isInteger()&&t.isInteger())&&(h=h.mod(t))}else{if(e.e>9&&(h.e>0||h.e<-1||(0==h.e?h.c[0]>1||u&&h.c[1]>=24e7:h.c[0]<8e13||u&&h.c[0]<=9999975e7)))return a=h.s<0&&v(e)?-0:0,h.e>-1&&(a=1/a),new V(l?1/a:a);L&&(a=s(L/p+2))}for(u?(n=new V(.5),l&&(e.s=1),d=v(e)):d=(i=Math.abs(+Y(e)))%2,m=new V(I);;){if(d){if(!(m=m.times(h)).c)break;a?m.c.length>a&&(m.c.length=a):r&&(m=m.mod(t))}if(i){if(0===(i=o(i/2)))break;d=i%2}else if(W(e=e.times(n),e.e+1,1),e.e>14)d=v(e);else{if(0==(i=+Y(e)))break;d=i%2}h=h.times(h),a?h.c&&h.c.length>a&&(h.c.length=a):r&&(h=h.mod(t))}return r?m:(l&&(m=I.div(m)),t?m.mod(t):a?W(m,L,q,void 0):m)},z.integerValue=function(e){var t=new V(this);return null==e?e=q:N(e,0,8),W(t,t.e+1,e)},z.isEqualTo=z.eq=function(e,t){return 0===w(this,new V(e,t))},z.isFinite=function(){return!!this.c},z.isGreaterThan=z.gt=function(e,t){return w(this,new V(e,t))>0},z.isGreaterThanOrEqualTo=z.gte=function(e,t){return 1===(t=w(this,new V(e,t)))||0===t},z.isInteger=function(){return!!this.c&&y(this.e/p)>this.c.length-2},z.isLessThan=z.lt=function(e,t){return w(this,new V(e,t))<0},z.isLessThanOrEqualTo=z.lte=function(e,t){return-1===(t=w(this,new V(e,t)))||0===t},z.isNaN=function(){return!this.s},z.isNegative=function(){return this.s<0},z.isPositive=function(){return this.s>0},z.isZero=function(){return!!this.c&&0==this.c[0]},z.minus=function(e,t){var n,r,i,a,s=this,o=s.s;if(t=(e=new V(e,t)).s,!o||!t)return new V(NaN);if(o!=t)return e.s=-t,s.plus(e);var c=s.e/p,u=e.e/p,d=s.c,m=e.c;if(!c||!u){if(!d||!m)return d?(e.s=-t,e):new V(m?s:NaN);if(!d[0]||!m[0])return m[0]?(e.s=-t,e):new V(d[0]?s:3==q?-0:0)}if(c=y(c),u=y(u),d=d.slice(),o=c-u){for((a=o<0)?(o=-o,i=d):(u=c,i=m),i.reverse(),t=o;t--;i.push(0));i.reverse()}else for(r=(a=(o=d.length)<(t=m.length))?o:t,o=t=0;t<r;t++)if(d[t]!=m[t]){a=d[t]<m[t];break}if(a&&(i=d,d=m,m=i,e.s=-e.s),(t=(r=m.length)-(n=d.length))>0)for(;t--;d[n++]=0);for(t=l-1;r>o;){if(d[--r]<m[r]){for(n=r;n&&!d[--n];d[n]=t);--d[n],d[r]+=l}d[r]-=m[r]}for(;0==d[0];d.splice(0,1),--u);return d[0]?J(e,d,u):(e.s=3==q?-1:1,e.c=[e.e=0],e)},z.modulo=z.mod=function(e,t){var r,i,a=this;return e=new V(e,t),!a.c||!e.s||e.c&&!e.c[0]?new V(NaN):!e.c||a.c&&!a.c[0]?new V(a):(9==U?(i=e.s,e.s=1,r=n(a,e,0,3),e.s=i,r.s*=i):r=n(a,e,0,U),(e=a.minus(r.times(e))).c[0]||1!=U||(e.s=a.s),e)},z.multipliedBy=z.times=function(e,t){var n,r,i,a,s,o,c,u,d,m,f,g,w,N,v,b=this,x=b.c,_=(e=new V(e,t)).c;if(!(x&&_&&x[0]&&_[0]))return!b.s||!e.s||x&&!x[0]&&!_||_&&!_[0]&&!x?e.c=e.e=e.s=null:(e.s*=b.s,x&&_?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=y(b.e/p)+y(e.e/p),e.s*=b.s,(c=x.length)<(m=_.length)&&(w=x,x=_,_=w,i=c,c=m,m=i),i=c+m,w=[];i--;w.push(0));for(N=l,v=h,i=m;--i>=0;){for(n=0,f=_[i]%v,g=_[i]/v|0,a=i+(s=c);a>i;)n=((u=f*(u=x[--s]%v)+(o=g*u+(d=x[s]/v|0)*f)%v*v+w[a]+n)/N|0)+(o/v|0)+g*d,w[a--]=u%N;w[a]=n}return n?++r:w.splice(0,1),J(e,w,r)},z.negated=function(){var e=new V(this);return e.s=-e.s||null,e},z.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new V(e,t)).s,!i||!t)return new V(NaN);if(i!=t)return e.s=-t,r.minus(e);var a=r.e/p,s=e.e/p,o=r.c,c=e.c;if(!a||!s){if(!o||!c)return new V(i/0);if(!o[0]||!c[0])return c[0]?e:new V(o[0]?r:0*i)}if(a=y(a),s=y(s),o=o.slice(),i=a-s){for(i>0?(s=a,n=c):(i=-i,n=o),n.reverse();i--;n.push(0));n.reverse()}for((i=o.length)-(t=c.length)<0&&(n=c,c=o,o=n,t=i),i=0;t;)i=(o[--t]=o[t]+c[t]+i)/l|0,o[t]=l===o[t]?0:o[t]%l;return i&&(o=[i].concat(o),++s),J(e,o,s)},z.precision=z.sd=function(e,t){var n,r,i,a=this;if(null!=e&&e!==!!e)return N(e,1,f),null==t?t=q:N(t,0,8),W(new V(a),e,t);if(!(n=a.c))return null;if(r=(i=n.length-1)*p+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&a.e+1>r&&(r=a.e+1),r},z.shiftedBy=function(e){return N(e,-9007199254740991,d),this.times("1e"+e)},z.squareRoot=z.sqrt=function(){var e,t,r,i,a,s=this,o=s.c,c=s.s,u=s.e,l=M+4,p=new V("0.5");if(1!==c||!o||!o[0])return new V(!c||c<0&&(!o||o[0])?NaN:o?s:1/0);if(0==(c=Math.sqrt(+Y(s)))||c==1/0?(((t=g(o)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=y((u+1)/2)-(u<0||u%2),r=new V(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new V(c+""),r.c[0])for((c=(u=r.e)+l)<3&&(c=0);;)if(a=r,r=p.times(a.plus(n(s,a,l,1))),g(a.c).slice(0,c)===(t=g(r.c)).slice(0,c)){if(r.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(W(r,r.e+M+2,1),e=!r.times(r).eq(s));break}if(!i&&(W(a,a.e+M+2,0),a.times(a).eq(s))){r=a;break}l+=4,c+=4,i=1}return W(r,r.e+M+1,q,e)},z.toExponential=function(e,t){return null!=e&&(N(e,0,f),e++),j(this,e,t,1)},z.toFixed=function(e,t){return null!=e&&(N(e,0,f),e=e+this.e+1),j(this,e,t)},z.toFormat=function(e,t,n){var r,i=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=G;else if("object"!=typeof n)throw Error(c+"Argument not an object: "+n);if(r=i.toFixed(e,t),i.c){var a,s=r.split("."),o=+n.groupSize,u=+n.secondaryGroupSize,l=n.groupSeparator||"",p=s[0],d=s[1],m=i.s<0,h=m?p.slice(1):p,f=h.length;if(u&&(a=o,o=u,u=a,f-=a),o>0&&f>0){for(a=f%o||o,p=h.substr(0,a);a<f;a+=o)p+=l+h.substr(a,o);u>0&&(p+=l+h.slice(a)),m&&(p="-"+p)}r=d?p+(n.decimalSeparator||"")+((u=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):p}return(n.prefix||"")+r+(n.suffix||"")},z.toFraction=function(e){var t,r,i,a,s,o,u,l,d,h,f,y,w=this,N=w.c;if(null!=e&&(!(u=new V(e)).isInteger()&&(u.c||1!==u.s)||u.lt(I)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+Y(u));if(!N)return new V(w);for(t=new V(I),d=r=new V(I),i=l=new V(I),y=g(N),s=t.e=y.length-w.e-1,t.c[0]=m[(o=s%p)<0?p+o:o],e=!e||u.comparedTo(t)>0?s>0?t:d:u,o=B,B=1/0,u=new V(y),l.c[0]=0;h=n(u,t,0,1),1!=(a=r.plus(h.times(i))).comparedTo(e);)r=i,i=a,d=l.plus(h.times(a=d)),l=a,t=u.minus(h.times(a=t)),u=a;return a=n(e.minus(r),i,0,1),l=l.plus(a.times(d)),r=r.plus(a.times(i)),l.s=d.s=w.s,f=n(d,i,s*=2,q).minus(w).abs().comparedTo(n(l,r,s,q).minus(w).abs())<1?[d,i]:[l,r],B=o,f},z.toNumber=function(){return+Y(this)},z.toPrecision=function(e,t){return null!=e&&N(e,1,f),j(this,e,t,2)},z.toString=function(e){var t,n=this,i=n.s,a=n.e;return null===a?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=a<=R||a>=O?b(g(n.c),a):x(g(n.c),a,"0"):10===e&&D?t=x(g((n=W(new V(n),M+a+1,q)).c),n.e,"0"):(N(e,2,F.length,"Base"),t=r(x(g(n.c),a,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},z.valueOf=z.toJSON=function(){return Y(this)},z._isBigNumber=!0,null!=t&&V.set(t),V}(),i.default=i.BigNumber=i,void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}()},4156:function(e,t,n){const r=n(829);function i(e,t,n){const r=e[t]+e[n];let i=e[t+1]+e[n+1];r>=4294967296&&i++,e[t]=r,e[t+1]=i}function a(e,t,n,r){let i=e[t]+n;n<0&&(i+=4294967296);let a=e[t+1]+r;i>=4294967296&&a++,e[t]=i,e[t+1]=a}function s(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function o(e,t,n,r,s,o){const c=p[s],u=p[s+1],d=p[o],m=p[o+1];i(l,e,t),a(l,e,c,u);let h=l[r]^l[e],f=l[r+1]^l[e+1];l[r]=f,l[r+1]=h,i(l,n,r),h=l[t]^l[n],f=l[t+1]^l[n+1],l[t]=h>>>24^f<<8,l[t+1]=f>>>24^h<<8,i(l,e,t),a(l,e,d,m),h=l[r]^l[e],f=l[r+1]^l[e+1],l[r]=h>>>16^f<<16,l[r+1]=f>>>16^h<<16,i(l,n,r),h=l[t]^l[n],f=l[t+1]^l[n+1],l[t]=f>>>31^h<<1,l[t+1]=h>>>31^f<<1}const c=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}))),l=new Uint32Array(32),p=new Uint32Array(32);function d(e,t){let n=0;for(n=0;n<16;n++)l[n]=e.h[n],l[n+16]=c[n];for(l[24]=l[24]^e.t,l[25]=l[25]^e.t/4294967296,t&&(l[28]=~l[28],l[29]=~l[29]),n=0;n<32;n++)p[n]=s(e.b,4*n);for(n=0;n<12;n++)o(0,8,16,24,u[16*n+0],u[16*n+1]),o(2,10,18,26,u[16*n+2],u[16*n+3]),o(4,12,20,28,u[16*n+4],u[16*n+5]),o(6,14,22,30,u[16*n+6],u[16*n+7]),o(0,10,20,30,u[16*n+8],u[16*n+9]),o(2,12,22,24,u[16*n+10],u[16*n+11]),o(4,14,16,26,u[16*n+12],u[16*n+13]),o(6,8,18,28,u[16*n+14],u[16*n+15]);for(n=0;n<16;n++)e.h[n]=e.h[n]^l[n]^l[n+16]}const m=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function h(e,t,n,r){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");if(n&&16!==n.length)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(r&&16!==r.length)throw new Error("Illegal personal, expected Uint8Array with length is 16");const i={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};m.fill(0),m[0]=e,t&&(m[1]=t.length),m[2]=1,m[3]=1,n&&m.set(n,32),r&&m.set(r,48);for(let e=0;e<16;e++)i.h[e]=c[e]^s(m,4*e);return t&&(f(i,t),i.c=128),i}function f(e,t){for(let n=0;n<t.length;n++)128===e.c&&(e.t+=e.c,d(e,!1),e.c=0),e.b[e.c++]=t[n]}function y(e){for(e.t+=e.c;e.c<128;)e.b[e.c++]=0;d(e,!0);const t=new Uint8Array(e.outlen);for(let n=0;n<e.outlen;n++)t[n]=e.h[n>>2]>>8*(3&n);return t}function g(e,t,n,i,a){n=n||64,e=r.normalizeInput(e),i&&(i=r.normalizeInput(i)),a&&(a=r.normalizeInput(a));const s=h(n,t,i,a);return f(s,e),y(s)}e.exports={blake2b:g,blake2bHex:function(e,t,n,i,a){const s=g(e,t,n,i,a);return r.toHex(s)},blake2bInit:h,blake2bUpdate:f,blake2bFinal:y}},829:function(e){function t(e){return(4294967296+e).toString(16).substring(1)}e.exports={normalizeInput:function(e){let t;if(e instanceof Uint8Array)t=e;else{if("string"!=typeof e)throw new Error("Input must be an string, Buffer or Uint8Array");t=(new TextEncoder).encode(e)}return t},toHex:function(e){return Array.prototype.map.call(e,(function(e){return(e<16?"0":"")+e.toString(16)})).join("")},debugPrint:function(e,n,r){let i="\n"+e+" = ";for(let a=0;a<n.length;a+=2){if(32===r)i+=t(n[a]).toUpperCase(),i+=" ",i+=t(n[a+1]).toUpperCase();else{if(64!==r)throw new Error("Invalid size "+r);i+=t(n[a+1]).toUpperCase(),i+=t(n[a]).toUpperCase()}a%6==4?i+="\n"+new Array(e.length+4).join(" "):a<n.length-2&&(i+=" ")}console.log(i)},testSpeed:function(e,t,n){let r=(new Date).getTime();const i=new Uint8Array(t);for(let e=0;e<t;e++)i[e]=e%256;const a=(new Date).getTime();console.log("Generated random input in "+(a-r)+"ms"),r=a;for(let a=0;a<n;a++){const n=e(i),a=(new Date).getTime(),s=a-r;r=a,console.log("Hashed in "+s+"ms: "+n.substring(0,20)+"..."),console.log(Math.round(t/(1<<20)/(s/1e3)*100)/100+" MB PER SECOND")}}}},8287:function(e,t,n){"use strict";const r=n(7526),i=n(251),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function o(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return p(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|f(e,t);let r=o(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return m(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return m(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return m(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return c.from(r,t,n);const i=function(e){if(c.isBuffer(e)){const t=0|h(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||K(e.length)?o(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function p(e){return l(e),o(e<0?0:0|h(e))}function d(e){const t=e.length<0?0:0|h(e.length),n=o(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function m(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,c.prototype),r}function h(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function f(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(e).length;default:if(i)return r?-1:H(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return z(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return P(this,t,n);case"latin1":case"binary":return E(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function w(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),K(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:N(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):N(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function N(e,t,n,r,i){let a,s=1,o=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,o/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let r=-1;for(a=n;a<o;a++)if(u(e,a)===u(t,-1===r?0:a-r)){if(-1===r&&(r=a),a-r+1===c)return r*s}else-1!==r&&(a-=a-r),r=-1}else for(n+c>o&&(n=o-c),a=n;a>=0;a--){let n=!0;for(let r=0;r<c;r++)if(u(e,a+r)!==u(t,r)){n=!1;break}if(n)return a}return-1}function v(e,t,n,r){n=Number(n)||0;const i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;const a=t.length;let s;for(r>a/2&&(r=a/2),s=0;s<r;++s){const r=parseInt(t.substr(2*s,2),16);if(K(r))return s;e[n+s]=r}return s}function b(e,t,n,r){return W(H(t,e.length-n),e,n,r)}function x(e,t,n,r){return W(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function _(e,t,n,r){return W(J(t),e,n,r)}function T(e,t,n,r){return W(function(e,t){let n,r,i;const a=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i<n;){const t=e[i];let a=null,s=t>239?4:t>223?3:t>191?2:1;if(i+s<=n){let n,r,o,c;switch(s){case 1:t<128&&(a=t);break;case 2:n=e[i+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(a=c));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:n=e[i+1],r=e[i+2],o=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&o)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&o,c>65535&&c<1114112&&(a=c))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return function(e){const t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=A));return n}(r)}t.kMaxLength=s,c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,n){return u(e,t,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,n){return function(e,t,n){return l(e),e<=0?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}(e,t,n)},c.allocUnsafe=function(e){return p(e)},c.allocUnsafeSlow=function(e){return p(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},c.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}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=c.allocUnsafe(t);let i=0;for(n=0;n<e.length;++n){let t=e[n];if(Y(t,Uint8Array))i+t.length>r.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},c.byteLength=f,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)g(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?S(this,0,e):y.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,i){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let a=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0);const o=Math.min(a,s),u=this.slice(r,i),l=e.slice(t,n);for(let e=0;e<o;++e)if(u[e]!==l[e]){a=u[e],s=l[e];break}return a<s?-1:s<a?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return w(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return w(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let a=!1;for(;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":case"latin1":case"binary":return x(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const A=4096;function P(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function E(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function z(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=t;r<n;++r)i+=Q[e[r]];return i}function I(e,t,n){const r=e.slice(t,n);let i="";for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+256*r[e+1]);return i}function M(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function q(e,t,n,r,i,a){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r,i){F(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,n}function O(e,t,n,r,i){F(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=s,s>>=8,e[n+2]=s,s>>=8,e[n+1]=s,s>>=8,e[n]=s,n+8}function k(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,a){return t=+t,n>>>=0,a||k(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function $(e,t,n,r,a){return t=+t,n>>>=0,a||k(e,0,n,8),i.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){const n=this.length;(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);const r=this.subarray(e,t);return Object.setPrototypeOf(r,c.prototype),r},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return r},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=X((function(e){D(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))})),c.prototype.readBigUInt64BE=X((function(e){D(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),c.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=t,i=1,a=this[e+--r];for(;r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},c.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=X((function(e){D(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=X((function(e){D(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||M(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||q(this,e,t,n,Math.pow(2,8*n)-1,0);let i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||q(this,e,t,n,Math.pow(2,8*n)-1,0);let i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=X((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=X((function(e,t=0){return O(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);q(this,e,t,n,r-1,-r)}let i=0,a=1,s=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a|0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);q(this,e,t,n,r-1,-r)}let i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a|0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=X((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=X((function(e,t=0){return O(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return $(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return $(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{const a=c.isBuffer(e)?e:c.from(e,r),s=a.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=a[i%s]}return this};const U={};function L(e,t,n){U[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function G(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function F(e,t,n,r,i,a){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let i;throw i=a>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(a+1)}${r}`:`>= -(2${r} ** ${8*(a+1)-1}${r}) and < 2 ** ${8*(a+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new U.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){D(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||V(t,e.length-(n+1))}(r,i,a)}function D(e,t){if("number"!=typeof e)throw new U.ERR_INVALID_ARG_TYPE(t,"number",e)}function V(e,t,n){if(Math.floor(e)!==e)throw D(e,n),new U.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}L("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),L("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),L("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=G(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=G(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r}),RangeError);const j=/[^+/0-9A-Za-z-_]/g;function H(e,t){let n;t=t||1/0;const r=e.length;let i=null;const a=[];for(let s=0;s<r;++s){if(n=e.charCodeAt(s),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function J(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(e){return e!=e}const Q=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function X(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},2341:function(e){"use strict";e.exports=function e(t){if("number"==typeof t&&isNaN(t))throw new Error("NaN is not allowed");if("number"==typeof t&&!isFinite(t))throw new Error("Infinity is not allowed");return null===t||"object"!=typeof t?JSON.stringify(t):t.toJSON instanceof Function?e(t.toJSON()):Array.isArray(t)?`[${t.reduce(((t,n,r)=>`${t}${0===r?"":","}${e(void 0===n||"symbol"==typeof n?null:n)}`),"")}]`:`{${Object.keys(t).sort().reduce(((n,r)=>void 0===t[r]||"symbol"==typeof t[r]?n:`${n}${0===n.length?"":","}${e(r)}:${e(t[r])}`),"")}}`}},4903:function(e){var t=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;if("object"==typeof globalThis&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return t()}try{return __global__||t()}finally{delete Object.prototype.__global__}}()},228:function(e){"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,r,a,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var o=new i(r,a||e,s),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],o]:e._events[c].push(o):(e._events[c]=o,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),o.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},o.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,a=r.length,s=new Array(a);i<a;i++)s[i]=r[i].fn;return s},o.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},o.prototype.emit=function(e,t,r,i,a,s){var o=n?n+e:e;if(!this._events[o])return!1;var c,u,l=this._events[o],p=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),p){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,i),!0;case 5:return l.fn.call(l.context,t,r,i,a),!0;case 6:return l.fn.call(l.context,t,r,i,a,s),!0}for(u=1,c=new Array(p-1);u<p;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var d,m=l.length;for(u=0;u<m;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),p){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,r);break;case 4:l[u].fn.call(l[u].context,t,r,i);break;default:if(!c)for(d=1,c=new Array(p-1);d<p;d++)c[d-1]=arguments[d];l[u].fn.apply(l[u].context,c)}}return!0},o.prototype.on=function(e,t,n){return a(this,e,t,n,!1)},o.prototype.once=function(e,t,n){return a(this,e,t,n,!0)},o.prototype.removeListener=function(e,t,r,i){var a=n?n+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn!==t||i&&!o.once||r&&o.context!==r||s(this,a);else{for(var c=0,u=[],l=o.length;c<l;c++)(o[c].fn!==t||i&&!o[c].once||r&&o[c].context!==r)&&u.push(o[c]);u.length?this._events[a]=1===u.length?u[0]:u:s(this,a)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o},7007:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}f(e,t,a,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&f(e,"error",t,{once:!0})}(e,i)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function o(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var i,a,s,u;if(o(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),s=a[t]),void 0===s)s=a[t]=n,++e._eventsCount;else if("function"==typeof s?s=a[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=c(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):h(i,i.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function f(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(a){r.once&&e.removeEventListener(t,i),n(a)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,a=this._events;if(void 0!==a)i=i&&void 0===a.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var c=a[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var u=c.length,l=h(c,u);for(n=0;n<u;++n)r(l[n],this,t)}return!0},a.prototype.addListener=function(e,t){return u(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return u(this,e,t,!0)},a.prototype.once=function(e,t){return o(t),this.on(e,p(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,p(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,a,s;if(o(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){s=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},251:function(e,t){t.read=function(e,t,n,r,i){var a,s,o=8*i-r-1,c=(1<<o)-1,u=c>>1,l=-7,p=n?i-1:0,d=n?-1:1,m=e[t+p];for(p+=d,a=m&(1<<-l)-1,m>>=-l,l+=o;l>0;a=256*a+e[t+p],p+=d,l-=8);for(s=a&(1<<-l)-1,a>>=-l,l+=r;l>0;s=256*s+e[t+p],p+=d,l-=8);if(0===a)a=1-u;else{if(a===c)return s?NaN:1/0*(m?-1:1);s+=Math.pow(2,r),a-=u}return(m?-1:1)*s*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var s,o,c,u=8*a-i-1,l=(1<<u)-1,p=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:a-1,h=r?1:-1,f=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*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+p>=1?d/c:d*Math.pow(2,1-p))*c>=2&&(s++,c/=2),s+p>=l?(o=0,s=l):s+p>=1?(o=(t*c-1)*Math.pow(2,i),s+=p):(o=t*Math.pow(2,p-1)*Math.pow(2,i),s=0));i>=8;e[n+m]=255&o,m+=h,o/=256,i-=8);for(s=s<<i|o,u+=i;u>0;e[n+m]=255&s,m+=h,s/=256,u-=8);e[n+m-h]|=128*f}},6698:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},1013:function(e,t,n){var r=n(7372).stringify,i=n(8146);e.exports=function(e){return{parse:i(e),stringify:r}},e.exports.parse=i(),e.exports.stringify=r},8146:function(e,t,n){var r=null;const i=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,a=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;e.exports=function(e){"use strict";var t={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(null!=e){if(!0===e.strict&&(t.strict=!0),!0===e.storeAsString&&(t.storeAsString=!0),t.alwaysParseAsBig=!0===e.alwaysParseAsBig&&e.alwaysParseAsBig,t.useNativeBigInt=!0===e.useNativeBigInt&&e.useNativeBigInt,void 0!==e.constructorAction){if("error"!==e.constructorAction&&"ignore"!==e.constructorAction&&"preserve"!==e.constructorAction)throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${e.constructorAction}`);t.constructorAction=e.constructorAction}if(void 0!==e.protoAction){if("error"!==e.protoAction&&"ignore"!==e.protoAction&&"preserve"!==e.protoAction)throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${e.protoAction}`);t.protoAction=e.protoAction}}var s,o,c,u,l={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},p=function(e){throw{name:"SyntaxError",message:e,at:s,text:c}},d=function(e){return e&&e!==o&&p("Expected '"+e+"' instead of '"+o+"'"),o=c.charAt(s),s+=1,o},m=function(){var e,i="";for("-"===o&&(i="-",d("-"));o>="0"&&o<="9";)i+=o,d();if("."===o)for(i+=".";d()&&o>="0"&&o<="9";)i+=o;if("e"===o||"E"===o)for(i+=o,d(),"-"!==o&&"+"!==o||(i+=o,d());o>="0"&&o<="9";)i+=o,d();if(e=+i,isFinite(e))return null==r&&(r=n(1594)),i.length>15?t.storeAsString?i:t.useNativeBigInt?BigInt(i):new r(i):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(e):new r(e):e;p("Bad number")},h=function(){var e,t,n,r="";if('"'===o)for(var i=s;d();){if('"'===o)return s-1>i&&(r+=c.substring(i,s-1)),d(),r;if("\\"===o){if(s-1>i&&(r+=c.substring(i,s-1)),d(),"u"===o){for(n=0,t=0;t<4&&(e=parseInt(d(),16),isFinite(e));t+=1)n=16*n+e;r+=String.fromCharCode(n)}else{if("string"!=typeof l[o])break;r+=l[o]}i=s}}p("Bad string")},f=function(){for(;o&&o<=" ";)d()};return u=function(){switch(f(),o){case"{":return function(){var e,n=Object.create(null);if("{"===o){if(d("{"),f(),"}"===o)return d("}"),n;for(;o;){if(e=h(),f(),d(":"),!0===t.strict&&Object.hasOwnProperty.call(n,e)&&p('Duplicate key "'+e+'"'),!0===i.test(e)?"error"===t.protoAction?p("Object contains forbidden prototype property"):"ignore"===t.protoAction?u():n[e]=u():!0===a.test(e)?"error"===t.constructorAction?p("Object contains forbidden constructor property"):"ignore"===t.constructorAction?u():n[e]=u():n[e]=u(),f(),"}"===o)return d("}"),n;d(","),f()}}p("Bad object")}();case"[":return function(){var e=[];if("["===o){if(d("["),f(),"]"===o)return d("]"),e;for(;o;){if(e.push(u()),f(),"]"===o)return d("]"),e;d(","),f()}}p("Bad array")}();case'"':return h();case"-":return m();default:return o>="0"&&o<="9"?m():function(){switch(o){case"t":return d("t"),d("r"),d("u"),d("e"),!0;case"f":return d("f"),d("a"),d("l"),d("s"),d("e"),!1;case"n":return d("n"),d("u"),d("l"),d("l"),null}p("Unexpected '"+o+"'")}()}},function(e,t){var n;return c=e+"",s=0,o=" ",n=u(),f(),o&&p("Syntax error"),"function"==typeof t?function e(n,r){var i,a=n[r];return a&&"object"==typeof a&&Object.keys(a).forEach((function(t){void 0!==(i=e(a,t))?a[t]=i:delete a[t]})),t.call(n,r,a)}({"":n},""):n}}},7372:function(e,t,n){var r=n(1594),i=e.exports;!function(){"use strict";var e,t,n,a=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function o(e){return a.lastIndex=0,a.test(e)?'"'+e.replace(a,(function(e){var t=s[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function c(i,a){var s,u,l,p,d,m=e,h=a[i],f=null!=h&&(h instanceof r||r.isBigNumber(h));switch(h&&"object"==typeof h&&"function"==typeof h.toJSON&&(h=h.toJSON(i)),"function"==typeof n&&(h=n.call(a,i,h)),typeof h){case"string":return f?h:o(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":case"bigint":return String(h);case"object":if(!h)return"null";if(e+=t,d=[],"[object Array]"===Object.prototype.toString.apply(h)){for(p=h.length,s=0;s<p;s+=1)d[s]=c(s,h)||"null";return l=0===d.length?"[]":e?"[\n"+e+d.join(",\n"+e)+"\n"+m+"]":"["+d.join(",")+"]",e=m,l}if(n&&"object"==typeof n)for(p=n.length,s=0;s<p;s+=1)"string"==typeof n[s]&&(l=c(u=n[s],h))&&d.push(o(u)+(e?": ":":")+l);else Object.keys(h).forEach((function(t){var n=c(t,h);n&&d.push(o(t)+(e?": ":":")+n)}));return l=0===d.length?"{}":e?"{\n"+e+d.join(",\n"+e)+"\n"+m+"}":"{"+d.join(",")+"}",e=m,l}}"function"!=typeof i.stringify&&(i.stringify=function(r,i,a){var s;if(e="",t="","number"==typeof a)for(s=0;s<a;s+=1)t+=" ";else"string"==typeof a&&(t=a);if(n=i,i&&"function"!=typeof i&&("object"!=typeof i||"number"!=typeof i.length))throw new Error("JSON.stringify");return c("",{"":r})})}()},5606:function(e){var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var o,c=[],u=!1,l=-1;function p(){u&&o&&(u=!1,o.length?c=o.concat(c):l=-1,c.length&&d())}function d(){if(!u){var e=s(p);u=!0;for(var t=c.length;t;){for(o=c,c=[];++l<t;)o&&o[l].run();l=-1,t=c.length}o=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new m(e,t)),1!==c.length||u||s(d)},m.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},858:function(e,t){"use strict";function n(e){if(Array.isArray(e)){const t=[];for(let r=0;r<e.length;r++)t.push(n(e[r]));const r=d(...t);return d(a(r.length,192),r)}const t=y(e);return 1===t.length&&t[0]<128?t:d(a(t.length,128),t)}function r(e,t,n){if(n>e.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,n)}function i(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return l(u(e))}function a(e,t){if(e<56)return Uint8Array.from([e+t]);const n=h(e),r=h(t+55+n.length/2);return Uint8Array.from(p(r+n))}function s(e,t=!1){if(!e||0===e.length)return Uint8Array.from([]);const n=o(y(e));if(t)return n;if(0!==n.remainder.length)throw new Error("invalid RLP: remainder must be zero");return n.data}function o(e){let t,n,a,s,c;const u=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,a=128===l?Uint8Array.from([]):r(e,1,t),2===t&&a[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:a,remainder:e.slice(t)}}if(l<=191){if(n=l-182,e.length-1<n)throw new Error("invalid RLP: not enough bytes for string length");if(t=i(r(e,1,n)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return a=r(e,n,t+n),{data:a,remainder:e.slice(t+n)}}if(l<=247){for(t=l-191,s=r(e,1,t);s.length;)c=o(s),u.push(c.data),s=c.remainder;return{data:u,remainder:e.slice(t)}}{if(n=l-246,t=i(r(e,1,n)),t<56)throw new Error("invalid RLP: encoded list too short");const a=n+t;if(a>e.length)throw new Error("invalid RLP: total length is larger than the data");for(s=r(e,n,a);s.length;)c=o(s),u.push(c.data),s=c.remainder;return{data:u,remainder:e.slice(a)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.utils=t.decode=t.encode=void 0,t.encode=n,t.decode=s;const c=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function u(e){let t="";for(let n=0;n<e.length;n++)t+=c[e[n]];return t}function l(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function p(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let n=0;n<t.length;n++){const r=2*n;t[n]=l(e.slice(r,r+2))}return t}function d(...e){if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return n}function m(e){return(new TextEncoder).encode(e)}function h(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function f(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function y(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return f(e)?p((t="string"!=typeof(n=e)?n:f(n)?n.slice(2):n).length%2?`0${t}`:t):m(e);var t,n;if("number"==typeof e||"bigint"==typeof e)return e?p(h(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}t.utils={bytesToHex:u,concatBytes:d,hexToBytes:p,utf8ToBytes:m};const g={encode:n,decode:s};t.default=g},2861:function(e,t,n){var r=n(8287),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=s),s.prototype=Object.create(i.prototype),a(i,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},392:function(e,t,n){var r=n(2861).Buffer;function i(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var n=this._block,i=this._blockSize,a=e.length,s=this._len,o=0;o<a;){for(var c=s%i,u=Math.min(a-o,i-c),l=0;l<u;l++)n[c+l]=e[o+l];o+=u,(s+=u)%i==0&&this._update(n)}return this._len+=a,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},4107:function(e,t,n){var r=n(6698),i=n(392),a=n(2861).Buffer,s=[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],o=new Array(64);function c(){this.init(),this._w=o,i.call(this,64,56)}function u(e,t,n){return n^e&(t^n)}function l(e,t,n){return e&t|n&(e|t)}function p(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function m(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(c,i),c.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,a=0|this._c,o=0|this._d,c=0|this._e,h=0|this._f,f=0|this._g,y=0|this._h,g=0;g<16;++g)n[g]=e.readInt32BE(4*g);for(;g<64;++g)n[g]=0|(((t=n[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[g-7]+m(n[g-15])+n[g-16];for(var w=0;w<64;++w){var N=y+d(c)+u(c,h,f)+s[w]+n[w]|0,v=p(r)+l(r,i,a)|0;y=f,f=h,h=c,c=o+N|0,o=a,a=i,i=r,r=N+v|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=c+this._e|0,this._f=h+this._f|0,this._g=f+this._g|0,this._h=y+this._h|0},c.prototype._hash=function(){var e=a.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=c},9234:function(e,t,n){!function(t,r){"use strict";e.exports?e.exports=r(n(8947)):t.nacl.auth=r(t.nacl)}(this,(function(e){"use strict";if(!e)throw new Error("tweetnacl not loaded");var t=128;function n(n,r){var i,a,s=new Uint8Array(t+Math.max(64,n.length));for(r.length>t&&(r=e.hash(r)),i=0;i<t;i++)s[i]=54;for(i=0;i<r.length;i++)s[i]^=r[i];for(s.set(n,t),a=e.hash(s.subarray(0,t+n.length)),i=0;i<t;i++)s[i]=92;for(i=0;i<r.length;i++)s[i]^=r[i];return s.set(a,t),e.hash(s.subarray(0,t+a.length))}function r(e,t){var r=new Uint8Array(32);return r.set(n(e,t).subarray(0,32)),r}return r.full=function(e,t){return n(e,t)},r.authLength=32,r.authFullLength=64,r.keyLength=32,r}))},8947:function(e,t,n){!function(e){"use strict";var t=function(e){var t,n=new Float64Array(16);if(e)for(t=0;t<e.length;t++)n[t]=e[t];return n},r=function(){throw new Error("no PRNG")},i=new Uint8Array(16),a=new Uint8Array(32);a[0]=9;var s=t(),o=t([1]),c=t([56129,1]),u=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),p=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),d=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),m=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function h(e,t,n,r){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n,e[t+4]=r>>24&255,e[t+5]=r>>16&255,e[t+6]=r>>8&255,e[t+7]=255&r}function f(e,t,n,r,i){var a,s=0;for(a=0;a<i;a++)s|=e[t+a]^n[r+a];return(1&s-1>>>8)-1}function y(e,t,n,r){return f(e,t,n,r,16)}function g(e,t,n,r){return f(e,t,n,r,32)}function w(e,t,n,r){!function(e,t,n,r){for(var i,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,p=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,m=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,h=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,f=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,y=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,w=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,N=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,v=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,b=a,x=s,_=o,T=c,C=u,S=l,A=p,P=d,E=m,z=h,I=f,M=y,q=g,R=w,O=N,k=v,B=0;B<20;B+=2)b^=(i=(q^=(i=(E^=(i=(C^=(i=b+q|0)<<7|i>>>25)+b|0)<<9|i>>>23)+C|0)<<13|i>>>19)+E|0)<<18|i>>>14,S^=(i=(x^=(i=(R^=(i=(z^=(i=S+x|0)<<7|i>>>25)+S|0)<<9|i>>>23)+z|0)<<13|i>>>19)+R|0)<<18|i>>>14,I^=(i=(A^=(i=(_^=(i=(O^=(i=I+A|0)<<7|i>>>25)+I|0)<<9|i>>>23)+O|0)<<13|i>>>19)+_|0)<<18|i>>>14,k^=(i=(M^=(i=(P^=(i=(T^=(i=k+M|0)<<7|i>>>25)+k|0)<<9|i>>>23)+T|0)<<13|i>>>19)+P|0)<<18|i>>>14,b^=(i=(T^=(i=(_^=(i=(x^=(i=b+T|0)<<7|i>>>25)+b|0)<<9|i>>>23)+x|0)<<13|i>>>19)+_|0)<<18|i>>>14,S^=(i=(C^=(i=(P^=(i=(A^=(i=S+C|0)<<7|i>>>25)+S|0)<<9|i>>>23)+A|0)<<13|i>>>19)+P|0)<<18|i>>>14,I^=(i=(z^=(i=(E^=(i=(M^=(i=I+z|0)<<7|i>>>25)+I|0)<<9|i>>>23)+M|0)<<13|i>>>19)+E|0)<<18|i>>>14,k^=(i=(O^=(i=(R^=(i=(q^=(i=k+O|0)<<7|i>>>25)+k|0)<<9|i>>>23)+q|0)<<13|i>>>19)+R|0)<<18|i>>>14;b=b+a|0,x=x+s|0,_=_+o|0,T=T+c|0,C=C+u|0,S=S+l|0,A=A+p|0,P=P+d|0,E=E+m|0,z=z+h|0,I=I+f|0,M=M+y|0,q=q+g|0,R=R+w|0,O=O+N|0,k=k+v|0,e[0]=b>>>0&255,e[1]=b>>>8&255,e[2]=b>>>16&255,e[3]=b>>>24&255,e[4]=x>>>0&255,e[5]=x>>>8&255,e[6]=x>>>16&255,e[7]=x>>>24&255,e[8]=_>>>0&255,e[9]=_>>>8&255,e[10]=_>>>16&255,e[11]=_>>>24&255,e[12]=T>>>0&255,e[13]=T>>>8&255,e[14]=T>>>16&255,e[15]=T>>>24&255,e[16]=C>>>0&255,e[17]=C>>>8&255,e[18]=C>>>16&255,e[19]=C>>>24&255,e[20]=S>>>0&255,e[21]=S>>>8&255,e[22]=S>>>16&255,e[23]=S>>>24&255,e[24]=A>>>0&255,e[25]=A>>>8&255,e[26]=A>>>16&255,e[27]=A>>>24&255,e[28]=P>>>0&255,e[29]=P>>>8&255,e[30]=P>>>16&255,e[31]=P>>>24&255,e[32]=E>>>0&255,e[33]=E>>>8&255,e[34]=E>>>16&255,e[35]=E>>>24&255,e[36]=z>>>0&255,e[37]=z>>>8&255,e[38]=z>>>16&255,e[39]=z>>>24&255,e[40]=I>>>0&255,e[41]=I>>>8&255,e[42]=I>>>16&255,e[43]=I>>>24&255,e[44]=M>>>0&255,e[45]=M>>>8&255,e[46]=M>>>16&255,e[47]=M>>>24&255,e[48]=q>>>0&255,e[49]=q>>>8&255,e[50]=q>>>16&255,e[51]=q>>>24&255,e[52]=R>>>0&255,e[53]=R>>>8&255,e[54]=R>>>16&255,e[55]=R>>>24&255,e[56]=O>>>0&255,e[57]=O>>>8&255,e[58]=O>>>16&255,e[59]=O>>>24&255,e[60]=k>>>0&255,e[61]=k>>>8&255,e[62]=k>>>16&255,e[63]=k>>>24&255}(e,t,n,r)}function N(e,t,n,r){!function(e,t,n,r){for(var i,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,p=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,m=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,h=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,f=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,y=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,w=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,N=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,v=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,b=0;b<20;b+=2)a^=(i=(g^=(i=(m^=(i=(u^=(i=a+g|0)<<7|i>>>25)+a|0)<<9|i>>>23)+u|0)<<13|i>>>19)+m|0)<<18|i>>>14,l^=(i=(s^=(i=(w^=(i=(h^=(i=l+s|0)<<7|i>>>25)+l|0)<<9|i>>>23)+h|0)<<13|i>>>19)+w|0)<<18|i>>>14,f^=(i=(p^=(i=(o^=(i=(N^=(i=f+p|0)<<7|i>>>25)+f|0)<<9|i>>>23)+N|0)<<13|i>>>19)+o|0)<<18|i>>>14,v^=(i=(y^=(i=(d^=(i=(c^=(i=v+y|0)<<7|i>>>25)+v|0)<<9|i>>>23)+c|0)<<13|i>>>19)+d|0)<<18|i>>>14,a^=(i=(c^=(i=(o^=(i=(s^=(i=a+c|0)<<7|i>>>25)+a|0)<<9|i>>>23)+s|0)<<13|i>>>19)+o|0)<<18|i>>>14,l^=(i=(u^=(i=(d^=(i=(p^=(i=l+u|0)<<7|i>>>25)+l|0)<<9|i>>>23)+p|0)<<13|i>>>19)+d|0)<<18|i>>>14,f^=(i=(h^=(i=(m^=(i=(y^=(i=f+h|0)<<7|i>>>25)+f|0)<<9|i>>>23)+y|0)<<13|i>>>19)+m|0)<<18|i>>>14,v^=(i=(N^=(i=(w^=(i=(g^=(i=v+N|0)<<7|i>>>25)+v|0)<<9|i>>>23)+g|0)<<13|i>>>19)+w|0)<<18|i>>>14;e[0]=a>>>0&255,e[1]=a>>>8&255,e[2]=a>>>16&255,e[3]=a>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=f>>>0&255,e[9]=f>>>8&255,e[10]=f>>>16&255,e[11]=f>>>24&255,e[12]=v>>>0&255,e[13]=v>>>8&255,e[14]=v>>>16&255,e[15]=v>>>24&255,e[16]=p>>>0&255,e[17]=p>>>8&255,e[18]=p>>>16&255,e[19]=p>>>24&255,e[20]=d>>>0&255,e[21]=d>>>8&255,e[22]=d>>>16&255,e[23]=d>>>24&255,e[24]=m>>>0&255,e[25]=m>>>8&255,e[26]=m>>>16&255,e[27]=m>>>24&255,e[28]=h>>>0&255,e[29]=h>>>8&255,e[30]=h>>>16&255,e[31]=h>>>24&255}(e,t,n,r)}var v=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function b(e,t,n,r,i,a,s){var o,c,u=new Uint8Array(16),l=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=a[c];for(;i>=64;){for(w(l,u,s,v),c=0;c<64;c++)e[t+c]=n[r+c]^l[c];for(o=1,c=8;c<16;c++)o=o+(255&u[c])|0,u[c]=255&o,o>>>=8;i-=64,t+=64,r+=64}if(i>0)for(w(l,u,s,v),c=0;c<i;c++)e[t+c]=n[r+c]^l[c];return 0}function x(e,t,n,r,i){var a,s,o=new Uint8Array(16),c=new Uint8Array(64);for(s=0;s<16;s++)o[s]=0;for(s=0;s<8;s++)o[s]=r[s];for(;n>=64;){for(w(c,o,i,v),s=0;s<64;s++)e[t+s]=c[s];for(a=1,s=8;s<16;s++)a=a+(255&o[s])|0,o[s]=255&a,a>>>=8;n-=64,t+=64}if(n>0)for(w(c,o,i,v),s=0;s<n;s++)e[t+s]=c[s];return 0}function _(e,t,n,r,i){var a=new Uint8Array(32);N(a,r,i,v);for(var s=new Uint8Array(8),o=0;o<8;o++)s[o]=r[o+16];return x(e,t,n,s,a)}function T(e,t,n,r,i,a,s){var o=new Uint8Array(32);N(o,a,s,v);for(var c=new Uint8Array(8),u=0;u<8;u++)c[u]=a[u+16];return b(e,t,n,r,i,c,o)}var C=function(e){var t,n,r,i,a,s,o,c;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,n=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|n<<3),r=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(n>>>10|r<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(r>>>7|i<<9),a=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|a<<12),this.r[5]=a>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(a>>>14|s<<2),o=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|o<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(o>>>8|c<<8),this.r[9]=c>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function S(e,t,n,r,i,a){var s=new C(a);return s.update(n,r,i),s.finish(e,t),0}function A(e,t,n,r,i,a){var s=new Uint8Array(16);return S(s,0,n,r,i,a),y(e,t,s,0)}function P(e,t,n,r,i){var a;if(n<32)return-1;for(T(e,0,t,0,n,r,i),S(e,16,e,32,n-32,e),a=0;a<16;a++)e[a]=0;return 0}function E(e,t,n,r,i){var a,s=new Uint8Array(32);if(n<32)return-1;if(_(s,0,32,r,i),0!==A(t,16,t,32,n-32,s))return-1;for(T(e,0,t,0,n,r,i),a=0;a<32;a++)e[a]=0;return 0}function z(e,t){var n;for(n=0;n<16;n++)e[n]=0|t[n]}function I(e){var t,n,r=1;for(t=0;t<16;t++)n=e[t]+r+65535,r=Math.floor(n/65536),e[t]=n-65536*r;e[0]+=r-1+37*(r-1)}function M(e,t,n){for(var r,i=~(n-1),a=0;a<16;a++)r=i&(e[a]^t[a]),e[a]^=r,t[a]^=r}function q(e,n){var r,i,a,s=t(),o=t();for(r=0;r<16;r++)o[r]=n[r];for(I(o),I(o),I(o),i=0;i<2;i++){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),a=s[15]>>16&1,s[14]&=65535,M(o,s,1-a)}for(r=0;r<16;r++)e[2*r]=255&o[r],e[2*r+1]=o[r]>>8}function R(e,t){var n=new Uint8Array(32),r=new Uint8Array(32);return q(n,e),q(r,t),g(n,0,r,0)}function O(e){var t=new Uint8Array(32);return q(t,e),1&t[0]}function k(e,t){var n;for(n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function B(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]+n[r]}function $(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]-n[r]}function U(e,t,n){var r,i,a=0,s=0,o=0,c=0,u=0,l=0,p=0,d=0,m=0,h=0,f=0,y=0,g=0,w=0,N=0,v=0,b=0,x=0,_=0,T=0,C=0,S=0,A=0,P=0,E=0,z=0,I=0,M=0,q=0,R=0,O=0,k=n[0],B=n[1],$=n[2],U=n[3],L=n[4],G=n[5],F=n[6],D=n[7],V=n[8],j=n[9],H=n[10],J=n[11],W=n[12],Y=n[13],K=n[14],Q=n[15];a+=(r=t[0])*k,s+=r*B,o+=r*$,c+=r*U,u+=r*L,l+=r*G,p+=r*F,d+=r*D,m+=r*V,h+=r*j,f+=r*H,y+=r*J,g+=r*W,w+=r*Y,N+=r*K,v+=r*Q,s+=(r=t[1])*k,o+=r*B,c+=r*$,u+=r*U,l+=r*L,p+=r*G,d+=r*F,m+=r*D,h+=r*V,f+=r*j,y+=r*H,g+=r*J,w+=r*W,N+=r*Y,v+=r*K,b+=r*Q,o+=(r=t[2])*k,c+=r*B,u+=r*$,l+=r*U,p+=r*L,d+=r*G,m+=r*F,h+=r*D,f+=r*V,y+=r*j,g+=r*H,w+=r*J,N+=r*W,v+=r*Y,b+=r*K,x+=r*Q,c+=(r=t[3])*k,u+=r*B,l+=r*$,p+=r*U,d+=r*L,m+=r*G,h+=r*F,f+=r*D,y+=r*V,g+=r*j,w+=r*H,N+=r*J,v+=r*W,b+=r*Y,x+=r*K,_+=r*Q,u+=(r=t[4])*k,l+=r*B,p+=r*$,d+=r*U,m+=r*L,h+=r*G,f+=r*F,y+=r*D,g+=r*V,w+=r*j,N+=r*H,v+=r*J,b+=r*W,x+=r*Y,_+=r*K,T+=r*Q,l+=(r=t[5])*k,p+=r*B,d+=r*$,m+=r*U,h+=r*L,f+=r*G,y+=r*F,g+=r*D,w+=r*V,N+=r*j,v+=r*H,b+=r*J,x+=r*W,_+=r*Y,T+=r*K,C+=r*Q,p+=(r=t[6])*k,d+=r*B,m+=r*$,h+=r*U,f+=r*L,y+=r*G,g+=r*F,w+=r*D,N+=r*V,v+=r*j,b+=r*H,x+=r*J,_+=r*W,T+=r*Y,C+=r*K,S+=r*Q,d+=(r=t[7])*k,m+=r*B,h+=r*$,f+=r*U,y+=r*L,g+=r*G,w+=r*F,N+=r*D,v+=r*V,b+=r*j,x+=r*H,_+=r*J,T+=r*W,C+=r*Y,S+=r*K,A+=r*Q,m+=(r=t[8])*k,h+=r*B,f+=r*$,y+=r*U,g+=r*L,w+=r*G,N+=r*F,v+=r*D,b+=r*V,x+=r*j,_+=r*H,T+=r*J,C+=r*W,S+=r*Y,A+=r*K,P+=r*Q,h+=(r=t[9])*k,f+=r*B,y+=r*$,g+=r*U,w+=r*L,N+=r*G,v+=r*F,b+=r*D,x+=r*V,_+=r*j,T+=r*H,C+=r*J,S+=r*W,A+=r*Y,P+=r*K,E+=r*Q,f+=(r=t[10])*k,y+=r*B,g+=r*$,w+=r*U,N+=r*L,v+=r*G,b+=r*F,x+=r*D,_+=r*V,T+=r*j,C+=r*H,S+=r*J,A+=r*W,P+=r*Y,E+=r*K,z+=r*Q,y+=(r=t[11])*k,g+=r*B,w+=r*$,N+=r*U,v+=r*L,b+=r*G,x+=r*F,_+=r*D,T+=r*V,C+=r*j,S+=r*H,A+=r*J,P+=r*W,E+=r*Y,z+=r*K,I+=r*Q,g+=(r=t[12])*k,w+=r*B,N+=r*$,v+=r*U,b+=r*L,x+=r*G,_+=r*F,T+=r*D,C+=r*V,S+=r*j,A+=r*H,P+=r*J,E+=r*W,z+=r*Y,I+=r*K,M+=r*Q,w+=(r=t[13])*k,N+=r*B,v+=r*$,b+=r*U,x+=r*L,_+=r*G,T+=r*F,C+=r*D,S+=r*V,A+=r*j,P+=r*H,E+=r*J,z+=r*W,I+=r*Y,M+=r*K,q+=r*Q,N+=(r=t[14])*k,v+=r*B,b+=r*$,x+=r*U,_+=r*L,T+=r*G,C+=r*F,S+=r*D,A+=r*V,P+=r*j,E+=r*H,z+=r*J,I+=r*W,M+=r*Y,q+=r*K,R+=r*Q,v+=(r=t[15])*k,s+=38*(x+=r*$),o+=38*(_+=r*U),c+=38*(T+=r*L),u+=38*(C+=r*G),l+=38*(S+=r*F),p+=38*(A+=r*D),d+=38*(P+=r*V),m+=38*(E+=r*j),h+=38*(z+=r*H),f+=38*(I+=r*J),y+=38*(M+=r*W),g+=38*(q+=r*Y),w+=38*(R+=r*K),N+=38*(O+=r*Q),a=(r=(a+=38*(b+=r*B))+(i=1)+65535)-65536*(i=Math.floor(r/65536)),s=(r=s+i+65535)-65536*(i=Math.floor(r/65536)),o=(r=o+i+65535)-65536*(i=Math.floor(r/65536)),c=(r=c+i+65535)-65536*(i=Math.floor(r/65536)),u=(r=u+i+65535)-65536*(i=Math.floor(r/65536)),l=(r=l+i+65535)-65536*(i=Math.floor(r/65536)),p=(r=p+i+65535)-65536*(i=Math.floor(r/65536)),d=(r=d+i+65535)-65536*(i=Math.floor(r/65536)),m=(r=m+i+65535)-65536*(i=Math.floor(r/65536)),h=(r=h+i+65535)-65536*(i=Math.floor(r/65536)),f=(r=f+i+65535)-65536*(i=Math.floor(r/65536)),y=(r=y+i+65535)-65536*(i=Math.floor(r/65536)),g=(r=g+i+65535)-65536*(i=Math.floor(r/65536)),w=(r=w+i+65535)-65536*(i=Math.floor(r/65536)),N=(r=N+i+65535)-65536*(i=Math.floor(r/65536)),v=(r=v+i+65535)-65536*(i=Math.floor(r/65536)),a=(r=(a+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(r/65536)),s=(r=s+i+65535)-65536*(i=Math.floor(r/65536)),o=(r=o+i+65535)-65536*(i=Math.floor(r/65536)),c=(r=c+i+65535)-65536*(i=Math.floor(r/65536)),u=(r=u+i+65535)-65536*(i=Math.floor(r/65536)),l=(r=l+i+65535)-65536*(i=Math.floor(r/65536)),p=(r=p+i+65535)-65536*(i=Math.floor(r/65536)),d=(r=d+i+65535)-65536*(i=Math.floor(r/65536)),m=(r=m+i+65535)-65536*(i=Math.floor(r/65536)),h=(r=h+i+65535)-65536*(i=Math.floor(r/65536)),f=(r=f+i+65535)-65536*(i=Math.floor(r/65536)),y=(r=y+i+65535)-65536*(i=Math.floor(r/65536)),g=(r=g+i+65535)-65536*(i=Math.floor(r/65536)),w=(r=w+i+65535)-65536*(i=Math.floor(r/65536)),N=(r=N+i+65535)-65536*(i=Math.floor(r/65536)),v=(r=v+i+65535)-65536*(i=Math.floor(r/65536)),a+=i-1+37*(i-1),e[0]=a,e[1]=s,e[2]=o,e[3]=c,e[4]=u,e[5]=l,e[6]=p,e[7]=d,e[8]=m,e[9]=h,e[10]=f,e[11]=y,e[12]=g,e[13]=w,e[14]=N,e[15]=v}function L(e,t){U(e,t,t)}function G(e,n){var r,i=t();for(r=0;r<16;r++)i[r]=n[r];for(r=253;r>=0;r--)L(i,i),2!==r&&4!==r&&U(i,i,n);for(r=0;r<16;r++)e[r]=i[r]}function F(e,n){var r,i=t();for(r=0;r<16;r++)i[r]=n[r];for(r=250;r>=0;r--)L(i,i),1!==r&&U(i,i,n);for(r=0;r<16;r++)e[r]=i[r]}function D(e,n,r){var i,a,s=new Uint8Array(32),o=new Float64Array(80),u=t(),l=t(),p=t(),d=t(),m=t(),h=t();for(a=0;a<31;a++)s[a]=n[a];for(s[31]=127&n[31]|64,s[0]&=248,k(o,r),a=0;a<16;a++)l[a]=o[a],d[a]=u[a]=p[a]=0;for(u[0]=d[0]=1,a=254;a>=0;--a)M(u,l,i=s[a>>>3]>>>(7&a)&1),M(p,d,i),B(m,u,p),$(u,u,p),B(p,l,d),$(l,l,d),L(d,m),L(h,u),U(u,p,u),U(p,l,m),B(m,u,p),$(u,u,p),L(l,u),$(p,d,h),U(u,p,c),B(u,u,d),U(p,p,u),U(u,d,h),U(d,l,o),L(l,m),M(u,l,i),M(p,d,i);for(a=0;a<16;a++)o[a+16]=u[a],o[a+32]=p[a],o[a+48]=l[a],o[a+64]=d[a];var f=o.subarray(32),y=o.subarray(16);return G(f,f),U(y,y,f),q(e,y),0}function V(e,t){return D(e,t,a)}function j(e,t){return r(t,32),V(e,t)}function H(e,t,n){var r=new Uint8Array(32);return D(r,n,t),N(e,i,r,v)}C.prototype.blocks=function(e,t,n){for(var r,i,a,s,o,c,u,l,p,d,m,h,f,y,g,w,N,v,b,x=this.fin?0:2048,_=this.h[0],T=this.h[1],C=this.h[2],S=this.h[3],A=this.h[4],P=this.h[5],E=this.h[6],z=this.h[7],I=this.h[8],M=this.h[9],q=this.r[0],R=this.r[1],O=this.r[2],k=this.r[3],B=this.r[4],$=this.r[5],U=this.r[6],L=this.r[7],G=this.r[8],F=this.r[9];n>=16;)d=p=0,d+=(_+=8191&(r=255&e[t+0]|(255&e[t+1])<<8))*q,d+=(T+=8191&(r>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*F),d+=(C+=8191&(i>>>10|(a=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*G),d+=(S+=8191&(a>>>7|(s=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*L),p=(d+=(A+=8191&(s>>>4|(o=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*U))>>>13,d&=8191,d+=(P+=o>>>1&8191)*(5*$),d+=(E+=8191&(o>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*B),d+=(z+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*k),d+=(I+=8191&(u>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*O),m=p+=(d+=(M+=l>>>5|x)*(5*R))>>>13,m+=_*R,m+=T*q,m+=C*(5*F),m+=S*(5*G),p=(m+=A*(5*L))>>>13,m&=8191,m+=P*(5*U),m+=E*(5*$),m+=z*(5*B),m+=I*(5*k),p+=(m+=M*(5*O))>>>13,m&=8191,h=p,h+=_*O,h+=T*R,h+=C*q,h+=S*(5*F),p=(h+=A*(5*G))>>>13,h&=8191,h+=P*(5*L),h+=E*(5*U),h+=z*(5*$),h+=I*(5*B),f=p+=(h+=M*(5*k))>>>13,f+=_*k,f+=T*O,f+=C*R,f+=S*q,p=(f+=A*(5*F))>>>13,f&=8191,f+=P*(5*G),f+=E*(5*L),f+=z*(5*U),f+=I*(5*$),y=p+=(f+=M*(5*B))>>>13,y+=_*B,y+=T*k,y+=C*O,y+=S*R,p=(y+=A*q)>>>13,y&=8191,y+=P*(5*F),y+=E*(5*G),y+=z*(5*L),y+=I*(5*U),g=p+=(y+=M*(5*$))>>>13,g+=_*$,g+=T*B,g+=C*k,g+=S*O,p=(g+=A*R)>>>13,g&=8191,g+=P*q,g+=E*(5*F),g+=z*(5*G),g+=I*(5*L),w=p+=(g+=M*(5*U))>>>13,w+=_*U,w+=T*$,w+=C*B,w+=S*k,p=(w+=A*O)>>>13,w&=8191,w+=P*R,w+=E*q,w+=z*(5*F),w+=I*(5*G),N=p+=(w+=M*(5*L))>>>13,N+=_*L,N+=T*U,N+=C*$,N+=S*B,p=(N+=A*k)>>>13,N&=8191,N+=P*O,N+=E*R,N+=z*q,N+=I*(5*F),v=p+=(N+=M*(5*G))>>>13,v+=_*G,v+=T*L,v+=C*U,v+=S*$,p=(v+=A*B)>>>13,v&=8191,v+=P*k,v+=E*O,v+=z*R,v+=I*q,b=p+=(v+=M*(5*F))>>>13,b+=_*F,b+=T*G,b+=C*L,b+=S*U,p=(b+=A*$)>>>13,b&=8191,b+=P*B,b+=E*k,b+=z*O,b+=I*R,_=d=8191&(p=(p=((p+=(b+=M*q)>>>13)<<2)+p|0)+(d&=8191)|0),T=m+=p>>>=13,C=h&=8191,S=f&=8191,A=y&=8191,P=g&=8191,E=w&=8191,z=N&=8191,I=v&=8191,M=b&=8191,t+=16,n-=16;this.h[0]=_,this.h[1]=T,this.h[2]=C,this.h[3]=S,this.h[4]=A,this.h[5]=P,this.h[6]=E,this.h[7]=z,this.h[8]=I,this.h[9]=M},C.prototype.finish=function(e,t){var n,r,i,a,s=new Uint16Array(10);if(this.leftover){for(a=this.leftover,this.buffer[a++]=1;a<16;a++)this.buffer[a]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,a=2;a<10;a++)this.h[a]+=n,n=this.h[a]>>>13,this.h[a]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,s[0]=this.h[0]+5,n=s[0]>>>13,s[0]&=8191,a=1;a<10;a++)s[a]=this.h[a]+n,n=s[a]>>>13,s[a]&=8191;for(s[9]-=8192,r=(1^n)-1,a=0;a<10;a++)s[a]&=r;for(r=~r,a=0;a<10;a++)this.h[a]=this.h[a]&r|s[a];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,a=1;a<8;a++)i=(this.h[a]+this.pad[a]|0)+(i>>>16)|0,this.h[a]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},C.prototype.update=function(e,t,n){var r,i;if(this.leftover){for((i=16-this.leftover)>n&&(i=n),r=0;r<i;r++)this.buffer[this.leftover+r]=e[t+r];if(n-=i,t+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(i=n-n%16,this.blocks(e,t,i),t+=i,n-=i),n){for(r=0;r<n;r++)this.buffer[this.leftover+r]=e[t+r];this.leftover+=n}};var J=P,W=E,Y=[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,n,r){for(var i,a,s,o,c,u,l,p,d,m,h,f,y,g,w,N,v,b,x,_,T,C,S,A,P,E,z=new Int32Array(16),I=new Int32Array(16),M=e[0],q=e[1],R=e[2],O=e[3],k=e[4],B=e[5],$=e[6],U=e[7],L=t[0],G=t[1],F=t[2],D=t[3],V=t[4],j=t[5],H=t[6],J=t[7],W=0;r>=128;){for(x=0;x<16;x++)_=8*x+W,z[x]=n[_+0]<<24|n[_+1]<<16|n[_+2]<<8|n[_+3],I[x]=n[_+4]<<24|n[_+5]<<16|n[_+6]<<8|n[_+7];for(x=0;x<80;x++)if(i=M,a=q,s=R,o=O,c=k,u=B,l=$,d=L,m=G,h=F,f=D,y=V,g=j,w=H,S=65535&(C=J),A=C>>>16,P=65535&(T=U),E=T>>>16,S+=65535&(C=(V>>>14|k<<18)^(V>>>18|k<<14)^(k>>>9|V<<23)),A+=C>>>16,P+=65535&(T=(k>>>14|V<<18)^(k>>>18|V<<14)^(V>>>9|k<<23)),E+=T>>>16,S+=65535&(C=V&j^~V&H),A+=C>>>16,P+=65535&(T=k&B^~k&$),E+=T>>>16,S+=65535&(C=Y[2*x+1]),A+=C>>>16,P+=65535&(T=Y[2*x]),E+=T>>>16,T=z[x%16],A+=(C=I[x%16])>>>16,P+=65535&T,E+=T>>>16,P+=(A+=(S+=65535&C)>>>16)>>>16,S=65535&(C=b=65535&S|A<<16),A=C>>>16,P=65535&(T=v=65535&P|(E+=P>>>16)<<16),E=T>>>16,S+=65535&(C=(L>>>28|M<<4)^(M>>>2|L<<30)^(M>>>7|L<<25)),A+=C>>>16,P+=65535&(T=(M>>>28|L<<4)^(L>>>2|M<<30)^(L>>>7|M<<25)),E+=T>>>16,A+=(C=L&G^L&F^G&F)>>>16,P+=65535&(T=M&q^M&R^q&R),E+=T>>>16,p=65535&(P+=(A+=(S+=65535&C)>>>16)>>>16)|(E+=P>>>16)<<16,N=65535&S|A<<16,S=65535&(C=f),A=C>>>16,P=65535&(T=o),E=T>>>16,A+=(C=b)>>>16,P+=65535&(T=v),E+=T>>>16,q=i,R=a,O=s,k=o=65535&(P+=(A+=(S+=65535&C)>>>16)>>>16)|(E+=P>>>16)<<16,B=c,$=u,U=l,M=p,G=d,F=m,D=h,V=f=65535&S|A<<16,j=y,H=g,J=w,L=N,x%16==15)for(_=0;_<16;_++)T=z[_],S=65535&(C=I[_]),A=C>>>16,P=65535&T,E=T>>>16,T=z[(_+9)%16],S+=65535&(C=I[(_+9)%16]),A+=C>>>16,P+=65535&T,E+=T>>>16,v=z[(_+1)%16],S+=65535&(C=((b=I[(_+1)%16])>>>1|v<<31)^(b>>>8|v<<24)^(b>>>7|v<<25)),A+=C>>>16,P+=65535&(T=(v>>>1|b<<31)^(v>>>8|b<<24)^v>>>7),E+=T>>>16,v=z[(_+14)%16],A+=(C=((b=I[(_+14)%16])>>>19|v<<13)^(v>>>29|b<<3)^(b>>>6|v<<26))>>>16,P+=65535&(T=(v>>>19|b<<13)^(b>>>29|v<<3)^v>>>6),E+=T>>>16,E+=(P+=(A+=(S+=65535&C)>>>16)>>>16)>>>16,z[_]=65535&P|E<<16,I[_]=65535&S|A<<16;S=65535&(C=L),A=C>>>16,P=65535&(T=M),E=T>>>16,T=e[0],A+=(C=t[0])>>>16,P+=65535&T,E+=T>>>16,E+=(P+=(A+=(S+=65535&C)>>>16)>>>16)>>>16,e[0]=M=65535&P|E<<16,t[0]=L=65535&S|A<<16,S=65535&(C=G),A=C>>>16,P=65535&(T=q),E=T>>>16,T=e[1],A+=(C=t[1])>>>16,P+=65535&T,E+=T>>>16,E+=(P+=(A+=(S+=65535&C)>>>16)>>>16)>>>16,e[1]=q=65535&P|E<<16,t[1]=G=65535&S|A<<16,S=65535&(C=F),A=C>>>16,P=65535&(T=R),E=T>>>16,T=e[2],A+=(C=t[2])>>>16,P+=65535&T,E+=T>>>16,E+=(P+=(A+=(S+=65535&C)>>>16)>>>16)>>>16,e[2]=R=65535&P|E<<16,t[2]=F=65535&S|A<<16,S=65535&(C=D),A=C>>>16,P=65535&(T=O),E=T>>>16,T=e[3],A+=(C=t[3])>>>16,P+=65535&T,E+=T>>>16,E+=(P+=(A+=(S+=65535&C)>>>16)>>>16)>>>16,e[3]=O=65535&P|E<<16,t[3]=D=65535&S|A<<16,S=65535&(C=V),A=C>>>16,P=65535&(T=k),E=T>>>16,T=e[4],A+=(C=t[4])>>>16,P+=65535&T,E+=T>>>16,E+=(P+=(A+=(S+=65535&C)>>>16)>>>16)>>>16,e[4]=k=65535&P|E<<16,t[4]=V=65535&S|A<<16,S=65535&(C=j),A=C>>>16,P=65535&(T=B),E=T>>>16,T=e[5],A+=(C=t[5])>>>16,P+=65535&T,E+=T>>>16,E+=(P+=(A+=(S+=65535&C)>>>16)>>>16)>>>16,e[5]=B=65535&P|E<<16,t[5]=j=65535&S|A<<16,S=65535&(C=H),A=C>>>16,P=65535&(T=$),E=T>>>16,T=e[6],A+=(C=t[6])>>>16,P+=65535&T,E+=T>>>16,E+=(P+=(A+=(S+=65535&C)>>>16)>>>16)>>>16,e[6]=$=65535&P|E<<16,t[6]=H=65535&S|A<<16,S=65535&(C=J),A=C>>>16,P=65535&(T=U),E=T>>>16,T=e[7],A+=(C=t[7])>>>16,P+=65535&T,E+=T>>>16,E+=(P+=(A+=(S+=65535&C)>>>16)>>>16)>>>16,e[7]=U=65535&P|E<<16,t[7]=J=65535&S|A<<16,W+=128,r-=128}return r}function Q(e,t,n){var r,i=new Int32Array(8),a=new Int32Array(8),s=new Uint8Array(256),o=n;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,a[0]=4089235720,a[1]=2227873595,a[2]=4271175723,a[3]=1595750129,a[4]=2917565137,a[5]=725511199,a[6]=4215389547,a[7]=327033209,K(i,a,t,n),n%=128,r=0;r<n;r++)s[r]=t[o-n+r];for(s[n]=128,s[(n=256-128*(n<112?1:0))-9]=0,h(s,n-8,o/536870912|0,o<<3),K(i,a,s,n),r=0;r<8;r++)h(e,8*r,i[r],a[r]);return 0}function X(e,n){var r=t(),i=t(),a=t(),s=t(),o=t(),c=t(),u=t(),p=t(),d=t();$(r,e[1],e[0]),$(d,n[1],n[0]),U(r,r,d),B(i,e[0],e[1]),B(d,n[0],n[1]),U(i,i,d),U(a,e[3],n[3]),U(a,a,l),U(s,e[2],n[2]),B(s,s,s),$(o,i,r),$(c,s,a),B(u,s,a),B(p,i,r),U(e[0],o,c),U(e[1],p,u),U(e[2],u,c),U(e[3],o,p)}function Z(e,t,n){var r;for(r=0;r<4;r++)M(e[r],t[r],n)}function ee(e,n){var r=t(),i=t(),a=t();G(a,n[2]),U(r,n[0],a),U(i,n[1],a),q(e,i),e[31]^=O(r)<<7}function te(e,t,n){var r,i;for(z(e[0],s),z(e[1],o),z(e[2],o),z(e[3],s),i=255;i>=0;--i)Z(e,t,r=n[i/8|0]>>(7&i)&1),X(t,e),X(e,e),Z(e,t,r)}function ne(e,n){var r=[t(),t(),t(),t()];z(r[0],p),z(r[1],d),z(r[2],o),U(r[3],p,d),te(e,r,n)}function re(e,n,i){var a,s=new Uint8Array(64),o=[t(),t(),t(),t()];for(i||r(n,32),Q(s,n,32),s[0]&=248,s[31]&=127,s[31]|=64,ne(o,s),ee(e,o),a=0;a<32;a++)n[a+32]=e[a];return 0}var ie=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 ae(e,t){var n,r,i,a;for(r=63;r>=32;--r){for(n=0,i=r-32,a=r-12;i<a;++i)t[i]+=n-16*t[r]*ie[i-(r-32)],n=Math.floor((t[i]+128)/256),t[i]-=256*n;t[i]+=n,t[r]=0}for(n=0,i=0;i<32;i++)t[i]+=n-(t[31]>>4)*ie[i],n=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=n*ie[i];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function se(e){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=e[t];for(t=0;t<64;t++)e[t]=0;ae(e,n)}function oe(e,n,r,i){var a,s,o=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),l=new Float64Array(64),p=[t(),t(),t(),t()];Q(o,i,32),o[0]&=248,o[31]&=127,o[31]|=64;var d=r+64;for(a=0;a<r;a++)e[64+a]=n[a];for(a=0;a<32;a++)e[32+a]=o[32+a];for(Q(u,e.subarray(32),r+32),se(u),ne(p,u),ee(e,p),a=32;a<64;a++)e[a]=i[a];for(Q(c,e,r+64),se(c),a=0;a<64;a++)l[a]=0;for(a=0;a<32;a++)l[a]=u[a];for(a=0;a<32;a++)for(s=0;s<32;s++)l[a+s]+=c[a]*o[s];return ae(e.subarray(32),l),d}function ce(e,n,r,i){var a,c=new Uint8Array(32),l=new Uint8Array(64),p=[t(),t(),t(),t()],d=[t(),t(),t(),t()];if(r<64)return-1;if(function(e,n){var r=t(),i=t(),a=t(),c=t(),l=t(),p=t(),d=t();return z(e[2],o),k(e[1],n),L(a,e[1]),U(c,a,u),$(a,a,e[2]),B(c,e[2],c),L(l,c),L(p,l),U(d,p,l),U(r,d,a),U(r,r,c),F(r,r),U(r,r,a),U(r,r,c),U(r,r,c),U(e[0],r,c),L(i,e[0]),U(i,i,c),R(i,a)&&U(e[0],e[0],m),L(i,e[0]),U(i,i,c),R(i,a)?-1:(O(e[0])===n[31]>>7&&$(e[0],s,e[0]),U(e[3],e[0],e[1]),0)}(d,i))return-1;for(a=0;a<r;a++)e[a]=n[a];for(a=0;a<32;a++)e[a+32]=i[a];if(Q(l,e,r),se(l),te(p,d,l),ne(d,n.subarray(32)),X(p,d),ee(c,p),r-=64,g(n,0,c,0)){for(a=0;a<r;a++)e[a]=0;return-1}for(a=0;a<r;a++)e[a]=n[a+64];return r}var ue=64,le=32,pe=64;function de(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function me(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function he(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:N,crypto_stream_xor:T,crypto_stream:_,crypto_stream_salsa20_xor:b,crypto_stream_salsa20:x,crypto_onetimeauth:S,crypto_onetimeauth_verify:A,crypto_verify_16:y,crypto_verify_32:g,crypto_secretbox:P,crypto_secretbox_open:E,crypto_scalarmult:D,crypto_scalarmult_base:V,crypto_box_beforenm:H,crypto_box_afternm:J,crypto_box:function(e,t,n,r,i,a){var s=new Uint8Array(32);return H(s,i,a),J(e,t,n,r,s)},crypto_box_open:function(e,t,n,r,i,a){var s=new Uint8Array(32);return H(s,i,a),W(e,t,n,r,s)},crypto_box_keypair:j,crypto_hash:Q,crypto_sign:oe,crypto_sign_keypair:re,crypto_sign_open:ce,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:ue,crypto_sign_PUBLICKEYBYTES:le,crypto_sign_SECRETKEYBYTES:pe,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:u,L:ie,pack25519:q,unpack25519:k,M:U,A:B,S:L,Z:$,pow2523:F,add:X,set25519:z,modL:ae,scalarmult:te,scalarbase:ne},e.randomBytes=function(e){var t=new Uint8Array(e);return r(t,e),t},e.secretbox=function(e,t,n){me(e,t,n),de(n,t);for(var r=new Uint8Array(32+e.length),i=new Uint8Array(r.length),a=0;a<e.length;a++)r[a+32]=e[a];return P(i,r,r.length,t,n),i.subarray(16)},e.secretbox.open=function(e,t,n){me(e,t,n),de(n,t);for(var r=new Uint8Array(16+e.length),i=new Uint8Array(r.length),a=0;a<e.length;a++)r[a+16]=e[a];return r.length<32||0!==E(i,r,r.length,t,n)?null:i.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(me(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var n=new Uint8Array(32);return D(n,e,t),n},e.scalarMult.base=function(e){if(me(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return V(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,n,r,i){var a=e.box.before(r,i);return e.secretbox(t,n,a)},e.box.before=function(e,t){me(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var n=new Uint8Array(32);return H(n,e,t),n},e.box.after=e.secretbox,e.box.open=function(t,n,r,i){var a=e.box.before(r,i);return e.secretbox.open(t,n,a)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return j(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(me(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return V(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(me(e,t),t.length!==pe)throw new Error("bad secret key size");var n=new Uint8Array(ue+e.length);return oe(n,e,e.length,t),n},e.sign.open=function(e,t){if(me(e,t),t.length!==le)throw new Error("bad public key size");var n=new Uint8Array(e.length),r=ce(n,e,e.length,t);if(r<0)return null;for(var i=new Uint8Array(r),a=0;a<i.length;a++)i[a]=n[a];return i},e.sign.detached=function(t,n){for(var r=e.sign(t,n),i=new Uint8Array(ue),a=0;a<i.length;a++)i[a]=r[a];return i},e.sign.detached.verify=function(e,t,n){if(me(e,t,n),t.length!==ue)throw new Error("bad signature size");if(n.length!==le)throw new Error("bad public key size");var r,i=new Uint8Array(ue+e.length),a=new Uint8Array(ue+e.length);for(r=0;r<ue;r++)i[r]=t[r];for(r=0;r<e.length;r++)i[r+ue]=e[r];return ce(a,i,i.length,n)>=0},e.sign.keyPair=function(){var e=new Uint8Array(le),t=new Uint8Array(pe);return re(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(me(e),e.length!==pe)throw new Error("bad secret key size");for(var t=new Uint8Array(le),n=0;n<t.length;n++)t[n]=e[32+n];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(me(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(le),n=new Uint8Array(pe),r=0;r<32;r++)n[r]=e[r];return re(t,n,!0),{publicKey:t,secretKey:n}},e.sign.publicKeyLength=le,e.sign.secretKeyLength=pe,e.sign.seedLength=32,e.sign.signatureLength=ue,e.hash=function(e){me(e);var t=new Uint8Array(64);return Q(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return me(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===f(e,0,t,0,e.length)},e.setPRNG=function(e){r=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;t&&t.getRandomValues?e.setPRNG((function(e,n){var r,i=new Uint8Array(n);for(r=0;r<n;r+=65536)t.getRandomValues(i.subarray(r,r+Math.min(n-r,65536)));for(r=0;r<n;r++)e[r]=i[r];he(i)})):(t=n(1281))&&t.randomBytes&&e.setPRNG((function(e,n){var r,i=t.randomBytes(n);for(r=0;r<n;r++)e[r]=i[r];he(i)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},952:function(e,t,n){var r;if("object"==typeof globalThis)r=globalThis;else try{r=n(4903)}catch(e){}finally{if(r||"undefined"==typeof window||(r=window),!r)throw new Error("Could not determine global this")}var i=r.WebSocket||r.MozWebSocket,a=n(9840);function s(e,t){return t?new i(e,t):new i(e)}i&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach((function(e){Object.defineProperty(s,e,{get:function(){return i[e]}})})),e.exports={w3cwebsocket:i?s:null,version:a}},9840:function(e,t,n){e.exports=n(9003).version},1281:function(){},1487:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");const t=new Uint8Array(256);for(let e=0;e<t.length;e++)t[e]=255;for(let n=0;n<e.length;n++){const r=e.charAt(n),i=r.charCodeAt(0);if(255!==t[i])throw new TypeError(r+" is ambiguous");t[i]=n}const n=e.length,r=e.charAt(0),i=Math.log(n)/Math.log(256),a=Math.log(256)/Math.log(n);function s(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;let a=0,s=0,o=0;for(;e[a]===r;)s++,a++;const c=(e.length-a)*i+1>>>0,u=new Uint8Array(c);for(;e[a];){let r=t[e.charCodeAt(a)];if(255===r)return;let i=0;for(let e=c-1;(0!==r||i<o)&&-1!==e;e--,i++)r+=n*u[e]>>>0,u[e]=r%256>>>0,r=r/256>>>0;if(0!==r)throw new Error("Non-zero carry");o=i,a++}let l=c-o;for(;l!==c&&0===u[l];)l++;const p=new Uint8Array(s+(c-l));let d=s;for(;l!==c;)p[d++]=u[l++];return p}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";let i=0,s=0,o=0;const c=t.length;for(;o!==c&&0===t[o];)o++,i++;const u=(c-o)*a+1>>>0,l=new Uint8Array(u);for(;o!==c;){let e=t[o],r=0;for(let t=u-1;(0!==e||r<s)&&-1!==t;t--,r++)e+=256*l[t]>>>0,l[t]=e%n>>>0,e=e/n>>>0;if(0!==e)throw new Error("Non-zero carry");s=r,o++}let p=u-s;for(;p!==u&&0===l[p];)p++;let d=r.repeat(i);for(;p<u;++p)d+=e.charAt(l[p]);return d},decodeUnsafe:s,decode:function(e){const t=s(e);if(t)return t;throw new Error("Non-base"+n+" character")}}}},8957:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(1487));t.default=(0,i.default)("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},6040:function(e,t,n){"use strict";var r=n(8251);e.exports=r},7264:function(e,t,n){"use strict";var r=n(4139);n(768),n(8549),n(7152),n(1372),e.exports=r},9692:function(e,t,n){"use strict";var r=n(7045);e.exports=r},5663:function(e,t,n){"use strict";var r=n(70);e.exports=r},1926:function(e,t,n){"use strict";n(6750);var r=n(2046).Object,i=e.exports=function(e,t,n){return r.defineProperty(e,t,n)};r.defineProperty.sham&&(i.sham=!0)},3842:function(e,t,n){"use strict";n(8545),n(3643),n(4452),n(3997),n(5084),n(2596),n(5721),n(4954),n(4123),n(3377),n(2230),n(5344),n(1660),n(4610),n(3669),n(4810),n(3325),n(7024),n(8172),n(5205);var r=n(2046);e.exports=r.Symbol},1730:function(e,t,n){"use strict";n(9363),n(3643),n(7057),n(4954);var r=n(560);e.exports=r.f("iterator")},1661:function(e,t,n){"use strict";n(8537),n(3669);var r=n(560);e.exports=r.f("toPrimitive")},4997:function(e,t,n){"use strict";var r=n(6040);e.exports=r},2321:function(e,t,n){"use strict";var r=n(7264);n(3939),n(1785),n(1697),n(4664),n(3422),n(36),n(8703),n(6878),n(9671),n(359),e.exports=r},2231:function(e,t,n){"use strict";var r=n(9692);e.exports=r},9280:function(e,t,n){"use strict";var r=n(5663);e.exports=r},2159:function(e,t,n){"use strict";var r=n(2250),i=n(4640),a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+" is not a function")}},43:function(e,t,n){"use strict";var r=n(4018),i=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a("Can't set "+i(e)+" as a prototype")}},2156:function(e){"use strict";e.exports=function(){}},6624:function(e,t,n){"use strict";var r=n(6285),i=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+" is not an object")}},4436:function(e,t,n){"use strict";var r=n(7374),i=n(4849),a=n(575),s=function(e){return function(t,n,s){var o=r(t),c=a(o);if(0===c)return!e&&-1;var u,l=i(s,c);if(e&&n!=n){for(;c>l;)if((u=o[l++])!=u)return!0}else for(;c>l;l++)if((e||l in o)&&o[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},726:function(e,t,n){"use strict";var r=n(8311),i=n(1907),a=n(6946),s=n(9298),o=n(575),c=n(6968),u=i([].push),l=function(e){var t=1===e,n=2===e,i=3===e,l=4===e,p=6===e,d=7===e,m=5===e||p;return function(h,f,y,g){for(var w,N,v=s(h),b=a(v),x=o(b),_=r(f,y),T=0,C=g||c,S=t?C(h,x):n||d?C(h,0):void 0;x>T;T++)if((m||T in b)&&(N=_(w=b[T],T,v),e))if(t)S[T]=N;else if(N)switch(e){case 3:return!0;case 5:return w;case 6:return T;case 2:u(S,w)}else switch(e){case 4:return!1;case 7:u(S,w)}return p?-1:i||l?l:S}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},7171:function(e,t,n){"use strict";var r=n(8828),i=n(6264),a=n(798),s=i("species");e.exports=function(e){return a>=51||!r((function(){var t=[];return(t.constructor={})[s]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},3427:function(e,t,n){"use strict";var r=n(1907);e.exports=r([].slice)},4010:function(e,t,n){"use strict";var r=n(1793),i=n(5468),a=n(6285),s=n(6264)("species"),o=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(i(t)&&(t===o||r(t.prototype))||a(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?o:t}},6968:function(e,t,n){"use strict";var r=n(4010);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},5807:function(e,t,n){"use strict";var r=n(1907),i=r({}.toString),a=r("".slice);e.exports=function(e){return a(i(e),8,-1)}},3948:function(e,t,n){"use strict";var r=n(2623),i=n(2250),a=n(5807),s=n(6264)("toStringTag"),o=Object,c="Arguments"===a(function(){return arguments}());e.exports=r?a:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=o(e),s))?n:c?a(t):"Object"===(r=a(t))&&i(t.callee)?"Arguments":r}},7382:function(e,t,n){"use strict";var r=n(8828);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},9550:function(e){"use strict";e.exports=function(e,t){return{value:e,done:t}}},1626:function(e,t,n){"use strict";var r=n(9447),i=n(4284),a=n(5817);e.exports=r?function(e,t,n){return i.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},5817:function(e){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},5543:function(e,t,n){"use strict";var r=n(9447),i=n(4284),a=n(5817);e.exports=function(e,t,n){r?i.f(e,t,a(0,n)):e[t]=n}},9251:function(e,t,n){"use strict";var r=n(4284);e.exports=function(e,t,n){return r.f(e,t,n)}},8055:function(e,t,n){"use strict";var r=n(1626);e.exports=function(e,t,n,i){return i&&i.enumerable?e[t]=n:r(e,t,n),e}},2532:function(e,t,n){"use strict";var r=n(5951),i=Object.defineProperty;e.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},9447:function(e,t,n){"use strict";var r=n(8828);e.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},9552:function(e,t,n){"use strict";var r=n(5951),i=n(6285),a=r.document,s=i(a)&&i(a.createElement);e.exports=function(e){return s?a.createElement(e):{}}},8024:function(e){"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},9287:function(e){"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},376:function(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6794:function(e,t,n){"use strict";var r=n(5951).navigator,i=r&&r.userAgent;e.exports=i?String(i):""},798:function(e,t,n){"use strict";var r,i,a=n(5951),s=n(6794),o=a.process,c=a.Deno,u=o&&o.versions||c&&c.version,l=u&&u.v8;l&&(i=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(i=+r[1]),e.exports=i},1091:function(e,t,n){"use strict";var r=n(5951),i=n(6024),a=n(2361),s=n(2250),o=n(3846).f,c=n(7463),u=n(2046),l=n(8311),p=n(1626),d=n(9724);n(3747);var m=function(e){var t=function(n,r,a){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,a)}return i(e,this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,i,h,f,y,g,w,N,v,b=e.target,x=e.global,_=e.stat,T=e.proto,C=x?r:_?r[b]:r[b]&&r[b].prototype,S=x?u:u[b]||p(u,b,{})[b],A=S.prototype;for(f in t)i=!(n=c(x?f:b+(_?".":"#")+f,e.forced))&&C&&d(C,f),g=S[f],i&&(w=e.dontCallGetSet?(v=o(C,f))&&v.value:C[f]),y=i&&w?w:t[f],(n||T||typeof g!=typeof y)&&(N=e.bind&&i?l(y,r):e.wrap&&i?m(y):T&&s(y)?a(y):y,(e.sham||y&&y.sham||g&&g.sham)&&p(N,"sham",!0),p(S,f,N),T&&(d(u,h=b+"Prototype")||p(u,h,{}),p(u[h],f,y),e.real&&A&&(n||!A[f])&&p(A,f,y)))}},8828:function(e){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},6024:function(e,t,n){"use strict";var r=n(1505),i=Function.prototype,a=i.apply,s=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?s.bind(a):function(){return s.apply(a,arguments)})},8311:function(e,t,n){"use strict";var r=n(2361),i=n(2159),a=n(1505),s=r(r.bind);e.exports=function(e,t){return i(e),void 0===t?e:a?s(e,t):function(){return e.apply(t,arguments)}}},1505:function(e,t,n){"use strict";var r=n(8828);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},3930:function(e,t,n){"use strict";var r=n(1505),i=Function.prototype.call;e.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},6833:function(e,t,n){"use strict";var r=n(9447),i=n(9724),a=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,o=i(a,"name"),c=o&&"something"===function(){}.name,u=o&&(!r||r&&s(a,"name").configurable);e.exports={EXISTS:o,PROPER:c,CONFIGURABLE:u}},1871:function(e,t,n){"use strict";var r=n(1907),i=n(2159);e.exports=function(e,t,n){try{return r(i(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},2361:function(e,t,n){"use strict";var r=n(5807),i=n(1907);e.exports=function(e){if("Function"===r(e))return i(e)}},1907:function(e,t,n){"use strict";var r=n(1505),i=Function.prototype,a=i.call,s=r&&i.bind.bind(a,a);e.exports=r?s:function(e){return function(){return a.apply(e,arguments)}}},5582:function(e,t,n){"use strict";var r=n(2046),i=n(5951),a=n(2250),s=function(e){return a(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?s(r[e])||s(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},6656:function(e,t,n){"use strict";var r=n(1907),i=n(1793),a=n(2250),s=n(5807),o=n(160),c=r([].push);e.exports=function(e){if(a(e))return e;if(i(e)){for(var t=e.length,n=[],r=0;r<t;r++){var u=e[r];"string"==typeof u?c(n,u):"number"!=typeof u&&"Number"!==s(u)&&"String"!==s(u)||c(n,o(u))}var l=n.length,p=!0;return function(e,t){if(p)return p=!1,t;if(i(this))return t;for(var r=0;r<l;r++)if(n[r]===e)return t}}}},9367:function(e,t,n){"use strict";var r=n(2159),i=n(7136);e.exports=function(e,t){var n=e[t];return i(n)?void 0:r(n)}},5951:function(e,t,n){"use strict";var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9724:function(e,t,n){"use strict";var r=n(1907),i=n(9298),a=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return a(i(e),t)}},8530:function(e){"use strict";e.exports={}},2416:function(e,t,n){"use strict";var r=n(5582);e.exports=r("document","documentElement")},3648:function(e,t,n){"use strict";var r=n(9447),i=n(8828),a=n(9552);e.exports=!r&&!i((function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},6946:function(e,t,n){"use strict";var r=n(1907),i=n(8828),a=n(5807),s=Object,o=r("".split);e.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"===a(e)?o(e,""):s(e)}:s},2647:function(e,t,n){"use strict";var r=n(1907),i=n(2250),a=n(3747),s=r(Function.toString);i(a.inspectSource)||(a.inspectSource=function(e){return s(e)}),e.exports=a.inspectSource},4932:function(e,t,n){"use strict";var r,i,a,s=n(551),o=n(5951),c=n(6285),u=n(1626),l=n(9724),p=n(3747),d=n(2522),m=n(8530),h="Object already initialized",f=o.TypeError,y=o.WeakMap;if(s||p.state){var g=p.state||(p.state=new y);g.get=g.get,g.has=g.has,g.set=g.set,r=function(e,t){if(g.has(e))throw new f(h);return t.facade=e,g.set(e,t),t},i=function(e){return g.get(e)||{}},a=function(e){return g.has(e)}}else{var w=d("state");m[w]=!0,r=function(e,t){if(l(e,w))throw new f(h);return t.facade=e,u(e,w,t),t},i=function(e){return l(e,w)?e[w]:{}},a=function(e){return l(e,w)}}e.exports={set:r,get:i,has:a,enforce:function(e){return a(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=i(t)).type!==e)throw new f("Incompatible receiver, "+e+" required");return n}}}},1793:function(e,t,n){"use strict";var r=n(5807);e.exports=Array.isArray||function(e){return"Array"===r(e)}},2250:function(e){"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},5468:function(e,t,n){"use strict";var r=n(1907),i=n(8828),a=n(2250),s=n(3948),o=n(5582),c=n(2647),u=function(){},l=o("Reflect","construct"),p=/^\s*(?:class|function)\b/,d=r(p.exec),m=!p.test(u),h=function(e){if(!a(e))return!1;try{return l(u,[],e),!0}catch(e){return!1}},f=function(e){if(!a(e))return!1;switch(s(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return m||!!d(p,c(e))}catch(e){return!0}};f.sham=!0,e.exports=!l||i((function(){var e;return h(h.call)||!h(Object)||!h((function(){e=!0}))||e}))?f:h},7463:function(e,t,n){"use strict";var r=n(8828),i=n(2250),a=/#|\.prototype\./,s=function(e,t){var n=c[o(e)];return n===l||n!==u&&(i(t)?r(t):!!t)},o=s.normalize=function(e){return String(e).replace(a,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";e.exports=s},7136:function(e){"use strict";e.exports=function(e){return null==e}},6285:function(e,t,n){"use strict";var r=n(2250);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},4018:function(e,t,n){"use strict";var r=n(6285);e.exports=function(e){return r(e)||null===e}},7376:function(e){"use strict";e.exports=!0},5594:function(e,t,n){"use strict";var r=n(5582),i=n(2250),a=n(8280),s=n(1175),o=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return i(t)&&a(t.prototype,o(e))}},7181:function(e,t,n){"use strict";var r=n(5116).IteratorPrototype,i=n(8075),a=n(5817),s=n(4840),o=n(3742),c=function(){return this};e.exports=function(e,t,n,u){var l=t+" Iterator";return e.prototype=i(r,{next:a(+!u,n)}),s(e,l,!1,!0),o[l]=c,e}},183:function(e,t,n){"use strict";var r=n(1091),i=n(3930),a=n(7376),s=n(6833),o=n(2250),c=n(7181),u=n(5972),l=n(9192),p=n(4840),d=n(1626),m=n(8055),h=n(6264),f=n(3742),y=n(5116),g=s.PROPER,w=s.CONFIGURABLE,N=y.IteratorPrototype,v=y.BUGGY_SAFARI_ITERATORS,b=h("iterator"),x="keys",_="values",T="entries",C=function(){return this};e.exports=function(e,t,n,s,h,y,S){c(n,t,s);var A,P,E,z=function(e){if(e===h&&O)return O;if(!v&&e&&e in q)return q[e];switch(e){case x:case _:case T:return function(){return new n(this,e)}}return function(){return new n(this)}},I=t+" Iterator",M=!1,q=e.prototype,R=q[b]||q["@@iterator"]||h&&q[h],O=!v&&R||z(h),k="Array"===t&&q.entries||R;if(k&&(A=u(k.call(new e)))!==Object.prototype&&A.next&&(a||u(A)===N||(l?l(A,N):o(A[b])||m(A,b,C)),p(A,I,!0,!0),a&&(f[I]=C)),g&&h===_&&R&&R.name!==_&&(!a&&w?d(q,"name",_):(M=!0,O=function(){return i(R,this)})),h)if(P={values:z(_),keys:y?O:z(x),entries:z(T)},S)for(E in P)(v||M||!(E in q))&&m(q,E,P[E]);else r({target:t,proto:!0,forced:v||M},P);return a&&!S||q[b]===O||m(q,b,O,{name:h}),f[t]=O,P}},5116:function(e,t,n){"use strict";var r,i,a,s=n(8828),o=n(2250),c=n(6285),u=n(8075),l=n(5972),p=n(8055),d=n(6264),m=n(7376),h=d("iterator"),f=!1;[].keys&&("next"in(a=[].keys())?(i=l(l(a)))!==Object.prototype&&(r=i):f=!0),!c(r)||s((function(){var e={};return r[h].call(e)!==e}))?r={}:m&&(r=u(r)),o(r[h])||p(r,h,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:f}},3742:function(e){"use strict";e.exports={}},575:function(e,t,n){"use strict";var r=n(3121);e.exports=function(e){return r(e.length)}},1176:function(e){"use strict";var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},8075:function(e,t,n){"use strict";var r,i=n(6624),a=n(2220),s=n(376),o=n(8530),c=n(2416),u=n(9552),l=n(2522),p="prototype",d="script",m=l("IE_PROTO"),h=function(){},f=function(e){return"<"+d+">"+e+"</"+d+">"},y=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;g="undefined"!=typeof document?document.domain&&r?y(r):(t=u("iframe"),n="java"+d+":",t.style.display="none",c.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(f("document.F=Object")),e.close(),e.F):y(r);for(var i=s.length;i--;)delete g[p][s[i]];return g()};o[m]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h[p]=i(e),n=new h,h[p]=null,n[m]=e):n=g(),void 0===t?n:a.f(n,t)}},2220:function(e,t,n){"use strict";var r=n(9447),i=n(8661),a=n(4284),s=n(6624),o=n(7374),c=n(2875);t.f=r&&!i?Object.defineProperties:function(e,t){s(e);for(var n,r=o(t),i=c(t),u=i.length,l=0;u>l;)a.f(e,n=i[l++],r[n]);return e}},4284:function(e,t,n){"use strict";var r=n(9447),i=n(3648),a=n(8661),s=n(6624),o=n(470),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,p="enumerable",d="configurable",m="writable";t.f=r?a?function(e,t,n){if(s(e),t=o(t),s(n),"function"==typeof e&&"prototype"===t&&"value"in n&&m in n&&!n[m]){var r=l(e,t);r&&r[m]&&(e[t]=n.value,n={configurable:d in n?n[d]:r[d],enumerable:p in n?n[p]:r[p],writable:!1})}return u(e,t,n)}:u:function(e,t,n){if(s(e),t=o(t),s(n),i)try{return u(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new c("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},3846:function(e,t,n){"use strict";var r=n(9447),i=n(3930),a=n(2574),s=n(5817),o=n(7374),c=n(470),u=n(9724),l=n(3648),p=Object.getOwnPropertyDescriptor;t.f=r?p:function(e,t){if(e=o(e),t=c(t),l)try{return p(e,t)}catch(e){}if(u(e,t))return s(!i(a.f,e,t),e[t])}},5407:function(e,t,n){"use strict";var r=n(5807),i=n(7374),a=n(4443).f,s=n(3427),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"Window"===r(e)?function(e){try{return a(e)}catch(e){return s(o)}}(e):a(i(e))}},4443:function(e,t,n){"use strict";var r=n(3045),i=n(376).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},7170:function(e,t){"use strict";t.f=Object.getOwnPropertySymbols},5972:function(e,t,n){"use strict";var r=n(9724),i=n(2250),a=n(9298),s=n(2522),o=n(7382),c=s("IE_PROTO"),u=Object,l=u.prototype;e.exports=o?u.getPrototypeOf:function(e){var t=a(e);if(r(t,c))return t[c];var n=t.constructor;return i(n)&&t instanceof n?n.prototype:t instanceof u?l:null}},8280:function(e,t,n){"use strict";var r=n(1907);e.exports=r({}.isPrototypeOf)},3045:function(e,t,n){"use strict";var r=n(1907),i=n(9724),a=n(7374),s=n(4436).indexOf,o=n(8530),c=r([].push);e.exports=function(e,t){var n,r=a(e),u=0,l=[];for(n in r)!i(o,n)&&i(r,n)&&c(l,n);for(;t.length>u;)i(r,n=t[u++])&&(~s(l,n)||c(l,n));return l}},2875:function(e,t,n){"use strict";var r=n(3045),i=n(376);e.exports=Object.keys||function(e){return r(e,i)}},2574:function(e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},9192:function(e,t,n){"use strict";var r=n(1871),i=n(6285),a=n(4239),s=n(43);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return a(n),s(r),i(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0)},4878:function(e,t,n){"use strict";var r=n(2623),i=n(3948);e.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},581:function(e,t,n){"use strict";var r=n(3930),i=n(2250),a=n(6285),s=TypeError;e.exports=function(e,t){var n,o;if("string"===t&&i(n=e.toString)&&!a(o=r(n,e)))return o;if(i(n=e.valueOf)&&!a(o=r(n,e)))return o;if("string"!==t&&i(n=e.toString)&&!a(o=r(n,e)))return o;throw new s("Can't convert object to primitive value")}},2046:function(e){"use strict";e.exports={}},4239:function(e,t,n){"use strict";var r=n(7136),i=TypeError;e.exports=function(e){if(r(e))throw new i("Can't call method on "+e);return e}},4840:function(e,t,n){"use strict";var r=n(2623),i=n(4284).f,a=n(1626),s=n(9724),o=n(4878),c=n(6264)("toStringTag");e.exports=function(e,t,n,u){var l=n?e:e&&e.prototype;l&&(s(l,c)||i(l,c,{configurable:!0,value:t}),u&&!r&&a(l,"toString",o))}},2522:function(e,t,n){"use strict";var r=n(5816),i=n(6499),a=r("keys");e.exports=function(e){return a[e]||(a[e]=i(e))}},3747:function(e,t,n){"use strict";var r=n(7376),i=n(5951),a=n(2532),s="__core-js_shared__",o=e.exports=i[s]||a(s,{});(o.versions||(o.versions=[])).push({version:"3.38.1",mode:r?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5816:function(e,t,n){"use strict";var r=n(3747);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},1470:function(e,t,n){"use strict";var r=n(1907),i=n(5482),a=n(160),s=n(4239),o=r("".charAt),c=r("".charCodeAt),u=r("".slice),l=function(e){return function(t,n){var r,l,p=a(s(t)),d=i(n),m=p.length;return d<0||d>=m?e?"":void 0:(r=c(p,d))<55296||r>56319||d+1===m||(l=c(p,d+1))<56320||l>57343?e?o(p,d):r:e?u(p,d,d+2):l-56320+(r-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},9846:function(e,t,n){"use strict";var r=n(798),i=n(8828),a=n(5951).String;e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol("symbol detection");return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},3467:function(e,t,n){"use strict";var r=n(3930),i=n(5582),a=n(6264),s=n(8055);e.exports=function(){var e=i("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,o=a("toPrimitive");t&&!t[o]&&s(t,o,(function(e){return r(n,this)}),{arity:1})}},2595:function(e,t,n){"use strict";var r=n(5582),i=n(1907),a=r("Symbol"),s=a.keyFor,o=i(a.prototype.valueOf);e.exports=a.isRegisteredSymbol||function(e){try{return void 0!==s(o(e))}catch(e){return!1}}},9197:function(e,t,n){"use strict";for(var r=n(5816),i=n(5582),a=n(1907),s=n(5594),o=n(6264),c=i("Symbol"),u=c.isWellKnownSymbol,l=i("Object","getOwnPropertyNames"),p=a(c.prototype.valueOf),d=r("wks"),m=0,h=l(c),f=h.length;m<f;m++)try{var y=h[m];s(c[y])&&o(y)}catch(e){}e.exports=function(e){if(u&&u(e))return!0;try{for(var t=p(e),n=0,r=l(d),i=r.length;n<i;n++)if(d[r[n]]==t)return!0}catch(e){}return!1}},4411:function(e,t,n){"use strict";var r=n(9846);e.exports=r&&!!Symbol.for&&!!Symbol.keyFor},4849:function(e,t,n){"use strict";var r=n(5482),i=Math.max,a=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):a(n,t)}},7374:function(e,t,n){"use strict";var r=n(6946),i=n(4239);e.exports=function(e){return r(i(e))}},5482:function(e,t,n){"use strict";var r=n(1176);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},3121:function(e,t,n){"use strict";var r=n(5482),i=Math.min;e.exports=function(e){var t=r(e);return t>0?i(t,9007199254740991):0}},9298:function(e,t,n){"use strict";var r=n(4239),i=Object;e.exports=function(e){return i(r(e))}},6028:function(e,t,n){"use strict";var r=n(3930),i=n(6285),a=n(5594),s=n(9367),o=n(581),c=n(6264),u=TypeError,l=c("toPrimitive");e.exports=function(e,t){if(!i(e)||a(e))return e;var n,c=s(e,l);if(c){if(void 0===t&&(t="default"),n=r(c,e,t),!i(n)||a(n))return n;throw new u("Can't convert object to primitive value")}return void 0===t&&(t="number"),o(e,t)}},470:function(e,t,n){"use strict";var r=n(6028),i=n(5594);e.exports=function(e){var t=r(e,"string");return i(t)?t:t+""}},2623:function(e,t,n){"use strict";var r={};r[n(6264)("toStringTag")]="z",e.exports="[object z]"===String(r)},160:function(e,t,n){"use strict";var r=n(3948),i=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return i(e)}},4640:function(e){"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},6499:function(e,t,n){"use strict";var r=n(1907),i=0,a=Math.random(),s=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++i+a,36)}},1175:function(e,t,n){"use strict";var r=n(9846);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8661:function(e,t,n){"use strict";var r=n(9447),i=n(8828);e.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},551:function(e,t,n){"use strict";var r=n(5951),i=n(2250),a=r.WeakMap;e.exports=i(a)&&/native code/.test(String(a))},366:function(e,t,n){"use strict";var r=n(2046),i=n(9724),a=n(560),s=n(4284).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||s(t,e,{value:a.f(e)})}},560:function(e,t,n){"use strict";var r=n(6264);t.f=r},6264:function(e,t,n){"use strict";var r=n(5951),i=n(5816),a=n(9724),s=n(6499),o=n(9846),c=n(1175),u=r.Symbol,l=i("wks"),p=c?u.for||u:u&&u.withoutSetter||s;e.exports=function(e){return a(l,e)||(l[e]=o&&a(u,e)?u[e]:p("Symbol."+e)),l[e]}},8545:function(e,t,n){"use strict";var r=n(1091),i=n(8828),a=n(1793),s=n(6285),o=n(9298),c=n(575),u=n(8024),l=n(5543),p=n(6968),d=n(7171),m=n(6264),h=n(798),f=m("isConcatSpreadable"),y=h>=51||!i((function(){var e=[];return e[f]=!1,e.concat()[0]!==e})),g=function(e){if(!s(e))return!1;var t=e[f];return void 0!==t?!!t:a(e)};r({target:"Array",proto:!0,arity:1,forced:!y||!d("concat")},{concat:function(e){var t,n,r,i,a,s=o(this),d=p(s,0),m=0;for(t=-1,r=arguments.length;t<r;t++)if(g(a=-1===t?s:arguments[t]))for(i=c(a),u(m+i),n=0;n<i;n++,m++)n in a&&l(d,m,a[n]);else u(m+1),l(d,m++,a);return d.length=m,d}})},9363:function(e,t,n){"use strict";var r=n(7374),i=n(2156),a=n(3742),s=n(4932),o=n(4284).f,c=n(183),u=n(9550),l=n(7376),p=n(9447),d="Array Iterator",m=s.set,h=s.getterFor(d);e.exports=c(Array,"Array",(function(e,t){m(this,{type:d,target:r(e),index:0,kind:t})}),(function(){var e=h(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,u(void 0,!0);switch(e.kind){case"keys":return u(n,!1);case"values":return u(t[n],!1)}return u([n,t[n]],!1)}),"values");var f=a.Arguments=a.Array;if(i("keys"),i("values"),i("entries"),!l&&p&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}},8537:function(){},9721:function(e,t,n){"use strict";var r=n(1091),i=n(5582),a=n(6024),s=n(3930),o=n(1907),c=n(8828),u=n(2250),l=n(5594),p=n(3427),d=n(6656),m=n(9846),h=String,f=i("JSON","stringify"),y=o(/./.exec),g=o("".charAt),w=o("".charCodeAt),N=o("".replace),v=o(1..toString),b=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,_=/^[\uDC00-\uDFFF]$/,T=!m||c((function(){var e=i("Symbol")("stringify detection");return"[null]"!==f([e])||"{}"!==f({a:e})||"{}"!==f(Object(e))})),C=c((function(){return'"\\udf06\\ud834"'!==f("\udf06\ud834")||'"\\udead"'!==f("\udead")})),S=function(e,t){var n=p(arguments),r=d(t);if(u(r)||void 0!==e&&!l(e))return n[1]=function(e,t){if(u(r)&&(t=s(r,this,h(e),t)),!l(t))return t},a(f,null,n)},A=function(e,t,n){var r=g(n,t-1),i=g(n,t+1);return y(x,e)&&!y(_,i)||y(_,e)&&!y(x,r)?"\\u"+v(w(e,0),16):e};f&&r({target:"JSON",stat:!0,arity:3,forced:T||C},{stringify:function(e,t,n){var r=p(arguments),i=a(T?S:f,null,r);return C&&"string"==typeof i?N(i,b,A):i}})},7024:function(e,t,n){"use strict";var r=n(5951);n(4840)(r.JSON,"JSON",!0)},8172:function(){},6750:function(e,t,n){"use strict";var r=n(1091),i=n(9447),a=n(4284).f;r({target:"Object",stat:!0,forced:Object.defineProperty!==a,sham:!i},{defineProperty:a})},5264:function(e,t,n){"use strict";var r=n(1091),i=n(9846),a=n(8828),s=n(7170),o=n(9298);r({target:"Object",stat:!0,forced:!i||a((function(){s.f(1)}))},{getOwnPropertySymbols:function(e){var t=s.f;return t?t(o(e)):[]}})},3643:function(){},5205:function(){},7057:function(e,t,n){"use strict";var r=n(1470).charAt,i=n(160),a=n(4932),s=n(183),o=n(9550),c="String Iterator",u=a.set,l=a.getterFor(c);s(String,"String",(function(e){u(this,{type:c,string:i(e),index:0})}),(function(){var e,t=l(this),n=t.string,i=t.index;return i>=n.length?o(void 0,!0):(e=r(n,i),t.index+=e.length,o(e,!1))}))},3997:function(e,t,n){"use strict";n(366)("asyncIterator")},3674:function(e,t,n){"use strict";var r=n(1091),i=n(5951),a=n(3930),s=n(1907),o=n(7376),c=n(9447),u=n(9846),l=n(8828),p=n(9724),d=n(8280),m=n(6624),h=n(7374),f=n(470),y=n(160),g=n(5817),w=n(8075),N=n(2875),v=n(4443),b=n(5407),x=n(7170),_=n(3846),T=n(4284),C=n(2220),S=n(2574),A=n(8055),P=n(9251),E=n(5816),z=n(2522),I=n(8530),M=n(6499),q=n(6264),R=n(560),O=n(366),k=n(3467),B=n(4840),$=n(4932),U=n(726).forEach,L=z("hidden"),G="Symbol",F="prototype",D=$.set,V=$.getterFor(G),j=Object[F],H=i.Symbol,J=H&&H[F],W=i.RangeError,Y=i.TypeError,K=i.QObject,Q=_.f,X=T.f,Z=b.f,ee=S.f,te=s([].push),ne=E("symbols"),re=E("op-symbols"),ie=E("wks"),ae=!K||!K[F]||!K[F].findChild,se=function(e,t,n){var r=Q(j,t);r&&delete j[t],X(e,t,n),r&&e!==j&&X(j,t,r)},oe=c&&l((function(){return 7!==w(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a}))?se:X,ce=function(e,t){var n=ne[e]=w(J);return D(n,{type:G,tag:e,description:t}),c||(n.description=t),n},ue=function(e,t,n){e===j&&ue(re,t,n),m(e);var r=f(t);return m(n),p(ne,r)?(n.enumerable?(p(e,L)&&e[L][r]&&(e[L][r]=!1),n=w(n,{enumerable:g(0,!1)})):(p(e,L)||X(e,L,g(1,w(null))),e[L][r]=!0),oe(e,r,n)):X(e,r,n)},le=function(e,t){m(e);var n=h(t),r=N(n).concat(he(n));return U(r,(function(t){c&&!a(pe,n,t)||ue(e,t,n[t])})),e},pe=function(e){var t=f(e),n=a(ee,this,t);return!(this===j&&p(ne,t)&&!p(re,t))&&(!(n||!p(this,t)||!p(ne,t)||p(this,L)&&this[L][t])||n)},de=function(e,t){var n=h(e),r=f(t);if(n!==j||!p(ne,r)||p(re,r)){var i=Q(n,r);return!i||!p(ne,r)||p(n,L)&&n[L][r]||(i.enumerable=!0),i}},me=function(e){var t=Z(h(e)),n=[];return U(t,(function(e){p(ne,e)||p(I,e)||te(n,e)})),n},he=function(e){var t=e===j,n=Z(t?re:h(e)),r=[];return U(n,(function(e){!p(ne,e)||t&&!p(j,e)||te(r,ne[e])})),r};u||(H=function(){if(d(J,this))throw new Y("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?y(arguments[0]):void 0,t=M(e),n=function(e){var r=void 0===this?i:this;r===j&&a(n,re,e),p(r,L)&&p(r[L],t)&&(r[L][t]=!1);var s=g(1,e);try{oe(r,t,s)}catch(e){if(!(e instanceof W))throw e;se(r,t,s)}};return c&&ae&&oe(j,t,{configurable:!0,set:n}),ce(t,e)},A(J=H[F],"toString",(function(){return V(this).tag})),A(H,"withoutSetter",(function(e){return ce(M(e),e)})),S.f=pe,T.f=ue,C.f=le,_.f=de,v.f=b.f=me,x.f=he,R.f=function(e){return ce(q(e),e)},c&&(P(J,"description",{configurable:!0,get:function(){return V(this).description}}),o||A(j,"propertyIsEnumerable",pe,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!u,sham:!u},{Symbol:H}),U(N(ie),(function(e){O(e)})),r({target:G,stat:!0,forced:!u},{useSetter:function(){ae=!0},useSimple:function(){ae=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!c},{create:function(e,t){return void 0===t?w(e):le(w(e),t)},defineProperty:ue,defineProperties:le,getOwnPropertyDescriptor:de}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:me}),k(),B(H,G),I[L]=!0},5084:function(){},3313:function(e,t,n){"use strict";var r=n(1091),i=n(5582),a=n(9724),s=n(160),o=n(5816),c=n(4411),u=o("string-to-symbol-registry"),l=o("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{for:function(e){var t=s(e);if(a(u,t))return u[t];var n=i("Symbol")(t);return u[t]=n,l[n]=t,n}})},2596:function(e,t,n){"use strict";n(366)("hasInstance")},5721:function(e,t,n){"use strict";n(366)("isConcatSpreadable")},4954:function(e,t,n){"use strict";n(366)("iterator")},4452:function(e,t,n){"use strict";n(3674),n(3313),n(751),n(9721),n(5264)},751:function(e,t,n){"use strict";var r=n(1091),i=n(9724),a=n(5594),s=n(4640),o=n(5816),c=n(4411),u=o("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{keyFor:function(e){if(!a(e))throw new TypeError(s(e)+" is not a symbol");if(i(u,e))return u[e]}})},3377:function(e,t,n){"use strict";n(366)("matchAll")},4123:function(e,t,n){"use strict";n(366)("match")},2230:function(e,t,n){"use strict";n(366)("replace")},5344:function(e,t,n){"use strict";n(366)("search")},1660:function(e,t,n){"use strict";n(366)("species")},4610:function(e,t,n){"use strict";n(366)("split")},3669:function(e,t,n){"use strict";var r=n(366),i=n(3467);r("toPrimitive"),i()},4810:function(e,t,n){"use strict";var r=n(5582),i=n(366),a=n(4840);i("toStringTag"),a(r("Symbol"),"Symbol")},3325:function(e,t,n){"use strict";n(366)("unscopables")},768:function(e,t,n){"use strict";var r=n(6264),i=n(4284).f,a=r("metadata"),s=Function.prototype;void 0===s[a]&&i(s,a,{value:null})},8549:function(e,t,n){"use strict";n(366)("asyncDispose")},1697:function(e,t,n){"use strict";n(366)("customMatcher")},7152:function(e,t,n){"use strict";n(366)("dispose")},3939:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0},{isRegisteredSymbol:n(2595)})},3422:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:n(2595)})},1785:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:n(9197)})},36:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:n(9197)})},8703:function(e,t,n){"use strict";n(366)("matcher")},6878:function(e,t,n){"use strict";n(366)("metadataKey")},1372:function(e,t,n){"use strict";n(366)("metadata")},4664:function(e,t,n){"use strict";n(366)("observable")},9671:function(e,t,n){"use strict";n(366)("patternMatch")},359:function(e,t,n){"use strict";n(366)("replaceAll")},2560:function(e,t,n){"use strict";n(9363);var r=n(9287),i=n(5951),a=n(4840),s=n(3742);for(var o in r)a(i[o],o),s[o]=s.Array},8251:function(e,t,n){"use strict";var r=n(1926);e.exports=r},4139:function(e,t,n){"use strict";var r=n(3842);n(2560),e.exports=r},7045:function(e,t,n){"use strict";var r=n(1730);n(2560),e.exports=r},70:function(e,t,n){"use strict";var r=n(1661);e.exports=r},9003:function(e){"use strict";e.exports={version:"1.0.35"}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";n.r(r),n.d(r,{AE_AMOUNT_FORMATS:function(){return Ke},AbiVersion:function(){return jr},AccountBase:function(){return il},AccountError:function(){return I},AccountGeneralized:function(){return Fm},AccountLedger:function(){return jm},AccountLedgerFactory:function(){return Zm},AccountMetamask:function(){return ah},AccountMetamaskFactory:function(){return mh},AccountMnemonicFactory:function(){return Bm},AeSdk:function(){return Ip},AeSdkAepp:function(){return ld},AeSdkBase:function(){return zp},AeSdkMethods:function(){return Ap},AeSdkWallet:function(){return kd},AensError:function(){return M},AensPointerContextError:function(){return ie},AeppError:function(){return q},AlreadyConnectedError:function(){return Je},AmbiguousEventDefinitionError:function(){return ze},ArgumentCountMismatchError:function(){return D},ArgumentError:function(){return G},BaseError:function(){return z},BrowserRuntimeConnection:function(){return zb},BrowserWindowMessageConnection:function(){return Tb},BytecodeMismatchError:function(){return Ne},CallReturnType:function(){return Ta},Channel:function(){return Kf},ChannelCallError:function(){return de},ChannelConnectionError:function(){return me},ChannelError:function(){return R},ChannelIncomingMessageError:function(){return ye},ChannelPingTimedOutError:function(){return he},CompilerBase:function(){return yh},CompilerError:function(){return O},CompilerHttp:function(){return pf},ConsensusProtocolVersion:function(){return Dr},Contract:function(){return tp},ContractError:function(){return k},CryptographyError:function(){return B},DRY_RUN_ACCOUNT:function(){return Or},DecodeError:function(){return $e},DelegationTag:function(){return Ol},DryRunError:function(){return Le},DuplicateContractError:function(){return ve},DuplicateNodeError:function(){return ke},Encoded:function(){return e},Encoding:function(){return ir},EntryTag:function(){return Ca},IllegalArgumentError:function(){return F},IllegalBidFeeError:function(){return Ge},InactiveContractError:function(){return be},InsufficientBalanceError:function(){return V},InsufficientNameFeeError:function(){return ae},InternalError:function(){return te},InvalidAensNameError:function(){return se},InvalidAuthDataError:function(){return we},InvalidChecksumError:function(){return Ie},InvalidMethodInvocationError:function(){return xe},InvalidRpcMessageError:function(){return oe},InvalidSignatureError:function(){return Fe},InvalidTxError:function(){return _l},LogicError:function(){return ee},MAX_AUTH_FUN_GAS:function(){return kr},MESSAGE_DIRECTION:function(){return Mp},METHODS:function(){return Op},MIN_GAS_PRICE:function(){return Br},MemoryAccount:function(){return fl},MerkleTreeHashMismatchError:function(){return Me},Middleware:function(){return hb},MiddlewarePageMissed:function(){return pb},MiddlewareSubscriber:function(){return dy},MiddlewareSubscriberDisconnected:function(){return oy},MiddlewareSubscriberError:function(){return sy},MissingCallbackError:function(){return ce},MissingContractAddressError:function(){return _e},MissingContractDefError:function(){return Te},MissingEventDefinitionError:function(){return Ee},MissingFunctionNameError:function(){return Ce},MissingNodeInTreeError:function(){return qe},MissingParamError:function(){return j},NAME_BID_RANGES:function(){return Fr},NAME_BID_TIMEOUT_BLOCKS:function(){return Lr},NAME_FEE_BID_INCREMENT:function(){return Ur},NAME_FEE_MULTIPLIER:function(){return $r},NAME_MAX_LENGTH_FEE:function(){return Gr},Name:function(){return Vl},NoSerializerFoundError:function(){return H},NoSuchContractFunctionError:function(){return Ae},NoWalletConnectedError:function(){return We},Node:function(){return nl},NodeError:function(){return $},NodeInvocationError:function(){return Se},NodeNotFoundError:function(){return Be},NotImplementedError:function(){return X},NotPayableFunctionError:function(){return Pe},ORACLE_TTL_TYPES:function(){return Sa},Oracle:function(){return cp},OracleClient:function(){return up},PayloadLengthError:function(){return Ue},PrefixNotFoundError:function(){return De},RPC_STATUS:function(){return kp},RequestTimedOutError:function(){return J},RpcConnectionDenyError:function(){return Fp},RpcConnectionError:function(){return Ye},RpcError:function(){return $p},RpcInternalError:function(){return jp},RpcInvalidTransactionError:function(){return Up},RpcMethodNotFoundError:function(){return Jp},RpcNoNetworkById:function(){return Hp},RpcNotAuthorizeError:function(){return Dp},RpcPermissionDenyError:function(){return Vp},RpcRejectedByUserError:function(){return Lp},RpcUnsupportedProtocolError:function(){return Gp},SUBSCRIPTION_TYPES:function(){return Rp},SchemaNotFoundError:function(){return Ve},Tag:function(){return Hr},TagNotFoundError:function(){return je},TransactionError:function(){return U},TxNotInChainError:function(){return He},TxTimedOutError:function(){return W},TypeError:function(){return Y},UnAuthorizedAccountError:function(){return ue},UnavailableAccountError:function(){return re},UnexpectedChannelMessageError:function(){return fe},UnexpectedTsError:function(){return ne},UnknownChannelStateError:function(){return ge},UnknownNodeLengthError:function(){return Re},UnknownPathNibbleError:function(){return Oe},UnknownRpcClientError:function(){return le},UnsubscribedAccountError:function(){return pe},UnsupportedPlatformError:function(){return K},UnsupportedProtocolError:function(){return Q},UnsupportedVersionError:function(){return Z},VmVersion:function(){return Vr},WALLET_TYPE:function(){return qp},WalletConnectorFrame:function(){return Sd},WalletConnectorFrameWithNode:function(){return zd},WalletError:function(){return L},_getPollInterval:function(){return ui},awaitHeight:function(){return mi},buildAuthTxHash:function(){return fp},buildAuthTxHashByGaMetaTx:function(){return yp},buildContractId:function(){return Wr},buildContractIdByContractTx:function(){return Ts},buildTx:function(){return vs},buildTxAsync:function(){return bs},buildTxHash:function(){return _s},commitmentHash:function(){return Zr},computeAuctionEndBlock:function(){return oi},computeBidFee:function(){return si},connectionProxy:function(){return fb},createGeneralizedAccount:function(){return hp},decode:function(){return vr},encode:function(){return br},encodeContractAddress:function(){return Ar},encodeUnsigned:function(){return Cr},ensureJwt:function(){return ql},ensureName:function(){return ti},formatAmount:function(){return Xe},genSalt:function(){return Tr},getAccount:function(){return fi},getBalance:function(){return yi},getContract:function(){return Si},getContractByteCode:function(){return Ci},getCurrentGeneration:function(){return gi},getDefaultPointerKey:function(){return ii},getExecutionCost:function(){return yl},getExecutionCostBySignedTx:function(){return gl},getExecutionCostUsingNode:function(){return wl},getGeneration:function(){return wi},getHeight:function(){return pi},getKeyBlock:function(){return vi},getMicroBlockHeader:function(){return bi},getMicroBlockTransactions:function(){return Ni},getMinimumNameFee:function(){return ai},getName:function(){return Ai},getTransactionSignerAddress:function(){return rl},hash:function(){return Sr},hashDomain:function(){return ul},hashJson:function(){return cl},hashTypedData:function(){return ll},isAddressValid:function(){return _r},isAuctionName:function(){return ci},isJwt:function(){return Ml},isNameValid:function(){return ni},messageToHash:function(){return Ir},oracleQueryId:function(){return Yr},packDelegation:function(){return Ll},packEntry:function(){return gs},payForTransaction:function(){return dp},poll:function(){return di},prefixedAmount:function(){return it},produceNameId:function(){return Xr},readInt:function(){return ei},resolveName:function(){return Pi},sendTransaction:function(){return Tl},signJwt:function(){return zl},spend:function(){return lp},toAe:function(){return Ze},toAettos:function(){return et},toBytes:function(){return Rr},transferFunds:function(){return pp},txDryRun:function(){return Ti},unpackDelegation:function(){return Gl},unpackEntry:function(){return ws},unpackJwt:function(){return Il},unpackTx:function(){return xs},verify:function(){return Pr},verifyJwt:function(){return Rl},verifyMessage:function(){return Mr},verifyTransaction:function(){return xl},waitForTxConfirm:function(){return hi},walletDetector:function(){return Cb}});var e={};n.r(e),n.d(e,{Encoding:function(){return ir}});var t={};n.r(t),n.d(t,{_getPollInterval:function(){return ui},awaitHeight:function(){return mi},getAccount:function(){return fi},getBalance:function(){return yi},getContract:function(){return Si},getContractByteCode:function(){return Ci},getCurrentGeneration:function(){return gi},getGeneration:function(){return wi},getHeight:function(){return pi},getKeyBlock:function(){return vi},getMicroBlockHeader:function(){return bi},getMicroBlockTransactions:function(){return Ni},getName:function(){return Ai},poll:function(){return di},resolveName:function(){return Pi},txDryRun:function(){return Ti},waitForTxConfirm:function(){return hi}});var i={};n.r(i),n.d(i,{Account:function(){return vo},AuctionEntry:function(){return Io},ByteCode:function(){return Ro},Channel:function(){return Mo},ChannelCloseMutualTx:function(){return hc},ChannelCloseSoloTx:function(){return fc},ChannelCreateTx:function(){return yc},ChannelDepositTx:function(){return gc},ChannelForceProgressTx:function(){return wc},ChannelSetDelegatesTx:function(){return Nc},ChannelSettleTx:function(){return vc},ChannelSlashTx:function(){return bc},ChannelSnapshotSoloTx:function(){return xc},ChannelWithdrawTx:function(){return _c},CheckTxInPoolResponse:function(){return Tc},CommitmentId:function(){return Cc},ContractCallObject:function(){return jo},ContractCallTx:function(){return Sc},ContractCreateTx:function(){return Ac},ContractObject:function(){return qo},CountResponse:function(){return Zo},CreateContractUnsignedTx:function(){return tu},Currency:function(){return ko},Delegates:function(){return So},DryRunAccount:function(){return Uo},DryRunCallContext:function(){return Fo},DryRunCallReq:function(){return Go},DryRunInput:function(){return $o},DryRunInputItem:function(){return Lo},DryRunResult:function(){return Vo},DryRunResults:function(){return Do},EncodedTx:function(){return lc},ErrorModel:function(){return bo},Event:function(){return Ho},GAAttachTx:function(){return Ec},GAMetaTx:function(){return zc},GAObject:function(){return mc},GasPricesItem:function(){return ac},Generation:function(){return Jo},HashResponse:function(){return Ko},Header:function(){return Yo},HeightResponse:function(){return Qo},Image:function(){return Bo},KeyBlock:function(){return Wo},MicroBlockHeader:function(){return Xo},NameClaimTx:function(){return Ic},NameEntry:function(){return ec},NameHash:function(){return Mc},NamePointer:function(){return zo},NamePreclaimTx:function(){return qc},NameRevokeTx:function(){return Rc},NameTransferTx:function(){return Oc},NameUpdateTx:function(){return kc},NextNonceResponse:function(){return xo},OffChainCallContract:function(){return Kc},OffChainDeposit:function(){return Qc},OffChainNewContract:function(){return Xc},OffChainTransfer:function(){return Zc},OffChainUpdate:function(){return Ao},OffChainWithdrawal:function(){return eu},OracleExtendTx:function(){return $c},OracleQueries:function(){return nc},OracleQuery:function(){return rc},OracleQueryTx:function(){return Uc},OracleRegisterTx:function(){return Lc},OracleRespondTx:function(){return Gc},PayingForTx:function(){return Fc},PeerConnections:function(){return cc},PeerCount:function(){return Dc},PeerCountAvailable:function(){return jc},PeerCountConnected:function(){return Vc},PeerDetails:function(){return Bc},PeerPubKey:function(){return ic},Peers:function(){return Hc},PoI:function(){return Oo},PostTxResponse:function(){return pc},Protocol:function(){return oc},PubKey:function(){return Jc},RegisteredOracle:function(){return tc},RelativeTTL:function(){return Po},SignedTx:function(){return To},SignedTxs:function(){return _o},SpendTx:function(){return Wc},Status:function(){return sc},SyncStatus:function(){return uc},TokenSupply:function(){return Yc},Ttl:function(){return Eo},Tx:function(){return Co},TxInfoObject:function(){return dc},UnsignedTx:function(){return Pc},discriminators:function(){return nu}});var a={};n.r(a),n.d(a,{payForTransaction:function(){return dp},spend:function(){return lp},transferFunds:function(){return pp}});var s={};n.r(s),n.d(s,{buildAuthTxHash:function(){return fp},buildAuthTxHashByGaMetaTx:function(){return yp},createGeneralizedAccount:function(){return hp}});var o={};n.r(o),n.d(o,{ApiVersion:function(){return Oh},ByteCodeInput:function(){return Ih},BytecodeCallResultInput:function(){return _h},Calldata:function(){return Sh},CompileOpts:function(){return wh},CompileResult:function(){return bh},CompilerError:function(){return Nh},CompilerVersion:function(){return Rh},Contract:function(){return gh},DecodeCalldataBytecode:function(){return Ah},DecodeCalldataSource:function(){return zh},DecodedCalldata:function(){return Ph},DecodedCallresult:function(){return Th},ErrorModel:function(){return Eh},ErrorPos:function(){return vh},FateAssembler:function(){return Mh},FunctionCallInput:function(){return Ch},SophiaBinaryData:function(){return kh},SophiaCallResultInput:function(){return xh},SophiaJsonData:function(){return Bh},ValidateByteCodeInput:function(){return qh}});var c={};n.r(c),n.d(c,{appendSignature:function(){return Af},awaitingChannelCreateTx:function(){return Rf},awaitingCompletion:function(){return zf},awaitingConnection:function(){return If},awaitingLeave:function(){return Lf},awaitingOnChainTx:function(){return Of},awaitingReconnection:function(){return qf},awaitingReestablish:function(){return Mf},awaitingShutdownTx:function(){return Uf},channelClosed:function(){return Gf},channelOpen:function(){return Bf},handleUnexpectedMessage:function(){return Ef},signAndNotify:function(){return Pf}});var u={};n.r(u),n.d(u,{Activity:function(){return dg},ActivityPayload:function(){return mg},Aex141Response:function(){return jg},Aex141TemplateTokensResponse:function(){return Yg},Aex141TemplatesResponse:function(){return Jg},Aex141TokenResponse:function(){return rg},Aex141TransferEvent:function(){return Zg},Aex9BalanceResponse:function(){return og},Aex9ContractBalanceResponse:function(){return iw},Aex9Response:function(){return tw},Aex9TransferEvent:function(){return hN},Aex9TransferResponse:function(){return fN},Auction:function(){return Cw},AuctionLastBid:function(){return Sw},Channel:function(){return uw},Contract:function(){return hw},ContractCall:function(){return pw},ContractLog:function(){return mw},DeltaStat:function(){return nN},DexSwap:function(){return ug},DexSwapAmounts:function(){return lg},ErrorResponse:function(){return ag},Get200ApplicationJsonAllOfPropertiesItemsItem:function(){return ow},Get200ApplicationJsonProperties:function(){return wg},InternalContractCallEvent:function(){return yN},InternalTransferEvent:function(){return gN},KeyBlock:function(){return ww},MicroBlock:function(){return vw},Miner:function(){return iN},Name:function(){return Tw},NameClaim:function(){return Mw},NameClaimEvent:function(){return wN},NameOwnership:function(){return Aw},NameTransfer:function(){return Ow},NameTx:function(){return Pw},NameTxTx:function(){return Ew},NameUpdate:function(){return Bw},NotFoundResponse:function(){return yg},Oracle:function(){return Uw},OracleExtend:function(){return jw},OracleExtendTx:function(){return Hw},OracleExtendTxOracleTtl:function(){return Jw},OracleFormat:function(){return Lw},OracleQuery:function(){return Yw},OracleResponse:function(){return Kw},OracleTx:function(){return Gw},OracleTxOracleTtl:function(){return Dw},OracleTxTx:function(){return Fw},PaginatedResponse:function(){return ig},Paths107D9HzV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx:function(){return $g},Paths108B3VtV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchemaAllof1:function(){return sw},Paths10Kk1UxV3ContractsLogsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return dw},Paths10OmbqhV3MinerstatsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return rN},Paths10T1AqyV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx:function(){return Ag},Paths1159W94V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchema:function(){return $N},Paths12S1Nd4V3NamesGetResponses200ContentApplicationJsonSchema:function(){return LN},Paths139X1XaV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx:function(){return Rg},Paths13Ss1Q2V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx:function(){return Tg},Paths150Ou6YV3StatisticsTransactionsGetResponses200ContentApplicationJsonSchema:function(){return ev},Paths15Bkk50V3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchema:function(){return UN},Paths15Mi2TaV3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchema:function(){return SN},Paths16B89KuV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx:function(){return Fg},Paths181AjwxV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchema:function(){return CN},Paths181Cs9V3NamesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return _w},Paths184Oz8CV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx:function(){return Lg},Paths18L84JcV3ContractsCallsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return lw},Paths19IxhsmV3Aex9CountGetResponses200ContentApplicationJsonSchema:function(){return nw},Paths1A8Ah39V3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Xg},Paths1Ceolv9V3AccountsAccountIdDexSwapsGetResponses200ContentApplicationJsonSchema:function(){return bN},Paths1Cnk4LbV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx:function(){return _g},Paths1Di8FnjV3DexSwapsGetResponses200ContentApplicationJsonSchema:function(){return ON},Paths1E14NekV3OraclesGetResponses200ContentApplicationJsonSchema:function(){return jN},Paths1Ec8CltV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchema:function(){return VN},Paths1Ent1R1V3AccountsIdActivitiesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return pg},Paths1F98AqgV3NamesIdClaimsGetResponses200ContentApplicationJsonSchema:function(){return FN},Paths1Fbvaw8V3Aex141ContractidTokensTokenidGetResponses200ContentApplicationJsonSchema:function(){return Qg},Paths1Gc4HwtV3AccountsIdNamesPointeesGetResponses200ContentApplicationJsonSchema:function(){return _N},Paths1Gime4MV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx:function(){return Cg},Paths1Hacjy0V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx:function(){return qg},Paths1L5C64RV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchema:function(){return HN},Paths1Ljyzq7V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx:function(){return Dg},Paths1N61UurV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchema:function(){return zN},Paths1O7Q6IhV3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchema:function(){return PN},Paths1Opead5V3AccountsIdActivitiesGetResponses200ContentApplicationJsonSchema:function(){return xN},Paths1Pymq07V3TransactionsGetResponses200ContentApplicationJsonSchema:function(){return tv},Paths1Q9E32FV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return ng},Paths1R08F8HV3NamesAuctionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return zw},Paths1R3Fb8MV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx:function(){return Og},Paths1Raw8PV3NamesIdTransfersGetResponses200ContentApplicationJsonSchema:function(){return DN},Paths1RkuxepV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx:function(){return Ig},Paths1Syc8AnV3StatisticsTransactionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return cN},Paths1Tcj5A9V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Qw},Paths1TkisghV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Kg},Paths1Txblx8V3ContractsCallsGetResponses200ContentApplicationJsonSchema:function(){return qN},Paths1Ukwk06V3NamesIdTransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Rw},Paths1Uni7AtV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Ww},Paths1Uqqby0V3Aex9GetResponses200ContentApplicationJsonSchemaAllof0:function(){return ew},Paths1Uybd4PV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchema:function(){return IN},Paths1VkyqhtV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx:function(){return Bg},Paths1Vms155V3TotalstatsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return sN},Paths1Vr3Y2EV3Aex9GetResponses200ContentApplicationJsonSchema:function(){return EN},Paths1W3C1Z4V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx:function(){return vg},Paths1XwlyjtV3Aex141GetResponses200ContentApplicationJsonSchema:function(){return TN},Paths1Ymnu9GV3AccountsAccountIdDexSwapsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return cg},Paths277OngV3KeyBlocksGetResponses200ContentApplicationJsonSchema:function(){return BN},Paths3EzhapV3ChannelsGetResponses200ContentApplicationJsonSchema:function(){return MN},Paths3Hsv3GV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchema:function(){return NN},Paths5Shu25V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesContractCreateTx:function(){return zg},Paths6Vze8ZV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return yw},Paths7A1M6RV3ContractsLogsGetResponses200ContentApplicationJsonSchema:function(){return RN},Paths8722JhV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchema:function(){return JN},Paths8I0YgwV3Aex141GetResponses200ContentApplicationJsonSchemaAllof0:function(){return Vg},Paths9Yfxl2V3DexSwapsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return fw},PathsA7P0KiV3TransfersGetResponses200ContentApplicationJsonSchema:function(){return nv},PathsAc89GqV3StatisticsNamesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return aN},PathsC0UvfgV3AccountsIdNamesPointeesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return hg},PathsChduayV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx:function(){return Eg},PathsCrb9BgV3NamesAuctionsIdClaimsGetResponses200ContentApplicationJsonSchema:function(){return Iw},PathsD2HmjxV3StatisticsNamesGetResponses200ContentApplicationJsonSchema:function(){return XN},PathsEeiffwV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return rw},PathsEue6HzV3KeyBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return gw},PathsFrvc1LV3TotalstatsGetResponses200ContentApplicationJsonSchema:function(){return ZN},PathsGcr9MrV3OraclesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return $w},PathsHa9C78V3TransactionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return pN},PathsJd68YV3StatisticsBlocksGetResponses200ContentApplicationJsonSchema:function(){return YN},PathsKcpsuzV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx:function(){return Ng},PathsKjq4D4V3NamesAuctionsGetResponses200ContentApplicationJsonSchema:function(){return GN},PathsKm52GqV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchema:function(){return vN},PathsKr825V3Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchema:function(){return aw},PathsKwxlzlV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchema:function(){return kN},PathsLm5DjtV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx:function(){return Gg},PathsLv15NfV3TransactionsCountIdGetResponses200ContentApplicationJsonSchema:function(){return gg},PathsMxcme6V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx:function(){return xg},PathsMyl4W2V3NamesIdClaimsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return qw},PathsNn60D7V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Nw},PathsQklaaxV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx:function(){return Mg},PathsQmewnaV3ChannelsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return cw},PathsQtodvgV3DeltastatsGetResponses200ContentApplicationJsonSchema:function(){return KN},PathsRay4X0V3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Wg},PathsRcnvllV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return kw},PathsS6Nx2KV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx:function(){return Ug},PathsTr523PV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx:function(){return Pg},PathsTvtzmvV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx:function(){return bg},PathsV2Gh3TV3StatisticsBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Zw},PathsVdg67V3TransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return dN},PathsVn5L1LV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx:function(){return Sg},PathsVron83V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchema:function(){return WN},PathsWkpcwaV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Hg},PathsWl652MV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchema:function(){return AN},PathsXhlqwrV3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return bw},PathsYpljbvV3DeltastatsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return tN},PathsZ2B507V3MinerstatsGetResponses200ContentApplicationJsonSchema:function(){return QN},PathsZ4L2QlV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Vw},PathsZ92TkfV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchemaAllof1:function(){return sg},PathsZdcclfV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx:function(){return kg},Pointee:function(){return fg},Stat:function(){return eN},Stats:function(){return Xw},Status:function(){return uN},StatusMdwAsyncTasks:function(){return lN},TotalStat:function(){return oN},Transaction:function(){return xw},Transfer:function(){return mN}});var l=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,p=Math.ceil,d=Math.floor,m="[BigNumber Error] ",h=m+"Number primitive has more than 15 significant digits: ",f=1e14,y=14,g=9007199254740991,w=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],N=1e7,v=1e9;function b(e){var t=0|e;return e>0||e===t?t:t-1}function x(e){for(var t,n,r=1,i=e.length,a=e[0]+"";r<i;){for(t=e[r++]+"",n=y-t.length;n--;t="0"+t);a+=t}for(i=a.length;48===a.charCodeAt(--i););return a.slice(0,i+1||1)}function _(e,t){var n,r,i=e.c,a=t.c,s=e.s,o=t.s,c=e.e,u=t.e;if(!s||!o)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-o:s;if(s!=o)return s;if(n=s<0,r=c==u,!i||!a)return r?0:!i^n?1:-1;if(!r)return c>u^n?1:-1;for(o=(c=i.length)<(u=a.length)?c:u,s=0;s<o;s++)if(i[s]!=a[s])return i[s]>a[s]^n?1:-1;return c==u?0:c>u^n?1:-1}function T(e,t,n,r){if(e<t||e>n||e!==d(e))throw Error(m+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function C(e){var t=e.c.length-1;return b(e.e/y)==t&&e.c[t]%2!=0}function S(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function A(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}var P=function e(t){var n,r,i,a,s,o,c,u,P,E,z=V.prototype={constructor:V,toString:null,valueOf:null},I=new V(1),M=20,q=4,R=-7,O=21,k=-1e7,B=1e7,$=!1,U=1,L=0,G={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},F="0123456789abcdefghijklmnopqrstuvwxyz",D=!0;function V(e,t){var n,a,s,o,c,u,p,m,f=this;if(!(f instanceof V))return new V(e,t);if(null==t){if(e&&!0===e._isBigNumber)return f.s=e.s,void(!e.c||e.e>B?f.c=f.e=null:e.e<k?f.c=[f.e=0]:(f.e=e.e,f.c=e.c.slice()));if((u="number"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(o=0,c=e;c>=10;c/=10,o++);return void(o>B?f.c=f.e=null:(f.e=o,f.c=[e]))}m=String(e)}else{if(!l.test(m=String(e)))return i(f,m,u);f.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(o=m.indexOf("."))>-1&&(m=m.replace(".","")),(c=m.search(/e/i))>0?(o<0&&(o=c),o+=+m.slice(c+1),m=m.substring(0,c)):o<0&&(o=m.length)}else{if(T(t,2,F.length,"Base"),10==t&&D)return W(f=new V(e),M+f.e+1,q);if(m=String(e),u="number"==typeof e){if(0*e!=0)return i(f,m,u,t);if(f.s=1/e<0?(m=m.slice(1),-1):1,V.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(h+e)}else f.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(n=F.slice(0,t),o=c=0,p=m.length;c<p;c++)if(n.indexOf(a=m.charAt(c))<0){if("."==a){if(c>o){o=p;continue}}else if(!s&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){s=!0,c=-1,o=0;continue}return i(f,String(e),u,t)}u=!1,(o=(m=r(m,t,10,f.s)).indexOf("."))>-1?m=m.replace(".",""):o=m.length}for(c=0;48===m.charCodeAt(c);c++);for(p=m.length;48===m.charCodeAt(--p););if(m=m.slice(c,++p)){if(p-=c,u&&V.DEBUG&&p>15&&(e>g||e!==d(e)))throw Error(h+f.s*e);if((o=o-c-1)>B)f.c=f.e=null;else if(o<k)f.c=[f.e=0];else{if(f.e=o,f.c=[],c=(o+1)%y,o<0&&(c+=y),c<p){for(c&&f.c.push(+m.slice(0,c)),p-=y;c<p;)f.c.push(+m.slice(c,c+=y));c=y-(m=m.slice(c)).length}else c-=p;for(;c--;m+="0");f.c.push(+m)}}else f.c=[f.e=0]}function j(e,t,n,r){var i,a,s,o,c;if(null==n?n=q:T(n,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)c=x(e.c),c=1==r||2==r&&(s<=R||s>=O)?S(c,s):A(c,s,"0");else if(a=(e=W(new V(e),t,n)).e,o=(c=x(e.c)).length,1==r||2==r&&(t<=a||a<=R)){for(;o<t;c+="0",o++);c=S(c,a)}else if(t-=s,c=A(c,a,"0"),a+1>o){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=a-o)>0)for(a+1==o&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function H(e,t){for(var n,r,i=1,a=new V(e[0]);i<e.length;i++)(!(r=new V(e[i])).s||(n=_(a,r))===t||0===n&&a.s===t)&&(a=r);return a}function J(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*y-1)>B?e.c=e.e=null:n<k?e.c=[e.e=0]:(e.e=n,e.c=t),e}function W(e,t,n,r){var i,a,s,o,c,u,l,m=e.c,h=w;if(m){e:{for(i=1,o=m[0];o>=10;o/=10,i++);if((a=t-i)<0)a+=y,s=t,c=m[u=0],l=d(c/h[i-s-1]%10);else if((u=p((a+1)/y))>=m.length){if(!r)break e;for(;m.length<=u;m.push(0));c=l=0,i=1,s=(a%=y)-y+1}else{for(c=o=m[u],i=1;o>=10;o/=10,i++);l=(s=(a%=y)-y+i)<0?0:d(c/h[i-s-1]%10)}if(r=r||t<0||null!=m[u+1]||(s<0?c:c%h[i-s-1]),r=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(a>0?s>0?c/h[i-s]:0:m[u-1])%10&1||n==(e.s<0?8:7)),t<1||!m[0])return m.length=0,r?(t-=e.e+1,m[0]=h[(y-t%y)%y],e.e=-t||0):m[0]=e.e=0,e;if(0==a?(m.length=u,o=1,u--):(m.length=u+1,o=h[y-a],m[u]=s>0?d(c/h[i-s]%h[s])*o:0),r)for(;;){if(0==u){for(a=1,s=m[0];s>=10;s/=10,a++);for(s=m[0]+=o,o=1;s>=10;s/=10,o++);a!=o&&(e.e++,m[0]==f&&(m[0]=1));break}if(m[u]+=o,m[u]!=f)break;m[u--]=0,o=1}for(a=m.length;0===m[--a];m.pop());}e.e>B?e.c=e.e=null:e.e<k&&(e.c=[e.e=0])}return e}function Y(e){var t,n=e.e;return null===n?e.toString():(t=x(e.c),t=n<=R||n>=O?S(t,n):A(t,n,"0"),e.s<0?"-"+t:t)}return V.clone=e,V.ROUND_UP=0,V.ROUND_DOWN=1,V.ROUND_CEIL=2,V.ROUND_FLOOR=3,V.ROUND_HALF_UP=4,V.ROUND_HALF_DOWN=5,V.ROUND_HALF_EVEN=6,V.ROUND_HALF_CEIL=7,V.ROUND_HALF_FLOOR=8,V.EUCLID=9,V.config=V.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(m+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(T(n=e[t],0,v,t),M=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(T(n=e[t],0,8,t),q=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(T(n[0],-v,0,t),T(n[1],0,v,t),R=n[0],O=n[1]):(T(n,-v,v,t),R=-(O=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)T(n[0],-v,-1,t),T(n[1],1,v,t),k=n[0],B=n[1];else{if(T(n,-v,v,t),!n)throw Error(m+t+" cannot be zero: "+n);k=-(B=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(m+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw $=!n,Error(m+"crypto unavailable");$=n}else $=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(T(n=e[t],0,9,t),U=n),e.hasOwnProperty(t="POW_PRECISION")&&(T(n=e[t],0,v,t),L=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(m+t+" not an object: "+n);G=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(m+t+" invalid: "+n);D="0123456789"==n.slice(0,10),F=n}}return{DECIMAL_PLACES:M,ROUNDING_MODE:q,EXPONENTIAL_AT:[R,O],RANGE:[k,B],CRYPTO:$,MODULO_MODE:U,POW_PRECISION:L,FORMAT:G,ALPHABET:F}},V.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!V.DEBUG)return!0;var t,n,r=e.c,i=e.e,a=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===a||-1===a)&&i>=-v&&i<=v&&i===d(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if((t=(i+1)%y)<1&&(t+=y),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=f||n!==d(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===a||1===a||-1===a))return!0;throw Error(m+"Invalid BigNumber: "+e)},V.maximum=V.max=function(){return H(arguments,-1)},V.minimum=V.min=function(){return H(arguments,1)},V.random=(a=9007199254740992,s=Math.random()*a&2097151?function(){return d(Math.random()*a)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,i,a,o=0,c=[],u=new V(I);if(null==e?e=M:T(e,0,v),i=p(e/y),$)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));o<i;)(a=131072*t[o]+(t[o+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[o]=n[0],t[o+1]=n[1]):(c.push(a%1e14),o+=2);o=i/2}else{if(!crypto.randomBytes)throw $=!1,Error(m+"crypto unavailable");for(t=crypto.randomBytes(i*=7);o<i;)(a=281474976710656*(31&t[o])+1099511627776*t[o+1]+4294967296*t[o+2]+16777216*t[o+3]+(t[o+4]<<16)+(t[o+5]<<8)+t[o+6])>=9e15?crypto.randomBytes(7).copy(t,o):(c.push(a%1e14),o+=7);o=i/7}if(!$)for(;o<i;)(a=s())<9e15&&(c[o++]=a%1e14);for(i=c[--o],e%=y,i&&e&&(a=w[y-e],c[o]=d(i/a)*a);0===c[o];c.pop(),o--);if(o<0)c=[r=0];else{for(r=-1;0===c[0];c.splice(0,1),r-=y);for(o=1,a=c[0];a>=10;a/=10,o++);o<y&&(r-=y-o)}return u.e=r,u.c=c,u}),V.sum=function(){for(var e=1,t=arguments,n=new V(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){var e="0123456789";function t(e,t,n,r){for(var i,a,s=[0],o=0,c=e.length;o<c;){for(a=s.length;a--;s[a]*=t);for(s[0]+=r.indexOf(e.charAt(o++)),i=0;i<s.length;i++)s[i]>n-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/n|0,s[i]%=n)}return s.reverse()}return function(r,i,a,s,o){var c,u,l,p,d,m,h,f,y=r.indexOf("."),g=M,w=q;for(y>=0&&(p=L,L=0,r=r.replace(".",""),m=(f=new V(i)).pow(r.length-y),L=p,f.c=t(A(x(m.c),m.e,"0"),10,a,e),f.e=f.c.length),l=p=(h=t(r,i,a,o?(c=F,e):(c=e,F))).length;0==h[--p];h.pop());if(!h[0])return c.charAt(0);if(y<0?--l:(m.c=h,m.e=l,m.s=s,h=(m=n(m,f,g,w,a)).c,d=m.r,l=m.e),y=h[u=l+g+1],p=a/2,d=d||u<0||null!=h[u+1],d=w<4?(null!=y||d)&&(0==w||w==(m.s<0?3:2)):y>p||y==p&&(4==w||d||6==w&&1&h[u-1]||w==(m.s<0?8:7)),u<1||!h[0])r=d?A(c.charAt(1),-g,c.charAt(0)):c.charAt(0);else{if(h.length=u,d)for(--a;++h[--u]>a;)h[u]=0,u||(++l,h=[1].concat(h));for(p=h.length;!h[--p];);for(y=0,r="";y<=p;r+=c.charAt(h[y++]));r=A(r,l,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,a,s,o=0,c=e.length,u=t%N,l=t/N|0;for(e=e.slice();c--;)o=((i=u*(a=e[c]%N)+(r=l*a+(s=e[c]/N|0)*u)%N*N+o)/n|0)+(r/N|0)+l*s,e[c]=i%n;return o&&(e=[o].concat(e)),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,a,s,o){var c,u,l,p,m,h,g,w,N,v,x,_,T,C,S,A,P,E=r.s==i.s?1:-1,z=r.c,I=i.c;if(!(z&&z[0]&&I&&I[0]))return new V(r.s&&i.s&&(z?!I||z[0]!=I[0]:I)?z&&0==z[0]||!I?0*E:E/0:NaN);for(N=(w=new V(E)).c=[],E=a+(u=r.e-i.e)+1,o||(o=f,u=b(r.e/y)-b(i.e/y),E=E/y|0),l=0;I[l]==(z[l]||0);l++);if(I[l]>(z[l]||0)&&u--,E<0)N.push(1),p=!0;else{for(C=z.length,A=I.length,l=0,E+=2,(m=d(o/(I[0]+1)))>1&&(I=e(I,m,o),z=e(z,m,o),A=I.length,C=z.length),T=A,x=(v=z.slice(0,A)).length;x<A;v[x++]=0);P=I.slice(),P=[0].concat(P),S=I[0],I[1]>=o/2&&S++;do{if(m=0,(c=t(I,v,A,x))<0){if(_=v[0],A!=x&&(_=_*o+(v[1]||0)),(m=d(_/S))>1)for(m>=o&&(m=o-1),g=(h=e(I,m,o)).length,x=v.length;1==t(h,v,g,x);)m--,n(h,A<g?P:I,g,o),g=h.length,c=1;else 0==m&&(c=m=1),g=(h=I.slice()).length;if(g<x&&(h=[0].concat(h)),n(v,h,x,o),x=v.length,-1==c)for(;t(I,v,A,x)<1;)m++,n(v,A<x?P:I,x,o),x=v.length}else 0===c&&(m++,v=[0]);N[l++]=m,v[0]?v[x++]=z[T]||0:(v=[z[T]],x=1)}while((T++<C||null!=v[0])&&E--);p=null!=v[0],N[0]||N.splice(0,1)}if(o==f){for(l=1,E=N[0];E>=10;E/=10,l++);W(w,a+(w.e=l+u*y-1)+1,s,p)}else w.e=u,w.r=+p;return w}}(),o=/^(-?)0([xbo])(?=\w[\w.]*$)/i,c=/^([^.]+)\.$/,u=/^\.([^.]+)$/,P=/^-?(Infinity|NaN)$/,E=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,n,r){var i,a=n?t:t.replace(E,"");if(P.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!n&&(a=a.replace(o,(function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t})),r&&(i=r,a=a.replace(c,"$1").replace(u,"0.$1")),t!=a))return new V(a,i);if(V.DEBUG)throw Error(m+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},z.absoluteValue=z.abs=function(){var e=new V(this);return e.s<0&&(e.s=1),e},z.comparedTo=function(e,t){return _(this,new V(e,t))},z.decimalPlaces=z.dp=function(e,t){var n,r,i,a=this;if(null!=e)return T(e,0,v),null==t?t=q:T(t,0,8),W(new V(a),e+a.e+1,t);if(!(n=a.c))return null;if(r=((i=n.length-1)-b(this.e/y))*y,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},z.dividedBy=z.div=function(e,t){return n(this,new V(e,t),M,q)},z.dividedToIntegerBy=z.idiv=function(e,t){return n(this,new V(e,t),0,1)},z.exponentiatedBy=z.pow=function(e,t){var n,r,i,a,s,o,c,u,l=this;if((e=new V(e)).c&&!e.isInteger())throw Error(m+"Exponent not an integer: "+Y(e));if(null!=t&&(t=new V(t)),s=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return u=new V(Math.pow(+Y(l),s?e.s*(2-C(e)):+Y(e))),t?u.mod(t):u;if(o=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new V(NaN);(r=!o&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||s&&l.c[1]>=24e7:l.c[0]<8e13||s&&l.c[0]<=9999975e7)))return a=l.s<0&&C(e)?-0:0,l.e>-1&&(a=1/a),new V(o?1/a:a);L&&(a=p(L/y+2))}for(s?(n=new V(.5),o&&(e.s=1),c=C(e)):c=(i=Math.abs(+Y(e)))%2,u=new V(I);;){if(c){if(!(u=u.times(l)).c)break;a?u.c.length>a&&(u.c.length=a):r&&(u=u.mod(t))}if(i){if(0===(i=d(i/2)))break;c=i%2}else if(W(e=e.times(n),e.e+1,1),e.e>14)c=C(e);else{if(0==(i=+Y(e)))break;c=i%2}l=l.times(l),a?l.c&&l.c.length>a&&(l.c.length=a):r&&(l=l.mod(t))}return r?u:(o&&(u=I.div(u)),t?u.mod(t):a?W(u,L,q,void 0):u)},z.integerValue=function(e){var t=new V(this);return null==e?e=q:T(e,0,8),W(t,t.e+1,e)},z.isEqualTo=z.eq=function(e,t){return 0===_(this,new V(e,t))},z.isFinite=function(){return!!this.c},z.isGreaterThan=z.gt=function(e,t){return _(this,new V(e,t))>0},z.isGreaterThanOrEqualTo=z.gte=function(e,t){return 1===(t=_(this,new V(e,t)))||0===t},z.isInteger=function(){return!!this.c&&b(this.e/y)>this.c.length-2},z.isLessThan=z.lt=function(e,t){return _(this,new V(e,t))<0},z.isLessThanOrEqualTo=z.lte=function(e,t){return-1===(t=_(this,new V(e,t)))||0===t},z.isNaN=function(){return!this.s},z.isNegative=function(){return this.s<0},z.isPositive=function(){return this.s>0},z.isZero=function(){return!!this.c&&0==this.c[0]},z.minus=function(e,t){var n,r,i,a,s=this,o=s.s;if(t=(e=new V(e,t)).s,!o||!t)return new V(NaN);if(o!=t)return e.s=-t,s.plus(e);var c=s.e/y,u=e.e/y,l=s.c,p=e.c;if(!c||!u){if(!l||!p)return l?(e.s=-t,e):new V(p?s:NaN);if(!l[0]||!p[0])return p[0]?(e.s=-t,e):new V(l[0]?s:3==q?-0:0)}if(c=b(c),u=b(u),l=l.slice(),o=c-u){for((a=o<0)?(o=-o,i=l):(u=c,i=p),i.reverse(),t=o;t--;i.push(0));i.reverse()}else for(r=(a=(o=l.length)<(t=p.length))?o:t,o=t=0;t<r;t++)if(l[t]!=p[t]){a=l[t]<p[t];break}if(a&&(i=l,l=p,p=i,e.s=-e.s),(t=(r=p.length)-(n=l.length))>0)for(;t--;l[n++]=0);for(t=f-1;r>o;){if(l[--r]<p[r]){for(n=r;n&&!l[--n];l[n]=t);--l[n],l[r]+=f}l[r]-=p[r]}for(;0==l[0];l.splice(0,1),--u);return l[0]?J(e,l,u):(e.s=3==q?-1:1,e.c=[e.e=0],e)},z.modulo=z.mod=function(e,t){var r,i,a=this;return e=new V(e,t),!a.c||!e.s||e.c&&!e.c[0]?new V(NaN):!e.c||a.c&&!a.c[0]?new V(a):(9==U?(i=e.s,e.s=1,r=n(a,e,0,3),e.s=i,r.s*=i):r=n(a,e,0,U),(e=a.minus(r.times(e))).c[0]||1!=U||(e.s=a.s),e)},z.multipliedBy=z.times=function(e,t){var n,r,i,a,s,o,c,u,l,p,d,m,h,g,w,v=this,x=v.c,_=(e=new V(e,t)).c;if(!(x&&_&&x[0]&&_[0]))return!v.s||!e.s||x&&!x[0]&&!_||_&&!_[0]&&!x?e.c=e.e=e.s=null:(e.s*=v.s,x&&_?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=b(v.e/y)+b(e.e/y),e.s*=v.s,(c=x.length)<(p=_.length)&&(h=x,x=_,_=h,i=c,c=p,p=i),i=c+p,h=[];i--;h.push(0));for(g=f,w=N,i=p;--i>=0;){for(n=0,d=_[i]%w,m=_[i]/w|0,a=i+(s=c);a>i;)n=((u=d*(u=x[--s]%w)+(o=m*u+(l=x[s]/w|0)*d)%w*w+h[a]+n)/g|0)+(o/w|0)+m*l,h[a--]=u%g;h[a]=n}return n?++r:h.splice(0,1),J(e,h,r)},z.negated=function(){var e=new V(this);return e.s=-e.s||null,e},z.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new V(e,t)).s,!i||!t)return new V(NaN);if(i!=t)return e.s=-t,r.minus(e);var a=r.e/y,s=e.e/y,o=r.c,c=e.c;if(!a||!s){if(!o||!c)return new V(i/0);if(!o[0]||!c[0])return c[0]?e:new V(o[0]?r:0*i)}if(a=b(a),s=b(s),o=o.slice(),i=a-s){for(i>0?(s=a,n=c):(i=-i,n=o),n.reverse();i--;n.push(0));n.reverse()}for((i=o.length)-(t=c.length)<0&&(n=c,c=o,o=n,t=i),i=0;t;)i=(o[--t]=o[t]+c[t]+i)/f|0,o[t]=f===o[t]?0:o[t]%f;return i&&(o=[i].concat(o),++s),J(e,o,s)},z.precision=z.sd=function(e,t){var n,r,i,a=this;if(null!=e&&e!==!!e)return T(e,1,v),null==t?t=q:T(t,0,8),W(new V(a),e,t);if(!(n=a.c))return null;if(r=(i=n.length-1)*y+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&a.e+1>r&&(r=a.e+1),r},z.shiftedBy=function(e){return T(e,-9007199254740991,g),this.times("1e"+e)},z.squareRoot=z.sqrt=function(){var e,t,r,i,a,s=this,o=s.c,c=s.s,u=s.e,l=M+4,p=new V("0.5");if(1!==c||!o||!o[0])return new V(!c||c<0&&(!o||o[0])?NaN:o?s:1/0);if(0==(c=Math.sqrt(+Y(s)))||c==1/0?(((t=x(o)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=b((u+1)/2)-(u<0||u%2),r=new V(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new V(c+""),r.c[0])for((c=(u=r.e)+l)<3&&(c=0);;)if(a=r,r=p.times(a.plus(n(s,a,l,1))),x(a.c).slice(0,c)===(t=x(r.c)).slice(0,c)){if(r.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(W(r,r.e+M+2,1),e=!r.times(r).eq(s));break}if(!i&&(W(a,a.e+M+2,0),a.times(a).eq(s))){r=a;break}l+=4,c+=4,i=1}return W(r,r.e+M+1,q,e)},z.toExponential=function(e,t){return null!=e&&(T(e,0,v),e++),j(this,e,t,1)},z.toFixed=function(e,t){return null!=e&&(T(e,0,v),e=e+this.e+1),j(this,e,t)},z.toFormat=function(e,t,n){var r,i=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=G;else if("object"!=typeof n)throw Error(m+"Argument not an object: "+n);if(r=i.toFixed(e,t),i.c){var a,s=r.split("."),o=+n.groupSize,c=+n.secondaryGroupSize,u=n.groupSeparator||"",l=s[0],p=s[1],d=i.s<0,h=d?l.slice(1):l,f=h.length;if(c&&(a=o,o=c,c=a,f-=a),o>0&&f>0){for(a=f%o||o,l=h.substr(0,a);a<f;a+=o)l+=u+h.substr(a,o);c>0&&(l+=u+h.slice(a)),d&&(l="-"+l)}r=p?l+(n.decimalSeparator||"")+((c=+n.fractionGroupSize)?p.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):p):l}return(n.prefix||"")+r+(n.suffix||"")},z.toFraction=function(e){var t,r,i,a,s,o,c,u,l,p,d,h,f=this,g=f.c;if(null!=e&&(!(c=new V(e)).isInteger()&&(c.c||1!==c.s)||c.lt(I)))throw Error(m+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+Y(c));if(!g)return new V(f);for(t=new V(I),l=r=new V(I),i=u=new V(I),h=x(g),s=t.e=h.length-f.e-1,t.c[0]=w[(o=s%y)<0?y+o:o],e=!e||c.comparedTo(t)>0?s>0?t:l:c,o=B,B=1/0,c=new V(h),u.c[0]=0;p=n(c,t,0,1),1!=(a=r.plus(p.times(i))).comparedTo(e);)r=i,i=a,l=u.plus(p.times(a=l)),u=a,t=c.minus(p.times(a=t)),c=a;return a=n(e.minus(r),i,0,1),u=u.plus(a.times(l)),r=r.plus(a.times(i)),u.s=l.s=f.s,d=n(l,i,s*=2,q).minus(f).abs().comparedTo(n(u,r,s,q).minus(f).abs())<1?[l,i]:[u,r],B=o,d},z.toNumber=function(){return+Y(this)},z.toPrecision=function(e,t){return null!=e&&T(e,1,v),j(this,e,t,2)},z.toString=function(e){var t,n=this,i=n.s,a=n.e;return null===a?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=a<=R||a>=O?S(x(n.c),a):A(x(n.c),a,"0"):10===e&&D?t=A(x((n=W(new V(n),M+a+1,q)).c),n.e,"0"):(T(e,2,F.length,"Base"),t=r(A(x(n.c),a,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},z.valueOf=z.toJSON=function(){return Y(this)},z._isBigNumber=!0,z[Symbol.toStringTag]="BigNumber",z[Symbol.for("nodejs.util.inspect.custom")]=z.valueOf,null!=t&&V.set(t),V}();const E=e=>e.integerValue(P.ROUND_CEIL);class z extends Error{constructor(e){super(e),this.name="BaseError"}}class I extends z{constructor(e){super(e),this.name="AccountError"}}class M extends z{constructor(e){super(e),this.name="AensError"}}class q extends z{constructor(e){super(e),this.name="AeppError"}}class R extends z{constructor(e){super(e),this.name="ChannelError"}}class O extends z{constructor(e){super(e),this.name="CompilerError"}}class k extends z{constructor(e){super(e),this.name="ContractError"}}class B extends z{constructor(e){super(e),this.name="CryptographyError"}}class $ extends z{constructor(e){super(e),this.name="NodeError"}}class U extends z{constructor(e){super(e),this.name="TransactionError"}}class L extends z{constructor(e){super(e),this.name="WalletError"}}class G extends z{constructor(e,t,n){super(`${e} should be ${t}, got ${n} instead`),this.name="ArgumentError"}}class F extends B{constructor(e){super(e),this.name="IllegalArgumentError"}}class D extends z{constructor(e,t,n){super(`${e} expects ${t} arguments, got ${n} instead`),this.name="ArgumentCountMismatchError"}}class V extends z{constructor(e){super(e),this.name="InsufficientBalanceError"}}class j extends z{constructor(e){super(e),this.name="MissingParamError"}}class H extends z{constructor(){super("Byte serialization not supported"),this.name="NoSerializerFoundError"}}class J extends z{constructor(e){super(`Giving up at height ${e}`),this.name="RequestTimedOutError"}}class W extends z{constructor(e,t){super(`Giving up after ${e} blocks mined, transaction hash: ${t}`),this.name="TxTimedOutError"}}class Y extends z{constructor(e){super(e),this.name="TypeError"}}class K extends z{constructor(e){super(e),this.name="UnsupportedPlatformError"}}class Q extends z{constructor(e){super(e),this.name="UnsupportedProtocolError"}}class X extends z{constructor(e){super(e),this.name="NotImplementedError"}}class Z extends z{constructor(e,t,n,r){super(`Unsupported ${e} version ${t}. Supported: >= ${n}`+(null==r?"":` < ${r}`)),this.name="UnsupportedVersionError"}}class ee extends z{constructor(e){super(e),this.name="LogicError"}}class te extends z{constructor(e){super(e),this.name="InternalError"}}class ne extends te{constructor(e="Expected to not happen, required for TS"){super(e),this.name="UnexpectedTsError"}}class re extends I{constructor(e){super(`Account for ${e} not available`),this.name="UnavailableAccountError"}}class ie extends M{constructor(e,t){super(`Name ${e} don't have pointers for ${t}`),this.name="AensPointerContextError"}}class ae extends M{constructor(e,t){super(`the provided fee ${e.toString()} is not enough to execute the claim, required: ${t.toString()}`),this.name="InsufficientNameFeeError"}}class se extends M{constructor(e){super(e),this.name="InvalidAensNameError"}}class oe extends q{constructor(e){super(`Received invalid message: ${e}`),this.name="InvalidRpcMessageError"}}class ce extends q{constructor(e){super(`Can't find callback for this messageId ${e}`),this.name="MissingCallbackError"}}class ue extends q{constructor(e){super(`You do not have access to account ${e}`),this.name="UnAuthorizedAccountError"}}class le extends q{constructor(e){super(`RpcClient with id ${e} do not exist`),this.name="UnknownRpcClientError"}}class pe extends q{constructor(){super("You are not subscribed for an account."),this.name="UnsubscribedAccountError"}}class de extends R{constructor(e){super(e),this.name="ChannelCallError"}}class me extends R{constructor(e){super(e),this.name="ChannelConnectionError"}}class he extends R{constructor(){super("Server pong timed out"),this.name="ChannelPingTimedOutError"}}class fe extends R{constructor(e){super(e),this.name="UnexpectedChannelMessageError"}}class ye extends R{constructor(e,t){super(e.message),this.handlerError=e,this.incomingMessage=t,this.name="ChannelIncomingMessageError"}}class ge extends R{constructor(){super("State Channels FSM entered unknown state"),this.name="UnknownChannelStateError"}}class we extends O{constructor(e){super(e),this.name="InvalidAuthDataError"}}class Ne extends k{constructor(e){super(`Contract ${e} do not correspond to the bytecode deployed on the chain`),this.name="BytecodeMismatchError"}}class ve extends k{constructor(){super("Contract already deployed"),this.name="DuplicateContractError"}}class be extends k{constructor(e){super(`Contract with address ${e} not active`),this.name="InactiveContractError"}}class xe extends k{constructor(e){super(e),this.name="InvalidMethodInvocationError"}}class _e extends k{constructor(e){super(e),this.name="MissingContractAddressError"}}class Te extends k{constructor(){super("Either ACI or sourceCode or sourceCodePath is required"),this.name="MissingContractDefError"}}class Ce extends k{constructor(){super("Function name is required"),this.name="MissingFunctionNameError"}}class Se extends k{constructor(e,t){super("Invocation failed"+(null==e?"":`: "${e}"`)),this.name="NodeInvocationError",this.transaction=t}}class Ae extends k{constructor(e){super(`Function ${e} doesn't exist in contract`),this.name="NoSuchContractFunctionError"}}class Pe extends k{constructor(e,t){super(`You try to pay "${e}" to function "${t}" which is not payable. Only payable function can accept coins`),this.name="NotPayableFunctionError"}}class Ee extends k{constructor(e,t){super(`Can't find definition of ${e} event emitted by ${t} (use omitUnknown option to ignore events like this)`),this.name="MissingEventDefinitionError"}}class ze extends k{constructor(e,t){super(`Found multiple definitions of "${t[0][1]}" event with different types emitted by ${e} in ${t.map((([e])=>`"${e}"`)).join(", ")} contracts (use contractAddressToName option to specify contract name corresponding to address)`),this.name="AmbiguousEventDefinitionError"}}class Ie extends B{constructor(){super("Invalid checksum"),this.name="InvalidChecksumError"}}class Me extends B{constructor(){super("Node hash is not equal to provided one"),this.name="MerkleTreeHashMismatchError"}}class qe extends B{constructor(e){super(e),this.name="MissingNodeInTreeError"}}class Re extends B{constructor(e){super(`Unknown node length: ${e}`),this.name="UnknownNodeLengthError"}}class Oe extends B{constructor(e){super(`Unknown path nibble: ${e}`),this.name="UnknownPathNibbleError"}}class ke extends ${constructor(e){super(`Node with name ${e} already exist`),this.name="DuplicateNodeError"}}class Be extends ${constructor(e){super(e),this.name="NodeNotFoundError"}}class $e extends U{constructor(e){super(e),this.name="DecodeError"}}class Ue extends U{constructor(e){super(e),this.name="PayloadLengthError"}}class Le extends U{constructor(e){super(e),this.name="DryRunError"}}class Ge extends U{constructor(e){super(e),this.name="IllegalBidFeeError"}}class Fe extends U{constructor(e){super(e),this.name="InvalidSignatureError"}}class De extends U{constructor(e){super(`Prefix for id-tag ${e} not found.`),this.name="PrefixNotFoundError"}}class Ve extends U{constructor(e,t){super(`Transaction schema not implemented for tag ${e} version ${t}`),this.name="SchemaNotFoundError"}}class je extends U{constructor(e){super(`Id tag for prefix ${e} not found.`),this.name="DecodeError"}}class He extends U{constructor(e){super(`Transaction ${e} is removed from chain`),this.name="TxNotInChainError"}}class Je extends L{constructor(e){super(e),this.name="AlreadyConnectedError"}}class We extends L{constructor(e){super(e),this.name="NoWalletConnectedError"}}class Ye extends L{constructor(e){super(e),this.name="RpcConnectionError"}}let Ke=function(e){return e.AE="ae",e.MILI_AE="miliAE",e.MICRO_AE="microAE",e.NANO_AE="nanoAE",e.PICO_AE="picoAE",e.FEMTO_AE="femtoAE",e.AETTOS="aettos",e}({});const Qe={[Ke.AE]:0,[Ke.MILI_AE]:-3,[Ke.MICRO_AE]:-6,[Ke.NANO_AE]:-9,[Ke.PICO_AE]:-12,[Ke.FEMTO_AE]:-15,[Ke.AETTOS]:-18},Xe=(e,{denomination:t=Ke.AETTOS,targetDenomination:n=Ke.AETTOS})=>{if(!(e=>"bigint"==typeof e||["number","object","string"].includes(typeof e)&&(!isNaN(e)||Number.isInteger(e)||P.isBigNumber(e)))(e))throw new G("value","a number",e);return new P("bigint"==typeof e?e.toString():e).shiftedBy(Qe[t]-Qe[n]).toFixed()},Ze=(e,{denomination:t=Ke.AETTOS}={})=>Xe(e,{denomination:t,targetDenomination:Ke.AE}),et=(e,{denomination:t=Ke.AE}={})=>Xe(e,{denomination:t}),tt=[{name:"exa",magnitude:18},{name:"giga",magnitude:9},{name:"",magnitude:0},{name:"pico",magnitude:-12}],nt=e=>tt.reduce(((t,n)=>Math.abs(n.magnitude-e)<Math.abs(t.magnitude-e)?n:t)),rt=e=>{var t;return null!==(t=tt.find((t=>t.magnitude<=e)))&&void 0!==t?t:tt[tt.length-1]},it=e=>{var t;const n=new P(e),r=null!==(t=n.e)&&void 0!==t?t:0,{name:i,magnitude:a}=(r<0?nt:rt)(r);return`${n.shiftedBy(-a).precision(9+Math.min(r-a,0)).toFixed()}${""!==i?" ":""}${i}`},at=new Set(["Deserialize","Serialize","Retry","Sign"]);class st{constructor(e){var t;this._policies=[],this._policies=null!==(t=null==e?void 0:e.slice(0))&&void 0!==t?t:[],this._orderedPolicies=void 0}addPolicy(e,t={}){if(t.phase&&t.afterPhase)throw new Error("Policies inside a phase cannot specify afterPhase.");if(t.phase&&!at.has(t.phase))throw new Error(`Invalid phase name: ${t.phase}`);if(t.afterPhase&&!at.has(t.afterPhase))throw new Error(`Invalid afterPhase name: ${t.afterPhase}`);this._policies.push({policy:e,options:t}),this._orderedPolicies=void 0}removePolicy(e){const t=[];return this._policies=this._policies.filter((n=>!(e.name&&n.policy.name===e.name||e.phase&&n.options.phase===e.phase)||(t.push(n.policy),!1))),this._orderedPolicies=void 0,t}sendRequest(e,t){return this.getOrderedPolicies().reduceRight(((e,t)=>n=>t.sendRequest(n,e)),(t=>e.sendRequest(t)))(t)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new st(this._policies)}static create(){return new st}orderPolicies(){const e=[],t=new Map;function n(e){return{name:e,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}const r=n("Serialize"),i=n("None"),a=n("Deserialize"),s=n("Retry"),o=n("Sign"),c=[r,i,a,s,o];function u(e){return"Retry"===e?s:"Serialize"===e?r:"Deserialize"===e?a:"Sign"===e?o:i}for(const e of this._policies){const n=e.policy,r=e.options,i=n.name;if(t.has(i))throw new Error("Duplicate policy names not allowed in pipeline");const a={policy:n,dependsOn:new Set,dependants:new Set};r.afterPhase&&(a.afterPhase=u(r.afterPhase),a.afterPhase.hasAfterPolicies=!0),t.set(i,a),u(r.phase).policies.add(a)}for(const e of this._policies){const{policy:n,options:r}=e,i=n.name,a=t.get(i);if(!a)throw new Error(`Missing node for policy ${i}`);if(r.afterPolicies)for(const e of r.afterPolicies){const n=t.get(e);n&&(a.dependsOn.add(n),n.dependants.add(a))}if(r.beforePolicies)for(const e of r.beforePolicies){const n=t.get(e);n&&(n.dependsOn.add(a),a.dependants.add(n))}}function l(n){n.hasRun=!0;for(const r of n.policies)if((!r.afterPhase||r.afterPhase.hasRun&&!r.afterPhase.policies.size)&&0===r.dependsOn.size){e.push(r.policy);for(const e of r.dependants)e.dependsOn.delete(r);t.delete(r.policy.name),n.policies.delete(r)}}function p(){for(const e of c){if(l(e),e.policies.size>0&&e!==i)return void(i.hasRun||l(i));e.hasAfterPolicies&&l(i)}}let d=0;for(;t.size>0;){d++;const t=e.length;if(p(),e.length<=t&&d>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}}var ot=n(5606);const ct=void 0!==ot&&ot.env&&ot.env.DEBUG||void 0;let ut,lt=[],pt=[];const dt=[];ct&&ht(ct);const mt=Object.assign((e=>yt(e)),{enable:ht,enabled:ft,disable:function(){const e=ut||"";return ht(""),e},log:function(...e){if(e.length>0){const t=String(e[0]);t.includes(":error")?console.error(...e):t.includes(":warning")?console.warn(...e):t.includes(":info")?console.info(...e):(t.includes(":verbose"),console.debug(...e))}}});function ht(e){ut=e,lt=[],pt=[];const t=/\*/g,n=e.split(",").map((e=>e.trim().replace(t,".*?")));for(const e of n)e.startsWith("-")?pt.push(new RegExp(`^${e.substr(1)}$`)):lt.push(new RegExp(`^${e}$`));for(const e of dt)e.enabled=ft(e.namespace)}function ft(e){if(e.endsWith("*"))return!0;for(const t of pt)if(t.test(e))return!1;for(const t of lt)if(t.test(e))return!0;return!1}function yt(e){const t=Object.assign((function(...n){t.enabled&&(n.length>0&&(n[0]=`${e} ${n[0]}`),t.log(...n))}),{enabled:ft(e),destroy:gt,log:mt.log,namespace:e,extend:wt});return dt.push(t),t}function gt(){const e=dt.indexOf(this);return e>=0&&(dt.splice(e,1),!0)}function wt(e){const t=yt(`${this.namespace}:${e}`);return t.log=this.log,t}var Nt=mt,vt=n(5606);const bt=new Set,xt=void 0!==vt&&vt.env&&vt.env.AZURE_LOG_LEVEL||void 0;let _t;const Tt=Nt("azure");Tt.log=(...e)=>{Nt.log(...e)};const Ct=["verbose","info","warning","error"];xt&&(It(xt)?function(e){if(e&&!It(e))throw new Error(`Unknown log level '${e}'. Acceptable values: ${Ct.join(",")}`);_t=e;const t=[];for(const e of bt)zt(e)&&t.push(e.namespace);Nt.enable(t.join(","))}(xt):console.error(`AZURE_LOG_LEVEL set to unknown log level '${xt}'; logging is not enabled. Acceptable values: ${Ct.join(", ")}.`));const St={verbose:400,info:300,warning:200,error:100};function At(e){const t=Tt.extend(e);return Pt(Tt,t),{error:Et(t,"error"),warning:Et(t,"warning"),info:Et(t,"info"),verbose:Et(t,"verbose")}}function Pt(e,t){t.log=(...t)=>{e.log(...t)}}function Et(e,t){const n=Object.assign(e.extend(t),{level:t});if(Pt(e,n),zt(n)){const e=Nt.disable();Nt.enable(e+","+n.namespace)}return bt.add(n),n}function zt(e){return Boolean(_t&&St[e.level]<=St[_t])}function It(e){return Ct.includes(e)}const Mt=At("core-rest-pipeline");class qt extends Error{constructor(e){super(e),this.name="AbortError"}}function Rt(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function Ot(e){if(Rt(e)){const t="string"==typeof e.name,n="string"==typeof e.message;return t&&n}return!1}function kt(e){if(Ot(e))return e.message;{let t;try{t="object"==typeof e&&e?JSON.stringify(e):String(e)}catch(e){t="[unable to stringify input]"}return`Unknown error ${t}`}}function Bt(e,t){switch(t){case"utf-8":return function(e){return(new TextEncoder).encode(e)}(e);case"base64":return $t(e);case"base64url":return function(e){return $t(e.replace(/-/g,"+").replace(/_/g,"/"))}(e);case"hex":return function(e){const t=new Uint8Array(e.length/2);for(let n=0;n<e.length/2;++n){const r=e[2*n],i=e[2*n+1];if(!Ut.has(r)||!Ut.has(i))return t.slice(0,n);t[n]=parseInt(`${r}${i}`,16)}return t}(e)}}function $t(e){return new Uint8Array([...atob(e)].map((e=>e.charCodeAt(0))))}const Ut=new Set("0123456789abcdefABCDEF");var Lt;const Gt="function"==typeof(null===(Lt=null===globalThis||void 0===globalThis?void 0:globalThis.crypto)||void 0===Lt?void 0:Lt.randomUUID)?globalThis.crypto.randomUUID.bind(globalThis.crypto):function(){let e="";for(let t=0;t<32;t++){const n=Math.floor(16*Math.random());e+=12===t?"4":16===t?3&n|8:n.toString(16),7!==t&&11!==t&&15!==t&&19!==t||(e+="-")}return e};function Ft(){return Gt()}var Dt,Vt,jt,Ht;"undefined"!=typeof window&&window.document,"object"==typeof self&&"function"==typeof(null===self||void 0===self?void 0:self.importScripts)&&("DedicatedWorkerGlobalScope"===(null===(Dt=self.constructor)||void 0===Dt?void 0:Dt.name)||"ServiceWorkerGlobalScope"===(null===(Vt=self.constructor)||void 0===Vt?void 0:Vt.name)||null===(jt=self.constructor)||void 0===jt||jt.name),"undefined"!=typeof Deno&&void 0!==Deno.version&&Deno.version.deno,"undefined"!=typeof Bun&&Bun.version;const Jt=void 0!==globalThis.process&&Boolean(globalThis.process.version)&&Boolean(null===(Ht=globalThis.process.versions)||void 0===Ht?void 0:Ht.node),Wt=("undefined"!=typeof navigator&&(null===navigator||void 0===navigator||navigator.product),"REDACTED"),Yt=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],Kt=["api-version"];class Qt{constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:t=[]}={}){e=Yt.concat(e),t=Kt.concat(t),this.allowedHeaderNames=new Set(e.map((e=>e.toLowerCase()))),this.allowedQueryParameters=new Set(t.map((e=>e.toLowerCase())))}sanitize(e){const t=new Set;return JSON.stringify(e,((e,n)=>{if(n instanceof Error)return Object.assign(Object.assign({},n),{name:n.name,message:n.message});if("headers"===e)return this.sanitizeHeaders(n);if("url"===e)return this.sanitizeUrl(n);if("query"===e)return this.sanitizeQuery(n);if("body"!==e&&"response"!==e&&"operationSpec"!==e){if(Array.isArray(n)||Rt(n)){if(t.has(n))return"[Circular]";t.add(n)}return n}}),2)}sanitizeUrl(e){if("string"!=typeof e||null===e||""===e)return e;const t=new URL(e);if(!t.search)return e;for(const[e]of t.searchParams)this.allowedQueryParameters.has(e.toLowerCase())||t.searchParams.set(e,Wt);return t.toString()}sanitizeHeaders(e){const t={};for(const n of Object.keys(e))this.allowedHeaderNames.has(n.toLowerCase())?t[n]=e[n]:t[n]=Wt;return t}sanitizeQuery(e){if("object"!=typeof e||null===e)return e;const t={};for(const n of Object.keys(e))this.allowedQueryParameters.has(n.toLowerCase())?t[n]=e[n]:t[n]=Wt;return t}}const Xt=["GET","HEAD"];function Zt(e={}){const{maxRetries:t=20}=e;return{name:"redirectPolicy",async sendRequest(e,n){const r=await n(e);return en(n,r,t)}}}async function en(e,t,n,r=0){const{request:i,status:a,headers:s}=t,o=s.get("location");if(o&&(300===a||301===a&&Xt.includes(i.method)||302===a&&Xt.includes(i.method)||303===a&&"POST"===i.method||307===a)&&r<n){const t=new URL(o,i.url);i.url=t.toString(),303===a&&(i.method="GET",i.headers.delete("Content-Length"),delete i.body),i.headers.delete("Authorization");const s=await e(i);return en(e,s,n,r+1)}return t}const tn="1.17.0";async function nn(e){const t=new Map;t.set("core-rest-pipeline",tn),await async function(e){const t=globalThis.navigator;let n="unknown";if(null==t?void 0:t.userAgentData){const r=await t.userAgentData.getHighEntropyValues(["architecture","platformVersion"]);n=`${r.architecture}-${r.platform}-${r.platformVersion}`;const i=function(e){const t=["Google Chrome","Microsoft Edge","Opera","Brave","Chromium"];for(const n of t){const t=e.find((e=>e.brand===n));if(t)return t}}(t.userAgentData.brands);i&&e.set(i.brand,i.version)}else if(null==t?void 0:t.platform){n=t.platform;const r=function(e){const t=[{name:"Firefox",regex:/Firefox\/([\d.]+)/},{name:"Safari",regex:/Version\/([\d.]+).*Safari/}];for(const n of t){const t=e.match(n.regex);if(t)return{brand:n.name,version:t[1]}}}(t.userAgent);r&&e.set(r.brand,r.version)}else"string"==typeof globalThis.EdgeRuntime&&e.set("EdgeRuntime",globalThis.EdgeRuntime);e.set("OS",n)}(t);const n=function(e){const t=[];for(const[n,r]of e){const e=r?`${n}/${r}`:n;t.push(e)}return t.join(" ")}(t);return e?`${e} ${n}`:n}const rn="x-ms-useragent",an="userAgentPolicy",sn=Symbol("rawContent");function on(e){return"function"==typeof e[sn]?e[sn]():e.stream()}function cn(e){return Boolean(e&&"function"==typeof e.pipe)}function un(e){return Boolean(e&&"function"==typeof e.getReader&&"function"==typeof e.tee)}async function ln(e){if(e instanceof Blob||e instanceof Uint8Array)return e;if(un(e))return new Response(e).blob();const t=on(e);if(cn(t))throw new Error("Encountered unexpected type. In the browser, `concat` supports Web ReadableStream, Blob, Uint8Array, and files created using `createFile` only.");return ln(t)}function pn(e){let t="";for(const[n,r]of e)t+=`${n}: ${r}\r\n`;return t}function dn(e){return e instanceof Uint8Array?e.byteLength:"function"==typeof e.stream?-1===e.size?void 0:e.size:void 0}const mn="multipartPolicy",hn=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function fn(){return{name:mn,async sendRequest(e,t){var n;if(!e.multipartBody)return t(e);if(e.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=e.multipartBody.boundary;const i=null!==(n=e.headers.get("Content-Type"))&&void 0!==n?n:"multipart/mixed",a=i.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!a)throw new Error(`Got multipart request body, but content-type header was not multipart: ${i}`);const[,s,o]=a;if(o&&r&&o!==r)throw new Error(`Multipart boundary was specified as ${o} in the header, but got ${r} in the request body`);return null!=r||(r=o),r?function(e){if(e.length>70)throw new Error(`Multipart boundary "${e}" exceeds maximum length of 70 characters`);if(Array.from(e).some((e=>!hn.has(e))))throw new Error(`Multipart boundary "${e}" contains invalid characters`)}(r):r=`----AzSDKFormBoundary${Ft()}`,e.headers.set("Content-Type",`${s}; boundary=${r}`),await async function(e,t,n){const r=[Bt(`--${n}`,"utf-8"),...t.flatMap((e=>[Bt("\r\n","utf-8"),Bt(pn(e.headers),"utf-8"),Bt("\r\n","utf-8"),e.body,Bt(`\r\n--${n}`,"utf-8")])),Bt("--\r\n\r\n","utf-8")],i=function(e){let t=0;for(const n of e){const e=dn(n);if(void 0===e)return;t+=e}return t}(r);i&&e.headers.set("Content-Length",i),e.body=await async function(e){const t=[];for(const n of e)t.push(await ln("function"==typeof n?n():n));return new Blob(t)}(r)}(e,e.multipartBody.parts,r),e.multipartBody=void 0,t(e)}}}function yn(e,t,n){return new Promise(((r,i)=>{let a,s;const o=()=>i(new qt((null==n?void 0:n.abortErrorMsg)?null==n?void 0:n.abortErrorMsg:"The operation was aborted.")),c=()=>{(null==n?void 0:n.abortSignal)&&s&&n.abortSignal.removeEventListener("abort",s)};if(s=()=>(a&&clearTimeout(a),c(),o()),(null==n?void 0:n.abortSignal)&&n.abortSignal.aborted)return o();a=setTimeout((()=>{c(),r(t)}),e),(null==n?void 0:n.abortSignal)&&n.abortSignal.addEventListener("abort",s)}))}function gn(e,t){const n=e.headers.get(t);if(!n)return;const r=Number(n);return Number.isNaN(r)?void 0:r}const wn="Retry-After",Nn=["retry-after-ms","x-ms-retry-after-ms",wn];function vn(e){if(e&&[429,503].includes(e.status))try{for(const t of Nn){const n=gn(e,t);if(0===n||n)return n*(t===wn?1e3:1)}const t=e.headers.get(wn);if(!t)return;const n=Date.parse(t)-Date.now();return Number.isFinite(n)?Math.max(0,n):void 0}catch(e){return}}function bn(e={}){var t,n;const r=null!==(t=e.retryDelayInMs)&&void 0!==t?t:1e3,i=null!==(n=e.maxRetryDelayInMs)&&void 0!==n?n:64e3;let a=r;return{name:"exponentialRetryStrategy",retry({retryCount:t,response:n,responseError:r}){const s=!!(p=r)&&("ETIMEDOUT"===p.code||"ESOCKETTIMEDOUT"===p.code||"ECONNREFUSED"===p.code||"ECONNRESET"===p.code||"ENOENT"===p.code||"ENOTFOUND"===p.code),o=s&&e.ignoreSystemErrors,c=function(e){return Boolean(e&&void 0!==e.status&&(e.status>=500||408===e.status)&&501!==e.status&&505!==e.status)}(n),u=c&&e.ignoreHttpStatusCodes,l=n&&(function(e){return Number.isFinite(vn(e))}(n)||!c);var p;if(l||u||o)return{skipStrategy:!0};if(r&&!s&&!c)return{errorToThrow:r};const d=a*Math.pow(2,t),m=Math.min(i,d);var h,f;return a=m/2+(h=0,f=m/2,h=Math.ceil(h),f=Math.floor(f),Math.floor(Math.random()*(f-h+1))+h),{retryAfterInMs:a}}}}const xn=At("core-rest-pipeline retryPolicy");function _n(e,t={maxRetries:3}){const n=t.logger||xn;return{name:"retryPolicy",async sendRequest(r,i){var a,s;let o,c,u=-1;e:for(;;){u+=1,o=void 0,c=void 0;try{n.info(`Retry ${u}: Attempting to send request`,r.requestId),o=await i(r),n.info(`Retry ${u}: Received a response from request`,r.requestId)}catch(e){if(n.error(`Retry ${u}: Received an error from request`,r.requestId),c=e,!e||"RestError"!==c.name)throw e;o=c.response}if(null===(a=r.abortSignal)||void 0===a?void 0:a.aborted)throw n.error(`Retry ${u}: Request aborted.`),new qt;if(u>=(null!==(s=t.maxRetries)&&void 0!==s?s:3)){if(n.info(`Retry ${u}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),c)throw c;if(o)return o;throw new Error("Maximum retries reached with no response or error to throw")}n.info(`Retry ${u}: Processing ${e.length} retry strategies.`);t:for(const t of e){const e=t.logger||xn;e.info(`Retry ${u}: Processing retry strategy ${t.name}.`);const n=t.retry({retryCount:u,response:o,responseError:c});if(n.skipStrategy){e.info(`Retry ${u}: Skipped.`);continue t}const{errorToThrow:i,retryAfterInMs:a,redirectTo:s}=n;if(i)throw e.error(`Retry ${u}: Retry strategy ${t.name} throws error:`,i),i;if(a||0===a){e.info(`Retry ${u}: Retry strategy ${t.name} retries after ${a}`),await yn(a,void 0,{abortSignal:r.abortSignal});continue e}if(s){e.info(`Retry ${u}: Retry strategy ${t.name} redirects to ${s}`),r.url=s;continue e}}if(c)throw n.info("None of the retry strategies could work with the received error. Throwing it."),c;if(o)return n.info("None of the retry strategies could work with the received response. Returning it."),o}}}}function Tn(e){return e.toLowerCase()}class Cn{constructor(e){if(this._headersMap=new Map,e)for(const t of Object.keys(e))this.set(t,e[t])}set(e,t){this._headersMap.set(Tn(e),{name:e,value:String(t).trim()})}get(e){var t;return null===(t=this._headersMap.get(Tn(e)))||void 0===t?void 0:t.value}has(e){return this._headersMap.has(Tn(e))}delete(e){this._headersMap.delete(Tn(e))}toJSON(e={}){const t={};if(e.preserveCase)for(const e of this._headersMap.values())t[e.name]=e.value;else for(const[e,n]of this._headersMap)t[e]=n.value;return t}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return function*(e){for(const t of e.values())yield[t.name,t.value]}(this._headersMap)}}function Sn(e){return new Cn(e)}const An="setClientRequestIdPolicy",Pn={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function En(e={}){let t=new zn(e.parentContext);return e.span&&(t=t.setValue(Pn.span,e.span)),e.namespace&&(t=t.setValue(Pn.namespace,e.namespace)),t}class zn{constructor(e){this._contextMap=e instanceof zn?new Map(e._contextMap):new Map}setValue(e,t){const n=new zn(this);return n._contextMap.set(e,t),n}getValue(e){return this._contextMap.get(e)}deleteValue(e){const t=new zn(this);return t._contextMap.delete(e),t}}const In={instrumenterImplementation:void 0};function Mn(){return In.instrumenterImplementation||(In.instrumenterImplementation={createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(e,t)=>({span:{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{},addEvent:()=>{}},tracingContext:En({parentContext:t.tracingContext})}),withContext(e,t,...n){return t(...n)}}),In.instrumenterImplementation}const qn={},Rn=new Qt;class On extends Error{constructor(e,t={}){super(e),this.name="RestError",this.code=t.code,this.statusCode=t.statusCode,Object.defineProperty(this,"request",{value:t.request,enumerable:!1}),Object.defineProperty(this,"response",{value:t.response,enumerable:!1}),Object.setPrototypeOf(this,On.prototype)}[qn](){return`RestError: ${this.message} \n ${Rn.sanitize(Object.assign(Object.assign({},this),{request:this.request,response:this.response}))}`}}function kn(e){var t;const n=st.create();var r;return Jt&&(e.tlsOptions&&n.addPolicy((r=e.tlsOptions,{name:"tlsPolicy",sendRequest:async(e,t)=>(e.tlsSettings||(e.tlsSettings=r),t(e))})),n.addPolicy(function(){throw new Error("proxyPolicy is not supported in browser environment")}(e.proxyOptions)),n.addPolicy(function(){throw new Error("decompressResponsePolicy is not supported in browser environment")}())),n.addPolicy({name:"formDataPolicy",async sendRequest(e,t){if(Jt&&"undefined"!=typeof FormData&&e.body instanceof FormData&&(e.formData=function(e){var t;const n={};for(const[r,i]of e.entries())null!==(t=n[r])&&void 0!==t||(n[r]=[]),n[r].push(i);return n}(e.body),e.body=void 0),e.formData){const t=e.headers.get("Content-Type");t&&-1!==t.indexOf("application/x-www-form-urlencoded")?e.body=function(e){const t=new URLSearchParams;for(const[n,r]of Object.entries(e))if(Array.isArray(r))for(const e of r)t.append(n,e.toString());else t.append(n,r.toString());return t.toString()}(e.formData):await async function(e,t){const n=t.headers.get("Content-Type");if(n&&!n.startsWith("multipart/form-data"))return;t.headers.set("Content-Type",null!=n?n:"multipart/form-data");const r=[];for(const[t,n]of Object.entries(e))for(const e of Array.isArray(n)?n:[n])if("string"==typeof e)r.push({headers:Sn({"Content-Disposition":`form-data; name="${t}"`}),body:Bt(e,"utf-8")});else{if(null==e||"object"!=typeof e)throw new Error(`Unexpected value for key ${t}: ${e}. Value should be serialized to string first.`);{const n=e.name||"blob",i=Sn();i.set("Content-Disposition",`form-data; name="${t}"; filename="${n}"`),i.set("Content-Type",e.type||"application/octet-stream"),r.push({headers:i,body:e})}}t.multipartBody={parts:r}}(e.formData,e),e.formData=void 0}return t(e)}},{beforePolicies:[mn]}),n.addPolicy(function(e={}){const t=nn(e.userAgentPrefix);return{name:an,async sendRequest(e,n){return e.headers.has(rn)||e.headers.set(rn,await t),n(e)}}}(e.userAgentOptions)),n.addPolicy(function(e="x-ms-client-request-id"){return{name:An,async sendRequest(t,n){return t.headers.has(e)||t.headers.set(e,t.requestId),n(t)}}}(null===(t=e.telemetryOptions)||void 0===t?void 0:t.clientRequestIdHeaderName)),n.addPolicy(fn(),{afterPhase:"Deserialize"}),n.addPolicy(function(e={}){var t;return{name:"defaultRetryPolicy",sendRequest:_n([{name:"throttlingRetryStrategy",retry({response:e}){const t=vn(e);return Number.isFinite(t)?{retryAfterInMs:t}:{skipStrategy:!0}}},bn(e)],{maxRetries:null!==(t=e.maxRetries)&&void 0!==t?t:3}).sendRequest}}(e.retryOptions),{phase:"Retry"}),n.addPolicy(function(e={}){const t=nn(e.userAgentPrefix),n=new Qt({additionalAllowedQueryParameters:e.additionalAllowedQueryParameters}),r=function(){try{return function(e){const{namespace:t,packageName:n,packageVersion:r}=e;function i(e,i,a){var s;const o=Mn().startSpan(e,Object.assign(Object.assign({},a),{packageName:n,packageVersion:r,tracingContext:null===(s=null==i?void 0:i.tracingOptions)||void 0===s?void 0:s.tracingContext}));let c=o.tracingContext;const u=o.span;return c.getValue(Pn.namespace)||(c=c.setValue(Pn.namespace,t)),u.setAttribute("az.namespace",c.getValue(Pn.namespace)),{span:u,updatedOptions:Object.assign({},i,{tracingOptions:Object.assign(Object.assign({},null==i?void 0:i.tracingOptions),{tracingContext:c})})}}function a(e,t,...n){return Mn().withContext(e,t,...n)}return{startSpan:i,withSpan:async function(e,t,n,r){const{span:s,updatedOptions:o}=i(e,t,r);try{const e=await a(o.tracingOptions.tracingContext,(()=>Promise.resolve(n(o,s))));return s.setStatus({status:"success"}),e}catch(e){throw s.setStatus({status:"error",error:e}),e}finally{s.end()}},withContext:a,parseTraceparentHeader:function(e){return Mn().parseTraceparentHeader(e)},createRequestHeaders:function(e){return Mn().createRequestHeaders(e)}}}({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:tn})}catch(e){return void Mt.warning(`Error when creating the TracingClient: ${kt(e)}`)}}();return{name:"tracingPolicy",async sendRequest(e,i){var a;if(!r)return i(e);const s=await t,o={"http.url":n.sanitizeUrl(e.url),"http.method":e.method,"http.user_agent":s,requestId:e.requestId};s&&(o["http.user_agent"]=s);const{span:c,tracingContext:u}=null!==(a=function(e,t,n){try{const{span:r,updatedOptions:i}=e.startSpan(`HTTP ${t.method}`,{tracingOptions:t.tracingOptions},{spanKind:"client",spanAttributes:n});if(!r.isRecording())return void r.end();const a=e.createRequestHeaders(i.tracingOptions.tracingContext);for(const[e,n]of Object.entries(a))t.headers.set(e,n);return{span:r,tracingContext:i.tracingOptions.tracingContext}}catch(e){return void Mt.warning(`Skipping creating a tracing span due to an error: ${kt(e)}`)}}(r,e,o))&&void 0!==a?a:{};if(!c||!u)return i(e);try{const t=await r.withContext(u,i,e);return function(e,t){try{e.setAttribute("http.status_code",t.status);const n=t.headers.get("x-ms-request-id");n&&e.setAttribute("serviceRequestId",n),e.setStatus({status:"success"}),e.end()}catch(e){Mt.warning(`Skipping tracing span processing due to an error: ${kt(e)}`)}}(c,t),t}catch(e){throw function(e,t){try{e.setStatus({status:"error",error:Ot(t)?t:void 0}),((n=t)instanceof On||Ot(n)&&"RestError"===n.name)&&t.statusCode&&e.setAttribute("http.status_code",t.statusCode),e.end()}catch(n){Mt.warning(`Skipping tracing span processing due to an error: ${kt(n)}`)}var n}(c,e),e}}}}(Object.assign(Object.assign({},e.userAgentOptions),e.loggingOptions)),{afterPhase:"Retry"}),Jt&&n.addPolicy(Zt(e.redirectOptions),{afterPhase:"Retry"}),n.addPolicy(function(e={}){var t;const n=null!==(t=e.logger)&&void 0!==t?t:Mt.info,r=new Qt({additionalAllowedHeaderNames:e.additionalAllowedHeaderNames,additionalAllowedQueryParameters:e.additionalAllowedQueryParameters});return{name:"logPolicy",async sendRequest(e,t){if(!n.enabled)return t(e);n(`Request: ${r.sanitize(e)}`);const i=await t(e);return n(`Response status code: ${i.status}`),n(`Headers: ${r.sanitize(i.headers)}`),i}}}(e.loggingOptions),{afterPhase:"Sign"}),n}On.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR",On.PARSE_ERROR="PARSE_ERROR";class Bn{async sendRequest(e){if("https:"!==new URL(e.url).protocol&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);if(e.proxySettings)throw new Error("HTTP proxy is not supported in browser environment");try{return await async function(e){const{abortController:t,abortControllerCleanup:n}=function(e){const t=new AbortController;let n,r;if(e.abortSignal){if(e.abortSignal.aborted)throw new qt("The operation was aborted.");r=e=>{"abort"===e.type&&t.abort()},e.abortSignal.addEventListener("abort",r),n=()=>{var t;r&&(null===(t=e.abortSignal)||void 0===t||t.removeEventListener("abort",r))}}return e.timeout>0&&setTimeout((()=>{t.abort()}),e.timeout),{abortController:t,abortControllerCleanup:n}}(e);try{const r=function(e){const t=new Headers;for(const[n,r]of e)t.append(n,r);return t}(e.headers),{streaming:i,body:a}=function(e){const t="function"==typeof e.body?e.body():e.body;if(cn(t))throw new Error("Node streams are not supported in browser environment.");return un(t)?{streaming:!0,body:$n(t,{onProgress:e.onUploadProgress})}:{streaming:!1,body:t}}(e),s=Object.assign(Object.assign({body:a,method:e.method,headers:r,signal:t.signal},"credentials"in Request.prototype?{credentials:e.withCredentials?"include":"same-origin"}:{}),"cache"in Request.prototype?{cache:"no-store"}:{});i&&(s.duplex="half");const o=await fetch(e.url,s);return function(e){return("function"==typeof Blob||"object"==typeof Blob)&&e instanceof Blob}(e.body)&&e.onUploadProgress&&e.onUploadProgress({loadedBytes:e.body.size}),async function(e,t,n){var r,i;const a=function(e){const t=Sn();for(const[n,r]of e.headers)t.set(n,r);return t}(e),s={request:t,headers:a,status:e.status},o=un(e.body)?$n(e.body,{onProgress:t.onDownloadProgress,onEnd:n}):e.body;if((null===(r=t.streamResponseStatusCodes)||void 0===r?void 0:r.has(Number.POSITIVE_INFINITY))||(null===(i=t.streamResponseStatusCodes)||void 0===i?void 0:i.has(s.status)))if(t.enableBrowserStreams)s.browserStreamBody=null!=o?o:void 0;else{const e=new Response(o);s.blobBody=e.blob(),null==n||n()}else{const e=new Response(o);s.bodyAsText=await e.text(),null==n||n()}return s}(o,e,n)}catch(e){throw null==n||n(),e}}(e)}catch(t){throw function(e,t){var n;return e&&"AbortError"===(null==e?void 0:e.name)?e:new On(`Error sending request: ${e.message}`,{code:null!==(n=null==e?void 0:e.code)&&void 0!==n?n:On.REQUEST_SEND_ERROR,request:t})}(t,e)}}}function $n(e,t={}){let n=0;const{onProgress:r,onEnd:i}=t;if(function(e){return void 0!==e.pipeThrough&&void 0!==self.TransformStream}(e))return e.pipeThrough(new TransformStream({transform(e,t){null!==e?(t.enqueue(e),n+=e.length,r&&r({loadedBytes:n})):t.terminate()},flush(){null==i||i()}}));{const t=e.getReader();return new ReadableStream({async pull(e){var a;const{done:s,value:o}=await t.read();if(s||!o)return null==i||i(),e.close(),void t.releaseLock();n+=null!==(a=null==o?void 0:o.length)&&void 0!==a?a:0,e.enqueue(o),r&&r({loadedBytes:n})},cancel(e){return null==i||i(),t.cancel(e)}})}}class Un{constructor(e){var t,n,r,i,a,s,o;this.url=e.url,this.body=e.body,this.headers=null!==(t=e.headers)&&void 0!==t?t:Sn(),this.method=null!==(n=e.method)&&void 0!==n?n:"GET",this.timeout=null!==(r=e.timeout)&&void 0!==r?r:0,this.multipartBody=e.multipartBody,this.formData=e.formData,this.disableKeepAlive=null!==(i=e.disableKeepAlive)&&void 0!==i&&i,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=null!==(a=e.withCredentials)&&void 0!==a&&a,this.abortSignal=e.abortSignal,this.tracingOptions=e.tracingOptions,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||Ft(),this.allowInsecureConnection=null!==(s=e.allowInsecureConnection)&&void 0!==s&&s,this.enableBrowserStreams=null!==(o=e.enableBrowserStreams)&&void 0!==o&&o}}const Ln={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:12e4};async function Gn(e){const{scopes:t,getAccessToken:n,request:r}=e,i={abortSignal:r.abortSignal,tracingOptions:r.tracingOptions},a=await n(t,i);a&&e.request.headers.set("Authorization",`Bearer ${a.token}`)}var Fn=n(8287).Buffer;const Dn=async e=>new Promise((t=>{setTimeout(t,e)})),Vn=(e,t)=>Object.fromEntries(Object.entries(e).map(t)),jn=(()=>{try{return Fn.concat([Uint8Array.from([])]),!1}catch(e){return!0}})()?(e,t)=>Fn.concat(e.map((e=>Fn.from(e))),t):Fn.concat;function Hn(e,t){return e in t}function Jn(e,t){return t.includes(e)}function Wn(e){return e instanceof On&&404===e.statusCode&&e.message.includes("Account not found")}function Yn(e){if(!(e instanceof Error))throw e}function Kn(e){return new Proxy({},Object.fromEntries(["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf","get","has"].map((t=>[t,(n,...r)=>{const i=e();if(null==i)throw new G("wrapped value","defined",i);if("get"===t&&"_wrappedValue"===r[0])return i;const a=Reflect[t](i,...r);return"function"==typeof a&&"get"===t?a.bind(i):a}]))))}var Qn=n(8947),Xn=n.n(Qn),Zn=n(4156);const er="0123456789abcdefABCDEF";er.split("").map((e=>e.codePointAt(0))),Array(256).fill(!0).map(((e,t)=>{const n=String.fromCodePoint(t),r=er.indexOf(n);return r<0?void 0:r<16?r:r-6})),new TextEncoder,new TextDecoder;const tr=e=>{if(e<0||e>0xffffffffffffffffn)throw new RangeError("value out of range")};function nr(e){"number"==typeof e?function(e){if(e<0||e>Number.MAX_SAFE_INTEGER||e%1!=0)throw new RangeError("value out of range")}(e):tr(e)}function rr(e,t,n){nr(e),void 0===n&&(n=0),void 0===t&&(t=new Uint8Array(function(e){return nr(e),e<253?1:e<=65535?3:e<=4294967295?5:9}(e)));let r=0;return e<253?(t.set([Number(e)],n),r=1):e<=65535?(t.set([253],n),function(e,t,n,r){if(t+2>e.length)throw new Error("Offset is outside the bounds of Uint8Array");if(r=r.toUpperCase(),n>65535)throw new Error(`The value of "value" is out of range. It must be >= 0 and <= 65535. Received ${n}`);"LE"===r?(e[t]=255&n,e[t+1]=n>>8&255):(e[t]=n>>8&255,e[t+1]=255&n)}(t,n+1,Number(e),"LE"),r=3):e<=4294967295?(t.set([254],n),function(e,t,n,r){if(t+4>e.length)throw new Error("Offset is outside the bounds of Uint8Array");if(r=r.toUpperCase(),n>4294967295)throw new Error(`The value of "value" is out of range. It must be >= 0 and <= 4294967295. Received ${n}`);"LE"===r?(e[t]=255&n,e[t+1]=n>>8&255,e[t+2]=n>>16&255,e[t+3]=n>>24&255):(e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n)}(t,n+1,Number(e),"LE"),r=5):(t.set([255],n),function(e,t,n,r){if(t+8>e.length)throw new Error("Offset is outside the bounds of Uint8Array");if(r=r.toUpperCase(),n>0xffffffffffffffffn)throw new Error(`The value of "value" is out of range. It must be >= 0 and <= 18446744073709551615. Received ${n}`);"LE"===r?(e[t]=Number(0xffn&n),e[t+1]=Number(n>>8n&0xffn),e[t+2]=Number(n>>16n&0xffn),e[t+3]=Number(n>>24n&0xffn),e[t+4]=Number(n>>32n&0xffn),e[t+5]=Number(n>>40n&0xffn),e[t+6]=Number(n>>48n&0xffn),e[t+7]=Number(n>>56n&0xffn)):(e[t]=Number(n>>56n&0xffn),e[t+1]=Number(n>>48n&0xffn),e[t+2]=Number(n>>40n&0xffn),e[t+3]=Number(n>>32n&0xffn),e[t+4]=Number(n>>24n&0xffn),e[t+5]=Number(n>>16n&0xffn),e[t+6]=Number(n>>8n&0xffn),e[t+7]=Number(0xffn&n))}(t,n+1,BigInt(e),"LE"),r=9),{buffer:t,bytes:r}}let ir=function(e){return e.KeyBlockHash="kh",e.MicroBlockHash="mh",e.BlockPofHash="bf",e.BlockTxHash="bx",e.BlockStateHash="bs",e.Channel="ch",e.ContractAddress="ct",e.ContractBytearray="cb",e.ContractStoreKey="ck",e.ContractStoreValue="cv",e.Transaction="tx",e.TxHash="th",e.OracleAddress="ok",e.OracleQuery="ov",e.OracleQueryId="oq",e.OracleResponse="or",e.AccountAddress="ak",e.AccountSecretKey="sk",e.Signature="sg",e.Commitment="cm",e.PeerPubkey="pp",e.Name="nm",e.State="st",e.Poi="pi",e.StateTrees="ss",e.CallStateTree="cs",e.Bytearray="ba",e}({});var ar=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");const t=new Uint8Array(256);for(let e=0;e<t.length;e++)t[e]=255;for(let n=0;n<e.length;n++){const r=e.charAt(n),i=r.charCodeAt(0);if(255!==t[i])throw new TypeError(r+" is ambiguous");t[i]=n}const n=e.length,r=e.charAt(0),i=Math.log(n)/Math.log(256),a=Math.log(256)/Math.log(n);function s(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;let a=0,s=0,o=0;for(;e[a]===r;)s++,a++;const c=(e.length-a)*i+1>>>0,u=new Uint8Array(c);for(;e[a];){let r=t[e.charCodeAt(a)];if(255===r)return;let i=0;for(let e=c-1;(0!==r||i<o)&&-1!==e;e--,i++)r+=n*u[e]>>>0,u[e]=r%256>>>0,r=r/256>>>0;if(0!==r)throw new Error("Non-zero carry");o=i,a++}let l=c-o;for(;l!==c&&0===u[l];)l++;const p=new Uint8Array(s+(c-l));let d=s;for(;l!==c;)p[d++]=u[l++];return p}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";let i=0,s=0,o=0;const c=t.length;for(;o!==c&&0===t[o];)o++,i++;const u=(c-o)*a+1>>>0,l=new Uint8Array(u);for(;o!==c;){let e=t[o],r=0;for(let t=u-1;(0!==e||r<s)&&-1!==t;t--,r++)e+=256*l[t]>>>0,l[t]=e%n>>>0,e=e/n>>>0;if(0!==e)throw new Error("Non-zero carry");s=r,o++}let p=u-s;for(;p!==u&&0===l[p];)p++;let d=r.repeat(i);for(;p<u;++p)d+=e.charAt(l[p]);return d},decodeUnsafe:s,decode:function(e){const t=s(e);if(t)return t;throw new Error("Non-base"+n+" character")}}}("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),sr=n(4107),or=n.n(sr),cr=n(8287).Buffer;function ur(e){return(new(or())).update(e).digest()}const lr=[ir.ContractBytearray,ir.ContractStoreKey,ir.ContractStoreValue,ir.Transaction,ir.OracleQuery,ir.OracleResponse,ir.State,ir.Poi,ir.StateTrees,ir.CallStateTree,ir.Bytearray],pr=[ir.KeyBlockHash,ir.MicroBlockHash,ir.BlockPofHash,ir.BlockTxHash,ir.BlockStateHash,ir.Channel,ir.ContractAddress,ir.TxHash,ir.OracleAddress,ir.OracleQueryId,ir.AccountAddress,ir.AccountSecretKey,ir.Signature,ir.Commitment,ir.PeerPubkey,ir.Name],dr={[ir.KeyBlockHash]:32,[ir.MicroBlockHash]:32,[ir.BlockPofHash]:32,[ir.BlockTxHash]:32,[ir.BlockStateHash]:32,[ir.Channel]:32,[ir.ContractAddress]:32,[ir.TxHash]:32,[ir.OracleAddress]:32,[ir.OracleQueryId]:32,[ir.AccountAddress]:32,[ir.AccountSecretKey]:32,[ir.Signature]:64,[ir.Commitment]:32,[ir.PeerPubkey]:32,[ir.State]:32};function mr(e,t){if(!Hn(t,dr))return;const n=dr[t];if(null!=n&&e.length!==n)throw new Ue(`Payload should be ${n} bytes, got ${e.length} instead`)}const hr=e=>ur(ur(e)).slice(0,4),fr=e=>jn([e,hr(e)]);function yr(e){const t=e.slice(0,-4);if(!hr(t).equals(e.slice(-4)))throw new Ie;return t}const gr={encode:e=>fr(e).toString("base64"),decode:e=>yr(cr.from(e,"base64"))},wr={encode:e=>ar.encode(fr(e)),decode:e=>yr(cr.from(ar.decode(e)))},Nr=e=>{const t=lr.find((t=>t===e));if(null!=t)return[t,gr];const n=pr.find((t=>t===e));if(null!=n)return[n,wr];throw new G("prefix",`one of ${[...pr,...lr].join(", ")}`,e)};function vr(e){const[t,n,r]=e.split("_");if(null==n)throw new $e(`Encoded string missing payload: ${e}`);if(null!=r)throw new $e(`Encoded string have extra parts: ${e}`);const[i,a]=Nr(t),s=a.decode(n);return mr(s,i),s}function br(e,t){const[,n]=Nr(t);return mr(e,t),`${t}_${n.encode(e)}`}var xr=n(8287).Buffer;function _r(e,...t){0===t.length&&(t=[ir.AccountAddress]);try{vr(e);const n=e.split("_")[0];if(!Jn(n,t))throw new G("Encoded string type",t.length>1?`one of ${t.join(", ")}`:t[0],n);return!0}catch(e){return!1}}function Tr(){const[e]=new BigUint64Array(Xn().randomBytes(8).buffer);return Number(e%BigInt(Number.MAX_SAFE_INTEGER))}function Cr(e){const t=xr.allocUnsafe(4);return t.writeUInt32BE(e),t.slice(t.findIndex((e=>0!==e)))}function Sr(e){return xr.from((0,Zn.blake2b)(e,void 0,32))}function Ar(e,t){const n=vr(e);return br(Sr(jn([n,Cr(t)])),ir.ContractAddress)}function Pr(e,t,n){return Xn().sign.detached.verify(e,t,vr(n))}const Er=xr.from("aeternity Signed Message:\n","utf8"),zr=rr(Er.length).buffer;function Ir(e){const t=xr.from(e,"utf8");return Sr(jn([zr,Er,rr(t.length).buffer,t]))}function Mr(e,t,n){return Pr(Ir(e),t,n)}var qr=n(8287).Buffer;function Rr(e,t=!1){if(null==e)return qr.from([]);if(Number.isInteger(e)||P.isBigNumber(e)||t){if(P.isBigNumber(e)||(e=new P(e)),!e.isInteger())throw new Y(`Unexpected not integer value: ${e.toFixed()}`);let t=e.toString(16);return t.length%2==1&&(t=`0${t}`),qr.from(t,"hex")}if("string"==typeof e)return qr.from(e);throw new H}const Or={pub:"ak_11111111111111111111111111111111273Yts",amount:100000000000000000000000000000000000n},kr=5e4,Br=1e9,$r=1e14,Ur=.05,Lr=480,Gr=31,Fr=Vn({31:3,30:5,29:8,28:13,27:21,26:34,25:55,24:89,23:144,22:233,21:377,20:610,19:987,18:1597,17:2584,16:4181,15:6765,14:10946,13:17711,12:28657,11:46368,10:75025,9:121393,8:196418,7:317811,6:514229,5:832040,4:1346269,3:2178309,2:3524578,1:5702887},(([e,t])=>[e,new P(t).times($r)]));let Dr=function(e){return e[e.Ceres=6]="Ceres",e}({}),Vr=function(e){return e[e.NoVm=0]="NoVm",e[e.Sophia=1]="Sophia",e[e.SophiaImprovementsMinerva=3]="SophiaImprovementsMinerva",e[e.SophiaImprovementsFortuna=4]="SophiaImprovementsFortuna",e[e.Fate=5]="Fate",e[e.SophiaImprovementsLima=6]="SophiaImprovementsLima",e[e.Fate2=7]="Fate2",e[e.Fate3=8]="Fate3",e}({}),jr=function(e){return e[e.NoAbi=0]="NoAbi",e[e.Sophia=1]="Sophia",e[e.Fate=3]="Fate",e}({}),Hr=function(e){return e[e.SignedTx=11]="SignedTx",e[e.SpendTx=12]="SpendTx",e[e.OracleRegisterTx=22]="OracleRegisterTx",e[e.OracleQueryTx=23]="OracleQueryTx",e[e.OracleResponseTx=24]="OracleResponseTx",e[e.OracleExtendTx=25]="OracleExtendTx",e[e.NameClaimTx=32]="NameClaimTx",e[e.NamePreclaimTx=33]="NamePreclaimTx",e[e.NameUpdateTx=34]="NameUpdateTx",e[e.NameRevokeTx=35]="NameRevokeTx",e[e.NameTransferTx=36]="NameTransferTx",e[e.ContractCreateTx=42]="ContractCreateTx",e[e.ContractCallTx=43]="ContractCallTx",e[e.ChannelCreateTx=50]="ChannelCreateTx",e[e.ChannelDepositTx=51]="ChannelDepositTx",e[e.ChannelWithdrawTx=52]="ChannelWithdrawTx",e[e.ChannelForceProgressTx=521]="ChannelForceProgressTx",e[e.ChannelCloseMutualTx=53]="ChannelCloseMutualTx",e[e.ChannelCloseSoloTx=54]="ChannelCloseSoloTx",e[e.ChannelSlashTx=55]="ChannelSlashTx",e[e.ChannelSettleTx=56]="ChannelSettleTx",e[e.ChannelOffChainTx=57]="ChannelOffChainTx",e[e.ChannelSnapshotSoloTx=59]="ChannelSnapshotSoloTx",e[e.GaAttachTx=80]="GaAttachTx",e[e.GaMetaTx=81]="GaMetaTx",e[e.PayingForTx=82]="PayingForTx",e}({});var Jr=n(8287).Buffer;function Wr(e,t){return br(Sr(Jr.from([...vr(e),...Rr(t)])),ir.ContractAddress)}function Yr(e,t,n){return br(Sr(Jr.from([...vr(e),...function(e){const t=Rr(e,!0);return jn([Jr.alloc(32-t.length),t])}(t),...vr(n)])),ir.OracleQueryId)}const Kr=".chain";function Qr(e){const[t,n,...r]=e.split(".");if(0!==r.length)throw new G("aens name","including only one dot",e);if(n!==Kr.slice(1))throw new G("aens name",`suffixed with ${Kr}`,e);if(/\p{Emoji_Presentation}/u.test(t))throw new G("aens name","not containing emoji",e);if("-"===t[2]&&"-"===t[3])throw new G("aens name",'without "-" char in both the third and fourth positions',e);if("-"===t[0])throw new G("aens name",'starting with no "-" char',e);if("-"===t.at(-1))throw new G("aens name",'ending with no "-" char',e);let i;try{const r=new URL(`http://${t}.${n}`);if(r.username+r.password+r.port+r.search+r.hash!==""||"/"!==r.pathname)throw new G("aens name","valid",e);i=r.host}catch(t){if(t instanceof TypeError&&t.message.includes("Invalid URL"))throw new G("aens name","valid",e);throw t}if(!/^[a-z0-9.-]+$/i.test(i))throw new G("aens name","without illegal chars",e);if(i.length>63+Kr.length)throw new G("aens name","not too long",e);return i}function Xr(e){return br(Sr(Qr(e)),ir.Name)}function Zr(e,t=Tr()){return br(Sr(jn([Jr.from(Qr(e)),Jr.from(t.toString(16).padStart(64,"0"),"hex")])),ir.Commitment)}function ei(e=Jr.from([])){return new P(Jr.from(e).toString("hex"),16).toString(10)}function ti(e){Qr(e)}function ni(e){try{return ti(e),!0}catch(e){return!1}}const ri=[[ir.AccountAddress,"account_pubkey"],[ir.OracleAddress,"oracle_pubkey"],[ir.ContractAddress,"contract_pubkey"],[ir.Channel,"channel"]];function ii(e){vr(e);const t=e.substring(0,2),n=ri.find((([e])=>e===t))?.[1];if(null!=n)return n;throw new G("identifier",`prefixed with one of ${ri.map((([e])=>`${e}_`)).join(", ")}`,e)}function ai(e){const t=Qr(e).length-Kr.length;return Fr[Math.min(t,Gr)]}function si(e,{startFee:t,increment:n=Ur}={}){if(Number(n)!==n||n%1==0)throw new Ge(`Increment must be float. Current increment ${n}`);if(n<Ur)throw new Ge(`minimum increment percentage is ${Ur}`);return E(new P(null!=t?t:ai(e)).times(new P(Ur).plus(1)))}function oi(e,t){var n,r,i;const a=Qr(e).length-Kr.length;return(null!==(n=null!==(r=null!==(i=a<=4?62*Lr:null)&&void 0!==i?i:a<=8?31*Lr:null)&&void 0!==r?r:a<=12?Lr:null)&&void 0!==n?n:0)+t}function ci(e){return Qr(e).length<13+Kr.length}async function ui(e,{_expectedMineRate:t,_microBlockCycle:n,onNode:r}){var i,a;const s=async(t,n,i,a)=>t!==e?null:null!=n?n:"ae_dev"===await(r?.getNetworkId())?i:a,o=null!==(i=null!==(a=await s("key-block",t,0,18e4))&&void 0!==a?a:await s("micro-block",n,0,3e3))&&void 0!==i?i:(()=>{throw new te(`Unknown type: ${e}`)})();return Math.floor(o/3)}const li=new WeakMap;async function pi({cached:e=!1,...t}){const n=null!==(i=(r=t.onNode)._wrappedValue)&&void 0!==i?i:r;var r,i;if(e){const e=li.get(n);if(null!=e&&e.time>Date.now()-await ui("key-block",t))return e.height}const{height:a}=await n.getCurrentKeyBlockHeight();return li.set(n,{height:a,time:Date.now()}),a}async function di(e,{blocks:t=5,interval:n,...r}){var i;let a;null!==(i=n)&&void 0!==i||(n=await ui("micro-block",r));do{const i=await r.onNode.getTransactionByHash(e);if(-1!==i.blockHeight)return i;null==a&&(a=0!==i.tx.ttl?-1:await pi({...r,cached:!0})+t),await Dn(n)}while(-1===a||await pi({...r,cached:!0})<a);throw new W(t,e)}async function mi(e,{interval:t,...n}){var r;let i;null!==(r=t)&&void 0!==r||(t=Math.min(await ui("key-block",n),5e3));do{null!=i&&await Dn(t),i=await pi(n)}while(i<e);return i}async function hi(e,{confirm:t=3,onNode:n,...r}){const{blockHeight:i}=await n.getTransactionByHash(e),a=await mi(i+t,{onNode:n,...r}),{blockHeight:s}=await n.getTransactionByHash(e);switch(s){case-1:throw new He(e);case i:return a;default:return hi(e,{onNode:n,confirm:t,...r})}}async function fi(e,{height:t,hash:n,onNode:r}){return null!=t?r.getAccountByPubkeyAndHeight(e,t):null!=n?r.getAccountByPubkeyAndHash(e,n):r.getAccountByPubkey(e)}async function yi(e,{format:t=Ke.AETTOS,...n}){const r=e.startsWith("ok_")?br(vr(e),ir.AccountAddress):e,{balance:i}=await fi(r,n).catch((e=>{if(!Wn(e))throw e;return{balance:0n}}));return Xe(i,{targetDenomination:t})}async function gi({onNode:e}){return e.getCurrentGeneration()}async function wi(e,{onNode:t}){return"number"==typeof e?t.getGenerationByHeight(e):t.getGenerationByHash(e)}async function Ni(e,{onNode:t}){return(await t.getMicroBlockTransactionsByHash(e)).transactions}async function vi(e,{onNode:t}){return"number"==typeof e?t.getKeyBlockByHeight(e):t.getKeyBlockByHash(e)}async function bi(e,{onNode:t}){return t.getMicroBlockHeaderByHash(e)}const xi=new Map;async function _i(e,t){const n=xi.get(e);if(xi.delete(e),null==n)throw new te("Can't get dry-run request");let r;try{const e="number"==typeof n[0].top?(await vi(n[0].top,{onNode:t})).hash:n[0].top;r=await t.protectedDryRunTxs({top:e,txEvents:n[0].txEvents,txs:n.map((e=>({tx:e.tx}))),accounts:Array.from(new Set(n.map((e=>e.accountAddress)))).map((e=>({pubKey:e,amount:Or.amount})))})}catch(e){return void n.forEach((({reject:t})=>t(e)))}const{results:i,txEvents:a}=r;i.forEach((({result:e,reason:t,...r},i)=>{const{resolve:s,reject:o,tx:c,accountAddress:u}=n[i];"ok"===e?s({...r,txEvents:a}):o(Object.assign(new Le(t),{tx:c,accountAddress:u}))}))}async function Ti(e,t,{top:n,txEvents:r,combine:i,onNode:a}){var s;const o=!0===i?[n,r].join():"immediate",c=null!==(s=xi.get(o))&&void 0!==s?s:[];return xi.set(o,c),new Promise(((s,u)=>{var l;c.push({tx:e,accountAddress:t,top:n,txEvents:r,resolve:s,reject:u}),!0===i?null!==(l=c.timeout)&&void 0!==l||(c.timeout=setTimeout((()=>{_i(o,a)}))):_i(o,a)}))}async function Ci(e,{onNode:t}){return t.getContractCode(e)}async function Si(e,{onNode:t}){return t.getContract(e)}async function Ai(e,{onNode:t}){return t.getNameEntryByName(e)}async function Pi(e,t,{verify:n=!0,resolveByNode:r=!1,onNode:i}){if(ni(e)){if(n||r){const n=(await i.getNameEntryByName(e)).pointers.find((e=>e.key===t));if(null==n)throw new ie(e,t);if(r)return n.id}return Xr(e)}try{return vr(e),e}catch(t){throw new se(`Invalid name or address: ${e}`)}}var Ei=n(8287).Buffer;const zi={[Dr.Ceres]:{"contract-create":{vmVersion:[Vr.Fate3],abiVersion:[jr.Fate]},"contract-call":{vmVersion:[],abiVersion:[jr.Fate]},"oracle-call":{vmVersion:[],abiVersion:[jr.NoAbi,jr.Fate]}}};function Ii(e,t){var n;const r=zi[e][t];return{vmVersion:null!==(n=r.vmVersion[0])&&void 0!==n?n:Vr.Fate2,abiVersion:r.abiVersion[0]}}var Mi={serialize(e,t,{consensusProtocolVersion:n=Dr.Ceres}){var r;return null!==(r=e)&&void 0!==r||(e=Ii(n,"contract-create")),Ei.from([e.vmVersion,0,e.abiVersion])},async prepare(e,t,n){return null!=e?e:null==n.consensusProtocolVersion&&2!==Object.keys(Dr).length&&null!=n.onNode?Ii((await n.onNode.getNodeInfo()).consensusProtocolVersion,"contract-create"):void 0},deserialize(e){const[t,,n]=e;return{vmVersion:+t,abiVersion:+n}}},qi=n(8287).Buffer,Ri={_getProtocolDetails(e,t){return Ii(e,Hr.ContractCallTx===t||Hr.GaMetaTx===t?"contract-call":"oracle-call").abiVersion},serialize(e,{tag:t},{consensusProtocolVersion:n=Dr.Ceres}){const r=null!=e?e:this._getProtocolDetails(n,t);return qi.from([r])},async prepare(e,{tag:t},n){return null!=e?e:null==n.consensusProtocolVersion&&2!==Object.keys(Dr).length&&null!=n.onNode?this._getProtocolDetails((await n.onNode.getNodeInfo()).consensusProtocolVersion,t):void 0},deserialize(e){return e[0]}},Oi=n(8287).Buffer;const ki=[ir.AccountAddress,ir.Name,ir.Commitment,ir.OracleAddress,ir.ContractAddress,ir.Channel];function Bi(...e){return{serialize(t){const n=t.slice(0,2);if(!Jn(n,ki))throw new je(n);if(!Jn(n,e))throw new G("Address encoding",e.join(", "),n);const r=ki.indexOf(n)+1;return Oi.from([...Rr(r),...vr(t)])},deserialize(t){const n=Oi.from(t).readUIntBE(0,1),r=ki[n-1];if(null==r)throw new De(n);if(!Jn(r,e))throw new G("Address encoding",e.join(", "),r);return br(t.subarray(1),r)}}}function $i(e){return{serialize(t,n){return t.map((t=>e.serialize(t,n)))},deserialize(t,n){return t.map((t=>e.deserialize(t,n)))}}}var Ui={serialize(e){if(Number(e)<0)throw new G("value","greater or equal to 0",e);return Rr(e,!0)},deserialize(e){return ei(e)}},Li={...Ui,serializeAettos(e,t,n){return null!=e?e:"0"},serialize(e,t,{denomination:n=Ke.AETTOS,...r}){return Ui.serialize(this.serializeAettos(null!=e?Xe(e,{denomination:n}):e,t,r))}},Gi=n(8287).Buffer;function Fi(e,t){return{serialize(e){if(null==e){if(!0===t)return Gi.from([]);throw new G("Encoded data","provided",e)}return vr(e)},deserialize(t){return br(t,e)}}}var Di=n(8287).Buffer;function Vi(e){return{serialize(t,{packEntry:n}){return ArrayBuffer.isView(t)?Di.from(t):"string"==typeof t&&t.startsWith("tx_")?vr(t):vr(n({...t,...null!=e&&{tag:e}}))},deserialize(t,{unpackEntry:n}){return n(br(t,ir.Bytearray),e)}}}var ji=n(8287).Buffer;function Hi(e){const t=Object.values(e).filter((e=>"number"==typeof e));return{serialize(e){if("number"!=typeof e)throw new G("value","to be a number",e);if(e>255)throw new G("value","to be less than 256",e);if(!Jn(e,t))throw new G("value","to be a value of Enum",e);return ji.from([e])},deserialize(e){if(1!==e.length)throw new G("buffer","to have single element",e.length);const n=e[0];if(!Jn(n,t))throw new G("value","to be a value of Enum",n);return n}}}const Ji=new WeakMap;async function Wi(e){const t=Ji.get(e);if(null!=t&&t.time>Date.now()-2e4)return t.gasPrice;const{minGasPrice:n,utilization:r}=(await e.getRecentGasPrices())[0];let i=r<70?0n:BigInt(new P(n.toString()).times(1.01).integerValue().toFixed());const a=100000n*BigInt(Br);return i>a&&(console.warn(`Estimated gas price ${i} exceeds the maximum safe value for unknown reason. It will be limited to ${a}. To overcome this restriction provide \`gasPrice\`/\`fee\` in options.`),i=a),Ji.set(e,{gasPrice:i,time:Date.now()}),i}var Yi={...Li,async prepare(e,t,{onNode:n,denomination:r}){if(null!=e)return e;if(null==n)throw new G("onNode","provided (or provide `gasPrice` instead)",n);const i=await Wi(n);return 0n!==i?Xe(i,{targetDenomination:r}):void 0},serializeAettos(e=Br.toString()){if(+e<Br)throw new F(`Gas price ${e.toString()} must be bigger than ${Br}`);return e}};function Ki(e){const t={[Hr.OracleRegisterTx]:"oracleTtlValue",[Hr.OracleExtendTx]:"oracleTtlValue",[Hr.OracleQueryTx]:"queryTtlValue",[Hr.OracleResponseTx]:"responseTtlValue"},{tag:n}=e;return Hn(n,t)?e[t[n]]:1}function Qi(e,t,n){const{length:r}=vr(e),i=t(e);let a=0;return i.tag!==Hr.GaMetaTx&&i.tag!==Hr.PayingForTx||(a=vr(n(i.tx.encodedTx)).length),(e=>{var t;return 15e3*(null!==(t={[Hr.ChannelForceProgressTx]:30,[Hr.ChannelOffChainTx]:0,[Hr.ContractCreateTx]:5,[Hr.ContractCallTx]:12,[Hr.GaAttachTx]:5,[Hr.GaMetaTx]:5,[Hr.PayingForTx]:.2}[e])&&void 0!==t?t:1)})(i.tag)+((e,t,{relativeTtl:n,innerTxSize:r})=>{switch(e){case Hr.OracleRegisterTx:case Hr.OracleExtendTx:case Hr.OracleQueryTx:case Hr.OracleResponseTx:return 20*t+Math.ceil(32e3*n/Math.floor(175200));case Hr.GaMetaTx:case Hr.PayingForTx:return 20*(t-r);default:return 20*t}})(i.tag,r,{relativeTtl:Ki(i),innerTxSize:a})}const Xi="_gas-price:";var Zi={...Li,async prepare(e,t,{onNode:n}){if(null!=e)return e;if(null==n)throw new G("onNode","provided (or provide `fee` instead)",n);const r=await Wi(n);return 0n!==r?Xi+r:void 0},serializeAettos(e,{rebuildTx:t,unpackTx:n,buildTx:r,_computingMinFee:i},{_canIncreaseFee:a}){if(null!=i)return i.toFixed();const s=function(e,t,n){let r,i=new P(0);do{r=i,i=new P(Br).times(Qi(e(i),t,n))}while(!i.eq(r));return i}((e=>t({_computingMinFee:e})),n,r),o=!0===e?.startsWith(Xi)?s.dividedBy(Br).times(e.replace(Xi,"")):new P(null!=e?e:s);if(s.gt(o)){if(!0===a)return s.toFixed();throw new F(`Fee ${o.toString()} must be bigger than ${s}`)}return o.toFixed()},serialize(e,t,n){return"string"==typeof e&&e.startsWith(Xi)?Ui.serialize(this.serializeAettos(e,t,n)):Li.serialize.call(this,e,t,n)}},ea={serialize(e){return Ui.serialize(e)},deserialize(e){return+Ui.deserialize(e)}},ta={...ea,serialize(e,{tag:t,rebuildTx:n,unpackTx:r,buildTx:i,_computingGasLimit:a},{gasMax:s=6e6}){if(null!=a)return ea.serialize(a);const o=t===Hr.GaMetaTx?kr:function(e,t,n,r){return e-+Qi(t(e),n,r)}(s,(e=>n({_computingGasLimit:e,_canIncreaseFee:!0})),r,i),c=null!=e?e:o;if(c>o)throw new F(`Gas limit ${c} must be less or equal to ${o}`);return ea.serialize(c)}},na=n(8287).Buffer,ra={serialize(e){return na.from(e)},deserialize(e){return e.toString()}},ia={serialize(e){return ra.serialize(e)},deserialize(e){return ra.deserialize(e)}},aa={...Li,serializeAettos(e,t){const n=ai(t.name),r=new P(null!=e?e:n);if(n.gt(r))throw new ae(r,n);return r.toFixed()},serialize(e,t,n){return Li.serialize.call(this,e,t,n)}};const sa=Bi(ir.Name);var oa={...sa,serialize(e){return sa.serialize(ni(e)?Xr(e):e)}};function ca(e){return{...ea,serialize(e,{tag:t}){if(Hr.GaAttachTx===t&&1!==e)throw new G("nonce","equal 1 if GaAttachTx",e);return ea.serialize(e)},async prepare(t,n,r){if(null!=t)return t;const{onNode:i,strategy:a}=r,s=r[e],o="provided (or provide `nonce` instead)";if(null==i)throw new G("onNode",o,i);if(null==s)throw new G("senderId",o,s);return(await i.getAccountNextNonce(s.replace(/^ok_/,"ak_"),{strategy:a}).catch((e=>{if(!Wn(e))throw e;return{nextNonce:1}}))).nextNonce},senderKey:e}}var ua=n(8287).Buffer;const la=ua.from([1]),pa=ua.from([2]),da=Bi(...ki);var ma=e=>({serialize(t){if(t.length>32)throw new F(`Expected 32 pointers or less, got ${t.length} instead`);return t.map((({key:t,id:n})=>{let r;if(_r(n,...ki)&&(r=[...e?[la]:[],da.serialize(n)]),_r(n,ir.Bytearray)){const e=vr(n);if(e.length>1024)throw new G("Raw pointer","shorter than 1025 bytes",`${e.length} bytes`);r=[pa,e]}if(null==r)throw new $e(`Unknown AENS pointer value: ${n}`);return[Rr(t),ua.concat(r)]}))},deserialize(t){return t.map((([t,n])=>{if(!e)return{key:t.toString(),id:da.deserialize(n)};const r=n.subarray(0,1),i=n.subarray(1);let a;if(r.equals(la)&&(a=da.deserialize(i)),r.equals(pa)&&(a=br(i,ir.Bytearray)),null==a)throw new $e(`Unknown AENS pointer tag: ${r}`);return{key:t.toString(),id:a}}))}}),ha={...Li,async prepare(e,t,n){if(null!=e)return e;const{onNode:r,oracleId:i}=n,a="provided (or provide `queryFee` instead)";if(null==r)throw new G("onNode",a,r);if(null==i)throw new G("oracleId",a,i);return(await r.getOracleByPubkey(i)).queryFee.toString()}},fa=n(8287).Buffer,ya={serialize(e){return fa.from(e)},deserialize(e){return e}};function ga(e,t){return{serialize(n){if((!0!==t||null!=n)&&n!==e)throw new G("ShortUIntConst",e,n);return ea.serialize(e)},deserialize(t){const n=ea.deserialize(t);if(n!==e)throw new G("ShortUIntConst",e,n);return e},constValue:e,constValueOptional:!0===t}}var wa={serialize(e){return Rr(e)},deserialize(e){return e.toString()}},Na=n(8287).Buffer;function va(e){return{serialize(t,{buildTx:n}){return ArrayBuffer.isView(t)?Na.from(t):"string"==typeof t&&t.startsWith("tx_")?vr(t):vr(n({...t,...null!=e&&{tag:e}}))},deserialize(t,{unpackTx:n}){return n(br(t,ir.Transaction),e)}}}var ba={...ea,serialize(e){return ea.serialize(null!=e?e:0)},async prepare(e,t,{onNode:n,absoluteTtl:r,_isInternalBuild:i,...a}){if(!0!==r&&0!==e&&(null!=e||!0===i)){var s;if(null==n)throw new G("onNode","provided",n);e=(null!==(s=e)&&void 0!==s?s:3)+await pi({...a,onNode:n,cached:!0})}return e}};function xa(e,t){return{...t,serialize(n,r){return t.serialize(null!=n?n:e,r)}}}function _a(e,t){return{...t,serialize(n,r,i){return t.serialize(e(n),r,i)}}}let Ta=function(e){return e[e.Ok=0]="Ok",e[e.Error=1]="Error",e[e.Revert=2]="Revert",e}({}),Ca=function(e){return e[e.Account=10]="Account",e[e.Oracle=20]="Oracle",e[e.Name=30]="Name",e[e.Contract=40]="Contract",e[e.ContractCall=41]="ContractCall",e[e.ChannelOffChainUpdateTransfer=570]="ChannelOffChainUpdateTransfer",e[e.ChannelOffChainUpdateDeposit=571]="ChannelOffChainUpdateDeposit",e[e.ChannelOffChainUpdateWithdraw=572]="ChannelOffChainUpdateWithdraw",e[e.ChannelOffChainUpdateCreateContract=573]="ChannelOffChainUpdateCreateContract",e[e.ChannelOffChainUpdateCallContract=574]="ChannelOffChainUpdateCallContract",e[e.Channel=58]="Channel",e[e.TreesPoi=60]="TreesPoi",e[e.StateTrees=62]="StateTrees",e[e.Mtree=63]="Mtree",e[e.MtreeValue=64]="MtreeValue",e[e.ContractsMtree=621]="ContractsMtree",e[e.CallsMtree=622]="CallsMtree",e[e.ChannelsMtree=623]="ChannelsMtree",e[e.NameserviceMtree=624]="NameserviceMtree",e[e.OraclesMtree=625]="OraclesMtree",e[e.AccountsMtree=626]="AccountsMtree",e[e.GaMetaTxAuthData=810]="GaMetaTxAuthData",e}({}),Sa=function(e){return e[e.delta=0]="delta",e[e.block=1]="block",e}({});const Aa=va(),Pa=va(Hr.SignedTx),Ea=Vi(Ca.TreesPoi),za=xa(3600,ea),Ia=_a((e=>{var t;const n=18e4;if(null!==(t=e)&&void 0!==t||(e=n),e>=1&&e<=n)return e;throw new G("nameTtl","a number between 1 and 180000 blocks",e)}),ea),Ma=[{tag:ga(Hr.SignedTx),version:ga(1,!0),signatures:$i(ya),encodedTx:Aa},{tag:ga(Hr.SpendTx),version:ga(1,!0),senderId:Bi(ir.AccountAddress),recipientId:Bi(ir.AccountAddress,ir.ContractAddress,ir.Name),amount:Li,fee:Zi,ttl:ba,nonce:ca("senderId"),payload:Fi(ir.Bytearray,!0)},{tag:ga(Hr.NamePreclaimTx),version:ga(1,!0),accountId:Bi(ir.AccountAddress),nonce:ca("accountId"),commitmentId:Bi(ir.Commitment),fee:Zi,ttl:ba},{tag:ga(Hr.NameClaimTx),version:ga(2,!0),accountId:Bi(ir.AccountAddress),nonce:ca("accountId"),name:ia,nameSalt:xa(0,Ui),nameFee:aa,fee:Zi,ttl:ba},{tag:ga(Hr.NameUpdateTx),version:ga(1,!0),accountId:Bi(ir.AccountAddress),nonce:ca("accountId"),nameId:oa,nameTtl:Ia,pointers:ma(!1),clientTtl:za,fee:Zi,ttl:ba},{tag:ga(Hr.NameUpdateTx),version:ga(2),accountId:Bi(ir.AccountAddress),nonce:ca("accountId"),nameId:oa,nameTtl:Ia,pointers:ma(!0),clientTtl:za,fee:Zi,ttl:ba},{tag:ga(Hr.NameTransferTx),version:ga(1,!0),accountId:Bi(ir.AccountAddress),nonce:ca("accountId"),nameId:oa,recipientId:Bi(ir.AccountAddress,ir.Name),fee:Zi,ttl:ba},{tag:ga(Hr.NameRevokeTx),version:ga(1,!0),accountId:Bi(ir.AccountAddress),nonce:ca("accountId"),nameId:oa,fee:Zi,ttl:ba},{tag:ga(Hr.ContractCreateTx),version:ga(1,!0),ownerId:Bi(ir.AccountAddress),nonce:ca("ownerId"),code:Fi(ir.ContractBytearray),ctVersion:Mi,fee:Zi,ttl:ba,deposit:_a(((e=0)=>{if(0==+e)return e;throw new G("deposit","equal 0 (because is not refundable)",e)}),Li),amount:Li,gasLimit:ta,gasPrice:Yi,callData:Fi(ir.ContractBytearray)},{tag:ga(Hr.ContractCallTx),version:ga(1,!0),callerId:Bi(ir.AccountAddress),nonce:ca("callerId"),contractId:Bi(ir.ContractAddress,ir.Name),abiVersion:Ri,fee:Zi,ttl:ba,amount:Li,gasLimit:ta,gasPrice:Yi,callData:Fi(ir.ContractBytearray)},{tag:ga(Hr.OracleRegisterTx),version:ga(1,!0),accountId:Bi(ir.AccountAddress),nonce:ca("accountId"),queryFormat:wa,responseFormat:wa,queryFee:Li,oracleTtlType:xa(Sa.delta,Hi(Sa)),oracleTtlValue:xa(500,ea),fee:Zi,ttl:ba,abiVersion:Ri},{tag:ga(Hr.OracleExtendTx),version:ga(1,!0),oracleId:Bi(ir.OracleAddress,ir.Name),nonce:ca("oracleId"),oracleTtlType:xa(Sa.delta,Hi(Sa)),oracleTtlValue:xa(500,ea),fee:Zi,ttl:ba},{tag:ga(Hr.OracleQueryTx),version:ga(1,!0),senderId:Bi(ir.AccountAddress),nonce:ca("senderId"),oracleId:Bi(ir.OracleAddress,ir.Name),query:wa,queryFee:ha,queryTtlType:xa(Sa.delta,Hi(Sa)),queryTtlValue:xa(10,ea),responseTtlType:xa(Sa.delta,Hi(Sa)),responseTtlValue:xa(10,ea),fee:Zi,ttl:ba},{tag:ga(Hr.OracleResponseTx),version:ga(1,!0),oracleId:Bi(ir.OracleAddress),nonce:ca("oracleId"),queryId:Fi(ir.OracleQueryId),response:wa,responseTtlType:xa(Sa.delta,Hi(Sa)),responseTtlValue:xa(10,ea),fee:Zi,ttl:ba},{tag:ga(Hr.ChannelCreateTx),version:ga(2,!0),initiator:Bi(ir.AccountAddress),initiatorAmount:Ui,responder:Bi(ir.AccountAddress),responderAmount:Ui,channelReserve:Ui,lockPeriod:Ui,ttl:ba,fee:Zi,initiatorDelegateIds:$i(Bi(...ki)),responderDelegateIds:$i(Bi(...ki)),stateHash:Fi(ir.State),nonce:ca("initiator")},{tag:ga(Hr.ChannelCloseMutualTx),version:ga(1,!0),channelId:Bi(ir.Channel),fromId:Bi(ir.AccountAddress),initiatorAmountFinal:Ui,responderAmountFinal:Ui,ttl:ba,fee:Zi,nonce:ca("fromId")},{tag:ga(Hr.ChannelCloseSoloTx),version:ga(1,!0),channelId:Bi(ir.Channel),fromId:Bi(ir.AccountAddress),payload:Fi(ir.Transaction),poi:Ea,ttl:ba,fee:Zi,nonce:ca("fromId")},{tag:ga(Hr.ChannelSlashTx),version:ga(1,!0),channelId:Bi(ir.Channel),fromId:Bi(ir.AccountAddress),payload:Fi(ir.Transaction),poi:Ea,ttl:ba,fee:Zi,nonce:ca("fromId")},{tag:ga(Hr.ChannelDepositTx),version:ga(1,!0),channelId:Bi(ir.Channel),fromId:Bi(ir.AccountAddress),amount:Ui,ttl:ba,fee:Zi,stateHash:Fi(ir.State),round:ea,nonce:ca("fromId")},{tag:ga(Hr.ChannelWithdrawTx),version:ga(1,!0),channelId:Bi(ir.Channel),toId:Bi(ir.AccountAddress),amount:Ui,ttl:ba,fee:Zi,stateHash:Fi(ir.State),round:ea,nonce:ca("fromId")},{tag:ga(Hr.ChannelSettleTx),version:ga(1,!0),channelId:Bi(ir.Channel),fromId:Bi(ir.AccountAddress),initiatorAmountFinal:Ui,responderAmountFinal:Ui,ttl:ba,fee:Zi,nonce:ca("fromId")},{tag:ga(Hr.ChannelForceProgressTx),version:ga(1,!0),channelId:Bi(ir.Channel),fromId:Bi(ir.AccountAddress),payload:Fi(ir.Transaction),round:ea,update:Fi(ir.ContractBytearray),stateHash:Fi(ir.State),offChainTrees:Fi(ir.StateTrees),ttl:ba,fee:Zi,nonce:ca("fromId")},{tag:ga(Hr.ChannelOffChainTx),version:ga(2,!0),channelId:Bi(ir.Channel),round:ea,stateHash:Fi(ir.State)},{tag:ga(Hr.ChannelSnapshotSoloTx),version:ga(1,!0),channelId:Bi(ir.Channel),fromId:Bi(ir.AccountAddress),payload:Fi(ir.Transaction),ttl:ba,fee:Zi,nonce:ca("fromId")},{tag:ga(Hr.GaAttachTx),version:ga(1,!0),ownerId:Bi(ir.AccountAddress),nonce:ca("ownerId"),code:Fi(ir.ContractBytearray),authFun:ya,ctVersion:Mi,fee:Zi,ttl:ba,gasLimit:ta,gasPrice:Yi,callData:Fi(ir.ContractBytearray)},{tag:ga(Hr.GaMetaTx),version:ga(2,!0),gaId:Bi(ir.AccountAddress),authData:Fi(ir.ContractBytearray),abiVersion:Ri,fee:Zi,gasLimit:ta,gasPrice:Yi,tx:Pa},{tag:ga(Hr.PayingForTx),version:ga(1,!0),payerId:Bi(ir.AccountAddress),nonce:ca("payerId"),fee:Zi,tx:Pa}];var qa=n(858);function Ra(e,t,n,r){const i=e.filter((e=>e.tag.constValue===n));if(0===i.length)throw new Ve(`${t[n]} (${n})`,0);if(null==r){const e=i.find((e=>e.version.constValueOptional));if(null==e)throw new te(`Can't find default schema of ${t[n]} (${n})`);r=e.version.constValue}const a=i.find((e=>e.version.constValue===r));if(null==a)throw new Ve(`${t[n]} (${n})`,r);return Object.entries(a)}function Oa(e,t,n,r,i){const a=Ra(e,t,n.tag,n.version).map((([e,t])=>t.serialize(n[e],{...n,...r},n)));return br((0,qa.encode)(a),i)}function ka(e,t,n,r,i){const a=(0,qa.decode)(vr(n)),s=+ei(a[0]),o=Ra(e,t,s,+ei(a[1]));if(null!=r&&r!==s)throw new $e(`Expected ${t[r]} tag, got ${t[s]} instead`);if(a.length!==o.length)throw new G("RLP length",o.length,a.length);return Object.fromEntries(o.map((([e,t],n)=>[e,t.deserialize(a[n],i)])))}var Ba=n(8287).Buffer,$a={serialize(e){return Ba.from([e?1:0])},deserialize(e){return 1===e[0]}};function Ua(e,t){return{serialize(e,{packEntry:n}){return vr(n({tag:Ca.Mtree,values:Object.entries(e).map((([e,r])=>({tag:Ca.MtreeValue,key:vr(e),value:vr(n({...r,tag:t}))})))}))},deserialize(n,{unpackEntry:r}){const{values:i}=r(br(n,ir.Bytearray),Ca.Mtree);return Object.fromEntries(i.filter((({key:t})=>e!==ir.ContractAddress||32===t.length)).map((({key:n,value:i})=>[br(n,e),r(br(i,ir.Bytearray),t)])))},recursiveType:!0}}var La,Ga=n(8287).Buffer;function Fa(e,t,n){Da(e,t),t.set(e,n)}function Da(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Va(e,t,n){return e.set(Ha(e,t),n),n}function ja(e,t){return e.get(Ha(e,t))}function Ha(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ja=function(e){return e[e.Branch=0]="Branch",e[e.Extension=1]="Extension",e[e.Leaf=2]="Leaf",e}(Ja||{}),Wa=new WeakMap,Ya=new WeakMap,Ka=new WeakMap,Qa=new WeakMap,Xa=new WeakMap,Za=new WeakMap,es=new WeakSet;class ts{get isComplete(){return ja(Ya,this)}constructor(e,t,n,r){var i;if(Da(this,i=es),i.add(this),Fa(this,Wa,void 0),Fa(this,Ya,!0),Fa(this,Ka,void 0),Fa(this,Qa,void 0),Fa(this,Xa,void 0),Fa(this,Za,void 0),Va(Qa,this,t),Va(Xa,this,n),Va(Za,this,r),Va(Wa,this,e[0].toString("hex")),Va(Ka,this,Object.fromEntries(e[1].map((e=>[e[0].toString("hex"),e[1]])))),null!=ja(Ka,this)[ja(Wa,this)])Object.entries(ja(Ka,this)).forEach((([e,t])=>{if(ns.call(ts,t)!==e)throw new Me;const{type:n}=rs.call(ts,t);switch(n){case Ja.Branch:t.slice(0,16).filter((e=>e.length)).forEach((e=>{null==ja(Ka,this)[e.toString("hex")]&&Va(Ya,this,!1)}));break;case Ja.Extension:if(null==ja(Ka,this)[t[1].toString("hex")])throw new qe("Can't find a node by hash in extension node");break;case Ja.Leaf:break;default:throw new te(`Unknown MPTree node type: ${n}`)}}));else{if(0!==Object.keys(ja(Ka,this)).length)throw new qe("Can't find a node by root hash");Va(Ya,this,!1)}}isEqual(e){return ja(Wa,this)===ja(Wa,e)}serialize(){return[Ga.from(ja(Wa,this),"hex"),Object.entries(ja(Ka,this)).map((([e,t])=>[Ga.from(e,"hex"),t]))]}get(e){const t=Ha(es,this,is).call(this,vr(e).toString("hex"));return null==t?t:ja(Za,this).call(this,br(t,ir.Bytearray),ja(Xa,this))}toObject(){return Object.fromEntries(Ha(es,this,as).call(this).filter((([e])=>ja(Qa,this)!==ir.ContractAddress||66!==e.length)).map((([e,t])=>[br(Ga.from(e,"hex"),ja(Qa,this)),ja(Za,this).call(this,br(t,ir.Bytearray),ja(Xa,this))])))}}function ns(e){return Ga.from(Sr((0,qa.encode)(e))).toString("hex")}function rs(e){switch(e.length){case 17:return{type:Ja.Branch,...0!==e[16].length&&{value:e[16]}};case 2:{const t=e[0][0]>>4;if(t>3)throw new Oe(t);const n=t<=1?Ja.Extension:Ja.Leaf,r=[0,2].includes(t)?2:1;return{type:n,...n===Ja.Leaf&&{value:e[1]},path:e[0].toString("hex").slice(r)}}default:throw new Re(e.length)}}function is(e){let t=ja(Wa,this),n=e;for(;;){const e=ja(Ka,this)[t];if(null==e){if(!this.isComplete)return;throw new te("Can't find node in complete tree")}const{type:r,value:i,path:a}=rs.call(La,e);switch(r){case Ja.Branch:if(0===n.length)return i;t=e[+`0x${n[0]}`].toString("hex"),n=n.substring(1);break;case Ja.Extension:if(n.substring(0,a?.length)!==a)return;t=e[1].toString("hex"),n=n.substring(a.length);break;case Ja.Leaf:if(a!==n)return;return i;default:throw new te(`Unknown MPTree node type: ${r}`)}}}function as(){const e=[],t=(n,r)=>{const i=ja(Ka,this)[n];if(null==i){if(!this.isComplete)return;throw new te("Can't find node in complete tree")}const{type:a,value:s,path:o}=rs.call(La,i);switch(a){case Ja.Branch:i.slice(0,16).map(((e,t)=>[e,t])).filter((([e])=>e.length)).forEach((([e,n])=>t(e.toString("hex"),r+n.toString(16)))),null!=s&&e.push([r,s]);break;case Ja.Extension:t(i[1].toString("hex"),r+o);break;case Ja.Leaf:if(null==s)throw new ne;e.push([r+o,s]);break;default:throw new te(`Unknown MPTree node type: ${a}`)}};return t(ja(Wa,this),""),e}function ss(e,t){return{serialize(e){return e.serialize()},deserialize(n,{unpackEntry:r}){return new ts(n,e,t,r)}}}function os(e){return{serialize(t,{packEntry:n}){return vr(n({tag:e,payload:t}))},deserialize(t,{unpackEntry:n}){return n(br(t,ir.Bytearray),e).payload},recursiveType:!0}}La=ts;const cs=$i(Vi(Ca.MtreeValue)),us=Ua(ir.ContractAddress,Ca.Contract),ls=Ua(ir.AccountAddress,Ca.Account),ps=Ua(ir.Bytearray,Ca.ContractCall),ds=Ua(ir.Channel,Ca.Channel),ms=Ua(ir.Name,Ca.Name),hs=Ua(ir.OracleAddress,Ca.Oracle),fs=[{tag:ga(Ca.Account),version:ga(1),nonce:ea,balance:Ui},{tag:ga(Ca.Account),version:ga(2,!0),flags:Ui,nonce:ea,balance:Ui,gaContract:Bi(ir.ContractAddress,ir.Name),gaAuthFun:Fi(ir.ContractBytearray)},{tag:ga(Ca.Name),version:ga(1,!0),accountId:Bi(ir.AccountAddress),nameTtl:ea,status:ya,clientTtl:ea,pointers:ma},{tag:ga(Ca.Contract),version:ga(1,!0),owner:Bi(ir.AccountAddress),ctVersion:Mi,code:Fi(ir.ContractBytearray),log:Fi(ir.ContractBytearray),active:$a,referers:$i(Bi(ir.AccountAddress)),deposit:Li},{tag:ga(Ca.ContractCall),version:ga(2,!0),callerId:Bi(ir.AccountAddress),callerNonce:ea,height:ea,contractId:Bi(ir.ContractAddress),gasPrice:Ui,gasUsed:ea,returnValue:Fi(ir.ContractBytearray),returnType:Hi(Ta),log:$i(ya)},{tag:ga(Ca.Oracle),version:ga(1,!0),accountId:Bi(ir.AccountAddress),queryFormat:wa,responseFormat:wa,queryFee:Li,oracleTtlValue:ea,abiVersion:Ri},{tag:ga(Ca.Channel),version:ga(3,!0),initiator:Bi(ir.AccountAddress),responder:Bi(ir.AccountAddress),channelAmount:Ui,initiatorAmount:Ui,responderAmount:Ui,channelReserve:Ui,initiatorDelegateIds:$i(Bi(...ki)),responderDelegateIds:$i(Bi(...ki)),stateHash:Fi(ir.State),round:ea,soloRound:Ui,lockPeriod:Ui,lockedUntil:Ui,initiatorAuth:Fi(ir.ContractBytearray),responderAuth:Fi(ir.ContractBytearray)},{tag:ga(Ca.ChannelOffChainUpdateTransfer),version:ga(1,!0),from:Bi(ir.AccountAddress),to:Bi(ir.AccountAddress),amount:Ui},{tag:ga(Ca.ChannelOffChainUpdateDeposit),version:ga(1,!0),from:Bi(ir.AccountAddress),amount:Ui},{tag:ga(Ca.ChannelOffChainUpdateWithdraw),version:ga(1,!0),from:Bi(ir.AccountAddress),amount:Ui},{tag:ga(Ca.ChannelOffChainUpdateCreateContract),version:ga(1,!0),owner:Bi(ir.AccountAddress),ctVersion:Mi,code:Fi(ir.ContractBytearray),deposit:Ui,callData:Fi(ir.ContractBytearray)},{tag:ga(Ca.ChannelOffChainUpdateCallContract),version:ga(1,!0),caller:Bi(ir.AccountAddress),contract:Bi(ir.ContractAddress),abiVersion:Ri,amount:Ui,callData:Fi(ir.ContractBytearray),callStack:ya,gasPrice:Yi,gasLimit:ta},{tag:ga(Ca.TreesPoi),version:ga(1,!0),accounts:$i(ss(ir.AccountAddress,Ca.Account)),calls:$i(ss(ir.Bytearray,Ca.ContractCall)),channels:$i(ss(ir.Channel,Ca.Channel)),contracts:$i(ss(ir.ContractAddress,Ca.Contract)),ns:$i(ss(ir.Name,Ca.Name)),oracles:$i(ss(ir.OracleAddress,Ca.Oracle))},{tag:ga(Ca.StateTrees),version:ga(0,!0),contracts:os(Ca.ContractsMtree),calls:os(Ca.CallsMtree),channels:os(Ca.ChannelsMtree),ns:os(Ca.NameserviceMtree),oracles:os(Ca.OraclesMtree),accounts:os(Ca.AccountsMtree)},{tag:ga(Ca.Mtree),version:ga(1,!0),values:cs},{tag:ga(Ca.MtreeValue),version:ga(1,!0),key:ya,value:ya},{tag:ga(Ca.ContractsMtree),version:ga(1,!0),payload:us},{tag:ga(Ca.CallsMtree),version:ga(1,!0),payload:ps},{tag:ga(Ca.ChannelsMtree),version:ga(1,!0),payload:ds},{tag:ga(Ca.NameserviceMtree),version:ga(1,!0),payload:ms},{tag:ga(Ca.OraclesMtree),version:ga(1,!0),payload:hs},{tag:ga(Ca.AccountsMtree),version:ga(1,!0),payload:ls},{tag:ga(Ca.GaMetaTxAuthData),version:ga(1,!0),fee:Li,gasPrice:Yi,txHash:Fi(ir.TxHash)}],ys=[[Ca.CallsMtree,ir.CallStateTree],[Ca.StateTrees,ir.StateTrees],[Ca.TreesPoi,ir.Poi]];function gs(e){var t;const n=null!==(t=ys.find((([t])=>t===e.tag))?.[1])&&void 0!==t?t:ir.Bytearray;return Oa(fs,Ca,e,{packEntry:gs},n)}function ws(e,t){var n;return null!==(n=t)&&void 0!==n||(t=ys.find((([,t])=>e.startsWith(t)))?.[0]),ka(fs,Ca,e,t,{unpackEntry:ws})}function Ns(e,t){return Ra(Ma,Hr,e,t)}function vs(e){return Oa(Ma,Hr,e,{unpackTx:xs,buildTx:vs,rebuildTx:t=>vs({...e,...t}),packEntry:gs},ir.Transaction)}async function bs(e){return await Promise.all(Ns(e.tag,e.version).map((async([t,n])=>{null!=n.prepare&&(e[t]=await n.prepare(e[t],e,e))}))),vs(e)}function xs(e,t){return ka(Ma,Hr,e,t,{unpackTx:xs,unpackEntry:ws})}function _s(e){return br(Sr("string"==typeof e&&e.startsWith("tx_")?vr(e):e),ir.TxHash)}function Ts(e){let t=xs(e);if(Hr.SignedTx===t.tag&&(t=t.encodedTx),Hr.ContractCreateTx!==t.tag&&Hr.GaAttachTx!==t.tag)throw new G("contractTx","a contractCreateTx or gaAttach",t.tag);return Wr(t.ownerId,t.nonce)}function Cs(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function Ss(e){const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}const As="$",Ps="_",Es=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,zs=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;function Is(e,t){var n,r;const i=e.parsedHeaders;if("HEAD"===e.request.method)return Object.assign(Object.assign({},i),{body:e.parsedBody});const a=t&&t.bodyMapper,s=Boolean(null==a?void 0:a.nullable),o=null==a?void 0:a.type.name;if("Stream"===o)return Object.assign(Object.assign({},i),{blobBody:e.blobBody,readableStreamBody:e.readableStreamBody});const c="Composite"===o&&a.type.modelProperties||{},u=Object.keys(c).some((e=>""===c[e].serializedName));if("Sequence"===o||u){const t=null!==(n=e.parsedBody)&&void 0!==n?n:[];for(const n of Object.keys(c))c[n].serializedName&&(t[n]=null===(r=e.parsedBody)||void 0===r?void 0:r[n]);if(i)for(const e of Object.keys(i))t[e]=i[e];return!s||e.parsedBody||i||0!==Object.getOwnPropertyNames(c).length?t:null}return function(e){const t=Object.assign(Object.assign({},e.headers),e.body);return e.hasNullableType&&0===Object.getOwnPropertyNames(t).length?e.shouldWrapBody?{body:null}:null:e.shouldWrapBody?Object.assign(Object.assign({},e.headers),{body:e.body}):t}({body:e.parsedBody,headers:i,hasNullableType:s,shouldWrapBody:(l=e.parsedBody,p=o,"Composite"!==p&&"Dictionary"!==p&&("string"==typeof l||"number"==typeof l||"boolean"==typeof l||null!==(null==p?void 0:p.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i))||null==l))});var l,p}class Ms{constructor(e={},t=!1){this.modelMappers=e,this.isXML=t}validateConstraints(e,t,n){const r=(e,r)=>{throw new Error(`"${n}" with value "${t}" should satisfy the constraint "${e}": ${r}.`)};if(e.constraints&&null!=t){const{ExclusiveMaximum:n,ExclusiveMinimum:i,InclusiveMaximum:a,InclusiveMinimum:s,MaxItems:o,MaxLength:c,MinItems:u,MinLength:l,MultipleOf:p,Pattern:d,UniqueItems:m}=e.constraints;if(void 0!==n&&t>=n&&r("ExclusiveMaximum",n),void 0!==i&&t<=i&&r("ExclusiveMinimum",i),void 0!==a&&t>a&&r("InclusiveMaximum",a),void 0!==s&&t<s&&r("InclusiveMinimum",s),void 0!==o&&t.length>o&&r("MaxItems",o),void 0!==c&&t.length>c&&r("MaxLength",c),void 0!==u&&t.length<u&&r("MinItems",u),void 0!==l&&t.length<l&&r("MinLength",l),void 0!==p&&t%p!=0&&r("MultipleOf",p),d){const e="string"==typeof d?new RegExp(d):d;"string"==typeof t&&null!==t.match(e)||r("Pattern",d)}m&&t.some(((e,t,n)=>n.indexOf(e)!==t))&&r("UniqueItems",m)}}serialize(e,t,n,r={xml:{}}){var i,a,s;const o={xml:{rootName:null!==(i=r.xml.rootName)&&void 0!==i?i:"",includeRoot:null!==(a=r.xml.includeRoot)&&void 0!==a&&a,xmlCharKey:null!==(s=r.xml.xmlCharKey)&&void 0!==s?s:Ps}};let c={};const u=e.type.name;n||(n=e.serializedName),null!==u.match(/^Sequence$/i)&&(c=[]),e.isConstant&&(t=e.defaultValue);const{required:l,nullable:p}=e;if(l&&p&&void 0===t)throw new Error(`${n} cannot be undefined.`);if(l&&!p&&null==t)throw new Error(`${n} cannot be null or undefined.`);if(!l&&!1===p&&null===t)throw new Error(`${n} cannot be null.`);return null==t||null!==u.match(/^any$/i)?c=t:null!==u.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)?c=function(e,t,n){if(null!=n)if(null!==e.match(/^Number$/i)){if("number"!=typeof n)throw new Error(`${t} with value ${n} must be of type number.`)}else if(null!==e.match(/^String$/i)){if("string"!=typeof n.valueOf())throw new Error(`${t} with value "${n}" must be of type string.`)}else if(null!==e.match(/^Uuid$/i)){if("string"!=typeof n.valueOf()||(r=n,!zs.test(r)))throw new Error(`${t} with value "${n}" must be of type string and a valid uuid.`)}else if(null!==e.match(/^Boolean$/i)){if("boolean"!=typeof n)throw new Error(`${t} with value ${n} must be of type boolean.`)}else if(null!==e.match(/^Stream$/i)){const e=typeof n;if(!("string"===e||"function"==typeof n.pipe||"function"==typeof n.tee||n instanceof ArrayBuffer||ArrayBuffer.isView(n)||("function"==typeof Blob||"object"==typeof Blob)&&n instanceof Blob||"function"===e))throw new Error(`${t} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`)}var r;return n}(u,n,t):null!==u.match(/^Enum$/i)?c=function(e,t,n){if(!t)throw new Error(`Please provide a set of allowedValues to validate ${e} as an Enum Type.`);if(!t.some((e=>"string"==typeof e.valueOf()?e.toLowerCase()===n.toLowerCase():e===n)))throw new Error(`${n} is not a valid value for ${e}. The valid values are: ${JSON.stringify(t)}.`);return n}(n,e.type.allowedValues,t):null!==u.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)?c=function(e,t,n){if(null!=t)if(null!==e.match(/^Date$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(null!==e.match(/^DateTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(null!==e.match(/^DateTimeRfc1123$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in RFC-1123 format.`);t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(null!==e.match(/^UnixTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`);t=function(e){if(e)return"string"==typeof e.valueOf()&&(e=new Date(e)),Math.floor(e.getTime()/1e3)}(t)}else if(null!==e.match(/^TimeSpan$/i)&&!function(e){return Es.test(e)}(t))throw new Error(`${n} must be a string in ISO 8601 format. Instead was "${t}".`);return t}(u,t,n):null!==u.match(/^ByteArray$/i)?c=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(`${e} must be of type Uint8Array.`);t=Cs(t)}return t}(n,t):null!==u.match(/^Base64Url$/i)?c=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(`${e} must be of type Uint8Array.`);t=function(e){if(e){if(!(e instanceof Uint8Array))throw new Error("Please provide an input of type Uint8Array for converting to Base64Url.");return function(e){let t=e.length;for(;t-1>=0&&"="===e[t-1];)--t;return e.substr(0,t)}(Cs(e)).replace(/\+/g,"-").replace(/\//g,"_")}}(t)}return t}(n,t):null!==u.match(/^Sequence$/i)?c=function(e,t,n,r,i,a){var s;if(!Array.isArray(n))throw new Error(`${r} must be of type Array.`);let o=t.type.element;if(!o||"object"!=typeof o)throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${r}.`);"Composite"===o.type.name&&o.type.className&&(o=null!==(s=e.modelMappers[o.type.className])&&void 0!==s?s:o);const c=[];for(let t=0;t<n.length;t++){const s=e.serialize(o,n[t],r,a);if(i&&o.xmlNamespace){const e=o.xmlNamespacePrefix?`xmlns:${o.xmlNamespacePrefix}`:"xmlns";"Composite"===o.type.name?(c[t]=Object.assign({},s),c[t][As]={[e]:o.xmlNamespace}):(c[t]={},c[t][a.xml.xmlCharKey]=s,c[t][As]={[e]:o.xmlNamespace})}else c[t]=s}return c}(this,e,t,n,Boolean(this.isXML),o):null!==u.match(/^Dictionary$/i)?c=function(e,t,n,r,i,a){if("object"!=typeof n)throw new Error(`${r} must be of type object.`);const s=t.type.value;if(!s||"object"!=typeof s)throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${r}.`);const o={};for(const t of Object.keys(n)){const c=e.serialize(s,n[t],r,a);o[t]=Bs(s,c,i,a)}if(i&&t.xmlNamespace){const e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns",n=o;return n[As]={[e]:t.xmlNamespace},n}return o}(this,e,t,n,Boolean(this.isXML),o):null!==u.match(/^Composite$/i)&&(c=function(e,t,n,r,i,a){if(Ls(e,t)&&(t=Us(e,t,n,"clientName")),null!=n){const s={},o=ks(e,t,r);for(const c of Object.keys(o)){const u=o[c];if(u.readOnly)continue;let l,p=s;if(e.isXML)l=u.xmlIsWrapped?u.xmlName:u.xmlElementName||u.xmlName;else{const e=Rs(u.serializedName);l=e.pop();for(const t of e){null==p[t]&&(void 0!==n[c]&&null!==n[c]||void 0!==u.defaultValue)&&(p[t]={}),p=p[t]}}if(null!=p){if(i&&t.xmlNamespace){const e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns";p[As]=Object.assign(Object.assign({},p[As]),{[e]:t.xmlNamespace})}const s=""!==u.serializedName?r+"."+u.serializedName:r;let o=n[c];const d=Ls(e,t);d&&d.clientName===c&&null==o&&(o=t.serializedName);const m=e.serialize(u,o,s,a);if(void 0!==m&&null!=l){const e=Bs(u,m,i,a);i&&u.xmlIsAttribute?(p[As]=p[As]||{},p[As][l]=m):i&&u.xmlIsWrapped?p[l]={[u.xmlElementName]:e}:p[l]=e}}}const c=function(e,t,n){const r=t.type.additionalProperties;if(!r&&t.type.className){const r=Os(e,t,n);return null==r?void 0:r.type.additionalProperties}return r}(e,t,r);if(c){const t=Object.keys(o);for(const i in n)t.every((e=>e!==i))&&(s[i]=e.serialize(c,n[i],r+'["'+i+'"]',a))}return s}return n}(this,e,t,n,Boolean(this.isXML),o)),c}deserialize(e,t,n,r={xml:{}}){var i,a,s,o;const c={xml:{rootName:null!==(i=r.xml.rootName)&&void 0!==i?i:"",includeRoot:null!==(a=r.xml.includeRoot)&&void 0!==a&&a,xmlCharKey:null!==(s=r.xml.xmlCharKey)&&void 0!==s?s:Ps},ignoreUnknownProperties:null!==(o=r.ignoreUnknownProperties)&&void 0!==o&&o};if(null==t)return this.isXML&&"Sequence"===e.type.name&&!e.xmlIsWrapped&&(t=[]),void 0!==e.defaultValue&&(t=e.defaultValue),t;let u;const l=e.type.name;if(n||(n=e.serializedName),null!==l.match(/^Composite$/i))u=function(e,t,n,r,i){var a,s;const o=null!==(a=i.xml.xmlCharKey)&&void 0!==a?a:Ps;Ls(e,t)&&(t=Us(e,t,n,"serializedName"));const c=ks(e,t,r);let u={};const l=[];for(const a of Object.keys(c)){const p=c[a],d=Rs(c[a].serializedName);l.push(d[0]);const{serializedName:m,xmlName:h,xmlElementName:f}=p;let y=r;""!==m&&void 0!==m&&(y=r+"."+m);const g=p.headerCollectionPrefix;if(g){const t={};for(const r of Object.keys(n))r.startsWith(g)&&(t[r.substring(g.length)]=e.deserialize(p.type.value,n[r],y,i)),l.push(r);u[a]=t}else if(e.isXML)if(p.xmlIsAttribute&&n[As])u[a]=e.deserialize(p,n[As][h],y,i);else if(p.xmlIsMsText)void 0!==n[o]?u[a]=n[o]:"string"==typeof n&&(u[a]=n);else{const t=f||h||m;if(p.xmlIsWrapped){const t=n[h],r=null!==(s=null==t?void 0:t[f])&&void 0!==s?s:[];u[a]=e.deserialize(p,r,y,i),l.push(h)}else{const r=n[t];u[a]=e.deserialize(p,r,y,i),l.push(t)}}else{let r,s=n,o=0;for(const e of d){if(!s)break;o++,s=s[e]}null===s&&o<d.length&&(s=void 0),r=s;const l=t.type.polymorphicDiscriminator;let m;if(l&&a===l.clientName&&null==r&&(r=t.serializedName),Array.isArray(n[a])&&""===c[a].serializedName){r=n[a];const t=e.deserialize(p,r,y,i);for(const[e,n]of Object.entries(u))Object.prototype.hasOwnProperty.call(t,e)||(t[e]=n);u=t}else void 0===r&&void 0===p.defaultValue||(m=e.deserialize(p,r,y,i),u[a]=m)}}const p=t.type.additionalProperties;if(p){const t=e=>{for(const t in c)if(Rs(c[t].serializedName)[0]===e)return!1;return!0};for(const a in n)t(a)&&(u[a]=e.deserialize(p,n[a],r+'["'+a+'"]',i))}else if(n&&!i.ignoreUnknownProperties)for(const e of Object.keys(n))void 0!==u[e]||l.includes(e)||$s(e,i)||(u[e]=n[e]);return u}(this,e,t,n,c);else{if(this.isXML){const e=c.xml.xmlCharKey;void 0!==t[As]&&void 0!==t[e]&&(t=t[e])}null!==l.match(/^Number$/i)?(u=parseFloat(t),isNaN(u)&&(u=t)):null!==l.match(/^Boolean$/i)?u="true"===t||"false"!==t&&t:null!==l.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)?u=t:null!==l.match(/^(Date|DateTime|DateTimeRfc1123)$/i)?u=new Date(t):null!==l.match(/^UnixTime$/i)?u=function(e){if(e)return new Date(1e3*e)}(t):null!==l.match(/^ByteArray$/i)?u=Ss(t):null!==l.match(/^Base64Url$/i)?u=function(e){if(e){if(e&&"string"!=typeof e.valueOf())throw new Error("Please provide an input of type string for converting to Uint8Array");return Ss(e=e.replace(/-/g,"+").replace(/_/g,"/"))}}(t):null!==l.match(/^Sequence$/i)?u=function(e,t,n,r,i){var a;let s=t.type.element;if(!s||"object"!=typeof s)throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${r}`);if(n){Array.isArray(n)||(n=[n]),"Composite"===s.type.name&&s.type.className&&(s=null!==(a=e.modelMappers[s.type.className])&&void 0!==a?a:s);const t=[];for(let a=0;a<n.length;a++)t[a]=e.deserialize(s,n[a],`${r}[${a}]`,i);return t}return n}(this,e,t,n,c):null!==l.match(/^Dictionary$/i)&&(u=function(e,t,n,r,i){const a=t.type.value;if(!a||"object"!=typeof a)throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${r}`);if(n){const t={};for(const s of Object.keys(n))t[s]=e.deserialize(a,n[s],r,i);return t}return n}(this,e,t,n,c))}return e.isConstant&&(u=e.defaultValue),u}}function qs(e={},t=!1){return new Ms(e,t)}function Rs(e){const t=[];let n="";if(e){const r=e.split(".");for(const e of r)"\\"===e.charAt(e.length-1)?n+=e.substr(0,e.length-1)+".":(n+=e,t.push(n),n="")}return t}function Os(e,t,n){const r=t.type.className;if(!r)throw new Error(`Class name for model "${n}" is not provided in the mapper "${JSON.stringify(t,void 0,2)}".`);return e.modelMappers[r]}function ks(e,t,n){let r=t.type.modelProperties;if(!r){const i=Os(e,t,n);if(!i)throw new Error(`mapper() cannot be null or undefined for model "${t.type.className}".`);if(r=null==i?void 0:i.type.modelProperties,!r)throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(i)}" of type "${t.type.className}" for object "${n}".`)}return r}function Bs(e,t,n,r){if(!n||!e.xmlNamespace)return t;const i=e.xmlNamespacePrefix?`xmlns:${e.xmlNamespacePrefix}`:"xmlns",a={[i]:e.xmlNamespace};if(["Composite"].includes(e.type.name)){if(t[As])return t;{const e=Object.assign({},t);return e[As]=a,e}}const s={};return s[r.xml.xmlCharKey]=t,s[As]=a,s}function $s(e,t){return[As,t.xml.xmlCharKey].includes(e)}function Us(e,t,n,r){var i;const a=Ls(e,t);if(a){let s=a[r];if(s){"serializedName"===r&&(s=s.replace(/\\/gi,""));const a=n[s],o=null!==(i=t.type.uberParent)&&void 0!==i?i:t.type.className;if("string"==typeof a&&o){const n=function(e,t,n){const r=[n];for(;r.length;){const n=r.shift(),i=t===n?t:n+"."+t;if(Object.prototype.hasOwnProperty.call(e,i))return e[i];for(const[t,i]of Object.entries(e))t.startsWith(n+".")&&i.type.uberParent===n&&i.type.className&&r.push(i.type.className)}}(e.modelMappers.discriminators,a,o);n&&(t=n)}}}return t}function Ls(e,t){return t.type.polymorphicDiscriminator||Gs(e,t.type.uberParent)||Gs(e,t.type.className)}function Gs(e,t){return t&&e.modelMappers[t]&&e.modelMappers[t].type.polymorphicDiscriminator}const Fs="Sequence",Ds="Stream",Vs={operationRequestMap:new WeakMap};function js(e,t,n){let r=t.parameterPath;const i=t.mapper;let a;if("string"==typeof r&&(r=[r]),Array.isArray(r)){if(r.length>0)if(i.isConstant)a=i.defaultValue;else{let t=Hs(e,r);!t.propertyFound&&n&&(t=Hs(n,r));let s=!1;t.propertyFound||(s=i.required||"options"===r[0]&&2===r.length),a=s?i.defaultValue:t.propertyValue}}else{i.required&&(a={});for(const t in r){const s=i.type.modelProperties[t],o=js(e,{parameterPath:r[t],mapper:s},n);void 0!==o&&(a||(a={}),a[t]=o)}}return a}function Hs(e,t){const n={propertyFound:!1};let r=0;for(;r<t.length;++r){const n=t[r];if(!e||!(n in e))break;e=e[n]}return r===t.length&&(n.propertyValue=e,n.propertyFound=!0),n}const Js=Symbol.for("@azure/core-client original request");function Ws(e){if(function(e){return Js in e}(e))return Ws(e[Js]);let t=Vs.operationRequestMap.get(e);return t||(t={},Vs.operationRequestMap.set(e,t)),t}const Ys=["application/json","text/json"],Ks=["application/xml","application/atom+xml"];function Qs(e){const{parameterPath:t,mapper:n}=e;let r;return r="string"==typeof t?t:Array.isArray(t)?t.join("."):n.serializedName,r}function Xs(e={}){const t=kn(null!=e?e:{});return e.credentialOptions&&t.addPolicy(function(e){var t;const{credential:n,scopes:r,challengeCallbacks:i}=e,a=e.logger||Mt,s=Object.assign({authorizeRequest:null!==(t=null==i?void 0:i.authorizeRequest)&&void 0!==t?t:Gn,authorizeRequestOnChallenge:null==i?void 0:i.authorizeRequestOnChallenge},i),o=n?function(e,t){let n,r=null,i=null;const a=Object.assign(Object.assign({},Ln),t),s={get isRefreshing(){return null!==r},get shouldRefresh(){var e;return!s.isRefreshing&&(!!((null==i?void 0:i.refreshAfterTimestamp)&&i.refreshAfterTimestamp<Date.now())||(null!==(e=null==i?void 0:i.expiresOnTimestamp)&&void 0!==e?e:0)-a.refreshWindowInMs<Date.now())},get mustRefresh(){return null===i||i.expiresOnTimestamp-a.forcedRefreshWindowInMs<Date.now()}};function o(t,o){var c;return s.isRefreshing||(r=async function(e,t,n){async function r(){if(!(Date.now()<n)){const t=await e();if(null===t)throw new Error("Failed to refresh access token.");return t}try{return await e()}catch(e){return null}}let i=await r();for(;null===i;)await yn(t),i=await r();return i}((()=>e.getToken(t,o)),a.retryIntervalInMs,null!==(c=null==i?void 0:i.expiresOnTimestamp)&&void 0!==c?c:Date.now()).then((e=>(r=null,i=e,n=o.tenantId,i))).catch((e=>{throw r=null,i=null,n=void 0,e}))),r}return async(e,t)=>{const r=Boolean(t.claims),a=n!==t.tenantId;return r&&(i=null),a||r||s.mustRefresh?o(e,t):(s.shouldRefresh&&o(e,t),i)}}(n):()=>Promise.resolve(null);return{name:"bearerTokenAuthenticationPolicy",async sendRequest(e,t){if(!e.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");let n,i;await s.authorizeRequest({scopes:Array.isArray(r)?r:[r],request:e,getAccessToken:o,logger:a});try{n=await t(e)}catch(e){i=e,n=e.response}if(s.authorizeRequestOnChallenge&&401===(null==n?void 0:n.status)&&function(e){const t=e.headers.get("WWW-Authenticate");if(401===e.status&&t)return t}(n)&&await s.authorizeRequestOnChallenge({scopes:Array.isArray(r)?r:[r],request:e,response:n,getAccessToken:o,logger:a}))return t(e);if(i)throw i;return n}}}({credential:e.credentialOptions.credential,scopes:e.credentialOptions.credentialScopes})),t.addPolicy(function(e={}){const t=e.stringifyXML;return{name:"serializationPolicy",async sendRequest(e,n){const r=Ws(e),i=null==r?void 0:r.operationSpec,a=null==r?void 0:r.operationArguments;return i&&a&&(function(e,t,n){var r,i;if(n.headerParameters)for(const r of n.headerParameters){let i=js(t,r);if(null!=i||r.mapper.required){i=n.serializer.serialize(r.mapper,i,Qs(r));const t=r.mapper.headerCollectionPrefix;if(t)for(const n of Object.keys(i))e.headers.set(t+n,i[n]);else e.headers.set(r.mapper.serializedName||Qs(r),i)}}const a=null===(i=null===(r=t.options)||void 0===r?void 0:r.requestOptions)||void 0===i?void 0:i.customHeaders;if(a)for(const t of Object.keys(a))e.headers.set(t,a[t])}(e,a,i),function(e,t,n,r=function(){throw new Error("XML serialization unsupported!")}){var i,a,s,o,c;const u=null===(i=t.options)||void 0===i?void 0:i.serializerOptions,l={xml:{rootName:null!==(a=null==u?void 0:u.xml.rootName)&&void 0!==a?a:"",includeRoot:null!==(s=null==u?void 0:u.xml.includeRoot)&&void 0!==s&&s,xmlCharKey:null!==(o=null==u?void 0:u.xml.xmlCharKey)&&void 0!==o?o:Ps}},p=l.xml.xmlCharKey;if(n.requestBody&&n.requestBody.mapper){e.body=js(t,n.requestBody);const i=n.requestBody.mapper,{required:a,serializedName:s,xmlName:o,xmlElementName:u,xmlNamespace:d,xmlNamespacePrefix:m,nullable:h}=i,f=i.type.name;try{if(void 0!==e.body&&null!==e.body||h&&null===e.body||a){const t=Qs(n.requestBody);e.body=n.serializer.serialize(i,e.body,t,l);const a=f===Ds;if(n.isXML){const t=m?`xmlns:${m}`:"xmlns",n=function(e,t,n,r,i){if(e&&!["Composite","Sequence","Dictionary"].includes(n)){const n={};return n[i.xml.xmlCharKey]=r,n[As]={[t]:e},n}return r}(d,t,f,e.body,l);f===Fs?e.body=r(function(e,t,n,r){if(Array.isArray(e)||(e=[e]),!n||!r)return{[t]:e};const i={[t]:e};return i[As]={[n]:r},i}(n,u||o||s,t,d),{rootName:o||s,xmlCharKey:p}):a||(e.body=r(n,{rootName:o||s,xmlCharKey:p}))}else{if("String"===f&&((null===(c=n.contentType)||void 0===c?void 0:c.match("text/plain"))||"text"===n.mediaType))return;a||(e.body=JSON.stringify(e.body))}}}catch(e){throw new Error(`Error "${e.message}" occurred in serializing the payload - ${JSON.stringify(s,void 0," ")}.`)}}else if(n.formDataParameters&&n.formDataParameters.length>0){e.formData={};for(const r of n.formDataParameters){const i=js(t,r);if(null!=i){const t=r.mapper.serializedName||Qs(r);e.formData[t]=n.serializer.serialize(r.mapper,i,Qs(r),l)}}}}(e,a,i,t)),n(e)}}}(e.serializationOptions),{phase:"Serialize"}),t.addPolicy(function(e={}){var t,n,r,i,a,s,o;const c=null!==(n=null===(t=e.expectedContentTypes)||void 0===t?void 0:t.json)&&void 0!==n?n:Ys,u=null!==(i=null===(r=e.expectedContentTypes)||void 0===r?void 0:r.xml)&&void 0!==i?i:Ks,l=e.parseXML,p=e.serializerOptions,d={xml:{rootName:null!==(a=null==p?void 0:p.xml.rootName)&&void 0!==a?a:"",includeRoot:null!==(s=null==p?void 0:p.xml.includeRoot)&&void 0!==s&&s,xmlCharKey:null!==(o=null==p?void 0:p.xml.xmlCharKey)&&void 0!==o?o:Ps}};return{name:"deserializationPolicy",async sendRequest(e,t){const n=await t(e);return async function(e,t,n,r,i){const a=await async function(e,t,n,r,i){var a;if(!(null===(a=n.request.streamResponseStatusCodes)||void 0===a?void 0:a.has(n.status))&&n.bodyAsText){const a=n.bodyAsText,s=n.headers.get("Content-Type")||"",o=s?s.split(";").map((e=>e.toLowerCase())):[];try{if(0===o.length||o.some((t=>-1!==e.indexOf(t))))return n.parsedBody=JSON.parse(a),n;if(o.some((e=>-1!==t.indexOf(e)))){if(!i)throw new Error("Parsing XML not supported.");const e=await i(a,r.xml);return n.parsedBody=e,n}}catch(e){const t=`Error "${e}" occurred while parsing the response body - ${n.bodyAsText}.`,r=e.code||On.PARSE_ERROR;throw new On(t,{code:r,statusCode:n.status,request:n.request,response:n})}}return n}(e,t,n,r,i);if(!function(e){const t=Ws(e.request),n=null==t?void 0:t.shouldDeserialize;let r;return r=void 0===n||("boolean"==typeof n?n:n(e)),r}(a))return a;const s=Ws(a.request),o=null==s?void 0:s.operationSpec;if(!o||!o.responses)return a;const c=function(e){let t;const n=Ws(e.request),r=null==n?void 0:n.operationSpec;return r&&(t=(null==n?void 0:n.operationResponseGetter)?null==n?void 0:n.operationResponseGetter(r,e):r.responses[e.status]),t}(a),{error:u,shouldReturnResponse:l}=function(e,t,n,r){var i;const a=200<=e.status&&e.status<300,s=function(e){const t=Object.keys(e.responses);return 0===t.length||1===t.length&&"default"===t[0]}(t)?a:!!n;if(s){if(!n)return{error:null,shouldReturnResponse:!1};if(!n.isError)return{error:null,shouldReturnResponse:!1}}const o=null!=n?n:t.responses.default,c=(null===(i=e.request.streamResponseStatusCodes)||void 0===i?void 0:i.has(e.status))?`Unexpected status code: ${e.status}`:e.bodyAsText,u=new On(c,{statusCode:e.status,request:e.request,response:e});if(!o)throw u;const l=o.bodyMapper,p=o.headersMapper;try{if(e.parsedBody){const n=e.parsedBody;let i;if(l){let e=n;if(t.isXML&&l.type.name===Fs){e=[];const t=l.xmlElementName;"object"==typeof n&&t&&(e=n[t])}i=t.serializer.deserialize(l,e,"error.response.parsedBody",r)}const a=n.error||i||n;u.code=a.code,a.message&&(u.message=a.message),l&&(u.response.parsedBody=i)}e.headers&&p&&(u.response.parsedHeaders=t.serializer.deserialize(p,e.headers.toJSON(),"operationRes.parsedHeaders"))}catch(t){u.message=`Error "${t.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:u,shouldReturnResponse:!1}}(a,o,c,r);if(u)throw u;if(l)return a;if(c){if(c.bodyMapper){let e=a.parsedBody;o.isXML&&c.bodyMapper.type.name===Fs&&(e="object"==typeof e?e[c.bodyMapper.xmlElementName]:[]);try{a.parsedBody=o.serializer.deserialize(c.bodyMapper,e,"operationRes.parsedBody",r)}catch(e){throw new On(`Error ${e} occurred in deserializing the responseBody - ${a.bodyAsText}`,{statusCode:a.status,request:a.request,response:a})}}else"HEAD"===o.httpMethod&&(a.parsedBody=n.status>=200&&n.status<300);c.headersMapper&&(a.parsedHeaders=o.serializer.deserialize(c.headersMapper,a.headers.toJSON(),"operationRes.parsedHeaders",{xml:{},ignoreUnknownProperties:!0}))}return a}(c,u,n,d,l)}}}(e.deserializationOptions),{phase:"Deserialize"}),t}let Zs;const eo={CSV:",",SSV:" ",Multi:"Multi",TSV:"\t",Pipes:"|"};function to(e,t,n,r){const i=function(e,t,n){var r;const i=new Map;if(null===(r=e.urlParameters)||void 0===r?void 0:r.length)for(const r of e.urlParameters){let a=js(t,r,n);const s=Qs(r);a=e.serializer.serialize(r.mapper,a,s),r.skipEncoding||(a=encodeURIComponent(a)),i.set(`{${r.mapper.serializedName||s}}`,a)}return i}(t,n,r);let a=!1,s=no(e,i);if(t.path){let e=no(t.path,i);"/{nextLink}"===t.path&&e.startsWith("/")&&(e=e.substring(1)),e.includes("://")?(s=e,a=!0):s=function(e,t){if(!t)return e;const n=new URL(e);let r=n.pathname;r.endsWith("/")||(r=`${r}/`),t.startsWith("/")&&(t=t.substring(1));const i=t.indexOf("?");if(-1!==i){const e=t.substring(0,i),a=t.substring(i+1);r+=e,a&&(n.search=n.search?`${n.search}&${a}`:a)}else r+=t;return n.pathname=r,n.toString()}(s,e)}const{queryParams:o,sequenceParams:c}=function(e,t,n){var r;const i=new Map,a=new Set;if(null===(r=e.queryParameters)||void 0===r?void 0:r.length)for(const r of e.queryParameters){"Sequence"===r.mapper.type.name&&r.mapper.serializedName&&a.add(r.mapper.serializedName);let s=js(t,r,n);if(null!=s||r.mapper.required){s=e.serializer.serialize(r.mapper,s,Qs(r));const t=r.collectionFormat?eo[r.collectionFormat]:"";if(Array.isArray(s)&&(s=s.map((e=>null==e?"":e))),"Multi"===r.collectionFormat&&0===s.length)continue;!Array.isArray(s)||"SSV"!==r.collectionFormat&&"TSV"!==r.collectionFormat||(s=s.join(t)),r.skipEncoding||(s=Array.isArray(s)?s.map((e=>encodeURIComponent(e))):encodeURIComponent(s)),!Array.isArray(s)||"CSV"!==r.collectionFormat&&"Pipes"!==r.collectionFormat||(s=s.join(t)),i.set(r.mapper.serializedName||Qs(r),s)}}return{queryParams:i,sequenceParams:a}}(t,n,r);return s=function(e,t,n,r=!1){if(0===t.size)return e;const i=new URL(e),a=function(e){const t=new Map;if(!e||"?"!==e[0])return t;const n=(e=e.slice(1)).split("&");for(const e of n){const[n,r]=e.split("=",2),i=t.get(n);i?Array.isArray(i)?i.push(r):t.set(n,[i,r]):t.set(n,r)}return t}(i.search);for(const[e,i]of t){const t=a.get(e);if(Array.isArray(t))if(Array.isArray(i)){t.push(...i);const n=new Set(t);a.set(e,Array.from(n))}else t.push(i);else t?(Array.isArray(i)?i.unshift(t):n.has(e)&&a.set(e,[t,i]),r||a.set(e,i)):a.set(e,i)}const s=[];for(const[e,t]of a)if("string"==typeof t)s.push(`${e}=${t}`);else if(Array.isArray(t))for(const n of t)s.push(`${e}=${n}`);else s.push(`${e}=${t}`);return i.search=s.length?`?${s.join("&")}`:"",i.toString()}(s,o,c,a),s}function no(e,t){let n=e;for(const[e,r]of t)n=n.split(e).join(r);return n}const ro=At("core-client");class io{constructor(e={}){var t,n;if(this._requestContentType=e.requestContentType,this._endpoint=null!==(t=e.endpoint)&&void 0!==t?t:e.baseUri,e.baseUri&&ro.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."),this._allowInsecureConnection=e.allowInsecureConnection,this._httpClient=e.httpClient||(Zs||(Zs=new Bn),Zs),this.pipeline=e.pipeline||function(e){const t=function(e){if(e.credentialScopes)return e.credentialScopes;if(e.endpoint)return`${e.endpoint}/.default`;if(e.baseUri)return`${e.baseUri}/.default`;if(e.credential&&!e.credentialScopes)throw new Error("When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy")}(e),n=e.credential&&t?{credentialScopes:t,credential:e.credential}:void 0;return Xs(Object.assign(Object.assign({},e),{credentialOptions:n}))}(e),null===(n=e.additionalPolicies)||void 0===n?void 0:n.length)for(const{policy:t,position:n}of e.additionalPolicies){const e="perRetry"===n?"Sign":void 0;this.pipeline.addPolicy(t,{afterPhase:e})}}async sendRequest(e){return this.pipeline.sendRequest(this._httpClient,e)}async sendOperationRequest(e,t){const n=t.baseUrl||this._endpoint;if(!n)throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use.");const r=function(e){return new Un(e)}({url:to(n,t,e,this)});r.method=t.httpMethod;const i=Ws(r);i.operationSpec=t,i.operationArguments=e;const a=t.contentType||this._requestContentType;a&&t.requestBody&&r.headers.set("Content-Type",a);const s=e.options;if(s){const e=s.requestOptions;e&&(e.timeout&&(r.timeout=e.timeout),e.onUploadProgress&&(r.onUploadProgress=e.onUploadProgress),e.onDownloadProgress&&(r.onDownloadProgress=e.onDownloadProgress),void 0!==e.shouldDeserialize&&(i.shouldDeserialize=e.shouldDeserialize),e.allowInsecureConnection&&(r.allowInsecureConnection=!0)),s.abortSignal&&(r.abortSignal=s.abortSignal),s.tracingOptions&&(r.tracingOptions=s.tracingOptions)}this._allowInsecureConnection&&(r.allowInsecureConnection=!0),void 0===r.streamResponseStatusCodes&&(r.streamResponseStatusCodes=function(e){const t=new Set;for(const n in e.responses){const r=e.responses[n];r.bodyMapper&&r.bodyMapper.type.name===Ds&&t.add(Number(n))}return t}(t));try{const e=await this.sendRequest(r),n=Is(e,t.responses[e.status]);return(null==s?void 0:s.onResponse)&&s.onResponse(e,n),n}catch(e){if("object"==typeof e&&(null==e?void 0:e.response)){const n=e.response,r=Is(n,t.responses[e.statusCode]||t.responses.default);e.details=r,(null==s?void 0:s.onResponse)&&s.onResponse(n,r,e)}throw e}}}function ao(e,t){const n=e=>e.split(/[-+]/)[0].split(".").map((e=>+e)),r=n(e),i=n(t),a=Math.max(...r,...i)+1,s=e=>e.reverse().reduce(((e,t,n)=>e+t*a**n),0);return s(r)-s(i)}function so(e,t,n){return ao(e,t)>=0&&(null==n||ao(e,n)<0)}const oo="_sdk-big-int-",co=(...e)=>{const t=qs(...e),{serialize:n,deserialize:r}=t;return Object.assign(t,{serialize(...[e,t,r,i]){if("BigInt"!==e.type.name||null==t)return n.call(this,e,t,r,i);var a;if("bigint"!=typeof t)throw null!==(a=r)&&void 0!==a||(r=e.serializedName),new Error(`${r} with value ${t} must be of type bigint.`);return t.toString()},deserialize(...[e,t,n,i]){if("BigInt"!==e.type.name||null==t){"string"==typeof t&&t.startsWith(oo)&&(console.warn(`AeSdk internal error: BigInt value ${t} handled incorrectly`),t=+t.replace(oo,""));const a=r.call(this,e,t,n,i);return a instanceof Date?new Date(+a/1e3):a}if("number"==typeof t&&t>Number.MAX_SAFE_INTEGER)throw new te(`Number ${t} is not accurate to be converted to BigInt`);return BigInt(t.toString().replace(oo,""))}})},uo=Number.MAX_SAFE_INTEGER.toString().length,lo=new RegExp(String.raw`("\w+":\s*)(\d{${uo},})(\s*[,}])`,"m"),po=new RegExp(String.raw`([[,]\s*)(\d{${uo},})\b`,"m"),mo={name:"parse-big-int",async sendRequest(e,t){const n=await t(e);return null==n.bodyAsText||(n.bodyAsText=n.bodyAsText.replaceAll(new RegExp(lo,"g"),(e=>{const t=e.match(lo);if(null==t)throw new ne;const[,n,r,i]=t;return[n,+r>Number.MAX_SAFE_INTEGER?`"${oo}${r}"`:r,i].join("")})),n.bodyAsText=n.bodyAsText.replaceAll(new RegExp(po,"g"),(e=>{const t=e.match(po);if(null==t)throw new ne;const[,n,r]=t;return`${n}"${oo}${r}"`}))),n}},ho=()=>{const e=new Map;return{policy:{name:"request-queues",async sendRequest(t,n){var r;const i=t.headers.get("__queue");t.headers.delete("__queue");const a=async()=>n(t);if(null==i)return a();const s=(null!==(r=e.get(i))&&void 0!==r?r:Promise.resolve()).then(a);return e.set(i,s.catch((()=>{}))),s}},position:"perCall"}},fo=()=>{const e=new Map;return{policy:{name:"combine-get-requests",async sendRequest(t,n){var r;if("GET"!==t.method)return n(t);const i=JSON.stringify([t.url,t.body]),a=null!==(r=e.get(i))&&void 0!==r?r:n(t);e.set(i,a);try{return await a}finally{e.delete(i)}}},position:"perCall"}},yo=()=>{const e=new Map;return{policy:{name:"aggressive-cache-get-responses",async sendRequest(t,n){var r;if("GET"!==t.method)return n(t);const i=JSON.stringify([t.url,t.body]),a=null!==(r=e.get(i))&&void 0!==r?r:n(t);return e.set(i,a),a}},position:"perCall"}},go=e=>({policy:{name:"error-formatter",async sendRequest(t,n){try{return await n(t)}catch(t){if(!(t instanceof On)||null==t.request||t.message.startsWith("Error "))throw t;const n=`${new URL(t.request.url).pathname.slice(1)} error`;if(null==t.response?.bodyAsText)throw""===t.message&&(t.message=`${n}: ${t.code}`),t;const r=t.response.parsedBody;t.message=n;const i=null==r?` ${t.response.status} status code`:e(r);throw""!==i&&(t.message+=`:${i}`),t}}},position:"perCall"}),wo=(e,t,n,r)=>({policy:{name:"version-check",async sendRequest(i,a){if(i.headers.has("__version-check"))return i.headers.delete("__version-check"),a(i);const s=[await t({requestOptions:{customHeaders:{"__version-check":"true"}}}),n,r];if(!so(...s))throw new Z(e,...s);return a(i)}},position:"perCall"}),No=(e,t)=>({policy:{name:"retry-on-failure",async sendRequest(n,r){var i;const a=null!==(i=n.headers.get("__retry-code"))&&void 0!==i?i:NaN;n.headers.delete("__retry-code");const s=[200,400,403,410,500].filter((e=>e!==+a)),o=new Array(e).fill(0).map(((t,n)=>((n+1)/e)**2)),c=o.reduce(((e,t)=>e+t),0),u=o.map((e=>Math.floor(e/c*t)));let l=new On("Not expected to be thrown");for(let t=0;t<=e;t+=1){if(0!==t){await Dn(u[t-1]);const e=new URL(n.url);e.searchParams.set("__sdk-retry",t.toString()),n.url=e.toString()}try{return await r(n)}catch(e){var p;if(!(e instanceof On))throw e;if(s.includes(null!==(p=e.response?.status)&&void 0!==p?p:0))throw e;l=e}}throw l}},position:"perCall"}),vo={type:{name:"Composite",className:"Account",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},balance:{constraints:{InclusiveMinimum:0},serializedName:"balance",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},payable:{serializedName:"payable",type:{name:"Boolean"}},kind:{serializedName:"kind",type:{name:"Enum",allowedValues:["basic","generalized"]}},contractId:{serializedName:"contract_id",type:{name:"String"}},authFun:{serializedName:"auth_fun",type:{name:"String"}}}}},bo={type:{name:"Composite",className:"ErrorModel",modelProperties:{reason:{serializedName:"reason",required:!0,type:{name:"String"}},errorCode:{serializedName:"error_code",type:{name:"String"}}}}},xo={type:{name:"Composite",className:"NextNonceResponse",modelProperties:{nextNonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"next_nonce",required:!0,type:{name:"Number"}}}}},_o={type:{name:"Composite",className:"SignedTxs",modelProperties:{transactions:{serializedName:"transactions",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"SignedTx"}}}}}}},To={type:{name:"Composite",className:"SignedTx",modelProperties:{tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}},blockHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:-1},serializedName:"block_height",required:!0,type:{name:"Number"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},hash:{serializedName:"hash",required:!0,type:{name:"String"}},encodedTx:{serializedName:"encoded_tx",type:{name:"String"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Co={type:{name:"Composite",className:"Tx",modelProperties:{recipientId:{serializedName:"recipient_id",type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",type:{name:"String"}},initiatorId:{serializedName:"initiator_id",type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",type:{name:"BigInt"}},responderId:{serializedName:"responder_id",type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",type:{name:"Number"}},stateHash:{serializedName:"state_hash",type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}},channelId:{serializedName:"channel_id",type:{name:"String"}},fromId:{serializedName:"from_id",type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",type:{name:"Number"}},toId:{serializedName:"to_id",type:{name:"String"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",type:{name:"BigInt"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",type:{name:"BigInt"}},poi:{serializedName:"poi",type:{name:"String"}},initiatorDelegateIds:{serializedName:"initiator_delegate_ids",type:{name:"Sequence",element:{type:{name:"String"}}}},responderDelegateIds:{serializedName:"responder_delegate_ids",type:{name:"Sequence",element:{type:{name:"String"}}}},queryFormat:{serializedName:"query_format",type:{name:"String"}},responseFormat:{serializedName:"response_format",type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},accountId:{serializedName:"account_id",type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",type:{name:"String"}},query:{serializedName:"query",type:{name:"String"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},queryId:{serializedName:"query_id",type:{name:"String"}},response:{serializedName:"response",type:{name:"String"}},commitmentId:{serializedName:"commitment_id",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},nameSalt:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},nameId:{serializedName:"name_id",type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",type:{name:"Number"}},pointers:{serializedName:"pointers",type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",type:{name:"Number"}},ownerId:{serializedName:"owner_id",type:{name:"String"}},code:{serializedName:"code",type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",type:{name:"BigInt"}},callData:{serializedName:"call_data",type:{name:"String"}},callerId:{serializedName:"caller_id",type:{name:"String"}},contractId:{serializedName:"contract_id",type:{name:"String"}},authFun:{constraints:{Pattern:new RegExp("^(0x|0X)?[a-fA-F0-9]+$")},serializedName:"auth_fun",type:{name:"String"}},gaId:{serializedName:"ga_id",type:{name:"String"}},authData:{serializedName:"auth_data",type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}},payerId:{serializedName:"payer_id",type:{name:"String"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["SpendTx","ChannelCreateTx","ChannelDepositTx","ChannelWithdrawTx","ChannelForceProgressTx","ChannelCloseMutualTx","ChannelCloseSoloTx","ChannelSlashTx","ChannelSettleTx","ChannelSnapshotSoloTx","ChannelSetDelegatesTx","OracleRegisterTx","OracleExtendTx","OracleQueryTx","OracleRespondTx","NamePreclaimTx","NameClaimTx","NameUpdateTx","NameTransferTx","NameRevokeTx","ContractCreateTx","ContractCallTx","GAAttachTx","GAMetaTx","PayingForTx"]}}}}},So={type:{name:"Composite",className:"Delegates",modelProperties:{initiator:{serializedName:"initiator",type:{name:"Sequence",element:{type:{name:"String"}}}},responder:{serializedName:"responder",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Ao={type:{name:"Composite",className:"OffChainUpdate",uberParent:"OffChainUpdate",polymorphicDiscriminator:{serializedName:"op",clientName:"op"},modelProperties:{op:{serializedName:"op",required:!0,type:{name:"String"}}}}},Po={type:{name:"Composite",className:"RelativeTTL",modelProperties:{type:{defaultValue:"delta",isConstant:!0,serializedName:"type",type:{name:"String"}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},Eo={type:{name:"Composite",className:"Ttl",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["delta","block"]}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},zo={type:{name:"Composite",className:"NamePointer",modelProperties:{key:{serializedName:"key",required:!0,type:{name:"String"}},encodedKey:{serializedName:"encoded_key",type:{name:"String"}},id:{serializedName:"id",required:!0,type:{name:"String"}}}}},Io={type:{name:"Composite",className:"AuctionEntry",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},startedAt:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"started_at",type:{name:"Number"}},endsAt:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ends_at",required:!0,type:{name:"Number"}},highestBidder:{serializedName:"highest_bidder",required:!0,type:{name:"String"}},highestBid:{constraints:{InclusiveMinimum:0},serializedName:"highest_bid",required:!0,type:{name:"Number"}}}}},Mo={type:{name:"Composite",className:"Channel",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},initiatorId:{serializedName:"initiator_id",required:!0,type:{name:"String"}},responderId:{serializedName:"responder_id",required:!0,type:{name:"String"}},channelAmount:{constraints:{InclusiveMinimum:0},serializedName:"channel_amount",required:!0,type:{name:"BigInt"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},soloRound:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"solo_round",required:!0,type:{name:"Number"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",required:!0,type:{name:"Number"}},lockedUntil:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"locked_until",required:!0,type:{name:"Number"}}}}},qo={type:{name:"Composite",className:"ContractObject",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},active:{serializedName:"active",required:!0,type:{name:"Boolean"}},referrerIds:{serializedName:"referrer_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},deposit:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}}}}},Ro={type:{name:"Composite",className:"ByteCode",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},Oo={type:{name:"Composite",className:"PoI",modelProperties:{poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},ko={type:{name:"Composite",className:"Currency",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},symbol:{serializedName:"symbol",required:!0,type:{name:"String"}},subunit:{serializedName:"subunit",required:!0,type:{name:"String"}},subunitsPerUnit:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"subunits_per_unit",required:!0,type:{name:"BigInt"}},fiatConverstionUrl:{serializedName:"fiat_converstion_url",type:{name:"String"}},fiatConversionUrl:{serializedName:"fiat_conversion_url",type:{name:"String"}},logo:{serializedName:"logo",type:{name:"Composite",className:"Image"}},primaryColour:{serializedName:"primary_colour",required:!0,type:{name:"String"}},secondaryColour:{serializedName:"secondary_colour",required:!0,type:{name:"String"}},networkName:{serializedName:"network_name",required:!0,type:{name:"String"}}}}},Bo={type:{name:"Composite",className:"Image",modelProperties:{type:{serializedName:"type",type:{name:"String"}},data:{serializedName:"data",type:{name:"String"}}}}},$o={type:{name:"Composite",className:"DryRunInput",modelProperties:{top:{serializedName:"top",type:{name:"String"}},accounts:{serializedName:"accounts",type:{name:"Sequence",element:{type:{name:"Composite",className:"DryRunAccount"}}}},txs:{serializedName:"txs",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DryRunInputItem"}}}},txEvents:{defaultValue:!1,serializedName:"tx_events",type:{name:"Boolean"}}}}},Uo={type:{name:"Composite",className:"DryRunAccount",modelProperties:{pubKey:{serializedName:"pub_key",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},Lo={type:{name:"Composite",className:"DryRunInputItem",modelProperties:{tx:{serializedName:"tx",type:{name:"String"}},txHash:{serializedName:"tx_hash",type:{name:"String"}},callReq:{serializedName:"call_req",type:{name:"Composite",className:"DryRunCallReq"}}}}},Go={type:{name:"Composite",className:"DryRunCallReq",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},contract:{serializedName:"contract",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",type:{name:"BigInt"}},gas:{constraints:{InclusiveMinimum:0},serializedName:"gas",type:{name:"Number"}},caller:{serializedName:"caller",type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}},context:{serializedName:"context",type:{name:"Composite",className:"DryRunCallContext"}}}}},Fo={type:{name:"Composite",className:"DryRunCallContext",modelProperties:{tx:{serializedName:"tx",type:{name:"String"}},txHash:{serializedName:"tx_hash",type:{name:"String"}},stateful:{serializedName:"stateful",type:{name:"Boolean"}}}}},Do={type:{name:"Composite",className:"DryRunResults",modelProperties:{results:{serializedName:"results",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DryRunResult"}}}},txEvents:{serializedName:"tx_events",type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}}}}},Vo={type:{name:"Composite",className:"DryRunResult",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},result:{serializedName:"result",required:!0,type:{name:"String"}},reason:{serializedName:"reason",type:{name:"String"}},callObj:{serializedName:"call_obj",type:{name:"Composite",className:"ContractCallObject"}}}}},jo={type:{name:"Composite",className:"ContractCallObject",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},callerNonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"caller_nonce",required:!0,type:{name:"Number"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},gasUsed:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas_used",required:!0,type:{name:"Number"}},log:{serializedName:"log",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Event"}}}},returnValue:{serializedName:"return_value",required:!0,type:{name:"String"}},returnType:{serializedName:"return_type",required:!0,type:{name:"Enum",allowedValues:["ok","error","revert"]}}}}},Ho={type:{name:"Composite",className:"Event",modelProperties:{address:{serializedName:"address",required:!0,type:{name:"String"}},topics:{serializedName:"topics",required:!0,type:{name:"Sequence",element:{constraints:{InclusiveMinimum:0},type:{name:"BigInt"}}}},data:{serializedName:"data",required:!0,type:{name:"String"}}}}},Jo={type:{name:"Composite",className:"Generation",modelProperties:{keyBlock:{serializedName:"key_block",type:{name:"Composite",className:"KeyBlock"}},microBlocks:{serializedName:"micro_blocks",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Wo={type:{name:"Composite",className:"KeyBlock",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},miner:{serializedName:"miner",required:!0,type:{name:"String"}},beneficiary:{serializedName:"beneficiary",required:!0,type:{name:"String"}},target:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"target",required:!0,type:{name:"Number"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},type:{name:"Number"}}}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},info:{serializedName:"info",required:!0,type:{name:"String"}}}}},Yo={type:{name:"Composite",className:"Header",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},miner:{serializedName:"miner",type:{name:"String"}},beneficiary:{serializedName:"beneficiary",type:{name:"String"}},target:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"target",type:{name:"Number"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},type:{name:"Number"}}}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},info:{serializedName:"info",type:{name:"String"}},pofHash:{serializedName:"pof_hash",type:{name:"String"}},txsHash:{serializedName:"txs_hash",type:{name:"String"}},signature:{serializedName:"signature",type:{name:"String"}}}}},Ko={type:{name:"Composite",className:"HashResponse",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}}}}},Qo={type:{name:"Composite",className:"HeightResponse",modelProperties:{height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}}}}},Xo={type:{name:"Composite",className:"MicroBlockHeader",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},pofHash:{serializedName:"pof_hash",required:!0,type:{name:"String"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},txsHash:{serializedName:"txs_hash",required:!0,type:{name:"String"}},signature:{serializedName:"signature",required:!0,type:{name:"String"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}}}}},Zo={type:{name:"Composite",className:"CountResponse",modelProperties:{count:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"count",required:!0,type:{name:"Number"}}}}},ec={type:{name:"Composite",className:"NameEntry",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},owner:{serializedName:"owner",type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}}}}},tc={type:{name:"Composite",className:"RegisteredOracle",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},queryFormat:{serializedName:"query_format",required:!0,type:{name:"String"}},responseFormat:{serializedName:"response_format",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}}}}},nc={type:{name:"Composite",className:"OracleQueries",modelProperties:{oracleQueries:{serializedName:"oracle_queries",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleQuery"}}}}}}},rc={type:{name:"Composite",className:"OracleQuery",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},senderNonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"sender_nonce",required:!0,type:{name:"Number"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",required:!0,type:{name:"Number"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"Ttl"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}}}}},ic={type:{name:"Composite",className:"PeerPubKey",modelProperties:{pubkey:{serializedName:"pubkey",required:!0,type:{name:"String"}}}}},ac={type:{name:"Composite",className:"GasPricesItem",modelProperties:{minGasPrice:{constraints:{InclusiveMinimum:0},serializedName:"min_gas_price",required:!0,type:{name:"BigInt"}},utilization:{constraints:{InclusiveMaximum:100,InclusiveMinimum:0},serializedName:"utilization",required:!0,type:{name:"Number"}},minutes:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"minutes",required:!0,type:{name:"Number"}}}}},sc={type:{name:"Composite",className:"Status",modelProperties:{genesisKeyBlockHash:{serializedName:"genesis_key_block_hash",required:!0,type:{name:"String"}},solutions:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"solutions",required:!0,type:{name:"Number"}},difficulty:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"difficulty",required:!0,type:{name:"Number"}},hashrate:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"hashrate",required:!0,type:{name:"Number"}},syncing:{serializedName:"syncing",required:!0,type:{name:"Boolean"}},syncProgress:{constraints:{InclusiveMaximum:100,InclusiveMinimum:0},serializedName:"sync_progress",type:{name:"Number"}},uptime:{serializedName:"uptime",required:!0,type:{name:"String"}},listening:{serializedName:"listening",required:!0,type:{name:"Boolean"}},protocols:{serializedName:"protocols",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Protocol"}}}},nodeVersion:{serializedName:"node_version",required:!0,type:{name:"String"}},nodeRevision:{serializedName:"node_revision",required:!0,type:{name:"String"}},peerCount:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"peer_count",required:!0,type:{name:"Number"}},peerConnections:{serializedName:"peer_connections",type:{name:"Composite",className:"PeerConnections"}},pendingTransactionsCount:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"pending_transactions_count",required:!0,type:{name:"Number"}},networkId:{serializedName:"network_id",required:!0,type:{name:"String"}},peerPubkey:{serializedName:"peer_pubkey",required:!0,type:{name:"String"}},topKeyBlockHash:{serializedName:"top_key_block_hash",required:!0,type:{name:"String"}},topBlockHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"top_block_height",required:!0,type:{name:"Number"}}}}},oc={type:{name:"Composite",className:"Protocol",modelProperties:{version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},effectiveAtHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"effective_at_height",required:!0,type:{name:"Number"}}}}},cc={type:{name:"Composite",className:"PeerConnections",modelProperties:{inbound:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"inbound",required:!0,type:{name:"Number"}},outbound:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"outbound",required:!0,type:{name:"Number"}}}}},uc={type:{name:"Composite",className:"SyncStatus",modelProperties:{progress:{serializedName:"progress",required:!0,type:{name:"Number"}},target:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"target",required:!0,type:{name:"Number"}},speed:{serializedName:"speed",required:!0,type:{name:"Number"}},estimate:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"estimate",required:!0,type:{name:"Number"}}}}},lc={type:{name:"Composite",className:"EncodedTx",modelProperties:{tx:{serializedName:"tx",required:!0,type:{name:"String"}}}}},pc={type:{name:"Composite",className:"PostTxResponse",modelProperties:{txHash:{serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},dc={type:{name:"Composite",className:"TxInfoObject",modelProperties:{callInfo:{serializedName:"call_info",type:{name:"Composite",className:"ContractCallObject"}},gaInfo:{serializedName:"ga_info",type:{name:"Composite",className:"GAObject"}},txInfo:{serializedName:"tx_info",type:{name:"String"}}}}},mc={type:{name:"Composite",className:"GAObject",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},gasUsed:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas_used",required:!0,type:{name:"Number"}},returnValue:{serializedName:"return_value",required:!0,type:{name:"String"}},returnType:{serializedName:"return_type",required:!0,type:{name:"Enum",allowedValues:["ok","error"]}},innerObject:{serializedName:"inner_object",type:{name:"Composite",className:"TxInfoObject"}}}}},hc={type:{name:"Composite",className:"ChannelCloseMutualTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"BigInt"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},fc={type:{name:"Composite",className:"ChannelCloseSoloTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},yc={type:{name:"Composite",className:"ChannelCreateTx",modelProperties:{initiatorId:{serializedName:"initiator_id",required:!0,type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},responderId:{serializedName:"responder_id",required:!0,type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",required:!0,type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}}}}},gc={type:{name:"Composite",className:"ChannelDepositTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},wc={type:{name:"Composite",className:"ChannelForceProgressTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}}}}},Nc={type:{name:"Composite",className:"ChannelSetDelegatesTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorDelegateIds:{serializedName:"initiator_delegate_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},responderDelegateIds:{serializedName:"responder_delegate_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},vc={type:{name:"Composite",className:"ChannelSettleTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"BigInt"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},bc={type:{name:"Composite",className:"ChannelSlashTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},xc={type:{name:"Composite",className:"ChannelSnapshotSoloTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},_c={type:{name:"Composite",className:"ChannelWithdrawTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},toId:{serializedName:"to_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},Tc={type:{name:"Composite",className:"CheckTxInPoolResponse",modelProperties:{status:{serializedName:"status",required:!0,type:{name:"String"}}}}},Cc={type:{name:"Composite",className:"CommitmentId",modelProperties:{commitmentId:{serializedName:"commitment_id",required:!0,type:{name:"String"}}}}},Sc={type:{name:"Composite",className:"ContractCallTx",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},Ac={type:{name:"Composite",className:"ContractCreateTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},Pc={type:{name:"Composite",className:"UnsignedTx",modelProperties:{tx:{serializedName:"tx",required:!0,type:{name:"String"}}}}},Ec={type:{name:"Composite",className:"GAAttachTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}},authFun:{constraints:{Pattern:new RegExp("^(0x|0X)?[a-fA-F0-9]+$")},serializedName:"auth_fun",required:!0,type:{name:"String"}}}}},zc={type:{name:"Composite",className:"GAMetaTx",modelProperties:{gaId:{serializedName:"ga_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},authData:{serializedName:"auth_data",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},Ic={type:{name:"Composite",className:"NameClaimTx",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},nameSalt:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",required:!0,type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Mc={type:{name:"Composite",className:"NameHash",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}}}}},qc={type:{name:"Composite",className:"NamePreclaimTx",modelProperties:{commitmentId:{serializedName:"commitment_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Rc={type:{name:"Composite",className:"NameRevokeTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Oc={type:{name:"Composite",className:"NameTransferTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},kc={type:{name:"Composite",className:"NameUpdateTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Bc={type:{name:"Composite",className:"PeerDetails",modelProperties:{host:{serializedName:"host",required:!0,type:{name:"String"}},port:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"port",required:!0,type:{name:"Number"}},firstSeen:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"first_seen",required:!0,type:{name:"Number"}},lastSeen:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"last_seen",required:!0,type:{name:"Number"}},genesisHash:{serializedName:"genesis_hash",required:!0,type:{name:"String"}},topHash:{serializedName:"top_hash",required:!0,type:{name:"String"}},topDifficulty:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"top_difficulty",required:!0,type:{name:"Number"}},networkId:{serializedName:"network_id",type:{name:"String"}},nodeVersion:{serializedName:"node_version",type:{name:"String"}},nodeRevision:{serializedName:"node_revision",type:{name:"String"}},nodeVendor:{serializedName:"node_vendor",type:{name:"String"}},nodeOs:{serializedName:"node_os",type:{name:"String"}}}}},$c={type:{name:"Composite",className:"OracleExtendTx",modelProperties:{fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}}}}},Uc={type:{name:"Composite",className:"OracleQueryTx",modelProperties:{oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Lc={type:{name:"Composite",className:"OracleRegisterTx",modelProperties:{queryFormat:{serializedName:"query_format",required:!0,type:{name:"String"}},responseFormat:{serializedName:"response_format",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"Ttl"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}}}}},Gc={type:{name:"Composite",className:"OracleRespondTx",modelProperties:{queryId:{serializedName:"query_id",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Fc={type:{name:"Composite",className:"PayingForTx",modelProperties:{payerId:{serializedName:"payer_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},Dc={type:{name:"Composite",className:"PeerCount",modelProperties:{connected:{serializedName:"connected",type:{name:"Composite",className:"PeerCountConnected"}},available:{serializedName:"available",type:{name:"Composite",className:"PeerCountAvailable"}},blocked:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"blocked",required:!0,type:{name:"Number"}}}}},Vc={type:{name:"Composite",className:"PeerCountConnected",modelProperties:{inbound:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"inbound",type:{name:"Number"}},outbound:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"outbound",type:{name:"Number"}}}}},jc={type:{name:"Composite",className:"PeerCountAvailable",modelProperties:{verified:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"verified",type:{name:"Number"}},unverified:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"unverified",type:{name:"Number"}}}}},Hc={type:{name:"Composite",className:"Peers",modelProperties:{peers:{serializedName:"peers",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},blocked:{serializedName:"blocked",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Jc={type:{name:"Composite",className:"PubKey",modelProperties:{pubKey:{serializedName:"pub_key",required:!0,type:{name:"String"}}}}},Wc={type:{name:"Composite",className:"SpendTx",modelProperties:{recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}}}}},Yc={type:{name:"Composite",className:"TokenSupply",modelProperties:{accounts:{constraints:{InclusiveMinimum:0},serializedName:"accounts",type:{name:"Number"}},contracts:{constraints:{InclusiveMinimum:0},serializedName:"contracts",type:{name:"Number"}},contractOracles:{constraints:{InclusiveMinimum:0},serializedName:"contract_oracles",type:{name:"Number"}},locked:{constraints:{InclusiveMinimum:0},serializedName:"locked",type:{name:"Number"}},oracles:{constraints:{InclusiveMinimum:0},serializedName:"oracles",type:{name:"Number"}},oracleQueries:{constraints:{InclusiveMinimum:0},serializedName:"oracle_queries",type:{name:"Number"}},pendingRewards:{constraints:{InclusiveMinimum:0},serializedName:"pending_rewards",type:{name:"Number"}},total:{constraints:{InclusiveMinimum:0},serializedName:"total",type:{name:"Number"}}}}},Kc={serializedName:"OffChainCallContract",type:{name:"Composite",className:"OffChainCallContract",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ao.type.polymorphicDiscriminator,modelProperties:{...Ao.type.modelProperties,caller:{serializedName:"caller",required:!0,type:{name:"String"}},contract:{serializedName:"contract",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},Qc={serializedName:"OffChainDeposit",type:{name:"Composite",className:"OffChainDeposit",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ao.type.polymorphicDiscriminator,modelProperties:{...Ao.type.modelProperties,from:{serializedName:"from",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},Xc={serializedName:"OffChainNewContract",type:{name:"Composite",className:"OffChainNewContract",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ao.type.polymorphicDiscriminator,modelProperties:{...Ao.type.modelProperties,owner:{serializedName:"owner",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},code:{serializedName:"code",type:{name:"Composite",className:"ByteCode"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},Zc={serializedName:"OffChainTransfer",type:{name:"Composite",className:"OffChainTransfer",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ao.type.polymorphicDiscriminator,modelProperties:{...Ao.type.modelProperties,from:{serializedName:"from",required:!0,type:{name:"String"}},to:{serializedName:"to",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},eu={serializedName:"OffChainWithdrawal",type:{name:"Composite",className:"OffChainWithdrawal",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ao.type.polymorphicDiscriminator,modelProperties:{...Ao.type.modelProperties,to:{serializedName:"to",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},tu={type:{name:"Composite",className:"CreateContractUnsignedTx",modelProperties:{...Pc.type.modelProperties,contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}}}}};let nu={OffChainUpdate:Ao,"OffChainUpdate.OffChainCallContract":Kc,"OffChainUpdate.OffChainDeposit":Qc,"OffChainUpdate.OffChainNewContract":Xc,"OffChainUpdate.OffChainTransfer":Zc,"OffChainUpdate.OffChainWithdrawal":eu};const ru={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},iu={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},au={parameterPath:"pubkey",mapper:{serializedName:"pubkey",required:!0,type:{name:"String"}}},su={parameterPath:"hash",mapper:{serializedName:"hash",required:!0,type:{name:"String"}}},ou={parameterPath:"height",mapper:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}}},cu={parameterPath:"name",mapper:{serializedName:"name",required:!0,type:{name:"String"}}},uu={parameterPath:["options","contentType"],mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},lu={parameterPath:"body",mapper:$o},pu={parameterPath:"body",mapper:lc};class du extends io{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const i="azsdk-js-node/1.0.0-beta.1",a=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:a},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}getAccountByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},hu)}getAccountByPubkeyAndHash(e,t,n){return this.sendOperationRequest({pubkey:e,hash:t,options:n},fu)}getAccountByPubkeyAndHeight(e,t,n){return this.sendOperationRequest({pubkey:e,height:t,options:n},yu)}getAccountNextNonce(e,t){return this.sendOperationRequest({pubkey:e,options:t},gu)}getPendingAccountTransactionsByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},wu)}getAuctionEntryByName(e,t){return this.sendOperationRequest({name:e,options:t},Nu)}getChannelByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},vu)}getContract(e,t){return this.sendOperationRequest({pubkey:e,options:t},bu)}getContractCode(e,t){return this.sendOperationRequest({pubkey:e,options:t},xu)}getContractPoI(e,t){return this.sendOperationRequest({pubkey:e,options:t},_u)}getCurrency(e){return this.sendOperationRequest({options:e},Tu)}protectedDryRunTxs(e,t){return this.sendOperationRequest({body:e,options:t},Cu)}getCurrentGeneration(e){return this.sendOperationRequest({options:e},Su)}getGenerationByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Au)}getGenerationByHeight(e,t){return this.sendOperationRequest({height:e,options:t},Pu)}getTopHeader(e){return this.sendOperationRequest({options:e},Eu)}getCurrentKeyBlock(e){return this.sendOperationRequest({options:e},zu)}getCurrentKeyBlockHash(e){return this.sendOperationRequest({options:e},Iu)}getCurrentKeyBlockHeight(e){return this.sendOperationRequest({options:e},Mu)}getKeyBlockByHash(e,t){return this.sendOperationRequest({hash:e,options:t},qu)}getKeyBlockByHeight(e,t){return this.sendOperationRequest({height:e,options:t},Ru)}getPendingKeyBlock(e){return this.sendOperationRequest({options:e},Ou)}getMicroBlockHeaderByHash(e,t){return this.sendOperationRequest({hash:e,options:t},ku)}getMicroBlockTransactionsByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Bu)}getMicroBlockTransactionsCountByHash(e,t){return this.sendOperationRequest({hash:e,options:t},$u)}getMicroBlockTransactionByHashAndIndex(e,t,n){return this.sendOperationRequest({hash:e,index:t,options:n},Uu)}getNameEntryByName(e,t){return this.sendOperationRequest({name:e,options:t},Lu)}getNameEntryByNameHash(e,t){return this.sendOperationRequest({nameHash:e,options:t},Gu)}getOracleByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},Fu)}getOracleQueriesByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},Du)}getOracleQueryByPubkeyAndQueryId(e,t,n){return this.sendOperationRequest({pubkey:e,queryId:t,options:n},Vu)}getPeerPubkey(e){return this.sendOperationRequest({options:e},ju)}getRecentGasPrices(e){return this.sendOperationRequest({options:e},Hu)}getStatus(e){return this.sendOperationRequest({options:e},Ju)}getChainEnds(e){return this.sendOperationRequest({options:e},Wu)}getSyncStatus(e){return this.sendOperationRequest({options:e},Yu)}postTransaction(e,t){return this.sendOperationRequest({body:e,options:t},Ku)}getTransactionByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Qu)}getTransactionInfoByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Xu)}}const mu=co(i,!1),hu={path:"/v3/accounts/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:vo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,au],headerParameters:[ru],serializer:mu},fu={path:"/v3/accounts/{pubkey}/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:vo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,au,su],headerParameters:[ru],serializer:mu},yu={path:"/v3/accounts/{pubkey}/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:vo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0},410:{bodyMapper:bo,isError:!0}},urlParameters:[iu,au,ou],headerParameters:[ru],serializer:mu},gu={path:"/v3/accounts/{pubkey}/next-nonce",httpMethod:"GET",responses:{200:{bodyMapper:xo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},queryParameters:[{parameterPath:["options","strategy"],mapper:{defaultValue:"max",serializedName:"strategy",type:{name:"Enum",allowedValues:["max","continuity"]}}}],urlParameters:[iu,au],headerParameters:[ru],serializer:mu},wu={path:"/v3/accounts/{pubkey}/transactions/pending",httpMethod:"GET",responses:{200:{bodyMapper:_o},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,au],headerParameters:[ru],serializer:mu},Nu={path:"/v3/auctions/{name}",httpMethod:"GET",responses:{200:{bodyMapper:Io},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,cu],headerParameters:[ru],serializer:mu},vu={path:"/v3/channels/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:Mo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,au],headerParameters:[ru],serializer:mu},bu={path:"/v3/contracts/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:qo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,au],headerParameters:[ru],serializer:mu},xu={path:"/v3/contracts/{pubkey}/code",httpMethod:"GET",responses:{200:{bodyMapper:Ro},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,au],headerParameters:[ru],serializer:mu},_u={path:"/v3/contracts/{pubkey}/poi",httpMethod:"GET",responses:{200:{bodyMapper:Oo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,au],headerParameters:[ru],serializer:mu},Tu={path:"/v3/currency",httpMethod:"GET",responses:{200:{bodyMapper:ko}},urlParameters:[iu],headerParameters:[ru],serializer:mu},Cu={path:"/v3/dry-run",httpMethod:"POST",responses:{200:{bodyMapper:Do},400:{bodyMapper:bo,isError:!0},403:{bodyMapper:bo,isError:!0}},requestBody:lu,urlParameters:[iu],headerParameters:[ru,uu],mediaType:"json",serializer:mu},Su={path:"/v3/generations/current",httpMethod:"GET",responses:{200:{bodyMapper:Jo},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu],headerParameters:[ru],serializer:mu},Au={path:"/v3/generations/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:Jo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,su],headerParameters:[ru],serializer:mu},Pu={path:"/v3/generations/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:Jo},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,ou],headerParameters:[ru],serializer:mu},Eu={path:"/v3/headers/top",httpMethod:"GET",responses:{200:{bodyMapper:Yo},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu],headerParameters:[ru],serializer:mu},zu={path:"/v3/key-blocks/current",httpMethod:"GET",responses:{200:{bodyMapper:Wo},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu],headerParameters:[ru],serializer:mu},Iu={path:"/v3/key-blocks/current/hash",httpMethod:"GET",responses:{200:{bodyMapper:Ko},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu],headerParameters:[ru],serializer:mu},Mu={path:"/v3/key-blocks/current/height",httpMethod:"GET",responses:{200:{bodyMapper:Qo},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu],headerParameters:[ru],serializer:mu},qu={path:"/v3/key-blocks/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:Wo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,su],headerParameters:[ru],serializer:mu},Ru={path:"/v3/key-blocks/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:Wo},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,ou],headerParameters:[ru],serializer:mu},Ou={path:"/v3/key-blocks/pending",httpMethod:"GET",responses:{200:{bodyMapper:Wo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu],headerParameters:[ru],serializer:mu},ku={path:"/v3/micro-blocks/hash/{hash}/header",httpMethod:"GET",responses:{200:{bodyMapper:Xo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,su],headerParameters:[ru],serializer:mu},Bu={path:"/v3/micro-blocks/hash/{hash}/transactions",httpMethod:"GET",responses:{200:{bodyMapper:_o},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,su],headerParameters:[ru],serializer:mu},$u={path:"/v3/micro-blocks/hash/{hash}/transactions/count",httpMethod:"GET",responses:{200:{bodyMapper:Zo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,su],headerParameters:[ru],serializer:mu},Uu={path:"/v3/micro-blocks/hash/{hash}/transactions/index/{index}",httpMethod:"GET",responses:{200:{bodyMapper:To},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,su,{parameterPath:"index",mapper:{constraints:{InclusiveMinimum:1},serializedName:"index",required:!0,type:{name:"Number"}}}],headerParameters:[ru],serializer:mu},Lu={path:"/v3/names/{name}",httpMethod:"GET",responses:{200:{bodyMapper:ec},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,cu],headerParameters:[ru],serializer:mu},Gu={path:"/v3/names/hash/{name_hash}",httpMethod:"GET",responses:{200:{bodyMapper:ec},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,{parameterPath:"nameHash",mapper:{serializedName:"name_hash",required:!0,type:{name:"String"}}}],headerParameters:[ru],serializer:mu},Fu={path:"/v3/oracles/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:tc},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,au],headerParameters:[ru],serializer:mu},Du={path:"/v3/oracles/{pubkey}/queries",httpMethod:"GET",responses:{200:{bodyMapper:nc},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},queryParameters:[{parameterPath:["options","from"],mapper:{serializedName:"from",type:{name:"String"}}},{parameterPath:["options","limit"],mapper:{defaultValue:20,constraints:{InclusiveMaximum:1e3,InclusiveMinimum:1},serializedName:"limit",type:{name:"Number"}}},{parameterPath:["options","type"],mapper:{defaultValue:"all",serializedName:"type",type:{name:"Enum",allowedValues:["open","closed","all"]}}}],urlParameters:[iu,au],headerParameters:[ru],serializer:mu},Vu={path:"/v3/oracles/{pubkey}/queries/{query-id}",httpMethod:"GET",responses:{200:{bodyMapper:rc},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,au,{parameterPath:"queryId",mapper:{serializedName:"query-id",required:!0,type:{name:"String"}}}],headerParameters:[ru],serializer:mu},ju={path:"/v3/peers/pubkey",httpMethod:"GET",responses:{200:{bodyMapper:ic}},urlParameters:[iu],headerParameters:[ru],serializer:mu},Hu={path:"/v3/recent-gas-prices",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"GasPricesItem"}}}}},400:{bodyMapper:bo,isError:!0}},urlParameters:[iu],headerParameters:[ru],serializer:mu},Ju={path:"/v3/status",httpMethod:"GET",responses:{200:{bodyMapper:sc}},urlParameters:[iu],headerParameters:[ru],serializer:mu},Wu={path:"/v3/status/chain-ends",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"String"}}}}}},urlParameters:[iu],headerParameters:[ru],serializer:mu},Yu={path:"/v3/sync-status",httpMethod:"GET",responses:{200:{bodyMapper:uc},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu],headerParameters:[ru],serializer:mu},Ku={path:"/v3/transactions",httpMethod:"POST",responses:{200:{bodyMapper:pc},400:{bodyMapper:bo,isError:!0}},requestBody:pu,urlParameters:[iu],headerParameters:[ru,uu],mediaType:"json",serializer:mu},Qu={path:"/v3/transactions/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:To},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,su],headerParameters:[ru],serializer:mu},Xu={path:"/v3/transactions/{hash}/info",httpMethod:"GET",responses:{200:{bodyMapper:dc},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0},410:{bodyMapper:bo,isError:!0}},urlParameters:[iu,su],headerParameters:[ru],serializer:mu};function Zu(e,t){return e.get(el(e,t))}function el(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var tl=new WeakMap;class nl extends du{constructor(e,{ignoreVersion:t=!1,retryCount:n=3,retryOverallDelay:r=800,...i}={}){var a,s,o;super(e,{allowInsecureConnection:!0,additionalPolicies:[...t?[]:[wo("node",(async e=>(await this._getCachedStatus(e)).nodeVersion),"7.1.0","8.0.0")],ho(),fo(),No(n,r),go((e=>[" ",e.reason,null==e.errorCode?"":` (${e.errorCode})`].join("")))],...i}),o=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(a=this,s=tl),s.set(a,o),this.pipeline.addPolicy(mo,{phase:"Deserialize"}),this.pipeline.removePolicy({name:an}),this.pipeline.removePolicy({name:An}),this.pipeline.removePolicy({name:"defaultRetryPolicy"})}async _getCachedStatus(e){return null!=Zu(tl,this)?Zu(tl,this):this.getStatus(e)}async getStatus(...e){const t=super.getStatus(...e);return t.then((()=>{var e,n;n=t,(e=tl).set(el(e,this),n)}),(()=>{})),t}async getNetworkId(){return(await this._getCachedStatus()).networkId}async getNodeInfo(){const{nodeVersion:e,networkId:t,protocols:n,topBlockHeight:r}=await this.getStatus(),i=n.filter((({effectiveAtHeight:e})=>r>=e)).reduce(((e,t)=>t.effectiveAtHeight>e.effectiveAtHeight?t:e),{effectiveAtHeight:-1,version:0}).version;if(null==Dr[i]){const e=i.toString(),t=Object.values(Dr).filter((e=>"number"==typeof e)).map((e=>+e)),n=Math.min(...t).toString(),r=(Math.max(...t)+1).toString();throw new Z("consensus protocol",e,n,r)}return{url:this.$host,nodeNetworkId:t,version:e,consensusProtocolVersion:i}}}function rl(e){const t=xs(e);switch(t.tag){case Hr.SignedTx:return rl(vs(t.encodedTx));case Hr.GaMetaTx:return t.gaId}const n=Ns(t.tag,t.version).find((([e])=>"nonce"===e))?.[1];if(null==n)throw new U(`Transaction doesn't have nonce: ${Hr[t.tag]}`);if(!("senderKey"in n))throw new ne;return t[n.senderKey].replace(/^ok_/,"ak_")}class il{}var al=n(6176),sl=n(2341),ol=n.n(sl);function cl(e){var t;return Sr(null!==(t=ol()(e))&&void 0!==t?t:"")}function ul(e){const t=(new al.TypeResolver).resolveType({record:[{name:"name",type:{option:["string"]}},{name:"version",type:{option:["int"]}},{name:"networkId",type:{option:["string"]}},{name:"contractAddress",type:{option:["contract_pubkey"]}}]},{});return Sr(vr((new al.ContractByteArrayEncoder).encodeWithType(e,t)))}function ll(e,t,n){return Sr(jn([zr,new Uint8Array([0]),ul(n),cl(t),Sr(vr(e))]))}var pl=n(8287).Buffer;function dl(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function ml(e,t,n){const r=[t];n&&r.push("inner_tx");const i=vr(e);return jn([pl.from(r.join("-")),Sr(i)])}var hl=new WeakMap;class fl extends il{constructor(e){super(),function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,hl,void 0),this.secretKey=e;const t=Xn().sign.keyPair.fromSeed(vr(e));var n,r;n=hl,r=t.secretKey,n.set(dl(n,this),r),this.address=br(t.publicKey,ir.AccountAddress)}static generate(){const e=br(Xn().randomBytes(32),ir.AccountSecretKey);return new fl(e)}async sign(e,t){return Xn().sign.detached(pl.from(e),(n=hl).get(dl(n,this)));var n}async signTransaction(e,{innerTx:t,networkId:n,...r}={}){if(null==n)throw new G("networkId","provided",n);const i=vr(e),a=ml(e,n,!0===t),s=[await this.sign(a,r)];return vs({tag:Hr.SignedTx,encodedTx:i,signatures:s})}async signMessage(e,t){return this.sign(Ir(e),t)}async signTypedData(e,t,{name:n,version:r,networkId:i,contractAddress:a,...s}={}){const o=ll(e,t,{name:n,version:r,networkId:i,contractAddress:a});return br(await this.sign(o,s),ir.Signature)}async signDelegation(e,{networkId:t}={}){if(null==t)throw new G("networkId","provided",t);const n=jn([zr,new Uint8Array([1]),pl.from(t),vr(e)]);return br(await this.sign(n),ir.Signature)}}function yl(e,{innerTx:t,gasUsed:n,queryFee:r,isInitiator:i}={}){const a=xs(e);if(a.tag===Hr.SignedTx)throw new F("Transaction shouldn't be a SignedTx, use `getExecutionCostBySignedTx` instead");let s=0n;return"fee"in a&&"freeloader"!==t&&(s+=BigInt(a.fee)),a.tag===Hr.NameClaimTx&&(s+=BigInt(a.nameFee)),a.tag===Hr.OracleQueryTx&&(s+=BigInt(a.queryFee)),a.tag===Hr.OracleResponseTx&&(s-=BigInt(null!=r?r:0)),a.tag===Hr.ChannelSettleTx&&(!0===i&&(s-=BigInt(a.initiatorAmountFinal)),!1===i&&(s-=BigInt(a.responderAmountFinal))),a.tag!==Hr.SpendTx&&a.tag!==Hr.ContractCreateTx&&a.tag!==Hr.ContractCallTx&&a.tag!==Hr.ChannelDepositTx||"fee-payer"===t||(s+=BigInt(a.amount)),a.tag===Hr.ContractCreateTx&&(s+=BigInt(a.deposit)),a.tag!==Hr.ContractCreateTx&&a.tag!==Hr.ContractCallTx&&a.tag!==Hr.GaAttachTx&&a.tag!==Hr.GaMetaTx||"freeloader"===t||(s+=BigInt(a.gasPrice)*BigInt(null!=n?n:a.gasLimit)),a.tag!==Hr.GaMetaTx&&a.tag!==Hr.PayingForTx||(s+=yl(vs(a.tx.encodedTx),a.tag===Hr.PayingForTx?{innerTx:"fee-payer"}:{})),s}function gl(e,t,n){const r=xs(e,Hr.SignedTx);if(r.encodedTx.tag===Hr.GaMetaTx)return yl(vs(r.encodedTx),n);const i=vs(r.encodedTx),a=rl(i),[s,o]=[!0,!1].map((e=>Pr(ml(i,t,e),r.signatures[0],a)));if(!s&&!o)throw new U("Can't verify signature");return yl(vs(r.encodedTx),{...s&&{innerTx:"freeloader"},...n})}async function wl(e,t,{isMined:n,...r}={}){let i=xs(e);const a=i.tag===Hr.SignedTx,s=a&&!0===n&&_s(e);if(i.tag===Hr.SignedTx&&(i=i.encodedTx),null==r.gasUsed&&!1!==s&&[Hr.ContractCreateTx,Hr.ContractCallTx,Hr.GaAttachTx,Hr.GaMetaTx].includes(i.tag)){const{callInfo:e,gaInfo:n}=await t.getTransactionInfoByHash(s),i=null!=e?e:n;if(null==i)throw new te(`callInfo and gaInfo is not available for transaction ${s}`);r.gasUsed=i.gasUsed}if(null==r.queryFee&&Hr.OracleResponseTx===i.tag&&(r.queryFee=(await t.getOracleByPubkey(i.oracleId)).queryFee.toString()),null==r.isInitiator&&Hr.ChannelSettleTx===i.tag&&!0!==n){const{initiatorId:e}=await t.getChannelByPubkey(i.channelId);r.isInitiator=i.fromId===e}return a?gl(e,await t.getNetworkId(),r):yl(e,r)}var Nl=n(8287).Buffer;const vl=[];async function bl(e,t,n){const r=rl(vs(e)),[i,{height:a},{consensusProtocolVersion:s,nodeNetworkId:o}]=await Promise.all([t.getAccountByPubkey(r).catch((e=>{if(!Wn(e))throw e;return{id:r,balance:0n,nonce:0}})).then((e=>({...e,id:e.id}))),t.getCurrentKeyBlockHeight(),t.getNodeInfo()]);return(await Promise.all(vl.map((async r=>r(e,{node:t,account:i,height:a,consensusProtocolVersion:s,nodeNetworkId:o,parentTxTypes:n}))))).flat()}async function xl(e,t){const n=t.pipeline.clone();n.removePolicy({name:"parse-big-int"});const r=new nl(t.$host,{ignoreVersion:!0,pipeline:n,additionalPolicies:[yo()]});return bl(xs(e),r,[])}vl.push(((e,{account:t,nodeNetworkId:n,parentTxTypes:r})=>{if(e.tag!==Hr.SignedTx)return[];const{encodedTx:i,signatures:a}=e;if(null==(null!=i?i:a))return[];if(1!==a.length)return[];const s=Nl.from([n,...r.includes(Hr.PayingForTx)?["inner_tx"]:[]].join("-")),o=vr(vs(i)),c=jn([s,o]),u=jn([s,Sr(o)]);return Pr(c,a[0],t.id)||Pr(u,a[0],t.id)?[]:[{message:"Signature cannot be verified, please ensure that you transaction have the correct prefix and the correct private key for the sender address",key:"InvalidSignature",checkedKeys:["encodedTx","signatures"]}]}),(async(e,{node:t,parentTxTypes:n})=>{let r;return"encodedTx"in e&&(r=e.encodedTx),"tx"in e&&(r=e.tx),null==r?[]:bl(r,t,[...n,e.tag])}),((e,{height:t})=>"ttl"in e?0===e.ttl||e.ttl>t?[]:[{message:`TTL ${e.ttl} is already expired, current height is ${t}`,key:"ExpiredTTL",checkedKeys:["ttl"]}]:[]),(async(e,{account:t,parentTxTypes:n,node:r})=>{if(0!==n.length)return[];const i=await wl(vs(e),r).catch((()=>0n));return i<=t.balance?[]:[{message:`Account balance ${t.balance} is not enough to execute the transaction that costs ${i}`,key:"InsufficientBalance",checkedKeys:["amount","fee","nameFee","gasLimit","gasPrice"]}]}),(async(e,{node:t})=>{if(e.tag!==Hr.SpendTx||_r(e.recipientId,ir.Name))return[];const n=await t.getAccountByPubkey(e.recipientId).catch((e=>{if(!Wn(e))throw e;return null}));return null==n||!0===n.payable?[]:[{message:"Recipient account is not payable",key:"RecipientAccountNotPayable",checkedKeys:["recipientId"]}]}),((e,{account:t})=>{let n;return e.tag===Hr.SignedTx&&"generalized"===t.kind&&0!==e.signatures.length&&(n="Generalized account can't be used to generate SignedTx with signatures"),e.tag===Hr.GaMetaTx&&"basic"===t.kind&&(n="Basic account can't be used to generate GaMetaTx"),null==n?[]:[{message:n,key:"InvalidAccountType",checkedKeys:["tag"]}]}),((e,{consensusProtocolVersion:t})=>{var n,r;const i=Hr.OracleRegisterTx===e.tag,a=Hr.ContractCreateTx===e.tag||Hr.GaAttachTx===e.tag,s=Hr.ContractCallTx===e.tag||Hr.GaMetaTx===e.tag,o=null!==(n=null!==(r=i?"oracle-call":null)&&void 0!==r?r:a?"contract-create":null)&&void 0!==n?n:s?"contract-call":null;if(null==o)return[];const c=zi[t][o];let u;if("abiVersion"in e&&(u={abiVersion:e.abiVersion}),"ctVersion"in e&&(u=e.ctVersion),null==u)throw new ne;return!c.abiVersion.includes(u.abiVersion)||a&&!c.vmVersion.includes(u.vmVersion)?[{message:`ABI/VM version ${JSON.stringify(u)} is wrong, supported is: ${JSON.stringify(c)}`,key:"VmAndAbiVersionMismatch",checkedKeys:["ctVersion","abiVersion"]}]:[]}),(async(e,{node:t})=>{if(Hr.ContractCallTx!==e.tag)return[];if(e.contractId.startsWith("nm_"))return[];try{const{active:n}=await t.getContract(e.contractId);return n?[]:[{message:`Contract ${e.contractId} is not active`,key:"ContractNotActive",checkedKeys:["contractId"]}]}catch(e){if(!(e instanceof On)||null==e.response?.bodyAsText)throw e;return[{message:JSON.parse(e.response.bodyAsText).reason,key:"ContractNotFound",checkedKeys:["contractId"]}]}}));class _l extends U{constructor(e,t,n){super(e),this.name="InvalidTxError",this.validation=t,this.transaction=n}}async function Tl(e,{onNode:t,onAccount:n,verify:r=!0,waitMined:i=!0,confirm:a,innerTx:s,...o}){const c=await n.signTransaction(e,{...o,onNode:t,innerTx:s,networkId:await t.getNetworkId()});if(!0===s)return{hash:_s(c),rawTx:c};if(r){const e=await xl(c,t);if(e.length>0){const t=`Transaction verification errors: ${e.map((e=>e.message)).join(", ")}`;throw new _l(t,e,c)}}try{let e;try{e=null!=n?`tx-${n.address}`:null}catch(t){e=null}const{txHash:r}=await t.postTransaction({tx:c},{requestOptions:{customHeaders:{"__retry-code":"400",...null!=e?{__queue:e}:{}}}});if(i){const e=await di(r,{onNode:t,...o}),n={...e,hash:e.hash,rawTx:c};if(null!=a&&+a>0){const e="boolean"==typeof a?void 0:a;return{...n,confirmationHeight:await hi(r,{onNode:t,confirm:e,...o})}}return n}return{hash:r,rawTx:c}}catch(e){throw Yn(e),Object.assign(e,{rawTx:c,verifyTx:async()=>xl(c,t)})}}var Cl=n(8287).Buffer;const Sl=e=>Cl.from(e).toString("base64").replaceAll("/","_").replaceAll("+","-").replace(/=+$/,""),Al=e=>Cl.from(e.replaceAll("_","/").replaceAll("-","+"),"base64"),Pl=e=>{var t;return Sl(null!==(t=ol()(e))&&void 0!==t?t:"")},El="eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9";async function zl(e,t){const n={...e};"sub_jwk"in n||(n.sub_jwk={kty:"OKP",crv:"Ed25519",x:Sl(vr(t.address))}),void 0===n.sub_jwk&&delete n.sub_jwk;const r=`${El}.${Pl(n)}`,i=await t.sign(r);return`${r}.${Sl(i)}`}function Il(e,t){var n;const r=e.split(".");if(3!==r.length)throw new G("JWT components count",3,r.length);const[i,a,s]=r;if(i!==El)throw new G("JWT header",El,i);const o=JSON.parse(Al(a).toString()),c=null!==(n=o.sub_jwk)&&void 0!==n?n:{},u=null==c.x||"OKP"!==c.kty||"Ed25519"!==c.crv?t:br(Al(c.x),ir.AccountAddress);if(null!=t&&u!==t)throw new G("address",`${u} ("sub_jwk")`,t);if(null!=u&&!Pr(Cl.from(`${i}.${a}`),Al(s),u))throw new Fe(`JWT is not signed by ${u}`);return{payload:o,signer:u}}function Ml(e){try{return Il(e),!0}catch(e){return!1}}function ql(e){Il(e)}function Rl(e,t){try{const{signer:n}=Il(e,t);return null!=n}catch(e){return!1}}let Ol=function(e){return e[e.AensWildcard=1]="AensWildcard",e[e.AensName=2]="AensName",e[e.AensPreclaim=3]="AensPreclaim",e[e.Oracle=4]="Oracle",e[e.OracleResponse=5]="OracleResponse",e}({});const kl=Bi(ir.OracleAddress),Bl={serialize(e){return kl.serialize(br(vr(e),ir.OracleAddress))},deserialize(e){return br(vr(kl.deserialize(e)),ir.OracleQueryId)}},$l=Bi(ir.ContractAddress),Ul=[{tag:ga(Ol.AensWildcard),version:ga(1,!0),accountAddress:Bi(ir.AccountAddress),contractAddress:$l},{tag:ga(Ol.AensName),version:ga(1,!0),accountAddress:Bi(ir.AccountAddress),nameId:oa,contractAddress:$l},{tag:ga(Ol.AensPreclaim),version:ga(1,!0),accountAddress:Bi(ir.AccountAddress),contractAddress:$l},{tag:ga(Ol.Oracle),version:ga(1,!0),accountAddress:Bi(ir.AccountAddress),contractAddress:$l},{tag:ga(Ol.OracleResponse),version:ga(1,!0),queryId:Bl,contractAddress:$l}];function Ll(e){return Oa(Ul,Ol,e,{},ir.Bytearray)}function Gl(e,t){return ka(Ul,Ol,e,t,{})}function Fl(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Dl=new WeakMap;class Vl{constructor(e,t){var n,r,i;i=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=Dl),r.set(n,i),this.value=e,this.options=t,this.options=t}async revoke(e={}){const t={...this.options,...e};return Tl(await bs({_isInternalBuild:!0,...t,tag:Hr.NameRevokeTx,nameId:this.value,accountId:t.onAccount.address}),t)}async update(e,t={}){const{extendPointers:n,...r}={...this.options,...t},i={...!0===n&&Object.fromEntries((await Ai(this.value,r)).pointers.map((({key:e,id:t})=>[e,t]))),...e},a=Object.values(i).some((e=>_r(e,ir.Bytearray))),s=await bs({_isInternalBuild:!0,...r,tag:Hr.NameUpdateTx,version:a?2:1,nameId:this.value,accountId:r.onAccount.address,pointers:Object.entries(i).map((([e,t])=>({key:e,id:t})))});return Tl(s,r)}async transfer(e,t={}){const n={...this.options,...t};return Tl(await bs({_isInternalBuild:!0,...n,tag:Hr.NameTransferTx,nameId:this.value,accountId:n.onAccount.address,recipientId:e}),n)}async getState(e={}){var t;const n=null!==(t=this.options.onNode)&&void 0!==t?t:e.onNode,r=await n.getNameEntryByName(this.value);return{...r,id:r.id,owner:r.owner}}async extendTtl(e,t={}){return this.update({},{...t,nameTtl:e,extendPointers:!0})}async claim(e={}){const t={...this.options,...e};var n;return Tl(await bs({_isInternalBuild:!0,...t,tag:Hr.NameClaimTx,accountId:t.onAccount.address,nameSalt:(n=Dl,n.get(Fl(n,this))),name:this.value}),t)}async preclaim(e={}){const t={...this.options,...e},n=Tr(),r=await bs({_isInternalBuild:!0,...t,tag:Hr.NamePreclaimTx,accountId:t.onAccount.address,commitmentId:Zr(this.value,n)}),i=await Tl(r,t);var a,s;return s=n,(a=Dl).set(Fl(a,this),s),i}async bid(e,t={}){if(!ci(this.value))throw new ee("This is not auction name, so cant make a bid!");const n={...this.options,...t};return Tl(await bs({_isInternalBuild:!0,...n,tag:Hr.NameClaimTx,accountId:n.onAccount.address,nameSalt:0,name:this.value,nameFee:e}),n)}}function jl(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Hl(e,t){return e.get(Jl(e,t))}function Jl(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Wl=new WeakSet,Yl=new WeakMap;function Kl({returnType:e,returnValue:t,log:n},r,i,a){let s;switch(e){case"ok":{const e=Jl(Wl,this,Xl).call(this,r);return{decodedResult:this._calldata.decode(this._name,e.name,t),decodedEvents:this.$decodeEvents(n,a)}}case"revert":s=this._calldata.decodeFateString(t);break;case"error":if(s=vr(t).toString(),/Expected \d+ arguments, got \d+/.test(s))throw new k(`ACI doesn't match called contract. Error provided by node: ${s}`);break;default:throw new te(`Unknown return type: ${e}`)}throw new Se(s,i)}async function Ql(e,t,n){const r=await Tl(e,{...this.$options,...n});return{hash:r.hash,tx:xs(r.rawTx),txData:r,rawTx:r.rawTx,...null!=r.blockHeight&&await this.$getCallResultByTxHash(r.hash,t,n)}}function Xl(e){const t=Hl(Yl,this).functions.find((t=>t.name===e));if(null!=t)return t;if("init"===e)return{arguments:[],name:"init",payable:!1,returns:"unit",stateful:!0};throw new Ae(e)}function Zl(e,t,{contractAddressToName:n}){const r={...this.$options.contractAddressToName,...n};if(null!=r[e])return r[e];const i=this._aci.map((({contract:e})=>e)).filter((e=>e?.event)),a=i.map((e=>[e.name,e.event.variant])).map((([e,t])=>t.map((t=>[e,Object.keys(t)[0],Object.values(t)[0]])))).flat().filter((([,e])=>BigInt(`0x${Sr(e).toString("hex")}`)===t)).filter((([,,e],t,n)=>!n.slice(0,t).some((t=>{return n=t[2],r=e,JSON.stringify(n)===JSON.stringify(r);var n,r}))));switch(a.length){case 0:throw new Ee(t.toString(),e);case 1:return a[0][0];default:throw new ze(e,a)}}const ep=class{async $compile(){if(null!=this.$options.bytecode)return this.$options.bytecode;if(null==this.$options.onCompiler)throw new F("Can't compile without compiler");if(null!=this.$options.sourceCode){const{bytecode:e}=await this.$options.onCompiler.compileBySourceCode(this.$options.sourceCode,this.$options.fileSystem);this.$options.bytecode=e}if(null!=this.$options.sourceCodePath){const{bytecode:e}=await this.$options.onCompiler.compile(this.$options.sourceCodePath);this.$options.bytecode=e}if(null==this.$options.bytecode)throw new F("Can't compile without sourceCode and sourceCodePath");return this.$options.bytecode}async $getCallResultByTxHash(e,t,n){const{callInfo:r}=await this.$options.onNode.getTransactionInfoByHash(e);if(null==r)throw new k(`callInfo is not available for transaction ${e}`);const i=r;return{...Jl(Wl,this,Kl).call(this,i,t,void 0,n),result:i}}async _estimateGas(e,t,n={}){const{result:r}=await this.$call(e,t,{...n,callStatic:!0});if(null==r)throw new ne;const{gasUsed:i}=r;return Math.floor(1.25*i)}async $deploy(e,t){var n;const{callStatic:r,...i}={...this.$options,...t};if(null==this.$options.bytecode&&await this.$compile(),!0===r)return this.$call("init",e,{...i,callStatic:r});if(null!=this.$options.address)throw new ve;if(null==i.onAccount)throw new F("Can't deploy without account");const a=i.onAccount.address;if(null==this.$options.bytecode)throw new F("Can't deploy without bytecode");const s=await bs({_isInternalBuild:!0,...i,tag:Hr.ContractCreateTx,gasLimit:null!==(n=i.gasLimit)&&void 0!==n?n:await this._estimateGas("init",e,i),callData:this._calldata.encode(this._name,"init",e),code:this.$options.bytecode,ownerId:a}),{hash:o,...c}=await Jl(Wl,this,Ql).call(this,s,"init",{...i,onAccount:i.onAccount});return this.$options.address=Ts(c.rawTx),{...c,...null!=c.result?.log&&{decodedEvents:this.$decodeEvents(c.result.log,i)},owner:a,transaction:o,address:this.$options.address}}async $call(e,t,n={}){var r;const{callStatic:i,top:a,...s}={...this.$options,...n},o=Jl(Wl,this,Xl).call(this,e),{address:c,name:u}=this.$options,l=null!=u?Xr(u):c,{onNode:p}=s;if(null==e)throw new Ce;if("init"===e&&!0!==i)throw new xe('"init" can be called only via dryRun');if("init"!==e&&null!=s.amount&&Number(s.amount)>0&&!o.payable)throw new Pe(s.amount,e);let d;try{if(null==s.onAccount)throw new te("Use fallback account");d=s.onAccount.address}catch(e){if(!0!==i||!(e instanceof Y&&"Account should be an address (ak-prefixed string), or instance of AccountBase, got undefined instead"===e.message||e instanceof We||e instanceof te&&"Use fallback account"===e.message))throw e;d=Or.pub}const m=this._calldata.encode(this._name,e,t);if(!0===i){if(null==s.nonce){const e=null!=a&&{["number"==typeof a?"height":"hash"]:a},t=await fi(d,{...e,onNode:p}).catch((e=>{if(!Wn(e))throw e;return{kind:"basic",nonce:0}}));s.nonce="generalized"===t.kind?0:t.nonce+1}const t={...s,onNode:p,callData:m};let n;if("init"===e){if(null==this.$options.bytecode)throw new F('Can\'t dry-run "init" without bytecode');n=await bs({...t,tag:Hr.ContractCreateTx,code:this.$options.bytecode,ownerId:d})}else{if(null==l)throw new _e("Can't dry-run contract without address");n=await bs({...t,tag:Hr.ContractCallTx,callerId:d,contractId:l})}const{callObj:r,...i}=await Ti(n,d,{...s,top:a});if(null==r)throw new te(`callObj is not available for transaction ${n}`);const o=r;return{...i,...Jl(Wl,this,Kl).call(this,o,e,n,s),tx:xs(n),result:o,rawTx:n,hash:_s(n),txData:void 0}}if(null!=a)throw new F("Can't handle `top` option in on-chain contract call");if(null==l)throw new _e("Can't call contract without address");const h=await bs({_isInternalBuild:!0,...s,tag:Hr.ContractCallTx,gasLimit:null!==(r=s.gasLimit)&&void 0!==r?r:await this._estimateGas(e,t,s),callerId:d,contractId:l,callData:m});if(null==s.onAccount)throw new F("Can't call contract on chain without account");return Jl(Wl,this,Ql).call(this,h,e,{...s,onAccount:s.onAccount})}$decodeEvents(e,{omitUnknown:t,...n}={}){return e.map((e=>{let r;try{r=Jl(Wl,this,Zl).call(this,e.address,e.topics[0],n)}catch(e){if(null!=t&&t&&e instanceof Ee)return null;throw e}const i=this._calldata.decodeEvent(r,e.data,e.topics),[a,s]=Object.entries(i)[0];return{name:a,args:s,contract:{name:r,address:e.address}}})).filter((e=>null!=e))}static async initialize({onCompiler:e,onNode:t,bytecode:n,aci:r,address:i,sourceCodePath:a,sourceCode:s,fileSystem:o,validateBytecode:c,...u}){if(null==r&&null!=e){let t;var l;null!=a&&(t=await e.compile(a)),null!=s&&(t=await e.compileBySourceCode(s,o)),null!=t&&(r=t.aci,null!==(l=n)&&void 0!==l||(n=t.bytecode))}if(null==r)throw new Te;let p;if(null!=i&&ni(i=await Pi(i,"contract_pubkey",{resolveByNode:!0,onNode:t}))&&(p=i),null==i&&null==s&&null==a&&null==n)throw new _e("Can't create instance by ACI without address");if(null!=i&&null==(await Si(i,{onNode:t})).active)throw new be(i);if(!0===c){if(null==i)throw new _e("Can't validate bytecode without contract address");const r=(await Ci(i,{onNode:t})).bytecode;let c=!1;if(null!=n)c=n===r;else if(null!=s){if(null==e)throw new F("Can't validate bytecode without compiler");c=await e.validateBySourceCode(r,s,o)}else if(null!=a){if(null==e)throw new F("Can't validate bytecode without compiler");c=await e.validate(r,a)}if(!c)throw new Ne(null!=(null!=s?s:a)?"source code":"bytecode")}return new ep({onCompiler:e,onNode:t,sourceCode:s,sourceCodePath:a,bytecode:n,aci:r,address:i,name:p,fileSystem:o,...u})}constructor({aci:e,...t}){var n;jl(this,n=Wl),n.add(this),function(e,t){jl(e,t),t.set(e,void 0)}(this,Yl),this._aci=e;const r=e[e.length-1];if(null==r.contract)throw new F(`The last 'aci' item should have 'contract' key, got ${Object.keys(r)} keys instead`);!function(e,t,n){e.set(Jl(e,t),n)}(Yl,this,r.contract),this._name=Hl(Yl,this).name,this._calldata=new al.Encoder(e),this.$options=t,Object.assign(this,Object.fromEntries(Hl(Yl,this).functions.map((({name:e,arguments:t,stateful:n})=>{const r="init"!==e&&!n;return[e,async(...n)=>{const i=n.length===t.length+1?n.pop():{};if("object"!=typeof i)throw new Y(`Options should be an object: ${i}`);return"init"===e?this.$deploy(n,{callStatic:r,...i}):this.$call(e,n,{callStatic:r,...i})}]}))))}};var tp=ep;function np(e){return{...e,id:e.id,decodedQuery:vr(e.query).toString(),decodedResponse:vr(e.response).toString()}}class rp{constructor(e,t){this.address=e,this.options=t}async getState(e={}){return{...this.options,...e}.onNode.getOracleByPubkey(this.address)}async getQuery(e,t={}){const{onNode:n}={...this.options,...t};return np(await n.getOracleQueryByPubkeyAndQueryId(this.address,e))}}function ip(e,t,n){return e.set(sp(e,t),n),n}function ap(e,t){return e.get(sp(e,t))}function sp(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var op=new WeakMap;class cp extends rp{constructor(e,t){var n,r,i;super(br(vr(e.address),ir.OracleAddress),t),i=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=op),r.set(n,i),this.account=e,this.options=t}async register(e,t,n={}){const r={...this.options,...n};return Tl(await bs({_isInternalBuild:!0,...r,tag:Hr.OracleRegisterTx,accountId:this.account.address,queryFormat:e,responseFormat:t}),{...r,onAccount:this.account})}async extendTtl(e={}){const t={...this.options,...e};return Tl(await bs({_isInternalBuild:!0,...t,tag:Hr.OracleExtendTx,oracleId:this.address}),{...t,onAccount:this.account})}pollQueries(e,t={}){const n={...this.options,...t},r=new Set;let i=!1;const a=async()=>{var a;if(i)return;i=!0;const s=(null!==(a=(await n.onNode.getOracleQueriesByPubkey(this.address)).oracleQueries)&&void 0!==a?a:[]).filter((({id:e})=>!r.has(e))).map((e=>np(e))).filter((e=>!0===t.includeResponded||""===e.decodedResponse));s.forEach((e=>r.add(e.id))),i=!1,await Promise.all(s.map((t=>e(t))))};a();const s=(async e=>{const t=null!==(e=n.interval)&&void 0!==e?e:await ui("micro-block",n);return setInterval((async()=>a()),t)})();return async()=>{const e=await s;clearInterval(e)}}async respondToQuery(e,t,n={}){const r={...this.options,...n};return Tl(await bs({_isInternalBuild:!0,...r,tag:Hr.OracleResponseTx,oracleId:this.address,queryId:e,response:t}),{...r,onAccount:this.account})}handleQueries(e,t={}){if(null!=ap(op,this))throw new ee("Another query handler already running, it needs to be stopped to run a new one");const n={...this.options,...t};let r=Promise.resolve();const i=async t=>{const i=await e(t),a=r.then((async()=>this.respondToQuery(t.id,i,n)));r=a.then((()=>{}),(()=>{})),await a};ip(op,this,Promise.resolve());const a=this.pollQueries((async e=>{const t=i(e);if(null==ap(op,this))throw new ne;return ip(op,this,ap(op,this).then((async()=>t)).then((()=>{}),(()=>{}))),t}),n);return async()=>{a(),await ap(op,this),ip(op,this,void 0)}}}class up extends rp{constructor(e,t){super(e,t),this.options=t}async postQuery(e,t={}){const n={...this.options,...t},r=n.onAccount.address,i=await bs({_isInternalBuild:!0,...n,tag:Hr.OracleQueryTx,oracleId:this.address,senderId:r,query:e}),{nonce:a}=xs(i,Hr.OracleQueryTx);return{...await Tl(i,n),queryId:Yr(r,a,this.address)}}async pollForResponse(e,t={}){var n;const r={...this.options,...t},i=null!==(n=r.interval)&&void 0!==n?n:await ui("micro-block",r);let a,s,o;do{({response:o,ttl:s}=await r.onNode.getOracleQueryByPubkeyAndQueryId(this.address,e));const t=vr(o);if(t.length>0)return t.toString();await Dn(i),a=await pi({...r,cached:!0})}while(s>=a);throw new J(a)}async query(e,t={}){const{queryId:n}=await this.postQuery(e,t);return this.pollForResponse(n,t)}}async function lp(e,t,n){return Tl(await bs({_isInternalBuild:!0,...n,tag:Hr.SpendTx,senderId:n.onAccount.address,recipientId:await Pi(t,"account_pubkey",n),amount:e}),n)}async function pp(e,t,n){if(+e<0||+e>1)throw new G("fraction","a number between 0 and 1",e);const r=await Pi(t,"account_pubkey",n),i=n.onAccount.address,a=new P(await yi.bind(n.onAccount)(i,n)),s=a.times(e).integerValue(P.ROUND_HALF_UP),{fee:o}=xs(await bs({_isInternalBuild:!0,...n,tag:Hr.SpendTx,senderId:i,recipientId:r,amount:s}),Hr.SpendTx),c=s.plus(o).gt(a)?a.minus(o):s;return Tl(await bs({_isInternalBuild:!0,...n,tag:Hr.SpendTx,senderId:i,recipientId:r,amount:c}),n)}async function dp(e,t){return Tl(await bs({_isInternalBuild:!0,...t,tag:Hr.PayingForTx,payerId:t.onAccount.address,tx:e}),t)}var mp=n(8287).Buffer;async function hp(e,t,{onAccount:n,onCompiler:r,onNode:i,bytecode:a,aci:s,sourceCodePath:o,sourceCode:c,fileSystem:u,...l}){var p;const d=n.address;if("generalized"===(await fi(d,{onNode:i})).kind)throw new F(`Account ${d} is already GA`);const m=await tp.initialize({onAccount:n,onCompiler:r,onNode:i,bytecode:a,aci:s,sourceCodePath:o,sourceCode:c,fileSystem:u}),h=await bs({_isInternalBuild:!0,...l,tag:Hr.GaAttachTx,onNode:i,code:await m.$compile(),gasLimit:null!==(p=l.gasLimit)&&void 0!==p?p:await m._estimateGas("init",t,l),ownerId:d,callData:m._calldata.encode(m._name,"init",t),authFun:Sr(e)}),{hash:f,rawTx:y}=await Tl(h,{onNode:i,onAccount:n,onCompiler:r,...l}),g=Ts(y);return Object.freeze({owner:d,transaction:f,rawTx:y,gaContractId:g})}async function fp(e,{fee:t,gasPrice:n,onNode:r}){const{nodeNetworkId:i,consensusProtocolVersion:a}=await r.getNodeInfo();let s=Sr(jn([mp.from(i),vr(e)]));if(a===Dr.Ceres){if(null==t)throw new G("fee","provided (in Ceres)",t);if(null==n)throw new G("gasPrice","provided (in Ceres)",n);s=Sr(vr(gs({tag:Ca.GaMetaTxAuthData,fee:t,gasPrice:n,txHash:br(s,ir.TxHash)})))}return s}async function yp(e,{onNode:t}){const n=xs(e,Hr.SignedTx);if(n.encodedTx.tag!==Hr.GaMetaTx)throw new G("transaction","to include GaMetaTx",Hr[n.encodedTx.tag]);return fp(vs(n.encodedTx.tx.encodedTx),{fee:n.encodedTx.fee,gasPrice:n.encodedTx.gasPrice,onNode:t})}var gp=n(4997),wp=n(2321),Np=n(2231);function vp(e){return vp="function"==typeof wp&&"symbol"==typeof Np?function(e){return typeof e}:function(e){return e&&"function"==typeof wp&&e.constructor===wp&&e!==wp.prototype?"symbol":typeof e},vp(e)}var bp=n(9280);function xp(e,t,n){return(t=function(e){var t=function(e){if("object"!=vp(e)||!e)return e;var t=e[bp];if(void 0!==t){var n=t.call(e,"string");if("object"!=vp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vp(t)?t:t+""}(t))in e?gp(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _p(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Tp={...t,sendTransaction:Tl,...a,...s};var Cp=new WeakMap;class Sp{constructor(e={}){var t,n;xp(this,"_options",{}),function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,Cp,void 0),Object.assign(this._options,e),t=Cp,n={onAccount:Kn((()=>this._options.onAccount)),onNode:Kn((()=>this._options.onNode)),onCompiler:Kn((()=>this._options.onCompiler))},t.set(_p(t,this),n)}getContext(e={}){return{...this._options,...(t=Cp,t.get(_p(t,this))),...e};var t}async buildTx(e){return bs({...this.getContext(),...e})}}Object.assign(Sp.prototype,Vn(Tp,(([e,t])=>[e,function(...e){e.length=t.length;const n=e[e.length-1];return e[e.length-1]=this.getContext(n),t(...e)}])));var Ap=Sp;function Pp(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ep=new WeakMap;class zp extends Ap{constructor({nodes:e=[],...t}={}){var n,r;super(t),xp(this,"pool",new Map),function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,Ep,void 0),e.forEach((({name:e,instance:t},n)=>this.addNode(e,t,0===n))),n=Ep,r={onNode:Kn((()=>this.api)),onCompiler:Kn((()=>this.compilerApi)),onAccount:Kn((()=>this._resolveAccount()))},n.set(Pp(n,this),r)}get compilerApi(){if(null==this._options.onCompiler)throw new O("You can't use Compiler API. Compiler is not ready!");return this._options.onCompiler}get api(){return this.ensureNodeConnected(),this.pool.get(this.selectedNodeName)}addNode(e,t,n=!1){if(this.pool.has(e))throw new ke(e);this.pool.set(e,t),(n||null==this.selectedNodeName)&&this.selectNode(e)}selectNode(e){if(!this.pool.has(e))throw new Be(`Node with name ${e} not in pool`);this.selectedNodeName=e}isNodeConnected(){return null!=this.selectedNodeName}ensureNodeConnected(){if(!this.isNodeConnected())throw new Be("You can't use Node API. Node is not connected or not defined!")}async getNodeInfo(){return this.ensureNodeConnected(),{name:this.selectedNodeName,...await this.api.getNodeInfo()}}async getNodesInPool(){return Promise.all(Array.from(this.pool.entries()).map((async([e,t])=>({name:e,...await t.getNodeInfo()}))))}addresses(){return[]}_resolveAccount(e=this._options.onAccount){if("string"==typeof e)throw new X("Address in AccountResolver");if("object"==typeof e)return e;throw new Y(`Account should be an address (ak-prefixed string), or instance of AccountBase, got ${String(e)} instead`)}get address(){return this._resolveAccount().address}async sign(e,{onAccount:t,...n}={}){return this._resolveAccount(t).sign(e,n)}async signTransaction(e,{onAccount:t,...n}={}){const r=null!==this.selectedNodeName?await this.api.getNetworkId():void 0;return this._resolveAccount(t).signTransaction(e,{networkId:r,...n})}async signMessage(e,{onAccount:t,...n}={}){return this._resolveAccount(t).signMessage(e,n)}async signTypedData(e,t,{onAccount:n,...r}={}){return this._resolveAccount(n).signTypedData(e,t,r)}async signDelegation(e,{onAccount:t,...n}={}){var r;return null!==(r=n.networkId)&&void 0!==r||(n.networkId=null!==this.selectedNodeName?await this.api.getNetworkId():void 0),this._resolveAccount(t).signDelegation(e,n)}getContext(e={}){return{...this._options,...(t=Ep,t.get(Pp(t,this))),...e,...null!=e.onAccount&&{onAccount:this._resolveAccount(e.onAccount)}};var t}}class Ip extends zp{constructor({accounts:e,...t}={}){super(t),xp(this,"accounts",{}),e?.forEach(((e,t)=>this.addAccount(e,{select:0===t})))}_resolveAccount(e=this.selectedAddress){if("string"==typeof e){const t=e;if(vr(t),null==this.accounts[t])throw new re(e);e=this.accounts[t]}return super._resolveAccount(e)}addresses(){return Object.keys(this.accounts)}addAccount(e,{select:t}={}){const{address:n}=e;this.accounts[n]=e,!0===t&&this.selectAccount(n)}removeAccount(e){if(null==this.accounts[e])throw new re(e);delete this.accounts[e],this.selectedAddress===e&&delete this.selectedAddress}selectAccount(e){if(vr(e),null==this.accounts[e])throw new re(e);this.selectedAddress=e}}let Mp=function(e){return e.to_waellet="to_waellet",e.to_aepp="to_aepp",e}({}),qp=function(e){return e.window="window",e.extension="extension",e}({}),Rp=function(e){return e.subscribe="subscribe",e.unsubscribe="unsubscribe",e}({}),Op=function(e){return e.readyToConnect="connection.announcePresence",e.updateAddress="address.update",e.address="address.get",e.connect="connection.open",e.unsafeSign="data.unsafeSign",e.sign="transaction.sign",e.signMessage="message.sign",e.signTypedData="typedData.sign",e.signDelegation="delegation.sign",e.subscribeAddress="address.subscribe",e.updateNetwork="networkId.update",e.closeConnection="connection.close",e}({}),kp=function(e){return e.CONNECTED="CONNECTED",e.DISCONNECTED="DISCONNECTED",e.WAITING_FOR_CONNECTION_REQUEST="WAITING_FOR_CONNECTION_REQUEST",e}({});const Bp=[];class $p extends z{toJSON(){return{code:this.code,message:this.message,data:this.data}}static deserialize(e){const t=Bp.find((t=>t.code===e.code));if(null==t)throw new te(`Can't find RpcError with code: ${e.code}`);return new t(e.data)}}class Up extends $p{constructor(e){super("Invalid transaction"),xp(this,"code",2),this.data=e,this.name="RpcInvalidTransactionError"}}xp(Up,"code",2),Bp.push(Up);class Lp extends $p{constructor(e){super("Operation rejected by user"),xp(this,"code",4),this.data=e,this.name="RpcRejectedByUserError"}}xp(Lp,"code",4),Bp.push(Lp);class Gp extends $p{constructor(){super("Unsupported Protocol Version"),xp(this,"code",5),this.name="RpcUnsupportedProtocolError"}}xp(Gp,"code",5),Bp.push(Gp);class Fp extends $p{constructor(e){super("Wallet deny your connection request"),xp(this,"code",9),this.data=e,this.name="RpcConnectionDenyError"}}xp(Fp,"code",9),Bp.push(Fp);class Dp extends $p{constructor(){super("You are not connected to the wallet"),xp(this,"code",10),this.name="RpcNotAuthorizeError"}}xp(Dp,"code",10),Bp.push(Dp);class Vp extends $p{constructor(e){super(`You are not subscribed for account ${e}`),xp(this,"code",11),this.data=e,this.name="RpcPermissionDenyError"}}xp(Vp,"code",11),Bp.push(Vp);class jp extends $p{constructor(){super("The peer failed to execute your request due to unknown error"),xp(this,"code",12),this.name="RpcInternalError"}}xp(jp,"code",12),Bp.push(jp);class Hp extends $p{constructor(e){super(`Wallet can't find a network by id "${e}"`),xp(this,"code",13),this.data=e,this.name="RpcNoNetworkById"}}xp(Hp,"code",13),Bp.push(Hp);class Jp extends $p{constructor(){super("Method not found"),xp(this,"code",-32601),this.name="RpcMethodNotFoundError"}}xp(Jp,"code",-32601),Bp.push(Jp);var Wp=n(8287).Buffer;class Yp extends il{constructor(e,t){super(),this._rpcClient=e,this.address=t}async sign(e){const t=br(Wp.from(e),ir.Bytearray),{signature:n}=await this._rpcClient.request(Op.unsafeSign,{onAccount:this.address,data:t});return vr(n)}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null==n)throw new G("networkId","provided",n);const r=await this._rpcClient.request(Op.sign,{onAccount:this.address,tx:e,returnSigned:!0,networkId:n,innerTx:t});if(null==r.signedTransaction)throw new Q("signedTransaction is missed in wallet response");return r.signedTransaction}async signMessage(e){const{signature:t}=await this._rpcClient.request(Op.signMessage,{onAccount:this.address,message:e});return Wp.from(t,"hex")}async signTypedData(e,t,{name:n,version:r,contractAddress:i,networkId:a}={}){const{signature:s}=await this._rpcClient.request(Op.signTypedData,{onAccount:this.address,domain:{name:n,version:r,networkId:a,contractAddress:i},aci:t,data:e});return s}async signDelegation(e){const{signature:t}=await this._rpcClient.request(Op.signDelegation,{delegation:e,onAccount:this.address});return t}}function Kp(e,t,n){Qp(e,t),t.set(e,n)}function Qp(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Xp(e,t){return e.get(ed(e,t))}function Zp(e,t,n){return e.set(ed(e,t),n),n}function ed(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var td=new WeakMap,nd=new WeakMap,rd=new WeakMap,id=new WeakSet;class ad{constructor(e,t,n){var r;Qp(this,r=id),r.add(this),Kp(this,td,new Map),Kp(this,nd,0),Kp(this,rd,void 0),this.connection=e,Zp(rd,this,n),e.connect(ed(id,this,sd).bind(this),t)}async request(e,t){return ed(id,this,od).call(this,Zp(nd,this,Xp(nd,this)+1),e,t),new Promise(((e,t)=>{Xp(td,this).set(Xp(nd,this),{resolve:e,reject:t})}))}notify(e,t){ed(id,this,od).call(this,void 0,e,t)}}async function sd(e,t){if("2.0"!==e?.jsonrpc)throw new oe(JSON.stringify(e));if("result"in e||"error"in e)return void ed(id,this,ud).call(this,e);const n=e;let r,i;try{if(!(n.method in Xp(rd,this)))throw new Jp;const e=n.method;r=await Xp(rd,this)[e](n.params,t)}catch(e){Yn(e),i=e}if(null!=n.id&&ed(id,this,cd).call(this,n.id,n.method,r,null==i||i instanceof $p?i:new jp),null!=i&&!(i instanceof $p))throw i}function od(e,t,n){this.connection.sendMessage({jsonrpc:"2.0",...null!=e?{id:e}:{},method:t,...null!=n?{params:n}:{}})}function cd(e,t,n,r){this.connection.sendMessage({jsonrpc:"2.0",id:e,method:t,...null!=r?{error:r.toJSON()}:{result:n}})}function ud({id:e,error:t,result:n}){const r=Xp(td,this).get(e);if(null==r)throw new ce(e);null!=t?r.reject($p.deserialize(t)):r.resolve(n),Xp(td,this).delete(e)}class ld extends zp{constructor({name:e,onAddressChange:t=()=>{},onDisconnect:n=()=>{},onNetworkChange:r=()=>{},...i}){super(i),this.onAddressChange=t,this.onDisconnect=n,this.onNetworkChange=r,this.name=e}_resolveAccount(e=this.addresses()[0]){if("string"==typeof e){const t=e;if(vr(t),!this.addresses().includes(t))throw new ue(t);this._ensureConnected(),e=new Yp(this.rpcClient,t)}return null==e&&this._ensureAccountAccess(),super._resolveAccount(e)}addresses(){if(null==this._accounts)return[];const e=Object.keys(this._accounts.current)[0];return[...null!=e?[e]:[],...Object.keys(this._accounts.connected)]}async connectToWallet(e,{connectNode:t=!1,name:n="wallet-node"}={}){if(null!=this.rpcClient)throw new Je("You are already connected to wallet");let r;const i=e=>{if(t){if(null==e.node?.url)throw new Ye("Missing URLs of the Node");this.pool.delete(n),this.addNode(n,new nl(e.node.url),!0)}this.onNetworkChange(e)},a=new ad(e,(()=>{delete this.rpcClient,delete this._accounts,this.onDisconnect(r)}),{[Op.updateAddress]:e=>{this._accounts=e,this.onAddressChange(e)},[Op.updateNetwork]:i,[Op.closeConnection]:e=>{r=e,a.connection.disconnect()},[Op.readyToConnect]:()=>{}}),s=await a.request(Op.connect,{name:this.name,version:1,connectNode:t});return i(s),this.rpcClient=a,s}disconnectWallet(){this._ensureConnected(),this.rpcClient.notify(Op.closeConnection,{reason:"bye"}),this.rpcClient.connection.disconnect()}async askAddresses(){return this._ensureConnected(),this.rpcClient.request(Op.address,void 0)}async subscribeAddress(e,t){this._ensureConnected();const n=await this.rpcClient.request(Op.subscribeAddress,{type:e,value:t});return this._accounts=n.address,n}async askToSelectNetwork(e){this._ensureConnected(),await this.rpcClient.request(Op.updateNetwork,e)}_ensureConnected(){if(null==this.rpcClient)throw new We("You are not connected to Wallet")}_ensureAccountAccess(){if(this._ensureConnected(),0===this.addresses().length)throw new pe}}var pd=n(228);function dd(e,t,n){md(e,t),t.set(e,n)}function md(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function hd(e,t,n){return e.set(yd(e,t),n),n}function fd(e,t){return e.get(yd(e,t))}function yd(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var gd=new WeakMap,wd=new WeakSet,Nd=new WeakMap;class vd extends pd{get isConnected(){return null!=fd(gd,this)}get accounts(){return fd(Nd,this)}constructor(){var e;super(),md(this,e=wd),e.add(this),dd(this,gd,void 0),dd(this,Nd,[])}static async _connect(e,t,n,r){let i;const a=new ad(t,(()=>{hd(gd,n,void 0),hd(Nd,n,[]),n.emit("disconnect",i)}),{[Op.updateAddress]:yd(wd,n,xd).bind(n),[Op.updateNetwork]:n._updateNetwork.bind(n),[Op.closeConnection]:e=>{i=e,a.connection.disconnect()},[Op.readyToConnect]:()=>{}});hd(gd,n,a);const s=await fd(gd,n).request(Op.connect,{name:e,version:1,connectNode:r});n._updateNetwork(s)}disconnect(){const e=yd(wd,this,bd).call(this);e.notify(Op.closeConnection,{reason:"bye"}),e.connection.disconnect()}async getAccounts(){const e=yd(wd,this,bd).call(this);return(await e.request(Op.address,void 0)).map((t=>new Yp(e,t)))}async subscribeAccounts(e,t){const n=await yd(wd,this,bd).call(this).request(Op.subscribeAddress,{type:e,value:t});return yd(wd,this,xd).call(this,n.address),fd(Nd,this)}async askToSelectNetwork(e){await yd(wd,this,bd).call(this).request(Op.updateNetwork,e)}}function bd(){if(null==fd(gd,this))throw new We("You are not connected to Wallet");return fd(gd,this)}function xd(e){const t=[...new Set([...Object.keys(e.current),...Object.keys(e.connected)])];hd(Nd,this,t.map((e=>new Yp(yd(wd,this,bd).call(this),e)))),this.emit("accountsChange",fd(Nd,this))}function _d(e,t){return e.get(Td(e,t))}function Td(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Cd=new WeakMap;class Sd extends vd{constructor(...e){var t,n,r;super(...e),r="",function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=Cd),n.set(t,r)}get networkId(){return _d(Cd,this)}_updateNetwork(e){var t,n;t=Cd,n=e.networkId,t.set(Td(t,this),n),this.emit("networkIdChange",_d(Cd,this))}static async connect(e,t){const n=new Sd;return await Sd._connect(e,t,n,!1),n}}function Ad(e,t){return e.get(Pd(e,t))}function Pd(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ed=new WeakMap;class zd extends vd{constructor(...e){var t,n,r;super(...e),r=null,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=Ed),n.set(t,r)}get node(){return Ad(Ed,this)}_updateNetwork(e){if(null==e.node?.url)throw new Ye("Missing URLs of the Node");var t,n;t=Ed,n=new nl(e.node.url),t.set(Pd(t,this),n),this.emit("nodeChange",Ad(Ed,this))}static async connect(e,t){const n=new zd;return await super._connect(e,t,n,!0),n}}var Id=n(1013);const Md=n.n(Id)()({storeAsString:!0}),qd=e=>{if("object"==typeof e&&null!==e&&e.constructor===Object)return Vn(e,(([e,t])=>[e,qd(t)]));if(Array.isArray(e))return e.map((e=>qd(e)));if("string"==typeof e&&new P(e).toString(10)===e){const t=new P(e);return t.toJSON=()=>t.toString(10),t}return e};var Rd={stringify:(...e)=>Md.stringify(qd(e[0]),...e.slice(1)),parse:Md.parse},Od=n(8287).Buffer;class kd extends Ip{constructor({name:e,id:t,type:n,onConnection:r,onSubscription:i,onDisconnect:a,onAskAccounts:s,onAskToSelectNetwork:o,...c}){super(c),xp(this,"_clients",new Map),this.onConnection=r,this.onSubscription=i,this.onDisconnect=a,this.onAskAccounts=s,this.onAskToSelectNetwork=o,this.name=e,this.id=t,this._type=n}_getAccountsForClient({addressSubscription:e}){const{current:t,connected:n}=this.getAccounts();return{current:e.has("current")||e.has("connected")?t:{},connected:e.has("connected")?n:{}}}_pushAccountsToApps(){null!=this._clients&&Array.from(this._clients.keys()).filter((e=>this._isRpcClientConnected(e))).map((e=>this._getClient(e))).filter((e=>0!==e.addressSubscription.size)).forEach((e=>e.rpc.notify(Op.updateAddress,this._getAccountsForClient(e))))}selectAccount(e){super.selectAccount(e),this._pushAccountsToApps()}addAccount(e,t){super.addAccount(e,t),this._pushAccountsToApps()}_getNode(){return this.ensureNodeConnected(),{node:{url:this.api.$host,name:this.selectedNodeName}}}async selectNode(e){super.selectNode(e);const t=await this.api.getNetworkId();Array.from(this._clients.keys()).filter((e=>this._isRpcClientConnected(e))).map((e=>this._getClient(e))).forEach((e=>{e.rpc.notify(Op.updateNetwork,{networkId:t,...e.connectNode&&this._getNode()})}))}_getClient(e){const t=this._clients.get(e);if(null==t)throw new le(e);return t}_isRpcClientConnected(e){return kp.CONNECTED===this._getClient(e).status&&this._getClient(e).rpc.connection.isConnected()}_disconnectRpcClient(e){const t=this._getClient(e);t.rpc.connection.disconnect(),t.status=kp.DISCONNECTED,t.addressSubscription=new Set}removeRpcClient(e){this._disconnectRpcClient(e),this._clients.delete(e)}addRpcClient(e){const t=Od.from(Xn().randomBytes(8)).toString("base64");let n;const r={id:t,status:kp.WAITING_FOR_CONNECTION_REQUEST,addressSubscription:new Set,connectNode:!1,rpc:new ad(e,(()=>{this._clients.delete(t),this.onDisconnect(t,n)}),{[Op.closeConnection]:e=>{n=e,this._disconnectRpcClient(t)},[Op.connect]:async({name:e,version:n,icons:i,connectNode:a},s)=>{if(1!==n)throw new Gp;return await this.onConnection(t,{name:e,icons:i,connectNode:a},s),r.status=kp.CONNECTED,r.connectNode=a,{...await this.getWalletInfo(),...a&&this._getNode()}},[Op.subscribeAddress]:async({type:e,value:n},i)=>{if(!this._isRpcClientConnected(t))throw new Dp;switch(e){case Rp.subscribe:await this.onSubscription(t,{type:e,value:n},i),r.addressSubscription.add(n);break;case Rp.unsubscribe:r.addressSubscription.delete(n);break;default:throw new te(`Unknown subscription type: ${e}`)}return{subscription:Array.from(r.addressSubscription),address:this._getAccountsForClient(r)}},[Op.address]:async(e,n)=>{if(!this._isRpcClientConnected(t))throw new Dp;return await this.onAskAccounts(t,e,n),this.addresses()},[Op.sign]:async({tx:e,onAccount:n=this.address,returnSigned:r,innerTx:i},a)=>{if(!this._isRpcClientConnected(t))throw new Dp;if(!this.addresses().includes(n))throw new Vp(n);const s={onAccount:n,aeppOrigin:a,aeppRpcClientId:t,innerTx:i};if(r||!0===i)return{signedTransaction:await this.signTransaction(e,s)};try{return Rd.parse(Rd.stringify({transactionHash:await this.sendTransaction(e,{...s,verify:!1})}))}catch(t){const n=await xl(e,this.api);if(n.length>0)throw new Up(n);throw t}},[Op.signMessage]:async({message:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Dp;if(!this.addresses().includes(n))throw new Vp(n);const i={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:Od.from(await this.signMessage(e,i)).toString("hex")}},[Op.signTypedData]:async({domain:e,aci:n,data:r,onAccount:i=this.address},a)=>{if(!this._isRpcClientConnected(t))throw new Dp;if(!this.addresses().includes(i))throw new Vp(i);const s={...e,onAccount:i,aeppOrigin:a,aeppRpcClientId:t};return{signature:await this.signTypedData(r,n,s)}},[Op.unsafeSign]:async({data:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Dp;if(!this.addresses().includes(n))throw new Vp(n);const i={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:br(await this.sign(vr(e),i),ir.Signature)}},[Op.signDelegation]:async({delegation:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Dp;if(!this.addresses().includes(n))throw new Vp(n);const i={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:await this.signDelegation(e,i)}},[Op.updateNetwork]:async(e,n)=>{if(!this._isRpcClientConnected(t))throw new Dp;return await this.onAskToSelectNetwork(t,e,n),null}})};return this._clients.set(t,r),t}async shareWalletInfo(e){this._getClient(e).rpc.notify(Op.readyToConnect,await this.getWalletInfo())}async getWalletInfo(){const{origin:e}=window.location;return{id:this.id,name:this.name,networkId:await this.api.getNetworkId(),origin:"file://"===e?"*":e,type:this._type}}getAccounts(){return{current:null!=this.selectedAddress?{[this.selectedAddress]:{}}:{},connected:this.addresses().filter((e=>e!==this.selectedAddress)).reduce(((e,t)=>({...e,[t]:{}})),{})}}}function Bd(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function $d(e,...t){if(!((n=e)instanceof Uint8Array||null!=n&&"object"==typeof n&&"Uint8Array"===n.constructor.name))throw new Error("Uint8Array expected");var n;if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function Ud(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");Bd(e.outputLen),Bd(e.blockLen)}function Ld(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}const Gd=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);new Uint8Array(new Uint32Array([287454020]).buffer)[0];const Fd=async()=>{};async function Dd(e,t,n){let r=Date.now();for(let i=0;i<e;i++){n(i);const e=Date.now()-r;e>=0&&e<t||(await Fd(),r+=e)}}function Vd(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),$d(e),e}class jd{clone(){return this._cloneInto()}}const Hd={}.toString;function Jd(e){const t=t=>e().update(Vd(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}class Wd extends jd{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,Ud(e);const n=Vd(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,i=new Uint8Array(r);i.set(n.length>r?e.create().update(n).digest():n);for(let e=0;e<i.length;e++)i[e]^=54;this.iHash.update(i),this.oHash=e.create();for(let e=0;e<i.length;e++)i[e]^=106;this.oHash.update(i),i.fill(0)}update(e){return Ld(this),this.iHash.update(e),this}digestInto(e){Ld(this),$d(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:a,outputLen:s}=this;return e.finished=r,e.destroyed=i,e.blockLen=a,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Yd=(e,t,n)=>new Wd(e,t).update(n).digest();Yd.create=(e,t)=>new Wd(e,t);class Kd extends jd{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Gd(this.buffer)}update(e){Ld(this);const{view:t,buffer:n,blockLen:r}=this,i=(e=Vd(e)).length;for(let a=0;a<i;){const s=Math.min(r-this.pos,i-a);if(s!==r)n.set(e.subarray(a,a+s),this.pos),this.pos+=s,a+=s,this.pos===r&&(this.process(t,0),this.pos=0);else{const t=Gd(e);for(;r<=i-a;a+=r)this.process(t,a)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){Ld(this),function(e,t){$d(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:r,isLE:i}=this;let{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>r-a&&(this.process(n,0),a=0);for(let e=a;e<r;e++)t[e]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const i=BigInt(32),a=BigInt(4294967295),s=Number(n>>i&a),o=Number(n&a),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,o,r)}(n,r-8,BigInt(8*this.length),i),this.process(n,0);const s=Gd(e),o=this.outputLen;if(o%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=o/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)s.setUint32(4*e,u[e],i)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:i,destroyed:a,pos:s}=this;return e.length=r,e.pos=s,e.finished=i,e.destroyed=a,r%t&&e.buffer.set(n),e}}const Qd=BigInt(2**32-1),Xd=BigInt(32);function Zd(e,t=!1){return t?{h:Number(e&Qd),l:Number(e>>Xd&Qd)}:{h:0|Number(e>>Xd&Qd),l:0|Number(e&Qd)}}var em=function(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:a,l:s}=Zd(e[i],t);[n[i],r[i]]=[a,s]}return[n,r]},tm=(e,t,n)=>e>>>n,nm=(e,t,n)=>e<<32-n|t>>>n,rm=(e,t,n)=>e>>>n|t<<32-n,im=(e,t,n)=>e<<32-n|t>>>n,am=(e,t,n)=>e<<64-n|t>>>n-32,sm=(e,t,n)=>e>>>n-32|t<<64-n,om=function(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:0|i}},cm=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),um=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,lm=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),pm=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,dm=(e,t,n,r,i,a)=>t+n+r+i+a+(e/2**32|0)|0,mm=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0);const[hm,fm]=(()=>em(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))))(),ym=new Uint32Array(80),gm=new Uint32Array(80);class wm extends Kd{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:a,Dh:s,Dl:o,Eh:c,El:u,Fh:l,Fl:p,Gh:d,Gl:m,Hh:h,Hl:f}=this;return[e,t,n,r,i,a,s,o,c,u,l,p,d,m,h,f]}set(e,t,n,r,i,a,s,o,c,u,l,p,d,m,h,f){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|i,this.Cl=0|a,this.Dh=0|s,this.Dl=0|o,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|p,this.Gh=0|d,this.Gl=0|m,this.Hh=0|h,this.Hl=0|f}process(e,t){for(let n=0;n<16;n++,t+=4)ym[n]=e.getUint32(t),gm[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|ym[e-15],n=0|gm[e-15],r=rm(t,n,1)^rm(t,n,8)^tm(t,n,7),i=im(t,n,1)^im(t,n,8)^nm(t,n,7),a=0|ym[e-2],s=0|gm[e-2],o=rm(a,s,19)^am(a,s,61)^tm(a,s,6),c=im(a,s,19)^sm(a,s,61)^nm(a,s,6),u=lm(i,c,gm[e-7],gm[e-16]),l=pm(u,r,o,ym[e-7],ym[e-16]);ym[e]=0|l,gm[e]=0|u}let{Ah:n,Al:r,Bh:i,Bl:a,Ch:s,Cl:o,Dh:c,Dl:u,Eh:l,El:p,Fh:d,Fl:m,Gh:h,Gl:f,Hh:y,Hl:g}=this;for(let e=0;e<80;e++){const t=rm(l,p,14)^rm(l,p,18)^am(l,p,41),w=im(l,p,14)^im(l,p,18)^sm(l,p,41),N=l&d^~l&h,v=mm(g,w,p&m^~p&f,fm[e],gm[e]),b=dm(v,y,t,N,hm[e],ym[e]),x=0|v,_=rm(n,r,28)^am(n,r,34)^am(n,r,39),T=im(n,r,28)^sm(n,r,34)^sm(n,r,39),C=n&i^n&s^i&s,S=r&a^r&o^a&o;y=0|h,g=0|f,h=0|d,f=0|m,d=0|l,m=0|p,({h:l,l:p}=om(0|c,0|u,0|b,0|x)),c=0|s,u=0|o,s=0|i,o=0|a,i=0|n,a=0|r;const A=cm(x,T,S);n=um(A,b,_,C),r=0|A}({h:n,l:r}=om(0|this.Ah,0|this.Al,0|n,0|r)),({h:i,l:a}=om(0|this.Bh,0|this.Bl,0|i,0|a)),({h:s,l:o}=om(0|this.Ch,0|this.Cl,0|s,0|o)),({h:c,l:u}=om(0|this.Dh,0|this.Dl,0|c,0|u)),({h:l,l:p}=om(0|this.Eh,0|this.El,0|l,0|p)),({h:d,l:m}=om(0|this.Fh,0|this.Fl,0|d,0|m)),({h:h,l:f}=om(0|this.Gh,0|this.Gl,0|h,0|f)),({h:y,l:g}=om(0|this.Hh,0|this.Hl,0|y,0|g)),this.set(n,r,i,a,s,o,c,u,l,p,d,m,h,f,y,g)}roundClean(){ym.fill(0),gm.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Nm=Jd((()=>new wm));function vm(e){if("string"!=typeof e)throw new TypeError("Invalid mnemonic type: "+typeof e);return e.normalize("NFKD")}function bm(e,t=""){return async function(e,t,n){const{c:r,dkLen:i,asyncTick:a,DK:s,PRF:o,PRFSalt:c}=function(e,t,n,r){Ud(e);const i=function(e,t){if(void 0!==t&&"[object Object]"!==Hd.call(t))throw new Error("Options should be object or undefined");return Object.assign({dkLen:32,asyncTick:10},t)}(0,r),{c:a,dkLen:s,asyncTick:o}=i;if(Bd(a),Bd(s),Bd(o),a<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const c=Vd(t),u=Vd(n),l=new Uint8Array(s),p=Yd.create(e,c),d=p._cloneInto().update(u);return{c:a,dkLen:s,asyncTick:o,DK:l,PRF:p,PRFSalt:d}}(e,t,n,{c:2048,dkLen:64});let u;const l=new Uint8Array(4),p=Gd(l),d=new Uint8Array(o.outputLen);for(let e=1,t=0;t<i;e++,t+=o.outputLen){const n=s.subarray(t,t+o.outputLen);p.setInt32(0,e,!1),(u=c._cloneInto(u)).update(l).digestInto(d),n.set(d.subarray(0,n.length)),await Dd(r-1,a,(()=>{o._cloneInto(u).update(d).digestInto(d);for(let e=0;e<n.length;e++)n[e]^=d[e]}))}return function(e,t,n,r,i){return e.destroy(),t.destroy(),r&&r.destroy(),i.fill(0),n}(o,c,s,u,d)}(Nm,function(e){const t=vm(e),n=t.split(" ");if(![12,15,18,21,24].includes(n.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:n}}(e).nfkd,(e=>vm(`mnemonic${e}`))(t))}var xm=n(9234),_m=n.n(xm);class Tm{async discover(e){let t=0;const n=[];let r;do{null!=r&&n.push(r),r=await this.initialize(t),t+=1}while(await e.getAccountByPubkey(r.address).then((()=>!0),(()=>!1)));return n}}var Cm=n(8287).Buffer;function Sm(e,t,n){Am(e,t),t.set(e,n)}function Am(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Pm(e,t){return e.get(zm(e,t))}function Em(e,t,n){return e.set(zm(e,t),n),n}function zm(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Im=Cm.from("ed25519 seed");function Mm(e,t){const n=_m().full(e,t);return{secretKey:n.slice(0,32),chainCode:n.slice(32)}}function qm(e,t){return t.reduce((({secretKey:e,chainCode:t},n)=>{const r=Cm.allocUnsafe(4);return r.writeUInt32BE(n+2147483648,0),Mm(jn([Cm.alloc(1,0),e,r]),t)}),e)}var Rm=new WeakMap,Om=new WeakMap,km=new WeakSet;class Bm extends Tm{constructor(e){var t;super(),Am(this,t=km),t.add(this),Sm(this,Rm,void 0),Sm(this,Om,void 0),Em("string"==typeof e?Rm:Om,this,e)}async getWallet(){if(null!=Pm(Om,this))return Pm(Om,this);if(null==Pm(Rm,this))throw new te("AccountMnemonicFactory should be initialized with mnemonic or wallet");const e=qm(Mm(await bm(Pm(Rm,this)),Im),[44,457]);return Em(Om,this,{secretKey:br(e.secretKey,ir.Bytearray),chainCode:br(e.chainCode,ir.Bytearray)}),Pm(Om,this)}async initialize(e){return new fl(await zm(km,this,$m).call(this,e))}}async function $m(e){const t=await this.getWallet();return br(qm({secretKey:vr(t.secretKey),chainCode:vr(t.chainCode)},[e,0,0]).secretKey,ir.AccountSecretKey)}function Um(e,t){return e.get(Lm(e,t))}function Lm(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Gm=new WeakMap;class Fm extends il{constructor(e){var t,n,r;super(),r=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=Gm),n.set(t,r),vr(e),this.address=e}async sign(){throw new X("Can't sign using generalized account")}async signMessage(){throw new X("Can't sign using generalized account")}async signTypedData(){throw new X("Can't sign using generalized account")}async signDelegation(){throw new X("signing delegation using generalized account")}async signTransaction(e,{authData:t,onCompiler:n,onNode:r}){if(null==t||null==n||null==r)throw new G("authData, onCompiler, onNode","provided",null);const{callData:i,sourceCode:a,args:s,fee:o,gasLimit:c,gasPrice:u}="function"==typeof t?await t(e):t,l=null!=i?i:await(async()=>{if(null==Um(Gm,this)){const n=await fi(this.address,{onNode:r});if("generalized"!==n.kind)throw new G("account kind","generalized",n.kind);e=Gm,t=n.authFun,e.set(Lm(e,this),t)}var e,t;if(null==Um(Gm,this))throw new te("Account in generalised, but authFun not provided");if(null==a||null==s)throw new we("Auth data must contain sourceCode and args or callData.");const i=await tp.initialize({onCompiler:n,onNode:r,sourceCode:a});return i._calldata.encode(i._name,Um(Gm,this),s)})(),p=await bs({tag:Hr.GaMetaTx,tx:{tag:Hr.SignedTx,encodedTx:vr(e),signatures:[]},gaId:this.address,authData:l,fee:o,gasLimit:c,gasPrice:u,onNode:r});return vs({tag:Hr.SignedTx,encodedTx:vr(p),signatures:[]})}}var Dm=n(8287).Buffer;const Vm=224;class jm extends il{constructor(e,t,n){super(),this.transport=e,this.index=t,this.address=n,e.decorateAppAPIMethods(this,["signTransaction","signMessage"],"w0w")}async sign(){throw new X("RAW signing using Ledger HW")}async signTypedData(){throw new X("Typed data signing using Ledger HW")}async signDelegation(){throw new X("signing delegation using Ledger HW")}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null!=t)throw new X("innerTx option in AccountLedger");if(null==n)throw new G("networkId","provided",n);const r=vr(e);let i=0;const a=Dm.from(n),s=[];for(;i!==r.length;){const e=0===i?141-a.length:150,t=i+e>r.length?r.length-i:e,n=Dm.alloc(0===i?9+a.length+t:t);if(0===i){let e=n.writeUInt32BE(this.index,0);e=n.writeUInt32BE(r.length,e),e=n.writeUInt8(a.length,e),e+=a.copy(n,e,0,a.length),r.copy(n,e,0,150-e)}else r.copy(n,0,i,i+t);s.push(n),i+=t}const o=[(await s.reduce((async(e,t,n)=>(await e,this.transport.send(Vm,4,0===n?0:128,0,t))),Promise.resolve(Dm.alloc(0)))).subarray(0,64)];return vs({tag:Hr.SignedTx,encodedTx:r,signatures:o})}async signMessage(e){let t=0;const n=Dm.from(e),r=[];for(;t!==n.length;){const e=0===t?142:150,i=t+e>n.length?n.length-t:e,a=Dm.alloc(0===t?8+i:i);0===t?(a.writeUInt32BE(this.index,0),a.writeUInt32BE(n.length,4),n.copy(a,8,t,t+i)):n.copy(a,0,t,t+i),r.push(a),t+=i}return(await r.reduce((async(e,t,n)=>(await e,this.transport.send(Vm,8,0===n?0:128,0,t))),Promise.resolve(Dm.alloc(0)))).subarray(0,64)}}var Hm=n(8287).Buffer;function Jm(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Wm(e,t){return e.get(Km(e,t))}function Ym(e,t,n){return e.set(Km(e,t),n),n}function Km(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Qm=new WeakMap,Xm=new WeakSet;class Zm extends Tm{constructor(e){var t;super(),Jm(this,t=Xm),t.add(this),function(e,t){Jm(e,t),t.set(e,void 0)}(this,Qm),this.transport=e,e.decorateAppAPIMethods(this,["getAddress","getAppConfiguration"],"w0w")}async ensureReady(){const{version:e}=await Km(Xm,this,th).call(this),t=[e,"0.4.4","0.5.0"];if(!so(...t))throw new Z("Aeternity app on Ledger",...t);Ym(Qm,this,Promise.resolve())}async getAppConfiguration(){return Km(Xm,this,th).call(this)}async getAddress(e,t=!1){await Km(Xm,this,eh).call(this);const n=Hm.alloc(4);n.writeUInt32BE(e,0);const r=await this.transport.send(Vm,2,t?1:0,0,n),i=r[0];return r.subarray(1,1+i).toString("ascii")}async initialize(e){return new jm(this.transport,e,await this.getAddress(e))}}async function eh(){var e;return null!==(e=Wm(Qm,this))&&void 0!==e||Ym(Qm,this,this.ensureReady()),Wm(Qm,this)}async function th(){const e=await this.transport.send(Vm,6,0,0);return{version:[e[1],e[2],e[3]].join(".")}}var nh=n(8287).Buffer;const rh="npm:@aeternity-snap/plugin";async function ih(e,t,n,r){const i=await e.request({method:"wallet_invokeSnap",params:{snapId:rh,request:{method:t,params:n}}});if(null==i)throw new te("Empty MetaMask response");if(!(r in i))throw new te(`Key ${r} missed in response ${JSON.stringify(i)}`);return i[r]}class ah extends il{constructor(e,t,n){super(),this.provider=e,this.index=t,this.address=n}async sign(){throw new X("RAW signing using MetaMask")}async signTypedData(){throw new X("Typed data signing using MetaMask")}async signDelegation(){throw new X("signing delegation using MetaMask")}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null!=t)throw new X("innerTx option in AccountMetamask");if(null==n)throw new G("networkId","provided",n);return ih(this.provider,"signTransaction",{derivationPath:[`${this.index}'`,"0'","0'"],tx:e,networkId:n},"signedTx")}async signMessage(e){const t=await ih(this.provider,"signMessage",{derivationPath:[`${this.index}'`,"0'","0'"],message:nh.from(e).toString("base64")},"signature");return nh.from(t,"base64")}}function sh(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function oh(e,t){return e.get(uh(e,t))}function ch(e,t,n){return e.set(uh(e,t),n),n}function uh(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const lh="0.0.9";var ph=new WeakSet,dh=new WeakMap;class mh extends Tm{constructor(e){var t;if(super(),sh(this,t=ph),t.add(this),function(e,t){sh(e,t),t.set(e,void 0)}(this,dh),null==e){if(null==window)throw new K("Window object not found, you can run AccountMetamaskFactory only in browser or setup a provider");if(!("ethereum"in window)||null==window.ethereum)throw new K("`ethereum` object not found, you can run AccountMetamaskFactory only with Metamask enabled or setup a provider");this.provider=window.ethereum}else this.provider=e}async installSnap(){await uh(ph,this,hh).call(this);const e=await this.provider.request({method:"wallet_requestSnaps",params:{[rh]:{version:lh}}});return ch(dh,this,Promise.resolve()),e[rh]}async ensureReady(){const e=[await this.getSnapVersion(),lh,"0.1.0"];if(!so(...e))throw new Z("Aeternity snap in MetaMask",...e);ch(dh,this,Promise.resolve())}async getSnapVersion(){await uh(ph,this,hh).call(this);const e=await this.provider.request({method:"wallet_getSnaps"}),t=e[rh]?.version;if(null==t)throw new K("Aeternity snap is not installed to MetaMask");return t}async initialize(e){await uh(ph,this,fh).call(this);const t=await ih(this.provider,"getPublicKey",{derivationPath:[`${e}'`,"0'","0'"]},"publicKey");return new ah(this.provider,e,t)}}async function hh(){const e=await this.provider.request({method:"web3_clientVersion"});if(null==e)throw new te("Can't get Ethereum Provider version");if(!e.startsWith("MetaMask/v"))throw new K(`Expected Metamask, got ${e} instead`);const t=[e.slice(10),"12.2.4"];if(!so(...t))throw new Z("Metamask",...t)}async function fh(){var e;return null!==(e=oh(dh,this))&&void 0!==e||ch(dh,this,this.ensureReady()),oh(dh,this)}class yh{}const gh={type:{name:"Composite",className:"Contract",modelProperties:{code:{serializedName:"code",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}}}}},wh={type:{name:"Composite",className:"CompileOpts",modelProperties:{fileSystem:{serializedName:"file_system",type:{name:"Dictionary",value:{type:{name:"any"}}}},srcFile:{serializedName:"src_file",type:{name:"String"}}}}},Nh={type:{name:"Composite",className:"CompilerError",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},pos:{serializedName:"pos",type:{name:"Composite",className:"ErrorPos"}},message:{serializedName:"message",required:!0,type:{name:"String"}},context:{serializedName:"context",type:{name:"String"}}}}},vh={type:{name:"Composite",className:"ErrorPos",modelProperties:{file:{serializedName:"file",type:{name:"String"}},line:{serializedName:"line",required:!0,type:{name:"Number"}},col:{serializedName:"col",required:!0,type:{name:"Number"}}}}},bh={type:{name:"Composite",className:"CompileResult",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}},aci:{serializedName:"aci",required:!0,type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}},warnings:{serializedName:"warnings",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}}}}},xh={type:{name:"Composite",className:"SophiaCallResultInput",modelProperties:{source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}},function:{serializedName:"function",required:!0,type:{name:"String"}},callResult:{serializedName:"call-result",required:!0,type:{name:"String"}},callValue:{serializedName:"call-value",required:!0,type:{name:"String"}}}}},_h={type:{name:"Composite",className:"BytecodeCallResultInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}},callResult:{serializedName:"call-result",required:!0,type:{name:"String"}},callValue:{serializedName:"call-value",required:!0,type:{name:"String"}}}}},Th={type:{name:"Composite",className:"DecodedCallresult",modelProperties:{function:{serializedName:"function",required:!0,type:{name:"String"}},result:{serializedName:"result",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Ch={type:{name:"Composite",className:"FunctionCallInput",modelProperties:{source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}},function:{serializedName:"function",required:!0,type:{name:"String"}},arguments:{serializedName:"arguments",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Sh={type:{name:"Composite",className:"Calldata",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}}}}},Ah={type:{name:"Composite",className:"DecodeCalldataBytecode",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},Ph={type:{name:"Composite",className:"DecodedCalldata",modelProperties:{function:{serializedName:"function",required:!0,type:{name:"String"}},arguments:{serializedName:"arguments",required:!0,type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}}}}},Eh={type:{name:"Composite",className:"ErrorModel",modelProperties:{reason:{serializedName:"reason",required:!0,type:{name:"String"}}}}},zh={type:{name:"Composite",className:"DecodeCalldataSource",modelProperties:{source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}},calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}}}}},Ih={type:{name:"Composite",className:"ByteCodeInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},Mh={type:{name:"Composite",className:"FateAssembler",modelProperties:{fateAssembler:{serializedName:"fate-assembler",required:!0,type:{name:"String"}}}}},qh={type:{name:"Composite",className:"ValidateByteCodeInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}},source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}}}}},Rh={type:{name:"Composite",className:"CompilerVersion",modelProperties:{version:{serializedName:"version",required:!0,type:{name:"String"}}}}},Oh={type:{name:"Composite",className:"ApiVersion",modelProperties:{apiVersion:{serializedName:"api-version",required:!0,type:{name:"String"}}}}},kh={type:{name:"Composite",className:"SophiaBinaryData",modelProperties:{sophiaType:{serializedName:"sophia-type",required:!0,type:{name:"String"}},data:{serializedName:"data",required:!0,type:{name:"String"}}}}},Bh={type:{name:"Composite",className:"SophiaJsonData",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},$h={parameterPath:["options","contentType"],mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},Uh={parameterPath:"body",mapper:gh},Lh={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},Gh={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},Fh={parameterPath:"body",mapper:xh},Dh={parameterPath:"body",mapper:_h},Vh={parameterPath:"body",mapper:Ch},jh={parameterPath:"body",mapper:Ah},Hh={parameterPath:"body",mapper:zh},Jh={parameterPath:"body",mapper:Ih},Wh={parameterPath:"body",mapper:qh};class Yh extends io{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const i="azsdk-js-compiler/1.0.0-beta.1",a=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:a},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}generateACI(e,t){return this.sendOperationRequest({body:e,options:t},Qh)}compileContract(e,t){return this.sendOperationRequest({body:e,options:t},Xh)}decodeCallResult(e,t){return this.sendOperationRequest({body:e,options:t},Zh)}decodeCallResultBytecode(e,t){return this.sendOperationRequest({body:e,options:t},ef)}encodeCalldata(e,t){return this.sendOperationRequest({body:e,options:t},tf)}decodeCalldataBytecode(e,t){return this.sendOperationRequest({body:e,options:t},nf)}decodeCalldataSource(e,t){return this.sendOperationRequest({body:e,options:t},rf)}getFateAssemblerCode(e,t){return this.sendOperationRequest({body:e,options:t},af)}validateByteCode(e,t){return this.sendOperationRequest({body:e,options:t},sf)}getCompilerVersion(e,t){return this.sendOperationRequest({body:e,options:t},of)}version(e){return this.sendOperationRequest({options:e},cf)}apiVersion(e){return this.sendOperationRequest({options:e},uf)}api(e){return this.sendOperationRequest({options:e},lf)}}const Kh=qs(o,!1),Qh={path:"/aci",httpMethod:"POST",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Uh,urlParameters:[Gh],headerParameters:[$h,Lh],mediaType:"json",serializer:Kh},Xh={path:"/compile",httpMethod:"POST",responses:{200:{bodyMapper:bh},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Uh,urlParameters:[Gh],headerParameters:[$h,Lh],mediaType:"json",serializer:Kh},Zh={path:"/decode-call-result",httpMethod:"POST",responses:{200:{bodyMapper:{type:{name:"any"}}},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Fh,urlParameters:[Gh],headerParameters:[$h,Lh],mediaType:"json",serializer:Kh},ef={path:"/decode-call-result/bytecode",httpMethod:"POST",responses:{200:{bodyMapper:Th},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Dh,urlParameters:[Gh],headerParameters:[$h,Lh],mediaType:"json",serializer:Kh},tf={path:"/encode-calldata",httpMethod:"POST",responses:{200:{bodyMapper:Sh},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Vh,urlParameters:[Gh],headerParameters:[$h,Lh],mediaType:"json",serializer:Kh},nf={path:"/decode-calldata/bytecode",httpMethod:"POST",responses:{200:{bodyMapper:Ph},400:{bodyMapper:Eh,isError:!0}},requestBody:jh,urlParameters:[Gh],headerParameters:[$h,Lh],mediaType:"json",serializer:Kh},rf={path:"/decode-calldata/source",httpMethod:"POST",responses:{200:{bodyMapper:Ph},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Hh,urlParameters:[Gh],headerParameters:[$h,Lh],mediaType:"json",serializer:Kh},af={path:"/fate-assembler",httpMethod:"POST",responses:{200:{bodyMapper:Mh},400:{bodyMapper:Eh,isError:!0}},requestBody:Jh,urlParameters:[Gh],headerParameters:[$h,Lh],mediaType:"json",serializer:Kh},sf={path:"/validate-byte-code",httpMethod:"POST",responses:{200:{},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Wh,urlParameters:[Gh],headerParameters:[$h,Lh],mediaType:"json",serializer:Kh},of={path:"/compiler-version",httpMethod:"POST",responses:{200:{bodyMapper:Rh},400:{bodyMapper:Eh,isError:!0}},requestBody:Jh,urlParameters:[Gh],headerParameters:[$h,Lh],mediaType:"json",serializer:Kh},cf={path:"/version",httpMethod:"GET",responses:{200:{bodyMapper:Rh},500:{bodyMapper:Eh,isError:!0}},urlParameters:[Gh],headerParameters:[Lh],serializer:Kh},uf={path:"/api-version",httpMethod:"GET",responses:{200:{bodyMapper:Oh},500:{bodyMapper:Eh,isError:!0}},urlParameters:[Gh],headerParameters:[Lh],serializer:Kh},lf={path:"/api",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Dictionary",value:{type:{name:"any"}}}}},400:{bodyMapper:Eh,isError:!0}},urlParameters:[Gh],headerParameters:[Lh],serializer:Kh};class pf extends yh{constructor(e,{ignoreVersion:t=!1}={}){let n;super(),this.api=new Yh(e,{allowInsecureConnection:!0,additionalPolicies:[...t?[]:[wo("compiler",(async e=>(null!=n||(n=(await this.api.apiVersion(e)).apiVersion),n)),"8.0.0","9.0.0")],go((e=>{let t="";return"reason"in e&&(t+=` ${e.reason}${null!=e.parameter?` in ${e.parameter}`:""}${null!=e.info?` (${JSON.stringify(e.info)})`:""}`),Array.isArray(e)&&(t+=`\n${e.map((e=>`${e.type}:${e.pos.line}:${e.pos.col}: ${e.message}${null!=e.context?` (${e.context})`:""}`)).join("\n")}`),t}))]}),this.api.pipeline.removePolicy({name:an}),this.api.pipeline.removePolicy({name:An})}async compileBySourceCode(e,t){try{const n=await this.api.compileContract({code:e,options:{fileSystem:t}}),r=n.warnings.map((({type:e,...t})=>t));return{...n,warnings:r}}catch(e){if(e instanceof On&&400===e.statusCode)throw new O(e.message);throw e}}async compile(e){throw new X("File system access, use CompilerHttpNode instead")}async generateAciBySourceCode(e,t){try{return await this.api.generateACI({code:e,options:{fileSystem:t}})}catch(e){if(e instanceof On&&400===e.statusCode)throw new O(e.message);throw e}}async generateAci(e){throw new X("File system access, use CompilerHttpNode instead")}async validateBySourceCode(e,t,n){try{return await this.api.validateByteCode({bytecode:e,source:t,options:{fileSystem:n}}),!0}catch{return!1}}async validate(e,t){throw new X("File system access, use CompilerHttpNode instead")}async version(){return(await this.api.version()).version}}function df(e){return e.replace(/_./g,(e=>e[1].toUpperCase()))}var mf=n(952),hf=n.n(mf);const{w3cwebsocket:ff}=hf();function yf(e,...t){const[n,...r]=t;e._eventEmitter.emit(n,...r)}function gf(e,t){if(null==t)throw new ge;e._debug("enter state",t.handler.name),e._fsm=t,null!=t?.handler?.enter&&t.handler.enter(e),xf(e)}function wf(e,t,n){e._debug(t,`(prev. ${e._status})`,null!=n?n:""),t!==e._status&&(e._status=t,yf(e,"statusChanged",t))}function Nf(e,t){e._state=t,yf(e,"stateChanged",t)}function vf(e,t){e._debug("send message",t.method,t.params),e._websocket.send(Rd.stringify({jsonrpc:"2.0",...t}))}function bf(e,t,n={}){vf(e,{method:t,params:n})}async function xf(e){if(e._isActionQueueLocked)return;const t=e._actionQueue;if(0===t.length)return;const n=t.findIndex((t=>t.guard(e,e._fsm)));if(-1===n)return;e._actionQueue=t.filter(((e,t)=>n!==t)),e._isActionQueueLocked=!0;const r=await t[n].action(e,e._fsm);e._isActionQueueLocked=!1,gf(e,r)}async function _f(e,t){const{handler:n,state:r}=e._fsm,i=await Promise.resolve(n(e,t,r));if(gf(e,i),"OffChainNewContract"===t?.params?.data?.updates?.[0]?.op&&"channelOpen"===i?.handler.name){const n=e.round();if(null==n)throw new ne("Round is null");const r=t?.params?.data?.updates?.[0]?.owner;yf(e,"newContract",Ar(r,n+1))}}function Tf(e){e._websocket.close(),clearTimeout(e._pingTimeoutId)}function Cf(e){clearTimeout(e._pingTimeoutId),e._pingTimeoutId=setTimeout((()=>{bf(e,"channels.system",{action:"ping"}),e._pingTimeoutId=setTimeout((()=>{Tf(e),yf(e,"error",new he)}),15e3)}),1e4)}async function Sf(e,t,n){return new Promise(((r,i)=>{const a=e._nextRpcMessageId;e._nextRpcMessageId+=1,e._rpcCallbacks.set(a,(e=>{if(null!=e.error){var t;const n=null!==(t=e.error.data[0].message)&&void 0!==t?t:"";i(new de(e.error.message+n))}else r(e.result)})),vf(e,{method:t,id:a,params:n})}))}async function Af(e,t){const{signatures:n,encodedTx:r}=xs(e,Hr.SignedTx),i=vs(r),a=await t(i);if("string"==typeof a){const{signatures:e}=xs(a,Hr.SignedTx);return vs({tag:Hr.SignedTx,signatures:n.concat(e),encodedTx:vr(i)})}return a}async function Pf(e,t,n,r){var i;let a;if(null!=n.tx)a=await r(n.tx);else{if(null==n.signed_tx)throw new R("Can't find transaction in message");a=await Af(n.signed_tx,r)}const s="string"!=typeof a,o=null!=n.tx?"tx":"signed_tx";return bf(e,t,s?{error:null!==(i=a)&&void 0!==i?i:1}:{[o]:a}),s}function Ef(e,t,n){return n?.reject?.(Object.assign(new fe(`Unexpected message received:\n\n${JSON.stringify(t)}`),{wsMessage:t})),{handler:Bf}}function zf(e,t,n,r){if(null!=r&&"channels.update"===t.method)return r(e,t,n);if("channels.conflict"===t.method)return n.resolve({accepted:!1,errorCode:t.params.data.error_code,errorMessage:t.params.data.error_msg}),{handler:Bf};if("channels.info"===t.method&&"aborted_update"===t.params.data.event)return n.resolve({accepted:!1}),{handler:Bf};if(null!=t.error){const e=t.error.data.map((e=>e.code));return e.includes(1001)?n.reject(new V("Insufficient balance")):e.includes(1002)?n.reject(new F("Amount cannot be negative")):n.reject(new me(t.error.message)),{handler:Bf}}return Ef(0,t,n)}function If(e,t){if("channels.info"===t.method){const n=t.params.data.event;let r=null;return"channel_accept"===n&&(r="accepted"),"funding_created"===n&&(r="halfSigned"),null!=r?(wf(e,r),{handler:Rf}):"channel_reestablished"===t.params.data.event?{handler:kf}:"fsm_up"===t.params.data.event?(e._fsmId=t.params.data.fsm_id,{handler:If}):{handler:If}}if("channels.error"===t.method)return yf(e,"error",new me(t?.payload?.message)),{handler:Gf}}async function Mf(e,t,n){return"channels.info"===t.method&&"fsm_up"===t.params.data.event?(e._fsmId=t.params.data.fsm_id,{handler:function(e,t,n){return"channels.info"===t.method&&"channel_reestablished"===t.params.data.event?{handler:kf}:Ef(0,t,n)}}):Ef(0,t,n)}async function qf(e,t,n){if("channels.info"===t.method&&"fsm_up"===t.params.data.event){e._fsmId=t.params.data.fsm_id;const{signedTx:n}=await e.state();return Nf(e,null==n?"":vs(n)),{handler:Bf}}return Ef(0,t,n)}async function Rf(e,t){const n="initiator"===e._options.role?"initiator_sign":"responder_sign";if(t.method===`channels.sign.${n}`)return await Pf(e,`channels.${n}`,t.params.data,(async t=>e._options.sign(n,t))),{handler:Of}}function Of(e,t){if("channels.on_chain_tx"===t.method){const{info:n}=t.params.data,{role:r}=e._options;if("funding_signed"===n&&"initiator"===r||"funding_created"===n&&"responder"===r)return{handler:function t(n,r){if("channels.info"===r.method)switch(r.params.data.event){case"funding_created":case"own_funding_locked":return{handler:t};case"funding_locked":return{handler:kf}}if("channels.on_chain_tx"===r.method)return yf(e,"onChainTx",r.params.data.tx,{info:r.params.data.info,type:r.params.data.type}),{handler:t}}}}if("channels.info"===t.method&&"funding_signed"===t.params.data.event&&"initiator"===e._options.role)return e._channelId=t.params.channel_id,wf(e,"signed"),{handler:Of}}function kf(e,t,n){return"channels.info"===t.method&&"open"===t.params.data.event?(e._channelId=t.params.channel_id,{handler:function(t,n,r){return"channels.update"===n.method?(Nf(e,n.params.data.state),{handler:Bf}):Ef(0,n,r)}}):Ef(0,t,n)}async function Bf(e,t,n){switch(t.method){case"channels.info":switch(t.params.data.event){case"update":case"withdraw_created":case"deposit_created":return{handler:$f};case"own_withdraw_locked":case"withdraw_locked":case"own_deposit_locked":case"deposit_locked":case"peer_disconnected":case"channel_reestablished":case"open":return yf(e,df(t.params.data.event)),{handler:Bf};case"fsm_up":return e._fsmId=t.params.data.fsm_id,{handler:Bf};case"timeout":case"close_mutual":case"shutdown":return{handler:Bf};case"closing":return wf(e,"closing"),{handler:Bf};case"closed_confirmed":return wf(e,"closed"),{handler:Gf};case"died":return wf(e,"died"),{handler:Gf}}break;case"channels.on_chain_tx":return yf(e,"onChainTx",t.params.data.tx,{info:t.params.data.info,type:t.params.data.type}),{handler:Bf};case"channels.leave":return{handler:Bf};case"channels.update":return Nf(e,t.params.data.state),{handler:Bf};case"channels.sign.shutdown_sign_ack":return $f(e,t,n)}}async function $f(e,t,n){var r;const[,i]=null!==(r=t.method.match(/^channels\.sign\.([^.]+)$/))&&void 0!==r?r:[];return null==i?Ef(0,t,n):await Pf(e,`channels.${i}`,t.params.data,(async n=>e._options.sign(i,n,{updates:t.params.data.updates})))?{handler:function e(t,r){return null!=r.error?{handler:e,state:n}:"channels.conflict"===r.method?{handler:Bf}:Ef(0,r,n)},state:n}:{handler:Bf}}async function Uf(e,t,n){return"channels.sign.shutdown_sign"!==t.method?Ef(0,t,n):(await Pf(e,"channels.shutdown_sign",t.params.data,(async e=>n.sign(e))),{handler(e,t){return"channels.on_chain_tx"!==t.method?Ef(0,t,n):{handler:Gf,state:n}},state:n})}function Lf(e,t,n){return"channels.leave"===t.method?(n.resolve({channelId:t.params.channel_id,signedTx:t.params.data.state}),Tf(e),{handler:Gf}):"channels.error"===t.method?(n.reject(new me(t.data.message)),{handler:Bf}):Ef(0,t,n)}function Gf(e,t,n){return null==n?{handler:Gf}:"closing"===t.params.data.event?{handler:Gf,state:n}:"channel_closed"===t.params.data.info?(n.closeTx=t.params.data.tx,{handler:Gf,state:n}):"closed_confirmed"===t.params.data.event?(n.resolve(n.closeTx),{handler:Gf}):{handler:Gf,state:n}}Bf.enter=e=>{wf(e,"open")};var Ff=n(7007),Df=n.n(Ff);function Vf(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}let jf=0;var Hf=new WeakMap;class Jf{constructor(){var e,t;xp(this,"_eventEmitter",new(Df())),xp(this,"_nextRpcMessageId",0),xp(this,"_rpcCallbacks",new Map),xp(this,"_messageQueue",[]),xp(this,"_isMessageQueueLocked",!1),xp(this,"_actionQueue",[]),xp(this,"_isActionQueueLocked",!1),xp(this,"_status","disconnected"),xp(this,"_state",""),function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,Hf,void 0),jf+=1,t=jf,(e=Hf).set(Vf(e,this),t)}_debug(...e){var t;!0===this._options.debug&&console.debug(`Channel #${t=Hf,t.get(Vf(t,this))}`,...e)}static async initialize(e){return Jf._initialize(new Jf,e)}static async _initialize(e,t){var n;const r=null!=(null!==(n=t.existingFsmId)&&void 0!==n?n:t.existingChannelId);if(r&&(null==t.existingFsmId||null==t.existingChannelId))throw new F("`existingChannelId`, `existingFsmId` should be both provided or missed");const i=c[!0===t.reestablish?"awaitingReestablish":"awaitingReconnection"];return await async function(e,t,n,{url:r,...i}){e._options={url:r,...i};const a=new URL(r);Object.entries(i).filter((([e])=>!["sign","debug"].includes(e))).forEach((([e,t])=>a.searchParams.set(e.replace(/[A-Z]/g,(e=>`_${e.toLowerCase()}`)),t.toString()))),a.searchParams.set("protocol","json-rpc"),wf(e,"connecting"),e._websocket=new ff(a.toString()),await new Promise(((n,r)=>{Object.assign(e._websocket,{onerror:r,onopen:async r=>{n(),wf(e,"connected",r),gf(e,{handler:t}),Cf(e)},onclose:t=>{wf(e,"disconnected",t),clearTimeout(e._pingTimeoutId)},onmessage:({data:t})=>function(e,t){const n=Rd.parse(t);if(e._debug("received message",n.method,n.params),null==n.id)"channels.message"!==n.method?"channels.system.pong"!==n.method?(e._messageQueue.push(n),async function(e){if(!e._isMessageQueueLocked){for(e._isMessageQueueLocked=!0;e._messageQueue.length>0;){const t=e._messageQueue.shift();if(null==t)throw new ne;try{await _f(e,t)}catch(n){Yn(n),yf(e,"error",new ye(n,t))}}e._isMessageQueueLocked=!1}}(e)):n.params.channel_id!==e._channelId&&null!=e._channelId||Cf(e):yf(e,"message",n.params.data.message);else{const t=e._rpcCallbacks.get(n.id);if(null==t)return void yf(e,"error",new R(`Can't find callback by id: ${n.id}`));try{t(n)}finally{e._rpcCallbacks.delete(n.id)}}}(e,t)})}))}(e,r?i:If,0,t),e}on(e,t){this._eventEmitter.on(e,t)}off(e,t){this._eventEmitter.removeListener(e,t)}disconnect(){return Tf(this)}status(){return this._status}async state(){const e=(t=await Sf(this,"channels.get.offchain_state",{}),Object.entries(t).reduce(((e,[t,n])=>({...e,[df(t)]:n})),{}));var t;return{calls:ws(e.calls),...""!==e.halfSignedTx&&{halfSignedTx:xs(e.halfSignedTx,Hr.SignedTx)},...""!==e.signedTx&&{signedTx:xs(e.signedTx,Hr.SignedTx)},trees:ws(e.trees)}}round(){if(""===this._state)return null;const e=xs(this._state,Hr.SignedTx).encodedTx;switch(e.tag){case Hr.ChannelCreateTx:return 1;case Hr.ChannelOffChainTx:case Hr.ChannelWithdrawTx:case Hr.ChannelDepositTx:return e.round;default:return null}}id(){if(null==this._channelId)throw new R("Channel is not initialized");return this._channelId}fsmId(){if(null==this._fsmId)throw new R("Channel is not initialized");return this._fsmId}async enqueueAction(e){return async function(e,t,n){const r=new Promise(((r,i)=>{e._actionQueue.push({guard:t,action(){const e=n();return{...e,state:{...e.state,resolve:r,reject:i}}}})}));return xf(e),r}(this,((e,t)=>t?.handler===Bf),e)}async leave(){return this.enqueueAction((()=>(bf(this,"channels.leave"),{handler:Lf})))}async shutdown(e){return this.enqueueAction((()=>(bf(this,"channels.shutdown"),{handler:Uf,state:{sign:e}})))}}class Wf extends Jf{async update(e,t,n,r,i=[]){return this.enqueueAction((()=>{bf(this,"channels.update.new",{from:e,to:t,amount:n,meta:i});const a=async(e,t,n)=>"channels.sign.update"===t.method?await Pf(this,"channels.update",t.params.data,(async e=>r(e,{updates:t.params.data.updates})))?{handler:a,state:n}:{handler:(e,t)=>zf(this,t,n,(()=>(Nf(this,t.params.data.state),n.resolve({accepted:!0,signedTx:t.params.data.state}),{handler:Bf}))),state:n}:"channels.error"===t.method?(n.reject(new me(t.data.message)),{handler:Bf}):zf(this,t,n);return{handler:a}}))}async poi({accounts:e,contracts:t}){const{poi:n}=await Sf(this,"channels.get.poi",{accounts:e,contracts:t});return ws(n)}async balances(e){return Object.fromEntries((await Sf(this,"channels.get.balances",{accounts:e})).map((e=>[e.account,e.balance])))}async awaitingActionTx(e,t,n){if(t.method!==`channels.sign.${e}_tx`)return Ef(0,t,n);const r=(t,i)=>{if("channels.on_chain_tx"===i.method)return n.onOnChainTx?.(i.params.data.tx),{handler:r,state:n};if("channels.info"===i.method&&[`own_${e}_locked`,`${e}_locked`].includes(i.params.data.event)){const t="deposit"===e?"Deposit":"Withdraw",a=i.params.data.event.startsWith("own_");return n[`on${a?"Own":""}${t}Locked`]?.(),{handler:r,state:n}}return zf(this,i,n,(()=>(Nf(this,i.params.data.state),n.resolve({accepted:!0,signedTx:i.params.data.state}),{handler:Bf})))},{sign:i}=n;return await Pf(this,`channels.${e}_tx`,t.params.data,(async e=>i(e,{updates:t.params.data.updates}))),{handler:r,state:n}}async withdraw(e,t,{onOnChainTx:n,onOwnWithdrawLocked:r,onWithdrawLocked:i}={}){return this.enqueueAction((()=>(bf(this,"channels.withdraw",{amount:e}),{handler:async(e,t,n)=>this.awaitingActionTx("withdraw",t,n),state:{sign:t,onOnChainTx:n,onOwnWithdrawLocked:r,onWithdrawLocked:i}})))}async deposit(e,t,{onOnChainTx:n,onOwnDepositLocked:r,onDepositLocked:i}={}){return this.enqueueAction((()=>(bf(this,"channels.deposit",{amount:e}),{handler:async(e,t,n)=>this.awaitingActionTx("deposit",t,n),state:{sign:t,onOnChainTx:n,onOwnDepositLocked:r,onDepositLocked:i}})))}async sendMessage(e,t){const n="object"==typeof e?JSON.stringify(e):e;"connecting"===this.status()&&(await new Promise((e=>{const t=n=>{"connecting"!==n&&(e(),this.off("statusChanged",t))};this.on("statusChanged",t)})),await Dn(500)),bf(this,"channels.message",{info:n,to:t})}}function Yf(e){return Object.entries(e).reduce(((e,[t,n])=>({...e,[df(t)]:n})),{})}class Kf extends Wf{static async initialize(e){return Jf._initialize(new Kf,e)}async createContract({code:e,callData:t,deposit:n,vmVersion:r,abiVersion:i},a){return this.enqueueAction((()=>(bf(this,"channels.update.new_contract",{code:e,call_data:t,deposit:n,vm_version:r,abi_version:i}),{handler:async(e,t,n)=>"channels.sign.update"!==t.method?Ef(0,t,n):(await Pf(this,"channels.update",t.params.data,(async e=>n.sign(e))),{handler:(e,t,n)=>zf(this,t,n,(()=>{const e=xs(t.params.data.state,Hr.SignedTx).encodedTx;if(e.tag!==Hr.ChannelOffChainTx)throw new R(`Tag should be ${Hr[Hr.ChannelOffChainTx]}, got ${Hr[e.tag]} instead`);const r="initiator"===this._options.role?"initiatorId":"responderId",i=this._options[r];Nf(this,t.params.data.state);const a=Ar(i,e.round);return yf(this,"newContract",a),n.resolve({accepted:!0,address:a,signedTx:t.params.data.state}),{handler:Bf}})),state:n}),state:{sign:a}})))}async callContract({amount:e,callData:t,contract:n,abiVersion:r},i){return this.enqueueAction((()=>(bf(this,"channels.update.call_contract",{amount:e,call_data:t,contract_id:n,abi_version:r}),{handler:async(e,t,n)=>"channels.sign.update"!==t.method?Ef(0,t,n):(await Pf(this,"channels.update",t.params.data,(async e=>n.sign(e,{updates:t.params.data.updates}))),{handler:(e,t,n)=>zf(this,t,n,(()=>(Nf(this,t.params.data.state),n.resolve({accepted:!0,signedTx:t.params.data.state}),{handler:Bf}))),state:n}),state:{sign:i}})))}async forceProgress({amount:e,callData:t,contract:n,abiVersion:r,gasLimit:i=1e6,gasPrice:a=Br},s,{onOnChainTx:o}={}){return this.enqueueAction((()=>(bf(this,"channels.force_progress",{amount:e,call_data:t,contract_id:n,abi_version:r,gas_price:a,gas:i}),{handler:async(e,t,n)=>"channels.sign.force_progress_tx"!==t.method?Ef(0,t,n):(await Pf(this,"channels.force_progress_sign",t.params.data,(async e=>n.sign(e,{updates:t.params.data.updates}))),{handler:(e,t,n)=>("channels.on_chain_tx"===t.method&&(n.onOnChainTx?.(t.params.data.tx),yf(this,"onChainTx",t.params.data.tx,{info:t.params.data.info,type:t.params.data.type}),n.resolve({accepted:!0,tx:t.params.data.tx})),Ef(0,t,n)),state:n}),state:{sign:s,onOnChainTx:o}})))}async callContractStatic({amount:e,callData:t,contract:n,abiVersion:r}){return Yf(await Sf(this,"channels.dry_run.call_contract",{amount:e,call_data:t,contract_id:n,abi_version:r}))}async getContractCall({caller:e,contract:t,round:n}){return Yf(await Sf(this,"channels.get.contract_call",{caller_id:e,contract_id:t,round:n}))}async getContractState(e){const t=await Sf(this,"channels.get.contract",{pubkey:e});return Yf({...t,contract:Yf(t.contract)})}async cleanContractCalls(){return this.enqueueAction((()=>(bf(this,"channels.clean_contract_calls"),{handler(e,t,n){return"channels.calls_pruned.reply"===t.method?(n.resolve(),{handler:Bf}):(n.reject(new fe("Unexpected message received")),{handler:Gf})}})))}}var Qf=null;"undefined"!=typeof WebSocket?Qf=WebSocket:"undefined"!=typeof MozWebSocket?Qf=MozWebSocket:void 0!==n.g?Qf=n.g.WebSocket||n.g.MozWebSocket:"undefined"!=typeof window?Qf=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(Qf=self.WebSocket||self.MozWebSocket);var Xf=Qf;function Zf(e,t,n){ey(e,t),t.set(e,n)}function ey(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ty(e,t,n){return n(iy(e,t))}function ny(e,t,n){return e.set(iy(e,t),n),n}function ry(e,t){return e.get(iy(e,t))}function iy(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var ay=function(e){return e.Middleware="mdw",e.Node="node",e.All="all",e}(ay||{});class sy extends z{constructor(e){super(e),this.name="MiddlewareSubscriberError"}}class oy extends sy{constructor(e){super("Connection closed"),this.closeEvent=e,this.name="MiddlewareSubscriberDisconnected"}}var cy=new WeakMap,uy=new WeakMap,ly=new WeakMap,py=new WeakSet;class dy{get webSocket(){return ry(ly,this)}constructor(e){var t;ey(this,t=py),t.add(this),Zf(this,cy,[]),Zf(this,uy,[]),Zf(this,ly,void 0),this.url=e}async reconnect(){iy(py,this,gy).call(this),ny(ly,this,await new Promise((e=>{const t=new Xf(this.url);Object.assign(t,{onopen:()=>e(t),onerror:e=>{iy(py,this,yy).call(this,(()=>!0),void 0,e.error)},onmessage:e=>{if("string"!=typeof e.data)throw new te("Unknown incoming message type: "+typeof e.data);iy(py,this,wy).call(this,JSON.parse(e.data))},onclose:e=>{iy(py,this,yy).call(this,(()=>!0),void 0,new oy(e)),iy(py,this,gy).call(this,!0)}})}))),await Promise.all([...ty(py,this,my)].map((e=>iy(py,this,fy).call(this,!0,e))))}subscribeKeyBlocks(e){return iy(py,this,Ny).call(this,"KeyBlocks",ay.Middleware,e)}subscribeKeyBlocksNode(e){return iy(py,this,Ny).call(this,"KeyBlocks",ay.Node,e)}subscribeKeyBlocksAll(e){return iy(py,this,Ny).call(this,"KeyBlocks",ay.All,e)}subscribeMicroBlocks(e){return iy(py,this,Ny).call(this,"MicroBlocks",ay.Middleware,e)}subscribeMicroBlocksNode(e){return iy(py,this,Ny).call(this,"MicroBlocks",ay.Node,e)}subscribeMicroBlocksAll(e){return iy(py,this,Ny).call(this,"MicroBlocks",ay.All,e)}subscribeTransactions(e){return iy(py,this,Ny).call(this,"Transactions",ay.Middleware,e)}subscribeTransactionsNode(e){return iy(py,this,Ny).call(this,"Transactions",ay.Node,e)}subscribeTransactionsAll(e){return iy(py,this,Ny).call(this,"Transactions",ay.All,e)}subscribeObject(e,t){return iy(py,this,Ny).call(this,e,ay.Middleware,t)}subscribeObjectNode(e,t){return iy(py,this,Ny).call(this,e,ay.Node,t)}subscribeObjectAll(e,t){return iy(py,this,Ny).call(this,e,ay.All,t)}}function my(e){return new Set(ry(cy,e).map((([e])=>e)))}function hy(e){if(null==ry(ly,this))throw new ne;ry(ly,this).send(JSON.stringify(e))}function fy(e,t){if(null==ry(ly,this))return;const n=["KeyBlocks","MicroBlocks","Transactions"].includes(t)?t:"Object";iy(py,this,hy).call(this,{op:e?"Subscribe":"Unsubscribe",payload:n,..."Object"===n&&{target:t}}),ry(uy,this).push([e,t])}function yy(e,t,n){ry(cy,this).filter((([t,n])=>e(t,n))).forEach((([,,e])=>e(t,n)))}function gy(e=!1){null!=ry(ly,this)&&(e||ry(ly,this).close(),Object.assign(ry(ly,this),{onopen:void 0,onerror:void 0,onmessage:void 0}),ny(ly,this,void 0))}function wy(e){if("string"==typeof e||Array.isArray(e)){const t=ry(uy,this).shift();if(null==t)throw new te("Request queue is empty");const[n,r]=t;let i;return"string"==typeof e&&(i=new sy(e)),e.includes(r)!==n&&(i=new te(`Expected ${r} to be${n?"":" not"} included into ${e}`)),void(null!=i&&iy(py,this,yy).call(this,(e=>r===e),void 0,i))}iy(py,this,yy).call(this,((t,n)=>!(t!==e.subscription&&t!==e.target||n!==e.source&&n!==ay.All)),e.payload)}function Ny(e,t,n){const r=[e,t,n];return 0===ty(py,this,my).size&&this.reconnect(),ty(py,this,my).has(e)||iy(py,this,fy).call(this,!0,e),ry(cy,this).push(r),()=>{ny(cy,this,ry(cy,this).filter((e=>e!==r))),ty(py,this,my).has(e)||iy(py,this,fy).call(this,!1,e),0===ty(py,this,my).size&&iy(py,this,gy).call(this)}}const vy={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},by={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},xy={parameterPath:["options","limit"],mapper:{defaultValue:10,constraints:{InclusiveMaximum:100,InclusiveMinimum:1},serializedName:"limit",type:{name:"Number"}}},_y={parameterPath:"accountId",mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"accountId",required:!0,type:{name:"String"}}},Ty={parameterPath:["options","contract"],mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",type:{name:"String"}}},Cy={parameterPath:"accountId",mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account_id",required:!0,type:{name:"String"}}},Sy={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},Ay={parameterPath:["options","scope"],mapper:{constraints:{Pattern:new RegExp("(txi|gen):\\d+(-\\d+)?")},serializedName:"scope",type:{name:"String"}}},Py={parameterPath:["options","prefix"],mapper:{serializedName:"prefix",type:{name:"String"}}},Ey={parameterPath:["options","exact"],mapper:{serializedName:"exact",type:{name:"String"}}},zy={parameterPath:"contractId",mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contractId",required:!0,type:{name:"String"}}},Iy={parameterPath:["options","from"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"from",type:{name:"String"}}},My={parameterPath:["options","to"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"to",type:{name:"String"}}},qy={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},Ry={parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"String"}}},Oy={parameterPath:["options","blockHash"],mapper:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",type:{name:"String"}}},ky={parameterPath:["options","hash"],mapper:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"hash",type:{name:"String"}}},By={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ch_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},$y={parameterPath:["options","contractId"],mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",type:{name:"String"}}},Uy={parameterPath:"contractId",mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}}},Ly={parameterPath:"hashOrKbi",mapper:{serializedName:"hash_or_kbi",required:!0,type:{name:"String"}}},Gy={parameterPath:"hash",mapper:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}}},Fy={parameterPath:["options","ownedBy"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owned_by",type:{name:"String"}}},Dy={parameterPath:["options","state"],mapper:{serializedName:"state",type:{name:"String"}}},Vy={parameterPath:"id",mapper:{serializedName:"id",required:!0,type:{name:"String"}}},jy={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},Hy={parameterPath:["options","minStartDate"],mapper:{serializedName:"min_start_date",type:{name:"String"}}},Jy={parameterPath:["options","maxStartDate"],mapper:{serializedName:"max_start_date",type:{name:"String"}}},Wy={parameterPath:["options","txType"],mapper:{serializedName:"tx_type",type:{name:"String"}}},Yy={parameterPath:["options","account"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account",type:{name:"String"}}},Ky={parameterPath:["options","channel"],mapper:{constraints:{Pattern:new RegExp("^ch_\\w{38,50}$")},serializedName:"channel",type:{name:"String"}}},Qy={parameterPath:["options","oracle"],mapper:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle",type:{name:"String"}}},Xy={parameterPath:["options","senderId"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",type:{name:"String"}}},Zy={parameterPath:["options","recipientId"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient_id",type:{name:"String"}}},eg={parameterPath:["options","id"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"id",type:{name:"String"}}},tg={parameterPath:"hash",mapper:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}}},ng={type:{name:"Composite",className:"Paths1Q9E32FV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TokenResponse"}}}}}}},rg={type:{name:"Composite",className:"Aex141TokenResponse",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},ownerId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owner_id",type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}}}}},ig={type:{name:"Composite",className:"PaginatedResponse",modelProperties:{next:{serializedName:"next",required:!0,nullable:!0,type:{name:"String"}},prev:{serializedName:"prev",required:!0,nullable:!0,type:{name:"String"}}}}},ag={type:{name:"Composite",className:"ErrorResponse",modelProperties:{error:{serializedName:"error",required:!0,type:{name:"String"}}}}},sg={type:{name:"Composite",className:"PathsZ92TkfV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchemaAllof1",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9BalanceResponse"}}}}}}},og={type:{name:"Composite",className:"Aex9BalanceResponse",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},decimals:{serializedName:"decimals",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},tokenName:{serializedName:"token_name",required:!0,type:{name:"String"}},tokenSymbol:{serializedName:"token_symbol",required:!0,type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}},txIndex:{serializedName:"tx_index",required:!0,type:{name:"Number"}},txType:{serializedName:"tx_type",required:!0,type:{name:"String"}}}}},cg={type:{name:"Composite",className:"Paths1Ymnu9GV3AccountsAccountIdDexSwapsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DexSwap"}}}}}}},ug={type:{name:"Composite",className:"DexSwap",modelProperties:{action:{serializedName:"action",required:!0,type:{name:"String"}},amounts:{serializedName:"amounts",type:{name:"Composite",className:"DexSwapAmounts"}},caller:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"caller",required:!0,type:{name:"String"}},fromAmount:{serializedName:"from_amount",required:!0,type:{name:"BigInt"}},fromContract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"from_contract",required:!0,type:{name:"String"}},fromDecimals:{serializedName:"from_decimals",required:!0,type:{name:"Number"}},fromToken:{serializedName:"from_token",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},toAccount:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"to_account",required:!0,type:{name:"String"}},toAmount:{serializedName:"to_amount",required:!0,type:{name:"BigInt"}},toContract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"to_contract",required:!0,type:{name:"String"}},toDecimals:{serializedName:"to_decimals",required:!0,type:{name:"Number"}},toToken:{serializedName:"to_token",required:!0,type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},lg={type:{name:"Composite",className:"DexSwapAmounts",modelProperties:{amount0In:{serializedName:"amount0_in",required:!0,type:{name:"BigInt"}},amount0Out:{serializedName:"amount0_out",required:!0,type:{name:"BigInt"}},amount1In:{serializedName:"amount1_in",required:!0,type:{name:"BigInt"}},amount1Out:{serializedName:"amount1_out",required:!0,type:{name:"BigInt"}}}}},pg={type:{name:"Composite",className:"Paths1Ent1R1V3AccountsIdActivitiesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Activity"}}}}}}},dg={type:{name:"Composite",className:"Activity",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},payload:{serializedName:"payload",type:{name:"Composite",className:"ActivityPayload"}},type:{serializedName:"type",required:!0,type:{name:"String"}}}}},mg={type:{name:"Composite",className:"ActivityPayload",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",type:{name:"String"}},blockHeight:{serializedName:"block_height",type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",type:{name:"String"}},microIndex:{serializedName:"micro_index",type:{name:"Number"}},microTime:{serializedName:"micro_time",type:{name:"UnixTime"}},signatures:{serializedName:"signatures",type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},amount:{serializedName:"amount",type:{name:"BigInt"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",type:{name:"String"}},logIdx:{serializedName:"log_idx",type:{name:"Number"}},recipientId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient_id",type:{name:"String"}},senderId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",type:{name:"String"}},recipient:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient",type:{name:"String"}},sender:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender",type:{name:"String"}},tokenId:{serializedName:"token_id",type:{name:"Number"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",type:{name:"String"}},function:{serializedName:"function",type:{name:"String"}},height:{serializedName:"height",type:{name:"Number"}},internalTx:{serializedName:"internal_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},kind:{serializedName:"kind",type:{name:"String"}},refTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ref_tx_hash",type:{name:"String"}}}}},hg={type:{name:"Composite",className:"PathsC0UvfgV3AccountsIdNamesPointeesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Pointee"}}}}}}},fg={type:{name:"Composite",className:"Pointee",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},key:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"key",required:!0,type:{name:"String"}},name:{constraints:{Pattern:new RegExp("^\\w+\\.chain$")},serializedName:"name",required:!0,type:{name:"String"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},yg={type:{name:"Composite",className:"NotFoundResponse",modelProperties:{error:{serializedName:"error",required:!0,type:{name:"String"}}}}},gg={type:{name:"Composite",className:"PathsLv15NfV3TransactionsCountIdGetResponses200ContentApplicationJsonSchema",modelProperties:{channelCloseMutualTx:{serializedName:"channel_close_mutual_tx",type:{name:"Composite",className:"Get200ApplicationJsonProperties"}},channelCloseSoloTx:{serializedName:"channel_close_solo_tx",type:{name:"Composite",className:"PathsKcpsuzV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx"}},channelCreateTx:{serializedName:"channel_create_tx",type:{name:"Composite",className:"Paths1W3C1Z4V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx"}},channelDepositTx:{serializedName:"channel_deposit_tx",type:{name:"Composite",className:"PathsTvtzmvV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx"}},channelForceProgressTx:{serializedName:"channel_force_progress_tx",type:{name:"Composite",className:"PathsMxcme6V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx"}},channelOffchainTx:{serializedName:"channel_offchain_tx",type:{name:"Composite",className:"Paths1Cnk4LbV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx"}},channelSetDelegatesTx:{serializedName:"channel_set_delegates_tx",type:{name:"Composite",className:"Paths13Ss1Q2V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx"}},channelSettleTx:{serializedName:"channel_settle_tx",type:{name:"Composite",className:"Paths1Gime4MV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx"}},channelSlashTx:{serializedName:"channel_slash_tx",type:{name:"Composite",className:"PathsVn5L1LV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx"}},channelSnapshotSoloTx:{serializedName:"channel_snapshot_solo_tx",type:{name:"Composite",className:"Paths10T1AqyV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx"}},channelWithdrawTx:{serializedName:"channel_withdraw_tx",type:{name:"Composite",className:"PathsTr523PV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx"}},contractCallTx:{serializedName:"contract_call_tx",type:{name:"Composite",className:"PathsChduayV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx"}},contractCreateTx:{serializedName:"contract_create_tx",type:{name:"Composite",className:"Paths5Shu25V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesContractCreateTx"}},gaAttachTx:{serializedName:"ga_attach_tx",type:{name:"Composite",className:"Paths1RkuxepV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx"}},gaMetaTx:{serializedName:"ga_meta_tx",type:{name:"Composite",className:"PathsQklaaxV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx"}},nameClaimTx:{serializedName:"name_claim_tx",type:{name:"Composite",className:"Paths1Hacjy0V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx"}},namePreclaimTx:{serializedName:"name_preclaim_tx",type:{name:"Composite",className:"Paths139X1XaV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx"}},nameRevokeTx:{serializedName:"name_revoke_tx",type:{name:"Composite",className:"Paths1R3Fb8MV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx"}},nameTransferTx:{serializedName:"name_transfer_tx",type:{name:"Composite",className:"PathsZdcclfV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx"}},nameUpdateTx:{serializedName:"name_update_tx",type:{name:"Composite",className:"Paths1VkyqhtV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx"}},oracleExtendTx:{serializedName:"oracle_extend_tx",type:{name:"Composite",className:"Paths107D9HzV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx"}},oracleQueryTx:{serializedName:"oracle_query_tx",type:{name:"Composite",className:"PathsS6Nx2KV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx"}},oracleRegisterTx:{serializedName:"oracle_register_tx",type:{name:"Composite",className:"Paths184Oz8CV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx"}},oracleResponseTx:{serializedName:"oracle_response_tx",type:{name:"Composite",className:"PathsLm5DjtV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx"}},payingForTx:{serializedName:"paying_for_tx",type:{name:"Composite",className:"Paths16B89KuV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx"}},spendTx:{serializedName:"spend_tx",type:{name:"Composite",className:"Paths1Ljyzq7V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx"}},total:{serializedName:"total",required:!0,type:{name:"Number"}}}}},wg={type:{name:"Composite",className:"Get200ApplicationJsonProperties",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Ng={type:{name:"Composite",className:"PathsKcpsuzV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},vg={type:{name:"Composite",className:"Paths1W3C1Z4V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx",modelProperties:{initiatorId:{serializedName:"initiator_id",type:{name:"Number"}},responderId:{serializedName:"responder_id",type:{name:"Number"}}}}},bg={type:{name:"Composite",className:"PathsTvtzmvV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},xg={type:{name:"Composite",className:"PathsMxcme6V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},_g={type:{name:"Composite",className:"Paths1Cnk4LbV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}}}}},Tg={type:{name:"Composite",className:"Paths13Ss1Q2V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Cg={type:{name:"Composite",className:"Paths1Gime4MV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Sg={type:{name:"Composite",className:"PathsVn5L1LV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Ag={type:{name:"Composite",className:"Paths10T1AqyV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Pg={type:{name:"Composite",className:"PathsTr523PV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},toId:{serializedName:"to_id",type:{name:"Number"}}}}},Eg={type:{name:"Composite",className:"PathsChduayV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx",modelProperties:{callerId:{serializedName:"caller_id",type:{name:"Number"}},contractId:{serializedName:"contract_id",type:{name:"Number"}}}}},zg={type:{name:"Composite",className:"Paths5Shu25V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesContractCreateTx",modelProperties:{ownerId:{serializedName:"owner_id",type:{name:"Number"}}}}},Ig={type:{name:"Composite",className:"Paths1RkuxepV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx",modelProperties:{ownerId:{serializedName:"owner_id",type:{name:"Number"}}}}},Mg={type:{name:"Composite",className:"PathsQklaaxV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx",modelProperties:{gaId:{serializedName:"ga_id",type:{name:"Number"}}}}},qg={type:{name:"Composite",className:"Paths1Hacjy0V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}}}}},Rg={type:{name:"Composite",className:"Paths139X1XaV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},commitmentId:{serializedName:"commitment_id",type:{name:"Number"}}}}},Og={type:{name:"Composite",className:"Paths1R3Fb8MV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},nameId:{serializedName:"name_id",type:{name:"Number"}}}}},kg={type:{name:"Composite",className:"PathsZdcclfV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},nameId:{serializedName:"name_id",type:{name:"Number"}},recipientId:{serializedName:"recipient_id",type:{name:"Number"}}}}},Bg={type:{name:"Composite",className:"Paths1VkyqhtV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},nameId:{serializedName:"name_id",type:{name:"Number"}}}}},$g={type:{name:"Composite",className:"Paths107D9HzV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx",modelProperties:{oracleId:{serializedName:"oracle_id",type:{name:"Number"}}}}},Ug={type:{name:"Composite",className:"PathsS6Nx2KV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx",modelProperties:{oracleId:{serializedName:"oracle_id",type:{name:"Number"}},senderId:{serializedName:"sender_id",type:{name:"Number"}}}}},Lg={type:{name:"Composite",className:"Paths184Oz8CV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}}}}},Gg={type:{name:"Composite",className:"PathsLm5DjtV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx",modelProperties:{oracleId:{serializedName:"oracle_id",type:{name:"Number"}}}}},Fg={type:{name:"Composite",className:"Paths16B89KuV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx",modelProperties:{payerId:{serializedName:"payer_id",type:{name:"Number"}}}}},Dg={type:{name:"Composite",className:"Paths1Ljyzq7V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx",modelProperties:{recipientId:{serializedName:"recipient_id",type:{name:"Number"}},senderId:{serializedName:"sender_id",type:{name:"Number"}}}}},Vg={type:{name:"Composite",className:"Paths8I0YgwV3Aex141GetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141Response"}}}}}}},jg={type:{name:"Composite",className:"Aex141Response",modelProperties:{baseUrl:{serializedName:"base_url",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},creationTime:{serializedName:"creation_time",required:!0,type:{name:"UnixTime"}},extensions:{serializedName:"extensions",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},invalid:{serializedName:"invalid",required:!0,type:{name:"Boolean"}},limits:{serializedName:"limits",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Hg={type:{name:"Composite",className:"PathsWkpcwaV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TemplatesResponse"}}}}}}},Jg={type:{name:"Composite",className:"Aex141TemplatesResponse",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},edition:{serializedName:"edition",type:{name:"Dictionary",value:{type:{name:"any"}}}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},templateId:{serializedName:"template_id",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},Wg={type:{name:"Composite",className:"PathsRay4X0V3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TemplateTokensResponse"}}}}}}},Yg={type:{name:"Composite",className:"Aex141TemplateTokensResponse",modelProperties:{logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},ownerId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owner_id",required:!0,type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},Kg={type:{name:"Composite",className:"Paths1TkisghV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TokenResponse"}}}}}}},Qg={type:{name:"Composite",className:"Paths1Fbvaw8V3Aex141ContractidTokensTokenidGetResponses200ContentApplicationJsonSchema",modelProperties:{data:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"data",required:!0,type:{name:"String"}}}}},Xg={type:{name:"Composite",className:"Paths1A8Ah39V3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TransferEvent"}}}}}}},Zg={type:{name:"Composite",className:"Aex141TransferEvent",modelProperties:{blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},recipient:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient",required:!0,type:{name:"String"}},sender:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender",required:!0,type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},ew={type:{name:"Composite",className:"Paths1Uqqby0V3Aex9GetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9Response"}}}}}}},tw={type:{name:"Composite",className:"Aex9Response",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},decimals:{serializedName:"decimals",required:!0,type:{name:"Number"}},eventSupply:{serializedName:"event_supply",required:!0,type:{name:"BigInt"}},extensions:{serializedName:"extensions",type:{name:"Sequence",element:{type:{name:"String"}}}},holders:{serializedName:"holders",required:!0,type:{name:"Number"}},initialSupply:{serializedName:"initial_supply",required:!0,type:{name:"BigInt"}},invalid:{serializedName:"invalid",required:!0,type:{name:"Boolean"}},name:{serializedName:"name",required:!0,type:{name:"String"}},symbol:{serializedName:"symbol",required:!0,type:{name:"String"}}}}},nw={type:{name:"Composite",className:"Paths19IxhsmV3Aex9CountGetResponses200ContentApplicationJsonSchema",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Number"}}}}},rw={type:{name:"Composite",className:"PathsEeiffwV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9ContractBalanceResponse"}}}}}}},iw={type:{name:"Composite",className:"Aex9ContractBalanceResponse",modelProperties:{accountId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account_id",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},lastLogIdx:{serializedName:"last_log_idx",required:!0,type:{name:"Number"}},lastTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_tx_hash",required:!0,type:{name:"String"}}}}},aw={type:{name:"Composite",className:"PathsKr825V3Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchema",modelProperties:{account:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},contract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",required:!0,type:{name:"String"}}}}},sw={type:{name:"Composite",className:"Paths108B3VtV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchemaAllof1",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Get200ApplicationJsonAllOfPropertiesItemsItem"}}}}}}},ow={type:{name:"Composite",className:"Get200ApplicationJsonAllOfPropertiesItemsItem",modelProperties:{account:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},contract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}}}}},cw={type:{name:"Composite",className:"PathsQmewnaV3ChannelsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Channel"}}}}}}},uw={type:{name:"Composite",className:"Channel",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},channel:{constraints:{Pattern:new RegExp("^ch_\\w{38,50}$")},serializedName:"channel",required:!0,type:{name:"String"}},channelReserve:{serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},delegateIds:{serializedName:"delegate_ids",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},initiator:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"initiator",required:!0,type:{name:"String"}},initiatorAmount:{serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},lastUpdatedHeight:{serializedName:"last_updated_height",required:!0,type:{name:"Number"}},lastUpdatedTime:{serializedName:"last_updated_time",required:!0,type:{name:"UnixTime"}},lastUpdatedTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_updated_tx_hash",required:!0,type:{name:"String"}},lastUpdatedTxType:{serializedName:"last_updated_tx_type",required:!0,type:{name:"String"}},lockPeriod:{serializedName:"lock_period",required:!0,type:{name:"Number"}},lockedUntil:{serializedName:"locked_until",required:!0,type:{name:"Number"}},responder:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"responder",required:!0,type:{name:"String"}},responderAmount:{serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},round:{serializedName:"round",required:!0,type:{name:"Number"}},soloRound:{serializedName:"solo_round",required:!0,type:{name:"Number"}},stateHash:{constraints:{Pattern:new RegExp("^st_\\w+$")},serializedName:"state_hash",required:!0,type:{name:"String"}},updatesCount:{serializedName:"updates_count",required:!0,type:{name:"Number"}}}}},lw={type:{name:"Composite",className:"Paths18L84JcV3ContractsCallsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ContractCall"}}}}}}},pw={type:{name:"Composite",className:"ContractCall",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},internalTx:{serializedName:"internal_tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},localIdx:{serializedName:"local_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}}}}},dw={type:{name:"Composite",className:"Paths10Kk1UxV3ContractsLogsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ContractLog"}}}}}}},mw={type:{name:"Composite",className:"ContractLog",modelProperties:{args:{serializedName:"args",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},data:{serializedName:"data",required:!0,type:{name:"String"}},eventHash:{serializedName:"event_hash",required:!0,type:{name:"String"}},eventName:{serializedName:"event_name",required:!0,nullable:!0,type:{name:"String"}},extCallerContractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"ext_caller_contract_id",required:!0,nullable:!0,type:{name:"String"}},extCallerContractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ext_caller_contract_tx_hash",required:!0,nullable:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},parentContractId:{serializedName:"parent_contract_id",required:!0,nullable:!0,type:{name:"Number"}}}}},hw={type:{name:"Composite",className:"Contract",modelProperties:{aexnType:{serializedName:"aexn_type",required:!0,nullable:!0,type:{name:"String"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},contract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",required:!0,type:{name:"String"}},createTx:{serializedName:"create_tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}}}}},fw={type:{name:"Composite",className:"Paths9Yfxl2V3DexSwapsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DexSwap"}}}}}}},yw={type:{name:"Composite",className:"Paths6Vze8ZV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DexSwap"}}}}}}},gw={type:{name:"Composite",className:"PathsEue6HzV3KeyBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"KeyBlock"}}}}}}},ww={type:{name:"Composite",className:"KeyBlock",modelProperties:{beneficiary:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"beneficiary",required:!0,type:{name:"String"}},beneficiaryReward:{serializedName:"beneficiary_reward",type:{name:"Number"}},hash:{constraints:{Pattern:new RegExp("^kh_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},info:{constraints:{Pattern:new RegExp("^cb_\\w+$")},serializedName:"info",required:!0,type:{name:"String"}},microBlocksCount:{serializedName:"micro_blocks_count",required:!0,type:{name:"Number"}},miner:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"miner",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"Number"}},pow:{serializedName:"pow",type:{name:"Sequence",element:{type:{name:"Number"}}}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{constraints:{Pattern:new RegExp("^kh_\\w{38,50}$")},serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{constraints:{Pattern:new RegExp("^bs_\\w{38,50}$")},serializedName:"state_hash",required:!0,type:{name:"String"}},target:{serializedName:"target",required:!0,type:{name:"Number"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},transactionsCount:{serializedName:"transactions_count",required:!0,type:{name:"Number"}},version:{serializedName:"version",required:!0,type:{name:"Number"}}}}},Nw={type:{name:"Composite",className:"PathsNn60D7V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"MicroBlock"}}}}}}},vw={type:{name:"Composite",className:"MicroBlock",modelProperties:{hash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},microBlockIndex:{serializedName:"micro_block_index",required:!0,type:{name:"Number"}},pofHash:{constraints:{Pattern:new RegExp("^no_fraud|bf_\\w{38,50}$")},serializedName:"pof_hash",required:!0,type:{name:"String"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{constraints:{Pattern:new RegExp("^kh_\\w{38,50}$")},serializedName:"prev_key_hash",required:!0,type:{name:"String"}},signature:{constraints:{Pattern:new RegExp("^sg_\\w+$")},serializedName:"signature",required:!0,type:{name:"String"}},stateHash:{constraints:{Pattern:new RegExp("^bs_\\w{38,50}$")},serializedName:"state_hash",required:!0,type:{name:"String"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},transactionsCount:{serializedName:"transactions_count",required:!0,type:{name:"Number"}},txsHash:{constraints:{Pattern:new RegExp("^bx_\\w{38,50}$")},serializedName:"txs_hash",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"Number"}}}}},bw={type:{name:"Composite",className:"PathsXhlqwrV3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Transaction"}}}}}}},xw={type:{name:"Composite",className:"Transaction",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},_w={type:{name:"Composite",className:"Paths181Cs9V3NamesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Name"}}}}}}},Tw={type:{name:"Composite",className:"Name",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},approximateActivationTime:{serializedName:"approximate_activation_time",required:!0,type:{name:"UnixTime"}},approximateExpireTime:{serializedName:"approximate_expire_time",required:!0,type:{name:"UnixTime"}},auction:{serializedName:"auction",type:{name:"Composite",className:"Auction"}},auctionTimeout:{serializedName:"auction_timeout",required:!0,type:{name:"Number"}},expireHeight:{serializedName:"expire_height",required:!0,type:{name:"Number"}},hash:{constraints:{Pattern:new RegExp("^nm_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},name:{constraints:{Pattern:new RegExp("^\\w+\\.chain$")},serializedName:"name",required:!0,type:{name:"String"}},nameFee:{serializedName:"name_fee",required:!0,type:{name:"BigInt"}},ownership:{serializedName:"ownership",type:{name:"Composite",className:"NameOwnership"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},revoke:{serializedName:"revoke",type:{name:"Composite",className:"NameTx"}}}}},Cw={type:{name:"Composite",className:"Auction",modelProperties:{activationTime:{serializedName:"activation_time",required:!0,type:{name:"UnixTime"}},approximateExpireTime:{serializedName:"approximate_expire_time",required:!0,type:{name:"UnixTime"}},auctionEnd:{serializedName:"auction_end",required:!0,type:{name:"Number"}},lastBid:{serializedName:"last_bid",type:{name:"Composite",className:"AuctionLastBid"}},name:{constraints:{Pattern:new RegExp("^\\w+\\.chain$")},serializedName:"name",required:!0,type:{name:"String"}},nameFee:{serializedName:"name_fee",required:!0,type:{name:"BigInt"}}}}},Sw={type:{name:"Composite",className:"AuctionLastBid",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Aw={type:{name:"Composite",className:"NameOwnership",modelProperties:{current:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"current",type:{name:"String"}},original:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"original",type:{name:"String"}}}}},Pw={type:{name:"Composite",className:"NameTx",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameTxTx"}}}}},Ew={type:{name:"Composite",className:"NameTxTx",modelProperties:{accountId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account_id",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"BigInt"}},nameId:{constraints:{Pattern:new RegExp("^nm_\\w{38,50}$")},serializedName:"name_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},ttl:{serializedName:"ttl",type:{name:"Number"}},type:{serializedName:"type",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"Number"}}}}},zw={type:{name:"Composite",className:"Paths1R08F8HV3NamesAuctionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Auction"}}}}}}},Iw={type:{name:"Composite",className:"PathsCrb9BgV3NamesAuctionsIdClaimsGetResponses200ContentApplicationJsonSchema",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameClaim"}}}}}}},Mw={type:{name:"Composite",className:"NameClaim",modelProperties:{activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},internalSource:{serializedName:"internal_source",type:{name:"Boolean"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},qw={type:{name:"Composite",className:"PathsMyl4W2V3NamesIdClaimsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameClaim"}}}}}}},Rw={type:{name:"Composite",className:"Paths1Ukwk06V3NamesIdTransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameTransfer"}}}}}}},Ow={type:{name:"Composite",className:"NameTransfer",modelProperties:{activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},internalSource:{serializedName:"internal_source",type:{name:"Boolean"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},kw={type:{name:"Composite",className:"PathsRcnvllV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameUpdate"}}}}}}},Bw={type:{name:"Composite",className:"NameUpdate",modelProperties:{activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},internalSource:{serializedName:"internal_source",type:{name:"Boolean"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},$w={type:{name:"Composite",className:"PathsGcr9MrV3OraclesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Oracle"}}}}}}},Uw={type:{name:"Composite",className:"Oracle",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},approximateExpireTime:{serializedName:"approximate_expire_time",required:!0,type:{name:"UnixTime"}},expireHeight:{serializedName:"expire_height",required:!0,type:{name:"Number"}},format:{serializedName:"format",type:{name:"Composite",className:"OracleFormat"}},oracle:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"BigInt"}},register:{serializedName:"register",type:{name:"Composite",className:"OracleTx"}},registerTime:{serializedName:"register_time",required:!0,type:{name:"UnixTime"}},registerTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"register_tx_hash",required:!0,type:{name:"String"}}}}},Lw={type:{name:"Composite",className:"OracleFormat",modelProperties:{query:{serializedName:"query",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}}}}},Gw={type:{name:"Composite",className:"OracleTx",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"OracleTxTx"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},Fw={type:{name:"Composite",className:"OracleTxTx",modelProperties:{abiVersion:{serializedName:"abi_version",required:!0,type:{name:"Number"}},accountId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account_id",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_id",required:!0,type:{name:"String"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"OracleTxOracleTtl"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"BigInt"}},queryFormat:{serializedName:"query_format",required:!0,type:{name:"String"}},responseFormat:{serializedName:"response_format",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"Number"}},type:{serializedName:"type",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"Number"}}}}},Dw={type:{name:"Composite",className:"OracleTxOracleTtl",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},value:{serializedName:"value",required:!0,type:{name:"Number"}}}}},Vw={type:{name:"Composite",className:"PathsZ4L2QlV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleExtend"}}}}}}},jw={type:{name:"Composite",className:"OracleExtend",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"OracleExtendTx"}}}}},Hw={type:{name:"Composite",className:"OracleExtendTx",modelProperties:{fee:{serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_id",required:!0,type:{name:"String"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"OracleExtendTxOracleTtl"}},ttl:{serializedName:"ttl",type:{name:"Number"}}}}},Jw={type:{name:"Composite",className:"OracleExtendTxOracleTtl",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},value:{serializedName:"value",required:!0,type:{name:"Number"}}}}},Ww={type:{name:"Composite",className:"Paths1Uni7AtV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleQuery"}}}}}}},Yw={type:{name:"Composite",className:"OracleQuery",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},fee:{serializedName:"fee",required:!0,type:{name:"BigInt"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"BigInt"}},queryId:{constraints:{Pattern:new RegExp("^oq_\\w{38,50}$")},serializedName:"query_id",required:!0,type:{name:"String"}},queryTtl:{serializedName:"query_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},response:{serializedName:"response",type:{name:"Composite",className:"OracleResponse"}},responseTtl:{serializedName:"response_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},senderId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",required:!0,type:{name:"String"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",required:!0,type:{name:"Number"}}}}},Kw={type:{name:"Composite",className:"OracleResponse",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},fee:{serializedName:"fee",required:!0,type:{name:"BigInt"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",type:{name:"Composite",className:"OracleResponse"}},queryId:{constraints:{Pattern:new RegExp("^oq_\\w{38,50}$")},serializedName:"query_id",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},responseTtl:{serializedName:"response_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",required:!0,type:{name:"Number"}}}}},Qw={type:{name:"Composite",className:"Paths1Tcj5A9V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleResponse"}}}}}}},Xw={type:{name:"Composite",className:"Stats",modelProperties:{feesTrend:{serializedName:"fees_trend",type:{name:"Number"}},last24HsAverageTransactionFees:{serializedName:"last_24hs_average_transaction_fees",type:{name:"Number"}},last24HsTransactions:{serializedName:"last_24hs_transactions",type:{name:"Number"}},maxTransactionsPerSecond:{serializedName:"max_transactions_per_second",type:{name:"Number"}},maxTransactionsPerSecondBlockHash:{constraints:{Pattern:new RegExp("^kh_\\w{38,50}$")},serializedName:"max_transactions_per_second_block_hash",type:{name:"String"}},minersCount:{serializedName:"miners_count",type:{name:"Number"}},transactionsTrend:{serializedName:"transactions_trend",type:{name:"Number"}}}}},Zw={type:{name:"Composite",className:"PathsV2Gh3TV3StatisticsBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},eN={type:{name:"Composite",className:"Stat",modelProperties:{count:{serializedName:"count",required:!0,type:{name:"Number"}},endDate:{serializedName:"end_date",required:!0,type:{name:"String"}},startDate:{serializedName:"start_date",required:!0,type:{name:"String"}}}}},tN={type:{name:"Composite",className:"PathsYpljbvV3DeltastatsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DeltaStat"}}}}}}},nN={type:{name:"Composite",className:"DeltaStat",modelProperties:{auctionsStarted:{serializedName:"auctions_started",required:!0,type:{name:"Number"}},blockReward:{serializedName:"block_reward",required:!0,type:{name:"BigInt"}},burnedInAuctions:{serializedName:"burned_in_auctions",required:!0,type:{name:"BigInt"}},channelsClosed:{serializedName:"channels_closed",required:!0,type:{name:"Number"}},channelsOpened:{serializedName:"channels_opened",required:!0,type:{name:"Number"}},contractsCreated:{serializedName:"contracts_created",required:!0,type:{name:"Number"}},devReward:{serializedName:"dev_reward",required:!0,type:{name:"BigInt"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},lastTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_tx_hash",required:!0,type:{name:"String"}},lockedInAuctions:{serializedName:"locked_in_auctions",required:!0,type:{name:"BigInt"}},lockedInChannels:{serializedName:"locked_in_channels",required:!0,type:{name:"BigInt"}},namesActivated:{serializedName:"names_activated",required:!0,type:{name:"Number"}},namesExpired:{serializedName:"names_expired",required:!0,type:{name:"Number"}},namesRevoked:{serializedName:"names_revoked",required:!0,type:{name:"Number"}},oraclesExpired:{serializedName:"oracles_expired",required:!0,type:{name:"Number"}},oraclesRegistered:{serializedName:"oracles_registered",required:!0,type:{name:"Number"}}}}},rN={type:{name:"Composite",className:"Paths10OmbqhV3MinerstatsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Miner"}}}}}}},iN={type:{name:"Composite",className:"Miner",modelProperties:{miner:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"miner",required:!0,type:{name:"String"}},totalReward:{serializedName:"total_reward",required:!0,type:{name:"BigInt"}}}}},aN={type:{name:"Composite",className:"PathsAc89GqV3StatisticsNamesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},sN={type:{name:"Composite",className:"Paths1Vms155V3TotalstatsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"TotalStat"}}}}}}},oN={type:{name:"Composite",className:"TotalStat",modelProperties:{activeAuctions:{serializedName:"active_auctions",required:!0,type:{name:"Number"}},activeNames:{serializedName:"active_names",required:!0,type:{name:"Number"}},activeOracles:{serializedName:"active_oracles",required:!0,type:{name:"Number"}},burnedInAuctions:{serializedName:"burned_in_auctions",required:!0,type:{name:"BigInt"}},contracts:{serializedName:"contracts",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},inactiveNames:{serializedName:"inactive_names",required:!0,type:{name:"Number"}},inactiveOracles:{serializedName:"inactive_oracles",required:!0,type:{name:"Number"}},lastTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_tx_hash",required:!0,type:{name:"String"}},lockedInAuctions:{serializedName:"locked_in_auctions",required:!0,type:{name:"BigInt"}},lockedInChannels:{serializedName:"locked_in_channels",required:!0,type:{name:"BigInt"}},openChannels:{serializedName:"open_channels",required:!0,type:{name:"Number"}},sumBlockReward:{serializedName:"sum_block_reward",required:!0,type:{name:"BigInt"}},sumDevReward:{serializedName:"sum_dev_reward",required:!0,type:{name:"BigInt"}},totalTokenSupply:{serializedName:"total_token_supply",required:!0,type:{name:"BigInt"}}}}},cN={type:{name:"Composite",className:"Paths1Syc8AnV3StatisticsTransactionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},uN={type:{name:"Composite",className:"Status",modelProperties:{mdwAsyncTasks:{serializedName:"mdw_async_tasks",type:{name:"Composite",className:"StatusMdwAsyncTasks"}},mdwGensPerMinute:{serializedName:"mdw_gens_per_minute",required:!0,type:{name:"Number"}},mdwHeight:{serializedName:"mdw_height",required:!0,type:{name:"Number"}},mdwLastMigration:{serializedName:"mdw_last_migration",required:!0,type:{name:"Number"}},mdwRevision:{serializedName:"mdw_revision",required:!0,type:{name:"String"}},mdwSynced:{serializedName:"mdw_synced",required:!0,type:{name:"Boolean"}},mdwSyncing:{serializedName:"mdw_syncing",required:!0,type:{name:"Boolean"}},mdwTxIndex:{serializedName:"mdw_tx_index",required:!0,type:{name:"Number"}},mdwVersion:{serializedName:"mdw_version",required:!0,type:{name:"String"}},nodeHeight:{serializedName:"node_height",required:!0,type:{name:"Number"}},nodeProgress:{serializedName:"node_progress",required:!0,type:{name:"Number"}},nodeRevision:{serializedName:"node_revision",required:!0,type:{name:"String"}},nodeSyncing:{serializedName:"node_syncing",required:!0,type:{name:"Boolean"}},nodeVersion:{serializedName:"node_version",required:!0,type:{name:"String"}}}}},lN={type:{name:"Composite",className:"StatusMdwAsyncTasks",modelProperties:{longTasks:{serializedName:"long_tasks",required:!0,type:{name:"Number"}},producerBuffer:{serializedName:"producer_buffer",required:!0,type:{name:"Number"}},totalPending:{serializedName:"total_pending",required:!0,type:{name:"Number"}}}}},pN={type:{name:"Composite",className:"PathsHa9C78V3TransactionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Transaction"}}}}}}},dN={type:{name:"Composite",className:"PathsVdg67V3TransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Transfer"}}}}}}},mN={type:{name:"Composite",className:"Transfer",modelProperties:{accountId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account_id",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},kind:{serializedName:"kind",required:!0,type:{name:"String"}},refBlockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"ref_block_hash",required:!0,nullable:!0,type:{name:"String"}},refTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ref_tx_hash",required:!0,nullable:!0,type:{name:"String"}},refTxType:{serializedName:"ref_tx_type",required:!0,nullable:!0,type:{name:"String"}}}}},hN={type:{name:"Composite",className:"Aex9TransferEvent",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},recipientId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient_id",required:!0,type:{name:"String"}},senderId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",required:!0,type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},fN={type:{name:"Composite",className:"Aex9TransferResponse",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},callTxi:{serializedName:"call_txi",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},recipient:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient",required:!0,type:{name:"String"}},sender:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender",required:!0,type:{name:"String"}}}}},yN={type:{name:"Composite",className:"InternalContractCallEvent",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},internalTx:{serializedName:"internal_tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}}}}},gN={type:{name:"Composite",className:"InternalTransferEvent",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},kind:{serializedName:"kind",required:!0,type:{name:"String"}},refTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ref_tx_hash",required:!0,type:{name:"String"}}}}},wN={type:{name:"Composite",className:"NameClaimEvent",modelProperties:{tx:{serializedName:"tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},NN={type:{name:"Composite",className:"Paths3Hsv3GV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...ng.type.modelProperties,...ig.type.modelProperties}}},vN={type:{name:"Composite",className:"PathsKm52GqV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchema",modelProperties:{...ig.type.modelProperties,...sg.type.modelProperties}}},bN={type:{name:"Composite",className:"Paths1Ceolv9V3AccountsAccountIdDexSwapsGetResponses200ContentApplicationJsonSchema",modelProperties:{...cg.type.modelProperties,...ig.type.modelProperties}}},xN={type:{name:"Composite",className:"Paths1Opead5V3AccountsIdActivitiesGetResponses200ContentApplicationJsonSchema",modelProperties:{...pg.type.modelProperties,...ig.type.modelProperties}}},_N={type:{name:"Composite",className:"Paths1Gc4HwtV3AccountsIdNamesPointeesGetResponses200ContentApplicationJsonSchema",modelProperties:{...hg.type.modelProperties,...ig.type.modelProperties}}},TN={type:{name:"Composite",className:"Paths1XwlyjtV3Aex141GetResponses200ContentApplicationJsonSchema",modelProperties:{...Vg.type.modelProperties,...ig.type.modelProperties}}},CN={type:{name:"Composite",className:"Paths181AjwxV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Hg.type.modelProperties,...ig.type.modelProperties}}},SN={type:{name:"Composite",className:"Paths15Mi2TaV3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...Wg.type.modelProperties,...ig.type.modelProperties}}},AN={type:{name:"Composite",className:"PathsWl652MV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...Kg.type.modelProperties,...ig.type.modelProperties}}},PN={type:{name:"Composite",className:"Paths1O7Q6IhV3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...Xg.type.modelProperties,...ig.type.modelProperties}}},EN={type:{name:"Composite",className:"Paths1Vr3Y2EV3Aex9GetResponses200ContentApplicationJsonSchema",modelProperties:{...ew.type.modelProperties,...ig.type.modelProperties}}},zN={type:{name:"Composite",className:"Paths1N61UurV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchema",modelProperties:{...rw.type.modelProperties,...ig.type.modelProperties}}},IN={type:{name:"Composite",className:"Paths1Uybd4PV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchema",modelProperties:{...ig.type.modelProperties,...sw.type.modelProperties}}},MN={type:{name:"Composite",className:"Paths3EzhapV3ChannelsGetResponses200ContentApplicationJsonSchema",modelProperties:{...cw.type.modelProperties,...ig.type.modelProperties}}},qN={type:{name:"Composite",className:"Paths1Txblx8V3ContractsCallsGetResponses200ContentApplicationJsonSchema",modelProperties:{...lw.type.modelProperties,...ig.type.modelProperties}}},RN={type:{name:"Composite",className:"Paths7A1M6RV3ContractsLogsGetResponses200ContentApplicationJsonSchema",modelProperties:{...dw.type.modelProperties,...ig.type.modelProperties}}},ON={type:{name:"Composite",className:"Paths1Di8FnjV3DexSwapsGetResponses200ContentApplicationJsonSchema",modelProperties:{...fw.type.modelProperties,...ig.type.modelProperties}}},kN={type:{name:"Composite",className:"PathsKwxlzlV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchema",modelProperties:{...yw.type.modelProperties,...ig.type.modelProperties}}},BN={type:{name:"Composite",className:"Paths277OngV3KeyBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...gw.type.modelProperties,...ig.type.modelProperties}}},$N={type:{name:"Composite",className:"Paths1159W94V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...Nw.type.modelProperties,...ig.type.modelProperties}}},UN={type:{name:"Composite",className:"Paths15Bkk50V3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...bw.type.modelProperties,...ig.type.modelProperties}}},LN={type:{name:"Composite",className:"Paths12S1Nd4V3NamesGetResponses200ContentApplicationJsonSchema",modelProperties:{..._w.type.modelProperties,...ig.type.modelProperties}}},GN={type:{name:"Composite",className:"PathsKjq4D4V3NamesAuctionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...zw.type.modelProperties,...ig.type.modelProperties}}},FN={type:{name:"Composite",className:"Paths1F98AqgV3NamesIdClaimsGetResponses200ContentApplicationJsonSchema",modelProperties:{...qw.type.modelProperties,...ig.type.modelProperties}}},DN={type:{name:"Composite",className:"Paths1Raw8PV3NamesIdTransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...Rw.type.modelProperties,...ig.type.modelProperties}}},VN={type:{name:"Composite",className:"Paths1Ec8CltV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchema",modelProperties:{...kw.type.modelProperties,...ig.type.modelProperties}}},jN={type:{name:"Composite",className:"Paths1E14NekV3OraclesGetResponses200ContentApplicationJsonSchema",modelProperties:{...$w.type.modelProperties,...ig.type.modelProperties}}},HN={type:{name:"Composite",className:"Paths1L5C64RV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Vw.type.modelProperties,...ig.type.modelProperties}}},JN={type:{name:"Composite",className:"Paths8722JhV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Ww.type.modelProperties,...ig.type.modelProperties}}},WN={type:{name:"Composite",className:"PathsVron83V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Qw.type.modelProperties,...ig.type.modelProperties}}},YN={type:{name:"Composite",className:"PathsJd68YV3StatisticsBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...Zw.type.modelProperties,...ig.type.modelProperties}}},KN={type:{name:"Composite",className:"PathsQtodvgV3DeltastatsGetResponses200ContentApplicationJsonSchema",modelProperties:{...tN.type.modelProperties,...ig.type.modelProperties}}},QN={type:{name:"Composite",className:"PathsZ2B507V3MinerstatsGetResponses200ContentApplicationJsonSchema",modelProperties:{...rN.type.modelProperties,...ig.type.modelProperties}}},XN={type:{name:"Composite",className:"PathsD2HmjxV3StatisticsNamesGetResponses200ContentApplicationJsonSchema",modelProperties:{...aN.type.modelProperties,...ig.type.modelProperties}}},ZN={type:{name:"Composite",className:"PathsFrvc1LV3TotalstatsGetResponses200ContentApplicationJsonSchema",modelProperties:{...sN.type.modelProperties,...ig.type.modelProperties}}},ev={type:{name:"Composite",className:"Paths150Ou6YV3StatisticsTransactionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...cN.type.modelProperties,...ig.type.modelProperties}}},tv={type:{name:"Composite",className:"Paths1Pymq07V3TransactionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...pN.type.modelProperties,...ig.type.modelProperties}}},nv={type:{name:"Composite",className:"PathsA7P0KiV3TransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...dN.type.modelProperties,...ig.type.modelProperties}}};class rv extends io{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const i="azsdk-js-middleware/1.0.0-beta.1",a=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:a},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}getAex141OwnedTokens(e,t){return this.sendOperationRequest({accountId:e,options:t},av)}getAex9AccountBalances(e,t){return this.sendOperationRequest({accountId:e,options:t},sv)}getAccountDexSwaps(e,t){return this.sendOperationRequest({accountId:e,options:t},ov)}getAccountActivities(e,t){return this.sendOperationRequest({id:e,options:t},cv)}getAccountPointees(e,t){return this.sendOperationRequest({id:e,options:t},uv)}getAccountTransactionsCount(e,t){return this.sendOperationRequest({id:e,options:t},lv)}getSortedAex141Contracts(e){return this.sendOperationRequest({options:e},pv)}getAex141ContractTemplates(e,t){return this.sendOperationRequest({contractId:e,options:t},dv)}getAex141TemplateTokens(e,t,n){return this.sendOperationRequest({contractId:e,templateId:t,options:n},mv)}getAex141ContractTokens(e,t){return this.sendOperationRequest({contractId:e,options:t},hv)}getAex141TokenOwner(e,t,n){return this.sendOperationRequest({contractId:e,tokenId:t,options:n},fv)}getAex141ContractTransfers(e,t){return this.sendOperationRequest({contractId:e,options:t},yv)}getAex141ByContract(e,t){return this.sendOperationRequest({id:e,options:t},gv)}getSortedAex9Tokens(e){return this.sendOperationRequest({options:e},wv)}getAex9TokensCount(e){return this.sendOperationRequest({options:e},Nv)}getAex9ContractBalances(e,t){return this.sendOperationRequest({contractId:e,options:t},vv)}getAex9ContractAccountBalance(e,t,n){return this.sendOperationRequest({contractId:e,accountId:t,options:n},bv)}getAex9ContractAccountBalanceHistory(e,t,n){return this.sendOperationRequest({contractId:e,accountId:t,options:n},xv)}getAex9ByContract(e,t){return this.sendOperationRequest({id:e,options:t},_v)}getChannels(e){return this.sendOperationRequest({options:e},Tv)}getChannel(e,t){return this.sendOperationRequest({id:e,options:t},Cv)}getContractCalls(e){return this.sendOperationRequest({options:e},Sv)}getContractLogs(e){return this.sendOperationRequest({options:e},Av)}getContract(e,t){return this.sendOperationRequest({id:e,options:t},Pv)}getDexSwaps(e){return this.sendOperationRequest({options:e},Ev)}getDexSwapsByContractId(e,t){return this.sendOperationRequest({contractId:e,options:t},zv)}getKeyBlocks(e){return this.sendOperationRequest({options:e},Iv)}getKeyBlock(e,t){return this.sendOperationRequest({hashOrKbi:e,options:t},Mv)}getKeyBlockMicroBlocks(e,t){return this.sendOperationRequest({hashOrKbi:e,options:t},qv)}getMicroBlock(e,t){return this.sendOperationRequest({hash:e,options:t},Rv)}getMicroBlockTransactions(e,t){return this.sendOperationRequest({hash:e,options:t},Ov)}getNames(e){return this.sendOperationRequest({options:e},kv)}getNamesAuctions(e){return this.sendOperationRequest({options:e},Bv)}getNameAuction(e,t){return this.sendOperationRequest({id:e,options:t},$v)}getNameAuctionClaims(e,t){return this.sendOperationRequest({id:e,options:t},Uv)}getNamesCount(e){return this.sendOperationRequest({options:e},Lv)}getName(e,t){return this.sendOperationRequest({id:e,options:t},Gv)}getNameClaims(e,t){return this.sendOperationRequest({id:e,options:t},Fv)}getNameTransfers(e,t){return this.sendOperationRequest({id:e,options:t},Dv)}getNameUpdates(e,t){return this.sendOperationRequest({id:e,options:t},Vv)}getOracles(e){return this.sendOperationRequest({options:e},jv)}getOracle(e,t){return this.sendOperationRequest({id:e,options:t},Hv)}getOracleExtends(e,t){return this.sendOperationRequest({id:e,options:t},Jv)}getOracleQueries(e,t){return this.sendOperationRequest({id:e,options:t},Wv)}getOracleResponses(e,t){return this.sendOperationRequest({id:e,options:t},Yv)}getStats(e){return this.sendOperationRequest({options:e},Kv)}getBlocksStats(e){return this.sendOperationRequest({options:e},Qv)}getDeltaStats(e){return this.sendOperationRequest({options:e},Xv)}getMinerStats(e){return this.sendOperationRequest({options:e},Zv)}getNamesStats(e){return this.sendOperationRequest({options:e},eb)}getTotalStats(e){return this.sendOperationRequest({options:e},tb)}getTransactionsStats(e){return this.sendOperationRequest({options:e},nb)}getStatus(e){return this.sendOperationRequest({options:e},rb)}getTransactions(e){return this.sendOperationRequest({options:e},ib)}getTransactionsCount(e){return this.sendOperationRequest({options:e},ab)}getTransaction(e,t){return this.sendOperationRequest({hash:e,options:t},sb)}getTransfers(e){return this.sendOperationRequest({options:e},ob)}}const iv=co(u,!1),av={path:"/v3/accounts/{accountId}/aex141/tokens",httpMethod:"GET",responses:{200:{bodyMapper:NN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}},Ty],urlParameters:[by,_y],headerParameters:[vy],serializer:iv},sv={path:"/v3/accounts/{accountId}/aex9/balances",httpMethod:"GET",responses:{200:{bodyMapper:vN},400:{bodyMapper:ag,isError:!0}},urlParameters:[by,_y],headerParameters:[vy],serializer:iv},ov={path:"/v3/accounts/{account_id}/dex/swaps",httpMethod:"GET",responses:{200:{bodyMapper:bN},400:{bodyMapper:ag,isError:!0}},queryParameters:[{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,Cy],headerParameters:[vy],serializer:iv},cv={path:"/v3/accounts/{id}/activities",httpMethod:"GET",responses:{200:{bodyMapper:xN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,{parameterPath:["options","ownedOnly"],mapper:{serializedName:"owned_only",type:{name:"Boolean"}}},{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"String"}}},Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,Sy],headerParameters:[vy],serializer:iv},uv={path:"/v3/accounts/{id}/names/pointees",httpMethod:"GET",responses:{200:{bodyMapper:_N},404:{bodyMapper:yg,isError:!0}},urlParameters:[by,Sy],headerParameters:[vy],serializer:iv},lv={path:"/v3/transactions/count/{id}",httpMethod:"GET",responses:{200:{bodyMapper:gg},400:{bodyMapper:ag,isError:!0}},urlParameters:[by,Sy],headerParameters:[vy],serializer:iv},pv={path:"/v3/aex141",httpMethod:"GET",responses:{200:{bodyMapper:TN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}},{parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"String"}}},Py,Ey],urlParameters:[by],headerParameters:[vy],serializer:iv},dv={path:"/v3/aex141/{contractId}/templates",httpMethod:"GET",responses:{200:{bodyMapper:CN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,zy],headerParameters:[vy],serializer:iv},mv={path:"/v3/aex141/{contractId}/templates/{templateId}/tokens",httpMethod:"GET",responses:{200:{bodyMapper:SN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,zy,{parameterPath:"templateId",mapper:{serializedName:"templateId",required:!0,type:{name:"Number"}}}],headerParameters:[vy],serializer:iv},hv={path:"/v3/aex141/{contractId}/tokens",httpMethod:"GET",responses:{200:{bodyMapper:AN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,zy],headerParameters:[vy],serializer:iv},fv={path:"/v3/aex141/{contractId}/tokens/{tokenId}",httpMethod:"GET",responses:{200:{bodyMapper:Qg},400:{bodyMapper:ag,isError:!0}},urlParameters:[by,zy,{parameterPath:"tokenId",mapper:{serializedName:"tokenId",required:!0,type:{name:"Number"}}}],headerParameters:[vy],serializer:iv},yv={path:"/v3/aex141/{contractId}/transfers",httpMethod:"GET",responses:{200:{bodyMapper:PN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}},Iy,My],urlParameters:[by,zy],headerParameters:[vy],serializer:iv},gv={path:"/v3/aex141/{id}",httpMethod:"GET",responses:{200:{bodyMapper:jg},400:{bodyMapper:ag,isError:!0}},urlParameters:[by,qy],headerParameters:[vy],serializer:iv},wv={path:"/v3/aex9",httpMethod:"GET",responses:{200:{bodyMapper:EN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Py,Ey,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}},{parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},Nv={path:"/v3/aex9/count",httpMethod:"GET",responses:{200:{bodyMapper:nw}},urlParameters:[by],headerParameters:[vy],serializer:iv},vv={path:"/v3/aex9/{contractId}/balances",httpMethod:"GET",responses:{200:{bodyMapper:zN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}},Ry,Oy],urlParameters:[by,zy],headerParameters:[vy],serializer:iv},bv={path:"/v3/aex9/{contractId}/balances/{accountId}",httpMethod:"GET",responses:{200:{bodyMapper:aw},400:{bodyMapper:ag,isError:!0}},queryParameters:[ky],urlParameters:[by,_y,zy],headerParameters:[vy],serializer:iv},xv={path:"/v3/aex9/{contractId}/balances/{accountId}/history",httpMethod:"GET",responses:{200:{bodyMapper:IN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,_y,zy],headerParameters:[vy],serializer:iv},_v={path:"/v3/aex9/{id}",httpMethod:"GET",responses:{200:{bodyMapper:tw},400:{bodyMapper:ag,isError:!0}},urlParameters:[by,qy],headerParameters:[vy],serializer:iv},Tv={path:"/v3/channels",httpMethod:"GET",responses:{200:{bodyMapper:MN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}},{parameterPath:["options","state"],mapper:{serializedName:"state",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},Cv={path:"/v3/channels/{id}",httpMethod:"GET",responses:{200:{bodyMapper:uw},400:{bodyMapper:ag,isError:!0},404:{bodyMapper:yg,isError:!0}},urlParameters:[by,By],headerParameters:[vy],serializer:iv},Sv={path:"/v3/contracts/calls",httpMethod:"GET",responses:{200:{bodyMapper:qN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},Av={path:"/v3/contracts/logs",httpMethod:"GET",responses:{200:{bodyMapper:RN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ay,$y,{parameterPath:["options","event"],mapper:{serializedName:"event",type:{name:"String"}}},{parameterPath:["options","function"],mapper:{serializedName:"function",type:{name:"String"}}},{parameterPath:["options","functionPrefix"],mapper:{serializedName:"function_prefix",type:{name:"String"}}},{parameterPath:["options","data"],mapper:{serializedName:"data",type:{name:"String"}}},{parameterPath:["options","aexnArgs"],mapper:{serializedName:"aexn-args",type:{name:"Boolean"}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},Pv={path:"/v3/contracts/{id}",httpMethod:"GET",responses:{200:{bodyMapper:hw},400:{bodyMapper:ag,isError:!0},404:{bodyMapper:yg,isError:!0}},urlParameters:[by,qy],headerParameters:[vy],serializer:iv},Ev={path:"/v3/dex/swaps",httpMethod:"GET",responses:{200:{bodyMapper:ON},400:{bodyMapper:ag,isError:!0}},queryParameters:[{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},zv={path:"/v3/dex/{contract_id}/swaps",httpMethod:"GET",responses:{200:{bodyMapper:kN},400:{bodyMapper:ag,isError:!0}},queryParameters:[{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,Uy],headerParameters:[vy],serializer:iv},Iv={path:"/v3/key-blocks",httpMethod:"GET",responses:{200:{bodyMapper:BN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},Mv={path:"/v3/key-blocks/{hash_or_kbi}",httpMethod:"GET",responses:{200:{bodyMapper:ww},400:{bodyMapper:ag,isError:!0},404:{bodyMapper:yg,isError:!0}},urlParameters:[by,Ly],headerParameters:[vy],serializer:iv},qv={path:"/v3/key-blocks/{hash_or_kbi}/micro-blocks",httpMethod:"GET",responses:{200:{bodyMapper:$N},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,Ly],headerParameters:[vy],serializer:iv},Rv={path:"/v3/micro-blocks/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:vw},400:{bodyMapper:ag,isError:!0},404:{bodyMapper:yg,isError:!0}},urlParameters:[by,Gy],headerParameters:[vy],serializer:iv},Ov={path:"/v3/micro-blocks/{hash}/transactions",httpMethod:"GET",responses:{200:{bodyMapper:UN},400:{bodyMapper:ag,isError:!0}},urlParameters:[by,Gy],headerParameters:[vy],serializer:iv},kv={path:"/v3/names",httpMethod:"GET",responses:{200:{bodyMapper:LN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Py,Ry,Fy,Dy,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},Bv={path:"/v3/names/auctions",httpMethod:"GET",responses:{200:{bodyMapper:GN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},$v={path:"/v3/names/auctions/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Cw},400:{bodyMapper:ag,isError:!0},404:{bodyMapper:yg,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,Vy],headerParameters:[vy],serializer:iv},Uv={path:"/v3/names/auctions/{id}/claims",httpMethod:"GET",responses:{200:{bodyMapper:Iw},404:{bodyMapper:yg,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,Vy],headerParameters:[vy],serializer:iv},Lv={path:"/v3/names/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}},400:{bodyMapper:ag,isError:!0}},queryParameters:[Fy],urlParameters:[by],headerParameters:[vy],serializer:iv},Gv={path:"/v3/names/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Tw},400:{bodyMapper:ag,isError:!0},404:{bodyMapper:yg,isError:!0}},urlParameters:[by,Vy],headerParameters:[vy],serializer:iv},Fv={path:"/v3/names/{id}/claims",httpMethod:"GET",responses:{200:{bodyMapper:FN},404:{bodyMapper:yg,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,Vy],headerParameters:[vy],serializer:iv},Dv={path:"/v3/names/{id}/transfers",httpMethod:"GET",responses:{200:{bodyMapper:DN},404:{bodyMapper:yg,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,Vy],headerParameters:[vy],serializer:iv},Vv={path:"/v3/names/{id}/updates",httpMethod:"GET",responses:{200:{bodyMapper:VN},404:{bodyMapper:yg,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,Vy],headerParameters:[vy],serializer:iv},jv={path:"/v3/oracles",httpMethod:"GET",responses:{200:{bodyMapper:jN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ay,Dy,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},Hv={path:"/v3/oracles/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Uw},400:{bodyMapper:ag,isError:!0},404:{bodyMapper:yg,isError:!0}},urlParameters:[by,jy],headerParameters:[vy],serializer:iv},Jv={path:"/v3/oracles/{id}/extends",httpMethod:"GET",responses:{200:{bodyMapper:HN},400:{bodyMapper:ag,isError:!0},404:{bodyMapper:yg,isError:!0}},urlParameters:[by,jy],headerParameters:[vy],serializer:iv},Wv={path:"/v3/oracles/{id}/queries",httpMethod:"GET",responses:{200:{bodyMapper:JN},400:{bodyMapper:ag,isError:!0},404:{bodyMapper:yg,isError:!0}},urlParameters:[by,jy],headerParameters:[vy],serializer:iv},Yv={path:"/v3/oracles/{id}/responses",httpMethod:"GET",responses:{200:{bodyMapper:WN},400:{bodyMapper:ag,isError:!0},404:{bodyMapper:yg,isError:!0}},urlParameters:[by,jy],headerParameters:[vy],serializer:iv},Kv={path:"/v3/stats",httpMethod:"GET",responses:{200:{bodyMapper:Xw},400:{bodyMapper:ag,isError:!0}},urlParameters:[by],headerParameters:[vy],serializer:iv},Qv={path:"/v3/statistics/blocks",httpMethod:"GET",responses:{200:{bodyMapper:YN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"String"}}},Hy,Jy,{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"String"}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},Xv={path:"/v3/deltastats",httpMethod:"GET",responses:{200:{bodyMapper:KN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},Zv={path:"/v3/minerstats",httpMethod:"GET",responses:{200:{bodyMapper:QN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},eb={path:"/v3/statistics/names",httpMethod:"GET",responses:{200:{bodyMapper:XN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Hy,Jy,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"String"}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},tb={path:"/v3/totalstats",httpMethod:"GET",responses:{200:{bodyMapper:ZN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},nb={path:"/v3/statistics/transactions",httpMethod:"GET",responses:{200:{bodyMapper:ev},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Hy,Jy,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"String"}}},Wy,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},rb={path:"/v3/status",httpMethod:"GET",responses:{200:{bodyMapper:uN}},urlParameters:[by],headerParameters:[vy],serializer:iv},ib={path:"/v3/transactions",httpMethod:"GET",responses:{200:{bodyMapper:tv},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ty,Ay,{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"Sequence",element:{type:{name:"String"}}}},collectionFormat:"Multi"},{parameterPath:["options","typeGroup"],mapper:{serializedName:"type_group",type:{name:"Sequence",element:{type:{name:"String"}}}},collectionFormat:"Multi"},Yy,Ky,Qy,Xy,Zy,{parameterPath:["options","entrypoint"],mapper:{serializedName:"entrypoint",type:{name:"String"}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},ab={path:"/v3/transactions/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}}},queryParameters:[Ay,Wy,eg],urlParameters:[by],headerParameters:[vy],serializer:iv},sb={path:"/v3/transactions/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:xw},400:{bodyMapper:ag,isError:!0},404:{bodyMapper:yg,isError:!0}},urlParameters:[by,tg],headerParameters:[vy],serializer:iv},ob={path:"/v3/transfers",httpMethod:"GET",responses:{200:{bodyMapper:nv},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},cb=[av,sv,ov,cv,uv,lv,pv,dv,mv,hv,fv,yv,gv,wv,Nv,vv,bv,_v,Tv,Cv,Sv,Av,Pv,Ev,zv,Iv,Mv,qv,Rv,Ov,kv,Bv,$v,Uv,Lv,Gv,Fv,Dv,Vv,jv,Hv,Jv,Wv,Yv,Kv,Qv,Xv,Zv,eb,tb,nb,rb,ib,ab,sb,ob];function ub(e,t){return e.get(lb(e,t))}function lb(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}class pb extends z{constructor(e){super(`There is no ${e?"next":"previous"} page`),this.name="MiddlewarePageMissed"}}var db=new WeakMap;class mb{constructor(e,t){var n,r;(function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)})(this,db,void 0),this.data=e.data,this.nextPath=e.next,this.prevPath=e.prev,r=t,(n=db).set(lb(n,this),r)}async next(){if(null==this.nextPath)throw new pb(!0);return ub(db,this).requestByPath(this.nextPath)}async prev(){if(null==this.prevPath)throw new pb(!1);return ub(db,this).requestByPath(this.prevPath)}}class hb extends rv{constructor(e,{ignoreVersion:t=!1,retryCount:n=3,retryOverallDelay:r=800,...i}={}){let a;super(e,{allowInsecureConnection:!0,additionalPolicies:[...t?[]:[wo("middleware",(async e=>(null!=a||(a=(await this.getStatus(e)).mdwVersion),a)),"1.81.0","2.0.0")],ho(),fo(),No(n,r),go((e=>` ${e.error}`))],...i}),this.pipeline.addPolicy(mo,{phase:"Deserialize"}),this.pipeline.removePolicy({name:an}),this.pipeline.removePolicy({name:An}),this.pipeline.removePolicy({name:"defaultRetryPolicy"})}async requestByPath(e){const t=e.indexOf("?"),n=e.slice(0,-1===t?e.length:t),r=e.slice(-1===t?e.length:t+1),i=cb.find((e=>{let t=n;if(null==e.path)return!1;const r=e.path.replace(/{\w+}/g,"{param}").split("{param}");for(;r.length>0;){const n=r.shift();if(null==n)throw new te(`Unexpected operation spec path: ${e.path}`);if(!t.startsWith(n))return!1;t=t.replace(n,""),r.length>0&&(t=t.replace(/^[\w.]+/,""))}return""===t}));if(null==i)throw new F(`Can't find operation spec corresponding to ${n}`);return this.sendOperationRequest({},{...i,path:n,urlParameters:i.urlParameters?.filter((({parameterPath:e})=>"$host"===e)),queryParameters:Array.from(new URLSearchParams(r)).map((([e,t])=>({parameterPath:["options",e],mapper:{defaultValue:t.toString(),serializedName:e,type:{name:"String"}}})))})}async sendOperationRequest(e,t){const n=await super.sendOperationRequest(e,t);return function(e){const t=e;return null!=t?.data&&Array.isArray(t.data)&&"next"in t&&"prev"in t}(n)?new mb(n,this):n}}var fb=(e,t)=>(e.connect((e=>t.sendMessage(e)),(()=>t.disconnect())),t.connect((t=>e.sendMessage(t)),(()=>e.disconnect())),()=>{e.disconnect(),t.disconnect()});class yb{constructor({debug:e=!1}){this.debug=e}connect(e,t){if(this.isConnected())throw new Je("You already connected")}disconnect(){if(!this.isConnected())throw new We("You dont have connection. Please connect before")}receiveMessage(e){this.debug&&console.log("Receive message:",e)}sendMessage(e){this.debug&&console.log("Send message:",e)}}function gb(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function wb(e,t){return e.get(vb(e,t))}function Nb(e,t,n){return e.set(vb(e,t),n),n}function vb(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var bb=new WeakMap,xb=new WeakMap,_b=new WeakMap;class Tb extends yb{constructor({target:e,self:t=window,origin:n,sendDirection:r,receiveDirection:i=Mp.to_aepp,...a}={}){super(a),gb(this,bb,void 0),gb(this,xb,void 0),gb(this,_b,void 0),Nb(xb,this,e),Nb(_b,this,t),this.origin=n,this.sendDirection=r,this.receiveDirection=i}isConnected(){return null!=this.listener}connect(e,t){super.connect(e,t),this.listener=t=>{var n;if("object"!=typeof t.data||"2.0"!==(null!==(n=t.data.jsonrpc)&&void 0!==n?n:t.data.data?.jsonrpc))return;if(null!=this.origin&&this.origin!==t.origin)return;if(null!=wb(xb,this)&&wb(xb,this)!==t.source)return;this.receiveMessage(t);let{data:r}=t;if(null!=r.type){if(t.data.type!==this.receiveDirection)return;r=r.data}e(r,t.origin,t.source)},wb(_b,this).addEventListener("message",this.listener),Nb(bb,this,t)}disconnect(){if(super.disconnect(),null==this.listener||null==wb(bb,this))throw new te("Expected to not happen, required for TS");wb(_b,this).removeEventListener("message",this.listener),delete this.listener,wb(bb,this).call(this),Nb(bb,this,void 0)}sendMessage(e){var t;if(null==wb(xb,this))throw new Ye("Can't send messages without target");const n=null!=this.sendDirection?{type:this.sendDirection,data:e}:e;super.sendMessage(n),wb(xb,this).postMessage(n,null!==(t=this.origin)&&void 0!==t?t:"*")}}var Cb=(e,t)=>{if(null==window)throw new K("Window object not found, you can run wallet detector only in browser");const n={};return e.connect((({method:e,params:r},i,a)=>{if(e!==Op.readyToConnect||null!=n[r.id])return;const s={info:r,getConnection(){return new Tb({target:a,..."extension"===r.type?{sendDirection:Mp.to_waellet,receiveDirection:Mp.to_aepp,..."null"!==window.origin&&{origin:window.origin}}:{origin:r.origin}})}};n[s.info.id]=s,t({wallets:n,newWallet:s})}),(()=>{})),()=>e.disconnect()};function Sb(e,t,n){return e.set(Pb(e,t),n),n}function Ab(e,t){return e.get(Pb(e,t))}function Pb(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Eb=new WeakMap;class zb extends yb{constructor({port:e,...t}){var n,r,i;super(t),i=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=Eb),r.set(n,i),this.port=e}disconnect(){if(super.disconnect(),this.port.disconnect(),null==Ab(Eb,this))throw new ne;this.port.onMessage.removeListener(Ab(Eb,this)[0]),this.port.onDisconnect.removeListener(Ab(Eb,this)[1]),Sb(Eb,this,void 0)}connect(e,t){super.connect(e,t),Sb(Eb,this,[(t,n)=>{var r;this.receiveMessage(t),e(t,null!==(r=n.sender?.url)&&void 0!==r?r:"",n)},t]),this.port.onMessage.addListener(Ab(Eb,this)[0]),this.port.onDisconnect.addListener(Ab(Eb,this)[1])}sendMessage(e){super.sendMessage(e),this.port.postMessage(e)}isConnected(){return null!=Ab(Eb,this)}}}(),r}()}));
|
|
3
|
+
//# sourceMappingURL=aepp-sdk.browser-script.cjs.map
|